@deephaven/embed-grid 0.16.1-vite.20 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,3 +4,4 @@ import{f as lt,t as Wr,d as tt,g as tx,r as fl,i as ck,a as rx,e as zd,m as uk,h
4
4
  `);if(s!==-1&&(l=o.substr(s+1),o=o.substr(0,s)),a&&(o==="00:00:00"||o==="00:00"?(o=l,l=""):o.length===8&&(o=o.replace(/:00$/,""))),l)if(r)i==="d"?o+=", "+l:o=l+(o?", "+o:"");else if(!t._inCalcTicks||t._prevDateHead!==l)t._prevDateHead=l,o+="<br>"+l;else{var f=ml(t),c=t._trueSide||t.side;(!f&&c==="top"||f&&c==="bottom")&&(o+="<br> ")}e.text=o}function PL(t,e,r,a,i){var n=t.dtick,o=e.x,l=t.tickformat,s=typeof n=="string"&&n.charAt(0);if(i==="never"&&(i=""),a&&s!=="L"&&(n="L3",s="L"),l||s==="L")e.text=pl(Math.pow(10,o),t,i,a);else if(Jt(n)||s==="D"&&it.mod(o+.01,1)<.1){var f=Math.round(o),c=Math.abs(f),v=t.exponentformat;v==="power"||mf(v)&&uh(f)?(f===0?e.text=1:f===1?e.text="10":e.text="10<sup>"+(f>1?"":Yi)+c+"</sup>",e.fontSize*=1.25):(v==="e"||v==="E")&&c>2?e.text="1"+v+(f>0?"+":Yi)+c:(e.text=pl(Math.pow(10,o),t,"","fakehover"),n==="D1"&&t._id.charAt(0)==="y"&&(e.dy-=e.fontSize/6))}else if(s==="D")e.text=String(Math.round(Math.pow(10,it.mod(o,1)))),e.fontSize*=.75;else throw"unrecognized dtick "+String(n);if(t.dtick==="D1"){var u=String(e.text).charAt(0);(u==="0"||u==="1")&&(t._id.charAt(0)==="y"?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(o<0?.5:.25)))}}function zL(t,e){var r=t._categories[Math.round(e.x)];r===void 0&&(r=""),e.text=String(r)}function IL(t,e,r){var a=Math.round(e.x),i=t._categories[a]||[],n=i[1]===void 0?"":String(i[1]),o=i[0]===void 0?"":String(i[0]);r?e.text=o+" - "+n:(e.text=n,e.text2=o)}function NL(t,e,r,a,i){i==="never"?i="":t.showexponent==="all"&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=pl(e.x,t,i,a)}function FL(t,e,r,a,i){if(t.thetaunit==="radians"&&!r){var n=e.x/180;if(n===0)e.text="0";else{var o=HL(n);if(o[1]>=100)e.text=pl(it.deg2rad(e.x),t,i,a);else{var l=e.x<0;o[1]===1?o[0]===1?e.text="\u03C0":e.text=o[0]+"\u03C0":e.text=["<sup>",o[0],"</sup>","\u2044","<sub>",o[1],"</sub>","\u03C0"].join(""),l&&(e.text=Yi+e.text)}}}else e.text=pl(e.x,t,i,a)}function HL(t){function e(l,s){return Math.abs(l-s)<=1e-6}function r(l,s){return e(s,0)?l:r(s,l%s)}function a(l){for(var s=1;!e(Math.round(l*s)/s,l);)s*=10;return s}var i=a(t),n=t*i,o=Math.abs(r(n,i));return[Math.round(n/o),Math.round(i/o)]}var OL=["f","p","n","\u03BC","m","","k","M","G","T"];function mf(t){return t==="SI"||t==="B"}function uh(t){return t>14||t<-15}function pl(t,e,r,a){var i=t<0,n=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,s=Se.getTickFormat(e),f=e.separatethousands;if(a){var c={exponentformat:o,minexponent:e.minexponent,dtick:e.showexponent==="none"?e.dtick:Jt(t)&&Math.abs(t)||1,range:e.showexponent==="none"?e.range.map(e.r2d):[0,t||1]};U1(c),n=(Number(c._tickround)||0)+4,l=c._tickexponent,e.hoverformat&&(s=e.hoverformat)}if(s)return e._numFormat(s)(t).replace(/-/g,Yi);var v=Math.pow(10,-n)/2;if(o==="none"&&(l=0),t=Math.abs(t),t<v)t="0",i=!1;else{if(t+=v,l&&(t*=Math.pow(10,-l),n+=l),n===0)t=String(Math.floor(t));else if(n<0){t=String(Math.round(t)),t=t.substr(0,t.length+n);for(var u=n;u<0;u++)t+="0"}else{t=String(t);var d=t.indexOf(".")+1;d&&(t=t.substr(0,d+n).replace(/\.?0+$/,""))}t=it.numSeparate(t,e._separators,f)}if(l&&o!=="hide"){mf(o)&&uh(l)&&(o="power");var h;l<0?h=Yi+-l:o!=="power"?h="+"+l:h=String(l),o==="e"||o==="E"?t+=o+h:o==="power"?t+="\xD710<sup>"+h+"</sup>":o==="B"&&l===9?t+="B":mf(o)&&(t+=OL[l/3+5])}return i?Yi+t:t}Se.getTickFormat=function(t){var e;function r(s){return typeof s!="string"?s:Number(s.replace("M",""))*Jn}function a(s,f){var c=["L","D"];if(typeof s==typeof f){if(typeof s=="number")return s-f;var v=c.indexOf(s.charAt(0)),u=c.indexOf(f.charAt(0));return v===u?Number(s.replace(/(L|D)/g,""))-Number(f.replace(/(L|D)/g,"")):v-u}else return typeof s=="number"?1:-1}function i(s,f,c){var v=c||function(h){return h},u=f[0],d=f[1];return(!u&&typeof u!="number"||v(u)<=v(s))&&(!d&&typeof d!="number"||v(d)>=v(s))}function n(s,f){var c=f[0]===null,v=f[1]===null,u=a(s,f[0])>=0,d=a(s,f[1])<=0;return(c||u)&&(v||d)}var o,l;if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":{for(e=0;e<t.tickformatstops.length;e++)if(l=t.tickformatstops[e],l.enabled&&i(t.dtick,l.dtickrange,r)){o=l;break}break}case"log":{for(e=0;e<t.tickformatstops.length;e++)if(l=t.tickformatstops[e],l.enabled&&n(t.dtick,l.dtickrange)){o=l;break}break}}return o?o.value:t.tickformat};Se.getSubplots=function(t,e){var r=t._fullLayout._subplots,a=r.cartesian.concat(r.gl2d||[]),i=e?Se.findSubplotsWithAxis(a,e):a;return i.sort(function(n,o){var l=n.substr(1).split("y"),s=o.substr(1).split("y");return l[0]===s[0]?+l[1]-+s[1]:+l[0]-+s[0]}),i};Se.findSubplotsWithAxis=function(t,e){for(var r=new RegExp(e._id.charAt(0)==="x"?"^"+e._id+"y":e._id+"$"),a=[],i=0;i<t.length;i++){var n=t[i];r.test(n)&&a.push(n)}return a};Se.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r={_offset:0,_length:e.width,_id:""},a={_offset:0,_length:e.height,_id:""},i=Se.list(t,"x",!0),n=Se.list(t,"y",!0),o=[],l,s;for(l=0;l<i.length;l++)for(o.push({x:i[l],y:a}),s=0;s<n.length;s++)l===0&&o.push({x:r,y:n[s]}),o.push({x:i[l],y:n[s]});var f=e._clips.selectAll(".axesclip").data(o,function(c){return c.x._id+c.y._id});f.enter().append("clipPath").classed("axesclip",!0).attr("id",function(c){return"clip"+e._uid+c.x._id+c.y._id}).append("rect"),f.exit().remove(),f.each(function(c){Aa.select(this).select("rect").attr({x:c.x._offset||0,y:c.y._offset||0,width:c.x._length||1,height:c.y._length||1})})}};Se.draw=function(t,e,r){var a=t._fullLayout;e==="redraw"&&a._paper.selectAll("g.subplot").each(function(n){var o=n[0],l=a._plots[o];if(l){var s=l.xaxis,f=l.yaxis;l.xaxislayer.selectAll("."+s._id+"tick").remove(),l.yaxislayer.selectAll("."+f._id+"tick").remove(),l.xaxislayer.selectAll("."+s._id+"tick2").remove(),l.yaxislayer.selectAll("."+f._id+"tick2").remove(),l.xaxislayer.selectAll("."+s._id+"divider").remove(),l.yaxislayer.selectAll("."+f._id+"divider").remove(),l.gridlayer&&l.gridlayer.selectAll("path").remove(),l.zerolinelayer&&l.zerolinelayer.selectAll("path").remove(),a._infolayer.select(".g-"+s._id+"title").remove(),a._infolayer.select(".g-"+f._id+"title").remove()}});var i=!e||e==="redraw"?Se.listIds(t):e;return it.syncOrAsync(i.map(function(n){return function(){if(!!n){var o=Se.getFromId(t,n),l=Se.drawOne(t,o,r);return o._r=o.range.slice(),o._rl=it.simpleMap(o._r,o.r2l),l}}}))};Se.drawOne=function(t,e,r){r=r||{};var a,i,n;e.setScale();var o=t._fullLayout,l=e._id,s=l.charAt(0),f=Se.counterLetter(l),c=o._plots[e._mainSubplot];if(!c)return;var v=c[s+"axislayer"],u=e._mainLinePosition,d=e._mainMirrorPosition,h=e._vals=Se.calcTicks(e),p=[e.mirror,u,d].join("_");for(a=0;a<h.length;a++)h[a].axInfo=p;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var g={};function _(W){var K=l+(W||"tick");return g[K]||(g[K]=UL(e,K)),g[K]}if(!!e.visible){var b=Se.makeTransTickFn(e),w=Se.makeTransTickLabelFn(e),m,y,x=e.ticks==="inside",T=e.ticks==="outside";if(e.tickson==="boundaries"){var k=BL(e,h);y=Se.clipEnds(e,k),m=x?y:k}else y=Se.clipEnds(e,h),m=x&&e.ticklabelmode!=="period"?y:h;var S=e._gridVals=y,A=GL(e,h);if(!o._hasOnlyLargeSploms){var $=e._subplotsWith,M={};for(a=0;a<$.length;a++){i=$[a],n=o._plots[i];var C=n[f+"axis"],E=C._mainAxis._id;if(!M[E]){M[E]=1;var I=s==="x"?"M0,"+C._offset+"v"+C._length:"M"+C._offset+",0h"+C._length;Se.drawGrid(t,e,{vals:S,counterAxis:C,layer:n.gridlayer.select("."+l),path:I,transFn:b}),Se.drawZeroLine(t,e,{counterAxis:C,layer:n.zerolinelayer,path:I,transFn:b})}}}var P=Se.getTickSigns(e),R=[];if(e.ticks){var L=Se.makeTickPath(e,u,P[2]),D,z;e._anchorAxis&&e.mirror&&e.mirror!==!0?(D=Se.makeTickPath(e,d,P[3]),z=L+D):(D="",z=L);var F;if(e.showdividers&&T&&e.tickson==="boundaries"){var H={};for(a=0;a<A.length;a++)H[A[a].x]=1;F=function(W){return H[W.x]?D:z}}else F=z;Se.drawTicks(t,e,{vals:m,layer:v,path:F,transFn:b}),e.mirror==="allticks"&&(R=Object.keys(e._linepositions||{}))}for(a=0;a<R.length;a++){i=R[a],n=o._plots[i];var U=e._linepositions[i]||[],B=Se.makeTickPath(e,U[0],P[0])+Se.makeTickPath(e,U[1],P[1]);Se.drawTicks(t,e,{vals:m,layer:n[s+"axislayer"],path:B,transFn:b})}var X=[];if(X.push(function(){return Se.drawLabels(t,e,{vals:h,layer:v,plotinfo:n,transFn:w,labelFns:Se.makeLabelFns(e,u)})}),e.type==="multicategory"){var O={x:2,y:10}[s];X.push(function(){var W={x:"height",y:"width"}[s],K=_()[W]+O+(e._tickAngles[l+"tick"]?e.tickfont.size*pf:0);return Se.drawLabels(t,e,{vals:jL(e,h),layer:v,cls:l+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:b,labelFns:Se.makeLabelFns(e,u+K*P[4])})}),X.push(function(){return e._depth=P[4]*(_("tick2")[e.side]-u),qL(t,e,{vals:A,layer:v,path:Se.makeTickPath(e,u,P[4],e._depth),transFn:b})})}else e.title.hasOwnProperty("standoff")&&X.push(function(){e._depth=P[4]*(_()[e.side]-u)});var Y=dl.getComponentMethod("rangeslider","isVisible")(e);return X.push(function(){var W=e.side.charAt(0),K=xL[e.side].charAt(0),Z=Se.getPxPosition(t,e),ae=T?e.ticklen:0,ne,oe,re,se;if((e.automargin||Y)&&(e.type==="multicategory"?ne=_("tick2"):(ne=_(),s==="x"&&W==="b"&&(e._depth=Math.max(ne.width>0?ne.bottom-Z:0,ae)))),e.automargin){oe={x:0,y:0,r:0,l:0,t:0,b:0};var me=[0,1];if(s==="x"){if(W==="b"?oe[W]=e._depth:(oe[W]=e._depth=Math.max(ne.width>0?Z-ne.top:0,ae),me.reverse()),ne.width>0){var Re=ne.right-(e._offset+e._length);Re>0&&(oe.xr=1,oe.r=Re);var ke=e._offset-ne.left;ke>0&&(oe.xl=0,oe.l=ke)}}else if(W==="l"?oe[W]=e._depth=Math.max(ne.height>0?Z-ne.left:0,ae):(oe[W]=e._depth=Math.max(ne.height>0?ne.right-Z:0,ae),me.reverse()),ne.height>0){var ze=ne.bottom-(e._offset+e._length);ze>0&&(oe.yb=0,oe.b=ze);var he=e._offset-ne.top;he>0&&(oe.yt=1,oe.t=he)}oe[f]=e.anchor==="free"?e.position:e._anchorAxis.domain[me[0]],e.title.text!==o._dfltTitle[s]&&(oe[W]+=V1(e)+(e.title.standoff||0)),e.mirror&&e.anchor!=="free"&&(re={x:0,y:0,r:0,l:0,t:0,b:0},re[K]=e.linewidth,e.mirror&&e.mirror!==!0&&(re[K]+=ae),e.mirror===!0||e.mirror==="ticks"?re[f]=e._anchorAxis.domain[me[1]]:(e.mirror==="all"||e.mirror==="allticks")&&(re[f]=[e._counterDomainMin,e._counterDomainMax][me[1]]))}Y&&(se=dl.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),qn.autoMargin(t,vh(e),oe),qn.autoMargin(t,X1(e),re),qn.autoMargin(t,Y1(e),se)}),!r.skipTitle&&!(Y&&e.side==="bottom")&&X.push(function(){return XL(t,e)}),it.syncOrAsync(X)}};function BL(t,e){var r=[],a,i=function(n,o){var l=n.xbnd[o];l!==null&&r.push(it.extendFlat({},n,{x:l}))};if(e.length){for(a=0;a<e.length;a++)i(e[a],0);i(e[a-1],1)}return r}function jL(t,e){for(var r=[],a={},i=0;i<e.length;i++){var n=e[i];a[n.text2]?a[n.text2].push(n.x):a[n.text2]=[n.x]}for(var o in a)r.push(ch(t,it.interp(a[o],.5),o));return r}function GL(t,e){var r=[],a,i,n=e.length&&e[e.length-1].x<e[0].x,o=function(s,f){var c=s.xbnd[f];c!==null&&r.push(it.extendFlat({},s,{x:c}))};if(t.showdividers&&e.length){for(a=0;a<e.length;a++){var l=e[a];l.text2!==i&&o(l,n?1:0),i=l.text2}o(e[a-1],n?0:1)}return r}function UL(t,e){var r,a,i,n;return t._selections[e].size()?(r=1/0,a=-1/0,i=1/0,n=-1/0,t._selections[e].each(function(){var o=Jv(this),l=na.bBox(o.node().parentNode);r=Math.min(r,l.top),a=Math.max(a,l.bottom),i=Math.min(i,l.left),n=Math.max(n,l.right)})):(r=0,a=0,i=0,n=0),{top:r,bottom:a,left:i,right:n,height:a-r,width:n-i}}Se.getTickSigns=function(t){var e=t._id.charAt(0),r={x:"top",y:"right"}[e],a=t.side===r?1:-1,i=[-1,1,a,-a];return t.ticks!=="inside"==(e==="x")&&(i=i.map(function(n){return-n})),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i};Se.makeTransTickFn=function(t){return t._id.charAt(0)==="x"?function(e){return Qn(t._offset+t.l2p(e.x),0)}:function(e){return Qn(0,t._offset+t.l2p(e.x))}};Se.makeTransTickLabelFn=function(t){var e=VL(t),r=e[0],a=e[1];return t._id.charAt(0)==="x"?function(i){return Qn(r+t._offset+t.l2p(Qv(i)),a)}:function(i){return Qn(a,r+t._offset+t.l2p(Qv(i)))}};function Qv(t){return t.periodX!==void 0?t.periodX:t.x}function VL(t){var e=t.ticklabelposition||"",r=function(d){return e.indexOf(d)!==-1},a=r("top"),i=r("left"),n=r("right"),o=r("bottom"),l=r("inside"),s=o||i||a||n;if(!s&&!l)return[0,0];var f=t.side,c=s?(t.tickwidth||0)/2:0,v=Kv,u=t.tickfont?t.tickfont.size:12;return(o||a)&&(c+=u*Wi,v+=(t.linewidth||0)/2),(i||n)&&(c+=(t.linewidth||0)/2,v+=Kv),l&&f==="top"&&(v-=u*(1-Wi)),(i||a)&&(c=-c),(f==="bottom"||f==="right")&&(v=-v),[s?c:0,l?v:0]}Se.makeTickPath=function(t,e,r,a){a=a!==void 0?a:t.ticklen;var i=t._id.charAt(0),n=(t.linewidth||1)/2;return i==="x"?"M0,"+(e+n*r)+"v"+a*r:"M"+(e+n*r)+",0h"+a*r};Se.makeLabelFns=function(t,e,r){var a=t.ticklabelposition||"",i=function(M){return a.indexOf(M)!==-1},n=i("top"),o=i("left"),l=i("right"),s=i("bottom"),f=s||o||n||l,c=i("inside"),v=a==="inside"&&t.ticks==="inside"||!c&&t.ticks==="outside"&&t.tickson!=="boundaries",u=0,d=0,h=v?t.ticklen:0;if(c?h*=-1:f&&(h=0),v&&(u+=h,r)){var p=it.deg2rad(r);u=h*Math.cos(p)+1,d=h*Math.sin(p)}t.showticklabels&&(v||t.showline)&&(u+=.2*t.tickfont.size),u+=(t.linewidth||1)/2*(c?-1:1);var g={labelStandoff:u,labelShift:d},_,b,w,m,y=0,x=t.side,T=t._id.charAt(0),k=t.tickangle,S;if(T==="x")S=!c&&x==="bottom"||c&&x==="top",m=S?1:-1,c&&(m*=-1),_=d*m,b=e+u*m,w=S?1:-.2,Math.abs(k)===90&&(c?w+=us:k===-90&&x==="bottom"?w=Wi:k===90&&x==="top"?w=us:w=.5,y=us/2*(k/90)),g.xFn=function(M){return M.dx+_+y*M.fontSize},g.yFn=function(M){return M.dy+b+M.fontSize*w},g.anchorFn=function(M,C){if(f){if(o)return"end";if(l)return"start"}return!Jt(C)||C===0||C===180?"middle":C*m<0!==c?"end":"start"},g.heightFn=function(M,C,E){return C<-60||C>60?-.5*E:t.side==="top"!==c?-E:0};else if(T==="y"){if(S=!c&&x==="left"||c&&x==="right",m=S?1:-1,c&&(m*=-1),_=u,b=d*m,w=0,!c&&Math.abs(k)===90&&(k===-90&&x==="left"||k===90&&x==="right"?w=Wi:w=.5),c){var A=Jt(k)?+k:0;if(A!==0){var $=it.deg2rad(A);y=Math.abs(Math.sin($))*Wi*m,w=0}}g.xFn=function(M){return M.dx+e-(_+M.fontSize*w)*m+y*M.fontSize},g.yFn=function(M){return M.dy+b+M.fontSize*us},g.anchorFn=function(M,C){return Jt(C)&&Math.abs(C)===90?"middle":S?"end":"start"},g.heightFn=function(M,C,E){return t.side==="right"&&(C*=-1),C<-30?-E:C<30?-.5*E:0}}return g};function nc(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}Se.drawTicks=function(t,e,r){r=r||{};var a=e._id+"tick",i=r.vals;e.ticklabelmode==="period"&&(i=i.slice(),i.shift());var n=r.layer.selectAll("path."+a).data(e.ticks?i:[],nc);n.exit().remove(),n.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",r.crisp!==!1).call(hl.stroke,e.tickcolor).style("stroke-width",na.crispRound(t,e.tickwidth,1)+"px").attr("d",r.path).style("display",null),oc(e,[O1]),n.attr("transform",r.transFn)};Se.drawGrid=function(t,e,r){r=r||{};var a=e._id+"grid",i=r.vals,n=r.counterAxis;if(e.showgrid===!1)i=[];else if(n&&Se.shouldShowZeroLine(t,e,n))for(var o=e.tickmode==="array",l=0;l<i.length;l++){var s=i[l].x;if(o?!s:Math.abs(s)<e.dtick/100)if(i=i.slice(0,l).concat(i.slice(l+1)),o)l--;else break}var f=r.layer.selectAll("path."+a).data(i,nc);f.exit().remove(),f.enter().append("path").classed(a,1).classed("crisp",r.crisp!==!1),e._gw=na.crispRound(t,e.gridwidth,1),f.attr("transform",r.transFn).attr("d",r.path).call(hl.stroke,e.gridcolor||"#ddd").style("stroke-width",e._gw+"px").style("display",null),oc(e,[Zv]),typeof r.path=="function"&&f.attr("d",r.path)};Se.drawZeroLine=function(t,e,r){r=r||r;var a=e._id+"zl",i=Se.shouldShowZeroLine(t,e,r.counterAxis),n=r.layer.selectAll("path."+a).data(i?[{x:0,id:e._id}]:[]);n.exit().remove(),n.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,l){return wL(o.id,l.id)})}),n.attr("transform",r.transFn).attr("d",r.path).call(hl.stroke,e.zerolinecolor||hl.defaultLine).style("stroke-width",na.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),oc(e,[Wv])};Se.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,i=e._id,n=i.charAt(0),o=r.cls||i+"tick",l=r.vals,s=r.labelFns,f=r.secondary?0:e.tickangle,c=(e._prevTickAngles||{})[o],v=r.layer.selectAll("g."+o).data(e.showticklabels?l:[],nc),u=[];v.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(m){var y=Aa.select(this),x=t._promises.length;y.call(Zo.positionText,s.xFn(m),s.yFn(m)).call(na.font,m.font,m.fontSize,m.fontColor).text(m.text).call(Zo.convertToTspans,t),t._promises[x]?u.push(t._promises.pop().then(function(){d(y,f)})):d(y,f)}),oc(e,[Am]),v.exit().remove(),r.repositionOnUpdate&&v.each(function(m){Aa.select(this).select("text").call(Zo.positionText,s.xFn(m),s.yFn(m))});function d(m,y){m.each(function(x){var T=Aa.select(this),k=T.select(".text-math-group"),S=s.anchorFn(x,y),A=r.transFn.call(T.node(),x)+(Jt(y)&&+y!=0?" rotate("+y+","+s.xFn(x)+","+(s.yFn(x)-x.fontSize/2)+")":""),$=Zo.lineCount(T),M=pf*x.fontSize,C=s.heightFn(x,Jt(y)?+y:0,($-1)*M);if(C&&(A+=Qn(0,C)),k.empty()){var E=T.select("text");E.attr({transform:A,"text-anchor":S}),E.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var I=na.bBox(k.node()).width,P=I*{end:-.5,start:.5}[S];k.attr("transform",A+Qn(P,0))}})}e._adjustTickLabelsOverflow=function(){var m=e.ticklabeloverflow;if(!(!m||m==="allow")){var y=m.indexOf("hide")!==-1,x=e._id.charAt(0)==="x",T=0,k=x?t._fullLayout.width:t._fullLayout.height;if(m.indexOf("domain")!==-1){var S=it.simpleMap(e.range,e.r2l);T=e.l2p(S[0])+e._offset,k=e.l2p(S[1])+e._offset}var A=Math.min(T,k),$=Math.max(T,k),M=e.side,C=1/0,E=-1/0;v.each(function(L){var D=Aa.select(this),z=D.select(".text-math-group");if(z.empty()){var F=na.bBox(D.node()),H=0;x?(F.right>$||F.left<A)&&(H=1):(F.bottom>$||F.top+(e.tickangle?0:L.fontSize/4)<A)&&(H=1);var U=D.select("text");H?y&&U.style("opacity",0):(U.style("opacity",1),M==="bottom"||M==="right"?C=Math.min(C,x?F.top:F.left):C=-1/0,M==="top"||M==="left"?E=Math.max(E,x?F.bottom:F.right):E=1/0)}});for(var I in a._plots){var P=a._plots[I];if(!(e._id!==P.xaxis._id&&e._id!==P.yaxis._id)){var R=x?P.yaxis:P.xaxis;R&&(R["_visibleLabelMin_"+e._id]=C,R["_visibleLabelMax_"+e._id]=E)}}}},e._hideCounterAxisInsideTickLabels=function(m){var y=e._id.charAt(0)==="x",x=[];for(var T in a._plots){var k=a._plots[T];e._id!==k.xaxis._id&&e._id!==k.yaxis._id||x.push(y?k.yaxis:k.xaxis)}x.forEach(function(S,A){S&&ml(S)&&(m||[Wv,Zv,O1,Am]).forEach(function($){var M=$.K==="tick"&&$.L==="text"&&e.ticklabelmode==="period",C=a._plots[e._mainSubplot],E;$.K===Wv.K?E=C.zerolinelayer.selectAll("."+e._id+"zl"):$.K===Zv.K?E=C.gridlayer.selectAll("."+e._id):E=C[e._id.charAt(0)+"axislayer"],E.each(function(){var I=Aa.select(this);$.L&&(I=I.selectAll($.L)),I.each(function(P){var R=e.l2p(M?Qv(P):P.x)+e._offset,L=Aa.select(this);R<e["_visibleLabelMax_"+S._id]&&R>e["_visibleLabelMin_"+S._id]?L.style("display","none"):$.K==="tick"&&!A&&L.style("display",null)})})})})},d(v,c+1?c:f);function h(){return u.length&&Promise.all(u)}var p=null;function g(){if(d(v,f),l.length&&n==="x"&&!Jt(f)&&(e.type!=="log"||String(e.dtick).charAt(0)!=="D")){p=0;var m=0,y=[],x;if(v.each(function(F){m=Math.max(m,F.fontSize);var H=e.l2p(F.x),U=Jv(this),B=na.bBox(U.node());y.push({top:0,bottom:10,height:10,left:H-B.width/2,right:H+B.width/2+2,width:B.width+2})}),(e.tickson==="boundaries"||e.showdividers)&&!r.secondary){var T=2;for(e.ticks&&(T+=e.tickwidth/2),x=0;x<y.length;x++){var k=l[x].xbnd,S=y[x];if(k[0]!==null&&S.left-e.l2p(k[0])<T||k[1]!==null&&e.l2p(k[1])-S.right<T){p=90;break}}}else{var A=l.length,$=Math.abs((l[A-1].x-l[0].x)*e._m)/(A-1),M=e.ticklabelposition||"",C=function(F){return M.indexOf(F)!==-1},E=C("top"),I=C("left"),P=C("right"),R=C("bottom"),L=R||I||E||P,D=L?(e.tickwidth||0)+2*Kv:0,z=$<m*2.5||e.type==="multicategory"||e._name==="realaxis";for(x=0;x<y.length-1;x++)if(it.bBoxIntersect(y[x],y[x+1],D)){p=z?90:30;break}}p&&d(v,p)}}e._selections&&(e._selections[o]=v);var _=[h];e.automargin&&a._redrawFromAutoMarginCount&&c===90?(p=90,_.push(function(){d(v,c)})):_.push(g),e._tickAngles&&_.push(function(){e._tickAngles[o]=p===null?Jt(f)?f:0:p});var b=e._anchorAxis;b&&b.autorange&&ml(e)&&!TL(a,e._id)&&(a._insideTickLabelsAutorange||(a._insideTickLabelsAutorange={}),a._insideTickLabelsAutorange[b._name+".autorange"]=b.autorange,_.push(function(){v.each(function(y,x){var T=Jv(this),k=T.select(".text-math-group");k.empty()&&(e._vals[x].bb=na.bBox(T.node()))})}));var w=it.syncOrAsync(_);return w&&w.then&&t._promises.push(w),w};function qL(t,e,r){var a=e._id+"divider",i=r.vals,n=r.layer.selectAll("path."+a).data(i,nc);n.exit().remove(),n.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(hl.stroke,e.dividercolor).style("stroke-width",na.crispRound(t,e.dividerwidth,1)+"px"),n.attr("transform",r.transFn).attr("d",r.path)}Se.getPxPosition=function(t,e){var r=t._fullLayout._size,a=e._id.charAt(0),i=e.side,n;if(e.anchor!=="free"?n=e._anchorAxis:a==="x"?n={_offset:r.t+(1-(e.position||0))*r.h,_length:0}:a==="y"&&(n={_offset:r.l+(e.position||0)*r.w,_length:0}),i==="top"||i==="left")return n._offset;if(i==="bottom"||i==="right")return n._offset+n._length};function V1(t){var e=t.title.font.size,r=(t.title.text.match(Zo.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?r?e*(Wi+r*pf):e*Wi:r?e*(r+1)*pf:e}function XL(t,e){var r=t._fullLayout,a=e._id,i=a.charAt(0),n=e.title.font.size,o;if(e.title.hasOwnProperty("standoff"))o=e._depth+e.title.standoff+V1(e);else{var l=ml(e);if(e.type==="multicategory")o=e._depth;else{var s=1.5*n;l&&(s=.5*n,e.ticks==="outside"&&(s+=e.ticklen)),o=10+s+(e.linewidth?e.linewidth-1:0)}l||(i==="x"?o+=e.side==="top"?n*(e.showticklabels?1:0):n*(e.showticklabels?1.5:.5):o+=e.side==="right"?n*(e.showticklabels?1:.5):n*(e.showticklabels?.5:0))}var f=Se.getPxPosition(t,e),c,v,u;i==="x"?(v=e._offset+e._length/2,u=e.side==="top"?f-o:f+o):(u=e._offset+e._length/2,v=e.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var d;if(e.type!=="multicategory"){var h=e._selections[e._id+"tick"];if(d={selection:h,side:e.side},h&&h.node()&&h.node().parentNode){var p=na.getTranslate(h.node().parentNode);d.offsetLeft=p.x,d.offsetTop=p.y}e.title.hasOwnProperty("standoff")&&(d.pad=0)}return pL.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:r._dfltTitle[i],avoid:d,transform:c,attributes:{x:v,y:u,"text-anchor":"middle"}})}Se.shouldShowZeroLine=function(t,e,r){var a=it.simpleMap(e.range,e.r2l);return a[0]*a[1]<=0&&e.zeroline&&(e.type==="linear"||e.type==="-")&&!(e.rangebreaks&&e.maskBreaks(0)===ac)&&(q1(e,0)||!YL(t,e,r,a)||WL(t,e))};Se.clipEnds=function(t,e){return e.filter(function(r){return q1(t,r.x)})};function q1(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function YL(t,e,r,a){var i=r._mainAxis;if(!i)return;var n=t._fullLayout,o=e._id.charAt(0),l=Se.counterLetter(e._id),s=e._offset+(Math.abs(a[0])<Math.abs(a[1])==(o==="x")?0:e._length);function f(h){if(!h.showline||!h.linewidth)return!1;var p=Math.max((h.linewidth+e.zerolinewidth)/2,1);function g(w){return typeof w=="number"&&Math.abs(w-s)<p}if(g(h._mainLinePosition)||g(h._mainMirrorPosition))return!0;var _=h._linepositions||{};for(var b in _)if(g(_[b][0])||g(_[b][1]))return!0}var c=n._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return f(r);for(var v=Se.list(t,l),u=0;u<v.length;u++){var d=v[u];if(d._mainAxis===i&&f(d))return!0}}function WL(t,e){for(var r=t._fullData,a=e._mainSubplot,i=e._id.charAt(0),n=0;n<r.length;n++){var o=r[n];if(o.visible===!0&&o.xaxis+o.yaxis===a&&(dl.traceIs(o,"bar-like")&&o.orientation==={x:"h",y:"v"}[i]||o.fill&&o.fill.charAt(o.fill.length-1)===i))return!0}return!1}function Jv(t){var e=Aa.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}Se.allowAutoMargin=function(t){for(var e=Se.list(t,"",!0),r=0;r<e.length;r++){var a=e[r];a.automargin&&(qn.allowAutoMargin(t,vh(a)),a.mirror&&qn.allowAutoMargin(t,X1(a))),dl.getComponentMethod("rangeslider","isVisible")(a)&&qn.allowAutoMargin(t,Y1(a))}};function vh(t){return t._id+".automargin"}function X1(t){return vh(t)+".mirror"}function Y1(t){return t._id+".rangeslider"}Se.swap=function(t,e){for(var r=ZL(t,e),a=0;a<r.length;a++)KL(t,r[a].x,r[a].y)};function ZL(t,e){var r=[],a,i;for(a=0;a<e.length;a++){var n=[],o=t._fullData[e[a]].xaxis,l=t._fullData[e[a]].yaxis;if(!(!o||!l)){for(i=0;i<r.length;i++)(r[i].x.indexOf(o)!==-1||r[i].y.indexOf(l)!==-1)&&n.push(i);if(!n.length){r.push({x:[o],y:[l]});continue}var s=r[n[0]],f;if(n.length>1)for(i=1;i<n.length;i++)f=r[n[i]],ds(s.x,f.x),ds(s.y,f.y);ds(s.x,[o]),ds(s.y,[l])}}return r}function ds(t,e){for(var r=0;r<e.length;r++)t.indexOf(e[r])===-1&&t.push(e[r])}function KL(t,e,r){var a=[],i=[],n=t.layout,o,l;for(o=0;o<e.length;o++)a.push(Se.getFromId(t,e[o]));for(o=0;o<r.length;o++)i.push(Se.getFromId(t,r[o]));var s=Object.keys(mL),f=["anchor","domain","overlaying","position","side","tickangle","editType"],c=["linear","log"];for(o=0;o<s.length;o++){var v=s[o],u=a[0][v],d=i[0][v],h=!0,p=!1,g=!1;if(!(v.charAt(0)==="_"||typeof u=="function"||f.indexOf(v)!==-1)){for(l=1;l<a.length&&h;l++){var _=a[l][v];v==="type"&&c.indexOf(u)!==-1&&c.indexOf(_)!==-1&&u!==_?p=!0:_!==u&&(h=!1)}for(l=1;l<i.length&&h;l++){var b=i[l][v];v==="type"&&c.indexOf(d)!==-1&&c.indexOf(b)!==-1&&d!==b?g=!0:i[l][v]!==d&&(h=!1)}h&&(p&&(n[a[0]._name].type="linear"),g&&(n[i[0]._name].type="linear"),QL(n,v,a,i,t._fullLayout._dfltTitle))}}for(o=0;o<t._fullLayout.annotations.length;o++){var w=t._fullLayout.annotations[o];e.indexOf(w.xref)!==-1&&r.indexOf(w.yref)!==-1&&it.swapAttrs(n.annotations[o],["?"])}}function QL(t,e,r,a,i){var n=it.nestedProperty,o=n(t[r[0]._name],e).get(),l=n(t[a[0]._name],e).get(),s;for(e==="title"&&(o&&o.text===i.x&&(o.text=i.y),l&&l.text===i.y&&(l.text=i.x)),s=0;s<r.length;s++)n(t,r[s]._name+"."+e).set(l);for(s=0;s<a.length;s++)n(t,a[s]._name+"."+e).set(o)}function dh(t){return t._id==="angularaxis"}function Zc(t,e){for(var r=e._rangebreaks.length,a=0;a<r;a++){var i=e._rangebreaks[a];if(t>=i.min&&t<i.max)return i.max}return t}function ml(t){return(t.ticklabelposition||"").indexOf("inside")!==-1}function oc(t,e){ml(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}var hh={},ha={exports:{}},JL=function(e,r,a,i,n){var o=(e-a)/(i-a),l=o+r/(i-a),s=(o+l)/2;return n==="left"||n==="bottom"?o:n==="center"||n==="middle"?s:n==="right"||n==="top"?l:o<2/3-s?o:l>4/3-s?l:s},Dm=de.exports,eC=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]],tC=function(e,r,a,i){return a==="left"?e=0:a==="center"?e=1:a==="right"?e=2:e=Dm.constrain(Math.floor(e*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Dm.constrain(Math.floor(r*3),0,2),eC[r][e]},W1={exports:{}},rC=El,aC=Zf,iC=Vd.getGraphDiv,nC=Gf,ed=W1.exports={};ed.wrapped=function(t,e,r){t=iC(t),t._fullLayout&&aC.clear(t._fullLayout._uid+nC.HOVERID),ed.raw(t,e,r)};ed.raw=function(e,r){var a=e._fullLayout,i=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&rC.triggerHandler(e,"plotly_beforehover",r)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,r.target&&i&&e.emit("plotly_unhover",{event:r,points:i}))};var oC=uk,Kc=ax,lC=ix,sC=de.exports.removeElement,fC=pr,Ki=ha.exports={};Ki.align=JL;Ki.getCursor=tC;var Z1=W1.exports;Ki.unhover=Z1.wrapped;Ki.unhoverRaw=Z1.raw;Ki.init=function(e){var r=e.gd,a=1,i=r._context.doubleClickDelay,n=e.element,o,l,s,f,c,v,u,d;r._mouseDownTime||(r._mouseDownTime=0),n.style.pointerEvents="all",n.onmousedown=g,lC?(n._ontouchstart&&n.removeEventListener("touchstart",n._ontouchstart),n._ontouchstart=g,n.addEventListener("touchstart",g,{passive:!1})):n.ontouchstart=g;function h(w,m,y){return Math.abs(w)<y&&(w=0),Math.abs(m)<y&&(m=0),[w,m]}var p=e.clampFn||h;function g(w){r._dragged=!1,r._dragging=!0;var m=Qc(w);o=m[0],l=m[1],u=w.target,v=w,d=w.buttons===2||w.ctrlKey,typeof w.clientX>"u"&&typeof w.clientY>"u"&&(w.clientX=o,w.clientY=l),s=new Date().getTime(),s-r._mouseDownTime<i?a+=1:(a=1,r._mouseDownTime=s),e.prepFn&&e.prepFn(w,o,l),Kc&&!d?(c=K1(),c.style.cursor=window.getComputedStyle(n).cursor):Kc||(c=document,f=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(n).cursor),document.addEventListener("mouseup",b),document.addEventListener("touchend",b),e.dragmode!==!1&&(w.preventDefault(),document.addEventListener("mousemove",_),document.addEventListener("touchmove",_,{passive:!1}))}function _(w){w.preventDefault();var m=Qc(w),y=e.minDrag||fC.MINDRAG,x=p(m[0]-o,m[1]-l,y),T=x[0],k=x[1];(T||k)&&(r._dragged=!0,Ki.unhover(r,w)),r._dragged&&e.moveFn&&!d&&(r._dragdata={element:n,dx:T,dy:k},e.moveFn(T,k))}function b(w){if(delete r._dragdata,e.dragmode!==!1&&(w.preventDefault(),document.removeEventListener("mousemove",_),document.removeEventListener("touchmove",_)),document.removeEventListener("mouseup",b),document.removeEventListener("touchend",b),Kc?sC(c):f&&(c.documentElement.style.cursor=f,f=null),!r._dragging){r._dragged=!1;return}if(r._dragging=!1,new Date().getTime()-r._mouseDownTime>i&&(a=Math.max(a-1,1)),r._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(a,v),!d){var m;try{m=new MouseEvent("click",w)}catch{var y=Qc(w);m=document.createEvent("MouseEvents"),m.initMouseEvent("click",w.bubbles,w.cancelable,w.view,w.detail,w.screenX,w.screenY,y[0],y[1],w.ctrlKey,w.altKey,w.shiftKey,w.metaKey,w.button,w.relatedTarget)}u.dispatchEvent(m)}r._dragging=!1,r._dragged=!1}};function K1(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}Ki.coverSlip=K1;function Qc(t){return oC(t.changedTouches?t.changedTouches[0]:t,document.body)}var lc={},xi=function(e,r){(e.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&e.classed(a,!1)}),r&&e.classed("cursor-"+r,!0)},Jc=xi,$o="data-savedcursor",$m="!!",cC=function(e,r){var a=e.attr($o);if(r){if(!a){for(var i=(e.attr("class")||"").split(" "),n=0;n<i.length;n++){var o=i[n];o.indexOf("cursor-")===0&&e.attr($o,o.substr(7)).classed(o,!1)}e.attr($o)||e.attr($o,$m)}Jc(e,r)}else a&&(e.attr($o,null),a===$m?Jc(e):Jc(e,a))},eu=dr,uC=hr,Q1={bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:uC.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:eu({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:eu({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",min:-2,max:3,editType:"legend",description:["Sets the x position (in normalized coordinates) of the legend.","Defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"legend",description:["Sets the y position (in normalized coordinates) of the legend.","Defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:eu({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"},yo={};yo.isGrouped=function(e){return(e.traceorder||"").indexOf("grouped")!==-1};yo.isVertical=function(e){return e.orientation!=="h"};yo.isReversed=function(e){return(e.traceorder||"").indexOf("reversed")!==-1};var tu=Ve,Jr=de.exports,vC=Mt,dC=La,hC=Q1,pC=$l,ru=yo,J1=function(e,r,a){var i=e.legend||{},n=vC.newContainer(r,"legend");function o(k,S){return Jr.coerce(i,n,hC,k,S)}for(var l,s=function(k,S){var A=l._input,$=l;return Jr.coerce(A,$,dC,k,S)},f=r.font||{},c=Jr.coerceFont(o,"grouptitlefont",Jr.extendFlat({},f,{size:Math.round(f.size*1.1)})),v=0,u=!1,d="normal",h=0;h<a.length;h++)l=a[h],l.visible&&((l.showlegend||l._dfltShowLegend&&!(l._module&&l._module.attributes&&l._module.attributes.showlegend&&l._module.attributes.showlegend.dflt===!1))&&(v++,l.showlegend&&(u=!0,(tu.traceIs(l,"pie-like")||l._input.showlegend===!0)&&v++),Jr.coerceFont(s,"legendgrouptitle.font",c)),(tu.traceIs(l,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(l.fill)!==-1)&&(d=ru.isGrouped({traceorder:d})?"grouped+reversed":"reversed"),l.legendgroup!==void 0&&l.legendgroup!==""&&(d=ru.isReversed({traceorder:d})?"reversed+grouped":"grouped"));var p=Jr.coerce(e,r,pC,"showlegend",u&&v>1);if(p===!1&&(r.legend=void 0),!(p===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),p!==!1)){o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth");var g=Jr.coerceFont(o,"font",r.font),_=o("orientation"),b=_==="h",w,m,y;b?(w=0,tu.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(m=1.1,y="bottom"):(m=-.1,y="top")):(w=1.02,m=1,y="auto"),o("traceorder",d),ru.isGrouped(r.legend)&&o("tracegroupgap"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("x",w),o("xanchor"),o("y",m),o("yanchor",y),o("valign"),Jr.noneOrAll(i,n,["x","y"]);var x=o("title.text");if(x){o("title.side",b?"left":"top");var T=Jr.extendFlat({},g,{size:Jr.bigFont(g.size)});Jr.coerceFont(o,"title.font",T)}}},au=de.exports,Li=Ve,iu=!0,mC=function(e,r,a){var i=r._fullLayout;if(r._dragged||r._editing)return;var n=i.legend.itemclick,o=i.legend.itemdoubleclick,l=i.legend.groupclick;a===1&&n==="toggle"&&o==="toggleothers"&&iu&&r.data&&r._context.showTips&&au.notifier(au._(r,"Double-click on legend to isolate one trace"),"long"),iu=!1;var s;if(a===1?s=n:a===2&&(s=o),!s)return;var f=l==="togglegroup",c=i.hiddenlabels?i.hiddenlabels.slice():[],v=e.data()[0][0];if(v.groupTitle&&v.noClick)return;var u=r._fullData,d=v.trace,h=d.legendgroup,p,g,_,b,w,m,y={},x=[],T=[],k=[];function S(B,X,O){var Y=x.indexOf(B),W=y[X];return W||(W=y[X]=[]),x.indexOf(B)===-1&&(x.push(B),Y=x.length-1),W[Y]=O,Y}function A(B,X){if(!(v.groupTitle&&!f)){var O=B._fullInput;if(Li.hasTransform(O,"groupby")){var Y=T[O.index];if(!Y){var W=Li.getTransformIndices(O,"groupby"),K=W[W.length-1];Y=au.keyedContainer(O,"transforms["+K+"].styles","target","value.visible"),T[O.index]=Y}var Z=Y.get(B._group);Z===void 0&&(Z=!0),Z!==!1&&Y.set(B._group,X),k[O.index]=S(O.index,"visible",O.visible!==!1)}else{var ae=O.visible===!1?!1:X;S(O.index,"visible",ae)}}}if(Li.traceIs(d,"pie-like")){var $=v.label,M=c.indexOf($);s==="toggle"?M===-1?c.push($):c.splice(M,1):s==="toggleothers"&&(c=[],r.calcdata[0].forEach(function(B){$!==B.label&&c.push(B.label)}),r._fullLayout.hiddenlabels&&r._fullLayout.hiddenlabels.length===c.length&&M===-1&&(c=[])),Li.call("_guiRelayout",r,"hiddenlabels",c)}else{var C=h&&h.length,E=[],I;if(C)for(p=0;p<u.length;p++)I=u[p],!!I.visible&&I.legendgroup===h&&E.push(p);if(s==="toggle"){var P;switch(d.visible){case!0:P="legendonly";break;case!1:P=!1;break;case"legendonly":P=!0;break}if(C)if(f)for(p=0;p<u.length;p++)u[p].visible!==!1&&u[p].legendgroup===h&&A(u[p],P);else A(d,P);else A(d,P)}else if(s==="toggleothers"){var R,L,D,z,F=!0;for(p=0;p<u.length;p++)if(R=u[p]===d,D=u[p].showlegend!==!0,!(R||D)&&(L=C&&u[p].legendgroup===h,!L&&u[p].visible===!0&&!Li.traceIs(u[p],"notLegendIsolatable"))){F=!1;break}for(p=0;p<u.length;p++)if(u[p].visible!==!1&&!Li.traceIs(u[p],"notLegendIsolatable"))switch(d.visible){case"legendonly":A(u[p],!0);break;case!0:z=F?!0:"legendonly",R=u[p]===d,D=u[p].showlegend!==!0&&!u[p].legendgroup,L=R||C&&u[p].legendgroup===h,A(u[p],L||D?!0:z);break}}for(p=0;p<T.length;p++)if(_=T[p],!!_){var H=_.constructUpdate(),U=Object.keys(H);for(g=0;g<U.length;g++)b=U[g],m=y[b]=y[b]||[],m[k[p]]=H[b]}for(w=Object.keys(y),p=0;p<w.length;p++)for(b=w[p],g=0;g<x.length;g++)y[b].hasOwnProperty(g)||(y[b][g]=void 0);Li.call("_guiRestyle",r,y,x)}},e_={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5},Em=Ve,nu=yo,yC=function(e,r){var a=r._inHover,i=nu.isGrouped(r),n=nu.isReversed(r),o={},l=[],s=!1,f={},c=0,v=0,u,d;function h(I,P){if(I===""||!nu.isGrouped(r)){var R="~~i"+c;l.push(R),o[R]=[P],c++}else l.indexOf(I)===-1?(l.push(I),s=!0,o[I]=[P]):o[I].push(P)}for(u=0;u<e.length;u++){var p=e[u],g=p[0],_=g.trace,b=_.legendgroup;if(!(!a&&(!_.visible||!_.showlegend)))if(Em.traceIs(_,"pie-like"))for(f[b]||(f[b]={}),d=0;d<p.length;d++){var w=p[d].label;f[b][w]||(h(b,{label:w,color:p[d].color,i:p[d].i,trace:_,pts:p[d].pts}),f[b][w]=!0,v=Math.max(v,(w||"").length))}else h(b,g),v=Math.max(v,(_.name||"").length)}if(!l.length)return[];var m=!s||!i,y=[];for(u=0;u<l.length;u++){var x=o[l[u]];m?y.push(x[0]):y.push(x)}for(m&&(y=[y]),u=0;u<y.length;u++){var T=1/0;for(d=0;d<y[u].length;d++){var k=y[u][d].trace.legendrank;T>k&&(T=k)}y[u][0]._groupMinRank=T,y[u][0]._preGroupSort=u}var S=function(I,P){return I[0]._groupMinRank-P[0]._groupMinRank||I[0]._preGroupSort-P[0]._preGroupSort},A=function(I,P){return I.trace.legendrank-P.trace.legendrank||I._preSort-P._preSort};for(y.forEach(function(I,P){I[0]._preGroupSort=P}),y.sort(S),u=0;u<y.length;u++){y[u].forEach(function(I,P){I._preSort=P}),y[u].sort(A);var $=y[u][0].trace,M=null;for(d=0;d<y[u].length;d++){var C=y[u][d].trace.legendgrouptitle;if(C&&C.text){M=C,a&&(C.font=r._groupTitleFont);break}}if(n&&y[u].reverse(),M){var E=!1;for(d=0;d<y[u].length;d++)if(Em.traceIs(y[u][d].trace,"pie-like")){E=!0;break}y[u].unshift({i:-1,groupTitle:M,noClick:E,trace:{showlegend:$.showlegend,legendgroup:$.legendgroup,visible:r.groupclick==="toggleitem"?!0:$.visible}})}for(d=0;d<y[u].length;d++)y[u][d]=[y[u][d]]}return r._lgroupsLength=y.length,r._maxNameLength=v,y},sn={};(function(t){var e=de.exports;function r(a){return a.indexOf("e")!==-1?a.replace(/[.]?0+e/,"e"):a.indexOf(".")!==-1?a.replace(/[.]?0+$/,""):a}t.formatPiePercent=function(i,n){var o=r((i*100).toPrecision(3));return e.numSeparate(o,n)+"%"},t.formatPieValue=function(i,n){var o=r(i.toPrecision(10));return e.numSeparate(o,n)},t.getFirstFilled=function(i,n){if(!!Array.isArray(i))for(var o=0;o<n.length;o++){var l=i[n[o]];if(l||l===0||l==="")return l}},t.castOption=function(i,n){if(Array.isArray(i))return t.getFirstFilled(i,n);if(i)return i},t.getRotationAngle=function(a){return(a==="auto"?0:a)*Math.PI/180}})(sn);var ou=Je.exports,Rm=sn.castOption,ph=function(e,r,a){var i=a.marker.line,n=Rm(i.color,r.pts)||ou.defaultLine,o=Rm(i.width,r.pts)||0;e.style("stroke-width",o).call(ou.fill,r.color).call(ou.stroke,n)},fr=tt.exports,lu=Ve,lr=de.exports,Pm=lr.strTranslate,xr=Tt.exports,Fr=Je.exports,su=da.extractOpts,yf=mr,gC=ph,bC=sn.castOption,xC=e_,zm=12,Im=5,Ci=2,_C=10,gn=5,t_=function(e,r,a){var i=r._fullLayout;a||(a=i.legend);var n=a.itemsizing==="constant",o=a.itemwidth,l=(o+xC.itemGap*2)/2,s=Pm(l,0),f=function(T,k,S,A){var $;if(T+1)$=T;else if(k&&k.width>0)$=k.width;else return 0;return n?A:Math.min($,S)};e.each(function(T){var k=fr.select(this),S=lr.ensureSingle(k,"g","layers");S.style("opacity",T[0].trace.opacity);var A=a.valign,$=T[0].lineHeight,M=T[0].height;if(A==="middle"||!$||!M)S.attr("transform",null);else{var C={top:1,bottom:-1}[A],E=C*(.5*($-M+3));S.attr("transform",Pm(0,E))}var I=S.selectAll("g.legendfill").data([T]);I.enter().append("g").classed("legendfill",!0);var P=S.selectAll("g.legendlines").data([T]);P.enter().append("g").classed("legendlines",!0);var R=S.selectAll("g.legendsymbols").data([T]);R.enter().append("g").classed("legendsymbols",!0),R.selectAll("g.legendpoints").data([T]).enter().append("g").classed("legendpoints",!0)}).each(x).each(u).each(h).each(d).each(g).each(m).each(w).each(c).each(v).each(_).each(b);function c(T){var k=Nm(T),S=k.showFill,A=k.showLine,$=k.showGradientLine,M=k.showGradientFill,C=k.anyFill,E=k.anyLine,I=T[0],P=I.trace,R,L,D=su(P),z=D.colorscale,F=D.reversescale,H=function(K){if(K.size())if(S)xr.fillGroupStyle(K,r);else{var Z="legendfill-"+P.uid;xr.gradient(K,r,Z,fu(F),z,"fill")}},U=function(K){if(K.size()){var Z="legendline-"+P.uid;xr.lineGroupStyle(K),xr.gradient(K,r,Z,fu(F),z,"stroke")}},B=yf.hasMarkers(P)||!C?"M5,0":E?"M5,-2":"M5,-3",X=fr.select(this),O=X.select(".legendfill").selectAll("path").data(S||M?[T]:[]);if(O.enter().append("path").classed("js-fill",!0),O.exit().remove(),O.attr("d",B+"h"+o+"v6h-"+o+"z").call(H),A||$){var Y=f(void 0,P.line,_C,Im);L=lr.minExtend(P,{line:{width:Y}}),R=[lr.minExtend(I,{trace:L})]}var W=X.select(".legendlines").selectAll("path").data(A||$?[R]:[]);W.enter().append("path").classed("js-line",!0),W.exit().remove(),W.attr("d",B+($?"l"+o+",0.0001":"h"+o)).call(A?xr.lineGroupStyle:U)}function v(T){var k=Nm(T),S=k.anyFill,A=k.anyLine,$=k.showLine,M=k.showMarker,C=T[0],E=C.trace,I=!M&&!A&&!S&&yf.hasText(E),P,R;function L(O,Y,W,K){var Z=lr.nestedProperty(E,O).get(),ae=lr.isArrayOrTypedArray(Z)&&Y?Y(Z):Z;if(n&&ae&&K!==void 0&&(ae=K),W){if(ae<W[0])return W[0];if(ae>W[1])return W[1]}return ae}function D(O){return C._distinct&&C.index&&O[C.index]?O[C.index]:O[0]}if(M||I||$){var z={},F={};if(M){z.mc=L("marker.color",D),z.mx=L("marker.symbol",D),z.mo=L("marker.opacity",lr.mean,[.2,1]),z.mlc=L("marker.line.color",D),z.mlw=L("marker.line.width",lr.mean,[0,5],Ci),F.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var H=L("marker.size",lr.mean,[2,16],zm);z.ms=H,F.marker.size=H}$&&(F.line={width:L("line.width",D,[0,10],Im)}),I&&(z.tx="Aa",z.tp=L("textposition",D),z.ts=10,z.tc=L("textfont.color",D),z.tf=L("textfont.family",D)),P=[lr.minExtend(C,z)],R=lr.minExtend(E,F),R.selectedpoints=null,R.texttemplate=null}var U=fr.select(this).select("g.legendpoints"),B=U.selectAll("path.scatterpts").data(M?P:[]);B.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),B.exit().remove(),B.call(xr.pointStyle,R,r),M&&(P[0].mrc=3);var X=U.selectAll("g.pointtext").data(I?P:[]);X.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),X.exit().remove(),X.selectAll("text").call(xr.textPointStyle,R,r)}function u(T){var k=T[0].trace,S=k.type==="waterfall";if(T[0]._distinct&&S){var A=T[0].trace[T[0].dir].marker;return T[0].mc=A.color,T[0].mlw=A.line.width,T[0].mlc=A.line.color,p(T,this,"waterfall")}var $=[];k.visible&&S&&($=T[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var M=fr.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data($);M.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),M.exit().remove(),M.each(function(C){var E=fr.select(this),I=k[C[0]].marker,P=f(void 0,I.line,gn,Ci);E.attr("d",C[1]).style("stroke-width",P+"px").call(Fr.fill,I.color),P&&E.call(Fr.stroke,I.line.color)})}function d(T){p(T,this)}function h(T){p(T,this,"funnel")}function p(T,k,S){var A=T[0].trace,$=A.marker||{},M=$.line||{},C=S?A.visible&&A.type===S:lu.traceIs(A,"bar"),E=fr.select(k).select("g.legendpoints").selectAll("path.legend"+S).data(C?[T]:[]);E.enter().append("path").classed("legend"+S,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),E.exit().remove(),E.each(function(I){var P=fr.select(this),R=I[0],L=f(R.mlw,$.line,gn,Ci);P.style("stroke-width",L+"px");var D=R.mcc;if(!a._inHover&&"mc"in R){var z=su($),F=z.mid;F===void 0&&(F=(z.max+z.min)/2),D=xr.tryColorscale($,"")(F)}var H=D||R.mc||$.color,U=$.pattern,B=U&&xr.getPatternAttr(U.shape,0,"");if(B){var X=xr.getPatternAttr(U.bgcolor,0,null),O=xr.getPatternAttr(U.fgcolor,0,null),Y=U.fgopacity,W=Fm(U.size,8,10),K=Fm(U.solidity,.5,1),Z="legend-"+A.uid;P.call(xr.pattern,"legend",r,Z,B,W,K,D,U.fillmode,X,O,Y)}else P.call(Fr.fill,H);L&&Fr.stroke(P,R.mlc||M.color)})}function g(T){var k=T[0].trace,S=fr.select(this).select("g.legendpoints").selectAll("path.legendbox").data(k.visible&&lu.traceIs(k,"box-violin")?[T]:[]);S.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),S.exit().remove(),S.each(function(){var A=fr.select(this);if((k.boxpoints==="all"||k.points==="all")&&Fr.opacity(k.fillcolor)===0&&Fr.opacity((k.line||{}).color)===0){var $=lr.minExtend(k,{marker:{size:n?zm:lr.constrain(k.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});S.call(xr.pointStyle,$,r)}else{var M=f(void 0,k.line,gn,Ci);A.style("stroke-width",M+"px").call(Fr.fill,k.fillcolor),M&&Fr.stroke(A,k.line.color)}})}function _(T){var k=T[0].trace,S=fr.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(k.visible&&k.type==="candlestick"?[T,T]:[]);S.enter().append("path").classed("legendcandle",!0).attr("d",function(A,$){return $?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(A,$){var M=fr.select(this),C=k[$?"increasing":"decreasing"],E=f(void 0,C.line,gn,Ci);M.style("stroke-width",E+"px").call(Fr.fill,C.fillcolor),E&&Fr.stroke(M,C.line.color)})}function b(T){var k=T[0].trace,S=fr.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(k.visible&&k.type==="ohlc"?[T,T]:[]);S.enter().append("path").classed("legendohlc",!0).attr("d",function(A,$){return $?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(A,$){var M=fr.select(this),C=k[$?"increasing":"decreasing"],E=f(void 0,C.line,gn,Ci);M.style("fill","none").call(xr.dashLine,C.line.dash,E),E&&Fr.stroke(M,C.line.color)})}function w(T){y(T,this,"pie")}function m(T){y(T,this,"funnelarea")}function y(T,k,S){var A=T[0],$=A.trace,M=S?$.visible&&$.type===S:lu.traceIs($,S),C=fr.select(k).select("g.legendpoints").selectAll("path.legend"+S).data(M?[T]:[]);if(C.enter().append("path").classed("legend"+S,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),C.exit().remove(),C.size()){var E=($.marker||{}).line,I=f(bC(E.width,A.pts),E,gn,Ci),P=lr.minExtend($,{marker:{line:{width:I}}});P.marker.line.color=E.color;var R=lr.minExtend(A,{trace:P});gC(C,R,P)}}function x(T){var k=T[0].trace,S,A=[];if(k.visible)switch(k.type){case"histogram2d":case"heatmap":A=[["M-15,-2V4H15V-2Z"]],S=!0;break;case"choropleth":case"choroplethmapbox":A=[["M-6,-6V6H6V-6Z"]],S=!0;break;case"densitymapbox":A=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],S="radial";break;case"cone":A=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],S=!1;break;case"streamtube":A=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],S=!1;break;case"surface":A=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],S=!0;break;case"mesh3d":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!1;break;case"volume":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!0;break;case"isosurface":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],S=!1;break}var $=fr.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(A);$.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),$.exit().remove(),$.each(function(M,C){var E=fr.select(this),I=su(k),P=I.colorscale,R=I.reversescale,L=function(H){if(H.size()){var U="legendfill-"+k.uid;xr.gradient(H,r,U,fu(R,S==="radial"),P,"fill")}},D;if(P){if(!S){var F=P.length;D=C===0?P[R?F-1:0][1]:C===1?P[R?0:F-1][1]:P[Math.floor((F-1)/2)][1]}}else{var z=k.vertexcolor||k.facecolor||k.color;D=lr.isArrayOrTypedArray(z)?z[C]||z[0]:z}E.attr("d",M[0]),D?E.call(Fr.fill,D):E.call(L)})}};function fu(t,e){var r=e?"radial":"horizontal";return r+(t?"":"reversed")}function Nm(t){var e=t[0].trace,r=e.contours,a=yf.hasLines(e),i=yf.hasMarkers(e),n=e.visible&&e.fill&&e.fill!=="none",o=!1,l=!1;if(r){var s=r.coloring;s==="lines"?o=!0:a=s==="none"||s==="heatmap"||r.showlines,r.type==="constraint"?n=r._operation!=="=":(s==="fill"||s==="heatmap")&&(l=!0)}return{showMarker:i,showLine:a,showFill:n,showGradientLine:o,showGradientFill:l,anyLine:a||o,anyFill:n||l}}function Fm(t,e,r){return t&&lr.isArrayOrTypedArray(t)?e:t>r?r:t}var Dr=tt.exports,jt=de.exports,td=Ut.exports,Oi=Ve,Hm=El,cu=ha.exports,Zt=Tt.exports,Ys=Je.exports,Xn=ir,Om=mC,ar=e_,mh=Lr,wC=mh.LINE_SPACING,gf=mh.FROM_TL,Bm=mh.FROM_BR,jm=yC,TC=t_,Gm=yo,Nn=1,r_=function(e,r){return r||(r=e._fullLayout.legend||{}),kC(e,r)};function kC(t,e){var r=t._fullLayout,a="legend"+r._uid,i,n=e._inHover;if(n?(i=e.layer,a+="-hover"):i=r._infolayer,!!i){t._legendMouseDownTime||(t._legendMouseDownTime=0);var o;if(n){if(!e.entries)return;o=jm(e.entries,e)}else{if(!t.calcdata)return;o=r.showlegend&&jm(t.calcdata,e)}var l=r.hiddenlabels||[];if(!n&&(!r.showlegend||!o.length))return i.selectAll(".legend").remove(),r._topdefs.select("#"+a).remove(),td.autoMargin(t,"legend");var s=jt.ensureSingle(i,"g","legend",function(_){n||_.attr("pointer-events","all")}),f=jt.ensureSingleById(r._topdefs,"clipPath",a,function(_){_.append("rect")}),c=jt.ensureSingle(s,"rect","bg",function(_){_.attr("shape-rendering","crispEdges")});c.call(Ys.stroke,e.bordercolor).call(Ys.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px");var v=jt.ensureSingle(s,"g","scrollbox"),u=e.title;if(e._titleWidth=0,e._titleHeight=0,u.text){var d=jt.ensureSingle(v,"text","legendtitletext");d.attr("text-anchor","start").call(Zt.font,u.font).text(u.text),Ws(d,v,t,e,Nn)}else v.selectAll(".legendtitletext").remove();var h=jt.ensureSingle(s,"rect","scrollbar",function(_){_.attr(ar.scrollBarEnterAttrs).call(Ys.fill,ar.scrollBarColor)}),p=v.selectAll("g.groups").data(o);p.enter().append("g").attr("class","groups"),p.exit().remove();var g=p.selectAll("g.traces").data(jt.identity);g.enter().append("g").attr("class","traces"),g.exit().remove(),g.style("opacity",function(_){var b=_[0].trace;return Oi.traceIs(b,"pie-like")?l.indexOf(_[0].label)!==-1?.5:1:b.visible==="legendonly"?.5:1}).each(function(){Dr.select(this).call(AC,t,e)}).call(TC,t,e).each(function(){n||Dr.select(this).call(MC,t)}),jt.syncOrAsync([td.previousPromises,function(){return CC(t,p,g,e)},function(){var _=r._size,b=e.borderwidth;if(!n){var w=DC(t);if(w)return;var m=_.l+_.w*e.x-gf[yh(e)]*e._width,y=_.t+_.h*(1-e.y)-gf[gh(e)]*e._effHeight;if(r.margin.autoexpand){var x=m,T=y;m=jt.constrain(m,0,r.width-e._width),y=jt.constrain(y,0,r.height-e._effHeight),m!==x&&jt.log("Constrain legend.x to make legend fit inside graph"),y!==T&&jt.log("Constrain legend.y to make legend fit inside graph")}Zt.setTranslate(s,m,y)}if(h.on(".drag",null),s.on("wheel",null),n||e._height<=e._maxHeight||t._context.staticPlot){var k=e._effHeight;n&&(k=e._height),c.attr({width:e._width-b,height:k-b,x:b/2,y:b/2}),Zt.setTranslate(v,0,0),f.select("rect").attr({width:e._width-2*b,height:k-2*b,x:b,y:b}),Zt.setClipUrl(v,a,t),Zt.setRect(h,0,0,0,0),delete e._scrollY}else{var S=Math.max(ar.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),A=e._effHeight-S-2*ar.scrollBarMargin,$=e._height-e._effHeight,M=A/$,C=Math.min(e._scrollY||0,$);c.attr({width:e._width-2*b+ar.scrollBarWidth+ar.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),f.select("rect").attr({width:e._width-2*b+ar.scrollBarWidth+ar.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+C}),Zt.setClipUrl(v,a,t),F(C,S,M),s.on("wheel",function(){C=jt.constrain(e._scrollY+Dr.event.deltaY/A*$,0,$),F(C,S,M),C!==0&&C!==$&&Dr.event.preventDefault()});var E,I,P,R=function(O,Y,W){var K=(W-Y)/M+O;return jt.constrain(K,0,$)},L=function(O,Y,W){var K=(Y-W)/M+O;return jt.constrain(K,0,$)},D=Dr.behavior.drag().on("dragstart",function(){var O=Dr.event.sourceEvent;O.type==="touchstart"?E=O.changedTouches[0].clientY:E=O.clientY,P=C}).on("drag",function(){var O=Dr.event.sourceEvent;O.buttons===2||O.ctrlKey||(O.type==="touchmove"?I=O.changedTouches[0].clientY:I=O.clientY,C=R(P,E,I),F(C,S,M))});h.call(D);var z=Dr.behavior.drag().on("dragstart",function(){var O=Dr.event.sourceEvent;O.type==="touchstart"&&(E=O.changedTouches[0].clientY,P=C)}).on("drag",function(){var O=Dr.event.sourceEvent;O.type==="touchmove"&&(I=O.changedTouches[0].clientY,C=L(P,E,I),F(C,S,M))});v.call(z)}function F(O,Y,W){e._scrollY=t._fullLayout.legend._scrollY=O,Zt.setTranslate(v,0,-O),Zt.setRect(h,e._width,ar.scrollBarMargin+O*W,ar.scrollBarWidth,Y),f.select("rect").attr("y",b+O)}if(t._context.edits.legendPosition){var H,U,B,X;s.classed("cursor-move",!0),cu.init({element:s.node(),gd:t,prepFn:function(){var O=Zt.getTranslate(s);B=O.x,X=O.y},moveFn:function(O,Y){var W=B+O,K=X+Y;Zt.setTranslate(s,W,K),H=cu.align(W,0,_.l,_.l+_.w,e.xanchor),U=cu.align(K,0,_.t+_.h,_.t,e.yanchor)},doneFn:function(){H!==void 0&&U!==void 0&&Oi.call("_guiRelayout",t,{"legend.x":H,"legend.y":U})},clickFn:function(O,Y){var W=i.selectAll("g.traces").filter(function(){var K=this.getBoundingClientRect();return Y.clientX>=K.left&&Y.clientX<=K.right&&Y.clientY>=K.top&&Y.clientY<=K.bottom});W.size()>0&&a_(t,s,W,O,Y)}})}}],t)}}function a_(t,e,r,a,i){var n=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:n.index,expandedIndex:n._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};n._group&&(o.group=n._group),Oi.traceIs(n,"pie-like")&&(o.label=r.datum()[0].label);var l=Hm.triggerHandler(t,"plotly_legendclick",o);if(l!==!1){if(a===1)e._clickTimeout=setTimeout(function(){!t._fullLayout||Om(r,t,a)},t._context.doubleClickDelay);else if(a===2){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0;var s=Hm.triggerHandler(t,"plotly_legenddoubleclick",o);s!==!1&&Om(r,t,a)}}}function AC(t,e,r){var a=t.data()[0][0],i=a.trace,n=Oi.traceIs(i,"pie-like"),o=!r._inHover&&e._context.edits.legendText&&!n,l=r._maxNameLength,s,f;a.groupTitle?(s=a.groupTitle.text,f=a.groupTitle.font):(f=r.font,r.entries?s=a.text:(s=n?a.label:i.name,i._meta&&(s=jt.templateString(s,i._meta))));var c=jt.ensureSingle(t,"text","legendtext");c.attr("text-anchor","start").call(Zt.font,f).text(o?Um(s,l):s);var v=r.itemwidth+ar.itemGap*2;Xn.positionText(c,v,0),o?c.call(Xn.makeEditable,{gd:e,text:s}).call(Ws,t,e,r).on("edit",function(u){this.text(Um(u,l)).call(Ws,t,e,r);var d=a.trace._fullInput||{},h={};if(Oi.hasTransform(d,"groupby")){var p=Oi.getTransformIndices(d,"groupby"),g=p[p.length-1],_=jt.keyedContainer(d,"transforms["+g+"].styles","target","value.name");_.set(a.trace._group,u),h=_.constructUpdate()}else h.name=u;return Oi.call("_guiRestyle",e,h,i.index)}):Ws(c,t,e,r)}function Um(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;t=t||"";for(var a=r-t.length;a>0;a--)t+=" ";return t}function MC(t,e){var r=e._context.doubleClickDelay,a,i=1,n=jt.ensureSingle(t,"rect","legendtoggle",function(o){e._context.staticPlot||o.style("cursor","pointer").attr("pointer-events","all"),o.call(Ys.fill,"rgba(0,0,0,0)")});e._context.staticPlot||(n.on("mousedown",function(){a=new Date().getTime(),a-e._legendMouseDownTime<r?i+=1:(i=1,e._legendMouseDownTime=a)}),n.on("mouseup",function(){if(!(e._dragged||e._editing)){var o=e._fullLayout.legend;new Date().getTime()-e._legendMouseDownTime>r&&(i=Math.max(i-1,1)),a_(e,o,t,i,Dr.event)}}))}function Ws(t,e,r,a,i){a._inHover&&t.attr("data-notex",!0),Xn.convertToTspans(t,r,function(){SC(e,r,a,i)})}function SC(t,e,r,a){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend){t.remove();return}var n=t.select("g[class*=math-group]"),o=n.node();r||(r=e._fullLayout.legend);var l=r.borderwidth,s;a===Nn?s=r.title.font:i.groupTitle?s=i.groupTitle.font:s=r.font;var f=s.size*wC,c,v;if(o){var u=Zt.bBox(o);c=u.height,v=u.width,a===Nn?Zt.setTranslate(n,l,l+c*.75):Zt.setTranslate(n,0,c*.25)}else{var d=t.select(a===Nn?".legendtitletext":".legendtext"),h=Xn.lineCount(d),p=d.node();if(c=f*h,v=p?Zt.bBox(p).width:0,a===Nn)r.title.side==="left"&&(v+=ar.itemGap*2),Xn.positionText(d,l+ar.titlePad,l+f);else{var g=ar.itemGap*2+r.itemwidth;i.groupTitle&&(g=ar.itemGap,v-=r.itemwidth),Xn.positionText(d,g,-f*((h-1)/2-.3))}}a===Nn?(r._titleWidth=v,r._titleHeight=c):(i.lineHeight=f,i.height=Math.max(c,16)+3,i.width=v)}function LC(t){var e=0,r=0,a=t.title.side;return a&&(a.indexOf("left")!==-1&&(e=t._titleWidth),a.indexOf("top")!==-1&&(r=t._titleHeight)),[e,r]}function CC(t,e,r,a){var i=t._fullLayout;a||(a=i.legend);var n=i._size,o=Gm.isVertical(a),l=Gm.isGrouped(a),s=a.borderwidth,f=2*s,c=ar.itemGap,v=a.itemwidth+c*2,u=2*(s+c),d=gh(a),h=a.y<0||a.y===0&&d==="top",p=a.y>1||a.y===1&&d==="bottom",g=a.tracegroupgap;a._maxHeight=Math.max(h||p?i.height/2:n.h,30);var _=0;a._width=0,a._height=0;var b=LC(a);if(o)r.each(function(H){var U=H[0].height;Zt.setTranslate(this,s+b[0],s+b[1]+a._height+U/2+c),a._height+=U,a._width=Math.max(a._width,H[0].width)}),_=v+a._width,a._width+=c+v+f,a._height+=u,l&&(e.each(function(H,U){Zt.setTranslate(this,0,U*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var w=yh(a),m=a.x<0||a.x===0&&w==="right",y=a.x>1||a.x===1&&w==="left",x=p||h,T=i.width/2;a._maxWidth=Math.max(m?x&&w==="left"?n.l+n.w:T:y?x&&w==="right"?n.r+n.w:T:n.w,2*v);var k=0,S=0;r.each(function(H){var U=H[0].width+v;k=Math.max(k,U),S+=U}),_=null;var A=0;if(l){var $=0,M=0,C=0;e.each(function(){var H=0,U=0;Dr.select(this).selectAll("g.traces").each(function(X){var O=X[0].width,Y=X[0].height;Zt.setTranslate(this,b[0],b[1]+s+c+Y/2+U),U+=Y,H=Math.max(H,v+O)});var B=H+c;M>0&&B+s+M>a._maxWidth?(A=Math.max(A,M),M=0,C+=$+g,$=U):$=Math.max($,U),Zt.setTranslate(this,M,C),M+=B}),a._width=Math.max(A,M)+s,a._height=C+$+u}else{var E=r.size(),I=S+f+(E-1)*c<a._maxWidth,P=0,R=0,L=0,D=0;r.each(function(H){var U=H[0].height,B=v+H[0].width,X=(I?B:k)+c;X+s+R-c>=a._maxWidth&&(A=Math.max(A,D),R=0,L+=P,a._height+=P,P=0),Zt.setTranslate(this,b[0]+s+R,b[1]+s+L+U/2+c),D=R+B+c,R+=X,P=Math.max(P,U)}),I?(a._width=R+f,a._height=P+u):(a._width=Math.max(A,D)+f,a._height+=P+u)}}a._width=Math.ceil(Math.max(a._width+b[0],a._titleWidth+2*(s+ar.titlePad))),a._height=Math.ceil(Math.max(a._height+b[1],a._titleHeight+2*(s+ar.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var z=t._context.edits,F=z.legendText||z.legendPosition;r.each(function(H){var U=Dr.select(this).select(".legendtoggle"),B=H[0].height,X=F?v:_||v+H[0].width;o||(X+=c/2),Zt.setRect(U,0,-B/2,X,B)})}function DC(t){var e=t._fullLayout,r=e.legend,a=yh(r),i=gh(r);return td.autoMargin(t,"legend",{x:r.x,y:r.y,l:r._width*gf[a],r:r._width*Bm[a],b:r._effHeight*Bm[i],t:r._effHeight*gf[i]})}function yh(t){return jt.isRightAnchor(t)?"right":jt.isCenterAnchor(t)?"center":"left"}function gh(t){return jt.isBottomAnchor(t)?"bottom":jt.isMiddleAnchor(t)?"middle":"top"}var Bi=tt.exports,Na=lt,Vm=Wr.exports,Gt=de.exports,uu=Gt.strTranslate,$C=Gt.strRotate,EC=El,Or=ir,RC=cC,ka=Tt.exports,Qt=Je.exports,hs=ha.exports,oi=Ct.exports,eo=Ve,ta=Zr,Qi=Gf,PC=J1,zC=r_,i_=Qi.YANGLE,bh=Math.PI*i_/180,IC=1/Math.sin(bh),NC=Math.cos(bh),FC=Math.sin(bh),$t=Qi.HOVERARROWSIZE,mt=Qi.HOVERTEXTPAD,qm={box:!0,ohlc:!0,violin:!0,candlestick:!0},HC={scatter:!0,scattergl:!0,splom:!0};lc.hover=function(e,r,a,i){e=Gt.getGraphDiv(e);var n=r.target;Gt.throttle(e._fullLayout._uid+Qi.HOVERID,Qi.HOVERMINTIME,function(){OC(e,r,a,i,n)})};lc.loneHover=function(e,r){var a=!0;Array.isArray(e)||(a=!1,e=[e]);var i=r.gd,n=s_(i),o=f_(i),l=e.map(function(p){var g=p._x0||p.x0||p.x||0,_=p._x1||p.x1||p.x||0,b=p._y0||p.y0||p.y||0,w=p._y1||p.y1||p.y||0,m=p.eventData;if(m){var y=Math.min(g,_),x=Math.max(g,_),T=Math.min(b,w),k=Math.max(b,w),S=p.trace;if(eo.traceIs(S,"gl3d")){var A=i._fullLayout[S.scene]._scene.container,$=A.offsetLeft,M=A.offsetTop;y+=$,x+=$,T+=M,k+=M}m.bbox={x0:y+o,x1:x+o,y0:T+n,y1:k+n},r.inOut_bbox&&r.inOut_bbox.push(m.bbox)}else m=!1;return{color:p.color||Qt.defaultLine,x0:p.x0||p.x||0,x1:p.x1||p.x||0,y0:p.y0||p.y||0,y1:p.y1||p.y||0,xLabel:p.xLabel,yLabel:p.yLabel,zLabel:p.zLabel,text:p.text,name:p.name,idealAlign:p.idealAlign,borderColor:p.borderColor,fontFamily:p.fontFamily,fontSize:p.fontSize,fontColor:p.fontColor,nameLength:p.nameLength,textAlign:p.textAlign,trace:p.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:p.hovertemplate||!1,hovertemplateLabels:p.hovertemplateLabels||!1,eventData:m}}),s=!1,f=o_(l,{gd:i,hovermode:"closest",rotateLabels:s,bgColor:r.bgColor||Qt.background,container:Bi.select(r.container),outerContainer:r.outerContainer||r.container}),c=5,v=0,u=0;f.sort(function(p,g){return p.y0-g.y0}).each(function(p,g){var _=p.y0-p.by/2;_-c<v?p.offset=v-_+c:p.offset=0,v=_+p.by+p.offset,g===r.anchorIndex&&(u=p.offset)}).each(function(p){p.offset-=u});var d=i._fullLayout._invScaleX,h=i._fullLayout._invScaleY;return l_(f,s,d,h),a?f:f.node()};function OC(t,e,r,a,i){r||(r="xy");var n=Array.isArray(r)?r:[r],o=t._fullLayout,l=o._plots||[],s=l[r],f=o._has("cartesian");if(s){var c=s.overlays.map(function(ee){return ee.id});n=n.concat(c)}for(var v=n.length,u=new Array(v),d=new Array(v),h=!1,p=0;p<v;p++){var g=n[p];if(l[g])h=!0,u[p]=l[g].xaxis,d[p]=l[g].yaxis;else if(o[g]&&o[g]._subplot){var _=o[g]._subplot;u[p]=_.xaxis,d[p]=_.yaxis}else{Gt.warn("Unrecognized subplot: "+g);return}}var b=e.hovermode||o.hovermode;if(b&&!h&&(b="closest"),["x","y","closest","x unified","y unified"].indexOf(b)===-1||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return hs.unhoverRaw(t,e);var w=o.hoverdistance;w===-1&&(w=1/0);var m=o.spikedistance;m===-1&&(m=1/0);var y=[],x=[],T,k,S,A,$,M,C,E,I,P,R,L,D,z={hLinePoint:null,vLinePoint:null},F=!1;if(Array.isArray(e))for(b="array",S=0;S<e.length;S++)$=t.calcdata[e[S].curveNumber||0],$&&(M=$[0].trace,$[0].trace.hoverinfo!=="skip"&&(x.push($),M.orientation==="h"&&(F=!0)));else{for(A=0;A<t.calcdata.length;A++)$=t.calcdata[A],M=$[0].trace,M.hoverinfo!=="skip"&&ta.isTraceInSubplots(M,n)&&(x.push($),M.orientation==="h"&&(F=!0));var H=!i,U,B;if(H)"xpx"in e?U=e.xpx:U=u[0]._length/2,"ypx"in e?B=e.ypx:B=d[0]._length/2;else{if(EC.triggerHandler(t,"plotly_beforehover",e)===!1)return;var X=i.getBoundingClientRect();U=e.clientX-X.left,B=e.clientY-X.top,o._calcInverseTransform(t);var O=Gt.apply3DTransform(o._invTransform)(U,B);if(U=O[0],B=O[1],U<0||U>u[0]._length||B<0||B>d[0]._length)return hs.unhoverRaw(t,e)}if(e.pointerX=U+u[0]._offset,e.pointerY=B+d[0]._offset,"xval"in e?T=ta.flat(n,e.xval):T=ta.p2c(u,U),"yval"in e?k=ta.flat(n,e.yval):k=ta.p2c(d,B),!Na(T[0])||!Na(k[0]))return Gt.warn("Fx.hover failed",e,t),hs.unhoverRaw(t,e)}var Y=1/0;function W(ee,Q){for(A=0;A<x.length;A++)if($=x[A],!(!$||!$[0]||!$[0].trace)&&(M=$[0].trace,!(M.visible!==!0||M._length===0)&&["carpet","contourcarpet"].indexOf(M._module.name)===-1)){if(M.type==="splom"?(E=0,C=n[E]):(C=ta.getSubplot(M),E=n.indexOf(C)),I=b,ta.isUnifiedHover(I)&&(I=I.charAt(0)),L={cd:$,trace:M,xa:u[E],ya:d[E],maxHoverDistance:w,maxSpikeDistance:m,index:!1,distance:Math.min(Y,w),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:Qt.defaultLine,name:M.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},o[C]&&(L.subplot=o[C]._subplot),o._splomScenes&&o._splomScenes[M.uid]&&(L.scene=o._splomScenes[M.uid]),D=y.length,I==="array"){var ge=e[A];"pointNumber"in ge?(L.index=ge.pointNumber,I="closest"):(I="","xval"in ge&&(P=ge.xval,I="x"),"yval"in ge&&(R=ge.yval,I=I?"closest":"y"))}else ee!==void 0&&Q!==void 0?(P=ee,R=Q):(P=T[E],R=k[E]);if(w!==0)if(M._module&&M._module.hoverPoints){var _e=M._module.hoverPoints(L,P,R,I,{finiteRange:!0,hoverLayer:o._hoverlayer});if(_e)for(var ce,ie=0;ie<_e.length;ie++)ce=_e[ie],Na(ce.x0)&&Na(ce.y0)&&y.push(GC(ce,b))}else Gt.log("Unrecognized trace type in hover:",M);if(b==="closest"&&y.length>D&&(y.splice(0,D),Y=y[0].distance),f&&m!==0&&y.length===0){L.distance=m,L.index=!1;var Me=M._module.hoverPoints(L,P,R,"closest",{hoverLayer:o._hoverlayer});if(Me&&(Me=Me.filter(function(Ue){return Ue.spikeDistance<=m})),Me&&Me.length){var Ne,je=Me.filter(function(Ue){return Ue.xa.showspikes&&Ue.xa.spikesnap!=="hovered data"});if(je.length){var Ze=je[0];Na(Ze.x0)&&Na(Ze.y0)&&(Ne=Z(Ze),(!z.vLinePoint||z.vLinePoint.spikeDistance>Ne.spikeDistance)&&(z.vLinePoint=Ne))}var nt=Me.filter(function(Ue){return Ue.ya.showspikes&&Ue.ya.spikesnap!=="hovered data"});if(nt.length){var dt=nt[0];Na(dt.x0)&&Na(dt.y0)&&(Ne=Z(dt),(!z.hLinePoint||z.hLinePoint.spikeDistance>Ne.spikeDistance)&&(z.hLinePoint=Ne))}}}}}W();function K(ee,Q,ge){for(var _e=null,ce=1/0,ie,Me=0;Me<ee.length;Me++)ie=ee[Me].spikeDistance,ge&&Me===0&&(ie=-1/0),ie<=ce&&ie<=Q&&(_e=ee[Me],ce=ie);return _e}function Z(ee){return ee?{xa:ee.xa,ya:ee.ya,x:ee.xSpike!==void 0?ee.xSpike:(ee.x0+ee.x1)/2,y:ee.ySpike!==void 0?ee.ySpike:(ee.y0+ee.y1)/2,distance:ee.distance,spikeDistance:ee.spikeDistance,curveNumber:ee.trace.index,color:ee.color,pointNumber:ee.index}:null}var ae={fullLayout:o,container:o._hoverlayer,event:e},ne=t._spikepoints,oe={vLinePoint:z.vLinePoint,hLinePoint:z.hLinePoint};t._spikepoints=oe;var re=function(){y.sort(function(ee,Q){return ee.distance-Q.distance}),y=VC(y,b)};re();var se=b.charAt(0),me=(se==="x"||se==="y")&&y[0]&&HC[y[0].trace.type];if(f&&m!==0&&y.length!==0){var Re=y.filter(function(ee){return ee.ya.showspikes}),ke=K(Re,m,me);z.hLinePoint=Z(ke);var ze=y.filter(function(ee){return ee.xa.showspikes}),he=K(ze,m,me);z.vLinePoint=Z(he)}if(y.length===0){var te=hs.unhoverRaw(t,e);return f&&(z.hLinePoint!==null||z.vLinePoint!==null)&&Wm(ne)&&Ym(t,z,ae),te}if(f&&Wm(ne)&&Ym(t,z,ae),ta.isXYhover(I)&&y[0].length!==0&&y[0].trace.type!=="splom"){var ue=y[0];qm[ue.trace.type]?y=y.filter(function(ee){return ee.trace.index===ue.trace.index}):y=[ue];var Le=y.length,we=Km("x",ue,o),Pe=Km("y",ue,o);W(we,Pe);var Ee=[],Ce={},q=0,pe=function(ee){var Q=qm[ee.trace.type]?n_(ee):ee.trace.index;if(!Ce[Q])q++,Ce[Q]=q,Ee.push(ee);else{var ge=Ce[Q]-1,_e=Ee[ge];ge>0&&Math.abs(ee.distance)<Math.abs(_e.distance)&&(Ee[ge]=ee)}},ve;for(ve=0;ve<Le;ve++)pe(y[ve]);for(ve=y.length-1;ve>Le-1;ve--)pe(y[ve]);y=Ee,re()}var ye=t._hoverdata,le=[],fe=s_(t),Te=f_(t);for(S=0;S<y.length;S++){var xe=y[S],be=ta.makeEventData(xe,xe.trace,xe.cd);if(xe.hovertemplate!==!1){var Ae=!1;xe.cd[xe.index]&&xe.cd[xe.index].ht&&(Ae=xe.cd[xe.index].ht),xe.hovertemplate=Ae||xe.trace.hovertemplate||!1}if(xe.xa&&xe.ya){var De=xe.x0+xe.xa._offset,Oe=xe.x1+xe.xa._offset,Fe=xe.y0+xe.ya._offset,st=xe.y1+xe.ya._offset,Xe=Math.min(De,Oe),ut=Math.max(De,Oe),Ke=Math.min(Fe,st),ft=Math.max(Fe,st);be.bbox={x0:Xe+Te,x1:ut+Te,y0:Ke+fe,y1:ft+fe}}xe.eventData=[be],le.push(be)}t._hoverdata=le;var N=b==="y"&&(x.length>1||y.length>1)||b==="closest"&&F&&y.length>1,G=Qt.combine(o.plot_bgcolor||Qt.background,o.paper_bgcolor),j=o_(y,{gd:t,hovermode:b,rotateLabels:N,bgColor:G,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance});if(ta.isUnifiedHover(b)||(jC(j,N?"xa":"ya",o),l_(j,N,o._invScaleX,o._invScaleY)),i&&i.tagName){var V=eo.getComponentMethod("annotations","hasClickToShow")(t,le);RC(Bi.select(i),V?"pointer":"")}!i||a||!UC(t,e,ye)||(ye&&t.emit("plotly_unhover",{event:e,points:ye}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:u,yaxes:d,xvals:T,yvals:k}))}function n_(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}var BC=/<extra>([\s\S]*)<\/extra>/;function o_(t,e){var r=e.gd,a=r._fullLayout,i=e.hovermode,n=e.rotateLabels,o=e.bgColor,l=e.container,s=e.outerContainer,f=e.commonLabelOpts||{};if(t.length===0)return[[]];var c=e.fontFamily||Qi.HOVERFONT,v=e.fontSize||Qi.HOVERFONTSIZE,u=t[0],d=u.xa,h=u.ya,p=i.charAt(0),g=u[p+"Label"],_=bn(r,s),b=_.top,w=_.width,m=_.height,y=g!==void 0&&u.distance<=e.hoverdistance&&(i==="x"||i==="y");if(y){var x=!0,T,k;for(T=0;T<t.length;T++)if(x&&t[T].zLabel===void 0&&(x=!1),k=t[T].hoverinfo||t[T].trace.hoverinfo,k){var S=Array.isArray(k)?k:k.split("+");if(S.indexOf("all")===-1&&S.indexOf(i)===-1){y=!1;break}}x&&(y=!1)}var A=l.selectAll("g.axistext").data(y?[0]:[]);if(A.enter().append("g").classed("axistext",!0),A.exit().remove(),A.each(function(){var he=Bi.select(this),te=Gt.ensureSingle(he,"path","",function(st){st.style({"stroke-width":"1px"})}),ue=Gt.ensureSingle(he,"text","",function(st){st.attr("data-notex",1)}),Le=f.bgcolor||Qt.defaultLine,we=f.bordercolor||Qt.contrast(Le),Pe=Qt.contrast(Le),Ee={family:f.font.family||c,size:f.font.size||v,color:f.font.color||Pe};te.style({fill:Le,stroke:we}),ue.text(g).call(ka.font,Ee).call(Or.positionText,0,0).call(Or.convertToTspans,r),he.attr("transform","");var Ce=bn(r,ue.node()),q,pe;if(i==="x"){var ve=d.side==="top"?"-":"";ue.attr("text-anchor","middle").call(Or.positionText,0,d.side==="top"?b-Ce.bottom-$t-mt:b-Ce.top+$t+mt),q=d._offset+(u.x0+u.x1)/2,pe=h._offset+(d.side==="top"?0:h._length);var ye=Ce.width/2+mt;q<ye?(q=ye,te.attr("d","M-"+(ye-$t)+",0L-"+(ye-$t*2)+","+ve+$t+"H"+(mt+Ce.width/2)+"v"+ve+(mt*2+Ce.height)+"H-"+ye+"V"+ve+$t+"Z")):q>a.width-ye?(q=a.width-ye,te.attr("d","M"+(ye-$t)+",0L"+ye+","+ve+$t+"v"+ve+(mt*2+Ce.height)+"H-"+ye+"V"+ve+$t+"H"+(ye-$t*2)+"Z")):te.attr("d","M0,0L"+$t+","+ve+$t+"H"+(mt+Ce.width/2)+"v"+ve+(mt*2+Ce.height)+"H-"+(mt+Ce.width/2)+"V"+ve+$t+"H-"+$t+"Z")}else{var le,fe,Te;h.side==="right"?(le="start",fe=1,Te="",q=d._offset+d._length):(le="end",fe=-1,Te="-",q=d._offset),pe=h._offset+(u.y0+u.y1)/2,ue.attr("text-anchor",le),te.attr("d","M0,0L"+Te+$t+","+$t+"V"+(mt+Ce.height/2)+"h"+Te+(mt*2+Ce.width)+"V-"+(mt+Ce.height/2)+"H"+Te+$t+"V-"+$t+"Z");var xe=Ce.height/2,be=b-Ce.top-xe,Ae="clip"+a._uid+"commonlabel"+h._id,De;if(q<Ce.width+2*mt+$t){De="M-"+($t+mt)+"-"+xe+"h-"+(Ce.width-mt)+"V"+xe+"h"+(Ce.width-mt)+"Z";var Oe=Ce.width-q+mt;Or.positionText(ue,Oe,be),le==="end"&&ue.selectAll("tspan").each(function(){var st=Bi.select(this),Xe=ka.tester.append("text").text(st.text()).call(ka.font,Ee),ut=bn(r,Xe.node());Math.round(ut.width)<Math.round(Ce.width)&&st.attr("x",Oe-ut.width),Xe.remove()})}else Or.positionText(ue,fe*(mt+$t),be),De=null;var Fe=a._topclips.selectAll("#"+Ae).data(De?[0]:[]);Fe.enter().append("clipPath").attr("id",Ae).append("path"),Fe.exit().remove(),Fe.select("path").attr("d",De),ka.setClipUrl(ue,De?Ae:null,r)}he.attr("transform",uu(q,pe))}),ta.isUnifiedHover(i)){l.selectAll("g.hovertext").remove();var $=t.filter(function(he){return he.hoverinfo!=="none"});if($.length===0)return;var M=a.hoverlabel,C=M.font,E={showlegend:!0,legend:{title:{text:g,font:C},font:C,bgcolor:M.bgcolor,bordercolor:M.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},I={font:C};PC(E,I,r._fullData);var P=I.legend;P.entries=[];for(var R=0;R<$.length;R++){var L=$[R];if(L.hoverinfo!=="none"){var D=Xm(L,!0,i,a,g),z=D[0],F=D[1];L.name=F,F!==""?L.text=F+" : "+z:L.text=z;var H=L.cd[L.index];H&&(H.mc&&(L.mc=H.mc),H.mcc&&(L.mc=H.mcc),H.mlc&&(L.mlc=H.mlc),H.mlcc&&(L.mlc=H.mlcc),H.mlw&&(L.mlw=H.mlw),H.mrc&&(L.mrc=H.mrc),H.dir&&(L.dir=H.dir)),L._distinct=!0,P.entries.push([L])}}P.entries.sort(function(he,te){return he[0].trace.index-te[0].trace.index}),P.layer=l,P._inHover=!0,P._groupTitleFont=M.grouptitlefont,zC(r,P);var U=l.select("g.legend"),B=bn(r,U.node()),X=B.width+2*mt,O=B.height+2*mt,Y=$[0],W=(Y.x0+Y.x1)/2,K=(Y.y0+Y.y1)/2,Z=!(eo.traceIs(Y.trace,"bar-like")||eo.traceIs(Y.trace,"box-violin")),ae,ne;p==="y"?Z?(ne=K-mt,ae=K+mt):(ne=Math.min.apply(null,$.map(function(he){return Math.min(he.y0,he.y1)})),ae=Math.max.apply(null,$.map(function(he){return Math.max(he.y0,he.y1)}))):ne=ae=Gt.mean($.map(function(he){return(he.y0+he.y1)/2}))-O/2;var oe,re;p==="x"?Z?(oe=W+mt,re=W-mt):(oe=Math.max.apply(null,$.map(function(he){return Math.max(he.x0,he.x1)})),re=Math.min.apply(null,$.map(function(he){return Math.min(he.x0,he.x1)}))):oe=re=Gt.mean($.map(function(he){return(he.x0+he.x1)/2}))-X/2;var se=d._offset,me=h._offset;ae+=me,oe+=se,re+=se-X,ne+=me-O;var Re,ke;return oe+X<w&&oe>=0?Re=oe:re+X<w&&re>=0?Re=re:se+X<w?Re=se:oe-W<W-re+X?Re=w-X:Re=0,Re+=mt,ae+O<m&&ae>=0?ke=ae:ne+O<m&&ne>=0?ke=ne:me+O<m?ke=me:ae-K<K-ne+O?ke=m-O:ke=0,ke+=mt,U.attr("transform",uu(Re-1,ke-1)),U}var ze=l.selectAll("g.hovertext").data(t,function(he){return n_(he)});return ze.enter().append("g").classed("hovertext",!0).each(function(){var he=Bi.select(this);he.append("rect").call(Qt.fill,Qt.addOpacity(o,.8)),he.append("text").classed("name",!0),he.append("path").style("stroke-width","1px"),he.append("text").classed("nums",!0).call(ka.font,c,v)}),ze.exit().remove(),ze.each(function(he){var te=Bi.select(this).attr("transform",""),ue=he.color;Array.isArray(ue)&&(ue=ue[he.eventData[0].pointNumber]);var Le=he.bgcolor||ue,we=Qt.combine(Qt.opacity(Le)?Le:Qt.defaultLine,o),Pe=Qt.combine(Qt.opacity(ue)?ue:Qt.defaultLine,o),Ee=he.borderColor||Qt.contrast(we),Ce=Xm(he,y,i,a,g,te),q=Ce[0],pe=Ce[1],ve=te.select("text.nums").call(ka.font,he.fontFamily||c,he.fontSize||v,he.fontColor||Ee).text(q).attr("data-notex",1).call(Or.positionText,0,0).call(Or.convertToTspans,r),ye=te.select("text.name"),le=0,fe=0;if(pe&&pe!==q){ye.call(ka.font,he.fontFamily||c,he.fontSize||v,Pe).text(pe).attr("data-notex",1).call(Or.positionText,0,0).call(Or.convertToTspans,r);var Te=bn(r,ye.node());le=Te.width+2*mt,fe=Te.height+2*mt}else ye.remove(),te.select("rect").remove();te.select("path").style({fill:we,stroke:Ee});var xe=he.xa._offset+(he.x0+he.x1)/2,be=he.ya._offset+(he.y0+he.y1)/2,Ae=Math.abs(he.x1-he.x0),De=Math.abs(he.y1-he.y0),Oe=bn(r,ve.node()),Fe=Oe.width/a._invScaleX,st=Oe.height/a._invScaleY;he.ty0=(b-Oe.top)/a._invScaleY,he.bx=Fe+2*mt,he.by=Math.max(st+2*mt,fe),he.anchor="start",he.txwidth=Fe,he.tx2width=le,he.offset=0;var Xe=(Fe+$t+mt+le)*a._invScaleX,ut,Ke;if(n)he.pos=xe,ut=be+De/2+Xe<=m,Ke=be-De/2-Xe>=0,(he.idealAlign==="top"||!ut)&&Ke?(be-=De/2,he.anchor="end"):ut?(be+=De/2,he.anchor="start"):he.anchor="middle";else if(he.pos=be,ut=xe+Ae/2+Xe<=w,Ke=xe-Ae/2-Xe>=0,(he.idealAlign==="left"||!ut)&&Ke)xe-=Ae/2,he.anchor="end";else if(ut)xe+=Ae/2,he.anchor="start";else{he.anchor="middle";var ft=Xe/2,N=xe+ft-w,G=xe-ft;N>0&&(xe-=N),G<0&&(xe+=-G)}ve.attr("text-anchor",he.anchor),le&&ye.attr("text-anchor",he.anchor),te.attr("transform",uu(xe,be)+(n?$C(i_):""))}),ze}function Xm(t,e,r,a,i,n){var o="",l="";t.nameOverride!==void 0&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=Gt.templateString(t.name,t.trace._meta)),o=Zm(t.name,t.nameLength));var s=r.charAt(0),f=s==="x"?"y":"x";t.zLabel!==void 0?(t.xLabel!==void 0&&(l+="x: "+t.xLabel+"<br>"),t.yLabel!==void 0&&(l+="y: "+t.yLabel+"<br>"),t.trace.type!=="choropleth"&&t.trace.type!=="choroplethmapbox"&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[s+"Label"]===i?l=t[f+"Label"]||"":t.xLabel===void 0?t.yLabel!==void 0&&t.trace.type!=="scattercarpet"&&(l=t.yLabel):t.yLabel===void 0?l=t.xLabel:l="("+t.xLabel+", "+t.yLabel+")",(t.text||t.text===0)&&!Array.isArray(t.text)&&(l+=(l?"<br>":"")+t.text),t.extraText!==void 0&&(l+=(l?"<br>":"")+t.extraText),n&&l===""&&!t.hovertemplate&&(o===""&&n.remove(),l=o);var c=t.hovertemplate||!1;if(c){var v=t.hovertemplateLabels||t;t[s+"Label"]!==i&&(v[s+"other"]=v[s+"Val"],v[s+"otherLabel"]=v[s+"Label"]),l=Gt.hovertemplateString(c,v,a._d3locale,t.eventData[0]||{},t.trace._meta),l=l.replace(BC,function(u,d){return o=Zm(d,t.nameLength),""})}return[l,o]}function jC(t,e,r){var a=0,i=1,n=t.size(),o=new Array(n),l=0;t.each(function(T){var k=T[e],S=k._id.charAt(0)==="x",A=k.range;l===0&&A&&A[0]>A[1]!==S&&(i=-1),o[l++]=[{datum:T,traceIndex:T.trace.index,dp:0,pos:T.pos,posref:T.posref,size:T.by*(S?IC:1)/2,pmin:0,pmax:S?r.width:r.height}]}),o.sort(function(T,k){return T[0].posref-k[0].posref||i*(k[0].traceIndex-T[0].traceIndex)});var s,f,c,v,u,d,h;function p(T){var k=T[0],S=T[T.length-1];if(f=k.pmin-k.pos-k.dp+k.size,c=S.pos+S.dp+S.size-k.pmax,f>.01){for(u=T.length-1;u>=0;u--)T[u].dp+=f;s=!1}if(!(c<.01)){if(f<-.01){for(u=T.length-1;u>=0;u--)T[u].dp-=c;s=!1}if(!!s){var A=0;for(v=0;v<T.length;v++)d=T[v],d.pos+d.dp+d.size>k.pmax&&A++;for(v=T.length-1;v>=0&&!(A<=0);v--)d=T[v],d.pos>k.pmax-1&&(d.del=!0,A--);for(v=0;v<T.length&&!(A<=0);v++)if(d=T[v],d.pos<k.pmin+1)for(d.del=!0,A--,c=d.size*2,u=T.length-1;u>=0;u--)T[u].dp-=c;for(v=T.length-1;v>=0&&!(A<=0);v--)d=T[v],d.pos+d.dp+d.size>k.pmax&&(d.del=!0,A--)}}}for(;!s&&a<=n;){for(a++,s=!0,v=0;v<o.length-1;){var g=o[v],_=o[v+1],b=g[g.length-1],w=_[0];if(f=b.pos+b.dp+b.size-w.pos-w.dp+w.size,f>.01&&b.pmin===w.pmin&&b.pmax===w.pmax){for(u=_.length-1;u>=0;u--)_[u].dp+=f;for(g.push.apply(g,_),o.splice(v+1,1),h=0,u=g.length-1;u>=0;u--)h+=g[u].dp;for(c=h/g.length,u=g.length-1;u>=0;u--)g[u].dp-=c;s=!1}else v++}o.forEach(p)}for(v=o.length-1;v>=0;v--){var m=o[v];for(u=m.length-1;u>=0;u--){var y=m[u],x=y.datum;x.offset=y.dp,x.del=y.del}}}function l_(t,e,r,a){var i=function(o){return o*r},n=function(o){return o*a};t.each(function(o){var l=Bi.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),f=o.anchor,c=f==="end"?-1:1,v={start:1,end:-1,middle:0}[f],u=v*($t+mt),d=u+v*(o.txwidth+mt),h=0,p=o.offset,g=f==="middle";g&&(u-=o.tx2width/2,d+=o.txwidth/2+mt),e&&(p*=-FC,h=o.offset*NC),l.select("path").attr("d",g?"M-"+i(o.bx/2+o.tx2width/2)+","+n(p-o.by/2)+"h"+i(o.bx)+"v"+n(o.by)+"h-"+i(o.bx)+"Z":"M0,0L"+i(c*$t+h)+","+n($t+p)+"v"+n(o.by/2-$t)+"h"+i(c*o.bx)+"v-"+n(o.by)+"H"+i(c*$t+h)+"V"+n(p-$t)+"Z");var _=h+u,b=p+o.ty0-o.by/2+mt,w=o.textAlign||"auto";w!=="auto"&&(w==="left"&&f!=="start"?(s.attr("text-anchor","start"),_=g?-o.bx/2-o.tx2width/2+mt:-o.bx-mt):w==="right"&&f!=="end"&&(s.attr("text-anchor","end"),_=g?o.bx/2-o.tx2width/2-mt:o.bx+mt)),s.call(Or.positionText,i(_),n(b)),o.tx2width&&(l.select("text.name").call(Or.positionText,i(d+v*mt+h),n(p+o.ty0-o.by/2+mt)),l.select("rect").call(ka.setRect,i(d+(v-1)*o.tx2width/2+h),n(p-o.by/2-1),i(o.tx2width),n(o.by+2)))})}function GC(t,e){var r=t.index,a=t.trace||{},i=t.cd[0],n=t.cd[r]||{};function o(u){return u||Na(u)&&u===0}var l=Array.isArray(r)?function(u,d){var h=Gt.castOption(i,r,u);return o(h)?h:Gt.extractOption({},a,"",d)}:function(u,d){return Gt.extractOption(n,a,u,d)};function s(u,d,h){var p=l(d,h);o(p)&&(t[u]=p)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),t.posref=e==="y"||e==="closest"&&a.orientation==="h"?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=Gt.constrain(t.x0,0,t.xa._length),t.x1=Gt.constrain(t.x1,0,t.xa._length),t.y0=Gt.constrain(t.y0,0,t.ya._length),t.y1=Gt.constrain(t.y1,0,t.ya._length),t.xLabelVal!==void 0&&(t.xLabel="xLabel"in t?t.xLabel:oi.hoverLabelText(t.xa,t.xLabelVal,a.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),t.yLabelVal!==void 0&&(t.yLabel="yLabel"in t?t.yLabel:oi.hoverLabelText(t.ya,t.yLabelVal,a.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),t.zLabelVal!==void 0&&t.zLabel===void 0&&(t.zLabel=String(t.zLabelVal)),!isNaN(t.xerr)&&!(t.xa.type==="log"&&t.xerr<=0)){var f=oi.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;t.xerrneg!==void 0?t.xLabel+=" +"+f+" / -"+oi.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xB1 "+f,e==="x"&&(t.distance+=1)}if(!isNaN(t.yerr)&&!(t.ya.type==="log"&&t.yerr<=0)){var c=oi.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;t.yerrneg!==void 0?t.yLabel+=" +"+c+" / -"+oi.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xB1 "+c,e==="y"&&(t.distance+=1)}var v=t.hoverinfo||t.trace.hoverinfo;return v&&v!=="all"&&(v=Array.isArray(v)?v:v.split("+"),v.indexOf("x")===-1&&(t.xLabel=void 0),v.indexOf("y")===-1&&(t.yLabel=void 0),v.indexOf("z")===-1&&(t.zLabel=void 0),v.indexOf("text")===-1&&(t.text=void 0),v.indexOf("name")===-1&&(t.name=void 0)),t}function Ym(t,e,r){var a=r.container,i=r.fullLayout,n=i._size,o=r.event,l=!!e.hLinePoint,s=!!e.vLinePoint,f,c;if(a.selectAll(".spikeline").remove(),!!(s||l)){var v=Qt.combine(i.plot_bgcolor,i.paper_bgcolor);if(l){var u=e.hLinePoint,d,h;f=u&&u.xa,c=u&&u.ya;var p=c.spikesnap;p==="cursor"?(d=o.pointerX,h=o.pointerY):(d=f._offset+u.x,h=c._offset+u.y);var g=Vm.readability(u.color,v)<1.5?Qt.contrast(v):u.color,_=c.spikemode,b=c.spikethickness,w=c.spikecolor||g,m=oi.getPxPosition(t,c),y,x;if(_.indexOf("toaxis")!==-1||_.indexOf("across")!==-1){if(_.indexOf("toaxis")!==-1&&(y=m,x=d),_.indexOf("across")!==-1){var T=c._counterDomainMin,k=c._counterDomainMax;c.anchor==="free"&&(T=Math.min(T,c.position),k=Math.max(k,c.position)),y=n.l+T*n.w,x=n.l+k*n.w}a.insert("line",":first-child").attr({x1:y,x2:x,y1:h,y2:h,"stroke-width":b,stroke:w,"stroke-dasharray":ka.dashStyle(c.spikedash,b)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:y,x2:x,y1:h,y2:h,"stroke-width":b+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}_.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:m+(c.side!=="right"?b:-b),cy:h,r:b,fill:w}).classed("spikeline",!0)}if(s){var S=e.vLinePoint,A,$;f=S&&S.xa,c=S&&S.ya;var M=f.spikesnap;M==="cursor"?(A=o.pointerX,$=o.pointerY):(A=f._offset+S.x,$=c._offset+S.y);var C=Vm.readability(S.color,v)<1.5?Qt.contrast(v):S.color,E=f.spikemode,I=f.spikethickness,P=f.spikecolor||C,R=oi.getPxPosition(t,f),L,D;if(E.indexOf("toaxis")!==-1||E.indexOf("across")!==-1){if(E.indexOf("toaxis")!==-1&&(L=R,D=$),E.indexOf("across")!==-1){var z=f._counterDomainMin,F=f._counterDomainMax;f.anchor==="free"&&(z=Math.min(z,f.position),F=Math.max(F,f.position)),L=n.t+(1-F)*n.h,D=n.t+(1-z)*n.h}a.insert("line",":first-child").attr({x1:A,x2:A,y1:L,y2:D,"stroke-width":I,stroke:P,"stroke-dasharray":ka.dashStyle(f.spikedash,I)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:A,x2:A,y1:L,y2:D,"stroke-width":I+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}E.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:A,cy:R-(f.side!=="top"?I:-I),r:I,fill:P}).classed("spikeline",!0)}}}function UC(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var a=r.length-1;a>=0;a--){var i=r[a],n=t._hoverdata[a];if(i.curveNumber!==n.curveNumber||String(i.pointNumber)!==String(n.pointNumber)||String(i.pointNumbers)!==String(n.pointNumbers))return!0}return!1}function Wm(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function Zm(t,e){return Or.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function VC(t,e){for(var r=e.charAt(0),a=[],i=[],n=[],o=0;o<t.length;o++){var l=t[o];eo.traceIs(l.trace,"bar-like")||eo.traceIs(l.trace,"box-violin")?n.push(l):l.trace[r+"period"]?i.push(l):a.push(l)}return a.concat(i).concat(n)}function Km(t,e,r){var a=e[t+"a"],i=e[t+"Val"],n=e.cd[0];if(a.type==="category")i=a._categoriesMap[i];else if(a.type==="date"){var o=e.trace[t+"periodalignment"];if(o){var l=e.cd[e.index],s=l[t+"Start"];s===void 0&&(s=l[t]);var f=l[t+"End"];f===void 0&&(f=l[t]);var c=f-s;o==="end"?i+=c:o==="middle"&&(i+=c/2)}i=a.d2c(i)}return n&&n.t&&n.t.posLetter===a._id&&(r.boxmode==="group"||r.violinmode==="group")&&(i+=n.t.dPos),i}function s_(t){return t.offsetTop+t.clientTop}function f_(t){return t.offsetLeft+t.clientLeft}function bn(t,e){var r=t._fullLayout,a=e.getBoundingClientRect(),i=a.x,n=a.y,o=i+a.width,l=n+a.height,s=Gt.apply3DTransform(r._invTransform)(i,n),f=Gt.apply3DTransform(r._invTransform)(o,l),c=s[0],v=s[1],u=f[0],d=f[1];return{x:c,y:v,width:u-c,height:d-v,top:Math.min(v,d),left:Math.min(c,u),right:Math.max(c,u),bottom:Math.max(v,d)}}var qC=de.exports,XC=Je.exports,YC=Zr.isUnifiedHover,xh=function(e,r,a,i){i=i||{};var n=r.legend;function o(l){i.font[l]||(i.font[l]=n?r.legend.font[l]:r.font[l])}r&&YC(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),n?(i.bgcolor||(i.bgcolor=XC.combine(r.legend.bgcolor,r.paper_bgcolor)),i.bordercolor||(i.bordercolor=r.legend.bordercolor)):i.bgcolor||(i.bgcolor=r.paper_bgcolor)),a("hoverlabel.bgcolor",i.bgcolor),a("hoverlabel.bordercolor",i.bordercolor),a("hoverlabel.namelength",i.namelength),qC.coerceFont(a,"hoverlabel.font",i.font),a("hoverlabel.align",i.align)},WC=de.exports,ZC=xh,KC=Ll,QC=function(e,r){function a(i,n){return WC.coerce(e,r,KC,i,n)}ZC(e,r,a)},Qm=de.exports,JC=Uf,eD=xh,tD=function(e,r,a,i){function n(l,s){return Qm.coerce(e,r,JC,l,s)}var o=Qm.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),eD(e,r,n,o)},rD=de.exports,aD=Ll,c_=function(e,r){function a(i,n){return r[i]!==void 0?r[i]:rD.coerce(e,r,aD,i,n)}return a("clickmode"),a("hovermode")},Jm=de.exports,iD=Ll,nD=c_,oD=xh,lD=function(e,r){function a(f,c){return Jm.coerce(e,r,iD,f,c)}var i=nD(e,r);i&&(a("hoverdistance"),a("spikedistance"));var n=a("dragmode");n==="select"&&a("selectdirection");var o=r._has("mapbox"),l=r._has("geo"),s=r._basePlotModules.length;r.dragmode==="zoom"&&((o||l)&&s===1||o&&l&&s===2)&&(r.dragmode="pan"),oD(e,r,a),Jm.coerceFont(a,"hoverlabel.grouptitlefont",r.hoverlabel.font)},rd=de.exports,ey=Ve,sD=function(e){var r=e.calcdata,a=e._fullLayout;function i(f){return function(c){return rd.coerceHoverinfo({hoverinfo:c},{_module:f._module},a)}}for(var n=0;n<r.length;n++){var o=r[n],l=o[0].trace;if(!ey.traceIs(l,"pie-like")){var s=ey.traceIs(l,"2dMap")?fD:rd.fillArray;s(l.hoverinfo,o,"hi",i(l)),l.hovertemplate&&s(l.hovertemplate,o,"ht"),l.hoverlabel&&(s(l.hoverlabel.bgcolor,o,"hbg"),s(l.hoverlabel.bordercolor,o,"hbc"),s(l.hoverlabel.font.size,o,"hts"),s(l.hoverlabel.font.color,o,"htc"),s(l.hoverlabel.font.family,o,"htf"),s(l.hoverlabel.namelength,o,"hnl"),s(l.hoverlabel.align,o,"hta"))}}};function fD(t,e,r,a){a=a||rd.identity,Array.isArray(t)&&(e[0][r]=a(t))}var cD=Ve,uD=lc.hover,vD=function(e,r,a){var i=cD.getComponentMethod("annotations","onClick")(e,e._hoverdata);a!==void 0&&uD(e,r,a,!0);function n(){e.emit("plotly_click",{points:e._hoverdata,event:r})}e._hoverdata&&r&&r.target&&(i&&i.then?i.then(n):n(),r.stopImmediatePropagation&&r.stopImmediatePropagation())},dD=tt.exports,bf=de.exports,hD=ha.exports,Eo=Zr,ty=Ll,ry=lc,ua={moduleType:"component",name:"fx",constants:Gf,schema:{layout:ty},attributes:Uf,layoutAttributes:ty,supplyLayoutGlobalDefaults:QC,supplyDefaults:tD,supplyLayoutDefaults:lD,calc:sD,getDistanceFunction:Eo.getDistanceFunction,getClosest:Eo.getClosest,inbox:Eo.inbox,quadrature:Eo.quadrature,appendArrayPointValue:Eo.appendArrayPointValue,castHoverOption:mD,castHoverinfo:yD,hover:ry.hover,unhover:hD.unhover,loneHover:ry.loneHover,loneUnhover:pD,click:vD};function pD(t){var e=bf.isD3Selection(t)?t:dD.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function mD(t,e,r){return bf.castOption(t,e,"hoverlabel."+r)}function yD(t,e,r){function a(i){return bf.coerceHoverinfo({hoverinfo:i},{_module:t._module},e)}return bf.castOption(t,r,"hoverinfo",a)}var go={};(function(t){t.selectMode=function(e){return e==="lasso"||e==="select"},t.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},t.openMode=function(e){return e==="drawline"||e==="drawopenpath"},t.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},t.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}})(go);var _h=function(e){var r=e._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})},sc={},wh={exports:{}},Th={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'><defs><style>.cls-1 {fill: #3f4f75;} .cls-2 {fill: #80cfbe;} .cls-3 {fill: #fff;}</style></defs><title>plotly-logomark</title><g id='symbol'><rect class='cls-1' width='132' height='132' rx='6' ry='6'/><circle class='cls-2' cx='78' cy='54' r='6'/><circle class='cls-2' cx='102' cy='30' r='6'/><circle class='cls-2' cx='78' cy='30' r='6'/><circle class='cls-2' cx='54' cy='30' r='6'/><circle class='cls-2' cx='30' cy='30' r='6'/><circle class='cls-2' cx='30' cy='54' r='6'/><path class='cls-3' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/><path class='cls-3' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/><path class='cls-3' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/><path class='cls-3' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/></g></svg>"}},Nl={},ps=32,kh={CIRCLE_SIDES:ps,i000:0,i090:ps/4,i180:ps/2,i270:ps/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)},gD=de.exports.strTranslate;function u_(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}function bD(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}}function xD(t){var e=t._id.charAt(0)==="y"?1:0;return function(r){return u_(t,r[e])}}function _D(t){return gD(t.xaxis._offset,t.yaxis._offset)}var Ah={p2r:u_,r2p:bD,axValue:xD,getTransform:_D};(function(t){var e=vk,r=kh,a=r.CIRCLE_SIDES,i=r.SQRT2,n=Ah,o=n.p2r,l=n.r2p,s=[0,3,4,5,6,1,2],f=[0,3,4,1,2];t.writePaths=function(u){var d=u.length;if(!d)return"M0,0Z";for(var h="",p=0;p<d;p++)for(var g=u[p].length,_=0;_<g;_++){var b=u[p][_][0];if(b==="Z")h+="Z";else for(var w=u[p][_].length,m=0;m<w;m++){var y=m;b==="Q"||b==="S"?y=f[m]:b==="C"&&(y=s[m]),h+=u[p][_][y],m>0&&m<w-1&&(h+=",")}}return h},t.readPaths=function(u,d,h,p){var g=e(u),_=[],b=-1,w=function(){b++,_[b]=[]},m,y=0,x=0,T,k,S=function(){T=y,k=x};S();for(var A=0;A<g.length;A++){var $=[],M,C,E,I,P=g[A][0],R=P;switch(P){case"M":w(),y=+g[A][1],x=+g[A][2],$.push([R,y,x]),S();break;case"Q":case"S":M=+g[A][1],E=+g[A][2],y=+g[A][3],x=+g[A][4],$.push([R,y,x,M,E]);break;case"C":M=+g[A][1],E=+g[A][2],C=+g[A][3],I=+g[A][4],y=+g[A][5],x=+g[A][6],$.push([R,y,x,M,E,C,I]);break;case"T":case"L":y=+g[A][1],x=+g[A][2],$.push([R,y,x]);break;case"H":R="L",y=+g[A][1],$.push([R,y,x]);break;case"V":R="L",x=+g[A][1],$.push([R,y,x]);break;case"A":R="L";var L=+g[A][1],D=+g[A][2];+g[A][4]||(L=-L,D=-D);var z=y-L,F=x;for(m=1;m<=a/2;m++){var H=2*Math.PI*m/a;$.push([R,z+L*Math.cos(H),F+D*Math.sin(H)])}break;case"Z":(y!==T||x!==k)&&(y=T,x=k,$.push([R,y,x]));break}for(var U=(h||{}).domain,B=d._fullLayout._size,X=h&&h.xsizemode==="pixel",O=h&&h.ysizemode==="pixel",Y=p===!1,W=0;W<$.length;W++){for(m=0;m+2<7;m+=2){var K=$[W][m+1],Z=$[W][m+2];K===void 0||Z===void 0||(y=K,x=Z,h&&(h.xaxis&&h.xaxis.p2r?(Y&&(K-=h.xaxis._offset),X?K=l(h.xaxis,h.xanchor)+K:K=o(h.xaxis,K)):(Y&&(K-=B.l),U?K=U.x[0]+K/B.w:K=K/B.w),h.yaxis&&h.yaxis.p2r?(Y&&(Z-=h.yaxis._offset),O?Z=l(h.yaxis,h.yanchor)-Z:Z=o(h.yaxis,Z)):(Y&&(Z-=B.t),U?Z=U.y[1]-Z/B.h:Z=1-Z/B.h)),$[W][m+1]=K,$[W][m+2]=Z)}_[b].push($[W].slice())}}return _};function c(u,d){return Math.abs(u-d)<=1e-6}function v(u,d){var h=d[1]-u[1],p=d[2]-u[2];return Math.sqrt(h*h+p*p)}t.pointsShapeRectangle=function(u){var d=u.length;if(d!==5)return!1;for(var h=1;h<3;h++){var p=u[0][h]-u[1][h],g=u[3][h]-u[2][h];if(!c(p,g))return!1;var _=u[0][h]-u[3][h],b=u[1][h]-u[2][h];if(!c(_,b))return!1}return!c(u[0][1],u[1][1])&&!c(u[0][1],u[3][1])?!1:!!(v(u[0],u[1])*v(u[0],u[3]))},t.pointsShapeEllipse=function(u){var d=u.length;if(d!==a+1)return!1;d=a;for(var h=0;h<d;h++){var p=(d*2-h)%d,g=(d/2+p)%d,_=(d/2+h)%d;if(!c(v(u[h],u[_]),v(u[p],u[g])))return!1}return!0},t.handleEllipse=function(u,d,h){if(!u)return[d,h];var p=t.ellipseOver({x0:d[0],y0:d[1],x1:h[0],y1:h[1]}),g=(p.x1+p.x0)/2,_=(p.y1+p.y0)/2,b=(p.x1-p.x0)/2,w=(p.y1-p.y0)/2;b||(b=w=w/i),w||(w=b=b/i);for(var m=[],y=0;y<a;y++){var x=y*2*Math.PI/a;m.push([g+b*Math.cos(x),_+w*Math.sin(x)])}return m},t.ellipseOver=function(u){var d=u.x0,h=u.y0,p=u.x1,g=u.y1,_=p-d,b=g-h;d-=_,h-=b;var w=(d+p)/2,m=(h+g)/2,y=i;return _*=y,b*=y,{x0:w-_,y0:m-b,x1:w+_,y1:m+b}}})(Nl);var v_=go,wD=v_.drawMode,TD=v_.openMode,bo=kh,ay=bo.i000,iy=bo.i090,ny=bo.i180,oy=bo.i270,kD=bo.cos45,AD=bo.sin45,d_=Ah,ms=d_.p2r,Ja=d_.r2p,MD=Rl,SD=MD.clearSelect,Mh=Nl,LD=Mh.readPaths,CD=Mh.writePaths,DD=Mh.ellipseOver,h_=function(e,r){if(!!e.length){var a=e[0][0];if(!!a){var i=a.getAttribute("d"),n=r.gd,o=n._fullLayout.newshape,l=r.plotinfo,s=l.xaxis,f=l.yaxis,c=!!l.domain||!l.xaxis,v=!!l.domain||!l.yaxis,u=r.isActiveShape,d=r.dragmode,h=(n.layout||{}).shapes||[];if(!wD(d)&&u!==void 0){var p=n._fullLayout._activeShapeIndex;if(p<h.length)switch(n._fullLayout.shapes[p].type){case"rect":d="drawrect";break;case"circle":d="drawcircle";break;case"line":d="drawline";break;case"path":var g=h[p].path||"";g[g.length-1]==="Z"?d="drawclosedpath":d="drawopenpath";break}}var _=TD(d),b=LD(i,n,l,u),w={editable:!0,xref:c?"paper":s._id,yref:v?"paper":f._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};_||(w.fillcolor=o.fillcolor,w.fillrule=o.fillrule);var m;if(b.length===1&&(m=b[0]),m&&d==="drawrect")w.type="rect",w.x0=m[0][1],w.y0=m[0][2],w.x1=m[2][1],w.y1=m[2][2];else if(m&&d==="drawline")w.type="line",w.x0=m[0][1],w.y0=m[0][2],w.x1=m[1][1],w.y1=m[1][2];else if(m&&d==="drawcircle"){w.type="circle";var y=m[ay][1],x=m[iy][1],T=m[ny][1],k=m[oy][1],S=m[ay][2],A=m[iy][2],$=m[ny][2],M=m[oy][2],C=l.xaxis&&(l.xaxis.type==="date"||l.xaxis.type==="log"),E=l.yaxis&&(l.yaxis.type==="date"||l.yaxis.type==="log");C&&(y=Ja(l.xaxis,y),x=Ja(l.xaxis,x),T=Ja(l.xaxis,T),k=Ja(l.xaxis,k)),E&&(S=Ja(l.yaxis,S),A=Ja(l.yaxis,A),$=Ja(l.yaxis,$),M=Ja(l.yaxis,M));var I=(x+k)/2,P=(S+$)/2,R=(k-x+T-y)/2,L=(M-A+$-S)/2,D=DD({x0:I,y0:P,x1:I+R*kD,y1:P+L*AD});C&&(D.x0=ms(l.xaxis,D.x0),D.x1=ms(l.xaxis,D.x1)),E&&(D.y0=ms(l.yaxis,D.y0),D.y1=ms(l.yaxis,D.y1)),w.x0=D.x0,w.y0=D.y0,w.x1=D.x1,w.y1=D.y1}else w.type="path",s&&f&&$D(b,s,f),w.path=CD(b),m=null;SD(n);for(var z=r.editHelpers,F=(z||{}).modifyItem,H=[],U=0;U<h.length;U++){var B=n._fullLayout.shapes[U];if(H[U]=B._input,u!==void 0&&U===n._fullLayout._activeShapeIndex){var X=w;switch(B.type){case"line":case"rect":case"circle":F("x0",X.x0),F("x1",X.x1),F("y0",X.y0),F("y1",X.y1);break;case"path":F("path",X.path);break}}}return u===void 0?(H.push(w),H):z?z.getUpdateObj():{}}}};function $D(t,e,r){var a=e.type==="date",i=r.type==="date";if(!a&&!i)return t;for(var n=0;n<t.length;n++)for(var o=0;o<t[n].length;o++)for(var l=0;l+2<t[n][o].length;l+=2)a&&(t[n][o][l+1]=t[n][o][l+1].replace(" ","_")),i&&(t[n][o][l+2]=t[n][o][l+2].replace(" ","_"));return t}var ly=ha.exports,ED=go,RD=ED.drawMode,PD=Ve,fc=kh,zD=fc.i000,ID=fc.i090,ND=fc.i180,FD=fc.i270,HD=Rl,OD=HD.clearOutlineControllers,Sh=Nl,ys=Sh.pointsShapeRectangle,vu=Sh.pointsShapeEllipse,BD=Sh.writePaths,jD=h_,p_=function t(e,r,a,i){i||(i=0);var n=a.gd;function o(){t(e,r,a,i++),vu(e[0])&&l({redrawing:!0})}function l(E){a.isActiveShape=!1;var I=jD(r,a);Object.keys(I).length&&PD.call((E||{}).redrawing?"relayout":"_guiRelayout",n,I)}var s=a.isActiveShape,f=n._fullLayout,c=f._zoomlayer,v=a.dragmode,u=RD(v);u?n._fullLayout._drawing=!0:n._fullLayout._activeShapeIndex>=0&&OD(n),r.attr("d",BD(e));var d,h,p,g,_;if(s&&!i){_=GD([],e);var b=c.append("g").attr("class","outline-controllers");k(b),C()}function w(E){p=+E.srcElement.getAttribute("data-i"),g=+E.srcElement.getAttribute("data-j"),d[p][g].moveFn=m}function m(E,I){if(!!e.length){var P=_[p][g][1],R=_[p][g][2],L=e[p],D=L.length;if(ys(L)){for(var z=0;z<D;z++)if(z!==g){var F=L[z];F[1]===L[g][1]&&(F[1]=P+E),F[2]===L[g][2]&&(F[2]=R+I)}if(L[g][1]=P+E,L[g][2]=R+I,!ys(L))for(var H=0;H<D;H++)for(var U=0;U<L[H].length;U++)L[H][U]=_[p][H][U]}else L[g][1]=P+E,L[g][2]=R+I;o()}}function y(){l()}function x(){if(!!e.length&&!!e[p]&&!!e[p].length){for(var E=[],I=0;I<e[p].length;I++)I!==g&&E.push(e[p][I]);E.length>1&&!(E.length===2&&E[1][0]==="Z")&&(g===0&&(E[0][0]="M"),e[p]=E,o(),l())}}function T(E,I){if(E===2){p=+I.srcElement.getAttribute("data-i"),g=+I.srcElement.getAttribute("data-j");var P=e[p];!ys(P)&&!vu(P)&&x()}}function k(E){d=[];for(var I=0;I<e.length;I++){var P=e[I],R=ys(P),L=!R&&vu(P);d[I]=[];for(var D=0;D<P.length;D++)if(P[D][0]!=="Z"&&!(L&&D!==zD&&D!==ID&&D!==ND&&D!==FD)){var z=P[D][1],F=P[D][2],H=E.append("circle").classed("cursor-grab",!0).attr("data-i",I).attr("data-j",D).attr("cx",z).attr("cy",F).attr("r",4).style({"mix-blend-mode":"luminosity",fill:"black",stroke:"white","stroke-width":1});d[I][D]={element:H.node(),gd:n,prepFn:w,doneFn:y,clickFn:T},ly.init(d[I][D])}}}function S(E,I){if(!!e.length)for(var P=0;P<e.length;P++)for(var R=0;R<e[P].length;R++)for(var L=0;L+2<e[P][R].length;L+=2)e[P][R][L+1]=_[P][R][L+1]+E,e[P][R][L+2]=_[P][R][L+2]+I}function A(E,I){S(E,I),o()}function $(E){p=+E.srcElement.getAttribute("data-i"),p||(p=0),h[p].moveFn=A}function M(){l()}function C(){if(h=[],!!e.length){var E=0;h[E]={element:r[0][0],gd:n,prepFn:$,doneFn:M},ly.init(h[E])}}};function GD(t,e){for(var r=0;r<e.length;r++){var a=e[r];t[r]=[];for(var i=0;i<a.length;i++){t[r][i]=[];for(var n=0;n<a[i].length;n++)t[r][i][n]=a[i][n]}}return t}var Lh={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}},cc={};(function(t){var e=Lh,r=de.exports;t.rangeToShapePosition=function(a){return a.type==="log"?a.r2d:function(i){return i}},t.shapePositionToRange=function(a){return a.type==="log"?a.d2r:function(i){return i}},t.decodeDate=function(a){return function(i){return i.replace&&(i=i.replace("_"," ")),a(i)}},t.encodeDate=function(a){return function(i){return a(i).replace(" ","_")}},t.extractPathCoords=function(a,i){var n=[],o=a.match(e.segmentRE);return o.forEach(function(l){var s=i[l.charAt(0)].drawn;if(s!==void 0){var f=l.substr(1).match(e.paramRE);!f||f.length<s||n.push(r.cleanNumber(f[s]))}}),n},t.getDataToPixel=function(a,i,n,o){var l=a._fullLayout._size,s;if(i)if(o==="domain")s=function(c){return i._length*(n?1-c:c)+i._offset};else{var f=t.shapePositionToRange(i);s=function(c){return i._offset+i.r2p(f(c,!0))},i.type==="date"&&(s=t.decodeDate(s))}else n?s=function(c){return l.t+l.h*(1-c)}:s=function(c){return l.l+l.w*c};return s},t.getPixelToData=function(a,i,n,o){var l=a._fullLayout._size,s;if(i)if(o==="domain")s=function(c){var v=(c-i._offset)/i._length;return n?1-v:v};else{var f=t.rangeToShapePosition(i);s=function(c){return f(i.p2r(c-i._offset))}}else n?s=function(c){return 1-(c-l.t)/l.h}:s=function(c){return(c-l.l)/l.w};return s},t.roundPositionForSharpStrokeRendering=function(a,i){var n=Math.round(i%2)===1,o=Math.round(a);return n?o+.5:o},t.makeOptionsAndPlotinfo=function(a,i){var n=a._fullLayout.shapes[i]||{},o=a._fullLayout._plots[n.xref+n.yref],l=!!o;return l?o._hadPlotinfo=!0:(o={},n.xref&&n.xref!=="paper"&&(o.xaxis=a._fullLayout[n.xref+"axis"]),n.yref&&n.yref!=="paper"&&(o.yaxis=a._fullLayout[n.yref+"axis"])),o.xsizemode=n.xsizemode,o.ysizemode=n.ysizemode,o.xanchor=n.xanchor,o.yanchor=n.yanchor,{options:n,plotinfo:o}}})(cc);var m_=Ve,ad=de.exports,Ma=Ct.exports,UD=Nl.readPaths,VD=p_,y_=Rl.clearOutlineControllers,du=Je.exports,Ch=Tt.exports,qD=Mt.arrayEditor,sy=ha.exports,fy=xi,qr=Lh,sr=cc,g_={draw:Dh,drawOne:b_,eraseActiveShape:ZD};function Dh(t){var e=t._fullLayout;e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove();for(var r in e._plots){var a=e._plots[r].shapelayer;a&&a.selectAll("path").remove()}for(var i=0;i<e.shapes.length;i++)e.shapes[i].visible&&b_(t,i)}function gs(t){return!!t._fullLayout._drawing}function uc(t){return!t._context.edits.shapePosition}function b_(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=sr.makeOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input||a.visible===!1)return;if(a.layer!=="below")o(t._fullLayout._shapeUpperLayer);else if(a.xref==="paper"||a.yref==="paper")o(t._fullLayout._shapeLowerLayer);else if(i._hadPlotinfo){var n=i.mainplotinfo||i;o(n.shapelayer)}else o(t._fullLayout._shapeLowerLayer);function o(l){var s=id(t,a),f={"data-index":e,"fill-rule":a.fillrule,d:s},c=a.opacity,v=a.fillcolor,u=a.line.width?a.line.color:"rgba(0,0,0,0)",d=a.line.width,h=a.line.dash;!d&&a.editable===!0&&(d=5,h="solid");var p=s[s.length-1]!=="Z",g=uc(t)&&a.editable&&t._fullLayout._activeShapeIndex===e;g&&(v=p?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,c=t._fullLayout.activeshape.opacity);var _=l.append("path").attr(f).style("opacity",c).call(du.stroke,u).call(du.fill,v).call(Ch.dashLine,h,d);x_(_,t,a);var b;if((g||t._context.edits.shapePosition)&&(b=qD(t.layout,"shapes",a)),g){_.style({cursor:"move"});var w={element:_.node(),plotinfo:i,gd:t,editHelpers:b,isActiveShape:!0},m=UD(s,t);VD(m,_,w)}else t._context.edits.shapePosition?XD(t,_,a,e,l,b):a.editable===!0&&_.style("pointer-events",p||du.opacity(v)*c<=.5?"stroke":"all");_.node().addEventListener("click",function(){return WD(t,_)})}}function x_(t,e,r){var a=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");Ch.setClipUrl(t,a?"clip"+e._fullLayout._uid+a:null,e)}function XD(t,e,r,a,i,n){var o=10,l=10,s=r.xsizemode==="pixel",f=r.ysizemode==="pixel",c=r.type==="line",v=r.type==="path",u=n.modifyItem,d,h,p,g,_,b,w,m,y,x,T,k,S,A,$,M=Ma.getFromId(t,r.xref),C=Ma.getRefType(r.xref),E=Ma.getFromId(t,r.yref),I=Ma.getRefType(r.yref),P=sr.getDataToPixel(t,M,!1,C),R=sr.getDataToPixel(t,E,!0,I),L=sr.getPixelToData(t,M,!1,C),D=sr.getPixelToData(t,E,!0,I),z=U(),F={element:z.node(),gd:t,prepFn:O,doneFn:Y,clickFn:W},H;sy.init(F),z.node().onmousemove=X;function U(){return c?B():e}function B(){var re=10,se=Math.max(r.line.width,re),me=i.append("g").attr("data-index",a);me.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":se,"stroke-opacity":"0"});var Re={"fill-opacity":"0"},ke=Math.max(se/2,re);return me.append("circle").attr({"data-line-point":"start-point",cx:s?P(r.xanchor)+r.x0:P(r.x0),cy:f?R(r.yanchor)-r.y0:R(r.y0),r:ke}).style(Re).classed("cursor-grab",!0),me.append("circle").attr({"data-line-point":"end-point",cx:s?P(r.xanchor)+r.x1:P(r.x1),cy:f?R(r.yanchor)-r.y1:R(r.y1),r:ke}).style(Re).classed("cursor-grab",!0),me}function X(re){if(gs(t)){H=null;return}if(c)re.target.tagName==="path"?H="move":H=re.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var se=F.element.getBoundingClientRect(),me=se.right-se.left,Re=se.bottom-se.top,ke=re.clientX-se.left,ze=re.clientY-se.top,he=!v&&me>o&&Re>l&&!re.shiftKey?sy.getCursor(ke/me,1-ze/Re):"move";fy(e,he),H=he.split("-")[0]}}function O(re){gs(t)||(s&&(_=P(r.xanchor)),f&&(b=R(r.yanchor)),r.type==="path"?$=r.path:(d=s?r.x0:P(r.x0),h=f?r.y0:R(r.y0),p=s?r.x1:P(r.x1),g=f?r.y1:R(r.y1)),d<p?(y=d,S="x0",x=p,A="x1"):(y=p,S="x1",x=d,A="x0"),!f&&h<g||f&&h>g?(w=h,T="y0",m=g,k="y1"):(w=g,T="y1",m=h,k="y0"),X(re),ae(i,r),oe(e,r,t),F.moveFn=H==="move"?K:Z,F.altKey=re.altKey)}function Y(){gs(t)||(fy(e),ne(i),x_(e,t,r),m_.call("_guiRelayout",t,n.getUpdateObj()))}function W(){gs(t)||ne(i)}function K(re,se){if(r.type==="path"){var me=function(ze){return ze},Re=me,ke=me;s?u("xanchor",r.xanchor=L(_+re)):(Re=function(he){return L(P(he)+re)},M&&M.type==="date"&&(Re=sr.encodeDate(Re))),f?u("yanchor",r.yanchor=D(b+se)):(ke=function(he){return D(R(he)+se)},E&&E.type==="date"&&(ke=sr.encodeDate(ke))),u("path",r.path=cy($,Re,ke))}else s?u("xanchor",r.xanchor=L(_+re)):(u("x0",r.x0=L(d+re)),u("x1",r.x1=L(p+re))),f?u("yanchor",r.yanchor=D(b+se)):(u("y0",r.y0=D(h+se)),u("y1",r.y1=D(g+se)));e.attr("d",id(t,r)),ae(i,r)}function Z(re,se){if(v){var me=function(le){return le},Re=me,ke=me;s?u("xanchor",r.xanchor=L(_+re)):(Re=function(fe){return L(P(fe)+re)},M&&M.type==="date"&&(Re=sr.encodeDate(Re))),f?u("yanchor",r.yanchor=D(b+se)):(ke=function(fe){return D(R(fe)+se)},E&&E.type==="date"&&(ke=sr.encodeDate(ke))),u("path",r.path=cy($,Re,ke))}else if(c){if(H==="resize-over-start-point"){var ze=d+re,he=f?h-se:h+se;u("x0",r.x0=s?ze:L(ze)),u("y0",r.y0=f?he:D(he))}else if(H==="resize-over-end-point"){var te=p+re,ue=f?g-se:g+se;u("x1",r.x1=s?te:L(te)),u("y1",r.y1=f?ue:D(ue))}}else{var Le=function(le){return H.indexOf(le)!==-1},we=Le("n"),Pe=Le("s"),Ee=Le("w"),Ce=Le("e"),q=we?w+se:w,pe=Pe?m+se:m,ve=Ee?y+re:y,ye=Ce?x+re:x;f&&(we&&(q=w-se),Pe&&(pe=m-se)),(!f&&pe-q>l||f&&q-pe>l)&&(u(T,r[T]=f?q:D(q)),u(k,r[k]=f?pe:D(pe))),ye-ve>o&&(u(S,r[S]=s?ve:L(ve)),u(A,r[A]=s?ye:L(ye)))}e.attr("d",id(t,r)),ae(i,r)}function ae(re,se){(s||f)&&me();function me(){var Re=se.type!=="path",ke=re.selectAll(".visual-cue").data([0]),ze=1;ke.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ze}).classed("visual-cue",!0);var he=P(s?se.xanchor:ad.midRange(Re?[se.x0,se.x1]:sr.extractPathCoords(se.path,qr.paramIsX))),te=R(f?se.yanchor:ad.midRange(Re?[se.y0,se.y1]:sr.extractPathCoords(se.path,qr.paramIsY)));if(he=sr.roundPositionForSharpStrokeRendering(he,ze),te=sr.roundPositionForSharpStrokeRendering(te,ze),s&&f){var ue="M"+(he-1-ze)+","+(te-1-ze)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ke.attr("d",ue)}else if(s){var Le="M"+(he-1-ze)+","+(te-9-ze)+"v18 h2 v-18 Z";ke.attr("d",Le)}else{var we="M"+(he-9-ze)+","+(te-1-ze)+"h18 v2 h-18 Z";ke.attr("d",we)}}}function ne(re){re.selectAll(".visual-cue").remove()}function oe(re,se,me){var Re=se.xref,ke=se.yref,ze=Ma.getFromId(me,Re),he=Ma.getFromId(me,ke),te="";Re!=="paper"&&!ze.autorange&&(te+=Re),ke!=="paper"&&!he.autorange&&(te+=ke),Ch.setClipUrl(re,te?"clip"+me._fullLayout._uid+te:null,me)}}function id(t,e){var r=e.type,a=Ma.getRefType(e.xref),i=Ma.getRefType(e.yref),n=Ma.getFromId(t,e.xref),o=Ma.getFromId(t,e.yref),l=t._fullLayout._size,s,f,c,v,u,d,h,p;if(n?a==="domain"?f=function(S){return n._offset+n._length*S}:(s=sr.shapePositionToRange(n),f=function(S){return n._offset+n.r2p(s(S,!0))}):f=function(S){return l.l+l.w*S},o?i==="domain"?v=function(S){return o._offset+o._length*(1-S)}:(c=sr.shapePositionToRange(o),v=function(S){return o._offset+o.r2p(c(S,!0))}):v=function(S){return l.t+l.h*(1-S)},r==="path")return n&&n.type==="date"&&(f=sr.decodeDate(f)),o&&o.type==="date"&&(v=sr.decodeDate(v)),YD(e,f,v);if(e.xsizemode==="pixel"){var g=f(e.xanchor);u=g+e.x0,d=g+e.x1}else u=f(e.x0),d=f(e.x1);if(e.ysizemode==="pixel"){var _=v(e.yanchor);h=_-e.y0,p=_-e.y1}else h=v(e.y0),p=v(e.y1);if(r==="line")return"M"+u+","+h+"L"+d+","+p;if(r==="rect")return"M"+u+","+h+"H"+d+"V"+p+"H"+u+"Z";var b=(u+d)/2,w=(h+p)/2,m=Math.abs(b-u),y=Math.abs(w-h),x="A"+m+","+y,T=b+m+","+w,k=b+","+(w-y);return"M"+T+x+" 0 1,1 "+k+x+" 0 0,1 "+T+"Z"}function YD(t,e,r){var a=t.path,i=t.xsizemode,n=t.ysizemode,o=t.xanchor,l=t.yanchor;return a.replace(qr.segmentRE,function(s){var f=0,c=s.charAt(0),v=qr.paramIsX[c],u=qr.paramIsY[c],d=qr.numParams[c],h=s.substr(1).replace(qr.paramRE,function(p){return v[f]?i==="pixel"?p=e(o)+Number(p):p=e(p):u[f]&&(n==="pixel"?p=r(l)-Number(p):p=r(p)),f++,f>d&&(p="X"),p});return f>d&&(h=h.replace(/[\s,]*X.*/,""),ad.log("Ignoring extra params in segment "+s)),c+h})}function cy(t,e,r){return t.replace(qr.segmentRE,function(a){var i=0,n=a.charAt(0),o=qr.paramIsX[n],l=qr.paramIsY[n],s=qr.numParams[n],f=a.substr(1).replace(qr.paramRE,function(c){return i>=s||(o[i]?c=e(c):l[i]&&(c=r(c)),i++),c});return n+f})}function WD(t,e){if(!!uc(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeShapeIndex){uy(t);return}t._fullLayout._activeShapeIndex=a,t._fullLayout._deactivateShape=uy,Dh(t)}}}function uy(t){if(!!uc(t)){var e=t._fullLayout._activeShapeIndex;e>=0&&(y_(t),delete t._fullLayout._activeShapeIndex,Dh(t))}}function ZD(t){if(!!uc(t)){y_(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var a=[],i=0;i<r.length;i++)i!==e&&a.push(r[i]);delete t._fullLayout._activeShapeIndex,m_.call("_guiRelayout",t,{shapes:a})}}}var Kr=Ve,__=Ut.exports,w_=Vt,gt=Th,KD=g_.eraseActiveShape,Fn=de.exports,pt=Fn._,bt=wh.exports={};bt.toImage={name:"toImage",title:function(t){var e=t._context.toImageButtonOptions||{},r=e.format||"png";return r==="png"?pt(t,"Download plot as a png"):pt(t,"Download plot")},icon:gt.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};Fn.notifier(pt(t,"Taking snapshot - this may take a few seconds"),"long"),r.format!=="svg"&&Fn.isIE()&&(Fn.notifier(pt(t,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach(function(a){a in e&&(r[a]=e[a])}),Kr.call("downloadImage",t,r).then(function(a){Fn.notifier(pt(t,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){Fn.notifier(pt(t,"Sorry, there was a problem downloading your snapshot!"),"long")})}};bt.sendDataToCloud={name:"sendDataToCloud",title:function(t){return pt(t,"Edit in Chart Studio")},icon:gt.disk,click:function(t){__.sendDataToCloud(t)}};bt.editInChartStudio={name:"editInChartStudio",title:function(t){return pt(t,"Edit in Chart Studio")},icon:gt.pencil,click:function(t){__.sendDataToCloud(t)}};bt.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return pt(t,"Zoom")},attr:"dragmode",val:"zoom",icon:gt.zoombox,click:gr};bt.pan2d={name:"pan2d",_cat:"pan",title:function(t){return pt(t,"Pan")},attr:"dragmode",val:"pan",icon:gt.pan,click:gr};bt.select2d={name:"select2d",_cat:"select",title:function(t){return pt(t,"Box Select")},attr:"dragmode",val:"select",icon:gt.selectbox,click:gr};bt.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return pt(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:gt.lasso,click:gr};bt.drawclosedpath={name:"drawclosedpath",title:function(t){return pt(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:gt.drawclosedpath,click:gr};bt.drawopenpath={name:"drawopenpath",title:function(t){return pt(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:gt.drawopenpath,click:gr};bt.drawline={name:"drawline",title:function(t){return pt(t,"Draw line")},attr:"dragmode",val:"drawline",icon:gt.drawline,click:gr};bt.drawrect={name:"drawrect",title:function(t){return pt(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:gt.drawrect,click:gr};bt.drawcircle={name:"drawcircle",title:function(t){return pt(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:gt.drawcircle,click:gr};bt.eraseshape={name:"eraseshape",title:function(t){return pt(t,"Erase active shape")},icon:gt.eraseshape,click:KD};bt.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:gt.zoom_plus,click:gr};bt.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:gt.zoom_minus,click:gr};bt.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return pt(t,"Autoscale")},attr:"zoom",val:"auto",icon:gt.autoscale,click:gr};bt.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return pt(t,"Reset axes")},attr:"zoom",val:"reset",icon:gt.home,click:gr};bt.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return pt(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:gt.tooltip_basic,gravity:"ne",click:gr};bt.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return pt(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:gt.tooltip_compare,gravity:"ne",click:gr};function gr(t,e){var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o={},l=w_.list(t,null,!0),s=n._cartesianSpikesEnabled,f,c;if(a==="zoom"){var v=i==="in"?.5:2,u=(1+v)/2,d=(1-v)/2,h;for(c=0;c<l.length;c++)if(f=l[c],!f.fixedrange)if(h=f._name,i==="auto")o[h+".autorange"]=!0;else if(i==="reset"){if(f._rangeInitial===void 0)o[h+".autorange"]=!0;else{var p=f._rangeInitial.slice();o[h+".range[0]"]=p[0],o[h+".range[1]"]=p[1]}f._showSpikeInitial!==void 0&&(o[h+".showspikes"]=f._showSpikeInitial,s==="on"&&!f._showSpikeInitial&&(s="off"))}else{var g=[f.r2l(f.range[0]),f.r2l(f.range[1])],_=[u*g[0]+d*g[1],u*g[1]+d*g[0]];o[h+".range[0]"]=f.l2r(_[0]),o[h+".range[1]"]=f.l2r(_[1])}}else a==="hovermode"&&(i==="x"||i==="y")&&(i=n._isHoriz?"y":"x",r.setAttribute("data-val",i)),o[a]=i;n._cartesianSpikesEnabled=s,Kr.call("_guiRelayout",t,o)}bt.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return pt(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:gt.zoombox,click:vc};bt.pan3d={name:"pan3d",_cat:"pan",title:function(t){return pt(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:gt.pan,click:vc};bt.orbitRotation={name:"orbitRotation",title:function(t){return pt(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:gt["3d_rotate"],click:vc};bt.tableRotation={name:"tableRotation",title:function(t){return pt(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:gt["z-axis"],click:vc};function vc(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout._subplots.gl3d||[],o={},l=a.split("."),s=0;s<n.length;s++)o[n[s]+"."+l[1]]=i;var f=i==="pan"?i:"zoom";o.dragmode=f,Kr.call("_guiRelayout",t,o)}bt.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return pt(t,"Reset camera to default")},attr:"resetDefault",icon:gt.home,click:$h};bt.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return pt(t,"Reset camera to last save")},attr:"resetLastSave",icon:gt.movie,click:$h};function $h(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=a==="resetLastSave",n=a==="resetDefault",o=t._fullLayout,l=o._subplots.gl3d||[],s={},f=0;f<l.length;f++){var c=l[f],v=c+".camera",u=c+".aspectratio",d=c+".aspectmode",h=o[c]._scene,p;i?(s[v+".up"]=h.viewInitial.up,s[v+".eye"]=h.viewInitial.eye,s[v+".center"]=h.viewInitial.center,p=!0):n&&(s[v+".up"]=null,s[v+".eye"]=null,s[v+".center"]=null,p=!0),p&&(s[u+".x"]=h.viewInitial.aspectratio.x,s[u+".y"]=h.viewInitial.aspectratio.y,s[u+".z"]=h.viewInitial.aspectratio.z,s[d]=h.viewInitial.aspectmode)}Kr.call("_guiRelayout",t,s)}bt.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:gt.tooltip_basic,gravity:"ne",click:QD};function T_(t,e){var r=e.currentTarget,a=r._previousVal,i=t._fullLayout,n=i._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],l={},s={};if(a)s=a,r._previousVal=null;else{for(var f=0;f<n.length;f++){var c=n[f],v=i[c],u=c+".hovermode";l[u]=v.hovermode,s[u]=!1;for(var d=0;d<3;d++){var h=o[d],p=c+"."+h+".showspikes";s[p]=!1,l[p]=v[h].showspikes}}r._previousVal=l}return s}function QD(t,e){var r=T_(t,e);Kr.call("_guiRelayout",t,r)}bt.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:gt.zoom_plus,click:Eh};bt.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:gt.zoom_minus,click:Eh};bt.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return pt(t,"Reset")},attr:"reset",val:null,icon:gt.autoscale,click:Eh};bt.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:gt.tooltip_basic,gravity:"ne",click:Rh};function Eh(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o=n._subplots.geo||[],l=0;l<o.length;l++){var s=o[l],f=n[s];if(a==="zoom"){var c=f.projection.scale,v=i==="in"?2*c:.5*c;Kr.call("_guiRelayout",t,s+".projection.scale",v)}}a==="reset"&&xf(t,"geo")}bt.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:gt.tooltip_basic,gravity:"ne",click:Rh};bt.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:gt.tooltip_basic,gravity:"ne",click:Rh};function k_(t){var e=t._fullLayout;return e.hovermode?!1:e._has("cartesian")?e._isHoriz?"y":"x":"closest"}function Rh(t){var e=k_(t);Kr.call("_guiRelayout",t,"hovermode",e)}bt.resetViewSankey={name:"resetSankeyGroup",title:function(t){return pt(t,"Reset view")},icon:gt.home,click:function(t){for(var e={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<t._fullData.length;r++){var a=t._fullData[r]._viewInitial;e["node.groups"].push(a.node.groups.slice()),e["node.x"].push(a.node.x.slice()),e["node.y"].push(a.node.y.slice())}Kr.call("restyle",t,e)}};bt.toggleHover={name:"toggleHover",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:gt.tooltip_basic,gravity:"ne",click:function(t,e){var r=T_(t,e);r.hovermode=k_(t),Kr.call("_guiRelayout",t,r)}};bt.resetViews={name:"resetViews",title:function(t){return pt(t,"Reset views")},icon:gt.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),gr(t,e),r.setAttribute("data-attr","resetLastSave"),$h(t,e),xf(t,"geo"),xf(t,"mapbox")}};bt.toggleSpikelines={name:"toggleSpikelines",title:function(t){return pt(t,"Toggle Spike Lines")},icon:gt.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled=r==="on"?"off":"on",Kr.call("_guiRelayout",t,JD(t))}};function JD(t){for(var e=t._fullLayout,r=e._cartesianSpikesEnabled==="on",a=w_.list(t,null,!0),i={},n=0;n<a.length;n++){var o=a[n];i[o._name+".showspikes"]=r?!0:o._showSpikeInitial}return i}bt.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return pt(t,"Reset view")},attr:"reset",icon:gt.home,click:function(t){xf(t,"mapbox")}};bt.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:gt.zoom_plus,click:A_};bt.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:gt.zoom_minus,click:A_};function A_(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-val"),i=t._fullLayout,n=i._subplots.mapbox||[],o=1.05,l={},s=0;s<n.length;s++){var f=n[s],c=i[f].zoom,v=a==="in"?o*c:c/o;l[f+".zoom"]=v}Kr.call("_guiRelayout",t,l)}function xf(t,e){for(var r=t._fullLayout,a=r._subplots[e]||[],i={},n=0;n<a.length;n++)for(var o=a[n],l=r[o]._subplot,s=l.viewInitial,f=Object.keys(s),c=0;c<f.length;c++){var v=f[c];i[o+"."+v]=s[v]}Kr.call("_guiRelayout",t,i)}var M_=wh.exports,e5=Object.keys(M_),S_=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],L_=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(S_),Bn=[],t5=function(t){if(L_.indexOf(t._cat||t.name)===-1){var e=t.name,r=(t._cat||t.name).toLowerCase();Bn.indexOf(e)===-1&&Bn.push(e),Bn.indexOf(r)===-1&&Bn.push(r)}};e5.forEach(function(t){t5(M_[t])});Bn.sort();var C_={DRAW_MODES:S_,backButtons:L_,foreButtons:Bn},vy=C_,D_={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.","This may include *"+vy.backButtons.join("*, *")+"*."].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.","This may include *"+vy.foreButtons.join("*, *")+"*."].join(" ")}},r5=de.exports,Ro=Je.exports,a5=Mt,i5=D_,n5=function(e,r){var a=e.modebar||{},i=a5.newContainer(r,"modebar");function n(l,s){return r5.coerce(a,i,i5,l,s)}n("orientation"),n("bgcolor",Ro.addOpacity(r.paper_bgcolor,.5));var o=Ro.contrast(Ro.rgb(r.modebar.bgcolor));n("color",Ro.addOpacity(o,.3)),n("activecolor",Ro.addOpacity(o,.7)),n("uirevision",r.uirevision),n("add"),n("remove")},Ph=tt.exports,o5=lt,Ha=de.exports,$_=Th,l5=jf.version,s5=new DOMParser;function E_(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var $a=E_.prototype;$a.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,a=this.graphInfo._fullLayout,i="modebar-"+a._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",e=e.reverse());var n=a.modebar,o=r.displayModeBar==="hover"?".js-plotly-plot .plotly:hover ":"";Ha.deleteRelatedStyleRule(i),Ha.addRelatedStyleRule(i,o+"#"+i+" .modebar-group","background-color: "+n.bgcolor),Ha.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+n.color),Ha.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+n.activecolor),Ha.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+n.activecolor);var l=!this.hasButtons(e),s=this.hasLogo!==r.displaylogo,f=this.locale!==r.locale;if(this.locale=r.locale,(l||s||f)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton()};$a.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var a=e.createGroup();r.forEach(function(i){var n=i.name;if(!n)throw new Error("must provide button 'name' in button config");if(e.buttonsNames.indexOf(n)!==-1)throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var o=e.createButton(i);e.buttonElements.push(o),a.appendChild(o)}),e.element.appendChild(a)})};$a.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t};$a.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var a=t.title;a===void 0?a=t.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&r.setAttribute("data-title",a),t.attr!==void 0&&r.setAttribute("data-attr",t.attr);var i=t.val;i!==void 0&&(typeof i=="function"&&(i=i(this.graphInfo)),r.setAttribute("data-val",i));var n=t.click;if(typeof n!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(l){t.click(e.graphInfo,l),e.updateActiveButton(l.currentTarget)}),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&Ph.select(r).classed("active",!0);var o=t.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||$_.question)),r.setAttribute("data-gravity",t.gravity||"n"),r};$a.createIcon=function(t){var e=o5(t.height)?Number(t.height):t.ascent-t.descent,r="http://www.w3.org/2000/svg",a;if(t.path){a=document.createElementNS(r,"svg"),a.setAttribute("viewBox",[0,0,t.width,e].join(" ")),a.setAttribute("class","icon");var i=document.createElementNS(r,"path");i.setAttribute("d",t.path),t.transform?i.setAttribute("transform",t.transform):t.ascent!==void 0&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),a.appendChild(i)}if(t.svg){var n=s5.parseFromString(t.svg,"application/xml");a=n.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};$a.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=t!==void 0?t.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var i=a.getAttribute("data-val")||!0,n=a.getAttribute("data-attr"),o=a.getAttribute("data-toggle")==="true",l=Ph.select(a);if(o)n===r&&l.classed("active",!l.classed("active"));else{var s=n===null?n:Ha.nestedProperty(e,n).get();l.classed("active",s===i)}})};$a.hasButtons=function(t){var e=this.buttons;if(!e||t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var a=0;a<t[r].length;a++)if(t[r][a].name!==e[r][a].name)return!1}return!0};function f5(t){return t+" (v"+l5+")"}$a.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",f5(Ha._(this.graphInfo,"Produced with Plotly.js"))),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon($_.newplotlylogo)),t.appendChild(e),t};$a.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};$a.destroy=function(){Ha.removeElement(this.container.querySelector(".modebar")),Ha.deleteRelatedStyleRule(this._uid)};function c5(t,e){var r=t._fullLayout,a=new E_({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&Ph.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}var u5=c5,v5=Vt,dy=mr,nd=Ve,d5=Zr.isUnifiedHover,h5=u5,_f=wh.exports,p5=C_.DRAW_MODES,m5=function(e){var r=e._fullLayout,a=e._context,i=r._modeBar;if(!a.displayModeBar&&!a.watermark){i&&(i.destroy(),delete r._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var n=a.modeBarButtons,o;Array.isArray(n)&&n.length?o=w5(n):!a.displayModeBar&&a.watermark?o=[]:o=y5(e),i?i.update(e,o):r._modeBar=h5(e,o)};function y5(t){var e=t._fullLayout,r=t._fullData,a=t._context;function i(L,D){if(typeof D=="string"){if(D.toLowerCase()===L.toLowerCase())return!0}else{var z=D.name,F=D._cat||D.name;if(z===L||F===L.toLowerCase())return!0}return!1}var n=e.modebar.add;typeof n=="string"&&(n=[n]);var o=e.modebar.remove;typeof o=="string"&&(o=[o]);var l=a.modeBarButtonsToAdd.concat(n.filter(function(L){for(var D=0;D<a.modeBarButtonsToRemove.length;D++)if(i(L,a.modeBarButtonsToRemove[D]))return!1;return!0})),s=a.modeBarButtonsToRemove.concat(o.filter(function(L){for(var D=0;D<a.modeBarButtonsToAdd.length;D++)if(i(L,a.modeBarButtonsToAdd[D]))return!1;return!0})),f=e._has("cartesian"),c=e._has("gl3d"),v=e._has("geo"),u=e._has("pie"),d=e._has("funnelarea"),h=e._has("gl2d"),p=e._has("ternary"),g=e._has("mapbox"),_=e._has("polar"),b=e._has("smith"),w=e._has("sankey"),m=g5(e),y=d5(e.hovermode),x=[];function T(L){if(!!L.length){for(var D=[],z=0;z<L.length;z++){for(var F=L[z],H=_f[F],U=H.name.toLowerCase(),B=(H._cat||H.name).toLowerCase(),X=!1,O=0;O<s.length;O++){var Y=s[O].toLowerCase();if(Y===U||Y===B){X=!0;break}}X||D.push(_f[F])}x.push(D)}}var k=["toImage"];a.showEditInChartStudio?k.push("editInChartStudio"):a.showSendToCloud&&k.push("sendDataToCloud"),T(k);var S=[],A=[],$=[],M=[];(f||h||u||d||p)+v+c+g+_+b>1?(A=["toggleHover"],$=["resetViews"]):v?(S=["zoomInGeo","zoomOutGeo"],A=["hoverClosestGeo"],$=["resetGeo"]):c?(A=["hoverClosest3d"],$=["resetCameraDefault3d","resetCameraLastSave3d"]):g?(S=["zoomInMapbox","zoomOutMapbox"],A=["toggleHover"],$=["resetViewMapbox"]):h?A=["hoverClosestGl2d"]:u?A=["hoverClosestPie"]:w?(A=["hoverClosestCartesian","hoverCompareCartesian"],$=["resetViewSankey"]):A=["toggleHover"],f&&(A=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(x5(r)||y)&&(A=[]),(f||h)&&!m&&(S=["zoomIn2d","zoomOut2d","autoScale2d"],$[0]!=="resetViews"&&($=["resetScale2d"])),c?M=["zoom3d","pan3d","orbitRotation","tableRotation"]:(f||h)&&!m||p?M=["zoom2d","pan2d"]:g||v?M=["pan2d"]:_&&(M=["zoom2d"]),b5(r)&&M.push("select2d","lasso2d");var C=[],E=function(L){C.indexOf(L)===-1&&A.indexOf(L)!==-1&&C.push(L)};if(Array.isArray(l)){for(var I=[],P=0;P<l.length;P++){var R=l[P];typeof R=="string"?(R=R.toLowerCase(),p5.indexOf(R)!==-1?(e._has("mapbox")||e._has("cartesian"))&&M.push(R):R==="togglespikelines"?E("toggleSpikelines"):R==="togglehover"?E("toggleHover"):R==="hovercompare"?E("hoverCompareCartesian"):R==="hoverclosest"?(E("hoverClosestCartesian"),E("hoverClosestGeo"),E("hoverClosest3d"),E("hoverClosestGl2d"),E("hoverClosestPie")):R==="v1hovermode"&&(E("toggleHover"),E("hoverClosestCartesian"),E("hoverCompareCartesian"),E("hoverClosestGeo"),E("hoverClosest3d"),E("hoverClosestGl2d"),E("hoverClosestPie"))):I.push(R)}l=I}return T(M),T(S.concat($)),T(C),_5(x,l)}function g5(t){for(var e=v5.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}function b5(t){for(var e=!1,r=0;r<t.length&&!e;r++){var a=t[r];!a._module||!a._module.selectPoints||(nd.traceIs(a,"scatter-like")?(dy.hasMarkers(a)||dy.hasText(a))&&(e=!0):nd.traceIs(a,"box-violin")?(a.boxpoints==="all"||a.points==="all")&&(e=!0):e=!0)}return e}function x5(t){for(var e=0;e<t.length;e++)if(!nd.traceIs(t[e],"noHover"))return!1;return!0}function _5(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}function w5(t){for(var e=0;e<t.length;e++)for(var r=t[e],a=0;a<r.length;a++){var i=r[a];if(typeof i=="string")if(_f[i]!==void 0)t[e][a]=_f[i];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return t}var R_={moduleType:"component",name:"modebar",layoutAttributes:D_,supplyLayoutDefaults:n5,manage:m5},Xa={},T5=Lr.FROM_BL,P_=function(e,r,a){a===void 0&&(a=T5[e.constraintoward||"center"]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],n=i[0]+(i[1]-i[0])*a;e.range=e._input.range=[e.l2r(n+(i[0]-n)*r),e.l2r(n+(i[1]-n)*r)],e.setScale()},Ni=de.exports,hu=Il,aa=Vt.id2name,k5=Ua,hy=P_,A5=oh,M5=Ot.ALMOST_EQUAL,S5=Lr.FROM_BL;Xa.handleDefaults=function(t,e,r){var a=r.axIds,i=r.axHasImage,n=e._axisConstraintGroups=[],o=e._axisMatchGroups=[],l,s,f,c,v,u,d,h;for(l=0;l<a.length;l++)c=aa(a[l]),v=t[c],u=e[c],L5(v,u,{axIds:a,layoutOut:e,hasImage:i[c]});function p(k,S){for(l=0;l<k.length;l++){s=k[l];for(f in s)e[aa(f)][S]=s}}for(p(o,"_matchGroup"),l=0;l<n.length;l++){s=n[l];for(f in s)if(u=e[aa(f)],u.fixedrange){for(var g in s){var _=aa(g);(t[_]||{}).fixedrange===!1&&Ni.warn("fixedrange was specified as false for axis "+_+" but was overridden because another axis in its constraint group has fixedrange true"),e[_].fixedrange=!0}break}}for(l=0;l<n.length;){s=n[l];for(f in s){u=e[aa(f)],u._matchGroup&&Object.keys(u._matchGroup).length===Object.keys(s).length&&(n.splice(l,1),l--);break}l++}p(n,"_constraintGroup");var b=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],w=!1,m=!1;function y(){h=u[d],d==="rangebreaks"&&(m=u._hasDayOfWeekBreaks)}for(l=0;l<o.length;l++){s=o[l];for(var x=0;x<b.length;x++){d=b[x],h=null;var T;for(f in s)if(c=aa(f),v=t[c],u=e[c],d in u){if(!u.matches&&(T=u,d in v)){y();break}h===null&&d in v&&y()}if(d==="range"&&h&&(w=!0),d==="autorange"&&h===null&&w&&(h=!1),h===null&&d in T&&(h=T[d]),h!==null)for(f in s)u=e[aa(f)],u[d]=d==="range"?h.slice():h,d==="rangebreaks"&&(u._hasDayOfWeekBreaks=m,A5(u,e))}}};function L5(t,e,r){var a=r.axIds,i=r.layoutOut,n=r.hasImage,o=i._axisConstraintGroups,l=i._axisMatchGroups,s=e._id,f=s.charAt(0),c=((i._splomAxes||{})[f]||{})[s]||{},v=e._id,u=v.charAt(0)==="x";e._matchGroup=null,e._constraintGroup=null;function d(M,C){return Ni.coerce(t,e,k5,M,C)}d("constrain",n?"domain":"range"),Ni.coerce(t,e,{constraintoward:{valType:"enumerated",values:u?["left","center","right"]:["bottom","middle","top"],dflt:u?"center":"middle"}},"constraintoward");var h=e.type,p,g,_=[];for(p=0;p<a.length;p++)if(g=a[p],g!==v){var b=i[aa(g)];b.type===h&&_.push(g)}var w=z_(o,v);if(w){var m=[];for(p=0;p<_.length;p++)g=_[p],w[g]||m.push(g);_=m}var y=_.length,x,T;y&&(t.matches||c.matches)&&(x=Ni.coerce(t,e,{matches:{valType:"enumerated",values:_,dflt:_.indexOf(c.matches)!==-1?c.matches:void 0}},"matches"));var k=n&&!u?e.anchor:void 0;if(y&&!x&&(t.scaleanchor||k)&&(T=Ni.coerce(t,e,{scaleanchor:{valType:"enumerated",values:_}},"scaleanchor",k)),x){e._matchGroup=pu(l,v,x,1);var S=i[aa(x)],A=py(i,e)/py(i,S);u!==(x.charAt(0)==="x")&&(A=(u?"x":"y")+A),pu(o,v,x,A)}else t.matches&&a.indexOf(t.matches)!==-1&&Ni.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(T){var $=d("scaleratio");$||($=e.scaleratio=1),pu(o,v,T,$)}else t.scaleanchor&&a.indexOf(t.scaleanchor)!==-1&&Ni.warn("ignored "+e._name+'.scaleanchor: "'+t.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function py(t,e){var r=e.domain;return r||(r=t[aa(e.overlaying)].domain),r[1]-r[0]}function z_(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function pu(t,e,r,a){var i,n,o,l,s,f=z_(t,e);f===null?(f={},f[e]=1,s=t.length,t.push(f)):s=t.indexOf(f);var c=Object.keys(f);for(i=0;i<t.length;i++)if(o=t[i],i!==s&&o[r]){var v=o[r];for(n=0;n<c.length;n++)l=c[n],o[l]=mu(v,mu(a,f[l]));t.splice(s,1);return}if(a!==1)for(n=0;n<c.length;n++){var u=c[n];f[u]=mu(a,f[u])}f[r]=1}function mu(t,e){var r="",a="",i,n;typeof t=="string"&&(r=t.match(/^[xy]*/)[0],i=r.length,t=+t.substr(i)),typeof e=="string"&&(a=e.match(/^[xy]*/)[0],n=a.length,e=+e.substr(n));var o=t*e;return!i&&!n?o:!i||!n||r.charAt(0)===a.charAt(0)?r+a+t*e:i===n?o:(i>n?r.substr(n):a.substr(i))+o}function C5(t,e){for(var r=e._size,a=r.h/r.w,i={},n=Object.keys(t),o=0;o<n.length;o++){var l=n[o],s=t[l];if(typeof s=="string"){var f=s.match(/^[xy]*/)[0],c=f.length;s=+s.substr(c);for(var v=f.charAt(0)==="y"?a:1/a,u=0;u<c;u++)s*=v}i[l]=s}return i}Xa.enforce=function(e){var r=e._fullLayout,a=r._axisConstraintGroups||[],i,n,o,l,s,f,c,v;for(i=0;i<a.length;i++){o=C5(a[i],r);var u=Object.keys(o),d=1/0,h=0,p=1/0,g={},_={},b=!1;for(n=0;n<u.length;n++)l=u[n],_[l]=s=r[aa(l)],s._inputDomain?s.domain=s._inputDomain.slice():s._inputDomain=s.domain.slice(),s._inputRange||(s._inputRange=s.range.slice()),s.setScale(),g[l]=f=Math.abs(s._m)/o[l],d=Math.min(d,f),(s.constrain==="domain"||!s._constraintShrinkable)&&(p=Math.min(p,f)),delete s._constraintShrinkable,h=Math.max(h,f),s.constrain==="domain"&&(b=!0);if(!(d>M5*h&&!b)){for(n=0;n<u.length;n++)if(l=u[n],f=g[l],s=_[l],c=s.constrain,f!==p||c==="domain")if(v=f/p,c==="range")hy(s,v);else{var w=s._inputDomain,m=(s.domain[1]-s.domain[0])/(w[1]-w[0]),y=(s.r2l(s.range[1])-s.r2l(s.range[0]))/(s.r2l(s._inputRange[1])-s.r2l(s._inputRange[0]));if(v/=m,v*y<1){s.domain=s._input.domain=w.slice(),hy(s,v);continue}if(y<1&&(s.range=s._input.range=s._inputRange.slice(),v*=y),s.autorange){var x=s.r2l(s.range[0]),T=s.r2l(s.range[1]),k=(x+T)/2,S=k,A=k,$=Math.abs(T-k),M=k-$*v*1.0001,C=k+$*v*1.0001,E=hu.makePadFn(r,s,0),I=hu.makePadFn(r,s,1);my(s,v);var P=Math.abs(s._m),R=hu.concatExtremes(e,s),L=R.min,D=R.max,z,F;for(F=0;F<L.length;F++)z=L[F].val-E(L[F])/P,z>M&&z<S&&(S=z);for(F=0;F<D.length;F++)z=D[F].val+I(D[F])/P,z<C&&z>A&&(A=z);var H=(A-S)/(2*$);v/=H,S=s.l2r(S),A=s.l2r(A),s.range=s._input.range=x<T?[S,A]:[A,S]}my(s,v)}}}};Xa.getAxisGroup=function(e,r){for(var a=e._axisMatchGroups,i=0;i<a.length;i++){var n=a[i];if(n[r])return"g"+i}return r};Xa.clean=function(e,r){if(r._inputDomain){for(var a=!1,i=r._id,n=e._fullLayout._axisConstraintGroups,o=0;o<n.length;o++)if(n[o][i]){a=!0;break}(!a||r.constrain!=="domain")&&(r._input.domain=r.domain=r._inputDomain,delete r._inputDomain)}};function my(t,e){var r=t._inputDomain,a=S5[t.constraintoward],i=r[0]+(r[1]-r[0])*a;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e],t.setScale()}(function(t){var e=tt.exports,r=Ve,a=Ut.exports,i=de.exports,n=_h,o=Je.exports,l=Tt.exports,s=rc,f=R_,c=Ct.exports,v=Lr,u=Xa,d=u.enforce,h=u.clean,p=Il.doAutoRange,g="start",_="middle",b="end";t.layoutStyles=function(M){return i.syncOrAsync([a.doAutoMargin,m],M)};function w(M,C,E){for(var I=0;I<E.length;I++){var P=E[I][0],R=E[I][1];if(!(P[0]>=M[1]||P[1]<=M[0])&&R[0]<C[1]&&R[1]>C[0])return!0}return!1}function m(M){var C=M._fullLayout,E=C._size,I=E.p,P=c.list(M,"",!0),R,L,D,z,F,H;if(C._paperdiv.style({width:M._context.responsive&&C.autosize&&!M._context._hasZeroWidth&&!M.layout.width?"100%":C.width+"px",height:M._context.responsive&&C.autosize&&!M._context._hasZeroHeight&&!M.layout.height?"100%":C.height+"px"}).selectAll(".main-svg").call(l.setSize,C.width,C.height),M._context.setBackground(M,C.paper_bgcolor),t.drawMainTitle(M),f.manage(M),!C._has("cartesian"))return a.previousPromises(M);function U(Oe,Fe,st){var Xe=Oe._lw/2;if(Oe._id.charAt(0)==="x"){if(Fe){if(st==="top")return Fe._offset-I-Xe}else return E.t+E.h*(1-(Oe.position||0))+Xe%1;return Fe._offset+Fe._length+I+Xe}if(Fe){if(st==="right")return Fe._offset+Fe._length+I+Xe}else return E.l+E.w*(Oe.position||0)+Xe%1;return Fe._offset-I-Xe}for(R=0;R<P.length;R++){z=P[R];var B=z._anchorAxis;z._linepositions={},z._lw=l.crispRound(M,z.linewidth,1),z._mainLinePosition=U(z,B,z.side),z._mainMirrorPosition=z.mirror&&B?U(z,B,v.OPPOSITE_SIDE[z.side]):null}var X=[],O=[],Y=[],W=o.opacity(C.paper_bgcolor)===1&&o.opacity(C.plot_bgcolor)===1&&C.paper_bgcolor===C.plot_bgcolor;for(L in C._plots)if(D=C._plots[L],D.mainplot)D.bg&&D.bg.remove(),D.bg=void 0;else{var K=D.xaxis.domain,Z=D.yaxis.domain,ae=D.plotgroup;if(w(K,Z,Y)){var ne=ae.node(),oe=D.bg=i.ensureSingle(ae,"rect","bg");ne.insertBefore(oe.node(),ne.childNodes[0]),O.push(L)}else ae.select("rect.bg").remove(),Y.push([K,Z]),W||(X.push(L),O.push(L))}var re=C._bgLayer.selectAll(".bg").data(X);for(re.enter().append("rect").classed("bg",!0),re.exit().remove(),re.each(function(Oe){C._plots[Oe].bg=e.select(this)}),R=0;R<O.length;R++)D=C._plots[O[R]],F=D.xaxis,H=D.yaxis,D.bg&&F._offset!==void 0&&H._offset!==void 0&&D.bg.call(l.setRect,F._offset-I,H._offset-I,F._length+2*I,H._length+2*I).call(o.fill,C.plot_bgcolor).style("stroke-width",0);if(!C._hasOnlyLargeSploms)for(L in C._plots){D=C._plots[L],F=D.xaxis,H=D.yaxis;var se=D.clipId="clip"+C._uid+L+"plot",me=i.ensureSingleById(C._clips,"clipPath",se,function(Oe){Oe.classed("plotclip",!0).append("rect")});D.clipRect=me.select("rect").attr({width:F._length,height:H._length}),l.setTranslate(D.plot,F._offset,H._offset);var Re,ke;D._hasClipOnAxisFalse?(Re=null,ke=se):(Re=se,ke=null),l.setClipUrl(D.plot,Re,M),D.layerClipId=ke}var ze,he,te,ue,Le,we,Pe,Ee,Ce,q,pe,ve,ye;function le(Oe){return"M"+ze+","+Oe+"H"+he}function fe(Oe){return"M"+F._offset+","+Oe+"h"+F._length}function Te(Oe){return"M"+Oe+","+Ee+"V"+Pe}function xe(Oe){return"M"+Oe+","+H._offset+"v"+H._length}function be(Oe,Fe,st){if(!Oe.showline||L!==Oe._mainSubplot)return"";if(!Oe._anchorAxis)return st(Oe._mainLinePosition);var Xe=Fe(Oe._mainLinePosition);return Oe.mirror&&(Xe+=Fe(Oe._mainMirrorPosition)),Xe}for(L in C._plots){D=C._plots[L],F=D.xaxis,H=D.yaxis;var Ae="M0,0";y(F,L)&&(Le=T(F,"left",H,P),ze=F._offset-(Le?I+Le:0),we=T(F,"right",H,P),he=F._offset+F._length+(we?I+we:0),te=U(F,H,"bottom"),ue=U(F,H,"top"),ye=!F._anchorAxis||L!==F._mainSubplot,ye&&(F.mirror==="allticks"||F.mirror==="all")&&(F._linepositions[L]=[te,ue]),Ae=be(F,le,fe),ye&&F.showline&&(F.mirror==="all"||F.mirror==="allticks")&&(Ae+=le(te)+le(ue)),D.xlines.style("stroke-width",F._lw+"px").call(o.stroke,F.showline?F.linecolor:"rgba(0,0,0,0)")),D.xlines.attr("d",Ae);var De="M0,0";y(H,L)&&(pe=T(H,"bottom",F,P),Pe=H._offset+H._length+(pe?I:0),ve=T(H,"top",F,P),Ee=H._offset-(ve?I:0),Ce=U(H,F,"left"),q=U(H,F,"right"),ye=!H._anchorAxis||L!==H._mainSubplot,ye&&(H.mirror==="allticks"||H.mirror==="all")&&(H._linepositions[L]=[Ce,q]),De=be(H,Te,xe),ye&&H.showline&&(H.mirror==="all"||H.mirror==="allticks")&&(De+=Te(Ce)+Te(q)),D.ylines.style("stroke-width",H._lw+"px").call(o.stroke,H.showline?H.linecolor:"rgba(0,0,0,0)")),D.ylines.attr("d",De)}return c.makeClipPaths(M),a.previousPromises(M)}function y(M,C){return(M.ticks||M.showline)&&(C===M._mainSubplot||M.mirror==="all"||M.mirror==="allticks")}function x(M,C,E){if(!E.showline||!E._lw)return!1;if(E.mirror==="all"||E.mirror==="allticks")return!0;var I=E._anchorAxis;if(!I)return!1;var P=v.FROM_BL[C];return E.side===C?I.domain[P]===M.domain[P]:E.mirror&&I.domain[1-P]===M.domain[1-P]}function T(M,C,E,I){if(x(M,C,E))return E._lw;for(var P=0;P<I.length;P++){var R=I[P];if(R._mainAxis===E._mainAxis&&x(M,C,R))return R._lw}return 0}t.drawMainTitle=function(M){var C=M._fullLayout,E=A(C),I=$(C);s.draw(M,"gtitle",{propContainer:C,propName:"title.text",placeholder:C._dfltTitle.plot,attributes:{x:k(C,E),y:S(C,I),"text-anchor":E,dy:I}})};function k(M,C){var E=M.title,I=M._size,P=0;switch(C===g?P=E.pad.l:C===b&&(P=-E.pad.r),E.xref){case"paper":return I.l+I.w*E.x+P;case"container":default:return M.width*E.x+P}}function S(M,C){var E=M.title,I=M._size,P=0;if(C==="0em"||!C?P=-E.pad.b:C===v.CAP_SHIFT+"em"&&(P=E.pad.t),E.y==="auto")return I.t/2;switch(E.yref){case"paper":return I.t+I.h-I.h*E.y+P;case"container":default:return M.height-M.height*E.y+P}}function A(M){var C=M.title,E=_;return i.isRightAnchor(C)?E=b:i.isLeftAnchor(C)&&(E=g),E}function $(M){var C=M.title,E="0em";return i.isTopAnchor(C)?E=v.CAP_SHIFT+"em":i.isMiddleAnchor(C)&&(E=v.MID_SHIFT+"em"),E}t.doTraceStyle=function(M){var C=M.calcdata,E=[],I;for(I=0;I<C.length;I++){var P=C[I],R=P[0]||{},L=R.trace||{},D=L._module||{},z=D.arraysToCalcdata;z&&z(P,L);var F=D.editStyle;F&&E.push({fn:F,cd0:R})}if(E.length){for(I=0;I<E.length;I++){var H=E[I];H.fn(M,H.cd0)}n(M),t.redrawReglTraces(M)}return a.style(M),r.getComponentMethod("legend","draw")(M),a.previousPromises(M)},t.doColorBars=function(M){return r.getComponentMethod("colorbar","draw")(M),a.previousPromises(M)},t.layoutReplot=function(M){var C=M.layout;return M.layout=void 0,r.call("_doPlot",M,"",C)},t.doLegend=function(M){return r.getComponentMethod("legend","draw")(M),a.previousPromises(M)},t.doTicksRelayout=function(M){return c.draw(M,"redraw"),M._fullLayout._hasOnlyLargeSploms&&(r.subplotsRegistry.splom.updateGrid(M),n(M),t.redrawReglTraces(M)),t.drawMainTitle(M),a.previousPromises(M)},t.doModeBar=function(M){var C=M._fullLayout;f.manage(M);for(var E=0;E<C._basePlotModules.length;E++){var I=C._basePlotModules[E].updateFx;I&&I(M)}return a.previousPromises(M)},t.doCamera=function(M){for(var C=M._fullLayout,E=C._subplots.gl3d,I=0;I<E.length;I++){var P=C[E[I]],R=P._scene;R.setViewport(P)}},t.drawData=function(M){var C=M._fullLayout;n(M);for(var E=C._basePlotModules,I=0;I<E.length;I++)E[I].plot(M);return t.redrawReglTraces(M),a.style(M),r.getComponentMethod("shapes","draw")(M),r.getComponentMethod("annotations","draw")(M),r.getComponentMethod("images","draw")(M),C._replotting=!1,a.previousPromises(M)},t.redrawReglTraces=function(M){var C=M._fullLayout;if(C._has("regl")){var E=M._fullData,I=[],P=[],R,L;for(C._hasOnlyLargeSploms&&C._splomGrid.draw(),R=0;R<E.length;R++){var D=E[R];D.visible===!0&&D._length!==0&&(D.type==="splom"?C._splomScenes[D.uid].draw():D.type==="scattergl"?i.pushUnique(I,D.xaxis+D.yaxis):D.type==="scatterpolargl"&&i.pushUnique(P,D.subplot))}for(R=0;R<I.length;R++)L=C._plots[I[R]],L._scene&&L._scene.draw();for(R=0;R<P.length;R++)L=C[P[R]]._subplot,L._scene&&L._scene.draw()}},t.doAutoRangeAndConstraints=function(M){for(var C=c.list(M,"",!0),E,I={},P=0;P<C.length;P++)if(E=C[P],!I[E._id]){I[E._id]=1,h(M,E),p(M,E);var R=E._matchGroup;if(R)for(var L in R){var D=c.getFromId(M,L);p(M,D,E.range),I[L]=1}}d(M)},t.finalDraw=function(M){r.getComponentMethod("rangeslider","draw")(M),r.getComponentMethod("rangeselector","draw")(M)},t.drawMarginPushers=function(M){r.getComponentMethod("legend","draw")(M),r.getComponentMethod("rangeselector","draw")(M),r.getComponentMethod("sliders","draw")(M),r.getComponentMethod("updatemenus","draw")(M),r.getComponentMethod("colorbar","draw")(M)}})(sc);var zh={exports:{}},yu=Xf.dot,bs=Ot.BADNUM,wf=zh.exports={};wf.tester=function(e){var r=e.slice(),a=r[0][0],i=a,n=r[0][1],o=n,l;for(r.push(r[0]),l=1;l<r.length;l++)a=Math.min(a,r[l][0]),i=Math.max(i,r[l][0]),n=Math.min(n,r[l][1]),o=Math.max(o,r[l][1]);var s=!1,f;r.length===5&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(s=!0,f=function(h){return h[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(s=!0,f=function(h){return h[1]===r[0][1]}));function c(h,p){var g=h[0],_=h[1];return!(g===bs||g<a||g>i||_===bs||_<n||_>o||p&&f(h))}function v(h,p){var g=h[0],_=h[1];if(g===bs||g<a||g>i||_===bs||_<n||_>o)return!1;var b=r.length,w=r[0][0],m=r[0][1],y=0,x,T,k,S,A;for(x=1;x<b;x++)if(T=w,k=m,w=r[x][0],m=r[x][1],S=Math.min(T,w),!(g<S||g>Math.max(T,w)||_>Math.max(k,m)))if(_<Math.min(k,m))g!==S&&y++;else{if(w===T?A=_:A=k+(g-T)*(m-k)/(w-T),_===A)return!(x===1&&p);_<=A&&g!==S&&y++}return y%2===1}var u=!0,d=r[0];for(l=1;l<r.length;l++)if(d[0]!==r[l][0]||d[1]!==r[l][1]){u=!1;break}return{xmin:a,xmax:i,ymin:n,ymax:o,pts:r,contains:s?c:v,isRect:s,degenerate:u}};wf.isSegmentBent=function(e,r,a,i){var n=e[r],o=[e[a][0]-n[0],e[a][1]-n[1]],l=yu(o,o),s=Math.sqrt(l),f=[-o[1]/s,o[0]/s],c,v,u;for(c=r+1;c<a;c++)if(v=[e[c][0]-n[0],e[c][1]-n[1]],u=yu(v,o),u<0||u>l||Math.abs(yu(v,f))>i)return!0;return!1};wf.filter=function(e,r){var a=[e[0]],i=0,n=0;function o(s){e.push(s);var f=a.length,c=i;a.splice(n+1);for(var v=c+1;v<e.length;v++)(v===e.length-1||wf.isSegmentBent(e,c,v+1,r))&&(a.push(e[v]),a.length<f-2&&(i=v,n=a.length-1),c=v)}if(e.length>1){var l=e.pop();o(l)}return{addPt:o,raw:e,filtered:a}};var yy=dk,I_=Ve,D5=Tt.exports.dashStyle,gy=Je.exports,$5=ua,E5=Zr.makeEventData,Fl=go,R5=Fl.freeMode,P5=Fl.rectMode,Tf=Fl.drawMode,Ih=Fl.openMode,z5=Fl.selectMode,N_=p_,gu=Nl.handleEllipse,I5=h_,bu=de.exports,Nh=zh.exports,Po=Zf,by=Vt.getFromId,N5=_h,F5=sc.redrawReglTraces,Zs=pr,xa=Zs.MINSELECT,H5=Nh.filter,O5=Nh.tester,F_=Rl.clearSelect,Fh=Ah,xy=Fh.p2r,B5=Fh.axValue,j5=Fh.getTransform;function G5(t,e,r,a,i){var n=R5(i),o=P5(i),l=Ih(i),s=Tf(i),f=z5(i),c=i==="drawline",v=i==="drawcircle",u=c||v,d=a.gd,h=d._fullLayout,p=h._zoomlayer,g=a.element.getBoundingClientRect(),_=a.plotinfo,b=j5(_),w=e-g.left,m=r-g.top;h._calcInverseTransform(d);var y=bu.apply3DTransform(h._invTransform)(w,m);w=y[0],m=y[1];var x=h._invScaleX,T=h._invScaleY,k=w,S=m,A="M"+w+","+m,$=a.xaxes[0]._length,M=a.yaxes[0]._length,C=a.xaxes.concat(a.yaxes),E=t.altKey&&!(Tf(i)&&l),I,P,R,L,D,z,F;B_(t,d,a),n&&(I=H5([[w,m]],Zs.BENDPX));var H=p.selectAll("path.select-outline-"+_.id).data(s?[0]:[1,2]),U=h.newshape;H.enter().append("path").attr("class",function(Z){return"select-outline select-outline-"+Z+" select-outline-"+_.id}).style(s?{opacity:U.opacity/2,fill:l?void 0:U.fillcolor,stroke:U.line.color,"stroke-dasharray":D5(U.line.dash,U.line.width),"stroke-width":U.line.width+"px"}:{}).attr("fill-rule",U.fillrule).classed("cursor-move",!!s).attr("transform",b).attr("d",A+"Z");var B=p.append("path").attr("class","zoombox-corners").style({fill:gy.background,stroke:gy.defaultLine,"stroke-width":1}).attr("transform",b).attr("d","M0,0Z"),X=h._uid+Zs.SELECTID,O=[],Y=j_(d,a.xaxes,a.yaxes,a.subplot);function W(Z,ae){return Z-ae}var K;_.fillRangeItems?K=_.fillRangeItems:o?K=function(Z,ae){var ne=Z.range={};for(D=0;D<C.length;D++){var oe=C[D],re=oe._id.charAt(0);ne[oe._id]=[xy(oe,ae[re+"min"]),xy(oe,ae[re+"max"])].sort(W)}}:K=function(Z,ae,ne){var oe=Z.lassoPoints={};for(D=0;D<C.length;D++){var re=C[D];oe[re._id]=ne.filtered.map(B5(re))}},a.moveFn=function(Z,ae){k=Math.max(0,Math.min($,x*Z+w)),S=Math.max(0,Math.min(M,T*ae+m));var ne=Math.abs(k-w),oe=Math.abs(S-m);if(o){var re,se,me;if(f){var Re=h.selectdirection;switch(Re==="any"?oe<Math.min(ne*.6,xa)?re="h":ne<Math.min(oe*.6,xa)?re="v":re="d":re=Re,re){case"h":se=v?M/2:0,me=M;break;case"v":se=v?$/2:0,me=$;break}}if(s)switch(h.newshape.drawdirection){case"vertical":re="h",se=v?M/2:0,me=M;break;case"horizontal":re="v",se=v?$/2:0,me=$;break;case"ortho":ne<oe?(re="h",se=m,me=S):(re="v",se=w,me=k);break;default:re="d"}re==="h"?(L=u?gu(v,[k,se],[k,me]):[[w,se],[w,me],[k,me],[k,se]],L.xmin=u?k:Math.min(w,k),L.xmax=u?k:Math.max(w,k),L.ymin=Math.min(se,me),L.ymax=Math.max(se,me),B.attr("d","M"+L.xmin+","+(m-xa)+"h-4v"+2*xa+"h4ZM"+(L.xmax-1)+","+(m-xa)+"h4v"+2*xa+"h-4Z")):re==="v"?(L=u?gu(v,[se,S],[me,S]):[[se,m],[se,S],[me,S],[me,m]],L.xmin=Math.min(se,me),L.xmax=Math.max(se,me),L.ymin=u?S:Math.min(m,S),L.ymax=u?S:Math.max(m,S),B.attr("d","M"+(w-xa)+","+L.ymin+"v-4h"+2*xa+"v4ZM"+(w-xa)+","+(L.ymax-1)+"v4h"+2*xa+"v-4Z")):re==="d"&&(L=u?gu(v,[w,m],[k,S]):[[w,m],[w,S],[k,S],[k,m]],L.xmin=Math.min(w,k),L.xmax=Math.max(w,k),L.ymin=Math.min(m,S),L.ymax=Math.max(m,S),B.attr("d","M0,0Z"))}else n&&(I.addPt([k,S]),L=I.filtered);a.selectionDefs&&a.selectionDefs.length?(R=Z5(a.mergedPolygons,L,E),L.subtract=E,P=O_(a.selectionDefs.concat([L]))):(R=[L],P=O5(L)),N_(U_(R,l),H,a),f&&Po.throttle(X,Zs.SELECTDELAY,function(){O=[];var ke,ze;for(D=0;D<Y.length;D++)if(z=Y[D],ze=z._module.selectPoints(z,P),ke=G_(ze,z),O.length)for(var he=0;he<ke.length;he++)O.push(ke[he]);else O=ke;F={points:O},kf(d,Y,F),K(F,L,I),a.gd.emit("plotly_selecting",F)})},a.clickFn=function(Z,ae){if(B.remove(),d._fullLayout._activeShapeIndex>=0){d._fullLayout._deactivateShape(d);return}if(!s){var ne=h.clickmode;Po.done(X).then(function(){if(Po.clear(X),Z===2){for(H.remove(),D=0;D<Y.length;D++)z=Y[D],z._module.selectPoints(z,!1);kf(d,Y),yl(a),d.emit("plotly_deselect",null)}else ne.indexOf("select")>-1&&H_(ae,d,a.xaxes,a.yaxes,a.subplot,a,H),ne==="event"&&d.emit("plotly_selected",void 0);$5.click(d,ae)}).catch(bu.error)}},a.doneFn=function(){B.remove(),Po.done(X).then(function(){Po.clear(X),a.gd.emit("plotly_selected",F),L&&a.selectionDefs&&(L.subtract=E,a.selectionDefs.push(L),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,R)),a.doneFnCompleted&&a.doneFnCompleted(O)}).catch(bu.error),s&&yl(a)}}function H_(t,e,r,a,i,n,o){var l=e._hoverdata,s=e._fullLayout,f=s.clickmode,c=f.indexOf("event")>-1,v=[],u,d,h,p,g,_,b,w,m,y;if(q5(l)){B_(t,e,n),u=j_(e,r,a,i);var x=X5(l,u),T=x.pointNumbers.length>0;if(T?Y5(u,x):W5(u)&&(b=_y(x))){for(o&&o.remove(),y=0;y<u.length;y++)d=u[y],d._module.selectPoints(d,!1);kf(e,u),yl(n),c&&e.emit("plotly_deselect",null)}else{w=t.shiftKey&&(b!==void 0?b:_y(x)),h=U5(x.pointNumber,x.searchInfo,w);var k=n.selectionDefs.concat([h]);for(p=O_(k),y=0;y<u.length;y++)if(g=u[y]._module.selectPoints(u[y],p),_=G_(g,u[y]),v.length)for(var S=0;S<_.length;S++)v.push(_[S]);else v=_;if(m={points:v},kf(e,u,m),h&&n&&n.selectionDefs.push(h),o){var A=n.mergedPolygons,$=Ih(n.dragmode);N_(U_(A,$),o,n)}c&&e.emit("plotly_selected",m)}}}function U5(t,e,r){return{pointNumber:t,searchInfo:e,subtract:r}}function xu(t){return"pointNumber"in t&&"searchInfo"in t}function V5(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,a,i){var n=t.searchInfo.cd[0].trace._expandedIndex,o=i.cd[0].trace._expandedIndex;return o===n&&a===t.pointNumber},isRect:!1,degenerate:!1,subtract:t.subtract}}function O_(t){for(var e=[],r=xu(t[0])?0:t[0][0][0],a=r,i=xu(t[0])?0:t[0][0][1],n=i,o=0;o<t.length;o++)if(xu(t[o]))e.push(V5(t[o]));else{var l=Nh.tester(t[o]);l.subtract=t[o].subtract,e.push(l),r=Math.min(r,l.xmin),a=Math.max(a,l.xmax),i=Math.min(i,l.ymin),n=Math.max(n,l.ymax)}function s(f,c,v,u){for(var d=!1,h=0;h<e.length;h++)e[h].contains(f,c,v,u)&&(d=e[h].subtract===!1);return d}return{xmin:r,xmax:a,ymin:i,ymax:n,pts:[],contains:s,isRect:!1,degenerate:!1}}function B_(t,e,r){e._fullLayout._drawing=!1;var a=e._fullLayout,i=r.plotinfo,n=r.dragmode,o=a._lastSelectedSubplot&&a._lastSelectedSubplot===i.id,l=(t.shiftKey||t.altKey)&&!(Tf(n)&&Ih(n));o&&l&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!l||!i.selection)&&yl(r),o||(F_(e),a._lastSelectedSubplot=i.id)}function yl(t){var e=t.dragmode,r=t.plotinfo,a=t.gd;if(a._fullLayout._activeShapeIndex>=0&&a._fullLayout._deactivateShape(a),Tf(e)){var i=a._fullLayout,n=i._zoomlayer,o=n.selectAll(".select-outline-"+r.id);if(o&&a._fullLayout._drawing){var l=I5(o,t);l&&I_.call("_guiRelayout",a,{shapes:l}),a._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=t.selectionDefs=[],r.selection.mergedPolygons=t.mergedPolygons=[]}function j_(t,e,r,a){var i=[],n=e.map(function(d){return d._id}),o=r.map(function(d){return d._id}),l,s,f;for(f=0;f<t.calcdata.length;f++)if(l=t.calcdata[f],s=l[0].trace,!(s.visible!==!0||!s._module||!s._module.selectPoints))if(a&&(s.subplot===a||s.geo===a))i.push(u(s._module,l,e[0],r[0]));else if(s.type==="splom"&&s._xaxes[n[0]]&&s._yaxes[o[0]]){var c=u(s._module,l,e[0],r[0]);c.scene=t._fullLayout._splomScenes[s.uid],i.push(c)}else if(s.type==="sankey"){var v=u(s._module,l,e[0],r[0]);i.push(v)}else{if(n.indexOf(s.xaxis)===-1||o.indexOf(s.yaxis)===-1)continue;i.push(u(s._module,l,by(t,s.xaxis),by(t,s.yaxis)))}return i;function u(d,h,p,g){return{_module:d,cd:h,xaxis:p,yaxis:g}}}function q5(t){return t&&Array.isArray(t)&&t[0].hoverOnBox!==!0}function X5(t,e){var r=t[0],a=-1,i=[],n,o;for(o=0;o<e.length;o++)if(n=e[o],r.fullData._expandedIndex===n.cd[0].trace._expandedIndex){if(r.hoverOnBox===!0)break;r.pointNumber!==void 0?a=r.pointNumber:r.binNumber!==void 0&&(a=r.binNumber,i=r.pointNumbers);break}return{pointNumber:a,pointNumbers:i,searchInfo:n}}function _y(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,a=t.pointNumbers,i=a.length>0,n=i?a[0]:r;return e.selectedpoints?e.selectedpoints.indexOf(n)>-1:!1}function Y5(t,e){var r=[],a,i,n,o;for(o=0;o<t.length;o++)a=t[o],a.cd[0].trace.selectedpoints&&a.cd[0].trace.selectedpoints.length>0&&r.push(a);if(r.length===1&&(n=r[0]===e.searchInfo,n&&(i=e.searchInfo.cd[0].trace,i.selectedpoints.length===e.pointNumbers.length))){for(o=0;o<e.pointNumbers.length;o++)if(i.selectedpoints.indexOf(e.pointNumbers[o])<0)return!1;return!0}return!1}function W5(t){var e=0,r,a,i;for(i=0;i<t.length;i++)if(r=t[i],a=r.cd[0].trace,a.selectedpoints&&(a.selectedpoints.length>1||(e+=a.selectedpoints.length,e>1)))return!1;return e===1}function kf(t,e,r){var a,i,n,o;for(a=0;a<e.length;a++){var l=e[a].cd[0].trace._fullInput,s=t._fullLayout._tracePreGUI[l.uid]||{};s.selectedpoints===void 0&&(s.selectedpoints=l._input.selectedpoints||null)}if(r){var f=r.points||[];for(a=0;a<e.length;a++)o=e[a].cd[0].trace,o._input.selectedpoints=o._fullInput.selectedpoints=[],o._fullInput!==o&&(o.selectedpoints=[]);for(a=0;a<f.length;a++){var c=f[a],v=c.data,u=c.fullData;c.pointIndices?([].push.apply(v.selectedpoints,c.pointIndices),o._fullInput!==o&&[].push.apply(u.selectedpoints,c.pointIndices)):(v.selectedpoints.push(c.pointIndex),o._fullInput!==o&&u.selectedpoints.push(c.pointIndex))}}else for(a=0;a<e.length;a++)o=e[a].cd[0].trace,delete o.selectedpoints,delete o._input.selectedpoints,o._fullInput!==o&&delete o._fullInput.selectedpoints;var d=!1;for(a=0;a<e.length;a++){i=e[a],n=i.cd,o=n[0].trace,I_.traceIs(o,"regl")&&(d=!0);var h=i._module,p=h.styleOnSelect||h.style;p&&(p(t,n,n[0].node3),n[0].nodeRangePlot3&&p(t,n,n[0].nodeRangePlot3))}d&&(N5(t),F5(t))}function Z5(t,e,r){var a;return r?(a=yy.difference({regions:t,inverted:!1},{regions:[e],inverted:!1}),a.regions):(a=yy.union({regions:t,inverted:!1},{regions:[e],inverted:!1}),a.regions)}function G_(t,e){if(Array.isArray(t))for(var r=e.cd,a=e.cd[0].trace,i=0;i<t.length;i++)t[i]=E5(t[i],a,r);return t}function U_(t,e){for(var r=[],a=0;a<t.length;a++){r[a]=[];for(var i=0;i<t[a].length;i++){r[a][i]=[],r[a][i][0]=i?"L":"M";for(var n=0;n<t[a][i].length;n++)r[a][i].push(t[a][i][n])}e||r[a].push(["Z",r[a][0][1],r[a][0][2]])}return r}var dc={prepSelect:G5,clearSelect:F_,clearSelectionsCache:yl,selectOnClick:H_},Hh=tt.exports,Ur=de.exports,wy=Ur.numberFormat,K5=Wr.exports,Q5=ix,xs=Ve,V_=Ur.strTranslate,J5=ir,Ty=Je.exports,ri=Tt.exports,e3=ua,ky=Ct.exports,t3=xi,r3=ha.exports,q_=go,_s=q_.selectingOrDrawing,a3=q_.freeMode,i3=Lr.FROM_TL,n3=_h,o3=sc.redrawReglTraces,l3=Ut.exports,od=Vt.getFromId,s3=dc.prepSelect,f3=dc.clearSelect,c3=dc.selectOnClick,_u=P_,Oh=pr,Ay=Oh.MINDRAG,_r=Oh.MINZOOM,My=!0;function u3(t,e,r,a,i,n,o,l){var s=t._fullLayout._zoomlayer,f=o+l==="nsew",c=(o+l).length===1,v,u,d,h,p,g,_,b,w,m,y,x,T,k,S,A,$,M,C,E,I,P,R;function L(){if(v=e.xaxis,u=e.yaxis,w=v._length,m=u._length,_=v._offset,b=u._offset,d={},d[v._id]=v,h={},h[u._id]=u,o&&l)for(var le=e.overlays,fe=0;fe<le.length;fe++){var Te=le[fe].xaxis;d[Te._id]=Te;var xe=le[fe].yaxis;h[xe._id]=xe}p=Dy(d),g=Dy(h),T=Sy(p,l),k=Sy(g,o),S=!k&&!T,x=Cy(t,t._fullLayout._axisMatchGroups,d,h),y=Cy(t,t._fullLayout._axisConstraintGroups,d,h,x);var be=y.isSubplotConstrained||x.isSubplotConstrained;A=l||be,$=o||be;var Ae=t._fullLayout;M=Ae._has("scattergl"),C=Ae._has("splom"),E=Ae._has("svg")}L();var D=h3(k+T,t._fullLayout.dragmode,f),z=Y_(e,o+l+"drag",D,r,a,i,n);if(S&&!f)return z.onmousedown=null,z.style.pointerEvents="none",z;var F={element:z,gd:t,plotinfo:e};F.prepFn=function(le,fe,Te){var xe=F.dragmode,be=t._fullLayout.dragmode;be!==xe&&(F.dragmode=be),L(),P=t._fullLayout._invScaleX,R=t._fullLayout._invScaleY,S||(f?le.shiftKey?be==="pan"?be="zoom":_s(be)||(be="pan"):le.ctrlKey&&(be="pan"):be="pan"),a3(be)?F.minDrag=1:F.minDrag=void 0,_s(be)?(F.xaxes=p,F.yaxes=g,s3(le,fe,Te,F,be)):(F.clickFn=U,_s(xe)&&H(),S||(be==="zoom"?(F.moveFn=se,F.doneFn=Re,F.minDrag=1,re(le,fe,Te)):be==="pan"&&(F.moveFn=Le,F.doneFn=Ce))),t._fullLayout._redrag=function(){var Ae=t._dragdata;if(Ae&&Ae.element===z){var De=t._fullLayout.dragmode;_s(De)||(L(),q([0,0,w,m]),F.moveFn(Ae.dx,Ae.dy))}}};function H(){F.plotinfo.selection=!1,f3(t)}function U(le,fe){var Te=F.gd;if(Te._fullLayout._activeShapeIndex>=0){Te._fullLayout._deactivateShape(Te);return}var xe=Te._fullLayout.clickmode;if(sd(Te),le===2&&!c&&Ee(),f)xe.indexOf("select")>-1&&c3(fe,Te,p,g,e.id,F),xe.indexOf("event")>-1&&e3.click(Te,fe,e.id);else if(le===1&&c){var be=o?u:v,Ae=o==="s"||l==="w"?0:1,De=be._name+".range["+Ae+"]",Oe=v3(be,Ae),Fe="left",st="middle";if(be.fixedrange)return;o?(st=o==="n"?"top":"bottom",be.side==="right"&&(Fe="right")):l==="e"&&(Fe="right"),Te._context.showAxisRangeEntryBoxes&&Hh.select(z).call(J5.makeEditable,{gd:Te,immediate:!0,background:Te._fullLayout.paper_bgcolor,text:String(Oe),fill:be.tickfont?be.tickfont.color:"#444",horizontalAlign:Fe,verticalAlign:st}).on("edit",function(Xe){var ut=be.d2r(Xe);ut!==void 0&&xs.call("_guiRelayout",Te,De,ut)})}}r3.init(F);var B,X,O,Y,W,K,Z,ae,ne,oe;function re(le,fe,Te){var xe=z.getBoundingClientRect();B=fe-xe.left,X=Te-xe.top,t._fullLayout._calcInverseTransform(t);var be=Ur.apply3DTransform(t._fullLayout._invTransform)(B,X);B=be[0],X=be[1],O={l:B,r:B,w:0,t:X,b:X,h:0},Y=t._hmpixcount?t._hmlumcount/t._hmpixcount:K5(t._fullLayout.plot_bgcolor).getLuminance(),W="M0,0H"+w+"V"+m+"H0V0",K=!1,Z="xy",oe=!1,ae=W_(s,Y,_,b,W),ne=Z_(s,_,b)}function se(le,fe){if(t._transitioningWithDuration)return!1;var Te=Math.max(0,Math.min(w,P*le+B)),xe=Math.max(0,Math.min(m,R*fe+X)),be=Math.abs(Te-B),Ae=Math.abs(xe-X);O.l=Math.min(B,Te),O.r=Math.max(B,Te),O.t=Math.min(X,xe),O.b=Math.max(X,xe);function De(){Z="",O.r=O.l,O.t=O.b,ne.attr("d","M0,0Z")}if(y.isSubplotConstrained)be>_r||Ae>_r?(Z="xy",be/w>Ae/m?(Ae=be*m/w,X>xe?O.t=X-Ae:O.b=X+Ae):(be=Ae*w/m,B>Te?O.l=B-be:O.r=B+be),ne.attr("d",Ks(O))):De();else if(x.isSubplotConstrained)if(be>_r||Ae>_r){Z="xy";var Oe=Math.min(O.l/w,(m-O.b)/m),Fe=Math.max(O.r/w,(m-O.t)/m);O.l=Oe*w,O.r=Fe*w,O.b=(1-Oe)*m,O.t=(1-Fe)*m,ne.attr("d",Ks(O))}else De();else!k||Ae<Math.min(Math.max(be*.6,Ay),_r)?be<Ay||!T?De():(O.t=0,O.b=m,Z="x",ne.attr("d",p3(O,X))):!T||be<Math.min(Ae*.6,_r)?(O.l=0,O.r=w,Z="y",ne.attr("d",m3(O,B))):(Z="xy",ne.attr("d",Ks(O)));O.w=O.r-O.l,O.h=O.b-O.t,Z&&(oe=!0),t._dragged=oe,K_(ae,ne,O,W,K,Y),me(),t.emit("plotly_relayouting",I),K=!0}function me(){I={},(Z==="xy"||Z==="x")&&(ld(p,O.l/w,O.r/w,I,y.xaxes),we("x",I)),(Z==="xy"||Z==="y")&&(ld(g,(m-O.b)/m,(m-O.t)/m,I,y.yaxes),we("y",I))}function Re(){me(),sd(t),Ce(),J_(t)}var ke=[0,0,w,m],ze=null,he=Oh.REDRAWDELAY,te=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function ue(le){if(!t._context._scrollZoom.cartesian&&!t._fullLayout._enablescrollzoom)return;if(H(),t._transitioningWithDuration){le.preventDefault(),le.stopPropagation();return}L(),clearTimeout(ze);var fe=-le.deltaY;if(isFinite(fe)||(fe=le.wheelDelta/10),!isFinite(fe)){Ur.log("Did not find wheel motion attributes: ",le);return}var Te=Math.exp(-Math.min(Math.max(fe,-20),20)/200),xe=te.draglayer.select(".nsewdrag").node().getBoundingClientRect(),be=(le.clientX-xe.left)/xe.width,Ae=(xe.bottom-le.clientY)/xe.height,De;function Oe(Fe,st,Xe){if(Fe.fixedrange)return;var ut=Ur.simpleMap(Fe.range,Fe.r2l),Ke=ut[0]+(ut[1]-ut[0])*st;function ft(N){return Fe.l2r(Ke+(N-Ke)*Xe)}Fe.range=ut.map(ft)}if(A){for(l||(be=.5),De=0;De<p.length;De++)Oe(p[De],be,Te);we("x"),ke[2]*=Te,ke[0]+=ke[2]*be*(1/Te-1)}if($){for(o||(Ae=.5),De=0;De<g.length;De++)Oe(g[De],Ae,Te);we("y"),ke[3]*=Te,ke[1]+=ke[3]*(1-Ae)*(1/Te-1)}q(ke),Pe(),t.emit("plotly_relayouting",I),ze=setTimeout(function(){!t._fullLayout||(ke=[0,0,w,m],Ce())},he),le.preventDefault()}o.length*l.length!==1&&ew(z,ue);function Le(le,fe){if(le=le*P,fe=fe*R,t._transitioningWithDuration)return;if(t._fullLayout._replotting=!0,T==="ew"||k==="ns"){var Te=T?-le:0,xe=k?-fe:0;if(x.isSubplotConstrained){if(T&&k){var be=(le/w-fe/m)/2;le=be*w,fe=-be*m,Te=-le,xe=-fe}k?Te=-xe*w/m:xe=-Te*m/w}T&&(Ly(p,le),we("x")),k&&(Ly(g,fe),we("y")),q([Te,xe,w,m]),Pe(),t.emit("plotly_relayouting",I);return}function Ae(ft,N,G){for(var j=1-N,V,ee,Q=0;Q<ft.length;Q++){var ge=ft[Q];if(!ge.fixedrange){V=ge,ee=ge._rl[j]+(ge._rl[N]-ge._rl[j])/d3(G/ge._length);var _e=ge.l2r(ee);_e!==!1&&_e!==void 0&&(ge.range[N]=_e)}}return V._length*(V._rl[N]-ee)/(V._rl[N]-V._rl[j])}var De=T==="w"==(k==="n")?1:-1;if(T&&k&&(y.isSubplotConstrained||x.isSubplotConstrained)){var Oe=(le/w+De*fe/m)/2;le=Oe*w,fe=De*Oe*m}var Fe,st;if(T==="w"?le=Ae(p,0,le):T==="e"?le=Ae(p,1,-le):T||(le=0),k==="n"?fe=Ae(g,1,fe):k==="s"?fe=Ae(g,0,-fe):k||(fe=0),Fe=T==="w"?le:0,st=k==="n"?fe:0,y.isSubplotConstrained&&!x.isSubplotConstrained||x.isSubplotConstrained&&T&&k&&De>0){var Xe;if(x.isSubplotConstrained||!T&&k.length===1){for(Xe=0;Xe<p.length;Xe++)p[Xe].range=p[Xe]._r.slice(),_u(p[Xe],1-fe/m);le=fe*w/m,Fe=le/2}if(x.isSubplotConstrained||!k&&T.length===1){for(Xe=0;Xe<g.length;Xe++)g[Xe].range=g[Xe]._r.slice(),_u(g[Xe],1-le/w);fe=le*m/w,st=fe/2}}(!x.isSubplotConstrained||!k)&&we("x"),(!x.isSubplotConstrained||!T)&&we("y");var ut=w-le,Ke=m-fe;x.isSubplotConstrained&&!(T&&k)&&(T?(st=Fe?0:le*m/w,Ke=ut*m/w):(Fe=st?0:fe*w/m,ut=Ke*w/m)),q([Fe,st,ut,Ke]),Pe(),t.emit("plotly_relayouting",I)}function we(le,fe){for(var Te=x.isSubplotConstrained?{x:g,y:p}[le]:x[le+"axes"],xe=x.isSubplotConstrained?{x:p,y:g}[le]:[],be=0;be<Te.length;be++){var Ae=Te[be],De=Ae._id,Oe=x.xLinks[De]||x.yLinks[De],Fe=xe[0]||d[Oe]||h[Oe];Fe&&(fe?(fe[Ae._name+".range[0]"]=fe[Fe._name+".range[0]"],fe[Ae._name+".range[1]"]=fe[Fe._name+".range[1]"]):Ae.range=Fe.range.slice())}}function Pe(){var le=[],fe;function Te(Ae){for(fe=0;fe<Ae.length;fe++)Ae[fe].fixedrange||le.push(Ae[fe]._id)}for(A&&(Te(p),Te(y.xaxes),Te(x.xaxes)),$&&(Te(g),Te(y.yaxes),Te(x.yaxes)),I={},fe=0;fe<le.length;fe++){var xe=le[fe],be=od(t,xe);ky.drawOne(t,be,{skipTitle:!0}),I[be._name+".range[0]"]=be.range[0],I[be._name+".range[1]"]=be.range[1]}ky.redrawComponents(t,le)}function Ee(){if(!t._transitioningWithDuration){var le=t._context.doubleClick,fe=[];T&&(fe=fe.concat(p)),k&&(fe=fe.concat(g)),x.xaxes&&(fe=fe.concat(x.xaxes)),x.yaxes&&(fe=fe.concat(x.yaxes));var Te={},xe,be,Ae;if(le==="reset+autosize"){for(le="autosize",be=0;be<fe.length;be++)if(xe=fe[be],xe._rangeInitial&&(xe.range[0]!==xe._rangeInitial[0]||xe.range[1]!==xe._rangeInitial[1])||!xe._rangeInitial&&!xe.autorange){le="reset";break}}if(le==="autosize")for(be=0;be<fe.length;be++)xe=fe[be],xe.fixedrange||(Te[xe._name+".autorange"]=!0);else if(le==="reset")for((T||y.isSubplotConstrained)&&(fe=fe.concat(y.xaxes)),k&&!y.isSubplotConstrained&&(fe=fe.concat(y.yaxes)),y.isSubplotConstrained&&(T?k||(fe=fe.concat(g)):fe=fe.concat(p)),be=0;be<fe.length;be++)xe=fe[be],xe.fixedrange||(xe._rangeInitial?(Ae=xe._rangeInitial,Te[xe._name+".range[0]"]=Ae[0],Te[xe._name+".range[1]"]=Ae[1]):Te[xe._name+".autorange"]=!0);t.emit("plotly_doubleclick",null),xs.call("_guiRelayout",t,Te)}}function Ce(){q([0,0,w,m]),Ur.syncOrAsync([l3.previousPromises,function(){t._fullLayout._replotting=!1,xs.call("_guiRelayout",t,I)}],t)}function q(le){var fe=t._fullLayout,Te=fe._plots,xe=fe._subplots.cartesian,be,Ae,De,Oe;if(C&&xs.subplotsRegistry.splom.drag(t),M){for(be=0;be<xe.length;be++)if(Ae=Te[xe[be]],De=Ae.xaxis,Oe=Ae.yaxis,Ae._scene){var Fe=Ur.simpleMap(De.range,De.r2l),st=Ur.simpleMap(Oe.range,Oe.r2l);Ae._scene.update({range:[Fe[0],st[0],Fe[1],st[1]]})}}if((C||M)&&(n3(t),o3(t)),E){var Xe=le[2]/v._length,ut=le[3]/u._length;for(be=0;be<xe.length;be++){Ae=Te[xe[be]],De=Ae.xaxis,Oe=Ae.yaxis;var Ke=(A||x.isSubplotConstrained)&&!De.fixedrange&&d[De._id],ft=($||x.isSubplotConstrained)&&!Oe.fixedrange&&h[Oe._id],N,G,j,V;if(Ke?(N=Xe,j=l||x.isSubplotConstrained?le[0]:ye(De,N)):x.xaHash[De._id]?(N=Xe,j=le[0]*De._length/v._length):x.yaHash[De._id]?(N=ut,j=k==="ns"?-le[1]*De._length/u._length:ye(De,N,{n:"top",s:"bottom"}[k])):(N=pe(De,Xe,ut),j=ve(De,N)),ft?(G=ut,V=o||x.isSubplotConstrained?le[1]:ye(Oe,G)):x.yaHash[Oe._id]?(G=ut,V=le[1]*Oe._length/u._length):x.xaHash[Oe._id]?(G=Xe,V=T==="ew"?-le[0]*Oe._length/v._length:ye(Oe,G,{e:"right",w:"left"}[T])):(G=pe(Oe,Xe,ut),V=ve(Oe,G)),!(!N&&!G)){N||(N=1),G||(G=1);var ee=De._offset-j/N,Q=Oe._offset-V/G;Ae.clipRect.call(ri.setTranslate,j,V).call(ri.setScale,N,G),Ae.plot.call(ri.setTranslate,ee,Q).call(ri.setScale,1/N,1/G),(N!==Ae.xScaleFactor||G!==Ae.yScaleFactor)&&(ri.setPointGroupScale(Ae.zoomScalePts,N,G),ri.setTextPointsScale(Ae.zoomScaleTxt,N,G)),ri.hideOutsideRangePoints(Ae.clipOnAxisFalseTraces,Ae),Ae.xScaleFactor=N,Ae.yScaleFactor=G}}}}function pe(le,fe,Te){return le.fixedrange?0:A&&y.xaHash[le._id]?fe:$&&(y.isSubplotConstrained?y.xaHash:y.yaHash)[le._id]?Te:0}function ve(le,fe){return fe?(le.range=le._r.slice(),_u(le,fe),ye(le,fe)):0}function ye(le,fe,Te){return le._length*(1-fe)*i3[Te||le.constraintoward||"middle"]}return z}function X_(t,e,r,a){var i=Ur.ensureSingle(t.draglayer,e,r,function(n){n.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",t.id)});return i.call(t3,a),i.node()}function Y_(t,e,r,a,i,n,o){var l=X_(t,"rect",e,r);return Hh.select(l).call(ri.setRect,a,i,n,o),l}function Sy(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return""}function v3(t,e){var r=t.range[e],a=Math.abs(r-t.range[1-e]),i;return t.type==="date"?r:t.type==="log"?(i=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,wy("."+i+"g")(Math.pow(10,r))):(i=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,wy("."+String(i)+"g")(r))}function ld(t,e,r,a,i){for(var n=0;n<t.length;n++){var o=t[n];if(!o.fixedrange)if(o.rangebreaks){var l=o._id.charAt(0)==="y",s=l?1-e:e,f=l?1-r:r;a[o._name+".range[0]"]=o.l2r(o.p2l(s*o._length)),a[o._name+".range[1]"]=o.l2r(o.p2l(f*o._length))}else{var c=o._rl[0],v=o._rl[1]-c;a[o._name+".range[0]"]=o.l2r(c+v*e),a[o._name+".range[1]"]=o.l2r(c+v*r)}}if(i&&i.length){var u=(e+(1-r))/2;ld(i,u,1-u,a,[])}}function Ly(t,e){for(var r=0;r<t.length;r++){var a=t[r];if(!a.fixedrange)if(a.rangebreaks){var i=0,n=a._length,o=a.p2l(i+e)-a.p2l(i),l=a.p2l(n+e)-a.p2l(n),s=(o+l)/2;a.range=[a.l2r(a._rl[0]-s),a.l2r(a._rl[1]-s)]}else a.range=[a.l2r(a._rl[0]-e/a._m),a.l2r(a._rl[1]-e/a._m)]}}function d3(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function h3(t,e,r){return t?t==="nsew"?r?"":e==="pan"?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function W_(t,e,r,a,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",V_(r,a)).attr("d",i+"Z")}function Z_(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:Ty.background,stroke:Ty.defaultLine,"stroke-width":1,opacity:0}).attr("transform",V_(e,r)).attr("d","M0,0Z")}function K_(t,e,r,a,i,n){t.attr("d",a+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Q_(t,e,i,n)}function Q_(t,e,r,a){r||(t.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function sd(t){Hh.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function J_(t){My&&t.data&&t._context.showTips&&(Ur.notifier(Ur._(t,"Double-click to zoom back out"),"long"),My=!1)}function p3(t,e){return"M"+(t.l-.5)+","+(e-_r-.5)+"h-3v"+(2*_r+1)+"h3ZM"+(t.r+.5)+","+(e-_r-.5)+"h3v"+(2*_r+1)+"h-3Z"}function m3(t,e){return"M"+(e-_r-.5)+","+(t.t-.5)+"v-3h"+(2*_r+1)+"v3ZM"+(e-_r-.5)+","+(t.b+.5)+"v3h"+(2*_r+1)+"v-3Z"}function Ks(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,_r)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function Cy(t,e,r,a,i){for(var n=!1,o={},l={},s,f,c,v,u=(i||{}).xaHash,d=(i||{}).yaHash,h=0;h<e.length;h++){var p=e[h];for(s in r)if(p[s]){for(c in p)!(i&&(u[c]||d[c]))&&!(c.charAt(0)==="x"?r:a)[c]&&(o[c]=s);for(f in a)!(i&&(u[f]||d[f]))&&p[f]&&(n=!0)}for(f in a)if(p[f])for(v in p)!(i&&(u[v]||d[v]))&&!(v.charAt(0)==="x"?r:a)[v]&&(l[v]=f)}n&&(Ur.extendFlat(o,l),l={});var g={},_=[];for(c in o){var b=od(t,c);_.push(b),g[b._id]=b}var w={},m=[];for(v in l){var y=od(t,v);m.push(y),w[y._id]=y}return{xaHash:g,yaHash:w,xaxes:_,yaxes:m,xLinks:o,yLinks:l,isSubplotConstrained:n}}function ew(t,e){if(!Q5)t.onwheel!==void 0?t.onwheel=e:t.onmousewheel!==void 0?t.onmousewheel=e:t.isAddedWheelEvent||(t.isAddedWheelEvent=!0,t.addEventListener("wheel",e,{passive:!1}));else{var r=t.onwheel!==void 0?"wheel":"mousewheel";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}}function Dy(t){var e=[];for(var r in t)e.push(t[r]);return e}var y3={makeDragBox:u3,makeDragger:X_,makeRectDragger:Y_,makeZoombox:W_,makeCorners:Z_,updateZoombox:K_,xyCorners:Ks,transitionZoombox:Q_,removeZoombox:sd,showDoubleClickNotifier:J_,attachWheelEventHandler:ew};(function(t){var e=tt.exports,r=ua,a=ha.exports,i=xi,n=y3.makeDragBox,o=pr.DRAGGERSIZE;t.initInteractions=function(s){var f=s._fullLayout;if(s._context.staticPlot){e.select(s).selectAll(".drag").remove();return}if(!(!f._has("cartesian")&&!f._has("splom"))){var c=Object.keys(f._plots||{}).sort(function(u,d){if((f._plots[u].mainplot&&!0)===(f._plots[d].mainplot&&!0)){var h=u.split("y"),p=d.split("y");return h[0]===p[0]?Number(h[1]||1)-Number(p[1]||1):Number(h[0]||1)-Number(p[0]||1)}return f._plots[u].mainplot?1:-1});c.forEach(function(u){var d=f._plots[u],h=d.xaxis,p=d.yaxis;if(!d.mainplot){var g=n(s,d,h._offset,p._offset,h._length,p._length,"ns","ew");g.onmousemove=function(w){s._fullLayout._rehover=function(){s._fullLayout._hoversubplot===u&&s._fullLayout._plots[u]&&r.hover(s,w,u)},r.hover(s,w,u),s._fullLayout._lasthover=g,s._fullLayout._hoversubplot=u},g.onmouseout=function(w){s._dragging||(s._fullLayout._hoversubplot=null,a.unhover(s,w))},s._context.showAxisDragHandles&&(n(s,d,h._offset-o,p._offset-o,o,o,"n","w"),n(s,d,h._offset+h._length,p._offset-o,o,o,"n","e"),n(s,d,h._offset-o,p._offset+p._length,o,o,"s","w"),n(s,d,h._offset+h._length,p._offset+p._length,o,o,"s","e"))}if(s._context.showAxisDragHandles){if(u===h._mainSubplot){var _=h._mainLinePosition;h.side==="top"&&(_-=o),n(s,d,h._offset+h._length*.1,_,h._length*.8,o,"","ew"),n(s,d,h._offset,_,h._length*.1,o,"","w"),n(s,d,h._offset+h._length*.9,_,h._length*.1,o,"","e")}if(u===p._mainSubplot){var b=p._mainLinePosition;p.side!=="right"&&(b-=o),n(s,d,b,p._offset+p._length*.1,o,p._length*.8,"ns",""),n(s,d,b,p._offset+p._length*.9,o,p._length*.1,"s",""),n(s,d,b,p._offset,o,p._length*.1,"n","")}}});var v=f._hoverlayer.node();v.onmousemove=function(u){u.target=s._fullLayout._lasthover,r.hover(s,u,f._hoversubplot)},v.onclick=function(u){u.target=s._fullLayout._lasthover,r.click(s,u)},v.onmousedown=function(u){s._fullLayout._lasthover.onmousedown(u)},t.updateFx(s)}},t.updateFx=function(l){var s=l._fullLayout,f=s.dragmode==="pan"?"move":"crosshair";i(s._draggers,f)}})(hh);var Hl={},$y=Ve,g3=function(e){for(var r=$y.layoutArrayContainers,a=$y.layoutArrayRegexes,i=e.split("[")[0],n,o,l=0;l<a.length;l++)if(o=e.match(a[l]),o&&o.index===0){n=o[0];break}if(n||(n=r[r.indexOf(i)]),!n)return!1;var s=e.substr(n.length);return s?(o=s.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),o?{array:n,index:Number(o[1]),property:o[3]||""}:!1):{array:n,index:"",property:""}},b3=Ml,wu=Ud,zo=en.exports,x3=Xd.sorterAsc,Tu=Ve;Hl.containerArrayMatch=g3;var _3=Hl.isAddVal=function(e){return e==="add"||b3(e)},Ey=Hl.isRemoveVal=function(e){return e===null||e==="remove"};Hl.applyContainerArrayChanges=function(e,r,a,i,n){var o=r.astr,l=Tu.getComponentMethod(o,"supplyLayoutDefaults"),s=Tu.getComponentMethod(o,"draw"),f=Tu.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||l===wu||s===wu,v=e.layout,u=e._fullLayout;if(a[""]){Object.keys(a).length>1&&zo.warn("Full array edits are incompatible with other edits",o);var d=a[""][""];if(Ey(d))r.set(null);else if(Array.isArray(d))r.set(d);else return zo.warn("Unrecognized full array edit value",o,d),!0;return c?!1:(l(v,u),s(e),!0)}var h=Object.keys(a).map(Number).sort(x3),p=r.get(),g=p||[],_=n(u,o).get(),b=[],w=-1,m=g.length,y,x,T,k,S,A,$,M;for(y=0;y<h.length;y++){if(T=h[y],k=a[T],S=Object.keys(k),A=k[""],$=_3(A),T<0||T>g.length-($?0:1)){zo.warn("index out of range",o,T);continue}if(A!==void 0)S.length>1&&zo.warn("Insertion & removal are incompatible with edits to the same index.",o,T),Ey(A)?b.push(T):$?(A==="add"&&(A={}),g.splice(T,0,A),_&&_.splice(T,0,{})):zo.warn("Unrecognized full object edit value",o,T,A),w===-1&&(w=T);else for(x=0;x<S.length;x++)M=o+"["+T+"].",n(g[T],S[x],M).set(k[S[x]])}for(y=b.length-1;y>=0;y--)g.splice(b[y],1),_&&_.splice(b[y],1);if(g.length?p||r.set(g):r.set(null),c)return!1;if(l(v,u),f!==wu){var C;if(w===-1)C=h;else{for(m=Math.max(g.length,m),C=[],y=0;y<h.length&&(T=h[y],!(T>=w));y++)C.push(T);for(y=w;y<m;y++)C.push(y)}for(y=0;y<C.length;y++)f(e,C[y])}else s(e);return!0};var tw={};(function(t){var e=lt,r=hk,a=Ve,i=de.exports,n=Ut.exports,o=Vt,l=Je.exports,s=o.cleanId,f=o.getFromTrace,c=a.traceIs;t.clearPromiseQueue=function(m){Array.isArray(m._promises)&&m._promises.length>0&&i.log("Clearing previous rejected promises from queue."),m._promises=[]},t.cleanLayout=function(m){var y,x;m||(m={}),m.xaxis1&&(m.xaxis||(m.xaxis=m.xaxis1),delete m.xaxis1),m.yaxis1&&(m.yaxis||(m.yaxis=m.yaxis1),delete m.yaxis1),m.scene1&&(m.scene||(m.scene=m.scene1),delete m.scene1);var T=(n.subplotsRegistry.cartesian||{}).attrRegex,k=(n.subplotsRegistry.polar||{}).attrRegex,S=(n.subplotsRegistry.ternary||{}).attrRegex,A=(n.subplotsRegistry.gl3d||{}).attrRegex,$=Object.keys(m);for(y=0;y<$.length;y++){var M=$[y];if(T&&T.test(M)){var C=m[M];C.anchor&&C.anchor!=="free"&&(C.anchor=s(C.anchor)),C.overlaying&&(C.overlaying=s(C.overlaying)),C.type||(C.isdate?C.type="date":C.islog?C.type="log":C.isdate===!1&&C.islog===!1&&(C.type="linear")),(C.autorange==="withzero"||C.autorange==="tozero")&&(C.autorange=!0,C.rangemode="tozero"),delete C.islog,delete C.isdate,delete C.categories,g(C,"domain")&&delete C.domain,C.autotick!==void 0&&(C.tickmode===void 0&&(C.tickmode=C.autotick?"auto":"linear"),delete C.autotick),u(C)}else if(k&&k.test(M)){var E=m[M];u(E.radialaxis)}else if(S&&S.test(M)){var I=m[M];u(I.aaxis),u(I.baxis),u(I.caxis)}else if(A&&A.test(M)){var P=m[M],R=P.cameraposition;if(Array.isArray(R)&&R[0].length===4){var L=R[0],D=R[1],z=R[2],F=r([],L),H=[];for(x=0;x<3;++x)H[x]=D[x]+z*F[2+4*x];P.camera={eye:{x:H[0],y:H[1],z:H[2]},center:{x:D[0],y:D[1],z:D[2]},up:{x:0,y:0,z:1}},delete P.cameraposition}u(P.xaxis),u(P.yaxis),u(P.zaxis)}}var U=Array.isArray(m.annotations)?m.annotations.length:0;for(y=0;y<U;y++){var B=m.annotations[y];!i.isPlainObject(B)||(B.ref&&(B.ref==="paper"?(B.xref="paper",B.yref="paper"):B.ref==="data"&&(B.xref="x",B.yref="y"),delete B.ref),v(B,"xref"),v(B,"yref"))}var X=Array.isArray(m.shapes)?m.shapes.length:0;for(y=0;y<X;y++){var O=m.shapes[y];!i.isPlainObject(O)||(v(O,"xref"),v(O,"yref"))}var Y=Array.isArray(m.images)?m.images.length:0;for(y=0;y<Y;y++){var W=m.images[y];!i.isPlainObject(W)||(v(W,"xref"),v(W,"yref"))}var K=m.legend;return K&&(K.x>3?(K.x=1.02,K.xanchor="left"):K.x<-2&&(K.x=-.02,K.xanchor="right"),K.y>3?(K.y=1.02,K.yanchor="bottom"):K.y<-2&&(K.y=-.02,K.yanchor="top")),u(m),m.dragmode==="rotate"&&(m.dragmode="orbit"),l.clean(m),m.template&&m.template.layout&&t.cleanLayout(m.template.layout),m};function v(m,y){var x=m[y],T=y.charAt(0);x&&x!=="paper"&&(m[y]=s(x,T,!0))}function u(m){m&&((typeof m.title=="string"||typeof m.title=="number")&&(m.title={text:m.title}),y("titlefont","font"),y("titleposition","position"),y("titleside","side"),y("titleoffset","offset"));function y(x,T){var k=m[x],S=m.title&&m.title[T];k&&!S&&(m.title||(m.title={}),m.title[T]=m[x],delete m[x])}}t.cleanData=function(m){for(var y=0;y<m.length;y++){var x=m[y],T;if(x.type==="histogramy"&&"xbins"in x&&!("ybins"in x)&&(x.ybins=x.xbins,delete x.xbins),x.error_y&&"opacity"in x.error_y){var k=l.defaults,S=x.error_y.color||(c(x,"bar")?l.defaultLine:k[y%k.length]);x.error_y.color=l.addOpacity(l.rgb(S),l.opacity(S)*x.error_y.opacity),delete x.error_y.opacity}if("bardir"in x&&(x.bardir==="h"&&(c(x,"bar")||x.type.substr(0,9)==="histogram")&&(x.orientation="h",t.swapXYData(x)),delete x.bardir),x.type==="histogramy"&&t.swapXYData(x),(x.type==="histogramx"||x.type==="histogramy")&&(x.type="histogram"),"scl"in x&&!("colorscale"in x)&&(x.colorscale=x.scl,delete x.scl),"reversescl"in x&&!("reversescale"in x)&&(x.reversescale=x.reversescl,delete x.reversescl),x.xaxis&&(x.xaxis=s(x.xaxis,"x")),x.yaxis&&(x.yaxis=s(x.yaxis,"y")),c(x,"gl3d")&&x.scene&&(x.scene=n.subplotsRegistry.gl3d.cleanId(x.scene)),!c(x,"pie-like")&&!c(x,"bar-like"))if(Array.isArray(x.textposition))for(T=0;T<x.textposition.length;T++)x.textposition[T]=p(x.textposition[T]);else x.textposition&&(x.textposition=p(x.textposition));var A=a.getModule(x);if(A&&A.colorbar){var $=A.colorbar.container,M=$?x[$]:x;M&&M.colorscale&&(M.colorscale==="YIGnBu"&&(M.colorscale="YlGnBu"),M.colorscale==="YIOrRd"&&(M.colorscale="YlOrRd"))}if(x.type==="surface"&&i.isPlainObject(x.contours)){var C=["x","y","z"];for(T=0;T<C.length;T++){var E=x.contours[C[T]];!i.isPlainObject(E)||(E.highlightColor&&(E.highlightcolor=E.highlightColor,delete E.highlightColor),E.highlightWidth&&(E.highlightwidth=E.highlightWidth,delete E.highlightWidth))}}if(x.type==="candlestick"||x.type==="ohlc"){var I=(x.increasing||{}).showlegend!==!1,P=(x.decreasing||{}).showlegend!==!1,R=d(x.increasing),L=d(x.decreasing);if(R!==!1&&L!==!1){var D=h(R,L,I,P);D&&(x.name=D)}else(R||L)&&!x.name&&(x.name=R||L)}if(Array.isArray(x.transforms)){var z=x.transforms;for(T=0;T<z.length;T++){var F=z[T];if(!!i.isPlainObject(F))switch(F.type){case"filter":F.filtersrc&&(F.target=F.filtersrc,delete F.filtersrc),F.calendar&&(F.valuecalendar||(F.valuecalendar=F.calendar),delete F.calendar);break;case"groupby":if(F.styles=F.styles||F.style,F.styles&&!Array.isArray(F.styles)){var H=F.styles,U=Object.keys(H);F.styles=[];for(var B=0;B<U.length;B++)F.styles.push({target:U[B],value:H[U[B]]})}break}}}g(x,"line")&&delete x.line,"marker"in x&&(g(x.marker,"line")&&delete x.marker.line,g(x,"marker")&&delete x.marker),l.clean(x),x.autobinx&&(delete x.autobinx,delete x.xbins),x.autobiny&&(delete x.autobiny,delete x.ybins),u(x),x.colorbar&&u(x.colorbar),x.marker&&x.marker.colorbar&&u(x.marker.colorbar),x.line&&x.line.colorbar&&u(x.line.colorbar),x.aaxis&&u(x.aaxis),x.baxis&&u(x.baxis)}};function d(m){if(!i.isPlainObject(m))return!1;var y=m.name;return delete m.name,delete m.showlegend,(typeof y=="string"||typeof y=="number")&&String(y)}function h(m,y,x,T){if(x&&!T)return m;if(T&&!x||!m.trim())return y;if(!y.trim())return m;var k=Math.min(m.length,y.length),S;for(S=0;S<k&&m.charAt(S)===y.charAt(S);S++);var A=m.substr(0,S);return A.trim()}function p(m){var y="middle",x="center";return typeof m=="string"&&(m.indexOf("top")!==-1?y="top":m.indexOf("bottom")!==-1&&(y="bottom"),m.indexOf("left")!==-1?x="left":m.indexOf("right")!==-1&&(x="right")),y+" "+x}function g(m,y){return y in m&&typeof m[y]=="object"&&Object.keys(m[y]).length===0}t.swapXYData=function(m){var y;if(i.swapAttrs(m,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(m.z)&&Array.isArray(m.z[0])&&(m.transpose?delete m.transpose:m.transpose=!0),m.error_x&&m.error_y){var x=m.error_y,T="copy_ystyle"in x?x.copy_ystyle:!(x.color||x.thickness||x.width);i.swapAttrs(m,["error_?.copy_ystyle"]),T&&i.swapAttrs(m,["error_?.color","error_?.thickness","error_?.width"])}if(typeof m.hoverinfo=="string"){var k=m.hoverinfo.split("+");for(y=0;y<k.length;y++)k[y]==="x"?k[y]="y":k[y]==="y"&&(k[y]="x");m.hoverinfo=k.join("+")}},t.coerceTraceIndices=function(m,y){if(e(y))return[y];if(!Array.isArray(y)||!y.length)return m.data.map(function(k,S){return S});if(Array.isArray(y)){for(var x=[],T=0;T<y.length;T++)i.isIndex(y[T],m.data.length)?x.push(y[T]):i.warn("trace index (",y[T],") is not a number or is out of bounds");return x}return y},t.manageArrayContainers=function(m,y,x){var T=m.obj,k=m.parts,S=k.length,A=k[S-1],$=e(A);if($&&y===null){var M=k.slice(0,S-1).join("."),C=i.nestedProperty(T,M).get();C.splice(A,1)}else $&&m.get()===void 0&&m.get()===void 0&&(x[m.astr]=null),m.set(y)};var _=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function b(m){var y=m.search(_);if(y>0)return m.substr(0,y)}t.hasParent=function(m,y){for(var x=b(y);x;){if(x in m)return!0;x=b(x)}return!1};var w=["x","y","z"];t.clearAxisTypes=function(m,y,x){for(var T=0;T<y.length;T++)for(var k=m._fullData[T],S=0;S<3;S++){var A=f(m,k,w[S]);if(A&&A.type!=="log"){var $=A._name,M=A._id.substr(1);if(M.substr(0,5)==="scene"){if(x[M]!==void 0)continue;$=M+"."+$}var C=$+".type";x[$]===void 0&&x[C]===void 0&&i.nestedProperty(m.layout,C).set(null)}}}})(tw);(function(t){var e=tt.exports,r=lt,a=ax,i=de.exports,n=i.nestedProperty,o=El,l=lM,s=Ve,f=po,c=Ut.exports,v=Ct.exports,u=Tt.exports,d=Je.exports,h=hh.initInteractions,p=on,g=dc.clearSelect,_=uo.dfltConfig,b=Hl,w=tw,m=sc,y=gi,x=pr.AX_NAME_PATTERN,T=0,k=5;function S(N,G,j,V){var ee;if(N=i.getGraphDiv(N),o.init(N),i.isPlainObject(G)){var Q=G;G=Q.data,j=Q.layout,V=Q.config,ee=Q.frames}var ge=o.triggerHandler(N,"plotly_beforeplot",[G,j,V]);if(ge===!1)return Promise.reject();!G&&!j&&!i.isPlotDiv(N)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",N);function _e(){if(ee)return t.addFrames(N,ee)}E(N,V),j||(j={}),e.select(N).classed("js-plotly-plot",!0),u.makeTester(),Array.isArray(N._promises)||(N._promises=[]);var ce=(N.data||[]).length===0&&Array.isArray(G);Array.isArray(G)&&(w.cleanData(G),ce?N.data=G:N.data.push.apply(N.data,G),N.empty=!1),(!N.layout||ce)&&(N.layout=w.cleanLayout(j)),c.supplyDefaults(N);var ie=N._fullLayout,Me=ie._has("cartesian");ie._replotting=!0,(ce||ie._shouldCreateBgLayer)&&(ft(N),ie._shouldCreateBgLayer&&delete ie._shouldCreateBgLayer),u.initGradients(N),u.initPatterns(N),ce&&v.saveShowSpikeInitial(N);var Ne=!N.calcdata||N.calcdata.length!==(N._fullData||[]).length;Ne&&c.doCalcdata(N);for(var je=0;je<N.calcdata.length;je++)N.calcdata[je][0].trace=N._fullData[je];N._context.responsive?N._responsiveChartHandler||(N._responsiveChartHandler=function(){i.isHidden(N)||c.resize(N)},window.addEventListener("resize",N._responsiveChartHandler)):i.clearResponsive(N);var Ze=i.extendFlat({},ie._size),nt=0;function dt(){for(var Ge=ie._basePlotModules,We=0;We<Ge.length;We++)Ge[We].drawFramework&&Ge[We].drawFramework(N);!ie._glcanvas&&ie._has("gl")&&(ie._glcanvas=ie._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(vt){return vt.key}),ie._glcanvas.enter().append("canvas").attr("class",function(vt){return"gl-canvas gl-canvas-"+vt.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var ct=N._context.plotGlPixelRatio;if(ie._glcanvas){ie._glcanvas.attr("width",ie.width*ct).attr("height",ie.height*ct).style("width",ie.width+"px").style("height",ie.height+"px");var rt=ie._glcanvas.data()[0].regl;if(rt&&(Math.floor(ie.width*ct)!==rt._gl.drawingBufferWidth||Math.floor(ie.height*ct)!==rt._gl.drawingBufferHeight)){var Be="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(nt)i.error(Be);else return i.log(Be+" Clearing graph and plotting again."),c.cleanPlot([],{},N._fullData,ie),c.supplyDefaults(N),ie=N._fullLayout,c.doCalcdata(N),nt++,dt()}}return ie.modebar.orientation==="h"?ie._modebardiv.style("height",null).style("width","100%"):ie._modebardiv.style("width",null).style("height",ie.height+"px"),c.previousPromises(N)}function Ue(){if(c.clearAutoMarginIds(N),m.drawMarginPushers(N),v.allowAutoMargin(N),ie._has("pie"))for(var Ge=N._fullData,We=0;We<Ge.length;We++){var ct=Ge[We];ct.type==="pie"&&ct.automargin&&c.allowAutoMargin(N,"pie."+ct.uid+".automargin")}return c.doAutoMargin(N),c.previousPromises(N)}function St(){if(!!c.didMarginChange(Ze,ie._size))return i.syncOrAsync([Ue,m.layoutStyles],N)}function at(){if(!Ne){qe();return}return i.syncOrAsync([s.getComponentMethod("shapes","calcAutorange"),s.getComponentMethod("annotations","calcAutorange"),qe],N)}function qe(){N._transitioning||(m.doAutoRangeAndConstraints(N),ce&&v.saveRangeInitial(N),s.getComponentMethod("rangeslider","calcAutorange")(N))}function yt(){return v.draw(N,ce?"":"redraw")}var ht=[c.previousPromises,_e,dt,Ue,St];Me&&ht.push(at),ht.push(m.layoutStyles),Me&&ht.push(yt,function(We){We._fullLayout._insideTickLabelsAutorange&&Re(We,We._fullLayout._insideTickLabelsAutorange).then(function(){We._fullLayout._insideTickLabelsAutorange=void 0})}),ht.push(m.drawData,m.finalDraw,h,c.addLinks,c.rehover,c.redrag,c.doAutoMargin,et,c.previousPromises);function et(Ge){Ge._fullLayout._insideTickLabelsAutorange&&ce&&v.saveRangeInitial(Ge,!0)}var Qe=i.syncOrAsync(ht,N);return(!Qe||!Qe.then)&&(Qe=Promise.resolve()),Qe.then(function(){return A(N),N})}function A(N){var G=N._fullLayout;G._redrawFromAutoMarginCount?G._redrawFromAutoMarginCount--:N.emit("plotly_afterplot")}function $(N){return i.extendFlat(_,N)}function M(N,G){try{N._fullLayout._paper.style("background",G)}catch(j){i.error(j)}}function C(N,G){var j=d.combine(G,"white");M(N,j)}function E(N,G){if(!N._context){N._context=i.extendDeep({},_);var j=e.select("base");N._context._baseUrl=j.size()&&j.attr("href")?window.location.href.split("#")[0]:""}var V=N._context,ee,Q,ge;if(G){for(Q=Object.keys(G),ee=0;ee<Q.length;ee++)ge=Q[ee],!(ge==="editable"||ge==="edits")&&ge in V&&(ge==="setBackground"&&G[ge]==="opaque"?V[ge]=C:V[ge]=G[ge]);G.plot3dPixelRatio&&!V.plotGlPixelRatio&&(V.plotGlPixelRatio=V.plot3dPixelRatio);var _e=G.editable;if(_e!==void 0)for(V.editable=_e,Q=Object.keys(V.edits),ee=0;ee<Q.length;ee++)V.edits[Q[ee]]=_e;if(G.edits)for(Q=Object.keys(G.edits),ee=0;ee<Q.length;ee++)ge=Q[ee],ge in V.edits&&(V.edits[ge]=G.edits[ge]);V._exportedPlot=G._exportedPlot}V.staticPlot&&(V.editable=!1,V.edits={},V.autosizable=!1,V.scrollZoom=!1,V.doubleClick=!1,V.showTips=!1,V.showLink=!1,V.displayModeBar=!1),V.displayModeBar==="hover"&&!a&&(V.displayModeBar=!0),(V.setBackground==="transparent"||typeof V.setBackground!="function")&&(V.setBackground=M),V._hasZeroHeight=V._hasZeroHeight||N.clientHeight===0,V._hasZeroWidth=V._hasZeroWidth||N.clientWidth===0;var ce=V.scrollZoom,ie=V._scrollZoom={};if(ce===!0)ie.cartesian=1,ie.gl3d=1,ie.geo=1,ie.mapbox=1;else if(typeof ce=="string"){var Me=ce.split("+");for(ee=0;ee<Me.length;ee++)ie[Me[ee]]=1}else ce!==!1&&(ie.gl3d=1,ie.geo=1,ie.mapbox=1)}function I(N){if(N=i.getGraphDiv(N),!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N);return w.cleanData(N.data),w.cleanLayout(N.layout),N.calcdata=void 0,t._doPlot(N).then(function(){return N.emit("plotly_redraw"),N})}function P(N,G,j,V){return N=i.getGraphDiv(N),c.cleanPlot([],{},N._fullData||[],N._fullLayout||{}),c.purge(N),t._doPlot(N,G,j,V)}function R(N,G){var j=G+1,V=[],ee,Q;for(ee=0;ee<N.length;ee++)Q=N[ee],Q<0?V.push(j+Q):V.push(Q);return V}function L(N,G,j){var V,ee;for(V=0;V<G.length;V++){if(ee=G[V],ee!==parseInt(ee,10))throw new Error("all values in "+j+" must be integers");if(ee>=N.data.length||ee<-N.data.length)throw new Error(j+" must be valid indices for gd.data.");if(G.indexOf(ee,V+1)>-1||ee>=0&&G.indexOf(-N.data.length+ee)>-1||ee<0&&G.indexOf(N.data.length+ee)>-1)throw new Error("each index in "+j+" must be unique.")}}function D(N,G,j){if(!Array.isArray(N.data))throw new Error("gd.data must be an array.");if(typeof G>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(G)||(G=[G]),L(N,G,"currentIndices"),typeof j<"u"&&!Array.isArray(j)&&(j=[j]),typeof j<"u"&&L(N,j,"newIndices"),typeof j<"u"&&G.length!==j.length)throw new Error("current and new indices must be of equal length.")}function z(N,G,j){var V,ee;if(!Array.isArray(N.data))throw new Error("gd.data must be an array.");if(typeof G>"u")throw new Error("traces must be defined.");for(Array.isArray(G)||(G=[G]),V=0;V<G.length;V++)if(ee=G[V],typeof ee!="object"||Array.isArray(ee)||ee===null)throw new Error("all values in traces array must be non-array objects");if(typeof j<"u"&&!Array.isArray(j)&&(j=[j]),typeof j<"u"&&j.length!==G.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function F(N,G,j,V){var ee=i.isPlainObject(V);if(!Array.isArray(N.data))throw new Error("gd.data must be an array");if(!i.isPlainObject(G))throw new Error("update must be a key:value object");if(typeof j>"u")throw new Error("indices must be an integer or array of integers");L(N,j,"indices");for(var Q in G){if(!Array.isArray(G[Q])||G[Q].length!==j.length)throw new Error("attribute "+Q+" must be an array of length equal to indices array length");if(ee&&(!(Q in V)||!Array.isArray(V[Q])||V[Q].length!==G[Q].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}function H(N,G,j,V){var ee=i.isPlainObject(V),Q=[],ge,_e,ce,ie,Me;Array.isArray(j)||(j=[j]),j=R(j,N.data.length-1);for(var Ne in G)for(var je=0;je<j.length;je++){if(ge=N.data[j[je]],ce=n(ge,Ne),_e=ce.get(),ie=G[Ne][je],!i.isArrayOrTypedArray(ie))throw new Error("attribute: "+Ne+" index: "+je+" must be an array");if(!i.isArrayOrTypedArray(_e))throw new Error("cannot extend missing or non-array attribute: "+Ne);if(_e.constructor!==ie.constructor)throw new Error("cannot extend array with an array of a different type: "+Ne);Me=ee?V[Ne][je]:V,r(Me)||(Me=-1),Q.push({prop:ce,target:_e,insert:ie,maxp:Math.floor(Me)})}return Q}function U(N,G,j,V,ee){F(N,G,j,V);for(var Q=H(N,G,j,V),ge={},_e={},ce=0;ce<Q.length;ce++){var ie=Q[ce].prop,Me=Q[ce].maxp,Ne=ee(Q[ce].target,Q[ce].insert,Me);ie.set(Ne[0]),Array.isArray(ge[ie.astr])||(ge[ie.astr]=[]),ge[ie.astr].push(Ne[1]),Array.isArray(_e[ie.astr])||(_e[ie.astr]=[]),_e[ie.astr].push(Q[ce].target.length)}return{update:ge,maxPoints:_e}}function B(N,G){var j=new N.constructor(N.length+G.length);return j.set(N),j.set(G,N.length),j}function X(N,G,j,V){N=i.getGraphDiv(N);function ee(ce,ie,Me){var Ne,je;if(i.isTypedArray(ce))if(Me<0){var Ze=new ce.constructor(0),nt=B(ce,ie);Me<0?(Ne=nt,je=Ze):(Ne=Ze,je=nt)}else if(Ne=new ce.constructor(Me),je=new ce.constructor(ce.length+ie.length-Me),Me===ie.length)Ne.set(ie),je.set(ce);else if(Me<ie.length){var dt=ie.length-Me;Ne.set(ie.subarray(dt)),je.set(ce),je.set(ie.subarray(0,dt),ce.length)}else{var Ue=Me-ie.length,St=ce.length-Ue;Ne.set(ce.subarray(St)),Ne.set(ie,Ue),je.set(ce.subarray(0,St))}else Ne=ce.concat(ie),je=Me>=0&&Me<Ne.length?Ne.splice(0,Ne.length-Me):[];return[Ne,je]}var Q=U(N,G,j,V,ee),ge=t.redraw(N),_e=[N,Q.update,j,Q.maxPoints];return l.add(N,t.prependTraces,_e,X,arguments),ge}function O(N,G,j,V){N=i.getGraphDiv(N);function ee(ce,ie,Me){var Ne,je;if(i.isTypedArray(ce))if(Me<=0){var Ze=new ce.constructor(0),nt=B(ie,ce);Me<0?(Ne=nt,je=Ze):(Ne=Ze,je=nt)}else if(Ne=new ce.constructor(Me),je=new ce.constructor(ce.length+ie.length-Me),Me===ie.length)Ne.set(ie),je.set(ce);else if(Me<ie.length){var dt=ie.length-Me;Ne.set(ie.subarray(0,dt)),je.set(ie.subarray(dt)),je.set(ce,dt)}else{var Ue=Me-ie.length;Ne.set(ie),Ne.set(ce.subarray(0,Ue),ie.length),je.set(ce.subarray(Ue))}else Ne=ie.concat(ce),je=Me>=0&&Me<Ne.length?Ne.splice(Me,Ne.length):[];return[Ne,je]}var Q=U(N,G,j,V,ee),ge=t.redraw(N),_e=[N,Q.update,j,Q.maxPoints];return l.add(N,t.extendTraces,_e,O,arguments),ge}function Y(N,G,j){N=i.getGraphDiv(N);var V=[],ee=t.deleteTraces,Q=Y,ge=[N,V],_e=[N,G],ce,ie;for(z(N,G,j),Array.isArray(G)||(G=[G]),G=G.map(function(Me){return i.extendFlat({},Me)}),w.cleanData(G),ce=0;ce<G.length;ce++)N.data.push(G[ce]);for(ce=0;ce<G.length;ce++)V.push(-G.length+ce);if(typeof j>"u")return ie=t.redraw(N),l.add(N,ee,ge,Q,_e),ie;Array.isArray(j)||(j=[j]);try{D(N,V,j)}catch(Me){throw N.data.splice(N.data.length-G.length,G.length),Me}return l.startSequence(N),l.add(N,ee,ge,Q,_e),ie=t.moveTraces(N,V,j),l.stopSequence(N),ie}function W(N,G){N=i.getGraphDiv(N);var j=[],V=t.addTraces,ee=W,Q=[N,j,G],ge=[N,G],_e,ce;if(typeof G>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(G)||(G=[G]),L(N,G,"indices"),G=R(G,N.data.length-1),G.sort(i.sorterDes),_e=0;_e<G.length;_e+=1)ce=N.data.splice(G[_e],1)[0],j.push(ce);var ie=t.redraw(N);return l.add(N,V,Q,ee,ge),ie}function K(N,G,j){N=i.getGraphDiv(N);var V=[],ee=[],Q=K,ge=K,_e=[N,j,G],ce=[N,G,j],ie;if(D(N,G,j),G=Array.isArray(G)?G:[G],typeof j>"u")for(j=[],ie=0;ie<G.length;ie++)j.push(-G.length+ie);for(j=Array.isArray(j)?j:[j],G=R(G,N.data.length-1),j=R(j,N.data.length-1),ie=0;ie<N.data.length;ie++)G.indexOf(ie)===-1&&V.push(N.data[ie]);for(ie=0;ie<G.length;ie++)ee.push({newIndex:j[ie],trace:N.data[G[ie]]});for(ee.sort(function(Ne,je){return Ne.newIndex-je.newIndex}),ie=0;ie<ee.length;ie+=1)V.splice(ee[ie].newIndex,0,ee[ie].trace);N.data=V;var Me=t.redraw(N);return l.add(N,Q,_e,ge,ce),Me}function Z(N,G,j,V){N=i.getGraphDiv(N),w.clearPromiseQueue(N);var ee={};if(typeof G=="string")ee[G]=j;else if(i.isPlainObject(G))ee=i.extendFlat({},G),V===void 0&&(V=j);else return i.warn("Restyle fail.",G,j,V),Promise.reject();Object.keys(ee).length&&(N.changed=!0);var Q=w.coerceTraceIndices(N,V),ge=se(N,ee,Q),_e=ge.flags;_e.calc&&(N.calcdata=void 0),_e.clearAxisTypes&&w.clearAxisTypes(N,Q,{});var ce=[];_e.fullReplot?ce.push(t._doPlot):(ce.push(c.previousPromises),c.supplyDefaults(N),_e.markerSize&&(c.doCalcdata(N),ze(ce)),_e.style&&ce.push(m.doTraceStyle),_e.colorbars&&ce.push(m.doColorBars),ce.push(A)),ce.push(c.rehover,c.redrag),l.add(N,Z,[N,ge.undoit,ge.traces],Z,[N,ge.redoit,ge.traces]);var ie=i.syncOrAsync(ce,N);return(!ie||!ie.then)&&(ie=Promise.resolve()),ie.then(function(){return N.emit("plotly_restyle",ge.eventData),N})}function ae(N){return N===void 0?null:N}function ne(N,G){return G?function(j,V,ee){var Q=n(j,V),ge=Q.set;return Q.set=function(_e){var ce=(ee||"")+V;oe(ce,Q.get(),_e,N),ge(_e)},Q}:n}function oe(N,G,j,V){if(Array.isArray(G)||Array.isArray(j))for(var ee=Array.isArray(G)?G:[],Q=Array.isArray(j)?j:[],ge=Math.max(ee.length,Q.length),_e=0;_e<ge;_e++)oe(N+"["+_e+"]",ee[_e],Q[_e],V);else if(i.isPlainObject(G)||i.isPlainObject(j)){var ce=i.isPlainObject(G)?G:{},ie=i.isPlainObject(j)?j:{},Me=i.extendFlat({},ce,ie);for(var Ne in Me)oe(N+"."+Ne,ce[Ne],ie[Ne],V)}else V[N]===void 0&&(V[N]=ae(G))}function re(N,G,j){for(var V in j){var ee=n(N,V);oe(V,ee.get(),j[V],G)}}function se(N,G,j){var V=N._fullLayout,ee=N._fullData,Q=N.data,ge=V._guiEditing,_e=ne(V._preGUI,ge),ce=i.extendDeepAll({},G),ie;me(G);var Me=y.traceFlags(),Ne={},je={},Ze;function nt(){return j.map(function(){})}function dt(Nt){var or=v.id2name(Nt);Ze.indexOf(or)===-1&&Ze.push(or)}function Ue(Nt){return"LAYOUT"+Nt+".autorange"}function St(Nt){return"LAYOUT"+Nt+".range"}function at(Nt){for(var or=Nt;or<ee.length;or++)if(ee[or]._input===Q[Nt])return ee[or]}function qe(Nt,or,Ra){if(Array.isArray(Nt)){Nt.forEach(function(Xl){qe(Xl,or,Ra)});return}if(!(Nt in G||w.hasParent(G,Nt))){var Mi;if(Nt.substr(0,6)==="LAYOUT")Mi=_e(N.layout,Nt.replace("LAYOUT",""));else{var Nr=j[Ra],Ka=V._tracePreGUI[at(Nr)._fullInput.uid];Mi=ne(Ka,ge)(Q[Nr],Nt)}Nt in je||(je[Nt]=nt()),je[Nt][Ra]===void 0&&(je[Nt][Ra]=ae(Mi.get())),or!==void 0&&Mi.set(or)}}function yt(Nt){return function(or){return ee[or][Nt]}}function ht(Nt){return function(or,Ra){return or===!1?ee[j[Ra]][Nt]:null}}for(var et in G){if(w.hasParent(G,et))throw new Error("cannot set "+et+" and a parent attribute simultaneously");var Qe=G[et],Ge,We,ct,rt,Be,vt;if((et==="autobinx"||et==="autobiny")&&(et=et.charAt(et.length-1)+"bins",Array.isArray(Qe)?Qe=Qe.map(ht(et)):Qe===!1?Qe=j.map(yt(et)):Qe=null),Ne[et]=Qe,et.substr(0,6)==="LAYOUT"){ct=_e(N.layout,et.replace("LAYOUT","")),je[et]=[ae(ct.get())],ct.set(Array.isArray(Qe)?Qe[0]:Qe),Me.calc=!0;continue}for(je[et]=nt(),ie=0;ie<j.length;ie++){Ge=Q[j[ie]],We=at(j[ie]);var kt=V._tracePreGUI[We._fullInput.uid];if(ct=ne(kt,ge)(Ge,et),rt=ct.get(),Be=Array.isArray(Qe)?Qe[ie%Qe.length]:Qe,Be!==void 0){var nr=ct.parts[ct.parts.length-1],rr=et.substr(0,et.length-nr.length-1),pa=rr?rr+".":"",Ir=rr?n(We,rr).get():We;if(vt=f.getTraceValObject(We,ct.parts),vt&&vt.impliedEdits&&Be!==null)for(var wo in vt.impliedEdits)qe(i.relativeAttr(et,wo),vt.impliedEdits[wo],ie);else if((nr==="thicknessmode"||nr==="lenmode")&&rt!==Be&&(Be==="fraction"||Be==="pixels")&&Ir){var Ti=V._size,fn=Ir.orient,cn=fn==="top"||fn==="bottom";if(nr==="thicknessmode"){var ql=cn?Ti.h:Ti.w;qe(pa+"thickness",Ir.thickness*(Be==="fraction"?1/ql:ql),ie)}else{var Ea=cn?Ti.w:Ti.h;qe(pa+"len",Ir.len*(Be==="fraction"?1/Ea:Ea),ie)}}else if(et==="type"&&(Be==="pie"!=(rt==="pie")||Be==="funnelarea"!=(rt==="funnelarea"))){var ma="x",To="y";(Be==="bar"||rt==="bar")&&Ge.orientation==="h"&&(ma="y",To="x"),i.swapAttrs(Ge,["?","?src"],"labels",ma),i.swapAttrs(Ge,["d?","?0"],"label",ma),i.swapAttrs(Ge,["?","?src"],"values",To),rt==="pie"||rt==="funnelarea"?(n(Ge,"marker.color").set(n(Ge,"marker.colors").get()),V._pielayer.selectAll("g.trace").remove()):s.traceIs(Ge,"cartesian")&&n(Ge,"marker.colors").set(n(Ge,"marker.color").get())}je[et][ie]=ae(rt);var ki=["swapxy","swapxyaxes","orientation","orientationaxes"];if(ki.indexOf(et)!==-1){if(et==="orientation"){ct.set(Be);var un=Ge.x&&!Ge.y?"h":"v";if((ct.get()||un)===We.orientation)continue}else et==="orientationaxes"&&(Ge.orientation={v:"h",h:"v"}[We.orientation]);w.swapXYData(Ge),Me.calc=Me.clearAxisTypes=!0}else c.dataArrayContainers.indexOf(ct.parts[0])!==-1?(w.manageArrayContainers(ct,Be,je),Me.calc=!0):(vt?vt.arrayOk&&!s.traceIs(We,"regl")&&(i.isArrayOrTypedArray(Be)||i.isArrayOrTypedArray(rt))?Me.calc=!0:y.update(Me,vt):Me.calc=!0,ct.set(Be))}}if(["swapxyaxes","orientationaxes"].indexOf(et)!==-1&&v.swap(N,j),et==="orientationaxes"){var Za=n(N.layout,"hovermode"),vn=Za.get();vn==="x"?Za.set("y"):vn==="y"?Za.set("x"):vn==="x unified"?Za.set("y unified"):vn==="y unified"&&Za.set("x unified")}if(["orientation","type"].indexOf(et)!==-1){for(Ze=[],ie=0;ie<j.length;ie++){var Ai=Q[j[ie]];s.traceIs(Ai,"cartesian")&&(dt(Ai.xaxis||"x"),dt(Ai.yaxis||"y"))}qe(Ze.map(Ue),!0,0),qe(Ze.map(St),[0,1],0)}}return(Me.calc||Me.plot)&&(Me.fullReplot=!0),{flags:Me,undoit:je,redoit:Ne,traces:j,eventData:i.extendDeepNoArrays([],[ce,j])}}function me(N){var G=i.counterRegex("axis",".title",!1,!1),j=/colorbar\.title$/,V=Object.keys(N),ee,Q,ge;for(ee=0;ee<V.length;ee++)Q=V[ee],ge=N[Q],(Q==="title"||G.test(Q)||j.test(Q))&&(typeof ge=="string"||typeof ge=="number")?_e(Q,Q.replace("title","title.text")):Q.indexOf("titlefont")>-1&&Q.indexOf("grouptitlefont")===-1?_e(Q,Q.replace("titlefont","title.font")):Q.indexOf("titleposition")>-1?_e(Q,Q.replace("titleposition","title.position")):Q.indexOf("titleside")>-1?_e(Q,Q.replace("titleside","title.side")):Q.indexOf("titleoffset")>-1&&_e(Q,Q.replace("titleoffset","title.offset"));function _e(ce,ie){N[ie]=N[ce],delete N[ce]}}function Re(N,G,j){N=i.getGraphDiv(N),w.clearPromiseQueue(N);var V={};if(typeof G=="string")V[G]=j;else if(i.isPlainObject(G))V=i.extendFlat({},G);else return i.warn("Relayout fail.",G,j),Promise.reject();Object.keys(V).length&&(N.changed=!0);var ee=Le(N,V),Q=ee.flags;Q.calc&&(N.calcdata=void 0);var ge=[c.previousPromises];Q.layoutReplot?ge.push(m.layoutReplot):Object.keys(V).length&&(ke(N,Q,ee)||c.supplyDefaults(N),Q.legend&&ge.push(m.doLegend),Q.layoutstyle&&ge.push(m.layoutStyles),Q.axrange&&ze(ge,ee.rangesAltered),Q.ticks&&ge.push(m.doTicksRelayout),Q.modebar&&ge.push(m.doModeBar),Q.camera&&ge.push(m.doCamera),Q.colorbars&&ge.push(m.doColorBars),ge.push(A)),ge.push(c.rehover,c.redrag),l.add(N,Re,[N,ee.undoit],Re,[N,ee.redoit]);var _e=i.syncOrAsync(ge,N);return(!_e||!_e.then)&&(_e=Promise.resolve(N)),_e.then(function(){return N.emit("plotly_relayout",ee.eventData),N})}function ke(N,G,j){var V=N._fullLayout;if(!G.axrange)return!1;for(var ee in G)if(ee!=="axrange"&&G[ee])return!1;for(var Q in j.rangesAltered){var ge=v.id2name(Q),_e=N.layout[ge],ce=V[ge];if(ce.autorange=_e.autorange,_e.range&&(ce.range=_e.range.slice()),ce.cleanRange(),ce._matchGroup){for(var ie in ce._matchGroup)if(ie!==Q){var Me=V[v.id2name(ie)];Me.autorange=ce.autorange,Me.range=ce.range.slice(),Me._input.range=ce.range.slice()}}}return!0}function ze(N,G){var j=G?function(V){var ee=[],Q=!0;for(var ge in G){var _e=v.getFromId(V,ge);if(ee.push(ge),(_e.ticklabelposition||"").indexOf("inside")!==-1&&_e._anchorAxis&&ee.push(_e._anchorAxis._id),_e._matchGroup)for(var ce in _e._matchGroup)G[ce]||ee.push(ce);_e.automargin&&(Q=!1)}return v.draw(V,ee,{skipTitle:Q})}:function(V){return v.draw(V,"redraw")};N.push(g,m.doAutoRangeAndConstraints,j,m.drawData,m.finalDraw)}var he=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,te=/^[xyz]axis[0-9]*\.autorange$/,ue=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Le(N,G){var j=N.layout,V=N._fullLayout,ee=V._guiEditing,Q=ne(V._preGUI,ee),ge=Object.keys(G),_e=v.list(N),ce=i.extendDeepAll({},G),ie={},Me,Ne,je;for(me(G),ge=Object.keys(G),Ne=0;Ne<ge.length;Ne++)if(ge[Ne].indexOf("allaxes")===0){for(je=0;je<_e.length;je++){var Ze=_e[je]._id.substr(1),nt=Ze.indexOf("scene")!==-1?Ze+".":"",dt=ge[Ne].replace("allaxes",nt+_e[je]._name);G[dt]||(G[dt]=G[ge[Ne]])}delete G[ge[Ne]]}var Ue=y.layoutFlags(),St={},at={};function qe(Nr,Ka){if(Array.isArray(Nr)){Nr.forEach(function(fk){qe(fk,Ka)});return}if(!(Nr in G||w.hasParent(G,Nr))){var Xl=Q(j,Nr);Nr in at||(at[Nr]=ae(Xl.get())),Ka!==void 0&&Xl.set(Ka)}}var yt={},ht;function et(Nr){var Ka=v.name2id(Nr.split(".")[0]);return yt[Ka]=1,Ka}for(var Qe in G){if(w.hasParent(G,Qe))throw new Error("cannot set "+Qe+" and a parent attribute simultaneously");for(var Ge=Q(j,Qe),We=G[Qe],ct=Ge.parts.length,rt=ct-1;rt>0&&typeof Ge.parts[rt]!="string";)rt--;var Be=Ge.parts[rt],vt=Ge.parts[rt-1]+"."+Be,kt=Ge.parts.slice(0,rt).join("."),nr=n(N.layout,kt).get(),rr=n(V,kt).get(),pa=Ge.get();if(We!==void 0){St[Qe]=We,at[Qe]=Be==="reverse"?We:ae(pa);var Ir=f.getLayoutValObject(V,Ge.parts);if(Ir&&Ir.impliedEdits&&We!==null)for(var wo in Ir.impliedEdits)qe(i.relativeAttr(Qe,wo),Ir.impliedEdits[wo]);if(["width","height"].indexOf(Qe)!==-1)if(We){qe("autosize",null);var Ti=Qe==="height"?"width":"height";qe(Ti,V[Ti])}else V[Qe]=N._initialAutoSize[Qe];else if(Qe==="autosize")qe("width",We?null:V.width),qe("height",We?null:V.height);else if(vt.match(he))et(vt),n(V,kt+"._inputRange").set(null);else if(vt.match(te)){et(vt),n(V,kt+"._inputRange").set(null);var fn=n(V,kt).get();fn._inputDomain&&(fn._input.domain=fn._inputDomain.slice())}else vt.match(ue)&&n(V,kt+"._inputDomain").set(null);if(Be==="type"){ht=nr;var cn=rr.type==="linear"&&We==="log",ql=rr.type==="log"&&We==="linear";if(cn||ql){if(!ht||!ht.range)qe(kt+".autorange",!0);else if(rr.autorange)cn&&(ht.range=ht.range[1]>ht.range[0]?[1,2]:[2,1]);else{var Ea=ht.range[0],ma=ht.range[1];cn?(Ea<=0&&ma<=0&&qe(kt+".autorange",!0),Ea<=0?Ea=ma/1e6:ma<=0&&(ma=Ea/1e6),qe(kt+".range[0]",Math.log(Ea)/Math.LN10),qe(kt+".range[1]",Math.log(ma)/Math.LN10)):(qe(kt+".range[0]",Math.pow(10,Ea)),qe(kt+".range[1]",Math.pow(10,ma)))}Array.isArray(V._subplots.polar)&&V._subplots.polar.length&&V[Ge.parts[0]]&&Ge.parts[1]==="radialaxis"&&delete V[Ge.parts[0]]._subplot.viewInitial["radialaxis.range"],s.getComponentMethod("annotations","convertCoords")(N,rr,We,qe),s.getComponentMethod("images","convertCoords")(N,rr,We,qe)}else qe(kt+".autorange",!0),qe(kt+".range",null);n(V,kt+"._inputRange").set(null)}else if(Be.match(x)){var To=n(V,Qe).get(),ki=(We||{}).type;(!ki||ki==="-")&&(ki="linear"),s.getComponentMethod("annotations","convertCoords")(N,To,ki,qe),s.getComponentMethod("images","convertCoords")(N,To,ki,qe)}var un=b.containerArrayMatch(Qe);if(un){Me=un.array,Ne=un.index;var Za=un.property,vn=Ir||{editType:"calc"};Ne!==""&&Za===""&&(b.isAddVal(We)?at[Qe]=null:b.isRemoveVal(We)?at[Qe]=(n(j,Me).get()||[])[Ne]:i.warn("unrecognized full object value",G)),y.update(Ue,vn),ie[Me]||(ie[Me]={});var Ai=ie[Me][Ne];Ai||(Ai=ie[Me][Ne]={}),Ai[Za]=We,delete G[Qe]}else Be==="reverse"?(nr.range?nr.range.reverse():(qe(kt+".autorange",!0),nr.range=[1,0]),rr.autorange?Ue.calc=!0:Ue.plot=!0):(V._has("scatter-like")&&V._has("regl")&&Qe==="dragmode"&&(We==="lasso"||We==="select")&&!(pa==="lasso"||pa==="select")||V._has("gl2d")?Ue.plot=!0:Ir?y.update(Ue,Ir):Ue.calc=!0,Ge.set(We))}}for(Me in ie){var Nt=b.applyContainerArrayChanges(N,Q(j,Me),ie[Me],Ue,Q);Nt||(Ue.plot=!0)}for(var or in yt){ht=v.getFromId(N,or);var Ra=ht&&ht._constraintGroup;if(Ra){Ue.calc=!0;for(var Mi in Ra)yt[Mi]||(v.getFromId(N,Mi)._constraintShrinkable=!0)}}return(we(N)||G.height||G.width)&&(Ue.plot=!0),(Ue.plot||Ue.calc)&&(Ue.layoutReplot=!0),{flags:Ue,rangesAltered:yt,undoit:at,redoit:St,eventData:ce}}function we(N){var G=N._fullLayout,j=G.width,V=G.height;return N.layout.autosize&&c.plotAutoSize(N,N.layout,G),G.width!==j||G.height!==V}function Pe(N,G,j,V){N=i.getGraphDiv(N),w.clearPromiseQueue(N),i.isPlainObject(G)||(G={}),i.isPlainObject(j)||(j={}),Object.keys(G).length&&(N.changed=!0),Object.keys(j).length&&(N.changed=!0);var ee=w.coerceTraceIndices(N,V),Q=se(N,i.extendFlat({},G),ee),ge=Q.flags,_e=Le(N,i.extendFlat({},j)),ce=_e.flags;(ge.calc||ce.calc)&&(N.calcdata=void 0),ge.clearAxisTypes&&w.clearAxisTypes(N,ee,j);var ie=[];ce.layoutReplot?ie.push(m.layoutReplot):ge.fullReplot?ie.push(t._doPlot):(ie.push(c.previousPromises),ke(N,ce,_e)||c.supplyDefaults(N),ge.style&&ie.push(m.doTraceStyle),(ge.colorbars||ce.colorbars)&&ie.push(m.doColorBars),ce.legend&&ie.push(m.doLegend),ce.layoutstyle&&ie.push(m.layoutStyles),ce.axrange&&ze(ie,_e.rangesAltered),ce.ticks&&ie.push(m.doTicksRelayout),ce.modebar&&ie.push(m.doModeBar),ce.camera&&ie.push(m.doCamera),ie.push(A)),ie.push(c.rehover,c.redrag),l.add(N,Pe,[N,Q.undoit,_e.undoit,Q.traces],Pe,[N,Q.redoit,_e.redoit,Q.traces]);var Me=i.syncOrAsync(ie,N);return(!Me||!Me.then)&&(Me=Promise.resolve(N)),Me.then(function(){return N.emit("plotly_update",{data:Q.eventData,layout:_e.eventData}),N})}function Ee(N){return function(j){j._fullLayout._guiEditing=!0;var V=N.apply(null,arguments);return j._fullLayout._guiEditing=!1,V}}var Ce=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],q=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function pe(N,G){for(var j=0;j<G.length;j++){var V=G[j],ee=N.match(V.pattern);if(ee){var Q=ee[1]||"";return{head:Q,tail:N.substr(Q.length+1),attr:V.attr}}}}function ve(N,G){var j=n(G,N).get();if(j!==void 0)return j;var V=N.split(".");for(V.pop();V.length>1;)if(V.pop(),j=n(G,V.join(".")+".uirevision").get(),j!==void 0)return j;return G.uirevision}function ye(N,G){for(var j=0;j<G.length;j++)if(G[j]._fullInput.uid===N)return j;return-1}function le(N,G,j){for(var V=0;V<G.length;V++)if(G[V].uid===N)return V;return!G[j]||G[j].uid?-1:j}function fe(N,G){var j=i.isPlainObject(N),V=Array.isArray(N);return j||V?(j&&i.isPlainObject(G)||V&&Array.isArray(G))&&JSON.stringify(N)===JSON.stringify(G):N===G}function Te(N,G,j,V){var ee=V._preGUI,Q,ge,_e,ce,ie,Me,Ne,je,Ze,nt,dt=[],Ue={},St={};for(Q in ee){if(ie=pe(Q,Ce),ie){if(Ze=ie.head,nt=ie.tail,ge=ie.attr||Ze+".uirevision",_e=n(V,ge).get(),ce=_e&&ve(ge,G),ce&&ce===_e){if(Me=ee[Q],Me===null&&(Me=void 0),Ne=n(G,Q),je=Ne.get(),fe(je,Me)){je===void 0&&nt==="autorange"&&dt.push(Ze),Ne.set(ae(n(V,Q).get()));continue}else if(nt==="autorange"||nt.substr(0,6)==="range["){var at=ee[Ze+".range[0]"],qe=ee[Ze+".range[1]"],yt=ee[Ze+".autorange"];if(yt||yt===null&&at===null&&qe===null){if(!(Ze in Ue)){var ht=n(G,Ze).get();Ue[Ze]=ht&&(ht.autorange||ht.autorange!==!1&&(!ht.range||ht.range.length!==2))}if(Ue[Ze]){Ne.set(ae(n(V,Q).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+Q);delete ee[Q],ie&&ie.tail.substr(0,6)==="range["&&(St[ie.head]=1)}for(var et=0;et<dt.length;et++){var Qe=dt[et];if(St[Qe]){var Ge=n(G,Qe).get();Ge&&delete Ge.autorange}}var We=V._tracePreGUI;for(var ct in We){var rt=We[ct],Be=null,vt;for(Q in rt){if(!Be){var kt=ye(ct,j);if(kt<0){delete We[ct];break}var nr=j[kt];vt=nr._fullInput;var rr=le(ct,N,vt.index);if(rr<0){delete We[ct];break}Be=N[rr]}if(ie=pe(Q,q),ie){if(ie.attr?(_e=n(V,ie.attr).get(),ce=_e&&ve(ie.attr,G)):(_e=vt.uirevision,ce=Be.uirevision,ce===void 0&&(ce=G.uirevision)),ce&&ce===_e&&(Me=rt[Q],Me===null&&(Me=void 0),Ne=n(Be,Q),je=Ne.get(),fe(je,Me))){Ne.set(ae(n(vt,Q).get()));continue}}else i.warn("unrecognized GUI edit: "+Q+" in trace uid "+ct);delete rt[Q]}}}function xe(N,G,j,V){var ee,Q;function ge(){return t.addFrames(N,ee)}N=i.getGraphDiv(N),w.clearPromiseQueue(N);var _e=N._fullData,ce=N._fullLayout;if(!i.isPlotDiv(N)||!_e||!ce)Q=t.newPlot(N,G,j,V);else{if(i.isPlainObject(G)){var ie=G;G=ie.data,j=ie.layout,V=ie.config,ee=ie.frames}var Me=!1;if(V){var Ne=i.extendDeep({},N._context);N._context=void 0,E(N,V),Me=Oe(Ne,N._context)}N.data=G||[],w.cleanData(N.data),N.layout=j||{},w.cleanLayout(N.layout),Te(N.data,N.layout,_e,ce),c.supplyDefaults(N,{skipUpdateCalc:!0});var je=N._fullData,Ze=N._fullLayout,nt=Ze.datarevision===void 0,dt=Ze.transition,Ue=Ae(N,ce,Ze,nt,dt),St=Ue.newDataRevision,at=be(N,_e,je,nt,dt,St);if(we(N)&&(Ue.layoutReplot=!0),at.calc||Ue.calc){N.calcdata=void 0;for(var qe=Object.getOwnPropertyNames(Ze),yt=0;yt<qe.length;yt++){var ht=qe[yt],et=ht.substring(0,5);if(et==="xaxis"||et==="yaxis"){var Qe=Ze[ht]._emptyCategories;Qe&&Qe()}}}else c.supplyDefaultsUpdateCalc(N.calcdata,je);var Ge=[];if(ee&&(N._transitionData={},c.createTransitionData(N),Ge.push(ge)),Ze.transition&&!Me&&(at.anim||Ue.anim))Ue.ticks&&Ge.push(m.doTicksRelayout),c.doCalcdata(N),m.doAutoRangeAndConstraints(N),Ge.push(function(){return c.transitionFromReact(N,at,Ue,ce)});else if(at.fullReplot||Ue.layoutReplot||Me)N._fullLayout._skipDefaults=!0,Ge.push(t._doPlot);else{for(var We in Ue.arrays){var ct=Ue.arrays[We];if(ct.length){var rt=s.getComponentMethod(We,"drawOne");if(rt!==i.noop)for(var Be=0;Be<ct.length;Be++)rt(N,ct[Be]);else{var vt=s.getComponentMethod(We,"draw");if(vt===i.noop)throw new Error("cannot draw components: "+We);vt(N)}}}Ge.push(c.previousPromises),at.style&&Ge.push(m.doTraceStyle),(at.colorbars||Ue.colorbars)&&Ge.push(m.doColorBars),Ue.legend&&Ge.push(m.doLegend),Ue.layoutstyle&&Ge.push(m.layoutStyles),Ue.axrange&&ze(Ge),Ue.ticks&&Ge.push(m.doTicksRelayout),Ue.modebar&&Ge.push(m.doModeBar),Ue.camera&&Ge.push(m.doCamera),Ge.push(A)}Ge.push(c.rehover,c.redrag),Q=i.syncOrAsync(Ge,N),(!Q||!Q.then)&&(Q=Promise.resolve(N))}return Q.then(function(){return N.emit("plotly_react",{data:G,layout:j}),N})}function be(N,G,j,V,ee,Q){var ge=G.length===j.length;if(!ee&&!ge)return{fullReplot:!0,calc:!0};var _e=y.traceFlags();_e.arrays={},_e.nChanges=0,_e.nChangesAnim=0;var ce,ie;function Me(Ze){var nt=f.getTraceValObject(ie,Ze);return!ie._module.animatable&&nt.anim&&(nt.anim=!1),nt}var Ne={getValObject:Me,flags:_e,immutable:V,transition:ee,newDataRevision:Q,gd:N},je={};for(ce=0;ce<G.length;ce++)if(j[ce]){if(ie=j[ce]._fullInput,c.hasMakesDataTransform(ie)&&(ie=j[ce]),je[ie.uid])continue;je[ie.uid]=1,De(G[ce]._fullInput,ie,[],Ne)}return(_e.calc||_e.plot)&&(_e.fullReplot=!0),ee&&_e.nChanges&&_e.nChangesAnim&&(_e.anim=_e.nChanges===_e.nChangesAnim&&ge?"all":"some"),_e}function Ae(N,G,j,V,ee){var Q=y.layoutFlags();Q.arrays={},Q.rangesAltered={},Q.nChanges=0,Q.nChangesAnim=0;function ge(ce){return f.getLayoutValObject(j,ce)}var _e={getValObject:ge,flags:Q,immutable:V,transition:ee,gd:N};return De(G,j,[],_e),(Q.plot||Q.calc)&&(Q.layoutReplot=!0),ee&&Q.nChanges&&Q.nChangesAnim&&(Q.anim=Q.nChanges===Q.nChangesAnim?"all":"some"),Q}function De(N,G,j,V){var ee,Q,ge,_e=V.getValObject,ce=V.flags,ie=V.immutable,Me=V.inArray,Ne=V.arrayIndex;function je(){var kt=ee.editType;if(Me&&kt.indexOf("arraydraw")!==-1){i.pushUnique(ce.arrays[Me],Ne);return}y.update(ce,ee),kt!=="none"&&ce.nChanges++,V.transition&&ee.anim&&ce.nChangesAnim++,(he.test(ge)||te.test(ge))&&(ce.rangesAltered[j[0]]=1),ue.test(ge)&&n(G,"_inputDomain").set(null),Q==="datarevision"&&(ce.newDataRevision=1)}function Ze(kt){return kt.valType==="data_array"||kt.arrayOk}for(Q in N){if(ce.calc&&!V.transition)return;var nt=N[Q],dt=G[Q],Ue=j.concat(Q);if(ge=Ue.join("."),!(Q.charAt(0)==="_"||typeof nt=="function"||nt===dt)){if((Q==="tick0"||Q==="dtick")&&j[0]!=="geo"){var St=G.tickmode;if(St==="auto"||St==="array"||!St)continue}if(!(Q==="range"&&G.autorange)&&!((Q==="zmin"||Q==="zmax")&&G.type==="contourcarpet")&&(ee=_e(Ue),!!ee&&!(ee._compareAsJSON&&JSON.stringify(nt)===JSON.stringify(dt)))){var at=ee.valType,qe,yt=Ze(ee),ht=Array.isArray(nt),et=Array.isArray(dt);if(ht&&et){var Qe="_input_"+Q,Ge=N[Qe],We=G[Qe];if(Array.isArray(Ge)&&Ge===We)continue}if(dt===void 0)yt&&ht?ce.calc=!0:je();else if(ee._isLinkedToArray){var ct=[],rt=!1;Me||(ce.arrays[Q]=ct);var Be=Math.min(nt.length,dt.length),vt=Math.max(nt.length,dt.length);if(Be!==vt)if(ee.editType==="arraydraw")rt=!0;else{je();continue}for(qe=0;qe<Be;qe++)De(nt[qe],dt[qe],Ue.concat(qe),i.extendFlat({inArray:Q,arrayIndex:qe},V));if(rt)for(qe=Be;qe<vt;qe++)ct.push(qe)}else!at&&i.isPlainObject(nt)?De(nt,dt,Ue,V):yt?ht&&et?(ie&&(ce.calc=!0),(ie||V.newDataRevision)&&je()):ht!==et?ce.calc=!0:je():ht&&et?(nt.length!==dt.length||String(nt)!==String(dt))&&je():je()}}}for(Q in G)if(!(Q in N||Q.charAt(0)==="_"||typeof G[Q]=="function"))if(ee=_e(j.concat(Q)),Ze(ee)&&Array.isArray(G[Q])){ce.calc=!0;return}else je()}function Oe(N,G){var j;for(j in N)if(j.charAt(0)!=="_"){var V=N[j],ee=G[j];if(V!==ee)if(i.isPlainObject(V)&&i.isPlainObject(ee)){if(Oe(V,ee))return!0}else if(Array.isArray(V)&&Array.isArray(ee)){if(V.length!==ee.length)return!0;for(var Q=0;Q<V.length;Q++)if(V[Q]!==ee[Q])if(i.isPlainObject(V[Q])&&i.isPlainObject(ee[Q])){if(Oe(V[Q],ee[Q]))return!0}else return!0}else return!0}}function Fe(N,G,j){if(N=i.getGraphDiv(N),!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var V=N._transitionData;V._frameQueue||(V._frameQueue=[]),j=c.supplyAnimationDefaults(j);var ee=j.transition,Q=j.frame;V._frameWaitingCnt===void 0&&(V._frameWaitingCnt=0);function ge(ie){return Array.isArray(ee)?ie>=ee.length?ee[0]:ee[ie]:ee}function _e(ie){return Array.isArray(Q)?ie>=Q.length?Q[0]:Q[ie]:Q}function ce(ie,Me){var Ne=0;return function(){if(ie&&++Ne===Me)return ie()}}return new Promise(function(ie,Me){function Ne(){if(V._frameQueue.length!==0){for(;V._frameQueue.length;){var Be=V._frameQueue.pop();Be.onInterrupt&&Be.onInterrupt()}N.emit("plotly_animationinterrupted",[])}}function je(Be){if(Be.length!==0){for(var vt=0;vt<Be.length;vt++){var kt;Be[vt].type==="byname"?kt=c.computeFrame(N,Be[vt].name):kt=Be[vt].data;var nr=_e(vt),rr=ge(vt);rr.duration=Math.min(rr.duration,nr.duration);var pa={frame:kt,name:Be[vt].name,frameOpts:nr,transitionOpts:rr};vt===Be.length-1&&(pa.onComplete=ce(ie,2),pa.onInterrupt=Me),V._frameQueue.push(pa)}j.mode==="immediate"&&(V._lastFrameAt=-1/0),V._animationRaf||dt()}}function Ze(){N.emit("plotly_animated"),window.cancelAnimationFrame(V._animationRaf),V._animationRaf=null}function nt(){V._currentFrame&&V._currentFrame.onComplete&&V._currentFrame.onComplete();var Be=V._currentFrame=V._frameQueue.shift();if(Be){var vt=Be.name?Be.name.toString():null;N._fullLayout._currentFrame=vt,V._lastFrameAt=Date.now(),V._timeToNext=Be.frameOpts.duration,c.transition(N,Be.frame.data,Be.frame.layout,w.coerceTraceIndices(N,Be.frame.traces),Be.frameOpts,Be.transitionOpts).then(function(){Be.onComplete&&Be.onComplete()}),N.emit("plotly_animatingframe",{name:vt,frame:Be.frame,animation:{frame:Be.frameOpts,transition:Be.transitionOpts}})}else Ze()}function dt(){N.emit("plotly_animating"),V._lastFrameAt=-1/0,V._timeToNext=0,V._runningTransitions=0,V._currentFrame=null;var Be=function(){V._animationRaf=window.requestAnimationFrame(Be),Date.now()-V._lastFrameAt>V._timeToNext&&nt()};Be()}var Ue=0;function St(Be){return Array.isArray(ee)?Ue>=ee.length?Be.transitionOpts=ee[Ue]:Be.transitionOpts=ee[0]:Be.transitionOpts=ee,Ue++,Be}var at,qe,yt=[],ht=G==null,et=Array.isArray(G),Qe=!ht&&!et&&i.isPlainObject(G);if(Qe)yt.push({type:"object",data:St(i.extendFlat({},G))});else if(ht||["string","number"].indexOf(typeof G)!==-1)for(at=0;at<V._frames.length;at++)qe=V._frames[at],!!qe&&(ht||String(qe.group)===String(G))&&yt.push({type:"byname",name:String(qe.name),data:St({name:qe.name})});else if(et)for(at=0;at<G.length;at++){var Ge=G[at];["number","string"].indexOf(typeof Ge)!==-1?(Ge=String(Ge),yt.push({type:"byname",name:Ge,data:St({name:Ge})})):i.isPlainObject(Ge)&&yt.push({type:"object",data:St(i.extendFlat({},Ge))})}for(at=0;at<yt.length;at++)if(qe=yt[at],qe.type==="byname"&&!V._frameHash[qe.data.name]){i.warn('animate failure: frame not found: "'+qe.data.name+'"'),Me();return}["next","immediate"].indexOf(j.mode)!==-1&&Ne(),j.direction==="reverse"&&yt.reverse();var We=N._fullLayout._currentFrame;if(We&&j.fromcurrent){var ct=-1;for(at=0;at<yt.length;at++)if(qe=yt[at],qe.type==="byname"&&qe.name===We){ct=at;break}if(ct>0&&ct<yt.length-1){var rt=[];for(at=0;at<yt.length;at++)qe=yt[at],(yt[at].type!=="byname"||at>ct)&&rt.push(qe);yt=rt}}yt.length>0?je(yt):(N.emit("plotly_animated"),ie())})}function st(N,G,j){if(N=i.getGraphDiv(N),G==null)return Promise.resolve();if(!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var V,ee,Q,ge,_e=N._transitionData._frames,ce=N._transitionData._frameHash;if(!Array.isArray(G))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+G);var ie=_e.length+G.length*2,Me=[],Ne={};for(V=G.length-1;V>=0;V--)if(!!i.isPlainObject(G[V])){var je=G[V].name,Ze=(ce[je]||Ne[je]||{}).name,nt=G[V].name,dt=ce[Ze]||Ne[Ze];Ze&&nt&&typeof nt=="number"&&dt&&T<k&&(T++,i.warn('addFrames: overwriting frame "'+(ce[Ze]||Ne[Ze]).name+'" with a frame whose name of type "number" also equates to "'+Ze+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),T===k&&i.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),Ne[je]={name:je},Me.push({frame:c.supplyFrameDefaults(G[V]),index:j&&j[V]!==void 0&&j[V]!==null?j[V]:ie+V})}Me.sort(function(Qe,Ge){return Qe.index>Ge.index?-1:Qe.index<Ge.index?1:0});var Ue=[],St=[],at=_e.length;for(V=Me.length-1;V>=0;V--){if(ee=Me[V].frame,typeof ee.name=="number"&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!ee.name)for(;ce[ee.name="frame "+N._transitionData._counter++];);if(ce[ee.name]){for(Q=0;Q<_e.length&&(_e[Q]||{}).name!==ee.name;Q++);Ue.push({type:"replace",index:Q,value:ee}),St.unshift({type:"replace",index:Q,value:_e[Q]})}else ge=Math.max(0,Math.min(Me[V].index,at)),Ue.push({type:"insert",index:ge,value:ee}),St.unshift({type:"delete",index:ge}),at++}var qe=c.modifyFrames,yt=c.modifyFrames,ht=[N,St],et=[N,Ue];return l&&l.add(N,qe,ht,yt,et),c.modifyFrames(N,Ue)}function Xe(N,G){if(N=i.getGraphDiv(N),!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N);var j,V,ee=N._transitionData._frames,Q=[],ge=[];if(!G)for(G=[],j=0;j<ee.length;j++)G.push(j);for(G=G.slice(),G.sort(),j=G.length-1;j>=0;j--)V=G[j],Q.push({type:"delete",index:V}),ge.unshift({type:"insert",index:V,value:ee[V]});var _e=c.modifyFrames,ce=c.modifyFrames,ie=[N,ge],Me=[N,Q];return l&&l.add(N,_e,ie,ce,Me),c.modifyFrames(N,Q)}function ut(N){N=i.getGraphDiv(N);var G=N._fullLayout||{},j=N._fullData||[];return c.cleanPlot([],{},j,G),c.purge(N),o.purge(N),G._container&&G._container.remove(),delete N._context,N}function Ke(N){var G=N._fullLayout,j=N.getBoundingClientRect();if(!i.equalDomRects(j,G._lastBBox)){var V=G._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(N));G._invScaleX=Math.sqrt(V[0][0]*V[0][0]+V[0][1]*V[0][1]+V[0][2]*V[0][2]),G._invScaleY=Math.sqrt(V[1][0]*V[1][0]+V[1][1]*V[1][1]+V[1][2]*V[1][2]),G._lastBBox=j}}function ft(N){var G=e.select(N),j=N._fullLayout;if(j._calcInverseTransform=Ke,j._calcInverseTransform(N),j._container=G.selectAll(".plot-container").data([0]),j._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),j._paperdiv=j._container.selectAll(".svg-container").data([0]),j._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),j._glcontainer=j._paperdiv.selectAll(".gl-container").data([{}]),j._glcontainer.enter().append("div").classed("gl-container",!0),j._paperdiv.selectAll(".main-svg").remove(),j._paperdiv.select(".modebar-container").remove(),j._paper=j._paperdiv.insert("svg",":first-child").classed("main-svg",!0),j._toppaper=j._paperdiv.append("svg").classed("main-svg",!0),j._modebardiv=j._paperdiv.append("div"),delete j._modeBar,j._hoverpaper=j._paperdiv.append("svg").classed("main-svg",!0),!j._uid){var V={};e.selectAll("defs").each(function(){this.id&&(V[this.id.split("-")[1]]=1)}),j._uid=i.randstr(V)}j._paperdiv.selectAll(".main-svg").attr(p.svgAttrs),j._defs=j._paper.append("defs").attr("id","defs-"+j._uid),j._clips=j._defs.append("g").classed("clips",!0),j._topdefs=j._toppaper.append("defs").attr("id","topdefs-"+j._uid),j._topclips=j._topdefs.append("g").classed("clips",!0),j._bgLayer=j._paper.append("g").classed("bglayer",!0),j._draggers=j._paper.append("g").classed("draglayer",!0);var ee=j._paper.append("g").classed("layer-below",!0);j._imageLowerLayer=ee.append("g").classed("imagelayer",!0),j._shapeLowerLayer=ee.append("g").classed("shapelayer",!0),j._cartesianlayer=j._paper.append("g").classed("cartesianlayer",!0),j._polarlayer=j._paper.append("g").classed("polarlayer",!0),j._smithlayer=j._paper.append("g").classed("smithlayer",!0),j._ternarylayer=j._paper.append("g").classed("ternarylayer",!0),j._geolayer=j._paper.append("g").classed("geolayer",!0),j._funnelarealayer=j._paper.append("g").classed("funnelarealayer",!0),j._pielayer=j._paper.append("g").classed("pielayer",!0),j._iciclelayer=j._paper.append("g").classed("iciclelayer",!0),j._treemaplayer=j._paper.append("g").classed("treemaplayer",!0),j._sunburstlayer=j._paper.append("g").classed("sunburstlayer",!0),j._indicatorlayer=j._toppaper.append("g").classed("indicatorlayer",!0),j._glimages=j._paper.append("g").classed("glimages",!0);var Q=j._toppaper.append("g").classed("layer-above",!0);j._imageUpperLayer=Q.append("g").classed("imagelayer",!0),j._shapeUpperLayer=Q.append("g").classed("shapelayer",!0),j._infolayer=j._toppaper.append("g").classed("infolayer",!0),j._menulayer=j._toppaper.append("g").classed("menulayer",!0),j._zoomlayer=j._toppaper.append("g").classed("zoomlayer",!0),j._hoverlayer=j._hoverpaper.append("g").classed("hoverlayer",!0),j._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),N.emit("plotly_framework")}t.animate=Fe,t.addFrames=st,t.deleteFrames=Xe,t.addTraces=Y,t.deleteTraces=W,t.extendTraces=X,t.moveTraces=K,t.prependTraces=O,t.newPlot=P,t._doPlot=S,t.purge=ut,t.react=xe,t.redraw=I,t.relayout=Re,t.restyle=Z,t.setPlotConfig=$,t.update=Pe,t._guiRelayout=Ee(Re),t._guiRestyle=Ee(Z),t._guiUpdate=Ee(Pe),t._storeDirectGUIEdit=re})(Jd);var br={},w3=Ve;br.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0};br.getRedrawFunc=function(t){return function(){w3.getComponentMethod("colorbar","draw")(t)}};br.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)};br.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var rw=window.URL||window.webkitURL;br.createObjectURL=function(t){return rw.createObjectURL(t)};br.revokeObjectURL=function(t){return rw.revokeObjectURL(t)};br.createBlob=function(t,e){if(e==="svg")return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if(e==="full-json")return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=T3(window.atob(t));return new window.Blob([r],{type:"image/"+e})};br.octetStream=function(t){document.location.href="data:application/octet-stream"+t};function T3(t){for(var e=t.length,r=new ArrayBuffer(e),a=new Uint8Array(r),i=0;i<e;i++)a[i]=t.charCodeAt(i);return r}br.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/;br.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.";var fd=tt.exports,k3=de.exports,A3=Tt.exports,M3=Je.exports,ws=on,ku=/"/g,rl="TOBESTRIPPED",S3=new RegExp('("'+rl+")|("+rl+'")',"g");function L3(t){var e=fd.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(a){return a==="&lt;"?"&#60;":a==="&rt;"?"&#62;":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":e.html(a).text()});return e.remove(),r}function C3(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}var Bh=function(e,r,a){var i=e._fullLayout,n=i._paper,o=i._toppaper,l=i.width,s=i.height,f;n.insert("rect",":first-child").call(A3.setRect,0,0,l,s).call(M3.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(f=0;f<c.length;f++){var v=c[f];v.toSVG&&v.toSVG(e)}if(o){var u=o.node().childNodes,d=Array.prototype.slice.call(u);for(f=0;f<d.length;f++){var h=d[f];h.childNodes.length&&n.node().appendChild(h)}}i._draggers&&i._draggers.remove(),n.node().style.background="",n.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var g=fd.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){g.remove();return}else g.style({visibility:null,display:null});var _=this.style.fontFamily;_&&_.indexOf('"')!==-1&&g.style("font-family",_.replace(ku,rl))}),n.selectAll(".gradient_filled,.pattern_filled").each(function(){var g=fd.select(this),_=this.style.fill;_&&_.indexOf("url(")!==-1&&g.style("fill",_.replace(ku,rl));var b=this.style.stroke;b&&b.indexOf("url(")!==-1&&g.style("stroke",b.replace(ku,rl))}),(r==="pdf"||r==="eps")&&n.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),n.node().setAttributeNS(ws.xmlns,"xmlns",ws.svg),n.node().setAttributeNS(ws.xmlns,"xmlns:xlink",ws.xlink),r==="svg"&&a&&(n.attr("width",a*l),n.attr("height",a*s),n.attr("viewBox","0 0 "+l+" "+s));var p=new window.XMLSerializer().serializeToString(n.node());return p=L3(p),p=C3(p),p=p.replace(S3,"'"),k3.isIE()&&(p=p.replace(/"/gi,"'"),p=p.replace(/(\('#)([^']*)('\))/gi,'("#$2")'),p=p.replace(/(\\')/gi,'"')),p},Ry=de.exports,D3=zd.exports.EventEmitter,xn=br;function $3(t){var e=t.emitter||new D3,r=new Promise(function(a,i){var n=window.Image,o=t.svg,l=t.format||"png";if(Ry.isIE()&&l!=="svg"){var s=new Error(xn.MSG_IE_BAD_FORMAT);return i(s),t.promise?r:e.emit("error",s)}var f=t.canvas,c=t.scale||1,v=t.width||300,u=t.height||150,d=c*v,h=c*u,p=f.getContext("2d"),g=new n,_,b;l==="svg"||Ry.isSafari()?b=xn.encodeSVG(o):(_=xn.createBlob(o,"svg"),b=xn.createObjectURL(_)),f.width=d,f.height=h,g.onload=function(){var w;switch(_=null,xn.revokeObjectURL(b),l!=="svg"&&p.drawImage(g,0,0,d,h),l){case"jpeg":w=f.toDataURL("image/jpeg");break;case"png":w=f.toDataURL("image/png");break;case"webp":w=f.toDataURL("image/webp");break;case"svg":w=b;break;default:var m="Image format is not jpeg, png, svg or webp.";if(i(new Error(m)),!t.promise)return e.emit("error",m)}a(w),t.promise||e.emit("success",w)},g.onerror=function(w){if(_=null,xn.revokeObjectURL(b),i(w),!t.promise)return e.emit("error",w)},g.src=b});return t.promise?r:e}var jh=$3,Py=lt,zy=Jd,E3=Ut.exports,_a=de.exports,Io=br,R3=Bh,P3=jh,z3=jf.version,Au={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}};function I3(t,e){e=e||{};var r,a,i,n;_a.isPlainObject(t)?(r=t.data||[],a=t.layout||{},i=t.config||{},n={}):(t=_a.getGraphDiv(t),r=_a.extendDeep([],t.data),a=_a.extendDeep({},t.layout),i=t._context,n=t._fullLayout||{});function o(x){return!(x in e)||_a.validate(e[x],Au[x])}if(!o("width")&&e.width!==null||!o("height")&&e.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+_a.join2(Au.format.values,", "," or ")+".");var l={};function s(x,T){return _a.coerce(e,l,Au,x,T)}var f=s("format"),c=s("width"),v=s("height"),u=s("scale"),d=s("setBackground"),h=s("imageDataOnly"),p=document.createElement("div");p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var g=_a.extendFlat({},a);c?g.width=c:e.width===null&&Py(n.width)&&(g.width=n.width),v?g.height=v:e.height===null&&Py(n.height)&&(g.height=n.height);var _=_a.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),b=Io.getRedrawFunc(p);function w(){return new Promise(function(x){setTimeout(x,Io.getDelay(p._fullLayout))})}function m(){return new Promise(function(x,T){var k=R3(p,f,u),S=p._fullLayout.width,A=p._fullLayout.height;function $(){zy.purge(p),document.body.removeChild(p)}if(f==="full-json"){var M=E3.graphJson(p,!1,"keepdata","object",!0,!0);return M.version=z3,M=JSON.stringify(M),$(),x(h?M:Io.encodeJSON(M))}if($(),f==="svg")return x(h?k:Io.encodeSVG(k));var C=document.createElement("canvas");C.id=_a.randstr(),P3({format:f,width:S,height:A,scale:u,canvas:C,svg:k,promise:!0}).then(x).catch(T)})}function y(x){return h?x.replace(Io.IMAGE_URL_PREFIX,""):x}return new Promise(function(x,T){zy.newPlot(p,r,g,_).then(b).then(w).then(m).then(function(k){x(y(k))}).catch(function(k){T(k)})})}var aw=I3,Yr=de.exports,N3=Ut.exports,F3=po,H3=uo.dfltConfig,Br=Yr.isPlainObject,vi=Array.isArray,Iy=Yr.isArrayOrTypedArray,O3=function(e,r){e===void 0&&(e=[]),r===void 0&&(r={});var a=F3.get(),i=[],n={_context:Yr.extendFlat({},H3)},o,l;vi(e)?(n.data=Yr.extendDeep([],e),o=e):(n.data=[],o=[],i.push(Xt("array","data"))),Br(r)?(n.layout=Yr.extendDeep({},r),l=r):(n.layout={},l={},arguments.length>1&&i.push(Xt("object","layout"))),N3.supplyDefaults(n);for(var s=n._fullData,f=o.length,c=0;c<f;c++){var v=o[c],u=["data",c];if(!Br(v)){i.push(Xt("object",u));continue}var d=s[c],h=d.type,p=a.traces[h].attributes;p.type={valType:"enumerated",values:[h]},d.visible===!1&&v.visible!==!1&&i.push(Xt("invisible",u)),al(v,d,p,i,u);var g=v.transforms,_=d.transforms;if(g){vi(g)||i.push(Xt("array",u,["transforms"])),u.push("transforms");for(var b=0;b<g.length;b++){var w=["transforms",b],m=g[b].type;if(!Br(g[b])){i.push(Xt("object",u,w));continue}var y=a.transforms[m]?a.transforms[m].attributes:{};y.type={valType:"enumerated",values:Object.keys(a.transforms)},al(g[b],_[b],y,i,u,w)}}}var x=n._fullLayout,T=B3(a,s);return al(l,x,T,i,"layout"),i.length===0?void 0:i};function al(t,e,r,a,i,n){n=n||[];for(var o=Object.keys(t),l=0;l<o.length;l++){var s=o[l];if(s!=="transforms"){var f=n.slice();f.push(s);var c=t[s],v=e[s],u=U3(r,s),d=(u||{}).valType,h=d==="info_array",p=d==="colorscale",g=(u||{}).items;if(!G3(r,s))a.push(Xt("schema",i,f));else if(Br(c)&&Br(v)&&d!=="any")al(c,v,u,a,i,f);else if(h&&vi(c)){c.length>v.length&&a.push(Xt("unused",i,f.concat(v.length)));var _=v.length,b=Array.isArray(g);b&&(_=Math.min(_,g.length));var w,m,y,x,T;if(u.dimensions===2)for(m=0;m<_;m++)if(vi(c[m])){c[m].length>v[m].length&&a.push(Xt("unused",i,f.concat(m,v[m].length)));var k=v[m].length;for(w=0;w<(b?Math.min(k,g[m].length):k);w++)y=b?g[m][w]:g,x=c[m][w],T=v[m][w],Yr.validate(x,y)?T!==x&&T!==+x&&a.push(Xt("dynamic",i,f.concat(m,w),x,T)):a.push(Xt("value",i,f.concat(m,w),x))}else a.push(Xt("array",i,f.concat(m),c[m]));else for(m=0;m<_;m++)y=b?g[m]:g,x=c[m],T=v[m],Yr.validate(x,y)?T!==x&&T!==+x&&a.push(Xt("dynamic",i,f.concat(m),x,T)):a.push(Xt("value",i,f.concat(m),x))}else if(u.items&&!h&&vi(c)){var S=g[Object.keys(g)[0]],A=[],$,M;for($=0;$<v.length;$++){var C=v[$]._index||$;if(M=f.slice(),M.push(C),Br(c[C])&&Br(v[$])){A.push(C);var E=c[C],I=v[$];Br(E)&&E.visible!==!1&&I.visible===!1?a.push(Xt("invisible",i,M)):al(E,I,S,a,i,M)}}for($=0;$<c.length;$++)M=f.slice(),M.push($),Br(c[$])?A.indexOf($)===-1&&a.push(Xt("unused",i,M)):a.push(Xt("object",i,M,c[$]))}else!Br(c)&&Br(v)?a.push(Xt("object",i,f,c)):!Iy(c)&&Iy(v)&&!h&&!p?a.push(Xt("array",i,f,c)):s in e?Yr.validate(c,u)?u.valType==="enumerated"&&(u.coerceNumber&&c!==+v||c!==v)&&a.push(Xt("dynamic",i,f,c,v)):a.push(Xt("value",i,f,c)):a.push(Xt("unused",i,f,c))}}return a}function B3(t,e){for(var r=t.layout.layoutAttributes,a=0;a<e.length;a++){var i=e[a],n=t.traces[i.type],o=n.layoutAttributes;o&&(i.subplot?Yr.extendFlat(r[n.attributes.subplot.dflt],o):Yr.extendFlat(r,o))}return r}var j3={object:function(t,e){var r;return t==="layout"&&e===""?r="The layout argument":t[0]==="data"&&e===""?r="Trace "+t[1]+" in the data argument":r=Di(t)+"key "+e,r+" must be linked to an object container"},array:function(t,e){var r;return t==="data"?r="The data argument":r=Di(t)+"key "+e,r+" must be linked to an array container"},schema:function(t,e){return Di(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var a=Br(r)?"container":"key";return Di(t)+a+" "+e+" did not get coerced"},dynamic:function(t,e,r,a){return[Di(t)+"key",e,"(set to '"+r+"')","got reset to","'"+a+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?Di(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[Di(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function Di(t){return vi(t)?"In data trace "+t[1]+", ":"In "+t+", "}function Xt(t,e,r,a,i){r=r||"";var n,o;vi(e)?(n=e[0],o=e[1]):(n=e,o=null);var l=q3(r),s=j3[t](e,l,a,i);return Yr.log(s),{code:t,container:n,trace:o,path:r,astr:l,msg:s}}function G3(t,e){var r=iw(e),a=r.keyMinusId,i=r.id;return a in t&&t[a]._isSubplotObj&&i?!0:e in t}function U3(t,e){if(e in t)return t[e];var r=iw(e);return t[r.keyMinusId]}var V3=Yr.counterRegex("([a-z]+)");function iw(t){var e=t.match(V3);return{keyMinusId:e&&e[1],id:e&&e[2]}}function q3(t){if(!vi(t))return String(t);for(var e="",r=0;r<t.length;r++){var a=t[r];typeof a=="number"?e=e.substr(0,e.length-1)+"["+a+"]":e+=a,r<t.length-1&&(e+=".")}return e}var Ny=de.exports,No=br;function X3(t,e,r){var a=document.createElement("a"),i="download"in a,n=new Promise(function(o,l){var s,f;if(Ny.isIE())return s=No.createBlob(t,"svg"),window.navigator.msSaveBlob(s,e),s=null,o(e);if(i)return s=No.createBlob(t,r),f=No.createObjectURL(s),a.href=f,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),No.revokeObjectURL(f),s=null,o(e);if(Ny.isSafari()){var c=r==="svg"?",":";base64,";return No.octetStream(c+encodeURIComponent(t)),o(e)}l(new Error("download error"))});return n}var Y3=X3,Mu=de.exports,W3=aw,Z3=Y3,K3=br;function Q3(t,e){var r;return Mu.isPlainObject(t)||(r=Mu.getGraphDiv(t)),e=e||{},e.format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise(function(a,i){r&&r._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),Mu.isIE()&&e.format!=="svg"&&i(new Error(K3.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var n=W3(t,e),o=e.filename||t.fn||"newplot";o+="."+e.format.replace("-","."),n.then(function(l){return r&&(r._snapshotInProgress=!1),Z3(l,o,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),i(l)})})}var nw=Q3,Gh={},kr=de.exports,Ar=kr.isPlainObject,ow=po,lw=Ut.exports,J3=La,sw=Mt,fw=uo.dfltConfig;Gh.makeTemplate=function(t){t=kr.isPlainObject(t)?t:kr.getGraphDiv(t),t=kr.extendDeep({_context:fw},{data:t.data,layout:t.layout}),lw.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var a={data:{},layout:{}};e.forEach(function(d){var h={};il(d,h,t$.bind(null,d));var p=kr.coerce(d,{},J3,"type"),g=a.data[p];g||(g=a.data[p]=[]),g.push(h)}),il(r,a.layout,e$.bind(null,r)),delete a.layout.template;var i=r.template;if(Ar(i)){var n=i.layout,o,l,s,f,c,v;Ar(n)&&Af(n,a.layout);var u=i.data;if(Ar(u)){for(l in a.data)if(s=u[l],Array.isArray(s)){for(c=a.data[l],v=c.length,f=s.length,o=0;o<v;o++)Af(s[o%f],c[o]);for(o=v;o<f;o++)c.push(kr.extendDeep({},s[o]))}for(l in u)l in a.data||(a.data[l]=kr.extendDeep([],u[l]))}}return a};function Af(t,e){t=kr.extendDeep({},t);var r=Object.keys(t).sort(),a,i;function n(c,v,u){if(Ar(v)&&Ar(c))Af(c,v);else if(Array.isArray(v)&&Array.isArray(c)){var d=sw.arrayTemplater({_template:t},u);for(i=0;i<v.length;i++){var h=v[i],p=d.newItem(h)._template;p&&Af(p,h)}var g=d.defaultItems();for(i=0;i<g.length;i++)v.push(g[i]._template);for(i=0;i<v.length;i++)delete v[i].templateitemname}}for(a=0;a<r.length;a++){var o=r[a],l=t[o];if(o in e?n(l,e[o],o):e[o]=l,Mf(o)===o)for(var s in e){var f=Mf(s);s!==f&&f===o&&!(s in t)&&n(l,e[s],o)}}}function Mf(t){return t.replace(/[0-9]+$/,"")}function il(t,e,r,a,i){var n=i&&r(i);for(var o in t){var l=t[o],s=jr(t,o,a),f=jr(t,o,i),c=r(f);if(!c){var v=Mf(o);v!==o&&(f=jr(t,v,i),c=r(f))}if(!(n&&n===c)&&!(!c||c._noTemplating||c.valType==="data_array"||c.arrayOk&&Array.isArray(l)))if(!c.valType&&Ar(l))il(l,e,r,s,f);else if(c._isLinkedToArray&&Array.isArray(l))for(var u=!1,d=0,h={},p=0;p<l.length;p++){var g=l[p];if(Ar(g)){var _=g.name;if(_)h[_]||(il(g,e,r,jr(l,d,s),jr(l,d,f)),d++,h[_]=1);else if(!u){var b=sw.arrayDefaultKey(o),w=jr(t,b,a),m=jr(l,d,s);il(g,e,r,m,jr(l,d,f));var y=kr.nestedProperty(e,m),x=kr.nestedProperty(e,w);x.set(y.get()),y.set(null),u=!0}}}else{var T=kr.nestedProperty(e,s);T.set(l)}}}function e$(t,e){return ow.getLayoutValObject(t,kr.nestedProperty({},e).parts)}function t$(t,e){return ow.getTraceValObject(t,kr.nestedProperty({},e).parts)}function jr(t,e,r){var a;return r?Array.isArray(t)?a=r+"["+e+"]":a=r+"."+e:a=e,a}Gh.validateTemplate=function(t,e){var r=kr.extendDeep({},{_context:fw,data:t.data,layout:t.layout}),a=r.layout||{};Ar(e)||(e=a.template||{});var i=e.layout,n=e.data,o=[];r.layout=a,r.layout.template=e,lw.supplyDefaults(r);var l=r._fullLayout,s=r._fullData,f={};function c(w,m){for(var y in w)if(y.charAt(0)!=="_"&&Ar(w[y])){var x=Mf(y),T=[],k;for(k=0;k<m.length;k++)T.push(jr(w,y,m[k])),x!==y&&T.push(jr(w,x,m[k]));for(k=0;k<T.length;k++)f[T[k]]=1;c(w[y],T)}}function v(w,m){for(var y in w)if(y.indexOf("defaults")===-1&&Ar(w[y])){var x=jr(w,y,m);f[x]?v(w[y],x):o.push({code:"unused",path:x})}}if(Ar(i)?(c(l,["layout"]),v(i,"layout")):o.push({code:"layout"}),!Ar(n))o.push({code:"data"});else{for(var u={},d,h=0;h<s.length;h++){var p=s[h];d=p.type,u[d]=(u[d]||0)+1,p._fullInput._template||o.push({code:"missing",index:p._fullInput.index,traceType:d})}for(d in n){var g=n[d].length,_=u[d]||0;g>_?o.push({code:"unused",traceType:d,templateCount:g,dataCount:_}):_>g&&o.push({code:"reused",traceType:d,templateCount:g,dataCount:_})}}function b(w,m){for(var y in w)if(y.charAt(0)!=="_"){var x=w[y],T=jr(w,y,m);Ar(x)?(Array.isArray(w)&&x._template===!1&&x.templateitemname&&o.push({code:"missing",path:T,templateitemname:x.templateitemname}),b(x,T)):Array.isArray(x)&&r$(x)&&b(x,T)}}if(b({data:s,layout:l},""),o.length)return o.map(a$)};function r$(t){for(var e=0;e<t.length;e++)if(Ar(t[e]))return!0}function a$(t){var e;switch(t.code){case"data":e="The template has no key data.";break;case"layout":e="The template has no key layout.";break;case"missing":t.path?e="There are no templates for item "+t.path+" with name "+t.templateitemname:e="There are no templates for trace "+t.index+", of type "+t.traceType+".";break;case"unused":t.path?e="The template item at "+t.path+" was not used in constructing the plot.":t.dataCount?e="Some of the templates of type "+t.traceType+" were not used. The template has "+t.templateCount+" traces, the data only has "+t.dataCount+" of this type.":e="The template has "+t.templateCount+" traces of type "+t.traceType+" but there are none in the data.";break;case"reused":e="Some of the templates of type "+t.traceType+" were used more than once. The template has "+t.templateCount+" traces, the data has "+t.dataCount+" of this type.";break}return t.msg=e,t}var Kt=Jd;It._doPlot=Kt._doPlot;It.newPlot=Kt.newPlot;It.restyle=Kt.restyle;It.relayout=Kt.relayout;It.redraw=Kt.redraw;It.update=Kt.update;It._guiRestyle=Kt._guiRestyle;It._guiRelayout=Kt._guiRelayout;It._guiUpdate=Kt._guiUpdate;It._storeDirectGUIEdit=Kt._storeDirectGUIEdit;It.react=Kt.react;It.extendTraces=Kt.extendTraces;It.prependTraces=Kt.prependTraces;It.addTraces=Kt.addTraces;It.deleteTraces=Kt.deleteTraces;It.moveTraces=Kt.moveTraces;It.purge=Kt.purge;It.addFrames=Kt.addFrames;It.deleteFrames=Kt.deleteFrames;It.animate=Kt.animate;It.setPlotConfig=Kt.setPlotConfig;It.toImage=aw;It.validate=O3;It.downloadImage=nw;var cw=Gh;It.makeTemplate=cw.makeTemplate;It.validateTemplate=cw.validateTemplate;var Cr={},uw=u1,i$=uw.FORMAT_LINK,n$=uw.DATE_FORMAT_LINK;function vw(t){var e=t&&t.supportOther;return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,i$,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,n$,"for details on the date formatting syntax."].join(" ")}function dw(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var a=[],i=0;i<r.length;i++)a[i]="`"+r[i]+"`";e=e+"Finally, the template string has access to ",r.length===1?e="variable "+a[0]:e="variables "+a.slice(0,-1).join(", ")+" and "+a.slice(-1)+"."}return e}Cr.hovertemplateAttrs=function(t,e){t=t||{},e=e||{};var r=dw(e),a={valType:"string",dflt:"",editType:t.editType||"none",description:["Template string used for rendering the information that appear on hover box.","Note that this will override `hoverinfo`.",vw({supportOther:!0}),"The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data.","Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r,'Anything contained in tag `<extra>` is displayed in the secondary box, for example "<extra>{fullData.name}</extra>".',"To hide the secondary box completely, use an empty tag `<extra></extra>`."].join(" ")};return t.arrayOk!==!1&&(a.arrayOk=!0),a};Cr.texttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=dw(e),a={valType:"string",dflt:"",editType:t.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",vw(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return t.arrayOk!==!1&&(a.arrayOk=!0),a};var hc={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]},Fy=mo.axisHoverFormat,o$=Cr.texttemplateAttrs,l$=Cr.hovertemplateAttrs,Hy=ln,s$=dr,f$=Ga.dash,c$=Ga.pattern,u$=Tt.exports,Oy=hc,Su=Bt.extendFlat;function By(t){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M<n>* on the "+t+" axis.","Special values in the form of *M<n>* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function jy(t){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+t+" axis.","When `"+t+"period` is round number of weeks,","the `"+t+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function Gy(t){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+t+" axis."].join(" ")}}var xo={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:By("x"),yperiod:By("y"),xperiod0:jy("x0"),yperiod0:jy("y0"),xperiodalignment:Gy("x"),yperiodalignment:Gy("y"),xhoverformat:Fy("x"),yhoverformat:Fy("y"),stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:o$({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+Oy.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:l$({},{keys:Oy.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:Su({},f$,{editType:"style"}),simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},fillpattern:c$,marker:Su({symbol:{valType:"enumerated",values:u$.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:Su({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},Hy("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},Hy("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:s$({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."})},Lu=de.exports,v$=Ve,Uh=function(e,r,a,i){var n=i("x"),o=i("y"),l,s=v$.getComponentMethod("calendars","handleTraceDefaults");if(s(e,r,["x","y"],a),n){var f=Lu.minRowLength(n);o?l=Math.min(f,Lu.minRowLength(o)):(l=f,i("y0"),i("dy"))}else{if(!o)return 0;l=Lu.minRowLength(o),i("x0"),i("dx")}return r._length=l,l},Uy=de.exports.dateTick0,d$=Ot,h$=d$.ONEWEEK;function Vy(t,e){return t%h$===0?Uy(e,1):Uy(e,0)}var pc=function(e,r,a,i,n){if(n||(n={x:!0,y:!0}),n.x){var o=i("xperiod");o&&(i("xperiod0",Vy(o,r.xcalendar)),i("xperiodalignment"))}if(n.y){var l=i("yperiod");l&&(i("yperiod0",Vy(l,r.ycalendar)),i("yperiodalignment"))}},qy=["orientation","groupnorm","stackgaps"],p$=function(e,r,a,i){var n=a._scatterStackOpts,o=i("stackgroup");if(o){var l=r.xaxis+r.yaxis,s=n[l];s||(s=n[l]={});var f=s[o],c=!1;f?f.traces.push(r):(f=s[o]={traceIndices:[],traces:[r]},c=!0);for(var v={orientation:r.x&&!r.y?"h":"v"},u=0;u<qy.length;u++){var d=qy[u],h=d+"Found";if(!f[h]){var p=e[d]!==void 0,g=d==="orientation";if((p||c)&&(f[d]=i(d,v[d]),g&&(f.fillDflt=f[d]==="h"?"tonextx":"tonexty"),p&&(f[h]=!0,!c&&(delete f.traces[0][d],g))))for(var _=0;_<f.traces.length-1;_++){var b=f.traces[_];b._input.fill!==b.fill&&(b.fill=f.fillDflt)}}}return f}},Xy=Je.exports,Yy=da.hasColorscale,Wy=zl,m$=mr,hw=function(e,r,a,i,n,o){var l=m$.isBubble(e),s=(e.line||{}).color,f;if(o=o||{},s&&(a=s),n("marker.symbol"),n("marker.opacity",l?.7:1),n("marker.size"),n("marker.color",a),Yy(e,"marker")&&Wy(e,r,i,n,{prefix:"marker.",cLetter:"c"}),o.noSelect||(n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&r.marker.color!==s?f=s:l?f=Xy.background:f=Xy.defaultLine,n("marker.line.color",f),Yy(e,"marker.line")&&Wy(e,r,i,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width",l?1:0)),l&&(n("marker.sizeref"),n("marker.sizemin"),n("marker.sizemode")),o.gradient){var c=n("marker.gradient.type");c!=="none"&&n("marker.gradient.color")}},y$=de.exports.isArrayOrTypedArray,g$=da.hasColorscale,b$=zl,pw=function(e,r,a,i,n,o){var l=(e.marker||{}).color;if(n("line.color",a),g$(e,"line"))b$(e,r,i,n,{prefix:"line.",cLetter:"c"});else{var s=(y$(l)?!1:l)||a;n("line.color",s)}n("line.width"),(o||{}).noDash||n("line.dash")},x$=function(e,r,a){var i=a("line.shape");i==="spline"&&a("line.smoothing")},_$=de.exports,mw=function(t,e,r,a,i){i=i||{},a("textposition"),_$.coerceFont(a,"textfont",r.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))},w$=Je.exports,Zy=de.exports.isArrayOrTypedArray,yw=function(e,r,a,i){var n=!1;if(r.marker){var o=r.marker.color,l=(r.marker.line||{}).color;o&&!Zy(o)?n=o:l&&!Zy(l)&&(n=l)}i("fillcolor",w$.addOpacity((r.line||{}).color||n||a,.5))},Ky=de.exports,T$=Ve,k$=xo,A$=hc,_n=mr,M$=Uh,S$=pc,L$=p$,C$=hw,D$=pw,Qy=x$,$$=mw,E$=yw,R$=de.exports.coercePattern,P$=function(e,r,a,i){function n(d,h){return Ky.coerce(e,r,k$,d,h)}var o=M$(e,r,i,n);if(o||(r.visible=!1),!!r.visible){S$(e,r,i,n),n("xhoverformat"),n("yhoverformat");var l=L$(e,r,i,n),s=!l&&o<A$.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("mode",s),_n.hasLines(r)&&(D$(e,r,a,i,n),Qy(e,r,n),n("connectgaps"),n("line.simplify")),_n.hasMarkers(r)&&C$(e,r,a,i,n,{gradient:!0}),_n.hasText(r)&&(n("texttemplate"),$$(e,r,i,n));var f=[];(_n.hasMarkers(r)||_n.hasText(r))&&(n("cliponaxis"),n("marker.maxdisplayed"),f.push("points")),n("fill",l?l.fillDflt:"none"),r.fill!=="none"&&(E$(e,r,a,n),_n.hasLines(r)||Qy(e,r,n),R$(n,"fillpattern",r.fillcolor,!1));var c=(r.line||{}).color,v=(r.marker||{}).color;(r.fill==="tonext"||r.fill==="toself")&&f.push("fills"),n("hoveron",f.join("+")||"points"),r.hoveron!=="fills"&&n("hovertemplate");var u=T$.getComponentMethod("errorbars","supplyDefaults");u(e,r,c||v||a,{axis:"y"}),u(e,r,c||v||a,{axis:"x",inherit:"y"}),Ky.coerceSelectionMarkerOpacity(r,n)}},gw=function(e){for(var r=0;r<e.length;r++){var a=e[r];if(a.type==="scatter"){var i=a.fill;if(!(i==="none"||i==="toself")&&(a.opacity=void 0,i==="tonexty"||i==="tonextx"))for(var n=r-1;n>=0;n--){var o=e[n];if(o.type==="scatter"&&o.xaxis===a.xaxis&&o.yaxis===a.yaxis){o.opacity=void 0;break}}}}},z$=lt,bw=de.exports,I$=bw.dateTime2ms,Ts=bw.incrementMonth,N$=Ot,F$=N$.ONEAVGMONTH,mc=function(e,r,a,i){if(r.type!=="date")return{vals:i};var n=e[a+"periodalignment"];if(!n)return{vals:i};var o=e[a+"period"],l;if(z$(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:i}}for(var f=r.calendar,c=n==="start",v=n==="end",u=e[a+"period0"],d=I$(u,f)||0,h=[],p=[],g=[],_=i.length,b=0;b<_;b++){var w=i[b],m,y,x;if(l){for(m=Math.round((w-d)/(l*F$)),x=Ts(d,l*m,f);x>w;)x=Ts(x,-l,f);for(;x<=w;)x=Ts(x,l,f);y=Ts(x,-l,f)}else{for(m=Math.round((w-d)/o),x=d+m*o;x>w;)x-=o;for(;x<=w;)x+=o;y=x-o}h[b]=c?y:v?x:(y+x)/2,p[b]=y,g[b]=x}return{vals:h,starts:p,ends:g}},Cu=da.hasColorscale,Du=ah,Jy=mr,xw=function(e,r){Jy.hasLines(r)&&Cu(r,"line")&&Du(e,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),Jy.hasMarkers(r)&&(Cu(r,"marker")&&Du(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),Cu(r,"marker.line")&&Du(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))},cr=de.exports,_w=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;cr.mergeArray(r.text,e,"tx"),cr.mergeArray(r.texttemplate,e,"txt"),cr.mergeArray(r.hovertext,e,"htx"),cr.mergeArray(r.customdata,e,"data"),cr.mergeArray(r.textposition,e,"tp"),r.textfont&&(cr.mergeArrayCastPositive(r.textfont.size,e,"ts"),cr.mergeArray(r.textfont.color,e,"tc"),cr.mergeArray(r.textfont.family,e,"tf"));var i=r.marker;if(i){cr.mergeArrayCastPositive(i.size,e,"ms"),cr.mergeArrayCastPositive(i.opacity,e,"mo"),cr.mergeArray(i.symbol,e,"mx"),cr.mergeArray(i.color,e,"mc");var n=i.line;i.line&&(cr.mergeArray(n.color,e,"mlc"),cr.mergeArrayCastPositive(n.width,e,"mlw"));var o=i.gradient;o&&o.type!=="none"&&(cr.mergeArray(o.type,e,"mgt"),cr.mergeArray(o.color,e,"mgc"))}},eg=de.exports,ww=function(e,r){eg.isArrayOrTypedArray(r.selectedpoints)&&eg.tagSelected(e,r)},tg=lt,cd=de.exports,gl=Ct.exports,rg=mc,$u=Ot.BADNUM,ud=mr,H$=xw,O$=_w,B$=ww;function j$(t,e){var r=t._fullLayout,a=gl.getFromId(t,e.xaxis||"x"),i=gl.getFromId(t,e.yaxis||"y"),n=a.makeCalcdata(e,"x"),o=i.makeCalcdata(e,"y"),l=rg(e,a,"x",n),s=rg(e,i,"y",o),f=l.vals,c=s.vals,v=e._length,u=new Array(v),d=e.ids,h=Vh(e,r,a,i),p=!1,g,_,b,w,m,y;Aw(r,e);var x="x",T="y",k;if(h)cd.pushUnique(h.traceIndices,e._expandedIndex),g=h.orientation==="v",g?(T="s",k="x"):(x="s",k="y"),m=h.stackgaps==="interpolate";else{var S=kw(e,v);Tw(t,e,a,i,f,c,S)}var A=!!e.xperiodalignment,$=!!e.yperiodalignment;for(_=0;_<v;_++){var M=u[_]={},C=tg(f[_]),E=tg(c[_]);C&&E?(M[x]=f[_],M[T]=c[_],A&&(M.orig_x=n[_],M.xEnd=l.ends[_],M.xStart=l.starts[_]),$&&(M.orig_y=o[_],M.yEnd=s.ends[_],M.yStart=s.starts[_])):h&&(g?C:E)?(M[k]=g?f[_]:c[_],M.gap=!0,m?(M.s=$u,p=!0):M.s=0):M[x]=M[T]=$u,d&&(M.id=String(d[_]))}if(O$(u,e),H$(t,e),B$(u,e),h){for(_=0;_<u.length;)u[_][k]===$u?u.splice(_,1):_++;if(cd.sort(u,function(L,D){return L[k]-D[k]||L.i-D.i}),p){for(_=0;_<u.length-1&&u[_].gap;)_++;for(y=u[_].s,y||(y=u[_].s=0),b=0;b<_;b++)u[b].s=y;for(w=u.length-1;w>_&&u[w].gap;)w--;for(y=u[w].s,b=u.length-1;b>w;b--)u[b].s=y;for(;_<w;)if(_++,u[_].gap){for(b=_+1;u[b].gap;)b++;for(var I=u[_-1][k],P=u[_-1].s,R=(u[b].s-P)/(u[b][k]-I);_<b;)u[_].s=P+(u[_][k]-I)*R,_++}}}return u}function Tw(t,e,r,a,i,n,o){var l=e._length,s=t._fullLayout,f=r._id,c=a._id,v=s._firstScatter[Mw(e)]===e.uid,u=(Vh(e,s,r,a)||{}).orientation,d=e.fill;r._minDtick=0,a._minDtick=0;var h={padded:!0},p={padded:!0};o&&(h.ppad=p.ppad=o);var g=l<2||i[0]!==i[l-1]||n[0]!==n[l-1];g&&(d==="tozerox"||d==="tonextx"&&(v||u==="h"))?h.tozero=!0:!(e.error_y||{}).visible&&(d==="tonexty"||d==="tozeroy"||!ud.hasMarkers(e)&&!ud.hasText(e))&&(h.padded=!1,h.ppad=0),g&&(d==="tozeroy"||d==="tonexty"&&(v||u==="v"))?p.tozero=!0:(d==="tonextx"||d==="tozerox")&&(p.padded=!1),f&&(e._extremes[f]=gl.findExtremes(r,i,h)),c&&(e._extremes[c]=gl.findExtremes(a,n,p))}function kw(t,e){if(!!ud.hasMarkers(t)){var r=t.marker,a=1.6*(t.marker.sizeref||1),i;if(t.marker.sizemode==="area"?i=function(f){return Math.max(Math.sqrt((f||0)/a),3)}:i=function(f){return Math.max((f||0)/a,3)},cd.isArrayOrTypedArray(r.size)){var n={type:"linear"};gl.setConvert(n);for(var o=n.makeCalcdata(t.marker,"size"),l=new Array(e),s=0;s<e;s++)l[s]=i(o[s]);return l}else return i(r.size)}}function Aw(t,e){var r=Mw(e),a=t._firstScatter;a[r]||(a[r]=e.uid)}function Mw(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function Vh(t,e,r,a){var i=t.stackgroup;if(!!i){var n=e._scatterStackOpts[r._id+a._id][i],o=n.orientation==="v"?a:r;if(o.type==="linear"||o.type==="log")return n}}var qh={calc:j$,calcMarkerSize:kw,calcAxisExpansion:Tw,setFirstScatter:Aw,getStackOpts:Vh},ag=qh,G$=function(e,r){var a=r.xaxis,i=r.yaxis,n=a._id+i._id,o=e._fullLayout._scatterStackOpts[n];if(!!o){var l=e.calcdata,s,f,c,v,u,d,h,p,g,_,b,w,m,y,x;for(var T in o){_=o[T];var k=_.traceIndices;if(!!k.length){for(b=_.stackgaps==="interpolate",w=_.groupnorm,_.orientation==="v"?(m="x",y="y"):(m="y",y="x"),x=new Array(k.length),s=0;s<x.length;s++)x[s]=!1;d=l[k[0]];var S=new Array(d.length);for(s=0;s<d.length;s++)S[s]=d[s][m];for(s=1;s<k.length;s++){for(u=l[k[s]],f=c=0;f<u.length;f++){for(h=u[f][m];h>S[c]&&c<S.length;c++)Eu(u,f,S[c],s,x,b,m),f++;if(h!==S[c]){for(v=0;v<s;v++)Eu(l[k[v]],c,h,v,x,b,m);S.splice(c,0,h)}c++}for(;c<S.length;c++)Eu(u,f,S[c],s,x,b,m),f++}var A=S.length;for(f=0;f<d.length;f++){for(p=d[f][y]=d[f].s,s=1;s<k.length;s++)u=l[k[s]],u[0].trace._rawLength=u[0].trace._length,u[0].trace._length=A,p+=u[f].s,u[f][y]=p;if(w)for(g=(w==="fraction"?p:p/100)||1,s=0;s<k.length;s++){var $=l[k[s]][f];$[y]/=g,$.sNorm=$.s/g}}for(s=0;s<k.length;s++){u=l[k[s]];var M=u[0].trace,C=ag.calcMarkerSize(M,M._rawLength),E=Array.isArray(C);if(C&&x[s]||E){var I=C;for(C=new Array(A),f=0;f<A;f++)C[f]=u[f].gap?0:E?I[u[f].i]:I}var P=new Array(A),R=new Array(A);for(f=0;f<A;f++)P[f]=u[f].x,R[f]=u[f].y;ag.calcAxisExpansion(e,M,a,i,P,R,C),u[0].t.orientation=_.orientation}}}}};function Eu(t,e,r,a,i,n,o){i[a]=!0;var l={i:null,gap:!0,s:0};if(l[o]=r,t.splice(e,0,l),e&&r===t[e-1][o]){var s=t[e-1];l.s=s.s,l.i=s.i,l.gap=s.gap}else n&&(l.s=U$(t,e,r,o));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}function U$(t,e,r,a){var i=t[e-1],n=t[e+1];return n?i?i.s+(n.s-i.s)*(r-i[a])/(n[a]-i[a]):n.s:i.s}var Sw=Ot,Fo=Sw.BADNUM,Lw=Sw.LOG_CLIP,ig=Lw+.5,ng=Lw-.5,Xh=de.exports,V$=Xh.segmentsIntersect,og=Xh.constrain,Ru=hc,q$=function(e,r){var a=r.xaxis,i=r.yaxis,n=a.type==="log",o=i.type==="log",l=a._length,s=i._length,f=r.connectGaps,c=r.baseTolerance,v=r.shape,u=v==="linear",d=r.fill&&r.fill!=="none",h=[],p=Ru.minTolerance,g=e.length,_=new Array(g),b=0,w,m,y,x,T,k,S,A,$,M,C,E,I,P,R,L;function D(q){var pe=e[q];if(!pe)return!1;var ve=r.linearized?a.l2p(pe.x):a.c2p(pe.x),ye=r.linearized?i.l2p(pe.y):i.c2p(pe.y);if(ve===Fo){if(n&&(ve=a.c2p(pe.x,!0)),ve===Fo)return!1;o&&ye===Fo&&(ve*=Math.abs(a._m*s*(a._m>0?ig:ng)/(i._m*l*(i._m>0?ig:ng)))),ve*=1e3}if(ye===Fo){if(o&&(ye=i.c2p(pe.y,!0)),ye===Fo)return!1;ye*=1e3}return[ve,ye]}function z(q,pe,ve,ye){var le=ve-q,fe=ye-pe,Te=.5-q,xe=.5-pe,be=le*le+fe*fe,Ae=le*Te+fe*xe;if(Ae>0&&Ae<be){var De=Te*fe-xe*le;if(De*De<be)return!0}}var F,H;function U(q,pe){var ve=q[0]/l,ye=q[1]/s,le=Math.max(0,-ve,ve-1,-ye,ye-1);return le&&F!==void 0&&z(ve,ye,F,H)&&(le=0),le&&pe&&z(ve,ye,pe[0]/l,pe[1]/s)&&(le=0),(1+Ru.toleranceGrowth*le)*c}function B(q,pe){var ve=q[0]-pe[0],ye=q[1]-pe[1];return Math.sqrt(ve*ve+ye*ye)}var X=Ru.maxScreensAway,O=-l*X,Y=l*(1+X),W=-s*X,K=s*(1+X),Z=[[O,W,Y,W],[Y,W,Y,K],[Y,K,O,K],[O,K,O,W]],ae,ne,oe,re,se,me;function Re(q,pe){for(var ve=[],ye=0,le=0;le<4;le++){var fe=Z[le],Te=V$(q[0],q[1],pe[0],pe[1],fe[0],fe[1],fe[2],fe[3]);Te&&(!ye||Math.abs(Te.x-ve[0][0])>1||Math.abs(Te.y-ve[0][1])>1)&&(Te=[Te.x,Te.y],ye&&B(Te,q)<B(ve[0],q)?ve.unshift(Te):ve.push(Te),ye++)}return ve}function ke(q){if(q[0]<O||q[0]>Y||q[1]<W||q[1]>K)return[og(q[0],O,Y),og(q[1],W,K)]}function ze(q,pe){if(q[0]===pe[0]&&(q[0]===O||q[0]===Y)||q[1]===pe[1]&&(q[1]===W||q[1]===K))return!0}function he(q,pe){var ve=[],ye=ke(q),le=ke(pe);return ye&&le&&ze(ye,le)||(ye&&ve.push(ye),le&&ve.push(le)),ve}function te(q,pe,ve){return function(ye,le){var fe=ke(ye),Te=ke(le),xe=[];if(fe&&Te&&ze(fe,Te))return xe;fe&&xe.push(fe),Te&&xe.push(Te);var be=2*Xh.constrain((ye[q]+le[q])/2,pe,ve)-((fe||ye)[q]+(Te||le)[q]);if(be){var Ae;fe&&Te?Ae=be>0==fe[q]>Te[q]?fe:Te:Ae=fe||Te,Ae[q]+=be}return xe}}var ue;v==="linear"||v==="spline"?ue=Re:v==="hv"||v==="vh"?ue=he:v==="hvh"?ue=te(0,O,Y):v==="vhv"&&(ue=te(1,W,K));function Le(q,pe){var ve=pe[0]-q[0],ye=(pe[1]-q[1])/ve,le=(q[1]*pe[0]-pe[1]*q[0])/ve;return le>0?[ye>0?O:Y,K]:[ye>0?Y:O,W]}function we(q){var pe=q[0],ve=q[1],ye=pe===_[b-1][0],le=ve===_[b-1][1];if(!(ye&&le))if(b>1){var fe=pe===_[b-2][0],Te=ve===_[b-2][1];ye&&(pe===O||pe===Y)&&fe?Te?b--:_[b-1]=q:le&&(ve===W||ve===K)&&Te?fe?b--:_[b-1]=q:_[b++]=q}else _[b++]=q}function Pe(q){_[b-1][0]!==q[0]&&_[b-1][1]!==q[1]&&we([oe,re]),we(q),se=null,oe=re=0}function Ee(q){if(F=q[0]/l,H=q[1]/s,ae=q[0]<O?O:q[0]>Y?Y:0,ne=q[1]<W?W:q[1]>K?K:0,ae||ne){if(!b)_[b++]=[ae||q[0],ne||q[1]];else if(se){var pe=ue(se,q);pe.length>1&&(Pe(pe[0]),_[b++]=pe[1])}else me=ue(_[b-1],q)[0],_[b++]=me;var ve=_[b-1];ae&&ne&&(ve[0]!==ae||ve[1]!==ne)?(se&&(oe!==ae&&re!==ne?we(oe&&re?Le(se,q):[oe||ae,re||ne]):oe&&re&&we([oe,re])),we([ae,ne])):oe-ae&&re-ne&&we([ae||oe,ne||re]),se=q,oe=ae,re=ne}else se&&Pe(ue(se,q)[0]),_[b++]=q}for(w=0;w<g;w++)if(m=D(w),!!m){for(b=0,se=null,Ee(m),w++;w<g;w++){if(x=D(w),!x){if(f)continue;break}if(!u||!r.simplify){Ee(x);continue}var Ce=D(w+1);if(M=B(x,m),!(!(d&&(b===0||b===g-1))&&M<U(x,Ce)*p)){for(A=[(x[0]-m[0])/M,(x[1]-m[1])/M],T=m,C=M,E=P=R=0,S=!1,y=x,w++;w<e.length;w++){if(k=Ce,Ce=D(w+1),!k){if(f)continue;break}if($=[k[0]-m[0],k[1]-m[1]],L=$[0]*A[1]-$[1]*A[0],P=Math.min(P,L),R=Math.max(R,L),R-P>U(k,Ce))break;y=k,I=$[0]*A[0]+$[1]*A[1],I>C?(C=I,x=k,S=!1):I<E&&(E=I,T=k,S=!0)}if(S?(Ee(x),y!==T&&Ee(T)):(T!==m&&Ee(T),y!==x&&Ee(x)),Ee(y),w>=e.length||!k)break;Ee(k),m=k}}se&&we([oe||se[0],re||se[1]]),h.push(_.slice(0,b))}return h},lg={tonextx:1,tonexty:1,tonext:1},Cw=function(e,r,a){var i,n,o,l,s,f={},c=!1,v=-1,u=0,d=-1;for(n=0;n<a.length;n++)i=a[n][0].trace,o=i.stackgroup||"",o?o in f?s=f[o]:(s=f[o]=u,u++):i.fill in lg&&d>=0?s=d:(s=d=u,u++),s<v&&(c=!0),i._groupIndex=v=s;var h=a.slice();c&&h.sort(function(g,_){var b=g[0].trace,w=_[0].trace;return b._groupIndex-w._groupIndex||b.index-w.index});var p={};for(n=0;n<h.length;n++)i=h[n][0].trace,o=i.stackgroup||"",i.visible===!0?(i._nexttrace=null,i.fill in lg&&(l=p[o],i._prevtrace=l||null,l&&(l._nexttrace=i)),i._ownfill=i.fill&&(i.fill.substr(0,6)==="tozero"||i.fill==="toself"||i.fill.substr(0,2)==="to"&&!i._prevtrace),p[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return h},ia=tt.exports,X$=Ve,bl=de.exports,jn=bl.ensureSingle,Dw=bl.identity,Ht=Tt.exports,Gn=mr,Y$=q$,W$=Cw,Z$=zh.exports.tester,K$=function(e,r,a,i,n,o){var l,s,f=!n,c=!!n&&n.duration>0,v=W$(e,r,a);if(l=i.selectAll("g.trace").data(v,function(d){return d[0].trace.uid}),l.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),l.order(),Q$(e,l,r),c){o&&(s=o());var u=ia.transition().duration(n.duration).ease(n.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});u.each(function(){i.selectAll("g.trace").each(function(d,h){sg(e,h,r,d,v,this,n)})})}else l.each(function(d,h){sg(e,h,r,d,v,this,n)});f&&l.exit().remove(),i.selectAll("path:not([d])").remove()};function Q$(t,e,r){e.each(function(a){var i=jn(ia.select(this),"g","fills");Ht.setClipUrl(i,r.layerClipId,t);var n=a[0].trace,o=[];n._ownfill&&o.push("_ownFill"),n._nexttrace&&o.push("_nextFill");var l=i.selectAll("g").data(o,Dw);l.enter().append("g"),l.exit().each(function(s){n[s]=null}).remove(),l.order().each(function(s){n[s]=jn(ia.select(this),"path","js-fill")})})}function sg(t,e,r,a,i,n,o){var l;J$(t,e,r,a,i);var s=!!o&&o.duration>0;function f(oe){return s?oe.transition():oe}var c=r.xaxis,v=r.yaxis,u=a[0].trace,d=u.line,h=ia.select(n),p=jn(h,"g","errorbars"),g=jn(h,"g","lines"),_=jn(h,"g","points"),b=jn(h,"g","text");if(X$.getComponentMethod("errorbars","plot")(t,p,r,o),u.visible!==!0)return;f(h).style("opacity",u.opacity);var w,m,y=u.fill.charAt(u.fill.length-1);y!=="x"&&y!=="y"&&(y=""),a[0][r.isRangePlot?"nodeRangePlot3":"node3"]=h;var x="",T=[],k=u._prevtrace;k&&(x=k._prevRevpath||"",m=k._nextFill,T=k._polygons);var S,A,$="",M="",C,E,I,P,R,L,D,z=[],F=bl.noop;if(w=u._ownFill,Gn.hasLines(u)||u.fill!=="none"){for(m&&m.datum(a),["hv","vh","hvh","vhv"].indexOf(d.shape)!==-1?(C=Ht.steps(d.shape),E=Ht.steps(d.shape.split("").reverse().join(""))):d.shape==="spline"?C=E=function(oe){var re=oe[oe.length-1];return oe.length>1&&oe[0][0]===re[0]&&oe[0][1]===re[1]?Ht.smoothclosed(oe.slice(1),d.smoothing):Ht.smoothopen(oe,d.smoothing)}:C=E=function(oe){return"M"+oe.join("L")},I=function(oe){return E(oe.reverse())},z=Y$(a,{xaxis:c,yaxis:v,connectGaps:u.connectgaps,baseTolerance:Math.max(d.width||1,3)/4,shape:d.shape,simplify:d.simplify,fill:u.fill}),D=u._polygons=new Array(z.length),l=0;l<z.length;l++)u._polygons[l]=Z$(z[l]);z.length&&(P=z[0][0],R=z[z.length-1],L=R[R.length-1]),F=function(oe){return function(re){if(S=C(re),A=I(re),$?y?($+="L"+S.substr(1),M=A+("L"+M.substr(1))):($+="Z"+S,M=A+"Z"+M):($=S,M=A),Gn.hasLines(u)&&re.length>1){var se=ia.select(this);if(se.datum(a),oe)f(se.style("opacity",0).attr("d",S).call(Ht.lineGroupStyle)).style("opacity",1);else{var me=f(se);me.attr("d",S),Ht.singleLineStyle(a,me)}}}}}var H=g.selectAll(".js-line").data(z);f(H.exit()).style("opacity",0).remove(),H.each(F(!1)),H.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(Ht.lineGroupStyle).each(F(!0)),Ht.setClipUrl(H,r.layerClipId,t);function U(oe){f(oe).attr("d","M0,0Z")}z.length?(w?(w.datum(a),P&&L&&(y?(y==="y"?P[1]=L[1]=v.c2p(0,!0):y==="x"&&(P[0]=L[0]=c.c2p(0,!0)),f(w).attr("d","M"+L+"L"+P+"L"+$.substr(1)).call(Ht.singleFillStyle,t)):f(w).attr("d",$+"Z").call(Ht.singleFillStyle,t))):m&&(u.fill.substr(0,6)==="tonext"&&$&&x?(u.fill==="tonext"?f(m).attr("d",$+"Z"+x+"Z").call(Ht.singleFillStyle,t):f(m).attr("d",$+"L"+x.substr(1)+"Z").call(Ht.singleFillStyle,t),u._polygons=u._polygons.concat(T)):(U(m),u._polygons=null)),u._prevRevpath=M,u._prevPolygons=D):(w?U(w):m&&U(m),u._polygons=u._prevRevpath=u._prevPolygons=null);function B(oe){return oe.filter(function(re){return!re.gap&&re.vis})}function X(oe){return oe.filter(function(re){return re.vis})}function O(oe){return oe.filter(function(re){return!re.gap})}function Y(oe){return oe.id}function W(oe){if(oe.ids)return Y}function K(){return!1}function Z(oe,re,se){var me,Re,ke,ze=se[0].trace,he=Gn.hasMarkers(ze),te=Gn.hasText(ze),ue=W(ze),Le=K,we=K;if(he||te){var Pe=Dw,Ee=ze.stackgroup,Ce=Ee&&t._fullLayout._scatterStackOpts[c._id+v._id][Ee].stackgaps==="infer zero";ze.marker.maxdisplayed||ze._needsCull?Pe=Ce?X:B:Ee&&!Ce&&(Pe=O),he&&(Le=Pe),te&&(we=Pe)}Re=oe.selectAll("path.point"),me=Re.data(Le,ue);var q=me.enter().append("path").classed("point",!0);s&&q.call(Ht.pointStyle,ze,t).call(Ht.translatePoints,c,v).style("opacity",0).transition().style("opacity",1),me.order();var pe;he&&(pe=Ht.makePointStyleFns(ze)),me.each(function(ve){var ye=ia.select(this),le=f(ye);ke=Ht.translatePoint(ve,le,c,v),ke?(Ht.singlePointStyle(ve,le,ze,pe,t),r.layerClipId&&Ht.hideOutsideRangePoint(ve,le,c,v,ze.xcalendar,ze.ycalendar),ze.customdata&&ye.classed("plotly-customdata",ve.data!==null&&ve.data!==void 0)):le.remove()}),s?me.exit().transition().style("opacity",0).remove():me.exit().remove(),Re=re.selectAll("g"),me=Re.data(we,ue),me.enter().append("g").classed("textpoint",!0).append("text"),me.order(),me.each(function(ve){var ye=ia.select(this),le=f(ye.select("text"));ke=Ht.translatePoint(ve,le,c,v),ke?r.layerClipId&&Ht.hideOutsideRangePoint(ve,ye,c,v,ze.xcalendar,ze.ycalendar):ye.remove()}),me.selectAll("text").call(Ht.textPointStyle,ze,t).each(function(ve){var ye=c.c2p(ve.x),le=v.c2p(ve.y);ia.select(this).selectAll("tspan.line").each(function(){f(ia.select(this)).attr({x:ye,y:le})})}),me.exit().remove()}_.datum(a),b.datum(a),Z(_,b,a);var ae=u.cliponaxis===!1,ne=ae?null:r.layerClipId;Ht.setClipUrl(_,ne,t),Ht.setClipUrl(b,ne,t)}function J$(t,e,r,a,i){var n=r.xaxis,o=r.yaxis,l=ia.extent(bl.simpleMap(n.range,n.r2c)),s=ia.extent(bl.simpleMap(o.range,o.r2c)),f=a[0].trace;if(!!Gn.hasMarkers(f)){var c=f.marker.maxdisplayed;if(c!==0){var v=a.filter(function(p){return p.x>=l[0]&&p.x<=l[1]&&p.y>=s[0]&&p.y<=s[1]}),u=Math.ceil(v.length/c),d=0;i.forEach(function(p,g){var _=p[0].trace;Gn.hasMarkers(_)&&_.marker.maxdisplayed>0&&g<e&&d++});var h=Math.round(d*u/3+Math.floor(d/3)*u/7.1);a.forEach(function(p){delete p.vis}),v.forEach(function(p,g){Math.round((g+h)%u)===0&&(p.vis=!0)})}}}var Ol={container:"marker",min:"cmin",max:"cmax"},ks=Ct.exports,$w=function(e,r,a){var i={},n={_fullLayout:a},o=ks.getFromTrace(n,r,"x"),l=ks.getFromTrace(n,r,"y");return i.xLabel=ks.tickText(o,o.c2l(e.x),!0).text,i.yLabel=ks.tickText(l,l.c2l(e.y),!0).text,i},Pu=tt.exports,to=Tt.exports,eE=Ve;function tE(t){var e=Pu.select(t).selectAll("g.trace.scatter");e.style("opacity",function(r){return r[0].trace.opacity}),e.selectAll("g.points").each(function(r){var a=Pu.select(this),i=r.trace||r[0].trace;Yh(a,i,t)}),e.selectAll("g.text").each(function(r){var a=Pu.select(this),i=r.trace||r[0].trace;Wh(a,i,t)}),e.selectAll("g.trace path.js-line").call(to.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(to.fillGroupStyle,t),eE.getComponentMethod("errorbars","style")(e)}function Yh(t,e,r){to.pointStyle(t.selectAll("path.point"),e,r)}function Wh(t,e,r){to.textPointStyle(t.selectAll("text"),e,r)}function rE(t,e,r){var a=e[0].trace;a.selectedpoints?(to.selectedPointStyle(r.selectAll("path.point"),a),to.selectedTextStyle(r.selectAll("text"),a)):(Yh(r,a,t),Wh(r,a,t))}var fg={style:tE,stylePoints:Yh,styleText:Wh,styleOnSelect:rE},wn=Je.exports,aE=mr,Ew=function(e,r){var a,i;if(e.mode==="lines")return a=e.line.color,a&&wn.opacity(a)?a:e.fillcolor;if(e.mode==="none")return e.fill?e.fillcolor:"";var n=r.mcc||(e.marker||{}).color,o=r.mlcc||((e.marker||{}).line||{}).color;return i=n&&wn.opacity(n)?n:o&&wn.opacity(o)&&(r.mlw||((e.marker||{}).line||{}).width)?o:"",i?wn.opacity(i)<.3?wn.addOpacity(i,.3):i:(a=(e.line||{}).color,a&&wn.opacity(a)&&aE.hasLines(e)&&e.line.width?a:e.fillcolor)},vd=de.exports,cg=ua,iE=Ve,nE=Ew,zu=Je.exports,oE=vd.fillText,lE=function(e,r,a,i){var n=e.cd,o=n[0].trace,l=e.xa,s=e.ya,f=l.c2p(r),c=s.c2p(a),v=[f,c],u=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,h=!!o.xperiodalignment,p=!!o.yperiodalignment;if(u.indexOf("points")!==-1){var g=function(Z){if(h){var ae=l.c2p(Z.xStart),ne=l.c2p(Z.xEnd);return f>=Math.min(ae,ne)&&f<=Math.max(ae,ne)?0:1/0}var oe=Math.max(3,Z.mrc||0),re=1-1/oe,se=Math.abs(l.c2p(Z.x)-f);return se<oe?re*se/oe:se-oe+re},_=function(Z){if(p){var ae=s.c2p(Z.yStart),ne=s.c2p(Z.yEnd);return c>=Math.min(ae,ne)&&c<=Math.max(ae,ne)?0:1/0}var oe=Math.max(3,Z.mrc||0),re=1-1/oe,se=Math.abs(s.c2p(Z.y)-c);return se<oe?re*se/oe:se-oe+re},b=function(Z){var ae=Math.max(d,Z.mrc||0),ne=l.c2p(Z.x)-f,oe=s.c2p(Z.y)-c;return Math.max(Math.sqrt(ne*ne+oe*oe)-ae,1-d/ae)},w=cg.getDistanceFunction(i,g,_,b);if(cg.getClosest(n,w,e),e.index!==!1){var m=n[e.index],y=l.c2p(m.x,!0),x=s.c2p(m.y,!0),T=m.mrc||1;e.index=m.i;var k=n[0].t.orientation,S=k&&(m.sNorm||m.s),A=k==="h"?S:m.orig_x!==void 0?m.orig_x:m.x,$=k==="v"?S:m.orig_y!==void 0?m.orig_y:m.y;return vd.extendFlat(e,{color:nE(o,m),x0:y-T,x1:y+T,xLabelVal:A,y0:x-T,y1:x+T,yLabelVal:$,spikeDistance:b(m),hovertemplate:o.hovertemplate}),oE(m,o,e),iE.getComponentMethod("errorbars","hoverInfo")(m,o,e),[e]}}if(u.indexOf("fills")!==-1&&o._polygons){var M=o._polygons,C=[],E=!1,I=1/0,P=-1/0,R=1/0,L=-1/0,D,z,F,H,U,B,X,O,Y;for(D=0;D<M.length;D++)F=M[D],F.contains(v)&&(E=!E,C.push(F),R=Math.min(R,F.ymin),L=Math.max(L,F.ymax));if(E){R=Math.max(R,0),L=Math.min(L,s._length);var W=(R+L)/2;for(D=0;D<C.length;D++)for(H=C[D].pts,z=1;z<H.length;z++)O=H[z-1][1],Y=H[z][1],O>W!=Y>=W&&(B=H[z-1][0],X=H[z][0],Y-O&&(U=B+(X-B)*(W-O)/(Y-O),I=Math.min(I,U),P=Math.max(P,U)));I=Math.max(I,0),P=Math.min(P,l._length);var K=zu.defaultLine;return zu.opacity(o.fillcolor)?K=o.fillcolor:zu.opacity((o.line||{}).color)&&(K=o.line.color),vd.extendFlat(e,{distance:e.maxHoverDistance,x0:I,x1:P,y0:W,y1:W,color:K,hovertemplate:!1}),delete e.index,o.text&&!Array.isArray(o.text)?e.text=String(o.text):e.text=o.name,[e]}}},ug=mr,sE=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s,f,c,v,u=!ug.hasMarkers(l)&&!ug.hasText(l);if(u)return[];if(r===!1)for(s=0;s<a.length;s++)a[s].selected=0;else for(s=0;s<a.length;s++)f=a[s],c=i.c2p(f.x),v=n.c2p(f.y),f.i!==null&&r.contains([c,v],!1,s,e)?(o.push({pointNumber:f.i,x:i.c2d(f.x),y:n.c2d(f.y)}),f.selected=1):f.selected=0;return o},Yt={},Iu,vg;function fE(){return vg||(vg=1,Iu={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}),Iu}var Nu,dg;function cE(){if(dg)return Nu;dg=1;var t=Ve.traceIs,e=z1;Nu=function(l,s,f,c){f("autotypenumbers",c.autotypenumbersDflt);var v=f("type",(c.splomStash||{}).type);v==="-"&&(r(s,c.data),s.type==="-"?s.type="linear":l.type=s.type)};function r(o,l){if(o.type==="-"){var s=o._id,f=s.charAt(0),c;s.indexOf("scene")!==-1&&(s=f);var v=a(l,s,f);if(!!v){if(v.type==="histogram"&&f==={v:"y",h:"x"}[v.orientation||"v"]){o.type="linear";return}var u=f+"calendar",d=v[u],h={noMultiCategory:!t(v,"cartesian")||t(v,"noMultiCategory")};if(v.type==="box"&&v._hasPreCompStats&&f==={h:"x",v:"y"}[v.orientation||"v"]&&(h.noMultiCategory=!0),h.autotypenumbers=o.autotypenumbers,n(v,f)){var p=i(v),g=[];for(c=0;c<l.length;c++){var _=l[c];!t(_,"box-violin")||(_[f+"axis"]||f)!==s||(_[p]!==void 0?g.push(_[p][0]):_.name!==void 0?g.push(_.name):g.push("text"),_[u]!==d&&(d=void 0))}o.type=e(g,d,h)}else if(v.type==="splom"){var b=v.dimensions,w=b[v._axesDim[s]];w.visible&&(o.type=e(w.values,d,h))}else o.type=e(v[f]||[v[f+"0"]],d,h)}}}function a(o,l,s){for(var f=0;f<o.length;f++){var c=o[f];if(c.type==="splom"&&c._length>0&&(c["_"+s+"axes"]||{})[l])return c;if((c[s+"axis"]||s)===l){if(n(c,s))return c;if((c[s]||[]).length||c[s+"0"])return c}}}function i(o){return{v:"x",h:"y"}[o.orientation||"v"]}function n(o,l){var s=i(o),f=t(o,"box-violin"),c=t(o._fullInput||{},"candlestick");return f&&!c&&l===s&&o[s]===void 0&&o[s+"0"]===void 0}return Nu}function uE(t,e){var r=e.dataAttr||t._id.charAt(0),a={},i,n,o;if(e.axData)i=e.axData;else for(i=[],n=0;n<e.data.length;n++){var l=e.data[n];l[r+"axis"]===t._id&&i.push(l)}for(n=0;n<i.length;n++){var s=i[n][r];for(o=0;o<s.length;o++){var f=s[o];f!=null&&(a[f]=1)}}return Object.keys(a)}var vE=function(e,r,a,i){if(r.type==="category"){var n=e.categoryarray,o=Array.isArray(n)&&n.length>0,l;o&&(l="array");var s=a("categoryorder",l),f;s==="array"&&(f=a("categoryarray")),!o&&s==="array"&&(s=r.categoryorder="trace"),s==="trace"?r._initialCategories=[]:s==="array"?r._initialCategories=f.slice():(f=uE(r,i).sort(),s==="category ascending"?r._initialCategories=f:s==="category descending"&&(r._initialCategories=f.reverse()))}},dE=Wr.exports.mix,hE=hr.lightFraction,pE=de.exports,mE=function(e,r,a,i){i=i||{};var n=i.dfltColor;function o(_,b){return pE.coerce2(e,r,i.attributes,_,b)}var l=o("linecolor",n),s=o("linewidth"),f=a("showline",i.showLine||!!l||!!s);f||(delete r.linecolor,delete r.linewidth);var c=dE(n,i.bgColor,i.blend||hE).toRgbString(),v=o("gridcolor",c),u=o("gridwidth"),d=a("showgrid",i.showGrid||!!v||!!u);if(d||(delete r.gridcolor,delete r.gridwidth),!i.noZeroLine){var h=o("zerolinecolor",n),p=o("zerolinewidth"),g=a("zeroline",i.showGrid||!!h||!!p);g||(delete r.zerolinecolor,delete r.zerolinewidth)}},hg=lt,yE=Ve,Ko=de.exports,gE=Va,dd=Ua,bE=g1,xE=b1,_E=T1,wE=k1,TE=vE,kE=mE,pg=oh,Qs=pr.WEEKDAY_PATTERN,AE=pr.HOUR_PATTERN,Rw=function(e,r,a,i,n){var o=i.letter,l=i.font||{},s=i.splomStash||{},f=a("visible",!i.visibleDflt),c=r._template||{},v=r.type||c.type||"-",u;if(v==="date"){var d=yE.getComponentMethod("calendars","handleDefaults");d(e,r,"calendar",i.calendar),i.noTicklabelmode||(u=a("ticklabelmode"))}var h="";(!i.noTicklabelposition||v==="multicategory")&&(h=Ko.coerce(e,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),i.noTicklabeloverflow||a("ticklabeloverflow",h.indexOf("inside")!==-1?"hide past domain":v==="category"||v==="multicategory"?"allow":"hide past div"),pg(r,n);var p=!r.isValidRange(e.range);p&&i.reverseDflt&&(p="reversed");var g=a("autorange",p);g&&(v==="linear"||v==="-")&&a("rangemode"),a("range"),r.cleanRange(),TE(e,r,a,i),v!=="category"&&!i.noHover&&a("hoverformat");var _=a("color"),b=_!==dd.color.dflt?_:l.color,w=s.label||n._dfltTitle[o];if(wE(e,r,a,v,i),!f)return r;a("title.text",w),Ko.coerceFont(a,"title.font",{family:l.family,size:Ko.bigFont(l.size),color:b}),bE(e,r,a,v),_E(e,r,a,v,i),xE(e,r,a,i),kE(e,r,a,{dfltColor:_,bgColor:i.bgColor,showGrid:i.showGrid,attributes:dd}),(r.showline||r.ticks)&&a("mirror"),i.automargin&&a("automargin");var m=v==="multicategory";if(!i.noTickson&&(v==="category"||m)&&(r.ticks||r.showgrid)){var y;m&&(y="boundaries");var x=a("tickson",y);x==="boundaries"&&delete r.ticklabelposition}if(m){var T=a("showdividers");T&&(a("dividercolor"),a("dividerwidth"))}if(v==="date")if(gE(e,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:ME}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var k=0;k<r.rangebreaks.length;k++)if(r.rangebreaks[k].pattern===Qs){r._hasDayOfWeekBreaks=!0;break}if(pg(r,n),n._has("scattergl")||n._has("splom"))for(var S=0;S<i.data.length;S++){var A=i.data[S];(A.type==="scattergl"||A.type==="splom")&&(A.visible=!1,Ko.warn(A.type+" traces do not work on axes with rangebreaks. Setting trace "+A.index+" to `visible: false`."))}}return r};function ME(t,e,r){function a(u,d){return Ko.coerce(t,e,dd.rangebreaks,u,d)}var i=a("enabled");if(i){var n=a("bounds");if(n&&n.length>=2){var o="",l,s;if(n.length===2){for(l=0;l<2;l++)if(s=mg(n[l]),s){o=Qs;break}}var f=a("pattern",o);if(f===Qs)for(l=0;l<2;l++)s=mg(n[l]),s&&(e.bounds[l]=n[l]=s-1);if(f)for(l=0;l<2;l++)switch(s=n[l],f){case Qs:if(!hg(s)){e.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){e.enabled=!1;return}e.bounds[l]=n[l]=s;break;case AE:if(!hg(s)){e.enabled=!1;return}if(s=+s,s<0||s>24){e.enabled=!1;return}e.bounds[l]=n[l]=s;break}if(r.autorange===!1){var c=r.range;if(c[0]<c[1]){if(n[0]<c[0]&&n[1]>c[1]){e.enabled=!1;return}}else if(n[0]>c[0]&&n[1]<c[1]){e.enabled=!1;return}}}else{var v=a("values");if(v&&v.length)a("dvalue");else{e.enabled=!1;return}}}}var SE={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function mg(t){if(typeof t=="string")return SE[t.substr(0,3).toLowerCase()]}var LE=lt,As=de.exports,Pw=function(e,r,a,i){var n=i.counterAxes||[],o=i.overlayableAxes||[],l=i.letter,s=i.grid,f,c,v,u;s&&(c=s._domains[l][s._axisMap[r._id]],f=s._anchors[r._id],c&&(v=s[l+"side"].split(" ")[0],u=s.domain[l][v==="right"||v==="top"?1:0])),c=c||[0,1],f=f||(LE(e.position)?"free":n[0]||"free"),v=v||(l==="x"?"bottom":"left"),u=u||0;var d=As.coerce(e,r,{anchor:{valType:"enumerated",values:["free"].concat(n),dflt:f}},"anchor");d==="free"&&a("position",u),As.coerce(e,r,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");var h=!1;if(o.length&&(h=As.coerce(e,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!h){var p=a("domain",c);p[0]>p[1]-1/4096&&(r.domain=c),As.noneOrAll(e.domain,r.domain,c)}return a("layer"),r},Fu,yg;function CE(){if(yg)return Fu;yg=1;var t=de.exports,e=Je.exports,r=Zr.isUnifiedHover,a=c_,i=Mt,n=$l,o=Ua,l=cE(),s=Rw,f=Xa,c=Pw,v=Vt,u=v.id2name,d=v.name2id,h=pr.AX_ID_PATTERN,p=Ve,g=p.traceIs,_=p.getComponentMethod;function b(w,m,y){Array.isArray(w[m])?w[m].push(y):w[m]=[y]}return Fu=function(m,y,x){var T=y.autotypenumbers,k={},S={},A={},$={},M={},C={},E={},I={},P={},R={},L,D;for(L=0;L<x.length;L++){var z=x[L];if(!(!g(z,"cartesian")&&!g(z,"gl2d"))){var F;if(z.xaxis)F=u(z.xaxis),b(k,F,z);else if(z.xaxes)for(D=0;D<z.xaxes.length;D++)b(k,u(z.xaxes[D]),z);var H;if(z.yaxis)H=u(z.yaxis),b(k,H,z);else if(z.yaxes)for(D=0;D<z.yaxes.length;D++)b(k,u(z.yaxes[D]),z);if(z.type==="funnel"?z.orientation==="h"?(F&&(S[F]=!0),H&&(E[H]=!0)):H&&(A[H]=!0):z.type==="image"?(H&&(I[H]=!0),F&&(I[F]=!0)):(H&&(M[H]=!0,C[H]=!0),(!g(z,"carpet")||z.type==="carpet"&&!z._cheater)&&F&&($[F]=!0)),z.type==="carpet"&&z._cheater&&F&&(S[F]=!0),g(z,"2dMap")&&(P[F]=!0,P[H]=!0),g(z,"oriented")){var U=z.orientation==="h"?H:F;R[U]=!0}}}var B=y._subplots,X=B.xaxis,O=B.yaxis,Y=t.simpleMap(X,u),W=t.simpleMap(O,u),K=Y.concat(W),Z=e.background;X.length&&O.length&&(Z=t.coerce(m,y,n,"plot_bgcolor"));var ae=e.combine(Z,y.paper_bgcolor),ne,oe,re,se,me;function Re(){var Ke=k[ne]||[];me._traceIndices=Ke.map(function(ft){return ft._expandedIndex}),me._annIndices=[],me._shapeIndices=[],me._imgIndices=[],me._subplotsWith=[],me._counterAxes=[],me._name=me._attr=ne,me._id=oe}function ke(Ke,ft){return t.coerce(se,me,o,Ke,ft)}function ze(Ke,ft){return t.coerce2(se,me,o,Ke,ft)}function he(Ke){return Ke==="x"?O:X}function te(Ke,ft){for(var N=Ke==="x"?Y:W,G=[],j=0;j<N.length;j++){var V=N[j];V!==ft&&!(m[V]||{}).overlaying&&G.push(d(V))}return G}var ue={x:he("x"),y:he("y")},Le=ue.x.concat(ue.y),we={},Pe=[];function Ee(){var Ke=se.matches;h.test(Ke)&&Le.indexOf(Ke)===-1&&(we[Ke]=se.type,Pe=Object.keys(we))}var Ce=a(m,y),q=r(Ce);for(L=0;L<K.length;L++){ne=K[L],oe=d(ne),re=ne.charAt(0),t.isPlainObject(m[ne])||(m[ne]={}),se=m[ne],me=i.newContainer(y,ne,re+"axis"),Re();var pe=re==="x"&&!$[ne]&&S[ne]||re==="y"&&!M[ne]&&A[ne],ve=re==="y"&&(!C[ne]&&E[ne]||I[ne]),ye={letter:re,font:y.font,outerTicks:P[ne],showGrid:!R[ne],data:k[ne]||[],bgColor:ae,calendar:y.calendar,automargin:!0,visibleDflt:pe,reverseDflt:ve,autotypenumbersDflt:T,splomStash:((y._splomAxes||{})[re]||{})[oe]};ke("uirevision",y.uirevision),l(se,me,ke,ye),s(se,me,ke,ye,y);var le=q&&re===Ce.charAt(0),fe=ze("spikecolor",q?me.color:void 0),Te=ze("spikethickness",q?1.5:void 0),xe=ze("spikedash",q?"dot":void 0),be=ze("spikemode",q?"across":void 0),Ae=ze("spikesnap"),De=ke("showspikes",!!le||!!fe||!!Te||!!xe||!!be||!!Ae);De||(delete me.spikecolor,delete me.spikethickness,delete me.spikedash,delete me.spikemode,delete me.spikesnap),c(se,me,ke,{letter:re,counterAxes:ue[re],overlayableAxes:te(re,ne),grid:y.grid}),ke("title.standoff"),Ee(),me._input=se}for(L=0;L<Pe.length;){oe=Pe[L++],ne=u(oe),re=ne.charAt(0),t.isPlainObject(m[ne])||(m[ne]={}),se=m[ne],me=i.newContainer(y,ne,re+"axis"),Re();var Oe={letter:re,font:y.font,outerTicks:P[ne],showGrid:!R[ne],data:[],bgColor:ae,calendar:y.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((y._splomAxes||{})[re]||{})[oe]};ke("uirevision",y.uirevision),me.type=we[oe]||"linear",s(se,me,ke,Oe,y),c(se,me,ke,{letter:re,counterAxes:ue[re],overlayableAxes:te(re,ne),grid:y.grid}),ke("fixedrange"),Ee(),me._input=se}var Fe=_("rangeslider","handleDefaults"),st=_("rangeselector","handleDefaults");for(L=0;L<Y.length;L++)ne=Y[L],se=m[ne],me=y[ne],Fe(m,y,ne),me.type==="date"&&st(se,me,y,W,me.calendar),ke("fixedrange");for(L=0;L<W.length;L++){ne=W[L],se=m[ne],me=y[ne];var Xe=y[u(me.anchor)],ut=_("rangeslider","isVisible")(Xe);ke("fixedrange",ut)}f.handleDefaults(m,y,{axIds:Le.concat(Pe).sort(v.idSort),axHasImage:I})},Fu}var Hu,gg;function DE(){if(gg)return Hu;gg=1;var t=tt.exports,e=Ve,r=de.exports,a=Tt.exports,i=Ct.exports;return Hu=function(o,l,s,f){var c=o._fullLayout;if(l.length===0){i.redrawComponents(o);return}function v(y){var x=y.xaxis,T=y.yaxis;c._defs.select("#"+y.clipId+"> rect").call(a.setTranslate,0,0).call(a.setScale,1,1),y.plot.call(a.setTranslate,x._offset,T._offset).call(a.setScale,1,1);var k=y.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(a.setPointGroupScale,1,1),k.selectAll(".textpoint").call(a.setTextPointsScale,1,1),k.call(a.hideOutsideRangePoints,y)}function u(y,x){var T=y.plotinfo,k=T.xaxis,S=T.yaxis,A=k._length,$=S._length,M=!!y.xr1,C=!!y.yr1,E=[];if(M){var I=r.simpleMap(y.xr0,k.r2l),P=r.simpleMap(y.xr1,k.r2l),R=I[1]-I[0],L=P[1]-P[0];E[0]=(I[0]*(1-x)+x*P[0]-I[0])/(I[1]-I[0])*A,E[2]=A*(1-x+x*L/R),k.range[0]=k.l2r(I[0]*(1-x)+x*P[0]),k.range[1]=k.l2r(I[1]*(1-x)+x*P[1])}else E[0]=0,E[2]=A;if(C){var D=r.simpleMap(y.yr0,S.r2l),z=r.simpleMap(y.yr1,S.r2l),F=D[1]-D[0],H=z[1]-z[0];E[1]=(D[1]*(1-x)+x*z[1]-D[1])/(D[0]-D[1])*$,E[3]=$*(1-x+x*H/F),S.range[0]=k.l2r(D[0]*(1-x)+x*z[0]),S.range[1]=S.l2r(D[1]*(1-x)+x*z[1])}else E[1]=0,E[3]=$;i.drawOne(o,k,{skipTitle:!0}),i.drawOne(o,S,{skipTitle:!0}),i.redrawComponents(o,[k._id,S._id]);var U=M?A/E[2]:1,B=C?$/E[3]:1,X=M?E[0]:0,O=C?E[1]:0,Y=M?E[0]/E[2]*A:0,W=C?E[1]/E[3]*$:0,K=k._offset-Y,Z=S._offset-W;T.clipRect.call(a.setTranslate,X,O).call(a.setScale,1/U,1/B),T.plot.call(a.setTranslate,K,Z).call(a.setScale,U,B),a.setPointGroupScale(T.zoomScalePts,1/U,1/B),a.setTextPointsScale(T.zoomScaleTxt,1/U,1/B)}var d;f&&(d=f());function h(){for(var y={},x=0;x<l.length;x++){var T=l[x],k=T.plotinfo.xaxis,S=T.plotinfo.yaxis;T.xr1&&(y[k._name+".range"]=T.xr1.slice()),T.yr1&&(y[S._name+".range"]=T.yr1.slice())}return d&&d(),e.call("relayout",o,y).then(function(){for(var A=0;A<l.length;A++)v(l[A].plotinfo)})}function p(){for(var y={},x=0;x<l.length;x++){var T=l[x],k=T.plotinfo.xaxis,S=T.plotinfo.yaxis;T.xr0&&(y[k._name+".range"]=T.xr0.slice()),T.yr0&&(y[S._name+".range"]=T.yr0.slice())}return e.call("relayout",o,y).then(function(){for(var A=0;A<l.length;A++)v(l[A].plotinfo)})}var g,_,b,w=t.ease(s.easing);o._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(b),b=null,p()});function m(){_=Date.now();for(var y=Math.min(1,(_-g)/s.duration),x=w(y),T=0;T<l.length;T++)u(l[T],x);_-g>s.duration?(h(),b=window.cancelAnimationFrame(m)):b=window.requestAnimationFrame(m)}return g=Date.now(),b=window.requestAnimationFrame(m),Promise.resolve()},Hu}var yc=tt.exports,bg=Ve,Sf=de.exports,$E=Ut.exports,EE=Tt.exports,xg=Pl.getModuleCalcData,ji=Vt,Sa=pr,RE=on,At=Sf.ensureSingle;function _g(t,e,r){return Sf.ensureSingle(t,e,r,function(a){a.datum(r)})}Yt.name="cartesian";Yt.attr=["xaxis","yaxis"];Yt.idRoot=["x","y"];Yt.idRegex=Sa.idRegex;Yt.attrRegex=Sa.attrRegex;Yt.attributes=fE();Yt.layoutAttributes=Ua;Yt.supplyLayoutDefaults=CE();Yt.transitionAxes=DE();Yt.finalizeSubplots=function(t,e){var r=e._subplots,a=r.xaxis,i=r.yaxis,n=r.cartesian,o=n.concat(r.gl2d||[]),l={},s={},f,c,v;for(f=0;f<o.length;f++){var u=o[f].split("y");l[u[0]]=1,s["y"+u[1]]=1}for(f=0;f<a.length;f++)c=a[f],l[c]||(v=(t[ji.id2name(c)]||{}).anchor,Sa.idRegex.y.test(v)||(v="y"),n.push(c+v),o.push(c+v),s[v]||(s[v]=1,Sf.pushUnique(i,v)));for(f=0;f<i.length;f++)v=i[f],s[v]||(c=(t[ji.id2name(v)]||{}).anchor,Sa.idRegex.x.test(c)||(c="x"),n.push(c+v),o.push(c+v),l[c]||(l[c]=1,Sf.pushUnique(a,c)));if(!o.length){c="",v="";for(var d in t)if(Sa.attrRegex.test(d)){var h=d.charAt(0);h==="x"?(!c||+d.substr(5)<+c.substr(5))&&(c=d):(!v||+d.substr(5)<+v.substr(5))&&(v=d)}c=c?ji.name2id(c):"x",v=v?ji.name2id(v):"y",a.push(c),i.push(v),n.push(c+v)}};Yt.plot=function(t,e,r,a){var i=t._fullLayout,n=i._subplots.cartesian,o=t.calcdata,l;if(!Array.isArray(e))for(e=[],l=0;l<o.length;l++)e.push(l);for(l=0;l<n.length;l++){for(var s=n[l],f=i._plots[s],c=[],v,u=0;u<o.length;u++){var d=o[u],h=d[0].trace;h.xaxis+h.yaxis===s&&((e.indexOf(h.index)!==-1||h.carpet)&&(v&&v[0].trace.xaxis+v[0].trace.yaxis===s&&["tonextx","tonexty","tonext"].indexOf(h.fill)!==-1&&c.indexOf(v)===-1&&c.push(v),c.push(d)),v=d)}zw(t,f,c,r,a)}};function zw(t,e,r,a,i){for(var n=Sa.traceLayerClasses,o=t._fullLayout,l=o._modules,s,f,c,v=[],u=[],d=0;d<l.length;d++){s=l[d];var h=s.name,p=bg.modules[h].categories;if(p.svg){var g=s.layerName||h+"layer",_=s.plot;f=xg(r,_),c=f[0],r=f[1],c.length&&v.push({i:n.indexOf(g),className:g,plotMethod:_,cdModule:c}),p.zoomScale&&u.push("."+g)}}v.sort(function(m,y){return m.i-y.i});var b=e.plot.selectAll("g.mlayer").data(v,function(m){return m.className});if(b.enter().append("g").attr("class",function(m){return m.className}).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),b.exit().remove(),b.order(),b.each(function(m){var y=yc.select(this),x=m.className;m.plotMethod(t,e,m.cdModule,y,a,i),Sa.clipOnAxisFalseQuery.indexOf("."+x)===-1&&EE.setClipUrl(y,e.layerClipId,t)}),o._has("scattergl")&&(s=bg.getModule("scattergl"),c=xg(r,s)[0],s.plot(t,e,c)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(Sa.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),u.length)){var w=e.plot.selectAll(u.join(",")).selectAll(".trace");e.zoomScalePts=w.selectAll("path.point"),e.zoomScaleTxt=w.selectAll(".textpoint")}}Yt.clean=function(t,e,r,a){var i=a._plots||{},n=e._plots||{},o=a._subplots||{},l,s,f;if(a._hasOnlyLargeSploms&&!e._hasOnlyLargeSploms)for(f in i)l=i[f],l.plotgroup&&l.plotgroup.remove();var c=a._has&&a._has("gl"),v=e._has&&e._has("gl");if(c&&!v)for(f in i)l=i[f],l._scene&&l._scene.destroy();if(o.xaxis&&o.yaxis){var u=ji.listIds({_fullLayout:a});for(s=0;s<u.length;s++){var d=u[s];e[ji.id2name(d)]||a._infolayer.selectAll(".g-"+d+"title").remove()}}var h=a._has&&a._has("cartesian"),p=e._has&&e._has("cartesian");if(h&&!p)Nw(a._cartesianlayer.selectAll(".subplot"),a),a._defs.selectAll(".axesclip").remove(),delete a._axisConstraintGroups,delete a._axisMatchGroups;else if(o.cartesian)for(s=0;s<o.cartesian.length;s++){var g=o.cartesian[s];if(!n[g]){var _="."+g+",."+g+"-x,."+g+"-y";a._cartesianlayer.selectAll(_).remove(),Fw(g,a)}}};Yt.drawFramework=function(t){var e=t._fullLayout,r=PE(t),a=e._cartesianlayer.selectAll(".subplot").data(r,String);a.enter().append("g").attr("class",function(i){return"subplot "+i[0]}),a.order(),a.exit().call(Nw,e),a.each(function(i){var n=i[0],o=e._plots[n];o.plotgroup=yc.select(this),Iw(t,o),o.draglayer=At(e._draggers,"g",n)})};Yt.rangePlot=function(t,e,r){Iw(t,e),zw(t,e,r),$E.style(t)};function PE(t){var e=t._fullLayout,r=e._subplots.cartesian,a=r.length,i,n,o,l,s,f,c=[],v=[];for(i=0;i<a;i++){o=r[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var u=s._mainAxis,d=f._mainAxis,h=u._id+d._id,p=e._plots[h];l.overlays=[],h!==o&&p?(l.mainplot=h,l.mainplotinfo=p,v.push(o)):(l.mainplot=void 0,l.mainplotinfo=void 0,c.push(o))}for(i=0;i<v.length;i++)o=v[i],l=e._plots[o],l.mainplotinfo.overlays.push(l);var g=c.concat(v),_=new Array(a);for(i=0;i<a;i++){o=g[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var b=[o,s.layer,f.layer,s.overlaying||"",f.overlaying||""];for(n=0;n<l.overlays.length;n++)b.push(l.overlays[n].id);_[i]=b}return _}function Iw(t,e){var r=e.plotgroup,a=e.id,i=Sa.layerValue2layerClass[e.xaxis.layer],n=Sa.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,f=s.plotgroup,c=a+"-x",v=a+"-y";e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,At(s.overlinesBelow,"path",c),At(s.overlinesBelow,"path",v),At(s.overaxesBelow,"g",c),At(s.overaxesBelow,"g",v),e.plot=At(s.overplot,"g",a),At(s.overlinesAbove,"path",c),At(s.overlinesAbove,"path",v),At(s.overaxesAbove,"g",c),At(s.overaxesAbove,"g",v),e.xlines=f.select(".overlines-"+i).select("."+c),e.ylines=f.select(".overlines-"+n).select("."+v),e.xaxislayer=f.select(".overaxes-"+i).select("."+c),e.yaxislayer=f.select(".overaxes-"+n).select("."+v)}else if(o)e.xlines=At(r,"path","xlines-above"),e.ylines=At(r,"path","ylines-above"),e.xaxislayer=At(r,"g","xaxislayer-above"),e.yaxislayer=At(r,"g","yaxislayer-above");else{var l=At(r,"g","layer-subplot");e.shapelayer=At(l,"g","shapelayer"),e.imagelayer=At(l,"g","imagelayer"),e.gridlayer=At(r,"g","gridlayer"),e.zerolinelayer=At(r,"g","zerolinelayer"),At(r,"path","xlines-below"),At(r,"path","ylines-below"),e.overlinesBelow=At(r,"g","overlines-below"),At(r,"g","xaxislayer-below"),At(r,"g","yaxislayer-below"),e.overaxesBelow=At(r,"g","overaxes-below"),e.plot=At(r,"g","plot"),e.overplot=At(r,"g","overplot"),e.xlines=At(r,"path","xlines-above"),e.ylines=At(r,"path","ylines-above"),e.overlinesAbove=At(r,"g","overlines-above"),At(r,"g","xaxislayer-above"),At(r,"g","yaxislayer-above"),e.overaxesAbove=At(r,"g","overaxes-above"),e.xlines=r.select(".xlines-"+i),e.ylines=r.select(".ylines-"+n),e.xaxislayer=r.select(".xaxislayer-"+i),e.yaxislayer=r.select(".yaxislayer-"+n)}o||(_g(e.gridlayer,"g",e.xaxis._id),_g(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map(function(u){return u[0]}).sort(ji.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0)}function Nw(t,e){if(!!t){var r={};t.each(function(s){var f=s[0],c=yc.select(this);c.remove(),Fw(f,e),r[f]=!0});for(var a in e._plots)for(var i=e._plots[a],n=i.overlays||[],o=0;o<n.length;o++){var l=n[o];r[l.id]&&l.plot.selectAll(".trace").remove()}}}function Fw(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}Yt.toSVG=function(t){var e=t._fullLayout._glimages,r=yc.select(t).selectAll(".svg-container"),a=r.filter(function(n,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function i(){var n=this,o=n.toDataURL("image/png"),l=e.append("svg:image");l.attr({xmlns:RE.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}a.each(i)};Yt.updateFx=hh.updateFx;var Ms=mr,zE={hasLines:Ms.hasLines,hasMarkers:Ms.hasMarkers,hasText:Ms.hasText,isBubble:Ms.isBubble,attributes:xo,supplyDefaults:P$,crossTraceDefaults:gw,calc:qh.calc,crossTraceCalc:G$,arraysToCalcdata:_w,plot:K$,colorbar:Ol,formatLabels:$w,style:fg.style,styleOnSelect:fg.styleOnSelect,hoverPoints:lE,selectPoints:sE,animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Yt,categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{description:["The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts.","The data visualized as scatter point or lines is set in `x` and `y`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}},IE={moduleType:"component",name:"legend",layoutAttributes:Q1,supplyLayoutDefaults:J1,draw:r_,style:t_},Hw=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}],NE=tt.exports,FE=Je.exports,wg=Hw,Zh=de.exports,HE=Zh.strScale,OE=Zh.strRotate,BE=Zh.strTranslate,jE=function(e,r,a){var i=e.node(),n=wg[a.arrowhead||0],o=wg[a.startarrowhead||0],l=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),f=r.indexOf("start")>=0,c=r.indexOf("end")>=0,v=n.backoff*l+a.standoff,u=o.backoff*s+a.startstandoff,d,h,p,g;if(i.nodeName==="line"){d={x:+e.attr("x1"),y:+e.attr("y1")},h={x:+e.attr("x2"),y:+e.attr("y2")};var _=d.x-h.x,b=d.y-h.y;if(p=Math.atan2(b,_),g=p+Math.PI,v&&u&&v+u>Math.sqrt(_*_+b*b)){E();return}if(v){if(v*v>_*_+b*b){E();return}var w=v*Math.cos(p),m=v*Math.sin(p);h.x+=w,h.y+=m,e.attr({x2:h.x,y2:h.y})}if(u){if(u*u>_*_+b*b){E();return}var y=u*Math.cos(p),x=u*Math.sin(p);d.x-=y,d.y-=x,e.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var T=i.getTotalLength(),k="";if(T<v+u){E();return}var S=i.getPointAtLength(0),A=i.getPointAtLength(.1);p=Math.atan2(S.y-A.y,S.x-A.x),d=i.getPointAtLength(Math.min(u,T)),k="0px,"+u+"px,";var $=i.getPointAtLength(T),M=i.getPointAtLength(T-.1);g=Math.atan2($.y-M.y,$.x-M.x),h=i.getPointAtLength(Math.max(0,T-v));var C=k?u+v:v;k+=T-C+"px,"+T+"px",e.style("stroke-dasharray",k)}function E(){e.style("stroke-dasharray","0px,100px")}function I(P,R,L,D){!P.path||(P.noRotate&&(L=0),NE.select(i.parentNode).append("path").attr({class:e.attr("class"),d:P.path,transform:BE(R.x,R.y)+OE(L*180/Math.PI)+HE(D)}).style({fill:FE.rgb(a.arrowcolor),"stroke-width":0}))}f&&I(o,d,p,s),c&&I(n,h,g,l)},Tg=tt.exports,Ou=Ve,GE=Ut.exports,ai=de.exports,Bu=ai.strTranslate,xl=Ct.exports,$i=Je.exports,Pa=Tt.exports,kg=ua,ju=ir,Gu=xi,Ho=ha.exports,UE=Mt.arrayEditor,VE=jE,Kh={draw:qE,drawOne:Ow,drawRaw:Bw};function qE(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&Ow(t,r);return GE.previousPromises(t)}function Ow(t,e){var r=t._fullLayout,a=r.annotations[e]||{},i=xl.getFromId(t,a.xref),n=xl.getFromId(t,a.yref);i&&i.setScale(),n&&n.setScale(),Bw(t,a,e,!1,i,n)}function ei(t,e,r,a,i){var n=i[r],o=i[r+"ref"],l=r.indexOf("y")!==-1,s=xl.getRefType(o)==="domain",f=l?a.h:a.w;return t?s?n+(l?-e:e)/t._length:t.p2r(t.r2p(n)+e):n+(l?-e:e)/f}function Bw(t,e,r,a,i,n){var o=t._fullLayout,l=t._fullLayout._size,s=t._context.edits,f,c;a?(f="annotation-"+a,c=a+".annotations"):(f="annotation",c="annotations");var v=UE(t.layout,c,e),u=v.modifyBase,d=v.modifyItem,h=v.getUpdateObj;o._infolayer.selectAll("."+f+'[data-index="'+r+'"]').remove();var p="clip"+o._uid+"_ann"+r;if(!e._input||e.visible===!1){Tg.selectAll("#"+p).remove();return}var g={x:{},y:{}},_=+e.textangle||0,b=o._infolayer.append("g").classed(f,!0).attr("data-index",String(r)).style("opacity",e.opacity),w=b.append("g").classed("annotation-text-g",!0),m=s[e.showarrow?"annotationTail":"annotationPosition"],y=e.captureevents||s.annotationText||m;function x(D){var z={index:r,annotation:e._input,fullAnnotation:e,event:D};return a&&(z.subplotId=a),z}var T=w.append("g").style("pointer-events",y?"all":null).call(Gu,"pointer").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",x(Tg.event))});e.hovertext&&T.on("mouseover",function(){var D=e.hoverlabel,z=D.font,F=this.getBoundingClientRect(),H=t.getBoundingClientRect();kg.loneHover({x0:F.left-H.left,x1:F.right-H.left,y:(F.top+F.bottom)/2-H.top,text:e.hovertext,color:D.bgcolor,borderColor:D.bordercolor,fontFamily:z.family,fontSize:z.size,fontColor:z.color},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:t})}).on("mouseout",function(){kg.loneUnhover(o._hoverlayer.node())});var k=e.borderwidth,S=e.borderpad,A=k+S,$=T.append("rect").attr("class","bg").style("stroke-width",k+"px").call($i.stroke,e.bordercolor).call($i.fill,e.bgcolor),M=e.width||e.height,C=o._topclips.selectAll("#"+p).data(M?[0]:[]);C.enter().append("clipPath").classed("annclip",!0).attr("id",p).append("rect"),C.exit().remove();var E=e.font,I=o._meta?ai.templateString(e.text,o._meta):e.text,P=T.append("text").classed("annotation-text",!0).text(I);function R(D){return D.call(Pa.font,E).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),ju.convertToTspans(D,t,L),D}function L(){var D=P.selectAll("a");if(D.size()===1&&D.text()===P.text()){var z=T.insert("a",":first-child").attr({"xlink:xlink:href":D.attr("xlink:href"),"xlink:xlink:show":D.attr("xlink:show")}).style({cursor:"pointer"});z.node().appendChild($.node())}var F=T.select(".annotation-text-math-group"),H=!F.empty(),U=Pa.bBox((H?F:P).node()),B=U.width,X=U.height,O=e.width||B,Y=e.height||X,W=Math.round(O+2*A),K=Math.round(Y+2*A);function Z(Ke,ft){return ft==="auto"&&(Ke<1/3?ft="left":Ke>2/3?ft="right":ft="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[ft]}for(var ae=!1,ne=["x","y"],oe=0;oe<ne.length;oe++){var re=ne[oe],se=e[re+"ref"]||re,me=e["a"+re+"ref"],Re={x:i,y:n}[re],ke=(_+(re==="x"?0:-90))*Math.PI/180,ze=W*Math.cos(ke),he=K*Math.sin(ke),te=Math.abs(ze)+Math.abs(he),ue=e[re+"anchor"],Le=e[re+"shift"]*(re==="x"?1:-1),we=g[re],Pe,Ee,Ce,q,pe,ve=xl.getRefType(se);if(Re&&ve!=="domain"){var ye=Re.r2fraction(e[re]);(ye<0||ye>1)&&(me===se?(ye=Re.r2fraction(e["a"+re]),(ye<0||ye>1)&&(ae=!0)):ae=!0),Pe=Re._offset+Re.r2p(e[re]),q=.5}else{var le=ve==="domain";re==="x"?(Ce=e[re],Pe=le?Re._offset+Re._length*Ce:Pe=l.l+l.w*Ce):(Ce=1-e[re],Pe=le?Re._offset+Re._length*Ce:Pe=l.t+l.h*Ce),q=e.showarrow?.5:Ce}if(e.showarrow){we.head=Pe;var fe=e["a"+re];if(pe=ze*Z(.5,e.xanchor)-he*Z(.5,e.yanchor),me===se){var Te=xl.getRefType(me);Te==="domain"?(re==="y"&&(fe=1-fe),we.tail=Re._offset+Re._length*fe):Te==="paper"?re==="y"?(fe=1-fe,we.tail=l.t+l.h*fe):we.tail=l.l+l.w*fe:we.tail=Re._offset+Re.r2p(fe),Ee=pe}else we.tail=Pe+fe,Ee=pe+fe;we.text=we.tail+pe;var xe=o[re==="x"?"width":"height"];if(se==="paper"&&(we.head=ai.constrain(we.head,1,xe-1)),me==="pixel"){var be=-Math.max(we.tail-3,we.text),Ae=Math.min(we.tail+3,we.text)-xe;be>0?(we.tail+=be,we.text+=be):Ae>0&&(we.tail-=Ae,we.text-=Ae)}we.tail+=Le,we.head+=Le}else pe=te*Z(q,ue),Ee=pe,we.text=Pe+pe;we.text+=Le,pe+=Le,Ee+=Le,e["_"+re+"padplus"]=te/2+Ee,e["_"+re+"padminus"]=te/2-Ee,e["_"+re+"size"]=te,e["_"+re+"shift"]=pe}if(ae){T.remove();return}var De=0,Oe=0;if(e.align!=="left"&&(De=(O-B)*(e.align==="center"?.5:1)),e.valign!=="top"&&(Oe=(Y-X)*(e.valign==="middle"?.5:1)),H)F.select("svg").attr({x:A+De-1,y:A+Oe}).call(Pa.setClipUrl,M?p:null,t);else{var Fe=A+Oe-U.top,st=A+De-U.left;P.call(ju.positionText,st,Fe).call(Pa.setClipUrl,M?p:null,t)}C.select("rect").call(Pa.setRect,A,A,O,Y),$.call(Pa.setRect,k/2,k/2,W-k,K-k),T.call(Pa.setTranslate,Math.round(g.x.text-W/2),Math.round(g.y.text-K/2)),w.attr({transform:"rotate("+_+","+g.x.text+","+g.y.text+")"});var Xe=function(Ke,ft){b.selectAll(".annotation-arrow-g").remove();var N=g.x.head,G=g.y.head,j=g.x.tail+Ke,V=g.y.tail+ft,ee=g.x.text+Ke,Q=g.y.text+ft,ge=ai.rotationXYMatrix(_,ee,Q),_e=ai.apply2DTransform(ge),ce=ai.apply2DTransform2(ge),ie=+$.attr("width"),Me=+$.attr("height"),Ne=ee-.5*ie,je=Ne+ie,Ze=Q-.5*Me,nt=Ze+Me,dt=[[Ne,Ze,Ne,nt],[Ne,nt,je,nt],[je,nt,je,Ze],[je,Ze,Ne,Ze]].map(ce);if(!dt.reduce(function(rt,Be){return rt^!!ai.segmentsIntersect(N,G,N+1e6,G+1e6,Be[0],Be[1],Be[2],Be[3])},!1)){dt.forEach(function(rt){var Be=ai.segmentsIntersect(j,V,N,G,rt[0],rt[1],rt[2],rt[3]);Be&&(j=Be.x,V=Be.y)});var Ue=e.arrowwidth,St=e.arrowcolor,at=e.arrowside,qe=b.append("g").style({opacity:$i.opacity(St)}).classed("annotation-arrow-g",!0),yt=qe.append("path").attr("d","M"+j+","+V+"L"+N+","+G).style("stroke-width",Ue+"px").call($i.stroke,$i.rgb(St));if(VE(yt,at,e),s.annotationPosition&&yt.node().parentNode&&!a){var ht=N,et=G;if(e.standoff){var Qe=Math.sqrt(Math.pow(N-j,2)+Math.pow(G-V,2));ht+=e.standoff*(j-N)/Qe,et+=e.standoff*(V-G)/Qe}var Ge=qe.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(j-ht)+","+(V-et),transform:Bu(ht,et)}).style("stroke-width",Ue+6+"px").call($i.stroke,"rgba(0,0,0,0)").call($i.fill,"rgba(0,0,0,0)"),We,ct;Ho.init({element:Ge.node(),gd:t,prepFn:function(){var rt=Pa.getTranslate(T);We=rt.x,ct=rt.y,i&&i.autorange&&u(i._name+".autorange",!0),n&&n.autorange&&u(n._name+".autorange",!0)},moveFn:function(rt,Be){var vt=_e(We,ct),kt=vt[0]+rt,nr=vt[1]+Be;T.call(Pa.setTranslate,kt,nr),d("x",ei(i,rt,"x",l,e)),d("y",ei(n,Be,"y",l,e)),e.axref===e.xref&&d("ax",ei(i,rt,"ax",l,e)),e.ayref===e.yref&&d("ay",ei(n,Be,"ay",l,e)),qe.attr("transform",Bu(rt,Be)),w.attr({transform:"rotate("+_+","+kt+","+nr+")"})},doneFn:function(){Ou.call("_guiRelayout",t,h());var rt=document.querySelector(".js-notes-box-panel");rt&&rt.redraw(rt.selectedObj)}})}}};if(e.showarrow&&Xe(0,0),m){var ut;Ho.init({element:T.node(),gd:t,prepFn:function(){ut=w.attr("transform")},moveFn:function(Ke,ft){var N="pointer";if(e.showarrow)e.axref===e.xref?d("ax",ei(i,Ke,"ax",l,e)):d("ax",e.ax+Ke),e.ayref===e.yref?d("ay",ei(n,ft,"ay",l.w,e)):d("ay",e.ay+ft),Xe(Ke,ft);else{if(a)return;var G,j;if(i)G=ei(i,Ke,"x",l,e);else{var V=e._xsize/l.w,ee=e.x+(e._xshift-e.xshift)/l.w-V/2;G=Ho.align(ee+Ke/l.w,V,0,1,e.xanchor)}if(n)j=ei(n,ft,"y",l,e);else{var Q=e._ysize/l.h,ge=e.y-(e._yshift+e.yshift)/l.h-Q/2;j=Ho.align(ge-ft/l.h,Q,0,1,e.yanchor)}d("x",G),d("y",j),(!i||!n)&&(N=Ho.getCursor(i?.5:G,n?.5:j,e.xanchor,e.yanchor))}w.attr({transform:Bu(Ke,ft)+ut}),Gu(T,N)},clickFn:function(Ke,ft){e.captureevents&&t.emit("plotly_clickannotation",x(ft))},doneFn:function(){Gu(T),Ou.call("_guiRelayout",t,h());var Ke=document.querySelector(".js-notes-box-panel");Ke&&Ke.redraw(Ke.selectedObj)}})}}s.annotationText?P.call(ju.makeEditable,{delegate:T,gd:t}).call(R).on("edit",function(D){e.text=D,this.call(R),d("text",D),i&&i.autorange&&u(i._name+".autorange",!0),n&&n.autorange&&u(n._name+".autorange",!0),Ou.call("_guiRelayout",t,h())}):P.call(R)}var Ag=de.exports,XE=Ve,Mg=Mt.arrayEditor,YE={hasClickToShow:WE,onClick:ZE};function WE(t,e){var r=jw(t,e);return r.on.length>0||r.explicitOff.length>0}function ZE(t,e){var r=jw(t,e),a=r.on,i=r.off.concat(r.explicitOff),n={},o=t._fullLayout.annotations,l,s;if(!!(a.length||i.length)){for(l=0;l<a.length;l++)s=Mg(t.layout,"annotations",o[a[l]]),s.modifyItem("visible",!0),Ag.extendFlat(n,s.getUpdateObj());for(l=0;l<i.length;l++)s=Mg(t.layout,"annotations",o[i[l]]),s.modifyItem("visible",!1),Ag.extendFlat(n,s.getUpdateObj());return XE.call("update",t,{},n)}}function jw(t,e){var r=t._fullLayout.annotations,a=[],i=[],n=[],o=(e||[]).length,l,s,f,c,v,u,d,h;for(l=0;l<r.length;l++)if(f=r[l],c=f.clicktoshow,c){for(s=0;s<o;s++)if(v=e[s],u=v.xaxis,d=v.yaxis,u._id===f.xref&&d._id===f.yref&&u.d2r(v.x)===Sg(f._xclick,u)&&d.d2r(v.y)===Sg(f._yclick,d)){f.visible?c==="onout"?h=i:h=n:h=a,h.push(l);break}s===o&&f.visible&&c==="onout"&&i.push(l)}return{on:a,off:i,explicitOff:n}}function Sg(t,e){return e.type==="log"?e.l2r(t):e.d2r(t)}var Qh={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}},Lg=Hw,Cg=dr,Ss=pr,KE=Mt.templatedArray,Ls=Qh;function Dg(t){return["In order for absolute positioning of the arrow to work, *a"+t+"ref* must be exactly the same as *"+t+"ref*, otherwise *a"+t+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+t+"ref* can be set to *pixel*,","in which case the *a"+t+"* value is specified in pixels","relative to *"+t+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function $g(t,e,r){return["Sets the",t,"component of the arrow tail about the arrow head.","If `a"+t+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",e,"("+e,"to",r+").","If `a"+t+"ref` is not `pixel` and is exactly the same as `"+t+"ref`,","this is an absolute value on that axis,","like `"+t+"`, specified in the same coordinates as `"+t+"ref`."].join(" ")}var gc=KE("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (<br>), bold (<b></b>), italics (<i></i>),","hyperlinks (<a href='...'></a>). Tags <em>, <sup>, <sub>","<span> are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:Cg({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use <br> to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more <br> HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:Lg.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:Lg.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[$g("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[$g("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",Ss.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",Ls.axisRefDescription("ax","left","right"),Dg("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Ss.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",Ls.axisRefDescription("ay","bottom","top"),Dg("y")].join(" ")},xref:{valType:"enumerated",values:["paper",Ss.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",Ls.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",Ss.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",Ls.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:Cg({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}}),Eg=de.exports,Tn=Je.exports,Gw=function(e,r,a,i){i("opacity");var n=i("bgcolor"),o=i("bordercolor"),l=Tn.opacity(o);i("borderpad");var s=i("borderwidth"),f=i("showarrow");i("text",f?" ":a._dfltTitle.annotation),i("textangle"),Eg.coerceFont(i,"font",a.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),f){var v=i("arrowside"),u,d;v.indexOf("end")!==-1&&(u=i("arrowhead"),d=i("arrowsize")),v.indexOf("start")!==-1&&(i("startarrowhead",u),i("startarrowsize",d)),i("arrowcolor",l?r.bordercolor:Tn.defaultLine),i("arrowwidth",(l&&s||1)*2),i("standoff"),i("startstandoff")}var h=i("hovertext"),p=a.hoverlabel||{};if(h){var g=i("hoverlabel.bgcolor",p.bgcolor||(Tn.opacity(n)?Tn.rgb(n):Tn.defaultLine)),_=i("hoverlabel.bordercolor",p.bordercolor||Tn.contrast(g));Eg.coerceFont(i,"hoverlabel.font",{family:p.font.family,size:p.font.size,color:p.font.color||_})}i("captureevents",!!h)},Uu=de.exports,Ei=Ct.exports,QE=Va,JE=Gw,eR=gc,tR=function(e,r){QE(e,r,{name:"annotations",handleItemDefaults:rR})};function rR(t,e,r){function a(w,m){return Uu.coerce(t,e,eR,w,m)}var i=a("visible"),n=a("clicktoshow");if(!!(i||n)){JE(t,e,r,a);for(var o=e.showarrow,l=["x","y"],s=[-10,-30],f={_fullLayout:r},c=0;c<2;c++){var v=l[c],u=Ei.coerceRef(t,e,f,v,"","paper");if(u!=="paper"){var d=Ei.getFromId(f,u);d._annIndices.push(e._index)}if(Ei.coercePosition(e,f,a,u,v,.5),o){var h="a"+v,p=Ei.coerceRef(t,e,f,h,"pixel",["pixel","paper"]);p!=="pixel"&&p!==u&&(p=e[h]="pixel");var g=p==="pixel"?s[c]:.4;Ei.coercePosition(e,f,a,p,h,g)}a(v+"anchor"),a(v+"shift")}if(Uu.noneOrAll(t,e,["x","y"]),o&&Uu.noneOrAll(t,e,["ax","ay"]),n){var _=a("xclick"),b=a("yclick");e._xclick=_===void 0?e.x:Ei.cleanPosition(_,f,e.xref),e._yclick=b===void 0?e.y:Ei.cleanPosition(b,f,e.yref)}}}var aR=Ve,Rg=de.exports,Pg=Vt,Jh=function(e){return function(a,i){var n=a[e];if(!!Array.isArray(n))for(var o=aR.subplotsRegistry.cartesian,l=o.idRegex,s=i._subplots,f=s.xaxis,c=s.yaxis,v=s.cartesian,u=i._has("cartesian")||i._has("gl2d"),d=0;d<n.length;d++){var h=n[d];if(!!Rg.isPlainObject(h)){var p=Pg.cleanId(h.xref,"x",!1),g=Pg.cleanId(h.yref,"y",!1),_=l.x.test(p),b=l.y.test(g);if(_||b){u||Rg.pushUnique(i._basePlotModules,o);var w=!1;_&&f.indexOf(p)===-1&&(f.push(p),w=!0),b&&c.indexOf(g)===-1&&(c.push(g),w=!0),w&&_&&b&&v.push(p+g)}}}}},hd=de.exports,Gi=Ct.exports,iR=Kh.draw,nR=function(e){var r=e._fullLayout,a=hd.filterVisible(r.annotations);if(a.length&&e._fullData.length)return hd.syncOrAsync([iR,oR],e)};function oR(t){var e=t._fullLayout;hd.filterVisible(e.annotations).forEach(function(r){var a=Gi.getFromId(t,r.xref),i=Gi.getFromId(t,r.yref),n=Gi.getRefType(r.xref),o=Gi.getRefType(r.yref);r._extremes={},n==="range"&&zg(r,a),o==="range"&&zg(r,i)})}function zg(t,e){var r=e._id,a=r.charAt(0),i=t[a],n=t["a"+a],o=t[a+"ref"],l=t["a"+a+"ref"],s=t["_"+a+"padplus"],f=t["_"+a+"padminus"],c={x:1,y:-1}[a]*t[a+"shift"],v=3*t.arrowsize*t.arrowwidth||0,u=v+c,d=v-c,h=3*t.startarrowsize*t.arrowwidth||0,p=h+c,g=h-c,_;if(l===o){var b=Gi.findExtremes(e,[e.r2c(i)],{ppadplus:u,ppadminus:d}),w=Gi.findExtremes(e,[e.r2c(n)],{ppadplus:Math.max(s,p),ppadminus:Math.max(f,g)});_={min:[b.min[0],w.min[0]],max:[b.max[0],w.max[0]]}}else p=n?p+n:p,g=n?g-n:g,_=Gi.findExtremes(e,[e.r2c(i)],{ppadplus:Math.max(s,u,p),ppadminus:Math.max(f,d,g)});t._extremes[r]=_}var lR=lt,sR=Od,fR=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(!(n||o))return;var l=e._fullLayout.annotations,s=r._id.charAt(0),f,c;function v(d){var h=f[d],p=null;n?p=sR(h,r.range):p=Math.pow(10,h),lR(p)||(p=null),i(c+d,p)}for(var u=0;u<l.length;u++)f=l[u],c="annotations["+u+"].",f[s+"ref"]===r._id&&v(s),f["a"+s+"ref"]===r._id&&v("a"+s)},Vu=Kh,Ig=YE,cR={moduleType:"component",name:"annotations",layoutAttributes:gc,supplyLayoutDefaults:tR,includeBasePlot:Jh("annotations"),calcAutorange:nR,draw:Vu.draw,drawOne:Vu.drawOne,drawRaw:Vu.drawRaw,hasClickToShow:Ig.hasClickToShow,onClick:Ig.onClick,convertCoords:fR},Lt=gc,uR=gi.overrideAll,vR=Mt.templatedArray,pd=uR(vR("annotation",{visible:Lt.visible,x:{valType:"any",description:["Sets the annotation's x position."].join(" ")},y:{valType:"any",description:["Sets the annotation's y position."].join(" ")},z:{valType:"any",description:["Sets the annotation's z position."].join(" ")},ax:{valType:"number",description:["Sets the x component of the arrow tail about the arrow head (in pixels)."].join(" ")},ay:{valType:"number",description:["Sets the y component of the arrow tail about the arrow head (in pixels)."].join(" ")},xanchor:Lt.xanchor,xshift:Lt.xshift,yanchor:Lt.yanchor,yshift:Lt.yshift,text:Lt.text,textangle:Lt.textangle,font:Lt.font,width:Lt.width,height:Lt.height,opacity:Lt.opacity,align:Lt.align,valign:Lt.valign,bgcolor:Lt.bgcolor,bordercolor:Lt.bordercolor,borderpad:Lt.borderpad,borderwidth:Lt.borderwidth,showarrow:Lt.showarrow,arrowcolor:Lt.arrowcolor,arrowhead:Lt.arrowhead,startarrowhead:Lt.startarrowhead,arrowside:Lt.arrowside,arrowsize:Lt.arrowsize,startarrowsize:Lt.startarrowsize,arrowwidth:Lt.arrowwidth,standoff:Lt.standoff,startstandoff:Lt.startstandoff,hovertext:Lt.hovertext,hoverlabel:Lt.hoverlabel,captureevents:Lt.captureevents}),"calc","from-root"),qu=de.exports,dR=Ct.exports,hR=Va,pR=Gw,mR=pd,yR=function(e,r,a){hR(e,r,{name:"annotations",handleItemDefaults:gR,fullLayout:a.fullLayout})};function gR(t,e,r,a){function i(l,s){return qu.coerce(t,e,mR,l,s)}function n(l){var s=l+"axis",f={_fullLayout:{}};return f._fullLayout[s]=r[s],dR.coercePosition(e,f,i,l,l,.5)}var o=i("visible");!o||(pR(t,e,a.fullLayout,i),n("x"),n("y"),n("z"),qu.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",i("ax",-10),i("ay",-30),qu.noneOrAll(t,e,["ax","ay"])))}var Ng=de.exports,Fg=Ct.exports,bR=function(e){for(var r=e.fullSceneLayout,a=r.annotations,i=0;i<a.length;i++)xR(a[i],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function xR(t,e){var r=e.fullSceneLayout,a=r.domain,i=e.fullLayout._size,n={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},Ng.extendFlat(t._xa,n),Fg.setConvert(t._xa),t._xa._offset=i.l+a.x[0]*i.w,t._xa.l2p=function(){return .5*(1+t._pdata[0]/t._pdata[3])*i.w*(a.x[1]-a.x[0])},t._ya={},Ng.extendFlat(t._ya,n),Fg.setConvert(t._ya),t._ya._offset=i.t+(1-a.y[1])*i.h,t._ya.l2p=function(){return .5*(1-t._pdata[1]/t._pdata[3])*i.h*(a.y[1]-a.y[0])}}function Xu(t,e){var r=[0,0,0,0],a,i;for(a=0;a<4;++a)for(i=0;i<4;++i)r[i]+=t[4*a+i]*e[a];return r}function _R(t,e){var r=Xu(t.projection,Xu(t.view,Xu(t.model,[e[0],e[1],e[2],1])));return r}var wR=_R,TR=Kh.drawRaw,kR=wR,AR=["x","y","z"],MR=function(e){for(var r=e.fullSceneLayout,a=e.dataScale,i=r.annotations,n=0;n<i.length;n++){for(var o=i[n],l=!1,s=0;s<3;s++){var f=AR[s],c=o[f],v=r[f+"axis"],u=v.r2fraction(c);if(u<0||u>1){l=!0;break}}l?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+n+'"]').remove():(o._pdata=kR(e.glplot.cameraParams,[r.xaxis.r2l(o.x)*a[0],r.yaxis.r2l(o.y)*a[1],r.zaxis.r2l(o.z)*a[2]]),TR(e.graphDiv,o,n,e.id,o._xa,o._ya))}},SR=Ve,Hg=de.exports,LR={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:pd}}},layoutAttributes:pd,handleDefaults:yR,includeBasePlot:CR,convert:bR,draw:MR};function CR(t,e){var r=SR.subplotsRegistry.gl3d;if(!!r)for(var a=r.attrRegex,i=Object.keys(t),n=0;n<i.length;n++){var o=i[n];a.test(o)&&(t[o].annotations||[]).length&&(Hg.pushUnique(e._basePlotModules,r),Hg.pushUnique(e._subplots.gl3d,o))}}var Og=gc,Bg=xo.line,DR=Ga.dash,Oo=Bt.extendFlat,$R=Mt.templatedArray,jg=Qh,Uw=$R("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this shape is visible."].join(" ")},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:"Specifies whether shapes are drawn below or above traces."},xref:Oo({},Og.xref,{description:["Sets the shape's x coordinate axis.",jg.axisRefDescription("x","left","right"),"If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, then you must convert","the date to unix time in milliseconds."].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},yref:Oo({},Og.yref,{description:["Sets the annotation's y coordinate axis.",jg.axisRefDescription("y","bottom","top")].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},path:{valType:"string",editType:"calc+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:Oo({},Bg.color,{editType:"arraydraw"}),width:Oo({},Bg.width,{editType:"calc+arraydraw"}),dash:Oo({},DR,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color filling the shape's interior. Only applies to closed shapes."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw",description:["Determines which regions of complex paths constitute the interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether the shape could be activated for edit or not.","Has no effect when the older editable shapes mode is enabled via","`config.editable` or `config.edits.shapePosition`."].join(" ")},editType:"arraydraw"}),Yu=de.exports,kn=Ct.exports,ER=Va,RR=Uw,Gg=cc,PR=function(e,r){ER(e,r,{name:"shapes",handleItemDefaults:zR})};function zR(t,e,r){function a(C,E){return Yu.coerce(t,e,RR,C,E)}var i=a("visible");if(!!i){var n=a("path"),o=n?"path":"rect",l=a("type",o);e.type!=="path"&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var s=a("line.width");s&&(a("line.color"),a("line.dash"));for(var f=a("xsizemode"),c=a("ysizemode"),v=["x","y"],u=0;u<2;u++){var d=v[u],h=d+"anchor",p=d==="x"?f:c,g={_fullLayout:r},_,b,w,m=kn.coerceRef(t,e,g,d,void 0,"paper"),y=kn.getRefType(m);if(y==="range"?(_=kn.getFromId(g,m),_._shapeIndices.push(e._index),w=Gg.rangeToShapePosition(_),b=Gg.shapePositionToRange(_)):b=w=Yu.identity,l!=="path"){var x=.25,T=.75,k=d+"0",S=d+"1",A=t[k],$=t[S];t[k]=b(t[k],!0),t[S]=b(t[S],!0),p==="pixel"?(a(k,0),a(S,10)):(kn.coercePosition(e,g,a,m,k,x),kn.coercePosition(e,g,a,m,S,T)),e[k]=w(e[k]),e[S]=w(e[S]),t[k]=A,t[S]=$}if(p==="pixel"){var M=t[h];t[h]=b(t[h],!0),kn.coercePosition(e,g,a,m,h,.25),e[h]=w(e[h]),t[h]=M}}l==="path"?a("path"):Yu.noneOrAll(t,e,["x0","x1","y0","y1"])}}var IR=Je.exports,NR=function(e,r,a){a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var i=a("newshape.line.width");if(i){var n=(e||{}).plot_bgcolor||"#FFF";a("newshape.line.color",IR.contrast(n)),a("newshape.line.dash")}a("activeshape.fillcolor"),a("activeshape.opacity")},md=de.exports,An=Ct.exports,ro=Lh,Vw=cc,FR=function(e){var r=e._fullLayout,a=md.filterVisible(r.shapes);if(!(!a.length||!e._fullData.length))for(var i=0;i<a.length;i++){var n=a[i];n._extremes={};var o,l,s=An.getRefType(n.xref),f=An.getRefType(n.yref);if(n.xref!=="paper"&&s!=="domain"){var c=n.xsizemode==="pixel"?n.xanchor:n.x0,v=n.xsizemode==="pixel"?n.xanchor:n.x1;o=An.getFromId(e,n.xref),l=Ug(o,c,v,n.path,ro.paramIsX),l&&(n._extremes[o._id]=An.findExtremes(o,l,HR(n)))}if(n.yref!=="paper"&&f!=="domain"){var u=n.ysizemode==="pixel"?n.yanchor:n.y0,d=n.ysizemode==="pixel"?n.yanchor:n.y1;o=An.getFromId(e,n.yref),l=Ug(o,u,d,n.path,ro.paramIsY),l&&(n._extremes[o._id]=An.findExtremes(o,l,OR(n)))}}};function HR(t){return qw(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function OR(t){return qw(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function qw(t,e,r,a,i,n){var o=t/2,l=n;if(e==="pixel"){var s=i?Vw.extractPathCoords(i,n?ro.paramIsY:ro.paramIsX):[r,a],f=md.aggNums(Math.max,null,s),c=md.aggNums(Math.min,null,s),v=c<0?Math.abs(c)+o:o,u=f>0?f+o:o;return{ppad:o,ppadplus:l?v:u,ppadminus:l?u:v}}else return{ppad:o}}function Ug(t,e,r,a,i){var n=t.type==="category"||t.type==="multicategory"?t.r2c:t.d2c;if(e!==void 0)return[n(e),n(r)];if(!!a){var o=1/0,l=-1/0,s=a.match(ro.segmentRE),f,c,v,u,d;for(t.type==="date"&&(n=Vw.decodeDate(n)),f=0;f<s.length;f++)c=s[f],v=i[c.charAt(0)].drawn,v!==void 0&&(u=s[f].substr(1).match(ro.paramRE),!(!u||u.length<v)&&(d=n(u[v]),d<o&&(o=d),d>l&&(l=d)));if(l>=o)return[o,l]}}var Vg=g_,BR={moduleType:"component",name:"shapes",layoutAttributes:Uw,supplyLayoutDefaults:PR,supplyDrawNewShapeDefaults:NR,includeBasePlot:Jh("shapes"),calcAutorange:FR,draw:Vg.draw,drawOne:Vg.drawOne},qg=pr,jR=Mt.templatedArray,Xg=Qh,Xw=jR("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width.","When `xref` ends with ` domain`, units are sized relative","to the axis width."].join(" ")},sizey:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height.","When `yref` ends with ` domain`, units are sized relative","to the axis height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",qg.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",Xg.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",qg.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",Xg.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"}),GR=de.exports,Wu=Ct.exports,UR=Va,VR=Xw,qR="images",XR=function(e,r){var a={name:qR,handleItemDefaults:YR};UR(e,r,a)};function YR(t,e,r){function a(u,d){return GR.coerce(t,e,VR,u,d)}var i=a("source"),n=a("visible",!!i);if(!n)return e;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var o={_fullLayout:r},l=["x","y"],s=0;s<2;s++){var f=l[s],c=Wu.coerceRef(t,e,o,f,"paper",void 0);if(c!=="paper"){var v=Wu.getFromId(o,c);v._imgIndices.push(e._index)}Wu.coercePosition(e,o,a,c,f,0)}return e}var Yg=tt.exports,WR=Tt.exports,Mn=Ct.exports,Wg=Vt,ZR=on,KR=function(e){var r=e._fullLayout,a=[],i={},n=[],o,l;for(l=0;l<r.images.length;l++){var s=r.images[l];if(s.visible)if(s.layer==="below"&&s.xref!=="paper"&&s.yref!=="paper"){o=Wg.ref2id(s.xref)+Wg.ref2id(s.yref);var f=r._plots[o];if(!f){n.push(s);continue}f.mainplot&&(o=f.mainplot.id),i[o]||(i[o]=[]),i[o].push(s)}else s.layer==="above"?a.push(s):n.push(s)}var c={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function v(b){var w=Yg.select(this);if(this._imgSrc!==b.source)if(w.attr("xmlns",ZR.svg),b.source&&b.source.slice(0,5)==="data:")w.attr("xlink:href",b.source),this._imgSrc=b.source;else{var m=new Promise(function(y){var x=new Image;this.img=x,x.setAttribute("crossOrigin","anonymous"),x.onerror=T,x.onload=function(){var k=document.createElement("canvas");k.width=this.width,k.height=this.height;var S=k.getContext("2d");S.drawImage(this,0,0);var A=k.toDataURL("image/png");w.attr("xlink:href",A),y()},w.on("error",T),x.src=b.source,this._imgSrc=b.source;function T(){w.remove(),y()}}.bind(this));e._promises.push(m)}}function u(b){var w=Yg.select(this),m=Mn.getFromId(e,b.xref),y=Mn.getFromId(e,b.yref),x=Mn.getRefType(b.xref)==="domain",T=Mn.getRefType(b.yref)==="domain",k=r._size,S,A;m!==void 0?S=typeof b.xref=="string"&&x?m._length*b.sizex:Math.abs(m.l2p(b.sizex)-m.l2p(0)):S=b.sizex*k.w,y!==void 0?A=typeof b.yref=="string"&&T?y._length*b.sizey:Math.abs(y.l2p(b.sizey)-y.l2p(0)):A=b.sizey*k.h;var $=S*c.x[b.xanchor].offset,M=A*c.y[b.yanchor].offset,C=c.x[b.xanchor].sizing+c.y[b.yanchor].sizing,E,I;switch(m!==void 0?E=typeof b.xref=="string"&&x?m._length*b.x+m._offset:m.r2p(b.x)+m._offset:E=b.x*k.w+k.l,E+=$,y!==void 0?I=typeof b.yref=="string"&&T?y._length*(1-b.y)+y._offset:y.r2p(b.y)+y._offset:I=k.h-b.y*k.h+k.t,I+=M,b.sizing){case"fill":C+=" slice";break;case"stretch":C="none";break}w.attr({x:E,y:I,width:S,height:A,preserveAspectRatio:C,opacity:b.opacity});var P=m&&Mn.getRefType(b.xref)!=="domain"?m._id:"",R=y&&Mn.getRefType(b.yref)!=="domain"?y._id:"",L=P+R;WR.setClipUrl(w,L?"clip"+r._uid+L:null,e)}var d=r._imageLowerLayer.selectAll("image").data(n),h=r._imageUpperLayer.selectAll("image").data(a);d.enter().append("image"),h.enter().append("image"),d.exit().remove(),h.exit().remove(),d.each(function(b){v.bind(this)(b),u.bind(this)(b)}),h.each(function(b){v.bind(this)(b),u.bind(this)(b)});var p=Object.keys(r._plots);for(l=0;l<p.length;l++){o=p[l];var g=r._plots[o];if(!!g.imagelayer){var _=g.imagelayer.selectAll("image").data(i[o]||[]);_.enter().append("image"),_.exit().remove(),_.each(function(b){v.bind(this)(b),u.bind(this)(b)})}}},Zg=lt,QR=Od,JR=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(!!(n||o)){for(var l=e._fullLayout.images,s=r._id.charAt(0),f,c,v=0;v<l.length;v++)if(f=l[v],c="images["+v+"].",f[s+"ref"]===r._id){var u=f[s],d=f["size"+s],h=null,p=null;if(n){h=QR(u,r.range);var g=d/Math.pow(10,h)/2;p=2*Math.log(g+Math.sqrt(1+g*g))/Math.LN10}else h=Math.pow(10,u),p=h*(Math.pow(10,d/2)-Math.pow(10,-d/2));Zg(h)?Zg(p)||(p=null):(h=null,p=null),i(c+s,h),i(c+"size"+s,p)}}},eP={moduleType:"component",name:"images",layoutAttributes:Xw,supplyLayoutDefaults:XR,includeBasePlot:Jh("images"),draw:KR,convertCoords:JR},ep={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}},tP=dr,rP=hr,aP=Bt.extendFlat,iP=gi.overrideAll,nP=qd,Yw=Mt.templatedArray,oP=Yw("button",{visible:{valType:"boolean",description:"Determines whether or not this button is visible."},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called on click.","If the `skip` method is used, the API updatemenu will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","updatemenu events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on click."].join(" ")},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets a 2nd set of `args`,","these arguments values are passed to the Plotly","method set in `method` when clicking this button while in the active state.","Use this to create toggle buttons."].join(" ")},label:{valType:"string",dflt:"",description:"Sets the text label to appear on the button."},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_buttonclicked` method and executing the API command manually without losing","the benefit of the updatemenu automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}}),Ww=iP(Yw("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean",description:["Determines whether or not the update menu is visible."].join(" ")},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown",description:["Determines whether the buttons are accessible via a dropdown menu","or whether the buttons are stacked horizontally or vertically"].join(" ")},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down",description:["Determines the direction in which the buttons are laid out, whether","in a dropdown menu or a row/column of buttons. For `left` and `up`,","the buttons will still appear in left-to-right or top-to-bottom order","respectively."].join(" ")},active:{valType:"integer",min:-1,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},showactive:{valType:"boolean",dflt:!0,description:"Highlights active dropdown item or active button if true."},buttons:oP,x:{valType:"number",min:-2,max:3,dflt:-.05,description:"Sets the x position (in normalized coordinates) of the update menu."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right",description:["Sets the update menu's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,description:"Sets the y position (in normalized coordinates) of the update menu."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the update menu's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},pad:aP(nP({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:tP({description:"Sets the font of the update menu button text."}),bgcolor:{valType:"color",description:"Sets the background color of the update menu buttons."},bordercolor:{valType:"color",dflt:rP.borderLine,description:"Sets the color of the border enclosing the update menu."},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw",description:"Sets the width (in px) of the border enclosing the update menu."}}),"arraydraw","from-root"),Js=de.exports,Zw=Va,Kw=Ww,lP=ep,sP=lP.name,fP=Kw.buttons,cP=function(e,r){var a={name:sP,handleItemDefaults:uP};Zw(e,r,a)};function uP(t,e,r){function a(o,l){return Js.coerce(t,e,Kw,o,l)}var i=Zw(t,e,{name:"buttons",handleItemDefaults:vP}),n=a("visible",i.length>0);!n||(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Js.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Js.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function vP(t,e){function r(i,n){return Js.coerce(t,e,fP,i,n)}var a=r("visible",t.method==="skip"||Array.isArray(t.args));a&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}var dP=Ft,oa=tt.exports,Kg=Je.exports,Yn=Tt.exports,Lf=de.exports;function Ft(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Ft.barWidth=2;Ft.barLength=20;Ft.barRadius=2;Ft.barPad=1;Ft.barColor="#808BA4";Ft.prototype.enable=function(e,r,a){var i=this.gd._fullLayout,n=i.width,o=i.height;this.position=e;var l=this.position.l,s=this.position.w,f=this.position.t,c=this.position.h,v=this.position.direction,u=v==="down",d=v==="left",h=v==="right",p=v==="up",g=s,_=c,b,w,m,y;!u&&!d&&!h&&!p&&(this.position.direction="down",u=!0);var x=u||p;x?(b=l,w=b+g,u?(m=f,y=Math.min(m+_,o),_=y-m):(y=f+_,m=Math.max(y-_,0),_=y-m)):(m=f,y=m+_,d?(w=l+g,b=Math.max(w-g,0),g=w-b):(b=l,w=Math.min(b+g,n),g=w-b)),this._box={l:b,t:m,w:g,h:_};var T=s>g,k=Ft.barLength+2*Ft.barPad,S=Ft.barWidth+2*Ft.barPad,A=l,$=f+c;$+S>o&&($=o-S);var M=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);M.exit().on(".drag",null).remove(),M.enter().append("rect").classed("scrollbar-horizontal",!0).call(Kg.fill,Ft.barColor),T?(this.hbar=M.attr({rx:Ft.barRadius,ry:Ft.barRadius,x:A,y:$,width:k,height:S}),this._hbarXMin=A+k/2,this._hbarTranslateMax=g-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=c>_,E=Ft.barWidth+2*Ft.barPad,I=Ft.barLength+2*Ft.barPad,P=l+s,R=f;P+E>n&&(P=n-E);var L=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-vertical",!0).call(Kg.fill,Ft.barColor),C?(this.vbar=L.attr({rx:Ft.barRadius,ry:Ft.barRadius,x:P,y:R,width:E,height:I}),this._vbarYMin=R+I/2,this._vbarTranslateMax=_-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var D=this.id,z=b-.5,F=C?w+E+.5:w+.5,H=m-.5,U=T?y+S+.5:y+.5,B=i._topdefs.selectAll("#"+D).data(T||C?[0]:[]);if(B.exit().remove(),B.enter().append("clipPath").attr("id",D).append("rect"),T||C?(this._clipRect=B.select("rect").attr({x:Math.floor(z),y:Math.floor(H),width:Math.ceil(F)-Math.floor(z),height:Math.ceil(U)-Math.floor(H)}),this.container.call(Yn.setClipUrl,D,this.gd),this.bg.attr({x:l,y:f,width:s,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Yn.setClipUrl,null),delete this._clipRect),T||C){var X=oa.behavior.drag().on("dragstart",function(){oa.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(X);var O=oa.behavior.drag().on("dragstart",function(){oa.event.sourceEvent.preventDefault(),oa.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(O),C&&this.vbar.on(".drag",null).call(O)}this.setTranslate(r,a)};Ft.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Yn.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)};Ft.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=oa.event.dx),this.vbar&&(r-=oa.event.dy),this.setTranslate(e,r)};Ft.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=oa.event.deltaY),this.vbar&&(r+=oa.event.deltaY),this.setTranslate(e,r)};Ft.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,i=a+this._hbarTranslateMax,n=Lf.constrain(oa.event.x,a,i),o=(n-a)/(i-a),l=this.position.w-this._box.w;e=o*l}if(this.vbar){var s=r+this._vbarYMin,f=s+this._vbarTranslateMax,c=Lf.constrain(oa.event.y,s,f),v=(c-s)/(f-s),u=this.position.h-this._box.h;r=v*u}this.setTranslate(e,r)};Ft.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=Lf.constrain(e||0,0,a),r=Lf.constrain(r||0,0,i),this.translateX=e,this.translateY=r,this.container.call(Yn.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var n=e/a;this.hbar.call(Yn.setTranslate,e+n*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(Yn.setTranslate,e,r+o*this._vbarTranslateMax)}};var ao=tt.exports,_l=Ut.exports,wl=Je.exports,io=Tt.exports,Rr=de.exports,Cf=ir,hP=Mt.arrayEditor,Qw=Lr.LINE_SPACING,Ye=ep,pP=dP,mP=function(e){var r=e._fullLayout,a=Rr.filterVisible(r[Ye.name]);function i(u){_l.autoMargin(e,aT(u))}var n=r._menulayer.selectAll("g."+Ye.containerClassName).data(a.length>0?[0]:[]);if(n.enter().append("g").classed(Ye.containerClassName,!0).style("cursor","pointer"),n.exit().each(function(){ao.select(this).selectAll("g."+Ye.headerGroupClassName).each(i)}).remove(),a.length!==0){var o=n.selectAll("g."+Ye.headerGroupClassName).data(a,yP);o.enter().append("g").classed(Ye.headerGroupClassName,!0);for(var l=Rr.ensureSingle(n,"g",Ye.dropdownButtonGroupClassName,function(u){u.style("pointer-events","all")}),s=0;s<a.length;s++){var f=a[s];TP(e,f)}var c="updatemenus"+r._uid,v=new pP(e,l,c);o.enter().size()&&(l.node().parentNode.appendChild(l.node()),l.call(gd)),o.exit().each(function(u){l.call(gd),i(u)}).remove(),o.each(function(u){var d=ao.select(this),h=u.type==="dropdown"?l:null;_l.manageCommandObserver(e,u,u.buttons,function(p){yd(e,u,u.buttons[p.index],d,h,v,p.index,!0)}),u.type==="dropdown"?(eT(e,d,l,v,u),Jw(l,u)&&Tl(e,d,l,v,u)):Tl(e,d,null,null,u)})}};function yP(t){return t._index}function gP(t){return+t.attr(Ye.menuIndexAttrName)==-1}function Jw(t,e){return+t.attr(Ye.menuIndexAttrName)===e._index}function yd(t,e,r,a,i,n,o,l){e.active=o,hP(t.layout,Ye.name,e).applyUpdate("active",o),e.type==="buttons"?Tl(t,a,null,null,e):e.type==="dropdown"&&(i.attr(Ye.menuIndexAttrName,"-1"),eT(t,a,i,n,e),l||Tl(t,a,i,n,e))}function eT(t,e,r,a,i){var n=Rr.ensureSingle(e,"g",Ye.headerClassName,function(u){u.style("pointer-events","all")}),o=i._dims,l=i.active,s=i.buttons[l]||Ye.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},c={width:o.headerWidth,height:o.headerHeight};n.call(tp,i,s,t).call(iT,i,f,c);var v=Rr.ensureSingle(e,"text",Ye.headerArrowClassName,function(u){u.attr("text-anchor","end").call(io.font,i.font).text(Ye.arrowSymbol[i.direction])});v.attr({x:o.headerWidth-Ye.arrowOffsetX+i.pad.l,y:o.headerHeight/2+Ye.textOffsetY+i.pad.t}),n.on("click",function(){r.call(gd,String(Jw(r,i)?-1:i._index)),Tl(t,e,r,a,i)}),n.on("mouseover",function(){n.call(tT)}),n.on("mouseout",function(){n.call(rT,i)}),io.setTranslate(e,o.lx,o.ly)}function Tl(t,e,r,a,i){r||(r=e,r.attr("pointer-events","all"));var n=!gP(r)||i.type==="buttons"?i.buttons:[],o=i.type==="dropdown"?Ye.dropdownButtonClassName:Ye.buttonClassName,l=r.selectAll("g."+o).data(Rr.filterVisible(n)),s=l.enter().append("g").classed(o,!0),f=l.exit();i.type==="dropdown"?(s.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var c=0,v=0,u=i._dims,d=["up","down"].indexOf(i.direction)!==-1;i.type==="dropdown"&&(d?v=u.headerHeight+Ye.gapButtonHeader:c=u.headerWidth+Ye.gapButtonHeader),i.type==="dropdown"&&i.direction==="up"&&(v=-Ye.gapButtonHeader+Ye.gapButton-u.openHeight),i.type==="dropdown"&&i.direction==="left"&&(c=-Ye.gapButtonHeader+Ye.gapButton-u.openWidth);var h={x:u.lx+c+i.pad.l,y:u.ly+v+i.pad.t,yPad:Ye.gapButton,xPad:Ye.gapButton,index:0},p={l:h.x+i.borderwidth,t:h.y+i.borderwidth};l.each(function(g,_){var b=ao.select(this);b.call(tp,i,g,t).call(iT,i,h),b.on("click",function(){ao.event.defaultPrevented||(g.execute&&(g.args2&&i.active===_?(yd(t,i,g,e,r,a,-1),_l.executeAPICommand(t,g.method,g.args2)):(yd(t,i,g,e,r,a,_),_l.executeAPICommand(t,g.method,g.args))),t.emit("plotly_buttonclicked",{menu:i,button:g,active:i.active}))}),b.on("mouseover",function(){b.call(tT)}),b.on("mouseout",function(){b.call(rT,i),l.call(Qg,i)})}),l.call(Qg,i),d?(p.w=Math.max(u.openWidth,u.headerWidth),p.h=h.y-p.t):(p.w=h.x-p.l,p.h=Math.max(u.openHeight,u.headerHeight)),p.direction=i.direction,a&&(l.size()?bP(t,e,r,a,i,p):xP(a))}function bP(t,e,r,a,i,n){var o=i.direction,l=o==="up"||o==="down",s=i._dims,f=i.active,c,v,u;if(l)for(v=0,u=0;u<f;u++)v+=s.heights[u]+Ye.gapButton;else for(c=0,u=0;u<f;u++)c+=s.widths[u]+Ye.gapButton;a.enable(n,c,v),a.hbar&&a.hbar.attr("opacity","0").transition().attr("opacity","1"),a.vbar&&a.vbar.attr("opacity","0").transition().attr("opacity","1")}function xP(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr("opacity","0").each("end",function(){e=!1,r||t.disable()}),r&&t.vbar.transition().attr("opacity","0").each("end",function(){r=!1,e||t.disable()})}function tp(t,e,r,a){t.call(_P,e).call(wP,e,r,a)}function _P(t,e){var r=Rr.ensureSingle(t,"rect",Ye.itemRectClassName,function(a){a.attr({rx:Ye.rx,ry:Ye.ry,"shape-rendering":"crispEdges"})});r.call(wl.stroke,e.bordercolor).call(wl.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function wP(t,e,r,a){var i=Rr.ensureSingle(t,"text",Ye.itemTextClassName,function(l){l.attr({"text-anchor":"start","data-notex":1})}),n=r.label,o=a._fullLayout._meta;o&&(n=Rr.templateString(n,o)),i.call(io.font,e.font).text(n).call(Cf.convertToTspans,a)}function Qg(t,e){var r=e.active;t.each(function(a,i){var n=ao.select(this);i===r&&e.showactive&&n.select("rect."+Ye.itemRectClassName).call(wl.fill,Ye.activeColor)})}function tT(t){t.select("rect."+Ye.itemRectClassName).call(wl.fill,Ye.hoverColor)}function rT(t,e){t.select("rect."+Ye.itemRectClassName).call(wl.fill,e.bgcolor)}function TP(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=io.tester.selectAll("g."+Ye.dropdownButtonClassName).data(Rr.filterVisible(e.buttons));a.enter().append("g").classed(Ye.dropdownButtonClassName,!0);var i=["up","down"].indexOf(e.direction)!==-1;a.each(function(c,v){var u=ao.select(this);u.call(tp,e,c,t);var d=u.select("."+Ye.itemTextClassName),h=d.node()&&io.bBox(d.node()).width,p=Math.max(h+Ye.textPadX,Ye.minWidth),g=e.font.size*Qw,_=Cf.lineCount(d),b=Math.max(g*_,Ye.minHeight)+Ye.textOffsetY;b=Math.ceil(b),p=Math.ceil(p),r.widths[v]=p,r.heights[v]=b,r.height1=Math.max(r.height1,b),r.width1=Math.max(r.width1,p),i?(r.totalWidth=Math.max(r.totalWidth,p),r.openWidth=r.totalWidth,r.totalHeight+=b+Ye.gapButton,r.openHeight+=b+Ye.gapButton):(r.totalWidth+=p+Ye.gapButton,r.openWidth+=p+Ye.gapButton,r.totalHeight=Math.max(r.totalHeight,b),r.openHeight=r.totalHeight)}),i?r.totalHeight-=Ye.gapButton:r.totalWidth-=Ye.gapButton,r.headerWidth=r.width1+Ye.arrowPadX,r.headerHeight=r.height1,e.type==="dropdown"&&(i?(r.width1+=Ye.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=Ye.arrowPadX),a.remove();var n=r.totalWidth+e.pad.l+e.pad.r,o=r.totalHeight+e.pad.t+e.pad.b,l=t._fullLayout._size;r.lx=l.l+l.w*e.x,r.ly=l.t+l.h*(1-e.y);var s="left";Rr.isRightAnchor(e)&&(r.lx-=n,s="right"),Rr.isCenterAnchor(e)&&(r.lx-=n/2,s="center");var f="top";Rr.isBottomAnchor(e)&&(r.ly-=o,f="bottom"),Rr.isMiddleAnchor(e)&&(r.ly-=o/2,f="middle"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),_l.autoMargin(t,aT(e),{x:e.x,y:e.y,l:n*({right:1,center:.5}[s]||0),r:n*({left:1,center:.5}[s]||0),b:o*({top:1,middle:.5}[f]||0),t:o*({bottom:1,middle:.5}[f]||0)})}function aT(t){return Ye.autoMarginIdRoot+t._index}function iT(t,e,r,a){a=a||{};var i=t.select("."+Ye.itemRectClassName),n=t.select("."+Ye.itemTextClassName),o=e.borderwidth,l=r.index,s=e._dims;io.setTranslate(t,o+r.x,o+r.y);var f=["up","down"].indexOf(e.direction)!==-1,c=a.height||(f?s.heights[l]:s.height1);i.attr({x:0,y:0,width:a.width||(f?s.width1:s.widths[l]),height:c});var v=e.font.size*Qw,u=Cf.lineCount(n),d=(u-1)*v/2;Cf.positionText(n,Ye.textOffsetX,c/2-d+Ye.textOffsetY),f?r.y+=s.heights[l]+r.yPad:r.x+=s.widths[l]+r.xPad,r.index++}function gd(t,e){t.attr(Ye.menuIndexAttrName,e||"-1").selectAll("g."+Ye.dropdownButtonClassName).remove()}var kP=ep,AP={moduleType:"component",name:kP.name,layoutAttributes:Ww,supplyLayoutDefaults:cP,draw:mP},bc={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0},Jg=dr,MP=qd,SP=Bt.extendDeepAll,LP=gi.overrideAll,CP=Yf,nT=Mt.templatedArray,Ri=bc,DP=nT("step",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not this step is included in the slider."].join(" ")},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called when the slider value is changed.","If the `skip` method is used, the API slider will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","slider events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on slide."].join(" ")},label:{valType:"string",description:"Sets the text label to appear on the slider"},value:{valType:"string",description:["Sets the value of the slider step, used to refer to the step programatically.","Defaults to the slider label if not provided."].join(" ")},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_sliderchange` method and executing the API command manually without losing","the benefit of the slider automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}}),oT=LP(nT("slider",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not the slider is visible."].join(" ")},active:{valType:"number",min:0,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},steps:DP,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this slider length","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the slider","This measure excludes the padding of both ends.","That is, the slider's length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the x position (in normalized coordinates) of the slider."},pad:SP(MP({editType:"arraydraw"}),{description:"Set the padding of the slider component along each side."},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",description:["Sets the slider's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the y position (in normalized coordinates) of the slider."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the slider's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},transition:{duration:{valType:"number",min:0,dflt:150,description:"Sets the duration of the slider transition"},easing:{valType:"enumerated",values:CP.transition.easing.values,dflt:"cubic-in-out",description:"Sets the easing function of the slider transition"}},currentvalue:{visible:{valType:"boolean",dflt:!0,description:["Shows the currently-selected value above the slider."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",description:["The alignment of the value readout relative to the length of the slider."].join(" ")},offset:{valType:"number",dflt:10,description:["The amount of space, in pixels, between the current value label","and the slider."].join(" ")},prefix:{valType:"string",description:"When currentvalue.visible is true, this sets the prefix of the label."},suffix:{valType:"string",description:"When currentvalue.visible is true, this sets the suffix of the label."},font:Jg({description:"Sets the font of the current value label text."})},font:Jg({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:Ri.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:Ri.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:Ri.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:Ri.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:Ri.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:Ri.tickColor,description:"Sets the color of the border enclosing the slider."},tickwidth:{valType:"number",min:0,dflt:1,description:"Sets the tick width (in px)."},minorticklen:{valType:"number",min:0,dflt:Ri.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root"),Hn=de.exports,lT=Va,sT=oT,$P=bc,EP=$P.name,RP=sT.steps,PP=function(e,r){lT(e,r,{name:EP,handleItemDefaults:zP})};function zP(t,e,r){function a(v,u){return Hn.coerce(t,e,sT,v,u)}for(var i=lT(t,e,{name:"steps",handleItemDefaults:IP}),n=0,o=0;o<i.length;o++)i[o].visible&&n++;var l;if(n<2?l=e.visible=!1:l=a("visible"),!!l){e._stepCount=n;var s=e._visibleSteps=Hn.filterVisible(i),f=a("active");(i[f]||{}).visible||(e.active=s[0]._index),a("x"),a("y"),Hn.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("len"),a("lenmode"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Hn.coerceFont(a,"font",r.font);var c=a("currentvalue.visible");c&&(a("currentvalue.xanchor"),a("currentvalue.prefix"),a("currentvalue.suffix"),a("currentvalue.offset"),Hn.coerceFont(a,"currentvalue.font",e.font)),a("transition.duration"),a("transition.easing"),a("bgcolor"),a("activebgcolor"),a("bordercolor"),a("borderwidth"),a("ticklen"),a("tickwidth"),a("tickcolor"),a("minorticklen")}}function IP(t,e){function r(n,o){return Hn.coerce(t,e,RP,n,o)}var a;if(t.method!=="skip"&&!Array.isArray(t.args)?a=e.visible=!1:a=r("visible"),a){r("method"),r("args");var i=r("label","step-"+e._index);r("value",i),r("execute")}}var la=tt.exports,Df=Ut.exports,di=Je.exports,ca=Tt.exports,Pr=de.exports,NP=Pr.strTranslate,nl=ir,FP=Mt.arrayEditor,ot=bc,rp=Lr,fT=rp.LINE_SPACING,Zu=rp.FROM_TL,Ku=rp.FROM_BR,HP=function(e){var r=e._fullLayout,a=OP(r,e),i=r._infolayer.selectAll("g."+ot.containerClassName).data(a.length>0?[0]:[]);i.enter().append("g").classed(ot.containerClassName,!0).style("cursor","ew-resize");function n(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),Df.autoMargin(e,cT(f))}if(i.exit().each(function(){la.select(this).selectAll("g."+ot.groupClassName).each(n)}).remove(),a.length!==0){var o=i.selectAll("g."+ot.groupClassName).data(a,BP);o.enter().append("g").classed(ot.groupClassName,!0),o.exit().each(n).remove();for(var l=0;l<a.length;l++){var s=a[l];jP(e,s)}o.each(function(f){var c=la.select(this);XP(f),Df.manageCommandObserver(e,f,f._visibleSteps,function(v){var u=c.data()[0];u.active!==v.index&&(u._dragging||vT(e,c,u,v.index,!1,!0))}),GP(e,la.select(this),f)})}};function cT(t){return ot.autoMarginIdRoot+t._index}function OP(t,e){for(var r=t[ot.name],a=[],i=0;i<r.length;i++){var n=r[i];!n.visible||(n._gd=e,a.push(n))}return a}function BP(t){return t._index}function jP(t,e){var r=ca.tester.selectAll("g."+ot.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(ot.labelGroupClass,!0);var a=0,i=0;r.each(function(h){var p=la.select(this),g=uT(p,{step:h},e),_=g.node();if(_){var b=ca.bBox(_);i=Math.max(i,b.height),a=Math.max(a,b.width)}}),r.remove();var n=e._dims={};n.inputAreaWidth=Math.max(ot.railWidth,ot.gripHeight);var o=t._fullLayout._size;n.lx=o.l+o.w*e.x,n.ly=o.t+o.h*(1-e.y),e.lenmode==="fraction"?n.outerLength=Math.round(o.w*e.len):n.outerLength=e.len,n.inputAreaStart=0,n.inputAreaLength=Math.round(n.outerLength-e.pad.l-e.pad.r);var l=n.inputAreaLength-2*ot.stepInset,s=l/(e._stepCount-1),f=a+ot.labelPadding;if(n.labelStride=Math.max(1,Math.ceil(f/s)),n.labelHeight=i,n.currentValueMaxWidth=0,n.currentValueHeight=0,n.currentValueTotalHeight=0,n.currentValueMaxLines=1,e.currentvalue.visible){var c=ca.tester.append("g");r.each(function(h){var p=$f(c,e,h.label),g=p.node()&&ca.bBox(p.node())||{width:0,height:0},_=nl.lineCount(p);n.currentValueMaxWidth=Math.max(n.currentValueMaxWidth,Math.ceil(g.width)),n.currentValueHeight=Math.max(n.currentValueHeight,Math.ceil(g.height)),n.currentValueMaxLines=Math.max(n.currentValueMaxLines,_)}),n.currentValueTotalHeight=n.currentValueHeight+e.currentvalue.offset,c.remove()}n.height=n.currentValueTotalHeight+ot.tickOffset+e.ticklen+ot.labelOffset+n.labelHeight+e.pad.t+e.pad.b;var v="left";Pr.isRightAnchor(e)&&(n.lx-=n.outerLength,v="right"),Pr.isCenterAnchor(e)&&(n.lx-=n.outerLength/2,v="center");var u="top";Pr.isBottomAnchor(e)&&(n.ly-=n.height,u="bottom"),Pr.isMiddleAnchor(e)&&(n.ly-=n.height/2,u="middle"),n.outerLength=Math.ceil(n.outerLength),n.height=Math.ceil(n.height),n.lx=Math.round(n.lx),n.ly=Math.round(n.ly);var d={y:e.y,b:n.height*Ku[u],t:n.height*Zu[u]};e.lenmode==="fraction"?(d.l=0,d.xl=e.x-e.len*Zu[v],d.r=0,d.xr=e.x+e.len*Ku[v]):(d.x=e.x,d.l=n.outerLength*Zu[v],d.r=n.outerLength*Ku[v]),Df.autoMargin(t,cT(e),d)}function GP(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call($f,r).call(WP,r).call(VP,r).call(qP,r).call(YP,t,r).call(UP,t,r);var a=r._dims;ca.setTranslate(e,a.lx+r.pad.l,a.ly+r.pad.t),e.call(hT,r,!1),e.call($f,r)}function $f(t,e,r){if(!!e.currentvalue.visible){var a=e._dims,i,n;switch(e.currentvalue.xanchor){case"right":i=a.inputAreaLength-ot.currentValueInset-a.currentValueMaxWidth,n="left";break;case"center":i=a.inputAreaLength*.5,n="middle";break;default:i=ot.currentValueInset,n="left"}var o=Pr.ensureSingle(t,"text",ot.labelClass,function(u){u.attr({"text-anchor":n,"data-notex":1})}),l=e.currentvalue.prefix?e.currentvalue.prefix:"";if(typeof r=="string")l+=r;else{var s=e.steps[e.active].label,f=e._gd._fullLayout._meta;f&&(s=Pr.templateString(s,f)),l+=s}e.currentvalue.suffix&&(l+=e.currentvalue.suffix),o.call(ca.font,e.currentvalue.font).text(l).call(nl.convertToTspans,e._gd);var c=nl.lineCount(o),v=(a.currentValueMaxLines+1-c)*e.currentvalue.font.size*fT;return nl.positionText(o,i,v),o}}function UP(t,e,r){var a=Pr.ensureSingle(t,"rect",ot.gripRectClass,function(i){i.call(dT,e,t,r).style("pointer-events","all")});a.attr({width:ot.gripWidth,height:ot.gripHeight,rx:ot.gripRadius,ry:ot.gripRadius}).call(di.stroke,r.bordercolor).call(di.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function uT(t,e,r){var a=Pr.ensureSingle(t,"text",ot.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),i=e.step.label,n=r._gd._fullLayout._meta;return n&&(i=Pr.templateString(i,n)),a.call(ca.font,r.font).text(i).call(nl.convertToTspans,r._gd),a}function VP(t,e){var r=Pr.ensureSingle(t,"g",ot.labelsClass),a=e._dims,i=r.selectAll("g."+ot.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(ot.labelGroupClass,!0),i.exit().remove(),i.each(function(n){var o=la.select(this);o.call(uT,n,e),ca.setTranslate(o,ap(e,n.fraction),ot.tickOffset+e.ticklen+e.font.size*fT+ot.labelOffset+a.currentValueTotalHeight)})}function e0(t,e,r,a,i){var n=Math.round(a*(r._stepCount-1)),o=r._visibleSteps[n]._index;o!==r.active&&vT(t,e,r,o,!0,i)}function vT(t,e,r,a,i,n){var o=r.active;r.active=a,FP(t.layout,ot.name,r).applyUpdate("active",a);var l=r.steps[r.active];e.call(hT,r,n),e.call($f,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),l&&l.method&&i&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=i,e._nextMethod.doTransition=n):(e._nextMethod={step:l,doCallback:i,doTransition:n},e._nextMethodRaf=window.requestAnimationFrame(function(){var s=e._nextMethod.step;!s.method||(s.execute&&Df.executeAPICommand(t,s.method,s.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function dT(t,e,r){var a=r.node(),i=la.select(e);function n(){return r.data()[0]}function o(){var l=n();e.emit("plotly_sliderstart",{slider:l});var s=r.select("."+ot.gripRectClass);la.event.stopPropagation(),la.event.preventDefault(),s.call(di.fill,l.activebgcolor);var f=t0(l,la.mouse(a)[0]);e0(e,r,l,f,!0),l._dragging=!0;function c(){var u=n(),d=t0(u,la.mouse(a)[0]);e0(e,r,u,d,!1)}i.on("mousemove",c),i.on("touchmove",c);function v(){var u=n();u._dragging=!1,s.call(di.fill,u.bgcolor),i.on("mouseup",null),i.on("mousemove",null),i.on("touchend",null),i.on("touchmove",null),e.emit("plotly_sliderend",{slider:u,step:u.steps[u.active]})}i.on("mouseup",v),i.on("touchend",v)}t.on("mousedown",o),t.on("touchstart",o)}function qP(t,e){var r=t.selectAll("rect."+ot.tickRectClass).data(e._visibleSteps),a=e._dims;r.enter().append("rect").classed(ot.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(i,n){var o=n%a.labelStride===0,l=la.select(this);l.attr({height:o?e.ticklen:e.minorticklen}).call(di.fill,e.tickcolor),ca.setTranslate(l,ap(e,n/(e._stepCount-1))-.5*e.tickwidth,(o?ot.tickOffset:ot.minorTickOffset)+a.currentValueTotalHeight)})}function XP(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,a=0;a<r;a+=e.labelStride)e.labelSteps.push({fraction:a/(r-1),step:t._visibleSteps[a]})}function hT(t,e,r){for(var a=t.select("rect."+ot.gripRectClass),i=0,n=0;n<e._stepCount;n++)if(e._visibleSteps[n]._index===e.active){i=n;break}var o=ap(e,i/(e._stepCount-1));if(!e._invokingCommand){var l=a;r&&e.transition.duration>0&&(l=l.transition().duration(e.transition.duration).ease(e.transition.easing)),l.attr("transform",NP(o-ot.gripWidth*.5,e._dims.currentValueTotalHeight))}}function ap(t,e){var r=t._dims;return r.inputAreaStart+ot.stepInset+(r.inputAreaLength-2*ot.stepInset)*Math.min(1,Math.max(0,e))}function t0(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-ot.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*ot.stepInset-2*r.inputAreaStart)))}function YP(t,e,r){var a=r._dims,i=Pr.ensureSingle(t,"rect",ot.railTouchRectClass,function(n){n.call(dT,e,t,r).style("pointer-events","all")});i.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,ot.tickOffset+r.ticklen+a.labelHeight)}).call(di.fill,r.bgcolor).attr("opacity",0),ca.setTranslate(i,0,a.currentValueTotalHeight)}function WP(t,e){var r=e._dims,a=r.inputAreaLength-ot.railInset*2,i=Pr.ensureSingle(t,"rect",ot.railRectClass);i.attr({width:a,height:ot.railWidth,rx:ot.railRadius,ry:ot.railRadius,"shape-rendering":"crispEdges"}).call(di.stroke,e.bordercolor).call(di.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),ca.setTranslate(i,ot.railInset,(r.inputAreaWidth-ot.railWidth)*.5+r.currentValueTotalHeight)}var ZP=bc,KP={moduleType:"component",name:ZP.name,layoutAttributes:oT,supplyLayoutDefaults:PP,draw:HP},r0=hr,ip={bgcolor:{valType:"color",dflt:r0.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:r0.defaultLine,editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot",description:"Sets the border width of the range slider."},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"},pT={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"},xc={},np={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15},QP=Vt,JP=ir,mT=np,ez=Lr.LINE_SPACING,Ef=mT.name;function yT(t){var e=t&&t[Ef];return e&&e.visible}xc.isVisible=yT;xc.makeData=function(t){var e=QP.list({_fullLayout:t},"x",!0),r=t.margin,a=[];if(!t._has("gl2d"))for(var i=0;i<e.length;i++){var n=e[i];if(yT(n)){a.push(n);var o=n[Ef];o._id=Ef+n._id,o._height=(t.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}t._rangeSliderData=a};xc.autoMarginOpts=function(t,e){var r=t._fullLayout,a=e[Ef],i=e._id.charAt(0),n=0,o=0;if(e.side==="bottom"&&(n=e._depth,e.title.text!==r._dfltTitle[i])){o=1.5*e.title.font.size+10+a._offsetShift;var l=(e.title.text.match(JP.BR_TAG_ALL)||[]).length;o+=l*e.title.font.size*ez}return{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:a._height+n+Math.max(r.margin.b,o),pad:mT.extraPad+a._offsetShift*2}};var Qu,a0;function tz(){if(a0)return Qu;a0=1;var t=de.exports,e=Mt,r=Vt,a=ip,i=pT;return Qu=function(o,l,s){var f=o[s],c=l[s];if(!(f.rangeslider||l._requestRangeslider[c._id]))return;t.isPlainObject(f.rangeslider)||(f.rangeslider={});var v=f.rangeslider,u=e.newContainer(c,"rangeslider");function d(A,$){return t.coerce(v,u,a,A,$)}var h,p;function g(A,$){return t.coerce(h,p,i,A,$)}var _=d("visible");if(!!_){d("bgcolor",l.plot_bgcolor),d("bordercolor"),d("borderwidth"),d("thickness"),d("autorange",!c.isValidRange(v.range)),d("range");var b=l._subplots;if(b)for(var w=b.cartesian.filter(function(A){return A.substr(0,A.indexOf("y"))===r.name2id(s)}).map(function(A){return A.substr(A.indexOf("y"),A.length)}),m=t.simpleMap(w,r.id2name),y=0;y<m.length;y++){var x=m[y];h=v[x]||{},p=e.newContainer(u,x,"yaxis");var T=l[x],k;h.range&&T.isValidRange(h.range)&&(k="fixed");var S=g("rangemode",k);S!=="match"&&g("range",T.range.slice())}u._input=v}},Qu}var Ju,i0;function rz(){if(i0)return Ju;i0=1;var t=Vt.list,e=Il.getAutoRange,r=np;return Ju=function(i){for(var n=t(i,"x",!0),o=0;o<n.length;o++){var l=n[o],s=l[r.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=e(i,l))}},Ju}var ev,n0;function az(){if(n0)return ev;n0=1;var t=tt.exports,e=Ve,r=Ut.exports,a=de.exports,i=a.strTranslate,n=Tt.exports,o=Je.exports,l=rc,s=Yt,f=Vt,c=ha.exports,v=xi,u=np;ev=function(T){for(var k=T._fullLayout,S=k._rangeSliderData,A=0;A<S.length;A++){var $=S[A][u.name];$._clipId=$._id+"-"+k._uid}function M(E){return E._name}var C=k._infolayer.selectAll("g."+u.containerClassName).data(S,M);C.exit().each(function(E){var I=E[u.name];k._topdefs.select("#"+I._clipId).remove()}).remove(),S.length!==0&&(C.enter().append("g").classed(u.containerClassName,!0).attr("pointer-events","all"),C.each(function(E){var I=t.select(this),P=E[u.name],R=k[f.id2name(E.anchor)],L=P[f.id2name(E.anchor)];if(P.range){var D=a.simpleMap(P.range,E.r2l),z=a.simpleMap(E.range,E.r2l),F;z[0]<z[1]?F=[Math.min(D[0],z[0]),Math.max(D[1],z[1])]:F=[Math.max(D[0],z[0]),Math.min(D[1],z[1])],P.range=P._input.range=a.simpleMap(F,E.l2r)}E.cleanRange("rangeslider.range");var H=k._size,U=E.domain;P._width=H.w*(U[1]-U[0]);var B=Math.round(H.l+H.w*U[0]),X=Math.round(H.t+H.h*(1-E._counterDomainMin)+(E.side==="bottom"?E._depth:0)+P._offsetShift+u.extraPad);I.attr("transform",i(B,X)),P._rl=a.simpleMap(P.range,E.r2l);var O=P._rl[0],Y=P._rl[1],W=Y-O;if(P.p2d=function(ke){return ke/P._width*W+O},P.d2p=function(ke){return(ke-O)/W*P._width},E.rangebreaks){var K=E.locateBreaks(O,Y);if(K.length){var Z,ae,ne=0;for(Z=0;Z<K.length;Z++)ae=K[Z],ne+=ae.max-ae.min;var oe=P._width/(Y-O-ne),re=[-oe*O];for(Z=0;Z<K.length;Z++)ae=K[Z],re.push(re[re.length-1]-oe*(ae.max-ae.min));for(P.d2p=function(ke){for(var ze=re[0],he=0;he<K.length;he++){var te=K[he];if(ke>=te.max)ze=re[he+1];else if(ke<te.min)break}return ze+oe*ke},Z=0;Z<K.length;Z++)ae=K[Z],ae.pmin=P.d2p(ae.min),ae.pmax=P.d2p(ae.max);P.p2d=function(ke){for(var ze=re[0],he=0;he<K.length;he++){var te=K[he];if(ke>=te.pmax)ze=re[he+1];else if(ke<te.pmin)break}return(ke-ze)/oe}}}if(L.rangemode!=="match"){var se=R.r2l(L.range[0]),me=R.r2l(L.range[1]),Re=me-se;P.d2pOppAxis=function(ke){return(ke-se)/Re*P._height}}I.call(g,T,E,P).call(_,T,E,P).call(b,T,E,P).call(m,T,E,P,L).call(y,T,E,P).call(x,T,E,P),d(I,T,E,P),p(I,T,E,P,R,L),E.side==="bottom"&&l.draw(T,E._id+"title",{propContainer:E,propName:E._name+".title",placeholder:k._dfltTitle.x,attributes:{x:E._offset+E._length/2,y:X+P._height+P._offsetShift+10+1.5*E.title.font.size,"text-anchor":"middle"}})}))};function d(T,k,S,A){if(k._context.staticPlot)return;var $=T.select("rect."+u.slideBoxClassName).node(),M=T.select("rect."+u.grabAreaMinClassName).node(),C=T.select("rect."+u.grabAreaMaxClassName).node();function E(){var I=t.event,P=I.target,R=I.clientX||I.touches[0].clientX,L=R-T.node().getBoundingClientRect().left,D=A.d2p(S._rl[0]),z=A.d2p(S._rl[1]),F=c.coverSlip();this.addEventListener("touchmove",H),this.addEventListener("touchend",U),F.addEventListener("mousemove",H),F.addEventListener("mouseup",U);function H(B){var X=B.clientX||B.touches[0].clientX,O=+X-R,Y,W,K;switch(P){case $:K="ew-resize",Y=D+O,W=z+O;break;case M:K="col-resize",Y=D+O,W=z;break;case C:K="col-resize",Y=D,W=z+O;break;default:K="ew-resize",Y=L,W=L+O;break}if(W<Y){var Z=W;W=Y,Y=Z}A._pixelMin=Y,A._pixelMax=W,v(t.select(F),K),h(T,k,S,A)}function U(){F.removeEventListener("mousemove",H),F.removeEventListener("mouseup",U),this.removeEventListener("touchmove",H),this.removeEventListener("touchend",U),a.removeElement(F)}}T.on("mousedown",E),T.on("touchstart",E)}function h(T,k,S,A){function $(E){return S.l2r(a.constrain(E,A._rl[0],A._rl[1]))}var M=$(A.p2d(A._pixelMin)),C=$(A.p2d(A._pixelMax));window.requestAnimationFrame(function(){e.call("_guiRelayout",k,S._name+".range",[M,C])})}function p(T,k,S,A,$,M){var C=u.handleWidth/2;function E(B){return a.constrain(B,0,A._width)}function I(B){return a.constrain(B,0,A._height)}function P(B){return a.constrain(B,-C,A._width+C)}var R=E(A.d2p(S._rl[0])),L=E(A.d2p(S._rl[1]));if(T.select("rect."+u.slideBoxClassName).attr("x",R).attr("width",L-R),T.select("rect."+u.maskMinClassName).attr("width",R),T.select("rect."+u.maskMaxClassName).attr("x",L).attr("width",A._width-L),M.rangemode!=="match"){var D=A._height-I(A.d2pOppAxis($._rl[1])),z=A._height-I(A.d2pOppAxis($._rl[0]));T.select("rect."+u.maskMinOppAxisClassName).attr("x",R).attr("height",D).attr("width",L-R),T.select("rect."+u.maskMaxOppAxisClassName).attr("x",R).attr("y",z).attr("height",A._height-z).attr("width",L-R),T.select("rect."+u.slideBoxClassName).attr("y",D).attr("height",z-D)}var F=.5,H=Math.round(P(R-C))-F,U=Math.round(P(L-C))+F;T.select("g."+u.grabberMinClassName).attr("transform",i(H,F)),T.select("g."+u.grabberMaxClassName).attr("transform",i(U,F))}function g(T,k,S,A){var $=a.ensureSingle(T,"rect",u.bgClassName,function(I){I.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),M=A.borderwidth%2===0?A.borderwidth:A.borderwidth-1,C=-A._offsetShift,E=n.crispRound(k,A.borderwidth);$.attr({width:A._width+M,height:A._height+M,transform:i(C,C),fill:A.bgcolor,stroke:A.bordercolor,"stroke-width":E})}function _(T,k,S,A){var $=k._fullLayout,M=a.ensureSingleById($._topdefs,"clipPath",A._clipId,function(C){C.append("rect").attr({x:0,y:0})});M.select("rect").attr({width:A._width,height:A._height})}function b(T,k,S,A){var $=k.calcdata,M=T.selectAll("g."+u.rangePlotClassName).data(S._subplotsWith,a.identity);M.enter().append("g").attr("class",function(E){return u.rangePlotClassName+" "+E}).call(n.setClipUrl,A._clipId,k),M.order(),M.exit().remove();var C;M.each(function(E,I){var P=t.select(this),R=I===0,L=f.getFromId(k,E,"y"),D=L._name,z=A[D],F={data:[],layout:{xaxis:{type:S.type,domain:[0,1],range:A.range.slice(),calendar:S.calendar},width:A._width,height:A._height,margin:{t:0,b:0,l:0,r:0}},_context:k._context};S.rangebreaks&&(F.layout.xaxis.rangebreaks=S.rangebreaks),F.layout[D]={type:L.type,domain:[0,1],range:z.rangemode!=="match"?z.range.slice():L.range.slice(),calendar:L.calendar},L.rangebreaks&&(F.layout[D].rangebreaks=L.rangebreaks),r.supplyDefaults(F);var H=F._fullLayout.xaxis,U=F._fullLayout[D];H.clearCalc(),H.setScale(),U.clearCalc(),U.setScale();var B={id:E,plotgroup:P,xaxis:H,yaxis:U,isRangePlot:!0};R?C=B:(B.mainplot="xy",B.mainplotinfo=C),s.rangePlot(k,B,w($,E))})}function w(T,k){for(var S=[],A=0;A<T.length;A++){var $=T[A],M=$[0].trace;M.xaxis+M.yaxis===k&&S.push($)}return S}function m(T,k,S,A,$){var M=a.ensureSingle(T,"rect",u.maskMinClassName,function(P){P.attr({x:0,y:0,"shape-rendering":"crispEdges"})});M.attr("height",A._height).call(o.fill,u.maskColor);var C=a.ensureSingle(T,"rect",u.maskMaxClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});if(C.attr("height",A._height).call(o.fill,u.maskColor),$.rangemode!=="match"){var E=a.ensureSingle(T,"rect",u.maskMinOppAxisClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});E.attr("width",A._width).call(o.fill,u.maskOppAxisColor);var I=a.ensureSingle(T,"rect",u.maskMaxOppAxisClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});I.attr("width",A._width).style("border-top",u.maskOppBorder).call(o.fill,u.maskOppAxisColor)}}function y(T,k,S,A){if(!k._context.staticPlot){var $=a.ensureSingle(T,"rect",u.slideBoxClassName,function(M){M.attr({y:0,cursor:u.slideBoxCursor,"shape-rendering":"crispEdges"})});$.attr({height:A._height,fill:u.slideBoxFill})}}function x(T,k,S,A){var $=a.ensureSingle(T,"g",u.grabberMinClassName),M=a.ensureSingle(T,"g",u.grabberMaxClassName),C={x:0,width:u.handleWidth,rx:u.handleRadius,fill:o.background,stroke:o.defaultLine,"stroke-width":u.handleStrokeWidth,"shape-rendering":"crispEdges"},E={y:Math.round(A._height/4),height:Math.round(A._height/2)},I=a.ensureSingle($,"rect",u.handleMinClassName,function(z){z.attr(C)});I.attr(E);var P=a.ensureSingle(M,"rect",u.handleMaxClassName,function(z){z.attr(C)});P.attr(E);var R={width:u.grabAreaWidth,x:0,y:0,fill:u.grabAreaFill,cursor:k._context.staticPlot?void 0:u.grabAreaCursor},L=a.ensureSingle($,"rect",u.grabAreaMinClassName,function(z){z.attr(R)});L.attr("height",A._height);var D=a.ensureSingle(M,"rect",u.grabAreaMaxClassName,function(z){z.attr(R)});D.attr("height",A._height)}return ev}var iz=de.exports,nz=ip,oz=pT,tv=xc,lz={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:iz.extendFlat({},nz,{yaxis:oz})}}},layoutAttributes:ip,handleDefaults:tz(),calcAutorange:rz(),draw:az(),isVisible:tv.isVisible,makeData:tv.makeData,autoMarginOpts:tv.autoMarginOpts},sz=dr,o0=hr,fz=Mt.templatedArray,cz=fz("button",{visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Determines whether or not this button is visible."},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot",description:["The unit of measurement that the `count` value will set the range by."].join(" ")},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot",description:["Sets the range update mode.","If *backward*, the range update shifts the start of range","back *count* times *step* milliseconds.","If *todate*, the range update shifts the start of range","back to the first timestamp from *count* times","*step* milliseconds back.","For example, with `step` set to *year* and `count` set to *1*","the range update shifts the start of the range back to","January 01 of the current year.","Month and year *todate* are currently available only","for the built-in (Gregorian) calendar."].join(" ")},count:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the number of steps to take to update the range.","Use with `step` to specify the update interval."].join(" ")},label:{valType:"string",editType:"plot",description:"Sets the text label to appear on the button."},editType:"plot",description:["Sets the specifications for each buttons.","By default, a range selector comes with no buttons."].join(" ")}),bd={visible:{valType:"boolean",editType:"plot",description:["Determines whether or not this range selector is visible.","Note that range selectors are only available for x axes of","`type` set to or auto-typed to *date*."].join(" ")},buttons:cz,x:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:sz({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:o0.lightLine,editType:"plot",description:"Sets the background color of the range selector buttons."},activecolor:{valType:"color",editType:"plot",description:"Sets the background color of the active range selector button."},bordercolor:{valType:"color",dflt:o0.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the range selector."},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot",description:"Sets the width (in px) of the border enclosing the range selector."},editType:"plot"},gT={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10},ef=de.exports,uz=Je.exports,vz=Mt,dz=Va,bT=bd,xd=gT,hz=function(e,r,a,i,n){var o=e.rangeselector||{},l=vz.newContainer(r,"rangeselector");function s(d,h){return ef.coerce(o,l,bT,d,h)}var f=dz(o,l,{name:"buttons",handleItemDefaults:pz,calendar:n}),c=s("visible",f.length>0);if(c){var v=mz(r,a,i);s("x",v[0]),s("y",v[1]),ef.noneOrAll(e,r,["x","y"]),s("xanchor"),s("yanchor"),ef.coerceFont(s,"font",a.font);var u=s("bgcolor");s("activecolor",uz.contrast(u,xd.lightAmount,xd.darkAmount)),s("bordercolor"),s("borderwidth")}};function pz(t,e,r,a){var i=a.calendar;function n(s,f){return ef.coerce(t,e,bT.buttons,s,f)}var o=n("visible");if(o){var l=n("step");l!=="all"&&(i&&i!=="gregorian"&&(l==="month"||l==="year")?e.stepmode="backward":n("stepmode"),n("count")),n("label")}}function mz(t,e,r){for(var a=r.filter(function(l){return e[l].anchor===t._id}),i=0,n=0;n<a.length;n++){var o=e[a[n]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+xd.yPad]}var yz=pk,gz=de.exports.titleCase,bz=function(e,r){var a=e._name,i={};if(r.step==="all")i[a+".autorange"]=!0;else{var n=xz(e,r);i[a+".range[0]"]=n[0],i[a+".range[1]"]=n[1]}return i};function xz(t,e){var r=t.range,a=new Date(t.r2l(r[1])),i=e.step,n=yz["utc"+gz(i)],o=e.count,l;switch(e.stepmode){case"backward":l=t.l2r(+n.offset(a,-o));break;case"todate":var s=n.offset(a,-o);l=t.l2r(+n.ceil(s));break}var f=r[1];return[l,f]}var Rf=tt.exports,_z=Ve,wz=Ut.exports,l0=Je.exports,xT=Tt.exports,Oa=de.exports,s0=Oa.strTranslate,tf=ir,Tz=Vt,op=Lr,f0=op.LINE_SPACING,c0=op.FROM_TL,u0=op.FROM_BR,_d=gT,kz=bz,Az=function(e){var r=e._fullLayout,a=r._infolayer.selectAll(".rangeselector").data(Mz(e),Sz);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(i){var n=Rf.select(this),o=i,l=o.rangeselector,s=n.selectAll("g.button").data(Oa.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(f){var c=Rf.select(this),v=kz(o,f);f._isActive=Lz(o,f,v),c.call(rv,l,f),c.call(Dz,l,f,e),c.on("click",function(){e._dragged||_z.call("_guiRelayout",e,v)}),c.on("mouseover",function(){f._isHovered=!0,c.call(rv,l,f)}),c.on("mouseout",function(){f._isHovered=!1,c.call(rv,l,f)})}),Ez(e,s,l,o._name,n)})};function Mz(t){for(var e=Tz.list(t,"x",!0),r=[],a=0;a<e.length;a++){var i=e[a];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}function Sz(t){return t._id}function Lz(t,e,r){if(e.step==="all")return t.autorange===!0;var a=Object.keys(r);return t.range[0]===r[a[0]]&&t.range[1]===r[a[1]]}function rv(t,e,r){var a=Oa.ensureSingle(t,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});a.attr({rx:_d.rx,ry:_d.ry}),a.call(l0.stroke,e.bordercolor).call(l0.fill,Cz(e,r)).style("stroke-width",e.borderwidth+"px")}function Cz(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}function Dz(t,e,r,a){function i(o){tf.convertToTspans(o,a)}var n=Oa.ensureSingle(t,"text","selector-text",function(o){o.attr("text-anchor","middle")});n.call(xT.font,e.font).text($z(r,a._fullLayout._meta)).call(i)}function $z(t,e){return t.label?e?Oa.templateString(t.label,e):t.label:t.step==="all"?"all":t.count+t.step.charAt(0)}function Ez(t,e,r,a,i){var n=0,o=0,l=r.borderwidth;e.each(function(){var d=Rf.select(this),h=d.select(".selector-text"),p=r.font.size*f0,g=Math.max(p*tf.lineCount(h),16)+3;o=Math.max(o,g)}),e.each(function(){var d=Rf.select(this),h=d.select(".selector-rect"),p=d.select(".selector-text"),g=p.node()&&xT.bBox(p.node()).width,_=r.font.size*f0,b=tf.lineCount(p),w=Math.max(g+10,_d.minButtonWidth);d.attr("transform",s0(l+n,l)),h.attr({x:0,y:0,width:w,height:o}),tf.positionText(p,w/2,o/2-(b-1)*_/2+3),n+=w+5});var s=t._fullLayout._size,f=s.l+s.w*r.x,c=s.t+s.h*(1-r.y),v="left";Oa.isRightAnchor(r)&&(f-=n,v="right"),Oa.isCenterAnchor(r)&&(f-=n/2,v="center");var u="top";Oa.isBottomAnchor(r)&&(c-=o,u="bottom"),Oa.isMiddleAnchor(r)&&(c-=o/2,u="middle"),n=Math.ceil(n),o=Math.ceil(o),f=Math.round(f),c=Math.round(c),wz.autoMargin(t,a+"-range-selector",{x:r.x,y:r.y,l:n*c0[v],r:n*u0[v],b:o*u0[u],t:o*c0[u]}),i.attr("transform",s0(f,c))}var Rz={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:bd}}},layoutAttributes:bd,handleDefaults:hz,draw:Az},_i={},v0=Bt.extendFlat;_i.attributes=function(t,e){t=t||{},e=e||{};var r={valType:"info_array",editType:t.editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},a=t.name?t.name+" ":"",i=t.trace?"trace ":"subplot ",n=e.description?" "+e.description:"",o={x:v0({},r,{description:["Sets the horizontal domain of this ",a,i,"(in plot fraction).",n].join("")}),y:v0({},r,{description:["Sets the vertical domain of this ",a,i,"(in plot fraction).",n].join("")}),editType:t.editType};return t.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this row in the grid for this ",a,i,".",n].join("")},o.column={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this column in the grid for this ",a,i,".",n].join("")}),o};_i.defaults=function(t,e,r,a){var i=a&&a.x||[0,1],n=a&&a.y||[0,1],o=e.grid;if(o){var l=r("domain.column");l!==void 0&&(l<o.columns?i=o._domains.x[l]:delete t.domain.column);var s=r("domain.row");s!==void 0&&(s<o.rows?n=o._domains.y[s]:delete t.domain.row)}var f=r("domain.x",i),c=r("domain.y",n);f[0]<f[1]||(t.domain.x=i.slice()),c[0]<c[1]||(t.domain.y=n.slice())};var Pz=de.exports,zz=co.counter,Iz=_i.attributes,d0=pr.idRegex,Nz=Mt,wd={rows:{valType:"integer",min:1,editType:"plot",description:["The number of rows in the grid. If you provide a 2D `subplots`","array or a `yaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot",description:["Is the first row the top or the bottom? Note that columns","are always enumerated from left to right."].join(" ")},columns:{valType:"integer",min:1,editType:"plot",description:["The number of columns in the grid. If you provide a 2D `subplots`","array, the length of its longest row is used as the default.","If you give an `xaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[zz("xy").toString(),""],editType:"plot"},editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[d0.x.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[d0.y.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:Iz({name:"grid",editType:"plot",noGridCell:!0},{description:["The first and last cells end exactly at the domain","edges, with no grout around the edges."].join(" ")}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot",description:["Sets where the x axis labels and titles go. *bottom* means","the very bottom of the grid. *bottom plot* is the lowest plot","that each x axis is used in. *top* and *top plot* are similar."].join(" ")},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot",description:["Sets where the y axis labels and titles go. *left* means","the very left edge of the grid. *left plot* is the leftmost plot","that each y axis is used in. *right* and *right plot* are similar."].join(" ")},editType:"plot"};function Pf(t,e,r){var a=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});if(Array.isArray(a))return a;if(i.length)return i}function Fz(t,e){var r=t.grid||{},a=Pf(e,r,"x"),i=Pf(e,r,"y");if(!t.grid&&!a&&!i)return;var n=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(a),l=Array.isArray(i),s=o&&a!==r.xaxes&&l&&i!==r.yaxes,f,c;n?(f=r.subplots.length,c=r.subplots[0].length):(l&&(f=i.length),o&&(c=a.length));var v=Nz.newContainer(e,"grid");function u(x,T){return Pz.coerce(r,v,wd,x,T)}var d=u("rows",f),h=u("columns",c);if(!(d*h>1)){delete e.grid;return}if(!n&&!o&&!l){var p=u("pattern")==="independent";p&&(n=!0)}v._hasSubplotGrid=n;var g=u("roworder"),_=g==="top to bottom",b=n?.2:.1,w=n?.3:.1,m,y;s&&e._splomGridDflt&&(m=e._splomGridDflt.xside,y=e._splomGridDflt.yside),v._domains={x:h0("x",u,b,m,h),y:h0("y",u,w,y,d,_)}}function h0(t,e,r,a,i,n){var o=e(t+"gap",r),l=e("domain."+t);e(t+"side",a);for(var s=new Array(i),f=l[0],c=(l[1]-f)/(i-o),v=c*(1-o),u=0;u<i;u++){var d=f+c*u;s[n?i-1-u:u]=[d,d+v]}return s}function Hz(t,e){var r=e.grid;if(!(!r||!r._domains)){var a=t.grid||{},i=e._subplots,n=r._hasSubplotGrid,o=r.rows,l=r.columns,s=r.pattern==="independent",f,c,v,u,d,h,p,g=r._axisMap={};if(n){var _=a.subplots||[];h=r.subplots=new Array(o);var b=1;for(f=0;f<o;f++){var w=h[f]=new Array(l),m=_[f]||[];for(c=0;c<l;c++)if(s?(d=b===1?"xy":"x"+b+"y"+b,b++):d=m[c],w[c]="",i.cartesian.indexOf(d)!==-1){if(p=d.indexOf("y"),v=d.slice(0,p),u=d.slice(p),g[v]!==void 0&&g[v]!==c||g[u]!==void 0&&g[u]!==f)continue;w[c]=d,g[v]=c,g[u]=f}}}else{var y=Pf(e,a,"x"),x=Pf(e,a,"y");r.xaxes=p0(y,i.xaxis,l,g,"x"),r.yaxes=p0(x,i.yaxis,o,g,"y")}var T=r._anchors={},k=r.roworder==="top to bottom";for(var S in g){var A=S.charAt(0),$=r[A+"side"],M,C,E;if($.length<8)T[S]="free";else if(A==="x"){if($.charAt(0)==="t"===k?(M=0,C=1,E=o):(M=o-1,C=-1,E=-1),n){var I=g[S];for(f=M;f!==E;f+=C)if(d=h[f][I],!!d&&(p=d.indexOf("y"),d.slice(0,p)===S)){T[S]=d.slice(p);break}}else for(f=M;f!==E;f+=C)if(u=r.yaxes[f],i.cartesian.indexOf(S+u)!==-1){T[S]=u;break}}else if($.charAt(0)==="l"?(M=0,C=1,E=l):(M=l-1,C=-1,E=-1),n){var P=g[S];for(f=M;f!==E;f+=C)if(d=h[P][f],!!d&&(p=d.indexOf("y"),d.slice(p)===S)){T[S]=d.slice(0,p);break}}else for(f=M;f!==E;f+=C)if(v=r.xaxes[f],i.cartesian.indexOf(v+S)!==-1){T[S]=v;break}}}}function p0(t,e,r,a,i){var n=new Array(r),o;function l(s,f){e.indexOf(f)!==-1&&a[f]===void 0?(n[s]=f,a[f]=s):n[s]=""}if(Array.isArray(t))for(o=0;o<r;o++)l(o,t[o]);else for(l(0,i),o=1;o<r;o++)l(o,i+(o+1));return n}var Oz={moduleType:"component",name:"grid",schema:{layout:{grid:wd}},layoutAttributes:wd,sizeDefaults:Fz,contentDefaults:Hz},_T={visible:{valType:"boolean",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the square of the","underlying data.","If *data*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}},av,m0;function Bz(){if(m0)return av;m0=1;var t=lt,e=Ve,r=de.exports,a=Mt,i=_T;return av=function(n,o,l,s){var f="error_"+s.axis,c=a.newContainer(o,f),v=n[f]||{};function u(w,m){return r.coerce(v,c,i,w,m)}var d=v.array!==void 0||v.value!==void 0||v.type==="sqrt",h=u("visible",d);if(h!==!1){var p=u("type","array"in v?"data":"percent"),g=!0;p!=="sqrt"&&(g=u("symmetric",!((p==="data"?"arrayminus":"valueminus")in v))),p==="data"?(u("array"),u("traceref"),g||(u("arrayminus"),u("tracerefminus"))):(p==="percent"||p==="constant")&&(u("value"),g||u("valueminus"));var _="copy_"+s.inherit+"style";if(s.inherit){var b=o["error_"+s.inherit];(b||{}).visible&&u(_,!(v.color||t(v.thickness)||t(v.width)))}(!s.inherit||!c[_])&&(u("color",l),u("thickness"),u("width",e.traceIs(o,"gl3d")?0:4))}},av}var iv,y0;function wT(){if(y0)return iv;y0=1,iv=function(r){var a=r.type,i=r.symmetric;if(a==="data"){var n=r.array||[];if(i)return function(c,v){var u=+n[v];return[u,u]};var o=r.arrayminus||[];return function(c,v){var u=+n[v],d=+o[v];return!isNaN(u)||!isNaN(d)?[d||0,u||0]:[NaN,NaN]}}else{var l=t(a,r.value),s=t(a,r.valueminus);return i||r.valueminus===void 0?function(c){var v=l(c);return[v,v]}:function(c){return[s(c),l(c)]}}};function t(e,r){if(e==="percent")return function(a){return Math.abs(a*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(a){return Math.sqrt(Math.abs(a))}}return iv}var nv,g0;function jz(){if(g0)return nv;g0=1;var t=lt,e=Ve,r=Ct.exports,a=de.exports,i=wT();nv=function(l){for(var s=l.calcdata,f=0;f<s.length;f++){var c=s[f],v=c[0].trace;if(v.visible===!0&&e.traceIs(v,"errorBarsOK")){var u=r.getFromId(l,v.xaxis),d=r.getFromId(l,v.yaxis);n(c,v,u,"x"),n(c,v,d,"y")}}};function n(o,l,s,f){var c=l["error_"+f]||{},v=c.visible&&["linear","log"].indexOf(s.type)!==-1,u=[];if(!!v){for(var d=i(c),h=0;h<o.length;h++){var p=o[h],g=p.i;if(g===void 0)g=h;else if(g===null)continue;var _=p[f];if(!!t(s.c2l(_))){var b=d(_,g);if(t(b[0])&&t(b[1])){var w=p[f+"s"]=_-b[0],m=p[f+"h"]=_+b[1];u.push(w,m)}}}var y=s._id,x=l._extremes[y],T=r.findExtremes(s,u,a.extendFlat({tozero:x.opts.tozero},{padded:!0}));x.min=x.min.concat(T.min),x.max=x.max.concat(T.max)}}return nv}var ov,b0;function Gz(){if(b0)return ov;b0=1;var t=tt.exports,e=lt,r=Tt.exports,a=mr;ov=function(o,l,s,f){var c,v=s.xaxis,u=s.yaxis,d=f&&f.duration>0;l.each(function(h){var p=h[0].trace,g=p.error_x||{},_=p.error_y||{},b;p.ids&&(b=function(x){return x.id});var w=a.hasMarkers(p)&&p.marker.maxdisplayed>0;!_.visible&&!g.visible&&(h=[]);var m=t.select(this).selectAll("g.errorbar").data(h,b);if(m.exit().remove(),!!h.length){g.visible||m.selectAll("path.xerror").remove(),_.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var y=m.enter().append("g").classed("errorbar",!0);d&&y.style("opacity",0).transition().duration(f.duration).style("opacity",1),r.setClipUrl(m,s.layerClipId,o),m.each(function(x){var T=t.select(this),k=i(x,v,u);if(!(w&&!x.vis)){var S,A=T.select("path.yerror");if(_.visible&&e(k.x)&&e(k.yh)&&e(k.ys)){var $=_.width;S="M"+(k.x-$)+","+k.yh+"h"+2*$+"m-"+$+",0V"+k.ys,k.noYS||(S+="m-"+$+",0h"+2*$),c=!A.size(),c?A=T.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0):d&&(A=A.transition().duration(f.duration).ease(f.easing)),A.attr("d",S)}else A.remove();var M=T.select("path.xerror");if(g.visible&&e(k.y)&&e(k.xh)&&e(k.xs)){var C=(g.copy_ystyle?_:g).width;S="M"+k.xh+","+(k.y-C)+"v"+2*C+"m0,-"+C+"H"+k.xs,k.noXS||(S+="m0,-"+C+"v"+2*C),c=!M.size(),c?M=T.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):d&&(M=M.transition().duration(f.duration).ease(f.easing)),M.attr("d",S)}else M.remove()}})}})};function i(n,o,l){var s={x:o.c2p(n.x),y:l.c2p(n.y)};return n.yh!==void 0&&(s.yh=l.c2p(n.yh),s.ys=l.c2p(n.ys),e(s.ys)||(s.noYS=!0,s.ys=l.c2p(n.ys,!0))),n.xh!==void 0&&(s.xh=o.c2p(n.xh),s.xs=o.c2p(n.xs),e(s.xs)||(s.noXS=!0,s.xs=o.c2p(n.xs,!0))),s}return ov}var lv,x0;function Uz(){if(x0)return lv;x0=1;var t=tt.exports,e=Je.exports;return lv=function(a){a.each(function(i){var n=i[0].trace,o=n.error_y||{},l=n.error_x||{},s=t.select(this);s.selectAll("path.yerror").style("stroke-width",o.thickness+"px").call(e.stroke,o.color),l.copy_ystyle&&(l=o),s.selectAll("path.xerror").style("stroke-width",l.thickness+"px").call(e.stroke,l.color)})},lv}var ol=de.exports,_0=gi.overrideAll,ll=_T,Ui={error_x:ol.extendFlat({},ll),error_y:ol.extendFlat({},ll)};delete Ui.error_x.copy_zstyle;delete Ui.error_y.copy_zstyle;delete Ui.error_y.copy_ystyle;var Bl={error_x:ol.extendFlat({},ll),error_y:ol.extendFlat({},ll),error_z:ol.extendFlat({},ll)};delete Bl.error_x.copy_ystyle;delete Bl.error_y.copy_ystyle;delete Bl.error_z.copy_ystyle;delete Bl.error_z.copy_zstyle;var Vz={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Ui,bar:Ui,histogram:Ui,scatter3d:_0(Bl,"calc","nested"),scattergl:_0(Ui,"calc","nested")}},supplyDefaults:Bz(),calc:jz(),makeComputeError:wT(),plot:Gz(),style:Uz(),hoverInfo:qz};function qz(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}var Xz={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}},ii=tt.exports,sv=Wr.exports,rf=Ut.exports,w0=Ve,za=Ct.exports,Cs=ha.exports,Vr=de.exports,ra=Vr.strTranslate,TT=Bt.extendFlat,fv=xi,ea=Tt.exports,cv=Je.exports,Yz=rc,Wz=ir,Zz=da.flipScale,Kz=Rw,Qz=Pw,Jz=Ua,lp=Lr,T0=lp.LINE_SPACING,k0=lp.FROM_TL,A0=lp.FROM_BR,zt=Xz.cn;function eI(t){var e=t._fullLayout,r=e._infolayer.selectAll("g."+zt.colorbar).data(tI(t),function(a){return a._id});r.enter().append("g").attr("class",function(a){return a._id}).classed(zt.colorbar,!0),r.each(function(a){var i=ii.select(this);Vr.ensureSingle(i,"rect",zt.cbbg),Vr.ensureSingle(i,"g",zt.cbfills),Vr.ensureSingle(i,"g",zt.cblines),Vr.ensureSingle(i,"g",zt.cbaxis,function(o){o.classed(zt.crisp,!0)}),Vr.ensureSingle(i,"g",zt.cbtitleunshift,function(o){o.append("g").classed(zt.cbtitle,!0)}),Vr.ensureSingle(i,"rect",zt.cboutline);var n=rI(i,a,t);n&&n.then&&(t._promises||[]).push(n),t._context.edits.colorbarPosition&&aI(i,a,t)}),r.exit().each(function(a){rf.autoMargin(t,a._id)}).remove(),r.order()}function tI(t){var e=t._fullLayout,r=t.calcdata,a=[],i,n,o,l;function s(w){return TT(w,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function f(){typeof l.calc=="function"?l.calc(t,o,i):(i._fillgradient=n.reversescale?Zz(n.colorscale):n.colorscale,i._zrange=[n[l.min],n[l.max]])}for(var c=0;c<r.length;c++){var v=r[c];o=v[0].trace;var u=o._module.colorbar;if(o.visible===!0&&u)for(var d=Array.isArray(u),h=d?u:[u],p=0;p<h.length;p++){l=h[p];var g=l.container;n=g?o[g]:o,n&&n.showscale&&(i=s(n.colorbar),i._id="cb"+o.uid+(d&&g?"-"+g:""),i._traceIndex=o.index,i._propPrefix=(g?g+".":"")+"colorbar.",i._meta=o._meta,f(),a.push(i))}}for(var _ in e._colorAxes)if(n=e[_],n.showscale){var b=e._colorAxes[_];i=s(n.colorbar),i._id="cb"+_,i._propPrefix=_+".colorbar.",i._meta=e._meta,l={min:"cmin",max:"cmax"},b[0]!=="heatmap"&&(o=b[1],l.calc=o._module.colorbar.calc),f(),a.push(i)}return a}function rI(t,e,r){var a=e.orientation==="v",i=e.len,n=e.lenmode,o=e.thickness,l=e.thicknessmode,s=e.outlinewidth,f=e.borderwidth,c=e.bgcolor,v=e.xanchor,u=e.yanchor,d=e.xpad,h=e.ypad,p=e.x,g=a?e.y:1-e.y,_=r._fullLayout,b=_._size,w=e._fillcolor,m=e._line,y=e.title,x=y.side,T=e._zrange||ii.extent((typeof w=="function"?w:m.color).domain()),k=typeof m.color=="function"?m.color:function(){return m.color},S=typeof w=="function"?w:function(){return w},A=e._levels,$=iI(r,e,T),M=$.fill,C=$.line,E=Math.round(o*(l==="fraction"?a?b.w:b.h:1)),I=E/(a?b.w:b.h),P=Math.round(i*(n==="fraction"?a?b.h:b.w:1)),R=P/(a?b.h:b.w),L=Math.round(a?p*b.w+d:g*b.h+h),D={center:.5,right:1}[v]||0,z={top:1,middle:.5}[u]||0,F=a?p-D*I:g-z*I,H=a?g-z*R:p-D*R,U=Math.round(a?b.h*(1-H):b.w*H);e._lenFrac=R,e._thickFrac=I,e._uFrac=F,e._vFrac=H;var B=e._axis=nI(r,e,T);B.position=I+(a?p+d/b.w:g+h/b.h);var X=["top","bottom"].indexOf(x)!==-1;if(a&&X&&(B.title.side=x,B.titlex=p+d/b.w,B.titley=H+(y.side==="top"?R-h/b.h:h/b.h)),!a&&!X&&(B.title.side=x,B.titley=g+h/b.h,B.titlex=H+d/b.w),m.color&&e.tickmode==="auto"){B.tickmode="linear",B.tick0=A.start;var O=A.size,Y=Vr.constrain(P/50,4,15)+1,W=(T[1]-T[0])/((e.nticks||Y)*O);if(W>1){var K=Math.pow(10,Math.floor(Math.log(W)/Math.LN10));O*=K*Vr.roundUp(W/K,[2,5,10]),(Math.abs(A.start)/A.size+1e-6)%1<2e-6&&(B.tick0=0)}B.dtick=O}B.domain=a?[H+h/b.h,H+R-h/b.h]:[H+d/b.w,H+R-d/b.w],B.setScale(),t.attr("transform",ra(Math.round(b.l),Math.round(b.t)));var Z=t.select("."+zt.cbtitleunshift).attr("transform",ra(-Math.round(b.l),-Math.round(b.t))),ae=B.ticklabelposition,ne=B.title.font.size,oe=t.select("."+zt.cbaxis),re,se=0,me=0;function Re(ue,Le){var we={propContainer:B,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:_._dfltTitle.colorbar,containerGroup:t.select("."+zt.cbtitle)},Pe=ue.charAt(0)==="h"?ue.substr(1):"h"+ue;t.selectAll("."+Pe+",."+Pe+"-math-group").remove(),Yz.draw(r,ue,TT(we,Le||{}))}function ke(){if(a&&X||!a&&!X){var ue,Le;x==="top"&&(ue=d+b.l+b.w*p,Le=h+b.t+b.h*(1-H-R)+3+ne*.75),x==="bottom"&&(ue=d+b.l+b.w*p,Le=h+b.t+b.h*(1-H)-3-ne*.25),x==="right"&&(Le=h+b.t+b.h*g+3+ne*.75,ue=d+b.l+b.w*H),Re(B._id+"title",{attributes:{x:ue,y:Le,"text-anchor":a?"start":"middle"}})}}function ze(){if(a&&!X||!a&&X){var ue=B.position||0,Le=B._offset+B._length/2,we,Pe;if(x==="right")Pe=Le,we=b.l+b.w*ue+10+ne*(B.showticklabels?1:.5);else if(we=Le,x==="bottom"&&(Pe=b.t+b.h*ue+10+(ae.indexOf("inside")===-1?B.tickfont.size:0)+(B.ticks!=="intside"&&e.ticklen||0)),x==="top"){var Ee=y.text.split("<br>").length;Pe=b.t+b.h*ue+10-E-T0*ne*Ee}Re((a?"h":"v")+B._id+"title",{avoid:{selection:ii.select(r).selectAll("g."+B._id+"tick"),side:x,offsetTop:a?0:b.t,offsetLeft:a?b.l:0,maxShift:a?_.width:_.height},attributes:{x:we,y:Pe,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function he(){if(!a&&!X||a&&X){var ue=t.select("."+zt.cbtitle),Le=ue.select("text"),we=[-s/2,s/2],Pe=ue.select(".h"+B._id+"title-math-group").node(),Ee=15.6;Le.node()&&(Ee=parseInt(Le.node().style.fontSize,10)*T0);var Ce;if(Pe?(Ce=ea.bBox(Pe),me=Ce.width,se=Ce.height,se>Ee&&(we[1]-=(se-Ee)/2)):Le.node()&&!Le.classed(zt.jsPlaceholder)&&(Ce=ea.bBox(Le.node()),me=Ce.width,se=Ce.height),a){if(se){if(se+=5,x==="top")B.domain[1]-=se/b.h,we[1]*=-1;else{B.domain[0]+=se/b.h;var q=Wz.lineCount(Le);we[1]+=(1-q)*Ee}ue.attr("transform",ra(we[0],we[1])),B.setScale()}}else me&&(x==="right"&&(B.domain[0]+=(me+ne/2)/b.w),ue.attr("transform",ra(we[0],we[1])),B.setScale())}t.selectAll("."+zt.cbfills+",."+zt.cblines).attr("transform",a?ra(0,Math.round(b.h*(1-B.domain[1]))):ra(Math.round(b.w*B.domain[0]),0)),oe.attr("transform",a?ra(0,Math.round(-b.t)):ra(Math.round(-b.l),0));var pe=t.select("."+zt.cbfills).selectAll("rect."+zt.cbfill).attr("style","").data(M);pe.enter().append("rect").classed(zt.cbfill,!0).style("stroke","none"),pe.exit().remove();var ve=T.map(B.c2p).map(Math.round).sort(function(xe,be){return xe-be});pe.each(function(xe,be){var Ae=[be===0?T[0]:(M[be]+M[be-1])/2,be===M.length-1?T[1]:(M[be]+M[be+1])/2].map(B.c2p).map(Math.round);a&&(Ae[1]=Vr.constrain(Ae[1]+(Ae[1]>Ae[0])?1:-1,ve[0],ve[1]));var De=ii.select(this).attr(a?"x":"y",L).attr(a?"y":"x",ii.min(Ae)).attr(a?"width":"height",Math.max(E,2)).attr(a?"height":"width",Math.max(ii.max(Ae)-ii.min(Ae),2));if(e._fillgradient)ea.gradient(De,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var Oe=S(xe).replace("e-","");De.attr("fill",sv(Oe).toHexString())}});var ye=t.select("."+zt.cblines).selectAll("path."+zt.cbline).data(m.color&&m.width?C:[]);ye.enter().append("path").classed(zt.cbline,!0),ye.exit().remove(),ye.each(function(xe){var be=L,Ae=Math.round(B.c2p(xe))+m.width/2%1;ii.select(this).attr("d","M"+(a?be+","+Ae:Ae+","+be)+(a?"h":"v")+E).call(ea.lineGroupStyle,m.width,k(xe),m.dash)}),oe.selectAll("g."+B._id+"tick,path").remove();var le=L+E+(s||0)/2-(e.ticks==="outside"?1:0),fe=za.calcTicks(B),Te=za.getTickSigns(B)[2];return za.drawTicks(r,B,{vals:B.ticks==="inside"?za.clipEnds(B,fe):fe,layer:oe,path:za.makeTickPath(B,le,Te),transFn:za.makeTransTickFn(B)}),za.drawLabels(r,B,{vals:fe,layer:oe,transFn:za.makeTransTickLabelFn(B),labelFns:za.makeLabelFns(B,le)})}function te(){var ue,Le=E+s/2;ae.indexOf("inside")===-1&&(ue=ea.bBox(oe.node()),Le+=a?ue.width:ue.height),re=Z.select("text");var we=0,Pe=a&&x==="top",Ee=!a&&x==="right",Ce=0;if(re.node()&&!re.classed(zt.jsPlaceholder)){var q,pe=Z.select(".h"+B._id+"title-math-group").node();pe&&(a&&X||!a&&!X)?(ue=ea.bBox(pe),we=ue.width,q=ue.height):(ue=ea.bBox(Z.node()),we=ue.right-b.l-(a?L:U),q=ue.bottom-b.t-(a?U:L),!a&&x==="top"&&(Le+=ue.height,Ce=ue.height)),Ee&&(re.attr("transform",ra(we/2+ne/2,0)),we*=2),Le=Math.max(Le,a?we:q)}var ve=(a?d:h)*2+Le+f+s/2,ye=0;!a&&y.text&&u==="bottom"&&g<=0&&(ye=ve/2,ve+=ye,Ce+=ye),_._hColorbarMoveTitle=ye,_._hColorbarMoveCBTitle=Ce;var le=f+s;t.select("."+zt.cbbg).attr("x",(a?L:U)-le/2-(a?d:0)).attr("y",(a?U:L)-(a?P:h+Ce-ye)).attr(a?"width":"height",Math.max(ve-ye,2)).attr(a?"height":"width",Math.max(P+le,2)).call(cv.fill,c).call(cv.stroke,e.bordercolor).style("stroke-width",f);var fe=Ee?Math.max(we-10,0):0;if(t.selectAll("."+zt.cboutline).attr("x",(a?L:U+d)+fe).attr("y",(a?U+h-P:L)+(Pe?se:0)).attr(a?"width":"height",Math.max(E,2)).attr(a?"height":"width",Math.max(P-(a?2*h+se:2*d+fe),2)).call(cv.stroke,e.outlinecolor).style({fill:"none","stroke-width":s}),t.attr("transform",ra(b.l-(a?D*ve:0),b.t-(a?0:(1-z)*ve-Ce))),!a&&(f||sv(c).getAlpha()&&!sv.equals(_.paper_bgcolor,c))){var Te=oe.selectAll("text"),xe=Te[0].length,be=t.select("."+zt.cbbg).node(),Ae=ea.bBox(be),De=ea.getTranslate(t),Oe=2;Te.each(function(N,G){var j=0,V=xe-1;if(G===j||G===V){var ee=ea.bBox(this),Q=ea.getTranslate(this),ge;if(G===V){var _e=ee.right+Q.x,ce=Ae.right+De.x+U-f-Oe+p;ge=ce-_e,ge>0&&(ge=0)}else if(G===j){var ie=ee.left+Q.x,Me=Ae.left+De.x+U+f+Oe;ge=Me-ie,ge<0&&(ge=0)}ge&&(xe<3?this.setAttribute("transform","translate("+ge+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Fe={},st=k0[v],Xe=A0[v],ut=k0[u],Ke=A0[u],ft=ve-E;a?(n==="pixels"?(Fe.y=g,Fe.t=P*ut,Fe.b=P*Ke):(Fe.t=Fe.b=0,Fe.yt=g+i*ut,Fe.yb=g-i*Ke),l==="pixels"?(Fe.x=p,Fe.l=ve*st,Fe.r=ve*Xe):(Fe.l=ft*st,Fe.r=ft*Xe,Fe.xl=p-o*st,Fe.xr=p+o*Xe)):(n==="pixels"?(Fe.x=p,Fe.l=P*st,Fe.r=P*Xe):(Fe.l=Fe.r=0,Fe.xl=p+i*st,Fe.xr=p-i*Xe),l==="pixels"?(Fe.y=1-g,Fe.t=ve*ut,Fe.b=ve*Ke):(Fe.t=ft*ut,Fe.b=ft*Ke,Fe.yt=g-o*ut,Fe.yb=g+o*Ke)),rf.autoMargin(r,e._id,Fe)}return Vr.syncOrAsync([rf.previousPromises,ke,he,ze,rf.previousPromises,te],r)}function aI(t,e,r){var a=e.orientation==="v",i=r._fullLayout,n=i._size,o,l,s;Cs.init({element:t.node(),gd:r,prepFn:function(){o=t.attr("transform"),fv(t)},moveFn:function(f,c){t.attr("transform",o+ra(f,c)),l=Cs.align((a?e._uFrac:e._vFrac)+f/n.w,a?e._thickFrac:e._lenFrac,0,1,e.xanchor),s=Cs.align((a?e._vFrac:1-e._uFrac)-c/n.h,a?e._lenFrac:e._thickFrac,0,1,e.yanchor);var v=Cs.getCursor(l,s,e.xanchor,e.yanchor);fv(t,v)},doneFn:function(){if(fv(t),l!==void 0&&s!==void 0){var f={};f[e._propPrefix+"x"]=l,f[e._propPrefix+"y"]=s,e._traceIndex!==void 0?w0.call("_guiRestyle",r,f,e._traceIndex):w0.call("_guiRelayout",r,f)}}})}function iI(t,e,r){var a=e._levels,i=[],n=[],o,l,s=a.end+a.size/100,f=a.size,c=1.001*r[0]-.001*r[1],v=1.001*r[1]-.001*r[0];for(l=0;l<1e5&&(o=a.start+l*f,!(f>0?o>=s:o<=s));l++)o>c&&o<v&&i.push(o);if(e._fillgradient)n=[0];else if(typeof e._fillcolor=="function"){var u=e._filllevels;if(u)for(s=u.end+u.size/100,f=u.size,l=0;l<1e5&&(o=u.start+l*f,!(f>0?o>=s:o<=s));l++)o>r[0]&&o<r[1]&&n.push(o);else n=i.map(function(d){return d-a.size/2}),n.push(n[n.length-1]+a.size)}else e._fillcolor&&typeof e._fillcolor=="string"&&(n=[0]);return a.size<0&&(i.reverse(),n.reverse()),{line:i,fill:n}}function nI(t,e,r){var a=t._fullLayout,i=e.orientation==="v",n={type:"linear",range:r,tickmode:e.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:e.ticks,ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,showticklabels:e.showticklabels,ticklabelposition:e.ticklabelposition,ticklabeloverflow:e.ticklabeloverflow,ticklabelstep:e.ticklabelstep,tickfont:e.tickfont,tickangle:e.tickangle,tickformat:e.tickformat,exponentformat:e.exponentformat,minexponent:e.minexponent,separatethousands:e.separatethousands,showexponent:e.showexponent,showtickprefix:e.showtickprefix,tickprefix:e.tickprefix,showticksuffix:e.showticksuffix,ticksuffix:e.ticksuffix,title:e.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},o=i?"y":"x",l={type:"linear",_id:o+e._id},s={letter:o,font:a.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:a.calendar};function f(c,v){return Vr.coerce(n,l,Jz,c,v)}return Kz(n,l,f,s,a),Qz(n,l,f,s),l}var oI={draw:eI},lI={moduleType:"component",name:"colorbar",attributes:rh,supplyDefaults:A1,draw:oI.draw,hasColorbar:m1},sI={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}},fI={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}},cI=Ve,kT=de.exports,uv=kT.extendFlat,M0=kT.extendDeep;function S0(t){var e;switch(t){case"themes__thumb":e={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":e={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}function uI(t){var e=["xaxis","yaxis","zaxis"];return e.indexOf(t.slice(0,5))>-1}var AT=function(e,r){var a,i=e.data,n=e.layout,o=M0([],i),l=M0({},n,S0(r.tileClass)),s=e._context||{};if(r.width&&(l.width=r.width),r.height&&(l.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){l.annotations=[];var f=Object.keys(l);for(a=0;a<f.length;a++)uI(f[a])&&(l[f[a]].title={text:""});for(a=0;a<o.length;a++){var c=o[a];c.showscale=!1,c.marker&&(c.marker.showscale=!1),cI.traceIs(c,"pie-like")&&(c.textposition="none")}}if(Array.isArray(r.annotations))for(a=0;a<r.annotations.length;a++)l.annotations.push(r.annotations[a]);var v=Object.keys(l).filter(function(g){return g.match(/^scene\d*$/)});if(v.length){var u={};for(r.tileClass==="thumbnail"&&(u={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),a=0;a<v.length;a++){var d=l[v[a]];d.xaxis||(d.xaxis={}),d.yaxis||(d.yaxis={}),d.zaxis||(d.zaxis={}),uv(d.xaxis,u),uv(d.yaxis,u),uv(d.zaxis,u),d._scene=null}}var h=document.createElement("div");r.tileClass&&(h.className=r.tileClass);var p={gd:h,td:h,layout:l,data:o,config:{staticPlot:r.staticPlot===void 0?!0:r.staticPlot,plotGlPixelRatio:r.plotGlPixelRatio===void 0?2:r.plotGlPixelRatio,displaylogo:r.displaylogo||!1,showLink:r.showLink||!1,showTips:r.showTips||!1,mapboxAccessToken:s.mapboxAccessToken}};return r.setBackground!=="transparent"&&(p.config.setBackground=r.setBackground||"opaque"),p.gd.defaultLayout=S0(r.tileClass),p},vI=zd.exports.EventEmitter,dI=Ve,hI=de.exports,L0=br,pI=AT,mI=Bh,yI=jh;function gI(t,e){var r=new vI,a=pI(t,{format:"png"}),i=a.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function n(){var l=L0.getDelay(i._fullLayout);setTimeout(function(){var s=mI(i),f=document.createElement("canvas");f.id=hI.randstr(),r=yI({format:e.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:f,emitter:r,svg:s}),r.clean=function(){i&&document.body.removeChild(i)}},l)}var o=L0.getRedrawFunc(i);return dI.call("_doPlot",i,a.data,a.layout,a.config).then(o).then(n).catch(function(l){r.emit("error",l)}),r}var bI=gI,C0=br,xI={getDelay:C0.getDelay,getRedrawFunc:C0.getRedrawFunc,clone:AT,toSVG:Bh,svgToImg:jh,toImage:bI,downloadImage:nw},_I=xI;(function(t){t.version=jf.version;for(var e=Ve,r=t.register=e.register,a=It,i=Object.keys(a),n=0;n<i.length;n++){var o=i[n];o.charAt(0)!=="_"&&(t[o]=a[o]),r({moduleType:"apiMethod",name:o,fn:a[o]})}r(zE),r([IE,ua,cR,LR,BR,eP,AP,KP,lz,Rz,Oz,Vz,Kn,lI,R_]),r([sI,fI]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(r(window.PlotlyLocales),delete window.PlotlyLocales),t.Icons=Th;var l=ua,s=Ut.exports;t.Plots={resize:s.resize,graphJson:s.graphJson,sendDataToCloud:s.sendDataToCloud},t.Fx={hover:l.hover,unhover:l.unhover,loneHover:l.loneHover,loneUnhover:l.loneUnhover},t.Snapshot=_I,t.PlotSchema=po})(sx);(function(t){t.exports=sx})(lx);const vH=pi(lx.exports);var MT={exports:{}},jl={TEXTPAD:3,eventDataKeys:["value","label"]},qt=xo,D0=mo.axisHoverFormat,wI=Cr.hovertemplateAttrs,TI=Cr.texttemplateAttrs,ST=ln,kI=dr,$0=jl,AI=Ga.pattern,Vi=Bt.extendFlat,vv=kI({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),MI=qt.marker,SI=MI.line,LI=Vi({},SI.width,{dflt:0}),CI=Vi({width:LI,editType:"calc"},ST("marker.line")),DI=Vi({line:CI,editType:"calc"},ST("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:AI}),Gl={x:qt.x,x0:qt.x0,dx:qt.dx,y:qt.y,y0:qt.y0,dy:qt.dy,xperiod:qt.xperiod,yperiod:qt.yperiod,xperiod0:qt.xperiod0,yperiod0:qt.yperiod0,xperiodalignment:qt.xperiodalignment,yperiodalignment:qt.yperiodalignment,xhoverformat:D0("x"),yhoverformat:D0("y"),text:qt.text,texttemplate:TI({editType:"plot"},{keys:$0.eventDataKeys}),hovertext:qt.hovertext,hovertemplate:wI({},{keys:$0.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc",description:["Specifies the location of the `text`.","*inside* positions `text` inside, next to the bar end","(rotated and scaled if needed).","*outside* positions `text` outside, next to the bar end","(scaled if needed), unless there is another bar stacked on","this one, then the text gets pushed inside.","*auto* tries to position `text` inside the bar, but if","the bar is too small and no bar is stacked on this one","the text is moved outside.","If *none*, no text appears."].join(" ")},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot",description:["Determines if texts are kept at center or start/end points in `textposition` *inside* mode."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"plot",description:["Sets the angle of the tick labels with respect to the bar.","For example, a `tickangle` of -90 draws the tick labels","vertically. With *auto* the texts may automatically be","rotated to fit with the maximum size in bars."].join(" ")},textfont:Vi({},vv,{description:"Sets the font used for `text`."}),insidetextfont:Vi({},vv,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:Vi({},vv,{description:"Sets the font used for `text` lying outside the bar."}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc",description:["Constrain the size of text inside or outside a bar to be no","larger than the bar itself."].join(" ")},cliponaxis:Vi({},qt.cliponaxis,{description:["Determines whether the text nodes","are clipped about the subplot axes.","To show the text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes",description:["Sets the orientation of the bars.","With *v* (*h*), the value of the each bar spans","along the vertical (horizontal)."].join(" ")},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc",description:["Sets where the bar base is drawn (in position axis units).","In *stack* or *relative* barmode,","traces that set *base* will be excluded","and drawn in *overlay* mode instead."].join(" ")},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc",description:["Shifts the position where the bar is drawn","(in position axis units).","In *group* barmode,","traces that set *offset* will be excluded","and drawn in *overlay* mode instead."].join(" ")},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc",description:["Sets the bar width (in position axis units)."].join(" ")},marker:DI,offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},selected:{marker:{opacity:qt.selected.marker.opacity,color:qt.selected.marker.color,editType:"style"},textfont:qt.selected.textfont,editType:"style"},unselected:{marker:{opacity:qt.unselected.marker.opacity,color:qt.unselected.marker.color,editType:"style"},textfont:qt.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"],description:"Renamed to `orientation`."}}},sp={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *relative*, the bars are stacked on top of one another,","with negative values below the axis, positive values above","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to an *opacity* to see multiple bars."].join(" ")},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Sets the normalization for bar traces on the graph.","With *fraction*, the value of each bar is divided by the sum of all","values at that location coordinate.","*percent* is the same but multiplied by 100 to show percentages."].join(" ")},bargap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")}},$I=Je.exports,E0=da.hasColorscale,R0=zl,EI=de.exports.coercePattern,LT=function(e,r,a,i,n){var o=a("marker.color",i),l=E0(e,"marker");l&&R0(e,r,n,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",$I.defaultLine),E0(e,"marker.line")&&R0(e,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),EI(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")},no=de.exports,P0=Je.exports,RI=Ve,PI=Uh,zI=pc,II=LT,NI=Xa.getAxisGroup,CT=Gl,Ds=no.coerceFont;function FI(t,e,r,a){function i(f,c){return no.coerce(t,e,CT,f,c)}var n=PI(t,e,a,i);if(!n){e.visible=!1;return}zI(t,e,a,i),i("xhoverformat"),i("yhoverformat"),i("orientation",e.x&&!e.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate");var o=i("textposition");$T(t,e,a,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),II(t,e,i,r,a);var l=(e.marker.line||{}).color,s=RI.getComponentMethod("errorbars","supplyDefaults");s(t,e,l||P0.defaultLine,{axis:"y"}),s(t,e,l||P0.defaultLine,{axis:"x",inherit:"y"}),no.coerceSelectionMarkerOpacity(e,i)}function DT(t,e,r,a){var i=e.orientation,n=e[{v:"x",h:"y"}[i]+"axis"],o=NI(r,n)+i,l=r._alignmentOpts||{},s=a("alignmentgroup"),f=l[o];f||(f=l[o]={});var c=f[s];c?c.traces.push(e):c=f[s]={traces:[e],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var v=a("offsetgroup"),u=c.offsetGroups,d=u[v];v&&(d||(d=u[v]={offsetIndex:Object.keys(u).length}),e._offsetIndex=d.offsetIndex)}function HI(t,e){var r,a;function i(o){return no.coerce(a._input,a,CT,o)}if(e.barmode==="group")for(var n=0;n<t.length;n++)a=t[n],a.type==="bar"&&(r=a._input,DT(r,a,e,i))}function $T(t,e,r,a,i,n){n=n||{};var o=n.moduleHasSelected!==!1,l=n.moduleHasUnselected!==!1,s=n.moduleHasConstrain!==!1,f=n.moduleHasCliponaxis!==!1,c=n.moduleHasTextangle!==!1,v=n.moduleHasInsideanchor!==!1,u=!!n.hasPathbar,d=Array.isArray(i)||i==="auto",h=d||i==="inside",p=d||i==="outside";if(h||p){var g=Ds(a,"textfont",r.font),_=no.extendFlat({},g),b=t.textfont&&t.textfont.color,w=!b;if(w&&delete _.color,Ds(a,"insidetextfont",_),u){var m=no.extendFlat({},g);w&&delete m.color,Ds(a,"pathbar.textfont",m)}p&&Ds(a,"outsidetextfont",g),o&&a("selected.textfont.color"),l&&a("unselected.textfont.color"),s&&a("constraintext"),f&&a("cliponaxis"),c&&a("textangle"),a("texttemplate")}h&&v&&a("insidetextanchor")}var oo={supplyDefaults:FI,crossTraceDefaults:HI,handleGroupingDefaults:DT,handleText:$T},OI=Ve,BI=Ct.exports,jI=de.exports,GI=sp,ET=function(t,e,r){function a(d,h){return jI.coerce(t,e,GI,d,h)}for(var i=!1,n=!1,o=!1,l={},s=a("barmode"),f=0;f<r.length;f++){var c=r[f];if(OI.traceIs(c,"bar")&&c.visible)i=!0;else continue;if(s==="group"){var v=c.xaxis+c.yaxis;l[v]&&(o=!0),l[v]=!0}if(c.visible&&c.type==="histogram"){var u=BI.getFromId({_fullLayout:e},c[c.orientation==="v"?"xaxis":"yaxis"]);u.type!=="category"&&(n=!0)}}if(!i){delete e.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",n&&!o?0:.2),a("bargroupgap")},Sn=de.exports,fp=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;Sn.mergeArray(r.text,e,"tx"),Sn.mergeArray(r.hovertext,e,"htx");var i=r.marker;if(i){Sn.mergeArray(i.opacity,e,"mo",!0),Sn.mergeArray(i.color,e,"mc");var n=i.line;n&&(Sn.mergeArray(n.color,e,"mlc"),Sn.mergeArrayCastPositive(n.width,e,"mlw"))}},z0=Ct.exports,I0=mc,N0=da.hasColorscale,F0=ah,UI=fp,VI=ww,qI=function(e,r){var a=z0.getFromId(e,r.xaxis||"x"),i=z0.getFromId(e,r.yaxis||"y"),n,o,l,s,f,c,v={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(n=a.makeCalcdata(r,"x",v),l=i.makeCalcdata(r,"y"),s=I0(r,i,"y",l),f=!!r.yperiodalignment,c="y"):(n=i.makeCalcdata(r,"y",v),l=a.makeCalcdata(r,"x"),s=I0(r,a,"x",l),f=!!r.xperiodalignment,c="x"),o=s.vals;for(var u=Math.min(o.length,n.length),d=new Array(u),h=0;h<u;h++)d[h]={p:o[h],s:n[h]},f&&(d[h].orig_p=l[h],d[h][c+"End"]=s.ends[h],d[h][c+"Start"]=s.starts[h]),r.ids&&(d[h].id=String(r.ids[h]));return N0(r,"marker")&&F0(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),N0(r,"marker.line")&&F0(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),UI(d,r),VI(d,r),d},XI=_c,YI=de.exports.distinctVals,WI=Ot.BADNUM;function _c(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,a=[],i=0;i<t.length;i++){for(var n=t[i],o=0;o<n.length;o++){var l=n[o];l.p!==WI&&a.push(l.p)}n[0]&&n[0].width1&&(r=Math.min(n[0].width1,r))}this.positions=a;var s=YI(a);this.distinctPositions=s.vals,s.vals.length===1&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(s.minDiff,r);var f=(e.posAxis||{}).type;(f==="category"||f==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}_c.prototype.put=function(e,r){var a=this.getLabel(e,r),i=this.bins[a]||0;return this.bins[a]=i+r,i};_c.prototype.get=function(e,r){var a=this.getLabel(e,r);return this.bins[a]||0};_c.prototype.getLabel=function(e,r){var a=r<0&&this.sepNegVal?"v":"^",i=this.overlapNoMerge?e:Math.round(e/this.binWidth);return a+i};var hi=lt,Td=de.exports.isArrayOrTypedArray,lo=Ot.BADNUM,ZI=Ve,kl=Ct.exports,KI=Xa.getAxisGroup,wc=XI;function QI(t,e){for(var r=e.xaxis,a=e.yaxis,i=t._fullLayout,n=t._fullData,o=t.calcdata,l=[],s=[],f=0;f<n.length;f++){var c=n[f];if(c.visible===!0&&ZI.traceIs(c,"bar")&&c.xaxis===r._id&&c.yaxis===a._id&&(c.orientation==="h"?l.push(o[f]):s.push(o[f]),c._computePh))for(var v=t.calcdata[f],u=0;u<v.length;u++)typeof v[u].ph0=="function"&&(v[u].ph0=v[u].ph0()),typeof v[u].ph1=="function"&&(v[u].ph1=v[u].ph1())}var d={xCat:r.type==="category"||r.type==="multicategory",yCat:a.type==="category"||a.type==="multicategory",mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};kd(t,r,a,s,d),kd(t,a,r,l,d)}function kd(t,e,r,a,i){if(!!a.length){var n,o,l,s,f;switch(JI(r,a),i.mode){case"overlay":dv(e,r,a,i);break;case"group":for(n=[],o=[],l=0;l<a.length;l++)s=a[l],f=s[0].trace,f.offset===void 0?o.push(s):n.push(s);o.length&&eN(t,e,r,o,i),n.length&&dv(e,r,n,i);break;case"stack":case"relative":for(n=[],o=[],l=0;l<a.length;l++)s=a[l],f=s[0].trace,f.base===void 0?o.push(s):n.push(s);o.length&&tN(t,e,r,o,i),n.length&&dv(e,r,n,i);break}nN(a,e)}}function JI(t,e){var r,a;for(r=0;r<e.length;r++){var i=e[r],n=i[0].trace,o=n.type==="funnel"?n._base:n.base,l,s=n.orientation==="h"?n.xcalendar:n.ycalendar,f=t.type==="category"||t.type==="multicategory"?function(){return null}:t.d2c;if(Td(o)){for(a=0;a<Math.min(o.length,i.length);a++)l=f(o[a],0,s),hi(l)?(i[a].b=+l,i[a].hasB=1):i[a].b=0;for(;a<i.length;a++)i[a].b=0}else{l=f(o,0,s);var c=hi(l);for(l=c?l:0,a=0;a<i.length;a++)i[a].b=l,c&&(i[a].hasB=1)}}}function dv(t,e,r,a){for(var i=0;i<r.length;i++){var n=r[i],o=new wc([n],{posAxis:t,sepNegVal:!1,overlapNoMerge:!a.norm});RT(t,o,a),a.norm?(FT(o),cp(e,o,a)):NT(e,o)}}function eN(t,e,r,a,i){var n=new wc(a,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});rN(t,e,n,i),iN(n,e),i.norm?(FT(n),cp(r,n,i)):NT(r,n)}function tN(t,e,r,a,i){var n=new wc(a,{posAxis:e,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});RT(e,n,i),aN(r,n,i);for(var o=0;o<a.length;o++)for(var l=a[o],s=0;s<l.length;s++){var f=l[s];if(f.s!==lo){var c=f.b+f.s===n.get(f.p,f.s);c&&(f._outmost=!0)}}i.norm&&cp(r,n,i)}function RT(t,e,r){for(var a=e.minDiff,i=e.traces,n=a*(1-r.gap),o=n,l=o*(1-(r.groupgap||0)),s=-l/2,f=0;f<i.length;f++){var c=i[f],v=c[0].t;v.barwidth=l,v.poffset=s,v.bargroupwidth=n,v.bardelta=a}e.binWidth=i[0][0].t.barwidth/100,PT(e),zT(t,e),IT(t,e)}function rN(t,e,r,a){for(var i=t._fullLayout,n=r.positions,o=r.distinctPositions,l=r.minDiff,s=r.traces,f=s.length,c=n.length!==o.length,v=l*(1-a.gap),u=KI(i,e._id)+s[0][0].trace.orientation,d=i._alignmentOpts[u]||{},h=0;h<f;h++){var p=s[h],g=p[0].trace,_=d[g.alignmentgroup]||{},b=Object.keys(_.offsetGroups||{}).length,w;b?w=v/b:w=c?v/f:v;var m=w*(1-(a.groupgap||0)),y;b?y=((2*g._offsetIndex+1-b)*w-m)/2:y=c?((2*h+1-f)*w-m)/2:-m/2;var x=p[0].t;x.barwidth=m,x.poffset=y,x.bargroupwidth=v,x.bardelta=l}r.binWidth=s[0][0].t.barwidth/100,PT(r),zT(e,r),IT(e,r,c)}function PT(t){var e=t.traces,r,a;for(r=0;r<e.length;r++){var i=e[r],n=i[0],o=n.trace,l=n.t,s=o._offset||o.offset,f=l.poffset,c;if(Td(s)){for(c=Array.prototype.slice.call(s,0,i.length),a=0;a<c.length;a++)hi(c[a])||(c[a]=f);for(a=c.length;a<i.length;a++)c.push(f);l.poffset=c}else s!==void 0&&(l.poffset=s);var v=o._width||o.width,u=l.barwidth;if(Td(v)){var d=Array.prototype.slice.call(v,0,i.length);for(a=0;a<d.length;a++)hi(d[a])||(d[a]=u);for(a=d.length;a<i.length;a++)d.push(u);if(l.barwidth=d,s===void 0){for(c=[],a=0;a<i.length;a++)c.push(f+(u-d[a])/2);l.poffset=c}}else v!==void 0&&(l.barwidth=v,s===void 0&&(l.poffset=f+(u-v)/2))}}function zT(t,e){for(var r=e.traces,a=Ul(t),i=0;i<r.length;i++)for(var n=r[i],o=n[0].t,l=o.poffset,s=Array.isArray(l),f=o.barwidth,c=Array.isArray(f),v=0;v<n.length;v++){var u=n[v],d=u.w=c?f[v]:f;u[a]=u.p+(s?l[v]:l)+d/2}}function IT(t,e,r){var a=e.traces,i=e.minDiff,n=i/2;kl.minDtick(t,e.minDiff,e.distinctPositions[0],r);for(var o=0;o<a.length;o++){var l=a[o],s=l[0],f=s.trace,c=[],v,u,d,h;for(h=0;h<l.length;h++)v=l[h],u=v.p-n,d=v.p+n,c.push(u,d);if(f.width||f.offset){var p=s.t,g=p.poffset,_=p.barwidth,b=Array.isArray(g),w=Array.isArray(_);for(h=0;h<l.length;h++){v=l[h];var m=b?g[h]:g,y=w?_[h]:_;u=v.p+m,d=u+y,c.push(u,d)}}f._extremes[t._id]=kl.findExtremes(t,c,{padded:!1})}}function NT(t,e){for(var r=e.traces,a=Ul(t),i=0;i<r.length;i++){for(var n=r[i],o=n[0].trace,l=[],s=!1,f=0;f<n.length;f++){var c=n[f],v=c.b,u=v+c.s;c[a]=u,l.push(u),c.hasB&&l.push(v),(!c.hasB||!c.b)&&(s=!0)}o._extremes[t._id]=kl.findExtremes(t,l,{tozero:s,padded:!0})}}function aN(t,e,r){var a=Ul(t),i=e.traces,n,o,l,s,f,c;for(s=0;s<i.length;s++)if(n=i[s],o=n[0].trace,o.type==="funnel")for(f=0;f<n.length;f++)c=n[f],c.s!==lo&&e.put(c.p,-.5*c.s);for(s=0;s<i.length;s++){n=i[s],o=n[0].trace,l=o.type==="funnel";var v=[];for(f=0;f<n.length;f++)if(c=n[f],c.s!==lo){var u;l?u=c.s:u=c.s+c.b;var d=e.put(c.p,u),h=d+u;c.b=d,c[a]=h,r.norm||(v.push(h),c.hasB&&v.push(d))}r.norm||(o._extremes[t._id]=kl.findExtremes(t,v,{tozero:!0,padded:!0}))}}function FT(t){for(var e=t.traces,r=0;r<e.length;r++)for(var a=e[r],i=0;i<a.length;i++){var n=a[i];n.s!==lo&&t.put(n.p,n.b+n.s)}}function iN(t,e){for(var r=t.traces,a=0;a<r.length;a++){var i=r[a],n=i[0].trace;if(n.base===void 0)for(var o=new wc([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<i.length;l++){var s=i[l];if(s.p!==lo){var f=o.put(s.p,s.b+s.s);f&&(s.b=f)}}}}function cp(t,e,r){var a=e.traces,i=Ul(t),n=r.norm==="fraction"?1:100,o=n/1e9,l=t.l2c(t.c2l(0)),s=r.mode==="stack"?n:l;function f(y){return hi(t.c2l(y))&&(y<l-o||y>s+o||!hi(l))}for(var c=0;c<a.length;c++){for(var v=a[c],u=v[0].trace,d=[],h=!1,p=!1,g=0;g<v.length;g++){var _=v[g];if(_.s!==lo){var b=Math.abs(n/e.get(_.p,_.s));_.b*=b,_.s*=b;var w=_.b,m=w+_.s;_[i]=m,d.push(m),p=p||f(m),_.hasB&&(d.push(w),p=p||f(w)),(!_.hasB||!_.b)&&(h=!0)}}u._extremes[t._id]=kl.findExtremes(t,d,{tozero:h,padded:p})}}function nN(t,e){var r=Ul(e),a={},i,n,o,l=1/0,s=-1/0;for(i=0;i<t.length;i++)for(o=t[i],n=0;n<o.length;n++){var f=o[n].p;hi(f)&&(l=Math.min(l,f),s=Math.max(s,f))}var c=1e4/(s-l),v=a.round=function(b){return String(Math.round(c*(b-l)))};for(i=0;i<t.length;i++){o=t[i],o[0].t.extents=a;var u=o[0].t.poffset,d=Array.isArray(u);for(n=0;n<o.length;n++){var h=o[n],p=h[r]-h.w/2;if(hi(p)){var g=h[r]+h.w/2,_=v(h.p);a[_]?a[_]=[Math.min(p,a[_][0]),Math.max(g,a[_][1])]:a[_]=[p,g]}h.p0=h.p+(d?u[n]:u),h.p1=h.p0+h.w,h.s0=h.b,h.s1=h.s0+h.s}}}function Ul(t){return t._id.charAt(0)}var HT={crossTraceCalc:QI,setGroupPositions:kd},oN=tt.exports,lN=de.exports;function sN(t,e,r){var a=t._fullLayout,i=a["_"+r+"Text_minsize"];if(i){var n=a.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}e.selectAll(o).each(function(l){var s=l.transform;if(s){s.scale=n&&s.hide?0:i/s.fontSize;var f=oN.select(this).select("text");f.attr("transform",lN.getTextTransform(s))}})}}function fN(t,e,r){if(r.uniformtext.mode){var a=OT(t),i=r.uniformtext.minsize,n=e.scale*e.fontSize;e.hide=n<i,r[a]=r[a]||1/0,e.hide||(r[a]=Math.min(r[a],Math.max(n,i)))}}function cN(t,e){var r=OT(t);e[r]=void 0}function OT(t){return"_"+t+"Text_minsize"}var Ya={recordMinTextSize:fN,clearMinTextSize:cN,resizeText:sN},Wa={},uN=lt,vN=Wr.exports,dN=de.exports.isArrayOrTypedArray;Wa.coerceString=function(t,e,r){if(typeof e=="string"){if(e||!t.noBlank)return e}else if((typeof e=="number"||e===!0)&&!t.strict)return String(e);return r!==void 0?r:t.dflt};Wa.coerceNumber=function(t,e,r){if(uN(e)){e=+e;var a=t.min,i=t.max,n=a!==void 0&&e<a||i!==void 0&&e>i;if(!n)return e}return r!==void 0?r:t.dflt};Wa.coerceColor=function(t,e,r){return vN(e).isValid()?e:r!==void 0?r:t.dflt};Wa.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),t.values.indexOf(e)!==-1?e:r!==void 0?r:t.dflt};Wa.getValue=function(t,e){var r;return Array.isArray(t)?e<t.length&&(r=t[e]):r=t,r};Wa.getLineWidth=function(t,e){var r=0<e.mlw?e.mlw:dN(t.marker.line.width)?0:t.marker.line.width;return r};var sl=tt.exports,hN=Je.exports,Al=Tt.exports,BT=de.exports,jT=Ve,GT=Ya.resizeText,up=Gl,pN=up.textfont,mN=up.insidetextfont,yN=up.outsidetextfont,Ln=Wa;function gN(t){var e=sl.select(t).selectAll("g.barlayer").selectAll("g.trace");GT(t,e,"bar");var r=e.size(),a=t._fullLayout;e.style("opacity",function(i){return i[0].trace.opacity}).each(function(i){(a.barmode==="stack"&&r>1||a.bargap===0&&a.bargroupgap===0&&!i[0].trace.marker.line.width)&&sl.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(i){var n=sl.select(this),o=i[0].trace;UT(n,o,t)}),jT.getComponentMethod("errorbars","style")(e)}function UT(t,e,r){Al.pointStyle(t.selectAll("path"),e,r),VT(t,e,r)}function VT(t,e,r){t.selectAll("text").each(function(a){var i=sl.select(this),n=BT.ensureUniformFontSize(r,qT(i,a,e,r));Al.font(i,n)})}function bN(t,e,r){var a=e[0].trace;a.selectedpoints?xN(r,a,t):(UT(r,a,t),jT.getComponentMethod("errorbars","style")(r))}function xN(t,e,r){Al.selectedPointStyle(t.selectAll("path"),e),_N(t.selectAll("text"),e,r)}function _N(t,e,r){t.each(function(a){var i=sl.select(this),n;if(a.selected){n=BT.ensureUniformFontSize(r,qT(i,a,e,r));var o=e.selected.textfont&&e.selected.textfont.color;o&&(n.color=o),Al.font(i,n)}else Al.selectedTextStyle(i,e)})}function qT(t,e,r,a){var i=a._fullLayout.font,n=r.textfont;if(t.classed("bartext-inside")){var o=ZT(e,r);n=YT(r,e.i,i,o)}else t.classed("bartext-outside")&&(n=WT(r,e.i,i));return n}function XT(t,e,r){return vp(pN,t.textfont,e,r)}function YT(t,e,r,a){var i=XT(t,e,r),n=t._input.textfont===void 0||t._input.textfont.color===void 0||Array.isArray(t.textfont.color)&&t.textfont.color[e]===void 0;return n&&(i={color:hN.contrast(a),family:i.family,size:i.size}),vp(mN,t.insidetextfont,e,i)}function WT(t,e,r){var a=XT(t,e,r);return vp(yN,t.outsidetextfont,e,a)}function vp(t,e,r,a){e=e||{};var i=Ln.getValue(e.family,r),n=Ln.getValue(e.size,r),o=Ln.getValue(e.color,r);return{family:Ln.coerceString(t.family,i,a.family),size:Ln.coerceNumber(t.size,n,a.size),color:Ln.coerceColor(t.color,o,a.color)}}function ZT(t,e){return e.type==="waterfall"?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}var Ji={style:gN,styleTextPoints:VT,styleOnSelect:bN,getInsideTextFont:YT,getOutsideTextFont:WT,getBarColor:ZT,resizeText:GT},$s=tt.exports,Es=lt,er=de.exports,wN=ir,TN=Je.exports,fi=Tt.exports,kN=Ve,zf=Ct.exports.tickText,KT=Ya,AN=KT.recordMinTextSize,MN=KT.clearMinTextSize,hv=Ji,so=Wa,SN=jl,QT=Gl,LN=QT.text,CN=QT.textposition,DN=Zr.appendArrayPointValue,sa=SN.TEXTPAD;function $N(t){return t.id}function EN(t){if(t.ids)return $N}function ui(t,e){return t<e?1:-1}function RN(t,e,r,a){var i=[],n=[],o=a?e:r,l=a?r:e;return i[0]=o.c2p(t.s0,!0),n[0]=l.c2p(t.p0,!0),i[1]=o.c2p(t.s1,!0),n[1]=l.c2p(t.p1,!0),a?[i,n]:[n,i]}function JT(t,e,r,a){if(!e.uniformtext.mode&&e2(r)){var i;return a&&(i=a()),t.transition().duration(r.duration).ease(r.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()})}else return t}function e2(t){return t&&t.duration>0}function PN(t,e,r,a,i,n){var o=e.xaxis,l=e.yaxis,s=t._fullLayout;i||(i={mode:s.barmode,norm:s.barmode,gap:s.bargap,groupgap:s.bargroupgap},MN("bar",s));var f=er.makeTraceGroups(a,r,"trace bars").each(function(c){var v=$s.select(this),u=c[0].trace,d=u.type==="waterfall",h=u.type==="funnel",p=u.type==="bar",g=p||h,_=0;d&&u.connector.visible&&u.connector.mode==="between"&&(_=u.connector.line.width/2);var b=u.orientation==="h",w=e2(i),m=er.ensureSingle(v,"g","points"),y=EN(u),x=m.selectAll("g.point").data(er.identity,y);x.enter().append("g").classed("point",!0),x.exit().remove(),x.each(function(k,S){var A=$s.select(this),$=RN(k,o,l,b),M=$[0][0],C=$[0][1],E=$[1][0],I=$[1][1],P=(b?C-M:I-E)===0;P&&g&&so.getLineWidth(u,k)&&(P=!1),P||(P=!Es(M)||!Es(C)||!Es(E)||!Es(I)),k.isBlank=P,P&&(b?C=M:I=E),_&&!P&&(b?(M-=ui(M,C)*_,C+=ui(M,C)*_):(E-=ui(E,I)*_,I+=ui(E,I)*_));var R,L;if(u.type==="waterfall"){if(!P){var D=u[k.dir].marker;R=D.line.width,L=D.color}}else R=so.getLineWidth(u,k),L=k.mc||u.marker.color;function z(O){var Y=$s.round(R/2%1,2);return i.gap===0&&i.groupgap===0?$s.round(Math.round(O)-Y,2):O}function F(O,Y,W){return W&&O===Y?O:Math.abs(O-Y)>=2?z(O):O>Y?Math.ceil(O):Math.floor(O)}if(!t._context.staticPlot){var H=TN.opacity(L),U=H<1||R>.01?z:F;M=U(M,C,b),C=U(C,M,b),E=U(E,I,!b),I=U(I,E,!b)}var B=JT(er.ensureSingle(A,"path"),s,i,n);if(B.style("vector-effect","non-scaling-stroke").attr("d",isNaN((C-M)*(I-E))||P&&t._context.staticPlot?"M0,0Z":"M"+M+","+E+"V"+I+"H"+C+"V"+E+"Z").call(fi.setClipUrl,e.layerClipId,t),!s.uniformtext.mode&&w){var X=fi.makePointStyleFns(u);fi.singlePointStyle(k,B,u,X,t)}zN(t,e,A,c,S,M,C,E,I,i,n),e.layerClipId&&fi.hideOutsideRangePoint(k,A.select("text"),o,l,u.xcalendar,u.ycalendar)});var T=u.cliponaxis===!1;fi.setClipUrl(v,T?null:e.layerClipId,t)});kN.getComponentMethod("errorbars","plot")(t,f,e,i)}function zN(t,e,r,a,i,n,o,l,s,f,c){var v=e.xaxis,u=e.yaxis,d=t._fullLayout,h;function p(O,Y,W){var K=er.ensureSingle(O,"text").text(Y).attr({class:"bartext bartext-"+h,"text-anchor":"middle","data-notex":1}).call(fi.font,W).call(wN.convertToTspans,t);return K}var g=a[0].trace,_=g.orientation==="h",b=NN(d,a,i,v,u);h=FN(g,i);var w=f.mode==="stack"||f.mode==="relative",m=a[i],y=!w||m._outmost;if(!b||h==="none"||(m.isBlank||n===o||l===s)&&(h==="auto"||h==="inside")){r.select("text").remove();return}var x=d.font,T=hv.getBarColor(a[i],g),k=hv.getInsideTextFont(g,i,x,T),S=hv.getOutsideTextFont(g,i,x),A=r.datum();_?v.type==="log"&&A.s0<=0&&(v.range[0]<v.range[1]?n=0:n=v._length):u.type==="log"&&A.s0<=0&&(u.range[0]<u.range[1]?l=u._length:l=0);var $=Math.abs(o-n)-2*sa,M=Math.abs(s-l)-2*sa,C,E,I,P,R;if(h==="outside"&&!y&&!m.hasB&&(h="inside"),h==="auto")if(y){h="inside",R=er.ensureUniformFontSize(t,k),C=p(r,b,R),E=fi.bBox(C.node()),I=E.width,P=E.height;var L=I>0&&P>0,D=I<=$&&P<=M,z=I<=M&&P<=$,F=_?$>=I*(M/P):M>=P*($/I);L&&(D||z||F)?h="inside":(h="outside",C.remove(),C=null)}else h="inside";if(!C){R=er.ensureUniformFontSize(t,h==="outside"?S:k),C=p(r,b,R);var H=C.attr("transform");if(C.attr("transform",""),E=fi.bBox(C.node()),I=E.width,P=E.height,C.attr("transform",H),I<=0||P<=0){C.remove();return}}var U=g.textangle,B,X;h==="outside"?(X=g.constraintext==="both"||g.constraintext==="outside",B=IN(n,o,l,s,E,{isHorizontal:_,constrained:X,angle:U})):(X=g.constraintext==="both"||g.constraintext==="inside",B=a2(n,o,l,s,E,{isHorizontal:_,constrained:X,angle:U,anchor:g.insidetextanchor})),B.fontSize=R.size,AN(g.type==="histogram"?"bar":g.type,B,d),m.transform=B,JT(C,d,f,c).attr("transform",er.getTextTransform(B))}function t2(t){return t==="auto"?0:t}function r2(t,e){var r=Math.PI/180*e,a=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*a,y:t.width*a+t.height*i}}function a2(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=n.anchor||"end",c=f==="end",v=f==="start",u=n.leftToRight||0,d=(u+1)/2,h=1-d,p=i.width,g=i.height,_=Math.abs(e-t),b=Math.abs(a-r),w=_>2*sa&&b>2*sa?sa:0;_-=2*w,b-=2*w;var m=t2(s);s==="auto"&&!(p<=_&&g<=b)&&(p>_||g>b)&&(!(p>b||g>_)||p<g!=_<b)&&(m+=90);var y=r2(i,m),x=1;l&&(x=Math.min(1,_/y.x,b/y.y));var T=i.left*h+i.right*d,k=(i.top+i.bottom)/2,S=(t+sa)*h+(e-sa)*d,A=(r+a)/2,$=0,M=0;if(v||c){var C=(o?y.x:y.y)/2,E=o?ui(t,e):ui(r,a);o?v?(S=t+E*w,$=-E*C):(S=e-E*w,$=E*C):v?(A=r+E*w,M=-E*C):(A=a-E*w,M=E*C)}return{textX:T,textY:k,targetX:S,targetY:A,anchorX:$,anchorY:M,scale:x,rotate:m}}function IN(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=i.width,c=i.height,v=Math.abs(e-t),u=Math.abs(a-r),d;o?d=u>2*sa?sa:0:d=v>2*sa?sa:0;var h=1;l&&(h=o?Math.min(1,u/c):Math.min(1,v/f));var p=t2(s),g=r2(i,p),_=(o?g.x:g.y)/2,b=(i.left+i.right)/2,w=(i.top+i.bottom)/2,m=(t+e)/2,y=(r+a)/2,x=0,T=0,k=o?ui(e,t):ui(r,a);return o?(m=e-k*d,x=k*_):(y=a+k*d,T=-k*_),{textX:b,textY:w,targetX:m,targetY:y,anchorX:x,anchorY:T,scale:h,rotate:p}}function NN(t,e,r,a,i){var n=e[0].trace,o=n.texttemplate,l;return o?l=HN(t,e,r,a,i):n.textinfo?l=ON(e,r,a,i):l=so.getValue(n.text,r),so.coerceString(LN,l)}function FN(t,e){var r=so.getValue(t.textposition,e);return so.coerceEnumerated(CN,r)}function HN(t,e,r,a,i){var n=e[0].trace,o=er.castOption(n,r,"texttemplate");if(!o)return"";var l=n.type==="histogram",s=n.type==="waterfall",f=n.type==="funnel",c=n.orientation==="h",v,u,d,h;c?(v="y",u=i,d="x",h=a):(v="x",u=a,d="y",h=i);function p(x){return zf(u,u.c2l(x),!0).text}function g(x){return zf(h,h.c2l(x),!0).text}var _=e[r],b={};b.label=_.p,b.labelLabel=b[v+"Label"]=p(_.p);var w=er.castOption(n,_.i,"text");(w===0||w)&&(b.text=w),b.value=_.s,b.valueLabel=b[d+"Label"]=g(_.s);var m={};DN(m,n,_.i),(l||m.x===void 0)&&(m.x=c?b.value:b.label),(l||m.y===void 0)&&(m.y=c?b.label:b.value),(l||m.xLabel===void 0)&&(m.xLabel=c?b.valueLabel:b.labelLabel),(l||m.yLabel===void 0)&&(m.yLabel=c?b.labelLabel:b.valueLabel),s&&(b.delta=+_.rawS||_.s,b.deltaLabel=g(b.delta),b.final=_.v,b.finalLabel=g(b.final),b.initial=b.final-b.delta,b.initialLabel=g(b.initial)),f&&(b.value=_.s,b.valueLabel=g(b.value),b.percentInitial=_.begR,b.percentInitialLabel=er.formatPercent(_.begR),b.percentPrevious=_.difR,b.percentPreviousLabel=er.formatPercent(_.difR),b.percentTotal=_.sumR,b.percenTotalLabel=er.formatPercent(_.sumR));var y=er.castOption(n,_.i,"customdata");return y&&(b.customdata=y),er.texttemplateString(o,b,t._d3locale,m,b,n._meta||{})}function ON(t,e,r,a){var i=t[0].trace,n=i.orientation==="h",o=i.type==="waterfall",l=i.type==="funnel";function s(y){var x=n?a:r;return zf(x,y,!0).text}function f(y){var x=n?r:a;return zf(x,+y,!0).text}var c=i.textinfo,v=t[e],u=c.split("+"),d=[],h,p=function(y){return u.indexOf(y)!==-1};if(p("label")&&d.push(s(t[e].p)),p("text")&&(h=er.castOption(i,v.i,"text"),(h===0||h)&&d.push(h)),o){var g=+v.rawS||v.s,_=v.v,b=_-g;p("initial")&&d.push(f(b)),p("delta")&&d.push(f(g)),p("final")&&d.push(f(_))}if(l){p("value")&&d.push(f(v.s));var w=0;p("percent initial")&&w++,p("percent previous")&&w++,p("percent total")&&w++;var m=w>1;p("percent initial")&&(h=er.formatPercent(v.begR),m&&(h+=" of initial"),d.push(h)),p("percent previous")&&(h=er.formatPercent(v.difR),m&&(h+=" of previous"),d.push(h)),p("percent total")&&(h=er.formatPercent(v.sumR),m&&(h+=" of total"),d.push(h))}return d.join("<br>")}var dp={plot:PN,toMoveInsideBar:a2},Bo=ua,BN=Ve,H0=Je.exports,jN=de.exports.fillText,GN=Wa.getLineWidth,pv=Ct.exports.hoverLabelText,UN=Ot.BADNUM;function VN(t,e,r,a,i){var n=i2(t,e,r,a,i);if(n){var o=n.cd,l=o[0].trace,s=o[n.index];return n.color=n2(l,s),BN.getComponentMethod("errorbars","hoverInfo")(s,l,n),[n]}}function i2(t,e,r,a,i){var n=t.cd,o=n[0].trace,l=n[0].t,s=a==="closest",f=o.type==="waterfall",c=t.maxHoverDistance,v=t.maxSpikeDistance,u,d,h,p,g,_,b;o.orientation==="h"?(u=r,d=e,h="y",p="x",g=I,_=M):(u=e,d=r,h="x",p="y",_=I,g=M);var w=o[h+"period"],m=s||w;function y(O){return T(O,-1)}function x(O){return T(O,1)}function T(O,Y){var W=O.w;return O[h]+Y*W/2}function k(O){return O[h+"End"]-O[h+"Start"]}var S=s?y:w?function(O){return O.p-k(O)/2}:function(O){return Math.min(y(O),O.p-l.bardelta/2)},A=s?x:w?function(O){return O.p+k(O)/2}:function(O){return Math.max(x(O),O.p+l.bardelta/2)};function $(O,Y,W){return i.finiteRange&&(W=0),Bo.inbox(O-u,Y-u,W+Math.min(1,Math.abs(Y-O)/b)-1)}function M(O){return $(S(O),A(O),c)}function C(O){return $(y(O),x(O),v)}function E(O){var Y=O[p];if(f){var W=Math.abs(O.rawS)||0;d>0?Y+=W:d<0&&(Y-=W)}return Y}function I(O){var Y=d,W=O.b,K=E(O);return Bo.inbox(W-Y,K-Y,c+(K-Y)/(K-W)-1)}function P(O){var Y=d,W=O.b,K=E(O);return Bo.inbox(W-Y,K-Y,v+(K-Y)/(K-W)-1)}var R=t[h+"a"],L=t[p+"a"];b=Math.abs(R.r2c(R.range[1])-R.r2c(R.range[0]));function D(O){return(g(O)+_(O))/2}var z=Bo.getDistanceFunction(a,g,_,D);if(Bo.getClosest(n,z,t),t.index!==!1&&n[t.index].p!==UN){m||(S=function(O){return Math.min(y(O),O.p-l.bargroupwidth/2)},A=function(O){return Math.max(x(O),O.p+l.bargroupwidth/2)});var F=t.index,H=n[F],U=o.base?H.b+H.s:H.s;t[p+"0"]=t[p+"1"]=L.c2p(H[p],!0),t[p+"LabelVal"]=U;var B=l.extents[l.extents.round(H.p)];t[h+"0"]=R.c2p(s?S(H):B[0],!0),t[h+"1"]=R.c2p(s?A(H):B[1],!0);var X=H.orig_p!==void 0;return t[h+"LabelVal"]=X?H.orig_p:H.p,t.labelLabel=pv(R,t[h+"LabelVal"],o[h+"hoverformat"]),t.valueLabel=pv(L,t[p+"LabelVal"],o[p+"hoverformat"]),t.baseLabel=pv(L,H.b,o[p+"hoverformat"]),t.spikeDistance=(P(H)+C(H))/2,t[h+"Spike"]=R.c2p(H.p,!0),jN(H,o,t),t.hovertemplate=o.hovertemplate,t}}function n2(t,e){var r=e.mcc||t.marker.color,a=e.mlcc||t.marker.line.color,i=GN(t,e);if(H0.opacity(r))return r;if(H0.opacity(a)&&i)return a}var o2={hoverPoints:VN,hoverOnBars:i2,getTraceColor:n2},qN=function(e,r,a){return e.x="xVal"in r?r.xVal:r.x,e.y="yVal"in r?r.yVal:r.y,r.xa&&(e.xaxis=r.xa),r.ya&&(e.yaxis=r.ya),a.orientation==="h"?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e},l2=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=a[0].trace,l=o.type==="funnel",s=o.orientation==="h",f=[],c;if(r===!1)for(c=0;c<a.length;c++)a[c].selected=0;else for(c=0;c<a.length;c++){var v=a[c],u="ct"in v?v.ct:XN(v,i,n,s,l);r.contains(u,!1,c,e)?(f.push({pointNumber:c,x:i.c2d(v.x),y:n.c2d(v.y)}),v.selected=1):v.selected=0}return f};function XN(t,e,r,a,i){var n=e.c2p(a?t.s0:t.p0,!0),o=e.c2p(a?t.s1:t.p1,!0),l=r.c2p(a?t.p0:t.s0,!0),s=r.c2p(a?t.p1:t.s1,!0);return i?[(n+o)/2,(l+s)/2]:a?[o,(l+s)/2]:[(n+o)/2,s]}var YN={attributes:Gl,layoutAttributes:sp,supplyDefaults:oo.supplyDefaults,crossTraceDefaults:oo.crossTraceDefaults,supplyLayoutDefaults:ET,calc:qI,crossTraceCalc:HT.crossTraceCalc,colorbar:Ol,arraysToCalcdata:fp,plot:dp.plot,style:Ji.style,styleOnSelect:Ji.styleOnSelect,hoverPoints:o2.hoverPoints,eventData:qN,selectPoints:l2,moduleType:"trace",name:"bar",basePlotModule:Yt,categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{description:["The data visualized by the span of the bars is set in `y`","if `orientation` is set th *v* (the default)","and the labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}};(function(t){t.exports=YN})(MT);const dH=pi(MT.exports);var s2={exports:{}},WN=function(e,r){return{start:{valType:"any",editType:"calc",description:["Sets the starting value for the",e,"axis bins. Defaults to the minimum data value,","shifted down if necessary to make nice round values","and to remove ambiguous bin edges. For example, if most of the","data is integers we shift the bin edges 0.5 down, so a `size`","of 5 would have a default `start` of -0.5, so it is clear","that 0-4 are in the first bin, 5-9 in the second, but","continuous data gets a start of 0 and bins [0,5), [5,10) etc.","Dates behave similarly, and `start` should be a date string.","For category data, `start` is based on the category serial","numbers, and defaults to -0.5.",r?"If multiple non-overlaying histograms share a subplot, the first explicit `start` is used exactly and all others are shifted down (if necessary) to differ from that one by an integer number of bins.":""].join(" ")},end:{valType:"any",editType:"calc",description:["Sets the end value for the",e,"axis bins. The last bin may not end exactly at this value,","we increment the bin edge by `size` from `start` until we","reach or exceed `end`. Defaults to the maximum data value.","Like `start`, for dates use a date string, and for category","data `end` is based on the category serial numbers."].join(" ")},size:{valType:"any",editType:"calc",description:["Sets the size of each",e,"axis bin.","Default behavior: If `nbins"+e+"` is 0 or omitted,","we choose a nice round bin size such that the number of bins","is about the same as the typical number of samples in each bin.","If `nbins"+e+"` is provided, we choose a nice round","bin size giving no more than that many bins.","For date data, use milliseconds or *M<n>* for months, as in","`axis.dtick`. For category data, the number of categories to","bin together (always defaults to 1).",r?"If multiple non-overlaying histograms share a subplot, the first explicit `size` is used and all others discarded. If no `size` is provided,the sample data from all traces is combined to determine `size` as described above.":""].join(" ")},editType:"calc"}},ZN={eventDataKeys:["binNumber"]},wr=Gl,O0=mo.axisHoverFormat,KN=Cr.hovertemplateAttrs,QN=Cr.texttemplateAttrs,mv=dr,B0=WN,JN=ZN,yv=Bt.extendFlat,f2={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the x axis."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the y axis."].join(" ")},xhoverformat:O0("x"),yhoverformat:O0("y"),text:yv({},wr.text,{description:["Sets hover text elements associated with each bar.","If a single string, the same string appears over all bars.","If an array of string, the items are mapped in order to the","this trace's coordinates."].join(" ")}),hovertext:yv({},wr.hovertext,{description:"Same as `text`."}),orientation:wr.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc",description:["Specifies the binning function used for this histogram trace.","If *count*, the histogram values are computed by counting the","number of values lying inside each bin.","If *sum*, *avg*, *min*, *max*,","the histogram values are computed using","the sum, the average, the minimum or the maximum","of the values lying inside each bin respectively."].join(" ")},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc",description:["Specifies the type of normalization used for this histogram trace.","If **, the span of each bar corresponds to the number of","occurrences (i.e. the number of data points lying inside the bins).","If *percent* / *probability*, the span of each bar corresponds to","the percentage / fraction of occurrences with respect to the total","number of sample points","(here, the sum of all bin HEIGHTS equals 100% / 1).","If *density*, the span of each bar corresponds to the number of","occurrences in a bin divided by the size of the bin interval","(here, the sum of all bin AREAS equals the","total number of sample points).","If *probability density*, the area of each bar corresponds to the","probability that an event will fall into the corresponding bin","(here, the sum of all bin AREAS equals 1)."].join(" ")},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc",description:["If true, display the cumulative distribution by summing the","binned values. Use the `direction` and `centralbin` attributes","to tune the accumulation method.","Note: in this mode, the *density* `histnorm` settings behave","the same as their equivalents without *density*:","** and *density* both rise to the number of data points, and","*probability* and *probability density* both rise to the","number of sample points."].join(" ")},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc",description:["Only applies if cumulative is enabled.","If *increasing* (default) we sum all prior bins, so the result","increases from left to right. If *decreasing* we sum later bins","so the result decreases from left to right."].join(" ")},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc",description:["Only applies if cumulative is enabled.","Sets whether the current bin is included, excluded, or has half","of its value included in the current cumulative value.","*include* is the default for compatibility with various other","tools, however it introduces a half-bin bias to the results.","*exclude* makes the opposite half-bin bias, and *half* removes","it."].join(" ")},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `xbins.size` is provided."].join(" ")},xbins:B0("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `ybins.size` is provided."].join(" ")},ybins:B0("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobinx` is not needed. However, we accept","`autobinx: true` or `false` and will update `xbins` accordingly","before deleting `autobinx` from the trace."].join(" ")},autobiny:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobiny` is not needed. However, we accept","`autobiny: true` or `false` and will update `ybins` accordingly","before deleting `autobiny` from the trace."].join(" ")},bingroup:{valType:"string",dflt:"",editType:"calc",description:["Set a group of histogram traces which will have compatible bin settings.","Note that traces on the same subplot and with the same *orientation*","under `barmode` *stack*, *relative* and *group* are forced into the same bingroup,","Using `bingroup`, traces under `barmode` *overlay* and on different axes","(of the same axis type) can have compatible bin settings.","Note that histogram and histogram2d* trace can share the same `bingroup`"].join(" ")},hovertemplate:KN({},{keys:JN.eventDataKeys}),texttemplate:QN({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:yv({},wr.textposition,{arrayOk:!1}),textfont:mv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:mv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:mv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),insidetextanchor:wr.insidetextanchor,textangle:wr.textangle,cliponaxis:wr.cliponaxis,constraintext:wr.constraintext,marker:wr.marker,offsetgroup:wr.offsetgroup,alignmentgroup:wr.alignmentgroup,selected:wr.selected,unselected:wr.unselected,_deprecated:{bardir:wr._deprecated.bardir}},j0=Ve,jo=de.exports,G0=Je.exports,eF=oo.handleText,tF=LT,rF=f2,aF=function(e,r,a,i){function n(b,w){return jo.coerce(e,r,rF,b,w)}var o=n("x"),l=n("y"),s=n("cumulative.enabled");s&&(n("cumulative.direction"),n("cumulative.currentbin")),n("text");var f=n("textposition");eF(e,r,i,n,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),n("hovertext"),n("hovertemplate"),n("xhoverformat"),n("yhoverformat");var c=n("orientation",l&&!o?"h":"v"),v=c==="v"?"x":"y",u=c==="v"?"y":"x",d=o&&l?Math.min(jo.minRowLength(o)&&jo.minRowLength(l)):jo.minRowLength(r[v]||[]);if(!d){r.visible=!1;return}r._length=d;var h=j0.getComponentMethod("calendars","handleTraceDefaults");h(e,r,["x","y"],i);var p=r[u];p&&n("histfunc"),n("histnorm"),n("autobin"+v),tF(e,r,n,a,i),jo.coerceSelectionMarkerOpacity(r,n);var g=(r.marker.line||{}).color,_=j0.getComponentMethod("errorbars","supplyDefaults");_(e,r,g||G0.defaultLine,{axis:"y"}),_(e,r,g||G0.defaultLine,{axis:"x",inherit:"y"})},Qo=de.exports,iF=Vt,Rs=Ve.traceIs,nF=oo.handleGroupingDefaults,U0=Qo.nestedProperty,gv=Xa.getAxisGroup,V0=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],oF=["x","y"],lF=function(e,r){var a=r._histogramBinOpts={},i=[],n={},o=[],l,s,f,c,v,u,d;function h(E,I){return Qo.coerce(l._input,l,l._module.attributes,E,I)}function p(E){return E.orientation==="v"?"x":"y"}function g(E,I){var P=iF.getFromTrace({_fullLayout:r},E,I);return P.type}function _(E,I,P){var R=E.uid+"__"+P;I||(I=R);var L=g(E,P),D=E[P+"calendar"]||"",z=a[I],F=!0;z&&(L===z.axType&&D===z.calendar?(F=!1,z.traces.push(E),z.dirs.push(P)):(I=R,L!==z.axType&&Qo.warn(["Attempted to group the bins of trace",E.index,"set on a","type:"+L,"axis","with bins on","type:"+z.axType,"axis."].join(" ")),D!==z.calendar&&Qo.warn(["Attempted to group the bins of trace",E.index,"set with a",D,"calendar","with bins",z.calendar?"on a "+z.calendar+" calendar":"w/o a set calendar"].join(" ")))),F&&(a[I]={traces:[E],dirs:[P],axType:L,calendar:E[P+"calendar"]||""}),E["_"+P+"bingroup"]=I}for(v=0;v<e.length;v++)l=e[v],Rs(l,"histogram")&&(i.push(l),delete l._xautoBinFinished,delete l._yautoBinFinished,Rs(l,"2dMap")||nF(l._input,l,r,h));var b=r._alignmentOpts||{};for(v=0;v<i.length;v++){if(l=i[v],f="",!Rs(l,"2dMap")){if(c=p(l),r.barmode==="group"&&l.alignmentgroup){var w=l[c+"axis"],m=gv(r,w)+l.orientation;(b[m]||{})[l.alignmentgroup]&&(f=m)}!f&&r.barmode!=="overlay"&&(f=gv(r,l.xaxis)+gv(r,l.yaxis)+p(l))}f?(n[f]||(n[f]=[]),n[f].push(l)):o.push(l)}for(f in n){if(s=n[f],s.length===1){o.push(s[0]);continue}var y=!1;for(s.length&&(l=s[0],y=h("bingroup")),f=y||f,v=0;v<s.length;v++){l=s[v];var x=l._input.bingroup;x&&x!==f&&Qo.warn(["Trace",l.index,"must match","within bingroup",f+".","Ignoring its bingroup:",x,"setting."].join(" ")),l.bingroup=f,_(l,f,p(l))}}for(v=0;v<o.length;v++){l=o[v];var T=h("bingroup");if(Rs(l,"2dMap"))for(d=0;d<2;d++){c=oF[d];var k=h(c+"bingroup",T?T+"__"+c:null);_(l,k,c)}else _(l,T,p(l))}for(f in a){var S=a[f];for(s=S.traces,u=0;u<V0.length;u++){var A=V0[u],$=A.name,M,C;if(!($==="nbins"&&S.sizeFound)){for(v=0;v<s.length;v++){if(l=s[v],c=S.dirs[v],M=A.aStr[c],U0(l._input,M).get()!==void 0){S[$]=h(M),S[$+"Found"]=!0;break}C=(l._autoBin||{})[c]||{},C[$]&&U0(l,M).set(C[$])}if($==="start"||$==="end")for(;v<s.length;v++)l=s[v],l["_"+c+"bingroup"]&&(C=(l._autoBin||{})[c]||{},h(M,C[$]));$==="nbins"&&!S.sizeFound&&!S.nbinsFound&&(l=s[0],S[$]=h(M))}}}},Cn=lt,sF={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,a){var i=a[e];return Cn(i)?(i=Number(i),r[t]+=i,i):0},avg:function(t,e,r,a,i){var n=a[e];return Cn(n)&&(n=Number(n),r[t]+=n,i[t]++),0},min:function(t,e,r,a){var i=a[e];if(Cn(i))if(i=Number(i),Cn(r[t])){if(r[t]>i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0},max:function(t,e,r,a){var i=a[e];if(Cn(i))if(i=Number(i),Cn(r[t])){if(r[t]<i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0}},fF={percent:function(t,e){for(var r=t.length,a=100/e,i=0;i<r;i++)t[i]*=a},probability:function(t,e){for(var r=t.length,a=0;a<r;a++)t[a]/=e},density:function(t,e,r,a){var i=t.length;a=a||1;for(var n=0;n<i;n++)t[n]*=r[n]*a},"probability density":function(t,e,r,a){var i=t.length;a&&(e/=a);for(var n=0;n<i;n++)t[n]*=r[n]/e}},cF=function(e,r){for(var a=e.length,i=0,n=0;n<a;n++)r[n]?(e[n]/=r[n],i+=e[n]):e[n]=null;return i},_o=Ot,Zi=_o.ONEAVGYEAR,q0=_o.ONEAVGMONTH,If=_o.ONEDAY,X0=_o.ONEHOUR,Y0=_o.ONEMIN,W0=_o.ONESEC,Z0=Ct.exports.tickIncrement,uF=function(e,r,a,i,n){var o=-1.1*r,l=-.1*r,s=e-l,f=a[0],c=a[1],v=Math.min(Ps(f+l,f+s,i,n),Ps(c+l,c+s,i,n)),u=Math.min(Ps(f+o,f+l,i,n),Ps(c+o,c+l,i,n)),d,h;if(v>u&&u<Math.abs(c-f)/4e3?(d=v,h=!1):(d=Math.min(v,u),h=!0),i.type==="date"&&d>If){var p=d===Zi?1:6,g=d===Zi?"M12":"M1";return function(_,b){var w=i.c2d(_,Zi,n),m=w.indexOf("-",p);m>0&&(w=w.substr(0,m));var y=i.d2c(w,0,n);if(y<_){var x=Z0(y,g,!1,n);(y+x)/2<_+e&&(y=x)}return b&&h?Z0(y,g,!0,n):y}}return function(_,b){var w=d*Math.round(_/d);return w+d/10<_&&w+d*.9<_+e&&(w+=d),b&&h&&(w-=d),w}};function Ps(t,e,r,a){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),n=r.type==="date",o=K0(i,n),l=0;l<10;l++){var s=K0(o*80,n);if(o===s)break;if(vF(s,t,e,n,r,a))o=s;else break}return o}function K0(t,e){return e&&t>W0?t>If?t>Zi*1.1?Zi:t>q0*1.1?q0:If:t>X0?X0:t>Y0?Y0:W0:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function vF(t,e,r,a,i,n){if(a&&t>If){var o=Q0(e,i,n),l=Q0(r,i,n),s=t===Zi?0:1;return o[s]!==l[s]}return Math.floor(r/t)-Math.floor(e/t)>.1}function Q0(t,e,r){var a=e.c2d(t,Zi,r).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}var Ad=lt,ur=de.exports,J0=Ve,Gr=Ct.exports,dF=fp,eb=sF,hF=fF,pF=cF,mF=uF;function yF(t,e){var r=[],a=[],i=e.orientation==="h",n=Gr.getFromId(t,i?e.yaxis:e.xaxis),o=i?"y":"x",l={x:"y",y:"x"}[o],s=e[o+"calendar"],f=e.cumulative,c,v=hp(t,e,n,o),u=v[0],d=v[1],h=typeof u.size=="string",p=[],g=h?p:u,_=[],b=[],w=[],m=0,y=e.histnorm,x=e.histfunc,T=y.indexOf("density")!==-1,k,S,A;f.enabled&&T&&(y=y.replace(/ ?density$/,""),T=!1);var $=x==="max"||x==="min",M=$?null:0,C=eb.count,E=hF[y],I=!1,P=function(ne){return n.r2c(ne,0,s)},R;for(ur.isArrayOrTypedArray(e[l])&&x!=="count"&&(R=e[l],I=x==="avg",C=eb[x]),c=P(u.start),S=P(u.end)+(c-Gr.tickIncrement(c,u.size,!1,s))/1e6;c<S&&r.length<1e6&&(k=Gr.tickIncrement(c,u.size,!1,s),r.push((c+k)/2),a.push(M),w.push([]),p.push(c),T&&_.push(1/(k-c)),I&&b.push(0),!(k<=c));)c=k;p.push(c),!h&&n.type==="date"&&(g={start:P(g.start),end:P(g.end),size:g.size}),t._fullLayout._roundFnOpts||(t._fullLayout._roundFnOpts={});var L=e["_"+o+"bingroup"],D={leftGap:1/0,rightGap:1/0};L&&(t._fullLayout._roundFnOpts[L]||(t._fullLayout._roundFnOpts[L]=D),D=t._fullLayout._roundFnOpts[L]);var z=a.length,F=!0,H=D.leftGap,U=D.rightGap,B={};for(c=0;c<d.length;c++){var X=d[c];A=ur.findBin(X,g),A>=0&&A<z&&(m+=C(A,c,a,R,b),F&&w[A].length&&X!==d[w[A][0]]&&(F=!1),w[A].push(c),B[c]=A,H=Math.min(H,X-p[A]),U=Math.min(U,p[A+1]-X))}D.leftGap=H,D.rightGap=U;var O;F||(O=function(ne,oe){return function(){var re=t._fullLayout._roundFnOpts[L];return mF(re.leftGap,re.rightGap,p,n,s)(ne,oe)}}),I&&(m=pF(a,b)),E&&E(a,m,_),f.enabled&&xF(a,f.direction,f.currentbin);var Y=Math.min(r.length,a.length),W=[],K=0,Z=Y-1;for(c=0;c<Y;c++)if(a[c]){K=c;break}for(c=Y-1;c>=K;c--)if(a[c]){Z=c;break}for(c=K;c<=Z;c++)if(Ad(r[c])&&Ad(a[c])){var ae={p:r[c],s:a[c],b:0};f.enabled||(ae.pts=w[c],F?ae.ph0=ae.ph1=w[c].length?d[w[c][0]]:r[c]:(e._computePh=!0,ae.ph0=O(p[c]),ae.ph1=O(p[c+1],!0))),W.push(ae)}return W.length===1&&(W[0].width1=Gr.tickIncrement(W[0].p,u.size,!1,s)-W[0].p),dF(W,e),ur.isArrayOrTypedArray(e.selectedpoints)&&ur.tagSelected(W,e,B),W}function hp(t,e,r,a,i){var n=a+"bins",o=t._fullLayout,l=e["_"+a+"bingroup"],s=o._histogramBinOpts[l],f=o.barmode==="overlay",c,v,u,d,h,p,g,_=function(X){return r.r2c(X,0,d)},b=function(X){return r.c2r(X,0,d)},w=r.type==="date"?function(X){return X||X===0?ur.cleanDate(X,null,d):null}:function(X){return Ad(X)?Number(X):null};function m(X,O,Y){O[X+"Found"]?(O[X]=w(O[X]),O[X]===null&&(O[X]=Y[X])):(p[X]=O[X]=Y[X],ur.nestedProperty(v[0],n+"."+X).set(Y[X]))}if(e["_"+a+"autoBinFinished"])delete e["_"+a+"autoBinFinished"];else{v=s.traces;var y=[],x=!0,T=!1,k=!1;for(c=0;c<v.length;c++)if(u=v[c],u.visible){var S=s.dirs[c];h=u["_"+S+"pos0"]=r.makeCalcdata(u,S),y=ur.concat(y,h),delete u["_"+a+"autoBinFinished"],e.visible===!0&&(x?x=!1:(delete u._autoBin,u["_"+a+"autoBinFinished"]=1),J0.traceIs(u,"2dMap")&&(T=!0),u.type==="histogram2dcontour"&&(k=!0))}d=v[0][a+"calendar"];var A=Gr.autoBin(y,r,s.nbins,T,d,s.sizeFound&&s.size),$=v[0]._autoBin={};if(p=$[s.dirs[0]]={},k&&(s.size||(A.start=b(Gr.tickIncrement(_(A.start),A.size,!0,d))),s.end===void 0&&(A.end=b(Gr.tickIncrement(_(A.end),A.size,!1,d)))),f&&!J0.traceIs(e,"2dMap")&&A._dataSpan===0&&r.type!=="category"&&r.type!=="multicategory"){if(i)return[A,h,!0];A=gF(t,e,r,a,n)}g=u.cumulative||{},g.enabled&&g.currentbin!=="include"&&(g.direction==="decreasing"?A.start=b(Gr.tickIncrement(_(A.start),A.size,!0,d)):A.end=b(Gr.tickIncrement(_(A.end),A.size,!1,d))),s.size=A.size,s.sizeFound||(p.size=A.size,ur.nestedProperty(v[0],n+".size").set(A.size)),m("start",s,A),m("end",s,A)}h=e["_"+a+"pos0"],delete e["_"+a+"pos0"];var M=e._input[n]||{},C=ur.extendFlat({},s),E=s.start,I=r.r2l(M.start),P=I!==void 0;if((s.startFound||P)&&I!==r.r2l(E)){var R=P?I:ur.aggNums(Math.min,null,h),L={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:s.size,tick0:E,calendar:d,range:[R,Gr.tickIncrement(R,s.size,!1,d)].map(r.l2r)},D=Gr.tickFirst(L);D>r.r2l(R)&&(D=Gr.tickIncrement(D,s.size,!0,d)),C.start=r.l2r(D),P||ur.nestedProperty(e,n+".start").set(C.start)}var z=s.end,F=r.r2l(M.end),H=F!==void 0;if((s.endFound||H)&&F!==r.r2l(z)){var U=H?F:ur.aggNums(Math.max,null,h);C.end=r.l2r(U),H||ur.nestedProperty(e,n+".start").set(C.end)}var B="autobin"+a;return e._input[B]===!1&&(e._input[n]=ur.extendFlat({},e[n]||{}),delete e._input[B],delete e[B]),[C,h]}function gF(t,e,r,a,i){var n=t._fullLayout,o=bF(t,e),l=!1,s=1/0,f=[e],c,v,u;for(c=0;c<o.length;c++)if(v=o[c],v===e)l=!0;else if(!l)u=n._histogramBinOpts[v["_"+a+"bingroup"]],s=Math.min(s,u.size||v[i].size);else{var d=hp(t,v,r,a,!0),h=d[0],p=d[2];v["_"+a+"autoBinFinished"]=1,v["_"+a+"pos0"]=d[1],p?f.push(v):s=Math.min(s,h.size)}var g=new Array(f.length);for(c=0;c<f.length;c++)for(var _=f[c]["_"+a+"pos0"],b=0;b<_.length;b++)if(_[b]!==void 0){g[c]=_[b];break}for(isFinite(s)||(s=ur.distinctVals(g).minDiff),c=0;c<f.length;c++){v=f[c];var w=v[a+"calendar"],m={start:r.c2r(g[c]-s/2,0,w),end:r.c2r(g[c]+s/2,0,w),size:s};v._input[i]=v[i]=m,u=n._histogramBinOpts[v["_"+a+"bingroup"]],u&&ur.extendFlat(u,m)}return e[i]}function bF(t,e){for(var r=e.xaxis,a=e.yaxis,i=e.orientation,n=[],o=t._fullData,l=0;l<o.length;l++){var s=o[l];s.type==="histogram"&&s.visible===!0&&s.orientation===i&&s.xaxis===r&&s.yaxis===a&&n.push(s)}return n}function xF(t,e,r){var a,i,n;function o(s){n=t[s],t[s]/=2}function l(s){i=t[s],t[s]=n+i/2,n+=i}if(r==="half")if(e==="increasing")for(o(0),a=1;a<t.length;a++)l(a);else for(o(t.length-1),a=t.length-2;a>=0;a--)l(a);else if(e==="increasing"){for(a=1;a<t.length;a++)t[a]+=t[a-1];r==="exclude"&&(t.unshift(0),t.pop())}else{for(a=t.length-2;a>=0;a--)t[a]+=t[a+1];r==="exclude"&&(t.push(0),t.shift())}}var _F={calc:yF,calcAllAutoBins:hp},wF=o2.hoverPoints,TF=Ct.exports.hoverLabelText,kF=function(e,r,a,i,n){var o=wF(e,r,a,i,n);if(!!o){e=o[0];var l=e.cd[e.index],s=e.cd[0].trace;if(!s.cumulative.enabled){var f=s.orientation==="h"?"y":"x";e[f+"Label"]=TF(e[f+"a"],[l.ph0,l.ph1],s[f+"hoverformat"])}return o}},AF=function(e,r,a,i,n){if(e.x="xVal"in r?r.xVal:r.x,e.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(e.z=r.zLabelVal),r.xa&&(e.xaxis=r.xa),r.ya&&(e.yaxis=r.ya),!(a.cumulative||{}).enabled){var o=Array.isArray(n)?i[0].pts[n[0]][n[1]]:i[n].pts;e.pointNumbers=o,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex;var l;if(a._indexToPoints){l=[];for(var s=0;s<o.length;s++)l=l.concat(a._indexToPoints[o[s]])}else l=o;e.pointIndices=l}return e},MF={attributes:f2,layoutAttributes:sp,supplyDefaults:aF,crossTraceDefaults:lF,supplyLayoutDefaults:ET,calc:_F.calc,crossTraceCalc:HT.crossTraceCalc,plot:dp.plot,layerName:"barlayer",style:Ji.style,styleOnSelect:Ji.styleOnSelect,colorbar:Ol,hoverPoints:kF,selectPoints:l2,eventData:AF,moduleType:"trace",name:"histogram",basePlotModule:Yt,categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{description:["The sample data from which statistics are computed is set in `x`","for vertically spanning histograms and","in `y` for horizontally spanning histograms.","Binning options are set `xbins` and `ybins` respectively","if no aggregation data is provided."].join(" ")}};(function(t){t.exports=MF})(s2);const hH=pi(s2.exports);var c2={exports:{}},SF=La,LF=_i.attributes,CF=dr,DF=hr,$F=Cr.hovertemplateAttrs,EF=Cr.texttemplateAttrs,Dn=Bt.extendFlat,Go=CF({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."}),Tc={labels:{valType:"data_array",editType:"calc",description:["Sets the sector labels.","If `labels` entries are duplicated, we sum associated `values`","or simply count occurrences if `values` is not provided.","For other array attributes (including color) we use the first","non-empty entry among all occurrences of the label."].join(" ")},label0:{valType:"number",dflt:0,editType:"calc",description:["Alternate to `labels`.","Builds a numeric set of labels.","Use with `dlabel`","where `label0` is the starting label and `dlabel` the step."].join(" ")},dlabel:{valType:"number",dflt:1,editType:"calc",description:"Sets the label step. See `label0` for more info."},values:{valType:"data_array",editType:"calc",description:["Sets the values of the sectors.","If omitted, we count occurrences of each label."].join(" ")},marker:{colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:{valType:"color",dflt:DF.defaultLine,arrayOk:!0,editType:"style",description:["Sets the color of the line enclosing each sector."].join(" ")},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style",description:["Sets the width (in px) of the line enclosing each sector."].join(" ")},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot",description:["Sets text elements associated with each sector.","If trace `textinfo` contains a *text* flag, these elements will be seen","on the chart.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each sector.","If a single string, the same string appears for","all data points.","If an array of string, the items are mapped in order of","this trace's sectors.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},scalegroup:{valType:"string",dflt:"",editType:"calc",description:["If there are multiple pie charts that should be sized according to","their totals, link them by providing a non-empty group id here","shared by every trace in the same group."].join(" ")},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc",description:["Determines which trace information appear on the graph."].join(" ")},hoverinfo:Dn({},SF.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:$F({},{keys:["label","color","value","percent","text"]}),texttemplate:EF({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot",description:["Specifies the location of the `textinfo`."].join(" ")},textfont:Dn({},Go,{description:"Sets the font used for `textinfo`."}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot",description:["Controls the orientation of the text inside chart sectors.","When set to *auto*, text may be oriented in any direction in order","to be as big as possible in the middle of a sector.","The *horizontal* option orients text to be parallel with the bottom","of the chart, and may make text smaller in order to achieve that goal.","The *radial* option orients text along the radius of the sector.","The *tangential* option orients text perpendicular to the radius of the sector."].join(" ")},insidetextfont:Dn({},Go,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:Dn({},Go,{description:"Sets the font used for `textinfo` lying outside the sector."}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether outside text labels can push the margins."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"plot",description:["Sets the title of the chart.","If it is empty, no title is displayed.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Dn({},Go,{description:["Sets the font used for `title`.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot",description:["Specifies the location of the `title`.","Note that the title's position used to be set","by the now deprecated `titleposition` attribute."].join(" ")},editType:"plot"},domain:LF({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the fraction of the radius to cut out of the pie.","Use this to make a donut chart."].join(" ")},sort:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the sectors are reordered","from largest to smallest."].join(" ")},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc",description:["Specifies the direction at which succeeding sectors follow","one another."].join(" ")},rotation:{valType:"number",min:-360,max:360,dflt:0,editType:"calc",description:["Instead of the first slice starting at 12 o'clock,","rotate to some other angle."].join(" ")},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc",description:["Sets the fraction of larger radius to pull the sectors","out from the center. This can be a constant","to pull all slices apart from each other equally","or an array to highlight one or more slices."].join(" ")},_deprecated:{title:{valType:"string",dflt:"",editType:"calc",description:["Deprecated in favor of `title.text`.","Note that value of `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:Dn({},Go,{description:"Deprecated in favor of `title.font`."}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc",description:"Deprecated in favor of `title.position`."}}},RF=lt,Md=de.exports,PF=Tc,zF=_i.defaults,IF=oo.handleText;function u2(t,e){var r=Array.isArray(t),a=Md.isArrayOrTypedArray(e),i=Math.min(r?t.length:1/0,a?e.length:1/0);if(isFinite(i)||(i=0),i&&a){for(var n,o=0;o<i;o++){var l=e[o];if(RF(l)&&l>0){n=!0;break}}n||(i=0)}return{hasLabels:r,hasValues:a,len:i}}function NF(t,e,r,a){function i(w,m){return Md.coerce(t,e,PF,w,m)}var n=i("labels"),o=i("values"),l=u2(n,o),s=l.len;if(e._hasLabels=l.hasLabels,e._hasValues=l.hasValues,!e._hasLabels&&e._hasValues&&(i("label0"),i("dlabel")),!s){e.visible=!1;return}e._length=s;var f=i("marker.line.width");f&&i("marker.line.color"),i("marker.colors"),i("scalegroup");var c=i("text"),v=i("texttemplate"),u;if(v||(u=i("textinfo",Array.isArray(c)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),v||u&&u!=="none"){var d=i("textposition");IF(t,e,a,i,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var h=Array.isArray(d)||d==="auto",p=h||d==="outside";p&&i("automargin"),(d==="inside"||d==="auto"||Array.isArray(d))&&i("insidetextorientation")}zF(e,a,i);var g=i("hole"),_=i("title.text");if(_){var b=i("title.position",g?"middle center":"top center");!g&&b==="middle center"&&(e.title.position="top center"),Md.coerceFont(i,"title.font",a.font)}i("sort"),i("direction"),i("rotation"),i("pull")}var FF={handleLabelsAndValues:u2,supplyDefaults:NF},v2={hiddenlabels:{valType:"data_array",editType:"calc",description:["hiddenlabels is the funnelarea & pie chart analog of","visible:'legendonly'","but it can contain many labels, and can simultaneously","hide slices from several pies/funnelarea charts"].join(" ")},piecolorway:{valType:"colorlist",editType:"calc",description:["Sets the default pie slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendpiecolors`."].join(" ")},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the pie slice colors (whether given by `piecolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}},HF=de.exports,OF=v2,BF=function(e,r){function a(i,n){return HF.coerce(e,r,OF,i,n)}a("hiddenlabels"),a("piecolorway",r.colorway),a("extendpiecolors")},jF=lt,Sd=Wr.exports,GF=Je.exports,UF={};function VF(t,e){var r=[],a=t._fullLayout,i=a.hiddenlabels||[],n=e.labels,o=e.marker.colors||[],l=e.values,s=e._length,f=e._hasValues&&s,c,v;if(e.dlabel)for(n=new Array(s),c=0;c<s;c++)n[c]=String(e.label0+c*e.dlabel);var u={},d=d2(a["_"+e.type+"colormap"]),h=0,p=!1;for(c=0;c<s;c++){var g,_,b;if(f){if(g=l[c],!jF(g))continue;g=+g}else g=1;_=n[c],(_===void 0||_==="")&&(_=c),_=String(_);var w=u[_];w===void 0?(u[_]=r.length,b=i.indexOf(_)!==-1,b||(h+=g),r.push({v:g,label:_,color:d(o[c],_),i:c,pts:[c],hidden:b})):(p=!0,v=r[w],v.v+=g,v.pts.push(c),v.hidden||(h+=g),v.color===!1&&o[c]&&(v.color=d(o[c],_)))}r=r.filter(function(y){return y.v>=0});var m=e.type==="funnelarea"?p:e.sort;return m&&r.sort(function(y,x){return x.v-y.v}),r[0]&&(r[0].vTotal=h),r}function d2(t){return function(r,a){return!r||(r=Sd(r),!r.isValid())?!1:(r=GF.addOpacity(r,r.getAlpha()),t[a]||(t[a]=r),r)}}function qF(t,e){var r=(e||{}).type;r||(r="pie");var a=t._fullLayout,i=t.calcdata,n=a[r+"colorway"],o=a["_"+r+"colormap"];a["extend"+r+"colors"]&&(n=h2(n,UF));for(var l=0,s=0;s<i.length;s++){var f=i[s],c=f[0].trace.type;if(c===r)for(var v=0;v<f.length;v++){var u=f[v];u.color===!1&&(o[u.label]?u.color=o[u.label]:(o[u.label]=u.color=n[l%n.length],l++))}}}function h2(t,e){var r,a=JSON.stringify(t),i=e[a];if(!i){for(i=t.slice(),r=0;r<t.length;r++)i.push(Sd(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)i.push(Sd(t[r]).darken(20).toHexString());e[a]=i}return i}var Nf={calc:VF,crossTraceCalc:qF,makePullColorFn:d2,generateExtendedColors:h2},XF=Zr.appendArrayMultiPointValues,YF=function(e,r){var a={curveNumber:r.index,pointNumbers:e.pts,data:r._input,fullData:r,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return e.pts.length===1&&(a.pointNumber=a.i=e.pts[0]),XF(a,r,e.pts),r.type==="funnelarea"&&(delete a.v,delete a.i),a},Tr=tt.exports,WF=Ut.exports,zs=ua,p2=Je.exports,Fa=Tt.exports,vr=de.exports,ZF=vr.strScale,tb=vr.strTranslate,Ld=ir,m2=Ya,KF=m2.recordMinTextSize,QF=m2.clearMinTextSize,y2=jl.TEXTPAD,wt=sn,Is=YF,rb=de.exports.isValidTextValue;function JF(t,e){var r=t._fullLayout,a=r._size;QF("pie",r),x2(e,t),S2(e,a);var i=vr.makeTraceGroups(r._pielayer,e,"trace").each(function(n){var o=Tr.select(this),l=n[0],s=l.trace;s4(n),o.attr("stroke-linejoin","round"),o.each(function(){var f=Tr.select(this).selectAll("g.slice").data(n);f.enter().append("g").classed("slice",!0),f.exit().remove();var c=[[[],[]],[[],[]]],v=!1;f.each(function(w,m){if(w.hidden){Tr.select(this).selectAll("path,g").remove();return}w.pointNumber=w.i,w.curveNumber=s.index,c[w.pxmid[1]<0?0:1][w.pxmid[0]<0?0:1].push(w);var y=l.cx,x=l.cy,T=Tr.select(this),k=T.selectAll("path.surface").data([w]);if(k.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),T.call(g2,t,n),s.pull){var S=+wt.castOption(s.pull,w.pts)||0;S>0&&(y+=S*w.pxmid[0],x+=S*w.pxmid[1])}w.cxFinal=y,w.cyFinal=x;function A(R,L,D,z){var F=z*(L[0]-R[0]),H=z*(L[1]-R[1]);return"a"+z*l.r+","+z*l.r+" 0 "+w.largeArc+(D?" 1 ":" 0 ")+F+","+H}var $=s.hole;if(w.v===l.vTotal){var M="M"+(y+w.px0[0])+","+(x+w.px0[1])+A(w.px0,w.pxmid,!0,1)+A(w.pxmid,w.px0,!0,1)+"Z";$?k.attr("d","M"+(y+$*w.px0[0])+","+(x+$*w.px0[1])+A(w.px0,w.pxmid,!1,$)+A(w.pxmid,w.px0,!1,$)+"Z"+M):k.attr("d",M)}else{var C=A(w.px0,w.px1,!0,1);if($){var E=1-$;k.attr("d","M"+(y+$*w.px1[0])+","+(x+$*w.px1[1])+A(w.px1,w.px0,!1,$)+"l"+E*w.px0[0]+","+E*w.px0[1]+C+"Z")}else k.attr("d","M"+y+","+x+"l"+w.px0[0]+","+w.px0[1]+C+"Z")}L2(t,w,l);var I=wt.castOption(s.textposition,w.pts),P=T.selectAll("g.slicetext").data(w.text&&I!=="none"?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var R=vr.ensureSingle(Tr.select(this),"text","",function(X){X.attr("data-notex",1)}),L=vr.ensureUniformFontSize(t,I==="outside"?t4(s,w,r.font):b2(s,w,r.font));R.text(w.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Fa.font,L).call(Ld.convertToTspans,t);var D=Fa.bBox(R.node()),z;if(I==="outside")z=nb(D,w);else if(z=_2(D,w,l),I==="auto"&&z.scale<1){var F=vr.ensureUniformFontSize(t,s.outsidetextfont);R.call(Fa.font,F),D=Fa.bBox(R.node()),z=nb(D,w)}var H=z.textPosAngle,U=H===void 0?w.pxmid:af(l.r,H);if(z.targetX=y+U[0]*z.rCenter+(z.x||0),z.targetY=x+U[1]*z.rCenter+(z.y||0),C2(z,D),z.outside){var B=z.targetY;w.yLabelMin=B-D.height/2,w.yLabelMid=B,w.yLabelMax=B+D.height/2,w.labelExtraX=0,w.labelExtraY=0,v=!0}z.fontSize=L.size,KF(s.type,z,r),n[m].transform=z,R.attr("transform",vr.getTextTransform(z))})});var u=Tr.select(this).selectAll("g.titletext").data(s.title.text?[0]:[]);if(u.enter().append("g").classed("titletext",!0),u.exit().remove(),u.each(function(){var w=vr.ensureSingle(Tr.select(this),"text","",function(x){x.attr("data-notex",1)}),m=s.title.text;s._meta&&(m=vr.templateString(m,s._meta)),w.text(m).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Fa.font,s.title.font).call(Ld.convertToTspans,t);var y;s.title.position==="middle center"?y=i4(l):y=A2(l,a),w.attr("transform",tb(y.x,y.y)+ZF(Math.min(1,y.scale))+tb(y.tx,y.ty))}),v&&o4(c,s),e4(f,s),v&&s.automargin){var d=Fa.bBox(o.node()),h=s.domain,p=a.w*(h.x[1]-h.x[0]),g=a.h*(h.y[1]-h.y[0]),_=(.5*p-l.r)/a.w,b=(.5*g-l.r)/a.h;WF.autoMargin(t,"pie."+s.uid+".automargin",{xl:h.x[0]-_,xr:h.x[1]+_,yb:h.y[0]-b,yt:h.y[1]+b,l:Math.max(l.cx-l.r-d.left,0),r:Math.max(d.right-(l.cx+l.r),0),b:Math.max(d.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-d.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var n=Tr.select(this);n.attr("dy")&&n.attr("dy",n.attr("dy"))})},0)}function e4(t,e){t.each(function(r){var a=Tr.select(this);if(!r.labelExtraX&&!r.labelExtraY){a.select("path.textline").remove();return}var i=a.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,i.attr("transform",vr.getTextTransform(r.transform));var n=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],l="M"+n+","+o,s=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var f=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(f)>Math.abs(c)?l+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(n+r.labelExtraX+s):l+="l"+r.labelExtraX+","+f+"v"+(c-f)+"h"+s}else l+="V"+(r.yLabelMid+r.labelExtraY)+"h"+s;vr.ensureSingle(a,"path","textline").call(p2.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:l,fill:"none"})})}function g2(t,e,r){var a=r[0],i=a.cx,n=a.cy,o=a.trace,l=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),t.on("mouseover",function(s){var f=e._fullLayout,c=e._fullData[o.index];if(!(e._dragging||f.hovermode===!1)){var v=c.hoverinfo;if(Array.isArray(v)&&(v=zs.castHoverinfo({hoverinfo:[wt.castOption(v,s.pts)],_module:o._module},f,0)),v==="all"&&(v="label+text+value+percent+name"),c.hovertemplate||v!=="none"&&v!=="skip"&&v){var u=s.rInscribed||0,d=i+s.pxmid[0]*(1-u),h=n+s.pxmid[1]*(1-u),p=f.separators,g=[];if(v&&v.indexOf("label")!==-1&&g.push(s.label),s.text=wt.castOption(c.hovertext||c.text,s.pts),v&&v.indexOf("text")!==-1){var _=s.text;vr.isValidTextValue(_)&&g.push(_)}s.value=s.v,s.valueLabel=wt.formatPieValue(s.v,p),v&&v.indexOf("value")!==-1&&g.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=wt.formatPiePercent(s.percent,p),v&&v.indexOf("percent")!==-1&&g.push(s.percentLabel);var b=c.hoverlabel,w=b.font,m=[];zs.loneHover({trace:o,x0:d-u*a.r,x1:d+u*a.r,y:h,_x0:l?i+s.TL[0]:d-u*a.r,_x1:l?i+s.TR[0]:d+u*a.r,_y0:l?n+s.TL[1]:h-u*a.r,_y1:l?n+s.BL[1]:h+u*a.r,text:g.join("<br>"),name:c.hovertemplate||v.indexOf("name")!==-1?c.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:wt.castOption(b.bgcolor,s.pts)||s.color,borderColor:wt.castOption(b.bordercolor,s.pts),fontFamily:wt.castOption(w.family,s.pts),fontSize:wt.castOption(w.size,s.pts),fontColor:wt.castOption(w.color,s.pts),nameLength:wt.castOption(b.namelength,s.pts),textAlign:wt.castOption(b.align,s.pts),hovertemplate:wt.castOption(c.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[Is(s,c)]},{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:e,inOut_bbox:m}),s.bbox=m[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[Is(s,c)],event:Tr.event})}}),t.on("mouseout",function(s){var f=e._fullLayout,c=e._fullData[o.index],v=Tr.select(this).datum();o._hasHoverEvent&&(s.originalEvent=Tr.event,e.emit("plotly_unhover",{points:[Is(v,c)],event:Tr.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(zs.loneUnhover(f._hoverlayer.node()),o._hasHoverLabel=!1)}),t.on("click",function(s){var f=e._fullLayout,c=e._fullData[o.index];e._dragging||f.hovermode===!1||(e._hoverdata=[Is(s,c)],zs.click(e,Tr.event))})}function t4(t,e,r){var a=wt.castOption(t.outsidetextfont.color,e.pts)||wt.castOption(t.textfont.color,e.pts)||r.color,i=wt.castOption(t.outsidetextfont.family,e.pts)||wt.castOption(t.textfont.family,e.pts)||r.family,n=wt.castOption(t.outsidetextfont.size,e.pts)||wt.castOption(t.textfont.size,e.pts)||r.size;return{color:a,family:i,size:n}}function b2(t,e,r){var a=wt.castOption(t.insidetextfont.color,e.pts);!a&&t._input.textfont&&(a=wt.castOption(t._input.textfont.color,e.pts));var i=wt.castOption(t.insidetextfont.family,e.pts)||wt.castOption(t.textfont.family,e.pts)||r.family,n=wt.castOption(t.insidetextfont.size,e.pts)||wt.castOption(t.textfont.size,e.pts)||r.size;return{color:a||p2.contrast(e.color),family:i,size:n}}function x2(t,e){for(var r,a,i=0;i<t.length;i++)if(r=t[i][0],a=r.trace,a.title.text){var n=a.title.text;a._meta&&(n=vr.templateString(n,a._meta));var o=Fa.tester.append("text").attr("data-notex",1).text(n).call(Fa.font,a.title.font).call(Ld.convertToTspans,e),l=Fa.bBox(o.node(),!0);r.titleBox={width:l.width,height:l.height},o.remove()}}function _2(t,e,r){var a=r.r||e.rpx1,i=e.rInscribed,n=e.startangle===e.stopangle;if(n)return{rCenter:1-i,scale:0,rotate:0,textPosAngle:0};var o=e.ring,l=o===1&&Math.abs(e.startangle-e.stopangle)===Math.PI*2,s=e.halfangle,f=e.midangle,c=r.trace.insidetextorientation,v=c==="horizontal",u=c==="tangential",d=c==="radial",h=c==="auto",p=[],g;if(!h){var _=function(k,S){if(r4(e,k)){var A=Math.abs(k-e.startangle),$=Math.abs(k-e.stopangle),M=A<$?A:$;S==="tan"?g=ib(t,a,o,M,0):g=ab(t,a,o,M,Math.PI/2),g.textPosAngle=k,p.push(g)}},b;if(v||u){for(b=4;b>=-4;b-=2)_(Math.PI*b,"tan");for(b=4;b>=-4;b-=2)_(Math.PI*(b+1),"tan")}if(v||d){for(b=4;b>=-4;b-=2)_(Math.PI*(b+1.5),"rad");for(b=4;b>=-4;b-=2)_(Math.PI*(b+.5),"rad")}}if(l||h||v){var w=Math.sqrt(t.width*t.width+t.height*t.height);if(g={scale:i*a*2/w,rCenter:1-i,rotate:0},g.textPosAngle=(e.startangle+e.stopangle)/2,g.scale>=1)return g;p.push(g)}(h||d)&&(g=ab(t,a,o,s,f),g.textPosAngle=(e.startangle+e.stopangle)/2,p.push(g)),(h||u)&&(g=ib(t,a,o,s,f),g.textPosAngle=(e.startangle+e.stopangle)/2,p.push(g));for(var m=0,y=0,x=0;x<p.length;x++){var T=p[x].scale;if(y<T&&(y=T,m=x),!h&&y>=1)break}return p[m]}function r4(t,e){var r=t.startangle,a=t.stopangle;return r>e&&e>a||r<e&&e<a}function ab(t,e,r,a,i){e=Math.max(0,e-2*y2);var n=t.width/t.height,o=k2(n,a,e,r);return{scale:o*2/t.height,rCenter:w2(n,o/e),rotate:T2(i)}}function ib(t,e,r,a,i){e=Math.max(0,e-2*y2);var n=t.height/t.width,o=k2(n,a,e,r);return{scale:o*2/t.width,rCenter:w2(n,o/e),rotate:T2(i+Math.PI/2)}}function w2(t,e){return Math.cos(e)-t*e}function T2(t){return(180/Math.PI*t+720)%180-90}function k2(t,e,r,a){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),a/(Math.sqrt(t*t+a/2)+t))}function a4(t,e){return t.v===e.vTotal&&!e.trace.hole?1:Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2)}function nb(t,e){var r=e.pxmid[0],a=e.pxmid[1],i=t.width/2,n=t.height/2;return r<0&&(i*=-1),a<0&&(n*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(n)*(i>0?1:-1)/2,y:n/(1+r*r/(a*a)),outside:!0}}function i4(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}}function A2(t,e){var r=1,a=1,i,n=t.trace,o={x:t.cx,y:t.cy},l={tx:0,ty:0};l.ty+=n.title.font.size,i=M2(n),n.title.position.indexOf("top")!==-1?(o.y-=(1+i)*t.r,l.ty-=t.titleBox.height):n.title.position.indexOf("bottom")!==-1&&(o.y+=(1+i)*t.r);var s=n4(t.r,t.trace.aspectratio),f=e.w*(n.domain.x[1]-n.domain.x[0])/2;return n.title.position.indexOf("left")!==-1?(f=f+s,o.x-=(1+i)*s,l.tx+=t.titleBox.width/2):n.title.position.indexOf("center")!==-1?f*=2:n.title.position.indexOf("right")!==-1&&(f=f+s,o.x+=(1+i)*s,l.tx-=t.titleBox.width/2),r=f/t.titleBox.width,a=Cd(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,a),tx:l.tx,ty:l.ty}}function n4(t,e){return t/(e===void 0?1:e)}function Cd(t,e){var r=t.trace,a=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,a/2)}function M2(t){var e=t.pull;if(!e)return 0;var r;if(Array.isArray(e))for(e=0,r=0;r<t.pull.length;r++)t.pull[r]>e&&(e=t.pull[r]);return e}function o4(t,e){var r,a,i,n,o,l,s,f,c,v,u,d,h;function p(w,m){return w.pxmid[1]-m.pxmid[1]}function g(w,m){return m.pxmid[1]-w.pxmid[1]}function _(w,m){m||(m={});var y=m.labelExtraY+(a?m.yLabelMax:m.yLabelMin),x=a?w.yLabelMin:w.yLabelMax,T=a?w.yLabelMax:w.yLabelMin,k=w.cyFinal+o(w.px0[1],w.px1[1]),S=y-x,A,$,M,C,E,I;if(S*s>0&&(w.labelExtraY=S),!!Array.isArray(e.pull))for($=0;$<v.length;$++)M=v[$],!(M===w||(wt.castOption(e.pull,w.pts)||0)>=(wt.castOption(e.pull,M.pts)||0))&&((w.pxmid[1]-M.pxmid[1])*s>0?(C=M.cyFinal+o(M.px0[1],M.px1[1]),S=C-x-w.labelExtraY,S*s>0&&(w.labelExtraY+=S)):(T+w.labelExtraY-k)*s>0&&(A=3*l*Math.abs($-v.indexOf(w)),E=M.cxFinal+n(M.px0[0],M.px1[0]),I=E+A-(w.cxFinal+w.pxmid[0])-w.labelExtraX,I*l>0&&(w.labelExtraX+=I)))}for(a=0;a<2;a++)for(i=a?p:g,o=a?Math.max:Math.min,s=a?1:-1,r=0;r<2;r++){for(n=r?Math.max:Math.min,l=r?1:-1,f=t[a][r],f.sort(i),c=t[1-a][r],v=c.concat(f),d=[],u=0;u<f.length;u++)f[u].yLabelMid!==void 0&&d.push(f[u]);for(h=!1,u=0;a&&u<c.length;u++)if(c[u].yLabelMid!==void 0){h=c[u];break}for(u=0;u<d.length;u++){var b=u&&d[u-1];h&&!u&&(b=h),_(d[u],b)}}}function S2(t,e){for(var r=[],a=0;a<t.length;a++){var i=t[a][0],n=i.trace,o=n.domain,l=e.w*(o.x[1]-o.x[0]),s=e.h*(o.y[1]-o.y[0]);n.title.text&&n.title.position!=="middle center"&&(s-=Cd(i,e));var f=l/2,c=s/2;n.type==="funnelarea"&&!n.scalegroup&&(c/=n.aspectratio),i.r=Math.min(f,c)/(1+M2(n)),i.cx=e.l+e.w*(n.domain.x[1]+n.domain.x[0])/2,i.cy=e.t+e.h*(1-n.domain.y[0])-s/2,n.title.text&&n.title.position.indexOf("bottom")!==-1&&(i.cy-=Cd(i,e)),n.scalegroup&&r.indexOf(n.scalegroup)===-1&&r.push(n.scalegroup)}l4(t,r)}function l4(t,e){for(var r,a,i,n=0;n<e.length;n++){var o=1/0,l=e[n];for(a=0;a<t.length;a++)if(r=t[a][0],i=r.trace,i.scalegroup===l){var s;if(i.type==="pie")s=r.r*r.r;else if(i.type==="funnelarea"){var f,c;i.aspectratio>1?(f=r.r,c=f/i.aspectratio):(c=r.r,f=c*i.aspectratio),f*=(1+i.baseratio)/2,s=f*c}o=Math.min(o,s/r.vTotal)}for(a=0;a<t.length;a++)if(r=t[a][0],i=r.trace,i.scalegroup===l){var v=o*r.vTotal;i.type==="funnelarea"&&(v/=(1+i.baseratio)/2,v/=i.aspectratio),r.r=Math.sqrt(v)}}}function s4(t){var e=t[0],r=e.r,a=e.trace,i=wt.getRotationAngle(a.rotation),n=2*Math.PI/e.vTotal,o="px0",l="px1",s,f,c;if(a.direction==="counterclockwise"){for(s=0;s<t.length&&t[s].hidden;s++);if(s===t.length)return;i+=n*t[s].v,n*=-1,o="px1",l="px0"}for(c=af(r,i),s=0;s<t.length;s++)f=t[s],!f.hidden&&(f[o]=c,f.startangle=i,i+=n*f.v/2,f.pxmid=af(r,i),f.midangle=i,i+=n*f.v/2,c=af(r,i),f.stopangle=i,f[l]=c,f.largeArc=f.v>e.vTotal/2?1:0,f.halfangle=Math.PI*Math.min(f.v/e.vTotal,.5),f.ring=1-a.hole,f.rInscribed=a4(f,e))}function af(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function L2(t,e,r){var a=t._fullLayout,i=r.trace,n=i.texttemplate,o=i.textinfo;if(!n&&o&&o!=="none"){var l=o.split("+"),s=function(m){return l.indexOf(m)!==-1},f=s("label"),c=s("text"),v=s("value"),u=s("percent"),d=a.separators,h;if(h=f?[e.label]:[],c){var p=wt.getFirstFilled(i.text,e.pts);rb(p)&&h.push(p)}v&&h.push(wt.formatPieValue(e.v,d)),u&&h.push(wt.formatPiePercent(e.v/r.vTotal,d)),e.text=h.join("<br>")}function g(m){return{label:m.label,value:m.v,valueLabel:wt.formatPieValue(m.v,a.separators),percent:m.v/r.vTotal,percentLabel:wt.formatPiePercent(m.v/r.vTotal,a.separators),color:m.color,text:m.text,customdata:vr.castOption(i,m.i,"customdata")}}if(n){var _=vr.castOption(i,e.i,"texttemplate");if(!_)e.text="";else{var b=g(e),w=wt.getFirstFilled(i.text,e.pts);(rb(w)||w==="")&&(b.text=w),e.text=vr.texttemplateString(_,b,t._fullLayout._d3locale,b,i._meta||{})}}}function C2(t,e){var r=t.rotate*Math.PI/180,a=Math.cos(r),i=Math.sin(r),n=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=n*a-o*i,t.textY=n*i+o*a,t.noCenter=!0}var D2={plot:JF,formatSliceLabel:L2,transformInsideText:_2,determineInsideTextFont:b2,positionTitleOutside:A2,prerenderTitles:x2,layoutAreas:S2,attachFxHandlers:g2,computeTransform:C2},ob=tt.exports,f4=ph,c4=Ya.resizeText,u4=function(e){var r=e._fullLayout._pielayer.selectAll(".trace");c4(e,r,"pie"),r.each(function(a){var i=a[0],n=i.trace,o=ob.select(this);o.style({opacity:n.opacity}),o.selectAll("path.surface").each(function(l){ob.select(this).call(f4,l,n)})})},$2={};(function(t){var e=Ut.exports;t.name="pie",t.plot=function(r,a,i,n){e.plotBasePlot(t.name,r,a,i,n)},t.clean=function(r,a,i,n){e.cleanBasePlot(t.name,r,a,i,n)}})($2);var v4={attributes:Tc,supplyDefaults:FF.supplyDefaults,supplyLayoutDefaults:BF,layoutAttributes:v2,calc:Nf.calc,crossTraceCalc:Nf.crossTraceCalc,plot:D2.plot,style:u4,styleOne:ph,moduleType:"trace",name:"pie",basePlotModule:$2,categories:["pie-like","pie","showLegend"],meta:{description:["A data visualized by the sectors of the pie is set in `values`.","The sector labels are set in `labels`.","The sector colors are set in `marker.colors`"].join(" ")}};(function(t){t.exports=v4})(c2);const pH=pi(c2.exports);var E2={exports:{}},R2={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}},nf=de.exports.extendFlat,of=xo,lb=mo.axisHoverFormat,Dd=Ga.dash,d4=Uf,P2=R2,h4=P2.INCREASING.COLOR,p4=P2.DECREASING.COLOR,Ff=of.line;function sb(t){return{line:{color:nf({},Ff.color,{dflt:t}),width:Ff.width,dash:Dd,editType:"style"},editType:"style"}}var z2={xperiod:of.xperiod,xperiod0:of.xperiod0,xperiodalignment:of.xperiodalignment,xhoverformat:lb("x"),yhoverformat:lb("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the x coordinates.","If absent, linear coordinate will be generated."].join(" ")},open:{valType:"data_array",editType:"calc",description:"Sets the open values."},high:{valType:"data_array",editType:"calc",description:"Sets the high values."},low:{valType:"data_array",editType:"calc",description:"Sets the low values."},close:{valType:"data_array",editType:"calc",description:"Sets the close values."},line:{width:nf({},Ff.width,{description:[Ff.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:nf({},Dd,{description:[Dd.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:sb(h4),decreasing:sb(p4),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets hover text elements associated with each sample point.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to","this trace's sample points."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:"Same as `text`."},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc",description:["Sets the width of the open/close tick marks","relative to the *x* minimal interval."].join(" ")},hoverlabel:nf({},d4.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}})},m4=Ve,y4=de.exports,g4=function(e,r,a,i){var n=a("x"),o=a("open"),l=a("high"),s=a("low"),f=a("close");a("hoverlabel.split");var c=m4.getComponentMethod("calendars","handleTraceDefaults");if(c(e,r,["x"],i),!!(o&&l&&s&&f)){var v=Math.min(o.length,l.length,s.length,f.length);return n&&(v=Math.min(v,y4.minRowLength(n))),r._length=v,v}},b4=de.exports,x4=g4,_4=pc,w4=z2,T4=function(e,r,a,i){function n(l,s){return b4.coerce(e,r,w4,l,s)}var o=x4(e,r,n,i);if(!o){r.visible=!1;return}_4(e,r,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),fb(e,r,n,"increasing"),fb(e,r,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),i._requestRangeslider[r.xaxis]=!0};function fb(t,e,r,a){r(a+".line.color"),r(a+".line.width",e.line.width),r(a+".line.dash",e.line.dash)}var kc=de.exports,Ns=kc._,lf=Ct.exports,k4=mc,Uo=Ot.BADNUM;function A4(t,e){var r=lf.getFromId(t,e.xaxis),a=lf.getFromId(t,e.yaxis),i=S4(t,r,e),n=e._minDiff;e._minDiff=null;var o=e._origX;e._origX=null;var l=e._xcalc;e._xcalc=null;var s=I2(t,e,o,l,a,M4);return e._extremes[r._id]=lf.findExtremes(r,l,{vpad:n/2}),s.length?(kc.extendFlat(s[0].t,{wHover:n/2,tickLen:i}),s):[{t:{empty:!0}}]}function M4(t,e,r,a){return{o:t,h:e,l:r,c:a}}function I2(t,e,r,a,i,n){for(var o=i.makeCalcdata(e,"open"),l=i.makeCalcdata(e,"high"),s=i.makeCalcdata(e,"low"),f=i.makeCalcdata(e,"close"),c=Array.isArray(e.text),v=Array.isArray(e.hovertext),u=!0,d=null,h=!!e.xperiodalignment,p=[],g=0;g<a.length;g++){var _=a[g],b=o[g],w=l[g],m=s[g],y=f[g];if(_!==Uo&&b!==Uo&&w!==Uo&&m!==Uo&&y!==Uo){y===b?d!==null&&y!==d&&(u=y>d):u=y>b,d=y;var x=n(b,w,m,y);x.pos=_,x.yc=(b+y)/2,x.i=g,x.dir=u?"increasing":"decreasing",x.x=x.pos,x.y=[m,w],h&&(x.orig_p=r[g]),c&&(x.tx=e.text[g]),v&&(x.htx=e.hovertext[g]),p.push(x)}else p.push({pos:_,empty:!0})}return e._extremes[i._id]=lf.findExtremes(i,kc.concat(s,l),{padded:!0}),p.length&&(p[0].t={labels:{open:Ns(t,"open:")+" ",high:Ns(t,"high:")+" ",low:Ns(t,"low:")+" ",close:Ns(t,"close:")+" "}}),p}function S4(t,e,r){var a=r._minDiff;if(!a){var i=t._fullData,n=[];a=1/0;var o;for(o=0;o<i.length;o++){var l=i[o];if(l.type==="ohlc"&&l.visible===!0&&l.xaxis===e._id){n.push(l);var s=e.makeCalcdata(l,"x");l._origX=s;var f=k4(r,e,"x",s).vals;l._xcalc=f;var c=kc.distinctVals(f).minDiff;c&&isFinite(c)&&(a=Math.min(a,c))}}for(a===1/0&&(a=1),o=0;o<n.length;o++)n[o]._minDiff=a}return a*r.tickwidth}var L4={calc:A4,calcCommon:I2},C4=tt.exports,cb=de.exports,D4=function(e,r,a,i){var n=r.yaxis,o=r.xaxis,l=!!o.rangebreaks;cb.makeTraceGroups(i,a,"trace ohlc").each(function(s){var f=C4.select(this),c=s[0],v=c.t,u=c.trace;if(u.visible!==!0||v.empty){f.remove();return}var d=v.tickLen,h=f.selectAll("path").data(cb.identity);h.enter().append("path"),h.exit().remove(),h.attr("d",function(p){if(p.empty)return"M0,0Z";var g=o.c2p(p.pos-d,!0),_=o.c2p(p.pos+d,!0),b=l?(g+_)/2:o.c2p(p.pos,!0),w=n.c2p(p.o,!0),m=n.c2p(p.h,!0),y=n.c2p(p.l,!0),x=n.c2p(p.c,!0);return"M"+g+","+w+"H"+b+"M"+b+","+m+"V"+y+"M"+_+","+x+"H"+b})})},bv=tt.exports,$4=Tt.exports,E4=Je.exports,R4=function(e,r,a){var i=a||bv.select(e).selectAll("g.ohlclayer").selectAll("g.trace");i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var o=n[0].trace;bv.select(this).selectAll("path").each(function(l){if(!l.empty){var s=o[l.dir].line;bv.select(this).style("fill","none").call(E4.stroke,s.color).call($4.dashLine,s.dash,s.width).style("opacity",o.selectedpoints&&!l.selected?.3:1)}})})},$d=Ct.exports,P4=de.exports,Fs=ua,z4=Je.exports,I4=de.exports.fillText,ub=R2,N4={increasing:ub.INCREASING.SYMBOL,decreasing:ub.DECREASING.SYMBOL};function F4(t,e,r,a){var i=t.cd,n=i[0].trace;return n.hoverlabel.split?F2(t,e,r,a):H2(t,e,r,a)}function N2(t,e,r,a){var i=t.cd,n=t.xa,o=i[0].trace,l=i[0].t,s=o.type,f=s==="ohlc"?"l":"min",c=s==="ohlc"?"h":"max",v,u,d=l.bPos||0,h=function(A){return A.pos+d-e},p=l.bdPos||l.tickLen,g=l.wHover,_=Math.min(1,p/Math.abs(n.r2c(n.range[1])-n.r2c(n.range[0])));v=t.maxHoverDistance-_,u=t.maxSpikeDistance-_;function b(A){var $=h(A);return Fs.inbox($-g,$+g,v)}function w(A){var $=A[f],M=A[c];return $===M||Fs.inbox($-r,M-r,v)}function m(A){return(b(A)+w(A))/2}var y=Fs.getDistanceFunction(a,b,w,m);if(Fs.getClosest(i,y,t),t.index===!1)return null;var x=i[t.index];if(x.empty)return null;var T=x.dir,k=o[T],S=k.line.color;return z4.opacity(S)&&k.line.width?t.color=S:t.color=k.fillcolor,t.x0=n.c2p(x.pos+d-p,!0),t.x1=n.c2p(x.pos+d+p,!0),t.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,t.spikeDistance=m(x)*u/v,t.xSpike=n.c2p(x.pos,!0),t}function F2(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=[],f=N2(t,e,r,a);if(!f)return[];var c=f.index,v=i[c],u=v.hi||o.hoverinfo,d=u.split("+"),h=u==="all",p=h||d.indexOf("y")!==-1;if(!p)return[];for(var g=["high","open","close","low"],_={},b=0;b<g.length;b++){var w=g[b],m=o[w][f.index],y=n.c2p(m,!0),x;m in _?(x=_[m],x.yLabel+="<br>"+l.labels[w]+$d.hoverLabelText(n,m,o.yhoverformat)):(x=P4.extendFlat({},f),x.y0=x.y1=y,x.yLabelVal=m,x.yLabel=l.labels[w]+$d.hoverLabelText(n,m,o.yhoverformat),x.name="",s.push(x),_[m]=x)}return s}function H2(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=N2(t,e,r,a);if(!s)return[];var f=s.index,c=i[f],v=s.index=c.i,u=c.dir;function d(m){return l.labels[m]+$d.hoverLabelText(n,o[m][v],o.yhoverformat)}var h=c.hi||o.hoverinfo,p=h.split("+"),g=h==="all",_=g||p.indexOf("y")!==-1,b=g||p.indexOf("text")!==-1,w=_?[d("open"),d("high"),d("low"),d("close")+" "+N4[u]]:[];return b&&I4(c,o,w),s.extraText=w.join("<br>"),s.y0=s.y1=n.c2p(c.yc,!0),[s]}var H4={hoverPoints:F4,hoverSplit:F2,hoverOnPoints:H2},O4=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l,s=a[0].t.bPos||0;if(r===!1)for(l=0;l<a.length;l++)a[l].selected=0;else for(l=0;l<a.length;l++){var f=a[l];r.contains([i.c2p(f.pos+s),n.c2p(f.yc)],null,f.i,e)?(o.push({pointNumber:f.i,x:i.c2d(f.pos),y:n.c2d(f.yc)}),f.selected=1):f.selected=0}return o},B4={moduleType:"trace",name:"ohlc",basePlotModule:Yt,categories:["cartesian","svg","showLegend"],meta:{description:["The ohlc (short for Open-High-Low-Close) is a style of financial chart describing","open, high, low and close for a given `x` coordinate (most likely time).","The tip of the lines represent the `low` and `high` values and","the horizontal segments represent the `open` and `close` values.","Sample points where the close value is higher (lower) then the open","value are called increasing (decreasing).","By default, increasing items are drawn in green whereas","decreasing are drawn in red."].join(" ")},attributes:z2,supplyDefaults:T4,calc:L4.calc,plot:D4,style:R4,hoverPoints:H4.hoverPoints,selectPoints:O4};(function(t){t.exports=B4})(E2);const mH=pi(E2.exports);var O2={exports:{}},j4=Ve,wa=de.exports,G4=Ew;function U4(t,e,r,a){var i=t.cd,n=i[0].t,o=i[0].trace,l=t.xa,s=t.ya,f=n.x,c=n.y,v=l.c2p(e),u=s.c2p(r),d=t.distance,h;if(n.tree){var p=l.p2c(v-d),g=l.p2c(v+d),_=s.p2c(u-d),b=s.p2c(u+d);a==="x"?h=n.tree.range(Math.min(p,g),Math.min(s._rl[0],s._rl[1]),Math.max(p,g),Math.max(s._rl[0],s._rl[1])):h=n.tree.range(Math.min(p,g),Math.min(_,b),Math.max(p,g),Math.max(_,b))}else h=n.ids;var w,m,y,x,T,k,S,A,$,M=d;if(a==="x"){var C=!!o.xperiodalignment,E=!!o.yperiodalignment;for(T=0;T<h.length;T++){if(w=h[T],y=f[w],k=Math.abs(l.c2p(y)-v),C){var I=l.c2p(o._xStarts[w]),P=l.c2p(o._xEnds[w]);k=v>=Math.min(I,P)&&v<=Math.max(I,P)?0:1/0}if(k<M){if(M=k,x=c[w],S=s.c2p(x)-u,E){var R=s.c2p(o._yStarts[w]),L=s.c2p(o._yEnds[w]);S=u>=Math.min(R,L)&&u<=Math.max(R,L)?0:1/0}$=Math.sqrt(k*k+S*S),m=h[T]}}}else for(T=h.length-1;T>-1;T--)w=h[T],y=f[w],x=c[w],k=l.c2p(y)-v,S=s.c2p(x)-u,A=Math.sqrt(k*k+S*S),A<M&&(M=$=A,m=w);return t.index=m,t.distance=M,t.dxy=$,m===void 0?[t]:[B2(t,f,c,o)]}function B2(t,e,r,a){var i=t.xa,n=t.ya,o=t.distance,l=t.dxy,s=t.index,f={pointNumber:s,x:e[s],y:r[s]};f.tx=Array.isArray(a.text)?a.text[s]:a.text,f.htx=Array.isArray(a.hovertext)?a.hovertext[s]:a.hovertext,f.data=Array.isArray(a.customdata)?a.customdata[s]:a.customdata,f.tp=Array.isArray(a.textposition)?a.textposition[s]:a.textposition;var c=a.textfont;c&&(f.ts=wa.isArrayOrTypedArray(c.size)?c.size[s]:c.size,f.tc=Array.isArray(c.color)?c.color[s]:c.color,f.tf=Array.isArray(c.family)?c.family[s]:c.family);var v=a.marker;v&&(f.ms=wa.isArrayOrTypedArray(v.size)?v.size[s]:v.size,f.mo=wa.isArrayOrTypedArray(v.opacity)?v.opacity[s]:v.opacity,f.mx=wa.isArrayOrTypedArray(v.symbol)?v.symbol[s]:v.symbol,f.mc=wa.isArrayOrTypedArray(v.color)?v.color[s]:v.color);var u=v&&v.line;u&&(f.mlc=Array.isArray(u.color)?u.color[s]:u.color,f.mlw=wa.isArrayOrTypedArray(u.width)?u.width[s]:u.width);var d=v&&v.gradient;d&&d.type!=="none"&&(f.mgt=Array.isArray(d.type)?d.type[s]:d.type,f.mgc=Array.isArray(d.color)?d.color[s]:d.color);var h=i.c2p(f.x,!0),p=n.c2p(f.y,!0),g=f.mrc||1,_=a.hoverlabel;_&&(f.hbg=Array.isArray(_.bgcolor)?_.bgcolor[s]:_.bgcolor,f.hbc=Array.isArray(_.bordercolor)?_.bordercolor[s]:_.bordercolor,f.hts=wa.isArrayOrTypedArray(_.font.size)?_.font.size[s]:_.font.size,f.htc=Array.isArray(_.font.color)?_.font.color[s]:_.font.color,f.htf=Array.isArray(_.font.family)?_.font.family[s]:_.font.family,f.hnl=wa.isArrayOrTypedArray(_.namelength)?_.namelength[s]:_.namelength);var b=a.hoverinfo;b&&(f.hi=Array.isArray(b)?b[s]:b);var w=a.hovertemplate;w&&(f.ht=Array.isArray(w)?w[s]:w);var m={};m[t.index]=f;var y=a._origX,x=a._origY,T=wa.extendFlat({},t,{color:G4(a,f),x0:h-g,x1:h+g,xLabelVal:y?y[s]:f.x,y0:p-g,y1:p+g,yLabelVal:x?x[s]:f.y,cd:m,distance:o,spikeDistance:l,hovertemplate:f.ht});return f.htx?T.text=f.htx:f.tx?T.text=f.tx:a.text&&(T.text=a.text),wa.fillText(f,a,T),j4.getComponentMethod("errorbars","hoverInfo")(f,a,T),T}var V4={hoverPoints:U4,calcHover:B2},pp={exports:{}},vb=20,Ac={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:vb,SYMBOL_STROKE:vb/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}},q4=La,Pt=xo,db=mo.axisHoverFormat,hb=ln,X4=Yd,xv=Bt.extendFlat,Y4=gi.overrideAll,W4=Ac.DASHES,pb=Pt.line,ni=Pt.marker,Z4=ni.line,Un=pp.exports=Y4({x:Pt.x,x0:Pt.x0,dx:Pt.dx,y:Pt.y,y0:Pt.y0,dy:Pt.dy,xperiod:Pt.xperiod,yperiod:Pt.yperiod,xperiod0:Pt.xperiod0,yperiod0:Pt.yperiod0,xperiodalignment:Pt.xperiodalignment,yperiodalignment:Pt.yperiodalignment,xhoverformat:db("x"),yhoverformat:db("y"),text:Pt.text,hovertext:Pt.hovertext,textposition:Pt.textposition,textfont:Pt.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:pb.color,width:pb.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","The values correspond to step-wise line shapes."].join(" ")},dash:{valType:"enumerated",values:X4(W4),dflt:"solid",description:"Sets the style of the lines."}},marker:xv({},hb("marker"),{symbol:ni.symbol,size:ni.size,sizeref:ni.sizeref,sizemin:ni.sizemin,sizemode:ni.sizemode,opacity:ni.opacity,colorbar:ni.colorbar,line:xv({},hb("marker.line"),{width:Z4.width})}),connectgaps:Pt.connectgaps,fill:xv({},Pt.fill,{dflt:"none"}),fillcolor:Pt.fillcolor,selected:{marker:Pt.selected.marker,textfont:Pt.selected.textfont},unselected:{marker:Pt.unselected.marker,textfont:Pt.unselected.textfont},opacity:q4.opacity},"calc","nested");Un.x.editType=Un.y.editType=Un.x0.editType=Un.y0.editType="calc+clearAxisTypes";Un.hovertemplate=Pt.hovertemplate;Un.texttemplate=Pt.texttemplate;var Mc={},j2=Ac;Mc.isOpenSymbol=function(t){return typeof t=="string"?j2.OPEN_RE.test(t):t%200>100};Mc.isDotSymbol=function(t){return typeof t=="string"?j2.DOT_RE.test(t):t>200};var mb=de.exports,K4=Ve,Q4=Mc,J4=pp.exports,e6=hc,Hs=mr,t6=Uh,r6=pc,a6=hw,i6=pw,n6=yw,o6=mw,l6=function(e,r,a,i){function n(d,h){return mb.coerce(e,r,J4,d,h)}var o=e.marker?Q4.isOpenSymbol(e.marker.symbol):!1,l=Hs.isBubble(e),s=t6(e,r,i,n);if(!s){r.visible=!1;return}r6(e,r,i,n),n("xhoverformat"),n("yhoverformat");var f=s<e6.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("hovertemplate"),n("mode",f),Hs.hasLines(r)&&(n("connectgaps"),i6(e,r,a,i,n),n("line.shape")),Hs.hasMarkers(r)&&(a6(e,r,a,i,n),n("marker.line.width",o||l?1:0)),Hs.hasText(r)&&(n("texttemplate"),o6(e,r,i,n));var c=(r.line||{}).color,v=(r.marker||{}).color;n("fill"),r.fill!=="none"&&n6(e,r,a,n);var u=K4.getComponentMethod("errorbars","supplyDefaults");u(e,r,c||v||a,{axis:"y"}),u(e,r,c||v||a,{axis:"x",inherit:"y"}),mb.coerceSelectionMarkerOpacity(r,n)},s6=$w,f6=function(e,r,a){var i=e.i;return"x"in e||(e.x=r._x[i]),"y"in e||(e.y=r._y[i]),s6(e,r,a)},G2=lt,c6=Wr.exports,Hf=nx,Of=Kn,u6=hr.defaultLine,yb=Sr.isArrayOrTypedArray,Ed=Hf(u6),U2=1;function gb(t,e){var r=t;return r[3]*=e,r}function bb(t){if(G2(t))return Ed;var e=Hf(t);return e.length?e:Ed}function xb(t){return G2(t)?t:U2}function v6(t,e,r){var a=t.color,i=yb(a),n=yb(e),o=Of.extractOpts(t),l=[],s,f,c,v,u;if(o.colorscale!==void 0?s=Of.makeColorScaleFuncFromTrace(t):s=bb,i?f=function(h,p){return h[p]===void 0?Ed:Hf(s(h[p]))}:f=bb,n?c=function(h,p){return h[p]===void 0?U2:xb(h[p])}:c=xb,i||n)for(var d=0;d<r;d++)v=f(a,d),u=c(e,d),l[d]=gb(v,u);else l=gb(Hf(a),e);return l}function d6(t){var e=Of.extractOpts(t),r=e.colorscale;return e.reversescale&&(r=Of.flipScale(e.colorscale)),r.map(function(a){var i=a[0],n=c6(a[1]),o=n.toRgb();return{index:i,rgb:[o.r,o.g,o.b,o.a]}})}var h6={formatColor:v6,parseColorScale:d6},sf=lt,p6=mk,Os=nx,m6=Ve,Er=de.exports,Jo=Tt.exports,_b=Vt,wb=h6.formatColor,Wn=mr,y6=M1,Rd=Mc,Vl=Ac,g6=Dl.DESELECTDIM,Tb={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},b6=Zr.appendArrayPointValue;function x6(t,e){var r,a={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=t._context.plotGlPixelRatio;if(e.visible!==!0)return a;if(Wn.hasText(e)&&(a.text=V2(t,e),a.textSel=kb(t,e,e.selected),a.textUnsel=kb(t,e,e.unselected)),Wn.hasMarkers(e)&&(a.marker=mp(e),a.markerSel=Pd(e,e.selected),a.markerUnsel=Pd(e,e.unselected),!e.unselected&&Er.isArrayOrTypedArray(e.marker.opacity))){var n=e.marker.opacity;for(a.markerUnsel.opacity=new Array(n.length),r=0;r<n.length;r++)a.markerUnsel.opacity[r]=g6*n[r]}if(Wn.hasLines(e)){a.line={overlay:!0,thickness:e.line.width*i,color:e.line.color,opacity:e.opacity};var o=(Vl.DASHES[e.line.dash]||[1]).slice();for(r=0;r<o.length;++r)o[r]*=e.line.width*i;a.line.dashes=o}return e.error_x&&e.error_x.visible&&(a.errorX=Ab(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(a.errorY=Ab(e,e.error_y,i)),!!e.fill&&e.fill!=="none"&&(a.fill={closed:!0,fill:e.fillcolor,thickness:0}),a}function V2(t,e){var r=t._fullLayout,a=e._length,i=e.textfont,n=e.textposition,o=Array.isArray(n)?n:[n],l=i.color,s=i.size,f=i.family,c={},v,u=t._context.plotGlPixelRatio,d=e.texttemplate;if(d){c.text=[];var h=r._d3locale,p=Array.isArray(d),g=p?Math.min(d.length,a):a,_=p?function(k){return d[k]}:function(){return d};for(v=0;v<g;v++){var b={i:v},w=e._module.formatLabels(b,e,r),m={};b6(m,e,v);var y=e._meta||{};c.text.push(Er.texttemplateString(_(v),w,h,m,b,y))}}else Array.isArray(e.text)&&e.text.length<a?c.text=e.text.slice():c.text=e.text;if(Array.isArray(c.text))for(v=c.text.length;v<a;v++)c.text[v]="";for(c.opacity=e.opacity,c.font={},c.align=[],c.baseline=[],v=0;v<o.length;v++){var x=o[v].split(/\s+/);switch(x[1]){case"left":c.align.push("right");break;case"right":c.align.push("left");break;default:c.align.push(x[1])}switch(x[0]){case"top":c.baseline.push("bottom");break;case"bottom":c.baseline.push("top");break;default:c.baseline.push(x[0])}}if(Array.isArray(l))for(c.color=new Array(a),v=0;v<a;v++)c.color[v]=l[v];else c.color=l;if(Er.isArrayOrTypedArray(s)||Array.isArray(f))for(c.font=new Array(a),v=0;v<a;v++){var T=c.font[v]={};T.size=(Er.isTypedArray(s)?s[v]:Array.isArray(s)?sf(s[v])?s[v]:0:s)*u,T.family=Array.isArray(f)?f[v]:f}else c.font={size:s*u,family:f};return c}function mp(t){var e=t._length,r=t.marker,a={},i,n=Er.isArrayOrTypedArray(r.symbol),o=Er.isArrayOrTypedArray(r.color),l=Er.isArrayOrTypedArray(r.line.color),s=Er.isArrayOrTypedArray(r.opacity),f=Er.isArrayOrTypedArray(r.size),c=Er.isArrayOrTypedArray(r.line.width),v;if(n||(v=Rd.isOpenSymbol(r.symbol)),n||o||l||s){a.colors=new Array(e),a.borderColors=new Array(e);var u=wb(r,r.opacity,e),d=wb(r.line,r.opacity,e);if(!Array.isArray(d[0])){var h=d;for(d=Array(e),i=0;i<e;i++)d[i]=h}if(!Array.isArray(u[0])){var p=u;for(u=Array(e),i=0;i<e;i++)u[i]=p}for(a.colors=u,a.borderColors=d,i=0;i<e;i++){if(n){var g=r.symbol[i];v=Rd.isOpenSymbol(g)}v&&(d[i]=u[i].slice(),u[i]=u[i].slice(),u[i][3]=0)}a.opacity=t.opacity}else v?(a.color=Os(r.color,"uint8"),a.color[3]=0,a.borderColor=Os(r.color,"uint8")):(a.color=Os(r.color,"uint8"),a.borderColor=Os(r.line.color,"uint8")),a.opacity=t.opacity*r.opacity;if(n)for(a.markers=new Array(e),i=0;i<e;i++)a.markers[i]=Lb(r.symbol[i]);else a.marker=Lb(r.symbol);var _=1,b=y6(t,_),w;if(f||c){var m=a.sizes=new Array(e),y=a.borderSizes=new Array(e),x=0,T;if(f){for(i=0;i<e;i++)m[i]=b(r.size[i]),x+=m[i];T=x/e}else for(w=b(r.size),i=0;i<e;i++)m[i]=w;if(c)for(i=0;i<e;i++)y[i]=r.line.width[i];else for(w=r.line.width,i=0;i<e;i++)y[i]=w;a.sizeAvg=T}else a.size=b(r&&r.size||10),a.borderSizes=b(r.line.width);return a}function Pd(t,e){var r=t.marker,a={};return e&&(e.marker&&e.marker.symbol?a=mp(Er.extendFlat({},r,e.marker)):e.marker&&(e.marker.size&&(a.size=e.marker.size),e.marker.color&&(a.colors=e.marker.color),e.marker.opacity!==void 0&&(a.opacity=e.marker.opacity))),a}function kb(t,e,r){var a={};if(!r)return a;if(r.textfont){var i={opacity:1,text:e.text,texttemplate:e.texttemplate,textposition:e.textposition,textfont:Er.extendFlat({},e.textfont)};r.textfont&&Er.extendFlat(i.textfont,r.textfont),a=V2(t,i)}return a}function Ab(t,e,r){var a={capSize:e.width*2*r,lineWidth:e.thickness*r,color:e.color};return e.copy_ystyle&&(a=t.error_y),a}var Mb=Vl.SYMBOL_SDF_SIZE,Fi=Vl.SYMBOL_SIZE,Sb=Vl.SYMBOL_STROKE,_v={},_6=Jo.symbolFuncs[0](Fi*.05);function Lb(t){if(t==="circle")return null;var e,r,a=Jo.symbolNumber(t),i=Jo.symbolFuncs[a%100],n=!!Jo.symbolNoDot[a%100],o=!!Jo.symbolNoFill[a%100],l=Rd.isDotSymbol(t);return _v[t]?_v[t]:(l&&!n?e=i(Fi*1.1)+_6:e=i(Fi),r=p6(e,{w:Mb,h:Mb,viewBox:[-Fi,-Fi,Fi,Fi],stroke:o?Sb:-Sb}),_v[t]=r,r||null)}function w6(t,e,r){var a=r.length,i=a/2,n,o;if(Wn.hasLines(e)&&i)if(e.line.shape==="hv"){for(n=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?n.push(r[o*2+2],r[o*2+1]):n.push(NaN,NaN));n.push(r[a-2],r[a-1])}else if(e.line.shape==="hvh"){for(n=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?n.push(r[o*2],r[o*2+1]):n.push(NaN,NaN),n.push(NaN,NaN);else{var l=(r[o*2]+r[o*2+2])/2;n.push(r[o*2],r[o*2+1],l,r[o*2+1],l,r[o*2+3])}n.push(r[a-2],r[a-1])}else if(e.line.shape==="vhv"){for(n=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?n.push(r[o*2],r[o*2+1]):n.push(NaN,NaN),n.push(NaN,NaN);else{var s=(r[o*2+1]+r[o*2+3])/2;n.push(r[o*2],r[o*2+1],r[o*2],s,r[o*2+2],s)}n.push(r[a-2],r[a-1])}else if(e.line.shape==="vh"){for(n=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?n.push(r[o*2],r[o*2+3]):n.push(NaN,NaN));n.push(r[a-2],r[a-1])}else n=r;var f=!1;for(o=0;o<n.length;o++)if(isNaN(n[o])){f=!0;break}var c=f||n.length>Vl.TOO_MANY_POINTS||Wn.hasMarkers(e)?"rect":"round";if(f&&e.connectgaps){var v=n[0],u=n[1];for(o=0;o<n.length;o+=2)isNaN(n[o])||isNaN(n[o+1])?(n[o]=v,n[o+1]=u):(v=n[o],u=n[o+1])}return{join:c,positions:n}}function T6(t,e,r,a,i){var n=m6.getComponentMethod("errorbars","makeComputeError"),o=_b.getFromId(t,e.xaxis),l=_b.getFromId(t,e.yaxis),s=r.length/2,f={};function c(v,u){var d=u._id.charAt(0),h=e["error_"+d];if(h&&h.visible&&(u.type==="linear"||u.type==="log")){for(var p=n(h),g={x:0,y:1}[d],_={x:[0,1,2,3],y:[2,3,0,1]}[d],b=new Float64Array(4*s),w=1/0,m=-1/0,y=0,x=0;y<s;y++,x+=4){var T=v[y];if(sf(T)){var k=r[y*2+g],S=p(T,y),A=S[0],$=S[1];if(sf(A)&&sf($)){var M=T-A,C=T+$;b[x+_[0]]=k-u.c2l(M),b[x+_[1]]=u.c2l(C)-k,b[x+_[2]]=0,b[x+_[3]]=0,w=Math.min(w,T-A),m=Math.max(m,T+$)}}}f[d]={positions:r,errors:b,_bnds:[w,m]}}}return c(a,o),c(i,l),f}function k6(t,e,r,a){var i=e._length,n={},o;if(Wn.hasMarkers(e)){var l=r.font,s=r.align,f=r.baseline;for(n.offset=new Array(i),o=0;o<i;o++){var c=a.sizes?a.sizes[o]:a.size,v=Array.isArray(l)?l[o].size:l.size,u=Array.isArray(s)?s.length>1?s[o]:s[0]:s,d=Array.isArray(f)?f.length>1?f[o]:f[0]:f,h=Tb[u],p=Tb[d],g=c?c/.8+1:0,_=-p*g-p*.5;n.offset[o]=[h*g/v,_/v]}}return n}var A6={style:x6,markerStyle:mp,markerSelection:Pd,linePositions:w6,errorBarPositions:T6,textPosition:k6},Bs=de.exports,M6=function(e,r){var a=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},n={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(a=r._scene={},a.init=function(){Bs.extendFlat(a,n,i)},a.init(),a.update=function(l){var s=Bs.repeat(l,a.count);if(a.fill2d&&a.fill2d.update(s),a.scatter2d&&a.scatter2d.update(s),a.line2d&&a.line2d.update(s),a.error2d&&a.error2d.update(s.concat(s)),a.select2d&&a.select2d.update(s),a.glText)for(var f=0;f<a.count;f++)a.glText[f].update(l)},a.draw=function(){for(var l=a.count,s=a.fill2d,f=a.error2d,c=a.line2d,v=a.scatter2d,u=a.glText,d=a.select2d,h=a.selectBatch,p=a.unselectBatch,g=0;g<l;g++){if(s&&a.fillOrder[g]&&s.draw(a.fillOrder[g]),c&&a.lineOptions[g]&&c.draw(g),f&&(a.errorXOptions[g]&&f.draw(g),a.errorYOptions[g]&&f.draw(g+l)),v&&a.markerOptions[g])if(p[g].length){var _=Bs.repeat([],a.count);_[g]=p[g],v.draw(_)}else h[g].length||v.draw(g);u[g]&&a.textOptions[g]&&u[g].render()}d&&d.draw(h),a.dirty=!1},a.destroy=function(){a.fill2d&&a.fill2d.destroy&&a.fill2d.destroy(),a.scatter2d&&a.scatter2d.destroy&&a.scatter2d.destroy(),a.error2d&&a.error2d.destroy&&a.error2d.destroy(),a.line2d&&a.line2d.destroy&&a.line2d.destroy(),a.select2d&&a.select2d.destroy&&a.select2d.destroy(),a.glText&&a.glText.forEach(function(l){l.destroy&&l.destroy()}),a.lineOptions=null,a.fillOptions=null,a.markerOptions=null,a.markerSelectedOptions=null,a.markerUnselectedOptions=null,a.errorXOptions=null,a.errorYOptions=null,a.textOptions=null,a.textSelectedOptions=null,a.textUnselectedOptions=null,a.selectBatch=null,a.unselectBatch=null,r._scene=null}),a.dirty||Bs.extendFlat(a,i),a},S6=yk.exports,$n=de.exports,Cb=Vt,L6=Il.findExtremes,Db=mc,yp=qh,C6=yp.calcMarkerSize,D6=yp.calcAxisExpansion,$6=yp.setFirstScatter,E6=xw,En=A6,R6=M6,$b=Ot.BADNUM,P6=Ac.TOO_MANY_POINTS,z6=function(e,r){var a=e._fullLayout,i=Cb.getFromId(e,r.xaxis),n=Cb.getFromId(e,r.yaxis),o=a._plots[r.xaxis+r.yaxis],l=r._length,s=l>=P6,f=l*2,c={},v,u=i.makeCalcdata(r,"x"),d=n.makeCalcdata(r,"y"),h=Db(r,i,"x",u),p=Db(r,n,"y",d),g=h.vals,_=p.vals;r._x=g,r._y=_,r.xperiodalignment&&(r._origX=u,r._xStarts=h.starts,r._xEnds=h.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=p.starts,r._yEnds=p.ends);var b=new Array(f),w=new Array(l);for(v=0;v<l;v++)b[v*2]=g[v]===$b?NaN:g[v],b[v*2+1]=_[v]===$b?NaN:_[v],w[v]=v;if(i.type==="log")for(v=0;v<f;v+=2)b[v]=i.c2l(b[v]);if(n.type==="log")for(v=1;v<f;v+=2)b[v]=n.c2l(b[v]);s&&i.type!=="log"&&n.type!=="log"?c.tree=S6(b):c.ids=w,E6(e,r);var m=I6(e,o,r,b,g,_),y=R6(e,o);$6(a,r);var x;return s?m.marker&&(x=m.marker.sizeAvg||Math.max(m.marker.size,3)):x=C6(r,l),D6(e,r,i,n,g,_,x),m.errorX&&Eb(r,i,m.errorX),m.errorY&&Eb(r,n,m.errorY),m.fill&&!y.fill2d&&(y.fill2d=!0),m.marker&&!y.scatter2d&&(y.scatter2d=!0),m.line&&!y.line2d&&(y.line2d=!0),(m.errorX||m.errorY)&&!y.error2d&&(y.error2d=!0),m.text&&!y.glText&&(y.glText=!0),m.marker&&(m.marker.snap=l),y.lineOptions.push(m.line),y.errorXOptions.push(m.errorX),y.errorYOptions.push(m.errorY),y.fillOptions.push(m.fill),y.markerOptions.push(m.marker),y.markerSelectedOptions.push(m.markerSel),y.markerUnselectedOptions.push(m.markerUnsel),y.textOptions.push(m.text),y.textSelectedOptions.push(m.textSel),y.textUnselectedOptions.push(m.textUnsel),y.selectBatch.push([]),y.unselectBatch.push([]),c._scene=y,c.index=y.count,c.x=g,c.y=_,c.positions=b,y.count++,[{x:!1,y:!1,t:c,trace:r}]};function Eb(t,e,r){var a=t._extremes[e._id],i=L6(e,r._bnds,{padded:!0});a.min=a.min.concat(i.min),a.max=a.max.concat(i.max)}function I6(t,e,r,a,i,n){var o=En.style(t,r);if(o.marker&&(o.marker.positions=a),o.line&&a.length>1&&$n.extendFlat(o.line,En.linePositions(t,r,a)),o.errorX||o.errorY){var l=En.errorBarPositions(t,r,a,i,n);o.errorX&&$n.extendFlat(o.errorX,l.x),o.errorY&&$n.extendFlat(o.errorY,l.y)}return o.text&&($n.extendFlat(o.text,{positions:a},En.textPosition(t,r,o.text,o.marker)),$n.extendFlat(o.textSel,{positions:a},En.textPosition(t,r,o.text,o.markerSel)),$n.extendFlat(o.textUnsel,{positions:a},En.textPosition(t,r,o.text,o.markerUnsel))),o}var N6=de.exports,F6=Je.exports,H6=Dl.DESELECTDIM;function O6(t){var e=t[0],r=e.trace,a=e.t,i=a._scene,n=a.index,o=i.selectBatch[n],l=i.unselectBatch[n],s=i.textOptions[n],f=i.textSelectedOptions[n]||{},c=i.textUnselectedOptions[n]||{},v=N6.extendFlat({},s),u,d;if(o.length||l.length){var h=f.color,p=c.color,g=s.color,_=Array.isArray(g);for(v.color=new Array(r._length),u=0;u<o.length;u++)d=o[u],v.color[d]=h||(_?g[d]:g);for(u=0;u<l.length;u++){d=l[u];var b=_?g[d]:g;v.color[d]=p||(h?b:F6.addOpacity(b,H6))}}i.glText[n].update(v)}var q2={styleTextSelection:O6},Rb=mr,B6=q2.styleTextSelection,j6=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s=a[0].t,f=l._length,c=s.x,v=s.y,u=s._scene,d=s.index;if(!u)return o;var h=Rb.hasText(l),p=Rb.hasMarkers(l),g=!p&&!h;if(l.visible!==!0||g)return o;var _=[],b=[];if(r!==!1&&!r.degenerate)for(var w=0;w<f;w++)r.contains([s.xpx[w],s.ypx[w]],!1,w,e)?(_.push(w),o.push({pointNumber:w,x:i.c2d(c[w]),y:n.c2d(v[w])})):b.push(w);if(p){var m=u.scatter2d;if(!_.length&&!b.length){var y=new Array(u.count);y[d]=u.markerOptions[d],m.update.apply(m,y)}else if(!u.selectBatch[d].length&&!u.unselectBatch[d].length){var x=new Array(u.count);x[d]=u.markerUnselectedOptions[d],m.update.apply(m,x)}}return u.selectBatch[d]=_,u.unselectBatch[d]=b,h&&B6(a),o},G6=V4,U6={moduleType:"trace",name:"scattergl",basePlotModule:Yt,categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:pp.exports,supplyDefaults:l6,crossTraceDefaults:gw,colorbar:Ol,formatLabels:f6,calc:z6,hoverPoints:G6.hoverPoints,selectPoints:j6,meta:{hrName:"scatter_gl",description:["The data visualized as scatter point or lines is set in `x` and `y`","using the WebGL plotting engine.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to a numerical arrays."].join(" ")}},X2={exports:{}},Pb=Je.exports,V6=function(){},q6=function(e){for(var r in e)typeof e[r]=="function"&&(e[r]=V6);e.destroy=function(){e.container.parentNode.removeChild(e.container)};var a=document.createElement("div");a.className="no-webgl",a.style.cursor="pointer",a.style.fontSize="24px",a.style.color=Pb.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=Pb.lightLine,a.style["z-index"]=30;var i=document.createElement("p");return i.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",i.style.position="relative",i.style.top="50%",i.style.left="50%",i.style.height="30%",i.style.width="50%",i.style.margin="-15% 0 0 -25%",a.appendChild(i),e.container.appendChild(a),e.container.style.background="#FFFFFF",e.container.onclick=function(){window.open("https://get.webgl.org")},!1},X6=q6,Y6=gk.exports,W6=function(e,r,a){var i=e._fullLayout,n=!0;return i._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(a);return}if(!(o.pick&&!i._has("parcoords"))){try{o.regl=Y6({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||Ak.devicePixelRatio,extensions:r||[],cachedCode:a||{}})}catch{n=!1}o.regl||(n=!1),n&&this.addEventListener("webglcontextlost",function(l){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:l,layer:o.key})},!1)}}),n||X6({container:i._glcontainer.node()}),n},zb=bk,Ib=xk,Z6=_k,Nb=wk,wv=de.exports,K6=go.selectMode,Q6=W6,J6=mr,e8=Cw,t8=q2.styleTextSelection,Y2={};function r8(t,e,r,a){var i=t._size,n=t.width*a,o=t.height*a,l=i.l*a,s=i.b*a,f=i.r*a,c=i.t*a,v=i.w*a,u=i.h*a;return[l+e.domain[0]*v,s+r.domain[0]*u,n-f-(1-e.domain[1])*v,o-c-(1-r.domain[1])*u]}var a8=X2.exports=function(e,r,a){if(!!a.length){var i=e._fullLayout,n=r._scene,o=r.xaxis,l=r.yaxis,s,f;if(!!n){var c=Q6(e,["ANGLE_instanced_arrays","OES_element_index_uint"],Y2);if(!c){n.init();return}var v=n.count,u=i._glcanvas.data()[0].regl;if(e8(e,r,a),n.dirty){if(n.error2d===!0&&(n.error2d=Z6(u)),n.line2d===!0&&(n.line2d=Ib(u)),n.scatter2d===!0&&(n.scatter2d=zb(u)),n.fill2d===!0&&(n.fill2d=Ib(u)),n.glText===!0)for(n.glText=new Array(v),s=0;s<v;s++)n.glText[s]=new Nb(u);if(n.glText){if(v>n.glText.length){var d=v-n.glText.length;for(s=0;s<d;s++)n.glText.push(new Nb(u))}else if(v<n.glText.length){var h=n.glText.length-v,p=n.glText.splice(v,h);p.forEach(function(D){D.destroy()})}for(s=0;s<v;s++)n.glText[s].update(n.textOptions[s])}if(n.line2d&&(n.line2d.update(n.lineOptions),n.lineOptions=n.lineOptions.map(function(D){if(D&&D.positions){for(var z=D.positions,F=0;F<z.length&&(isNaN(z[F])||isNaN(z[F+1]));)F+=2;for(var H=z.length-2;H>F&&(isNaN(z[H])||isNaN(z[H+1]));)H-=2;D.positions=z.slice(F,H+2)}return D}),n.line2d.update(n.lineOptions)),n.error2d){var g=(n.errorXOptions||[]).concat(n.errorYOptions||[]);n.error2d.update(g)}n.scatter2d&&n.scatter2d.update(n.markerOptions),n.fillOrder=wv.repeat(null,v),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(D,z){var F=a[z];if(!(!D||!F||!F[0]||!F[0].trace)){var H=F[0],U=H.trace,B=H.t,X=n.lineOptions[z],O,Y,W=[];U._ownfill&&W.push(z),U._nexttrace&&W.push(z+1),W.length&&(n.fillOrder[z]=W);var K=[],Z=X&&X.positions||B.positions,ae,ne;if(U.fill==="tozeroy"){for(ae=0;ae<Z.length&&isNaN(Z[ae+1]);)ae+=2;for(ne=Z.length-2;ne>ae&&isNaN(Z[ne+1]);)ne-=2;Z[ae+1]!==0&&(K=[Z[ae],0]),K=K.concat(Z.slice(ae,ne+2)),Z[ne+1]!==0&&(K=K.concat([Z[ne],0]))}else if(U.fill==="tozerox"){for(ae=0;ae<Z.length&&isNaN(Z[ae]);)ae+=2;for(ne=Z.length-2;ne>ae&&isNaN(Z[ne]);)ne-=2;Z[ae]!==0&&(K=[0,Z[ae+1]]),K=K.concat(Z.slice(ae,ne+2)),Z[ne]!==0&&(K=K.concat([0,Z[ne+1]]))}else if(U.fill==="toself"||U.fill==="tonext"){for(K=[],O=0,D.splitNull=!0,Y=0;Y<Z.length;Y+=2)(isNaN(Z[Y])||isNaN(Z[Y+1]))&&(K=K.concat(Z.slice(O,Y)),K.push(Z[O],Z[O+1]),K.push(null,null),O=Y+2);K=K.concat(Z.slice(O)),O&&K.push(Z[O],Z[O+1])}else{var oe=U._nexttrace;if(oe){var re=n.lineOptions[z+1];if(re){var se=re.positions;if(U.fill==="tonexty"){for(K=Z.slice(),z=Math.floor(se.length/2);z--;){var me=se[z*2],Re=se[z*2+1];isNaN(me)||isNaN(Re)||K.push(me,Re)}D.fill=oe.fillcolor}}}}if(U._prevtrace&&U._prevtrace.fill==="tonext"){var ke=n.lineOptions[z-1].positions,ze=K.length/2;O=ze;var he=[O];for(Y=0;Y<ke.length;Y+=2)(isNaN(ke[Y])||isNaN(ke[Y+1]))&&(he.push(Y/2+ze+1),O=Y+2);K=K.concat(ke),D.hole=he}return D.fillmode=U.fill,D.opacity=U.opacity,D.positions=K,D}}),n.fill2d.update(n.fillOptions))}var _=i.dragmode,b=K6(_),w=i.clickmode.indexOf("select")>-1;for(s=0;s<v;s++){var m=a[s][0],y=m.trace,x=m.t,T=x.index,k=y._length,S=x.x,A=x.y;if(y.selectedpoints||b||w){if(b||(b=!0),y.selectedpoints){var $=n.selectBatch[T]=wv.selIndices2selPoints(y),M={};for(f=0;f<$.length;f++)M[$[f]]=1;var C=[];for(f=0;f<k;f++)M[f]||C.push(f);n.unselectBatch[T]=C}var E=x.xpx=new Array(k),I=x.ypx=new Array(k);for(f=0;f<k;f++)E[f]=o.c2p(S[f]),I[f]=l.c2p(A[f])}else x.xpx=x.ypx=null}if(b){if(n.select2d||(n.select2d=zb(i._glcanvas.data()[1].regl)),n.scatter2d){var P=new Array(v);for(s=0;s<v;s++)P[s]=n.selectBatch[s].length||n.unselectBatch[s].length?n.markerUnselectedOptions[s]:{};n.scatter2d.update(P)}n.select2d&&(n.select2d.update(n.markerOptions),n.select2d.update(n.markerSelectedOptions)),n.glText&&a.forEach(function(D){var z=((D||[])[0]||{}).trace||{};J6.hasText(z)&&t8(D)})}else n.scatter2d&&n.scatter2d.update(n.markerOptions);var R={viewport:r8(i,o,l,e._context.plotGlPixelRatio),range:[(o._rl||o.range)[0],(l._rl||l.range)[0],(o._rl||o.range)[1],(l._rl||l.range)[1]]},L=wv.repeat(R,n.count);n.fill2d&&n.fill2d.update(L),n.line2d&&n.line2d.update(L),n.error2d&&n.error2d.update(L.concat(L)),n.scatter2d&&n.scatter2d.update(L),n.select2d&&n.select2d.update(L),n.glText&&n.glText.forEach(function(D){D.update(R)})}}};a8.reglPrecompiled=Y2;var W2=U6;W2.plot=X2.exports;var i8=W2;(function(t){t.exports=i8})(O2);const yH=pi(O2.exports);var Z2={exports:{}},K2={};(function(t){var e=Ut.exports;t.name="treemap",t.plot=function(r,a,i,n){e.plotBasePlot(t.name,r,a,i,n)},t.clean=function(r,a,i,n){e.cleanBasePlot(t.name,r,a,i,n)}})(K2);var Q2={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]},n8=La,o8=Cr.hovertemplateAttrs,l8=Cr.texttemplateAttrs,s8=ln,f8=_i.attributes,Ia=Tc,Fb=Q2,Vo=Bt.extendFlat,c8={labels:{valType:"data_array",editType:"calc",description:["Sets the labels of each of the sectors."].join(" ")},parents:{valType:"data_array",editType:"calc",description:["Sets the parent sectors for each of the sectors.","Empty string items '' are understood to reference","the root node in the hierarchy.",'If `ids` is filled, `parents` items are understood to be "ids" themselves.',"When `ids` is not set, plotly attempts to find matching items in `labels`,","but beware they must be unique."].join(" ")},values:{valType:"data_array",editType:"calc",description:["Sets the values associated with each of the sectors.","Use with `branchvalues` to determine how the values are summed."].join(" ")},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc",description:["Determines how the items in `values` are summed.","When set to *total*, items in `values` are taken to be value of all its descendants.","When set to *remainder*, items in `values` corresponding to the root and the branches sectors","are taken to be the extra part not part of the sum of the values at their leaves."].join(" ")},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc",description:["Determines default for `values` when it is not provided,","by inferring a 1 for each of the *leaves* and/or *branches*, otherwise 0."].join(" ")},level:{valType:"any",editType:"plot",anim:!0,description:["Sets the level from which this trace hierarchy is rendered.","Set `level` to `''` to start from the root node in the hierarchy.",'Must be an "id" if `ids` is filled in, otherwise plotly attempts to find a matching',"item in `labels`."].join(" ")},maxdepth:{valType:"integer",editType:"plot",dflt:-1,description:["Sets the number of rendered sectors from any given `level`.","Set `maxdepth` to *-1* to render all the levels in the hierarchy."].join(" ")},marker:Vo({colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector of this trace.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:Vo({},Ia.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:Vo({},Ia.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},s8("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the leaves. With colorscale","it is defaulted to 1; otherwise it is defaulted to 0.7"].join(" ")},editType:"plot"},text:Ia.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot",description:["Determines which trace information appear on the graph."].join(" ")},texttemplate:l8({editType:"plot"},{keys:Fb.eventDataKeys.concat(["label","value"])}),hovertext:Ia.hovertext,hoverinfo:Vo({},n8.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:o8({},{keys:Fb.eventDataKeys}),textfont:Ia.textfont,insidetextorientation:Ia.insidetextorientation,insidetextfont:Ia.insidetextfont,outsidetextfont:Vo({},Ia.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented at the center of a sunburst graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),rotation:{valType:"angle",dflt:0,editType:"plot",description:["Rotates the whole diagram counterclockwise by some angle.","By default the first slice starts at 3 o'clock."].join(" ")},sort:Ia.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)",description:["sets the color of the root node for a sunburst/treemap/icicle trace.","this has no effect when a colorscale is used to set the markers."].join(" ")},editType:"calc"},domain:f8({name:"sunburst",trace:!0,editType:"calc"})},Sc={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1},u8=Cr.hovertemplateAttrs,v8=Cr.texttemplateAttrs,d8=ln,h8=_i.attributes,Pi=Tc,Hr=c8,Hb=Sc,Tv=Bt.extendFlat,J2={labels:Hr.labels,parents:Hr.parents,values:Hr.values,branchvalues:Hr.branchvalues,count:Hr.count,level:Hr.level,maxdepth:Hr.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot",description:["Determines d3 treemap solver.","For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling"].join(" ")},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot",description:["When using *squarify* `packing` algorithm, according to https://github.com/d3/d3-hierarchy/blob/master/README.md#squarify_ratio","this option specifies the desired aspect ratio of the generated rectangles.","The ratio must be specified as a number greater than or equal to one.","Note that the orientation of the generated rectangles (tall or wide)","is not implied by the ratio; for example, a ratio of two will attempt","to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2.","When using *squarify*, unlike d3 which uses the Golden Ratio i.e. 1.618034,","Plotly applies 1 to increase squares in treemap layouts."].join(" ")},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot",description:["Determines if the positions obtained from solver are flipped on each axis."].join(" ")},pad:{valType:"number",min:0,dflt:3,editType:"plot",description:["Sets the inner padding (in px)."].join(" ")},editType:"calc"},marker:Tv({pad:{t:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the top (in px)."].join(" ")},l:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the left (in px)."].join(" ")},r:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the right (in px)."].join(" ")},b:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the bottom (in px)."].join(" ")},editType:"calc"},colors:Hr.marker.colors,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style",description:["Determines if the sector colors are faded towards","the background from the leaves up to the headers.","This option is unavailable when a `colorscale` is present,","defaults to false when `marker.colors` is set,","but otherwise defaults to true.","When set to *reversed*, the fading direction is inverted,","that is the top elements within hierarchy are drawn with fully saturated colors","while the leaves are faded towards the background color."].join(" ")},line:Hr.marker.line,editType:"calc"},d8("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if the path bar is drawn","i.e. outside the trace `domain` and","with one pixel gap."].join(" ")},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Determines on which side of the the treemap the","`pathbar` should be presented."].join(" ")},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot",description:["Determines which shape is used for edges between `barpath` labels."].join(" ")},thickness:{valType:"number",min:12,editType:"plot",description:["Sets the thickness of `pathbar` (in px). If not specified the `pathbar.textfont.size` is used","with 3 pixles extra padding on each side."].join(" ")},textfont:Tv({},Pi.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},text:Pi.text,textinfo:Hr.textinfo,texttemplate:v8({editType:"plot"},{keys:Hb.eventDataKeys.concat(["label","value"])}),hovertext:Pi.hovertext,hoverinfo:Hr.hoverinfo,hovertemplate:u8({},{keys:Hb.eventDataKeys}),textfont:Pi.textfont,insidetextfont:Pi.insidetextfont,outsidetextfont:Tv({},Pi.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented on top left corner of a treemap graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot",description:["Sets the positions of the `text` elements."].join(" ")},sort:Pi.sort,root:Hr.root,domain:h8({name:"treemap",trace:!0,editType:"calc"})},ek={treemapcolorway:{valType:"colorlist",editType:"calc",description:["Sets the default treemap slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendtreemapcolors`."].join(" ")},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the treemap slice colors (whether given by `treemapcolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}},p8=de.exports,m8=J2,y8=Je.exports,g8=_i.defaults,b8=oo.handleText,x8=jl.TEXTPAD,tk=Kn,_8=tk.hasColorscale,w8=tk.handleDefaults,T8=function(e,r,a,i){function n(b,w){return p8.coerce(e,r,m8,b,w)}var o=n("labels"),l=n("parents");if(!o||!o.length||!l||!l.length){r.visible=!1;return}var s=n("values");s&&s.length?n("branchvalues"):n("count"),n("level"),n("maxdepth");var f=n("tiling.packing");f==="squarify"&&n("tiling.squarifyratio"),n("tiling.flip"),n("tiling.pad");var c=n("text");n("texttemplate"),r.texttemplate||n("textinfo",Array.isArray(c)?"text+label":"label"),n("hovertext"),n("hovertemplate");var v=n("pathbar.visible"),u="auto";b8(e,r,i,n,u,{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),n("textposition");var d=r.textposition.indexOf("bottom")!==-1,h=n("marker.line.width");h&&n("marker.line.color",i.paper_bgcolor);var p=n("marker.colors"),g=r._hasColorscale=_8(e,"marker","colors")||(e.marker||{}).coloraxis;g?w8(e,r,i,n,{prefix:"marker.",cLetter:"c"}):n("marker.depthfade",!(p||[]).length);var _=r.textfont.size*2;n("marker.pad.t",d?_/4:_),n("marker.pad.l",_/4),n("marker.pad.r",_/4),n("marker.pad.b",d?_:_/4),r._hovered={marker:{line:{width:2,color:y8.contrast(i.paper_bgcolor)}}},v&&(n("pathbar.thickness",r.pathbar.textfont.size+2*x8),n("pathbar.side"),n("pathbar.edgeshape")),n("sort"),n("root.color"),g8(r,i,n),r._length=null},k8=de.exports,A8=ek,M8=function(e,r){function a(i,n){return k8.coerce(e,r,A8,i,n)}a("treemapcolorway",r.colorway),a("extendtreemapcolors")},Bf={},rk={};(function(t){var e=Id,r=lt,a=de.exports,i=Kn.makeColorScaleFuncFromTrace,n=Nf.makePullColorFn,o=Nf.generateExtendedColors,l=Kn.calc,s=Ot.ALMOST_EQUAL,f={},c={},v={};t.calc=function(d,h){var p=d._fullLayout,g=h.ids,_=a.isArrayOrTypedArray(g),b=h.labels,w=h.parents,m=h.values,y=a.isArrayOrTypedArray(m),x=[],T={},k={},S=function(Z,ae){T[Z]?T[Z].push(ae):T[Z]=[ae],k[ae]=1},A=function(Z){return Z||typeof Z=="number"},$=function(Z){return!y||r(m[Z])&&m[Z]>=0},M,C,E;_?(M=Math.min(g.length,w.length),C=function(Z){return A(g[Z])&&$(Z)},E=function(Z){return String(g[Z])}):(M=Math.min(b.length,w.length),C=function(Z){return A(b[Z])&&$(Z)},E=function(Z){return String(b[Z])}),y&&(M=Math.min(M,m.length));for(var I=0;I<M;I++)if(C(I)){var P=E(I),R=A(w[I])?String(w[I]):"",L={i:I,id:P,pid:R,label:A(b[I])?String(b[I]):""};y&&(L.v=+m[I]),x.push(L),S(R,P)}if(T[""]){if(T[""].length>1){for(var F=a.randstr(),H=0;H<x.length;H++)x[H].pid===""&&(x[H].pid=F);x.unshift({hasMultipleRoots:!0,id:F,pid:"",label:""})}}else{var D=[],z;for(z in T)k[z]||D.push(z);if(D.length===1)z=D[0],x.unshift({hasImpliedRoot:!0,id:z,pid:"",label:z});else return a.warn(["Multiple implied roots, cannot build",h.type,"hierarchy of",h.name+".","These roots include:",D.join(", ")].join(" "))}var U;try{U=e.stratify().id(function(Z){return Z.id}).parentId(function(Z){return Z.pid})(x)}catch(Z){return a.warn(["Failed to build",h.type,"hierarchy of",h.name+".","Error:",Z.message].join(" "))}var B=e.hierarchy(U),X=!1;if(y)switch(h.branchvalues){case"remainder":B.sum(function(Z){return Z.data.v});break;case"total":B.each(function(Z){var ae=Z.data.data,ne=ae.v;if(Z.children){var oe=Z.children.reduce(function(re,se){return re+se.data.data.v},0);if((ae.hasImpliedRoot||ae.hasMultipleRoots)&&(ne=oe),ne<oe*s)return X=!0,a.warn(["Total value for node",Z.data.data.id,"of",h.name,"is smaller than the sum of its children.",`
5
5
  parent value =`,ne,`
6
6
  children sum =`,oe].join(" "))}Z.value=ne});break}else u(B,h,{branches:h.count.indexOf("branches")!==-1,leaves:h.count.indexOf("leaves")!==-1});if(!X){h.sort&&B.sort(function(Z,ae){return ae.value-Z.value});var O,Y,W=h.marker.colors||[],K=!!W.length;return h._hasColorscale?(K||(W=y?h.values:h._values),l(d,h,{vals:W,containerStr:"marker",cLetter:"c"}),Y=i(h.marker)):O=n(p["_"+h.type+"colormap"]),B.each(function(Z){var ae=Z.data.data;ae.color=h._hasColorscale?Y(W[ae.i]):O(W[ae.i],ae.id)}),x[0].hierarchy=B,x}},t._runCrossTraceCalc=function(d,h){var p=h._fullLayout,g=h.calcdata,_=p[d+"colorway"],b=p["_"+d+"colormap"];p["extend"+d+"colors"]&&(_=o(_,d==="icicle"?v:d==="treemap"?c:f));var w=0,m;function y(S){var A=S.data.data,$=A.id;A.color===!1&&(b[$]?A.color=b[$]:S.parent?S.parent.parent?A.color=S.parent.data.data.color:(b[$]=A.color=_[w%_.length],w++):A.color=m)}for(var x=0;x<g.length;x++){var T=g[x],k=T[0];k.trace.type===d&&k.hierarchy&&(m=k.trace.root.color,k.hierarchy.each(y))}},t.crossTraceCalc=function(d){return t._runCrossTraceCalc("sunburst",d)};function u(d,h,p){var g=0,_=d.children;if(_){for(var b=_.length,w=0;w<b;w++)g+=u(_[w],h,p);p.branches&&g++}else p.leaves&&g++;return d.value=d.data.data.value=g,h._values||(h._values=[]),h._values[d.data.data.i]=g,g}})(rk);var ak=rk;Bf.calc=function(t,e){return ak.calc(t,e)};Bf.crossTraceCalc=function(t){return ak._runCrossTraceCalc("treemap",t)};var wi={};(function(t){var e=de.exports,r=Je.exports,a=xi,i=sn;t.findEntryWithLevel=function(s,f){var c;return f&&s.eachAfter(function(v){if(t.getPtId(v)===f)return c=v.copy()}),c||s},t.findEntryWithChild=function(s,f){var c;return s.eachAfter(function(v){for(var u=v.children||[],d=0;d<u.length;d++){var h=u[d];if(t.getPtId(h)===f)return c=v.copy()}}),c||s},t.isEntry=function(s){return!s.parent},t.isLeaf=function(s){return!s.children},t.getPtId=function(s){return s.data.data.id},t.getPtLabel=function(s){return s.data.data.label},t.getValue=function(s){return s.value},t.isHierarchyRoot=function(s){return l(s)===""},t.setSliceCursor=function(s,f,c){var v=c.isTransitioning;if(!v){var u=s.datum();v=c.hideOnRoot&&t.isHierarchyRoot(u)||c.hideOnLeaves&&t.isLeaf(u)}a(s,v?null:"pointer")};function n(s,f,c){return{color:t.getOutsideTextFontKey("color",s,f,c),family:t.getOutsideTextFontKey("family",s,f,c),size:t.getOutsideTextFontKey("size",s,f,c)}}function o(s,f,c,v){var u=(v||{}).onPathbar,d=f.data.data,h=d.i,p=e.castOption(s,h,(u?"pathbar.textfont":"insidetextfont")+".color");return!p&&s._input.textfont&&(p=e.castOption(s._input,h,"textfont.color")),{color:p||r.contrast(d.color),family:t.getInsideTextFontKey("family",s,f,c,v),size:t.getInsideTextFontKey("size",s,f,c,v)}}t.getInsideTextFontKey=function(s,f,c,v,u){var d=(u||{}).onPathbar,h=d?"pathbar.textfont":"insidetextfont",p=c.data.data.i;return e.castOption(f,p,h+"."+s)||e.castOption(f,p,"textfont."+s)||v.size},t.getOutsideTextFontKey=function(s,f,c,v){var u=c.data.data.i;return e.castOption(f,u,"outsidetextfont."+s)||e.castOption(f,u,"textfont."+s)||v.size},t.isOutsideText=function(s,f){return!s._hasColorscale&&t.isHierarchyRoot(f)},t.determineTextFont=function(s,f,c,v){return t.isOutsideText(s,f)?n(s,f,c):o(s,f,c,v)},t.hasTransition=function(s){return!!(s&&s.duration>0)},t.getMaxDepth=function(s){return s.maxdepth>=0?s.maxdepth:1/0},t.isHeader=function(s,f){return!(t.isLeaf(s)||s.depth===f._maxDepth-1)};function l(s){return s.data.data.pid}t.getParent=function(s,f){return t.findEntryWithLevel(s,l(f))},t.listPath=function(s,f){var c=s.parent;if(!c)return[];var v=f?[c.data[f]]:[c];return t.listPath(c,f).concat(v)},t.getPath=function(s){return t.listPath(s,"label").join("/")+"/"},t.formatValue=i.formatPieValue,t.formatPercent=function(s,f){var c=e.formatPercent(s,0);return c==="0%"&&(c=i.formatPiePercent(s,f)),c}})(wi);var S8=function t(e,r,a){var i;a.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),a.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),a.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var n=e.children;if(n)for(var o=0;o<n.length;o++)t(n[o],r,a)},On=Id,L8=S8,ik=function(e,r,a){var i=a.flipX,n=a.flipY,o=a.packing==="dice-slice",l=a.pad[n?"bottom":"top"],s=a.pad[i?"right":"left"],f=a.pad[i?"left":"right"],c=a.pad[n?"top":"bottom"],v;o&&(v=s,s=l,l=v,v=f,f=c,c=v);var u=On.treemap().tile(C8(a.packing,a.squarifyratio)).paddingInner(a.pad.inner).paddingLeft(s).paddingRight(f).paddingTop(l).paddingBottom(c).size(o?[r[1],r[0]]:r)(e);return(o||i||n)&&L8(u,r,{swapXY:o,flipX:i,flipY:n}),u};function C8(t,e){switch(t){case"squarify":return On.treemapSquarify.ratio(e);case"binary":return On.treemapBinary;case"dice":return On.treemapDice;case"slice":return On.treemapSlice;default:return On.treemapSliceDice}}var Ob=tt.exports,zi=Je.exports,Bb=de.exports,kv=wi,D8=Ya.resizeText;function $8(t){var e=t._fullLayout._treemaplayer.selectAll(".trace");D8(t,e,"treemap"),e.each(function(r){var a=Ob.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){Ob.select(this).call(nk,o,n,{hovered:!1})})})}function nk(t,e,r,a){var i=(a||{}).hovered,n=e.data.data,o=n.i,l,s,f=n.color,c=kv.isHierarchyRoot(e),v=1;if(i)l=r._hovered.marker.line.color,s=r._hovered.marker.line.width;else if(c&&f===r.root.color)v=100,l="rgba(0,0,0,0)",s=0;else if(l=Bb.castOption(r,o,"marker.line.color")||zi.defaultLine,s=Bb.castOption(r,o,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var u=r.marker.depthfade;if(u){var d=zi.combine(zi.addOpacity(r._backgroundColor,.75),f),h;if(u===!0){var p=kv.getMaxDepth(r);isFinite(p)?kv.isLeaf(e)?h=0:h=r._maxVisibleLayers-(e.data.depth-r._entryDepth):h=e.data.height+1}else h=e.data.depth-r._entryDepth,r._atRootLevel||h++;if(h>0)for(var g=0;g<h;g++){var _=.5*g/h;f=zi.combine(zi.addOpacity(d,_),f)}}}t.style("stroke-width",s).call(zi.fill,f).call(zi.stroke,l).style("opacity",v)}var gp={style:$8,styleOne:nk},Rn=tt.exports,jb=Ve,E8=Zr.appendArrayPointValue,qo=ua,Gb=de.exports,R8=El,Wt=wi,P8=sn,z8=P8.formatPieValue,bp=function(e,r,a,i,n){var o=i[0],l=o.trace,s=o.hierarchy,f=l.type==="sunburst",c=l.type==="treemap"||l.type==="icicle";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1);var v=function(h){var p=a._fullLayout;if(!(a._dragging||p.hovermode===!1)){var g=a._fullData[l.index],_=h.data.data,b=_.i,w=Wt.isHierarchyRoot(h),m=Wt.getParent(s,h),y=Wt.getValue(h),x=function(U){return Gb.castOption(g,b,U)},T=x("hovertemplate"),k=qo.castHoverinfo(g,p,b),S=p.separators,A;if(T||k&&k!=="none"&&k!=="skip"){var $,M;f&&($=o.cx+h.pxmid[0]*(1-h.rInscribed),M=o.cy+h.pxmid[1]*(1-h.rInscribed)),c&&($=h._hoverX,M=h._hoverY);var C={},E=[],I=[],P=function(U){return E.indexOf(U)!==-1};k&&(E=k==="all"?g._module.attributes.hoverinfo.flags:k.split("+")),C.label=_.label,P("label")&&C.label&&I.push(C.label),_.hasOwnProperty("v")&&(C.value=_.v,C.valueLabel=z8(C.value,S),P("value")&&I.push(C.valueLabel)),C.currentPath=h.currentPath=Wt.getPath(h.data),P("current path")&&!w&&I.push(C.currentPath);var R,L=[],D=function(){L.indexOf(R)===-1&&(I.push(R),L.push(R))};C.percentParent=h.percentParent=y/Wt.getValue(m),C.parent=h.parentString=Wt.getPtLabel(m),P("percent parent")&&(R=Wt.formatPercent(C.percentParent,S)+" of "+C.parent,D()),C.percentEntry=h.percentEntry=y/Wt.getValue(r),C.entry=h.entry=Wt.getPtLabel(r),P("percent entry")&&!w&&!h.onPathbar&&(R=Wt.formatPercent(C.percentEntry,S)+" of "+C.entry,D()),C.percentRoot=h.percentRoot=y/Wt.getValue(s),C.root=h.root=Wt.getPtLabel(s),P("percent root")&&!w&&(R=Wt.formatPercent(C.percentRoot,S)+" of "+C.root,D()),C.text=x("hovertext")||x("text"),P("text")&&(R=C.text,Gb.isValidTextValue(R)&&I.push(R)),A=[Xo(h,g,n.eventDataKeys)];var z={trace:g,y:M,_x0:h._x0,_x1:h._x1,_y0:h._y0,_y1:h._y1,text:I.join("<br>"),name:T||P("name")?g.name:void 0,color:x("hoverlabel.bgcolor")||_.color,borderColor:x("hoverlabel.bordercolor"),fontFamily:x("hoverlabel.font.family"),fontSize:x("hoverlabel.font.size"),fontColor:x("hoverlabel.font.color"),nameLength:x("hoverlabel.namelength"),textAlign:x("hoverlabel.align"),hovertemplate:T,hovertemplateLabels:C,eventData:A};f&&(z.x0=$-h.rInscribed*h.rpx1,z.x1=$+h.rInscribed*h.rpx1,z.idealAlign=h.pxmid[0]<0?"left":"right"),c&&(z.x=$,z.idealAlign=$<0?"left":"right");var F=[];qo.loneHover(z,{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:a,inOut_bbox:F}),A[0].bbox=F[0],l._hasHoverLabel=!0}if(c){var H=e.select("path.surface");n.styleOne(H,h,g,{hovered:!0})}l._hasHoverEvent=!0,a.emit("plotly_hover",{points:A||[Xo(h,g,n.eventDataKeys)],event:Rn.event})}},u=function(h){var p=a._fullLayout,g=a._fullData[l.index],_=Rn.select(this).datum();if(l._hasHoverEvent&&(h.originalEvent=Rn.event,a.emit("plotly_unhover",{points:[Xo(_,g,n.eventDataKeys)],event:Rn.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(qo.loneUnhover(p._hoverlayer.node()),l._hasHoverLabel=!1),c){var b=e.select("path.surface");n.styleOne(b,_,g,{hovered:!1})}},d=function(h){var p=a._fullLayout,g=a._fullData[l.index],_=f&&(Wt.isHierarchyRoot(h)||Wt.isLeaf(h)),b=Wt.getPtId(h),w=Wt.isEntry(h)?Wt.findEntryWithChild(s,b):Wt.findEntryWithLevel(s,b),m=Wt.getPtId(w),y={points:[Xo(h,g,n.eventDataKeys)],event:Rn.event};_||(y.nextLevel=m);var x=R8.triggerHandler(a,"plotly_"+l.type+"click",y);if(x!==!1&&p.hovermode&&(a._hoverdata=[Xo(h,g,n.eventDataKeys)],qo.click(a,Rn.event)),!_&&x!==!1&&!a._dragging&&!a._transitioning){jb.call("_storeDirectGUIEdit",g,p._tracePreGUI[g.uid],{level:g.level});var T={data:[{level:m}],traces:[l.index]},k={frame:{redraw:!1,duration:n.transitionTime},transition:{duration:n.transitionTime,easing:n.transitionEasing},mode:"immediate",fromcurrent:!0};qo.loneUnhover(p._hoverlayer.node()),jb.call("animate",a,T,k)}};e.on("mouseover",v),e.on("mouseout",u),e.on("click",d)};function Xo(t,e,r){for(var a=t.data.data,i={curveNumber:e.index,pointNumber:a.i,data:e._input,fullData:e},n=0;n<r.length;n++){var o=r[n];o in t&&(i[o]=t[o])}return"parentString"in t&&!Wt.isHierarchyRoot(t)&&(i.parent=t.parentString),E8(i,e,a.i),i}var Ub=tt.exports,js=de.exports,Vb=Tt.exports,I8=ir,N8=ik,qb=gp.styleOne,Av=Sc,Pn=wi,F8=bp,Mv=!0,H8=function(e,r,a,i,n){var o=n.barDifY,l=n.width,s=n.height,f=n.viewX,c=n.viewY,v=n.pathSlice,u=n.toMoveInsideSlice,d=n.strTransform,h=n.hasTransition,p=n.handleSlicesExit,g=n.makeUpdateSliceInterpolator,_=n.makeUpdateTextInterpolator,b={},w=e._fullLayout,m=r[0],y=m.trace,x=m.hierarchy,T=l/y._entryDepth,k=Pn.listPath(a.data,"id"),S=N8(x.copy(),[l,s],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();S=S.filter(function($){var M=k.indexOf($.data.id);return M===-1?!1:($.x0=T*M,$.x1=T*(M+1),$.y0=o,$.y1=o+s,$.onPathbar=!0,!0)}),S.reverse(),i=i.data(S,Pn.getPtId),i.enter().append("g").classed("pathbar",!0),p(i,Mv,b,[l,s],v),i.order();var A=i;h&&(A=A.transition().each("end",function(){var $=Ub.select(this);Pn.setSliceCursor($,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),A.each(function($){$._x0=f($.x0),$._x1=f($.x1),$._y0=c($.y0),$._y1=c($.y1),$._hoverX=f($.x1-Math.min(l,s)/2),$._hoverY=c($.y1-s/2);var M=Ub.select(this),C=js.ensureSingle(M,"path","surface",function(R){R.style("pointer-events","all")});h?C.transition().attrTween("d",function(R){var L=g(R,Mv,b,[l,s]);return function(D){return v(L(D))}}):C.attr("d",v),M.call(F8,a,e,r,{styleOne:qb,eventDataKeys:Av.eventDataKeys,transitionTime:Av.CLICK_TRANSITION_TIME,transitionEasing:Av.CLICK_TRANSITION_EASING}).call(Pn.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),C.call(qb,$,y,{hovered:!1}),$._text=(Pn.getPtLabel($)||"").split("<br>").join(" ")||"";var E=js.ensureSingle(M,"g","slicetext"),I=js.ensureSingle(E,"text","",function(R){R.attr("data-notex",1)}),P=js.ensureUniformFontSize(e,Pn.determineTextFont(y,$,w.font,{onPathbar:!0}));I.text($._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(Vb.font,P).call(I8.convertToTspans,e),$.textBB=Vb.bBox(I.node()),$.transform=u($,{fontSize:P.size,onPathbar:!0}),$.transform.fontSize=P.size,h?I.transition().attrTween("transform",function(R){var L=_(R,Mv,b,[l,s]);return function(D){return d(L(D))}}):I.attr("transform",d($))})},Xb=tt.exports,Sv=ox.interpolate,li=wi,Yo=de.exports,Yb=jl.TEXTPAD,O8=dp,B8=O8.toMoveInsideBar,j8=Ya,Lv=j8.recordMinTextSize,G8=Sc,U8=H8;function Ii(t){return li.isHierarchyRoot(t)?"":li.getPtId(t)}var V8=function(e,r,a,i,n){var o=e._fullLayout,l=r[0],s=l.trace,f=s.type,c=f==="icicle",v=l.hierarchy,u=li.findEntryWithLevel(v,s.level),d=Xb.select(a),h=d.selectAll("g.pathbar"),p=d.selectAll("g.slice");if(!u){h.remove(),p.remove();return}var g=li.isHierarchyRoot(u),_=!o.uniformtext.mode&&li.hasTransition(i),b=li.getMaxDepth(s),w=function(te){return te.data.depth-u.data.depth<b},m=o._size,y=s.domain,x=m.w*(y.x[1]-y.x[0]),T=m.h*(y.y[1]-y.y[0]),k=x,S=s.pathbar.thickness,A=s.marker.line.width+G8.gapWithPathbar,$=s.pathbar.visible?s.pathbar.side.indexOf("bottom")>-1?T+A:-(S+A):0,M={x0:k,x1:k,y0:$,y1:$+S},C=function(te,ue,Le){var we=s.tiling.pad,Pe=function(pe){return pe-we<=ue.x0},Ee=function(pe){return pe+we>=ue.x1},Ce=function(pe){return pe-we<=ue.y0},q=function(pe){return pe+we>=ue.y1};return te.x0===ue.x0&&te.x1===ue.x1&&te.y0===ue.y0&&te.y1===ue.y1?{x0:te.x0,x1:te.x1,y0:te.y0,y1:te.y1}:{x0:Pe(te.x0-we)?0:Ee(te.x0-we)?Le[0]:te.x0,x1:Pe(te.x1+we)?0:Ee(te.x1+we)?Le[0]:te.x1,y0:Ce(te.y0-we)?0:q(te.y0-we)?Le[1]:te.y0,y1:Ce(te.y1+we)?0:q(te.y1+we)?Le[1]:te.y1}},E=null,I={},P={},R=null,L=function(te,ue){return ue?I[Ii(te)]:P[Ii(te)]},D=function(te,ue,Le,we){if(ue)return I[Ii(v)]||M;var Pe=P[s.level]||Le;return w(te)?C(te,Pe,we):{}};l.hasMultipleRoots&&g&&b++,s._maxDepth=b,s._backgroundColor=o.paper_bgcolor,s._entryDepth=u.data.depth,s._atRootLevel=g;var z=-x/2+m.l+m.w*(y.x[1]+y.x[0])/2,F=-T/2+m.t+m.h*(1-(y.y[1]+y.y[0])/2),H=function(te){return z+te},U=function(te){return F+te},B=U(0),X=H(0),O=function(te){return X+te},Y=function(te){return B+te};function W(te,ue){return te+","+ue}var K=O(0),Z=function(te){te.x=Math.max(K,te.x)},ae=s.pathbar.edgeshape,ne=function(te){var ue=O(Math.max(Math.min(te.x0,te.x0),0)),Le=O(Math.min(Math.max(te.x1,te.x1),k)),we=Y(te.y0),Pe=Y(te.y1),Ee=S/2,Ce={},q={};Ce.x=ue,q.x=Le,Ce.y=q.y=(we+Pe)/2;var pe={x:ue,y:we},ve={x:Le,y:we},ye={x:Le,y:Pe},le={x:ue,y:Pe};return ae===">"?(pe.x-=Ee,ve.x-=Ee,ye.x-=Ee,le.x-=Ee):ae==="/"?(ye.x-=Ee,le.x-=Ee,Ce.x-=Ee/2,q.x-=Ee/2):ae==="\\"?(pe.x-=Ee,ve.x-=Ee,Ce.x-=Ee/2,q.x-=Ee/2):ae==="<"&&(Ce.x-=Ee,q.x-=Ee),Z(pe),Z(le),Z(Ce),Z(ve),Z(ye),Z(q),"M"+W(pe.x,pe.y)+"L"+W(ve.x,ve.y)+"L"+W(q.x,q.y)+"L"+W(ye.x,ye.y)+"L"+W(le.x,le.y)+"L"+W(Ce.x,Ce.y)+"Z"},oe=function(te){var ue=H(te.x0),Le=H(te.x1),we=U(te.y0),Pe=U(te.y1),Ee=Le-ue,Ce=Pe-we;if(!Ee||!Ce)return"";var q=0,pe=Ee>2*q&&Ce>2*q?q:0,ve=function(ye,le){return pe?"a"+W(pe,pe)+" 0 0 1 "+W(ye,le):""};return"M"+W(ue,we+pe)+ve(pe,-pe)+"L"+W(Le-pe,we)+ve(pe,pe)+"L"+W(Le,Pe-pe)+ve(-pe,pe)+"L"+W(ue+pe,Pe)+ve(-pe,-pe)+"Z"},re=function(te,ue){var Le=te.x0,we=te.x1,Pe=te.y0,Ee=te.y1,Ce=te.textBB,q=function(Oe){return s.textposition.indexOf(Oe)!==-1},pe=q("bottom"),ve=q("top")||ue.isHeader&&!pe,ye=ve?"start":pe?"end":"middle",le=q("right"),fe=q("left")||ue.onPathbar,Te=fe?-1:le?1:0,xe=s[c?"tiling":"marker"].pad;if(ue.isHeader){if(Le+=(c?xe:xe.l)-Yb,we-=(c?xe:xe.r)-Yb,Le>=we){var be=(Le+we)/2;Le=be,we=be}var Ae;pe?(Ae=Ee-(c?xe:xe.b),Pe<Ae&&Ae<Ee&&(Pe=Ae)):(Ae=Pe+(c?xe:xe.t),Pe<Ae&&Ae<Ee&&(Ee=Ae))}var De=B8(Le,we,Pe,Ee,Ce,{isHorizontal:!1,constrained:!0,angle:0,anchor:ye,leftToRight:Te});return De.fontSize=ue.fontSize,De.targetX=H(De.targetX),De.targetY=U(De.targetY),isNaN(De.targetX)||isNaN(De.targetY)?{}:(Le!==we&&Pe!==Ee&&Lv(s.type,De,o),{scale:De.scale,rotate:De.rotate,textX:De.textX,textY:De.textY,anchorX:De.anchorX,anchorY:De.anchorY,targetX:De.targetX,targetY:De.targetY})},se=function(te,ue){for(var Le,we=0,Pe=te;!Le&&we<b;)we++,Pe=Pe.parent,Pe?Le=L(Pe,ue):we=b;return Le||{}},me=function(te,ue,Le,we){var Pe=L(te,ue),Ee;if(ue)Ee=M;else{var Ce=L(u,ue);Ce?Ee=C(te,Ce,we):Ee={}}return Sv(Pe,Ee)},Re=function(te,ue,Le,we,Pe){var Ee=L(te,ue),Ce;if(Ee)Ce=Ee;else if(ue)Ce=M;else if(E)if(te.parent){var q=R||Le;q&&!ue?Ce=C(te,q,we):(Ce={},Yo.extendFlat(Ce,se(te,ue)))}else Ce=Yo.extendFlat({},te),c&&(Pe.orientation==="h"?Pe.flipX?Ce.x0=te.x1:Ce.x1=0:Pe.flipY?Ce.y0=te.y1:Ce.y1=0);else Ce={};return Sv(Ce,{x0:te.x0,x1:te.x1,y0:te.y0,y1:te.y1})},ke=function(te,ue,Le,we){var Pe=L(te,ue),Ee={},Ce=D(te,ue,Le,we);Yo.extendFlat(Ee,{transform:re({x0:Ce.x0,x1:Ce.x1,y0:Ce.y0,y1:Ce.y1,textBB:te.textBB,_text:te._text},{isHeader:li.isHeader(te,s)})}),Pe?Ee=Pe:te.parent&&Yo.extendFlat(Ee,se(te,ue));var q=te.transform;return te.x0!==te.x1&&te.y0!==te.y1&&Lv(s.type,q,o),Sv(Ee,{transform:{scale:q.scale,rotate:q.rotate,textX:q.textX,textY:q.textY,anchorX:q.anchorX,anchorY:q.anchorY,targetX:q.targetX,targetY:q.targetY}})},ze=function(te,ue,Le,we,Pe){var Ee=we[0],Ce=we[1];_?te.exit().transition().each(function(){var q=Xb.select(this),pe=q.select("path.surface");pe.transition().attrTween("d",function(ye){var le=me(ye,ue,Le,[Ee,Ce]);return function(fe){return Pe(le(fe))}});var ve=q.select("g.slicetext");ve.attr("opacity",0)}).remove():te.exit().remove()},he=function(te){var ue=te.transform;return te.x0!==te.x1&&te.y0!==te.y1&&Lv(s.type,ue,o),Yo.getTextTransform({textX:ue.textX,textY:ue.textY,anchorX:ue.anchorX,anchorY:ue.anchorY,targetX:ue.targetX,targetY:ue.targetY,scale:ue.scale,rotate:ue.rotate})};_&&(h.each(function(te){I[Ii(te)]={x0:te.x0,x1:te.x1,y0:te.y0,y1:te.y1},te.transform&&(I[Ii(te)].transform={textX:te.transform.textX,textY:te.transform.textY,anchorX:te.transform.anchorX,anchorY:te.transform.anchorY,targetX:te.transform.targetX,targetY:te.transform.targetY,scale:te.transform.scale,rotate:te.transform.rotate})}),p.each(function(te){P[Ii(te)]={x0:te.x0,x1:te.x1,y0:te.y0,y1:te.y1},te.transform&&(P[Ii(te)].transform={textX:te.transform.textX,textY:te.transform.textY,anchorX:te.transform.anchorX,anchorY:te.transform.anchorY,targetX:te.transform.targetX,targetY:te.transform.targetY,scale:te.transform.scale,rotate:te.transform.rotate}),!E&&li.isEntry(te)&&(E=te)})),R=n(e,r,u,p,{width:x,height:T,viewX:H,viewY:U,pathSlice:oe,toMoveInsideSlice:re,prevEntry:E,makeUpdateSliceInterpolator:Re,makeUpdateTextInterpolator:ke,handleSlicesExit:ze,hasTransition:_,strTransform:he}),s.pathbar.visible?U8(e,r,u,h,{barDifY:$,width:k,height:S,viewX:O,viewY:Y,pathSlice:ne,toMoveInsideSlice:re,makeUpdateSliceInterpolator:Re,makeUpdateTextInterpolator:ke,handleSlicesExit:ze,hasTransition:_,strTransform:he}):h.remove()},q8=tt.exports,X8=wi,Y8=Ya,W8=Y8.clearMinTextSize,Z8=Ji.resizeText,Wb=V8,K8=function(e,r,a,i,n){var o=n.type,l=n.drawDescendants,s=e._fullLayout,f=s["_"+o+"layer"],c,v,u=!a;if(W8(o,s),c=f.selectAll("g.trace."+o).data(r,function(h){return h[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!s.uniformtext.mode&&X8.hasTransition(a)){i&&(v=i());var d=q8.transition().duration(a.duration).ease(a.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()});d.each(function(){f.selectAll("g.trace").each(function(h){Wb(e,h,this,a,l)})})}else c.each(function(h){Wb(e,h,this,a,l)}),s.uniformtext.mode&&Z8(e,f.selectAll(".trace"),o);u&&c.exit().remove()},ok={},Zb=tt.exports,Cv=Je.exports,Kb=de.exports,Q8=Ya.resizeText;function J8(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");Q8(t,e,"sunburst"),e.each(function(r){var a=Zb.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){Zb.select(this).call(lk,o,n)})})}function lk(t,e,r){var a=e.data.data,i=!e.children,n=a.i,o=Kb.castOption(r,n,"marker.line.color")||Cv.defaultLine,l=Kb.castOption(r,n,"marker.line.width")||0;t.style("stroke-width",l).call(Cv.fill,a.color).call(Cv.stroke,o).style("opacity",i?r.leaf.opacity:null)}var eH={style:J8,styleOne:lk};(function(t){var e=tt.exports,r=Id,a=ox.interpolate,i=Tt.exports,n=de.exports,o=ir,l=Ya,s=l.recordMinTextSize,f=l.clearMinTextSize,c=D2,v=sn.getRotationAngle,u=c.computeTransform,d=c.transformInsideText,h=eH.styleOne,p=Ji.resizeText,g=bp,_=Q2,b=wi;t.plot=function(k,S,A,$){var M=k._fullLayout,C=M._sunburstlayer,E,I,P=!A,R=!M.uniformtext.mode&&b.hasTransition(A);if(f("sunburst",M),E=C.selectAll("g.trace.sunburst").data(S,function(D){return D[0].trace.uid}),E.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),E.order(),R){$&&(I=$());var L=e.transition().duration(A.duration).ease(A.easing).each("end",function(){I&&I()}).each("interrupt",function(){I&&I()});L.each(function(){C.selectAll("g.trace").each(function(D){w(k,D,this,A)})})}else E.each(function(D){w(k,D,this,A)}),M.uniformtext.mode&&p(k,M._sunburstlayer.selectAll(".trace"),"sunburst");P&&E.exit().remove()};function w(k,S,A,$){var M=k._fullLayout,C=!M.uniformtext.mode&&b.hasTransition($),E=e.select(A),I=E.selectAll("g.slice"),P=S[0],R=P.trace,L=P.hierarchy,D=b.findEntryWithLevel(L,R.level),z=b.getMaxDepth(R),F=M._size,H=R.domain,U=F.w*(H.x[1]-H.x[0]),B=F.h*(H.y[1]-H.y[0]),X=.5*Math.min(U,B),O=P.cx=F.l+F.w*(H.x[1]+H.x[0])/2,Y=P.cy=F.t+F.h*(1-H.y[0])-B/2;if(!D)return I.remove();var W=null,K={};C&&I.each(function(q){K[b.getPtId(q)]={rpx0:q.rpx0,rpx1:q.rpx1,x0:q.x0,x1:q.x1,transform:q.transform},!W&&b.isEntry(q)&&(W=q)});var Z=m(D).descendants(),ae=D.height+1,ne=0,oe=z;P.hasMultipleRoots&&b.isHierarchyRoot(D)&&(Z=Z.slice(1),ae-=1,ne=1,oe+=1),Z=Z.filter(function(q){return q.y1<=oe});var re=v(R.rotation);re&&Z.forEach(function(q){q.x0+=re,q.x1+=re});var se=Math.min(ae,z),me=function(q){return(q-ne)/se*X},Re=function(q,pe){return[q*Math.cos(pe),-q*Math.sin(pe)]},ke=function(q){return n.pathAnnulus(q.rpx0,q.rpx1,q.x0,q.x1,O,Y)},ze=function(q){return O+x(q)[0]*(q.transform.rCenter||0)+(q.transform.x||0)},he=function(q){return Y+x(q)[1]*(q.transform.rCenter||0)+(q.transform.y||0)};I=I.data(Z,b.getPtId),I.enter().append("g").classed("slice",!0),C?I.exit().transition().each(function(){var q=e.select(this),pe=q.select("path.surface");pe.transition().attrTween("d",function(ye){var le=we(ye);return function(fe){return ke(le(fe))}});var ve=q.select("g.slicetext");ve.attr("opacity",0)}).remove():I.exit().remove(),I.order();var te=null;if(C&&W){var ue=b.getPtId(W);I.each(function(q){te===null&&b.getPtId(q)===ue&&(te=q.x1)})}var Le=I;C&&(Le=Le.transition().each("end",function(){var q=e.select(this);b.setSliceCursor(q,k,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),Le.each(function(q){var pe=e.select(this),ve=n.ensureSingle(pe,"path","surface",function(be){be.style("pointer-events","all")});q.rpx0=me(q.y0),q.rpx1=me(q.y1),q.xmid=(q.x0+q.x1)/2,q.pxmid=Re(q.rpx1,q.xmid),q.midangle=-(q.xmid-Math.PI/2),q.startangle=-(q.x0-Math.PI/2),q.stopangle=-(q.x1-Math.PI/2),q.halfangle=.5*Math.min(n.angleDelta(q.x0,q.x1)||Math.PI,Math.PI),q.ring=1-q.rpx0/q.rpx1,q.rInscribed=y(q),C?ve.transition().attrTween("d",function(be){var Ae=Pe(be);return function(De){return ke(Ae(De))}}):ve.attr("d",ke),pe.call(g,D,k,S,{eventDataKeys:_.eventDataKeys,transitionTime:_.CLICK_TRANSITION_TIME,transitionEasing:_.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,k,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:k._transitioning}),ve.call(h,q,R);var ye=n.ensureSingle(pe,"g","slicetext"),le=n.ensureSingle(ye,"text","",function(be){be.attr("data-notex",1)}),fe=n.ensureUniformFontSize(k,b.determineTextFont(R,q,M.font));le.text(t.formatSliceLabel(q,D,R,S,M)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,fe).call(o.convertToTspans,k);var Te=i.bBox(le.node());q.transform=d(Te,q,P),q.transform.targetX=ze(q),q.transform.targetY=he(q);var xe=function(be,Ae){var De=be.transform;return u(De,Ae),De.fontSize=fe.size,s(R.type,De,M),n.getTextTransform(De)};C?le.transition().attrTween("transform",function(be){var Ae=Ee(be);return function(De){return xe(Ae(De),Te)}}):le.attr("transform",xe(q,Te))});function we(q){var pe=b.getPtId(q),ve=K[pe],ye=K[b.getPtId(D)],le;if(ye){var fe=(q.x1>ye.x1?2*Math.PI:0)+re;le=q.rpx1<ye.rpx1?{x0:q.x0,x1:q.x1,rpx0:0,rpx1:0}:{x0:fe,x1:fe,rpx0:q.rpx0,rpx1:q.rpx1}}else{var Te,xe=b.getPtId(q.parent);I.each(function(Fe){if(b.getPtId(Fe)===xe)return Te=Fe});var be=Te.children,Ae;be.forEach(function(Fe,st){if(b.getPtId(Fe)===pe)return Ae=st});var De=be.length,Oe=a(Te.x0,Te.x1);le={rpx0:X,rpx1:X,x0:Oe(Ae/De),x1:Oe((Ae+1)/De)}}return a(ve,le)}function Pe(q){var pe=K[b.getPtId(q)],ve,ye={x0:q.x0,x1:q.x1,rpx0:q.rpx0,rpx1:q.rpx1};if(pe)ve=pe;else if(W)if(q.parent)if(te){var le=(q.x1>te?2*Math.PI:0)+re;ve={x0:le,x1:le}}else ve={rpx0:X,rpx1:X},n.extendFlat(ve,Ce(q));else ve={rpx0:0,rpx1:0};else ve={x0:re,x1:re};return a(ve,ye)}function Ee(q){var pe=K[b.getPtId(q)],ve,ye=q.transform;if(pe)ve=pe;else if(ve={rpx1:q.rpx1,transform:{textPosAngle:ye.textPosAngle,scale:0,rotate:ye.rotate,rCenter:ye.rCenter,x:ye.x,y:ye.y}},W)if(q.parent)if(te){var le=q.x1>te?2*Math.PI:0;ve.x0=ve.x1=le}else n.extendFlat(ve,Ce(q));else ve.x0=ve.x1=re;else ve.x0=ve.x1=re;var fe=a(ve.transform.textPosAngle,q.transform.textPosAngle),Te=a(ve.rpx1,q.rpx1),xe=a(ve.x0,q.x0),be=a(ve.x1,q.x1),Ae=a(ve.transform.scale,ye.scale),De=a(ve.transform.rotate,ye.rotate),Oe=ye.rCenter===0?3:ve.transform.rCenter===0?1/3:1,Fe=a(ve.transform.rCenter,ye.rCenter),st=function(Xe){return Fe(Math.pow(Xe,Oe))};return function(Xe){var ut=Te(Xe),Ke=xe(Xe),ft=be(Xe),N=st(Xe),G=Re(ut,(Ke+ft)/2),j=fe(Xe),V={pxmid:G,rpx1:ut,transform:{textPosAngle:j,rCenter:N,x:ye.x,y:ye.y}};return s(R.type,ye,M),{transform:{targetX:ze(V),targetY:he(V),scale:Ae(Xe),rotate:De(Xe),rCenter:N}}}}function Ce(q){var pe=q.parent,ve=K[b.getPtId(pe)],ye={};if(ve){var le=pe.children,fe=le.indexOf(q),Te=le.length,xe=a(ve.x0,ve.x1);ye.x0=xe(fe/Te),ye.x1=xe(fe/Te)}else ye.x0=ye.x1=0;return ye}}function m(k){return r.partition().size([2*Math.PI,k.height+1])(k)}t.formatSliceLabel=function(k,S,A,$,M){var C=A.texttemplate,E=A.textinfo;if(!C&&(!E||E==="none"))return"";var I=M.separators,P=$[0],R=k.data.data,L=P.hierarchy,D=b.isHierarchyRoot(k),z=b.getParent(L,k),F=b.getValue(k);if(!C){var H=E.split("+"),U=function(oe){return H.indexOf(oe)!==-1},B=[],X;if(U("label")&&R.label&&B.push(R.label),R.hasOwnProperty("v")&&U("value")&&B.push(b.formatValue(R.v,I)),!D){U("current path")&&B.push(b.getPath(k.data));var O=0;U("percent parent")&&O++,U("percent entry")&&O++,U("percent root")&&O++;var Y=O>1;if(O){var W,K=function(oe){X=b.formatPercent(W,I),Y&&(X+=" of "+oe),B.push(X)};U("percent parent")&&!D&&(W=F/b.getValue(z),K("parent")),U("percent entry")&&(W=F/b.getValue(S),K("entry")),U("percent root")&&(W=F/b.getValue(L),K("root"))}}return U("text")&&(X=n.castOption(A,R.i,"text"),n.isValidTextValue(X)&&B.push(X)),B.join("<br>")}var Z=n.castOption(A,R.i,"texttemplate");if(!Z)return"";var ae={};R.label&&(ae.label=R.label),R.hasOwnProperty("v")&&(ae.value=R.v,ae.valueLabel=b.formatValue(R.v,I)),ae.currentPath=b.getPath(k.data),D||(ae.percentParent=F/b.getValue(z),ae.percentParentLabel=b.formatPercent(ae.percentParent,I),ae.parent=b.getPtLabel(z)),ae.percentEntry=F/b.getValue(S),ae.percentEntryLabel=b.formatPercent(ae.percentEntry,I),ae.entry=b.getPtLabel(S),ae.percentRoot=F/b.getValue(L),ae.percentRootLabel=b.formatPercent(ae.percentRoot,I),ae.root=b.getPtLabel(L),R.hasOwnProperty("color")&&(ae.color=R.color);var ne=n.castOption(A,R.i,"text");return(n.isValidTextValue(ne)||ne==="")&&(ae.text=ne),ae.customdata=n.castOption(A,R.i,"customdata"),n.texttemplateString(Z,ae,M._d3locale,ae,A._meta||{})};function y(k){return k.rpx0===0&&n.isFullCircle([k.x0,k.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(k.halfangle)),k.ring/2))}function x(k){return T(k.rpx1,k.transform.textPosAngle)}function T(k,S){return[k*Math.sin(S),-k*Math.cos(S)]}})(ok);var Qb=tt.exports,Gs=de.exports,Jb=Tt.exports,tH=ir,rH=ik,ex=gp.styleOne,Dv=Sc,ti=wi,aH=bp,iH=ok.formatSliceLabel,$v=!1,nH=function(e,r,a,i,n){var o=n.width,l=n.height,s=n.viewX,f=n.viewY,c=n.pathSlice,v=n.toMoveInsideSlice,u=n.strTransform,d=n.hasTransition,h=n.handleSlicesExit,p=n.makeUpdateSliceInterpolator,g=n.makeUpdateTextInterpolator,_=n.prevEntry,b={},w=e._fullLayout,m=r[0],y=m.trace,x=y.textposition.indexOf("left")!==-1,T=y.textposition.indexOf("right")!==-1,k=y.textposition.indexOf("bottom")!==-1,S=!k&&!y.marker.pad.t||k&&!y.marker.pad.b,A=rH(a,[o,l],{packing:y.tiling.packing,squarifyratio:y.tiling.squarifyratio,flipX:y.tiling.flip.indexOf("x")>-1,flipY:y.tiling.flip.indexOf("y")>-1,pad:{inner:y.tiling.pad,top:y.marker.pad.t,left:y.marker.pad.l,right:y.marker.pad.r,bottom:y.marker.pad.b}}),$=A.descendants(),M=1/0,C=-1/0;$.forEach(function(L){var D=L.depth;D>=y._maxDepth?(L.x0=L.x1=(L.x0+L.x1)/2,L.y0=L.y1=(L.y0+L.y1)/2):(M=Math.min(M,D),C=Math.max(C,D))}),i=i.data($,ti.getPtId),y._maxVisibleLayers=isFinite(C)?C-M+1:0,i.enter().append("g").classed("slice",!0),h(i,$v,b,[o,l],c),i.order();var E=null;if(d&&_){var I=ti.getPtId(_);i.each(function(L){E===null&&ti.getPtId(L)===I&&(E={x0:L.x0,x1:L.x1,y0:L.y0,y1:L.y1})})}var P=function(){return E||{x0:0,x1:o,y0:0,y1:l}},R=i;return d&&(R=R.transition().each("end",function(){var L=Qb.select(this);ti.setSliceCursor(L,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),R.each(function(L){var D=ti.isHeader(L,y);L._x0=s(L.x0),L._x1=s(L.x1),L._y0=f(L.y0),L._y1=f(L.y1),L._hoverX=s(L.x1-y.marker.pad.r),L._hoverY=f(k?L.y1-y.marker.pad.b/2:L.y0+y.marker.pad.t/2);var z=Qb.select(this),F=Gs.ensureSingle(z,"path","surface",function(X){X.style("pointer-events","all")});d?F.transition().attrTween("d",function(X){var O=p(X,$v,P(),[o,l]);return function(Y){return c(O(Y))}}):F.attr("d",c),z.call(aH,a,e,r,{styleOne:ex,eventDataKeys:Dv.eventDataKeys,transitionTime:Dv.CLICK_TRANSITION_TIME,transitionEasing:Dv.CLICK_TRANSITION_EASING}).call(ti.setSliceCursor,e,{isTransitioning:e._transitioning}),F.call(ex,L,y,{hovered:!1}),L.x0===L.x1||L.y0===L.y1?L._text="":D?L._text=S?"":ti.getPtLabel(L)||"":L._text=iH(L,a,y,r,w)||"";var H=Gs.ensureSingle(z,"g","slicetext"),U=Gs.ensureSingle(H,"text","",function(X){X.attr("data-notex",1)}),B=Gs.ensureUniformFontSize(e,ti.determineTextFont(y,L,w.font));U.text(L._text||" ").classed("slicetext",!0).attr("text-anchor",T?"end":x||D?"start":"middle").call(Jb.font,B).call(tH.convertToTspans,e),L.textBB=Jb.bBox(U.node()),L.transform=v(L,{fontSize:B.size,isHeader:D}),L.transform.fontSize=B.size,d?U.transition().attrTween("transform",function(X){var O=g(X,$v,P(),[o,l]);return function(Y){return u(O(Y))}}):U.attr("transform",u(L))}),E},oH=K8,lH=nH,sH=function(e,r,a,i){return oH(e,r,a,i,{type:"treemap",drawDescendants:lH})},fH={moduleType:"trace",name:"treemap",basePlotModule:K2,categories:[],animatable:!0,attributes:J2,layoutAttributes:ek,supplyDefaults:T8,supplyLayoutDefaults:M8,calc:Bf.calc,crossTraceCalc:Bf.crossTraceCalc,plot:sH,style:gp.style,colorbar:Ol,meta:{description:["Visualize hierarchal data from leaves (and/or outer branches) towards root","with rectangles. The treemap sectors are determined by the entries in","*labels* or *ids* and in *parents*."].join(" ")}};(function(t){t.exports=fH})(Z2);const gH=pi(Z2.exports);var sk={};(function(t){function e(y){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(T){return typeof T}:e=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},e(y)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r=o(Tk.exports),a=i(kk.exports);function i(y){return y&&y.__esModule?y:{default:y}}function n(){if(typeof WeakMap!="function")return null;var y=new WeakMap;return n=function(){return y},y}function o(y){if(y&&y.__esModule)return y;if(y===null||e(y)!=="object"&&typeof y!="function")return{default:y};var x=n();if(x&&x.has(y))return x.get(y);var T={},k=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in y)if(Object.prototype.hasOwnProperty.call(y,S)){var A=k?Object.getOwnPropertyDescriptor(y,S):null;A&&(A.get||A.set)?Object.defineProperty(T,S,A):T[S]=y[S]}return T.default=y,x&&x.set(y,T),T}function l(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function s(y,x){for(var T=0;T<x.length;T++){var k=x[T];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(y,k.key,k)}}function f(y,x,T){return x&&s(y.prototype,x),T&&s(y,T),y}function c(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),x&&v(y,x)}function v(y,x){return v=Object.setPrototypeOf||function(k,S){return k.__proto__=S,k},v(y,x)}function u(y){var x=p();return function(){var k=g(y),S;if(x){var A=g(this).constructor;S=Reflect.construct(k,arguments,A)}else S=k.apply(this,arguments);return d(this,S)}}function d(y,x){return x&&(e(x)==="object"||typeof x=="function")?x:h(y)}function h(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function g(y){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},g(y)}var _=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover"],b=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],w=typeof window<"u";function m(y){var x=function(T){c(S,T);var k=u(S);function S(A){var $;return l(this,S),$=k.call(this,A),$.p=Promise.resolve(),$.resizeHandler=null,$.handlers={},$.syncWindowResize=$.syncWindowResize.bind(h($)),$.syncEventHandlers=$.syncEventHandlers.bind(h($)),$.attachUpdateEvents=$.attachUpdateEvents.bind(h($)),$.getRef=$.getRef.bind(h($)),$.handleUpdate=$.handleUpdate.bind(h($)),$.figureCallback=$.figureCallback.bind(h($)),$.updatePlotly=$.updatePlotly.bind(h($)),$}return f(S,[{key:"updatePlotly",value:function($,M,C){var E=this;this.p=this.p.then(function(){if(!E.unmounting){if(!E.el)throw new Error("Missing element reference");return y.react(E.el,{data:E.props.data,layout:E.props.layout,config:E.props.config,frames:E.props.frames})}}).then(function(){E.unmounting||(E.syncWindowResize($),E.syncEventHandlers(),E.figureCallback(M),C&&E.attachUpdateEvents())}).catch(function(I){E.props.onError&&E.props.onError(I)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function($){this.unmounting=!1;var M=$.frames&&$.frames.length?$.frames.length:0,C=this.props.frames&&this.props.frames.length?this.props.frames.length:0,E=!($.layout===this.props.layout&&$.data===this.props.data&&$.config===this.props.config&&C===M),I=$.revision!==void 0,P=$.revision!==this.props.revision;!E&&(!I||I&&!P)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&w&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),y.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var $=this;!this.el||!this.el.removeListener||b.forEach(function(M){$.el.on(M,$.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var $=this;!this.el||!this.el.removeListener||b.forEach(function(M){$.el.removeListener(M,$.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function($){if(typeof $=="function"){var M=this.el,C=M.data,E=M.layout,I=this.el._transitionData?this.el._transitionData._frames:null,P={data:C,layout:E,frames:I};$(P,this.el)}}},{key:"syncWindowResize",value:function($){var M=this;!w||(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return y.Plots.resize(M.el)},window.addEventListener("resize",this.resizeHandler),$&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function($){this.el=$,this.props.debug&&w&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var $=this;_.forEach(function(M){var C=$.props["on"+M],E=$.handlers[M],I=Boolean(E);C&&!I?$.addEventHandler(M,C):!C&&I?$.removeEventHandler(M):C&&I&&C!==E&&($.removeEventHandler(M),$.addEventHandler(M,C))})}},{key:"addEventHandler",value:function($,M){this.handlers[$]=M,this.el.on(this.getPlotlyEventName($),this.handlers[$])}},{key:"removeEventHandler",value:function($){this.el.removeListener(this.getPlotlyEventName($),this.handlers[$]),delete this.handlers[$]}},{key:"getPlotlyEventName",value:function($){return"plotly_"+$.toLowerCase()}},{key:"render",value:function(){return r.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),S}(r.Component);return x.propTypes={data:a.default.arrayOf(a.default.object),config:a.default.object,layout:a.default.object,frames:a.default.arrayOf(a.default.object),revision:a.default.number,onInitialized:a.default.func,onPurge:a.default.func,onError:a.default.func,onUpdate:a.default.func,debug:a.default.bool,style:a.default.object,className:a.default.string,useResizeHandler:a.default.bool,divId:a.default.string},_.forEach(function(T){x.propTypes["on"+T]=a.default.func}),x.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},x}})(sk);const bH=pi(sk);export{vH as P,dH as b,bH as c,hH as h,mH as o,pH as p,yH as s,gH as t};
7
+ //# sourceMappingURL=plotly.7ac8f807.js.map