1.3333333333333333-h?d:h}},70461:function(o,a,n){var l=n(71828),f=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];o.exports=function(s,c,d,h){return s=d==="left"?0:d==="center"?1:d==="right"?2:l.constrain(Math.floor(3*s),0,2),c=h==="bottom"?0:h==="middle"?1:h==="top"?2:l.constrain(Math.floor(3*c),0,2),f[c][s]}},64505:function(o,a){a.selectMode=function(n){return n==="lasso"||n==="select"},a.drawMode=function(n){return n==="drawclosedpath"||n==="drawopenpath"||n==="drawline"||n==="drawrect"||n==="drawcircle"},a.openMode=function(n){return n==="drawline"||n==="drawopenpath"},a.rectMode=function(n){return n==="select"||n==="drawline"||n==="drawrect"||n==="drawcircle"},a.freeMode=function(n){return n==="lasso"||n==="drawclosedpath"||n==="drawopenpath"},a.selectingOrDrawing=function(n){return a.freeMode(n)||a.rectMode(n)}},28569:function(o,a,n){var l=n(48956),f=n(57035),s=n(38520),c=n(71828).removeElement,d=n(85555),h=o.exports={};h.align=n(92807),h.getCursor=n(70461);var p=n(26041);function m(){var v=document.createElement("div");v.className="dragcover";var g=v.style;return g.position="fixed",g.left=0,g.right=0,g.top=0,g.bottom=0,g.zIndex=999999999,g.background="none",document.body.appendChild(v),v}function y(v){return l(v.changedTouches?v.changedTouches[0]:v,document.body)}h.unhover=p.wrapped,h.unhoverRaw=p.raw,h.init=function(v){var g,b,x,_,w,k,T,M,S=v.gd,C=1,P=S._context.doubleClickDelay,D=v.element;S._mouseDownTime||(S._mouseDownTime=0),D.style.pointerEvents="all",D.onmousedown=R,s?(D._ontouchstart&&D.removeEventListener("touchstart",D._ontouchstart),D._ontouchstart=R,D.addEventListener("touchstart",R,{passive:!1})):D.ontouchstart=R;var O=v.clampFn||function(z,B,$){return Math.abs(z)<$&&(z=0),Math.abs(B)<$&&(B=0),[z,B]};function R(z){S._dragged=!1,S._dragging=!0;var B=y(z);g=B[0],b=B[1],T=z.target,k=z,M=z.buttons===2||z.ctrlKey,z.clientX===void 0&&z.clientY===void 0&&(z.clientX=g,z.clientY=b),(x=new Date().getTime())-S._mouseDownTimeP&&(C=Math.max(C-1,1)),S._dragged)v.doneFn&&v.doneFn();else if(v.clickFn&&v.clickFn(C,k),!M){var B;try{B=new MouseEvent("click",z)}catch{var $=y(z);(B=document.createEvent("MouseEvents")).initMouseEvent("click",z.bubbles,z.cancelable,z.view,z.detail,z.screenX,z.screenY,$[0],$[1],z.ctrlKey,z.altKey,z.shiftKey,z.metaKey,z.button,z.relatedTarget)}T.dispatchEvent(B)}S._dragging=!1,S._dragged=!1}else S._dragged=!1}},h.coverSlip=m},26041:function(o,a,n){var l=n(11086),f=n(79990),s=n(24401).getGraphDiv,c=n(26675),d=o.exports={};d.wrapped=function(h,p,m){(h=s(h))._fullLayout&&f.clear(h._fullLayout._uid+c.HOVERID),d.raw(h,p,m)},d.raw=function(h,p){var m=h._fullLayout,y=h._hoverdata;p||(p={}),p.target&&!h._dragged&&l.triggerHandler(h,"plotly_beforehover",p)===!1||(m._hoverlayer.selectAll("g").remove(),m._hoverlayer.selectAll("line").remove(),m._hoverlayer.selectAll("circle").remove(),h._hoverdata=void 0,p.target&&y&&h.emit("plotly_unhover",{event:p,points:y}))}},79952:function(o,a){a.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},a.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},91424:function(o,a,n){var l=n(39898),f=n(71828),s=f.numberFormat,c=n(92770),d=n(84267),h=n(73972),p=n(7901),m=n(21081),y=f.strTranslate,v=n(63893),g=n(77922),b=n(18783).LINE_SPACING,x=n(37822).DESELECTDIM,_=n(34098),w=n(39984),k=n(23469).appendArrayPointValue,T=o.exports={};function M(ce,ye,J){var ne=ye.fillpattern,de=ne&&T.getPatternAttr(ne.shape,0,"");if(de){var xe=T.getPatternAttr(ne.bgcolor,0,null),ue=T.getPatternAttr(ne.fgcolor,0,null),ge=ne.fgopacity,be=T.getPatternAttr(ne.size,0,8),we=T.getPatternAttr(ne.solidity,0,.3),ke=ye.uid;T.pattern(ce,"point",J,ke,de,be,we,void 0,ne.fillmode,xe,ue,ge)}else ye.fillcolor&&ce.call(p.fill,ye.fillcolor)}T.font=function(ce,ye,J,ne){f.isPlainObject(ye)&&(ne=ye.color,J=ye.size,ye=ye.family),ye&&ce.style("font-family",ye),J+1&&ce.style("font-size",J+"px"),ne&&ce.call(p.fill,ne)},T.setPosition=function(ce,ye,J){ce.attr("x",ye).attr("y",J)},T.setSize=function(ce,ye,J){ce.attr("width",ye).attr("height",J)},T.setRect=function(ce,ye,J,ne,de){ce.call(T.setPosition,ye,J).call(T.setSize,ne,de)},T.translatePoint=function(ce,ye,J,ne){var de=J.c2p(ce.x),xe=ne.c2p(ce.y);return!!(c(de)&&c(xe)&&ye.node())&&(ye.node().nodeName==="text"?ye.attr("x",de).attr("y",xe):ye.attr("transform",y(de,xe)),!0)},T.translatePoints=function(ce,ye,J){ce.each(function(ne){var de=l.select(this);T.translatePoint(ne,de,ye,J)})},T.hideOutsideRangePoint=function(ce,ye,J,ne,de,xe){ye.attr("display",J.isPtWithinRange(ce,de)&&ne.isPtWithinRange(ce,xe)?null:"none")},T.hideOutsideRangePoints=function(ce,ye){if(ye._hasClipOnAxisFalse){var J=ye.xaxis,ne=ye.yaxis;ce.each(function(de){var xe=de[0].trace,ue=xe.xcalendar,ge=xe.ycalendar,be=h.traceIs(xe,"bar-like")?".bartext":".point,.textpoint";ce.selectAll(be).each(function(we){T.hideOutsideRangePoint(we,l.select(this),J,ne,ue,ge)})})}},T.crispRound=function(ce,ye,J){return ye&&c(ye)?ce._context.staticPlot?ye:ye<1?1:Math.round(ye):J||0},T.singleLineStyle=function(ce,ye,J,ne,de){ye.style("fill","none");var xe=(((ce||[])[0]||{}).trace||{}).line||{},ue=J||xe.width||0,ge=de||xe.dash||"";p.stroke(ye,ne||xe.color),T.dashLine(ye,ge,ue)},T.lineGroupStyle=function(ce,ye,J,ne){ce.style("fill","none").each(function(de){var xe=(((de||[])[0]||{}).trace||{}).line||{},ue=ye||xe.width||0,ge=ne||xe.dash||"";l.select(this).call(p.stroke,J||xe.color).call(T.dashLine,ge,ue)})},T.dashLine=function(ce,ye,J){J=+J||0,ye=T.dashStyle(ye,J),ce.style({"stroke-dasharray":ye,"stroke-width":J+"px"})},T.dashStyle=function(ce,ye){ye=+ye||1;var J=Math.max(ye,3);return ce==="solid"?ce="":ce==="dot"?ce=J+"px,"+J+"px":ce==="dash"?ce=3*J+"px,"+3*J+"px":ce==="longdash"?ce=5*J+"px,"+5*J+"px":ce==="dashdot"?ce=3*J+"px,"+J+"px,"+J+"px,"+J+"px":ce==="longdashdot"&&(ce=5*J+"px,"+2*J+"px,"+J+"px,"+2*J+"px"),ce},T.singleFillStyle=function(ce,ye){var J=l.select(ce.node());M(ce,((J.data()[0]||[])[0]||{}).trace||{},ye)},T.fillGroupStyle=function(ce,ye){ce.style("stroke-width",0).each(function(J){var ne=l.select(this);J[0].trace&&M(ne,J[0].trace,ye)})};var S=n(90998);T.symbolNames=[],T.symbolFuncs=[],T.symbolBackOffs=[],T.symbolNeedLines={},T.symbolNoDot={},T.symbolNoFill={},T.symbolList=[],Object.keys(S).forEach(function(ce){var ye=S[ce],J=ye.n;T.symbolList.push(J,String(J),ce,J+100,String(J+100),ce+"-open"),T.symbolNames[J]=ce,T.symbolFuncs[J]=ye.f,T.symbolBackOffs[J]=ye.backoff||0,ye.needLine&&(T.symbolNeedLines[J]=!0),ye.noDot?T.symbolNoDot[J]=!0:T.symbolList.push(J+200,String(J+200),ce+"-dot",J+300,String(J+300),ce+"-open-dot"),ye.noFill&&(T.symbolNoFill[J]=!0)});var C=T.symbolNames.length;function P(ce,ye,J,ne){var de=ce%100;return T.symbolFuncs[de](ye,J,ne)+(ce>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}T.symbolNumber=function(ce){if(c(ce))ce=+ce;else if(typeof ce=="string"){var ye=0;ce.indexOf("-open")>0&&(ye=100,ce=ce.replace("-open","")),ce.indexOf("-dot")>0&&(ye+=200,ce=ce.replace("-dot","")),(ce=T.symbolNames.indexOf(ce))>=0&&(ce+=ye)}return ce%100>=C||ce>=400?0:Math.floor(Math.max(ce,0))};var D={x1:1,x2:0,y1:0,y2:0},O={x1:0,x2:0,y1:1,y2:0},R=s("~f"),F={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:D},horizontalreversed:{node:"linearGradient",attrs:D,reversed:!0},vertical:{node:"linearGradient",attrs:O},verticalreversed:{node:"linearGradient",attrs:O,reversed:!0}};T.gradient=function(ce,ye,J,ne,de,xe){for(var ue=de.length,ge=F[ne],be=new Array(ue),we=0;we=0&&ce.i===void 0&&(ce.i=xe.i),ye.style("opacity",ne.selectedOpacityFn?ne.selectedOpacityFn(ce):ce.mo===void 0?ue.opacity:ce.mo),ne.ms2mrc){var be;be=ce.ms==="various"||ue.size==="various"?3:ne.ms2mrc(ce.ms),ce.mrc=be,ne.selectedSizeFn&&(be=ce.mrc=ne.selectedSizeFn(ce));var we=T.symbolNumber(ce.mx||ue.symbol)||0;ce.om=we%200>=100;var ke=Me(ce,J),Ae=Y(ce,J);ye.attr("d",P(we,be,ke,Ae))}var Ee,De,Re,Ie=!1;if(ce.so)Re=ge.outlierwidth,De=ge.outliercolor,Ee=ue.outliercolor;else{var Be=(ge||{}).width;Re=(ce.mlw+1||Be+1||(ce.trace?(ce.trace.marker.line||{}).width:0)+1)-1||0,De="mlc"in ce?ce.mlcc=ne.lineScale(ce.mlc):f.isArrayOrTypedArray(ge.color)?p.defaultLine:ge.color,f.isArrayOrTypedArray(ue.color)&&(Ee=p.defaultLine,Ie=!0),Ee="mc"in ce?ce.mcc=ne.markerScale(ce.mc):ue.color||ue.colors||"rgba(0,0,0,0)",ne.selectedColorFn&&(Ee=ne.selectedColorFn(ce))}if(ce.om)ye.call(p.stroke,Ee).style({"stroke-width":(Re||1)+"px",fill:"none"});else{ye.style("stroke-width",(ce.isBlank?0:Re)+"px");var Ue=ue.gradient,qe=ce.mgt;qe?Ie=!0:qe=Ue&&Ue.type,f.isArrayOrTypedArray(qe)&&(qe=qe[0],F[qe]||(qe=0));var Ye=ue.pattern,at=Ye&&T.getPatternAttr(Ye.shape,ce.i,"");if(qe&&qe!=="none"){var lt=ce.mgc;lt?Ie=!0:lt=Ue.color;var ct=J.uid;Ie&&(ct+="-"+ce.i),T.gradient(ye,de,ct,qe,[[0,lt],[1,Ee]],"fill")}else if(at){var bt=!1,ze=Ye.fgcolor;!ze&&xe&&xe.color&&(ze=xe.color,bt=!0);var Ne=T.getPatternAttr(ze,ce.i,xe&&xe.color||null),Qe=T.getPatternAttr(Ye.bgcolor,ce.i,null),it=Ye.fgopacity,kt=T.getPatternAttr(Ye.size,ce.i,8),Je=T.getPatternAttr(Ye.solidity,ce.i,.3);bt=bt||ce.mcc||f.isArrayOrTypedArray(Ye.shape)||f.isArrayOrTypedArray(Ye.bgcolor)||f.isArrayOrTypedArray(Ye.fgcolor)||f.isArrayOrTypedArray(Ye.size)||f.isArrayOrTypedArray(Ye.solidity);var ut=J.uid;bt&&(ut+="-"+ce.i),T.pattern(ye,"point",de,ut,at,kt,Je,ce.mcc,Ye.fillmode,Qe,Ne,it)}else f.isArrayOrTypedArray(Ee)?p.fill(ye,Ee[ce.i]):p.fill(ye,Ee);Re&&p.stroke(ye,De)}},T.makePointStyleFns=function(ce){var ye={},J=ce.marker;return ye.markerScale=T.tryColorscale(J,""),ye.lineScale=T.tryColorscale(J,"line"),h.traceIs(ce,"symbols")&&(ye.ms2mrc=_.isBubble(ce)?w(ce):function(){return(J.size||6)/2}),ce.selectedpoints&&f.extendFlat(ye,T.makeSelectedPointStyleFns(ce)),ye},T.makeSelectedPointStyleFns=function(ce){var ye={},J=ce.selected||{},ne=ce.unselected||{},de=ce.marker||{},xe=J.marker||{},ue=ne.marker||{},ge=de.opacity,be=xe.opacity,we=ue.opacity,ke=be!==void 0,Ae=we!==void 0;(f.isArrayOrTypedArray(ge)||ke||Ae)&&(ye.selectedOpacityFn=function(at){var lt=at.mo===void 0?de.opacity:at.mo;return at.selected?ke?be:lt:Ae?we:x*lt});var Ee=de.color,De=xe.color,Re=ue.color;(De||Re)&&(ye.selectedColorFn=function(at){var lt=at.mcc||Ee;return at.selected?De||lt:Re||lt});var Ie=de.size,Be=xe.size,Ue=ue.size,qe=Be!==void 0,Ye=Ue!==void 0;return h.traceIs(ce,"symbols")&&(qe||Ye)&&(ye.selectedSizeFn=function(at){var lt=at.mrc||Ie/2;return at.selected?qe?Be/2:lt:Ye?Ue/2:lt}),ye},T.makeSelectedTextStyleFns=function(ce){var ye={},J=ce.selected||{},ne=ce.unselected||{},de=ce.textfont||{},xe=J.textfont||{},ue=ne.textfont||{},ge=de.color,be=xe.color,we=ue.color;return ye.selectedTextColorFn=function(ke){var Ae=ke.tc||ge;return ke.selected?be||Ae:we||(be?Ae:p.addOpacity(Ae,x))},ye},T.selectedPointStyle=function(ce,ye){if(ce.size()&&ye.selectedpoints){var J=T.makeSelectedPointStyleFns(ye),ne=ye.marker||{},de=[];J.selectedOpacityFn&&de.push(function(xe,ue){xe.style("opacity",J.selectedOpacityFn(ue))}),J.selectedColorFn&&de.push(function(xe,ue){p.fill(xe,J.selectedColorFn(ue))}),J.selectedSizeFn&&de.push(function(xe,ue){var ge=ue.mx||ne.symbol||0,be=J.selectedSizeFn(ue);xe.attr("d",P(T.symbolNumber(ge),be,Me(ue,ye),Y(ue,ye))),ue.mrc2=be}),de.length&&ce.each(function(xe){for(var ue=l.select(this),ge=0;ge0?J:0}function N(ce,ye,J){return J&&(ce=H(ce)),ye?W(ce[1]):E(ce[0])}function E(ce){var ye=l.round(ce,2);return A=ye,ye}function W(ce){var ye=l.round(ce,2);return z=ye,ye}function G(ce,ye,J,ne){var de=ce[0]-ye[0],xe=ce[1]-ye[1],ue=J[0]-ye[0],ge=J[1]-ye[1],be=Math.pow(de*de+xe*xe,.25),we=Math.pow(ue*ue+ge*ge,.25),ke=(we*we*de-be*be*ue)*ne,Ae=(we*we*xe-be*be*ge)*ne,Ee=3*we*(be+we),De=3*be*(be+we);return[[E(ye[0]+(Ee&&ke/Ee)),W(ye[1]+(Ee&&Ae/Ee))],[E(ye[0]-(De&&ke/De)),W(ye[1]-(De&&Ae/De))]]}T.textPointStyle=function(ce,ye,J){if(ce.size()){var ne;if(ye.selectedpoints){var de=T.makeSelectedTextStyleFns(ye);ne=de.selectedTextColorFn}var xe=ye.texttemplate,ue=J._fullLayout;ce.each(function(ge){var be=l.select(this),we=xe?f.extractOption(ge,ye,"txt","texttemplate"):f.extractOption(ge,ye,"tx","text");if(we||we===0){if(xe){var ke=ye._module.formatLabels,Ae=ke?ke(ge,ye,ue):{},Ee={};k(Ee,ye,ge.i);var De=ye._meta||{};we=f.texttemplateString(we,Ae,ue._d3locale,Ee,ge,De)}var Re=ge.tp||ye.textposition,Ie=j(ge,ye),Be=ne?ne(ge):ge.tc||ye.textfont.color;be.call(T.font,ge.tf||ye.textfont.family,Ie,Be).text(we).call(v.convertToTspans,J).call($,Re,Ie,ge.mrc)}else be.remove()})}},T.selectedTextStyle=function(ce,ye){if(ce.size()&&ye.selectedpoints){var J=T.makeSelectedTextStyleFns(ye);ce.each(function(ne){var de=l.select(this),xe=J.selectedTextColorFn(ne),ue=ne.tp||ye.textposition,ge=j(ne,ye);p.fill(de,xe);var be=h.traceIs(ye,"bar-like");$(de,ue,ge,ne.mrc2||ne.mrc,be)})}},T.smoothopen=function(ce,ye){if(ce.length<3)return"M"+ce.join("L");var J,ne="M"+ce[0],de=[];for(J=1;J=be||at>=ke&&at<=be)&&(lt<=Ae&<>=we||lt>=Ae&<<=we)&&(ce=[at,lt])}return ce}T.steps=function(ce){var ye=L[ce]||q;return function(J){for(var ne="M"+E(J[0][0])+","+W(J[0][1]),de=J.length,xe=1;xe=1e4&&(T.savedBBoxes={},V=0),J&&(T.savedBBoxes[J]=De),V++,f.extendFlat({},De)},T.setClipUrl=function(ce,ye,J){ce.attr("clip-path",ee(ye,J))},T.getTranslate=function(ce){var ye=(ce[ce.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(J,ne,de){return[ne,de].join(" ")}).split(" ");return{x:+ye[0]||0,y:+ye[1]||0}},T.setTranslate=function(ce,ye,J){var ne=ce.attr?"attr":"getAttribute",de=ce.attr?"attr":"setAttribute",xe=ce[ne]("transform")||"";return ye=ye||0,J=J||0,xe=xe.replace(/(\btranslate\(.*?\);?)/,"").trim(),xe=(xe+=y(ye,J)).trim(),ce[de]("transform",xe),xe},T.getScale=function(ce){var ye=(ce[ce.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(J,ne,de){return[ne,de].join(" ")}).split(" ");return{x:+ye[0]||1,y:+ye[1]||1}},T.setScale=function(ce,ye,J){var ne=ce.attr?"attr":"getAttribute",de=ce.attr?"attr":"setAttribute",xe=ce[ne]("transform")||"";return ye=ye||1,J=J||1,xe=xe.replace(/(\bscale\(.*?\);?)/,"").trim(),xe=(xe+="scale("+ye+","+J+")").trim(),ce[de]("transform",xe),xe};var U=/\s*sc.*/;T.setPointGroupScale=function(ce,ye,J){if(ye=ye||1,J=J||1,ce){var ne=ye===1&&J===1?"":"scale("+ye+","+J+")";ce.each(function(){var de=(this.getAttribute("transform")||"").replace(U,"");de=(de+=ne).trim(),this.setAttribute("transform",de)})}};var Q=/translate\([^)]*\)\s*$/;function Y(ce,ye){var J;return ce&&(J=ce.mf),J===void 0&&(J=ye.marker&&ye.marker.standoff||0),ye._geo||ye._xA?J:-J}T.setTextPointsScale=function(ce,ye,J){ce&&ce.each(function(){var ne,de=l.select(this),xe=de.select("text");if(xe.node()){var ue=parseFloat(xe.attr("x")||0),ge=parseFloat(xe.attr("y")||0),be=(de.attr("transform")||"").match(Q);ne=ye===1&&J===1?[]:[y(ue,ge),"scale("+ye+","+J+")",y(-ue,-ge)],be&&ne.push(be),de.attr("transform",ne.join(""))}})},T.getMarkerStandoff=Y;var Z,X,re,ie,le,se,pe=Math.atan2,Te=Math.cos,Se=Math.sin;function Oe(ce,ye){var J=ye[0],ne=ye[1];return[J*Te(ce)-ne*Se(ce),J*Se(ce)+ne*Te(ce)]}function Me(ce,ye){var J,ne,de=ce.ma;de===void 0&&(de=ye.marker.angle||0);var xe=ye.marker.angleref;if(xe==="previous"||xe==="north"){if(ye._geo){var ue=ye._geo.project(ce.lonlat);J=ue[0],ne=ue[1]}else{var ge=ye._xA,be=ye._yA;if(!ge||!be)return 90;J=ge.c2p(ce.x),ne=be.c2p(ce.y)}if(ye._geo){var we,ke=ce.lonlat[0],Ae=ce.lonlat[1],Ee=ye._geo.project([ke,Ae+1e-5]),De=ye._geo.project([ke+1e-5,Ae]),Re=pe(De[1]-ne,De[0]-J),Ie=pe(Ee[1]-ne,Ee[0]-J);if(xe==="north")we=de/180*Math.PI;else if(xe==="previous"){var Be=ke/180*Math.PI,Ue=Ae/180*Math.PI,qe=Z/180*Math.PI,Ye=X/180*Math.PI,at=qe-Be,lt=Te(Ye)*Se(at),ct=Se(Ye)*Te(Ue)-Te(Ye)*Se(Ue)*Te(at);we=-pe(lt,ct)-Math.PI,Z=ke,X=Ae}var bt=Oe(Re,[Te(we),0]),ze=Oe(Ie,[Se(we),0]);de=pe(bt[1]+ze[1],bt[0]+ze[0])/Math.PI*180,xe!=="previous"||se===ye.uid&&ce.i===le+1||(de=null)}if(xe==="previous"&&!ye._geo)if(se===ye.uid&&ce.i===le+1&&c(J)&&c(ne)){var Ne=J-re,Qe=ne-ie,it=ye.line&&ye.line.shape||"",kt=it.slice(it.length-1);kt==="h"&&(Qe=0),kt==="v"&&(Ne=0),de+=pe(Qe,Ne)/Math.PI*180+90}else de=null}return re=J,ie=ne,le=ce.i,se=ye.uid,de}T.getMarkerAngle=Me},90998:function(o,a,n){var l,f,s,c,d=n(95616),h=n(39898).round,p="M0,0Z",m=Math.sqrt(2),y=Math.sqrt(3),v=Math.PI,g=Math.cos,b=Math.sin;function x(w){return w===null}function _(w,k,T){if(!(w&&w%360!=0||k))return T;if(s===w&&c===k&&l===T)return f;function M(N,E){var W=g(N),G=b(N),L=E[0],q=E[1]+(k||0);return[L*W-q*G,L*G+q*W]}s=w,c=k,l=T;for(var S=w/180*v,C=0,P=0,D=d(T),O="",R=0;R0,b=d._context.staticPlot;h.each(function(x){var _,w=x[0].trace,k=w.error_x||{},T=w.error_y||{};w.ids&&(_=function(P){return P.id});var M=c.hasMarkers(w)&&w.marker.maxdisplayed>0;T.visible||k.visible||(x=[]);var S=l.select(this).selectAll("g.errorbar").data(x,_);if(S.exit().remove(),x.length){k.visible||S.selectAll("path.xerror").remove(),T.visible||S.selectAll("path.yerror").remove(),S.style("opacity",1);var C=S.enter().append("g").classed("errorbar",!0);g&&C.style("opacity",0).transition().duration(m.duration).style("opacity",1),s.setClipUrl(S,p.layerClipId,d),S.each(function(P){var D=l.select(this),O=function($,j,N){var E={x:j.c2p($.x),y:N.c2p($.y)};return $.yh!==void 0&&(E.yh=N.c2p($.yh),E.ys=N.c2p($.ys),f(E.ys)||(E.noYS=!0,E.ys=N.c2p($.ys,!0))),$.xh!==void 0&&(E.xh=j.c2p($.xh),E.xs=j.c2p($.xs),f(E.xs)||(E.noXS=!0,E.xs=j.c2p($.xs,!0))),E}(P,y,v);if(!M||P.vis){var R,F=D.select("path.yerror");if(T.visible&&f(O.x)&&f(O.yh)&&f(O.ys)){var A=T.width;R="M"+(O.x-A)+","+O.yh+"h"+2*A+"m-"+A+",0V"+O.ys,O.noYS||(R+="m-"+A+",0h"+2*A),F.size()?g&&(F=F.transition().duration(m.duration).ease(m.easing)):F=D.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("yerror",!0),F.attr("d",R)}else F.remove();var z=D.select("path.xerror");if(k.visible&&f(O.y)&&f(O.xh)&&f(O.xs)){var B=(k.copy_ystyle?T:k).width;R="M"+O.xh+","+(O.y-B)+"v"+2*B+"m0,-"+B+"H"+O.xs,O.noXS||(R+="m0,-"+B+"v"+2*B),z.size()?g&&(z=z.transition().duration(m.duration).ease(m.easing)):z=D.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("xerror",!0),z.attr("d",R)}else z.remove()}})}})}},62662:function(o,a,n){var l=n(39898),f=n(7901);o.exports=function(s){s.each(function(c){var d=c[0].trace,h=d.error_y||{},p=d.error_x||{},m=l.select(this);m.selectAll("path.yerror").style("stroke-width",h.thickness+"px").call(f.stroke,h.color),p.copy_ystyle&&(p=h),m.selectAll("path.xerror").style("stroke-width",p.thickness+"px").call(f.stroke,p.color)})}},77914:function(o,a,n){var l=n(41940),f=n(528).hoverlabel,s=n(1426).extendFlat;o.exports={hoverlabel:{bgcolor:s({},f.bgcolor,{arrayOk:!0}),bordercolor:s({},f.bordercolor,{arrayOk:!0}),font:l({arrayOk:!0,editType:"none"}),align:s({},f.align,{arrayOk:!0}),namelength:s({},f.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(o,a,n){var l=n(71828),f=n(73972);function s(c,d,h,p){p=p||l.identity,Array.isArray(c)&&(d[0][h]=p(c))}o.exports=function(c){var d=c.calcdata,h=c._fullLayout;function p(b){return function(x){return l.coerceHoverinfo({hoverinfo:x},{_module:b._module},h)}}for(var m=0;m=0&&y.indexde[0]._length||pt<0||pt>xe[0]._length)return b.unhoverRaw(ie,le)}else ut="xpx"in le?le.xpx:de[0]._length/2,pt="ypx"in le?le.ypx:xe[0]._length/2;if(le.pointerX=ut+de[0]._offset,le.pointerY=pt+xe[0]._offset,De="xval"in le?w.flat(Se,le.xval):w.p2c(de,ut),Re="yval"in le?w.flat(Se,le.yval):w.p2c(xe,pt),!f(De[0])||!f(Re[0]))return c.warn("Fx.hover failed",le,ie),b.unhoverRaw(ie,le)}var zt=1/0;function wt(Zt,pn){for(Be=0;BeNe&&(Qe.splice(0,Ne),zt=Qe[0].distance),ye&&Ee!==0&&Qe.length===0){ze.distance=Ee,ze.index=!1;var Dn=qe._module.hoverPoints(ze,ct,bt,"closest",{hoverLayer:Oe._hoverlayer});if(Dn&&(Dn=Dn.filter(function(lr){return lr.spikeDistance<=Ee})),Dn&&Dn.length){var wn,En=Dn.filter(function(lr){return lr.xa.showspikes&&lr.xa.spikesnap!=="hovered data"});if(En.length){var tr=En[0];f(tr.x0)&&f(tr.y0)&&(wn=_e(tr),(!kt.vLinePoint||kt.vLinePoint.spikeDistance>wn.spikeDistance)&&(kt.vLinePoint=wn))}var oa=Dn.filter(function(lr){return lr.ya.showspikes&&lr.ya.spikesnap!=="hovered data"});if(oa.length){var da=oa[0];f(da.x0)&&f(da.y0)&&(wn=_e(da),(!kt.hLinePoint||kt.hLinePoint.spikeDistance>wn.spikeDistance)&&(kt.hLinePoint=wn))}}}}}function ve(Zt,pn,nn){for(var Kt,On=null,Tn=1/0,Dn=0;Dn0&&Math.abs(Zt.distance)Ft-1;Vt--)gt(Qe[Vt]);Qe=St,Ze()}var ht=ie._hoverdata,yt=[],qt=te(ie),Et=ee(ie);for(Ie=0;Ie1||Qe.length>1)||ke==="closest"&&Je&&Qe.length>1,cn=g.combine(Oe.plot_bgcolor||g.background,Oe.paper_bgcolor),ln=j(Qe,{gd:ie,hovermode:ke,rotateLabels:tn,bgColor:cn,container:Oe._hoverlayer,outerContainer:Oe._paper.node(),commonLabelOpts:Oe.hoverlabel,hoverdistance:Oe.hoverdistance}),an=ln.hoverLabels;if(w.isUnifiedHover(ke)||(function(Zt,pn,nn,Kt){var On,Tn,Dn,wn,En,tr,oa,da=pn?"xa":"ya",lr=pn?"ya":"xa",ti=0,Ar=1,ur=Zt.size(),kr=new Array(ur),la=0,An=Kt.minX,on=Kt.maxX,$n=Kt.minY,Pr=Kt.maxY,Ln=function(kn){return kn*nn._invScaleX},Bn=function(kn){return kn*nn._invScaleY};function jn(kn){var Dr=kn[0],Aa=kn[kn.length-1];if(Tn=Dr.pmin-Dr.pos-Dr.dp+Dr.size,Dn=Aa.pos+Aa.dp+Aa.size-Dr.pmax,Tn>.01){for(En=kn.length-1;En>=0;En--)kn[En].dp+=Tn;On=!1}if(!(Dn<.01)){if(Tn<-.01){for(En=kn.length-1;En>=0;En--)kn[En].dp-=Dn;On=!1}if(On){var Br=0;for(wn=0;wnDr.pmax&&Br++;for(wn=kn.length-1;wn>=0&&!(Br<=0);wn--)(tr=kn[wn]).pos>Dr.pmax-1&&(tr.del=!0,Br--);for(wn=0;wn=0;En--)kn[En].dp-=Dn;for(wn=kn.length-1;wn>=0&&!(Br<=0);wn--)(tr=kn[wn]).pos+tr.dp+tr.size>Dr.pmax&&(tr.del=!0,Br--)}}}for(Zt.each(function(kn){var Dr=kn[da],Aa=kn[lr],Br=Dr._id.charAt(0)==="x",Fi=Dr.range;la===0&&Fi&&Fi[0]>Fi[1]!==Br&&(Ar=-1);var Ni=0,mi=Br?nn.width:nn.height;if(nn.hovermode==="x"||nn.hovermode==="y"){var ni,Ga,vi=E(kn,pn),us=kn.anchor,nl=us==="end"?-1:1;if(us==="middle")Ga=(ni=kn.crossPos+(Br?Bn(vi.y-kn.by/2):Ln(kn.bx/2+kn.tx2width/2)))+(Br?Bn(kn.by):Ln(kn.bx));else if(Br)Ga=(ni=kn.crossPos+Bn(R+vi.y)-Bn(kn.by/2-R))+Bn(kn.by);else{var cs=Ln(nl*R+vi.x),oo=cs+Ln(nl*kn.bx);ni=kn.crossPos+Math.min(cs,oo),Ga=kn.crossPos+Math.max(cs,oo)}Br?$n!==void 0&&Pr!==void 0&&Math.min(Ga,Pr)-Math.max(ni,$n)>1&&(Aa.side==="left"?(Ni=Aa._mainLinePosition,mi=nn.width):mi=Aa._mainLinePosition):An!==void 0&&on!==void 0&&Math.min(Ga,on)-Math.max(ni,An)>1&&(Aa.side==="top"?(Ni=Aa._mainLinePosition,mi=nn.height):mi=Aa._mainLinePosition)}kr[la++]=[{datum:kn,traceIndex:kn.trace.index,dp:0,pos:kn.pos,posref:kn.posref,size:kn.by*(Br?P:1)/2,pmin:Ni,pmax:mi}]}),kr.sort(function(kn,Dr){return kn[0].posref-Dr[0].posref||Ar*(Dr[0].traceIndex-kn[0].traceIndex)});!On&&ti<=ur;){for(ti++,On=!0,wn=0;wn.01&&xr.pmin===Mr.pmin&&xr.pmax===Mr.pmax){for(En=Lr.length-1;En>=0;En--)Lr[En].dp+=Tn;for(Un.push.apply(Un,Lr),kr.splice(wn+1,1),oa=0,En=Un.length-1;En>=0;En--)oa+=Un[En].dp;for(Dn=oa/Un.length,En=Un.length-1;En>=0;En--)Un[En].dp-=Dn;On=!1}else wn++}kr.forEach(jn)}for(wn=kr.length-1;wn>=0;wn--){var Na=kr[wn];for(En=Na.length-1;En>=0;En--){var wa=Na[En],sa=wa.datum;sa.offset=wa.dp,sa.del=wa.del}}}(an,tn,Oe,ln.commonLabelBoundingBox),W(an,tn,Oe._invScaleX,Oe._invScaleY)),Te&&Te.tagName){var sn=_.getComponentMethod("annotations","hasClickToShow")(ie,yt);y(l.select(Te),sn?"pointer":"")}Te&&!pe&&function(Zt,pn,nn){if(!nn||nn.length!==Zt._hoverdata.length)return!0;for(var Kt=nn.length-1;Kt>=0;Kt--){var On=nn[Kt],Tn=Zt._hoverdata[Kt];if(On.curveNumber!==Tn.curveNumber||String(On.pointNumber)!==String(Tn.pointNumber)||String(On.pointNumbers)!==String(Tn.pointNumbers))return!0}return!1}(ie,0,ht)&&(ht&&ie.emit("plotly_unhover",{event:le,points:ht}),ie.emit("plotly_hover",{event:le,points:ie._hoverdata,xaxes:de,yaxes:xe,xvals:De,yvals:Re}))})(Q,Y,Z,X,re)})},a.loneHover=function(Q,Y){var Z=!0;Array.isArray(Q)||(Z=!1,Q=[Q]);var X=Y.gd,re=te(X),ie=ee(X),le=j(Q.map(function(Te){var Se=Te._x0||Te.x0||Te.x||0,Oe=Te._x1||Te.x1||Te.x||0,Me=Te._y0||Te.y0||Te.y||0,ce=Te._y1||Te.y1||Te.y||0,ye=Te.eventData;if(ye){var J=Math.min(Se,Oe),ne=Math.max(Se,Oe),de=Math.min(Me,ce),xe=Math.max(Me,ce),ue=Te.trace;if(_.traceIs(ue,"gl3d")){var ge=X._fullLayout[ue.scene]._scene.container,be=ge.offsetLeft,we=ge.offsetTop;J+=be,ne+=be,de+=we,xe+=we}ye.bbox={x0:J+ie,x1:ne+ie,y0:de+re,y1:xe+re},Y.inOut_bbox&&Y.inOut_bbox.push(ye.bbox)}else ye=!1;return{color:Te.color||g.defaultLine,x0:Te.x0||Te.x||0,x1:Te.x1||Te.x||0,y0:Te.y0||Te.y||0,y1:Te.y1||Te.y||0,xLabel:Te.xLabel,yLabel:Te.yLabel,zLabel:Te.zLabel,text:Te.text,name:Te.name,idealAlign:Te.idealAlign,borderColor:Te.borderColor,fontFamily:Te.fontFamily,fontSize:Te.fontSize,fontColor:Te.fontColor,nameLength:Te.nameLength,textAlign:Te.textAlign,trace:Te.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Te.hovertemplate||!1,hovertemplateLabels:Te.hovertemplateLabels||!1,eventData:ye}}),{gd:X,hovermode:"closest",rotateLabels:!1,bgColor:Y.bgColor||g.background,container:l.select(Y.container),outerContainer:Y.outerContainer||Y.container}).hoverLabels,se=0,pe=0;return le.sort(function(Te,Se){return Te.y0-Se.y0}).each(function(Te,Se){var Oe=Te.y0-Te.by/2;Te.offset=Oe-5([\s\S]*)<\/extra>/;function j(Q,Y){var Z=Y.gd,X=Z._fullLayout,re=Y.hovermode,ie=Y.rotateLabels,le=Y.bgColor,se=Y.container,pe=Y.outerContainer,Te=Y.commonLabelOpts||{};if(Q.length===0)return[[]];var Se=Y.fontFamily||k.HOVERFONT,Oe=Y.fontSize||k.HOVERFONTSIZE,Me=Q[0],ce=Me.xa,ye=Me.ya,J=re.charAt(0),ne=J+"Label",de=Me[ne];if(de===void 0&&ce.type==="multicategory")for(var xe=0;xeX.width-jt?(ht=X.width-jt,Ft.attr("d","M"+(jt-R)+",0L"+jt+","+Et+R+"v"+Et+(2*F+qt.height)+"H-"+jt+"V"+Et+R+"H"+(jt-2*R)+"Z")):Ft.attr("d","M0,0L"+R+","+Et+R+"H"+jt+"v"+Et+(2*F+qt.height)+"H-"+jt+"V"+Et+R+"H-"+R+"Z"),Be.minX=ht-jt,Be.maxX=ht+jt,ce.side==="top"?(Be.minY=yt-(2*F+qt.height),Be.maxY=yt-F):(Be.minY=yt+F,Be.maxY=yt+(2*F+qt.height))}else{var Tt,Ot,At;ye.side==="right"?(Tt="start",Ot=1,At="",ht=ce._offset+ce._length):(Tt="end",Ot=-1,At="-",ht=ce._offset),yt=ye._offset+(Me.y0+Me.y1)/2,Vt.attr("text-anchor",Tt),Ft.attr("d","M0,0L"+At+R+","+R+"V"+(F+qt.height/2)+"h"+At+(2*F+qt.width)+"V-"+(F+qt.height/2)+"H"+At+R+"V-"+R+"Z"),Be.minY=yt-(F+qt.height/2),Be.maxY=yt+(F+qt.height/2),ye.side==="right"?(Be.minX=ht+R,Be.maxX=ht+R+(2*F+qt.width)):(Be.minX=ht-R-(2*F+qt.width),Be.maxX=ht-R);var Lt,Rt=qt.height/2,$t=ge-qt.top-Rt,Yt="clip"+X._uid+"commonlabel"+ye._id;if(ht=0?pt:It+wt=0?It:nt+wt=0?Je:ut+ve=0?ut:st+ve=0,tt.idealAlign!=="top"&&tn||!cn?tn?(Rt+=Yt/2,tt.anchor="start"):tt.anchor="middle":(Rt-=Yt/2,tt.anchor="end"),tt.crossPos=Rt;else{if(tt.pos=Rt,tn=Lt+$t/2+ln<=be,cn=Lt-$t/2-ln>=0,tt.idealAlign!=="left"&&tn||!cn)if(tn)Lt+=$t/2,tt.anchor="start";else{tt.anchor="middle";var an=ln/2,sn=Lt+an-be,Zt=Lt-an;sn>0&&(Lt-=sn),Zt<0&&(Lt+=-Zt)}else Lt-=$t/2,tt.anchor="end";tt.crossPos=Lt}Et.attr("text-anchor",tt.anchor),Tt&&jt.attr("text-anchor",tt.anchor),Ft.attr("transform",d(Lt,Rt)+(ie?h(S):""))}),{hoverLabels:mt,commonLabelBoundingBox:Be}}function N(Q,Y,Z,X,re,ie){var le="",se="";Q.nameOverride!==void 0&&(Q.name=Q.nameOverride),Q.name&&(Q.trace._meta&&(Q.name=c.templateString(Q.name,Q.trace._meta)),le=H(Q.name,Q.nameLength));var pe=Z.charAt(0),Te=pe==="x"?"y":"x";Q.zLabel!==void 0?(Q.xLabel!==void 0&&(se+="x: "+Q.xLabel+"
"),Q.yLabel!==void 0&&(se+="y: "+Q.yLabel+"
"),Q.trace.type!=="choropleth"&&Q.trace.type!=="choroplethmapbox"&&(se+=(se?"z: ":"")+Q.zLabel)):Y&&Q[pe+"Label"]===re?se=Q[Te+"Label"]||"":Q.xLabel===void 0?Q.yLabel!==void 0&&Q.trace.type!=="scattercarpet"&&(se=Q.yLabel):se=Q.yLabel===void 0?Q.xLabel:"("+Q.xLabel+", "+Q.yLabel+")",!Q.text&&Q.text!==0||Array.isArray(Q.text)||(se+=(se?"
":"")+Q.text),Q.extraText!==void 0&&(se+=(se?"
":"")+Q.extraText),ie&&se===""&&!Q.hovertemplate&&(le===""&&ie.remove(),se=le);var Se=Q.hovertemplate||!1;if(Se){var Oe=Q.hovertemplateLabels||Q;Q[pe+"Label"]!==re&&(Oe[pe+"other"]=Oe[pe+"Val"],Oe[pe+"otherLabel"]=Oe[pe+"Label"]),se=(se=c.hovertemplateString(Se,Oe,X._d3locale,Q.eventData[0]||{},Q.trace._meta)).replace($,function(Me,ce){return le=H(ce,Q.nameLength),""})}return[se,le]}function E(Q,Y){var Z=0,X=Q.offset;return Y&&(X*=-O,Z=Q.offset*D),{x:Z,y:X}}function W(Q,Y,Z,X){var re=function(le){return le*Z},ie=function(le){return le*X};Q.each(function(le){var se=l.select(this);if(le.del)return se.remove();var pe,Te,Se,Oe,Me=se.select("text.nums"),ce=le.anchor,ye=ce==="end"?-1:1,J=(Oe=(Se=(Te={start:1,end:-1,middle:0}[(pe=le).anchor])*(R+F))+Te*(pe.txwidth+F),pe.anchor==="middle"&&(Se-=pe.tx2width/2,Oe+=pe.txwidth/2+F),{alignShift:Te,textShiftX:Se,text2ShiftX:Oe}),ne=E(le,Y),de=ne.x,xe=ne.y,ue=ce==="middle";se.select("path").attr("d",ue?"M-"+re(le.bx/2+le.tx2width/2)+","+ie(xe-le.by/2)+"h"+re(le.bx)+"v"+ie(le.by)+"h-"+re(le.bx)+"Z":"M0,0L"+re(ye*R+de)+","+ie(R+xe)+"v"+ie(le.by/2-R)+"h"+re(ye*le.bx)+"v-"+ie(le.by)+"H"+re(ye*R+de)+"V"+ie(xe-R)+"Z");var ge=de+J.textShiftX,be=xe+le.ty0-le.by/2+F,we=le.textAlign||"auto";we!=="auto"&&(we==="left"&&ce!=="start"?(Me.attr("text-anchor","start"),ge=ue?-le.bx/2-le.tx2width/2+F:-le.bx-F):we==="right"&&ce!=="end"&&(Me.attr("text-anchor","end"),ge=ue?le.bx/2-le.tx2width/2-F:le.bx+F)),Me.call(m.positionText,re(ge),ie(be)),le.tx2width&&(se.select("text.name").call(m.positionText,re(J.text2ShiftX+J.alignShift*F+de),ie(xe+le.ty0-le.by/2+F)),se.select("rect").call(v.setRect,re(J.text2ShiftX+(J.alignShift-1)*le.tx2width/2+de),ie(xe-le.by/2-1),re(le.tx2width),ie(le.by+2)))})}function G(Q,Y){var Z=Q.index,X=Q.trace||{},re=Q.cd[0],ie=Q.cd[Z]||{};function le(Me){return Me||f(Me)&&Me===0}var se=Array.isArray(Z)?function(Me,ce){var ye=c.castOption(re,Z,Me);return le(ye)?ye:c.extractOption({},X,"",ce)}:function(Me,ce){return c.extractOption(ie,X,Me,ce)};function pe(Me,ce,ye){var J=se(ce,ye);le(J)&&(Q[Me]=J)}if(pe("hoverinfo","hi","hoverinfo"),pe("bgcolor","hbg","hoverlabel.bgcolor"),pe("borderColor","hbc","hoverlabel.bordercolor"),pe("fontFamily","htf","hoverlabel.font.family"),pe("fontSize","hts","hoverlabel.font.size"),pe("fontColor","htc","hoverlabel.font.color"),pe("nameLength","hnl","hoverlabel.namelength"),pe("textAlign","hta","hoverlabel.align"),Q.posref=Y==="y"||Y==="closest"&&X.orientation==="h"?Q.xa._offset+(Q.x0+Q.x1)/2:Q.ya._offset+(Q.y0+Q.y1)/2,Q.x0=c.constrain(Q.x0,0,Q.xa._length),Q.x1=c.constrain(Q.x1,0,Q.xa._length),Q.y0=c.constrain(Q.y0,0,Q.ya._length),Q.y1=c.constrain(Q.y1,0,Q.ya._length),Q.xLabelVal!==void 0&&(Q.xLabel="xLabel"in Q?Q.xLabel:x.hoverLabelText(Q.xa,Q.xLabelVal,X.xhoverformat),Q.xVal=Q.xa.c2d(Q.xLabelVal)),Q.yLabelVal!==void 0&&(Q.yLabel="yLabel"in Q?Q.yLabel:x.hoverLabelText(Q.ya,Q.yLabelVal,X.yhoverformat),Q.yVal=Q.ya.c2d(Q.yLabelVal)),Q.zLabelVal!==void 0&&Q.zLabel===void 0&&(Q.zLabel=String(Q.zLabelVal)),!(isNaN(Q.xerr)||Q.xa.type==="log"&&Q.xerr<=0)){var Te=x.tickText(Q.xa,Q.xa.c2l(Q.xerr),"hover").text;Q.xerrneg!==void 0?Q.xLabel+=" +"+Te+" / -"+x.tickText(Q.xa,Q.xa.c2l(Q.xerrneg),"hover").text:Q.xLabel+=" ± "+Te,Y==="x"&&(Q.distance+=1)}if(!(isNaN(Q.yerr)||Q.ya.type==="log"&&Q.yerr<=0)){var Se=x.tickText(Q.ya,Q.ya.c2l(Q.yerr),"hover").text;Q.yerrneg!==void 0?Q.yLabel+=" +"+Se+" / -"+x.tickText(Q.ya,Q.ya.c2l(Q.yerrneg),"hover").text:Q.yLabel+=" ± "+Se,Y==="y"&&(Q.distance+=1)}var Oe=Q.hoverinfo||Q.trace.hoverinfo;return Oe&&Oe!=="all"&&((Oe=Array.isArray(Oe)?Oe:Oe.split("+")).indexOf("x")===-1&&(Q.xLabel=void 0),Oe.indexOf("y")===-1&&(Q.yLabel=void 0),Oe.indexOf("z")===-1&&(Q.zLabel=void 0),Oe.indexOf("text")===-1&&(Q.text=void 0),Oe.indexOf("name")===-1&&(Q.name=void 0)),Q}function L(Q,Y,Z){var X,re,ie=Z.container,le=Z.fullLayout,se=le._size,pe=Z.event,Te=!!Y.hLinePoint,Se=!!Y.vLinePoint;if(ie.selectAll(".spikeline").remove(),Se||Te){var Oe=g.combine(le.plot_bgcolor,le.paper_bgcolor);if(Te){var Me,ce,ye=Y.hLinePoint;X=ye&&ye.xa,(re=ye&&ye.ya).spikesnap==="cursor"?(Me=pe.pointerX,ce=pe.pointerY):(Me=X._offset+ye.x,ce=re._offset+ye.y);var J,ne,de=s.readability(ye.color,Oe)<1.5?g.contrast(Oe):ye.color,xe=re.spikemode,ue=re.spikethickness,ge=re.spikecolor||de,be=x.getPxPosition(Q,re);if(xe.indexOf("toaxis")!==-1||xe.indexOf("across")!==-1){if(xe.indexOf("toaxis")!==-1&&(J=be,ne=Me),xe.indexOf("across")!==-1){var we=re._counterDomainMin,ke=re._counterDomainMax;re.anchor==="free"&&(we=Math.min(we,re.position),ke=Math.max(ke,re.position)),J=se.l+we*se.w,ne=se.l+ke*se.w}ie.insert("line",":first-child").attr({x1:J,x2:ne,y1:ce,y2:ce,"stroke-width":ue,stroke:ge,"stroke-dasharray":v.dashStyle(re.spikedash,ue)}).classed("spikeline",!0).classed("crisp",!0),ie.insert("line",":first-child").attr({x1:J,x2:ne,y1:ce,y2:ce,"stroke-width":ue+2,stroke:Oe}).classed("spikeline",!0).classed("crisp",!0)}xe.indexOf("marker")!==-1&&ie.insert("circle",":first-child").attr({cx:be+(re.side!=="right"?ue:-ue),cy:ce,r:ue,fill:ge}).classed("spikeline",!0)}if(Se){var Ae,Ee,De=Y.vLinePoint;X=De&&De.xa,re=De&&De.ya,X.spikesnap==="cursor"?(Ae=pe.pointerX,Ee=pe.pointerY):(Ae=X._offset+De.x,Ee=re._offset+De.y);var Re,Ie,Be=s.readability(De.color,Oe)<1.5?g.contrast(Oe):De.color,Ue=X.spikemode,qe=X.spikethickness,Ye=X.spikecolor||Be,at=x.getPxPosition(Q,X);if(Ue.indexOf("toaxis")!==-1||Ue.indexOf("across")!==-1){if(Ue.indexOf("toaxis")!==-1&&(Re=at,Ie=Ee),Ue.indexOf("across")!==-1){var lt=X._counterDomainMin,ct=X._counterDomainMax;X.anchor==="free"&&(lt=Math.min(lt,X.position),ct=Math.max(ct,X.position)),Re=se.t+(1-ct)*se.h,Ie=se.t+(1-lt)*se.h}ie.insert("line",":first-child").attr({x1:Ae,x2:Ae,y1:Re,y2:Ie,"stroke-width":qe,stroke:Ye,"stroke-dasharray":v.dashStyle(X.spikedash,qe)}).classed("spikeline",!0).classed("crisp",!0),ie.insert("line",":first-child").attr({x1:Ae,x2:Ae,y1:Re,y2:Ie,"stroke-width":qe+2,stroke:Oe}).classed("spikeline",!0).classed("crisp",!0)}Ue.indexOf("marker")!==-1&&ie.insert("circle",":first-child").attr({cx:Ae,cy:at-(X.side!=="top"?qe:-qe),r:qe,fill:Ye}).classed("spikeline",!0)}}}function q(Q,Y){return!Y}function H(Q,Y){return m.plainText(Q||"",{len:Y,allowedTags:["br","sub","sup","b","i","em"]})}function V(Q,Y,Z){var X=Y[Q+"a"],re=Y[Q+"Val"],ie=Y.cd[0];if(X.type==="category"||X.type==="multicategory")re=X._categoriesMap[re];else if(X.type==="date"){var le=Y.trace[Q+"periodalignment"];if(le){var se=Y.cd[Y.index],pe=se[Q+"Start"];pe===void 0&&(pe=se[Q]);var Te=se[Q+"End"];Te===void 0&&(Te=se[Q]);var Se=Te-pe;le==="end"?re+=Se:le==="middle"&&(re+=Se/2)}re=X.d2c(re)}return ie&&ie.t&&ie.t.posLetter===X._id&&(Z.boxmode!=="group"&&Z.violinmode!=="group"||(re+=ie.t.dPos)),re}function te(Q){return Q.offsetTop+Q.clientTop}function ee(Q){return Q.offsetLeft+Q.clientLeft}function U(Q,Y){var Z=Q._fullLayout,X=Y.getBoundingClientRect(),re=X.left,ie=X.top,le=re+X.width,se=ie+X.height,pe=c.apply3DTransform(Z._invTransform)(re,ie),Te=c.apply3DTransform(Z._invTransform)(le,se),Se=pe[0],Oe=pe[1],Me=Te[0],ce=Te[1];return{x:Se,y:Oe,width:Me-Se,height:ce-Oe,top:Math.min(Oe,ce),left:Math.min(Se,Me),right:Math.max(Se,Me),bottom:Math.max(Oe,ce)}}},38048:function(o,a,n){var l=n(71828),f=n(7901),s=n(23469).isUnifiedHover;o.exports=function(c,d,h,p){p=p||{};var m=d.legend;function y(v){p.font[v]||(p.font[v]=m?d.legend.font[v]:d.font[v])}d&&s(d.hovermode)&&(p.font||(p.font={}),y("size"),y("family"),y("color"),m?(p.bgcolor||(p.bgcolor=f.combine(d.legend.bgcolor,d.paper_bgcolor)),p.bordercolor||(p.bordercolor=d.legend.bordercolor)):p.bgcolor||(p.bgcolor=d.paper_bgcolor)),h("hoverlabel.bgcolor",p.bgcolor),h("hoverlabel.bordercolor",p.bordercolor),h("hoverlabel.namelength",p.namelength),l.coerceFont(h,"hoverlabel.font",p.font),h("hoverlabel.align",p.align)}},98212:function(o,a,n){var l=n(71828),f=n(528);o.exports=function(s,c){function d(h,p){return c[h]!==void 0?c[h]:l.coerce(s,c,f,h,p)}return d("clickmode"),d("hovermode")}},30211:function(o,a,n){var l=n(39898),f=n(71828),s=n(28569),c=n(23469),d=n(528),h=n(88335);o.exports={moduleType:"component",name:"fx",constants:n(26675),schema:{layout:d},attributes:n(77914),layoutAttributes:d,supplyLayoutGlobalDefaults:n(22774),supplyDefaults:n(54268),supplyLayoutDefaults:n(34938),calc:n(30732),getDistanceFunction:c.getDistanceFunction,getClosest:c.getClosest,inbox:c.inbox,quadrature:c.quadrature,appendArrayPointValue:c.appendArrayPointValue,castHoverOption:function(p,m,y){return f.castOption(p,m,"hoverlabel."+y)},castHoverinfo:function(p,m,y){return f.castOption(p,y,"hoverinfo",function(v){return f.coerceHoverinfo({hoverinfo:v},{_module:p._module},m)})},hover:h.hover,unhover:s.unhover,loneHover:h.loneHover,loneUnhover:function(p){var m=f.isD3Selection(p)?p:l.select(p);m.selectAll("g.hovertext").remove(),m.selectAll(".spikeline").remove()},click:n(75914)}},528:function(o,a,n){var l=n(26675),f=n(41940),s=f({editType:"none"});s.family.dflt=l.HOVERFONT,s.size.dflt=l.HOVERFONTSIZE,o.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:s,grouptitlefont:f({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},34938:function(o,a,n){var l=n(71828),f=n(528),s=n(98212),c=n(38048);o.exports=function(d,h){function p(g,b){return l.coerce(d,h,f,g,b)}s(d,h)&&(p("hoverdistance"),p("spikedistance")),p("dragmode")==="select"&&p("selectdirection");var m=h._has("mapbox"),y=h._has("geo"),v=h._basePlotModules.length;h.dragmode==="zoom"&&((m||y)&&v===1||m&&y&&v===2)&&(h.dragmode="pan"),c(d,h,p),l.coerceFont(p,"hoverlabel.grouptitlefont",h.hoverlabel.font)}},22774:function(o,a,n){var l=n(71828),f=n(38048),s=n(528);o.exports=function(c,d){f(c,d,function(h,p){return l.coerce(c,d,s,h,p)})}},83312:function(o,a,n){var l=n(71828),f=n(30587).counter,s=n(27670).Y,c=n(85555).idRegex,d=n(44467),h={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[f("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:s({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function p(v,g,b){var x=g[b+"axes"],_=Object.keys((v._splomAxes||{})[b]||{});return Array.isArray(x)?x:_.length?_:void 0}function m(v,g,b,x,_,w){var k=g(v+"gap",b),T=g("domain."+v);g(v+"side",x);for(var M=new Array(_),S=T[0],C=(T[1]-S)/(_-k),P=C*(1-k),D=0;D<_;D++){var O=S+C*D;M[w?_-1-D:D]=[O,O+P]}return M}function y(v,g,b,x,_){var w,k=new Array(b);function T(M,S){g.indexOf(S)!==-1&&x[S]===void 0?(k[M]=S,x[S]=M):k[M]=""}if(Array.isArray(v))for(w=0;w1){T||M||S||$("pattern")==="independent"&&(T=!0),P._hasSubplotGrid=T;var R,F,A=$("roworder")==="top to bottom",z=T?.2:.1,B=T?.3:.1;C&&g._splomGridDflt&&(R=g._splomGridDflt.xside,F=g._splomGridDflt.yside),P._domains={x:m("x",$,z,R,O),y:m("y",$,B,F,D,A)}}else delete g.grid}function $(j,N){return l.coerce(b,P,h,j,N)}},contentDefaults:function(v,g){var b=g.grid;if(b&&b._domains){var x,_,w,k,T,M,S,C=v.grid||{},P=g._subplots,D=b._hasSubplotGrid,O=b.rows,R=b.columns,F=b.pattern==="independent",A=b._axisMap={};if(D){var z=C.subplots||[];M=b.subplots=new Array(O);var B=1;for(x=0;x(y==="legend"?1:0));if(B===!1&&(g[y]=void 0),(B!==!1||x.uirevision)&&(w("uirevision",g.uirevision),B!==!1)){w("borderwidth");var $,j,N,E=w("orientation")==="h",W=w("yref")==="paper",G=w("xref")==="paper",L="left";if(E?($=0,l.getComponentMethod("rangeslider","isVisible")(v.xaxis)?W?(j=1.1,N="bottom"):(j=1,N="top"):W?(j=-.1,N="top"):(j=0,N="bottom")):(j=1,N="auto",G?$=1.02:($=1,L="right")),f.coerce(x,_,{x:{valType:"number",editType:"legend",min:G?-2:0,max:G?3:1,dflt:$}},"x"),f.coerce(x,_,{y:{valType:"number",editType:"legend",min:W?-2:0,max:W?3:1,dflt:j}},"y"),w("traceorder",O),p.isGrouped(g[y])&&w("tracegroupgap"),w("entrywidth"),w("entrywidthmode"),w("itemsizing"),w("itemwidth"),w("itemclick"),w("itemdoubleclick"),w("groupclick"),w("xanchor",L),w("yanchor",N),w("valign"),f.noneOrAll(x,_,["x","y"]),w("title.text")){w("title.side",E?"left":"top");var q=f.extendFlat({},k,{size:f.bigFont(k.size)});f.coerceFont(w,"title.font",q)}}}}o.exports=function(y,v,g){var b,x=g.slice(),_=v.shapes;if(_)for(b=0;b<_.length;b++){var w=_[b];if(w.showlegend){var k={_input:w._input,visible:w.visible,showlegend:w.showlegend,legend:w.legend};x.push(k)}}var T=["legend"];for(b=0;b1)}var X=q.hiddenlabels||[];if(!(V||q.showlegend&&te.length))return G.selectAll("."+H).remove(),q._topdefs.select("#"+W).remove(),s.autoMargin(N,H);var re=f.ensureSingle(G,"g",H,function(ce){V||ce.attr("pointer-events","all")}),ie=f.ensureSingleById(q._topdefs,"clipPath",W,function(ce){ce.append("rect")}),le=f.ensureSingle(re,"rect","bg",function(ce){ce.attr("shape-rendering","crispEdges")});le.call(m.stroke,L.bordercolor).call(m.fill,L.bgcolor).style("stroke-width",L.borderwidth+"px");var se,pe=f.ensureSingle(re,"g","scrollbox"),Te=L.title;L._titleWidth=0,L._titleHeight=0,Te.text?((se=f.ensureSingle(pe,"text",H+"titletext")).attr("text-anchor","start").call(p.font,Te.font).text(Te.text),z(se,pe,N,L,S)):pe.selectAll("."+H+"titletext").remove();var Se=f.ensureSingle(re,"rect","scrollbar",function(ce){ce.attr(g.scrollBarEnterAttrs).call(m.fill,g.scrollBarColor)}),Oe=pe.selectAll("g.groups").data(te);Oe.enter().append("g").attr("class","groups"),Oe.exit().remove();var Me=Oe.selectAll("g.traces").data(f.identity);Me.enter().append("g").attr("class","traces"),Me.exit().remove(),Me.style("opacity",function(ce){var ye=ce[0].trace;return c.traceIs(ye,"pie-like")?X.indexOf(ce[0].label)!==-1?.5:1:ye.visible==="legendonly"?.5:1}).each(function(){l.select(this).call(R,N,L)}).call(T,N,L).each(function(){V||l.select(this).call(A,N,H)}),f.syncOrAsync([s.previousPromises,function(){return function(ce,ye,J,ne){var de=ce._fullLayout,xe=j(ne);ne||(ne=de[xe]);var ue=de._size,ge=M.isVertical(ne),be=M.isGrouped(ne),we=ne.entrywidthmode==="fraction",ke=ne.borderwidth,Ae=2*ke,Ee=g.itemGap,De=ne.itemwidth+2*Ee,Re=2*(ke+Ee),Ie=$(ne),Be=ne.y<0||ne.y===0&&Ie==="top",Ue=ne.y>1||ne.y===1&&Ie==="bottom",qe=ne.tracegroupgap,Ye={};ne._maxHeight=Math.max(Be||Ue?de.height/2:ue.h,30);var at=0;ne._width=0,ne._height=0;var lt=function(Ge){var Ke=0,nt=0,st=Ge.title.side;return st&&(st.indexOf("left")!==-1&&(Ke=Ge._titleWidth),st.indexOf("top")!==-1&&(nt=Ge._titleHeight)),[Ke,nt]}(ne);if(ge)J.each(function(Ge){var Ke=Ge[0].height;p.setTranslate(this,ke+lt[0],ke+lt[1]+ne._height+Ke/2+Ee),ne._height+=Ke,ne._width=Math.max(ne._width,Ge[0].width)}),at=De+ne._width,ne._width+=Ee+De+Ae,ne._height+=Re,be&&(ye.each(function(Ge,Ke){p.setTranslate(this,0,Ke*ne.tracegroupgap)}),ne._height+=(ne._lgroupsLength-1)*ne.tracegroupgap);else{var ct=B(ne),bt=ne.x<0||ne.x===0&&ct==="right",ze=ne.x>1||ne.x===1&&ct==="left",Ne=Ue||Be,Qe=de.width/2;ne._maxWidth=Math.max(bt?Ne&&ct==="left"?ue.l+ue.w:Qe:ze?Ne&&ct==="right"?ue.r+ue.w:Qe:ue.w,2*De);var it=0,kt=0;J.each(function(Ge){var Ke=D(Ge,ne,De);it=Math.max(it,Ke),kt+=Ke}),at=null;var Je=0;if(be){var ut=0,pt=0,It=0;ye.each(function(){var Ge=0,Ke=0;l.select(this).selectAll("g.traces").each(function(st){var mt=D(st,ne,De),tt=st[0].height;p.setTranslate(this,lt[0],lt[1]+ke+Ee+tt/2+Ke),Ke+=tt,Ge=Math.max(Ge,mt),Ye[st[0].trace.legendgroup]=Ge});var nt=Ge+Ee;pt>0&&nt+ke+pt>ne._maxWidth?(Je=Math.max(Je,pt),pt=0,It+=ut+qe,ut=Ke):ut=Math.max(ut,Ke),p.setTranslate(this,pt,It),pt+=nt}),ne._width=Math.max(Je,pt)+ke,ne._height=It+ut+Re}else{var Mt=J.size(),zt=kt+Ae+(Mt-1)*Ee=ne._maxWidth&&(Je=Math.max(Je,Ve),ve=0,_e+=wt,ne._height+=wt,wt=0),p.setTranslate(this,lt[0]+ke+ve,lt[1]+ke+_e+Ke/2+Ee),Ve=ve+nt+Ee,ve+=st,wt=Math.max(wt,Ke)}),zt?(ne._width=ve+Ae,ne._height=wt+Re):(ne._width=Math.max(Je,Ve)+Ae,ne._height+=wt+Re)}}ne._width=Math.ceil(Math.max(ne._width+lt[0],ne._titleWidth+2*(ke+g.titlePad))),ne._height=Math.ceil(Math.max(ne._height+lt[1],ne._titleHeight+2*(ke+g.itemGap))),ne._effHeight=Math.min(ne._height,ne._maxHeight);var We=ce._context.edits,Ze=We.legendText||We.legendPosition;J.each(function(Ge){var Ke=l.select(this).select("."+xe+"toggle"),nt=Ge[0].height,st=Ge[0].trace.legendgroup,mt=D(Ge,ne,De);be&&st!==""&&(mt=Ye[st]);var tt=Ze?De:at||mt;ge||we||(tt+=Ee/2),p.setRect(Ke,0,-nt/2,tt,nt)})}(N,Oe,Me,L)},function(){var ce,ye,J,ne,de=q._size,xe=L.borderwidth,ue=L.xref==="paper",ge=L.yref==="paper";if(Te.text&&function(Ne,Qe,it){if(Qe.title.side==="top center"||Qe.title.side==="top right"){var kt=Qe.title.font.size*x,Je=0,ut=Ne.node(),pt=p.bBox(ut).width;Qe.title.side==="top center"?Je=.5*(Qe._width-2*it-2*g.titlePad-pt):Qe.title.side==="top right"&&(Je=Qe._width-2*it-2*g.titlePad-pt),y.positionText(Ne,it+g.titlePad+Je,it+kt)}}(se,L,xe),!V){var be,we;be=ue?de.l+de.w*L.x-_[B(L)]*L._width:q.width*L.x-_[B(L)]*L._width,we=ge?de.t+de.h*(1-L.y)-_[$(L)]*L._effHeight:q.height*(1-L.y)-_[$(L)]*L._effHeight;var ke=function(Ne,Qe,it,kt){var Je=Ne._fullLayout,ut=Je[Qe],pt=B(ut),It=$(ut),Mt=ut.xref==="paper",zt=ut.yref==="paper";Ne._fullLayout._reservedMargin[Qe]={};var wt=ut.y<.5?"b":"t",ve=ut.x<.5?"l":"r",_e={r:Je.width-it,l:it+ut._width,b:Je.height-kt,t:kt+ut._effHeight};if(Mt&&zt)return s.autoMargin(Ne,Qe,{x:ut.x,y:ut.y,l:ut._width*_[pt],r:ut._width*w[pt],b:ut._effHeight*w[It],t:ut._effHeight*_[It]});Mt?Ne._fullLayout._reservedMargin[Qe][wt]=_e[wt]:zt||ut.orientation==="v"?Ne._fullLayout._reservedMargin[Qe][ve]=_e[ve]:Ne._fullLayout._reservedMargin[Qe][wt]=_e[wt]}(N,H,be,we);if(ke)return;if(q.margin.autoexpand){var Ae=be,Ee=we;be=ue?f.constrain(be,0,q.width-L._width):Ae,we=ge?f.constrain(we,0,q.height-L._effHeight):Ee,be!==Ae&&f.log("Constrain "+H+".x to make legend fit inside graph"),we!==Ee&&f.log("Constrain "+H+".y to make legend fit inside graph")}p.setTranslate(re,be,we)}if(Se.on(".drag",null),re.on("wheel",null),V||L._height<=L._maxHeight||N._context.staticPlot){var De=L._effHeight;V&&(De=L._height),le.attr({width:L._width-xe,height:De-xe,x:xe/2,y:xe/2}),p.setTranslate(pe,0,0),ie.select("rect").attr({width:L._width-2*xe,height:De-2*xe,x:xe,y:xe}),p.setClipUrl(pe,W,N),p.setRect(Se,0,0,0,0),delete L._scrollY}else{var Re,Ie,Be,Ue=Math.max(g.scrollBarMinHeight,L._effHeight*L._effHeight/L._height),qe=L._effHeight-Ue-2*g.scrollBarMargin,Ye=L._height-L._effHeight,at=qe/Ye,lt=Math.min(L._scrollY||0,Ye);le.attr({width:L._width-2*xe+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-xe,x:xe/2,y:xe/2}),ie.select("rect").attr({width:L._width-2*xe+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-2*xe,x:xe,y:xe+lt}),p.setClipUrl(pe,W,N),ze(lt,Ue,at),re.on("wheel",function(){ze(lt=f.constrain(L._scrollY+l.event.deltaY/qe*Ye,0,Ye),Ue,at),lt!==0&<!==Ye&&l.event.preventDefault()});var ct=l.behavior.drag().on("dragstart",function(){var Ne=l.event.sourceEvent;Re=Ne.type==="touchstart"?Ne.changedTouches[0].clientY:Ne.clientY,Be=lt}).on("drag",function(){var Ne=l.event.sourceEvent;Ne.buttons===2||Ne.ctrlKey||(Ie=Ne.type==="touchmove"?Ne.changedTouches[0].clientY:Ne.clientY,lt=function(Qe,it,kt){var Je=(kt-it)/at+Qe;return f.constrain(Je,0,Ye)}(Be,Re,Ie),ze(lt,Ue,at))});Se.call(ct);var bt=l.behavior.drag().on("dragstart",function(){var Ne=l.event.sourceEvent;Ne.type==="touchstart"&&(Re=Ne.changedTouches[0].clientY,Be=lt)}).on("drag",function(){var Ne=l.event.sourceEvent;Ne.type==="touchmove"&&(Ie=Ne.changedTouches[0].clientY,lt=function(Qe,it,kt){var Je=(it-kt)/at+Qe;return f.constrain(Je,0,Ye)}(Be,Re,Ie),ze(lt,Ue,at))});pe.call(bt)}function ze(Ne,Qe,it){L._scrollY=N._fullLayout[H]._scrollY=Ne,p.setTranslate(pe,0,-Ne),p.setRect(Se,L._width,g.scrollBarMargin+Ne*it,g.scrollBarWidth,Qe),ie.select("rect").attr("y",xe+Ne)}N._context.edits.legendPosition&&(re.classed("cursor-move",!0),h.init({element:re.node(),gd:N,prepFn:function(){var Ne=p.getTranslate(re);J=Ne.x,ne=Ne.y},moveFn:function(Ne,Qe){var it=J+Ne,kt=ne+Qe;p.setTranslate(re,it,kt),ce=h.align(it,L._width,de.l,de.l+de.w,L.xanchor),ye=h.align(kt+L._height,-L._height,de.t+de.h,de.t,L.yanchor)},doneFn:function(){if(ce!==void 0&&ye!==void 0){var Ne={};Ne[H+".x"]=ce,Ne[H+".y"]=ye,c.call("_guiRelayout",N,Ne)}},clickFn:function(Ne,Qe){var it=G.selectAll("g.traces").filter(function(){var kt=this.getBoundingClientRect();return Qe.clientX>=kt.left&&Qe.clientX<=kt.right&&Qe.clientY>=kt.top&&Qe.clientY<=kt.bottom});it.size()>0&&O(N,re,it,Ne,Qe)}}))}],N)}}function D(N,E,W){var G=N[0],L=G.width,q=E.entrywidthmode,H=G.trace.legendwidth||E.entrywidth;return q==="fraction"?E._maxWidth*H:W+(H||L)}function O(N,E,W,G,L){var q=W.data()[0][0].trace,H={event:L,node:W.node(),curveNumber:q.index,expandedIndex:q._expandedIndex,data:N.data,layout:N.layout,frames:N._transitionData._frames,config:N._context,fullData:N._fullData,fullLayout:N._fullLayout};q._group&&(H.group=q._group),c.traceIs(q,"pie-like")&&(H.label=W.datum()[0].label);var V=d.triggerHandler(N,"plotly_legendclick",H);if(G===1){if(V===!1)return;E._clickTimeout=setTimeout(function(){N._fullLayout&&v(W,N,G)},N._context.doubleClickDelay)}else G===2&&(E._clickTimeout&&clearTimeout(E._clickTimeout),N._legendMouseDownTime=0,d.triggerHandler(N,"plotly_legenddoubleclick",H)!==!1&&V!==!1&&v(W,N,G))}function R(N,E,W){var G,L,q=j(W),H=N.data()[0][0],V=H.trace,te=c.traceIs(V,"pie-like"),ee=!W._inHover&&E._context.edits.legendText&&!te,U=W._maxNameLength;H.groupTitle?(G=H.groupTitle.text,L=H.groupTitle.font):(L=W.font,W.entries?G=H.text:(G=te?H.label:V.name,V._meta&&(G=f.templateString(G,V._meta))));var Q=f.ensureSingle(N,"text",q+"text");Q.attr("text-anchor","start").call(p.font,L).text(ee?F(G,U):G);var Y=W.itemwidth+2*g.itemGap;y.positionText(Q,Y,0),ee?Q.call(y.makeEditable,{gd:E,text:G}).call(z,N,E,W).on("edit",function(Z){this.text(F(Z,U)).call(z,N,E,W);var X=H.trace._fullInput||{},re={};if(c.hasTransform(X,"groupby")){var ie=c.getTransformIndices(X,"groupby"),le=ie[ie.length-1],se=f.keyedContainer(X,"transforms["+le+"].styles","target","value.name");se.set(H.trace._group,Z),re=se.constructUpdate()}else re.name=Z;return X._isShape?c.call("_guiRelayout",E,"shapes["+V.index+"].name",re.name):c.call("_guiRestyle",E,re,V.index)}):z(Q,N,E,W)}function F(N,E){var W=Math.max(4,E);if(N&&N.trim().length>=W/2)return N;for(var G=W-(N=N||"").length;G>0;G--)N+=" ";return N}function A(N,E,W){var G,L=E._context.doubleClickDelay,q=1,H=f.ensureSingle(N,"rect",W+"toggle",function(V){E._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(m.fill,"rgba(0,0,0,0)")});E._context.staticPlot||(H.on("mousedown",function(){(G=new Date().getTime())-E._legendMouseDownTimeL&&(q=Math.max(q-1,1)),O(E,V,N,q,l.event)}}))}function z(N,E,W,G,L){G._inHover&&N.attr("data-notex",!0),y.convertToTspans(N,W,function(){(function(q,H,V,te){var ee=q.data()[0][0];if(V._inHover||!ee||ee.trace.showlegend){var U=q.select("g[class*=math-group]"),Q=U.node(),Y=j(V);V||(V=H._fullLayout[Y]);var Z,X,re=V.borderwidth,ie=(te===S?V.title.font:ee.groupTitle?ee.groupTitle.font:V.font).size*x;if(Q){var le=p.bBox(Q);Z=le.height,X=le.width,te===S?p.setTranslate(U,re,re+.75*Z):p.setTranslate(U,0,.25*Z)}else{var se="."+Y+(te===S?"title":"")+"text",pe=q.select(se),Te=y.lineCount(pe),Se=pe.node();if(Z=ie*Te,X=Se?p.bBox(Se).width:0,te===S)V.title.side==="left"&&(X+=2*g.itemGap),y.positionText(pe,re+g.titlePad,re+ie);else{var Oe=2*g.itemGap+V.itemwidth;ee.groupTitle&&(Oe=g.itemGap,X-=V.itemwidth),y.positionText(pe,Oe,-ie*((Te-1)/2-.3))}}te===S?(V._titleWidth=X,V._titleHeight=Z):(ee.lineHeight=ie,ee.height=Math.max(Z,16)+3,ee.width=X)}else q.remove()})(E,W,G,L)})}function B(N){return f.isRightAnchor(N)?"right":f.isCenterAnchor(N)?"center":"left"}function $(N){return f.isBottomAnchor(N)?"bottom":f.isMiddleAnchor(N)?"middle":"top"}function j(N){return N._id||"legend"}o.exports=function(N,E){if(E)P(N,E);else{var W=N._fullLayout,G=W._legends;W._infolayer.selectAll('[class^="legend"]').each(function(){var H=l.select(this),V=H.attr("class").split(" ")[0];V.match(C)&&G.indexOf(V)===-1&&H.remove()});for(var L=0;LB&&(z=B)}F[h][0]._groupMinRank=z,F[h][0]._preGroupSort=h}var $=function(G,L){return G.trace.legendrank-L.trace.legendrank||G._preSort-L._preSort};for(F.forEach(function(G,L){G[0]._preGroupSort=L}),F.sort(function(G,L){return G[0]._groupMinRank-L[0]._groupMinRank||G[0]._preGroupSort-L[0]._preGroupSort}),h=0;hT?T:w}o.exports=function(w,k,T){var M=k._fullLayout;T||(T=M.legend);var S=T.itemsizing==="constant",C=T.itemwidth,P=(C+2*g.itemGap)/2,D=c(P,0),O=function(A,z,B,$){var j;if(A+1)j=A;else{if(!(z&&z.width>0))return 0;j=z.width}return S?$:Math.min(j,B)};function R(A,z,B){var $=A[0].trace,j=$.marker||{},N=j.line||{},E=B?$.visible&&$.type===B:f.traceIs($,"bar"),W=l.select(z).select("g.legendpoints").selectAll("path.legend"+B).data(E?[A]:[]);W.enter().append("path").classed("legend"+B,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),W.exit().remove(),W.each(function(G){var L=l.select(this),q=G[0],H=O(q.mlw,j.line,5,2);L.style("stroke-width",H+"px");var V=q.mcc;if(!T._inHover&&"mc"in q){var te=p(j),ee=te.mid;ee===void 0&&(ee=(te.max+te.min)/2),V=d.tryColorscale(j,"")(ee)}var U=V||q.mc||j.color,Q=j.pattern,Y=Q&&d.getPatternAttr(Q.shape,0,"");if(Y){var Z=d.getPatternAttr(Q.bgcolor,0,null),X=d.getPatternAttr(Q.fgcolor,0,null),re=Q.fgopacity,ie=_(Q.size,8,10),le=_(Q.solidity,.5,1),se="legend-"+$.uid;L.call(d.pattern,"legend",k,se,Y,ie,le,V,Q.fillmode,Z,X,re)}else L.call(h.fill,U);H&&h.stroke(L,q.mlc||N.color)})}function F(A,z,B){var $=A[0],j=$.trace,N=B?j.visible&&j.type===B:f.traceIs(j,B),E=l.select(z).select("g.legendpoints").selectAll("path.legend"+B).data(N?[A]:[]);if(E.enter().append("path").classed("legend"+B,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),E.exit().remove(),E.size()){var W=j.marker||{},G=O(v(W.line.width,$.pts),W.line,5,2),L="pieLike",q=s.minExtend(j,{marker:{line:{width:G}}},L),H=s.minExtend($,{trace:q},L);y(E,H,q,k)}}w.each(function(A){var z=l.select(this),B=s.ensureSingle(z,"g","layers");B.style("opacity",A[0].trace.opacity);var $=T.valign,j=A[0].lineHeight,N=A[0].height;if($!=="middle"&&j&&N){var E={top:1,bottom:-1}[$]*(.5*(j-N+3));B.attr("transform",c(0,E))}else B.attr("transform",null);B.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill",!0),B.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines",!0);var W=B.selectAll("g.legendsymbols").data([A]);W.enter().append("g").classed("legendsymbols",!0),W.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(function(A){var z,B=A[0].trace,$=[];if(B.visible)switch(B.type){case"histogram2d":case"heatmap":$=[["M-15,-2V4H15V-2Z"]],z=!0;break;case"choropleth":case"choroplethmapbox":$=[["M-6,-6V6H6V-6Z"]],z=!0;break;case"densitymapbox":$=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],z="radial";break;case"cone":$=[["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"]],z=!1;break;case"streamtube":$=[["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"]],z=!1;break;case"surface":$=[["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"]],z=!0;break;case"mesh3d":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!1;break;case"volume":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!0;break;case"isosurface":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],z=!1}var j=l.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data($);j.enter().append("path").classed("legend3dandfriends",!0).attr("transform",D).style("stroke-miterlimit",1),j.exit().remove(),j.each(function(N,E){var W,G=l.select(this),L=p(B),q=L.colorscale,H=L.reversescale;if(q){if(!z){var V=q.length;W=E===0?q[H?V-1:0][1]:E===1?q[H?0:V-1][1]:q[Math.floor((V-1)/2)][1]}}else{var te=B.vertexcolor||B.facecolor||B.color;W=s.isArrayOrTypedArray(te)?te[E]||te[0]:te}G.attr("d",N[0]),W?G.call(h.fill,W):G.call(function(ee){if(ee.size()){var U="legendfill-"+B.uid;d.gradient(ee,k,U,b(H,z==="radial"),q,"fill")}})})}).each(function(A){var z=A[0].trace,B=z.type==="waterfall";if(A[0]._distinct&&B){var $=A[0].trace[A[0].dir].marker;return A[0].mc=$.color,A[0].mlw=$.line.width,A[0].mlc=$.line.color,R(A,this,"waterfall")}var j=[];z.visible&&B&&(j=A[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 N=l.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(j);N.enter().append("path").classed("legendwaterfall",!0).attr("transform",D).style("stroke-miterlimit",1),N.exit().remove(),N.each(function(E){var W=l.select(this),G=z[E[0]].marker,L=O(void 0,G.line,5,2);W.attr("d",E[1]).style("stroke-width",L+"px").call(h.fill,G.color),L&&W.call(h.stroke,G.line.color)})}).each(function(A){R(A,this,"funnel")}).each(function(A){R(A,this)}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendbox").data(z.visible&&f.traceIs(z,"box-violin")?[A]:[]);B.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),B.exit().remove(),B.each(function(){var $=l.select(this);if(z.boxpoints!=="all"&&z.points!=="all"||h.opacity(z.fillcolor)!==0||h.opacity((z.line||{}).color)!==0){var j=O(void 0,z.line,5,2);$.style("stroke-width",j+"px").call(h.fill,z.fillcolor),j&&h.stroke($,z.line.color)}else{var N=s.minExtend(z,{marker:{size:S?12:s.constrain(z.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});B.call(d.pointStyle,N,k)}})}).each(function(A){F(A,this,"funnelarea")}).each(function(A){F(A,this,"pie")}).each(function(A){var z,B,$=x(A),j=$.showFill,N=$.showLine,E=$.showGradientLine,W=$.showGradientFill,G=$.anyFill,L=$.anyLine,q=A[0],H=q.trace,V=p(H),te=V.colorscale,ee=V.reversescale,U=m.hasMarkers(H)||!G?"M5,0":L?"M5,-2":"M5,-3",Q=l.select(this),Y=Q.select(".legendfill").selectAll("path").data(j||W?[A]:[]);if(Y.enter().append("path").classed("js-fill",!0),Y.exit().remove(),Y.attr("d",U+"h"+C+"v6h-"+C+"z").call(function(re){if(re.size())if(j)d.fillGroupStyle(re,k);else{var ie="legendfill-"+H.uid;d.gradient(re,k,ie,b(ee),te,"fill")}}),N||E){var Z=O(void 0,H.line,10,5);B=s.minExtend(H,{line:{width:Z}}),z=[s.minExtend(q,{trace:B})]}var X=Q.select(".legendlines").selectAll("path").data(N||E?[z]:[]);X.enter().append("path").classed("js-line",!0),X.exit().remove(),X.attr("d",U+(E?"l"+C+",0.0001":"h"+C)).call(N?d.lineGroupStyle:function(re){if(re.size()){var ie="legendline-"+H.uid;d.lineGroupStyle(re),d.gradient(re,k,ie,b(ee),te,"stroke")}})}).each(function(A){var z,B,$=x(A),j=$.anyFill,N=$.anyLine,E=$.showLine,W=$.showMarker,G=A[0],L=G.trace,q=!W&&!N&&!j&&m.hasText(L);function H(X,re,ie,le){var se=s.nestedProperty(L,X).get(),pe=s.isArrayOrTypedArray(se)&&re?re(se):se;if(S&&pe&&le!==void 0&&(pe=le),ie){if(peie[1])return ie[1]}return pe}function V(X){return G._distinct&&G.index&&X[G.index]?X[G.index]:X[0]}if(W||q||E){var te={},ee={};if(W){te.mc=H("marker.color",V),te.mx=H("marker.symbol",V),te.mo=H("marker.opacity",s.mean,[.2,1]),te.mlc=H("marker.line.color",V),te.mlw=H("marker.line.width",s.mean,[0,5],2),ee.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var U=H("marker.size",s.mean,[2,16],12);te.ms=U,ee.marker.size=U}E&&(ee.line={width:H("line.width",V,[0,10],5)}),q&&(te.tx="Aa",te.tp=H("textposition",V),te.ts=10,te.tc=H("textfont.color",V),te.tf=H("textfont.family",V)),z=[s.minExtend(G,te)],(B=s.minExtend(L,ee)).selectedpoints=null,B.texttemplate=null}var Q=l.select(this).select("g.legendpoints"),Y=Q.selectAll("path.scatterpts").data(W?z:[]);Y.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",D),Y.exit().remove(),Y.call(d.pointStyle,B,k),W&&(z[0].mrc=3);var Z=Q.selectAll("g.pointtext").data(q?z:[]);Z.enter().append("g").classed("pointtext",!0).append("text").attr("transform",D),Z.exit().remove(),Z.selectAll("text").call(d.textPointStyle,B,k)}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(z.visible&&z.type==="candlestick"?[A,A]:[]);B.enter().append("path").classed("legendcandle",!0).attr("d",function($,j){return j?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",D).style("stroke-miterlimit",1),B.exit().remove(),B.each(function($,j){var N=l.select(this),E=z[j?"increasing":"decreasing"],W=O(void 0,E.line,5,2);N.style("stroke-width",W+"px").call(h.fill,E.fillcolor),W&&h.stroke(N,E.line.color)})}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(z.visible&&z.type==="ohlc"?[A,A]:[]);B.enter().append("path").classed("legendohlc",!0).attr("d",function($,j){return j?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",D).style("stroke-miterlimit",1),B.exit().remove(),B.each(function($,j){var N=l.select(this),E=z[j?"increasing":"decreasing"],W=O(void 0,E.line,5,2);N.style("fill","none").call(d.dashLine,E.line.dash,W),W&&h.stroke(N,E.line.color)})})}},42068:function(o,a,n){n(93348),o.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},26023:function(o,a,n){var l=n(73972),f=n(74875),s=n(41675),c=n(24255),d=n(34031).eraseActiveShape,h=n(71828),p=h._,m=o.exports={};function y(M,S){var C,P,D=S.currentTarget,O=D.getAttribute("data-attr"),R=D.getAttribute("data-val")||!0,F=M._fullLayout,A={},z=s.list(M,null,!0),B=F._cartesianSpikesEnabled;if(O==="zoom"){var $,j=R==="in"?.5:2,N=(1+j)/2,E=(1-j)/2;for(P=0;P1?(U=["toggleHover"],Q=["resetViews"]):A?(ee=["zoomInGeo","zoomOutGeo"],U=["hoverClosestGeo"],Q=["resetGeo"]):F?(U=["hoverClosest3d"],Q=["resetCameraDefault3d","resetCameraLastSave3d"]):N?(ee=["zoomInMapbox","zoomOutMapbox"],U=["toggleHover"],Q=["resetViewMapbox"]):$?U=["hoverClosestGl2d"]:z?U=["hoverClosestPie"]:G?(U=["hoverClosestCartesian","hoverCompareCartesian"],Q=["resetViewSankey"]):U=["toggleHover"],R&&(U=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(se){for(var pe=0;pe0)){var k=function(M,S,C){for(var P=C.filter(function(F){return S[F].anchor===M._id}),D=0,O=0;O=Se.max)pe=re[Te+1];else if(se=Se.pmax)pe=re[Te+1];else if(seTe._length||ge+Ie<0)return;Ee=ue+Ie,De=ge+Ie;break;case Me:if(Re="col-resize",ue+Ie>Te._length)return;Ee=ue+Ie,De=ge;break;case ce:if(Re="col-resize",ge+Ie<0)return;Ee=ue,De=ge+Ie;break;default:Re="ew-resize",Ee=xe,De=xe+Ie}if(De=0;$--){var j=S.append("path").attr(P).style("opacity",$?.1:D).call(c.stroke,R).call(c.fill,O).call(d.dashLine,$?"solid":A,$?4+F:F);if(b(j,_,T),z){var N=h(_.layout,"selections",T);j.style({cursor:"move"});var E={element:j.node(),plotinfo:M,gd:_,editHelpers:N,isActiveSelection:!0},W=l(C,_);f(W,j,E)}else j.style("pointer-events",$?"all":"none");B[$]=j}var G=B[0];B[1].node().addEventListener("click",function(){return function(L,q){if(v(L)){var H=+q.node().getAttribute("data-index");if(H>=0){if(H===L._fullLayout._activeSelectionIndex)return void x(L);L._fullLayout._activeSelectionIndex=H,L._fullLayout._deactivateSelection=x,y(L)}}}(_,G)})}(_._fullLayout._selectionLayer)}function b(_,w,k){var T=k.xref+k.yref;d.setClipUrl(_,"clip"+w._fullLayout._uid+T,w)}function x(_){v(_)&&_._fullLayout._activeSelectionIndex>=0&&(s(_),delete _._fullLayout._activeSelectionIndex,y(_))}o.exports={draw:y,drawOne:g,activateLastSelection:function(_){if(v(_)){var w=_._fullLayout.selections.length-1;_._fullLayout._activeSelectionIndex=w,_._fullLayout._deactivateSelection=x,y(_)}}}},53777:function(o,a,n){var l=n(79952).P,f=n(1426).extendFlat;o.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:f({},l,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},90849:function(o){o.exports=function(a,n,l){l("newselection.mode"),l("newselection.line.width")&&(l("newselection.line.color"),l("newselection.line.dash")),l("activeselection.fillcolor"),l("activeselection.opacity")}},35855:function(o,a,n){var l=n(64505).selectMode,f=n(51873).clearOutline,s=n(60165),c=s.readPaths,d=s.writePaths,h=s.fixDatesForPaths;o.exports=function(p,m){if(p.length){var y=p[0][0];if(y){var v=y.getAttribute("d"),g=m.gd,b=g._fullLayout.newselection,x=m.plotinfo,_=x.xaxis,w=x.yaxis,k=m.isActiveSelection,T=m.dragmode,M=(g.layout||{}).selections||[];if(!l(T)&&k!==void 0){var S=g._fullLayout._activeSelectionIndex;if(S-1,kt=[];if(function(Mt){return Mt&&Array.isArray(Mt)&&Mt[0].hoverOnBox!==!0}(Qe)){Z(ke,Ae,Ie);var Je=function(Mt,zt){var wt,ve,_e=Mt[0],Ve=-1,We=[];for(ve=0;ve0?function(Mt,zt){var wt,ve,_e,Ve=[];for(_e=0;_e0&&Ve.push(wt);if(Ve.length===1&&Ve[0]===zt.searchInfo&&(ve=zt.searchInfo.cd[0].trace).selectedpoints.length===zt.pointNumbers.length){for(_e=0;_e1||(ve+=zt.selectedpoints.length)>1))return!1;return ve===1}(Ue)&&(ct=se(Je))){for(Be&&Be.remove(),Ne=0;Ne=0})(Re)&&Re._fullLayout._deactivateShape(Re),function(lt){return lt._fullLayout._activeSelectionIndex>=0}(Re)&&Re._fullLayout._deactivateSelection(Re);var Ie=Re._fullLayout._zoomlayer,Be=g(Ee),Ue=x(Ee);if(Be||Ue){var qe,Ye,at=Ie.selectAll(".select-outline-"+De.id);at&&Re._fullLayout._outlining&&(Be&&(qe=P(at,ke)),qe&&s.call("_guiRelayout",Re,{shapes:qe}),Ue&&!te(ke)&&(Ye=D(at,ke)),Ye&&(Re._fullLayout._noEmitSelectedAtStart=!0,s.call("_guiRelayout",Re,{selections:Ye}).then(function(){Ae&&O(Re)})),Re._fullLayout._outlining=!1)}De.selection={},De.selection.selectionDefs=ke.selectionDefs=[],De.selection.mergedPolygons=ke.mergedPolygons=[]}function re(ke){return ke._id}function ie(ke,Ae,Ee,De){if(!ke.calcdata)return[];var Re,Ie,Be,Ue=[],qe=Ae.map(re),Ye=Ee.map(re);for(Be=0;Be0?De[0]:Ee;return!!Ae.selectedpoints&&Ae.selectedpoints.indexOf(Re)>-1}function pe(ke,Ae,Ee){var De,Re;for(De=0;De-1&&Ae;if(!Ie&&Ae){var Ot=ne(ke,!0);if(Ot.length){var At=Ot[0].xref,Lt=Ot[0].yref;if(At&&Lt){var Rt=ue(Ot);ge([B(ke,At,"x"),B(ke,Lt,"y")])(jt,Rt)}}ke._fullLayout._noEmitSelectedAtStart?ke._fullLayout._noEmitSelectedAtStart=!1:Tt&&be(ke,jt),ct._reselect=!1}if(!Ie&&ct._deselect){var $t=ct._deselect;(function(Yt,Xt,Bt){for(var Wt=0;Wt=0)bt._fullLayout._deactivateShape(bt);else if(!Ye){var Rt=ze.clickmode;z.done(Et).then(function(){if(z.clear(Et),At===2){for(Nt.remove(),_e=0;_e-1&&ee(Lt,bt,De.xaxes,De.yaxes,De.subplot,De,Nt),Rt==="event"&&be(bt,void 0);h.click(bt,Lt,kt.id)}).catch(R.error)}},De.doneFn=function(){yt.remove(),z.done(Et).then(function(){z.clear(Et),!Ne&&ve&&De.selectionDefs&&(ve.subtract=St,De.selectionDefs.push(ve),De.mergedPolygons.length=0,[].push.apply(De.mergedPolygons,wt)),(Ne||Ye)&&X(De,Ne),De.doneFnCompleted&&De.doneFnCompleted(jt),at&&be(bt,We)}).catch(R.error)}},clearOutline:T,clearSelectionsCache:X,selectOnClick:ee}},89827:function(o,a,n){var l=n(50215),f=n(41940),s=n(82196).line,c=n(79952).P,d=n(1426).extendFlat,h=n(44467).templatedArray,p=(n(24695),n(9012)),m=n(5386).R,y=n(37281);o.exports=h("shape",{visible:d({},p.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:d({},p.legend,{editType:"calc+arraydraw"}),legendgroup:d({},p.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:d({},p.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:f({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:d({},p.legendrank,{editType:"calc+arraydraw"}),legendwidth:d({},p.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:d({},l.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:d({},l.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:d({},s.color,{editType:"arraydraw"}),width:d({},s.width,{editType:"calc+arraydraw"}),dash:d({},c,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:m({},{keys:Object.keys(y)}),font:f({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},5627:function(o,a,n){var l=n(71828),f=n(89298),s=n(21459),c=n(30477);function d(y){return p(y.line.width,y.xsizemode,y.x0,y.x1,y.path,!1)}function h(y){return p(y.line.width,y.ysizemode,y.y0,y.y1,y.path,!0)}function p(y,v,g,b,x,_){var w=y/2,k=_;if(v==="pixel"){var T=x?c.extractPathCoords(x,_?s.paramIsY:s.paramIsX):[g,b],M=l.aggNums(Math.max,null,T),S=l.aggNums(Math.min,null,T),C=S<0?Math.abs(S)+w:w,P=M>0?M+w:w;return{ppad:w,ppadplus:k?C:P,ppadminus:k?P:C}}return{ppad:w}}function m(y,v,g,b,x){var _=y.type==="category"||y.type==="multicategory"?y.r2c:y.d2c;if(v!==void 0)return[_(v),_(g)];if(b){var w,k,T,M,S=1/0,C=-1/0,P=b.match(s.segmentRE);for(y.type==="date"&&(_=c.decodeDate(_)),w=0;wC&&(C=M)));return C>=S?[S,C]:void 0}}o.exports=function(y){var v=y._fullLayout,g=l.filterVisible(v.shapes);if(g.length&&y._fullData.length)for(var b=0;b=re?ie-se:se-ie,-180/Math.PI*Math.atan2(pe,Te)}(C,D,P,O):0),A.call(function(re){return re.call(c.font,F).attr({}),s.convertToTspans(re,v),re});var Q=function(re,ie,le,se,pe,Te,Se){var Oe,Me,ce,ye,J=pe.label.textposition,ne=pe.label.textangle,de=pe.label.padding,xe=pe.type,ue=Math.PI/180*Te,ge=Math.sin(ue),be=Math.cos(ue),we=pe.label.xanchor,ke=pe.label.yanchor;if(xe==="line"){J==="start"?(Oe=re,Me=ie):J==="end"?(Oe=le,Me=se):(Oe=(re+le)/2,Me=(ie+se)/2),we==="auto"&&(we=J==="start"?ne==="auto"?le>re?"left":lere?"right":lere?"right":lere?"left":le1&&(Oe.length!==2||Oe[1][0]!=="Z")&&(G===0&&(Oe[0][0]="M"),R[W]=Oe,$(),j())}}()}}function re(pe,Te){(function(Se,Oe){if(R.length)for(var Me=0;MeMe?(J=Se,ue="y0",ne=Me,ge="y1"):(J=Me,ue="y1",ne=Se,ge="y0"),ut(wt),Mt(se,ie),function(ve,_e,Ve){var We=_e.xref,Ze=_e.yref,Ge=c.getFromId(Ve,We),Ke=c.getFromId(Ve,Ze),nt="";We==="paper"||Ge.autorange||(nt+=We),Ze==="paper"||Ke.autorange||(nt+=Ze),v.setClipUrl(ve,nt?"clip"+Ve._fullLayout._uid+nt:null,Ve)}(re,ie,X),Je.moveFn=Ae==="move"?pt:It,Je.altKey=wt.altKey)},doneFn:function(){M(X)||(x(re),zt(se),P(re,X,ie),f.call("_guiRelayout",X,pe.getUpdateObj()))},clickFn:function(){M(X)||zt(se)}};function ut(wt){if(M(X))Ae=null;else if(Be)Ae=wt.target.tagName==="path"?"move":wt.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ve=Je.element.getBoundingClientRect(),_e=ve.right-ve.left,Ve=ve.bottom-ve.top,We=wt.clientX-ve.left,Ze=wt.clientY-ve.top,Ge=!Ue&&_e>Ee&&Ve>De&&!wt.shiftKey?b.getCursor(We/_e,1-Ze/Ve):"move";x(re,Ge),Ae=Ge.split("-")[0]}}function pt(wt,ve){if(ie.type==="path"){var _e=function(Ze){return Ze},Ve=_e,We=_e;Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(Ve=function(Ze){return Qe(ze(Ze)+wt)},at&&at.type==="date"&&(Ve=w.encodeDate(Ve))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(We=function(Ze){return it(Ne(Ze)+ve)},ct&&ct.type==="date"&&(We=w.encodeDate(We))),qe("path",ie.path=D(ke,Ve,We))}else Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(qe("x0",ie.x0=Qe(Te+wt)),qe("x1",ie.x1=Qe(Oe+wt))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(qe("y0",ie.y0=it(Se+ve)),qe("y1",ie.y1=it(Me+ve)));re.attr("d",k(X,ie)),Mt(se,ie),p(X,le,ie,Ye)}function It(wt,ve){if(Ue){var _e=function(ht){return ht},Ve=_e,We=_e;Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(Ve=function(ht){return Qe(ze(ht)+wt)},at&&at.type==="date"&&(Ve=w.encodeDate(Ve))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(We=function(ht){return it(Ne(ht)+ve)},ct&&ct.type==="date"&&(We=w.encodeDate(We))),qe("path",ie.path=D(ke,Ve,We))}else if(Be){if(Ae==="resize-over-start-point"){var Ze=Te+wt,Ge=Ie?Se-ve:Se+ve;qe("x0",ie.x0=Re?Ze:Qe(Ze)),qe("y0",ie.y0=Ie?Ge:it(Ge))}else if(Ae==="resize-over-end-point"){var Ke=Oe+wt,nt=Ie?Me-ve:Me+ve;qe("x1",ie.x1=Re?Ke:Qe(Ke)),qe("y1",ie.y1=Ie?nt:it(nt))}}else{var st=function(ht){return Ae.indexOf(ht)!==-1},mt=st("n"),tt=st("s"),Ft=st("w"),Vt=st("e"),St=mt?J+ve:J,Nt=tt?ne+ve:ne,Dt=Ft?de+wt:de,gt=Vt?xe+wt:xe;Ie&&(mt&&(St=J-ve),tt&&(Nt=ne-ve)),(!Ie&&Nt-St>De||Ie&&St-Nt>De)&&(qe(ue,ie[ue]=Ie?St:it(St)),qe(ge,ie[ge]=Ie?Nt:it(Nt))),gt-Dt>Ee&&(qe(be,ie[be]=Re?Dt:Qe(Dt)),qe(we,ie[we]=Re?gt:Qe(gt)))}re.attr("d",k(X,ie)),Mt(se,ie),p(X,le,ie,Ye)}function Mt(wt,ve){(Re||Ie)&&function(){var _e=ve.type!=="path",Ve=wt.selectAll(".visual-cue").data([0]);Ve.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var We=ze(Re?ve.xanchor:s.midRange(_e?[ve.x0,ve.x1]:w.extractPathCoords(ve.path,_.paramIsX))),Ze=Ne(Ie?ve.yanchor:s.midRange(_e?[ve.y0,ve.y1]:w.extractPathCoords(ve.path,_.paramIsY)));if(We=w.roundPositionForSharpStrokeRendering(We,1),Ze=w.roundPositionForSharpStrokeRendering(Ze,1),Re&&Ie){var Ge="M"+(We-1-1)+","+(Ze-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ve.attr("d",Ge)}else if(Re){var Ke="M"+(We-1-1)+","+(Ze-9-1)+"v18 h2 v-18 Z";Ve.attr("d",Ke)}else{var nt="M"+(We-9-1)+","+(Ze-1-1)+"h18 v2 h-18 Z";Ve.attr("d",nt)}}()}function zt(wt){wt.selectAll(".visual-cue").remove()}b.init(Je),kt.node().onmousemove=ut}(R,Q,z,F,j,ee):z.editable===!0&&Q.style("pointer-events",V||y.opacity(G)*W<=.5?"stroke":"all");Q.node().addEventListener("click",function(){return function(X,re){if(S(X)){var ie=+re.node().getAttribute("data-index");if(ie>=0){if(ie===X._fullLayout._activeShapeIndex)return void O(X);X._fullLayout._activeShapeIndex=ie,X._fullLayout._deactivateShape=O,T(X)}}}(R,Q)})}z._input&&z.visible===!0&&(z.layer!=="below"?$(R._fullLayout._shapeUpperLayer):z.xref==="paper"||z.yref==="paper"?$(R._fullLayout._shapeLowerLayer):B._hadPlotinfo?$((B.mainplotinfo||B).shapelayer):$(R._fullLayout._shapeLowerLayer))}function P(R,F,A){var z=(A.xref+A.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");v.setClipUrl(R,z?"clip"+F._fullLayout._uid+z:null,F)}function D(R,F,A){return R.replace(_.segmentRE,function(z){var B=0,$=z.charAt(0),j=_.paramIsX[$],N=_.paramIsY[$],E=_.numParams[$];return $+z.substr(1).replace(_.paramRE,function(W){return B>=E||(j[B]?W=F(W):N[B]&&(W=A(W)),B++),W})})}function O(R){S(R)&&R._fullLayout._activeShapeIndex>=0&&(m(R),delete R._fullLayout._activeShapeIndex,T(R))}o.exports={draw:T,drawOne:C,eraseActiveShape:function(R){if(S(R)){m(R);var F=R._fullLayout._activeShapeIndex,A=(R.layout||{}).shapes||[];if(F0&&CU&&(Y="X"),Y});return H>U&&(Q=Q.replace(/[\s,]*X.*/,""),f.log("Ignoring extra params in segment "+q)),V+Q})}(d,p,y);if(d.xsizemode==="pixel"){var C=p(d.xanchor);v=C+d.x0,g=C+d.x1}else v=p(d.x0),g=p(d.x1);if(d.ysizemode==="pixel"){var P=y(d.yanchor);b=P-d.y0,x=P-d.y1}else b=y(d.y0),x=y(d.y1);if(_==="line")return"M"+v+","+b+"L"+g+","+x;if(_==="rect")return"M"+v+","+b+"H"+g+"V"+x+"H"+v+"Z";var D=(v+g)/2,O=(b+x)/2,R=Math.abs(D-v),F=Math.abs(O-b),A="A"+R+","+F,z=D+R+","+O;return"M"+z+A+" 0 1,1 "+D+","+(O-F)+A+" 0 0,1 "+z+"Z"}},89853:function(o,a,n){var l=n(34031);o.exports={moduleType:"component",name:"shapes",layoutAttributes:n(89827),supplyLayoutDefaults:n(84726),supplyDrawNewShapeDefaults:n(45547),includeBasePlot:n(76325)("shapes"),calcAutorange:n(5627),draw:l.draw,drawOne:l.drawOne}},37281:function(o){function a(s,c){return c?c.d2l(s):s}function n(s,c){return c?c.l2d(s):s}function l(s,c){return a(s.x1,c)-a(s.x0,c)}function f(s,c,d){return a(s.y1,d)-a(s.y0,d)}o.exports={x0:function(s){return s.x0},x1:function(s){return s.x1},y0:function(s){return s.y0},y1:function(s){return s.y1},slope:function(s,c,d){return s.type!=="line"?void 0:f(s,0,d)/l(s,c)},dx:l,dy:f,width:function(s,c){return Math.abs(l(s,c))},height:function(s,c,d){return Math.abs(f(s,0,d))},length:function(s,c,d){return s.type!=="line"?void 0:Math.sqrt(Math.pow(l(s,c),2)+Math.pow(f(s,0,d),2))},xcenter:function(s,c){return n((a(s.x1,c)+a(s.x0,c))/2,c)},ycenter:function(s,c,d){return n((a(s.y1,d)+a(s.y0,d))/2,d)}}},75067:function(o,a,n){var l=n(41940),f=n(35025),s=n(1426).extendDeepAll,c=n(30962).overrideAll,d=n(85594),h=n(44467).templatedArray,p=n(98292),m=h("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});o.exports=c(h("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:m,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:s(f({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:d.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:l({})},font:l({}),activebgcolor:{valType:"color",dflt:p.gripBgActiveColor},bgcolor:{valType:"color",dflt:p.railBgColor},bordercolor:{valType:"color",dflt:p.railBorderColor},borderwidth:{valType:"number",min:0,dflt:p.railBorderWidth},ticklen:{valType:"number",min:0,dflt:p.tickLength},tickcolor:{valType:"color",dflt:p.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:p.minorTickLength}}),"arraydraw","from-root")},98292:function(o){o.exports={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}},12343:function(o,a,n){var l=n(71828),f=n(85501),s=n(75067),c=n(98292).name,d=s.steps;function h(m,y,v){function g(k,T){return l.coerce(m,y,s,k,T)}for(var b=f(m,y,{name:"steps",handleItemDefaults:p}),x=0,_=0;_0&&(H=H.transition().duration(N.transition.duration).ease(N.transition.easing)),H.attr("transform",h(q-.5*y.gripWidth,N._dims.currentValueTotalHeight))}}function A(j,N){var E=j._dims;return E.inputAreaStart+y.stepInset+(E.inputAreaLength-2*y.stepInset)*Math.min(1,Math.max(0,N))}function z(j,N){var E=j._dims;return Math.min(1,Math.max(0,(N-y.stepInset-E.inputAreaStart)/(E.inputAreaLength-2*y.stepInset-2*E.inputAreaStart)))}function B(j,N,E){var W=E._dims,G=d.ensureSingle(j,"rect",y.railTouchRectClass,function(L){L.call(O,N,j,E).style("pointer-events","all")});G.attr({width:W.inputAreaLength,height:Math.max(W.inputAreaWidth,y.tickOffset+E.ticklen+W.labelHeight)}).call(s.fill,E.bgcolor).attr("opacity",0),c.setTranslate(G,0,W.currentValueTotalHeight)}function $(j,N){var E=N._dims,W=E.inputAreaLength-2*y.railInset,G=d.ensureSingle(j,"rect",y.railRectClass);G.attr({width:W,height:y.railWidth,rx:y.railRadius,ry:y.railRadius,"shape-rendering":"crispEdges"}).call(s.stroke,N.bordercolor).call(s.fill,N.bgcolor).style("stroke-width",N.borderwidth+"px"),c.setTranslate(G,y.railInset,.5*(E.inputAreaWidth-y.railWidth)+E.currentValueTotalHeight)}o.exports=function(j){var N=j._context.staticPlot,E=j._fullLayout,W=function(te,ee){for(var U=te[y.name],Q=[],Y=0;Y0?[0]:[]);function L(te){te._commandObserver&&(te._commandObserver.remove(),delete te._commandObserver),f.autoMargin(j,_(te))}if(G.enter().append("g").classed(y.containerClassName,!0).style("cursor",N?null:"ew-resize"),G.exit().each(function(){l.select(this).selectAll("g."+y.groupClassName).each(L)}).remove(),W.length!==0){var q=G.selectAll("g."+y.groupClassName).data(W,w);q.enter().append("g").classed(y.groupClassName,!0),q.exit().each(L).remove();for(var H=0;H0||Oe<0){var J={left:[-Me,0],right:[Me,0],top:[0,-Me],bottom:[0,Me]}[P.side];Q.attr("transform",h(J[0],J[1]))}}}return H.call(V),G&&($?H.on(".opacity",null):(A=0,z=!0,H.text(S).on("mouseover.opacity",function(){l.select(this).transition().duration(v.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){l.select(this).transition().duration(v.HIDE_PLACEHOLDER).style("opacity",0)})),H.call(y.makeEditable,{gd:x}).on("edit",function(U){C!==void 0?c.call("_guiRestyle",x,M,U,C):c.call("_guiRelayout",x,M,U)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(V)}).on("input",function(U){this.text(U||" ").call(y.positionText,D.x,D.y)})),H.classed("js-placeholder",z),R}}},7163:function(o,a,n){var l=n(41940),f=n(22399),s=n(1426).extendFlat,c=n(30962).overrideAll,d=n(35025),h=n(44467).templatedArray,p=h("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});o.exports=c(h("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:p,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:s(d({editType:"arraydraw"}),{}),font:l({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:f.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(o){o.exports={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:"◄",right:"►",up:"▲",down:"▼"}}},64897:function(o,a,n){var l=n(71828),f=n(85501),s=n(7163),c=n(75909).name,d=s.buttons;function h(m,y,v){function g(b,x){return l.coerce(m,y,s,b,x)}g("visible",f(m,y,{name:"buttons",handleItemDefaults:p}).length>0)&&(g("active"),g("direction"),g("type"),g("showactive"),g("x"),g("y"),l.noneOrAll(m,y,["x","y"]),g("xanchor"),g("yanchor"),g("pad.t"),g("pad.r"),g("pad.b"),g("pad.l"),l.coerceFont(g,"font",v.font),g("bgcolor",v.paper_bgcolor),g("bordercolor"),g("borderwidth"))}function p(m,y){function v(g,b){return l.coerce(m,y,d,g,b)}v("visible",m.method==="skip"||Array.isArray(m.args))&&(v("method"),v("args"),v("args2"),v("label"),v("execute"))}o.exports=function(m,y){f(m,y,{name:c,handleItemDefaults:h})}},13689:function(o,a,n){var l=n(39898),f=n(74875),s=n(7901),c=n(91424),d=n(71828),h=n(63893),p=n(44467).arrayEditor,m=n(18783).LINE_SPACING,y=n(75909),v=n(25849);function g(A){return A._index}function b(A,z){return+A.attr(y.menuIndexAttrName)===z._index}function x(A,z,B,$,j,N,E,W){z.active=E,p(A.layout,y.name,z).applyUpdate("active",E),z.type==="buttons"?w(A,$,null,null,z):z.type==="dropdown"&&(j.attr(y.menuIndexAttrName,"-1"),_(A,$,j,N,z),W||w(A,$,j,N,z))}function _(A,z,B,$,j){var N=d.ensureSingle(z,"g",y.headerClassName,function(H){H.style("pointer-events","all")}),E=j._dims,W=j.active,G=j.buttons[W]||y.blankHeaderOpts,L={y:j.pad.t,yPad:0,x:j.pad.l,xPad:0,index:0},q={width:E.headerWidth,height:E.headerHeight};N.call(k,j,G,A).call(R,j,L,q),d.ensureSingle(z,"text",y.headerArrowClassName,function(H){H.attr("text-anchor","end").call(c.font,j.font).text(y.arrowSymbol[j.direction])}).attr({x:E.headerWidth-y.arrowOffsetX+j.pad.l,y:E.headerHeight/2+y.textOffsetY+j.pad.t}),N.on("click",function(){B.call(F,String(b(B,j)?-1:j._index)),w(A,z,B,$,j)}),N.on("mouseover",function(){N.call(C)}),N.on("mouseout",function(){N.call(P,j)}),c.setTranslate(z,E.lx,E.ly)}function w(A,z,B,$,j){B||(B=z).attr("pointer-events","all");var N=function(Q){return+Q.attr(y.menuIndexAttrName)==-1}(B)&&j.type!=="buttons"?[]:j.buttons,E=j.type==="dropdown"?y.dropdownButtonClassName:y.buttonClassName,W=B.selectAll("g."+E).data(d.filterVisible(N)),G=W.enter().append("g").classed(E,!0),L=W.exit();j.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),L.transition().attr("opacity","0").remove()):L.remove();var q=0,H=0,V=j._dims,te=["up","down"].indexOf(j.direction)!==-1;j.type==="dropdown"&&(te?H=V.headerHeight+y.gapButtonHeader:q=V.headerWidth+y.gapButtonHeader),j.type==="dropdown"&&j.direction==="up"&&(H=-y.gapButtonHeader+y.gapButton-V.openHeight),j.type==="dropdown"&&j.direction==="left"&&(q=-y.gapButtonHeader+y.gapButton-V.openWidth);var ee={x:V.lx+q+j.pad.l,y:V.ly+H+j.pad.t,yPad:y.gapButton,xPad:y.gapButton,index:0},U={l:ee.x+j.borderwidth,t:ee.y+j.borderwidth};W.each(function(Q,Y){var Z=l.select(this);Z.call(k,j,Q,A).call(R,j,ee),Z.on("click",function(){l.event.defaultPrevented||(Q.execute&&(Q.args2&&j.active===Y?(x(A,j,0,z,B,$,-1),f.executeAPICommand(A,Q.method,Q.args2)):(x(A,j,0,z,B,$,Y),f.executeAPICommand(A,Q.method,Q.args))),A.emit("plotly_buttonclicked",{menu:j,button:Q,active:j.active}))}),Z.on("mouseover",function(){Z.call(C)}),Z.on("mouseout",function(){Z.call(P,j),W.call(S,j)})}),W.call(S,j),te?(U.w=Math.max(V.openWidth,V.headerWidth),U.h=ee.y-U.t):(U.w=ee.x-U.l,U.h=Math.max(V.openHeight,V.headerHeight)),U.direction=j.direction,$&&(W.size()?function(Q,Y,Z,X,re,ie){var le,se,pe,Te=re.direction,Se=Te==="up"||Te==="down",Oe=re._dims,Me=re.active;if(Se)for(se=0,pe=0;pe0?[0]:[]);if(j.enter().append("g").classed(y.containerClassName,!0).style("cursor","pointer"),j.exit().each(function(){l.select(this).selectAll("g."+y.headerGroupClassName).each($)}).remove(),B.length!==0){var N=j.selectAll("g."+y.headerGroupClassName).data(B,g);N.enter().append("g").classed(y.headerGroupClassName,!0);for(var E=d.ensureSingle(j,"g",y.dropdownButtonGroupClassName,function(H){H.style("pointer-events","all")}),W=0;WR,z=d.barLength+2*d.barPad,B=d.barWidth+2*d.barPad,$=k,j=M+S;j+B>g&&(j=g-B);var N=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-horizontal",!0).call(f.fill,d.barColor),A?(this.hbar=N.attr({rx:d.barRadius,ry:d.barRadius,x:$,y:j,width:z,height:B}),this._hbarXMin=$+z/2,this._hbarTranslateMax=R-z):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var E=S>F,W=d.barWidth+2*d.barPad,G=d.barLength+2*d.barPad,L=k+T,q=M;L+W>v&&(L=v-W);var H=this.container.selectAll("rect.scrollbar-vertical").data(E?[0]:[]);H.exit().on(".drag",null).remove(),H.enter().append("rect").classed("scrollbar-vertical",!0).call(f.fill,d.barColor),E?(this.vbar=H.attr({rx:d.barRadius,ry:d.barRadius,x:L,y:q,width:W,height:G}),this._vbarYMin=q+G/2,this._vbarTranslateMax=F-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var V=this.id,te=b-.5,ee=E?x+W+.5:x+.5,U=_-.5,Q=A?w+B+.5:w+.5,Y=y._topdefs.selectAll("#"+V).data(A||E?[0]:[]);if(Y.exit().remove(),Y.enter().append("clipPath").attr("id",V).append("rect"),A||E?(this._clipRect=Y.select("rect").attr({x:Math.floor(te),y:Math.floor(U),width:Math.ceil(ee)-Math.floor(te),height:Math.ceil(Q)-Math.floor(U)}),this.container.call(s.setClipUrl,V,this.gd),this.bg.attr({x:k,y:M,width:T,height:S})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),A||E){var Z=l.behavior.drag().on("dragstart",function(){l.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Z);var X=l.behavior.drag().on("dragstart",function(){l.event.sourceEvent.preventDefault(),l.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(X),E&&this.vbar.on(".drag",null).call(X)}this.setTranslate(p,m)},d.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.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)},d.prototype._onBoxDrag=function(){var h=this.translateX,p=this.translateY;this.hbar&&(h-=l.event.dx),this.vbar&&(p-=l.event.dy),this.setTranslate(h,p)},d.prototype._onBoxWheel=function(){var h=this.translateX,p=this.translateY;this.hbar&&(h+=l.event.deltaY),this.vbar&&(p+=l.event.deltaY),this.setTranslate(h,p)},d.prototype._onBarDrag=function(){var h=this.translateX,p=this.translateY;if(this.hbar){var m=h+this._hbarXMin,y=m+this._hbarTranslateMax;h=(c.constrain(l.event.x,m,y)-m)/(y-m)*(this.position.w-this._box.w)}if(this.vbar){var v=p+this._vbarYMin,g=v+this._vbarTranslateMax;p=(c.constrain(l.event.y,v,g)-v)/(g-v)*(this.position.h-this._box.h)}this.setTranslate(h,p)},d.prototype.setTranslate=function(h,p){var m=this.position.w-this._box.w,y=this.position.h-this._box.h;if(h=c.constrain(h||0,0,m),p=c.constrain(p||0,0,y),this.translateX=h,this.translateY=p,this.container.call(s.setTranslate,this._box.l-this.position.l-h,this._box.t-this.position.t-p),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+h-.5),y:Math.floor(this.position.t+p-.5)}),this.hbar){var v=h/m;this.hbar.call(s.setTranslate,h+v*this._hbarTranslateMax,p)}if(this.vbar){var g=p/y;this.vbar.call(s.setTranslate,h,p+g*this._vbarTranslateMax)}}},18783:function(o){o.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},24695:function(o){o.exports={axisRefDescription:function(a,n,l){return["If set to a",a,"axis id (e.g. *"+a+"* or","*"+a+"2*), the `"+a+"` position refers to a",a,"coordinate. If set to *paper*, the `"+a+"`","position refers to the distance from the",n,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",n,"("+l+"). If set to a",a,"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",n,"of the domain of that axis: e.g.,","*"+a+"2 domain* refers to the domain of the second",a," axis and a",a,"position of 0.5 refers to the","point between the",n,"and the",l,"of the domain of the","second",a,"axis."].join(" ")}}},31562:function(o){o.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},74808:function(o){o.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},37822:function(o){o.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(o){o.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},32396:function(o,a){a.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],a.STYLE=a.CSS_DECLARATIONS.map(function(n){return n.join(": ")+"; "}).join("")},77922:function(o,a){a.xmlns="http://www.w3.org/2000/xmlns/",a.svg="http://www.w3.org/2000/svg",a.xlink="http://www.w3.org/1999/xlink",a.svgAttrs={xmlns:a.svg,"xmlns:xlink":a.xlink}},8729:function(o,a,n){a.version=n(11506).version,n(7417),n(98847);for(var l=n(73972),f=a.register=l.register,s=n(10641),c=Object.keys(s),d=0;d",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(o,a){a.isLeftAnchor=function(n){return n.xanchor==="left"||n.xanchor==="auto"&&n.x<=.3333333333333333},a.isCenterAnchor=function(n){return n.xanchor==="center"||n.xanchor==="auto"&&n.x>.3333333333333333&&n.x<.6666666666666666},a.isRightAnchor=function(n){return n.xanchor==="right"||n.xanchor==="auto"&&n.x>=.6666666666666666},a.isTopAnchor=function(n){return n.yanchor==="top"||n.yanchor==="auto"&&n.y>=.6666666666666666},a.isMiddleAnchor=function(n){return n.yanchor==="middle"||n.yanchor==="auto"&&n.y>.3333333333333333&&n.y<.6666666666666666},a.isBottomAnchor=function(n){return n.yanchor==="bottom"||n.yanchor==="auto"&&n.y<=.3333333333333333}},26348:function(o,a,n){var l=n(64872),f=l.mod,s=l.modHalf,c=Math.PI,d=2*c;function h(v){return Math.abs(v[1]-v[0])>d-1e-14}function p(v,g){return s(g-v,d)}function m(v,g){if(h(g))return!0;var b,x;g[0](x=f(x,d))&&(x+=d);var _=f(v,d),w=_+d;return _>=b&&_<=x||w>=b&&w<=x}function y(v,g,b,x,_,w,k){_=_||0,w=w||0;var T,M,S,C,P,D=h([b,x]);function O(z,B){return[z*Math.cos(B)+_,w-z*Math.sin(B)]}D?(T=0,M=c,S=d):b=_&&v<=w);var _,w},pathArc:function(v,g,b,x,_){return y(null,v,g,b,x,_,0)},pathSector:function(v,g,b,x,_){return y(null,v,g,b,x,_,1)},pathAnnulus:function(v,g,b,x,_,w){return y(v,g,b,x,_,w,1)}}},73627:function(o,a){var n=Array.isArray,l=ArrayBuffer,f=DataView;function s(h){return l.isView(h)&&!(h instanceof f)}function c(h){return n(h)||s(h)}function d(h,p,m){if(c(h)){if(c(h[0])){for(var y=m,v=0;vw.max?x.set(_):x.set(+b)}},integer:{coerceFunction:function(b,x,_,w){b%1||!l(b)||w.min!==void 0&&bw.max?x.set(_):x.set(+b)}},string:{coerceFunction:function(b,x,_,w){if(typeof b!="string"){var k=typeof b=="number";w.strict!==!0&&k?x.set(String(b)):x.set(_)}else w.noBlank&&!b?x.set(_):x.set(b)}},color:{coerceFunction:function(b,x,_){f(b).isValid()?x.set(b):x.set(_)}},colorlist:{coerceFunction:function(b,x,_){Array.isArray(b)&&b.length&&b.every(function(w){return f(w).isValid()})?x.set(b):x.set(_)}},colorscale:{coerceFunction:function(b,x,_){x.set(c.get(b,_))}},angle:{coerceFunction:function(b,x,_){b==="auto"?x.set("auto"):l(b)?x.set(y(+b,360)):x.set(_)}},subplotid:{coerceFunction:function(b,x,_,w){var k=w.regex||m(_);typeof b=="string"&&k.test(b)?x.set(b):x.set(_)},validateFunction:function(b,x){var _=x.dflt;return b===_||typeof b=="string"&&!!m(_).test(b)}},flaglist:{coerceFunction:function(b,x,_,w){if((w.extras||[]).indexOf(b)===-1)if(typeof b=="string"){for(var k=b.split("+"),T=0;T=l&&N<=f?N:m}if(typeof N!="string"&&typeof N!="number")return m;N=String(N);var q=S(E),H=N.charAt(0);!q||H!=="G"&&H!=="g"||(N=N.substr(1),E="");var V=q&&E.substr(0,7)==="chinese",te=N.match(V?T:k);if(!te)return m;var ee=te[1],U=te[3]||"1",Q=Number(te[5]||1),Y=Number(te[7]||0),Z=Number(te[9]||0),X=Number(te[11]||0);if(q){if(ee.length===2)return m;var re;ee=Number(ee);try{var ie=_.getComponentMethod("calendars","getCal")(E);if(V){var le=U.charAt(U.length-1)==="i";U=parseInt(U,10),re=ie.newDate(ee,ie.toMonthIndex(ee,U,le),Q)}else re=ie.newDate(ee,Number(U),Q)}catch{return m}return re?(re.toJD()-x)*y+Y*v+Z*g+X*b:m}ee=ee.length===2?(Number(ee)+2e3-M)%100+M:Number(ee),U-=1;var se=new Date(Date.UTC(2e3,U,Q,Y,Z));return se.setUTCFullYear(ee),se.getUTCMonth()!==U||se.getUTCDate()!==Q?m:se.getTime()+X*b},l=a.MIN_MS=a.dateTime2ms("-9999"),f=a.MAX_MS=a.dateTime2ms("9999-12-31 23:59:59.9999"),a.isDateTime=function(N,E){return a.dateTime2ms(N,E)!==m};var P=90*y,D=3*v,O=5*g;function R(N,E,W,G,L){if((E||W||G||L)&&(N+=" "+C(E,2)+":"+C(W,2),(G||L)&&(N+=":"+C(G,2),L))){for(var q=4;L%10==0;)q-=1,L/=10;N+="."+C(L,q)}return N}a.ms2DateTime=function(N,E,W){if(typeof N!="number"||!(N>=l&&N<=f))return m;E||(E=0);var G,L,q,H,V,te,ee=Math.floor(10*h(N+.05,1)),U=Math.round(N-ee/10);if(S(W)){var Q=Math.floor(U/y)+x,Y=Math.floor(h(N,y));try{G=_.getComponentMethod("calendars","getCal")(W).fromJD(Q).formatDate("yyyy-mm-dd")}catch{G=w("G%Y-%m-%d")(new Date(U))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;L=E=l+y&&N<=f-y))return m;var E=Math.floor(10*h(N+.05,1)),W=new Date(Math.round(N-E/10));return R(s("%Y-%m-%d")(W),W.getHours(),W.getMinutes(),W.getSeconds(),10*W.getUTCMilliseconds()+E)},a.cleanDate=function(N,E,W){if(N===m)return E;if(a.isJSDate(N)||typeof N=="number"&&isFinite(N)){if(S(W))return d.error("JS Dates and milliseconds are incompatible with world calendars",N),E;if(!(N=a.ms2DateTimeLocal(+N))&&E!==void 0)return E}else if(!a.isDateTime(N,W))return d.error("unrecognized date",N),E;return N};var F=/%\d?f/g,A=/%h/g,z={1:"1",2:"1",3:"2",4:"2"};function B(N,E,W,G){N=N.replace(F,function(q){var H=Math.min(+q.charAt(1)||6,6);return(E/1e3%1+2).toFixed(H).substr(2).replace(/0+$/,"")||"0"});var L=new Date(Math.floor(E+.05));if(N=N.replace(A,function(){return z[W("%q")(L)]}),S(G))try{N=_.getComponentMethod("calendars","worldCalFmt")(N,E,G)}catch{return"Invalid"}return W(N)(L)}var $=[59,59.9,59.99,59.999,59.9999];a.formatDate=function(N,E,W,G,L,q){if(L=S(L)&&L,!E)if(W==="y")E=q.year;else if(W==="m")E=q.month;else{if(W!=="d")return function(H,V){var te=h(H+.05,y),ee=C(Math.floor(te/v),2)+":"+C(h(Math.floor(te/g),60),2);if(V!=="M"){c(V)||(V=0);var U=(100+Math.min(h(H/b,60),$[V])).toFixed(V).substr(1);V>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),ee+=":"+U}return ee}(N,W)+`
+var JD=Object.defineProperty;var QD=(e,t,r)=>t in e?JD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Lc=(e,t,r)=>(QD(e,typeof t!="symbol"?t+"":t,r),r);import{r as $e,j as je,$ as Z5,T as Cr,ak as K5,al as J5,am as Q5,A as dy,a as hy,an as e9,ao as t9,G as Jn,R as et,B as Qr,O as n9,ap as ir,aq as Or,Y as eS,Z as S0,ar as r9,ac as tS,ad as nS,ae as Af,af as Hi,ah as rS,as as qn,at as a9,au as i9,av as o9,aw as Ma,ax as l9,ay as s9,az as u9,aA as c9,aB as f9,aC as d9,aD as h9,aE as p9,aF as g9,aG as m9,aH as v9,aI as y9,aJ as b9,aK as x9,aL as w9,aM as xn,aN as _r,aO as Tr,aP as _n,aQ as Gt,aR as Pf,aS as Vn,aT as Md,aU as yr,aV as fr,aW as _9,aX as Sd,aY as Cd,aZ as aS,a_ as iS,a$ as T9,b0 as xl,b1 as k9,a3 as Od,b2 as no,I as Fl,b3 as M9,b4 as oS,b5 as S9,b6 as oe,U as di,b7 as C9,a7 as O9,b8 as A9,b9 as lg,a8 as P9,ba as D9,bb as E9,bc as B2,bd as R9,be as py,bf as L9,bg as I9,bh as F9,bi as N9,bj as j9,bk as $9,bl as B9,bm as z9,bn as q9,bo as W9,bp as z2,bq as U9,br as gy,h as H9,bs as V9,bt as Y9,bu as G9,bv as X9,bw as Z9,bx as K9,by as J9,bz as Q9,bA as eE,bB as tE,p as my,o as nE}from"./vendor-Bhc2M4pH.js";import{u as lS}from"./DashboardViewParams-BHBduMXd.js";import{i as vn,r as Xr}from"./createSvgIcon-BCx0yKii.js";import{E as rE}from"./Edit-BLuUL5Mi.js";var cf=(e=>(e[e.Small=0]="Small",e[e.Medium=1]="Medium",e[e.Big=2]="Big",e))(cf||{});function Ic(e){return e.palette.mode==="dark"?J5:Q5}function Fc(e){return e.palette.mode==="light"?Q5:J5}const C0=e=>{const[t,r]=$e.useState({open:!1});return je.jsxs(Z5,{elevation:0,onClick:i=>r(u=>({open:!u.open,anchorEl:i.currentTarget})),sx:[{color:i=>Fc(i)(i.palette.info.main,.6),backgroundColor:i=>Ic(i)(i.palette.info.main,.9)},e.data.state==="success"&&{color:i=>Fc(i)(i.palette.success.main,.6),backgroundColor:i=>Ic(i)(i.palette.success.main,.9)},e.data.state==="warning"&&{color:i=>Fc(i)(i.palette.warning.main,.6),backgroundColor:i=>Ic(i)(i.palette.warning.main,.9)},e.data.state==="error"&&{color:i=>Fc(i)(i.palette.error.main,.6),backgroundColor:i=>Ic(i)(i.palette.error.main,.9)}],children:[je.jsx(Cr,{align:"center",variant:"h6",component:"div",children:e.data.value}),je.jsx(Cr,{align:"center",variant:"body1",component:"div",children:e.data.text}),je.jsx(K5,{open:t.open,anchorEl:t.anchorEl,anchorOrigin:{horizontal:"left",vertical:"bottom"},children:e.customPopup??je.jsx(Cr,{padding:1,children:e.data.longText})})]})},sS=e=>je.jsxs(dy,{severity:e.data.severity,children:[je.jsx(hy,{children:e.data.title}),e.data.text]}),q2=e=>{const{alertStats:t}=e;return je.jsx(C0,{data:{value:`${t.triggered.last_24h}`,state:"info",text:"alerts in the last 24 hours",longText:"alerts triggered in the period / alerts triggered in 24 hours / alerts active "},customPopup:je.jsx(Cr,{sx:{pr:1},children:je.jsxs("ul",{children:[je.jsxs("li",{children:[t.triggered.period," alerts triggered in the period"]}),je.jsxs("li",{children:[t.triggered.last_24h," alerts triggered in 24 hours"]}),je.jsxs("li",{children:[t.active," total active alerts"]})]})})})};function aE(e){return e===12?{xs:12,sm:12,md:12,lg:12}:e===6?{xs:12,sm:12,md:6,lg:6}:e===3?{xs:12,sm:6,md:3,lg:3}:{xs:6,sm:3,md:1,lg:1}}const iE=e=>{const{size:t,ItemWrapper:r}=e,i=e.children.alertsPosition??"row",{id:u,title:o,details:a,content:n,alerts:l,alertStats:f,insights:s}=e.children,c=l===void 0?!1:l.length>0,d=s===void 0?!1:s.length>0,h=je.jsx(e9,{sx:{border:"1px solid",borderColor:"#d6d6d6",borderRadius:"4px"},elevation:0,children:je.jsx(t9,{children:je.jsxs(Jn,{container:!0,spacing:1,direction:"column",children:[i==="row"?je.jsxs(Jn,{container:!0,spacing:1,item:!0,children:[je.jsxs(Jn,{item:!0,xs:c&&i==="row"?9:12,children:[o?je.jsx(Cr,{fontWeight:500,variant:"h5",children:o}):je.jsx("div",{}),je.jsx("div",{children:n}),a?je.jsx(Cr,{variant:"subtitle1",children:a}):je.jsx("div",{})]}),c?je.jsx(Jn,{container:!0,spacing:1,direction:"column",justifyContent:"center",item:!0,xs:3,children:l?je.jsxs(et.Fragment,{children:[f?je.jsx(Jn,{item:!0,children:je.jsx(q2,{alertStats:f})}):je.jsx("div",{}),l.map(p=>je.jsx(Jn,{item:!0,children:je.jsx(C0,{data:p})}))]}):je.jsx("div",{})}):je.jsx("div",{})]}):je.jsxs(et.Fragment,{children:[je.jsxs(Jn,{item:!0,children:[o?je.jsx(Cr,{variant:"h5",children:o}):je.jsx("div",{}),je.jsx("div",{children:n}),a?je.jsx(Cr,{variant:"subtitle1",children:a}):je.jsx("div",{})]}),c?je.jsx(Jn,{item:!0,xs:!0,children:je.jsx(Jn,{container:!0,direction:"row",spacing:1,children:l?je.jsxs(et.Fragment,{children:[f?je.jsx(Jn,{item:!0,xs:!0,children:je.jsx(q2,{alertStats:f})}):je.jsx("div",{}),l.map(p=>je.jsx(Jn,{item:!0,xs:!0,children:je.jsx(C0,{data:p})}))]}):je.jsx("div",{})})}):je.jsx("div",{})]}),d?s.map(p=>je.jsx(Jn,{item:!0,xs:!0,sm:!0,md:!0,children:je.jsx(sS,{data:p})})):je.jsx("div",{})]})})});return je.jsx(Jn,{item:!0,...aE(t),children:r?r({id:u,children:h}):h})},W2=e=>je.jsxs("div",{children:[je.jsx(Cr,{align:"center",fontWeight:500,sx:{fontSize:36},children:e.value}),je.jsx(Cr,{align:"center",variant:"h5",fontWeight:500,children:e.label})]}),oE=e=>je.jsx(et.Fragment,{children:e.counters.length===1?je.jsx(W2,{...e.counters[0]}):je.jsx(Jn,{container:!0,spacing:1,direction:"row",alignItems:"center",children:e.counters.map((t,r)=>je.jsx(Jn,{item:!0,xs:!0,component:Qr,height:"100%",children:je.jsx(Qr,{children:je.jsx(W2,{...t})})},r))})}),lE=e=>je.jsxs("div",{children:[je.jsxs(Qr,{display:"flex",alignItems:"center",children:[je.jsx(Qr,{width:"100%",mr:1,children:je.jsx(n9,{variant:"determinate",value:e.value/e.maxValue*100})}),je.jsx(Qr,{minWidth:35,children:je.jsx(Cr,{variant:"body2",color:"textSecondary",children:`${Math.round(e.value/e.maxValue*100)}%`})})]}),je.jsx(Qr,{width:"100%",children:je.jsx(Cr,{variant:"body2",color:"textSecondary",children:e.details??""})})]});var uS={exports:{}};(function(e,t){/*! For license information please see plotly-cartesian.min.js.LICENSE.txt */(function(r,i){e.exports=i()})(self,function(){return function(){var r={98847:function(o,a,n){var l=n(71828),f={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var s in f){var c=s.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");l.addStyleRule(c,f[s])}},98222:function(o,a,n){o.exports=n(82887)},27206:function(o,a,n){o.exports=n(60822)},5224:function(o,a,n){o.exports=n(83832)},59509:function(o,a,n){o.exports=n(72201)},49866:function(o,a,n){o.exports=n(99442)},19548:function(o,a,n){o.exports=n(8729)},61039:function(o,a,n){o.exports=n(14382)},24296:function(o,a,n){o.exports=n(43102)},58872:function(o,a,n){o.exports=n(92165)},65591:function(o,a,n){o.exports=n(36071)},69738:function(o,a,n){o.exports=n(43905)},92650:function(o,a,n){o.exports=n(35902)},73434:function(o,a,n){o.exports=n(94507)},760:function(o,a,n){var l=n(19548);l.register([n(27206),n(5224),n(58872),n(65591),n(69738),n(92650),n(49866),n(25743),n(6197),n(73434),n(54201),n(98222),n(61039),n(24296),n(66398),n(59509)]),o.exports=l},54201:function(o,a,n){o.exports=n(58810)},25743:function(o,a,n){o.exports=n(52979)},66398:function(o,a,n){o.exports=n(32275)},6197:function(o,a,n){o.exports=n(47462)},82884:function(o){o.exports=[{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}]},50215:function(o,a,n){var l=n(82884),f=n(41940),s=n(85555),c=n(44467).templatedArray;n(24695),o.exports=c("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:f({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:l.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:l.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",s.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",s.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",s.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",s.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:f({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(o,a,n){var l=n(71828),f=n(89298),s=n(92605).draw;function c(h){var p=h._fullLayout;l.filterVisible(p.annotations).forEach(function(m){var y=f.getFromId(h,m.xref),v=f.getFromId(h,m.yref),g=f.getRefType(m.xref),b=f.getRefType(m.yref);m._extremes={},g==="range"&&d(m,y),b==="range"&&d(m,v)})}function d(h,p){var m,y=p._id,v=y.charAt(0),g=h[v],b=h["a"+v],x=h[v+"ref"],_=h["a"+v+"ref"],w=h["_"+v+"padplus"],k=h["_"+v+"padminus"],T={x:1,y:-1}[v]*h[v+"shift"],M=3*h.arrowsize*h.arrowwidth||0,S=M+T,C=M-T,P=3*h.startarrowsize*h.arrowwidth||0,D=P+T,O=P-T;if(_===x){var R=f.findExtremes(p,[p.r2c(g)],{ppadplus:S,ppadminus:C}),F=f.findExtremes(p,[p.r2c(b)],{ppadplus:Math.max(w,D),ppadminus:Math.max(k,O)});m={min:[R.min[0],F.min[0]],max:[R.max[0],F.max[0]]}}else D=b?D+b:D,O=b?O-b:O,m=f.findExtremes(p,[p.r2c(g)],{ppadplus:Math.max(w,S,D),ppadminus:Math.max(k,C,O)});h._extremes[y]=m}o.exports=function(h){var p=h._fullLayout;if(l.filterVisible(p.annotations).length&&h._fullData.length)return l.syncOrAsync([s,c],h)}},44317:function(o,a,n){var l=n(71828),f=n(73972),s=n(44467).arrayEditor;function c(h,p){var m,y,v,g,b,x,_,w=h._fullLayout.annotations,k=[],T=[],M=[],S=(p||[]).length;for(m=0;m0||m.explicitOff.length>0},onClick:function(h,p){var m,y,v=c(h,p),g=v.on,b=v.off.concat(v.explicitOff),x={},_=h._fullLayout.annotations;if(g.length||b.length){for(m=0;m.6666666666666666?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[nt]}for(var we=!1,ke=["x","y"],Ae=0;Ae1)&&(Ye===qe?((Je=at.r2fraction(S["a"+Ue]))<0||Je>1)&&(we=!0):we=!0),Ee=at._offset+at.r2p(S[Ue]),Ie=.5}else{var ut=kt==="domain";Ue==="x"?(Re=S[Ue],Ee=ut?at._offset+at._length*Re:Ee=z.l+z.w*Re):(Re=1-S[Ue],Ee=ut?at._offset+at._length*Re:Ee=z.t+z.h*Re),Ie=S.showarrow?.5:Re}if(S.showarrow){it.head=Ee;var pt=S["a"+Ue];if(Be=ct*be(.5,S.xanchor)-bt*be(.5,S.yanchor),Ye===qe){var It=h.getRefType(Ye);It==="domain"?(Ue==="y"&&(pt=1-pt),it.tail=at._offset+at._length*pt):It==="paper"?Ue==="y"?(pt=1-pt,it.tail=z.t+z.h*pt):it.tail=z.l+z.w*pt:it.tail=at._offset+at.r2p(pt),De=Be}else it.tail=Ee+pt,De=Be+pt;it.text=it.tail+Be;var Mt=A[Ue==="x"?"width":"height"];if(qe==="paper"&&(it.head=c.constrain(it.head,1,Mt-1)),Ye==="pixel"){var zt=-Math.max(it.tail-3,it.text),wt=Math.min(it.tail+3,it.text)-Mt;zt>0?(it.tail+=zt,it.text+=zt):wt>0&&(it.tail-=wt,it.text-=wt)}it.tail+=Qe,it.head+=Qe}else De=Be=ze*be(Ie,Ne),it.text=Ee+Be;it.text+=Qe,Be+=Qe,De+=Qe,S["_"+Ue+"padplus"]=ze/2+De,S["_"+Ue+"padminus"]=ze/2-De,S["_"+Ue+"size"]=ze,S["_"+Ue+"shift"]=Be}if(we)ee.remove();else{var ve=0,_e=0;if(S.align!=="left"&&(ve=(de-J)*(S.align==="center"?.5:1)),S.valign!=="top"&&(_e=(xe-ne)*(S.valign==="middle"?.5:1)),ce)Me.select("svg").attr({x:Y+ve-1,y:Y+_e}).call(m.setClipUrl,X?W:null,M);else{var Ve=Y+_e-ye.top,We=Y+ve-ye.left;se.call(v.positionText,We,Ve).call(m.setClipUrl,X?W:null,M)}re.select("rect").call(m.setRect,Y,Y,de,xe),Z.call(m.setRect,U/2,U/2,ue-U,ge-U),ee.call(m.setTranslate,Math.round(G.x.text-ue/2),Math.round(G.y.text-ge/2)),H.attr({transform:"rotate("+L+","+G.x.text+","+G.y.text+")"});var Ze,Ge=function(Ke,nt){q.selectAll(".annotation-arrow-g").remove();var st=G.x.head,mt=G.y.head,tt=G.x.tail+Ke,Ft=G.y.tail+nt,Vt=G.x.text+Ke,St=G.y.text+nt,Nt=c.rotationXYMatrix(L,Vt,St),Dt=c.apply2DTransform(Nt),gt=c.apply2DTransform2(Nt),ht=+Z.attr("width"),yt=+Z.attr("height"),qt=Vt-.5*ht,Et=qt+ht,jt=St-.5*yt,Tt=jt+yt,Ot=[[qt,jt,qt,Tt],[qt,Tt,Et,Tt],[Et,Tt,Et,jt],[Et,jt,qt,jt]].map(gt);if(!Ot.reduce(function(an,sn){return an^!!c.segmentsIntersect(st,mt,st+1e6,mt+1e6,sn[0],sn[1],sn[2],sn[3])},!1)){Ot.forEach(function(an){var sn=c.segmentsIntersect(tt,Ft,st,mt,an[0],an[1],an[2],an[3]);sn&&(tt=sn.x,Ft=sn.y)});var At=S.arrowwidth,Lt=S.arrowcolor,Rt=S.arrowside,$t=q.append("g").style({opacity:p.opacity(Lt)}).classed("annotation-arrow-g",!0),Yt=$t.append("path").attr("d","M"+tt+","+Ft+"L"+st+","+mt).style("stroke-width",At+"px").call(p.stroke,p.rgb(Lt));if(_(Yt,Rt,S),B.annotationPosition&&Yt.node().parentNode&&!P){var Xt=st,Bt=mt;if(S.standoff){var Wt=Math.sqrt(Math.pow(st-tt,2)+Math.pow(mt-Ft,2));Xt+=S.standoff*(tt-st)/Wt,Bt+=S.standoff*(Ft-mt)/Wt}var tn,cn,ln=$t.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(tt-Xt)+","+(Ft-Bt),transform:d(Xt,Bt)}).style("stroke-width",At+6+"px").call(p.stroke,"rgba(0,0,0,0)").call(p.fill,"rgba(0,0,0,0)");b.init({element:ln.node(),gd:M,prepFn:function(){var an=m.getTranslate(ee);tn=an.x,cn=an.y,D&&D.autorange&&j(D._name+".autorange",!0),O&&O.autorange&&j(O._name+".autorange",!0)},moveFn:function(an,sn){var Zt=Dt(tn,cn),pn=Zt[0]+an,nn=Zt[1]+sn;ee.call(m.setTranslate,pn,nn),N("x",k(D,an,"x",z,S)),N("y",k(O,sn,"y",z,S)),S.axref===S.xref&&N("ax",k(D,an,"ax",z,S)),S.ayref===S.yref&&N("ay",k(O,sn,"ay",z,S)),$t.attr("transform",d(an,sn)),H.attr({transform:"rotate("+L+","+pn+","+nn+")"})},doneFn:function(){f.call("_guiRelayout",M,E());var an=document.querySelector(".js-notes-box-panel");an&&an.redraw(an.selectedObj)}})}}};S.showarrow&&Ge(0,0),V&&b.init({element:ee.node(),gd:M,prepFn:function(){Ze=H.attr("transform")},moveFn:function(Ke,nt){var st="pointer";if(S.showarrow)S.axref===S.xref?N("ax",k(D,Ke,"ax",z,S)):N("ax",S.ax+Ke),S.ayref===S.yref?N("ay",k(O,nt,"ay",z.w,S)):N("ay",S.ay+nt),Ge(Ke,nt);else{if(P)return;var mt,tt;if(D)mt=k(D,Ke,"x",z,S);else{var Ft=S._xsize/z.w,Vt=S.x+(S._xshift-S.xshift)/z.w-Ft/2;mt=b.align(Vt+Ke/z.w,Ft,0,1,S.xanchor)}if(O)tt=k(O,nt,"y",z,S);else{var St=S._ysize/z.h,Nt=S.y-(S._yshift+S.yshift)/z.h-St/2;tt=b.align(Nt-nt/z.h,St,0,1,S.yanchor)}N("x",mt),N("y",tt),D&&O||(st=b.getCursor(D?.5:mt,O?.5:tt,S.xanchor,S.yanchor))}H.attr({transform:d(Ke,nt)+Ze}),g(ee,st)},clickFn:function(Ke,nt){S.captureevents&&M.emit("plotly_clickannotation",pe(nt))},doneFn:function(){g(ee),f.call("_guiRelayout",M,E());var Ke=document.querySelector(".js-notes-box-panel");Ke&&Ke.redraw(Ke.selectedObj)}})}}}o.exports={draw:function(M){var S=M._fullLayout;S._infolayer.selectAll(".annotation").remove();for(var C=0;C=0,P=y.indexOf("end")>=0,D=k.backoff*M+v.standoff,O=T.backoff*S+v.startstandoff;if(w.nodeName==="line"){g={x:+m.attr("x1"),y:+m.attr("y1")},b={x:+m.attr("x2"),y:+m.attr("y2")};var R=g.x-b.x,F=g.y-b.y;if(_=(x=Math.atan2(F,R))+Math.PI,D&&O&&D+O>Math.sqrt(R*R+F*F))return void q();if(D){if(D*D>R*R+F*F)return void q();var A=D*Math.cos(x),z=D*Math.sin(x);b.x+=A,b.y+=z,m.attr({x2:b.x,y2:b.y})}if(O){if(O*O>R*R+F*F)return void q();var B=O*Math.cos(x),$=O*Math.sin(x);g.x-=B,g.y-=$,m.attr({x1:g.x,y1:g.y})}}else if(w.nodeName==="path"){var j=w.getTotalLength(),N="";if(j1){v=!0;break}}v?c.fullLayout._infolayer.select(".annotation-"+c.id+'[data-index="'+m+'"]').remove():(y._pdata=f(c.glplot.cameraParams,[d.xaxis.r2l(y.x)*h[0],d.yaxis.r2l(y.y)*h[1],d.zaxis.r2l(y.z)*h[2]]),l(c.graphDiv,y,m,c.id,y._xa,y._ya))}}},2468:function(o,a,n){var l=n(73972),f=n(71828);o.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:n(26997)}}},layoutAttributes:n(26997),handleDefaults:n(20226),includeBasePlot:function(s,c){var d=l.subplotsRegistry.gl3d;if(d)for(var h=d.attrRegex,p=Object.keys(s),m=0;m=0)))return y;if(_===3)b[_]>1&&(b[_]=1);else if(b[_]>=1)return y}var w=Math.round(255*b[0])+", "+Math.round(255*b[1])+", "+Math.round(255*b[2]);return x?"rgba("+w+", "+b[3]+")":"rgb("+w+")"}c.tinyRGB=function(y){var v=y.toRgb();return"rgb("+Math.round(v.r)+", "+Math.round(v.g)+", "+Math.round(v.b)+")"},c.rgb=function(y){return c.tinyRGB(l(y))},c.opacity=function(y){return y?l(y).getAlpha():0},c.addOpacity=function(y,v){var g=l(y).toRgb();return"rgba("+Math.round(g.r)+", "+Math.round(g.g)+", "+Math.round(g.b)+", "+v+")"},c.combine=function(y,v){var g=l(y).toRgb();if(g.a===1)return l(y).toRgbString();var b=l(v||p).toRgb(),x=b.a===1?b:{r:255*(1-b.a)+b.r*b.a,g:255*(1-b.a)+b.g*b.a,b:255*(1-b.a)+b.b*b.a},_={r:x.r*(1-g.a)+g.r*g.a,g:x.g*(1-g.a)+g.g*g.a,b:x.b*(1-g.a)+g.b*g.a};return l(_).toRgbString()},c.contrast=function(y,v,g){var b=l(y);return b.getAlpha()!==1&&(b=l(c.combine(y,p))),(b.isDark()?v?b.lighten(v):p:g?b.darken(g):h).toString()},c.stroke=function(y,v){var g=l(v);y.style({stroke:c.tinyRGB(g),"stroke-opacity":g.getAlpha()})},c.fill=function(y,v){var g=l(v);y.style({fill:c.tinyRGB(g),"fill-opacity":g.getAlpha()})},c.clean=function(y){if(y&&typeof y=="object"){var v,g,b,x,_=Object.keys(y);for(v=0;v<_.length;v++)if(x=y[b=_[v]],b.substr(b.length-5)==="color")if(Array.isArray(x))for(g=0;g0?wt>=Ze:wt<=Ze));ve++)wt>Ke&&wt0?wt>=Ze:wt<=Ze));ve++)wt>zt[0]&&wt1){var bt=Math.pow(10,Math.floor(Math.log(ct)/Math.LN10));at*=bt*p.roundUp(ct/bt,[2,5,10]),(Math.abs(J.start)/J.size+1e-6)%1<2e-6&&(qe.tick0=0)}qe.dtick=at}qe.domain=E?[Be+Y/se.h,Be+we-Y/se.h]:[Be+Q/se.w,Be+we-Q/se.w],qe.setScale(),$.attr("transform",m(Math.round(se.l),Math.round(se.t)));var ze,Ne=$.select("."+O.cbtitleunshift).attr("transform",m(-Math.round(se.l),-Math.round(se.t))),Qe=qe.ticklabelposition,it=qe.title.font.size,kt=$.select("."+O.cbaxis),Je=0,ut=0;function pt(It,Mt){var zt={propContainer:qe,propName:j._propPrefix+"title",traceIndex:j._traceIndex,_meta:j._meta,placeholder:le._dfltTitle.colorbar,containerGroup:$.select("."+O.cbtitle)},wt=It.charAt(0)==="h"?It.substr(1):"h"+It;$.selectAll("."+wt+",."+wt+"-math-group").remove(),x.draw(N,It,y(zt,Mt||{}))}return p.syncOrAsync([s.previousPromises,function(){var It,Mt;(E&&Ye||!E&&!Ye)&&(Oe==="top"&&(It=Q+se.l+ke*Z,Mt=Y+se.t+Ae*(1-Be-we)+3+.75*it),Oe==="bottom"&&(It=Q+se.l+ke*Z,Mt=Y+se.t+Ae*(1-Be)-3-.25*it),Oe==="right"&&(Mt=Y+se.t+Ae*X+3+.75*it,It=Q+se.l+ke*Be),pt(qe._id+"title",{attributes:{x:It,y:Mt,"text-anchor":E?"start":"middle"}}))},function(){if(!E&&!Ye||E&&Ye){var It,Mt=$.select("."+O.cbtitle),zt=Mt.select("text"),wt=[-H/2,H/2],ve=Mt.select(".h"+qe._id+"title-math-group").node(),_e=15.6;if(zt.node()&&(_e=parseInt(zt.node().style.fontSize,10)*C),ve?(It=g.bBox(ve),ut=It.width,(Je=It.height)>_e&&(wt[1]-=(Je-_e)/2)):zt.node()&&!zt.classed(O.jsPlaceholder)&&(It=g.bBox(zt.node()),ut=It.width,Je=It.height),E){if(Je){if(Je+=5,Oe==="top")qe.domain[1]-=Je/se.h,wt[1]*=-1;else{qe.domain[0]+=Je/se.h;var Ve=_.lineCount(zt);wt[1]+=(1-Ve)*_e}Mt.attr("transform",m(wt[0],wt[1])),qe.setScale()}}else ut&&(Oe==="right"&&(qe.domain[0]+=(ut+it/2)/se.w),Mt.attr("transform",m(wt[0],wt[1])),qe.setScale())}$.selectAll("."+O.cbfills+",."+O.cblines).attr("transform",E?m(0,Math.round(se.h*(1-qe.domain[1]))):m(Math.round(se.w*qe.domain[0]),0)),kt.attr("transform",E?m(0,Math.round(-se.t)):m(Math.round(-se.l),0));var We=$.select("."+O.cbfills).selectAll("rect."+O.cbfill).attr("style","").data(de);We.enter().append("rect").classed(O.cbfill,!0).attr("style",""),We.exit().remove();var Ze=Me.map(qe.c2p).map(Math.round).sort(function(mt,tt){return mt-tt});We.each(function(mt,tt){var Ft=[tt===0?Me[0]:(de[tt]+de[tt-1])/2,tt===de.length-1?Me[1]:(de[tt]+de[tt+1])/2].map(qe.c2p).map(Math.round);E&&(Ft[1]=p.constrain(Ft[1]+(Ft[1]>Ft[0])?1:-1,Ze[0],Ze[1]));var Vt=l.select(this).attr(E?"x":"y",Ee).attr(E?"y":"x",l.min(Ft)).attr(E?"width":"height",Math.max(ue,2)).attr(E?"height":"width",Math.max(l.max(Ft)-l.min(Ft),2));if(j._fillgradient)g.gradient(Vt,N,j._id,E?"vertical":"horizontalreversed",j._fillgradient,"fill");else{var St=ye(mt).replace("e-","");Vt.attr("fill",f(St).toHexString())}});var Ge=$.select("."+O.cblines).selectAll("path."+O.cbline).data(Te.color&&Te.width?xe:[]);Ge.enter().append("path").classed(O.cbline,!0),Ge.exit().remove(),Ge.each(function(mt){var tt=Ee,Ft=Math.round(qe.c2p(mt))+Te.width/2%1;l.select(this).attr("d","M"+(E?tt+","+Ft:Ft+","+tt)+(E?"h":"v")+ue).call(g.lineGroupStyle,Te.width,ce(mt),Te.dash)}),kt.selectAll("g."+qe._id+"tick,path").remove();var Ke=Ee+ue+(H||0)/2-(j.ticks==="outside"?1:0),nt=d.calcTicks(qe),st=d.getTickSigns(qe)[2];return d.drawTicks(N,qe,{vals:qe.ticks==="inside"?d.clipEnds(qe,nt):nt,layer:kt,path:d.makeTickPath(qe,Ke,st),transFn:d.makeTransTickFn(qe)}),d.drawLabels(N,qe,{vals:nt,layer:kt,transFn:d.makeTransTickLabelFn(qe),labelFns:d.makeLabelFns(qe,Ke)})},function(){if(E&&!Ye||!E&&Ye){var It,Mt,zt=qe.position||0,wt=qe._offset+qe._length/2;if(Oe==="right")Mt=wt,It=se.l+ke*zt+10+it*(qe.showticklabels?1:.5);else if(It=wt,Oe==="bottom"&&(Mt=se.t+Ae*zt+10+(Qe.indexOf("inside")===-1?qe.tickfont.size:0)+(qe.ticks!=="intside"&&j.ticklen||0)),Oe==="top"){var ve=Se.text.split("
").length;Mt=se.t+Ae*zt+10-ue-C*it*ve}pt((E?"h":"v")+qe._id+"title",{avoid:{selection:l.select(N).selectAll("g."+qe._id+"tick"),side:Oe,offsetTop:E?0:se.t,offsetLeft:E?se.l:0,maxShift:E?le.width:le.height},attributes:{x:It,y:Mt,"text-anchor":"middle"},transform:{rotate:E?-90:0,offset:0}})}},s.previousPromises,function(){var It,Mt=ue+H/2;Qe.indexOf("inside")===-1&&(It=g.bBox(kt.node()),Mt+=E?It.width:It.height),ze=Ne.select("text");var zt=0,wt=E&&Oe==="top",ve=!E&&Oe==="right",_e=0;if(ze.node()&&!ze.classed(O.jsPlaceholder)){var Ve,We=Ne.select(".h"+qe._id+"title-math-group").node();We&&(E&&Ye||!E&&!Ye)?(zt=(It=g.bBox(We)).width,Ve=It.height):(zt=(It=g.bBox(Ne.node())).right-se.l-(E?Ee:Ue),Ve=It.bottom-se.t-(E?Ue:Ee),E||Oe!=="top"||(Mt+=It.height,_e=It.height)),ve&&(ze.attr("transform",m(zt/2+it/2,0)),zt*=2),Mt=Math.max(Mt,E?zt:Ve)}var Ze=2*(E?Q:Y)+Mt+V+H/2,Ge=0;!E&&Se.text&&U==="bottom"&&X<=0&&(Ze+=Ge=Ze/2,_e+=Ge),le._hColorbarMoveTitle=Ge,le._hColorbarMoveCBTitle=_e;var Ke=V+H,nt=(E?Ee:Ue)-Ke/2-(E?Q:0),st=(E?Ue:Ee)-(E?be:Y+_e-Ge);$.select("."+O.cbbg).attr("x",nt).attr("y",st).attr(E?"width":"height",Math.max(Ze-Ge,2)).attr(E?"height":"width",Math.max(be+Ke,2)).call(b.fill,te).call(b.stroke,j.bordercolor).style("stroke-width",V);var mt=ve?Math.max(zt-10,0):0;$.selectAll("."+O.cboutline).attr("x",(E?Ee:Ue+Q)+mt).attr("y",(E?Ue+Y-be:Ee)+(wt?Je:0)).attr(E?"width":"height",Math.max(ue,2)).attr(E?"height":"width",Math.max(be-(E?2*Y+Je:2*Q+mt),2)).call(b.stroke,j.outlinecolor).style({fill:"none","stroke-width":H});var tt=E?De*Ze:0,Ft=E?0:(1-Re)*Ze-_e;if(tt=ie?se.l-tt:-tt,Ft=re?se.t-Ft:-Ft,$.attr("transform",m(tt,Ft)),!E&&(V||f(te).getAlpha()&&!f.equals(le.paper_bgcolor,te))){var Vt=kt.selectAll("text"),St=Vt[0].length,Nt=$.select("."+O.cbbg).node(),Dt=g.bBox(Nt),gt=g.getTranslate($);Vt.each(function(Rt,$t){var Yt=St-1;if($t===0||$t===Yt){var Xt,Bt=g.bBox(this),Wt=g.getTranslate(this);if($t===Yt){var tn=Bt.right+Wt.x;(Xt=Dt.right+gt.x+Ue-V-2+Z-tn)>0&&(Xt=0)}else if($t===0){var cn=Bt.left+Wt.x;(Xt=Dt.left+gt.x+Ue+V+2-cn)<0&&(Xt=0)}Xt&&(St<3?this.setAttribute("transform","translate("+Xt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ht={},yt=P[ee],qt=D[ee],Et=P[U],jt=D[U],Tt=Ze-ue;E?(G==="pixels"?(ht.y=X,ht.t=be*Et,ht.b=be*jt):(ht.t=ht.b=0,ht.yt=X+W*Et,ht.yb=X-W*jt),q==="pixels"?(ht.x=Z,ht.l=Ze*yt,ht.r=Ze*qt):(ht.l=Tt*yt,ht.r=Tt*qt,ht.xl=Z-L*yt,ht.xr=Z+L*qt)):(G==="pixels"?(ht.x=Z,ht.l=be*yt,ht.r=be*qt):(ht.l=ht.r=0,ht.xl=Z+W*yt,ht.xr=Z-W*qt),q==="pixels"?(ht.y=1-X,ht.t=Ze*Et,ht.b=Ze*jt):(ht.t=Tt*Et,ht.b=Tt*jt,ht.yt=X-L*Et,ht.yb=X+L*jt));var Ot=j.y<.5?"b":"t",At=j.x<.5?"l":"r";N._fullLayout._reservedMargin[j._id]={};var Lt={r:le.width-nt-tt,l:nt+ht.r,b:le.height-st-Ft,t:st+ht.b};ie&&re?s.autoMargin(N,j._id,ht):ie?N._fullLayout._reservedMargin[j._id][Ot]=Lt[Ot]:re||E?N._fullLayout._reservedMargin[j._id][At]=Lt[At]:N._fullLayout._reservedMargin[j._id][Ot]=Lt[Ot]}],N)}(z,A,R);B&&B.then&&(R._promises||[]).push(B),R._context.edits.colorbarPosition&&function($,j,N){var E,W,G,L=j.orientation==="v",q=N._fullLayout._size;h.init({element:$.node(),gd:N,prepFn:function(){E=$.attr("transform"),v($)},moveFn:function(H,V){$.attr("transform",E+m(H,V)),W=h.align((L?j._uFrac:j._vFrac)+H/q.w,L?j._thickFrac:j._lenFrac,0,1,j.xanchor),G=h.align((L?j._vFrac:1-j._uFrac)-V/q.h,L?j._lenFrac:j._thickFrac,0,1,j.yanchor);var te=h.getCursor(W,G,j.xanchor,j.yanchor);v($,te)},doneFn:function(){if(v($),W!==void 0&&G!==void 0){var H={};H[j._propPrefix+"x"]=W,H[j._propPrefix+"y"]=G,j._traceIndex!==void 0?c.call("_guiRestyle",N,H,j._traceIndex):c.call("_guiRelayout",N,H)}}})}(z,A,R)}),F.exit().each(function(A){s.autoMargin(R,A._id)}).remove(),F.order()}}},76228:function(o,a,n){var l=n(71828);o.exports=function(f){return l.isPlainObject(f.colorbar)}},12311:function(o,a,n){o.exports={moduleType:"component",name:"colorbar",attributes:n(63583),supplyDefaults:n(62499),draw:n(98981).draw,hasColorbar:n(76228)}},50693:function(o,a,n){var l=n(63583),f=n(30587).counter,s=n(78607),c=n(63282).scales;function d(h){return"`"+h+"`"}s(c),o.exports=function(h,p){h=h||"";var m,y=(p=p||{}).cLetter||"c",v=("onlyIfNumerical"in p&&p.onlyIfNumerical,"noScale"in p?p.noScale:h==="marker.line"),g="showScaleDflt"in p?p.showScaleDflt:y==="z",b=typeof p.colorscaleDflt=="string"?c[p.colorscaleDflt]:null,x=p.editTypeOverride||"",_=h?h+".":"";"colorAttr"in p?(m=p.colorAttr,p.colorAttr):d(_+(m={z:"z",c:"color"}[y]));var w=y+"auto",k=y+"min",T=y+"max",M=y+"mid",S={};S[k]=S[T]=void 0;var C={};C[w]=!1;var P={};return m==="color"&&(P.color={valType:"color",arrayOk:!0,editType:x||"style"},p.anim&&(P.color.anim=!0)),P[w]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:S},P[k]={valType:"number",dflt:null,editType:x||"plot",impliedEdits:C},P[T]={valType:"number",dflt:null,editType:x||"plot",impliedEdits:C},P[M]={valType:"number",dflt:null,editType:"calc",impliedEdits:S},P.colorscale={valType:"colorscale",editType:"calc",dflt:b,impliedEdits:{autocolorscale:!1}},P.autocolorscale={valType:"boolean",dflt:p.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},P.reversescale={valType:"boolean",dflt:!1,editType:"plot"},v||(P.showscale={valType:"boolean",dflt:g,editType:"calc"},P.colorbar=l),p.noColorAxis||(P.coloraxis={valType:"subplotid",regex:f("coloraxis"),dflt:null,editType:"calc"}),P}},78803:function(o,a,n){var l=n(92770),f=n(71828),s=n(52075).extractOpts;o.exports=function(c,d,h){var p,m=c._fullLayout,y=h.vals,v=h.containerStr,g=v?f.nestedProperty(d,v).get():d,b=s(g),x=b.auto!==!1,_=b.min,w=b.max,k=b.mid,T=function(){return f.aggNums(Math.min,null,y)},M=function(){return f.aggNums(Math.max,null,y)};_===void 0?_=T():x&&(_=g._colorAx&&l(_)?Math.min(_,T()):T()),w===void 0?w=M():x&&(w=g._colorAx&&l(w)?Math.max(w,M()):M()),x&&k!==void 0&&(w-k>k-_?_=k-(w-k):w-k=0?m.colorscale.sequential:m.colorscale.sequentialminus,b._sync("colorscale",p))}},33046:function(o,a,n){var l=n(71828),f=n(52075).hasColorscale,s=n(52075).extractOpts;o.exports=function(c,d){function h(x,_){var w=x["_"+_];w!==void 0&&(x[_]=w)}function p(x,_){var w=_.container?l.nestedProperty(x,_.container).get():x;if(w)if(w.coloraxis)w._colorAx=d[w.coloraxis];else{var k=s(w),T=k.auto;(T||k.min===void 0)&&h(w,_.min),(T||k.max===void 0)&&h(w,_.max),k.autocolorscale&&h(w,"colorscale")}}for(var m=0;m=0;T--,M++){var S=_[T];k[M]=[1-S[0],S[1]]}return k}function b(_,w){w=w||{};for(var k=_.domain,T=_.range,M=T.length,S=new Array(M),C=0;C1.3333333333333333-h?d:h}},70461:function(o,a,n){var l=n(71828),f=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];o.exports=function(s,c,d,h){return s=d==="left"?0:d==="center"?1:d==="right"?2:l.constrain(Math.floor(3*s),0,2),c=h==="bottom"?0:h==="middle"?1:h==="top"?2:l.constrain(Math.floor(3*c),0,2),f[c][s]}},64505:function(o,a){a.selectMode=function(n){return n==="lasso"||n==="select"},a.drawMode=function(n){return n==="drawclosedpath"||n==="drawopenpath"||n==="drawline"||n==="drawrect"||n==="drawcircle"},a.openMode=function(n){return n==="drawline"||n==="drawopenpath"},a.rectMode=function(n){return n==="select"||n==="drawline"||n==="drawrect"||n==="drawcircle"},a.freeMode=function(n){return n==="lasso"||n==="drawclosedpath"||n==="drawopenpath"},a.selectingOrDrawing=function(n){return a.freeMode(n)||a.rectMode(n)}},28569:function(o,a,n){var l=n(48956),f=n(57035),s=n(38520),c=n(71828).removeElement,d=n(85555),h=o.exports={};h.align=n(92807),h.getCursor=n(70461);var p=n(26041);function m(){var v=document.createElement("div");v.className="dragcover";var g=v.style;return g.position="fixed",g.left=0,g.right=0,g.top=0,g.bottom=0,g.zIndex=999999999,g.background="none",document.body.appendChild(v),v}function y(v){return l(v.changedTouches?v.changedTouches[0]:v,document.body)}h.unhover=p.wrapped,h.unhoverRaw=p.raw,h.init=function(v){var g,b,x,_,w,k,T,M,S=v.gd,C=1,P=S._context.doubleClickDelay,D=v.element;S._mouseDownTime||(S._mouseDownTime=0),D.style.pointerEvents="all",D.onmousedown=R,s?(D._ontouchstart&&D.removeEventListener("touchstart",D._ontouchstart),D._ontouchstart=R,D.addEventListener("touchstart",R,{passive:!1})):D.ontouchstart=R;var O=v.clampFn||function(z,B,$){return Math.abs(z)<$&&(z=0),Math.abs(B)<$&&(B=0),[z,B]};function R(z){S._dragged=!1,S._dragging=!0;var B=y(z);g=B[0],b=B[1],T=z.target,k=z,M=z.buttons===2||z.ctrlKey,z.clientX===void 0&&z.clientY===void 0&&(z.clientX=g,z.clientY=b),(x=new Date().getTime())-S._mouseDownTimeP&&(C=Math.max(C-1,1)),S._dragged)v.doneFn&&v.doneFn();else if(v.clickFn&&v.clickFn(C,k),!M){var B;try{B=new MouseEvent("click",z)}catch{var $=y(z);(B=document.createEvent("MouseEvents")).initMouseEvent("click",z.bubbles,z.cancelable,z.view,z.detail,z.screenX,z.screenY,$[0],$[1],z.ctrlKey,z.altKey,z.shiftKey,z.metaKey,z.button,z.relatedTarget)}T.dispatchEvent(B)}S._dragging=!1,S._dragged=!1}else S._dragged=!1}},h.coverSlip=m},26041:function(o,a,n){var l=n(11086),f=n(79990),s=n(24401).getGraphDiv,c=n(26675),d=o.exports={};d.wrapped=function(h,p,m){(h=s(h))._fullLayout&&f.clear(h._fullLayout._uid+c.HOVERID),d.raw(h,p,m)},d.raw=function(h,p){var m=h._fullLayout,y=h._hoverdata;p||(p={}),p.target&&!h._dragged&&l.triggerHandler(h,"plotly_beforehover",p)===!1||(m._hoverlayer.selectAll("g").remove(),m._hoverlayer.selectAll("line").remove(),m._hoverlayer.selectAll("circle").remove(),h._hoverdata=void 0,p.target&&y&&h.emit("plotly_unhover",{event:p,points:y}))}},79952:function(o,a){a.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},a.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},91424:function(o,a,n){var l=n(39898),f=n(71828),s=f.numberFormat,c=n(92770),d=n(84267),h=n(73972),p=n(7901),m=n(21081),y=f.strTranslate,v=n(63893),g=n(77922),b=n(18783).LINE_SPACING,x=n(37822).DESELECTDIM,_=n(34098),w=n(39984),k=n(23469).appendArrayPointValue,T=o.exports={};function M(ce,ye,J){var ne=ye.fillpattern,de=ne&&T.getPatternAttr(ne.shape,0,"");if(de){var xe=T.getPatternAttr(ne.bgcolor,0,null),ue=T.getPatternAttr(ne.fgcolor,0,null),ge=ne.fgopacity,be=T.getPatternAttr(ne.size,0,8),we=T.getPatternAttr(ne.solidity,0,.3),ke=ye.uid;T.pattern(ce,"point",J,ke,de,be,we,void 0,ne.fillmode,xe,ue,ge)}else ye.fillcolor&&ce.call(p.fill,ye.fillcolor)}T.font=function(ce,ye,J,ne){f.isPlainObject(ye)&&(ne=ye.color,J=ye.size,ye=ye.family),ye&&ce.style("font-family",ye),J+1&&ce.style("font-size",J+"px"),ne&&ce.call(p.fill,ne)},T.setPosition=function(ce,ye,J){ce.attr("x",ye).attr("y",J)},T.setSize=function(ce,ye,J){ce.attr("width",ye).attr("height",J)},T.setRect=function(ce,ye,J,ne,de){ce.call(T.setPosition,ye,J).call(T.setSize,ne,de)},T.translatePoint=function(ce,ye,J,ne){var de=J.c2p(ce.x),xe=ne.c2p(ce.y);return!!(c(de)&&c(xe)&&ye.node())&&(ye.node().nodeName==="text"?ye.attr("x",de).attr("y",xe):ye.attr("transform",y(de,xe)),!0)},T.translatePoints=function(ce,ye,J){ce.each(function(ne){var de=l.select(this);T.translatePoint(ne,de,ye,J)})},T.hideOutsideRangePoint=function(ce,ye,J,ne,de,xe){ye.attr("display",J.isPtWithinRange(ce,de)&&ne.isPtWithinRange(ce,xe)?null:"none")},T.hideOutsideRangePoints=function(ce,ye){if(ye._hasClipOnAxisFalse){var J=ye.xaxis,ne=ye.yaxis;ce.each(function(de){var xe=de[0].trace,ue=xe.xcalendar,ge=xe.ycalendar,be=h.traceIs(xe,"bar-like")?".bartext":".point,.textpoint";ce.selectAll(be).each(function(we){T.hideOutsideRangePoint(we,l.select(this),J,ne,ue,ge)})})}},T.crispRound=function(ce,ye,J){return ye&&c(ye)?ce._context.staticPlot?ye:ye<1?1:Math.round(ye):J||0},T.singleLineStyle=function(ce,ye,J,ne,de){ye.style("fill","none");var xe=(((ce||[])[0]||{}).trace||{}).line||{},ue=J||xe.width||0,ge=de||xe.dash||"";p.stroke(ye,ne||xe.color),T.dashLine(ye,ge,ue)},T.lineGroupStyle=function(ce,ye,J,ne){ce.style("fill","none").each(function(de){var xe=(((de||[])[0]||{}).trace||{}).line||{},ue=ye||xe.width||0,ge=ne||xe.dash||"";l.select(this).call(p.stroke,J||xe.color).call(T.dashLine,ge,ue)})},T.dashLine=function(ce,ye,J){J=+J||0,ye=T.dashStyle(ye,J),ce.style({"stroke-dasharray":ye,"stroke-width":J+"px"})},T.dashStyle=function(ce,ye){ye=+ye||1;var J=Math.max(ye,3);return ce==="solid"?ce="":ce==="dot"?ce=J+"px,"+J+"px":ce==="dash"?ce=3*J+"px,"+3*J+"px":ce==="longdash"?ce=5*J+"px,"+5*J+"px":ce==="dashdot"?ce=3*J+"px,"+J+"px,"+J+"px,"+J+"px":ce==="longdashdot"&&(ce=5*J+"px,"+2*J+"px,"+J+"px,"+2*J+"px"),ce},T.singleFillStyle=function(ce,ye){var J=l.select(ce.node());M(ce,((J.data()[0]||[])[0]||{}).trace||{},ye)},T.fillGroupStyle=function(ce,ye){ce.style("stroke-width",0).each(function(J){var ne=l.select(this);J[0].trace&&M(ne,J[0].trace,ye)})};var S=n(90998);T.symbolNames=[],T.symbolFuncs=[],T.symbolBackOffs=[],T.symbolNeedLines={},T.symbolNoDot={},T.symbolNoFill={},T.symbolList=[],Object.keys(S).forEach(function(ce){var ye=S[ce],J=ye.n;T.symbolList.push(J,String(J),ce,J+100,String(J+100),ce+"-open"),T.symbolNames[J]=ce,T.symbolFuncs[J]=ye.f,T.symbolBackOffs[J]=ye.backoff||0,ye.needLine&&(T.symbolNeedLines[J]=!0),ye.noDot?T.symbolNoDot[J]=!0:T.symbolList.push(J+200,String(J+200),ce+"-dot",J+300,String(J+300),ce+"-open-dot"),ye.noFill&&(T.symbolNoFill[J]=!0)});var C=T.symbolNames.length;function P(ce,ye,J,ne){var de=ce%100;return T.symbolFuncs[de](ye,J,ne)+(ce>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}T.symbolNumber=function(ce){if(c(ce))ce=+ce;else if(typeof ce=="string"){var ye=0;ce.indexOf("-open")>0&&(ye=100,ce=ce.replace("-open","")),ce.indexOf("-dot")>0&&(ye+=200,ce=ce.replace("-dot","")),(ce=T.symbolNames.indexOf(ce))>=0&&(ce+=ye)}return ce%100>=C||ce>=400?0:Math.floor(Math.max(ce,0))};var D={x1:1,x2:0,y1:0,y2:0},O={x1:0,x2:0,y1:1,y2:0},R=s("~f"),F={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:D},horizontalreversed:{node:"linearGradient",attrs:D,reversed:!0},vertical:{node:"linearGradient",attrs:O},verticalreversed:{node:"linearGradient",attrs:O,reversed:!0}};T.gradient=function(ce,ye,J,ne,de,xe){for(var ue=de.length,ge=F[ne],be=new Array(ue),we=0;we=0&&ce.i===void 0&&(ce.i=xe.i),ye.style("opacity",ne.selectedOpacityFn?ne.selectedOpacityFn(ce):ce.mo===void 0?ue.opacity:ce.mo),ne.ms2mrc){var be;be=ce.ms==="various"||ue.size==="various"?3:ne.ms2mrc(ce.ms),ce.mrc=be,ne.selectedSizeFn&&(be=ce.mrc=ne.selectedSizeFn(ce));var we=T.symbolNumber(ce.mx||ue.symbol)||0;ce.om=we%200>=100;var ke=Me(ce,J),Ae=Y(ce,J);ye.attr("d",P(we,be,ke,Ae))}var Ee,De,Re,Ie=!1;if(ce.so)Re=ge.outlierwidth,De=ge.outliercolor,Ee=ue.outliercolor;else{var Be=(ge||{}).width;Re=(ce.mlw+1||Be+1||(ce.trace?(ce.trace.marker.line||{}).width:0)+1)-1||0,De="mlc"in ce?ce.mlcc=ne.lineScale(ce.mlc):f.isArrayOrTypedArray(ge.color)?p.defaultLine:ge.color,f.isArrayOrTypedArray(ue.color)&&(Ee=p.defaultLine,Ie=!0),Ee="mc"in ce?ce.mcc=ne.markerScale(ce.mc):ue.color||ue.colors||"rgba(0,0,0,0)",ne.selectedColorFn&&(Ee=ne.selectedColorFn(ce))}if(ce.om)ye.call(p.stroke,Ee).style({"stroke-width":(Re||1)+"px",fill:"none"});else{ye.style("stroke-width",(ce.isBlank?0:Re)+"px");var Ue=ue.gradient,qe=ce.mgt;qe?Ie=!0:qe=Ue&&Ue.type,f.isArrayOrTypedArray(qe)&&(qe=qe[0],F[qe]||(qe=0));var Ye=ue.pattern,at=Ye&&T.getPatternAttr(Ye.shape,ce.i,"");if(qe&&qe!=="none"){var lt=ce.mgc;lt?Ie=!0:lt=Ue.color;var ct=J.uid;Ie&&(ct+="-"+ce.i),T.gradient(ye,de,ct,qe,[[0,lt],[1,Ee]],"fill")}else if(at){var bt=!1,ze=Ye.fgcolor;!ze&&xe&&xe.color&&(ze=xe.color,bt=!0);var Ne=T.getPatternAttr(ze,ce.i,xe&&xe.color||null),Qe=T.getPatternAttr(Ye.bgcolor,ce.i,null),it=Ye.fgopacity,kt=T.getPatternAttr(Ye.size,ce.i,8),Je=T.getPatternAttr(Ye.solidity,ce.i,.3);bt=bt||ce.mcc||f.isArrayOrTypedArray(Ye.shape)||f.isArrayOrTypedArray(Ye.bgcolor)||f.isArrayOrTypedArray(Ye.fgcolor)||f.isArrayOrTypedArray(Ye.size)||f.isArrayOrTypedArray(Ye.solidity);var ut=J.uid;bt&&(ut+="-"+ce.i),T.pattern(ye,"point",de,ut,at,kt,Je,ce.mcc,Ye.fillmode,Qe,Ne,it)}else f.isArrayOrTypedArray(Ee)?p.fill(ye,Ee[ce.i]):p.fill(ye,Ee);Re&&p.stroke(ye,De)}},T.makePointStyleFns=function(ce){var ye={},J=ce.marker;return ye.markerScale=T.tryColorscale(J,""),ye.lineScale=T.tryColorscale(J,"line"),h.traceIs(ce,"symbols")&&(ye.ms2mrc=_.isBubble(ce)?w(ce):function(){return(J.size||6)/2}),ce.selectedpoints&&f.extendFlat(ye,T.makeSelectedPointStyleFns(ce)),ye},T.makeSelectedPointStyleFns=function(ce){var ye={},J=ce.selected||{},ne=ce.unselected||{},de=ce.marker||{},xe=J.marker||{},ue=ne.marker||{},ge=de.opacity,be=xe.opacity,we=ue.opacity,ke=be!==void 0,Ae=we!==void 0;(f.isArrayOrTypedArray(ge)||ke||Ae)&&(ye.selectedOpacityFn=function(at){var lt=at.mo===void 0?de.opacity:at.mo;return at.selected?ke?be:lt:Ae?we:x*lt});var Ee=de.color,De=xe.color,Re=ue.color;(De||Re)&&(ye.selectedColorFn=function(at){var lt=at.mcc||Ee;return at.selected?De||lt:Re||lt});var Ie=de.size,Be=xe.size,Ue=ue.size,qe=Be!==void 0,Ye=Ue!==void 0;return h.traceIs(ce,"symbols")&&(qe||Ye)&&(ye.selectedSizeFn=function(at){var lt=at.mrc||Ie/2;return at.selected?qe?Be/2:lt:Ye?Ue/2:lt}),ye},T.makeSelectedTextStyleFns=function(ce){var ye={},J=ce.selected||{},ne=ce.unselected||{},de=ce.textfont||{},xe=J.textfont||{},ue=ne.textfont||{},ge=de.color,be=xe.color,we=ue.color;return ye.selectedTextColorFn=function(ke){var Ae=ke.tc||ge;return ke.selected?be||Ae:we||(be?Ae:p.addOpacity(Ae,x))},ye},T.selectedPointStyle=function(ce,ye){if(ce.size()&&ye.selectedpoints){var J=T.makeSelectedPointStyleFns(ye),ne=ye.marker||{},de=[];J.selectedOpacityFn&&de.push(function(xe,ue){xe.style("opacity",J.selectedOpacityFn(ue))}),J.selectedColorFn&&de.push(function(xe,ue){p.fill(xe,J.selectedColorFn(ue))}),J.selectedSizeFn&&de.push(function(xe,ue){var ge=ue.mx||ne.symbol||0,be=J.selectedSizeFn(ue);xe.attr("d",P(T.symbolNumber(ge),be,Me(ue,ye),Y(ue,ye))),ue.mrc2=be}),de.length&&ce.each(function(xe){for(var ue=l.select(this),ge=0;ge0?J:0}function N(ce,ye,J){return J&&(ce=H(ce)),ye?W(ce[1]):E(ce[0])}function E(ce){var ye=l.round(ce,2);return A=ye,ye}function W(ce){var ye=l.round(ce,2);return z=ye,ye}function G(ce,ye,J,ne){var de=ce[0]-ye[0],xe=ce[1]-ye[1],ue=J[0]-ye[0],ge=J[1]-ye[1],be=Math.pow(de*de+xe*xe,.25),we=Math.pow(ue*ue+ge*ge,.25),ke=(we*we*de-be*be*ue)*ne,Ae=(we*we*xe-be*be*ge)*ne,Ee=3*we*(be+we),De=3*be*(be+we);return[[E(ye[0]+(Ee&&ke/Ee)),W(ye[1]+(Ee&&Ae/Ee))],[E(ye[0]-(De&&ke/De)),W(ye[1]-(De&&Ae/De))]]}T.textPointStyle=function(ce,ye,J){if(ce.size()){var ne;if(ye.selectedpoints){var de=T.makeSelectedTextStyleFns(ye);ne=de.selectedTextColorFn}var xe=ye.texttemplate,ue=J._fullLayout;ce.each(function(ge){var be=l.select(this),we=xe?f.extractOption(ge,ye,"txt","texttemplate"):f.extractOption(ge,ye,"tx","text");if(we||we===0){if(xe){var ke=ye._module.formatLabels,Ae=ke?ke(ge,ye,ue):{},Ee={};k(Ee,ye,ge.i);var De=ye._meta||{};we=f.texttemplateString(we,Ae,ue._d3locale,Ee,ge,De)}var Re=ge.tp||ye.textposition,Ie=j(ge,ye),Be=ne?ne(ge):ge.tc||ye.textfont.color;be.call(T.font,ge.tf||ye.textfont.family,Ie,Be).text(we).call(v.convertToTspans,J).call($,Re,Ie,ge.mrc)}else be.remove()})}},T.selectedTextStyle=function(ce,ye){if(ce.size()&&ye.selectedpoints){var J=T.makeSelectedTextStyleFns(ye);ce.each(function(ne){var de=l.select(this),xe=J.selectedTextColorFn(ne),ue=ne.tp||ye.textposition,ge=j(ne,ye);p.fill(de,xe);var be=h.traceIs(ye,"bar-like");$(de,ue,ge,ne.mrc2||ne.mrc,be)})}},T.smoothopen=function(ce,ye){if(ce.length<3)return"M"+ce.join("L");var J,ne="M"+ce[0],de=[];for(J=1;J=be||at>=ke&&at<=be)&&(lt<=Ae&<>=we||lt>=Ae&<<=we)&&(ce=[at,lt])}return ce}T.steps=function(ce){var ye=L[ce]||q;return function(J){for(var ne="M"+E(J[0][0])+","+W(J[0][1]),de=J.length,xe=1;xe=1e4&&(T.savedBBoxes={},V=0),J&&(T.savedBBoxes[J]=De),V++,f.extendFlat({},De)},T.setClipUrl=function(ce,ye,J){ce.attr("clip-path",ee(ye,J))},T.getTranslate=function(ce){var ye=(ce[ce.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(J,ne,de){return[ne,de].join(" ")}).split(" ");return{x:+ye[0]||0,y:+ye[1]||0}},T.setTranslate=function(ce,ye,J){var ne=ce.attr?"attr":"getAttribute",de=ce.attr?"attr":"setAttribute",xe=ce[ne]("transform")||"";return ye=ye||0,J=J||0,xe=xe.replace(/(\btranslate\(.*?\);?)/,"").trim(),xe=(xe+=y(ye,J)).trim(),ce[de]("transform",xe),xe},T.getScale=function(ce){var ye=(ce[ce.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(J,ne,de){return[ne,de].join(" ")}).split(" ");return{x:+ye[0]||1,y:+ye[1]||1}},T.setScale=function(ce,ye,J){var ne=ce.attr?"attr":"getAttribute",de=ce.attr?"attr":"setAttribute",xe=ce[ne]("transform")||"";return ye=ye||1,J=J||1,xe=xe.replace(/(\bscale\(.*?\);?)/,"").trim(),xe=(xe+="scale("+ye+","+J+")").trim(),ce[de]("transform",xe),xe};var U=/\s*sc.*/;T.setPointGroupScale=function(ce,ye,J){if(ye=ye||1,J=J||1,ce){var ne=ye===1&&J===1?"":"scale("+ye+","+J+")";ce.each(function(){var de=(this.getAttribute("transform")||"").replace(U,"");de=(de+=ne).trim(),this.setAttribute("transform",de)})}};var Q=/translate\([^)]*\)\s*$/;function Y(ce,ye){var J;return ce&&(J=ce.mf),J===void 0&&(J=ye.marker&&ye.marker.standoff||0),ye._geo||ye._xA?J:-J}T.setTextPointsScale=function(ce,ye,J){ce&&ce.each(function(){var ne,de=l.select(this),xe=de.select("text");if(xe.node()){var ue=parseFloat(xe.attr("x")||0),ge=parseFloat(xe.attr("y")||0),be=(de.attr("transform")||"").match(Q);ne=ye===1&&J===1?[]:[y(ue,ge),"scale("+ye+","+J+")",y(-ue,-ge)],be&&ne.push(be),de.attr("transform",ne.join(""))}})},T.getMarkerStandoff=Y;var Z,X,re,ie,le,se,pe=Math.atan2,Te=Math.cos,Se=Math.sin;function Oe(ce,ye){var J=ye[0],ne=ye[1];return[J*Te(ce)-ne*Se(ce),J*Se(ce)+ne*Te(ce)]}function Me(ce,ye){var J,ne,de=ce.ma;de===void 0&&(de=ye.marker.angle||0);var xe=ye.marker.angleref;if(xe==="previous"||xe==="north"){if(ye._geo){var ue=ye._geo.project(ce.lonlat);J=ue[0],ne=ue[1]}else{var ge=ye._xA,be=ye._yA;if(!ge||!be)return 90;J=ge.c2p(ce.x),ne=be.c2p(ce.y)}if(ye._geo){var we,ke=ce.lonlat[0],Ae=ce.lonlat[1],Ee=ye._geo.project([ke,Ae+1e-5]),De=ye._geo.project([ke+1e-5,Ae]),Re=pe(De[1]-ne,De[0]-J),Ie=pe(Ee[1]-ne,Ee[0]-J);if(xe==="north")we=de/180*Math.PI;else if(xe==="previous"){var Be=ke/180*Math.PI,Ue=Ae/180*Math.PI,qe=Z/180*Math.PI,Ye=X/180*Math.PI,at=qe-Be,lt=Te(Ye)*Se(at),ct=Se(Ye)*Te(Ue)-Te(Ye)*Se(Ue)*Te(at);we=-pe(lt,ct)-Math.PI,Z=ke,X=Ae}var bt=Oe(Re,[Te(we),0]),ze=Oe(Ie,[Se(we),0]);de=pe(bt[1]+ze[1],bt[0]+ze[0])/Math.PI*180,xe!=="previous"||se===ye.uid&&ce.i===le+1||(de=null)}if(xe==="previous"&&!ye._geo)if(se===ye.uid&&ce.i===le+1&&c(J)&&c(ne)){var Ne=J-re,Qe=ne-ie,it=ye.line&&ye.line.shape||"",kt=it.slice(it.length-1);kt==="h"&&(Qe=0),kt==="v"&&(Ne=0),de+=pe(Qe,Ne)/Math.PI*180+90}else de=null}return re=J,ie=ne,le=ce.i,se=ye.uid,de}T.getMarkerAngle=Me},90998:function(o,a,n){var l,f,s,c,d=n(95616),h=n(39898).round,p="M0,0Z",m=Math.sqrt(2),y=Math.sqrt(3),v=Math.PI,g=Math.cos,b=Math.sin;function x(w){return w===null}function _(w,k,T){if(!(w&&w%360!=0||k))return T;if(s===w&&c===k&&l===T)return f;function M(N,E){var W=g(N),G=b(N),L=E[0],q=E[1]+(k||0);return[L*W-q*G,L*G+q*W]}s=w,c=k,l=T;for(var S=w/180*v,C=0,P=0,D=d(T),O="",R=0;R0,b=d._context.staticPlot;h.each(function(x){var _,w=x[0].trace,k=w.error_x||{},T=w.error_y||{};w.ids&&(_=function(P){return P.id});var M=c.hasMarkers(w)&&w.marker.maxdisplayed>0;T.visible||k.visible||(x=[]);var S=l.select(this).selectAll("g.errorbar").data(x,_);if(S.exit().remove(),x.length){k.visible||S.selectAll("path.xerror").remove(),T.visible||S.selectAll("path.yerror").remove(),S.style("opacity",1);var C=S.enter().append("g").classed("errorbar",!0);g&&C.style("opacity",0).transition().duration(m.duration).style("opacity",1),s.setClipUrl(S,p.layerClipId,d),S.each(function(P){var D=l.select(this),O=function($,j,N){var E={x:j.c2p($.x),y:N.c2p($.y)};return $.yh!==void 0&&(E.yh=N.c2p($.yh),E.ys=N.c2p($.ys),f(E.ys)||(E.noYS=!0,E.ys=N.c2p($.ys,!0))),$.xh!==void 0&&(E.xh=j.c2p($.xh),E.xs=j.c2p($.xs),f(E.xs)||(E.noXS=!0,E.xs=j.c2p($.xs,!0))),E}(P,y,v);if(!M||P.vis){var R,F=D.select("path.yerror");if(T.visible&&f(O.x)&&f(O.yh)&&f(O.ys)){var A=T.width;R="M"+(O.x-A)+","+O.yh+"h"+2*A+"m-"+A+",0V"+O.ys,O.noYS||(R+="m-"+A+",0h"+2*A),F.size()?g&&(F=F.transition().duration(m.duration).ease(m.easing)):F=D.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("yerror",!0),F.attr("d",R)}else F.remove();var z=D.select("path.xerror");if(k.visible&&f(O.y)&&f(O.xh)&&f(O.xs)){var B=(k.copy_ystyle?T:k).width;R="M"+O.xh+","+(O.y-B)+"v"+2*B+"m0,-"+B+"H"+O.xs,O.noXS||(R+="m0,-"+B+"v"+2*B),z.size()?g&&(z=z.transition().duration(m.duration).ease(m.easing)):z=D.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("xerror",!0),z.attr("d",R)}else z.remove()}})}})}},62662:function(o,a,n){var l=n(39898),f=n(7901);o.exports=function(s){s.each(function(c){var d=c[0].trace,h=d.error_y||{},p=d.error_x||{},m=l.select(this);m.selectAll("path.yerror").style("stroke-width",h.thickness+"px").call(f.stroke,h.color),p.copy_ystyle&&(p=h),m.selectAll("path.xerror").style("stroke-width",p.thickness+"px").call(f.stroke,p.color)})}},77914:function(o,a,n){var l=n(41940),f=n(528).hoverlabel,s=n(1426).extendFlat;o.exports={hoverlabel:{bgcolor:s({},f.bgcolor,{arrayOk:!0}),bordercolor:s({},f.bordercolor,{arrayOk:!0}),font:l({arrayOk:!0,editType:"none"}),align:s({},f.align,{arrayOk:!0}),namelength:s({},f.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(o,a,n){var l=n(71828),f=n(73972);function s(c,d,h,p){p=p||l.identity,Array.isArray(c)&&(d[0][h]=p(c))}o.exports=function(c){var d=c.calcdata,h=c._fullLayout;function p(b){return function(x){return l.coerceHoverinfo({hoverinfo:x},{_module:b._module},h)}}for(var m=0;m=0&&y.indexde[0]._length||pt<0||pt>xe[0]._length)return b.unhoverRaw(ie,le)}else ut="xpx"in le?le.xpx:de[0]._length/2,pt="ypx"in le?le.ypx:xe[0]._length/2;if(le.pointerX=ut+de[0]._offset,le.pointerY=pt+xe[0]._offset,De="xval"in le?w.flat(Se,le.xval):w.p2c(de,ut),Re="yval"in le?w.flat(Se,le.yval):w.p2c(xe,pt),!f(De[0])||!f(Re[0]))return c.warn("Fx.hover failed",le,ie),b.unhoverRaw(ie,le)}var zt=1/0;function wt(Zt,pn){for(Be=0;BeNe&&(Qe.splice(0,Ne),zt=Qe[0].distance),ye&&Ee!==0&&Qe.length===0){ze.distance=Ee,ze.index=!1;var Dn=qe._module.hoverPoints(ze,ct,bt,"closest",{hoverLayer:Oe._hoverlayer});if(Dn&&(Dn=Dn.filter(function(lr){return lr.spikeDistance<=Ee})),Dn&&Dn.length){var wn,En=Dn.filter(function(lr){return lr.xa.showspikes&&lr.xa.spikesnap!=="hovered data"});if(En.length){var tr=En[0];f(tr.x0)&&f(tr.y0)&&(wn=_e(tr),(!kt.vLinePoint||kt.vLinePoint.spikeDistance>wn.spikeDistance)&&(kt.vLinePoint=wn))}var oa=Dn.filter(function(lr){return lr.ya.showspikes&&lr.ya.spikesnap!=="hovered data"});if(oa.length){var da=oa[0];f(da.x0)&&f(da.y0)&&(wn=_e(da),(!kt.hLinePoint||kt.hLinePoint.spikeDistance>wn.spikeDistance)&&(kt.hLinePoint=wn))}}}}}function ve(Zt,pn,nn){for(var Kt,On=null,Tn=1/0,Dn=0;Dn0&&Math.abs(Zt.distance)Ft-1;Vt--)gt(Qe[Vt]);Qe=St,Ze()}var ht=ie._hoverdata,yt=[],qt=te(ie),Et=ee(ie);for(Ie=0;Ie1||Qe.length>1)||ke==="closest"&&Je&&Qe.length>1,cn=g.combine(Oe.plot_bgcolor||g.background,Oe.paper_bgcolor),ln=j(Qe,{gd:ie,hovermode:ke,rotateLabels:tn,bgColor:cn,container:Oe._hoverlayer,outerContainer:Oe._paper.node(),commonLabelOpts:Oe.hoverlabel,hoverdistance:Oe.hoverdistance}),an=ln.hoverLabels;if(w.isUnifiedHover(ke)||(function(Zt,pn,nn,Kt){var On,Tn,Dn,wn,En,tr,oa,da=pn?"xa":"ya",lr=pn?"ya":"xa",ti=0,Ar=1,ur=Zt.size(),kr=new Array(ur),la=0,An=Kt.minX,on=Kt.maxX,$n=Kt.minY,Pr=Kt.maxY,Ln=function(kn){return kn*nn._invScaleX},Bn=function(kn){return kn*nn._invScaleY};function jn(kn){var Dr=kn[0],Aa=kn[kn.length-1];if(Tn=Dr.pmin-Dr.pos-Dr.dp+Dr.size,Dn=Aa.pos+Aa.dp+Aa.size-Dr.pmax,Tn>.01){for(En=kn.length-1;En>=0;En--)kn[En].dp+=Tn;On=!1}if(!(Dn<.01)){if(Tn<-.01){for(En=kn.length-1;En>=0;En--)kn[En].dp-=Dn;On=!1}if(On){var Br=0;for(wn=0;wnDr.pmax&&Br++;for(wn=kn.length-1;wn>=0&&!(Br<=0);wn--)(tr=kn[wn]).pos>Dr.pmax-1&&(tr.del=!0,Br--);for(wn=0;wn=0;En--)kn[En].dp-=Dn;for(wn=kn.length-1;wn>=0&&!(Br<=0);wn--)(tr=kn[wn]).pos+tr.dp+tr.size>Dr.pmax&&(tr.del=!0,Br--)}}}for(Zt.each(function(kn){var Dr=kn[da],Aa=kn[lr],Br=Dr._id.charAt(0)==="x",Fi=Dr.range;la===0&&Fi&&Fi[0]>Fi[1]!==Br&&(Ar=-1);var Ni=0,mi=Br?nn.width:nn.height;if(nn.hovermode==="x"||nn.hovermode==="y"){var ni,Ga,vi=E(kn,pn),us=kn.anchor,nl=us==="end"?-1:1;if(us==="middle")Ga=(ni=kn.crossPos+(Br?Bn(vi.y-kn.by/2):Ln(kn.bx/2+kn.tx2width/2)))+(Br?Bn(kn.by):Ln(kn.bx));else if(Br)Ga=(ni=kn.crossPos+Bn(R+vi.y)-Bn(kn.by/2-R))+Bn(kn.by);else{var cs=Ln(nl*R+vi.x),oo=cs+Ln(nl*kn.bx);ni=kn.crossPos+Math.min(cs,oo),Ga=kn.crossPos+Math.max(cs,oo)}Br?$n!==void 0&&Pr!==void 0&&Math.min(Ga,Pr)-Math.max(ni,$n)>1&&(Aa.side==="left"?(Ni=Aa._mainLinePosition,mi=nn.width):mi=Aa._mainLinePosition):An!==void 0&&on!==void 0&&Math.min(Ga,on)-Math.max(ni,An)>1&&(Aa.side==="top"?(Ni=Aa._mainLinePosition,mi=nn.height):mi=Aa._mainLinePosition)}kr[la++]=[{datum:kn,traceIndex:kn.trace.index,dp:0,pos:kn.pos,posref:kn.posref,size:kn.by*(Br?P:1)/2,pmin:Ni,pmax:mi}]}),kr.sort(function(kn,Dr){return kn[0].posref-Dr[0].posref||Ar*(Dr[0].traceIndex-kn[0].traceIndex)});!On&&ti<=ur;){for(ti++,On=!0,wn=0;wn.01&&xr.pmin===Mr.pmin&&xr.pmax===Mr.pmax){for(En=Lr.length-1;En>=0;En--)Lr[En].dp+=Tn;for(Un.push.apply(Un,Lr),kr.splice(wn+1,1),oa=0,En=Un.length-1;En>=0;En--)oa+=Un[En].dp;for(Dn=oa/Un.length,En=Un.length-1;En>=0;En--)Un[En].dp-=Dn;On=!1}else wn++}kr.forEach(jn)}for(wn=kr.length-1;wn>=0;wn--){var Na=kr[wn];for(En=Na.length-1;En>=0;En--){var wa=Na[En],sa=wa.datum;sa.offset=wa.dp,sa.del=wa.del}}}(an,tn,Oe,ln.commonLabelBoundingBox),W(an,tn,Oe._invScaleX,Oe._invScaleY)),Te&&Te.tagName){var sn=_.getComponentMethod("annotations","hasClickToShow")(ie,yt);y(l.select(Te),sn?"pointer":"")}Te&&!pe&&function(Zt,pn,nn){if(!nn||nn.length!==Zt._hoverdata.length)return!0;for(var Kt=nn.length-1;Kt>=0;Kt--){var On=nn[Kt],Tn=Zt._hoverdata[Kt];if(On.curveNumber!==Tn.curveNumber||String(On.pointNumber)!==String(Tn.pointNumber)||String(On.pointNumbers)!==String(Tn.pointNumbers))return!0}return!1}(ie,0,ht)&&(ht&&ie.emit("plotly_unhover",{event:le,points:ht}),ie.emit("plotly_hover",{event:le,points:ie._hoverdata,xaxes:de,yaxes:xe,xvals:De,yvals:Re}))})(Q,Y,Z,X,re)})},a.loneHover=function(Q,Y){var Z=!0;Array.isArray(Q)||(Z=!1,Q=[Q]);var X=Y.gd,re=te(X),ie=ee(X),le=j(Q.map(function(Te){var Se=Te._x0||Te.x0||Te.x||0,Oe=Te._x1||Te.x1||Te.x||0,Me=Te._y0||Te.y0||Te.y||0,ce=Te._y1||Te.y1||Te.y||0,ye=Te.eventData;if(ye){var J=Math.min(Se,Oe),ne=Math.max(Se,Oe),de=Math.min(Me,ce),xe=Math.max(Me,ce),ue=Te.trace;if(_.traceIs(ue,"gl3d")){var ge=X._fullLayout[ue.scene]._scene.container,be=ge.offsetLeft,we=ge.offsetTop;J+=be,ne+=be,de+=we,xe+=we}ye.bbox={x0:J+ie,x1:ne+ie,y0:de+re,y1:xe+re},Y.inOut_bbox&&Y.inOut_bbox.push(ye.bbox)}else ye=!1;return{color:Te.color||g.defaultLine,x0:Te.x0||Te.x||0,x1:Te.x1||Te.x||0,y0:Te.y0||Te.y||0,y1:Te.y1||Te.y||0,xLabel:Te.xLabel,yLabel:Te.yLabel,zLabel:Te.zLabel,text:Te.text,name:Te.name,idealAlign:Te.idealAlign,borderColor:Te.borderColor,fontFamily:Te.fontFamily,fontSize:Te.fontSize,fontColor:Te.fontColor,nameLength:Te.nameLength,textAlign:Te.textAlign,trace:Te.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Te.hovertemplate||!1,hovertemplateLabels:Te.hovertemplateLabels||!1,eventData:ye}}),{gd:X,hovermode:"closest",rotateLabels:!1,bgColor:Y.bgColor||g.background,container:l.select(Y.container),outerContainer:Y.outerContainer||Y.container}).hoverLabels,se=0,pe=0;return le.sort(function(Te,Se){return Te.y0-Se.y0}).each(function(Te,Se){var Oe=Te.y0-Te.by/2;Te.offset=Oe-5([\s\S]*)<\/extra>/;function j(Q,Y){var Z=Y.gd,X=Z._fullLayout,re=Y.hovermode,ie=Y.rotateLabels,le=Y.bgColor,se=Y.container,pe=Y.outerContainer,Te=Y.commonLabelOpts||{};if(Q.length===0)return[[]];var Se=Y.fontFamily||k.HOVERFONT,Oe=Y.fontSize||k.HOVERFONTSIZE,Me=Q[0],ce=Me.xa,ye=Me.ya,J=re.charAt(0),ne=J+"Label",de=Me[ne];if(de===void 0&&ce.type==="multicategory")for(var xe=0;xeX.width-jt?(ht=X.width-jt,Ft.attr("d","M"+(jt-R)+",0L"+jt+","+Et+R+"v"+Et+(2*F+qt.height)+"H-"+jt+"V"+Et+R+"H"+(jt-2*R)+"Z")):Ft.attr("d","M0,0L"+R+","+Et+R+"H"+jt+"v"+Et+(2*F+qt.height)+"H-"+jt+"V"+Et+R+"H-"+R+"Z"),Be.minX=ht-jt,Be.maxX=ht+jt,ce.side==="top"?(Be.minY=yt-(2*F+qt.height),Be.maxY=yt-F):(Be.minY=yt+F,Be.maxY=yt+(2*F+qt.height))}else{var Tt,Ot,At;ye.side==="right"?(Tt="start",Ot=1,At="",ht=ce._offset+ce._length):(Tt="end",Ot=-1,At="-",ht=ce._offset),yt=ye._offset+(Me.y0+Me.y1)/2,Vt.attr("text-anchor",Tt),Ft.attr("d","M0,0L"+At+R+","+R+"V"+(F+qt.height/2)+"h"+At+(2*F+qt.width)+"V-"+(F+qt.height/2)+"H"+At+R+"V-"+R+"Z"),Be.minY=yt-(F+qt.height/2),Be.maxY=yt+(F+qt.height/2),ye.side==="right"?(Be.minX=ht+R,Be.maxX=ht+R+(2*F+qt.width)):(Be.minX=ht-R-(2*F+qt.width),Be.maxX=ht-R);var Lt,Rt=qt.height/2,$t=ge-qt.top-Rt,Yt="clip"+X._uid+"commonlabel"+ye._id;if(ht=0?pt:It+wt=0?It:nt+wt=0?Je:ut+ve=0?ut:st+ve=0,tt.idealAlign!=="top"&&tn||!cn?tn?(Rt+=Yt/2,tt.anchor="start"):tt.anchor="middle":(Rt-=Yt/2,tt.anchor="end"),tt.crossPos=Rt;else{if(tt.pos=Rt,tn=Lt+$t/2+ln<=be,cn=Lt-$t/2-ln>=0,tt.idealAlign!=="left"&&tn||!cn)if(tn)Lt+=$t/2,tt.anchor="start";else{tt.anchor="middle";var an=ln/2,sn=Lt+an-be,Zt=Lt-an;sn>0&&(Lt-=sn),Zt<0&&(Lt+=-Zt)}else Lt-=$t/2,tt.anchor="end";tt.crossPos=Lt}Et.attr("text-anchor",tt.anchor),Tt&&jt.attr("text-anchor",tt.anchor),Ft.attr("transform",d(Lt,Rt)+(ie?h(S):""))}),{hoverLabels:mt,commonLabelBoundingBox:Be}}function N(Q,Y,Z,X,re,ie){var le="",se="";Q.nameOverride!==void 0&&(Q.name=Q.nameOverride),Q.name&&(Q.trace._meta&&(Q.name=c.templateString(Q.name,Q.trace._meta)),le=H(Q.name,Q.nameLength));var pe=Z.charAt(0),Te=pe==="x"?"y":"x";Q.zLabel!==void 0?(Q.xLabel!==void 0&&(se+="x: "+Q.xLabel+"
"),Q.yLabel!==void 0&&(se+="y: "+Q.yLabel+"
"),Q.trace.type!=="choropleth"&&Q.trace.type!=="choroplethmapbox"&&(se+=(se?"z: ":"")+Q.zLabel)):Y&&Q[pe+"Label"]===re?se=Q[Te+"Label"]||"":Q.xLabel===void 0?Q.yLabel!==void 0&&Q.trace.type!=="scattercarpet"&&(se=Q.yLabel):se=Q.yLabel===void 0?Q.xLabel:"("+Q.xLabel+", "+Q.yLabel+")",!Q.text&&Q.text!==0||Array.isArray(Q.text)||(se+=(se?"
":"")+Q.text),Q.extraText!==void 0&&(se+=(se?"
":"")+Q.extraText),ie&&se===""&&!Q.hovertemplate&&(le===""&&ie.remove(),se=le);var Se=Q.hovertemplate||!1;if(Se){var Oe=Q.hovertemplateLabels||Q;Q[pe+"Label"]!==re&&(Oe[pe+"other"]=Oe[pe+"Val"],Oe[pe+"otherLabel"]=Oe[pe+"Label"]),se=(se=c.hovertemplateString(Se,Oe,X._d3locale,Q.eventData[0]||{},Q.trace._meta)).replace($,function(Me,ce){return le=H(ce,Q.nameLength),""})}return[se,le]}function E(Q,Y){var Z=0,X=Q.offset;return Y&&(X*=-O,Z=Q.offset*D),{x:Z,y:X}}function W(Q,Y,Z,X){var re=function(le){return le*Z},ie=function(le){return le*X};Q.each(function(le){var se=l.select(this);if(le.del)return se.remove();var pe,Te,Se,Oe,Me=se.select("text.nums"),ce=le.anchor,ye=ce==="end"?-1:1,J=(Oe=(Se=(Te={start:1,end:-1,middle:0}[(pe=le).anchor])*(R+F))+Te*(pe.txwidth+F),pe.anchor==="middle"&&(Se-=pe.tx2width/2,Oe+=pe.txwidth/2+F),{alignShift:Te,textShiftX:Se,text2ShiftX:Oe}),ne=E(le,Y),de=ne.x,xe=ne.y,ue=ce==="middle";se.select("path").attr("d",ue?"M-"+re(le.bx/2+le.tx2width/2)+","+ie(xe-le.by/2)+"h"+re(le.bx)+"v"+ie(le.by)+"h-"+re(le.bx)+"Z":"M0,0L"+re(ye*R+de)+","+ie(R+xe)+"v"+ie(le.by/2-R)+"h"+re(ye*le.bx)+"v-"+ie(le.by)+"H"+re(ye*R+de)+"V"+ie(xe-R)+"Z");var ge=de+J.textShiftX,be=xe+le.ty0-le.by/2+F,we=le.textAlign||"auto";we!=="auto"&&(we==="left"&&ce!=="start"?(Me.attr("text-anchor","start"),ge=ue?-le.bx/2-le.tx2width/2+F:-le.bx-F):we==="right"&&ce!=="end"&&(Me.attr("text-anchor","end"),ge=ue?le.bx/2-le.tx2width/2-F:le.bx+F)),Me.call(m.positionText,re(ge),ie(be)),le.tx2width&&(se.select("text.name").call(m.positionText,re(J.text2ShiftX+J.alignShift*F+de),ie(xe+le.ty0-le.by/2+F)),se.select("rect").call(v.setRect,re(J.text2ShiftX+(J.alignShift-1)*le.tx2width/2+de),ie(xe-le.by/2-1),re(le.tx2width),ie(le.by+2)))})}function G(Q,Y){var Z=Q.index,X=Q.trace||{},re=Q.cd[0],ie=Q.cd[Z]||{};function le(Me){return Me||f(Me)&&Me===0}var se=Array.isArray(Z)?function(Me,ce){var ye=c.castOption(re,Z,Me);return le(ye)?ye:c.extractOption({},X,"",ce)}:function(Me,ce){return c.extractOption(ie,X,Me,ce)};function pe(Me,ce,ye){var J=se(ce,ye);le(J)&&(Q[Me]=J)}if(pe("hoverinfo","hi","hoverinfo"),pe("bgcolor","hbg","hoverlabel.bgcolor"),pe("borderColor","hbc","hoverlabel.bordercolor"),pe("fontFamily","htf","hoverlabel.font.family"),pe("fontSize","hts","hoverlabel.font.size"),pe("fontColor","htc","hoverlabel.font.color"),pe("nameLength","hnl","hoverlabel.namelength"),pe("textAlign","hta","hoverlabel.align"),Q.posref=Y==="y"||Y==="closest"&&X.orientation==="h"?Q.xa._offset+(Q.x0+Q.x1)/2:Q.ya._offset+(Q.y0+Q.y1)/2,Q.x0=c.constrain(Q.x0,0,Q.xa._length),Q.x1=c.constrain(Q.x1,0,Q.xa._length),Q.y0=c.constrain(Q.y0,0,Q.ya._length),Q.y1=c.constrain(Q.y1,0,Q.ya._length),Q.xLabelVal!==void 0&&(Q.xLabel="xLabel"in Q?Q.xLabel:x.hoverLabelText(Q.xa,Q.xLabelVal,X.xhoverformat),Q.xVal=Q.xa.c2d(Q.xLabelVal)),Q.yLabelVal!==void 0&&(Q.yLabel="yLabel"in Q?Q.yLabel:x.hoverLabelText(Q.ya,Q.yLabelVal,X.yhoverformat),Q.yVal=Q.ya.c2d(Q.yLabelVal)),Q.zLabelVal!==void 0&&Q.zLabel===void 0&&(Q.zLabel=String(Q.zLabelVal)),!(isNaN(Q.xerr)||Q.xa.type==="log"&&Q.xerr<=0)){var Te=x.tickText(Q.xa,Q.xa.c2l(Q.xerr),"hover").text;Q.xerrneg!==void 0?Q.xLabel+=" +"+Te+" / -"+x.tickText(Q.xa,Q.xa.c2l(Q.xerrneg),"hover").text:Q.xLabel+=" ± "+Te,Y==="x"&&(Q.distance+=1)}if(!(isNaN(Q.yerr)||Q.ya.type==="log"&&Q.yerr<=0)){var Se=x.tickText(Q.ya,Q.ya.c2l(Q.yerr),"hover").text;Q.yerrneg!==void 0?Q.yLabel+=" +"+Se+" / -"+x.tickText(Q.ya,Q.ya.c2l(Q.yerrneg),"hover").text:Q.yLabel+=" ± "+Se,Y==="y"&&(Q.distance+=1)}var Oe=Q.hoverinfo||Q.trace.hoverinfo;return Oe&&Oe!=="all"&&((Oe=Array.isArray(Oe)?Oe:Oe.split("+")).indexOf("x")===-1&&(Q.xLabel=void 0),Oe.indexOf("y")===-1&&(Q.yLabel=void 0),Oe.indexOf("z")===-1&&(Q.zLabel=void 0),Oe.indexOf("text")===-1&&(Q.text=void 0),Oe.indexOf("name")===-1&&(Q.name=void 0)),Q}function L(Q,Y,Z){var X,re,ie=Z.container,le=Z.fullLayout,se=le._size,pe=Z.event,Te=!!Y.hLinePoint,Se=!!Y.vLinePoint;if(ie.selectAll(".spikeline").remove(),Se||Te){var Oe=g.combine(le.plot_bgcolor,le.paper_bgcolor);if(Te){var Me,ce,ye=Y.hLinePoint;X=ye&&ye.xa,(re=ye&&ye.ya).spikesnap==="cursor"?(Me=pe.pointerX,ce=pe.pointerY):(Me=X._offset+ye.x,ce=re._offset+ye.y);var J,ne,de=s.readability(ye.color,Oe)<1.5?g.contrast(Oe):ye.color,xe=re.spikemode,ue=re.spikethickness,ge=re.spikecolor||de,be=x.getPxPosition(Q,re);if(xe.indexOf("toaxis")!==-1||xe.indexOf("across")!==-1){if(xe.indexOf("toaxis")!==-1&&(J=be,ne=Me),xe.indexOf("across")!==-1){var we=re._counterDomainMin,ke=re._counterDomainMax;re.anchor==="free"&&(we=Math.min(we,re.position),ke=Math.max(ke,re.position)),J=se.l+we*se.w,ne=se.l+ke*se.w}ie.insert("line",":first-child").attr({x1:J,x2:ne,y1:ce,y2:ce,"stroke-width":ue,stroke:ge,"stroke-dasharray":v.dashStyle(re.spikedash,ue)}).classed("spikeline",!0).classed("crisp",!0),ie.insert("line",":first-child").attr({x1:J,x2:ne,y1:ce,y2:ce,"stroke-width":ue+2,stroke:Oe}).classed("spikeline",!0).classed("crisp",!0)}xe.indexOf("marker")!==-1&&ie.insert("circle",":first-child").attr({cx:be+(re.side!=="right"?ue:-ue),cy:ce,r:ue,fill:ge}).classed("spikeline",!0)}if(Se){var Ae,Ee,De=Y.vLinePoint;X=De&&De.xa,re=De&&De.ya,X.spikesnap==="cursor"?(Ae=pe.pointerX,Ee=pe.pointerY):(Ae=X._offset+De.x,Ee=re._offset+De.y);var Re,Ie,Be=s.readability(De.color,Oe)<1.5?g.contrast(Oe):De.color,Ue=X.spikemode,qe=X.spikethickness,Ye=X.spikecolor||Be,at=x.getPxPosition(Q,X);if(Ue.indexOf("toaxis")!==-1||Ue.indexOf("across")!==-1){if(Ue.indexOf("toaxis")!==-1&&(Re=at,Ie=Ee),Ue.indexOf("across")!==-1){var lt=X._counterDomainMin,ct=X._counterDomainMax;X.anchor==="free"&&(lt=Math.min(lt,X.position),ct=Math.max(ct,X.position)),Re=se.t+(1-ct)*se.h,Ie=se.t+(1-lt)*se.h}ie.insert("line",":first-child").attr({x1:Ae,x2:Ae,y1:Re,y2:Ie,"stroke-width":qe,stroke:Ye,"stroke-dasharray":v.dashStyle(X.spikedash,qe)}).classed("spikeline",!0).classed("crisp",!0),ie.insert("line",":first-child").attr({x1:Ae,x2:Ae,y1:Re,y2:Ie,"stroke-width":qe+2,stroke:Oe}).classed("spikeline",!0).classed("crisp",!0)}Ue.indexOf("marker")!==-1&&ie.insert("circle",":first-child").attr({cx:Ae,cy:at-(X.side!=="top"?qe:-qe),r:qe,fill:Ye}).classed("spikeline",!0)}}}function q(Q,Y){return!Y}function H(Q,Y){return m.plainText(Q||"",{len:Y,allowedTags:["br","sub","sup","b","i","em"]})}function V(Q,Y,Z){var X=Y[Q+"a"],re=Y[Q+"Val"],ie=Y.cd[0];if(X.type==="category"||X.type==="multicategory")re=X._categoriesMap[re];else if(X.type==="date"){var le=Y.trace[Q+"periodalignment"];if(le){var se=Y.cd[Y.index],pe=se[Q+"Start"];pe===void 0&&(pe=se[Q]);var Te=se[Q+"End"];Te===void 0&&(Te=se[Q]);var Se=Te-pe;le==="end"?re+=Se:le==="middle"&&(re+=Se/2)}re=X.d2c(re)}return ie&&ie.t&&ie.t.posLetter===X._id&&(Z.boxmode!=="group"&&Z.violinmode!=="group"||(re+=ie.t.dPos)),re}function te(Q){return Q.offsetTop+Q.clientTop}function ee(Q){return Q.offsetLeft+Q.clientLeft}function U(Q,Y){var Z=Q._fullLayout,X=Y.getBoundingClientRect(),re=X.left,ie=X.top,le=re+X.width,se=ie+X.height,pe=c.apply3DTransform(Z._invTransform)(re,ie),Te=c.apply3DTransform(Z._invTransform)(le,se),Se=pe[0],Oe=pe[1],Me=Te[0],ce=Te[1];return{x:Se,y:Oe,width:Me-Se,height:ce-Oe,top:Math.min(Oe,ce),left:Math.min(Se,Me),right:Math.max(Se,Me),bottom:Math.max(Oe,ce)}}},38048:function(o,a,n){var l=n(71828),f=n(7901),s=n(23469).isUnifiedHover;o.exports=function(c,d,h,p){p=p||{};var m=d.legend;function y(v){p.font[v]||(p.font[v]=m?d.legend.font[v]:d.font[v])}d&&s(d.hovermode)&&(p.font||(p.font={}),y("size"),y("family"),y("color"),m?(p.bgcolor||(p.bgcolor=f.combine(d.legend.bgcolor,d.paper_bgcolor)),p.bordercolor||(p.bordercolor=d.legend.bordercolor)):p.bgcolor||(p.bgcolor=d.paper_bgcolor)),h("hoverlabel.bgcolor",p.bgcolor),h("hoverlabel.bordercolor",p.bordercolor),h("hoverlabel.namelength",p.namelength),l.coerceFont(h,"hoverlabel.font",p.font),h("hoverlabel.align",p.align)}},98212:function(o,a,n){var l=n(71828),f=n(528);o.exports=function(s,c){function d(h,p){return c[h]!==void 0?c[h]:l.coerce(s,c,f,h,p)}return d("clickmode"),d("hovermode")}},30211:function(o,a,n){var l=n(39898),f=n(71828),s=n(28569),c=n(23469),d=n(528),h=n(88335);o.exports={moduleType:"component",name:"fx",constants:n(26675),schema:{layout:d},attributes:n(77914),layoutAttributes:d,supplyLayoutGlobalDefaults:n(22774),supplyDefaults:n(54268),supplyLayoutDefaults:n(34938),calc:n(30732),getDistanceFunction:c.getDistanceFunction,getClosest:c.getClosest,inbox:c.inbox,quadrature:c.quadrature,appendArrayPointValue:c.appendArrayPointValue,castHoverOption:function(p,m,y){return f.castOption(p,m,"hoverlabel."+y)},castHoverinfo:function(p,m,y){return f.castOption(p,y,"hoverinfo",function(v){return f.coerceHoverinfo({hoverinfo:v},{_module:p._module},m)})},hover:h.hover,unhover:s.unhover,loneHover:h.loneHover,loneUnhover:function(p){var m=f.isD3Selection(p)?p:l.select(p);m.selectAll("g.hovertext").remove(),m.selectAll(".spikeline").remove()},click:n(75914)}},528:function(o,a,n){var l=n(26675),f=n(41940),s=f({editType:"none"});s.family.dflt=l.HOVERFONT,s.size.dflt=l.HOVERFONTSIZE,o.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:s,grouptitlefont:f({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},34938:function(o,a,n){var l=n(71828),f=n(528),s=n(98212),c=n(38048);o.exports=function(d,h){function p(g,b){return l.coerce(d,h,f,g,b)}s(d,h)&&(p("hoverdistance"),p("spikedistance")),p("dragmode")==="select"&&p("selectdirection");var m=h._has("mapbox"),y=h._has("geo"),v=h._basePlotModules.length;h.dragmode==="zoom"&&((m||y)&&v===1||m&&y&&v===2)&&(h.dragmode="pan"),c(d,h,p),l.coerceFont(p,"hoverlabel.grouptitlefont",h.hoverlabel.font)}},22774:function(o,a,n){var l=n(71828),f=n(38048),s=n(528);o.exports=function(c,d){f(c,d,function(h,p){return l.coerce(c,d,s,h,p)})}},83312:function(o,a,n){var l=n(71828),f=n(30587).counter,s=n(27670).Y,c=n(85555).idRegex,d=n(44467),h={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[f("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:s({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function p(v,g,b){var x=g[b+"axes"],_=Object.keys((v._splomAxes||{})[b]||{});return Array.isArray(x)?x:_.length?_:void 0}function m(v,g,b,x,_,w){var k=g(v+"gap",b),T=g("domain."+v);g(v+"side",x);for(var M=new Array(_),S=T[0],C=(T[1]-S)/(_-k),P=C*(1-k),D=0;D<_;D++){var O=S+C*D;M[w?_-1-D:D]=[O,O+P]}return M}function y(v,g,b,x,_){var w,k=new Array(b);function T(M,S){g.indexOf(S)!==-1&&x[S]===void 0?(k[M]=S,x[S]=M):k[M]=""}if(Array.isArray(v))for(w=0;w1){T||M||S||$("pattern")==="independent"&&(T=!0),P._hasSubplotGrid=T;var R,F,A=$("roworder")==="top to bottom",z=T?.2:.1,B=T?.3:.1;C&&g._splomGridDflt&&(R=g._splomGridDflt.xside,F=g._splomGridDflt.yside),P._domains={x:m("x",$,z,R,O),y:m("y",$,B,F,D,A)}}else delete g.grid}function $(j,N){return l.coerce(b,P,h,j,N)}},contentDefaults:function(v,g){var b=g.grid;if(b&&b._domains){var x,_,w,k,T,M,S,C=v.grid||{},P=g._subplots,D=b._hasSubplotGrid,O=b.rows,R=b.columns,F=b.pattern==="independent",A=b._axisMap={};if(D){var z=C.subplots||[];M=b.subplots=new Array(O);var B=1;for(x=0;x(y==="legend"?1:0));if(B===!1&&(g[y]=void 0),(B!==!1||x.uirevision)&&(w("uirevision",g.uirevision),B!==!1)){w("borderwidth");var $,j,N,E=w("orientation")==="h",W=w("yref")==="paper",G=w("xref")==="paper",L="left";if(E?($=0,l.getComponentMethod("rangeslider","isVisible")(v.xaxis)?W?(j=1.1,N="bottom"):(j=1,N="top"):W?(j=-.1,N="top"):(j=0,N="bottom")):(j=1,N="auto",G?$=1.02:($=1,L="right")),f.coerce(x,_,{x:{valType:"number",editType:"legend",min:G?-2:0,max:G?3:1,dflt:$}},"x"),f.coerce(x,_,{y:{valType:"number",editType:"legend",min:W?-2:0,max:W?3:1,dflt:j}},"y"),w("traceorder",O),p.isGrouped(g[y])&&w("tracegroupgap"),w("entrywidth"),w("entrywidthmode"),w("itemsizing"),w("itemwidth"),w("itemclick"),w("itemdoubleclick"),w("groupclick"),w("xanchor",L),w("yanchor",N),w("valign"),f.noneOrAll(x,_,["x","y"]),w("title.text")){w("title.side",E?"left":"top");var q=f.extendFlat({},k,{size:f.bigFont(k.size)});f.coerceFont(w,"title.font",q)}}}}o.exports=function(y,v,g){var b,x=g.slice(),_=v.shapes;if(_)for(b=0;b<_.length;b++){var w=_[b];if(w.showlegend){var k={_input:w._input,visible:w.visible,showlegend:w.showlegend,legend:w.legend};x.push(k)}}var T=["legend"];for(b=0;b1)}var X=q.hiddenlabels||[];if(!(V||q.showlegend&&te.length))return G.selectAll("."+H).remove(),q._topdefs.select("#"+W).remove(),s.autoMargin(N,H);var re=f.ensureSingle(G,"g",H,function(ce){V||ce.attr("pointer-events","all")}),ie=f.ensureSingleById(q._topdefs,"clipPath",W,function(ce){ce.append("rect")}),le=f.ensureSingle(re,"rect","bg",function(ce){ce.attr("shape-rendering","crispEdges")});le.call(m.stroke,L.bordercolor).call(m.fill,L.bgcolor).style("stroke-width",L.borderwidth+"px");var se,pe=f.ensureSingle(re,"g","scrollbox"),Te=L.title;L._titleWidth=0,L._titleHeight=0,Te.text?((se=f.ensureSingle(pe,"text",H+"titletext")).attr("text-anchor","start").call(p.font,Te.font).text(Te.text),z(se,pe,N,L,S)):pe.selectAll("."+H+"titletext").remove();var Se=f.ensureSingle(re,"rect","scrollbar",function(ce){ce.attr(g.scrollBarEnterAttrs).call(m.fill,g.scrollBarColor)}),Oe=pe.selectAll("g.groups").data(te);Oe.enter().append("g").attr("class","groups"),Oe.exit().remove();var Me=Oe.selectAll("g.traces").data(f.identity);Me.enter().append("g").attr("class","traces"),Me.exit().remove(),Me.style("opacity",function(ce){var ye=ce[0].trace;return c.traceIs(ye,"pie-like")?X.indexOf(ce[0].label)!==-1?.5:1:ye.visible==="legendonly"?.5:1}).each(function(){l.select(this).call(R,N,L)}).call(T,N,L).each(function(){V||l.select(this).call(A,N,H)}),f.syncOrAsync([s.previousPromises,function(){return function(ce,ye,J,ne){var de=ce._fullLayout,xe=j(ne);ne||(ne=de[xe]);var ue=de._size,ge=M.isVertical(ne),be=M.isGrouped(ne),we=ne.entrywidthmode==="fraction",ke=ne.borderwidth,Ae=2*ke,Ee=g.itemGap,De=ne.itemwidth+2*Ee,Re=2*(ke+Ee),Ie=$(ne),Be=ne.y<0||ne.y===0&&Ie==="top",Ue=ne.y>1||ne.y===1&&Ie==="bottom",qe=ne.tracegroupgap,Ye={};ne._maxHeight=Math.max(Be||Ue?de.height/2:ue.h,30);var at=0;ne._width=0,ne._height=0;var lt=function(Ge){var Ke=0,nt=0,st=Ge.title.side;return st&&(st.indexOf("left")!==-1&&(Ke=Ge._titleWidth),st.indexOf("top")!==-1&&(nt=Ge._titleHeight)),[Ke,nt]}(ne);if(ge)J.each(function(Ge){var Ke=Ge[0].height;p.setTranslate(this,ke+lt[0],ke+lt[1]+ne._height+Ke/2+Ee),ne._height+=Ke,ne._width=Math.max(ne._width,Ge[0].width)}),at=De+ne._width,ne._width+=Ee+De+Ae,ne._height+=Re,be&&(ye.each(function(Ge,Ke){p.setTranslate(this,0,Ke*ne.tracegroupgap)}),ne._height+=(ne._lgroupsLength-1)*ne.tracegroupgap);else{var ct=B(ne),bt=ne.x<0||ne.x===0&&ct==="right",ze=ne.x>1||ne.x===1&&ct==="left",Ne=Ue||Be,Qe=de.width/2;ne._maxWidth=Math.max(bt?Ne&&ct==="left"?ue.l+ue.w:Qe:ze?Ne&&ct==="right"?ue.r+ue.w:Qe:ue.w,2*De);var it=0,kt=0;J.each(function(Ge){var Ke=D(Ge,ne,De);it=Math.max(it,Ke),kt+=Ke}),at=null;var Je=0;if(be){var ut=0,pt=0,It=0;ye.each(function(){var Ge=0,Ke=0;l.select(this).selectAll("g.traces").each(function(st){var mt=D(st,ne,De),tt=st[0].height;p.setTranslate(this,lt[0],lt[1]+ke+Ee+tt/2+Ke),Ke+=tt,Ge=Math.max(Ge,mt),Ye[st[0].trace.legendgroup]=Ge});var nt=Ge+Ee;pt>0&&nt+ke+pt>ne._maxWidth?(Je=Math.max(Je,pt),pt=0,It+=ut+qe,ut=Ke):ut=Math.max(ut,Ke),p.setTranslate(this,pt,It),pt+=nt}),ne._width=Math.max(Je,pt)+ke,ne._height=It+ut+Re}else{var Mt=J.size(),zt=kt+Ae+(Mt-1)*Ee=ne._maxWidth&&(Je=Math.max(Je,Ve),ve=0,_e+=wt,ne._height+=wt,wt=0),p.setTranslate(this,lt[0]+ke+ve,lt[1]+ke+_e+Ke/2+Ee),Ve=ve+nt+Ee,ve+=st,wt=Math.max(wt,Ke)}),zt?(ne._width=ve+Ae,ne._height=wt+Re):(ne._width=Math.max(Je,Ve)+Ae,ne._height+=wt+Re)}}ne._width=Math.ceil(Math.max(ne._width+lt[0],ne._titleWidth+2*(ke+g.titlePad))),ne._height=Math.ceil(Math.max(ne._height+lt[1],ne._titleHeight+2*(ke+g.itemGap))),ne._effHeight=Math.min(ne._height,ne._maxHeight);var We=ce._context.edits,Ze=We.legendText||We.legendPosition;J.each(function(Ge){var Ke=l.select(this).select("."+xe+"toggle"),nt=Ge[0].height,st=Ge[0].trace.legendgroup,mt=D(Ge,ne,De);be&&st!==""&&(mt=Ye[st]);var tt=Ze?De:at||mt;ge||we||(tt+=Ee/2),p.setRect(Ke,0,-nt/2,tt,nt)})}(N,Oe,Me,L)},function(){var ce,ye,J,ne,de=q._size,xe=L.borderwidth,ue=L.xref==="paper",ge=L.yref==="paper";if(Te.text&&function(Ne,Qe,it){if(Qe.title.side==="top center"||Qe.title.side==="top right"){var kt=Qe.title.font.size*x,Je=0,ut=Ne.node(),pt=p.bBox(ut).width;Qe.title.side==="top center"?Je=.5*(Qe._width-2*it-2*g.titlePad-pt):Qe.title.side==="top right"&&(Je=Qe._width-2*it-2*g.titlePad-pt),y.positionText(Ne,it+g.titlePad+Je,it+kt)}}(se,L,xe),!V){var be,we;be=ue?de.l+de.w*L.x-_[B(L)]*L._width:q.width*L.x-_[B(L)]*L._width,we=ge?de.t+de.h*(1-L.y)-_[$(L)]*L._effHeight:q.height*(1-L.y)-_[$(L)]*L._effHeight;var ke=function(Ne,Qe,it,kt){var Je=Ne._fullLayout,ut=Je[Qe],pt=B(ut),It=$(ut),Mt=ut.xref==="paper",zt=ut.yref==="paper";Ne._fullLayout._reservedMargin[Qe]={};var wt=ut.y<.5?"b":"t",ve=ut.x<.5?"l":"r",_e={r:Je.width-it,l:it+ut._width,b:Je.height-kt,t:kt+ut._effHeight};if(Mt&&zt)return s.autoMargin(Ne,Qe,{x:ut.x,y:ut.y,l:ut._width*_[pt],r:ut._width*w[pt],b:ut._effHeight*w[It],t:ut._effHeight*_[It]});Mt?Ne._fullLayout._reservedMargin[Qe][wt]=_e[wt]:zt||ut.orientation==="v"?Ne._fullLayout._reservedMargin[Qe][ve]=_e[ve]:Ne._fullLayout._reservedMargin[Qe][wt]=_e[wt]}(N,H,be,we);if(ke)return;if(q.margin.autoexpand){var Ae=be,Ee=we;be=ue?f.constrain(be,0,q.width-L._width):Ae,we=ge?f.constrain(we,0,q.height-L._effHeight):Ee,be!==Ae&&f.log("Constrain "+H+".x to make legend fit inside graph"),we!==Ee&&f.log("Constrain "+H+".y to make legend fit inside graph")}p.setTranslate(re,be,we)}if(Se.on(".drag",null),re.on("wheel",null),V||L._height<=L._maxHeight||N._context.staticPlot){var De=L._effHeight;V&&(De=L._height),le.attr({width:L._width-xe,height:De-xe,x:xe/2,y:xe/2}),p.setTranslate(pe,0,0),ie.select("rect").attr({width:L._width-2*xe,height:De-2*xe,x:xe,y:xe}),p.setClipUrl(pe,W,N),p.setRect(Se,0,0,0,0),delete L._scrollY}else{var Re,Ie,Be,Ue=Math.max(g.scrollBarMinHeight,L._effHeight*L._effHeight/L._height),qe=L._effHeight-Ue-2*g.scrollBarMargin,Ye=L._height-L._effHeight,at=qe/Ye,lt=Math.min(L._scrollY||0,Ye);le.attr({width:L._width-2*xe+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-xe,x:xe/2,y:xe/2}),ie.select("rect").attr({width:L._width-2*xe+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-2*xe,x:xe,y:xe+lt}),p.setClipUrl(pe,W,N),ze(lt,Ue,at),re.on("wheel",function(){ze(lt=f.constrain(L._scrollY+l.event.deltaY/qe*Ye,0,Ye),Ue,at),lt!==0&<!==Ye&&l.event.preventDefault()});var ct=l.behavior.drag().on("dragstart",function(){var Ne=l.event.sourceEvent;Re=Ne.type==="touchstart"?Ne.changedTouches[0].clientY:Ne.clientY,Be=lt}).on("drag",function(){var Ne=l.event.sourceEvent;Ne.buttons===2||Ne.ctrlKey||(Ie=Ne.type==="touchmove"?Ne.changedTouches[0].clientY:Ne.clientY,lt=function(Qe,it,kt){var Je=(kt-it)/at+Qe;return f.constrain(Je,0,Ye)}(Be,Re,Ie),ze(lt,Ue,at))});Se.call(ct);var bt=l.behavior.drag().on("dragstart",function(){var Ne=l.event.sourceEvent;Ne.type==="touchstart"&&(Re=Ne.changedTouches[0].clientY,Be=lt)}).on("drag",function(){var Ne=l.event.sourceEvent;Ne.type==="touchmove"&&(Ie=Ne.changedTouches[0].clientY,lt=function(Qe,it,kt){var Je=(it-kt)/at+Qe;return f.constrain(Je,0,Ye)}(Be,Re,Ie),ze(lt,Ue,at))});pe.call(bt)}function ze(Ne,Qe,it){L._scrollY=N._fullLayout[H]._scrollY=Ne,p.setTranslate(pe,0,-Ne),p.setRect(Se,L._width,g.scrollBarMargin+Ne*it,g.scrollBarWidth,Qe),ie.select("rect").attr("y",xe+Ne)}N._context.edits.legendPosition&&(re.classed("cursor-move",!0),h.init({element:re.node(),gd:N,prepFn:function(){var Ne=p.getTranslate(re);J=Ne.x,ne=Ne.y},moveFn:function(Ne,Qe){var it=J+Ne,kt=ne+Qe;p.setTranslate(re,it,kt),ce=h.align(it,L._width,de.l,de.l+de.w,L.xanchor),ye=h.align(kt+L._height,-L._height,de.t+de.h,de.t,L.yanchor)},doneFn:function(){if(ce!==void 0&&ye!==void 0){var Ne={};Ne[H+".x"]=ce,Ne[H+".y"]=ye,c.call("_guiRelayout",N,Ne)}},clickFn:function(Ne,Qe){var it=G.selectAll("g.traces").filter(function(){var kt=this.getBoundingClientRect();return Qe.clientX>=kt.left&&Qe.clientX<=kt.right&&Qe.clientY>=kt.top&&Qe.clientY<=kt.bottom});it.size()>0&&O(N,re,it,Ne,Qe)}}))}],N)}}function D(N,E,W){var G=N[0],L=G.width,q=E.entrywidthmode,H=G.trace.legendwidth||E.entrywidth;return q==="fraction"?E._maxWidth*H:W+(H||L)}function O(N,E,W,G,L){var q=W.data()[0][0].trace,H={event:L,node:W.node(),curveNumber:q.index,expandedIndex:q._expandedIndex,data:N.data,layout:N.layout,frames:N._transitionData._frames,config:N._context,fullData:N._fullData,fullLayout:N._fullLayout};q._group&&(H.group=q._group),c.traceIs(q,"pie-like")&&(H.label=W.datum()[0].label);var V=d.triggerHandler(N,"plotly_legendclick",H);if(G===1){if(V===!1)return;E._clickTimeout=setTimeout(function(){N._fullLayout&&v(W,N,G)},N._context.doubleClickDelay)}else G===2&&(E._clickTimeout&&clearTimeout(E._clickTimeout),N._legendMouseDownTime=0,d.triggerHandler(N,"plotly_legenddoubleclick",H)!==!1&&V!==!1&&v(W,N,G))}function R(N,E,W){var G,L,q=j(W),H=N.data()[0][0],V=H.trace,te=c.traceIs(V,"pie-like"),ee=!W._inHover&&E._context.edits.legendText&&!te,U=W._maxNameLength;H.groupTitle?(G=H.groupTitle.text,L=H.groupTitle.font):(L=W.font,W.entries?G=H.text:(G=te?H.label:V.name,V._meta&&(G=f.templateString(G,V._meta))));var Q=f.ensureSingle(N,"text",q+"text");Q.attr("text-anchor","start").call(p.font,L).text(ee?F(G,U):G);var Y=W.itemwidth+2*g.itemGap;y.positionText(Q,Y,0),ee?Q.call(y.makeEditable,{gd:E,text:G}).call(z,N,E,W).on("edit",function(Z){this.text(F(Z,U)).call(z,N,E,W);var X=H.trace._fullInput||{},re={};if(c.hasTransform(X,"groupby")){var ie=c.getTransformIndices(X,"groupby"),le=ie[ie.length-1],se=f.keyedContainer(X,"transforms["+le+"].styles","target","value.name");se.set(H.trace._group,Z),re=se.constructUpdate()}else re.name=Z;return X._isShape?c.call("_guiRelayout",E,"shapes["+V.index+"].name",re.name):c.call("_guiRestyle",E,re,V.index)}):z(Q,N,E,W)}function F(N,E){var W=Math.max(4,E);if(N&&N.trim().length>=W/2)return N;for(var G=W-(N=N||"").length;G>0;G--)N+=" ";return N}function A(N,E,W){var G,L=E._context.doubleClickDelay,q=1,H=f.ensureSingle(N,"rect",W+"toggle",function(V){E._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(m.fill,"rgba(0,0,0,0)")});E._context.staticPlot||(H.on("mousedown",function(){(G=new Date().getTime())-E._legendMouseDownTimeL&&(q=Math.max(q-1,1)),O(E,V,N,q,l.event)}}))}function z(N,E,W,G,L){G._inHover&&N.attr("data-notex",!0),y.convertToTspans(N,W,function(){(function(q,H,V,te){var ee=q.data()[0][0];if(V._inHover||!ee||ee.trace.showlegend){var U=q.select("g[class*=math-group]"),Q=U.node(),Y=j(V);V||(V=H._fullLayout[Y]);var Z,X,re=V.borderwidth,ie=(te===S?V.title.font:ee.groupTitle?ee.groupTitle.font:V.font).size*x;if(Q){var le=p.bBox(Q);Z=le.height,X=le.width,te===S?p.setTranslate(U,re,re+.75*Z):p.setTranslate(U,0,.25*Z)}else{var se="."+Y+(te===S?"title":"")+"text",pe=q.select(se),Te=y.lineCount(pe),Se=pe.node();if(Z=ie*Te,X=Se?p.bBox(Se).width:0,te===S)V.title.side==="left"&&(X+=2*g.itemGap),y.positionText(pe,re+g.titlePad,re+ie);else{var Oe=2*g.itemGap+V.itemwidth;ee.groupTitle&&(Oe=g.itemGap,X-=V.itemwidth),y.positionText(pe,Oe,-ie*((Te-1)/2-.3))}}te===S?(V._titleWidth=X,V._titleHeight=Z):(ee.lineHeight=ie,ee.height=Math.max(Z,16)+3,ee.width=X)}else q.remove()})(E,W,G,L)})}function B(N){return f.isRightAnchor(N)?"right":f.isCenterAnchor(N)?"center":"left"}function $(N){return f.isBottomAnchor(N)?"bottom":f.isMiddleAnchor(N)?"middle":"top"}function j(N){return N._id||"legend"}o.exports=function(N,E){if(E)P(N,E);else{var W=N._fullLayout,G=W._legends;W._infolayer.selectAll('[class^="legend"]').each(function(){var H=l.select(this),V=H.attr("class").split(" ")[0];V.match(C)&&G.indexOf(V)===-1&&H.remove()});for(var L=0;LB&&(z=B)}F[h][0]._groupMinRank=z,F[h][0]._preGroupSort=h}var $=function(G,L){return G.trace.legendrank-L.trace.legendrank||G._preSort-L._preSort};for(F.forEach(function(G,L){G[0]._preGroupSort=L}),F.sort(function(G,L){return G[0]._groupMinRank-L[0]._groupMinRank||G[0]._preGroupSort-L[0]._preGroupSort}),h=0;hT?T:w}o.exports=function(w,k,T){var M=k._fullLayout;T||(T=M.legend);var S=T.itemsizing==="constant",C=T.itemwidth,P=(C+2*g.itemGap)/2,D=c(P,0),O=function(A,z,B,$){var j;if(A+1)j=A;else{if(!(z&&z.width>0))return 0;j=z.width}return S?$:Math.min(j,B)};function R(A,z,B){var $=A[0].trace,j=$.marker||{},N=j.line||{},E=B?$.visible&&$.type===B:f.traceIs($,"bar"),W=l.select(z).select("g.legendpoints").selectAll("path.legend"+B).data(E?[A]:[]);W.enter().append("path").classed("legend"+B,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),W.exit().remove(),W.each(function(G){var L=l.select(this),q=G[0],H=O(q.mlw,j.line,5,2);L.style("stroke-width",H+"px");var V=q.mcc;if(!T._inHover&&"mc"in q){var te=p(j),ee=te.mid;ee===void 0&&(ee=(te.max+te.min)/2),V=d.tryColorscale(j,"")(ee)}var U=V||q.mc||j.color,Q=j.pattern,Y=Q&&d.getPatternAttr(Q.shape,0,"");if(Y){var Z=d.getPatternAttr(Q.bgcolor,0,null),X=d.getPatternAttr(Q.fgcolor,0,null),re=Q.fgopacity,ie=_(Q.size,8,10),le=_(Q.solidity,.5,1),se="legend-"+$.uid;L.call(d.pattern,"legend",k,se,Y,ie,le,V,Q.fillmode,Z,X,re)}else L.call(h.fill,U);H&&h.stroke(L,q.mlc||N.color)})}function F(A,z,B){var $=A[0],j=$.trace,N=B?j.visible&&j.type===B:f.traceIs(j,B),E=l.select(z).select("g.legendpoints").selectAll("path.legend"+B).data(N?[A]:[]);if(E.enter().append("path").classed("legend"+B,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),E.exit().remove(),E.size()){var W=j.marker||{},G=O(v(W.line.width,$.pts),W.line,5,2),L="pieLike",q=s.minExtend(j,{marker:{line:{width:G}}},L),H=s.minExtend($,{trace:q},L);y(E,H,q,k)}}w.each(function(A){var z=l.select(this),B=s.ensureSingle(z,"g","layers");B.style("opacity",A[0].trace.opacity);var $=T.valign,j=A[0].lineHeight,N=A[0].height;if($!=="middle"&&j&&N){var E={top:1,bottom:-1}[$]*(.5*(j-N+3));B.attr("transform",c(0,E))}else B.attr("transform",null);B.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill",!0),B.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines",!0);var W=B.selectAll("g.legendsymbols").data([A]);W.enter().append("g").classed("legendsymbols",!0),W.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(function(A){var z,B=A[0].trace,$=[];if(B.visible)switch(B.type){case"histogram2d":case"heatmap":$=[["M-15,-2V4H15V-2Z"]],z=!0;break;case"choropleth":case"choroplethmapbox":$=[["M-6,-6V6H6V-6Z"]],z=!0;break;case"densitymapbox":$=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],z="radial";break;case"cone":$=[["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"]],z=!1;break;case"streamtube":$=[["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"]],z=!1;break;case"surface":$=[["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"]],z=!0;break;case"mesh3d":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!1;break;case"volume":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!0;break;case"isosurface":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],z=!1}var j=l.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data($);j.enter().append("path").classed("legend3dandfriends",!0).attr("transform",D).style("stroke-miterlimit",1),j.exit().remove(),j.each(function(N,E){var W,G=l.select(this),L=p(B),q=L.colorscale,H=L.reversescale;if(q){if(!z){var V=q.length;W=E===0?q[H?V-1:0][1]:E===1?q[H?0:V-1][1]:q[Math.floor((V-1)/2)][1]}}else{var te=B.vertexcolor||B.facecolor||B.color;W=s.isArrayOrTypedArray(te)?te[E]||te[0]:te}G.attr("d",N[0]),W?G.call(h.fill,W):G.call(function(ee){if(ee.size()){var U="legendfill-"+B.uid;d.gradient(ee,k,U,b(H,z==="radial"),q,"fill")}})})}).each(function(A){var z=A[0].trace,B=z.type==="waterfall";if(A[0]._distinct&&B){var $=A[0].trace[A[0].dir].marker;return A[0].mc=$.color,A[0].mlw=$.line.width,A[0].mlc=$.line.color,R(A,this,"waterfall")}var j=[];z.visible&&B&&(j=A[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 N=l.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(j);N.enter().append("path").classed("legendwaterfall",!0).attr("transform",D).style("stroke-miterlimit",1),N.exit().remove(),N.each(function(E){var W=l.select(this),G=z[E[0]].marker,L=O(void 0,G.line,5,2);W.attr("d",E[1]).style("stroke-width",L+"px").call(h.fill,G.color),L&&W.call(h.stroke,G.line.color)})}).each(function(A){R(A,this,"funnel")}).each(function(A){R(A,this)}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendbox").data(z.visible&&f.traceIs(z,"box-violin")?[A]:[]);B.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),B.exit().remove(),B.each(function(){var $=l.select(this);if(z.boxpoints!=="all"&&z.points!=="all"||h.opacity(z.fillcolor)!==0||h.opacity((z.line||{}).color)!==0){var j=O(void 0,z.line,5,2);$.style("stroke-width",j+"px").call(h.fill,z.fillcolor),j&&h.stroke($,z.line.color)}else{var N=s.minExtend(z,{marker:{size:S?12:s.constrain(z.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});B.call(d.pointStyle,N,k)}})}).each(function(A){F(A,this,"funnelarea")}).each(function(A){F(A,this,"pie")}).each(function(A){var z,B,$=x(A),j=$.showFill,N=$.showLine,E=$.showGradientLine,W=$.showGradientFill,G=$.anyFill,L=$.anyLine,q=A[0],H=q.trace,V=p(H),te=V.colorscale,ee=V.reversescale,U=m.hasMarkers(H)||!G?"M5,0":L?"M5,-2":"M5,-3",Q=l.select(this),Y=Q.select(".legendfill").selectAll("path").data(j||W?[A]:[]);if(Y.enter().append("path").classed("js-fill",!0),Y.exit().remove(),Y.attr("d",U+"h"+C+"v6h-"+C+"z").call(function(re){if(re.size())if(j)d.fillGroupStyle(re,k);else{var ie="legendfill-"+H.uid;d.gradient(re,k,ie,b(ee),te,"fill")}}),N||E){var Z=O(void 0,H.line,10,5);B=s.minExtend(H,{line:{width:Z}}),z=[s.minExtend(q,{trace:B})]}var X=Q.select(".legendlines").selectAll("path").data(N||E?[z]:[]);X.enter().append("path").classed("js-line",!0),X.exit().remove(),X.attr("d",U+(E?"l"+C+",0.0001":"h"+C)).call(N?d.lineGroupStyle:function(re){if(re.size()){var ie="legendline-"+H.uid;d.lineGroupStyle(re),d.gradient(re,k,ie,b(ee),te,"stroke")}})}).each(function(A){var z,B,$=x(A),j=$.anyFill,N=$.anyLine,E=$.showLine,W=$.showMarker,G=A[0],L=G.trace,q=!W&&!N&&!j&&m.hasText(L);function H(X,re,ie,le){var se=s.nestedProperty(L,X).get(),pe=s.isArrayOrTypedArray(se)&&re?re(se):se;if(S&&pe&&le!==void 0&&(pe=le),ie){if(peie[1])return ie[1]}return pe}function V(X){return G._distinct&&G.index&&X[G.index]?X[G.index]:X[0]}if(W||q||E){var te={},ee={};if(W){te.mc=H("marker.color",V),te.mx=H("marker.symbol",V),te.mo=H("marker.opacity",s.mean,[.2,1]),te.mlc=H("marker.line.color",V),te.mlw=H("marker.line.width",s.mean,[0,5],2),ee.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var U=H("marker.size",s.mean,[2,16],12);te.ms=U,ee.marker.size=U}E&&(ee.line={width:H("line.width",V,[0,10],5)}),q&&(te.tx="Aa",te.tp=H("textposition",V),te.ts=10,te.tc=H("textfont.color",V),te.tf=H("textfont.family",V)),z=[s.minExtend(G,te)],(B=s.minExtend(L,ee)).selectedpoints=null,B.texttemplate=null}var Q=l.select(this).select("g.legendpoints"),Y=Q.selectAll("path.scatterpts").data(W?z:[]);Y.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",D),Y.exit().remove(),Y.call(d.pointStyle,B,k),W&&(z[0].mrc=3);var Z=Q.selectAll("g.pointtext").data(q?z:[]);Z.enter().append("g").classed("pointtext",!0).append("text").attr("transform",D),Z.exit().remove(),Z.selectAll("text").call(d.textPointStyle,B,k)}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(z.visible&&z.type==="candlestick"?[A,A]:[]);B.enter().append("path").classed("legendcandle",!0).attr("d",function($,j){return j?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",D).style("stroke-miterlimit",1),B.exit().remove(),B.each(function($,j){var N=l.select(this),E=z[j?"increasing":"decreasing"],W=O(void 0,E.line,5,2);N.style("stroke-width",W+"px").call(h.fill,E.fillcolor),W&&h.stroke(N,E.line.color)})}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(z.visible&&z.type==="ohlc"?[A,A]:[]);B.enter().append("path").classed("legendohlc",!0).attr("d",function($,j){return j?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",D).style("stroke-miterlimit",1),B.exit().remove(),B.each(function($,j){var N=l.select(this),E=z[j?"increasing":"decreasing"],W=O(void 0,E.line,5,2);N.style("fill","none").call(d.dashLine,E.line.dash,W),W&&h.stroke(N,E.line.color)})})}},42068:function(o,a,n){n(93348),o.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},26023:function(o,a,n){var l=n(73972),f=n(74875),s=n(41675),c=n(24255),d=n(34031).eraseActiveShape,h=n(71828),p=h._,m=o.exports={};function y(M,S){var C,P,D=S.currentTarget,O=D.getAttribute("data-attr"),R=D.getAttribute("data-val")||!0,F=M._fullLayout,A={},z=s.list(M,null,!0),B=F._cartesianSpikesEnabled;if(O==="zoom"){var $,j=R==="in"?.5:2,N=(1+j)/2,E=(1-j)/2;for(P=0;P1?(U=["toggleHover"],Q=["resetViews"]):A?(ee=["zoomInGeo","zoomOutGeo"],U=["hoverClosestGeo"],Q=["resetGeo"]):F?(U=["hoverClosest3d"],Q=["resetCameraDefault3d","resetCameraLastSave3d"]):N?(ee=["zoomInMapbox","zoomOutMapbox"],U=["toggleHover"],Q=["resetViewMapbox"]):$?U=["hoverClosestGl2d"]:z?U=["hoverClosestPie"]:G?(U=["hoverClosestCartesian","hoverCompareCartesian"],Q=["resetViewSankey"]):U=["toggleHover"],R&&(U=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(se){for(var pe=0;pe0)){var k=function(M,S,C){for(var P=C.filter(function(F){return S[F].anchor===M._id}),D=0,O=0;O=Se.max)pe=re[Te+1];else if(se=Se.pmax)pe=re[Te+1];else if(seTe._length||ge+Ie<0)return;Ee=ue+Ie,De=ge+Ie;break;case Me:if(Re="col-resize",ue+Ie>Te._length)return;Ee=ue+Ie,De=ge;break;case ce:if(Re="col-resize",ge+Ie<0)return;Ee=ue,De=ge+Ie;break;default:Re="ew-resize",Ee=xe,De=xe+Ie}if(De=0;$--){var j=S.append("path").attr(P).style("opacity",$?.1:D).call(c.stroke,R).call(c.fill,O).call(d.dashLine,$?"solid":A,$?4+F:F);if(b(j,_,T),z){var N=h(_.layout,"selections",T);j.style({cursor:"move"});var E={element:j.node(),plotinfo:M,gd:_,editHelpers:N,isActiveSelection:!0},W=l(C,_);f(W,j,E)}else j.style("pointer-events",$?"all":"none");B[$]=j}var G=B[0];B[1].node().addEventListener("click",function(){return function(L,q){if(v(L)){var H=+q.node().getAttribute("data-index");if(H>=0){if(H===L._fullLayout._activeSelectionIndex)return void x(L);L._fullLayout._activeSelectionIndex=H,L._fullLayout._deactivateSelection=x,y(L)}}}(_,G)})}(_._fullLayout._selectionLayer)}function b(_,w,k){var T=k.xref+k.yref;d.setClipUrl(_,"clip"+w._fullLayout._uid+T,w)}function x(_){v(_)&&_._fullLayout._activeSelectionIndex>=0&&(s(_),delete _._fullLayout._activeSelectionIndex,y(_))}o.exports={draw:y,drawOne:g,activateLastSelection:function(_){if(v(_)){var w=_._fullLayout.selections.length-1;_._fullLayout._activeSelectionIndex=w,_._fullLayout._deactivateSelection=x,y(_)}}}},53777:function(o,a,n){var l=n(79952).P,f=n(1426).extendFlat;o.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:f({},l,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},90849:function(o){o.exports=function(a,n,l){l("newselection.mode"),l("newselection.line.width")&&(l("newselection.line.color"),l("newselection.line.dash")),l("activeselection.fillcolor"),l("activeselection.opacity")}},35855:function(o,a,n){var l=n(64505).selectMode,f=n(51873).clearOutline,s=n(60165),c=s.readPaths,d=s.writePaths,h=s.fixDatesForPaths;o.exports=function(p,m){if(p.length){var y=p[0][0];if(y){var v=y.getAttribute("d"),g=m.gd,b=g._fullLayout.newselection,x=m.plotinfo,_=x.xaxis,w=x.yaxis,k=m.isActiveSelection,T=m.dragmode,M=(g.layout||{}).selections||[];if(!l(T)&&k!==void 0){var S=g._fullLayout._activeSelectionIndex;if(S-1,kt=[];if(function(Mt){return Mt&&Array.isArray(Mt)&&Mt[0].hoverOnBox!==!0}(Qe)){Z(ke,Ae,Ie);var Je=function(Mt,zt){var wt,ve,_e=Mt[0],Ve=-1,We=[];for(ve=0;ve0?function(Mt,zt){var wt,ve,_e,Ve=[];for(_e=0;_e0&&Ve.push(wt);if(Ve.length===1&&Ve[0]===zt.searchInfo&&(ve=zt.searchInfo.cd[0].trace).selectedpoints.length===zt.pointNumbers.length){for(_e=0;_e1||(ve+=zt.selectedpoints.length)>1))return!1;return ve===1}(Ue)&&(ct=se(Je))){for(Be&&Be.remove(),Ne=0;Ne=0})(Re)&&Re._fullLayout._deactivateShape(Re),function(lt){return lt._fullLayout._activeSelectionIndex>=0}(Re)&&Re._fullLayout._deactivateSelection(Re);var Ie=Re._fullLayout._zoomlayer,Be=g(Ee),Ue=x(Ee);if(Be||Ue){var qe,Ye,at=Ie.selectAll(".select-outline-"+De.id);at&&Re._fullLayout._outlining&&(Be&&(qe=P(at,ke)),qe&&s.call("_guiRelayout",Re,{shapes:qe}),Ue&&!te(ke)&&(Ye=D(at,ke)),Ye&&(Re._fullLayout._noEmitSelectedAtStart=!0,s.call("_guiRelayout",Re,{selections:Ye}).then(function(){Ae&&O(Re)})),Re._fullLayout._outlining=!1)}De.selection={},De.selection.selectionDefs=ke.selectionDefs=[],De.selection.mergedPolygons=ke.mergedPolygons=[]}function re(ke){return ke._id}function ie(ke,Ae,Ee,De){if(!ke.calcdata)return[];var Re,Ie,Be,Ue=[],qe=Ae.map(re),Ye=Ee.map(re);for(Be=0;Be0?De[0]:Ee;return!!Ae.selectedpoints&&Ae.selectedpoints.indexOf(Re)>-1}function pe(ke,Ae,Ee){var De,Re;for(De=0;De-1&&Ae;if(!Ie&&Ae){var Ot=ne(ke,!0);if(Ot.length){var At=Ot[0].xref,Lt=Ot[0].yref;if(At&&Lt){var Rt=ue(Ot);ge([B(ke,At,"x"),B(ke,Lt,"y")])(jt,Rt)}}ke._fullLayout._noEmitSelectedAtStart?ke._fullLayout._noEmitSelectedAtStart=!1:Tt&&be(ke,jt),ct._reselect=!1}if(!Ie&&ct._deselect){var $t=ct._deselect;(function(Yt,Xt,Bt){for(var Wt=0;Wt=0)bt._fullLayout._deactivateShape(bt);else if(!Ye){var Rt=ze.clickmode;z.done(Et).then(function(){if(z.clear(Et),At===2){for(Nt.remove(),_e=0;_e-1&&ee(Lt,bt,De.xaxes,De.yaxes,De.subplot,De,Nt),Rt==="event"&&be(bt,void 0);h.click(bt,Lt,kt.id)}).catch(R.error)}},De.doneFn=function(){yt.remove(),z.done(Et).then(function(){z.clear(Et),!Ne&&ve&&De.selectionDefs&&(ve.subtract=St,De.selectionDefs.push(ve),De.mergedPolygons.length=0,[].push.apply(De.mergedPolygons,wt)),(Ne||Ye)&&X(De,Ne),De.doneFnCompleted&&De.doneFnCompleted(jt),at&&be(bt,We)}).catch(R.error)}},clearOutline:T,clearSelectionsCache:X,selectOnClick:ee}},89827:function(o,a,n){var l=n(50215),f=n(41940),s=n(82196).line,c=n(79952).P,d=n(1426).extendFlat,h=n(44467).templatedArray,p=(n(24695),n(9012)),m=n(5386).R,y=n(37281);o.exports=h("shape",{visible:d({},p.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:d({},p.legend,{editType:"calc+arraydraw"}),legendgroup:d({},p.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:d({},p.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:f({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:d({},p.legendrank,{editType:"calc+arraydraw"}),legendwidth:d({},p.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:d({},l.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:d({},l.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:d({},s.color,{editType:"arraydraw"}),width:d({},s.width,{editType:"calc+arraydraw"}),dash:d({},c,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:m({},{keys:Object.keys(y)}),font:f({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},5627:function(o,a,n){var l=n(71828),f=n(89298),s=n(21459),c=n(30477);function d(y){return p(y.line.width,y.xsizemode,y.x0,y.x1,y.path,!1)}function h(y){return p(y.line.width,y.ysizemode,y.y0,y.y1,y.path,!0)}function p(y,v,g,b,x,_){var w=y/2,k=_;if(v==="pixel"){var T=x?c.extractPathCoords(x,_?s.paramIsY:s.paramIsX):[g,b],M=l.aggNums(Math.max,null,T),S=l.aggNums(Math.min,null,T),C=S<0?Math.abs(S)+w:w,P=M>0?M+w:w;return{ppad:w,ppadplus:k?C:P,ppadminus:k?P:C}}return{ppad:w}}function m(y,v,g,b,x){var _=y.type==="category"||y.type==="multicategory"?y.r2c:y.d2c;if(v!==void 0)return[_(v),_(g)];if(b){var w,k,T,M,S=1/0,C=-1/0,P=b.match(s.segmentRE);for(y.type==="date"&&(_=c.decodeDate(_)),w=0;wC&&(C=M)));return C>=S?[S,C]:void 0}}o.exports=function(y){var v=y._fullLayout,g=l.filterVisible(v.shapes);if(g.length&&y._fullData.length)for(var b=0;b=re?ie-se:se-ie,-180/Math.PI*Math.atan2(pe,Te)}(C,D,P,O):0),A.call(function(re){return re.call(c.font,F).attr({}),s.convertToTspans(re,v),re});var Q=function(re,ie,le,se,pe,Te,Se){var Oe,Me,ce,ye,J=pe.label.textposition,ne=pe.label.textangle,de=pe.label.padding,xe=pe.type,ue=Math.PI/180*Te,ge=Math.sin(ue),be=Math.cos(ue),we=pe.label.xanchor,ke=pe.label.yanchor;if(xe==="line"){J==="start"?(Oe=re,Me=ie):J==="end"?(Oe=le,Me=se):(Oe=(re+le)/2,Me=(ie+se)/2),we==="auto"&&(we=J==="start"?ne==="auto"?le>re?"left":lere?"right":lere?"right":lere?"left":le1&&(Oe.length!==2||Oe[1][0]!=="Z")&&(G===0&&(Oe[0][0]="M"),R[W]=Oe,$(),j())}}()}}function re(pe,Te){(function(Se,Oe){if(R.length)for(var Me=0;MeMe?(J=Se,ue="y0",ne=Me,ge="y1"):(J=Me,ue="y1",ne=Se,ge="y0"),ut(wt),Mt(se,ie),function(ve,_e,Ve){var We=_e.xref,Ze=_e.yref,Ge=c.getFromId(Ve,We),Ke=c.getFromId(Ve,Ze),nt="";We==="paper"||Ge.autorange||(nt+=We),Ze==="paper"||Ke.autorange||(nt+=Ze),v.setClipUrl(ve,nt?"clip"+Ve._fullLayout._uid+nt:null,Ve)}(re,ie,X),Je.moveFn=Ae==="move"?pt:It,Je.altKey=wt.altKey)},doneFn:function(){M(X)||(x(re),zt(se),P(re,X,ie),f.call("_guiRelayout",X,pe.getUpdateObj()))},clickFn:function(){M(X)||zt(se)}};function ut(wt){if(M(X))Ae=null;else if(Be)Ae=wt.target.tagName==="path"?"move":wt.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ve=Je.element.getBoundingClientRect(),_e=ve.right-ve.left,Ve=ve.bottom-ve.top,We=wt.clientX-ve.left,Ze=wt.clientY-ve.top,Ge=!Ue&&_e>Ee&&Ve>De&&!wt.shiftKey?b.getCursor(We/_e,1-Ze/Ve):"move";x(re,Ge),Ae=Ge.split("-")[0]}}function pt(wt,ve){if(ie.type==="path"){var _e=function(Ze){return Ze},Ve=_e,We=_e;Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(Ve=function(Ze){return Qe(ze(Ze)+wt)},at&&at.type==="date"&&(Ve=w.encodeDate(Ve))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(We=function(Ze){return it(Ne(Ze)+ve)},ct&&ct.type==="date"&&(We=w.encodeDate(We))),qe("path",ie.path=D(ke,Ve,We))}else Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(qe("x0",ie.x0=Qe(Te+wt)),qe("x1",ie.x1=Qe(Oe+wt))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(qe("y0",ie.y0=it(Se+ve)),qe("y1",ie.y1=it(Me+ve)));re.attr("d",k(X,ie)),Mt(se,ie),p(X,le,ie,Ye)}function It(wt,ve){if(Ue){var _e=function(ht){return ht},Ve=_e,We=_e;Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(Ve=function(ht){return Qe(ze(ht)+wt)},at&&at.type==="date"&&(Ve=w.encodeDate(Ve))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(We=function(ht){return it(Ne(ht)+ve)},ct&&ct.type==="date"&&(We=w.encodeDate(We))),qe("path",ie.path=D(ke,Ve,We))}else if(Be){if(Ae==="resize-over-start-point"){var Ze=Te+wt,Ge=Ie?Se-ve:Se+ve;qe("x0",ie.x0=Re?Ze:Qe(Ze)),qe("y0",ie.y0=Ie?Ge:it(Ge))}else if(Ae==="resize-over-end-point"){var Ke=Oe+wt,nt=Ie?Me-ve:Me+ve;qe("x1",ie.x1=Re?Ke:Qe(Ke)),qe("y1",ie.y1=Ie?nt:it(nt))}}else{var st=function(ht){return Ae.indexOf(ht)!==-1},mt=st("n"),tt=st("s"),Ft=st("w"),Vt=st("e"),St=mt?J+ve:J,Nt=tt?ne+ve:ne,Dt=Ft?de+wt:de,gt=Vt?xe+wt:xe;Ie&&(mt&&(St=J-ve),tt&&(Nt=ne-ve)),(!Ie&&Nt-St>De||Ie&&St-Nt>De)&&(qe(ue,ie[ue]=Ie?St:it(St)),qe(ge,ie[ge]=Ie?Nt:it(Nt))),gt-Dt>Ee&&(qe(be,ie[be]=Re?Dt:Qe(Dt)),qe(we,ie[we]=Re?gt:Qe(gt)))}re.attr("d",k(X,ie)),Mt(se,ie),p(X,le,ie,Ye)}function Mt(wt,ve){(Re||Ie)&&function(){var _e=ve.type!=="path",Ve=wt.selectAll(".visual-cue").data([0]);Ve.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var We=ze(Re?ve.xanchor:s.midRange(_e?[ve.x0,ve.x1]:w.extractPathCoords(ve.path,_.paramIsX))),Ze=Ne(Ie?ve.yanchor:s.midRange(_e?[ve.y0,ve.y1]:w.extractPathCoords(ve.path,_.paramIsY)));if(We=w.roundPositionForSharpStrokeRendering(We,1),Ze=w.roundPositionForSharpStrokeRendering(Ze,1),Re&&Ie){var Ge="M"+(We-1-1)+","+(Ze-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ve.attr("d",Ge)}else if(Re){var Ke="M"+(We-1-1)+","+(Ze-9-1)+"v18 h2 v-18 Z";Ve.attr("d",Ke)}else{var nt="M"+(We-9-1)+","+(Ze-1-1)+"h18 v2 h-18 Z";Ve.attr("d",nt)}}()}function zt(wt){wt.selectAll(".visual-cue").remove()}b.init(Je),kt.node().onmousemove=ut}(R,Q,z,F,j,ee):z.editable===!0&&Q.style("pointer-events",V||y.opacity(G)*W<=.5?"stroke":"all");Q.node().addEventListener("click",function(){return function(X,re){if(S(X)){var ie=+re.node().getAttribute("data-index");if(ie>=0){if(ie===X._fullLayout._activeShapeIndex)return void O(X);X._fullLayout._activeShapeIndex=ie,X._fullLayout._deactivateShape=O,T(X)}}}(R,Q)})}z._input&&z.visible===!0&&(z.layer!=="below"?$(R._fullLayout._shapeUpperLayer):z.xref==="paper"||z.yref==="paper"?$(R._fullLayout._shapeLowerLayer):B._hadPlotinfo?$((B.mainplotinfo||B).shapelayer):$(R._fullLayout._shapeLowerLayer))}function P(R,F,A){var z=(A.xref+A.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");v.setClipUrl(R,z?"clip"+F._fullLayout._uid+z:null,F)}function D(R,F,A){return R.replace(_.segmentRE,function(z){var B=0,$=z.charAt(0),j=_.paramIsX[$],N=_.paramIsY[$],E=_.numParams[$];return $+z.substr(1).replace(_.paramRE,function(W){return B>=E||(j[B]?W=F(W):N[B]&&(W=A(W)),B++),W})})}function O(R){S(R)&&R._fullLayout._activeShapeIndex>=0&&(m(R),delete R._fullLayout._activeShapeIndex,T(R))}o.exports={draw:T,drawOne:C,eraseActiveShape:function(R){if(S(R)){m(R);var F=R._fullLayout._activeShapeIndex,A=(R.layout||{}).shapes||[];if(F0&&CU&&(Y="X"),Y});return H>U&&(Q=Q.replace(/[\s,]*X.*/,""),f.log("Ignoring extra params in segment "+q)),V+Q})}(d,p,y);if(d.xsizemode==="pixel"){var C=p(d.xanchor);v=C+d.x0,g=C+d.x1}else v=p(d.x0),g=p(d.x1);if(d.ysizemode==="pixel"){var P=y(d.yanchor);b=P-d.y0,x=P-d.y1}else b=y(d.y0),x=y(d.y1);if(_==="line")return"M"+v+","+b+"L"+g+","+x;if(_==="rect")return"M"+v+","+b+"H"+g+"V"+x+"H"+v+"Z";var D=(v+g)/2,O=(b+x)/2,R=Math.abs(D-v),F=Math.abs(O-b),A="A"+R+","+F,z=D+R+","+O;return"M"+z+A+" 0 1,1 "+D+","+(O-F)+A+" 0 0,1 "+z+"Z"}},89853:function(o,a,n){var l=n(34031);o.exports={moduleType:"component",name:"shapes",layoutAttributes:n(89827),supplyLayoutDefaults:n(84726),supplyDrawNewShapeDefaults:n(45547),includeBasePlot:n(76325)("shapes"),calcAutorange:n(5627),draw:l.draw,drawOne:l.drawOne}},37281:function(o){function a(s,c){return c?c.d2l(s):s}function n(s,c){return c?c.l2d(s):s}function l(s,c){return a(s.x1,c)-a(s.x0,c)}function f(s,c,d){return a(s.y1,d)-a(s.y0,d)}o.exports={x0:function(s){return s.x0},x1:function(s){return s.x1},y0:function(s){return s.y0},y1:function(s){return s.y1},slope:function(s,c,d){return s.type!=="line"?void 0:f(s,0,d)/l(s,c)},dx:l,dy:f,width:function(s,c){return Math.abs(l(s,c))},height:function(s,c,d){return Math.abs(f(s,0,d))},length:function(s,c,d){return s.type!=="line"?void 0:Math.sqrt(Math.pow(l(s,c),2)+Math.pow(f(s,0,d),2))},xcenter:function(s,c){return n((a(s.x1,c)+a(s.x0,c))/2,c)},ycenter:function(s,c,d){return n((a(s.y1,d)+a(s.y0,d))/2,d)}}},75067:function(o,a,n){var l=n(41940),f=n(35025),s=n(1426).extendDeepAll,c=n(30962).overrideAll,d=n(85594),h=n(44467).templatedArray,p=n(98292),m=h("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});o.exports=c(h("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:m,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:s(f({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:d.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:l({})},font:l({}),activebgcolor:{valType:"color",dflt:p.gripBgActiveColor},bgcolor:{valType:"color",dflt:p.railBgColor},bordercolor:{valType:"color",dflt:p.railBorderColor},borderwidth:{valType:"number",min:0,dflt:p.railBorderWidth},ticklen:{valType:"number",min:0,dflt:p.tickLength},tickcolor:{valType:"color",dflt:p.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:p.minorTickLength}}),"arraydraw","from-root")},98292:function(o){o.exports={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}},12343:function(o,a,n){var l=n(71828),f=n(85501),s=n(75067),c=n(98292).name,d=s.steps;function h(m,y,v){function g(k,T){return l.coerce(m,y,s,k,T)}for(var b=f(m,y,{name:"steps",handleItemDefaults:p}),x=0,_=0;_0&&(H=H.transition().duration(N.transition.duration).ease(N.transition.easing)),H.attr("transform",h(q-.5*y.gripWidth,N._dims.currentValueTotalHeight))}}function A(j,N){var E=j._dims;return E.inputAreaStart+y.stepInset+(E.inputAreaLength-2*y.stepInset)*Math.min(1,Math.max(0,N))}function z(j,N){var E=j._dims;return Math.min(1,Math.max(0,(N-y.stepInset-E.inputAreaStart)/(E.inputAreaLength-2*y.stepInset-2*E.inputAreaStart)))}function B(j,N,E){var W=E._dims,G=d.ensureSingle(j,"rect",y.railTouchRectClass,function(L){L.call(O,N,j,E).style("pointer-events","all")});G.attr({width:W.inputAreaLength,height:Math.max(W.inputAreaWidth,y.tickOffset+E.ticklen+W.labelHeight)}).call(s.fill,E.bgcolor).attr("opacity",0),c.setTranslate(G,0,W.currentValueTotalHeight)}function $(j,N){var E=N._dims,W=E.inputAreaLength-2*y.railInset,G=d.ensureSingle(j,"rect",y.railRectClass);G.attr({width:W,height:y.railWidth,rx:y.railRadius,ry:y.railRadius,"shape-rendering":"crispEdges"}).call(s.stroke,N.bordercolor).call(s.fill,N.bgcolor).style("stroke-width",N.borderwidth+"px"),c.setTranslate(G,y.railInset,.5*(E.inputAreaWidth-y.railWidth)+E.currentValueTotalHeight)}o.exports=function(j){var N=j._context.staticPlot,E=j._fullLayout,W=function(te,ee){for(var U=te[y.name],Q=[],Y=0;Y0?[0]:[]);function L(te){te._commandObserver&&(te._commandObserver.remove(),delete te._commandObserver),f.autoMargin(j,_(te))}if(G.enter().append("g").classed(y.containerClassName,!0).style("cursor",N?null:"ew-resize"),G.exit().each(function(){l.select(this).selectAll("g."+y.groupClassName).each(L)}).remove(),W.length!==0){var q=G.selectAll("g."+y.groupClassName).data(W,w);q.enter().append("g").classed(y.groupClassName,!0),q.exit().each(L).remove();for(var H=0;H0||Oe<0){var J={left:[-Me,0],right:[Me,0],top:[0,-Me],bottom:[0,Me]}[P.side];Q.attr("transform",h(J[0],J[1]))}}}return H.call(V),G&&($?H.on(".opacity",null):(A=0,z=!0,H.text(S).on("mouseover.opacity",function(){l.select(this).transition().duration(v.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){l.select(this).transition().duration(v.HIDE_PLACEHOLDER).style("opacity",0)})),H.call(y.makeEditable,{gd:x}).on("edit",function(U){C!==void 0?c.call("_guiRestyle",x,M,U,C):c.call("_guiRelayout",x,M,U)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(V)}).on("input",function(U){this.text(U||" ").call(y.positionText,D.x,D.y)})),H.classed("js-placeholder",z),R}}},7163:function(o,a,n){var l=n(41940),f=n(22399),s=n(1426).extendFlat,c=n(30962).overrideAll,d=n(35025),h=n(44467).templatedArray,p=h("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});o.exports=c(h("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:p,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:s(d({editType:"arraydraw"}),{}),font:l({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:f.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(o){o.exports={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:"◄",right:"►",up:"▲",down:"▼"}}},64897:function(o,a,n){var l=n(71828),f=n(85501),s=n(7163),c=n(75909).name,d=s.buttons;function h(m,y,v){function g(b,x){return l.coerce(m,y,s,b,x)}g("visible",f(m,y,{name:"buttons",handleItemDefaults:p}).length>0)&&(g("active"),g("direction"),g("type"),g("showactive"),g("x"),g("y"),l.noneOrAll(m,y,["x","y"]),g("xanchor"),g("yanchor"),g("pad.t"),g("pad.r"),g("pad.b"),g("pad.l"),l.coerceFont(g,"font",v.font),g("bgcolor",v.paper_bgcolor),g("bordercolor"),g("borderwidth"))}function p(m,y){function v(g,b){return l.coerce(m,y,d,g,b)}v("visible",m.method==="skip"||Array.isArray(m.args))&&(v("method"),v("args"),v("args2"),v("label"),v("execute"))}o.exports=function(m,y){f(m,y,{name:c,handleItemDefaults:h})}},13689:function(o,a,n){var l=n(39898),f=n(74875),s=n(7901),c=n(91424),d=n(71828),h=n(63893),p=n(44467).arrayEditor,m=n(18783).LINE_SPACING,y=n(75909),v=n(25849);function g(A){return A._index}function b(A,z){return+A.attr(y.menuIndexAttrName)===z._index}function x(A,z,B,$,j,N,E,W){z.active=E,p(A.layout,y.name,z).applyUpdate("active",E),z.type==="buttons"?w(A,$,null,null,z):z.type==="dropdown"&&(j.attr(y.menuIndexAttrName,"-1"),_(A,$,j,N,z),W||w(A,$,j,N,z))}function _(A,z,B,$,j){var N=d.ensureSingle(z,"g",y.headerClassName,function(H){H.style("pointer-events","all")}),E=j._dims,W=j.active,G=j.buttons[W]||y.blankHeaderOpts,L={y:j.pad.t,yPad:0,x:j.pad.l,xPad:0,index:0},q={width:E.headerWidth,height:E.headerHeight};N.call(k,j,G,A).call(R,j,L,q),d.ensureSingle(z,"text",y.headerArrowClassName,function(H){H.attr("text-anchor","end").call(c.font,j.font).text(y.arrowSymbol[j.direction])}).attr({x:E.headerWidth-y.arrowOffsetX+j.pad.l,y:E.headerHeight/2+y.textOffsetY+j.pad.t}),N.on("click",function(){B.call(F,String(b(B,j)?-1:j._index)),w(A,z,B,$,j)}),N.on("mouseover",function(){N.call(C)}),N.on("mouseout",function(){N.call(P,j)}),c.setTranslate(z,E.lx,E.ly)}function w(A,z,B,$,j){B||(B=z).attr("pointer-events","all");var N=function(Q){return+Q.attr(y.menuIndexAttrName)==-1}(B)&&j.type!=="buttons"?[]:j.buttons,E=j.type==="dropdown"?y.dropdownButtonClassName:y.buttonClassName,W=B.selectAll("g."+E).data(d.filterVisible(N)),G=W.enter().append("g").classed(E,!0),L=W.exit();j.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),L.transition().attr("opacity","0").remove()):L.remove();var q=0,H=0,V=j._dims,te=["up","down"].indexOf(j.direction)!==-1;j.type==="dropdown"&&(te?H=V.headerHeight+y.gapButtonHeader:q=V.headerWidth+y.gapButtonHeader),j.type==="dropdown"&&j.direction==="up"&&(H=-y.gapButtonHeader+y.gapButton-V.openHeight),j.type==="dropdown"&&j.direction==="left"&&(q=-y.gapButtonHeader+y.gapButton-V.openWidth);var ee={x:V.lx+q+j.pad.l,y:V.ly+H+j.pad.t,yPad:y.gapButton,xPad:y.gapButton,index:0},U={l:ee.x+j.borderwidth,t:ee.y+j.borderwidth};W.each(function(Q,Y){var Z=l.select(this);Z.call(k,j,Q,A).call(R,j,ee),Z.on("click",function(){l.event.defaultPrevented||(Q.execute&&(Q.args2&&j.active===Y?(x(A,j,0,z,B,$,-1),f.executeAPICommand(A,Q.method,Q.args2)):(x(A,j,0,z,B,$,Y),f.executeAPICommand(A,Q.method,Q.args))),A.emit("plotly_buttonclicked",{menu:j,button:Q,active:j.active}))}),Z.on("mouseover",function(){Z.call(C)}),Z.on("mouseout",function(){Z.call(P,j),W.call(S,j)})}),W.call(S,j),te?(U.w=Math.max(V.openWidth,V.headerWidth),U.h=ee.y-U.t):(U.w=ee.x-U.l,U.h=Math.max(V.openHeight,V.headerHeight)),U.direction=j.direction,$&&(W.size()?function(Q,Y,Z,X,re,ie){var le,se,pe,Te=re.direction,Se=Te==="up"||Te==="down",Oe=re._dims,Me=re.active;if(Se)for(se=0,pe=0;pe0?[0]:[]);if(j.enter().append("g").classed(y.containerClassName,!0).style("cursor","pointer"),j.exit().each(function(){l.select(this).selectAll("g."+y.headerGroupClassName).each($)}).remove(),B.length!==0){var N=j.selectAll("g."+y.headerGroupClassName).data(B,g);N.enter().append("g").classed(y.headerGroupClassName,!0);for(var E=d.ensureSingle(j,"g",y.dropdownButtonGroupClassName,function(H){H.style("pointer-events","all")}),W=0;WR,z=d.barLength+2*d.barPad,B=d.barWidth+2*d.barPad,$=k,j=M+S;j+B>g&&(j=g-B);var N=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-horizontal",!0).call(f.fill,d.barColor),A?(this.hbar=N.attr({rx:d.barRadius,ry:d.barRadius,x:$,y:j,width:z,height:B}),this._hbarXMin=$+z/2,this._hbarTranslateMax=R-z):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var E=S>F,W=d.barWidth+2*d.barPad,G=d.barLength+2*d.barPad,L=k+T,q=M;L+W>v&&(L=v-W);var H=this.container.selectAll("rect.scrollbar-vertical").data(E?[0]:[]);H.exit().on(".drag",null).remove(),H.enter().append("rect").classed("scrollbar-vertical",!0).call(f.fill,d.barColor),E?(this.vbar=H.attr({rx:d.barRadius,ry:d.barRadius,x:L,y:q,width:W,height:G}),this._vbarYMin=q+G/2,this._vbarTranslateMax=F-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var V=this.id,te=b-.5,ee=E?x+W+.5:x+.5,U=_-.5,Q=A?w+B+.5:w+.5,Y=y._topdefs.selectAll("#"+V).data(A||E?[0]:[]);if(Y.exit().remove(),Y.enter().append("clipPath").attr("id",V).append("rect"),A||E?(this._clipRect=Y.select("rect").attr({x:Math.floor(te),y:Math.floor(U),width:Math.ceil(ee)-Math.floor(te),height:Math.ceil(Q)-Math.floor(U)}),this.container.call(s.setClipUrl,V,this.gd),this.bg.attr({x:k,y:M,width:T,height:S})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),A||E){var Z=l.behavior.drag().on("dragstart",function(){l.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Z);var X=l.behavior.drag().on("dragstart",function(){l.event.sourceEvent.preventDefault(),l.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(X),E&&this.vbar.on(".drag",null).call(X)}this.setTranslate(p,m)},d.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.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)},d.prototype._onBoxDrag=function(){var h=this.translateX,p=this.translateY;this.hbar&&(h-=l.event.dx),this.vbar&&(p-=l.event.dy),this.setTranslate(h,p)},d.prototype._onBoxWheel=function(){var h=this.translateX,p=this.translateY;this.hbar&&(h+=l.event.deltaY),this.vbar&&(p+=l.event.deltaY),this.setTranslate(h,p)},d.prototype._onBarDrag=function(){var h=this.translateX,p=this.translateY;if(this.hbar){var m=h+this._hbarXMin,y=m+this._hbarTranslateMax;h=(c.constrain(l.event.x,m,y)-m)/(y-m)*(this.position.w-this._box.w)}if(this.vbar){var v=p+this._vbarYMin,g=v+this._vbarTranslateMax;p=(c.constrain(l.event.y,v,g)-v)/(g-v)*(this.position.h-this._box.h)}this.setTranslate(h,p)},d.prototype.setTranslate=function(h,p){var m=this.position.w-this._box.w,y=this.position.h-this._box.h;if(h=c.constrain(h||0,0,m),p=c.constrain(p||0,0,y),this.translateX=h,this.translateY=p,this.container.call(s.setTranslate,this._box.l-this.position.l-h,this._box.t-this.position.t-p),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+h-.5),y:Math.floor(this.position.t+p-.5)}),this.hbar){var v=h/m;this.hbar.call(s.setTranslate,h+v*this._hbarTranslateMax,p)}if(this.vbar){var g=p/y;this.vbar.call(s.setTranslate,h,p+g*this._vbarTranslateMax)}}},18783:function(o){o.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},24695:function(o){o.exports={axisRefDescription:function(a,n,l){return["If set to a",a,"axis id (e.g. *"+a+"* or","*"+a+"2*), the `"+a+"` position refers to a",a,"coordinate. If set to *paper*, the `"+a+"`","position refers to the distance from the",n,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",n,"("+l+"). If set to a",a,"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",n,"of the domain of that axis: e.g.,","*"+a+"2 domain* refers to the domain of the second",a," axis and a",a,"position of 0.5 refers to the","point between the",n,"and the",l,"of the domain of the","second",a,"axis."].join(" ")}}},31562:function(o){o.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},74808:function(o){o.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},37822:function(o){o.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(o){o.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},32396:function(o,a){a.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],a.STYLE=a.CSS_DECLARATIONS.map(function(n){return n.join(": ")+"; "}).join("")},77922:function(o,a){a.xmlns="http://www.w3.org/2000/xmlns/",a.svg="http://www.w3.org/2000/svg",a.xlink="http://www.w3.org/1999/xlink",a.svgAttrs={xmlns:a.svg,"xmlns:xlink":a.xlink}},8729:function(o,a,n){a.version=n(11506).version,n(7417),n(98847);for(var l=n(73972),f=a.register=l.register,s=n(10641),c=Object.keys(s),d=0;d",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(o,a){a.isLeftAnchor=function(n){return n.xanchor==="left"||n.xanchor==="auto"&&n.x<=.3333333333333333},a.isCenterAnchor=function(n){return n.xanchor==="center"||n.xanchor==="auto"&&n.x>.3333333333333333&&n.x<.6666666666666666},a.isRightAnchor=function(n){return n.xanchor==="right"||n.xanchor==="auto"&&n.x>=.6666666666666666},a.isTopAnchor=function(n){return n.yanchor==="top"||n.yanchor==="auto"&&n.y>=.6666666666666666},a.isMiddleAnchor=function(n){return n.yanchor==="middle"||n.yanchor==="auto"&&n.y>.3333333333333333&&n.y<.6666666666666666},a.isBottomAnchor=function(n){return n.yanchor==="bottom"||n.yanchor==="auto"&&n.y<=.3333333333333333}},26348:function(o,a,n){var l=n(64872),f=l.mod,s=l.modHalf,c=Math.PI,d=2*c;function h(v){return Math.abs(v[1]-v[0])>d-1e-14}function p(v,g){return s(g-v,d)}function m(v,g){if(h(g))return!0;var b,x;g[0](x=f(x,d))&&(x+=d);var _=f(v,d),w=_+d;return _>=b&&_<=x||w>=b&&w<=x}function y(v,g,b,x,_,w,k){_=_||0,w=w||0;var T,M,S,C,P,D=h([b,x]);function O(z,B){return[z*Math.cos(B)+_,w-z*Math.sin(B)]}D?(T=0,M=c,S=d):b=_&&v<=w);var _,w},pathArc:function(v,g,b,x,_){return y(null,v,g,b,x,_,0)},pathSector:function(v,g,b,x,_){return y(null,v,g,b,x,_,1)},pathAnnulus:function(v,g,b,x,_,w){return y(v,g,b,x,_,w,1)}}},73627:function(o,a){var n=Array.isArray,l=ArrayBuffer,f=DataView;function s(h){return l.isView(h)&&!(h instanceof f)}function c(h){return n(h)||s(h)}function d(h,p,m){if(c(h)){if(c(h[0])){for(var y=m,v=0;vw.max?x.set(_):x.set(+b)}},integer:{coerceFunction:function(b,x,_,w){b%1||!l(b)||w.min!==void 0&&bw.max?x.set(_):x.set(+b)}},string:{coerceFunction:function(b,x,_,w){if(typeof b!="string"){var k=typeof b=="number";w.strict!==!0&&k?x.set(String(b)):x.set(_)}else w.noBlank&&!b?x.set(_):x.set(b)}},color:{coerceFunction:function(b,x,_){f(b).isValid()?x.set(b):x.set(_)}},colorlist:{coerceFunction:function(b,x,_){Array.isArray(b)&&b.length&&b.every(function(w){return f(w).isValid()})?x.set(b):x.set(_)}},colorscale:{coerceFunction:function(b,x,_){x.set(c.get(b,_))}},angle:{coerceFunction:function(b,x,_){b==="auto"?x.set("auto"):l(b)?x.set(y(+b,360)):x.set(_)}},subplotid:{coerceFunction:function(b,x,_,w){var k=w.regex||m(_);typeof b=="string"&&k.test(b)?x.set(b):x.set(_)},validateFunction:function(b,x){var _=x.dflt;return b===_||typeof b=="string"&&!!m(_).test(b)}},flaglist:{coerceFunction:function(b,x,_,w){if((w.extras||[]).indexOf(b)===-1)if(typeof b=="string"){for(var k=b.split("+"),T=0;T=l&&N<=f?N:m}if(typeof N!="string"&&typeof N!="number")return m;N=String(N);var q=S(E),H=N.charAt(0);!q||H!=="G"&&H!=="g"||(N=N.substr(1),E="");var V=q&&E.substr(0,7)==="chinese",te=N.match(V?T:k);if(!te)return m;var ee=te[1],U=te[3]||"1",Q=Number(te[5]||1),Y=Number(te[7]||0),Z=Number(te[9]||0),X=Number(te[11]||0);if(q){if(ee.length===2)return m;var re;ee=Number(ee);try{var ie=_.getComponentMethod("calendars","getCal")(E);if(V){var le=U.charAt(U.length-1)==="i";U=parseInt(U,10),re=ie.newDate(ee,ie.toMonthIndex(ee,U,le),Q)}else re=ie.newDate(ee,Number(U),Q)}catch{return m}return re?(re.toJD()-x)*y+Y*v+Z*g+X*b:m}ee=ee.length===2?(Number(ee)+2e3-M)%100+M:Number(ee),U-=1;var se=new Date(Date.UTC(2e3,U,Q,Y,Z));return se.setUTCFullYear(ee),se.getUTCMonth()!==U||se.getUTCDate()!==Q?m:se.getTime()+X*b},l=a.MIN_MS=a.dateTime2ms("-9999"),f=a.MAX_MS=a.dateTime2ms("9999-12-31 23:59:59.9999"),a.isDateTime=function(N,E){return a.dateTime2ms(N,E)!==m};var P=90*y,D=3*v,O=5*g;function R(N,E,W,G,L){if((E||W||G||L)&&(N+=" "+C(E,2)+":"+C(W,2),(G||L)&&(N+=":"+C(G,2),L))){for(var q=4;L%10==0;)q-=1,L/=10;N+="."+C(L,q)}return N}a.ms2DateTime=function(N,E,W){if(typeof N!="number"||!(N>=l&&N<=f))return m;E||(E=0);var G,L,q,H,V,te,ee=Math.floor(10*h(N+.05,1)),U=Math.round(N-ee/10);if(S(W)){var Q=Math.floor(U/y)+x,Y=Math.floor(h(N,y));try{G=_.getComponentMethod("calendars","getCal")(W).fromJD(Q).formatDate("yyyy-mm-dd")}catch{G=w("G%Y-%m-%d")(new Date(U))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;L=E=l+y&&N<=f-y))return m;var E=Math.floor(10*h(N+.05,1)),W=new Date(Math.round(N-E/10));return R(s("%Y-%m-%d")(W),W.getHours(),W.getMinutes(),W.getSeconds(),10*W.getUTCMilliseconds()+E)},a.cleanDate=function(N,E,W){if(N===m)return E;if(a.isJSDate(N)||typeof N=="number"&&isFinite(N)){if(S(W))return d.error("JS Dates and milliseconds are incompatible with world calendars",N),E;if(!(N=a.ms2DateTimeLocal(+N))&&E!==void 0)return E}else if(!a.isDateTime(N,W))return d.error("unrecognized date",N),E;return N};var F=/%\d?f/g,A=/%h/g,z={1:"1",2:"1",3:"2",4:"2"};function B(N,E,W,G){N=N.replace(F,function(q){var H=Math.min(+q.charAt(1)||6,6);return(E/1e3%1+2).toFixed(H).substr(2).replace(/0+$/,"")||"0"});var L=new Date(Math.floor(E+.05));if(N=N.replace(A,function(){return z[W("%q")(L)]}),S(G))try{N=_.getComponentMethod("calendars","worldCalFmt")(N,E,G)}catch{return"Invalid"}return W(N)(L)}var $=[59,59.9,59.99,59.999,59.9999];a.formatDate=function(N,E,W,G,L,q){if(L=S(L)&&L,!E)if(W==="y")E=q.year;else if(W==="m")E=q.month;else{if(W!=="d")return function(H,V){var te=h(H+.05,y),ee=C(Math.floor(te/v),2)+":"+C(h(Math.floor(te/g),60),2);if(V!=="M"){c(V)||(V=0);var U=(100+Math.min(h(H/b,60),$[V])).toFixed(V).substr(1);V>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),ee+=":"+U}return ee}(N,W)+`
`+B(q.dayMonthYear,N,G,L);E=q.dayMonth+`
`+q.year}return B(E,N,G,L)};var j=3*y;a.incrementMonth=function(N,E,W){W=S(W)&&W;var G=h(N,y);if(N=Math.round(N-G),W)try{var L=Math.round(N/y)+x,q=_.getComponentMethod("calendars","getCal")(W),H=q.fromJD(L);return E%12?q.add(H,E,"m"):q.add(H,E/12,"y"),(H.toJD()-x)*y+G}catch{d.error("invalid ms "+N+" in calendar "+W)}var V=new Date(N+j);return V.setUTCMonth(V.getUTCMonth()+E)+G-j},a.findExactDates=function(N,E){for(var W,G,L=0,q=0,H=0,V=0,te=S(E)&&_.getComponentMethod("calendars","getCal")(E),ee=0;ee1||D<0||D>1?null:{x:p+w*D,y:m+M*D}}function h(p,m,y,v,g){var b=v*p+g*m;if(b<0)return v*v+g*g;if(b>y){var x=v-p,_=g-m;return x*x+_*_}var w=v*m-g*p;return w*w/y}a.segmentsIntersect=d,a.segmentDistance=function(p,m,y,v,g,b,x,_){if(d(p,m,y,v,g,b,x,_))return 0;var w=y-p,k=v-m,T=x-g,M=_-b,S=w*w+k*k,C=T*T+M*M,P=Math.min(h(w,k,S,g-p,b-m),h(w,k,S,x-p,_-m),h(T,M,C,p-g,m-b),h(T,M,C,y-g,v-b));return Math.sqrt(P)},a.getTextLocation=function(p,m,y,v){if(p===f&&v===s||(l={},f=p,s=v),l[y])return l[y];var g=p.getPointAtLength(c(y-v/2,m)),b=p.getPointAtLength(c(y+v/2,m)),x=Math.atan((b.y-g.y)/(b.x-g.x)),_=p.getPointAtLength(c(y,m)),w={x:(4*_.x+g.x+b.x)/6,y:(4*_.y+g.y+b.y)/6,theta:x};return l[y]=w,w},a.clearLocationCache=function(){f=null},a.getVisibleSegment=function(p,m,y){var v,g,b=m.left,x=m.right,_=m.top,w=m.bottom,k=0,T=p.getTotalLength(),M=T;function S(P){var D=p.getPointAtLength(P);P===0?v=D:P===T&&(g=D);var O=D.xx?D.x-x:0,R=D.y<_?_-D.y:D.y>w?D.y-w:0;return Math.sqrt(O*O+R*R)}for(var C=S(k);C;){if((k+=C+y)>M)return;C=S(k)}for(C=S(M);C;){if(k>(M-=C+y))return;C=S(M)}return{min:k,max:M,len:M-k,total:T,isClosed:k===0&&M===T&&Math.abs(v.x-g.x)<.1&&Math.abs(v.y-g.y)<.1}},a.findPointOnPath=function(p,m,y,v){for(var g,b,x,_=(v=v||{}).pathLength||p.getTotalLength(),w=v.tolerance||.001,k=v.iterationLimit||30,T=p.getPointAtLength(0)[y]>p.getPointAtLength(_)[y]?-1:1,M=0,S=0,C=_;M0?C=g:S=g,M++}return b}},23389:function(o){o.exports=function(a){return a}},39240:function(o){o.exports=function(a,n){if(!n)return a;var l=1/Math.abs(n),f=l>1?(l*a+l*n)/l:a+n,s=String(f).length;if(s>16){var c=String(n).length;if(s>=String(a).length+c){var d=parseFloat(f).toPrecision(12);d.indexOf("e+")===-1&&(f=+d)}}return f}},71828:function(o,a,n){var l=n(39898),f=n(84096).g0,s=n(60721).WU,c=n(92770),d=n(50606),h=d.FP_SAFE,p=-h,m=d.BADNUM,y=o.exports={};y.adjustFormat=function(Y){return!Y||/^\d[.]\df/.test(Y)||/[.]\d%/.test(Y)?Y:Y==="0.f"?"~f":/^\d%/.test(Y)?"~%":/^\ds/.test(Y)?"~s":!/^[~,.0$]/.test(Y)&&/[&fps]/.test(Y)?"~"+Y:Y};var v={};y.warnBadFormat=function(Y){var Z=String(Y);v[Z]||(v[Z]=1,y.warn('encountered bad format: "'+Z+'"'))},y.noFormat=function(Y){return String(Y)},y.numberFormat=function(Y){var Z;try{Z=s(y.adjustFormat(Y))}catch{return y.warnBadFormat(Y),y.noFormat}return Z},y.nestedProperty=n(65487),y.keyedContainer=n(66636),y.relativeAttr=n(6962),y.isPlainObject=n(41965),y.toLogRange=n(58163),y.relinkPrivateKeys=n(51332);var g=n(73627);y.isTypedArray=g.isTypedArray,y.isArrayOrTypedArray=g.isArrayOrTypedArray,y.isArray1D=g.isArray1D,y.ensureArray=g.ensureArray,y.concat=g.concat,y.maxRowLength=g.maxRowLength,y.minRowLength=g.minRowLength;var b=n(64872);y.mod=b.mod,y.modHalf=b.modHalf;var x=n(96554);y.valObjectMeta=x.valObjectMeta,y.coerce=x.coerce,y.coerce2=x.coerce2,y.coerceFont=x.coerceFont,y.coercePattern=x.coercePattern,y.coerceHoverinfo=x.coerceHoverinfo,y.coerceSelectionMarkerOpacity=x.coerceSelectionMarkerOpacity,y.validate=x.validate;var _=n(41631);y.dateTime2ms=_.dateTime2ms,y.isDateTime=_.isDateTime,y.ms2DateTime=_.ms2DateTime,y.ms2DateTimeLocal=_.ms2DateTimeLocal,y.cleanDate=_.cleanDate,y.isJSDate=_.isJSDate,y.formatDate=_.formatDate,y.incrementMonth=_.incrementMonth,y.dateTick0=_.dateTick0,y.dfltRange=_.dfltRange,y.findExactDates=_.findExactDates,y.MIN_MS=_.MIN_MS,y.MAX_MS=_.MAX_MS;var w=n(65888);y.findBin=w.findBin,y.sorterAsc=w.sorterAsc,y.sorterDes=w.sorterDes,y.distinctVals=w.distinctVals,y.roundUp=w.roundUp,y.sort=w.sort,y.findIndexOfMin=w.findIndexOfMin,y.sortObjectKeys=n(78607);var k=n(80038);y.aggNums=k.aggNums,y.len=k.len,y.mean=k.mean,y.median=k.median,y.midRange=k.midRange,y.variance=k.variance,y.stdev=k.stdev,y.interp=k.interp;var T=n(35657);y.init2dArray=T.init2dArray,y.transposeRagged=T.transposeRagged,y.dot=T.dot,y.translationMatrix=T.translationMatrix,y.rotationMatrix=T.rotationMatrix,y.rotationXYMatrix=T.rotationXYMatrix,y.apply3DTransform=T.apply3DTransform,y.apply2DTransform=T.apply2DTransform,y.apply2DTransform2=T.apply2DTransform2,y.convertCssMatrix=T.convertCssMatrix,y.inverseTransformMatrix=T.inverseTransformMatrix;var M=n(26348);y.deg2rad=M.deg2rad,y.rad2deg=M.rad2deg,y.angleDelta=M.angleDelta,y.angleDist=M.angleDist,y.isFullCircle=M.isFullCircle,y.isAngleInsideSector=M.isAngleInsideSector,y.isPtInsideSector=M.isPtInsideSector,y.pathArc=M.pathArc,y.pathSector=M.pathSector,y.pathAnnulus=M.pathAnnulus;var S=n(99863);y.isLeftAnchor=S.isLeftAnchor,y.isCenterAnchor=S.isCenterAnchor,y.isRightAnchor=S.isRightAnchor,y.isTopAnchor=S.isTopAnchor,y.isMiddleAnchor=S.isMiddleAnchor,y.isBottomAnchor=S.isBottomAnchor;var C=n(87642);y.segmentsIntersect=C.segmentsIntersect,y.segmentDistance=C.segmentDistance,y.getTextLocation=C.getTextLocation,y.clearLocationCache=C.clearLocationCache,y.getVisibleSegment=C.getVisibleSegment,y.findPointOnPath=C.findPointOnPath;var P=n(1426);y.extendFlat=P.extendFlat,y.extendDeep=P.extendDeep,y.extendDeepAll=P.extendDeepAll,y.extendDeepNoArrays=P.extendDeepNoArrays;var D=n(47769);y.log=D.log,y.warn=D.warn,y.error=D.error;var O=n(30587);y.counterRegex=O.counter;var R=n(79990);y.throttle=R.throttle,y.throttleDone=R.done,y.clearThrottle=R.clear;var F=n(24401);function A(Y){var Z={};for(var X in Y)for(var re=Y[X],ie=0;ieh||Y=Z)&&c(Y)&&Y>=0&&Y%1==0},y.noop=n(64213),y.identity=n(23389),y.repeat=function(Y,Z){for(var X=new Array(Z),re=0;reX?Math.max(X,Math.min(Z,Y)):Math.max(Z,Math.min(X,Y))},y.bBoxIntersect=function(Y,Z,X){return X=X||0,Y.left<=Z.right+X&&Z.left<=Y.right+X&&Y.top<=Z.bottom+X&&Z.top<=Y.bottom+X},y.simpleMap=function(Y,Z,X,re,ie){for(var le=Y.length,se=new Array(le),pe=0;pe=Math.pow(2,X)?ie>10?(y.warn("randstr failed uniqueness"),Te):Y(Z,X,re,(ie||0)+1):Te},y.OptionControl=function(Y,Z){Y||(Y={}),Z||(Z="opt");var X={optionList:[],_newoption:function(re){re[Z]=Y,X[re.name]=re,X.optionList.push(re)}};return X["_"+Z]=Y,X},y.smooth=function(Y,Z){if((Z=Math.round(Z)||0)<2)return Y;var X,re,ie,le,se=Y.length,pe=2*se,Te=2*Z-1,Se=new Array(Te),Oe=new Array(se);for(X=0;X=pe&&(ie-=pe*Math.floor(ie/pe)),ie<0?ie=-1-ie:ie>=se&&(ie=pe-1-ie),le+=Y[ie]*Se[re];Oe[X]=le}return Oe},y.syncOrAsync=function(Y,Z,X){var re;function ie(){return y.syncOrAsync(Y,Z,X)}for(;Y.length;)if((re=(0,Y.splice(0,1)[0])(Z))&&re.then)return re.then(ie);return X&&X(Z)},y.stripTrailingSlash=function(Y){return Y.substr(-1)==="/"?Y.substr(0,Y.length-1):Y},y.noneOrAll=function(Y,Z,X){if(Y){var re,ie=!1,le=!0;for(re=0;re0?ie:0})},y.fillArray=function(Y,Z,X,re){if(re=re||y.identity,y.isArrayOrTypedArray(Y))for(var ie=0;ie1?ie+se[1]:"";if(le&&(se.length>1||pe.length>4||X))for(;re.test(pe);)pe=pe.replace(re,"$1"+le+"$2");return pe+Te},y.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var W=/^\w*$/;y.templateString=function(Y,Z){var X={};return Y.replace(y.TEMPLATE_STRING_REGEX,function(re,ie){var le;return W.test(ie)?le=Z[ie]:(X[ie]=X[ie]||y.nestedProperty(Z,ie).get,le=X[ie]()),y.isValidTextValue(le)?le:""})};var G={max:10,count:0,name:"hovertemplate"};y.hovertemplateString=function(){return te.apply(G,arguments)};var L={max:10,count:0,name:"texttemplate"};y.texttemplateString=function(){return te.apply(L,arguments)};var q=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,H={max:10,count:0,name:"texttemplate",parseMultDiv:!0};y.texttemplateStringForShapes=function(){return te.apply(H,arguments)};var V=/^[:|\|]/;function te(Y,Z,X){var re=this,ie=arguments;Z||(Z={});var le={};return Y.replace(y.TEMPLATE_STRING_REGEX,function(se,pe,Te){var Se=pe==="_xother"||pe==="_yother",Oe=pe==="_xother_"||pe==="_yother_",Me=pe==="xother_"||pe==="yother_",ce=pe==="xother"||pe==="yother"||Se||Me||Oe,ye=pe;(Se||Oe)&&(ye=ye.substring(1)),(Me||Oe)&&(ye=ye.substring(0,ye.length-1));var J,ne,de,xe=null,ue=null;if(re.parseMultDiv){var ge=function(Ae){var Ee=Ae.match(q);return Ee?{key:Ee[1],op:Ee[2],number:Number(Ee[3])}:{key:Ae,op:null,number:null}}(ye);ye=ge.key,xe=ge.op,ue=ge.number}if(ce){if((J=Z[ye])===void 0)return""}else for(de=3;de=48&&se<=57,Se=pe>=48&&pe<=57;if(Te&&(re=10*re+se-48),Se&&(ie=10*ie+pe-48),!Te||!Se){if(re!==ie)return re-ie;if(se!==pe)return se-pe}}return ie-re};var ee=2e9;y.seedPseudoRandom=function(){ee=2e9},y.pseudoRandom=function(){var Y=ee;return ee=(69069*ee+1)%4294967296,Math.abs(ee-Y)<429496729?y.pseudoRandom():ee/4294967296},y.fillText=function(Y,Z,X){var re=Array.isArray(X)?function(se){X.push(se)}:function(se){X.text=se},ie=y.extractOption(Y,Z,"htx","hovertext");if(y.isValidTextValue(ie))return re(ie);var le=y.extractOption(Y,Z,"tx","text");return y.isValidTextValue(le)?re(le):void 0},y.isValidTextValue=function(Y){return Y||Y===0},y.formatPercent=function(Y,Z){Z=Z||0;for(var X=(Math.round(100*Y*Math.pow(10,Z))*Math.pow(.1,Z)).toFixed(Z)+"%",re=0;re1&&(Se=1):Se=0,y.strTranslate(ie-Se*(X+se),le-Se*(re+pe))+y.strScale(Se)+(Te?"rotate("+Te+(Z?"":" "+X+" "+re)+")":"")},y.setTransormAndDisplay=function(Y,Z){Y.attr("transform",y.getTextTransform(Z)),Y.style("display",Z.scale?null:"none")},y.ensureUniformFontSize=function(Y,Z){var X=y.extendFlat({},Z);return X.size=Math.max(Z.size,Y._fullLayout.uniformtext.minsize||0),X},y.join2=function(Y,Z,X){var re=Y.length;return re>1?Y.slice(0,-1).join(Z)+X+Y[re-1]:Y.join(Z)},y.bigFont=function(Y){return Math.round(1.2*Y)};var U=y.getFirefoxVersion(),Q=U!==null&&U<86;y.getPositionFromD3Event=function(){return Q?[l.event.layerX,l.event.layerY]:[l.event.offsetX,l.event.offsetY]}},41965:function(o){o.exports=function(a){return window&&window.process&&window.process.versions?Object.prototype.toString.call(a)==="[object Object]":Object.prototype.toString.call(a)==="[object Object]"&&Object.getPrototypeOf(a).hasOwnProperty("hasOwnProperty")}},66636:function(o,a,n){var l=n(65487),f=/^\w*$/;o.exports=function(s,c,d,h){var p,m,y;d=d||"name",h=h||"value";var v={};c&&c.length?(y=l(s,c),m=y.get()):m=s,c=c||"";var g={};if(m)for(p=0;p2)return v[w]=2|v[w],x.set(_,null);if(b){for(p=w;p1){var d=["LOG:"];for(c=0;c1){var h=[];for(c=0;c"),"long")}},s.warn=function(){var c;if(l.logging>0){var d=["WARN:"];for(c=0;c0){var h=[];for(c=0;c"),"stick")}},s.error=function(){var c;if(l.logging>0){var d=["ERROR:"];for(c=0;c0){var h=[];for(c=0;c"),"stick")}}},77310:function(o,a,n){var l=n(39898);o.exports=function(f,s,c){var d=f.selectAll("g."+c.replace(/\s/g,".")).data(s,function(p){return p[0].trace.uid});d.exit().remove(),d.enter().append("g").attr("class",c),d.order();var h=f.classed("rangeplot")?"nodeRangePlot3":"node3";return d.each(function(p){p[0][h]=l.select(this)}),d}},35657:function(o,a,n){var l=n(79576);a.init2dArray=function(f,s){for(var c=new Array(f),d=0;dn/2?a-Math.round(a/n)*n:a}}},65487:function(o,a,n){var l=n(92770),f=n(73627).isArrayOrTypedArray;function s(v,g){return function(){var b,x,_,w,k,T=v;for(w=0;w/g),x=0;xm||M===f||Mv||k&&g(w))}:function(w,k){var T=w[0],M=w[1];if(T===f||Tm||M===f||Mv)return!1;var S,C,P,D,O,R=h.length,F=h[0][0],A=h[0][1],z=0;for(S=1;SMath.max(C,F)||M>Math.max(P,A)))if(Mx||Math.abs(l(y,w))>p)return!0;return!1},s.filter=function(c,d){var h=[c[0]],p=0,m=0;function y(v){c.push(v);var g=h.length,b=p;h.splice(m+1);for(var x=b+1;x1&&y(c.pop()),{addPt:y,raw:c,filtered:h}}},45142:function(o,a,n){var l=n(92770),f=n(35791);o.exports=function(s){var c;if(typeof(c=s&&s.hasOwnProperty("userAgent")?s.userAgent:function(){var g;return typeof navigator<"u"&&(g=navigator.userAgent),g&&g.headers&&typeof g.headers["user-agent"]=="string"&&(g=g.headers["user-agent"]),g}())!="string")return!0;var d=f({ua:{headers:{"user-agent":c}},tablet:!0,featureDetect:!1});if(!d){for(var h=c.split(" "),p=1;p-1;m--){var y=h[m];if(y.substr(0,8)==="Version/"){var v=y.substr(8).split(".")[0];if(l(v)&&(v=+v),v>=13)return!0}}}return d}},75138:function(o){o.exports=function(a,n){if(n instanceof RegExp){for(var l=n.toString(),f=0;ff.queueLength&&(c.undoQueue.queue.shift(),c.undoQueue.index--))},startSequence:function(c){c.undoQueue=c.undoQueue||{index:0,queue:[],sequence:!1},c.undoQueue.sequence=!0,c.undoQueue.beginSequence=!0},stopSequence:function(c){c.undoQueue=c.undoQueue||{index:0,queue:[],sequence:!1},c.undoQueue.sequence=!1,c.undoQueue.beginSequence=!1},undo:function(c){var d,h;if(!(c.undoQueue===void 0||isNaN(c.undoQueue.index)||c.undoQueue.index<=0)){for(c.undoQueue.index--,d=c.undoQueue.queue[c.undoQueue.index],c.undoQueue.inSequence=!0,h=0;h=c.undoQueue.queue.length)){for(d=c.undoQueue.queue[c.undoQueue.index],c.undoQueue.inSequence=!0,h=0;hg}function y(v,g){return v>=g}a.findBin=function(v,g,b){if(l(g.start))return b?Math.ceil((v-g.start)/g.size-d)-1:Math.floor((v-g.start)/g.size+d);var x,_,w=0,k=g.length,T=0,M=k>1?(g[k-1]-g[0])/(k-1):1;for(_=M>=0?b?h:p:b?y:m,v+=M*d*(b?-1:1)*(M>=0?1:-1);w90&&f.log("Long binary search..."),w-1},a.sorterAsc=function(v,g){return v-g},a.sorterDes=function(v,g){return g-v},a.distinctVals=function(v){var g,b=v.slice();for(b.sort(a.sorterAsc),g=b.length-1;g>-1&&b[g]===c;g--);for(var x,_=b[g]-b[0]||1,w=_/(g||1)/1e4,k=[],T=0;T<=g;T++){var M=b[T],S=M-x;x===void 0?(k.push(M),x=M):S>w&&(_=Math.min(_,S),k.push(M),x=M)}return{vals:k,minDiff:_}},a.roundUp=function(v,g,b){for(var x,_=0,w=g.length-1,k=0,T=b?0:1,M=b?1:0,S=b?Math.ceil:Math.floor;_0&&(x=1),b&&x)return v.sort(g)}return x?v:v.reverse()},a.findIndexOfMin=function(v,g){g=g||s;for(var b,x=1/0,_=0;_d.length)&&(h=d.length),l(c)||(c=!1),f(d[0])){for(m=new Array(h),p=0;ps.length-1)return s[s.length-1];var d=c%1;return d*s[Math.ceil(c)]+(1-d)*s[Math.floor(c)]}},3883:function(o,a,n){var l=n(32396),f=n(91424),s=n(71828),c=null;o.exports=function(){if(c!==null)return c;c=!1;var d=s.isIE()||s.isSafari()||s.isIOS();if(window.navigator.userAgent&&!d){var h=Array.from(l.CSS_DECLARATIONS).reverse(),p=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof p=="function")c=h.some(function(v){return p.apply(null,v)});else{var m=f.tester.append("image").attr("style",l.STYLE),y=window.getComputedStyle(m.node()).imageRendering;c=h.some(function(v){var g=v[1];return y===g||y===g.toLowerCase()}),m.remove()}}return c}},63893:function(o,a,n){var l=n(39898),f=n(71828),s=f.strTranslate,c=n(77922),d=n(18783).LINE_SPACING,h=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;a.convertToTspans=function(N,E,W){var G=N.text(),L=!N.attr("data-notex")&&E&&E._context.typesetMath&&typeof MathJax<"u"&&G.match(h),q=l.select(N.node().parentNode);if(!q.empty()){var H=N.attr("class")?N.attr("class").split(" ")[0]:"text";return H+="-math",q.selectAll("svg."+H).remove(),q.selectAll("g."+H+"-group").remove(),N.style("display",null).attr({"data-unformatted":G,"data-math":"N"}),L?(E&&E._promises||[]).push(new Promise(function(te){N.style("display","none");var ee=parseInt(N.node().style.fontSize,10),U={fontSize:ee};(function(Q,Y,Z){var X,re,ie,le,se=parseInt((MathJax.version||"").split(".")[0]);if(se===2||se===3){var pe=function(){var Se="math-output-"+f.randstr({},64),Oe=(le=l.select("body").append("div").attr({id:Se}).style({visibility:"hidden",position:"absolute","font-size":Y.fontSize+"px"}).text(Q.replace(p,"\\lt ").replace(m,"\\gt "))).node();return se===2?MathJax.Hub.Typeset(Oe):MathJax.typeset([Oe])},Te=function(){var Se=le.select(se===2?".MathJax_SVG":".MathJax"),Oe=!Se.empty()&&le.select("svg").node();if(Oe){var Me,ce=Oe.getBoundingClientRect();Me=se===2?l.select("body").select("#MathJax_SVG_glyphs"):Se.select("defs"),Z(Se,Me,ce)}else f.log("There was an error in the tex syntax.",Q),Z();le.remove()};se===2?MathJax.Hub.Queue(function(){return re=f.extendDeepAll({},MathJax.Hub.config),ie=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:y},displayAlign:"left"})},function(){if((X=MathJax.Hub.config.menuSettings.renderer)!=="SVG")return MathJax.Hub.setRenderer("SVG")},pe,Te,function(){if(X!=="SVG")return MathJax.Hub.setRenderer(X)},function(){return ie!==void 0&&(MathJax.Hub.processSectionDelay=ie),MathJax.Hub.Config(re)}):se===3&&(re=f.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=y,(X=MathJax.config.startup.output)!=="svg"&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){pe(),Te(),X!=="svg"&&(MathJax.config.startup.output=X),MathJax.config=re}))}else f.warn("No MathJax version:",MathJax.version)})(L[2],U,function(Q,Y,Z){q.selectAll("svg."+H).remove(),q.selectAll("g."+H+"-group").remove();var X=Q&&Q.select("svg");if(!X||!X.node())return V(),void te();var re=q.append("g").classed(H+"-group",!0).attr({"pointer-events":"none","data-unformatted":G,"data-math":"Y"});re.node().appendChild(X.node()),Y&&Y.node()&&X.node().insertBefore(Y.node().cloneNode(!0),X.node().firstChild);var ie=Z.width,le=Z.height;X.attr({class:H,height:le,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var se=N.node().style.fill||"black",pe=X.select("g");pe.attr({fill:se,stroke:se});var Te=pe.node().getBoundingClientRect(),Se=Te.width,Oe=Te.height;(Se>ie||Oe>le)&&(X.style("overflow","hidden"),Se=(Te=X.node().getBoundingClientRect()).width,Oe=Te.height);var Me=+N.attr("x"),ce=+N.attr("y"),ye=-(ee||N.node().getBoundingClientRect().height)/4;if(H[0]==="y")re.attr({transform:"rotate("+[-90,Me,ce]+")"+s(-Se/2,ye-Oe/2)});else if(H[0]==="l")ce=ye-Oe/2;else if(H[0]==="a"&&H.indexOf("atitle")!==0)Me=0,ce=ye;else{var J=N.attr("text-anchor");Me-=Se*(J==="middle"?.5:J==="end"?1:0),ce=ce+ye-Oe/2}X.attr({x:Me,y:ce}),W&&W.call(N,re),te(re)})})):V(),N}function V(){q.empty()||(H=N.attr("class")+"-math",q.select("svg."+H).remove()),N.text("").style("white-space","pre");var te=function(ee,U){U=U.replace(w," ");var Q,Y=!1,Z=[],X=-1;function re(){X++;var ue=document.createElementNS(c.svg,"tspan");l.select(ue).attr({class:"line",dy:X*d+"em"}),ee.appendChild(ue),Q=ue;var ge=Z;if(Z=[{node:ue}],ge.length>1)for(var be=1;be doesnt match end tag <"+ue+">. Pretending it did match.",U),Q=Z[Z.length-1].node}else f.log("Ignoring unexpected end tag "+ue+">.",U)}M.test(U)?re():(Q=ee,Z=[{node:ee}]);for(var pe=U.split(k),Te=0;Te|>|>)/g,y=[["$","$"],["\\(","\\)"]],v={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},g={sub:"0.3em",sup:"-0.6em"},b={sub:"-0.21em",sup:"0.42em"},x="",_=["http:","https:","mailto:","",void 0,":"],w=a.NEWLINES=/(\r\n?|\n)/g,k=/(<[^<>]*>)/,T=/<(\/?)([^ >]*)(\s+(.*))?>/i,M=/
/i;a.BR_TAG_ALL=/
/gi;var S=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,C=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,P=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,D=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function O(N,E){if(!N)return null;var W=N.match(E),G=W&&(W[3]||W[4]);return G&&z(G)}var R=/(^|;)\s*color:/;a.plainText=function(N,E){for(var W=(E=E||{}).len!==void 0&&E.len!==-1?E.len:1/0,G=E.allowedTags!==void 0?E.allowedTags:["br"],L=N.split(k),q=[],H="",V=0,te=0;te3?q.push(ee.substr(0,Z-3)+"..."):q.push(ee.substr(0,Z));break}H=""}}return q.join("")};var F={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},A=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function z(N){return N.replace(A,function(E,W){return(W.charAt(0)==="#"?function(G){if(!(G>1114111)){var L=String.fromCodePoint;if(L)return L(G);var q=String.fromCharCode;return G<=65535?q(G):q(55232+(G>>10),G%1024+56320)}}(W.charAt(1)==="x"?parseInt(W.substr(2),16):parseInt(W.substr(1),10)):F[W])||E})}function B(N){var E=encodeURI(decodeURI(N)),W=document.createElement("a"),G=document.createElement("a");W.href=N,G.href=E;var L=W.protocol,q=G.protocol;return _.indexOf(L)!==-1&&_.indexOf(q)!==-1?E:""}function $(N,E,W){var G,L,q,H=W.horizontalAlign,V=W.verticalAlign||"top",te=N.node().getBoundingClientRect(),ee=E.node().getBoundingClientRect();return L=V==="bottom"?function(){return te.bottom-G.height}:V==="middle"?function(){return te.top+(te.height-G.height)/2}:function(){return te.top},q=H==="right"?function(){return te.right-G.width}:H==="center"?function(){return te.left+(te.width-G.width)/2}:function(){return te.left},function(){G=this.node().getBoundingClientRect();var U=q()-ee.left,Q=L()-ee.top,Y=W.gd||{};if(W.gd){Y._fullLayout._calcInverseTransform(Y);var Z=f.apply3DTransform(Y._fullLayout._invTransform)(U,Q);U=Z[0],Q=Z[1]}return this.style({top:Q+"px",left:U+"px","z-index":1e3}),this}}a.convertEntities=z,a.sanitizeHTML=function(N){N=N.replace(w," ");for(var E=document.createElement("p"),W=E,G=[],L=N.split(k),q=0;qd.ts+s?m():d.timer=setTimeout(function(){m(),d.timer=null},s)},a.done=function(f){var s=n[f];return s&&s.timer?new Promise(function(c){var d=s.onDone;s.onDone=function(){d&&d(),c(),s.onDone=null}}):Promise.resolve()},a.clear=function(f){if(f)l(n[f]),delete n[f];else for(var s in n)a.clear(s)}},58163:function(o,a,n){var l=n(92770);o.exports=function(f,s){if(f>0)return Math.log(f)/Math.LN10;var c=Math.log(Math.min(s[0],s[1]))/Math.LN10;return l(c)||(c=Math.log(Math.max(s[0],s[1]))/Math.LN10-6),c}},37815:function(o){o.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(o){o.exports={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"}}},14458:function(o,a,n){var l=n(73972);o.exports=function(f){for(var s,c,d=l.layoutArrayContainers,h=l.layoutArrayRegexes,p=f.split("[")[0],m=0;m0&&c.log("Clearing previous rejected promises from queue."),C._promises=[]},a.cleanLayout=function(C){var P,D;C||(C={}),C.xaxis1&&(C.xaxis||(C.xaxis=C.xaxis1),delete C.xaxis1),C.yaxis1&&(C.yaxis||(C.yaxis=C.yaxis1),delete C.yaxis1),C.scene1&&(C.scene||(C.scene=C.scene1),delete C.scene1);var O=(d.subplotsRegistry.cartesian||{}).attrRegex,R=(d.subplotsRegistry.polar||{}).attrRegex,F=(d.subplotsRegistry.ternary||{}).attrRegex,A=(d.subplotsRegistry.gl3d||{}).attrRegex,z=Object.keys(C);for(P=0;P3?(Z.x=1.02,Z.xanchor="left"):Z.x<-2&&(Z.x=-.02,Z.xanchor="right"),Z.y>3?(Z.y=1.02,Z.yanchor="bottom"):Z.y<-2&&(Z.y=-.02,Z.yanchor="top")),b(C),C.dragmode==="rotate"&&(C.dragmode="orbit"),p.clean(C),C.template&&C.template.layout&&a.cleanLayout(C.template.layout),C},a.cleanData=function(C){for(var P=0;P0)return C.substr(0,P)}a.hasParent=function(C,P){for(var D=M(P);D;){if(D in C)return!0;D=M(D)}return!1};var S=["x","y","z"];a.clearAxisTypes=function(C,P,D){for(var O=0;O1&&s.warn("Full array edits are incompatible with other edits",x);var C=v[""][""];if(p(C))y.set(null);else{if(!Array.isArray(C))return s.warn("Unrecognized full array edit value",x,C),!0;y.set(C)}return!T&&(_(M,S),w(m),!0)}var P,D,O,R,F,A,z,B,$=Object.keys(v).map(Number).sort(c),j=y.get(),N=j||[],E=b(S,x).get(),W=[],G=-1,L=N.length;for(P=0;P<$.length;P++)if(R=v[O=$[P]],F=Object.keys(R),A=R[""],z=h(A),O<0||O>N.length-(z?0:1))s.warn("index out of range",x,O);else if(A!==void 0)F.length>1&&s.warn("Insertion & removal are incompatible with edits to the same index.",x,O),p(A)?W.push(O):z?(A==="add"&&(A={}),N.splice(O,0,A),E&&E.splice(O,0,{})):s.warn("Unrecognized full object edit value",x,O,A),G===-1&&(G=O);else for(D=0;D=0;P--)N.splice(W[P],1),E&&E.splice(W[P],1);if(N.length?j||y.set(N):y.set(null),T)return!1;if(_(M,S),k!==f){var q;if(G===-1)q=$;else{for(L=Math.max(N.length,L),q=[],P=0;P<$.length&&!((O=$[P])>=G);P++)q.push(O);for(P=G;P=ue.data.length||ke<-ue.data.length)throw new Error(be+" must be valid indices for gd.data.");if(ge.indexOf(ke,we+1)>-1||ke>=0&&ge.indexOf(-ue.data.length+ke)>-1||ke<0&&ge.indexOf(ue.data.length+ke)>-1)throw new Error("each index in "+be+" must be unique.")}}function E(ue,ge,be){if(!Array.isArray(ue.data))throw new Error("gd.data must be an array.");if(ge===void 0)throw new Error("currentIndices is a required argument.");if(Array.isArray(ge)||(ge=[ge]),N(ue,ge,"currentIndices"),be===void 0||Array.isArray(be)||(be=[be]),be!==void 0&&N(ue,be,"newIndices"),be!==void 0&&ge.length!==be.length)throw new Error("current and new indices must be of equal length.")}function W(ue,ge,be,we,ke){(function(qe,Ye,at,lt){var ct=c.isPlainObject(lt);if(!Array.isArray(qe.data))throw new Error("gd.data must be an array");if(!c.isPlainObject(Ye))throw new Error("update must be a key:value object");if(at===void 0)throw new Error("indices must be an integer or array of integers");for(var bt in N(qe,at,"indices"),Ye){if(!Array.isArray(Ye[bt])||Ye[bt].length!==at.length)throw new Error("attribute "+bt+" must be an array of length equal to indices array length");if(ct&&(!(bt in lt)||!Array.isArray(lt[bt])||lt[bt].length!==Ye[bt].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")}})(ue,ge,be,we);for(var Ae=function(qe,Ye,at,lt){var ct,bt,ze,Ne,Qe,it=c.isPlainObject(lt),kt=[];for(var Je in Array.isArray(at)||(at=[at]),at=j(at,qe.data.length-1),Ye)for(var ut=0;ut-1&&be.indexOf("grouptitlefont")===-1?De(be,be.replace("titlefont","title.font")):be.indexOf("titleposition")>-1?De(be,be.replace("titleposition","title.position")):be.indexOf("titleside")>-1?De(be,be.replace("titleside","title.side")):be.indexOf("titleoffset")>-1&&De(be,be.replace("titleoffset","title.offset")):De(be,be.replace("title","title.text"));function De(Re,Ie){ue[Ie]=ue[Re],delete ue[Re]}}function U(ue,ge,be){ue=c.getGraphDiv(ue),P.clearPromiseQueue(ue);var we={};if(typeof ge=="string")we[ge]=be;else{if(!c.isPlainObject(ge))return c.warn("Relayout fail.",ge,be),Promise.reject();we=c.extendFlat({},ge)}Object.keys(we).length&&(ue.changed=!0);var ke=ie(ue,we),Ae=ke.flags;Ae.calc&&(ue.calcdata=void 0);var Ee=[v.previousPromises];Ae.layoutReplot?Ee.push(D.layoutReplot):Object.keys(we).length&&(Q(ue,Ae,ke)||v.supplyDefaults(ue),Ae.legend&&Ee.push(D.doLegend),Ae.layoutstyle&&Ee.push(D.layoutStyles),Ae.axrange&&Y(Ee,ke.rangesAltered),Ae.ticks&&Ee.push(D.doTicksRelayout),Ae.modebar&&Ee.push(D.doModeBar),Ae.camera&&Ee.push(D.doCamera),Ae.colorbars&&Ee.push(D.doColorBars),Ee.push(A)),Ee.push(v.rehover,v.redrag,v.reselect),p.add(ue,U,[ue,ke.undoit],U,[ue,ke.redoit]);var De=c.syncOrAsync(Ee,ue);return De&&De.then||(De=Promise.resolve(ue)),De.then(function(){return ue.emit("plotly_relayout",ke.eventData),ue})}function Q(ue,ge,be){var we,ke,Ae=ue._fullLayout;if(!ge.axrange)return!1;for(var Ee in ge)if(Ee!=="axrange"&&ge[Ee])return!1;var De=function(Ye,at){return c.coerce(we,ke,x,Ye,at)},Re={};for(var Ie in be.rangesAltered){var Be=g.id2name(Ie);if(we=ue.layout[Be],ke=Ae[Be],b(we,ke,De,Re),ke._matchGroup){for(var Ue in ke._matchGroup)if(Ue!==Ie){var qe=Ae[g.id2name(Ue)];qe.autorange=ke.autorange,qe.range=ke.range.slice(),qe._input.range=ke.range.slice()}}}return!0}function Y(ue,ge){var be=ge?function(we){var ke=[];for(var Ae in ge){var Ee=g.getFromId(we,Ae);if(ke.push(Ae),(Ee.ticklabelposition||"").indexOf("inside")!==-1&&Ee._anchorAxis&&ke.push(Ee._anchorAxis._id),Ee._matchGroup)for(var De in Ee._matchGroup)ge[De]||ke.push(De)}return g.draw(we,ke,{skipTitle:!0})}:function(we){return g.draw(we,"redraw")};ue.push(M,D.doAutoRangeAndConstraints,be,D.drawData,D.finalDraw)}var Z=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,X=/^[xyz]axis[0-9]*\.autorange$/,re=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function ie(ue,ge){var be,we,ke,Ae=ue.layout,Ee=ue._fullLayout,De=Ee._guiEditing,Re=H(Ee._preGUI,De),Ie=Object.keys(ge),Be=g.list(ue),Ue=c.extendDeepAll({},ge),qe={};for(ee(ge),Ie=Object.keys(ge),we=0;we0&&typeof ut.parts[It]!="string";)It--;var Mt=ut.parts[It],zt=ut.parts[It-1]+"."+Mt,wt=ut.parts.slice(0,It).join("."),ve=d(ue.layout,wt).get(),_e=d(Ee,wt).get(),Ve=ut.get();if(pt!==void 0){bt[Je]=pt,ze[Je]=Mt==="reverse"?pt:q(Ve);var We=y.getLayoutValObject(Ee,ut.parts);if(We&&We.impliedEdits&&pt!==null)for(var Ze in We.impliedEdits)Ne(c.relativeAttr(Je,Ze),We.impliedEdits[Ze]);if(["width","height"].indexOf(Je)!==-1)if(pt){Ne("autosize",null);var Ge=Je==="height"?"width":"height";Ne(Ge,Ee[Ge])}else Ee[Je]=ue._initialAutoSize[Je];else if(Je==="autosize")Ne("width",pt?null:Ee.width),Ne("height",pt?null:Ee.height);else if(zt.match(Z))kt(zt),d(Ee,wt+"._inputRange").set(null);else if(zt.match(X)){kt(zt),d(Ee,wt+"._inputRange").set(null);var Ke=d(Ee,wt).get();Ke._inputDomain&&(Ke._input.domain=Ke._inputDomain.slice())}else zt.match(re)&&d(Ee,wt+"._inputDomain").set(null);if(Mt==="type"){Qe=ve;var nt=_e.type==="linear"&&pt==="log",st=_e.type==="log"&&pt==="linear";if(nt||st){if(Qe&&Qe.range)if(_e.autorange)nt&&(Qe.range=Qe.range[1]>Qe.range[0]?[1,2]:[2,1]);else{var mt=Qe.range[0],tt=Qe.range[1];nt?(mt<=0&&tt<=0&&Ne(wt+".autorange",!0),mt<=0?mt=tt/1e6:tt<=0&&(tt=mt/1e6),Ne(wt+".range[0]",Math.log(mt)/Math.LN10),Ne(wt+".range[1]",Math.log(tt)/Math.LN10)):(Ne(wt+".range[0]",Math.pow(10,mt)),Ne(wt+".range[1]",Math.pow(10,tt)))}else Ne(wt+".autorange",!0);Array.isArray(Ee._subplots.polar)&&Ee._subplots.polar.length&&Ee[ut.parts[0]]&&ut.parts[1]==="radialaxis"&&delete Ee[ut.parts[0]]._subplot.viewInitial["radialaxis.range"],m.getComponentMethod("annotations","convertCoords")(ue,_e,pt,Ne),m.getComponentMethod("images","convertCoords")(ue,_e,pt,Ne)}else Ne(wt+".autorange",!0),Ne(wt+".range",null);d(Ee,wt+"._inputRange").set(null)}else if(Mt.match(R)){var Ft=d(Ee,Je).get(),Vt=(pt||{}).type;Vt&&Vt!=="-"||(Vt="linear"),m.getComponentMethod("annotations","convertCoords")(ue,Ft,Vt,Ne),m.getComponentMethod("images","convertCoords")(ue,Ft,Vt,Ne)}var St=C.containerArrayMatch(Je);if(St){be=St.array,we=St.index;var Nt=St.property,Dt=We||{editType:"calc"};we!==""&&Nt===""&&(C.isAddVal(pt)?ze[Je]=null:C.isRemoveVal(pt)?ze[Je]=(d(Ae,be).get()||[])[we]:c.warn("unrecognized full object value",ge)),O.update(ct,Dt),qe[be]||(qe[be]={});var gt=qe[be][we];gt||(gt=qe[be][we]={}),gt[Nt]=pt,delete ge[Je]}else Mt==="reverse"?(ve.range?ve.range.reverse():(Ne(wt+".autorange",!0),ve.range=[1,0]),_e.autorange?ct.calc=!0:ct.plot=!0):(Je==="dragmode"&&(pt===!1&&Ve!==!1||pt!==!1&&Ve===!1)||Ee._has("scatter-like")&&Ee._has("regl")&&Je==="dragmode"&&(pt==="lasso"||pt==="select")&&Ve!=="lasso"&&Ve!=="select"||Ee._has("gl2d")?ct.plot=!0:We?O.update(ct,We):ct.calc=!0,ut.set(pt))}}for(be in qe)C.applyContainerArrayChanges(ue,Re(Ae,be),qe[be],ct,Re)||(ct.plot=!0);for(var ht in it){var yt=(Qe=g.getFromId(ue,ht))&&Qe._constraintGroup;if(yt)for(var qt in ct.calc=!0,yt)it[qt]||(g.getFromId(ue,qt)._constraintShrinkable=!0)}(le(ue)||ge.height||ge.width)&&(ct.plot=!0);var Et=Ee.shapes;for(we=0;we1;)if(we.pop(),(be=d(ge,we.join(".")+".uirevision").get())!==void 0)return be;return ge.uirevision}function ce(ue,ge){for(var be=0;be=ke.length?ke[0]:ke[Ie]:ke}function De(Ie){return Array.isArray(Ae)?Ie>=Ae.length?Ae[0]:Ae[Ie]:Ae}function Re(Ie,Be){var Ue=0;return function(){if(Ie&&++Ue===Be)return Ie()}}return we._frameWaitingCnt===void 0&&(we._frameWaitingCnt=0),new Promise(function(Ie,Be){function Ue(){ue.emit("plotly_animating"),we._lastFrameAt=-1/0,we._timeToNext=0,we._runningTransitions=0,we._currentFrame=null;var Je=function(){we._animationRaf=window.requestAnimationFrame(Je),Date.now()-we._lastFrameAt>we._timeToNext&&function(){we._currentFrame&&we._currentFrame.onComplete&&we._currentFrame.onComplete();var ut=we._currentFrame=we._frameQueue.shift();if(ut){var pt=ut.name?ut.name.toString():null;ue._fullLayout._currentFrame=pt,we._lastFrameAt=Date.now(),we._timeToNext=ut.frameOpts.duration,v.transition(ue,ut.frame.data,ut.frame.layout,P.coerceTraceIndices(ue,ut.frame.traces),ut.frameOpts,ut.transitionOpts).then(function(){ut.onComplete&&ut.onComplete()}),ue.emit("plotly_animatingframe",{name:pt,frame:ut.frame,animation:{frame:ut.frameOpts,transition:ut.transitionOpts}})}else ue.emit("plotly_animated"),window.cancelAnimationFrame(we._animationRaf),we._animationRaf=null}()};Je()}var qe,Ye,at=0;function lt(Je){return Array.isArray(ke)?at>=ke.length?Je.transitionOpts=ke[at]:Je.transitionOpts=ke[0]:Je.transitionOpts=ke,at++,Je}var ct=[],bt=ge==null,ze=Array.isArray(ge);if(bt||ze||!c.isPlainObject(ge)){if(bt||["string","number"].indexOf(typeof ge)!==-1)for(qe=0;qe0&&itit)&&kt.push(Ye);ct=kt}}ct.length>0?function(Je){if(Je.length!==0){for(var ut=0;ut=0;we--)if(c.isPlainObject(ge[we])){var qe=ge[we].name,Ye=(Re[qe]||Ue[qe]||{}).name,at=ge[we].name,lt=Re[Ye]||Ue[Ye];Ye&&at&&typeof at=="number"&<&&F<5&&(F++,c.warn('addFrames: overwriting frame "'+(Re[Ye]||Ue[Ye]).name+'" with a frame whose name of type "number" also equates to "'+Ye+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),F===5&&c.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.")),Ue[qe]={name:qe},Be.push({frame:v.supplyFrameDefaults(ge[we]),index:be&&be[we]!==void 0&&be[we]!==null?be[we]:Ie+we})}Be.sort(function(Je,ut){return Je.index>ut.index?-1:Je.index=0;we--){if(typeof(ke=Be[we].frame).name=="number"&&c.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!ke.name)for(;Re[ke.name="frame "+ue._transitionData._counter++];);if(Re[ke.name]){for(Ae=0;Ae=0;be--)we=ge[be],Ae.push({type:"delete",index:we}),Ee.unshift({type:"insert",index:we,value:ke[we]});var De=v.modifyFrames,Re=v.modifyFrames,Ie=[ue,Ee],Be=[ue,Ae];return p&&p.add(ue,De,Ie,Re,Be),v.modifyFrames(ue,Ae)},a.addTraces=function ue(ge,be,we){ge=c.getGraphDiv(ge);var ke,Ae,Ee=[],De=a.deleteTraces,Re=ue,Ie=[ge,Ee],Be=[ge,be];for(function(Ue,qe,Ye){var at,lt;if(!Array.isArray(Ue.data))throw new Error("gd.data must be an array.");if(qe===void 0)throw new Error("traces must be defined.");for(Array.isArray(qe)||(qe=[qe]),at=0;at=0&&Be=0&&Be=$.length)return!1;if(R.dimensions===2){if(A++,F.length===A)return R;var j=F[A];if(!S(j))return!1;R=$[B][j]}else R=$[B]}else R=$}}return R}function S(R){return R===Math.round(R)&&R>=0}function C(){var R,F,A={};for(R in y(A,c),l.subplotsRegistry)if((F=l.subplotsRegistry[R]).layoutAttributes)if(Array.isArray(F.attr))for(var z=0;z=j.length)return!1;z=(A=(l.transformsRegistry[j[N].type]||{}).attributes)&&A[F[2]],$=3}else{var E=R._module;if(E||(E=(l.modules[R.type||s.type.dflt]||{})._module),!E)return!1;if(!(z=(A=E.attributes)&&A[B])){var W=E.basePlotModule;W&&W.attributes&&(z=W.attributes[B])}z||(z=s[B])}return M(z,F,$)},a.getLayoutValObject=function(R,F){var A=function(z,B){var $,j,N,E,W=z._basePlotModules;if(W){var G;for($=0;$=v&&(y._input||{})._templateitemname;b&&(g=v);var x,_=m+"["+g+"]";function w(){x={},b&&(x[_]={},x[_][s]=b)}function k(M,S){b?l.nestedProperty(x[_],M).set(S):x[_+"."+M]=S}function T(){var M=x;return w(),M}return w(),{modifyBase:function(M,S){x[M]=S},modifyItem:k,getUpdateObj:T,applyUpdate:function(M,S){M&&k(M,S);var C=T();for(var P in C)l.nestedProperty(p,P).set(C[P])}}}},61549:function(o,a,n){var l=n(39898),f=n(73972),s=n(74875),c=n(71828),d=n(63893),h=n(33306),p=n(7901),m=n(91424),y=n(92998),v=n(64168),g=n(89298),b=n(18783),x=n(99082),_=x.enforce,w=x.clean,k=n(71739).doAutoRange,T="start";function M(O,R,F){for(var A=0;A=O[1]||z[1]<=O[0])&&B[0]R[0])return!0}return!1}function S(O){var R,F,A,z,B,$,j=O._fullLayout,N=j._size,E=N.p,W=g.list(O,"",!0);if(j._paperdiv.style({width:O._context.responsive&&j.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":j.width+"px",height:O._context.responsive&&j.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":j.height+"px"}).selectAll(".main-svg").call(m.setSize,j.width,j.height),O._context.setBackground(O,j.paper_bgcolor),a.drawMainTitle(O),v.manage(O),!j._has("cartesian"))return s.previousPromises(O);function G(Ie,Be,Ue){var qe=Ie._lw/2;return Ie._id.charAt(0)==="x"?Be?Ue==="top"?Be._offset-E-qe:Be._offset+Be._length+E+qe:N.t+N.h*(1-(Ie.position||0))+qe%1:Be?Ue==="right"?Be._offset+Be._length+E+qe:Be._offset-E-qe:N.l+N.w*(Ie.position||0)+qe%1}for(R=0;R.5?"t":"b",ee=G._fullLayout.margin[te],U=0;return L.yref==="paper"?U=q+L.pad.t+L.pad.b:L.yref==="container"&&(U=function(Q,Y,Z,X,re){var ie=0;return Z==="middle"&&(ie+=re/2),Q==="t"?(Z==="top"&&(ie+=re),ie+=X-Y*X):(Z==="bottom"&&(ie+=re),ie+=Y*X),ie}(te,H,V,G._fullLayout.height,q)+L.pad.t+L.pad.b),U>ee?U:0}(O,F,E);W>0&&(function(G,L,q,H){var V="title.automargin",te=G._fullLayout.title,ee=te.y>.5?"t":"b",U={x:te.x,y:te.y,t:0,b:0},Q={};te.yref==="paper"&&function(Y,Z,X,re,ie){var le=Z.yref==="paper"?Y._fullLayout._size.h:Y._fullLayout.height,se=c.isTopAnchor(Z)?re:re-ie,pe=X==="b"?le-se:se;return!(c.isTopAnchor(Z)&&X==="t"||c.isBottomAnchor(Z)&&X==="b")&&peN?D.push({code:"unused",traceType:A,templateCount:j,dataCount:N}):N>j&&D.push({code:"reused",traceType:A,templateCount:j,dataCount:N})}}else D.push({code:"data"});if(function E(W,G){for(var L in W)if(L.charAt(0)!=="_"){var q=W[L],H=x(W,L,G);f(q)?(Array.isArray(W)&&q._template===!1&&q.templateitemname&&D.push({code:"missing",path:H,templateitemname:q.templateitemname}),E(q,H)):Array.isArray(q)&&_(q)&&E(q,H)}}({data:R,layout:O},""),D.length)return D.map(w)}},403:function(o,a,n){var l=n(92770),f=n(72391),s=n(74875),c=n(71828),d=n(25095),h=n(5900),p=n(70942),m=n(11506).version,y={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};o.exports=function(v,g){var b,x,_,w;function k(N){return!(N in g)||c.validate(g[N],y[N])}if(g=g||{},c.isPlainObject(v)?(b=v.data||[],x=v.layout||{},_=v.config||{},w={}):(v=c.getGraphDiv(v),b=c.extendDeep([],v.data),x=c.extendDeep({},v.layout),_=v._context,w=v._fullLayout||{}),!k("width")&&g.width!==null||!k("height")&&g.height!==null)throw new Error("Height and width should be pixel values.");if(!k("format"))throw new Error("Export format is not "+c.join2(y.format.values,", "," or ")+".");var T={};function M(N,E){return c.coerce(g,T,y,N,E)}var S=M("format"),C=M("width"),P=M("height"),D=M("scale"),O=M("setBackground"),R=M("imageDataOnly"),F=document.createElement("div");F.style.position="absolute",F.style.left="-5000px",document.body.appendChild(F);var A=c.extendFlat({},x);C?A.width=C:g.width===null&&l(w.width)&&(A.width=w.width),P?A.height=P:g.height===null&&l(w.height)&&(A.height=w.height);var z=c.extendFlat({},_,{_exportedPlot:!0,staticPlot:!0,setBackground:O}),B=d.getRedrawFunc(F);function $(){return new Promise(function(N){setTimeout(N,d.getDelay(F._fullLayout))})}function j(){return new Promise(function(N,E){var W=h(F,S,D),G=F._fullLayout.width,L=F._fullLayout.height;function q(){f.purge(F),document.body.removeChild(F)}if(S==="full-json"){var H=s.graphJson(F,!1,"keepdata","object",!0,!0);return H.version=m,H=JSON.stringify(H),q(),N(R?H:d.encodeJSON(H))}if(q(),S==="svg")return N(R?W:d.encodeSVG(W));var V=document.createElement("canvas");V.id=c.randstr(),p({format:S,width:G,height:L,scale:D,canvas:V,svg:W,promise:!0}).then(N).catch(E)})}return new Promise(function(N,E){f.newPlot(F,b,A,z).then(B).then($).then(j).then(function(W){N(function(G){return R?G.replace(d.IMAGE_URL_PREFIX,""):G}(W))}).catch(function(W){E(W)})})}},84936:function(o,a,n){var l=n(71828),f=n(74875),s=n(86281),c=n(72075).dfltConfig,d=l.isPlainObject,h=Array.isArray,p=l.isArrayOrTypedArray;function m(k,T,M,S,C,P){P=P||[];for(var D=Object.keys(k),O=0;Oz.length&&S.push(g("unused",C,F.concat(z.length)));var W,G,L,q,H,V=z.length,te=Array.isArray(E);if(te&&(V=Math.min(V,E.length)),B.dimensions===2)for(G=0;Gz[G].length&&S.push(g("unused",C,F.concat(G,z[G].length)));var ee=z[G].length;for(W=0;W<(te?Math.min(ee,E[G].length):ee);W++)L=te?E[G][W]:E,q=A[G][W],H=z[G][W],l.validate(q,L)?H!==q&&H!==+q&&S.push(g("dynamic",C,F.concat(G,W),q,H)):S.push(g("value",C,F.concat(G,W),q))}else S.push(g("array",C,F.concat(G),A[G]));else for(G=0;G1&&P.push(g("object","layout"))),f.supplyDefaults(D);for(var O=D._fullData,R=M.length,F=0;F0&&Math.round(x)===x))return{vals:y};g=x}for(var _=p.calendar,w=v==="start",k=v==="end",T=h[m+"period0"],M=s(T,_)||0,S=[],C=[],P=[],D=y.length,O=0;Oz;)A=c(A,-g,_);for(;A<=z;)A=c(A,g,_);F=c(A,-g,_)}else{for(A=M+(R=Math.round((z-M)/b))*b;A>z;)A-=b;for(;A<=z;)A+=b;F=A-b}S[O]=w?F:k?A:(F+A)/2,C[O]=F,P[O]=A}return{vals:S,starts:C,ends:P}}},89502:function(o){o.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(o,a,n){var l=n(39898),f=n(92770),s=n(71828),c=n(50606).FP_SAFE,d=n(73972),h=n(91424),p=n(41675),m=p.getFromId,y=p.isLinked;function v(O,R){var F,A,z=[],B=O._fullLayout,$=b(B,R,0),j=b(B,R,1),N=_(O,R),E=N.min,W=N.max;if(E.length===0||W.length===0)return s.simpleMap(R.range,R.r2l);var G=E[0].val,L=W[0].val;for(F=1;F0&&((Y=le-$(te)-j(ee))>se?Z/Y>pe&&(U=te,Q=ee,pe=Z/Y):Z/le>pe&&(U={val:te.val,nopad:1},Q={val:ee.val,nopad:1},pe=Z/le));if(G===L){var Te=G-1,Se=G+1;if(re)if(G===0)z=[0,1];else{var Oe=(G>0?W:E).reduce(function(ce,ye){return Math.max(ce,j(ye))},0),Me=G/(1-Math.min(.5,Oe/le));z=G>0?[0,Me]:[Me,0]}else z=ie?[Math.max(0,Te),Math.max(1,Se)]:[Te,Se]}else re?(U.val>=0&&(U={val:0,nopad:1}),Q.val<=0&&(Q={val:0,nopad:1})):ie&&(U.val-pe*$(U)<0&&(U={val:0,nopad:1}),Q.val<=0&&(Q={val:1,nopad:1})),pe=(Q.val-U.val-g(R,te.val,ee.val))/(le-$(U)-j(Q)),z=[U.val-pe*$(U),Q.val+pe*j(Q)];return z=D(z,R),R.limitRange&&R.limitRange(),H&&z.reverse(),s.simpleMap(z,R.l2r||Number)}function g(O,R,F){var A=0;if(O.rangebreaks)for(var z=O.locateBreaks(R,F),B=0;B0?F.ppadplus:F.ppadminus)||F.ppad||0),X=Y((O._m>0?F.ppadminus:F.ppadplus)||F.ppad||0),re=Y(F.vpadplus||F.vpad),ie=Y(F.vpadminus||F.vpad);if(!U){if(W=1/0,G=-1/0,ee)for(A=0;A0&&(W=z),z>G&&z-c&&(W=z),z>G&&z=pe;A--)se(A);return{min:L,max:q,opts:F}},concatExtremes:_};var x=3;function _(O,R,F){var A,z,B,$=R._id,j=O._fullData,N=O._fullLayout,E=[],W=[];function G(te,ee){for(A=0;A=F&&(E.extrapad||!$)){j=!1;break}z(R,E.val)&&E.pad<=F&&($||!E.extrapad)&&(O.splice(N,1),N--)}if(j){var W=B&&R===0;O.push({val:R,pad:W?0:F,extrapad:!W&&$})}}function M(O){return f(O)&&Math.abs(O)=R}function P(O,R,F){return R===void 0||F===void 0||(R=O.d2l(R))=N&&(B=N,F=N),$<=N&&($=N,A=N)}}return F=function(E,W){var G=W.autorangeoptions;return G&&G.minallowed!==void 0&&P(W,G.minallowed,G.maxallowed)?G.minallowed:G&&G.clipmin!==void 0&&P(W,G.clipmin,G.clipmax)?Math.max(E,W.d2l(G.clipmin)):E}(F,R),A=function(E,W){var G=W.autorangeoptions;return G&&G.maxallowed!==void 0&&P(W,G.minallowed,G.maxallowed)?G.maxallowed:G&&G.clipmax!==void 0&&P(W,G.clipmin,G.clipmax)?Math.min(E,W.d2l(G.clipmax)):E}(A,R),[F,A]}},23074:function(o){o.exports=function(a,n,l){var f,s;if(l){var c=n==="reversed"||n==="min reversed"||n==="max reversed";f=l[c?1:0],s=l[c?0:1]}var d=a("autorangeoptions.minallowed",s===null?f:void 0),h=a("autorangeoptions.maxallowed",f===null?s:void 0);d===void 0&&a("autorangeoptions.clipmin"),h===void 0&&a("autorangeoptions.clipmax"),a("autorangeoptions.include")}},89298:function(o,a,n){var l=n(39898),f=n(92770),s=n(74875),c=n(73972),d=n(71828),h=d.strTranslate,p=n(63893),m=n(92998),y=n(7901),v=n(91424),g=n(13838),b=n(66287),x=n(50606),_=x.ONEMAXYEAR,w=x.ONEAVGYEAR,k=x.ONEMINYEAR,T=x.ONEMAXQUARTER,M=x.ONEAVGQUARTER,S=x.ONEMINQUARTER,C=x.ONEMAXMONTH,P=x.ONEAVGMONTH,D=x.ONEMINMONTH,O=x.ONEWEEK,R=x.ONEDAY,F=R/2,A=x.ONEHOUR,z=x.ONEMIN,B=x.ONESEC,$=x.MINUS_SIGN,j=x.BADNUM,N={K:"zeroline"},E={K:"gridline",L:"path"},W={K:"minor-gridline",L:"path"},G={K:"tick",L:"path"},L={K:"tick",L:"text"},q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},H=n(18783),V=H.MID_SHIFT,te=H.CAP_SHIFT,ee=H.LINE_SPACING,U=H.OPPOSITE_SIDE,Q=o.exports={};Q.setConvert=n(21994);var Y=n(4322),Z=n(41675),X=Z.idSort,re=Z.isLinked;Q.id2name=Z.id2name,Q.name2id=Z.name2id,Q.cleanId=Z.cleanId,Q.list=Z.list,Q.listIds=Z.listIds,Q.getFromId=Z.getFromId,Q.getFromTrace=Z.getFromTrace;var ie=n(71739);Q.getAutoRange=ie.getAutoRange,Q.findExtremes=ie.findExtremes;var le=1e-4;function se(ve){var _e=(ve[1]-ve[0])*le;return[ve[0]-_e,ve[1]+_e]}Q.coerceRef=function(ve,_e,Ve,We,Ze,Ge){var Ke=We.charAt(We.length-1),nt=Ve._fullLayout._subplots[Ke+"axis"],st=We+"ref",mt={};return Ze||(Ze=nt[0]||(typeof Ge=="string"?Ge:Ge[0])),Ge||(Ge=Ze),nt=nt.concat(nt.map(function(tt){return tt+" domain"})),mt[st]={valType:"enumerated",values:nt.concat(Ge?typeof Ge=="string"?[Ge]:Ge:[]),dflt:Ze},d.coerce(ve,_e,mt,st)},Q.getRefType=function(ve){return ve===void 0?ve:ve==="paper"?"paper":ve==="pixel"?"pixel":/( domain)$/.test(ve)?"domain":"range"},Q.coercePosition=function(ve,_e,Ve,We,Ze,Ge){var Ke,nt;if(Q.getRefType(We)!=="range")Ke=d.ensureNumber,nt=Ve(Ze,Ge);else{var st=Q.getFromId(_e,We);nt=Ve(Ze,Ge=st.fraction2r(Ge)),Ke=st.cleanPos}ve[Ze]=Ke(nt)},Q.cleanPosition=function(ve,_e,Ve){return(Ve==="paper"||Ve==="pixel"?d.ensureNumber:Q.getFromId(_e,Ve).cleanPos)(ve)},Q.redrawComponents=function(ve,_e){_e=_e||Q.listIds(ve);var Ve=ve._fullLayout;function We(Ze,Ge,Ke,nt){for(var st=c.getComponentMethod(Ze,Ge),mt={},tt=0;tt<_e.length;tt++)for(var Ft=Ve[Q.id2name(_e[tt])][Ke],Vt=0;VtVe&&tt2e-6||((Ve-ve._forceTick0)/ve._minDtick%1+1.000001)%1>2e-6)&&(ve._minDtick=0)):ve._minDtick=0},Q.saveRangeInitial=function(ve,_e){for(var Ve=Q.list(ve,"",!0),We=!1,Ze=0;Ze.3*$t||Lt(qt)||Lt(Et))){var Yt=yt.dtick/2;gt+=gt+Yt.8){var Tt=Number(yt.substr(1));jt.exactYears>.8&&Tt%12==0?gt=Q.tickIncrement(gt,"M6","reverse")+1.5*R:jt.exactMonths>.8?gt=Q.tickIncrement(gt,"M1","reverse")+15.5*R:gt-=F;var Ot=Q.tickIncrement(gt,yt);if(Ot<=qt)return Ot}return gt}(Dt,ve,Nt,nt,Ze)),St=Dt;St<=st;)St=Q.tickIncrement(St,Nt,!1,Ze);return{start:_e.c2r(Dt,0,Ze),end:_e.c2r(St,0,Ze),size:Nt,_dataSpan:st-nt}},Q.prepMinorTicks=function(ve,_e,Ve){if(!_e.minor.dtick){delete ve.dtick;var We,Ze=_e.dtick&&f(_e._tmin);if(Ze){var Ge=Q.tickIncrement(_e._tmin,_e.dtick,!0);We=[_e._tmin,.99*Ge+.01*_e._tmin]}else{var Ke=d.simpleMap(_e.range,_e.r2l);We=[Ke[0],.8*Ke[0]+.2*Ke[1]]}if(ve.range=d.simpleMap(We,_e.l2r),ve._isMinor=!0,Q.prepTicks(ve,Ve),Ze){var nt=f(_e.dtick),st=f(ve.dtick),mt=nt?_e.dtick:+_e.dtick.substring(1),tt=st?ve.dtick:+ve.dtick.substring(1);nt&&st?Oe(mt,tt)?mt===2*O&&tt===2*R&&(ve.dtick=O):mt===2*O&&tt===3*R?ve.dtick=O:mt!==O||(_e._input.minor||{}).nticks?Me(mt/tt,2.5)?ve.dtick=mt/2:ve.dtick=mt:ve.dtick=R:String(_e.dtick).charAt(0)==="M"?st?ve.dtick="M1":Oe(mt,tt)?mt>=12&&tt===2&&(ve.dtick="M3"):ve.dtick=_e.dtick:String(ve.dtick).charAt(0)==="L"?String(_e.dtick).charAt(0)==="L"?Oe(mt,tt)||(ve.dtick=Me(mt/tt,2.5)?_e.dtick/2:_e.dtick):ve.dtick="D1":ve.dtick==="D2"&&+_e.dtick>1&&(ve.dtick=1)}ve.range=_e.range}_e.minor._tick0Init===void 0&&(ve.tick0=_e.tick0)},Q.prepTicks=function(ve,_e){var Ve=d.simpleMap(ve.range,ve.r2l,void 0,void 0,_e);if(ve.tickmode==="auto"||!ve.dtick){var We,Ze=ve.nticks;Ze||(ve.type==="category"||ve.type==="multicategory"?(We=ve.tickfont?d.bigFont(ve.tickfont.size||12):15,Ze=ve._length/We):(We=ve._id.charAt(0)==="y"?40:80,Ze=d.constrain(ve._length/We,4,9)+1),ve._name==="radialaxis"&&(Ze*=2)),ve.minor&&ve.minor.tickmode!=="array"||ve.tickmode==="array"&&(Ze*=100),ve._roughDTick=Math.abs(Ve[1]-Ve[0])/Ze,Q.autoTicks(ve,ve._roughDTick),ve._minDtick>0&&ve.dtick<2*ve._minDtick&&(ve.dtick=ve._minDtick,ve.tick0=ve.l2r(ve._forceTick0))}ve.ticklabelmode==="period"&&function(Ge){var Ke;function nt(){return!(f(Ge.dtick)||Ge.dtick.charAt(0)!=="M")}var st=nt(),mt=Q.getTickFormat(Ge);if(mt){var tt=Ge._dtickInit!==Ge.dtick;/%[fLQsSMX]/.test(mt)||(/%[HI]/.test(mt)?(Ke=A,tt&&!st&&Ge.dtick=(ht?0:1);yt--){var qt=!yt;yt?(ve._dtickInit=ve.dtick,ve._tick0Init=ve.tick0):(ve.minor._dtickInit=ve.minor.dtick,ve.minor._tick0Init=ve.minor.tick0);var Et=yt?ve:d.extendFlat({},ve,ve.minor);if(qt?Q.prepMinorTicks(Et,ve,_e):Q.prepTicks(Et,_e),Et.tickmode!=="array")if(Et.tickmode!=="sync"){var jt=se(st),Tt=jt[0],Ot=jt[1],At=f(Et.dtick),Lt=Ze==="log"&&!(At||Et.dtick.charAt(0)==="L"),Rt=Q.tickFirst(Et,_e);if(yt){if(ve._tmin=Rt,Rt=Ot:Bt<=Ot;Bt=Q.tickIncrement(Bt,Wt,mt,Ge)){if(yt&&$t++,Et.rangebreaks&&!mt){if(Bt=Ft)break}if(Dt.length>Vt||Bt===Xt)break;Xt=Bt;var tn={value:Bt};yt?(Lt&&Bt!==(0|Bt)&&(tn.simpleLabel=!0),Ke>1&&$t%Ke&&(tn.skipLabel=!0),Dt.push(tn)):(tn.minor=!0,gt.push(tn))}}else Dt=[],St=J(ve);else yt?(Dt=[],St=ne(ve)):(gt=[],Nt=ne(ve))}if(ht&&!(ve.minor.ticks==="inside"&&ve.ticks==="outside"||ve.minor.ticks==="outside"&&ve.ticks==="inside")){for(var cn=Dt.map(function(lr){return lr.value}),ln=[],an=0;an0?(la=ur-1,An=ur):(la=ur,An=ur);var on,$n=lr[la].value,Pr=lr[An].value,Ln=Math.abs(Pr-$n),Bn=Ar||Ln,jn=0;Bn>=k?jn=Ln>=k&&Ln<=_?Ln:w:Ar===M&&Bn>=S?jn=Ln>=S&&Ln<=T?Ln:M:Bn>=D?jn=Ln>=D&&Ln<=C?Ln:P:Ar===O&&Bn>=O?jn=O:Bn>=R?jn=R:Ar===F&&Bn>=F?jn=F:Ar===A&&Bn>=A&&(jn=A),jn>=Ln&&(jn=Ln,on=!0);var Un=kr+jn;if(ti.rangebreaks&&jn>0){for(var Lr=0,xr=0;xr<84;xr++){var Mr=(xr+.5)/84;ti.maskBreaks(kr*(1-Mr)+Mr*Un)!==j&&Lr++}(jn*=Lr/84)||(lr[ur].drop=!0),on&&Ln>O&&(jn=Ln)}(jn>0||ur===0)&&(lr[ur].periodX=kr+jn/2)}}(Dt,ve,ve._definedDelta),ve.rangebreaks){var Kt=ve._id.charAt(0)==="y",On=1;ve.tickmode==="auto"&&(On=ve.tickfont?ve.tickfont.size:12);var Tn=NaN;for(Ve=Dt.length-1;Ve>-1;Ve--)if(Dt[Ve].drop)Dt.splice(Ve,1);else{Dt[Ve].value=It(Dt[Ve].value,ve);var Dn=ve.c2p(Dt[Ve].value);(Kt?Tn>Dn-On:TnFt||EnFt&&(wn.periodX=Ft),En10||We.substr(5)!=="01-01"?ve._tickround="d":ve._tickround=+_e.substr(1)%12==0?"y":"m";else if(_e>=R&&Ze<=10||_e>=15*R)ve._tickround="d";else if(_e>=z&&Ze<=16||_e>=A)ve._tickround="M";else if(_e>=B&&Ze<=19||_e>=z)ve._tickround="S";else{var Ge=ve.l2r(Ve+_e).replace(/^-/,"").length;ve._tickround=Math.max(Ze,Ge)-20,ve._tickround<0&&(ve._tickround=4)}}else if(f(_e)||_e.charAt(0)==="L"){var Ke=ve.range.map(ve.r2d||Number);f(_e)||(_e=Number(_e.substr(1))),ve._tickround=2-Math.floor(Math.log(_e)/Math.LN10+.01);var nt=Math.max(Math.abs(Ke[0]),Math.abs(Ke[1])),st=Math.floor(Math.log(nt)/Math.LN10+.01),mt=ve.minexponent===void 0?3:ve.minexponent;Math.abs(st)>mt&&(Ie(ve.exponentformat)&&!Be(st)?ve._tickexponent=3*Math.round((st-1)/3):ve._tickexponent=st)}else ve._tickround=null}function De(ve,_e,Ve){var We=ve.tickfont||{};return{x:_e,dx:0,dy:0,text:Ve||"",fontSize:We.size,font:We.family,fontColor:We.color}}Q.autoTicks=function(ve,_e,Ve){var We;function Ze(Ft){return Math.pow(Ft,Math.floor(Math.log(_e)/Math.LN10))}if(ve.type==="date"){ve.tick0=d.dateTick0(ve.calendar,0);var Ge=2*_e;if(Ge>w)_e/=w,We=Ze(10),ve.dtick="M"+12*Ae(_e,We,de);else if(Ge>P)_e/=P,ve.dtick="M"+Ae(_e,1,xe);else if(Ge>R){if(ve.dtick=Ae(_e,R,ve._hasDayOfWeekBreaks?[1,2,7,14]:ge),!Ve){var Ke=Q.getTickFormat(ve),nt=ve.ticklabelmode==="period";nt&&(ve._rawTick0=ve.tick0),/%[uVW]/.test(Ke)?ve.tick0=d.dateTick0(ve.calendar,2):ve.tick0=d.dateTick0(ve.calendar,1),nt&&(ve._dowTick0=ve.tick0)}}else Ge>A?ve.dtick=Ae(_e,A,xe):Ge>z?ve.dtick=Ae(_e,z,ue):Ge>B?ve.dtick=Ae(_e,B,ue):(We=Ze(10),ve.dtick=Ae(_e,We,de))}else if(ve.type==="log"){ve.tick0=0;var st=d.simpleMap(ve.range,ve.r2l);if(ve._isMinor&&(_e*=1.5),_e>.7)ve.dtick=Math.ceil(_e);else if(Math.abs(st[1]-st[0])<1){var mt=1.5*Math.abs((st[1]-st[0])/_e);_e=Math.abs(Math.pow(10,st[1])-Math.pow(10,st[0]))/mt,We=Ze(10),ve.dtick="L"+Ae(_e,We,de)}else ve.dtick=_e>.3?"D2":"D1"}else ve.type==="category"||ve.type==="multicategory"?(ve.tick0=0,ve.dtick=Math.ceil(Math.max(_e,1))):pt(ve)?(ve.tick0=0,We=1,ve.dtick=Ae(_e,We,ke)):(ve.tick0=0,We=Ze(10),ve.dtick=Ae(_e,We,de));if(ve.dtick===0&&(ve.dtick=1),!f(ve.dtick)&&typeof ve.dtick!="string"){var tt=ve.dtick;throw ve.dtick=1,"ax.dtick error: "+String(tt)}},Q.tickIncrement=function(ve,_e,Ve,We){var Ze=Ve?-1:1;if(f(_e))return d.increment(ve,Ze*_e);var Ge=_e.charAt(0),Ke=Ze*Number(_e.substr(1));if(Ge==="M")return d.incrementMonth(ve,Ke,We);if(Ge==="L")return Math.log(Math.pow(10,ve)+Ke)/Math.LN10;if(Ge==="D"){var nt=_e==="D2"?we:be,st=ve+.01*Ze,mt=d.roundUp(d.mod(st,1),nt,Ve);return Math.floor(st)+Math.log(l.round(Math.pow(10,mt),1))/Math.LN10}throw"unrecognized dtick "+String(_e)},Q.tickFirst=function(ve,_e){var Ve=ve.r2l||Number,We=d.simpleMap(ve.range,Ve,void 0,void 0,_e),Ze=We[1] ")}else gt._prevDateHead=Tt,Ot+="
"+Tt;ht.text=Ot}(ve,Ge,Ve,nt):st==="log"?function(gt,ht,yt,qt,Et){var jt=gt.dtick,Tt=ht.x,Ot=gt.tickformat,At=typeof jt=="string"&&jt.charAt(0);if(Et==="never"&&(Et=""),qt&&At!=="L"&&(jt="L3",At="L"),Ot||At==="L")ht.text=Ue(Math.pow(10,Tt),gt,Et,qt);else if(f(jt)||At==="D"&&d.mod(Tt+.01,1)<.1){var Lt=Math.round(Tt),Rt=Math.abs(Lt),$t=gt.exponentformat;$t==="power"||Ie($t)&&Be(Lt)?(ht.text=Lt===0?1:Lt===1?"10":"10"+(Lt>1?"":$)+Rt+"",ht.fontSize*=1.25):($t==="e"||$t==="E")&&Rt>2?ht.text="1"+$t+(Lt>0?"+":$)+Rt:(ht.text=Ue(Math.pow(10,Tt),gt,"","fakehover"),jt==="D1"&>._id.charAt(0)==="y"&&(ht.dy-=ht.fontSize/6))}else{if(At!=="D")throw"unrecognized dtick "+String(jt);ht.text=String(Math.round(Math.pow(10,d.mod(Tt,1)))),ht.fontSize*=.75}if(gt.dtick==="D1"){var Yt=String(ht.text).charAt(0);Yt!=="0"&&Yt!=="1"||(gt._id.charAt(0)==="y"?ht.dx-=ht.fontSize/4:(ht.dy+=ht.fontSize/2,ht.dx+=(gt.range[1]>gt.range[0]?1:-1)*ht.fontSize*(Tt<0?.5:.25)))}}(ve,Ge,0,nt,St):st==="category"?function(gt,ht){var yt=gt._categories[Math.round(ht.x)];yt===void 0&&(yt=""),ht.text=String(yt)}(ve,Ge):st==="multicategory"?function(gt,ht,yt){var qt=Math.round(ht.x),Et=gt._categories[qt]||[],jt=Et[1]===void 0?"":String(Et[1]),Tt=Et[0]===void 0?"":String(Et[0]);yt?ht.text=Tt+" - "+jt:(ht.text=jt,ht.text2=Tt)}(ve,Ge,Ve):pt(ve)?function(gt,ht,yt,qt,Et){if(gt.thetaunit!=="radians"||yt)ht.text=Ue(ht.x,gt,Et,qt);else{var jt=ht.x/180;if(jt===0)ht.text="0";else{var Tt=function(At){function Lt(Xt,Bt){return Math.abs(Xt-Bt)<=1e-6}var Rt=function(Xt){for(var Bt=1;!Lt(Math.round(Xt*Bt)/Bt,Xt);)Bt*=10;return Bt}(At),$t=At*Rt,Yt=Math.abs(function Xt(Bt,Wt){return Lt(Wt,0)?Bt:Xt(Wt,Bt%Wt)}($t,Rt));return[Math.round($t/Yt),Math.round(Rt/Yt)]}(jt);if(Tt[1]>=100)ht.text=Ue(d.deg2rad(ht.x),gt,Et,qt);else{var Ot=ht.x<0;Tt[1]===1?Tt[0]===1?ht.text="π":ht.text=Tt[0]+"π":ht.text=["",Tt[0],"","⁄","",Tt[1],"","π"].join(""),Ot&&(ht.text=$+ht.text)}}}}(ve,Ge,Ve,nt,St):function(gt,ht,yt,qt,Et){Et==="never"?Et="":gt.showexponent==="all"&&Math.abs(ht.x/gt.dtick)<1e-6&&(Et="hide"),ht.text=Ue(ht.x,gt,Et,qt)}(ve,Ge,0,nt,St),We||(ve.tickprefix&&!Vt(ve.showtickprefix)&&(Ge.text=ve.tickprefix+Ge.text),ve.ticksuffix&&!Vt(ve.showticksuffix)&&(Ge.text+=ve.ticksuffix)),ve.labelalias&&ve.labelalias.hasOwnProperty(Ge.text)){var Nt=ve.labelalias[Ge.text];typeof Nt=="string"&&(Ge.text=Nt)}if(ve.tickson==="boundaries"||ve.showdividers){var Dt=function(gt){var ht=ve.l2p(gt);return ht>=0&&ht<=ve._length?gt:null};Ge.xbnd=[Dt(Ge.x-.5),Dt(Ge.x+ve.dtick-.5)]}return Ge},Q.hoverLabelText=function(ve,_e,Ve){Ve&&(ve=d.extendFlat({},ve,{hoverformat:Ve}));var We=Array.isArray(_e)?_e[0]:_e,Ze=Array.isArray(_e)?_e[1]:void 0;if(Ze!==void 0&&Ze!==We)return Q.hoverLabelText(ve,We,Ve)+" - "+Q.hoverLabelText(ve,Ze,Ve);var Ge=ve.type==="log"&&We<=0,Ke=Q.tickText(ve,ve.c2l(Ge?-We:We),"hover").text;return Ge?We===0?"0":$+Ke:Ke};var Re=["f","p","n","μ","m","","k","M","G","T"];function Ie(ve){return ve==="SI"||ve==="B"}function Be(ve){return ve>14||ve<-15}function Ue(ve,_e,Ve,We){var Ze=ve<0,Ge=_e._tickround,Ke=Ve||_e.exponentformat||"B",nt=_e._tickexponent,st=Q.getTickFormat(_e),mt=_e.separatethousands;if(We){var tt={exponentformat:Ke,minexponent:_e.minexponent,dtick:_e.showexponent==="none"?_e.dtick:f(ve)&&Math.abs(ve)||1,range:_e.showexponent==="none"?_e.range.map(_e.r2d):[0,ve||1]};Ee(tt),Ge=(Number(tt._tickround)||0)+4,nt=tt._tickexponent,_e.hoverformat&&(st=_e.hoverformat)}if(st)return _e._numFormat(st)(ve).replace(/-/g,$);var Ft,Vt=Math.pow(10,-Ge)/2;if(Ke==="none"&&(nt=0),(ve=Math.abs(ve))"+Ft+"":Ke==="B"&&nt===9?ve+="B":Ie(Ke)&&(ve+=Re[nt/3+5])),Ze?$+ve:ve}function qe(ve,_e){if(ve){var Ve=Object.keys(q).reduce(function(We,Ze){return _e.indexOf(Ze)!==-1&&q[Ze].forEach(function(Ge){We[Ge]=1}),We},{});Object.keys(ve).forEach(function(We){Ve[We]||(We.length===1?ve[We]=0:delete ve[We])})}}function Ye(ve,_e){for(var Ve=[],We={},Ze=0;Ze<_e.length;Ze++){var Ge=_e[Ze];We[Ge.text2]?We[Ge.text2].push(Ge.x):We[Ge.text2]=[Ge.x]}for(var Ke in We)Ve.push(De(ve,d.interp(We[Ke],.5),Ke));return Ve}function at(ve){return ve.periodX!==void 0?ve.periodX:ve.x}function lt(ve){return[ve.text,ve.x,ve.axInfo,ve.font,ve.fontSize,ve.fontColor].join("_")}function ct(ve){var _e=ve.title.font.size,Ve=(ve.title.text.match(p.BR_TAG_ALL)||[]).length;return ve.title.hasOwnProperty("standoff")?Ve?_e*(te+Ve*ee):_e*te:Ve?_e*(Ve+1)*ee:_e}function bt(ve,_e){var Ve=ve.l2p(_e);return Ve>1&&Ve=Ze.min&&ve=0,ht=tt(Vt,St[1])<=0;return(Nt||gt)&&(Dt||ht)}if(ve.tickformatstops&&ve.tickformatstops.length>0)switch(ve.type){case"date":case"linear":for(_e=0;_e=Ke(Ze)))){Ve=We;break}break;case"log":for(_e=0;_e=0&&Ze.unshift(Ze.splice(mt,1).shift())}});var Ke={false:{left:0,right:0}};return d.syncOrAsync(Ze.map(function(nt){return function(){if(nt){var st=Q.getFromId(ve,nt);Ve||(Ve={}),Ve.axShifts=Ke,Ve.overlayingShiftedAx=Ge;var mt=Q.drawOne(ve,st,Ve);return st._shiftPusher&&wt(st,st._fullDepth||0,Ke,!0),st._r=st.range.slice(),st._rl=d.simpleMap(st._r,st.r2l),mt}}}))},Q.drawOne=function(ve,_e,Ve){var We,Ze,Ge,Ke=(Ve=Ve||{}).axShifts||{},nt=Ve.overlayingShiftedAx||[];_e.setScale();var st=ve._fullLayout,mt=_e._id,tt=mt.charAt(0),Ft=Q.counterLetter(mt),Vt=st._plots[_e._mainSubplot];if(Vt){if(_e._shiftPusher=_e.autoshift||nt.indexOf(_e._id)!==-1||nt.indexOf(_e.overlaying)!==-1,_e._shiftPusher&_e.anchor==="free"){var St=_e.linewidth/2||0;_e.ticks==="inside"&&(St+=_e.ticklen),wt(_e,St,Ke,!0),wt(_e,_e.shift||0,Ke,!1)}Ve.skipTitle===!0&&_e._shift!==void 0||(_e._shift=function(An,on){return An.autoshift?on[An.overlaying][An.side]:An.shift||0}(_e,Ke));var Nt=Vt[tt+"axislayer"],Dt=_e._mainLinePosition,gt=Dt+=_e._shift,ht=_e._mainMirrorPosition,yt=_e._vals=Q.calcTicks(_e),qt=[_e.mirror,gt,ht].join("_");for(We=0;We0?An.bottom-jn:0,Un))));var Lr=0,xr=0;if(_e._shiftPusher&&(Lr=Math.max(Un,An.height>0?Ln==="l"?jn-An.left:An.right-jn:0),_e.title.text!==st._dfltTitle[tt]&&(xr=(_e._titleStandoff||0)+(_e._titleScoot||0),Ln==="l"&&(xr+=ct(_e))),_e._fullDepth=Math.max(Lr,xr)),_e.automargin){on={x:0,y:0,r:0,l:0,t:0,b:0};var Mr=[0,1],Na=typeof _e._shift=="number"?_e._shift:0;if(tt==="x"){if(Ln==="b"?on[Ln]=_e._depth:(on[Ln]=_e._depth=Math.max(An.width>0?jn-An.top:0,Un),Mr.reverse()),An.width>0){var wa=An.right-(_e._offset+_e._length);wa>0&&(on.xr=1,on.r=wa);var sa=_e._offset-An.left;sa>0&&(on.xl=0,on.l=sa)}}else if(Ln==="l"?(_e._depth=Math.max(An.height>0?jn-An.left:0,Un),on[Ln]=_e._depth-Na):(_e._depth=Math.max(An.height>0?An.right-jn:0,Un),on[Ln]=_e._depth+Na,Mr.reverse()),An.height>0){var kn=An.bottom-(_e._offset+_e._length);kn>0&&(on.yb=0,on.b=kn);var Dr=_e._offset-An.top;Dr>0&&(on.yt=1,on.t=Dr)}on[Ft]=_e.anchor==="free"?_e.position:_e._anchorAxis.domain[Mr[0]],_e.title.text!==st._dfltTitle[tt]&&(on[Ln]+=ct(_e)+(_e.title.standoff||0)),_e.mirror&&_e.anchor!=="free"&&(($n={x:0,y:0,r:0,l:0,t:0,b:0})[Bn]=_e.linewidth,_e.mirror&&_e.mirror!==!0&&($n[Bn]+=Un),_e.mirror===!0||_e.mirror==="ticks"?$n[Ft]=_e._anchorAxis.domain[Mr[1]]:_e.mirror!=="all"&&_e.mirror!=="allticks"||($n[Ft]=[_e._counterDomainMin,_e._counterDomainMax][Mr[1]]))}kr&&(Pr=c.getComponentMethod("rangeslider","autoMarginOpts")(ve,_e)),typeof _e.automargin=="string"&&(qe(on,_e.automargin),qe($n,_e.automargin)),s.autoMargin(ve,Ne(_e),on),s.autoMargin(ve,Qe(_e),$n),s.autoMargin(ve,it(_e),Pr)}),d.syncOrAsync(Ar)}}function la(An){var on=mt+(An||"tick");return Et[on]||(Et[on]=function($n,Pr){var Ln,Bn,jn,Un;return $n._selections[Pr].size()?(Ln=1/0,Bn=-1/0,jn=1/0,Un=-1/0,$n._selections[Pr].each(function(){var Lr=ze(this),xr=v.bBox(Lr.node().parentNode);Ln=Math.min(Ln,xr.top),Bn=Math.max(Bn,xr.bottom),jn=Math.min(jn,xr.left),Un=Math.max(Un,xr.right)})):(Ln=0,Bn=0,jn=0,Un=0),{top:Ln,bottom:Bn,left:jn,right:Un,height:Bn-Ln,width:Un-jn}}(_e,on)),Et[on]}},Q.getTickSigns=function(ve,_e){var Ve=ve._id.charAt(0),We={x:"top",y:"right"}[Ve],Ze=ve.side===We?1:-1,Ge=[-1,1,Ze,-Ze];return(_e?(ve.minor||{}).ticks:ve.ticks)!=="inside"==(Ve==="x")&&(Ge=Ge.map(function(Ke){return-Ke})),ve.side&&Ge.push({l:-1,t:-1,r:1,b:1}[ve.side.charAt(0)]),Ge},Q.makeTransTickFn=function(ve){return ve._id.charAt(0)==="x"?function(_e){return h(ve._offset+ve.l2p(_e.x),0)}:function(_e){return h(0,ve._offset+ve.l2p(_e.x))}},Q.makeTransTickLabelFn=function(ve){var _e=function(Ze){var Ge=Ze.ticklabelposition||"",Ke=function(ht){return Ge.indexOf(ht)!==-1},nt=Ke("top"),st=Ke("left"),mt=Ke("right"),tt=Ke("bottom"),Ft=Ke("inside"),Vt=tt||st||nt||mt;if(!Vt&&!Ft)return[0,0];var St=Ze.side,Nt=Vt?(Ze.tickwidth||0)/2:0,Dt=3,gt=Ze.tickfont?Ze.tickfont.size:12;return(tt||nt)&&(Nt+=gt*te,Dt+=(Ze.linewidth||0)/2),(st||mt)&&(Nt+=(Ze.linewidth||0)/2,Dt+=3),Ft&&St==="top"&&(Dt-=gt*(1-te)),(st||nt)&&(Nt=-Nt),St!=="bottom"&&St!=="right"||(Dt=-Dt),[Vt?Nt:0,Ft?Dt:0]}(ve),Ve=_e[0],We=_e[1];return ve._id.charAt(0)==="x"?function(Ze){return h(Ve+ve._offset+ve.l2p(at(Ze)),We)}:function(Ze){return h(We,Ve+ve._offset+ve.l2p(at(Ze)))}},Q.makeTickPath=function(ve,_e,Ve,We){We||(We={});var Ze=We.minor;if(Ze&&!ve.minor)return"";var Ge=We.len!==void 0?We.len:Ze?ve.minor.ticklen:ve.ticklen,Ke=ve._id.charAt(0),nt=(ve.linewidth||1)/2;return Ke==="x"?"M0,"+(_e+nt*Ve)+"v"+Ge*Ve:"M"+(_e+nt*Ve)+",0h"+Ge*Ve},Q.makeLabelFns=function(ve,_e,Ve){var We=ve.ticklabelposition||"",Ze=function($t){return We.indexOf($t)!==-1},Ge=Ze("top"),Ke=Ze("left"),nt=Ze("right"),st=Ze("bottom")||Ke||Ge||nt,mt=Ze("inside"),tt=We==="inside"&&ve.ticks==="inside"||!mt&&ve.ticks==="outside"&&ve.tickson!=="boundaries",Ft=0,Vt=0,St=tt?ve.ticklen:0;if(mt?St*=-1:st&&(St=0),tt&&(Ft+=St,Ve)){var Nt=d.deg2rad(Ve);Ft=St*Math.cos(Nt)+1,Vt=St*Math.sin(Nt)}ve.showticklabels&&(tt||ve.showline)&&(Ft+=.2*ve.tickfont.size);var Dt,gt,ht,yt,qt,Et={labelStandoff:Ft+=(ve.linewidth||1)/2*(mt?-1:1),labelShift:Vt},jt=0,Tt=ve.side,Ot=ve._id.charAt(0),At=ve.tickangle;if(Ot==="x")yt=(qt=!mt&&Tt==="bottom"||mt&&Tt==="top")?1:-1,mt&&(yt*=-1),Dt=Vt*yt,gt=_e+Ft*yt,ht=qt?1:-.2,Math.abs(At)===90&&(mt?ht+=V:ht=At===-90&&Tt==="bottom"?te:At===90&&Tt==="top"?V:.5,jt=V/2*(At/90)),Et.xFn=function($t){return $t.dx+Dt+jt*$t.fontSize},Et.yFn=function($t){return $t.dy+gt+$t.fontSize*ht},Et.anchorFn=function($t,Yt){if(st){if(Ke)return"end";if(nt)return"start"}return f(Yt)&&Yt!==0&&Yt!==180?Yt*yt<0!==mt?"end":"start":"middle"},Et.heightFn=function($t,Yt,Xt){return Yt<-60||Yt>60?-.5*Xt:ve.side==="top"!==mt?-Xt:0};else if(Ot==="y"){if(yt=(qt=!mt&&Tt==="left"||mt&&Tt==="right")?1:-1,mt&&(yt*=-1),Dt=Ft,gt=Vt*yt,ht=0,mt||Math.abs(At)!==90||(ht=At===-90&&Tt==="left"||At===90&&Tt==="right"?te:.5),mt){var Lt=f(At)?+At:0;if(Lt!==0){var Rt=d.deg2rad(Lt);jt=Math.abs(Math.sin(Rt))*te*yt,ht=0}}Et.xFn=function($t){return $t.dx+_e-(Dt+$t.fontSize*ht)*yt+jt*$t.fontSize},Et.yFn=function($t){return $t.dy+gt+$t.fontSize*V},Et.anchorFn=function($t,Yt){return f(Yt)&&Math.abs(Yt)===90?"middle":qt?"end":"start"},Et.heightFn=function($t,Yt,Xt){return ve.side==="right"&&(Yt*=-1),Yt<-30?-Xt:Yt<30?-.5*Xt:0}}return Et},Q.drawTicks=function(ve,_e,Ve){Ve=Ve||{};var We=_e._id+"tick",Ze=[].concat(_e.minor&&_e.minor.ticks?Ve.vals.filter(function(Ke){return Ke.minor&&!Ke.noTick}):[]).concat(_e.ticks?Ve.vals.filter(function(Ke){return!Ke.minor&&!Ke.noTick}):[]),Ge=Ve.layer.selectAll("path."+We).data(Ze,lt);Ge.exit().remove(),Ge.enter().append("path").classed(We,1).classed("ticks",1).classed("crisp",Ve.crisp!==!1).each(function(Ke){return y.stroke(l.select(this),Ke.minor?_e.minor.tickcolor:_e.tickcolor)}).style("stroke-width",function(Ke){return v.crispRound(ve,Ke.minor?_e.minor.tickwidth:_e.tickwidth,1)+"px"}).attr("d",Ve.path).style("display",null),zt(_e,[G]),Ge.attr("transform",Ve.transFn)},Q.drawGrid=function(ve,_e,Ve){if(Ve=Ve||{},_e.tickmode!=="sync"){var We=_e._id+"grid",Ze=_e.minor&&_e.minor.showgrid,Ge=Ze?Ve.vals.filter(function(ht){return ht.minor}):[],Ke=_e.showgrid?Ve.vals.filter(function(ht){return!ht.minor}):[],nt=Ve.counterAxis;if(nt&&Q.shouldShowZeroLine(ve,_e,nt))for(var st=_e.tickmode==="array",mt=0;mt=0;Nt--){var Dt=Nt?Vt:St;if(Dt){var gt=Dt.selectAll("path."+We).data(Nt?Ke:Ge,lt);gt.exit().remove(),gt.enter().append("path").classed(We,1).classed("crisp",Ve.crisp!==!1),gt.attr("transform",Ve.transFn).attr("d",Ve.path).each(function(ht){return y.stroke(l.select(this),ht.minor?_e.minor.gridcolor:_e.gridcolor||"#ddd")}).style("stroke-dasharray",function(ht){return v.dashStyle(ht.minor?_e.minor.griddash:_e.griddash,ht.minor?_e.minor.gridwidth:_e.gridwidth)}).style("stroke-width",function(ht){return(ht.minor?Ft:_e._gw)+"px"}).style("display",null),typeof Ve.path=="function"&>.attr("d",Ve.path)}}zt(_e,[E,W])}},Q.drawZeroLine=function(ve,_e,Ve){Ve=Ve||Ve;var We=_e._id+"zl",Ze=Q.shouldShowZeroLine(ve,_e,Ve.counterAxis),Ge=Ve.layer.selectAll("path."+We).data(Ze?[{x:0,id:_e._id}]:[]);Ge.exit().remove(),Ge.enter().append("path").classed(We,1).classed("zl",1).classed("crisp",Ve.crisp!==!1).each(function(){Ve.layer.selectAll("path").sort(function(Ke,nt){return X(Ke.id,nt.id)})}),Ge.attr("transform",Ve.transFn).attr("d",Ve.path).call(y.stroke,_e.zerolinecolor||y.defaultLine).style("stroke-width",v.crispRound(ve,_e.zerolinewidth,_e._gw||1)+"px").style("display",null),zt(_e,[N])},Q.drawLabels=function(ve,_e,Ve){Ve=Ve||{};var We=ve._fullLayout,Ze=_e._id,Ge=Ze.charAt(0),Ke=Ve.cls||Ze+"tick",nt=Ve.vals.filter(function(yt){return yt.text}),st=Ve.labelFns,mt=Ve.secondary?0:_e.tickangle,tt=(_e._prevTickAngles||{})[Ke],Ft=Ve.layer.selectAll("g."+Ke).data(_e.showticklabels?nt:[],lt),Vt=[];function St(yt,qt){yt.each(function(Et){var jt=l.select(this),Tt=jt.select(".text-math-group"),Ot=st.anchorFn(Et,qt),At=Ve.transFn.call(jt.node(),Et)+(f(qt)&&+qt!=0?" rotate("+qt+","+st.xFn(Et)+","+(st.yFn(Et)-Et.fontSize/2)+")":""),Lt=p.lineCount(jt),Rt=ee*Et.fontSize,$t=st.heightFn(Et,f(qt)?+qt:0,(Lt-1)*Rt);if($t&&(At+=h(0,$t)),Tt.empty()){var Yt=jt.select("text");Yt.attr({transform:At,"text-anchor":Ot}),Yt.style("opacity",1),_e._adjustTickLabelsOverflow&&_e._adjustTickLabelsOverflow()}else{var Xt=v.bBox(Tt.node()).width*{end:-.5,start:.5}[Ot];Tt.attr("transform",At+h(Xt,0))}})}Ft.enter().append("g").classed(Ke,1).append("text").attr("text-anchor","middle").each(function(yt){var qt=l.select(this),Et=ve._promises.length;qt.call(p.positionText,st.xFn(yt),st.yFn(yt)).call(v.font,yt.font,yt.fontSize,yt.fontColor).text(yt.text).call(p.convertToTspans,ve),ve._promises[Et]?Vt.push(ve._promises.pop().then(function(){St(qt,mt)})):St(qt,mt)}),zt(_e,[L]),Ft.exit().remove(),Ve.repositionOnUpdate&&Ft.each(function(yt){l.select(this).select("text").call(p.positionText,st.xFn(yt),st.yFn(yt))}),_e._adjustTickLabelsOverflow=function(){var yt=_e.ticklabeloverflow;if(yt&&yt!=="allow"){var qt=yt.indexOf("hide")!==-1,Et=_e._id.charAt(0)==="x",jt=0,Tt=Et?ve._fullLayout.width:ve._fullLayout.height;if(yt.indexOf("domain")!==-1){var Ot=d.simpleMap(_e.range,_e.r2l);jt=_e.l2p(Ot[0])+_e._offset,Tt=_e.l2p(Ot[1])+_e._offset}var At=Math.min(jt,Tt),Lt=Math.max(jt,Tt),Rt=_e.side,$t=1/0,Yt=-1/0;for(var Xt in Ft.each(function(tn){var cn=l.select(this);if(cn.select(".text-math-group").empty()){var ln=v.bBox(cn.node()),an=0;Et?(ln.right>Lt||ln.leftLt||ln.top+(_e.tickangle?0:tn.fontSize/4)_e["_visibleLabelMin_"+Ot._id]?Wt.style("display","none"):Lt.K!=="tick"||At||Wt.style("display",null)})})})})},St(Ft,tt+1?tt:mt);var Nt=null;_e._selections&&(_e._selections[Ke]=Ft);var Dt=[function(){return Vt.length&&Promise.all(Vt)}];_e.automargin&&We._redrawFromAutoMarginCount&&tt===90?(Nt=90,Dt.push(function(){St(Ft,tt)})):Dt.push(function(){if(St(Ft,mt),nt.length&&Ge==="x"&&!f(mt)&&(_e.type!=="log"||String(_e.dtick).charAt(0)!=="D")){Nt=0;var yt,qt=0,Et=[];if(Ft.each(function(cn){qt=Math.max(qt,cn.fontSize);var ln=_e.l2p(cn.x),an=ze(this),sn=v.bBox(an.node());Et.push({top:0,bottom:10,height:10,left:ln-sn.width/2,right:ln+sn.width/2+2,width:sn.width+2})}),_e.tickson!=="boundaries"&&!_e.showdividers||Ve.secondary){var jt=nt.length,Tt=Math.abs((nt[jt-1].x-nt[0].x)*_e._m)/(jt-1),Ot=_e.ticklabelposition||"",At=function(cn){return Ot.indexOf(cn)!==-1},Lt=At("top"),Rt=At("left"),$t=At("right"),Yt=At("bottom")||Rt||Lt||$t?(_e.tickwidth||0)+6:0,Xt=Tt<2.5*qt||_e.type==="multicategory"||_e._name==="realaxis";for(yt=0;yt