diff --git a/asset-manifest.json b/asset-manifest.json index 8e3a811..cc2737e 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { "main.css": "/K3MS/static/css/main.abd013b4.css", - "main.js": "/K3MS/static/js/main.9144e79c.js", + "main.js": "/K3MS/static/js/main.97e3a88b.js", "static/media/navbar-usc-logo.svg": "/K3MS/static/media/navbar-usc-logo.c4cd143e8ac99439ef543602d4a43295.svg", "static/media/delete-icon.svg": "/K3MS/static/media/delete-icon.78ec434bdef8fbe7ba9f63d8324279ed.svg", "index.html": "/K3MS/index.html", "main.abd013b4.css.map": "/K3MS/static/css/main.abd013b4.css.map", - "main.9144e79c.js.map": "/K3MS/static/js/main.9144e79c.js.map" + "main.97e3a88b.js.map": "/K3MS/static/js/main.97e3a88b.js.map" }, "entrypoints": [ "static/css/main.abd013b4.css", - "static/js/main.9144e79c.js" + "static/js/main.97e3a88b.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index e609380..36fa6f6 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -USC Dashboard
\ No newline at end of file +USC Dashboard
\ No newline at end of file diff --git a/static/js/main.9144e79c.js b/static/js/main.9144e79c.js deleted file mode 100644 index 7794d2a..0000000 --- a/static/js/main.9144e79c.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see main.9144e79c.js.LICENSE.txt */ -(()=>{var e={197:(e,t,n)=>{const r="".concat("https://k3ms.pythonanywhere.com","/");e.exports=n.g.config={HOME_URL:r,DASHBOARD_URL:r+"dashboard",LIMITED_GRANTS_URL:r+"limited_grants",LIMITED_PUBS_URL:r+"limited_publications",LIMITED_EVALS_URL:r+"limited_student_evals",LIMITED_EXPEN_URL:r+"limited_expenditures",LOGIN_URL:r+"login",LOGOUT_URL:r+"logout",CHECK_AUTH_URL:r+"check_auth",GRANTS_URL:r+"grants",PUBS_URL:r+"publications",EXPEN_URL:r+"expenditures",STUDENT_EVALS_URL:r+"student_evals",STUDENT_EVALS_DETAILS_URL:r+"student_evals_details",COURSE_ANALYTICS_URLS:{getAnonData:r+"course_analytics",getCourses:r+"get_courses_for_user",getAllCourses:r+"get_all_courses_in_db",getUsersToChoose:r+"get_users_in_chairs_dept"},TEAM_ASSESSMENTS_URL:r+"team_assessments",GRANT_UPLOAD_URL:r+"grantupload",PUB_UPLOAD_URL:r+"pubupload",EVAL_UPLOAD_URL:r+"evalupload",EXPEN_UPLOAD_URL:r+"expenupload",EVAL_OVERWRITE_URL:r+"overwrite_evals",UPDATE_PASSWORD_URL:r+"update_password",UPDATE_PROFILE_PICTURE_URL:r+"update_profile_picture",GET_PROFILE_PICTURE_URL:r+"get_profile_picture",USER_CREATION_URL:r+"signup",MANUAL_USER_CREATION_URL:r+"manual_signup",USER_DELETION_URL:r+"delete_user",USER_UPDATE_URL:r+"update_user",DELETE_EVALS_URL:r+"delete_evals",DELETE_ALL_GRANTS_URL:r+"delete_all_my_grants",DELETE_ALL_PUBS_URL:r+"delete_all_my_pubs",DELETE_ALL_EXPENS_URL:r+"delete_all_my_expens",DELETE_ENTRY_URL:r+"delete_entry",SET_PASSWORD_URL:r+"set_password",DEC_PLACES:2}},572:e=>{var t;self,t=function(){return function(){var e={9288:function(e,t,n){"use strict";var r=n(3400),a={"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 i in a){var o=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");r.addStyleRule(o,a[i])}},6712:function(e,t,n){"use strict";e.exports=n(1843)},7240:function(e,t,n){"use strict";e.exports=n(1132)},6144:function(e,t,n){"use strict";e.exports=n(7776)},2016:function(e,t,n){"use strict";e.exports=n(4884)},5556:function(e,t,n){"use strict";e.exports=n(6744)},6489:function(e,t,n){"use strict";e.exports=n(2028)},3472:function(e,t,n){"use strict";var r=n(2016);r.register([n(7240),n(260),n(6712),n(5556),n(6489),n(7312),n(6144)]),e.exports=r},260:function(e,t,n){"use strict";e.exports=n(5792)},7312:function(e,t,n){"use strict";e.exports=n(6272)},2196:function(e){"use strict";e.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}]},3916:function(e,t,n){"use strict";var r=n(2196),a=n(5376),i=n(3816),o=n(1780).templatedArray;n(6208),e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:a({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:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.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",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.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",i.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:a({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},272:function(e,t,n){"use strict";var r=n(3400),a=n(4460),i=n(6196).draw;function o(e){var t=e._fullLayout;r.filterVisible(t.annotations).forEach((function(t){var n=a.getFromId(e,t.xref),r=a.getFromId(e,t.yref),i=a.getRefType(t.xref),o=a.getRefType(t.yref);t._extremes={},"range"===i&&l(t,n),"range"===o&&l(t,r)}))}function l(e,t){var n,r=t._id,i=r.charAt(0),o=e[i],l=e["a"+i],s=e[i+"ref"],u=e["a"+i+"ref"],c=e["_"+i+"padplus"],d=e["_"+i+"padminus"],f={x:1,y:-1}[i]*e[i+"shift"],h=3*e.arrowsize*e.arrowwidth||0,p=h+f,v=h-f,m=3*e.startarrowsize*e.arrowwidth||0,g=m+f,y=m-f;if(u===s){var x=a.findExtremes(t,[t.r2c(o)],{ppadplus:p,ppadminus:v}),b=a.findExtremes(t,[t.r2c(l)],{ppadplus:Math.max(c,g),ppadminus:Math.max(d,y)});n={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else g=l?g+l:g,y=l?y-l:y,n=a.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(c,p,g),ppadminus:Math.max(d,v,y)});e._extremes[r]=n}e.exports=function(e){var t=e._fullLayout;if(r.filterVisible(t.annotations).length&&e._fullData.length)return r.syncOrAsync([i,o],e)}},2300:function(e,t,n){"use strict";var r=n(3400),a=n(4040),i=n(1780).arrayEditor;function o(e,t){var n,r,a,i,o,s,u,c=e._fullLayout.annotations,d=[],f=[],h=[],p=(t||[]).length;for(n=0;n0||n.explicitOff.length>0},onClick:function(e,t){var n,l,s=o(e,t),u=s.on,c=s.off.concat(s.explicitOff),d={},f=e._fullLayout.annotations;if(u.length||c.length){for(n=0;n2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var q=!1,Z=["x","y"],X=0;X1)&&(re===ne?((he=ae.r2fraction(t["a"+te]))<0||he>1)&&(q=!0):q=!0),J=ae._offset+ae.r2p(t[te]),$=.5}else{var pe="domain"===fe;"x"===te?(K=t[te],J=pe?ae._offset+ae._length*K:J=w.l+w.w*K):(K=1-t[te],J=pe?ae._offset+ae._length*K:J=w.t+w.h*K),$=t.showarrow?.5:K}if(t.showarrow){de.head=J;var ve=t["a"+te];if(ee=oe*V(.5,t.xanchor)-le*V(.5,t.yanchor),re===ne){var me=s.getRefType(re);"domain"===me?("y"===te&&(ve=1-ve),de.tail=ae._offset+ae._length*ve):"paper"===me?"y"===te?(ve=1-ve,de.tail=w.t+w.h*ve):de.tail=w.l+w.w*ve:de.tail=ae._offset+ae.r2p(ve),Q=ee}else de.tail=J+ve,Q=ee+ve;de.text=de.tail+ee;var ge=A["x"===te?"width":"height"];if("paper"===ne&&(de.head=o.constrain(de.head,1,ge-1)),"pixel"===re){var ye=-Math.max(de.tail-3,de.text),xe=Math.min(de.tail+3,de.text)-ge;ye>0?(de.tail+=ye,de.text+=ye):xe>0&&(de.tail-=xe,de.text-=xe)}de.tail+=ce,de.head+=ce}else Q=ee=se*V($,ue),de.text=J+ee;de.text+=ce,ee+=ce,Q+=ce,t["_"+te+"padplus"]=se/2+Q,t["_"+te+"padminus"]=se/2-Q,t["_"+te+"size"]=se,t["_"+te+"shift"]=ee}if(q)j.remove();else{var be=0,_e=0;if("left"!==t.align&&(be=(k-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(_e=(R-_)*("middle"===t.valign?.5:1)),d)r.select("svg").attr({x:F+be-1,y:F+_e}).call(c.setClipUrl,U?L:null,e);else{var Ae=F+_e-v.top,we=F+be-v.left;G.call(f.positionText,we,Ae).call(c.setClipUrl,U?L:null,e)}H.select("rect").call(c.setRect,F,F,k,R),B.call(c.setRect,I/2,I/2,z-I,Y-I),j.call(c.setTranslate,Math.round(E.x.text-z/2),Math.round(E.y.text-Y/2)),P.attr({transform:"rotate("+D+","+E.x.text+","+E.y.text+")"});var Te,ke=function(n,r){O.selectAll(".annotation-arrow-g").remove();var s=E.x.head,d=E.y.head,f=E.x.tail+n,h=E.y.tail+r,v=E.x.text+n,b=E.y.text+r,_=o.rotationXYMatrix(D,v,b),A=o.apply2DTransform(_),k=o.apply2DTransform2(_),L=+B.attr("width"),N=+B.attr("height"),R=v-.5*L,I=R+L,z=b-.5*N,F=z+N,U=[[R,z,R,F],[R,F,I,F],[I,F,I,z],[I,z,R,z]].map(k);if(!U.reduce((function(e,t){return e^!!o.segmentsIntersect(s,d,s+1e6,d+1e6,t[0],t[1],t[2],t[3])}),!1)){U.forEach((function(e){var t=o.segmentsIntersect(f,h,s,d,e[0],e[1],e[2],e[3]);t&&(f=t.x,h=t.y)}));var H=t.arrowwidth,Y=t.arrowcolor,V=t.arrowside,G=O.append("g").style({opacity:u.opacity(Y)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+f+","+h+"L"+s+","+d).style("stroke-width",H+"px").call(u.stroke,u.rgb(Y));if(m(W,V,t),T.annotationPosition&&W.node().parentNode&&!i){var q=s,Z=d;if(t.standoff){var X=Math.sqrt(Math.pow(s-f,2)+Math.pow(d-h,2));q+=t.standoff*(f-s)/X,Z+=t.standoff*(h-d)/X}var J,Q,K=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-q)+","+(h-Z),transform:l(q,Z)}).style("stroke-width",H+6+"px").call(u.stroke,"rgba(0,0,0,0)").call(u.fill,"rgba(0,0,0,0)");p.init({element:K.node(),gd:e,prepFn:function(){var e=c.getTranslate(j);J=e.x,Q=e.y,g&&g.autorange&&M(g._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(e,n){var r=A(J,Q),a=r[0]+e,i=r[1]+n;j.call(c.setTranslate,a,i),S("x",y(g,e,"x",w,t)),S("y",y(x,n,"y",w,t)),t.axref===t.xref&&S("ax",y(g,e,"ax",w,t)),t.ayref===t.yref&&S("ay",y(x,n,"ay",w,t)),G.attr("transform",l(e,n)),P.attr({transform:"rotate("+D+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",e,C());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&ke(0,0),N&&p.init({element:j.node(),gd:e,prepFn:function(){Te=P.attr("transform")},moveFn:function(e,n){var r="pointer";if(t.showarrow)t.axref===t.xref?S("ax",y(g,e,"ax",w,t)):S("ax",t.ax+e),t.ayref===t.yref?S("ay",y(x,n,"ay",w.w,t)):S("ay",t.ay+n),ke(e,n);else{if(i)return;var a,o;if(g)a=y(g,e,"x",w,t);else{var s=t._xsize/w.w,u=t.x+(t._xshift-t.xshift)/w.w-s/2;a=p.align(u+e/w.w,s,0,1,t.xanchor)}if(x)o=y(x,n,"y",w,t);else{var c=t._ysize/w.h,d=t.y-(t._yshift+t.yshift)/w.h-c/2;o=p.align(d-n/w.h,c,0,1,t.yanchor)}S("x",a),S("y",o),g&&x||(r=p.getCursor(g?.5:a,x?.5:o,t.xanchor,t.yanchor))}P.attr({transform:l(e,n)+Te}),h(j,r)},clickFn:function(n,r){t.captureevents&&e.emit("plotly_clickannotation",W(r))},doneFn:function(){h(j),a.call("_guiRelayout",e,C());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}e.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var n=0;n=0,x=t.indexOf("end")>=0,b=p.backoff*m+n.standoff,_=v.backoff*g+n.startstandoff;if("line"===h.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},c={x:+e.attr("x2"),y:+e.attr("y2")};var A=o.x-c.x,w=o.y-c.y;if(f=(d=Math.atan2(w,A))+Math.PI,b&&_&&b+_>Math.sqrt(A*A+w*w))return void N();if(b){if(b*b>A*A+w*w)return void N();var T=b*Math.cos(d),k=b*Math.sin(d);c.x+=T,c.y+=k,e.attr({x2:c.x,y2:c.y})}if(_){if(_*_>A*A+w*w)return void N();var M=_*Math.cos(d),S=_*Math.sin(d);o.x-=M,o.y-=S,e.attr({x1:o.x,y1:o.y})}}else if("path"===h.nodeName){var C=h.getTotalLength(),L="";if(C1){u=!0;break}}u?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+l+'"]').remove():(s._pdata=a(e.glplot.cameraParams,[t.xaxis.r2l(s.x)*n[0],t.yaxis.r2l(s.y)*n[1],t.zaxis.r2l(s.z)*n[2]]),r(e.graphDiv,s,l,e.id,s._xa,s._ya))}}},6864:function(e,t,n){"use strict";var r=n(4040),a=n(3400);e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:n(5899)}}},layoutAttributes:n(5899),handleDefaults:n(2808),includeBasePlot:function(e,t){var n=r.subplotsRegistry.gl3d;if(n)for(var i=n.attrRegex,o=Object.keys(e),l=0;l=0))return e;if(3===o)r[o]>1&&(r[o]=1);else if(r[o]>=1)return e}var l=Math.round(255*r[0])+", "+Math.round(255*r[1])+", "+Math.round(255*r[2]);return i?"rgba("+l+", "+r[3]+")":"rgb("+l+")"}o.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},o.rgb=function(e){return o.tinyRGB(r(e))},o.opacity=function(e){return e?r(e).getAlpha():0},o.addOpacity=function(e,t){var n=r(e).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+t+")"},o.combine=function(e,t){var n=r(e).toRgb();if(1===n.a)return r(e).toRgbString();var a=r(t||u).toRgb(),i=1===a.a?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},o={r:i.r*(1-n.a)+n.r*n.a,g:i.g*(1-n.a)+n.g*n.a,b:i.b*(1-n.a)+n.b*n.a};return r(o).toRgbString()},o.interpolate=function(e,t,n){var a=r(e).toRgb(),i=r(t).toRgb(),o={r:n*a.r+(1-n)*i.r,g:n*a.g+(1-n)*i.g,b:n*a.b+(1-n)*i.b};return r(o).toRgbString()},o.contrast=function(e,t,n){var a=r(e);return 1!==a.getAlpha()&&(a=r(o.combine(e,u))),(a.isDark()?t?a.lighten(t):u:n?a.darken(n):s).toString()},o.stroke=function(e,t){var n=r(t);e.style({stroke:o.tinyRGB(n),"stroke-opacity":n.getAlpha()})},o.fill=function(e,t){var n=r(t);e.style({fill:o.tinyRGB(n),"fill-opacity":n.getAlpha()})},o.clean=function(e){if(e&&"object"===typeof e){var t,n,r,a,l=Object.keys(e);for(t=0;t0?r>=s:r<=s));a++)r>c&&r0?r>=s:r<=s));a++)r>n[0]&&r1){var he=Math.pow(10,Math.floor(Math.log(fe)/Math.LN10));ce*=he*u.roundUp(fe/he,[2,5,10]),(Math.abs(W.start)/W.size+1e-6)%1<2e-6&&(se.tick0=0)}se.dtick=ce}se.domain=o?[oe+O/z.h,oe+$-O/z.h]:[oe+D/z.w,oe+$-D/z.w],se.setScale(),e.attr("transform",c(Math.round(z.l),Math.round(z.t)));var pe,ve=e.select("."+k.cbtitleunshift).attr("transform",c(-Math.round(z.l),-Math.round(z.t))),me=se.ticklabelposition,ge=se.title.font.size,ye=e.select("."+k.cbaxis),xe=0,be=0;function _e(r,a){var i={propContainer:se,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:I._dfltTitle.colorbar,containerGroup:e.select("."+k.cbtitle)},o="h"===r.charAt(0)?r.substr(1):"h"+r;e.selectAll("."+o+",."+o+"-math-group").remove(),v.draw(n,r,d(i,a||{}))}function Ae(){var e,t;(o&&ue||!o&&!ue)&&("top"===H&&(e=D+z.l+ee*P,t=O+z.t+te*(1-oe-$)+3+.75*ge),"bottom"===H&&(e=D+z.l+ee*P,t=O+z.t+te*(1-oe)-3-.25*ge),"right"===H&&(t=O+z.t+te*N+3+.75*ge,e=D+z.l+ee*oe),_e(se._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}}))}function we(){if(o&&!ue||!o&&ue){var e,a,i=se.position||0,l=se._offset+se._length/2;if("right"===H)a=l,e=z.l+ee*i+10+ge*(se.showticklabels?1:.5);else if(e=l,"bottom"===H&&(a=z.t+te*i+10+(-1===me.indexOf("inside")?se.tickfont.size:0)+("intside"!==se.ticks&&t.ticklen||0)),"top"===H){var s=U.text.split("
").length;a=z.t+te*i+10-J-A*ge*s}_e((o?"h":"v")+se._id+"title",{avoid:{selection:r.select(n).selectAll("g."+se._id+"tick"),side:H,offsetTop:o?0:z.t,offsetLeft:o?z.l:0,maxShift:o?I.width:I.height},attributes:{x:e,y:a,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}}function Te(){if(!o&&!ue||o&&ue){var i,s=e.select("."+k.cbtitle),d=s.select("text"),f=[-M/2,M/2],p=s.select(".h"+se._id+"title-math-group").node(),v=15.6;if(d.node()&&(v=parseInt(d.node().style.fontSize,10)*A),p?(i=h.bBox(p),be=i.width,(xe=i.height)>v&&(f[1]-=(xe-v)/2)):d.node()&&!d.classed(k.jsPlaceholder)&&(i=h.bBox(d.node()),be=i.width,xe=i.height),o){if(xe){if(xe+=5,"top"===H)se.domain[1]-=xe/z.h,f[1]*=-1;else{se.domain[0]+=xe/z.h;var g=m.lineCount(d);f[1]+=(1-g)*v}s.attr("transform",c(f[0],f[1])),se.setScale()}}else be&&("right"===H&&(se.domain[0]+=(be+ge/2)/z.w),s.attr("transform",c(f[0],f[1])),se.setScale())}e.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",o?c(0,Math.round(z.h*(1-se.domain[1]))):c(Math.round(z.w*se.domain[0]),0)),ye.attr("transform",o?c(0,Math.round(-z.t)):c(Math.round(-z.l),0));var y=e.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(Z);y.enter().append("rect").classed(k.cbfill,!0).attr("style",""),y.exit().remove();var x=Y.map(se.c2p).map(Math.round).sort((function(e,t){return e-t}));y.each((function(e,i){var l=[0===i?Y[0]:(Z[i]+Z[i-1])/2,i===Z.length-1?Y[1]:(Z[i]+Z[i+1])/2].map(se.c2p).map(Math.round);o&&(l[1]=u.constrain(l[1]+(l[1]>l[0])?1:-1,x[0],x[1]));var s=r.select(this).attr(o?"x":"y",ne).attr(o?"y":"x",r.min(l)).attr(o?"width":"height",Math.max(J,2)).attr(o?"height":"width",Math.max(r.max(l)-r.min(l),2));if(t._fillgradient)h.gradient(s,n,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var c=G(e).replace("e-","");s.attr("fill",a(c).toHexString())}}));var b=e.select("."+k.cblines).selectAll("path."+k.cbline).data(B.color&&B.width?X:[]);b.enter().append("path").classed(k.cbline,!0),b.exit().remove(),b.each((function(e){var t=ne,n=Math.round(se.c2p(e))+B.width/2%1;r.select(this).attr("d","M"+(o?t+","+n:n+","+t)+(o?"h":"v")+J).call(h.lineGroupStyle,B.width,V(e),B.dash)})),ye.selectAll("g."+se._id+"tick,path").remove();var _=ne+J+(M||0)/2-("outside"===t.ticks?1:0),w=l.calcTicks(se),T=l.getTickSigns(se)[2];return l.drawTicks(n,se,{vals:"inside"===se.ticks?l.clipEnds(se,w):w,layer:ye,path:l.makeTickPath(se,_,T),transFn:l.makeTransTickFn(se)}),l.drawLabels(n,se,{vals:w,layer:ye,transFn:l.makeTransTickLabelFn(se),labelFns:l.makeLabelFns(se,_)})}function ke(){var r,l=J+M/2;-1===me.indexOf("inside")&&(r=h.bBox(ye.node()),l+=o?r.width:r.height),pe=ve.select("text");var u=0,d=o&&"top"===H,v=!o&&"right"===H,m=0;if(pe.node()&&!pe.classed(k.jsPlaceholder)){var y,x=ve.select(".h"+se._id+"title-math-group").node();x&&(o&&ue||!o&&!ue)?(u=(r=h.bBox(x)).width,y=r.height):(u=(r=h.bBox(ve.node())).right-z.l-(o?ne:le),y=r.bottom-z.t-(o?le:ne),o||"top"!==H||(l+=r.height,m=r.height)),v&&(pe.attr("transform",c(u/2+ge/2,0)),u*=2),l=Math.max(l,o?u:y)}var b=2*(o?D:O)+l+S+M/2,A=0;!o&&U.text&&"bottom"===E&&N<=0&&(b+=A=b/2,m+=A),I._hColorbarMoveTitle=A,I._hColorbarMoveCBTitle=m;var F=S+M,B=(o?ne:le)-F/2-(o?D:0),Y=(o?le:ne)-(o?K:O+m-A);e.select("."+k.cbbg).attr("x",B).attr("y",Y).attr(o?"width":"height",Math.max(b-A,2)).attr(o?"height":"width",Math.max(K+F,2)).call(p.fill,C).call(p.stroke,t.bordercolor).style("stroke-width",S);var V=v?Math.max(u-10,0):0;e.selectAll("."+k.cboutline).attr("x",(o?ne:le+D)+V).attr("y",(o?le+O-K:ne)+(d?xe:0)).attr(o?"width":"height",Math.max(J,2)).attr(o?"height":"width",Math.max(K-(o?2*O+xe:2*D+V),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":M});var G=o?re*b:0,W=o?0:(1-ae)*b-m;if(G=j?z.l-G:-G,W=R?z.t-W:-W,e.attr("transform",c(G,W)),!o&&(S||a(C).getAlpha()&&!a.equals(I.paper_bgcolor,C))){var q=ye.selectAll("text"),Z=q[0].length,X=e.select("."+k.cbbg).node(),Q=h.bBox(X),$=h.getTranslate(e),ee=2;q.each((function(e,t){var n=0,r=Z-1;if(t===n||t===r){var a,i=h.bBox(this),o=h.getTranslate(this);if(t===r){var l=i.right+o.x;(a=Q.right+$.x+le-S-ee+P-l)>0&&(a=0)}else if(t===n){var s=i.left+o.x;(a=Q.left+$.x+le+S+ee-s)<0&&(a=0)}a&&(Z<3?this.setAttribute("transform","translate("+a+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var te={},ie=w[L],oe=T[L],ce=w[E],de=T[E],fe=b-J;o?("pixels"===f?(te.y=N,te.t=K*ce,te.b=K*de):(te.t=te.b=0,te.yt=N+s*ce,te.yb=N-s*de),"pixels"===_?(te.x=P,te.l=b*ie,te.r=b*oe):(te.l=fe*ie,te.r=fe*oe,te.xl=P-g*ie,te.xr=P+g*oe)):("pixels"===f?(te.x=P,te.l=K*ie,te.r=K*oe):(te.l=te.r=0,te.xl=P+s*ie,te.xr=P-s*oe),"pixels"===_?(te.y=1-N,te.t=b*ce,te.b=b*de):(te.t=fe*ce,te.b=fe*de,te.yt=N-g*ce,te.yb=N+g*de));var he=t.y<.5?"b":"t",be=t.x<.5?"l":"r";n._fullLayout._reservedMargin[t._id]={};var _e={r:I.width-B-G,l:B+te.r,b:I.height-Y-W,t:Y+te.b};j&&R?i.autoMargin(n,t._id,te):j?n._fullLayout._reservedMargin[t._id][he]=_e[he]:R||o?n._fullLayout._reservedMargin[t._id][be]=_e[be]:n._fullLayout._reservedMargin[t._id][he]=_e[he]}return u.syncOrAsync([i.previousPromises,Ae,Te,we,i.previousPromises,ke],n)}(n,t,e);g&&g.then&&(e._promises||[]).push(g),e._context.edits.colorbarPosition&&function(e,t,n){var r,a,i,l="v"===t.orientation,u=n._fullLayout,d=u._size;s.init({element:e.node(),gd:n,prepFn:function(){r=e.attr("transform"),f(e)},moveFn:function(n,o){e.attr("transform",r+c(n,o)),a=s.align((l?t._uFrac:t._vFrac)+n/d.w,l?t._thickFrac:t._lenFrac,0,1,t.xanchor),i=s.align((l?t._vFrac:1-t._uFrac)-o/d.h,l?t._lenFrac:t._thickFrac,0,1,t.yanchor);var u=s.getCursor(a,i,t.xanchor,t.yanchor);f(e,u)},doneFn:function(){if(f(e),void 0!==a&&void 0!==i){var r={};r[t._propPrefix+"x"]=a,r[t._propPrefix+"y"]=i,void 0!==t._traceIndex?o.call("_guiRestyle",n,r,t._traceIndex):o.call("_guiRelayout",n,r)}}})}(n,t,e)})),t.exit().each((function(t){i.autoMargin(e,t._id)})).remove(),t.order()}}},553:function(e,t,n){"use strict";var r=n(3400);e.exports=function(e){return r.isPlainObject(e.colorbar)}},5080:function(e,t,n){"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:n(616),supplyDefaults:n(4013),draw:n(7848).draw,hasColorbar:n(553)}},9084:function(e,t,n){"use strict";var r=n(616),a=n(3756).counter,i=n(2996),o=n(8304).scales;function l(e){return"`"+e+"`"}i(o),e.exports=function(e,t){e=e||"";var n,i=(t=t||{}).cLetter||"c",s=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),u="showScaleDflt"in t?t.showScaleDflt:"z"===i,c="string"===typeof t.colorscaleDflt?o[t.colorscaleDflt]:null,d=t.editTypeOverride||"",f=e?e+".":"";"colorAttr"in t?(n=t.colorAttr,t.colorAttr):l(f+(n={z:"z",c:"color"}[i]));var h=i+"auto",p=i+"min",v=i+"max",m=i+"mid",g=(l(f+h),l(f+p),l(f+v),{});g[p]=g[v]=void 0;var y={};y[h]=!1;var x={};return"color"===n&&(x.color={valType:"color",arrayOk:!0,editType:d||"style"},t.anim&&(x.color.anim=!0)),x[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:g},x[p]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[v]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:g},x.colorscale={valType:"colorscale",editType:"calc",dflt:c,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},s||(x.showscale={valType:"boolean",dflt:u,editType:"calc"},x.colorbar=r),t.noColorAxis||(x.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),x}},7128:function(e,t,n){"use strict";var r=n(8248),a=n(3400),i=n(4288).extractOpts;e.exports=function(e,t,n){var o,l=e._fullLayout,s=n.vals,u=n.containerStr,c=u?a.nestedProperty(t,u).get():t,d=i(c),f=!1!==d.auto,h=d.min,p=d.max,v=d.mid,m=function(){return a.aggNums(Math.min,null,s)},g=function(){return a.aggNums(Math.max,null,s)};void 0===h?h=m():f&&(h=c._colorAx&&r(h)?Math.min(h,m()):m()),void 0===p?p=g():f&&(p=c._colorAx&&r(p)?Math.max(p,g()):g()),f&&void 0!==v&&(p-v>v-h?h=v-(p-v):p-v=0?l.colorscale.sequential:l.colorscale.sequentialminus,d._sync("colorscale",o))}},5504:function(e,t,n){"use strict";var r=n(3400),a=n(4288).hasColorscale,i=n(4288).extractOpts;e.exports=function(e,t){function n(e,t){var n=e["_"+t];void 0!==n&&(e[t]=n)}function o(e,a){var o=a.container?r.nestedProperty(e,a.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var l=i(o),s=l.auto;(s||void 0===l.min)&&n(o,a.min),(s||void 0===l.max)&&n(o,a.max),l.autocolorscale&&n(o,"colorscale")}}for(var l=0;l=0;r--,a++){var i=e[r];n[a]=[1-i[0],i[1]]}return n}function p(e,t){t=t||{};for(var n=e.domain,o=e.range,s=o.length,u=new Array(s),c=0;c4/3-l?o:l}},7416:function(e,t,n){"use strict";var r=n(3400),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(e,t,n,i){return e="left"===n?0:"center"===n?1:"right"===n?2:r.constrain(Math.floor(3*e),0,2),t="bottom"===i?0:"middle"===i?1:"top"===i?2:r.constrain(Math.floor(3*t),0,2),a[t][e]}},2760:function(e,t){"use strict";t.selectMode=function(e){return"lasso"===e||"select"===e},t.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.openMode=function(e){return"drawline"===e||"drawopenpath"===e},t.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}},6476:function(e,t,n){"use strict";var r=n(9128),a=n(2264),i=n(9184),o=n(3400).removeElement,l=n(3816),s=e.exports={};s.align=n(8316),s.getCursor=n(7416);var u=n(2616);function c(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function d(e){return r(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=u.wrapped,s.unhoverRaw=u.raw,s.init=function(e){var t,n,r,u,f,h,p,v,m=e.gd,g=1,y=m._context.doubleClickDelay,x=e.element;m._mouseDownTime||(m._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,i?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=e.clampFn||function(e,t,n){return Math.abs(e)y&&(g=Math.max(g-1,1)),m._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(g,h),!v){var n;try{n=new MouseEvent("click",t)}catch(i){var r=d(t);(n=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,r[0],r[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}p.dispatchEvent(n)}m._dragging=!1,m._dragged=!1}else m._dragged=!1}},s.coverSlip=c},2616:function(e,t,n){"use strict";var r=n(5924),a=n(1200),i=n(2200).getGraphDiv,o=n(2456),l=e.exports={};l.wrapped=function(e,t,n){(e=i(e))._fullLayout&&a.clear(e._fullLayout._uid+o.HOVERID),l.raw(e,t,n)},l.raw=function(e,t){var n=e._fullLayout,a=e._hoverdata;t||(t={}),t.target&&!e._dragged&&!1===r.triggerHandler(e,"plotly_beforehover",t)||(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&a&&e.emit("plotly_unhover",{event:t,points:a}))}},8192:function(e,t){"use strict";t.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},t.c={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"}},3616:function(e,t,n){"use strict";var r=n(3428),a=n(3400),i=a.numberFormat,o=n(8248),l=n(9760),s=n(4040),u=n(6308),c=n(8932),d=a.strTranslate,f=n(2736),h=n(9616),p=n(4284).LINE_SPACING,v=n(3448).DESELECTDIM,m=n(3028),g=n(7152),y=n(624).appendArrayPointValue,x=e.exports={};function b(e,t,n,r){var a=t.fillpattern,i=t.fillgradient,o=a&&x.getPatternAttr(a.shape,0,"");if(o){var l=x.getPatternAttr(a.bgcolor,0,null),s=x.getPatternAttr(a.fgcolor,0,null),c=a.fgopacity,d=x.getPatternAttr(a.size,0,8),f=x.getPatternAttr(a.solidity,0,.3),h=t.uid;x.pattern(e,"point",n,h,o,d,f,void 0,a.fillmode,l,s,c)}else if(i&&"none"!==i.type){var p,v,m=i.type,g="scatterfill-"+t.uid;r&&(g="legendfill-"+t.uid),r||void 0===i.start&&void 0===i.stop?("horizontal"===m&&(m+="reversed"),e.call(x.gradient,n,g,m,i.colorscale,"fill")):("horizontal"===m?(p={x:i.start,y:0},v={x:i.stop,y:0}):"vertical"===m&&(p={x:0,y:i.start},v={x:0,y:i.stop}),p.x=t._xA.c2p(void 0===p.x?t._extremes.x.min[0].val:p.x,!0),p.y=t._yA.c2p(void 0===p.y?t._extremes.y.min[0].val:p.y,!0),v.x=t._xA.c2p(void 0===v.x?t._extremes.x.max[0].val:v.x,!0),v.y=t._yA.c2p(void 0===v.y?t._extremes.y.max[0].val:v.y,!0),e.call(M,n,g,"linear",i.colorscale,"fill",p,v,!0,!1))}else t.fillcolor&&e.call(u.fill,t.fillcolor)}x.font=function(e,t,n,r){a.isPlainObject(t)&&(r=t.color,n=t.size,t=t.family),t&&e.style("font-family",t),n+1&&e.style("font-size",n+"px"),r&&e.call(u.fill,r)},x.setPosition=function(e,t,n){e.attr("x",t).attr("y",n)},x.setSize=function(e,t,n){e.attr("width",t).attr("height",n)},x.setRect=function(e,t,n,r,a){e.call(x.setPosition,t,n).call(x.setSize,r,a)},x.translatePoint=function(e,t,n,r){var a=n.c2p(e.x),i=r.c2p(e.y);return!!(o(a)&&o(i)&&t.node())&&("text"===t.node().nodeName?t.attr("x",a).attr("y",i):t.attr("transform",d(a,i)),!0)},x.translatePoints=function(e,t,n){e.each((function(e){var a=r.select(this);x.translatePoint(e,a,t,n)}))},x.hideOutsideRangePoint=function(e,t,n,r,a,i){t.attr("display",n.isPtWithinRange(e,a)&&r.isPtWithinRange(e,i)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var n=t.xaxis,a=t.yaxis;e.each((function(t){var i=t[0].trace,o=i.xcalendar,l=i.ycalendar,u=s.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(u).each((function(e){x.hideOutsideRangePoint(e,r.select(this),n,a,o,l)}))}))}},x.crispRound=function(e,t,n){return t&&o(t)?e._context.staticPlot?t:t<1?1:Math.round(t):n||0},x.singleLineStyle=function(e,t,n,r,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=n||i.width||0,l=a||i.dash||"";u.stroke(t,r||i.color),x.dashLine(t,l,o)},x.lineGroupStyle=function(e,t,n,a){e.style("fill","none").each((function(e){var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";r.select(this).call(u.stroke,n||i.color).call(x.dashLine,l,o)}))},x.dashLine=function(e,t,n){n=+n||0,t=x.dashStyle(t,n),e.style({"stroke-dasharray":t,"stroke-width":n+"px"})},x.dashStyle=function(e,t){t=+t||1;var n=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=n+"px,"+n+"px":"dash"===e?e=3*n+"px,"+3*n+"px":"longdash"===e?e=5*n+"px,"+5*n+"px":"dashdot"===e?e=3*n+"px,"+n+"px,"+n+"px,"+n+"px":"longdashdot"===e&&(e=5*n+"px,"+2*n+"px,"+n+"px,"+2*n+"px"),e},x.singleFillStyle=function(e,t){var n=r.select(e.node());b(e,((n.data()[0]||[])[0]||{}).trace||{},t,!1)},x.fillGroupStyle=function(e,t,n){e.style("stroke-width",0).each((function(e){var a=r.select(this);e[0].trace&&b(a,e[0].trace,t,n)}))};var _=n(1984);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(_).forEach((function(e){var t=_[e],n=t.n;x.symbolList.push(n,String(n),e,n+100,String(n+100),e+"-open"),x.symbolNames[n]=e,x.symbolFuncs[n]=t.f,x.symbolBackOffs[n]=t.backoff||0,t.needLine&&(x.symbolNeedLines[n]=!0),t.noDot?x.symbolNoDot[n]=!0:x.symbolList.push(n+200,String(n+200),e+"-dot",n+300,String(n+300),e+"-open-dot"),t.noFill&&(x.symbolNoFill[n]=!0)}));var A=x.symbolNames.length;function w(e,t,n,r){var a=e%100;return x.symbolFuncs[a](t,n,r)+(e>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(e){if(o(e))e=+e;else if("string"===typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=x.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=A||e>=400?0:Math.floor(Math.max(e,0))};var T=i("~f"),k={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function M(e,t,n,i,o,s,c,d,f,h){var p,v=o.length;"linear"===i?p={node:"linearGradient",attrs:{x1:c.x,y1:c.y,x2:d.x,y2:d.y,gradientUnits:f?"userSpaceOnUse":"objectBoundingBox"},reversed:h}:"radial"===i&&(p={node:"radialGradient",reversed:h});for(var m=new Array(v),g=0;g=0&&void 0===e.i&&(e.i=o.i),t.style("opacity",r.selectedOpacityFn?r.selectedOpacityFn(e):void 0===e.mo?l.opacity:e.mo),r.ms2mrc){var c;c="various"===e.ms||"various"===l.size?3:r.ms2mrc(e.ms),e.mrc=c,r.selectedSizeFn&&(c=e.mrc=r.selectedSizeFn(e));var d=x.symbolNumber(e.mx||l.symbol)||0;e.om=d%200>=100;var f=te(e,n),h=V(e,n);t.attr("d",w(d,c,f,h))}var p,v,m,g=!1;if(e.so)m=s.outlierwidth,v=s.outliercolor,p=l.outliercolor;else{var y=(s||{}).width;m=(e.mlw+1||y+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,v="mlc"in e?e.mlcc=r.lineScale(e.mlc):a.isArrayOrTypedArray(s.color)?u.defaultLine:s.color,a.isArrayOrTypedArray(l.color)&&(p=u.defaultLine,g=!0),p="mc"in e?e.mcc=r.markerScale(e.mc):l.color||l.colors||"rgba(0,0,0,0)",r.selectedColorFn&&(p=r.selectedColorFn(e))}if(e.om)t.call(u.stroke,p).style({"stroke-width":(m||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:m)+"px");var b=l.gradient,_=e.mgt;_?g=!0:_=b&&b.type,a.isArrayOrTypedArray(_)&&(_=_[0],k[_]||(_=0));var A=l.pattern,T=A&&x.getPatternAttr(A.shape,e.i,"");if(_&&"none"!==_){var M=e.mgc;M?g=!0:M=b.color;var S=n.uid;g&&(S+="-"+e.i),x.gradient(t,i,S,_,[[0,M],[1,p]],"fill")}else if(T){var C=!1,L=A.fgcolor;!L&&o&&o.color&&(L=o.color,C=!0);var E=x.getPatternAttr(L,e.i,o&&o.color||null),D=x.getPatternAttr(A.bgcolor,e.i,null),O=A.fgopacity,P=x.getPatternAttr(A.size,e.i,8),N=x.getPatternAttr(A.solidity,e.i,.3);C=C||e.mcc||a.isArrayOrTypedArray(A.shape)||a.isArrayOrTypedArray(A.bgcolor)||a.isArrayOrTypedArray(A.fgcolor)||a.isArrayOrTypedArray(A.size)||a.isArrayOrTypedArray(A.solidity);var R=n.uid;C&&(R+="-"+e.i),x.pattern(t,"point",i,R,T,P,N,e.mcc,A.fillmode,D,E,O)}else a.isArrayOrTypedArray(p)?u.fill(t,p[e.i]):u.fill(t,p);m&&u.stroke(t,v)}},x.makePointStyleFns=function(e){var t={},n=e.marker;return t.markerScale=x.tryColorscale(n,""),t.lineScale=x.tryColorscale(n,"line"),s.traceIs(e,"symbols")&&(t.ms2mrc=m.isBubble(e)?g(e):function(){return(n.size||6)/2}),e.selectedpoints&&a.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},n=e.selected||{},r=e.unselected||{},i=e.marker||{},o=n.marker||{},l=r.marker||{},u=i.opacity,c=o.opacity,d=l.opacity,f=void 0!==c,h=void 0!==d;(a.isArrayOrTypedArray(u)||f||h)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?i.opacity:e.mo;return e.selected?f?c:t:h?d:v*t});var p=i.color,m=o.color,g=l.color;(m||g)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?m||t:g||t});var y=i.size,x=o.size,b=l.size,_=void 0!==x,A=void 0!==b;return s.traceIs(e,"symbols")&&(_||A)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?_?x/2:t:A?b/2:t}),t},x.makeSelectedTextStyleFns=function(e){var t={},n=e.selected||{},r=e.unselected||{},a=e.textfont||{},i=n.textfont||{},o=r.textfont||{},l=a.color,s=i.color,c=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||l;return e.selected?s||t:c||(s?t:u.addOpacity(t,v))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=x.makeSelectedPointStyleFns(t),a=t.marker||{},i=[];n.selectedOpacityFn&&i.push((function(e,t){e.style("opacity",n.selectedOpacityFn(t))})),n.selectedColorFn&&i.push((function(e,t){u.fill(e,n.selectedColorFn(t))})),n.selectedSizeFn&&i.push((function(e,r){var i=r.mx||a.symbol||0,o=n.selectedSizeFn(r);e.attr("d",w(x.symbolNumber(i),o,te(r,t),V(r,t))),r.mrc2=o})),i.length&&e.each((function(e){for(var t=r.select(this),n=0;n0?n:0}function O(e,t,n){return n&&(e=z(e)),t?N(e[1]):P(e[0])}function P(e){var t=r.round(e,2);return S=t,t}function N(e){var t=r.round(e,2);return C=t,t}function R(e,t,n,r){var a=e[0]-t[0],i=e[1]-t[1],o=n[0]-t[0],l=n[1]-t[1],s=Math.pow(a*a+i*i,.25),u=Math.pow(o*o+l*l,.25),c=(u*u*a-s*s*o)*r,d=(u*u*i-s*s*l)*r,f=3*u*(s+u),h=3*s*(s+u);return[[P(t[0]+(f&&c/f)),N(t[1]+(f&&d/f))],[P(t[0]-(h&&c/h)),N(t[1]-(h&&d/h))]]}x.textPointStyle=function(e,t,n){if(e.size()){var i;if(t.selectedpoints){var o=x.makeSelectedTextStyleFns(t);i=o.selectedTextColorFn}var l=t.texttemplate,s=n._fullLayout;e.each((function(e){var o=r.select(this),u=l?a.extractOption(e,t,"txt","texttemplate"):a.extractOption(e,t,"tx","text");if(u||0===u){if(l){var c=t._module.formatLabels,d=c?c(e,t,s):{},h={};y(h,t,e.i);var p=t._meta||{};u=a.texttemplateString(u,d,s._d3locale,h,e,p)}var v=e.tp||t.textposition,m=D(e,t),g=i?i(e):e.tc||t.textfont.color;o.call(x.font,e.tf||t.textfont.family,m,g).text(u).call(f.convertToTspans,n).call(E,v,m,e.mrc)}else o.remove()}))}},x.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=x.makeSelectedTextStyleFns(t);e.each((function(e){var a=r.select(this),i=n.selectedTextColorFn(e),o=e.tp||t.textposition,l=D(e,t);u.fill(a,i);var c=s.traceIs(t,"bar-like");E(a,o,l,e.mrc2||e.mrc,c)}))}},x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var n,r="M"+e[0],a=[];for(n=1;n=u||A>=d&&A<=u)&&(w<=f&&w>=c||w>=f&&w<=c)&&(e=[A,w])}return e}x.steps=function(e){var t=j[e]||I;return function(e){for(var n="M"+P(e[0][0])+","+N(e[0][1]),r=e.length,a=1;a=1e4&&(x.savedBBoxes={},F=0),n&&(x.savedBBoxes[n]=m),F++,a.extendFlat({},m)},x.setClipUrl=function(e,t,n){e.attr("clip-path",U(t,n))},x.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,n){return[t,n].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},x.setTranslate=function(e,t,n){var r=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[r]("transform")||"";return t=t||0,n=n||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=d(t,n)).trim(),e[a]("transform",i),i},x.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,n){return[t,n].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},x.setScale=function(e,t,n){var r=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[r]("transform")||"";return t=t||1,n=n||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+="scale("+t+","+n+")").trim(),e[a]("transform",i),i};var H=/\s*sc.*/;x.setPointGroupScale=function(e,t,n){if(t=t||1,n=n||1,e){var r=1===t&&1===n?"":"scale("+t+","+n+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(H,"");e=(e+=r).trim(),this.setAttribute("transform",e)}))}};var Y=/translate\([^)]*\)\s*$/;function V(e,t){var n;return e&&(n=e.mf),void 0===n&&(n=t.marker&&t.marker.standoff||0),t._geo||t._xA?n:-n}x.setTextPointsScale=function(e,t,n){e&&e.each((function(){var e,a=r.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(a.attr("transform")||"").match(Y);e=1===t&&1===n?[]:[d(o,l),"scale("+t+","+n+")",d(-o,-l)],s&&e.push(s),a.attr("transform",e.join(""))}}))},x.getMarkerStandoff=V;var G,W,q,Z,X,J,Q=Math.atan2,K=Math.cos,$=Math.sin;function ee(e,t){var n=t[0],r=t[1];return[n*K(e)-r*$(e),n*$(e)+r*K(e)]}function te(e,t){var n,r,i=e.ma;void 0===i&&((i=t.marker.angle)&&!a.isArrayOrTypedArray(i)||(i=0));var l=t.marker.angleref;if("previous"===l||"north"===l){if(t._geo){var s=t._geo.project(e.lonlat);n=s[0],r=s[1]}else{var u=t._xA,c=t._yA;if(!u||!c)return 90;n=u.c2p(e.x),r=c.c2p(e.y)}if(t._geo){var d,f=e.lonlat[0],h=e.lonlat[1],p=t._geo.project([f,h+1e-5]),v=t._geo.project([f+1e-5,h]),m=Q(v[1]-r,v[0]-n),g=Q(p[1]-r,p[0]-n);if("north"===l)d=i/180*Math.PI;else if("previous"===l){var y=f/180*Math.PI,x=h/180*Math.PI,b=G/180*Math.PI,_=W/180*Math.PI,A=b-y,w=K(_)*$(A),T=$(_)*K(x)-K(_)*$(x)*K(A);d=-Q(w,T)-Math.PI,G=f,W=h}var k=ee(m,[K(d),0]),M=ee(g,[$(d),0]);i=Q(k[1]+M[1],k[0]+M[0])/Math.PI*180,"previous"!==l||J===t.uid&&e.i===X+1||(i=null)}if("previous"===l&&!t._geo)if(J===t.uid&&e.i===X+1&&o(n)&&o(r)){var S=n-q,C=r-Z,L=t.line&&t.line.shape||"",E=L.slice(L.length-1);"h"===E&&(C=0),"v"===E&&(S=0),i+=Q(C,S)/Math.PI*180+90}else i=null}return q=n,Z=r,X=e.i,J=t.uid,i}x.getMarkerAngle=te},1984:function(e,t,n){"use strict";var r,a,i,o,l=n(9604),s=n(3428).round,u="M0,0Z",c=Math.sqrt(2),d=Math.sqrt(3),f=Math.PI,h=Math.cos,p=Math.sin;function v(e){return null===e}function m(e,t,n){if((!e||e%360===0)&&!t)return n;if(i===e&&o===t&&r===n)return a;function s(e,n){var r=h(e),a=p(e),i=n[0],o=n[1]+(t||0);return[i*r-o*a,i*a+o*r]}i=e,o=t,r=n;for(var u=e/180*f,c=0,d=0,v=l(n),m="",g=0;g0,d=e._context.staticPlot;t.each((function(t){var f,h=t[0].trace,p=h.error_x||{},v=h.error_y||{};h.ids&&(f=function(e){return e.id});var m=o.hasMarkers(h)&&h.marker.maxdisplayed>0;v.visible||p.visible||(t=[]);var g=r.select(this).selectAll("g.errorbar").data(t,f);if(g.exit().remove(),t.length){p.visible||g.selectAll("path.xerror").remove(),v.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var y=g.enter().append("g").classed("errorbar",!0);c&&y.style("opacity",0).transition().duration(l.duration).style("opacity",1),i.setClipUrl(g,n.layerClipId,e),g.each((function(e){var t=r.select(this),n=function(e,t,n){var r={x:t.c2p(e.x),y:n.c2p(e.y)};return void 0!==e.yh&&(r.yh=n.c2p(e.yh),r.ys=n.c2p(e.ys),a(r.ys)||(r.noYS=!0,r.ys=n.c2p(e.ys,!0))),void 0!==e.xh&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),a(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}(e,s,u);if(!m||e.vis){var i,o=t.select("path.yerror");if(v.visible&&a(n.x)&&a(n.yh)&&a(n.ys)){var f=v.width;i="M"+(n.x-f)+","+n.yh+"h"+2*f+"m-"+f+",0V"+n.ys,n.noYS||(i+="m-"+f+",0h"+2*f),o.size()?c&&(o=o.transition().duration(l.duration).ease(l.easing)):o=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",i)}else o.remove();var h=t.select("path.xerror");if(p.visible&&a(n.y)&&a(n.xh)&&a(n.xs)){var g=(p.copy_ystyle?v:p).width;i="M"+n.xh+","+(n.y-g)+"v"+2*g+"m0,-"+g+"H"+n.xs,n.noXS||(i+="m0,-"+g+"v"+2*g),h.size()?c&&(h=h.transition().duration(l.duration).ease(l.easing)):h=t.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("xerror",!0),h.attr("d",i)}else h.remove()}}))}}))}},2036:function(e,t,n){"use strict";var r=n(3428),a=n(6308);e.exports=function(e){e.each((function(e){var t=e[0].trace,n=t.error_y||{},i=t.error_x||{},o=r.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(a.stroke,n.color),i.copy_ystyle&&(i=n),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)}))}},5756:function(e,t,n){"use strict";var r=n(5376),a=n(5460).hoverlabel,i=n(2880).extendFlat;e.exports={hoverlabel:{bgcolor:i({},a.bgcolor,{arrayOk:!0}),bordercolor:i({},a.bordercolor,{arrayOk:!0}),font:r({arrayOk:!0,editType:"none"}),align:i({},a.align,{arrayOk:!0}),namelength:i({},a.namelength,{arrayOk:!0}),editType:"none"}}},5056:function(e,t,n){"use strict";var r=n(3400),a=n(4040);function i(e,t,n,a){a=a||r.identity,Array.isArray(e)&&(t[0][n]=a(e))}e.exports=function(e){var t=e.calcdata,n=e._fullLayout;function o(e){return function(t){return r.coerceHoverinfo({hoverinfo:t},{_module:e._module},n)}}for(var l=0;l=0&&n.index_[0]._length||se<0||se>A[0]._length)return p.unhoverRaw(e,t)}else le="xpx"in t?t.xpx:_[0]._length/2,se="ypx"in t?t.ypx:A[0]._length/2;if(t.pointerX=le+_[0]._offset,t.pointerY=se+A[0]._offset,V="xval"in t?g.flat(s,t.xval):g.p2c(_,le),G="yval"in t?g.flat(s,t.yval):g.p2c(A,se),!a(V[0])||!a(G[0]))return o.warn("Fx.hover failed",t,e),p.unhoverRaw(e,t)}var de=1/0;function fe(e,n){for(q=0;qne&&(re.splice(0,ne),de=re[0].distance),y&&0!==Y&&0===re.length){te.distance=Y,te.index=!1;var d=X._module.hoverPoints(te,$,ee,"closest",{hoverLayer:c._hoverlayer});if(d&&(d=d.filter((function(e){return e.spikeDistance<=Y}))),d&&d.length){var f,p=d.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(p.length){var v=p[0];a(v.x0)&&a(v.y0)&&(f=pe(v),(!ie.vLinePoint||ie.vLinePoint.spikeDistance>f.spikeDistance)&&(ie.vLinePoint=f))}var m=d.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(m.length){var x=m[0];a(x.x0)&&a(x.y0)&&(f=pe(x),(!ie.hLinePoint||ie.hLinePoint.spikeDistance>f.spikeDistance)&&(ie.hLinePoint=f))}}}}}function he(e,t,n){for(var r,a=null,i=1/0,o=0;o0&&Math.abs(e.distance)ke-1;Me--)Ee(re[Me]);re=Se,ye()}var De=e._hoverdata,Oe=[],Pe=U(e),Ne=H(e);for(W=0;W1||re.length>1)||"closest"===P&&oe&&re.length>1,qe=h.combine(c.plot_bgcolor||h.background,c.paper_bgcolor),Ze=O(re,{gd:e,hovermode:P,rotateLabels:We,bgColor:qe,container:c._hoverlayer,outerContainer:c._paper.node(),commonLabelOpts:c.hoverlabel,hoverdistance:c.hoverdistance}),Xe=Ze.hoverLabels;if(g.isUnifiedHover(P)||(function(e,t,n,r){var a,i,o,l,s,u,c,d=t?"xa":"ya",f=t?"ya":"xa",h=0,p=1,v=e.size(),m=new Array(v),g=0,y=r.minX,x=r.maxX,b=r.minY,_=r.maxY,A=function(e){return e*n._invScaleX},T=function(e){return e*n._invScaleY};function k(e){var t=e[0],n=e[e.length-1];if(i=t.pmin-t.pos-t.dp+t.size,o=n.pos+n.dp+n.size-t.pmax,i>.01){for(s=e.length-1;s>=0;s--)e[s].dp+=i;a=!1}if(!(o<.01)){if(i<-.01){for(s=e.length-1;s>=0;s--)e[s].dp-=o;a=!1}if(a){var r=0;for(l=0;lt.pmax&&r++;for(l=e.length-1;l>=0&&!(r<=0);l--)(u=e[l]).pos>t.pmax-1&&(u.del=!0,r--);for(l=0;l=0;s--)e[s].dp-=o;for(l=e.length-1;l>=0&&!(r<=0);l--)(u=e[l]).pos+u.dp+u.size>t.pmax&&(u.del=!0,r--)}}}for(e.each((function(e){var r=e[d],a=e[f],i="x"===r._id.charAt(0),o=r.range;0===g&&o&&o[0]>o[1]!==i&&(p=-1);var l=0,s=i?n.width:n.height;if("x"===n.hovermode||"y"===n.hovermode){var u,c,h=N(e,t),v=e.anchor,k="end"===v?-1:1;if("middle"===v)c=(u=e.crossPos+(i?T(h.y-e.by/2):A(e.bx/2+e.tx2width/2)))+(i?T(e.by):A(e.bx));else if(i)c=(u=e.crossPos+T(M+h.y)-T(e.by/2-M))+T(e.by);else{var S=A(k*M+h.x),C=S+A(k*e.bx);u=e.crossPos+Math.min(S,C),c=e.crossPos+Math.max(S,C)}i?void 0!==b&&void 0!==_&&Math.min(c,_)-Math.max(u,b)>1&&("left"===a.side?(l=a._mainLinePosition,s=n.width):s=a._mainLinePosition):void 0!==y&&void 0!==x&&Math.min(c,x)-Math.max(u,y)>1&&("top"===a.side?(l=a._mainLinePosition,s=n.height):s=a._mainLinePosition)}m[g++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(i?w:1)/2,pmin:l,pmax:s}]})),m.sort((function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)}));!a&&h<=v;){for(h++,a=!0,l=0;l.01&&L.pmin===E.pmin&&L.pmax===E.pmax){for(s=C.length-1;s>=0;s--)C[s].dp+=i;for(S.push.apply(S,C),m.splice(l+1,1),c=0,s=S.length-1;s>=0;s--)c+=S[s].dp;for(o=c/S.length,s=S.length-1;s>=0;s--)S[s].dp-=o;a=!1}else l++}m.forEach(k)}for(l=m.length-1;l>=0;l--){var D=m[l];for(s=D.length-1;s>=0;s--){var O=D[s],P=O.datum;P.offset=O.dp,P.del=O.del}}}(Xe,We,c,Ze.commonLabelBoundingBox),R(Xe,We,c._invScaleX,c._invScaleY)),l&&l.tagName){var Je=m.getComponentMethod("annotations","hasClickToShow")(e,Oe);d(r.select(l),Je?"pointer":"")}l&&!i&&function(e,t,n){if(!n||n.length!==e._hoverdata.length)return!0;for(var r=n.length-1;r>=0;r--){var a=n[r],i=e._hoverdata[r];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(e,0,De)&&(De&&e.emit("plotly_unhover",{event:t,points:De}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:_,yaxes:A,xvals:V,yvals:G}))}(e,t,n,i,l)}))},t.loneHover=function(e,t){var n=!0;Array.isArray(e)||(n=!1,e=[e]);var a=t.gd,i=U(a),o=H(a),l=O(e.map((function(e){var n=e._x0||e.x0||e.x||0,r=e._x1||e.x1||e.x||0,l=e._y0||e.y0||e.y||0,s=e._y1||e.y1||e.y||0,u=e.eventData;if(u){var c=Math.min(n,r),d=Math.max(n,r),f=Math.min(l,s),p=Math.max(l,s),v=e.trace;if(m.traceIs(v,"gl3d")){var g=a._fullLayout[v.scene]._scene.container,y=g.offsetLeft,x=g.offsetTop;c+=y,d+=y,f+=x,p+=x}u.bbox={x0:c+o,x1:d+o,y0:f+i,y1:p+i},t.inOut_bbox&&t.inOut_bbox.push(u.bbox)}else u=!1;return{color:e.color||h.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:u}})),{gd:a,hovermode:"closest",rotateLabels:!1,bgColor:t.bgColor||h.background,container:r.select(t.container),outerContainer:t.outerContainer||t.container}).hoverLabels,s=0,u=0;return l.sort((function(e,t){return e.y0-t.y0})).each((function(e,n){var r=e.y0-e.by/2;e.offset=r-5([\s\S]*)<\/extra>/;function O(e,t){var n=t.gd,a=n._fullLayout,i=t.hovermode,u=t.rotateLabels,d=t.bgColor,p=t.container,v=t.outerContainer,A=t.commonLabelOpts||{};if(0===e.length)return[[]];var w=t.fontFamily||y.HOVERFONT,T=t.fontSize||y.HOVERFONTSIZE,k=e[0],C=k.xa,L=k.ya,D=i.charAt(0),O=D+"Label",N=k[O];if(void 0===N&&"multicategory"===C.type)for(var R=0;Ra.width-b&&(_=a.width-b),t.attr("d","M"+(m-_)+",0L"+(m-_+M)+","+x+M+"H"+b+"v"+x+(2*S+y.height)+"H"+-b+"V"+x+M+"H"+(m-_-M)+"Z"),m=_,q.minX=m-b,q.maxX=m+b,"top"===C.side?(q.minY=g-(2*S+y.height),q.maxY=g-S):(q.minY=g+S,q.maxY=g+(2*S+y.height))}else{var E,D,O;"right"===L.side?(E="start",D=1,O="",m=C._offset+C._length):(E="end",D=-1,O="-",m=C._offset),g=L._offset+(k.y0+k.y1)/2,s.attr("text-anchor",E),t.attr("d","M0,0L"+O+M+","+M+"V"+(S+y.height/2)+"h"+O+(2*S+y.width)+"V-"+(S+y.height/2)+"H"+O+M+"V-"+M+"Z"),q.minY=g-(S+y.height/2),q.maxY=g+(S+y.height/2),"right"===L.side?(q.minX=m+M,q.maxX=m+M+(2*S+y.width)):(q.minX=m-M-(2*S+y.width),q.maxX=m-M);var P,R=y.height/2,j=I-y.top-R,z="clip"+a._uid+"commonlabel"+L._id;if(m=0?se:ue+fe=0?ue:be+fe=0?oe:le+he=0?le:_e+he=0,"top"!==e.idealAlign&&G||!W?G?(O+=j/2,e.anchor="start"):e.anchor="middle":(O-=j/2,e.anchor="end"),e.crossPos=O;else{if(e.pos=O,G=D+R/2+q<=z,W=D-R/2-q>=0,"left"!==e.idealAlign&&G||!W)if(G)D+=R/2,e.anchor="start";else{e.anchor="middle";var Z=q/2,X=D+Z-z,J=D-Z;X>0&&(D-=X),J<0&&(D+=-J)}else D-=R/2,e.anchor="end";e.crossPos=D}A.attr("text-anchor",e.anchor),C&&k.attr("text-anchor",e.anchor),t.attr("transform",l(D,O)+(u?s(_):""))})),{hoverLabels:Ae,commonLabelBoundingBox:q}}function P(e,t,n,r,a,i){var l="",s="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=o.templateString(e.name,e.trace._meta)),l=F(e.name,e.nameLength));var u=n.charAt(0),c="x"===u?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(s+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(s+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[u+"Label"]===a?s=e[c+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(s=e.yLabel):s=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(s+=(s?"
":"")+e.text),void 0!==e.extraText&&(s+=(s?"
":"")+e.extraText),i&&""===s&&!e.hovertemplate&&(""===l&&i.remove(),s=l);var d=e.hovertemplate||!1;if(d){var f=e.hovertemplateLabels||e;e[u+"Label"]!==a&&(f[u+"other"]=f[u+"Val"],f[u+"otherLabel"]=f[u+"Label"]),s=(s=o.hovertemplateString(d,f,r._d3locale,e.eventData[0]||{},e.trace._meta)).replace(D,(function(t,n){return l=F(n,e.nameLength),""}))}return[s,l]}function N(e,t){var n=0,r=e.offset;return t&&(r*=-k,n=e.offset*T),{x:n,y:r}}function R(e,t,n,a){var i=function(e){return e*n},o=function(e){return e*a};e.each((function(e){var n=r.select(this);if(e.del)return n.remove();var a=n.select("text.nums"),l=e.anchor,s="end"===l?-1:1,u=function(e){var t={start:1,end:-1,middle:0}[e.anchor],n=t*(M+S),r=n+t*(e.txwidth+S);return"middle"===e.anchor&&(n-=e.tx2width/2,r+=e.txwidth/2+S),{alignShift:t,textShiftX:n,text2ShiftX:r}}(e),d=N(e,t),h=d.x,p=d.y,v="middle"===l;n.select("path").attr("d",v?"M-"+i(e.bx/2+e.tx2width/2)+","+o(p-e.by/2)+"h"+i(e.bx)+"v"+o(e.by)+"h-"+i(e.bx)+"Z":"M0,0L"+i(s*M+h)+","+o(M+p)+"v"+o(e.by/2-M)+"h"+i(s*e.bx)+"v-"+o(e.by)+"H"+i(s*M+h)+"V"+o(p-M)+"Z");var m=h+u.textShiftX,g=p+e.ty0-e.by/2+S,y=e.textAlign||"auto";"auto"!==y&&("left"===y&&"start"!==l?(a.attr("text-anchor","start"),m=v?-e.bx/2-e.tx2width/2+S:-e.bx-S):"right"===y&&"end"!==l&&(a.attr("text-anchor","end"),m=v?e.bx/2-e.tx2width/2-S:e.bx+S)),a.call(c.positionText,i(m),o(g)),e.tx2width&&(n.select("text.name").call(c.positionText,i(u.text2ShiftX+u.alignShift*S+h),o(p+e.ty0-e.by/2+S)),n.select("rect").call(f.setRect,i(u.text2ShiftX+(u.alignShift-1)*e.tx2width/2+h),o(p-e.by/2-1),i(e.tx2width),o(e.by+2)))}))}function j(e,t){var n=e.index,r=e.trace||{},i=e.cd[0],l=e.cd[n]||{};function s(e){return e||a(e)&&0===e}var u=Array.isArray(n)?function(e,t){var a=o.castOption(i,n,e);return s(a)?a:o.extractOption({},r,"",t)}:function(e,t){return o.extractOption(l,r,e,t)};function c(t,n,r){var a=u(n,r);s(a)&&(e[t]=a)}if(c("hoverinfo","hi","hoverinfo"),c("bgcolor","hbg","hoverlabel.bgcolor"),c("borderColor","hbc","hoverlabel.bordercolor"),c("fontFamily","htf","hoverlabel.font.family"),c("fontSize","hts","hoverlabel.font.size"),c("fontColor","htc","hoverlabel.font.color"),c("nameLength","hnl","hoverlabel.namelength"),c("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===r.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=o.constrain(e.x0,0,e.xa._length),e.x1=o.constrain(e.x1,0,e.xa._length),e.y0=o.constrain(e.y0,0,e.ya._length),e.y1=o.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:v.hoverLabelText(e.xa,e.xLabelVal,r.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:v.hoverLabelText(e.ya,e.yLabelVal,r.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!("log"===e.xa.type&&e.xerr<=0)){var d=v.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+d+" / -"+v.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xb1 "+d,"x"===t&&(e.distance+=1)}if(!isNaN(e.yerr)&&!("log"===e.ya.type&&e.yerr<=0)){var f=v.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+f+" / -"+v.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xb1 "+f,"y"===t&&(e.distance+=1)}var h=e.hoverinfo||e.trace.hoverinfo;return h&&"all"!==h&&(-1===(h=Array.isArray(h)?h:h.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===h.indexOf("y")&&(e.yLabel=void 0),-1===h.indexOf("z")&&(e.zLabel=void 0),-1===h.indexOf("text")&&(e.text=void 0),-1===h.indexOf("name")&&(e.name=void 0)),e}function I(e,t,n){var r,a,o=n.container,l=n.fullLayout,s=l._size,u=n.event,c=!!t.hLinePoint,d=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),d||c){var p=h.combine(l.plot_bgcolor,l.paper_bgcolor);if(c){var m,g,y=t.hLinePoint;r=y&&y.xa,"cursor"===(a=y&&y.ya).spikesnap?(m=u.pointerX,g=u.pointerY):(m=r._offset+y.x,g=a._offset+y.y);var x,b,_=i.readability(y.color,p)<1.5?h.contrast(p):y.color,A=a.spikemode,w=a.spikethickness,T=a.spikecolor||_,k=v.getPxPosition(e,a);if(-1!==A.indexOf("toaxis")||-1!==A.indexOf("across")){if(-1!==A.indexOf("toaxis")&&(x=k,b=m),-1!==A.indexOf("across")){var M=a._counterDomainMin,S=a._counterDomainMax;"free"===a.anchor&&(M=Math.min(M,a.position),S=Math.max(S,a.position)),x=s.l+M*s.w,b=s.l+S*s.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":w,stroke:T,"stroke-dasharray":f.dashStyle(a.spikedash,w)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":w+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==A.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:k+("right"!==a.side?w:-w),cy:g,r:w,fill:T}).classed("spikeline",!0)}if(d){var C,L,E=t.vLinePoint;r=E&&E.xa,a=E&&E.ya,"cursor"===r.spikesnap?(C=u.pointerX,L=u.pointerY):(C=r._offset+E.x,L=a._offset+E.y);var D,O,P=i.readability(E.color,p)<1.5?h.contrast(p):E.color,N=r.spikemode,R=r.spikethickness,j=r.spikecolor||P,I=v.getPxPosition(e,r);if(-1!==N.indexOf("toaxis")||-1!==N.indexOf("across")){if(-1!==N.indexOf("toaxis")&&(D=I,O=L),-1!==N.indexOf("across")){var z=r._counterDomainMin,F=r._counterDomainMax;"free"===r.anchor&&(z=Math.min(z,r.position),F=Math.max(F,r.position)),D=s.t+(1-F)*s.h,O=s.t+(1-z)*s.h}o.insert("line",":first-child").attr({x1:C,x2:C,y1:D,y2:O,"stroke-width":R,stroke:j,"stroke-dasharray":f.dashStyle(r.spikedash,R)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:C,x2:C,y1:D,y2:O,"stroke-width":R+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==N.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:C,cy:I-("top"!==r.side?R:-R),r:R,fill:j}).classed("spikeline",!0)}}}function z(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function F(e,t){return c.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}function B(e,t,n){var r=t[e+"a"],a=t[e+"Val"],i=t.cd[0];if("category"===r.type||"multicategory"===r.type)a=r._categoriesMap[a];else if("date"===r.type){var o=t.trace[e+"periodalignment"];if(o){var l=t.cd[t.index],s=l[e+"Start"];void 0===s&&(s=l[e]);var u=l[e+"End"];void 0===u&&(u=l[e]);var c=u-s;"end"===o?a+=c:"middle"===o&&(a+=c/2)}a=r.d2c(a)}return i&&i.t&&i.t.posLetter===r._id&&("group"!==n.boxmode&&"group"!==n.violinmode||(a+=i.t.dPos)),a}function U(e){return e.offsetTop+e.clientTop}function H(e){return e.offsetLeft+e.clientLeft}function Y(e,t){var n=e._fullLayout,r=t.getBoundingClientRect(),a=r.left,i=r.top,l=a+r.width,s=i+r.height,u=o.apply3DTransform(n._invTransform)(a,i),c=o.apply3DTransform(n._invTransform)(l,s),d=u[0],f=u[1],h=c[0],p=c[1];return{x:d,y:f,width:h-d,height:p-f,top:Math.min(f,p),left:Math.min(d,h),right:Math.max(d,h),bottom:Math.max(f,p)}}},6132:function(e,t,n){"use strict";var r=n(3400),a=n(6308),i=n(624).isUnifiedHover;e.exports=function(e,t,n,o){o=o||{};var l=t.legend;function s(e){o.font[e]||(o.font[e]=l?t.legend.font[e]:t.font[e])}t&&i(t.hovermode)&&(o.font||(o.font={}),s("size"),s("family"),s("color"),l?(o.bgcolor||(o.bgcolor=a.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),n("hoverlabel.bgcolor",o.bgcolor),n("hoverlabel.bordercolor",o.bordercolor),n("hoverlabel.namelength",o.namelength),r.coerceFont(n,"hoverlabel.font",o.font),n("hoverlabel.align",o.align)}},1008:function(e,t,n){"use strict";var r=n(3400),a=n(5460);e.exports=function(e,t){function n(n,i){return void 0!==t[n]?t[n]:r.coerce(e,t,a,n,i)}return n("clickmode"),n("hovermode")}},3024:function(e,t,n){"use strict";var r=n(3428),a=n(3400),i=n(6476),o=n(624),l=n(5460),s=n(3292);e.exports={moduleType:"component",name:"fx",constants:n(2456),schema:{layout:l},attributes:n(5756),layoutAttributes:l,supplyLayoutGlobalDefaults:n(1976),supplyDefaults:n(5448),supplyLayoutDefaults:n(8336),calc:n(5056),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,n){return a.castOption(e,t,"hoverlabel."+n)},castHoverinfo:function(e,t,n){return a.castOption(e,n,"hoverinfo",(function(n){return a.coerceHoverinfo({hoverinfo:n},{_module:e._module},t)}))},hover:s.hover,unhover:i.unhover,loneHover:s.loneHover,loneUnhover:function(e){var t=a.isD3Selection(e)?e:r.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:n(2376)}},5460:function(e,t,n){"use strict";var r=n(2456),a=n(5376),i=a({editType:"none"});i.family.dflt=r.HOVERFONT,i.size.dflt=r.HOVERFONTSIZE,e.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:i,grouptitlefont:a({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"}}},8336:function(e,t,n){"use strict";var r=n(3400),a=n(5460),i=n(1008),o=n(6132);e.exports=function(e,t){function n(n,i){return r.coerce(e,t,a,n,i)}i(e,t)&&(n("hoverdistance"),n("spikedistance")),"select"===n("dragmode")&&n("selectdirection");var l=t._has("mapbox"),s=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((l||s)&&1===u||l&&s&&2===u)&&(t.dragmode="pan"),o(e,t,n),r.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},1976:function(e,t,n){"use strict";var r=n(3400),a=n(6132),i=n(5460);e.exports=function(e,t){a(e,t,(function(n,a){return r.coerce(e,t,i,n,a)}))}},2704:function(e,t,n){"use strict";var r=n(3400),a=n(3756).counter,i=n(6968).u,o=n(3816).idRegex,l=n(1780),s={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:[a("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.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:i({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 u(e,t,n){var r=t[n+"axes"],a=Object.keys((e._splomAxes||{})[n]||{});return Array.isArray(r)?r:a.length?a:void 0}function c(e,t,n,r,a,i){var o=t(e+"gap",n),l=t("domain."+e);t(e+"side",r);for(var s=new Array(a),u=l[0],c=(l[1]-u)/(a-o),d=c*(1-o),f=0;f1){f||h||p||"independent"===T("pattern")&&(f=!0),m._hasSubplotGrid=f;var x,b,_="top to bottom"===T("roworder"),A=f?.2:.1,w=f?.3:.1;v&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),m._domains={x:c("x",T,A,x,y),y:c("y",T,w,b,g,_)}}else delete t.grid}function T(e,t){return r.coerce(n,m,s,e,t)}},contentDefaults:function(e,t){var n=t.grid;if(n&&n._domains){var r,a,i,o,l,s,c,f=e.grid||{},h=t._subplots,p=n._hasSubplotGrid,v=n.rows,m=n.columns,g="independent"===n.pattern,y=n._axisMap={};if(p){var x=f.subplots||[];s=n.subplots=new Array(v);var b=1;for(r=0;r("legend"===e?1:0));if(!1===M&&(n[e]=void 0),(!1!==M||d.uirevision)&&(h("uirevision",n.uirevision),!1!==M)){h("borderwidth");var S,C,L,E="h"===h("orientation"),D="paper"===h("yref"),O="paper"===h("xref"),P="left";if(E?(S=0,r.getComponentMethod("rangeslider","isVisible")(t.xaxis)?D?(C=1.1,L="bottom"):(C=1,L="top"):D?(C=-.1,L="top"):(C=0,L="bottom")):(C=1,L="auto",O?S=1.02:(S=1,P="right")),a.coerce(d,f,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:S}},"x"),a.coerce(d,f,{y:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:C}},"y"),h("traceorder",_),u.isGrouped(n[e])&&h("tracegroupgap"),h("entrywidth"),h("entrywidthmode"),h("indentation"),h("itemsizing"),h("itemwidth"),h("itemclick"),h("itemdoubleclick"),h("groupclick"),h("xanchor",P),h("yanchor",L),h("valign"),a.noneOrAll(d,f,["x","y"]),h("title.text")){h("title.side",E?"left":"top");var N=a.extendFlat({},p,{size:a.bigFont(p.size)});a.coerceFont(h,"title.font",N)}}}}e.exports=function(e,t,n){var r,i=n.slice(),o=t.shapes;if(o)for(r=0;r1)}var z=p.hiddenlabels||[];if(!w&&(!p.showlegend||!S.length))return l.selectAll("."+A).remove(),p._topdefs.select("#"+n).remove(),i.autoMargin(e,A);var F=a.ensureSingle(l,"g",A,(function(e){w||e.attr("pointer-events","all")})),B=a.ensureSingleById(p._topdefs,"clipPath",n,(function(e){e.append("rect")})),U=a.ensureSingle(F,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));U.call(c.stroke,f.bordercolor).call(c.fill,f.bgcolor).style("stroke-width",f.borderwidth+"px");var H,Y=a.ensureSingle(F,"g","scrollbox"),V=f.title;f._titleWidth=0,f._titleHeight=0,V.text?((H=a.ensureSingle(Y,"text",A+"titletext")).attr("text-anchor","start").call(u.font,V.font).text(V.text),L(H,Y,e,f,_)):Y.selectAll("."+A+"titletext").remove();var G=a.ensureSingle(F,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(c.fill,h.scrollBarColor)})),W=Y.selectAll("g.groups").data(S);W.enter().append("g").attr("class","groups"),W.exit().remove();var q=W.selectAll("g.traces").data(a.identity);q.enter().append("g").attr("class","traces"),q.exit().remove(),q.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==z.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){r.select(this).call(M,e,f)})).call(x,e,f).each((function(){w||r.select(this).call(C,e,A)})),a.syncOrAsync([i.previousPromises,function(){return function(e,t,n,a){var i=e._fullLayout,o=O(a);a||(a=i[o]);var l=i._size,s=b.isVertical(a),c=b.isGrouped(a),d="fraction"===a.entrywidthmode,f=a.borderwidth,p=2*f,v=h.itemGap,m=a.indentation+a.itemwidth+2*v,g=2*(f+v),y=D(a),x=a.y<0||0===a.y&&"top"===y,_=a.y>1||1===a.y&&"bottom"===y,A=a.tracegroupgap,w={};a._maxHeight=Math.max(x||_?i.height/2:l.h,30);var k=0;a._width=0,a._height=0;var M=function(e){var t=0,n=0,r=e.title.side;return r&&(-1!==r.indexOf("left")&&(t=e._titleWidth),-1!==r.indexOf("top")&&(n=e._titleHeight)),[t,n]}(a);if(s)n.each((function(e){var t=e[0].height;u.setTranslate(this,f+M[0],f+M[1]+a._height+t/2+v),a._height+=t,a._width=Math.max(a._width,e[0].width)})),k=m+a._width,a._width+=v+m+p,a._height+=g,c&&(t.each((function(e,t){u.setTranslate(this,0,t*a.tracegroupgap)})),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var S=E(a),C=a.x<0||0===a.x&&"right"===S,L=a.x>1||1===a.x&&"left"===S,P=_||x,N=i.width/2;a._maxWidth=Math.max(C?P&&"left"===S?l.l+l.w:N:L?P&&"right"===S?l.r+l.w:N:l.w,2*m);var R=0,j=0;n.each((function(e){var t=T(e,a,m);R=Math.max(R,t),j+=t})),k=null;var I=0;if(c){var z=0,F=0,B=0;t.each((function(){var e=0,t=0;r.select(this).selectAll("g.traces").each((function(n){var r=T(n,a,m),i=n[0].height;u.setTranslate(this,M[0],M[1]+f+v+i/2+t),t+=i,e=Math.max(e,r),w[n[0].trace.legendgroup]=e}));var n=e+v;F>0&&n+f+F>a._maxWidth?(I=Math.max(I,F),F=0,B+=z+A,z=t):z=Math.max(z,t),u.setTranslate(this,F,B),F+=n})),a._width=Math.max(I,F)+f,a._height=B+z+g}else{var U=n.size(),H=j+p+(U-1)*v=a._maxWidth&&(I=Math.max(I,W),V=0,G+=Y,a._height+=Y,Y=0),u.setTranslate(this,M[0]+f+V,M[1]+f+G+t/2+v),W=V+n+v,V+=r,Y=Math.max(Y,t)})),H?(a._width=V+p,a._height=Y+g):(a._width=Math.max(I,W)+p,a._height+=Y+g)}}a._width=Math.ceil(Math.max(a._width+M[0],a._titleWidth+2*(f+h.titlePad))),a._height=Math.ceil(Math.max(a._height+M[1],a._titleHeight+2*(f+h.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var q=e._context.edits,Z=q.legendText||q.legendPosition;n.each((function(e){var t=r.select(this).select("."+o+"toggle"),n=e[0].height,i=e[0].trace.legendgroup,l=T(e,a,m);c&&""!==i&&(l=w[i]);var f=Z?m:k||l;s||d||(f+=v/2),u.setRect(t,0,-n/2,f,n)}))}(e,W,q,f)},function(){var t,c,y,x,b=p._size,_=f.borderwidth,T="paper"===f.xref,M="paper"===f.yref;if(V.text&&function(e,t,n){if("top center"===t.title.side||"top right"===t.title.side){var r=t.title.font.size*v,a=0,i=e.node(),o=u.bBox(i).width;"top center"===t.title.side?a=.5*(t._width-2*n-2*h.titlePad-o):"top right"===t.title.side&&(a=t._width-2*n-2*h.titlePad-o),d.positionText(e,n+h.titlePad+a,n+r)}}(H,f,_),!w){var S,C;S=T?b.l+b.w*f.x-m[E(f)]*f._width:p.width*f.x-m[E(f)]*f._width,C=M?b.t+b.h*(1-f.y)-m[D(f)]*f._effHeight:p.height*(1-f.y)-m[D(f)]*f._effHeight;var L=function(e,t,n,r){var a=e._fullLayout,o=a[t],l=E(o),s=D(o),u="paper"===o.xref,c="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var d=o.y<.5?"b":"t",f=o.x<.5?"l":"r",h={r:a.width-n,l:n+o._width,b:a.height-r,t:r+o._effHeight};if(u&&c)return i.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*m[l],r:o._width*g[l],b:o._effHeight*g[s],t:o._effHeight*m[s]});u?e._fullLayout._reservedMargin[t][d]=h[d]:c||"v"===o.orientation?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][d]=h[d]}(e,A,S,C);if(L)return;if(p.margin.autoexpand){var O=S,P=C;S=T?a.constrain(S,0,p.width-f._width):O,C=M?a.constrain(C,0,p.height-f._effHeight):P,S!==O&&a.log("Constrain "+A+".x to make legend fit inside graph"),C!==P&&a.log("Constrain "+A+".y to make legend fit inside graph")}u.setTranslate(F,S,C)}if(G.on(".drag",null),F.on("wheel",null),w||f._height<=f._maxHeight||e._context.staticPlot){var N=f._effHeight;w&&(N=f._height),U.attr({width:f._width-_,height:N-_,x:_/2,y:_/2}),u.setTranslate(Y,0,0),B.select("rect").attr({width:f._width-2*_,height:N-2*_,x:_,y:_}),u.setClipUrl(Y,n,e),u.setRect(G,0,0,0,0),delete f._scrollY}else{var R,j,I,z=Math.max(h.scrollBarMinHeight,f._effHeight*f._effHeight/f._height),W=f._effHeight-z-2*h.scrollBarMargin,q=f._height-f._effHeight,Z=W/q,X=Math.min(f._scrollY||0,q);U.attr({width:f._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:f._effHeight-_,x:_/2,y:_/2}),B.select("rect").attr({width:f._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:f._effHeight-2*_,x:_,y:_+X}),u.setClipUrl(Y,n,e),K(X,z,Z),F.on("wheel",(function(){K(X=a.constrain(f._scrollY+r.event.deltaY/W*q,0,q),z,Z),0!==X&&X!==q&&r.event.preventDefault()}));var J=r.behavior.drag().on("dragstart",(function(){var e=r.event.sourceEvent;R="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,I=X})).on("drag",(function(){var e=r.event.sourceEvent;2===e.buttons||e.ctrlKey||(j="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,X=function(e,t,n){var r=(n-t)/Z+e;return a.constrain(r,0,q)}(I,R,j),K(X,z,Z))}));G.call(J);var Q=r.behavior.drag().on("dragstart",(function(){var e=r.event.sourceEvent;"touchstart"===e.type&&(R=e.changedTouches[0].clientY,I=X)})).on("drag",(function(){var e=r.event.sourceEvent;"touchmove"===e.type&&(j=e.changedTouches[0].clientY,X=function(e,t,n){var r=(t-n)/Z+e;return a.constrain(r,0,q)}(I,R,j),K(X,z,Z))}));Y.call(Q)}function K(t,n,r){f._scrollY=e._fullLayout[A]._scrollY=t,u.setTranslate(Y,0,-t),u.setRect(G,f._width,h.scrollBarMargin+t*r,h.scrollBarWidth,n),B.select("rect").attr("y",_+t)}e._context.edits.legendPosition&&(F.classed("cursor-move",!0),s.init({element:F.node(),gd:e,prepFn:function(){var e=u.getTranslate(F);y=e.x,x=e.y},moveFn:function(e,n){var r=y+e,a=x+n;u.setTranslate(F,r,a),t=s.align(r,f._width,b.l,b.l+b.w,f.xanchor),c=s.align(a+f._height,-f._height,b.t+b.h,b.t,f.yanchor)},doneFn:function(){if(void 0!==t&&void 0!==c){var n={};n[A+".x"]=t,n[A+".y"]=c,o.call("_guiRelayout",e,n)}},clickFn:function(t,n){var r=l.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return n.clientX>=e.left&&n.clientX<=e.right&&n.clientY>=e.top&&n.clientY<=e.bottom}));r.size()>0&&k(e,F,r,t,n)}}))}],e)}}function T(e,t,n){var r=e[0],a=r.width,i=t.entrywidthmode,o=r.trace.legendwidth||t.entrywidth;return"fraction"===i?t._maxWidth*o:n+(o||a)}function k(e,t,n,r,a){var i=n.data()[0][0].trace,s={event:a,node:n.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(s.group=i._group),o.traceIs(i,"pie-like")&&(s.label=n.datum()[0].label);var u=l.triggerHandler(e,"plotly_legendclick",s);if(1===r){if(!1===u)return;t._clickTimeout=setTimeout((function(){e._fullLayout&&f(n,e,r)}),e._context.doubleClickDelay)}else 2===r&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==l.triggerHandler(e,"plotly_legenddoubleclick",s)&&!1!==u&&f(n,e,r))}function M(e,t,n){var r,i,l=O(n),s=e.data()[0][0],c=s.trace,f=o.traceIs(c,"pie-like"),p=!n._inHover&&t._context.edits.legendText&&!f,v=n._maxNameLength;s.groupTitle?(r=s.groupTitle.text,i=s.groupTitle.font):(i=n.font,n.entries?r=s.text:(r=f?s.label:c.name,c._meta&&(r=a.templateString(r,c._meta))));var m=a.ensureSingle(e,"text",l+"text");m.attr("text-anchor","start").call(u.font,i).text(p?S(r,v):r);var g=n.indentation+n.itemwidth+2*h.itemGap;d.positionText(m,g,0),p?m.call(d.makeEditable,{gd:t,text:r}).call(L,e,t,n).on("edit",(function(r){this.text(S(r,v)).call(L,e,t,n);var i=s.trace._fullInput||{},l={};if(o.hasTransform(i,"groupby")){var u=o.getTransformIndices(i,"groupby"),d=u[u.length-1],f=a.keyedContainer(i,"transforms["+d+"].styles","target","value.name");f.set(s.trace._group,r),l=f.constructUpdate()}else l.name=r;return i._isShape?o.call("_guiRelayout",t,"shapes["+c.index+"].name",l.name):o.call("_guiRestyle",t,l,c.index)})):L(m,e,t,n)}function S(e,t){var n=Math.max(4,t);if(e&&e.trim().length>=n/2)return e;for(var r=n-(e=e||"").length;r>0;r--)e+=" ";return e}function C(e,t,n){var i,o=t._context.doubleClickDelay,l=1,s=a.ensureSingle(e,"rect",n+"toggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(s.on("mousedown",(function(){(i=(new Date).getTime())-t._legendMouseDownTimeo&&(l=Math.max(l-1,1)),k(t,a,e,l,r.event)}})))}function L(e,t,n,r,a){r._inHover&&e.attr("data-notex",!0),d.convertToTspans(e,n,(function(){!function(e,t,n,r){var a=e.data()[0][0];if(n._inHover||!a||a.trace.showlegend){var i=e.select("g[class*=math-group]"),o=i.node(),l=O(n);n||(n=t._fullLayout[l]);var s,c,f=n.borderwidth,p=(r===_?n.title.font:a.groupTitle?a.groupTitle.font:n.font).size*v;if(o){var m=u.bBox(o);s=m.height,c=m.width,r===_?u.setTranslate(i,f,f+.75*s):u.setTranslate(i,0,.25*s)}else{var g="."+l+(r===_?"title":"")+"text",y=e.select(g),x=d.lineCount(y),b=y.node();if(s=p*x,c=b?u.bBox(b).width:0,r===_)"left"===n.title.side&&(c+=2*h.itemGap),d.positionText(y,f+h.titlePad,f+p);else{var A=2*h.itemGap+n.indentation+n.itemwidth;a.groupTitle&&(A=h.itemGap,c-=n.indentation+n.itemwidth),d.positionText(y,A,-p*((x-1)/2-.3))}}r===_?(n._titleWidth=c,n._titleHeight=s):(a.lineHeight=p,a.height=Math.max(s,16)+3,a.width=c)}else e.remove()}(t,n,r,a)}))}function E(e){return a.isRightAnchor(e)?"right":a.isCenterAnchor(e)?"center":"left"}function D(e){return a.isBottomAnchor(e)?"bottom":a.isMiddleAnchor(e)?"middle":"top"}function O(e){return e._id||"legend"}e.exports=function(e,t){if(t)w(e,t);else{var n=e._fullLayout,a=n._legends;n._infolayer.selectAll('[class^="legend"]').each((function(){var e=r.select(this),t=e.attr("class").split(" ")[0];t.match(A)&&-1===a.indexOf(t)&&e.remove()}));for(var i=0;iS&&(M=S)}T[i][0]._groupMinRank=M,T[i][0]._preGroupSort=i}var C=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(T.forEach((function(e,t){e[0]._preGroupSort=t})),T.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),i=0;in?n:e}e.exports=function(e,t,n){var g=t._fullLayout;n||(n=g.legend);var y="constant"===n.itemsizing,x=n.itemwidth,b=(x+2*h.itemGap)/2,_=o(b,0),A=function(e,t,n,r){var a;if(e+1)a=e;else{if(!(t&&t.width>0))return 0;a=t.width}return y?r:Math.min(a,n)};function w(e,i,o){var c=e[0].trace,d=c.marker||{},f=d.line||{},h=d.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=o?c.visible&&c.type===o:a.traceIs(c,"bar"),v=r.select(i).select("g.legendpoints").selectAll("path.legend"+o).data(p?[e]:[]);v.enter().append("path").classed("legend"+o,!0).attr("d",h).attr("transform",_),v.exit().remove(),v.each((function(e){var a=r.select(this),i=e[0],o=A(i.mlw,d.line,5,2);a.style("stroke-width",o+"px");var h=i.mcc;if(!n._inHover&&"mc"in i){var p=u(d),v=p.mid;void 0===v&&(v=(p.max+p.min)/2),h=l.tryColorscale(d,"")(v)}var g=h||i.mc||d.color,y=d.pattern,x=y&&l.getPatternAttr(y.shape,0,"");if(x){var b=l.getPatternAttr(y.bgcolor,0,null),_=l.getPatternAttr(y.fgcolor,0,null),w=y.fgopacity,T=m(y.size,8,10),k=m(y.solidity,.5,1),M="legend-"+c.uid;a.call(l.pattern,"legend",t,M,x,T,k,h,y.fillmode,b,_,w)}else a.call(s.fill,g);o&&s.stroke(a,i.mlc||f.color)}))}function T(e,n,o){var l=e[0],s=l.trace,u=o?s.visible&&s.type===o:a.traceIs(s,o),c=r.select(n).select("g.legendpoints").selectAll("path.legend"+o).data(u?[e]:[]);if(c.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),c.exit().remove(),c.size()){var h=s.marker||{},p=A(f(h.line.width,l.pts),h.line,5,2),v="pieLike",m=i.minExtend(s,{marker:{line:{width:p}}},v),g=i.minExtend(l,{trace:m},v);d(c,g,m,t)}}e.each((function(e){var t=r.select(this),a=i.ensureSingle(t,"g","layers");a.style("opacity",e[0].trace.opacity);var l=n.indentation,s=n.valign,u=e[0].lineHeight,c=e[0].height;if("middle"===s&&0===l||!u||!c)a.attr("transform",null);else{var d={top:1,bottom:-1}[s]*(.5*(u-c+3))||0,f=n.indentation;a.attr("transform",o(f,d))}a.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=a.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var n,a=e[0].trace,o=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],n=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],n=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],n="radial";break;case"cone":o=[["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"]],n=!1;break;case"streamtube":o=[["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"]],n=!1;break;case"surface":o=[["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"]],n=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],n=!1}var c=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);c.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),c.exit().remove(),c.each((function(e,o){var c,d=r.select(this),f=u(a),h=f.colorscale,v=f.reversescale;if(h){if(!n){var m=h.length;c=0===o?h[v?m-1:0][1]:1===o?h[v?0:m-1][1]:h[Math.floor((m-1)/2)][1]}}else{var g=a.vertexcolor||a.facecolor||a.color;c=i.isArrayOrTypedArray(g)?g[o]||g[0]:g}d.attr("d",e[0]),c?d.call(s.fill,c):d.call((function(e){if(e.size()){var r="legendfill-"+a.uid;l.gradient(e,t,r,p(v,"radial"===n),h,"fill")}}))}))})).each((function(e){var t=e[0].trace,n="waterfall"===t.type;if(e[0]._distinct&&n){var a=e[0].trace[e[0].dir].marker;return e[0].mc=a.color,e[0].mlw=a.line.width,e[0].mlc=a.line.color,w(e,this,"waterfall")}var i=[];t.visible&&n&&(i=e[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 o=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(i);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(e){var n=r.select(this),a=t[e[0]].marker,i=A(void 0,a.line,5,2);n.attr("d",e[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&n.call(s.stroke,a.line.color)}))})).each((function(e){w(e,this,"funnel")})).each((function(e){w(e,this)})).each((function(e){var n=e[0].trace,o=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(n.visible&&a.traceIs(n,"box-violin")?[e]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var e=r.select(this);if("all"!==n.boxpoints&&"all"!==n.points||0!==s.opacity(n.fillcolor)||0!==s.opacity((n.line||{}).color)){var a=A(void 0,n.line,5,2);e.style("stroke-width",a+"px").call(s.fill,n.fillcolor),a&&s.stroke(e,n.line.color)}else{var u=i.minExtend(n,{marker:{size:y?12:i.constrain(n.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(l.pointStyle,u,t)}}))})).each((function(e){T(e,this,"funnelarea")})).each((function(e){T(e,this,"pie")})).each((function(e){var n,a,o=v(e),s=o.showFill,d=o.showLine,f=o.showGradientLine,h=o.showGradientFill,m=o.anyFill,g=o.anyLine,y=e[0],b=y.trace,_=u(b),w=_.colorscale,T=_.reversescale,k=c.hasMarkers(b)||!m?"M5,0":g?"M5,-2":"M5,-3",M=r.select(this),S=M.select(".legendfill").selectAll("path").data(s||h?[e]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",k+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(s)l.fillGroupStyle(e,t,!0);else{var n="legendfill-"+b.uid;l.gradient(e,t,n,p(T),w,"fill")}})),d||f){var C=A(void 0,b.line,10,5);a=i.minExtend(b,{line:{width:C}}),n=[i.minExtend(y,{trace:a})]}var L=M.select(".legendlines").selectAll("path").data(d||f?[n]:[]);L.enter().append("path").classed("js-line",!0),L.exit().remove(),L.attr("d",k+(f?"l"+x+",0.0001":"h"+x)).call(d?l.lineGroupStyle:function(e){if(e.size()){var n="legendline-"+b.uid;l.lineGroupStyle(e),l.gradient(e,t,n,p(T),w,"stroke")}})})).each((function(e){var n,a,o=v(e),s=o.anyFill,u=o.anyLine,d=o.showLine,f=o.showMarker,h=e[0],p=h.trace,m=!f&&!u&&!s&&c.hasText(p);function g(e,t,n,r){var a=i.nestedProperty(p,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(y&&o&&void 0!==r&&(o=r),n){if(on[1])return n[1]}return o}function x(e){return h._distinct&&h.index&&e[h.index]?e[h.index]:e[0]}if(f||m||d){var b={},A={};if(f){b.mc=g("marker.color",x),b.mx=g("marker.symbol",x),b.mo=g("marker.opacity",i.mean,[.2,1]),b.mlc=g("marker.line.color",x),b.mlw=g("marker.line.width",i.mean,[0,5],2),A.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var w=g("marker.size",i.mean,[2,16],12);b.ms=w,A.marker.size=w}d&&(A.line={width:g("line.width",x,[0,10],5)}),m&&(b.tx="Aa",b.tp=g("textposition",x),b.ts=10,b.tc=g("textfont.color",x),b.tf=g("textfont.family",x)),n=[i.minExtend(h,b)],(a=i.minExtend(p,A)).selectedpoints=null,a.texttemplate=null}var T=r.select(this).select("g.legendpoints"),k=T.selectAll("path.scatterpts").data(f?n:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),k.exit().remove(),k.call(l.pointStyle,a,t),f&&(n[0].mrc=3);var M=T.selectAll("g.pointtext").data(m?n:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),M.exit().remove(),M.selectAll("text").call(l.textPointStyle,a,t)})).each((function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);n.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",_).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(e,n){var a=r.select(this),i=t[n?"increasing":"decreasing"],o=A(void 0,i.line,5,2);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)}))})).each((function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);n.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(e,n){var a=r.select(this),i=t[n?"increasing":"decreasing"],o=A(void 0,i.line,5,2);a.style("fill","none").call(l.dashLine,i.line.dash,o),o&&s.stroke(a,i.line.color)}))}))}},6540:function(e,t,n){"use strict";n(6052),e.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"}}},1868:function(e,t,n){"use strict";var r=n(4040),a=n(7316),i=n(9811),o=n(9224),l=n(4016).eraseActiveShape,s=n(3400),u=s._,c=e.exports={};function d(e,t){var n,a,o=t.currentTarget,l=o.getAttribute("data-attr"),s=o.getAttribute("data-val")||!0,u=e._fullLayout,c={},d=i.list(e,null,!0),f=u._cartesianSpikesEnabled;if("zoom"===l){var h,p="in"===s?.5:2,v=(1+p)/2,m=(1-p)/2;for(a=0;a1?(O=["toggleHover"],P=["resetViews"]):g?(D=["zoomInGeo","zoomOutGeo"],O=["hoverClosestGeo"],P=["resetGeo"]):m?(O=["hoverClosest3d"],P=["resetCameraDefault3d","resetCameraLastSave3d"]):A?(D=["zoomInMapbox","zoomOutMapbox"],O=["toggleHover"],P=["resetViewMapbox"]):b?O=["hoverClosestGl2d"]:y?O=["hoverClosestPie"]:k?(O=["hoverClosestCartesian","hoverCompareCartesian"],P=["resetViewSankey"]):O=["toggleHover"],v&&(O=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(e){for(var t=0;t0)){var v=function(e,t,n){for(var r=n.filter((function(n){return t[n].anchor===e._id})),a=0,i=0;i0?e.touches[0].clientX:0}function g(e,t,n,r){var a=o.ensureSingle(e,"rect",v.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),i=r.borderwidth%2===0?r.borderwidth:r.borderwidth-1,c=-r._offsetShift,d=s.crispRound(t,r.borderwidth);a.attr({width:r._width+i,height:r._height+i,transform:l(c,c),"stroke-width":d}).call(u.stroke,r.bordercolor).call(u.fill,r.bgcolor)}function y(e,t,n,r){var a=t._fullLayout;o.ensureSingleById(a._topdefs,"clipPath",r._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:r._width,height:r._height})}function x(e,t,n,a){var l,u=t.calcdata,c=e.selectAll("g."+v.rangePlotClassName).data(n._subplotsWith,o.identity);c.enter().append("g").attr("class",(function(e){return v.rangePlotClassName+" "+e})).call(s.setClipUrl,a._clipId,t),c.order(),c.exit().remove(),c.each((function(e,o){var s=r.select(this),c=0===o,h=f.getFromId(t,e,"y"),p=h._name,v=a[p],m={data:[],layout:{xaxis:{type:n.type,domain:[0,1],range:a.range.slice(),calendar:n.calendar},width:a._width,height:a._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};n.rangebreaks&&(m.layout.xaxis.rangebreaks=n.rangebreaks),m.layout[p]={type:h.type,domain:[0,1],range:"match"!==v.rangemode?v.range.slice():h.range.slice(),calendar:h.calendar},h.rangebreaks&&(m.layout[p].rangebreaks=h.rangebreaks),i.supplyDefaults(m);var g=m._fullLayout.xaxis,y=m._fullLayout[p];g.clearCalc(),g.setScale(),y.clearCalc(),y.setScale();var x={id:e,plotgroup:s,xaxis:g,yaxis:y,isRangePlot:!0};c?l=x:(x.mainplot="xy",x.mainplotinfo=l),d.rangePlot(t,x,function(e,t){for(var n=[],r=0;r=r.max)t=z[n+1];else if(e=r.pmax)t=z[n+1];else if(en._length||y+_<0)return;c=g+_,h=y+_;break;case s:if(b="col-resize",g+_>n._length)return;c=g+_,h=y;break;case u:if(b="col-resize",y+_<0)return;c=g,h=y+_;break;default:b="ew-resize",c=v,h=v+_}if(h=0;T--){var k=n.append("path").attr(m).style("opacity",T?.1:g).call(o.stroke,x).call(o.fill,y).call(l.dashLine,T?"solid":_,T?4+b:b);if(p(k,e,i),A){var M=s(e.layout,"selections",i);k.style({cursor:"move"});var S={element:k.node(),plotinfo:h,gd:e,editHelpers:M,isActiveSelection:!0},C=r(u,e);a(C,k,S)}else k.style("pointer-events",T?"all":"none");w[T]=k}var L=w[0];w[1].node().addEventListener("click",(function(){return function(e,t){if(f(e)){var n=t.node(),r=+n.getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeSelectionIndex)return void v(e);e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=v,d(e)}}}(e,L)}))}(e._fullLayout._selectionLayer)}function p(e,t,n){var r=n.xref+n.yref;l.setClipUrl(e,"clip"+t._fullLayout._uid+r,t)}function v(e){f(e)&&e._fullLayout._activeSelectionIndex>=0&&(i(e),delete e._fullLayout._activeSelectionIndex,d(e))}e.exports={draw:d,drawOne:h,activateLastSelection:function(e){if(f(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=v,d(e)}}}},4200:function(e,t,n){"use strict";var r=n(8192).u,a=n(2880).extendFlat;e.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:a({},r,{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"}}},1004:function(e){"use strict";e.exports=function(e,t,n){n("newselection.mode"),n("newselection.line.width")&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}},5968:function(e,t,n){"use strict";var r=n(2760).selectMode,a=n(1936).clearOutline,i=n(9856),o=i.readPaths,l=i.writePaths,s=i.fixDatesForPaths;e.exports=function(e,t){if(e.length){var n=e[0][0];if(n){var i=n.getAttribute("d"),u=t.gd,c=u._fullLayout.newselection,d=t.plotinfo,f=d.xaxis,h=d.yaxis,p=t.isActiveSelection,v=t.dragmode,m=(u.layout||{}).selections||[];if(!r(v)&&void 0!==p){var g=u._fullLayout._activeSelectionIndex;if(g-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(g)){W(e,t,i);var _=function(e,t){var n,r,a=e[0],i=-1,o=[];for(r=0;r0?function(e,t){var n,r,a,i=[];for(a=0;a0&&i.push(n);if(1===i.length&&i[0]===t.searchInfo&&(r=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(a=0;a1)return!1;if((r+=t.selectedpoints.length)>1)return!1}return 1===r}(l)&&(f=Q(_))){for(o&&o.remove(),m=0;m=0})(a)&&a._fullLayout._deactivateShape(a),function(e){return e._fullLayout._activeSelectionIndex>=0}(a)&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,l=h(n),s=v(n);if(l||s){var u,c,d=o.selectAll(".select-outline-"+r.id);d&&a._fullLayout._outlining&&(l&&(u=w(d,e)),u&&i.call("_guiRelayout",a,{shapes:u}),s&&!U(e)&&(c=T(d,e)),c&&(a._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",a,{selections:c}).then((function(){t&&k(a)}))),a._fullLayout._outlining=!1)}r.selection={},r.selection.selectionDefs=e.selectionDefs=[],r.selection.mergedPolygons=e.mergedPolygons=[]}function Z(e){return e._id}function X(e,t,n,r){if(!e.calcdata)return[];var a,i,o,l=[],s=t.map(Z),u=n.map(Z);for(o=0;o0?r[0]:n;return!!t.selectedpoints&&t.selectedpoints.indexOf(a)>-1}function K(e,t,n){var r,a;for(r=0;r-1&&t;if(!i&&t){var te=oe(e,!0);if(te.length){var re=te[0].xref,he=te[0].yref;if(re&&he){var pe=ue(te);ce([E(e,re,"x"),E(e,he,"y")])($,pe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&de(e,$),f._reselect=!1}if(!i&&f._deselect){var ve=f._deselect;(function(e,t,n){for(var r=0;r=0)T._fullLayout._deactivateShape(T);else if(!x){var n=k.clickmode;L.done(Me).then((function(){if(L.clear(Me),2===e){for(be.remove(),Q=0;Q-1&&H(t,T,r.xaxes,r.yaxes,r.subplot,r,be),"event"===n&&de(T,void 0);s.click(T,t,D.id)})).catch(M.error)}},r.doneFn=function(){Te.remove(),L.done(Me).then((function(){L.clear(Me),!S&&J&&r.selectionDefs&&(J.subtract=xe,r.selectionDefs.push(J),r.mergedPolygons.length=0,[].push.apply(r.mergedPolygons,Z)),(S||x)&&q(r,S),r.doneFnCompleted&&r.doneFnCompleted(Se),b&&de(T,ie)})).catch(M.error)}},clearOutline:x,clearSelectionsCache:q,selectOnClick:H}},6056:function(e,t,n){"use strict";var r=n(3916),a=n(5376),i=n(2904).line,o=n(8192).u,l=n(2880).extendFlat,s=n(1780).templatedArray,u=(n(6208),n(5464)),c=n(1776).ye,d=n(7728);e.exports=s("shape",{visible:l({},u.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:l({},u.legend,{editType:"calc+arraydraw"}),legendgroup:l({},u.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:l({},u.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:a({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:l({},u.legendrank,{editType:"calc+arraydraw"}),legendwidth:l({},u.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:l({},r.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:l({},r.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:l({},i.color,{editType:"arraydraw"}),width:l({},i.width,{editType:"calc+arraydraw"}),dash:l({},o,{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:c({},{keys:Object.keys(d)}),font:a({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"})},6084:function(e,t,n){"use strict";var r=n(3400),a=n(4460),i=n(3068),o=n(5152);function l(e){return u(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function s(e){return u(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function u(e,t,n,a,l,s){var u=e/2,c=s;if("pixel"===t){var d=l?o.extractPathCoords(l,s?i.paramIsY:i.paramIsX):[n,a],f=r.aggNums(Math.max,null,d),h=r.aggNums(Math.min,null,d),p=h<0?Math.abs(h)+u:u,v=f>0?f+u:u;return{ppad:u,ppadplus:c?p:v,ppadminus:c?v:p}}return{ppad:u}}function c(e,t,n,r,a){var l="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[l(t),l(n)];if(r){var s,u,c,d,f=1/0,h=-1/0,p=r.match(i.segmentRE);for("date"===e.type&&(l=o.decodeDate(l)),s=0;sh&&(h=d)));return h>=f?[f,h]:void 0}}e.exports=function(e){var t=e._fullLayout,n=r.filterVisible(t.shapes);if(n.length&&e._fullData.length)for(var o=0;o=e?t-r:r-t,-180/Math.PI*Math.atan2(a,i)}(x,_,b,A):0),k.call((function(t){return t.call(o.font,T).attr({}),i.convertToTspans(t,e),t}));var U=function(e,t,n,r,a,i,o){var l,s,u,c,f=a.label.textposition,h=a.label.textangle,p=a.label.padding,v=a.type,m=Math.PI/180*i,g=Math.sin(m),y=Math.cos(m),x=a.label.xanchor,b=a.label.yanchor;if("line"===v){"start"===f?(l=e,s=t):"end"===f?(l=n,s=r):(l=(e+n)/2,s=(t+r)/2),"auto"===x&&(x="start"===f?"auto"===h?n>e?"left":ne?"right":ne?"right":ne?"left":n1&&(2!==e.length||"Z"!==e[1][0])&&(0===E&&(e[0][0]="M"),t[L]=e,k(),M())}}()}}function H(e,n){!function(e,n){if(t.length)for(var r=0;rj&&i>I&&!n.shiftKey?p.getCursor(o/a,1-l/i):"move";v(t,s),R=s.split("-")[0]}}function re(r){b(e)||(z&&(A=Z(n.xanchor)),F&&(k=X(n.yanchor)),"path"===n.type?N=n.path:(d=z?n.x0:Z(n.x0),h=F?n.y0:X(n.y0),x=z?n.x1:Z(n.x1),_=F?n.y1:X(n.y1)),d_?(M=h,E="y0",S=_,D="y1"):(M=_,E="y1",S=h,D="y0"),ne(r),se(s,n),ce(t,n,e),$.moveFn="move"===R?oe:le,$.altKey=r.altKey)}function ae(){b(e)||(v(t),ue(s),w(t,e,n),a.call("_guiRelayout",e,c.getUpdateObj()))}function ie(){b(e)||ue(s)}function oe(r,a){if("path"===n.type){var i=function(e){return e},o=i,c=i;z?H("xanchor",n.xanchor=J(A+r)):(o=function(e){return J(Z(e)+r)},V&&"date"===V.type&&(o=g.encodeDate(o))),F?H("yanchor",n.yanchor=Q(k+a)):(c=function(e){return Q(X(e)+a)},W&&"date"===W.type&&(c=g.encodeDate(c))),H("path",n.path=T(N,o,c))}else z?H("xanchor",n.xanchor=J(A+r)):(H("x0",n.x0=J(d+r)),H("x1",n.x1=J(x+r))),F?H("yanchor",n.yanchor=Q(k+a)):(H("y0",n.y0=Q(h+a)),H("y1",n.y1=Q(_+a)));t.attr("d",y(e,n)),se(s,n),u(e,l,n,Y)}function le(r,a){if(U){var i=function(e){return e},o=i,c=i;z?H("xanchor",n.xanchor=J(A+r)):(o=function(e){return J(Z(e)+r)},V&&"date"===V.type&&(o=g.encodeDate(o))),F?H("yanchor",n.yanchor=Q(k+a)):(c=function(e){return Q(X(e)+a)},W&&"date"===W.type&&(c=g.encodeDate(c))),H("path",n.path=T(N,o,c))}else if(B){if("resize-over-start-point"===R){var f=d+r,p=F?h-a:h+a;H("x0",n.x0=z?f:J(f)),H("y0",n.y0=F?p:Q(p))}else if("resize-over-end-point"===R){var v=x+r,m=F?_-a:_+a;H("x1",n.x1=z?v:J(v)),H("y1",n.y1=F?m:Q(m))}}else{var b=function(e){return-1!==R.indexOf(e)},w=b("n"),G=b("s"),q=b("w"),K=b("e"),$=w?M+a:M,ee=G?S+a:S,te=q?C+r:C,ne=K?L+r:L;F&&(w&&($=M-a),G&&(ee=S-a)),(!F&&ee-$>I||F&&$-ee>I)&&(H(E,n[E]=F?$:Q($)),H(D,n[D]=F?ee:Q(ee))),ne-te>j&&(H(O,n[O]=z?te:J(te)),H(P,n[P]=z?ne:J(ne)))}t.attr("d",y(e,n)),se(s,n),u(e,l,n,Y)}function se(e,t){function n(){var n="path"!==t.type,r=e.selectAll(".visual-cue").data([0]),a=1;r.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":a}).classed("visual-cue",!0);var o=Z(z?t.xanchor:i.midRange(n?[t.x0,t.x1]:g.extractPathCoords(t.path,m.paramIsX))),l=X(F?t.yanchor:i.midRange(n?[t.y0,t.y1]:g.extractPathCoords(t.path,m.paramIsY)));if(o=g.roundPositionForSharpStrokeRendering(o,a),l=g.roundPositionForSharpStrokeRendering(l,a),z&&F){var s="M"+(o-1-a)+","+(l-1-a)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";r.attr("d",s)}else if(z){var u="M"+(o-1-a)+","+(l-9-a)+"v18 h2 v-18 Z";r.attr("d",u)}else{var c="M"+(o-9-a)+","+(l-1-a)+"h18 v2 h-18 Z";r.attr("d",c)}}(z||F)&&n()}function ue(e){e.selectAll(".visual-cue").remove()}function ce(e,t,n){var r=t.xref,a=t.yref,i=o.getFromId(n,r),l=o.getFromId(n,a),s="";"paper"===r||i.autorange||(s+=r),"paper"===a||l.autorange||(s+=a),f.setClipUrl(e,s?"clip"+n._fullLayout._uid+s:null,n)}p.init($),K.node().onmousemove=ne}(e,I,c,t,n,R):!0===c.editable&&I.style("pointer-events",P||d.opacity(L)*C<=.5?"stroke":"all");I.node().addEventListener("click",(function(){return function(e,t){if(_(e)){var n=t.node(),r=+n.getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeShapeIndex)return void k(e);e._fullLayout._activeShapeIndex=r,e._fullLayout._deactivateShape=k,x(e)}}}(e,I)}))}c._input&&!0===c.visible&&("below"!==c.layer?M(e._fullLayout._shapeUpperLayer):"paper"===c.xref||"paper"===c.yref?M(e._fullLayout._shapeLowerLayer):A._hadPlotinfo?M((A.mainplotinfo||A).shapelayer):M(e._fullLayout._shapeLowerLayer))}function w(e,t,n){var r=(n.xref+n.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");f.setClipUrl(e,r?"clip"+t._fullLayout._uid+r:null,t)}function T(e,t,n){return e.replace(m.segmentRE,(function(e){var r=0,a=e.charAt(0),i=m.paramIsX[a],o=m.paramIsY[a],l=m.numParams[a];return a+e.substr(1).replace(m.paramRE,(function(e){return r>=l||(i[r]?e=t(e):o[r]&&(e=n(e)),r++),e}))}))}function k(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(c(e),delete e._fullLayout._activeShapeIndex,x(e))}e.exports={draw:x,drawOne:A,eraseActiveShape:function(e){if(_(e)){c(e);var t=e._fullLayout._activeShapeIndex,n=(e.layout||{}).shapes||[];if(t0&&sh&&(e="X"),e}));return i>h&&(p=p.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+e)),c+p}))}(n,l,u);if("pixel"===n.xsizemode){var b=l(n.xanchor);c=b+n.x0,d=b+n.x1}else c=l(n.x0),d=l(n.x1);if("pixel"===n.ysizemode){var _=u(n.yanchor);f=_-n.y0,h=_-n.y1}else f=u(n.y0),h=u(n.y1);if("line"===p)return"M"+c+","+f+"L"+d+","+h;if("rect"===p)return"M"+c+","+f+"H"+d+"V"+h+"H"+c+"Z";var A=(c+d)/2,w=(f+h)/2,T=Math.abs(A-c),k=Math.abs(w-f),M="A"+T+","+k,S=A+T+","+w;return"M"+S+M+" 0 1,1 "+A+","+(w-k)+M+" 0 0,1 "+S+"Z"}},1592:function(e,t,n){"use strict";var r=n(4016);e.exports={moduleType:"component",name:"shapes",layoutAttributes:n(6056),supplyLayoutDefaults:n(3712),supplyDrawNewShapeDefaults:n(5144),includeBasePlot:n(6632)("shapes"),calcAutorange:n(6084),draw:r.draw,drawOne:r.drawOne}},7728:function(e){"use strict";function t(e,t){return t?t.d2l(e):e}function n(e,t){return t?t.l2d(e):e}function r(e,n){return t(e.x1,n)-t(e.x0,n)}function a(e,n,r){return t(e.y1,r)-t(e.y0,r)}e.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,n){return"line"!==e.type?void 0:a(e,0,n)/r(e,t)},dx:r,dy:a,width:function(e,t){return Math.abs(r(e,t))},height:function(e,t,n){return Math.abs(a(e,0,n))},length:function(e,t,n){return"line"!==e.type?void 0:Math.sqrt(Math.pow(r(e,t),2)+Math.pow(a(e,0,n),2))},xcenter:function(e,r){return n((t(e.x1,r)+t(e.x0,r))/2,r)},ycenter:function(e,r,a){return n((t(e.y1,a)+t(e.y0,a))/2,a)}}},9861:function(e,t,n){"use strict";var r=n(5376),a=n(6741),i=n(2880).extendDeepAll,o=n(7824).overrideAll,l=n(5656),s=n(1780).templatedArray,u=n(876),c=s("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}});e.exports=o(s("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:c,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:i(a({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:l.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:r({})},font:r({}),activebgcolor:{valType:"color",dflt:u.gripBgActiveColor},bgcolor:{valType:"color",dflt:u.railBgColor},bordercolor:{valType:"color",dflt:u.railBorderColor},borderwidth:{valType:"number",min:0,dflt:u.railBorderWidth},ticklen:{valType:"number",min:0,dflt:u.tickLength},tickcolor:{valType:"color",dflt:u.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:u.minorTickLength}}),"arraydraw","from-root")},876:function(e){"use strict";e.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}},8132:function(e,t,n){"use strict";var r=n(3400),a=n(1272),i=n(9861),o=n(876).name,l=i.steps;function s(e,t,n){function o(n,a){return r.coerce(e,t,i,n,a)}for(var l=a(e,t,{name:"steps",handleItemDefaults:u}),s=0,c=0;c0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*d.gripWidth,t._dims.currentValueTotalHeight))}}function C(e,t){var n=e._dims;return n.inputAreaStart+d.stepInset+(n.inputAreaLength-2*d.stepInset)*Math.min(1,Math.max(0,t))}function L(e,t){var n=e._dims;return Math.min(1,Math.max(0,(t-d.stepInset-n.inputAreaStart)/(n.inputAreaLength-2*d.stepInset-2*n.inputAreaStart)))}function E(e,t,n){var r=n._dims,a=l.ensureSingle(e,"rect",d.railTouchRectClass,(function(r){r.call(k,t,e,n).style("pointer-events","all")}));a.attr({width:r.inputAreaLength,height:Math.max(r.inputAreaWidth,d.tickOffset+n.ticklen+r.labelHeight)}).call(i.fill,n.bgcolor).attr("opacity",0),o.setTranslate(a,0,r.currentValueTotalHeight)}function D(e,t){var n=t._dims,r=n.inputAreaLength-2*d.railInset,a=l.ensureSingle(e,"rect",d.railRectClass);a.attr({width:r,height:d.railWidth,rx:d.railRadius,ry:d.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(a,d.railInset,.5*(n.inputAreaWidth-d.railWidth)+n.currentValueTotalHeight)}e.exports=function(e){var t=e._context.staticPlot,n=e._fullLayout,i=function(e,t){for(var n=e[d.name],r=[],a=0;a0?[0]:[]);function s(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),a.autoMargin(e,m(t))}if(l.enter().append("g").classed(d.containerClassName,!0).style("cursor",t?null:"ew-resize"),l.exit().each((function(){r.select(this).selectAll("g."+d.groupClassName).each(s)})).remove(),0!==i.length){var u=l.selectAll("g."+d.groupClassName).data(i,g);u.enter().append("g").classed(d.groupClassName,!0),u.exit().each(s).remove();for(var c=0;c0||_<0){var M={left:[-A,0],right:[A,0],top:[0,-A],bottom:[0,A]}[b.side];n.attr("transform",s(M[0],M[1]))}}}return j.call(I),P&&(C?j.on(".opacity",null):(k=0,M=!0,j.text(y).on("mouseover.opacity",(function(){r.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){r.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)}))),j.call(d.makeEditable,{gd:e}).on("edit",(function(t){void 0!==x?o.call("_guiRestyle",e,g,t,x):o.call("_guiRelayout",e,g,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(I)})).on("input",(function(e){this.text(e||" ").call(d.positionText,_.x,_.y)}))),j.classed("js-placeholder",M),w}}},8444:function(e,t,n){"use strict";var r=n(5376),a=n(2548),i=n(2880).extendFlat,o=n(7824).overrideAll,l=n(6741),s=n(1780).templatedArray,u=s("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}});e.exports=o(s("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:u,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:i(l({editType:"arraydraw"}),{}),font:r({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},1331:function(e){"use strict";e.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:"\u25c4",right:"\u25ba",up:"\u25b2",down:"\u25bc"}}},1384:function(e,t,n){"use strict";var r=n(3400),a=n(1272),i=n(8444),o=n(1331).name,l=i.buttons;function s(e,t,n){function o(n,a){return r.coerce(e,t,i,n,a)}o("visible",a(e,t,{name:"buttons",handleItemDefaults:u}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),r.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),r.coerceFont(o,"font",n.font),o("bgcolor",n.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function u(e,t){function n(n,a){return r.coerce(e,t,l,n,a)}n("visible","skip"===e.method||Array.isArray(e.args))&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}e.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:s})}},4420:function(e,t,n){"use strict";var r=n(3428),a=n(7316),i=n(6308),o=n(3616),l=n(3400),s=n(2736),u=n(1780).arrayEditor,c=n(4284).LINE_SPACING,d=n(1331),f=n(7400);function h(e){return e._index}function p(e,t){return+e.attr(d.menuIndexAttrName)===t._index}function v(e,t,n,r,a,i,o,l){t.active=o,u(e.layout,d.name,t).applyUpdate("active",o),"buttons"===t.type?g(e,r,null,null,t):"dropdown"===t.type&&(a.attr(d.menuIndexAttrName,"-1"),m(e,r,a,i,t),l||g(e,r,a,i,t))}function m(e,t,n,r,a){var i=l.ensureSingle(t,"g",d.headerClassName,(function(e){e.style("pointer-events","all")})),s=a._dims,u=a.active,c=a.buttons[u]||d.blankHeaderOpts,f={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},h={width:s.headerWidth,height:s.headerHeight};i.call(y,a,c,e).call(M,a,f,h),l.ensureSingle(t,"text",d.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(o.font,a.font).text(d.arrowSymbol[a.direction])})).attr({x:s.headerWidth-d.arrowOffsetX+a.pad.l,y:s.headerHeight/2+d.textOffsetY+a.pad.t}),i.on("click",(function(){n.call(S,String(p(n,a)?-1:a._index)),g(e,t,n,r,a)})),i.on("mouseover",(function(){i.call(A)})),i.on("mouseout",(function(){i.call(w,a)})),o.setTranslate(t,s.lx,s.ly)}function g(e,t,n,i,o){n||(n=t).attr("pointer-events","all");var s=function(e){return-1===+e.attr(d.menuIndexAttrName)}(n)&&"buttons"!==o.type?[]:o.buttons,u="dropdown"===o.type?d.dropdownButtonClassName:d.buttonClassName,c=n.selectAll("g."+u).data(l.filterVisible(s)),f=c.enter().append("g").classed(u,!0),h=c.exit();"dropdown"===o.type?(f.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var p=0,m=0,g=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?m=g.headerHeight+d.gapButtonHeader:p=g.headerWidth+d.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(m=-d.gapButtonHeader+d.gapButton-g.openHeight),"dropdown"===o.type&&"left"===o.direction&&(p=-d.gapButtonHeader+d.gapButton-g.openWidth);var b={x:g.lx+p+o.pad.l,y:g.ly+m+o.pad.t,yPad:d.gapButton,xPad:d.gapButton,index:0},T={l:b.x+o.borderwidth,t:b.y+o.borderwidth};c.each((function(l,s){var u=r.select(this);u.call(y,o,l,e).call(M,o,b),u.on("click",(function(){r.event.defaultPrevented||(l.execute&&(l.args2&&o.active===s?(v(e,o,0,t,n,i,-1),a.executeAPICommand(e,l.method,l.args2)):(v(e,o,0,t,n,i,s),a.executeAPICommand(e,l.method,l.args))),e.emit("plotly_buttonclicked",{menu:o,button:l,active:o.active}))})),u.on("mouseover",(function(){u.call(A)})),u.on("mouseout",(function(){u.call(w,o),c.call(_,o)}))})),c.call(_,o),x?(T.w=Math.max(g.openWidth,g.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(g.openHeight,g.headerHeight)),T.direction=o.direction,i&&(c.size()?function(e,t,n,r,a,i){var o,l,s,u=a.direction,c="up"===u||"down"===u,f=a._dims,h=a.active;if(c)for(l=0,s=0;s0?[0]:[]);if(o.enter().append("g").classed(d.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){r.select(this).selectAll("g."+d.headerGroupClassName).each(i)})).remove(),0!==n.length){var s=o.selectAll("g."+d.headerGroupClassName).data(n,h);s.enter().append("g").classed(d.headerGroupClassName,!0);for(var u=l.ensureSingle(o,"g",d.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),c=0;cA,k=l.barLength+2*l.barPad,M=l.barWidth+2*l.barPad,S=p,C=m+g;C+M>u&&(C=u-M);var L=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,l.barColor),T?(this.hbar=L.attr({rx:l.barRadius,ry:l.barRadius,x:S,y:C,width:k,height:M}),this._hbarXMin=S+k/2,this._hbarTranslateMax=A-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var E=g>w,D=l.barWidth+2*l.barPad,O=l.barLength+2*l.barPad,P=p+v,N=m;P+D>s&&(P=s-D);var R=this.container.selectAll("rect.scrollbar-vertical").data(E?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,l.barColor),E?(this.vbar=R.attr({rx:l.barRadius,ry:l.barRadius,x:P,y:N,width:D,height:O}),this._vbarYMin=N+O/2,this._vbarTranslateMax=w-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var j=this.id,I=c-.5,z=E?d+D+.5:d+.5,F=f-.5,B=T?h+M+.5:h+.5,U=o._topdefs.selectAll("#"+j).data(T||E?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",j).append("rect"),T||E?(this._clipRect=U.select("rect").attr({x:Math.floor(I),y:Math.floor(F),width:Math.ceil(z)-Math.floor(I),height:Math.ceil(B)-Math.floor(F)}),this.container.call(i.setClipUrl,j,this.gd),this.bg.attr({x:p,y:m,width:v,height:g})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),T||E){var H=r.behavior.drag().on("dragstart",(function(){r.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(H);var Y=r.behavior.drag().on("dragstart",(function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(Y),E&&this.vbar.on(".drag",null).call(Y)}this.setTranslate(t,n)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.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)},l.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=r.event.dx),this.vbar&&(t-=r.event.dy),this.setTranslate(e,t)},l.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=r.event.deltaY),this.vbar&&(t+=r.event.deltaY),this.setTranslate(e,t)},l.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var n=e+this._hbarXMin,a=n+this._hbarTranslateMax;e=(o.constrain(r.event.x,n,a)-n)/(a-n)*(this.position.w-this._box.w)}if(this.vbar){var i=t+this._vbarYMin,l=i+this._vbarTranslateMax;t=(o.constrain(r.event.y,i,l)-i)/(l-i)*(this.position.h-this._box.h)}this.setTranslate(e,t)},l.prototype.setTranslate=function(e,t){var n=this.position.w-this._box.w,r=this.position.h-this._box.h;if(e=o.constrain(e||0,0,n),t=o.constrain(t||0,0,r),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var a=e/n;this.hbar.call(i.setTranslate,e+a*this._hbarTranslateMax,t)}if(this.vbar){var l=t/r;this.vbar.call(i.setTranslate,e,t+l*this._vbarTranslateMax)}}},4284:function(e){"use strict";e.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"}}},6208:function(e){"use strict";e.exports={axisRefDescription:function(e,t,n){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+n+"). If set to a",e,"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",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",n,"of the domain of the","second",e,"axis."].join(" ")}}},6880:function(e){"use strict";e.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"}},9104:function(e){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},3448:function(e){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},9032:function(e){"use strict";e.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:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},9616:function(e,t){"use strict";t.xmlns="http://www.w3.org/2000/xmlns/",t.svg="http://www.w3.org/2000/svg",t.xlink="http://www.w3.org/1999/xlink",t.svgAttrs={xmlns:t.svg,"xmlns:xlink":t.xlink}},4884:function(e,t,n){"use strict";t.version=n(5788).version,n(8324),n(9288);for(var r=n(4040),a=t.register=r.register,i=n(2448),o=Object.keys(i),l=0;l",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},8308:function(e,t){"use strict";t.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},t.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},t.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},t.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},t.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},t.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},1864:function(e,t,n){"use strict";var r=n(435),a=r.mod,i=r.modHalf,o=Math.PI,l=2*o;function s(e){return Math.abs(e[1]-e[0])>l-1e-14}function u(e,t){return i(t-e,l)}function c(e,t){if(s(t))return!0;var n,r;t[0](r=a(r,l))&&(r+=l);var i=a(e,l),o=i+l;return i>=n&&i<=r||o>=n&&o<=r}function d(e,t,n,r,a,i,u){a=a||0,i=i||0;var c,d,f,h,p,v=s([n,r]);function m(e,t){return[e*Math.cos(t)+a,i-e*Math.sin(t)]}v?(c=0,d=o,f=l):n=a&&e<=i);var a,i},pathArc:function(e,t,n,r,a){return d(null,e,t,n,r,a,0)},pathSector:function(e,t,n,r,a){return d(null,e,t,n,r,a,1)},pathAnnulus:function(e,t,n,r,a,i){return d(e,t,n,r,a,i,1)}}},8116:function(e,t,n){"use strict";var r=n(3160).decode,a=n(3620),i=Array.isArray,o=ArrayBuffer,l=DataView;function s(e){return o.isView(e)&&!(e instanceof l)}function u(e){return i(e)||s(e)}t.isTypedArray=s,t.isArrayOrTypedArray=u,t.isArray1D=function(e){return!u(e[0])},t.ensureArray=function(e,t){return i(e)||(e=[]),e.length=t,e};var c={u1c:"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"===typeof Int8Array?void 0:Int8Array,u1:"undefined"===typeof Uint8Array?void 0:Uint8Array,i2:"undefined"===typeof Int16Array?void 0:Int16Array,u2:"undefined"===typeof Uint16Array?void 0:Uint16Array,i4:"undefined"===typeof Int32Array?void 0:Int32Array,u4:"undefined"===typeof Uint32Array?void 0:Uint32Array,f4:"undefined"===typeof Float32Array?void 0:Float32Array,f8:"undefined"===typeof Float64Array?void 0:Float64Array};function d(e){return e.constructor===ArrayBuffer}function f(e,t,n){if(u(e)){if(u(e[0])){for(var r=n,a=0;aa.max?t.set(n):t.set(+e)}},integer:{coerceFunction:function(e,t,n,a){e%1||!r(e)||void 0!==a.min&&ea.max?t.set(n):t.set(+e)}},string:{coerceFunction:function(e,t,n,r){if("string"!==typeof e){var a="number"===typeof e;!0!==r.strict&&a?t.set(String(e)):t.set(n)}else r.noBlank&&!e?t.set(n):t.set(e)}},color:{coerceFunction:function(e,t,n){a(e).isValid()?t.set(e):t.set(n)}},colorlist:{coerceFunction:function(e,t,n){Array.isArray(e)&&e.length&&e.every((function(e){return a(e).isValid()}))?t.set(e):t.set(n)}},colorscale:{coerceFunction:function(e,t,n){t.set(o.get(e,n))}},angle:{coerceFunction:function(e,t,n){"auto"===e?t.set("auto"):r(e)?t.set(d(+e,360)):t.set(n)}},subplotid:{coerceFunction:function(e,t,n,r){var a=r.regex||c(n);"string"===typeof e&&a.test(e)?t.set(e):t.set(n)},validateFunction:function(e,t){var n=t.dflt;return e===n||"string"===typeof e&&!!c(n).test(e)}},flaglist:{coerceFunction:function(e,t,n,r){if(-1===(r.extras||[]).indexOf(e))if("string"===typeof e){for(var a=e.split("+"),i=0;i=r&&e<=a?e:c}if("string"!==typeof e&&"number"!==typeof e)return c;e=String(e);var u=_(n),g=e.charAt(0);!u||"G"!==g&&"g"!==g||(e=e.substr(1),n="");var A=u&&"chinese"===n.substr(0,7),w=e.match(A?x:y);if(!w)return c;var T=w[1],k=w[3]||"1",M=Number(w[5]||1),S=Number(w[7]||0),C=Number(w[9]||0),L=Number(w[11]||0);if(u){if(2===T.length)return c;var E;T=Number(T);try{var D=m.getComponentMethod("calendars","getCal")(n);if(A){var O="i"===k.charAt(k.length-1);k=parseInt(k,10),E=D.newDate(T,D.toMonthIndex(T,k,O),M)}else E=D.newDate(T,Number(k),M)}catch(N){return c}return E?(E.toJD()-v)*d+S*f+C*h+L*p:c}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),k-=1;var P=new Date(Date.UTC(2e3,k,M,S,C));return P.setUTCFullYear(T),P.getUTCMonth()!==k||P.getUTCDate()!==M?c:P.getTime()+L*p},r=t.MIN_MS=t.dateTime2ms("-9999"),a=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(e,n){return t.dateTime2ms(e,n)!==c};var w=90*d,T=3*f,k=5*h;function M(e,t,n,r,a){if((t||n||r||a)&&(e+=" "+A(t,2)+":"+A(n,2),(r||a)&&(e+=":"+A(r,2),a))){for(var i=4;a%10===0;)i-=1,a/=10;e+="."+A(a,i)}return e}t.ms2DateTime=function(e,t,n){if("number"!==typeof e||!(e>=r&&e<=a))return c;t||(t=0);var i,o,l,u,y,x,b=Math.floor(10*s(e+.05,1)),A=Math.round(e-b/10);if(_(n)){var S=Math.floor(A/d)+v,C=Math.floor(s(e,d));try{i=m.getComponentMethod("calendars","getCal")(n).fromJD(S).formatDate("yyyy-mm-dd")}catch(L){i=g("G%Y-%m-%d")(new Date(A))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=t=r+d&&e<=a-d))return c;var t=Math.floor(10*s(e+.05,1)),n=new Date(Math.round(e-t/10));return M(i("%Y-%m-%d")(n),n.getHours(),n.getMinutes(),n.getSeconds(),10*n.getUTCMilliseconds()+t)},t.cleanDate=function(e,n,r){if(e===c)return n;if(t.isJSDate(e)||"number"===typeof e&&isFinite(e)){if(_(r))return l.error("JS Dates and milliseconds are incompatible with world calendars",e),n;if(!(e=t.ms2DateTimeLocal(+e))&&void 0!==n)return n}else if(!t.isDateTime(e,r))return l.error("unrecognized date",e),n;return e};var S=/%\d?f/g,C=/%h/g,L={1:"1",2:"1",3:"2",4:"2"};function E(e,t,n,r){e=e.replace(S,(function(e){var n=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(n).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(t+.05));if(e=e.replace(C,(function(){return L[n("%q")(a)]})),_(r))try{e=m.getComponentMethod("calendars","worldCalFmt")(e,t,r)}catch(i){return"Invalid"}return n(e)(a)}var D=[59,59.9,59.99,59.999,59.9999];t.formatDate=function(e,t,n,r,a,i){if(a=_(a)&&a,!t)if("y"===n)t=i.year;else if("m"===n)t=i.month;else{if("d"!==n)return function(e,t){var n=s(e+.05,d),r=A(Math.floor(n/f),2)+":"+A(s(Math.floor(n/h),60),2);if("M"!==t){o(t)||(t=0);var a=(100+Math.min(s(e/p,60),D[t])).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),r+=":"+a}return r}(e,n)+"\n"+E(i.dayMonthYear,e,r,a);t=i.dayMonth+"\n"+i.year}return E(t,e,r,a)};var O=3*d;t.incrementMonth=function(e,t,n){n=_(n)&&n;var r=s(e,d);if(e=Math.round(e-r),n)try{var a=Math.round(e/d)+v,i=m.getComponentMethod("calendars","getCal")(n),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-v)*d+r}catch(c){l.error("invalid ms "+e+" in calendar "+n)}var u=new Date(e+O);return u.setUTCMonth(u.getUTCMonth()+t)+r-O},t.findExactDates=function(e,t){for(var n,r,a=0,i=0,l=0,s=0,u=_(t)&&m.getComponentMethod("calendars","getCal")(t),c=0;c1||v<0||v>1?null:{x:e+s*v,y:t+d*v}}function s(e,t,n,r,a){var i=r*e+a*t;if(i<0)return r*r+a*a;if(i>n){var o=r-e,l=a-t;return o*o+l*l}var s=r*t-a*e;return s*s/n}t.segmentsIntersect=l,t.segmentDistance=function(e,t,n,r,a,i,o,u){if(l(e,t,n,r,a,i,o,u))return 0;var c=n-e,d=r-t,f=o-a,h=u-i,p=c*c+d*d,v=f*f+h*h,m=Math.min(s(c,d,p,a-e,i-t),s(c,d,p,o-e,u-t),s(f,h,v,e-a,t-i),s(f,h,v,n-a,r-i));return Math.sqrt(m)},t.getTextLocation=function(e,t,n,l){if(e===a&&l===i||(r={},a=e,i=l),r[n])return r[n];var s=e.getPointAtLength(o(n-l/2,t)),u=e.getPointAtLength(o(n+l/2,t)),c=Math.atan((u.y-s.y)/(u.x-s.x)),d=e.getPointAtLength(o(n,t)),f={x:(4*d.x+s.x+u.x)/6,y:(4*d.y+s.y+u.y)/6,theta:c};return r[n]=f,f},t.clearLocationCache=function(){a=null},t.getVisibleSegment=function(e,t,n){var r,a,i=t.left,o=t.right,l=t.top,s=t.bottom,u=0,c=e.getTotalLength(),d=c;function f(t){var n=e.getPointAtLength(t);0===t?r=n:t===c&&(a=n);var u=n.xo?n.x-o:0,d=n.ys?n.y-s:0;return Math.sqrt(u*u+d*d)}for(var h=f(u);h;){if((u+=h+n)>d)return;h=f(u)}for(h=f(d);h;){if(u>(d-=h+n))return;h=f(d)}return{min:u,max:d,len:d-u,total:c,isClosed:0===u&&d===c&&Math.abs(r.x-a.x)<.1&&Math.abs(r.y-a.y)<.1}},t.findPointOnPath=function(e,t,n,r){for(var a,i,o,l=(r=r||{}).pathLength||e.getTotalLength(),s=r.tolerance||.001,u=r.iterationLimit||30,c=e.getPointAtLength(0)[n]>e.getPointAtLength(l)[n]?-1:1,d=0,f=0,h=l;d0?h=a:f=a,d++}return i}},5536:function(e){"use strict";e.exports=function(e){return e}},1396:function(e){"use strict";e.exports=function(e,t){if(!t)return e;var n=1/Math.abs(t),r=n>1?(n*e+n*t)/n:e+t,a=String(r).length;if(a>16){var i=String(t).length;if(a>=String(e).length+i){var o=parseFloat(r).toPrecision(12);-1===o.indexOf("e+")&&(r=+o)}}return r}},3400:function(e,t,n){"use strict";var r=n(3428),a=n(4336).E9,i=n(7624).E9,o=n(8248),l=n(9032),s=l.FP_SAFE,u=-s,c=l.BADNUM,d=e.exports={};d.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var f={};d.warnBadFormat=function(e){var t=String(e);f[t]||(f[t]=1,d.warn('encountered bad format: "'+t+'"'))},d.noFormat=function(e){return String(e)},d.numberFormat=function(e){var t;try{t=i(d.adjustFormat(e))}catch(n){return d.warnBadFormat(e),d.noFormat}return t},d.nestedProperty=n(2296),d.keyedContainer=n(7804),d.relativeAttr=n(3193),d.isPlainObject=n(3620),d.toLogRange=n(6896),d.relinkPrivateKeys=n(1528);var h=n(8116);d.isArrayBuffer=h.isArrayBuffer,d.isTypedArray=h.isTypedArray,d.isArrayOrTypedArray=h.isArrayOrTypedArray,d.isArray1D=h.isArray1D,d.ensureArray=h.ensureArray,d.concat=h.concat,d.maxRowLength=h.maxRowLength,d.minRowLength=h.minRowLength;var p=n(435);d.mod=p.mod,d.modHalf=p.modHalf;var v=n(3064);d.valObjectMeta=v.valObjectMeta,d.coerce=v.coerce,d.coerce2=v.coerce2,d.coerceFont=v.coerceFont,d.coercePattern=v.coercePattern,d.coerceHoverinfo=v.coerceHoverinfo,d.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,d.validate=v.validate;var m=n(7555);d.dateTime2ms=m.dateTime2ms,d.isDateTime=m.isDateTime,d.ms2DateTime=m.ms2DateTime,d.ms2DateTimeLocal=m.ms2DateTimeLocal,d.cleanDate=m.cleanDate,d.isJSDate=m.isJSDate,d.formatDate=m.formatDate,d.incrementMonth=m.incrementMonth,d.dateTick0=m.dateTick0,d.dfltRange=m.dfltRange,d.findExactDates=m.findExactDates,d.MIN_MS=m.MIN_MS,d.MAX_MS=m.MAX_MS;var g=n(4952);d.findBin=g.findBin,d.sorterAsc=g.sorterAsc,d.sorterDes=g.sorterDes,d.distinctVals=g.distinctVals,d.roundUp=g.roundUp,d.sort=g.sort,d.findIndexOfMin=g.findIndexOfMin,d.sortObjectKeys=n(2996);var y=n(3084);d.aggNums=y.aggNums,d.len=y.len,d.mean=y.mean,d.median=y.median,d.midRange=y.midRange,d.variance=y.variance,d.stdev=y.stdev,d.interp=y.interp;var x=n(2248);d.init2dArray=x.init2dArray,d.transposeRagged=x.transposeRagged,d.dot=x.dot,d.translationMatrix=x.translationMatrix,d.rotationMatrix=x.rotationMatrix,d.rotationXYMatrix=x.rotationXYMatrix,d.apply3DTransform=x.apply3DTransform,d.apply2DTransform=x.apply2DTransform,d.apply2DTransform2=x.apply2DTransform2,d.convertCssMatrix=x.convertCssMatrix,d.inverseTransformMatrix=x.inverseTransformMatrix;var b=n(1864);d.deg2rad=b.deg2rad,d.rad2deg=b.rad2deg,d.angleDelta=b.angleDelta,d.angleDist=b.angleDist,d.isFullCircle=b.isFullCircle,d.isAngleInsideSector=b.isAngleInsideSector,d.isPtInsideSector=b.isPtInsideSector,d.pathArc=b.pathArc,d.pathSector=b.pathSector,d.pathAnnulus=b.pathAnnulus;var _=n(8308);d.isLeftAnchor=_.isLeftAnchor,d.isCenterAnchor=_.isCenterAnchor,d.isRightAnchor=_.isRightAnchor,d.isTopAnchor=_.isTopAnchor,d.isMiddleAnchor=_.isMiddleAnchor,d.isBottomAnchor=_.isBottomAnchor;var A=n(2348);d.segmentsIntersect=A.segmentsIntersect,d.segmentDistance=A.segmentDistance,d.getTextLocation=A.getTextLocation,d.clearLocationCache=A.clearLocationCache,d.getVisibleSegment=A.getVisibleSegment,d.findPointOnPath=A.findPointOnPath;var w=n(2880);d.extendFlat=w.extendFlat,d.extendDeep=w.extendDeep,d.extendDeepAll=w.extendDeepAll,d.extendDeepNoArrays=w.extendDeepNoArrays;var T=n(4248);d.log=T.log,d.warn=T.warn,d.error=T.error;var k=n(3756);d.counterRegex=k.counter;var M=n(1200);d.throttle=M.throttle,d.throttleDone=M.done,d.clearThrottle=M.clear;var S=n(2200);function C(e){var t={};for(var n in e)for(var r=e[n],a=0;as||e=t)&&o(e)&&e>=0&&e%1===0},d.noop=n(6628),d.identity=n(5536),d.repeat=function(e,t){for(var n=new Array(t),r=0;rn?Math.max(n,Math.min(t,e)):Math.max(t,Math.min(n,e))},d.bBoxIntersect=function(e,t,n){return n=n||0,e.left<=t.right+n&&t.left<=e.right+n&&e.top<=t.bottom+n&&t.top<=e.bottom+n},d.simpleMap=function(e,t,n,r,a){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,n)?a>10?(d.warn("randstr failed uniqueness"),s):e(t,n,r,(a||0)+1):s},d.OptionControl=function(e,t){e||(e={}),t||(t="opt");var n={optionList:[],_newoption:function(r){r[t]=e,n[r.name]=r,n.optionList.push(r)}};return n["_"+t]=e,n},d.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var n,r,a,i,o=e.length,l=2*o,s=2*t-1,u=new Array(s),c=new Array(o);for(n=0;n=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=o&&(a=l-1-a),i+=e[a]*u[r];c[n]=i}return c},d.syncOrAsync=function(e,t,n){var r;function a(){return d.syncOrAsync(e,t,n)}for(;e.length;)if((r=(0,e.splice(0,1)[0])(t))&&r.then)return r.then(a);return n&&n(t)},d.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},d.noneOrAll=function(e,t,n){if(e){var r,a,i=!1,o=!0;for(r=0;r0?t:0}))},d.fillArray=function(e,t,n,r){if(r=r||d.identity,d.isArrayOrTypedArray(e))for(var a=0;a1?a+o[1]:"";if(i&&(o.length>1||l.length>4||n))for(;r.test(l);)l=l.replace(r,"$1"+i+"$2");return l+s},d.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var R=/^\w*$/;d.templateString=function(e,t){var n={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,r){var a;return R.test(r)?a=t[r]:(n[r]=n[r]||d.nestedProperty(t,r).get,a=n[r]()),d.isValidTextValue(a)?a:""}))};var j={max:10,count:0,name:"hovertemplate"};d.hovertemplateString=function(){return U.apply(j,arguments)};var I={max:10,count:0,name:"texttemplate"};d.texttemplateString=function(){return U.apply(I,arguments)};var z=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,F={max:10,count:0,name:"texttemplate",parseMultDiv:!0};d.texttemplateStringForShapes=function(){return U.apply(F,arguments)};var B=/^[:|\|]/;function U(e,t,n){var r=this,i=arguments;t||(t={});var o={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,l,s){var u="_xother"===l||"_yother"===l,c="_xother_"===l||"_yother_"===l,f="xother_"===l||"yother_"===l,h="xother"===l||"yother"===l||u||f||c,p=l;(u||c)&&(p=p.substring(1)),(f||c)&&(p=p.substring(0,p.length-1));var v,m,g,y=null,x=null;if(r.parseMultDiv){var b=function(e){var t=e.match(z);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(p);p=b.key,y=b.op,x=b.number}if(h){if(void 0===(v=t[p]))return""}else for(g=3;g=48&&o<=57,u=l>=48&&l<=57;if(s&&(r=10*r+o-48),u&&(a=10*a+l-48),!s||!u){if(r!==a)return r-a;if(o!==l)return o-l}}return a-r};var H=2e9;d.seedPseudoRandom=function(){H=2e9},d.pseudoRandom=function(){var e=H;return H=(69069*H+1)%4294967296,Math.abs(H-e)<429496729?d.pseudoRandom():H/4294967296},d.fillText=function(e,t,n){var r=Array.isArray(n)?function(e){n.push(e)}:function(e){n.text=e},a=d.extractOption(e,t,"htx","hovertext");if(d.isValidTextValue(a))return r(a);var i=d.extractOption(e,t,"tx","text");return d.isValidTextValue(i)?r(i):void 0},d.isValidTextValue=function(e){return e||0===e},d.formatPercent=function(e,t){t=t||0;for(var n=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",r=0;r1&&(u=1):u=0,d.strTranslate(a-u*(n+o),i-u*(r+l))+d.strScale(u)+(s?"rotate("+s+(t?"":" "+n+" "+r)+")":"")},d.setTransormAndDisplay=function(e,t){e.attr("transform",d.getTextTransform(t)),e.style("display",t.scale?null:"none")},d.ensureUniformFontSize=function(e,t){var n=d.extendFlat({},t);return n.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),n},d.join2=function(e,t,n){var r=e.length;return r>1?e.slice(0,-1).join(t)+n+e[r-1]:e.join(t)},d.bigFont=function(e){return Math.round(1.2*e)};var Y=d.getFirefoxVersion(),V=null!==Y&&Y<86;d.getPositionFromD3Event=function(){return V?[r.event.layerX,r.event.layerY]:[r.event.offsetX,r.event.offsetY]}},3620:function(e){"use strict";e.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},7804:function(e,t,n){"use strict";var r=n(2296),a=/^\w*$/;e.exports=function(e,t,n,i){var o,l,s;n=n||"name",i=i||"value";var u={};t&&t.length?(s=r(e,t),l=s.get()):l=e,t=t||"";var c={};if(l)for(o=0;o2)return u[t]=2|u[t],f.set(e,null);if(d){for(o=t;o1){var t=["LOG:"];for(e=0;e1){var n=[];for(e=0;e"),"long")}},i.warn=function(){var e;if(r.logging>0){var t=["WARN:"];for(e=0;e0){var n=[];for(e=0;e"),"stick")}},i.error=function(){var e;if(r.logging>0){var t=["ERROR:"];for(e=0;e0){var n=[];for(e=0;e"),"stick")}}},988:function(e,t,n){"use strict";var r=n(3428);e.exports=function(e,t,n){var a=e.selectAll("g."+n.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var i=e.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each((function(e){e[0][i]=r.select(this)})),a}},2248:function(e,t,n){"use strict";var r=n(6524);t.init2dArray=function(e,t){for(var n=new Array(e),r=0;rt/2?e-Math.round(e/t)*t:e}}},2296:function(e,t,n){"use strict";var r=n(8248),a=n(8116).isArrayOrTypedArray;function i(e,t){return function(){var n,r,o,l,s,u=e;for(l=0;l/g),s=0;si||u===a||ul)&&(!t||!s(e))}:function(e,t){var s=e[0],u=e[1];if(s===a||si||u===a||ul)return!1;var c,d,f,h,p,v=n.length,m=n[0][0],g=n[0][1],y=0;for(c=1;cMath.max(d,m)||u>Math.max(f,g)))if(uc||Math.abs(r(o,f))>a)return!0;return!1},i.filter=function(e,t){var n=[e[0]],r=0,a=0;function o(o){e.push(o);var l=n.length,s=r;n.splice(a+1);for(var u=s+1;u1&&o(e.pop()),{addPt:o,raw:e,filtered:n}}},4296:function(e,t,n){"use strict";var r=n(8248),a=n(5928);e.exports=function(e){var t;if("string"!==typeof(t=e&&e.hasOwnProperty("userAgent")?e.userAgent:function(){var e;return"undefined"!==typeof navigator&&(e=navigator.userAgent),e&&e.headers&&"string"===typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]),e}()))return!0;var n=a({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!n)for(var i=t.split(" "),o=1;o-1;l--){var s=i[l];if("Version/"===s.substr(0,8)){var u=s.substr(8).split(".")[0];if(r(u)&&(u=+u),u>=13)return!0}}return n}},2416:function(e){"use strict";e.exports=function(e,t){if(t instanceof RegExp){for(var n=t.toString(),r=0;ra.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,n;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;nt}function d(e,t){return e>=t}t.findBin=function(e,t,n){if(r(t.start))return n?Math.ceil((e-t.start)/t.size-l)-1:Math.floor((e-t.start)/t.size+l);var i,o,f=0,h=t.length,p=0,v=h>1?(t[h-1]-t[0])/(h-1):1;for(o=v>=0?n?s:u:n?d:c,e+=v*l*(n?-1:1)*(v>=0?1:-1);f90&&a.log("Long binary search..."),f-1},t.sorterAsc=function(e,t){return e-t},t.sorterDes=function(e,t){return t-e},t.distinctVals=function(e){var n,r=e.slice();for(r.sort(t.sorterAsc),n=r.length-1;n>-1&&r[n]===o;n--);for(var a,i=r[n]-r[0]||1,l=i/(n||1)/1e4,s=[],u=0;u<=n;u++){var c=r[u],d=c-a;void 0===a?(s.push(c),a=c):d>l&&(i=Math.min(i,d),s.push(c),a=c)}return{vals:s,minDiff:i}},t.roundUp=function(e,t,n){for(var r,a=0,i=t.length-1,o=0,l=n?0:1,s=n?1:0,u=n?Math.ceil:Math.floor;a0&&(r=1),n&&r)return e.sort(t)}return r?e:e.reverse()},t.findIndexOfMin=function(e,t){t=t||i;for(var n,r=1/0,a=0;ai.length)&&(o=i.length),r(n)||(n=!1),a(i[0])){for(s=new Array(o),l=0;le.length-1)return e[e.length-1];var n=t%1;return n*e[Math.ceil(t)]+(1-n)*e[Math.floor(t)]}},2736:function(e,t,n){"use strict";var r=n(3428),a=n(3400),i=a.strTranslate,o=n(9616),l=n(4284).LINE_SPACING,s=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(e,n,m){var S=e.text(),C=!e.attr("data-notex")&&n&&n._context.typesetMath&&"undefined"!==typeof MathJax&&S.match(s),D=r.select(e.node().parentNode);if(!D.empty()){var O=e.attr("class")?e.attr("class").split(" ")[0]:"text";return O+="-math",D.selectAll("svg."+O).remove(),D.selectAll("g."+O+"-group").remove(),e.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),C?(n&&n._promises||[]).push(new Promise((function(t){e.style("display","none");var n=parseInt(e.node().style.fontSize,10),o={fontSize:n};!function(e,t,n){var i,o,l,s,f=parseInt((MathJax.version||"").split(".")[0]);if(2===f||3===f){var h=function(){return o=a.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:d},displayAlign:"left"})},p=function(){o=a.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=d},v=function(){if("SVG"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},m=function(){"svg"!==(i=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg")},g=function(){var n="math-output-"+a.randstr({},64),i=(s=r.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(e.replace(u,"\\lt ").replace(c,"\\gt "))).node();return 2===f?MathJax.Hub.Typeset(i):MathJax.typeset([i])},y=function(){var t=s.select(2===f?".MathJax_SVG":".MathJax"),i=!t.empty()&&s.select("svg").node();if(i){var o,l=i.getBoundingClientRect();o=2===f?r.select("body").select("#MathJax_SVG_glyphs"):t.select("defs"),n(t,o,l)}else a.log("There was an error in the tex syntax.",e),n();s.remove()},x=function(){if("SVG"!==i)return MathJax.Hub.setRenderer(i)},b=function(){"svg"!==i&&(MathJax.config.startup.output=i)},_=function(){return void 0!==l&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(o)},A=function(){MathJax.config=o};2===f?MathJax.Hub.Queue(h,v,g,y,x,_):3===f&&(p(),m(),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){g(),y(),b(),A()})))}else a.warn("No MathJax version:",MathJax.version)}(C[2],o,(function(r,a,o){D.selectAll("svg."+O).remove(),D.selectAll("g."+O+"-group").remove();var l=r&&r.select("svg");if(!l||!l.node())return P(),void t();var s=D.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});s.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild);var u=o.width,c=o.height;l.attr({class:O,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var d=e.node().style.fill||"black",f=l.select("g");f.attr({fill:d,stroke:d});var h=f.node().getBoundingClientRect(),p=h.width,v=h.height;(p>u||v>c)&&(l.style("overflow","hidden"),p=(h=l.node().getBoundingClientRect()).width,v=h.height);var g=+e.attr("x"),y=+e.attr("y"),x=-(n||e.node().getBoundingClientRect().height)/4;if("y"===O[0])s.attr({transform:"rotate("+[-90,g,y]+")"+i(-p/2,x-v/2)});else if("l"===O[0])y=x-v/2;else if("a"===O[0]&&0!==O.indexOf("atitle"))g=0,y=x;else{var b=e.attr("text-anchor");g-=p*("middle"===b?.5:"end"===b?1:0),y=y+x-v/2}l.attr({x:g,y:y}),m&&m.call(e,s),t(s)}))}))):P(),e}function P(){D.empty()||(O=e.attr("class")+"-math",D.select("svg."+O).remove()),e.text("").style("white-space","pre");var n=function(e,t){t=t.replace(g," ");var n,i=!1,s=[],u=-1;function c(){u++;var t=document.createElementNS(o.svg,"tspan");r.select(t).attr({class:"line",dy:u*l+"em"}),e.appendChild(t),n=t;var a=s;if(s=[{node:t}],a.length>1)for(var i=1;i doesnt match end tag <"+e+">. Pretending it did match.",t),n=s[s.length-1].node}else a.log("Ignoring unexpected end tag .",t)}var C=b.test(t);C?c():(n=e,s=[{node:e}]);for(var D=t.split(y),O=0;O|>|>)/g,d=[["$","$"],["\\(","\\)"]],f={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"},h={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},v="\u200b",m=["http:","https:","mailto:","",void 0,":"],g=t.NEWLINES=/(\r\n?|\n)/g,y=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;t.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(e,t){if(!e)return null;var n=e.match(t),r=n&&(n[3]||n[4]);return r&&L(r)}var M=/(^|;)\s*color:/;t.plainText=function(e,t){for(var n=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,r=void 0!==t.allowedTags?t.allowedTags:["br"],a=e.split(y),i=[],o="",l=0,s=0;s3?i.push(u.substr(0,h-3)+"..."):i.push(u.substr(0,h));break}o=""}}return i.join("")};var S={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},C=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function L(e){return e.replace(C,(function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var n=String.fromCharCode;return e<=65535?n(e):n(55232+(e>>10),e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):S[t])||e}))}function E(e){var t=encodeURI(decodeURI(e)),n=document.createElement("a"),r=document.createElement("a");n.href=e,r.href=t;var a=n.protocol,i=r.protocol;return-1!==m.indexOf(a)&&-1!==m.indexOf(i)?t:""}function D(e,t,n){var r,i,o,l=n.horizontalAlign,s=n.verticalAlign||"top",u=e.node().getBoundingClientRect(),c=t.node().getBoundingClientRect();return i="bottom"===s?function(){return u.bottom-r.height}:"middle"===s?function(){return u.top+(u.height-r.height)/2}:function(){return u.top},o="right"===l?function(){return u.right-r.width}:"center"===l?function(){return u.left+(u.width-r.width)/2}:function(){return u.left},function(){r=this.node().getBoundingClientRect();var e=o()-c.left,t=i()-c.top,l=n.gd||{};if(n.gd){l._fullLayout._calcInverseTransform(l);var s=a.apply3DTransform(l._fullLayout._invTransform)(e,t);e=s[0],t=s[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}t.convertEntities=L,t.sanitizeHTML=function(e){e=e.replace(g," ");for(var t=document.createElement("p"),n=t,a=[],i=e.split(y),o=0;oi.ts+t?s():i.timer=setTimeout((function(){s(),i.timer=null}),t)},t.done=function(e){var t=n[e];return t&&t.timer?new Promise((function(e){var n=t.onDone;t.onDone=function(){n&&n(),e(),t.onDone=null}})):Promise.resolve()},t.clear=function(e){if(e)r(n[e]),delete n[e];else for(var a in n)t.clear(a)}},6896:function(e,t,n){"use strict";var r=n(8248);e.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return r(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}},1680:function(e){"use strict";e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(e){"use strict";e.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"}}},9820:function(e,t,n){"use strict";var r=n(4040);e.exports=function(e){for(var t,n,a=r.layoutArrayContainers,i=r.layoutArrayRegexes,o=e.split("[")[0],l=0;l0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},t.cleanLayout=function(e){var n,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var i=(l.subplotsRegistry.cartesian||{}).attrRegex,s=(l.subplotsRegistry.polar||{}).attrRegex,d=(l.subplotsRegistry.ternary||{}).attrRegex,f=(l.subplotsRegistry.gl3d||{}).attrRegex,v=Object.keys(e);for(n=0;n3?(P.x=1.02,P.xanchor="left"):P.x<-2&&(P.x=-.02,P.xanchor="right"),P.y>3?(P.y=1.02,P.yanchor="bottom"):P.y<-2&&(P.y=-.02,P.yanchor="top")),p(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),u.clean(e),e.template&&e.template.layout&&t.cleanLayout(e.template.layout),e},t.cleanData=function(e){for(var n=0;n0)return e.substr(0,t)}t.hasParent=function(e,t){for(var n=b(t);n;){if(n in e)return!0;n=b(n)}return!1};var _=["x","y","z"];t.clearAxisTypes=function(e,t,n){for(var r=0;r1&&i.warn("Full array edits are incompatible with other edits",d);var y=n[""][""];if(u(y))t.set(null);else{if(!Array.isArray(y))return i.warn("Unrecognized full array edit value",d,y),!0;t.set(y)}return!v&&(f(m,g),h(e),!0)}var x,b,_,A,w,T,k,M,S=Object.keys(n).map(Number).sort(o),C=t.get(),L=C||[],E=c(g,d).get(),D=[],O=-1,P=L.length;for(x=0;xL.length-(k?0:1))i.warn("index out of range",d,_);else if(void 0!==T)w.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",d,_),u(T)?D.push(_):k?("add"===T&&(T={}),L.splice(_,0,T),E&&E.splice(_,0,{})):i.warn("Unrecognized full object edit value",d,_,T),-1===O&&(O=_);else for(b=0;b=0;x--)L.splice(D[x],1),E&&E.splice(D[x],1);if(L.length?C||t.set(L):t.set(null),v)return!1;if(f(m,g),p!==a){var N;if(-1===O)N=S;else{for(P=Math.max(L.length,P),N=[],x=0;x=O);x++)N.push(_);for(x=O;x=e.data.length||a<-e.data.length)throw new Error(n+" must be valid indices for gd.data.");if(t.indexOf(a,r+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+n+" must be unique.")}}function N(e,t,n){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if("undefined"===typeof t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),P(e,t,"currentIndices"),"undefined"===typeof n||Array.isArray(n)||(n=[n]),"undefined"!==typeof n&&P(e,n,"newIndices"),"undefined"!==typeof n&&t.length!==n.length)throw new Error("current and new indices must be of equal length.")}function R(e,t,n,r,i){!function(e,t,n,r){var a=o.isPlainObject(r);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(t))throw new Error("update must be a key:value object");if("undefined"===typeof n)throw new Error("indices must be an integer or array of integers");for(var i in P(e,n,"indices"),t){if(!Array.isArray(t[i])||t[i].length!==n.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in r)||!Array.isArray(r[i])||r[i].length!==t[i].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")}}(e,t,n,r);for(var s=function(e,t,n,r){var i,s,u,c,d,f=o.isPlainObject(r),h=[];for(var p in Array.isArray(n)||(n=[n]),n=O(n,e.data.length-1),t)for(var v=0;v-1&&-1===n.indexOf("grouptitlefont")?s(n,n.replace("titlefont","title.font")):n.indexOf("titleposition")>-1?s(n,n.replace("titleposition","title.position")):n.indexOf("titleside")>-1?s(n,n.replace("titleside","title.side")):n.indexOf("titleoffset")>-1&&s(n,n.replace("titleoffset","title.offset")):s(n,n.replace("title","title.text"));function s(t,n){e[n]=e[t],delete e[t]}}function Y(e,t,n){e=o.getGraphDiv(e),w.clearPromiseQueue(e);var r={};if("string"===typeof t)r[t]=n;else{if(!o.isPlainObject(t))return o.warn("Relayout fail.",t,n),Promise.reject();r=o.extendFlat({},t)}Object.keys(r).length&&(e.changed=!0);var a=X(e,r),i=a.flags;i.calc&&(e.calcdata=void 0);var l=[f.previousPromises];i.layoutReplot?l.push(T.layoutReplot):Object.keys(r).length&&(V(e,i,a)||f.supplyDefaults(e),i.legend&&l.push(T.doLegend),i.layoutstyle&&l.push(T.layoutStyles),i.axrange&&G(l,a.rangesAltered),i.ticks&&l.push(T.doTicksRelayout),i.modebar&&l.push(T.doModeBar),i.camera&&l.push(T.doCamera),i.colorbars&&l.push(T.doColorBars),l.push(C)),l.push(f.rehover,f.redrag,f.reselect),u.add(e,Y,[e,a.undoit],Y,[e,a.redoit]);var s=o.syncOrAsync(l,e);return s&&s.then||(s=Promise.resolve(e)),s.then((function(){return e.emit("plotly_relayout",a.eventData),e}))}function V(e,t,n){var r,a,i=e._fullLayout;if(!t.axrange)return!1;for(var l in t)if("axrange"!==l&&t[l])return!1;var s=function(e,t){return o.coerce(r,a,v,e,t)},u={};for(var c in n.rangesAltered){var d=h.id2name(c);if(r=e.layout[d],a=i[d],p(r,a,s,u),a._matchGroup)for(var f in a._matchGroup)if(f!==c){var m=i[h.id2name(f)];m.autorange=a.autorange,m.range=a.range.slice(),m._input.range=a.range.slice()}}return!0}function G(e,t){var n=t?function(e){var n=[];for(var r in t){var a=h.getFromId(e,r);if(n.push(r),-1!==(a.ticklabelposition||"").indexOf("inside")&&a._anchorAxis&&n.push(a._anchorAxis._id),a._matchGroup)for(var i in a._matchGroup)t[i]||n.push(i)}return h.draw(e,n,{skipTitle:!0})}:function(e){return h.draw(e,"redraw")};e.push(b,T.doAutoRangeAndConstraints,n,T.drawData,T.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,q=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(e,t){var n,r,a,i=e.layout,s=e._fullLayout,u=s._guiEditing,f=F(s._preGUI,u),p=Object.keys(t),v=h.list(e),m=o.extendDeepAll({},t),g={};for(H(t),p=Object.keys(t),r=0;r0&&"string"!==typeof P.parts[R];)R--;var j=P.parts[R],I=P.parts[R-1]+"."+j,B=P.parts.slice(0,R).join("."),U=l(e.layout,B).get(),Y=l(s,B).get(),V=P.get();if(void 0!==N){T[O]=N,S[O]="reverse"===j?N:z(V);var G=d.getLayoutValObject(s,P.parts);if(G&&G.impliedEdits&&null!==N)for(var X in G.impliedEdits)C(o.relativeAttr(O,X),G.impliedEdits[X]);if(-1!==["width","height"].indexOf(O))if(N){C("autosize",null);var Q="height"===O?"width":"height";C(Q,s[Q])}else s[O]=e._initialAutoSize[O];else if("autosize"===O)C("width",N?null:s.width),C("height",N?null:s.height);else if(I.match(W))D(I),l(s,B+"._inputRange").set(null);else if(I.match(q)){D(I),l(s,B+"._inputRange").set(null);var K=l(s,B).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else I.match(Z)&&l(s,B+"._inputDomain").set(null);if("type"===j){L=U;var $="linear"===Y.type&&"log"===N,ee="log"===Y.type&&"linear"===N;if($||ee){if(L&&L.range)if(Y.autorange)$&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var te=L.range[0],ne=L.range[1];$?(te<=0&&ne<=0&&C(B+".autorange",!0),te<=0?te=ne/1e6:ne<=0&&(ne=te/1e6),C(B+".range[0]",Math.log(te)/Math.LN10),C(B+".range[1]",Math.log(ne)/Math.LN10)):(C(B+".range[0]",Math.pow(10,te)),C(B+".range[1]",Math.pow(10,ne)))}else C(B+".autorange",!0);Array.isArray(s._subplots.polar)&&s._subplots.polar.length&&s[P.parts[0]]&&"radialaxis"===P.parts[1]&&delete s[P.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(e,Y,N,C),c.getComponentMethod("images","convertCoords")(e,Y,N,C)}else C(B+".autorange",!0),C(B+".range",null);l(s,B+"._inputRange").set(null)}else if(j.match(M)){var re=l(s,O).get(),ae=(N||{}).type;ae&&"-"!==ae||(ae="linear"),c.getComponentMethod("annotations","convertCoords")(e,re,ae,C),c.getComponentMethod("images","convertCoords")(e,re,ae,C)}var ie=A.containerArrayMatch(O);if(ie){n=ie.array,r=ie.index;var oe=ie.property,le=G||{editType:"calc"};""!==r&&""===oe&&(A.isAddVal(N)?S[O]=null:A.isRemoveVal(N)?S[O]=(l(i,n).get()||[])[r]:o.warn("unrecognized full object value",t)),k.update(_,le),g[n]||(g[n]={});var se=g[n][r];se||(se=g[n][r]={}),se[oe]=N,delete t[O]}else"reverse"===j?(U.range?U.range.reverse():(C(B+".autorange",!0),U.range=[1,0]),Y.autorange?_.calc=!0:_.plot=!0):("dragmode"===O&&(!1===N&&!1!==V||!1!==N&&!1===V)||s._has("scatter-like")&&s._has("regl")&&"dragmode"===O&&("lasso"===N||"select"===N)&&"lasso"!==V&&"select"!==V||s._has("gl2d")?_.plot=!0:G?k.update(_,G):_.calc=!0,P.set(N))}}for(n in g)A.applyContainerArrayChanges(e,f(i,n),g[n],_,f)||(_.plot=!0);for(var ue in E){var ce=(L=h.getFromId(e,ue))&&L._constraintGroup;if(ce)for(var de in _.calc=!0,ce)E[de]||(h.getFromId(e,de)._constraintShrinkable=!0)}(J(e)||t.height||t.width)&&(_.plot=!0);var fe=s.shapes;for(r=0;r1;)if(r.pop(),void 0!==(n=l(t,r.join(".")+".uirevision").get()))return n;return t.uirevision}function re(e,t){for(var n=0;n=a.length?a[0]:a[e]:a}function s(e){return Array.isArray(i)?e>=i.length?i[0]:i[e]:i}function u(e,t){var n=0;return function(){if(e&&++n===t)return e()}}return void 0===r._frameWaitingCnt&&(r._frameWaitingCnt=0),new Promise((function(i,c){function d(){r._currentFrame&&r._currentFrame.onComplete&&r._currentFrame.onComplete();var t=r._currentFrame=r._frameQueue.shift();if(t){var n=t.name?t.name.toString():null;e._fullLayout._currentFrame=n,r._lastFrameAt=Date.now(),r._timeToNext=t.frameOpts.duration,f.transition(e,t.frame.data,t.frame.layout,w.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:n,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(r._animationRaf),r._animationRaf=null}function h(){e.emit("plotly_animating"),r._lastFrameAt=-1/0,r._timeToNext=0,r._runningTransitions=0,r._currentFrame=null;var t=function(){r._animationRaf=window.requestAnimationFrame(t),Date.now()-r._lastFrameAt>r._timeToNext&&d()};t()}var p,v,m=0;function g(e){return Array.isArray(a)?m>=a.length?e.transitionOpts=a[m]:e.transitionOpts=a[0]:e.transitionOpts=a,m++,e}var y=[],x=void 0===t||null===t,b=Array.isArray(t);if(x||b||!o.isPlainObject(t)){if(x||-1!==["string","number"].indexOf(typeof t))for(p=0;p0&&TT)&&k.push(v);y=k}}y.length>0?function(t){if(0!==t.length){for(var a=0;a=0;r--)if(o.isPlainObject(t[r])){var v=t[r].name,m=(c[v]||p[v]||{}).name,g=t[r].name,y=c[m]||p[m];m&&g&&"number"===typeof g&&y&&S<5&&(S++,o.warn('addFrames: overwriting frame "'+(c[m]||p[m]).name+'" with a frame whose name of type "number" also equates to "'+m+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&o.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.")),p[v]={name:v},h.push({frame:f.supplyFrameDefaults(t[r]),index:n&&void 0!==n[r]&&null!==n[r]?n[r]:d+r})}h.sort((function(e,t){return e.index>t.index?-1:e.index=0;r--){if("number"===typeof(a=h[r].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;c[a.name="frame "+e._transitionData._counter++];);if(c[a.name]){for(i=0;i=0;n--)r=t[n],i.push({type:"delete",index:r}),l.unshift({type:"insert",index:r,value:a[r]});var s=f.modifyFrames,c=f.modifyFrames,d=[e,l],h=[e,i];return u&&u.add(e,s,d,c,h),f.modifyFrames(e,i)},t.addTraces=function e(n,r,a){n=o.getGraphDiv(n);var i,l,s=[],c=t.deleteTraces,d=e,f=[n,s],h=[n,r];for(function(e,t,n){var r,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if("undefined"===typeof t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),r=0;r=0&&n=0&&n=i.length)return!1;if(2===e.dimensions){if(n++,t.length===n)return e;var o=t[n];if(!_(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function _(e){return e===Math.round(e)&&e>=0}function A(){var e,t,n={};for(e in d(n,o),r.subplotsRegistry)if((t=r.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a=s.length)return!1;a=(n=(r.transformsRegistry[s[u].type]||{}).attributes)&&n[t[2]],l=3}else{var c=e._module;if(c||(c=(r.modules[e.type||i.type.dflt]||{})._module),!c)return!1;if(!(a=(n=c.attributes)&&n[o])){var d=c.basePlotModule;d&&d.attributes&&(a=d.attributes[o])}a||(a=i[o])}return b(a,t,l)},t.getLayoutValObject=function(e,t){var n=function(e,t){var n,a,i,l,s=e._basePlotModules;if(s){var u;for(n=0;n=a&&(n._input||{})._templateitemname;l&&(o=a);var s,u=t+"["+o+"]";function c(){s={},l&&(s[u]={},s[u][i]=l)}function d(e,t){l?r.nestedProperty(s[u],e).set(t):s[u+"."+e]=t}function f(){var e=s;return c(),e}return c(),{modifyBase:function(e,t){s[e]=t},modifyItem:d,getUpdateObj:f,applyUpdate:function(t,n){t&&d(t,n);var a=f();for(var i in a)r.nestedProperty(e,i).set(a[i])}}}},9172:function(e,t,n){"use strict";var r=n(3428),a=n(4040),i=n(7316),o=n(3400),l=n(2736),s=n(3696),u=n(6308),c=n(3616),d=n(1668),f=n(3080),h=n(4460),p=n(4284),v=n(1888),m=v.enforce,g=v.clean,y=n(9280).doAutoRange,x="start",b="middle",_="end";function A(e,t,n){for(var r=0;r=e[1]||a[1]<=e[0])&&i[0]t[0])return!0}return!1}function w(e){var n,a,l,s,d,v,m=e._fullLayout,g=m._size,y=g.p,x=h.list(e,"",!0);if(m._paperdiv.style({width:e._context.responsive&&m.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":m.width+"px",height:e._context.responsive&&m.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":m.height+"px"}).selectAll(".main-svg").call(c.setSize,m.width,m.height),e._context.setBackground(e,m.paper_bgcolor),t.drawMainTitle(e),f.manage(e),!m._has("cartesian"))return i.previousPromises(e);function b(e,t,n){var r=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===n?t._offset-y-r:t._offset+t._length+y+r:g.t+g.h*(1-(e.position||0))+r%1:t?"right"===n?t._offset+t._length+y+r:t._offset-y-r:g.l+g.w*(e.position||0)+r%1}for(n=0;n.5?"t":"b",o=e._fullLayout.margin[i],l=0;return"paper"===t.yref?l=n+t.pad.t+t.pad.b:"container"===t.yref&&(l=function(e,t,n,r,a){var i=0;return"middle"===n&&(i+=a/2),"t"===e?("top"===n&&(i+=a),i+=r-t*r):("bottom"===n&&(i+=a),i+=t*r),i}(i,r,a,e._fullLayout.height,n)+t.pad.t+t.pad.b),l>o?l:0}(e,n,m);if(g>0){!function(e,t,n,r){var a="title.automargin",l=e._fullLayout.title,s=l.y>.5?"t":"b",u={x:l.x,y:l.y,t:0,b:0},c={};"paper"===l.yref&&function(e,t,n,r,a){var i="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,l=o.isTopAnchor(t)?r:r-a,s="b"===n?i-l:l;return!(o.isTopAnchor(t)&&"t"===n||o.isBottomAnchor(t)&&"b"===n)&&sw?c.push({code:"unused",traceType:y,templateCount:A,dataCount:w}):w>A&&c.push({code:"reused",traceType:y,templateCount:A,dataCount:w})}}else c.push({code:"data"});if(function e(t,n){for(var r in t)if("_"!==r.charAt(0)){var i=t[r],o=v(t,r,n);a(i)?(Array.isArray(t)&&!1===i._template&&i.templateitemname&&c.push({code:"missing",path:o,templateitemname:i.templateitemname}),e(i,o)):Array.isArray(i)&&m(i)&&e(i,o)}}({data:h,layout:f},""),c.length)return c.map(g)}},7024:function(e,t,n){"use strict";var r=n(8248),a=n(6424),i=n(7316),o=n(3400),l=n(7030),s=n(7164),u=n(3268),c=n(5788).version,d={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}};e.exports=function(e,t){var n,f,h,p;function v(e){return!(e in t)||o.validate(t[e],d[e])}if(t=t||{},o.isPlainObject(e)?(n=e.data||[],f=e.layout||{},h=e.config||{},p={}):(e=o.getGraphDiv(e),n=o.extendDeep([],e.data),f=o.extendDeep({},e.layout),h=e._context,p=e._fullLayout||{}),!v("width")&&null!==t.width||!v("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!v("format"))throw new Error("Export format is not "+o.join2(d.format.values,", "," or ")+".");var m={};function g(e,n){return o.coerce(t,m,d,e,n)}var y=g("format"),x=g("width"),b=g("height"),_=g("scale"),A=g("setBackground"),w=g("imageDataOnly"),T=document.createElement("div");T.style.position="absolute",T.style.left="-5000px",document.body.appendChild(T);var k=o.extendFlat({},f);x?k.width=x:null===t.width&&r(p.width)&&(k.width=p.width),b?k.height=b:null===t.height&&r(p.height)&&(k.height=p.height);var M=o.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:A}),S=l.getRedrawFunc(T);function C(){return new Promise((function(e){setTimeout(e,l.getDelay(T._fullLayout))}))}function L(){return new Promise((function(e,t){var n=s(T,y,_),r=T._fullLayout.width,d=T._fullLayout.height;function f(){a.purge(T),document.body.removeChild(T)}if("full-json"===y){var h=i.graphJson(T,!1,"keepdata","object",!0,!0);return h.version=c,h=JSON.stringify(h),f(),e(w?h:l.encodeJSON(h))}if(f(),"svg"===y)return e(w?n:l.encodeSVG(n));var p=document.createElement("canvas");p.id=o.randstr(),u({format:y,width:r,height:d,scale:_,canvas:p,svg:n,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){a.newPlot(T,n,k,M).then(S).then(C).then(L).then((function(t){e(function(e){return w?e.replace(l.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},1480:function(e,t,n){"use strict";var r=n(3400),a=n(7316),i=n(3060),o=n(556).dfltConfig,l=r.isPlainObject,s=Array.isArray,u=r.isArrayOrTypedArray;function c(e,t,n,a,i,o){o=o||[];for(var d=Object.keys(e),f=0;fx.length&&a.push(h("unused",i,g.concat(x.length)));var k,M,S,C,L,E=x.length,D=Array.isArray(T);if(D&&(E=Math.min(E,T.length)),2===b.dimensions)for(M=0;Mx[M].length&&a.push(h("unused",i,g.concat(M,x[M].length)));var O=x[M].length;for(k=0;k<(D?Math.min(O,T[M].length):O);k++)S=D?T[M][k]:T,C=y[M][k],L=x[M][k],r.validate(C,S)?L!==C&&L!==+C&&a.push(h("dynamic",i,g.concat(M,k),C,L)):a.push(h("value",i,g.concat(M,k),C))}else a.push(h("array",i,g.concat(M),y[M]));else for(M=0;M1&&f.push(h("object","layout"))),a.supplyDefaults(p);for(var v=p._fullData,m=n.length,g=0;g0&&Math.round(d)===d))return{vals:a};u=d}for(var f=t.calendar,h="start"===s,p="end"===s,v=e[n+"period0"],m=i(v,f)||0,g=[],y=[],x=[],b=a.length,_=0;_k;)T=o(T,-u,f);for(;T<=k;)T=o(T,u,f);w=o(T,-u,f)}else{for(T=m+(A=Math.round((k-m)/c))*c;T>k;)T-=c;for(;T<=k;)T+=c;w=T-c}g[_]=h?w:p?T:(w+T)/2,y[_]=w,x[_]=T}return{vals:g,starts:y,ends:x}}},6720:function(e){"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},9280:function(e,t,n){"use strict";var r=n(3428),a=n(8248),i=n(3400),o=n(9032).FP_SAFE,l=n(4040),s=n(3616),u=n(9811),c=u.getFromId,d=u.isLinked;function f(e,t){var n,r,a=[],o=e._fullLayout,l=p(o,t,0),s=p(o,t,1),u=m(e,t),c=u.min,d=u.max;if(0===c.length||0===d.length)return i.simpleMap(t.range,t.r2l);var f=c[0].val,v=d[0].val;for(n=1;n0&&((k=E-l(b)-s(_))>D?M/k>O&&(A=b,w=_,O=M/k):M/E>O&&(A={val:b.val,nopad:1},w={val:_.val,nopad:1},O=M/E));if(f===v){var P=f-1,N=f+1;if(C)if(0===f)a=[0,1];else{var R=(f>0?d:c).reduce((function(e,t){return Math.max(e,s(t))}),0),j=f/(1-Math.min(.5,R/E));a=f>0?[0,j]:[j,0]}else a=L?[Math.max(0,P),Math.max(1,N)]:[P,N]}else C?(A.val>=0&&(A={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):L&&(A.val-O*l(A)<0&&(A={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),O=(w.val-A.val-h(t,b.val,_.val))/(E-l(A)-s(w)),a=[A.val-O*l(A),w.val+O*s(w)];return a=T(a,t),t.limitRange&&t.limitRange(),y&&a.reverse(),i.simpleMap(a,t.l2r||Number)}function h(e,t,n){var r=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,n),i=0;i0?n.ppadplus:n.ppadminus)||n.ppad||0),S=k((e._m>0?n.ppadminus:n.ppadplus)||n.ppad||0),C=k(n.vpadplus||n.vpad),L=k(n.vpadminus||n.vpad);if(!w){if(f=1/0,h=-1/0,A)for(r=0;r0&&(f=i),i>h&&i-o&&(f=i),i>h&&i=O;r--)D(r);return{min:p,max:v,opts:n}},concatExtremes:m};var v=3;function m(e,t,n){var r,a,i,o=t._id,l=e._fullData,s=e._fullLayout,u=[],d=[];function f(e,t){for(r=0;r=n&&(u.extrapad||!o)){l=!1;break}a(t,u.val)&&u.pad<=n&&(o||!u.extrapad)&&(e.splice(s,1),s--)}if(l){var c=i&&0===t;e.push({val:t,pad:c?0:n,extrapad:!c&&o})}}function b(e){return a(e)&&Math.abs(e)=t}function w(e,t,n){return void 0===t||void 0===n||(t=e.d2l(t))<(n=e.d2l(n))}function T(e,t){if(!t||!t.autorangeoptions)return e;var n=e[0],r=e[1],a=t.autorangeoptions.include;if(void 0!==a){var o=t.d2l(n),l=t.d2l(r);i.isArrayOrTypedArray(a)||(a=[a]);for(var s=0;s=u&&(o=u,n=u),l<=u&&(l=u,r=u)}}return n=function(e,t){var n=t.autorangeoptions;return n&&void 0!==n.minallowed&&w(t,n.minallowed,n.maxallowed)?n.minallowed:n&&void 0!==n.clipmin&&w(t,n.clipmin,n.clipmax)?Math.max(e,t.d2l(n.clipmin)):e}(n,t),r=function(e,t){var n=t.autorangeoptions;return n&&void 0!==n.maxallowed&&w(t,n.minallowed,n.maxallowed)?n.maxallowed:n&&void 0!==n.clipmax&&w(t,n.clipmin,n.clipmax)?Math.min(e,t.d2l(n.clipmax)):e}(r,t),[n,r]}},6808:function(e){"use strict";e.exports=function(e,t,n){var r,a;if(n){var i="reversed"===t||"min reversed"===t||"max reversed"===t;r=n[i?1:0],a=n[i?0:1]}var o=e("autorangeoptions.minallowed",null===a?r:void 0),l=e("autorangeoptions.maxallowed",null===r?a:void 0);void 0===o&&e("autorangeoptions.clipmin"),void 0===l&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},4460:function(e,t,n){"use strict";var r=n(3428),a=n(8248),i=n(7316),o=n(4040),l=n(3400),s=l.strTranslate,u=n(2736),c=n(1668),d=n(6308),f=n(3616),h=n(4724),p=n(8728),v=n(9032),m=v.ONEMAXYEAR,g=v.ONEAVGYEAR,y=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,A=v.ONEMAXMONTH,w=v.ONEAVGMONTH,T=v.ONEMINMONTH,k=v.ONEWEEK,M=v.ONEDAY,S=M/2,C=v.ONEHOUR,L=v.ONEMIN,E=v.ONESEC,D=v.MINUS_SIGN,O=v.BADNUM,P={K:"zeroline"},N={K:"gridline",L:"path"},R={K:"minor-gridline",L:"path"},j={K:"tick",L:"path"},I={K:"tick",L:"text"},z={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},F=n(4284),B=F.MID_SHIFT,U=F.CAP_SHIFT,H=F.LINE_SPACING,Y=F.OPPOSITE_SIDE,V=e.exports={};V.setConvert=n(8344);var G=n(2976),W=n(9811),q=W.idSort,Z=W.isLinked;V.id2name=W.id2name,V.name2id=W.name2id,V.cleanId=W.cleanId,V.list=W.list,V.listIds=W.listIds,V.getFromId=W.getFromId,V.getFromTrace=W.getFromTrace;var X=n(9280);V.getAutoRange=X.getAutoRange,V.findExtremes=X.findExtremes;var J=1e-4;function Q(e){var t=(e[1]-e[0])*J;return[e[0]-t,e[1]+t]}V.coerceRef=function(e,t,n,r,a,i){var o=r.charAt(r.length-1),s=n._fullLayout._subplots[o+"axis"],u=r+"ref",c={};return a||(a=s[0]||("string"===typeof i?i:i[0])),i||(i=a),s=s.concat(s.map((function(e){return e+" domain"}))),c[u]={valType:"enumerated",values:s.concat(i?"string"===typeof i?[i]:i:[]),dflt:a},l.coerce(e,t,c,u)},V.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},V.coercePosition=function(e,t,n,r,a,i){var o,s;if("range"!==V.getRefType(r))o=l.ensureNumber,s=n(a,i);else{var u=V.getFromId(t,r);s=n(a,i=u.fraction2r(i)),o=u.cleanPos}e[a]=o(s)},V.cleanPosition=function(e,t,n){return("paper"===n||"pixel"===n?l.ensureNumber:V.getFromId(t,n).cleanPos)(e)},V.redrawComponents=function(e,t){t=t||V.listIds(e);var n=e._fullLayout;function r(r,a,i,l){for(var s=o.getComponentMethod(r,a),u={},c=0;cr&&f2e-6||((n-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},V.saveRangeInitial=function(e,t){for(var n=V.list(e,"",!0),r=!1,a=0;a.3*f||c(r)||c(i))){var h=n.dtick/2;e+=e+ho){var s=Number(n.substr(1));i.exactYears>o&&s%12===0?e=V.tickIncrement(e,"M6","reverse")+1.5*M:i.exactMonths>o?e=V.tickIncrement(e,"M1","reverse")+15.5*M:e-=S;var u=V.tickIncrement(e,n);if(u<=r)return u}return e}(y,e,g,u,i)),m=y;m<=c;)m=V.tickIncrement(m,g,!1,i);return{start:t.c2r(y,0,i),end:t.c2r(m,0,i),size:g,_dataSpan:c-u}},V.prepMinorTicks=function(e,t,n){if(!t.minor.dtick){delete e.dtick;var r,i=t.dtick&&a(t._tmin);if(i){var o=V.tickIncrement(t._tmin,t.dtick,!0);r=[t._tmin,.99*o+.01*t._tmin]}else{var s=l.simpleMap(t.range,t.r2l);r=[s[0],.8*s[0]+.2*s[1]]}if(e.range=l.simpleMap(r,t.l2r),e._isMinor=!0,V.prepTicks(e,n),i){var u=a(t.dtick),c=a(e.dtick),d=u?t.dtick:+t.dtick.substring(1),f=c?e.dtick:+e.dtick.substring(1);u&&c?te(d,f)?d===2*k&&f===2*M&&(e.dtick=k):d===2*k&&f===3*M?e.dtick=k:d!==k||(t._input.minor||{}).nticks?ne(d/f,2.5)?e.dtick=d/2:e.dtick=d:e.dtick=M:"M"===String(t.dtick).charAt(0)?c?e.dtick="M1":te(d,f)?d>=12&&2===f&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?te(d,f)||(e.dtick=ne(d/f,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},V.prepTicks=function(e,t){var n=l.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var r,i=e.nticks;i||("category"===e.type||"multicategory"===e.type?(r=e.tickfont?l.bigFont(e.tickfont.size||12):15,i=e._length/r):(r="y"===e._id.charAt(0)?40:80,i=l.constrain(e._length/r,4,9)+1),"radialaxis"===e._name&&(i*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(i*=100),e._roughDTick=Math.abs(n[1]-n[0])/i,V.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function n(){return!(a(e.dtick)||"M"!==e.dtick.charAt(0))}var r=n(),i=V.getTickFormat(e);if(i){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=C,o&&!r&&e.dtick=(P?0:1);N--){var R=!N;N?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var j=N?e:l.extendFlat({},e,e.minor);if(R?V.prepMinorTicks(j,e,t):V.prepTicks(j,t),"array"!==j.tickmode)if("sync"!==j.tickmode){var I=Q(c),z=I[0],F=I[1],B=a(j.dtick),U="log"===i&&!(B||"L"===j.dtick.charAt(0)),H=V.tickFirst(j,t);if(N){if(e._tmin=H,H=F:q<=F;q=V.tickIncrement(q,Z,d,o)){if(N&&Y++,j.rangebreaks&&!d){if(q=h)break}if(E.length>p||q===W)break;W=q;var X={value:q};N?(U&&q!==(0|q)&&(X.simpleLabel=!0),s>1&&Y%s&&(X.skipLabel=!0),E.push(X)):(X.minor=!0,D.push(X))}}else E=[],v=ie(e);else N?(E=[],v=oe(e,!R)):(D=[],L=oe(e,!R))}if(P&&!("inside"===e.minor.ticks&&"outside"===e.ticks||"outside"===e.minor.ticks&&"inside"===e.ticks)){for(var J=E.map((function(e){return e.value})),K=[],$=0;$0?(i=r-1,o=r):(i=r,o=r);var l,s=e[i].value,u=e[o].value,c=Math.abs(u-s),d=n||c,f=0;d>=y?f=c>=y&&c<=m?c:g:n===b&&d>=_?f=c>=_&&c<=x?c:b:d>=T?f=c>=T&&c<=A?c:w:n===k&&d>=k?f=k:d>=M?f=M:n===S&&d>=S?f=S:n===C&&d>=C&&(f=C),f>=c&&(f=c,l=!0);var h=a+f;if(t.rangebreaks&&f>0){for(var p=0,v=0;v<84;v++){var L=(v+.5)/84;t.maskBreaks(a*(1-L)+L*h)!==O&&p++}(f*=p/84)||(e[r].drop=!0),l&&c>k&&(f=c)}(f>0||0===r)&&(e[r].periodX=a+f/2)}}(E,e,e._definedDelta),e.rangebreaks){var ae="y"===e._id.charAt(0),le=1;"auto"===e.tickmode&&(le=e.tickfont?e.tickfont.size:12);var se=NaN;for(n=E.length-1;n>-1;n--)if(E[n].drop)E.splice(n,1);else{E[n].value=Re(E[n].value,e);var ue=e.c2p(E[n].value);(ae?se>ue-le:seh||deh&&(ce.periodX=h),de10||"01-01"!==r.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=M&&i<=10||t>=15*M)e._tickround="d";else if(t>=L&&i<=16||t>=C)e._tickround="M";else if(t>=E&&i<=19||t>=L)e._tickround="S";else{var o=e.l2r(n+t).replace(/^-/,"").length;e._tickround=Math.max(i,o)-20,e._tickround<0&&(e._tickround=4)}}else if(a(t)||"L"===t.charAt(0)){var l=e.range.map(e.r2d||Number);a(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(l[0]),Math.abs(l[1])),u=Math.floor(Math.log(s)/Math.LN10+.01),c=void 0===e.minexponent?3:e.minexponent;Math.abs(u)>c&&(ye(e.exponentformat)&&!xe(u)?e._tickexponent=3*Math.round((u-1)/3):e._tickexponent=u)}else e._tickround=null}function me(e,t,n){var r=e.tickfont||{};return{x:t,dx:0,dy:0,text:n||"",fontSize:r.size,font:r.family,fontColor:r.color}}V.autoTicks=function(e,t,n){var r;function i(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=l.dateTick0(e.calendar,0);var o=2*t;if(o>g)t/=g,r=i(10),e.dtick="M"+12*pe(t,r,le);else if(o>w)t/=w,e.dtick="M"+pe(t,1,se);else if(o>M){if(e.dtick=pe(t,M,e._hasDayOfWeekBreaks?[1,2,7,14]:ce),!n){var s=V.getTickFormat(e),u="period"===e.ticklabelmode;u&&(e._rawTick0=e.tick0),/%[uVW]/.test(s)?e.tick0=l.dateTick0(e.calendar,2):e.tick0=l.dateTick0(e.calendar,1),u&&(e._dowTick0=e.tick0)}}else o>C?e.dtick=pe(t,C,se):o>L?e.dtick=pe(t,L,ue):o>E?e.dtick=pe(t,E,ue):(r=i(10),e.dtick=pe(t,r,le))}else if("log"===e.type){e.tick0=0;var c=l.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(c[1]-c[0])<1){var d=1.5*Math.abs((c[1]-c[0])/t);t=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/d,r=i(10),e.dtick="L"+pe(t,r,le)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Ne(e)?(e.tick0=0,r=1,e.dtick=pe(t,r,he)):(e.tick0=0,r=i(10),e.dtick=pe(t,r,le));if(0===e.dtick&&(e.dtick=1),!a(e.dtick)&&"string"!==typeof e.dtick){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}},V.tickIncrement=function(e,t,n,i){var o=n?-1:1;if(a(t))return l.increment(e,o*t);var s=t.charAt(0),u=o*Number(t.substr(1));if("M"===s)return l.incrementMonth(e,u,i);if("L"===s)return Math.log(Math.pow(10,e)+u)/Math.LN10;if("D"===s){var c="D2"===t?fe:de,d=e+.01*o,f=l.roundUp(l.mod(d,1),c,n);return Math.floor(d)+Math.log(r.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(t)},V.tickFirst=function(e,t){var n=e.r2l||Number,i=l.simpleMap(e.range,n,void 0,void 0,t),o=i[1]=0&&n<=e._length?t:null};if(s&&l.isArrayOrTypedArray(e.ticktext)){var h=l.simpleMap(e.range,e.r2l),p=(Math.abs(h[1]-h[0])-(e._lBreaks||0))/1e4;for(i=0;i ")}else e._prevDateHead=s,u+="
"+s;t.text=u}(e,o,n,u):"log"===c?function(e,t,n,r,i){var o=e.dtick,s=t.x,u=e.tickformat,c="string"===typeof o&&o.charAt(0);if("never"===i&&(i=""),r&&"L"!==c&&(o="L3",c="L"),u||"L"===c)t.text=be(Math.pow(10,s),e,i,r);else if(a(o)||"D"===c&&l.mod(s+.01,1)<.1){var d=Math.round(s),f=Math.abs(d),h=e.exponentformat;"power"===h||ye(h)&&xe(d)?(t.text=0===d?1:1===d?"10":"10"+(d>1?"":D)+f+"",t.fontSize*=1.25):("e"===h||"E"===h)&&f>2?t.text="1"+h+(d>0?"+":D)+f:(t.text=be(Math.pow(10,s),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==c)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,l.mod(s,1)))),t.fontSize*=.75}if("D1"===e.dtick){var p=String(t.text).charAt(0);"0"!==p&&"1"!==p||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(s<0?.5:.25)))}}(e,o,0,u,m):"category"===c?function(e,t){var n=e._categories[Math.round(t.x)];void 0===n&&(n=""),t.text=String(n)}(e,o):"multicategory"===c?function(e,t,n){var r=Math.round(t.x),a=e._categories[r]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);n?t.text=o+" - "+i:(t.text=i,t.text2=o)}(e,o,n):Ne(e)?function(e,t,n,r,a){if("radians"!==e.thetaunit||n)t.text=be(t.x,e,a,r);else{var i=t.x/180;if(0===i)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}function n(e,r){return t(r,0)?e:n(r,e%r)}function r(e){for(var n=1;!t(Math.round(e*n)/n,e);)n*=10;return n}var a=r(e),i=e*a,o=Math.abs(n(i,a));return[Math.round(i/o),Math.round(a/o)]}(i);if(o[1]>=100)t.text=be(l.deg2rad(t.x),e,a,r);else{var s=t.x<0;1===o[1]?1===o[0]?t.text="\u03c0":t.text=o[0]+"\u03c0":t.text=["",o[0],"","\u2044","",o[1],"","\u03c0"].join(""),s&&(t.text=D+t.text)}}}}(e,o,n,u,m):function(e,t,n,r,a){"never"===a?a="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=be(t.x,e,a,r)}(e,o,0,u,m),r||(e.tickprefix&&!v(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!v(e.showticksuffix)&&(o.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(o.text)){var g=e.labelalias[o.text];"string"===typeof g&&(o.text=g)}return("boundaries"===e.tickson||e.showdividers)&&(o.xbnd=[f(o.x-.5),f(o.x+e.dtick-.5)]),o},V.hoverLabelText=function(e,t,n){n&&(e=l.extendFlat({},e,{hoverformat:n}));var r=l.isArrayOrTypedArray(t)?t[0]:t,a=l.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==a&&a!==r)return V.hoverLabelText(e,r,n)+" - "+V.hoverLabelText(e,a,n);var i="log"===e.type&&r<=0,o=V.tickText(e,e.c2l(i?-r:r),"hover").text;return i?0===r?"0":D+o:o};var ge=["f","p","n","\u03bc","m","","k","M","G","T"];function ye(e){return"SI"===e||"B"===e}function xe(e){return e>14||e<-15}function be(e,t,n,r){var i=e<0,o=t._tickround,s=n||t.exponentformat||"B",u=t._tickexponent,c=V.getTickFormat(t),d=t.separatethousands;if(r){var f={exponentformat:s,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:a(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};ve(f),o=(Number(f._tickround)||0)+4,u=f._tickexponent,t.hoverformat&&(c=t.hoverformat)}if(c)return t._numFormat(c)(e).replace(/-/g,D);var h,p=Math.pow(10,-o)/2;if("none"===s&&(u=0),(e=Math.abs(e))"+h+"":"B"===s&&9===u?e+="B":ye(s)&&(e+=ge[u/3+5])),i?D+e:e}function _e(e,t){if(e){var n=Object.keys(z).reduce((function(e,n){return-1!==t.indexOf(n)&&z[n].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){n[t]||(1===t.length?e[t]=0:delete e[t])}))}}function Ae(e,t){for(var n=[],r={},a=0;a1&&n=a.min&&e=r(e))}function l(e,t){var n=null===t[0],r=null===t[1],a=i(e,t[0])>=0,o=i(e,t[1])<=0;return(n||a)&&(r||o)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=0&&a.unshift(a.splice(r,1).shift())}}));var o={false:{left:0,right:0}};return l.syncOrAsync(a.map((function(t){return function(){if(t){var r=V.getFromId(e,t);n||(n={}),n.axShifts=o,n.overlayingShiftedAx=i;var a=V.drawOne(e,r,n);return r._shiftPusher&&ze(r,r._fullDepth||0,o,!0),r._r=r.range.slice(),r._rl=l.simpleMap(r._r,r.r2l),a}}})))},V.drawOne=function(e,t,n){var r,a,s,u=(n=n||{}).axShifts||{},h=n.overlayingShiftedAx||[];t.setScale();var p=e._fullLayout,v=t._id,m=v.charAt(0),g=V.counterLetter(v),y=p._plots[t._mainSubplot];if(y){if(t._shiftPusher=t.autoshift||-1!==h.indexOf(t._id)||-1!==h.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var x=t.linewidth/2||0;"inside"===t.ticks&&(x+=t.ticklen),ze(t,x,u,!0),ze(t,t.shift||0,u,!1)}!0===n.skipTitle&&void 0!==t._shift||(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,u));var b=y[m+"axislayer"],_=t._mainLinePosition,A=_+=t._shift,w=t._mainMirrorPosition,T=t._vals=V.calcTicks(t),k=[t.mirror,A,w].join("_");for(r=0;r0?n.bottom-c:0,d))));var f=0,h=0;if(t._shiftPusher&&(f=Math.max(d,n.height>0?"l"===s?c-n.left:n.right-c:0),t.title.text!==p._dfltTitle[m]&&(h=(t._titleStandoff||0)+(t._titleScoot||0),"l"===s&&(h+=ke(t))),t._fullDepth=Math.max(f,h)),t.automargin){r={x:0,y:0,r:0,l:0,t:0,b:0};var v=[0,1],y="number"===typeof t._shift?t._shift:0;if("x"===m){if("b"===s?r[s]=t._depth:(r[s]=t._depth=Math.max(n.width>0?c-n.top:0,d),v.reverse()),n.width>0){var x=n.right-(t._offset+t._length);x>0&&(r.xr=1,r.r=x);var b=t._offset-n.left;b>0&&(r.xl=0,r.l=b)}}else if("l"===s?(t._depth=Math.max(n.height>0?c-n.left:0,d),r[s]=t._depth-y):(t._depth=Math.max(n.height>0?n.right-c:0,d),r[s]=t._depth+y,v.reverse()),n.height>0){var _=n.bottom-(t._offset+t._length);_>0&&(r.yb=0,r.b=_);var A=t._offset-n.top;A>0&&(r.yt=1,r.t=A)}r[g]="free"===t.anchor?t.position:t._anchorAxis.domain[v[0]],t.title.text!==p._dfltTitle[m]&&(r[s]+=ke(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[u]=t.linewidth,t.mirror&&!0!==t.mirror&&(a[u]+=d),!0===t.mirror||"ticks"===t.mirror?a[g]=t._anchorAxis.domain[v[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(a[g]=[t._counterDomainMin,t._counterDomainMax][v[1]]))}se&&(l=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"===typeof t.automargin&&(_e(r,t.automargin),_e(a,t.automargin)),i.autoMargin(e,Ce(t),r),i.autoMargin(e,Le(t),a),i.autoMargin(e,Ee(t),l)})),l.syncOrAsync(oe)}}function ue(e){var n=v+(e||"tick");return M[n]||(M[n]=function(e,t,n){var r,a,i,o;if(e._selections[t].size())r=1/0,a=-1/0,i=1/0,o=-1/0,e._selections[t].each((function(){var e=Se(this),t=f.bBox(e.node().parentNode);r=Math.min(r,t.top),a=Math.max(a,t.bottom),i=Math.min(i,t.left),o=Math.max(o,t.right)}));else{var l=V.makeLabelFns(e,n);r=a=l.yFn({dx:0,dy:0,fontSize:0}),i=o=l.xFn({dx:0,dy:0,fontSize:0})}return{top:r,bottom:a,left:i,right:o,height:a-r,width:o-i}}(t,n,A)),M[n]}},V.getTickSigns=function(e,t){var n=e._id.charAt(0),r={x:"top",y:"right"}[n],a=e.side===r?1:-1,i=[-1,1,a,-a];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)===("x"===n)&&(i=i.map((function(e){return-e}))),e.side&&i.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),i},V.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},V.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",n=function(e){return-1!==t.indexOf(e)},r=n("top"),a=n("left"),i=n("right"),o=n("bottom"),l=n("inside"),s=o||a||r||i;if(!s&&!l)return[0,0];var u=e.side,c=s?(e.tickwidth||0)/2:0,d=3,f=e.tickfont?e.tickfont.size:12;return(o||r)&&(c+=f*U,d+=(e.linewidth||0)/2),(a||i)&&(c+=(e.linewidth||0)/2,d+=3),l&&"top"===u&&(d-=f*(1-U)),(a||r)&&(c=-c),"bottom"!==u&&"right"!==u||(d=-d),[s?c:0,l?d:0]}(e),n=t[0],r=t[1];return"x"===e._id.charAt(0)?function(t){return s(n+e._offset+e.l2p(we(t)),r)}:function(t){return s(r,n+e._offset+e.l2p(we(t)))}},V.makeTickPath=function(e,t,n,r){r||(r={});var a=r.minor;if(a&&!e.minor)return"";var i=void 0!==r.len?r.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+l*n)+"v"+i*n:"M"+(t+l*n)+",0h"+i*n},V.makeLabelFns=function(e,t,n){var r=e.ticklabelposition||"",i=function(e){return-1!==r.indexOf(e)},o=i("top"),s=i("left"),u=i("right"),c=i("bottom")||s||o||u,d=i("inside"),f="inside"===r&&"inside"===e.ticks||!d&&"outside"===e.ticks&&"boundaries"!==e.tickson,h=0,p=0,v=f?e.ticklen:0;if(d?v*=-1:c&&(v=0),f&&(h+=v,n)){var m=l.deg2rad(n);h=v*Math.cos(m)+1,p=v*Math.sin(m)}e.showticklabels&&(f||e.showline)&&(h+=.2*e.tickfont.size);var g,y,x,b,_,A={labelStandoff:h+=(e.linewidth||1)/2*(d?-1:1),labelShift:p},w=0,T=e.side,k=e._id.charAt(0),M=e.tickangle;if("x"===k)b=(_=!d&&"bottom"===T||d&&"top"===T)?1:-1,d&&(b*=-1),g=p*b,y=t+h*b,x=_?1:-.2,90===Math.abs(M)&&(d?x+=B:x=-90===M&&"bottom"===T?U:90===M&&"top"===T?B:.5,w=B/2*(M/90)),A.xFn=function(e){return e.dx+g+w*e.fontSize},A.yFn=function(e){return e.dy+y+e.fontSize*x},A.anchorFn=function(e,t){if(c){if(s)return"end";if(u)return"start"}return a(t)&&0!==t&&180!==t?t*b<0!==d?"end":"start":"middle"},A.heightFn=function(t,n,r){return n<-60||n>60?-.5*r:"top"===e.side!==d?-r:0};else if("y"===k){if(b=(_=!d&&"left"===T||d&&"right"===T)?1:-1,d&&(b*=-1),g=h,y=p*b,x=0,d||90!==Math.abs(M)||(x=-90===M&&"left"===T||90===M&&"right"===T?U:.5),d){var S=a(M)?+M:0;if(0!==S){var C=l.deg2rad(S);w=Math.abs(Math.sin(C))*U*b,x=0}}A.xFn=function(e){return e.dx+t-(g+e.fontSize*x)*b+w*e.fontSize},A.yFn=function(e){return e.dy+y+e.fontSize*B},A.anchorFn=function(e,t){return a(t)&&90===Math.abs(t)?"middle":_?"end":"start"},A.heightFn=function(t,n,r){return"right"===e.side&&(n*=-1),n<-30?-r:n<30?-.5*r:0}}return A},V.drawTicks=function(e,t,n){n=n||{};var a=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?n.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?n.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),o=n.layer.selectAll("path."+a).data(i,Te);o.exit().remove(),o.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",!1!==n.crisp).each((function(e){return d.stroke(r.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(n){return f.crispRound(e,n.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",n.path).style("display",null),Ie(t,[j]),o.attr("transform",n.transFn)},V.drawGrid=function(e,t,n){if(n=n||{},"sync"!==t.tickmode){var a=t._id+"grid",i=t.minor&&t.minor.showgrid,o=i?n.vals.filter((function(e){return e.minor})):[],l=t.showgrid?n.vals.filter((function(e){return!e.minor})):[],s=n.counterAxis;if(s&&V.shouldShowZeroLine(e,t,s))for(var u="array"===t.tickmode,c=0;c=0;g--){var y=g?v:m;if(y){var x=y.selectAll("path."+a).data(g?l:o,Te);x.exit().remove(),x.enter().append("path").classed(a,1).classed("crisp",!1!==n.crisp),x.attr("transform",n.transFn).attr("d",n.path).each((function(e){return d.stroke(r.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return f.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?p:t._gw)+"px"})).style("display",null),"function"===typeof n.path&&x.attr("d",n.path)}}Ie(t,[N,R])}},V.drawZeroLine=function(e,t,n){n=n||n;var r=t._id+"zl",a=V.shouldShowZeroLine(e,t,n.counterAxis),i=n.layer.selectAll("path."+r).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(r,1).classed("zl",1).classed("crisp",!1!==n.crisp).each((function(){n.layer.selectAll("path").sort((function(e,t){return q(e.id,t.id)}))})),i.attr("transform",n.transFn).attr("d",n.path).call(d.stroke,t.zerolinecolor||d.defaultLine).style("stroke-width",f.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Ie(t,[P])},V.drawLabels=function(e,t,n){n=n||{};var i=e._fullLayout,o=t._id,c=n.cls||o+"tick",d=n.vals.filter((function(e){return e.text})),h=n.labelFns,p=n.secondary?0:t.tickangle,v=(t._prevTickAngles||{})[c],m=n.layer.selectAll("g."+c).data(t.showticklabels?d:[],Te),g=[];function y(e,i){e.each((function(e){var o=r.select(this),l=o.select(".text-math-group"),c=h.anchorFn(e,i),d=n.transFn.call(o.node(),e)+(a(i)&&0!==+i?" rotate("+i+","+h.xFn(e)+","+(h.yFn(e)-e.fontSize/2)+")":""),p=u.lineCount(o),v=H*e.fontSize,m=h.heightFn(e,a(i)?+i:0,(p-1)*v);if(m&&(d+=s(0,m)),l.empty()){var g=o.select("text");g.attr({transform:d,"text-anchor":c}),g.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var y=f.bBox(l.node()).width*{end:-.5,start:.5}[c];l.attr("transform",d+s(y,0))}}))}m.enter().append("g").classed(c,1).append("text").attr("text-anchor","middle").each((function(t){var n=r.select(this),a=e._promises.length;n.call(u.positionText,h.xFn(t),h.yFn(t)).call(f.font,t.font,t.fontSize,t.fontColor).text(t.text).call(u.convertToTspans,e),e._promises[a]?g.push(e._promises.pop().then((function(){y(n,p)}))):y(n,p)})),Ie(t,[I]),m.exit().remove(),n.repositionOnUpdate&&m.each((function(e){r.select(this).select("text").call(u.positionText,h.xFn(e),h.yFn(e))})),t._adjustTickLabelsOverflow=function(){var n=t.ticklabeloverflow;if(n&&"allow"!==n){var a=-1!==n.indexOf("hide"),o="x"===t._id.charAt(0),s=0,u=o?e._fullLayout.width:e._fullLayout.height;if(-1!==n.indexOf("domain")){var c=l.simpleMap(t.range,t.r2l);s=t.l2p(c[0])+t._offset,u=t.l2p(c[1])+t._offset}var d=Math.min(s,u),h=Math.max(s,u),p=t.side,v=1/0,g=-1/0;for(var y in m.each((function(e){var n=r.select(this);if(n.select(".text-math-group").empty()){var i=f.bBox(n.node()),l=0;o?(i.right>h||i.lefth||i.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+n._id]?s.style("display","none"):"tick"!==e.K||a||s.style("display",null)}))}))}))}))},y(m,v+1?v:p);var x=null;t._selections&&(t._selections[c]=m);var b=[function(){return g.length&&Promise.all(g)}];t.automargin&&i._redrawFromAutoMarginCount&&90===v?(x=v,b.push((function(){y(m,v)}))):b.push((function(){if(y(m,p),d.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){x=t.autotickangles[0];var e,r=0,a=[],i=1;if(m.each((function(e){r=Math.max(r,e.fontSize);var n=t.l2p(e.x),o=Se(this),l=f.bBox(o.node());i=Math.max(i,u.lineCount(o)),a.push({top:0,bottom:10,height:10,left:n-l.width/2,right:n+l.width/2+2,width:l.width+2})})),"boundaries"!==t.tickson&&!t.showdividers||n.secondary){var o=d.length,s=Math.abs((d[o-1].x-d[0].x)*t._m)/(o-1),c=t.ticklabelposition||"",h=function(e){return-1!==c.indexOf(e)},v=h("top"),g=h("left"),b=h("right"),_=h("bottom")||g||v||b?(t.tickwidth||0)+6:0,A=s,w=1.25*r*i,T=A/Math.sqrt(Math.pow(A,2)+Math.pow(w,2)),k=t.autotickangles.map((function(e){return e*Math.PI/180})),M=k.find((function(e){return Math.abs(Math.cos(e))<=T}));void 0===M&&(M=k.reduce((function(e,t){return Math.abs(Math.cos(e))B*F&&(D=F,C[S]=L[S]=O[S])}var U=Math.abs(D-E);U-T>0?T*=1+T/(U-=T):T=0,"y"!==t._id.charAt(0)&&(T=-T),C[M]=A.p2r(A.r2p(L[M])+k*T),"min"===A.autorange||"max reversed"===A.autorange?(C[0]=null,A._rangeInitial0=void 0,A._rangeInitial1=void 0):"max"!==A.autorange&&"min reversed"!==A.autorange||(C[1]=null,A._rangeInitial0=void 0,A._rangeInitial1=void 0),i._insideTickLabelsUpdaterange[A._name+".range"]=C}var Y=l.syncOrAsync(b);return Y&&Y.then&&e._promises.push(Y),Y},V.getPxPosition=function(e,t){var n,r=e._fullLayout._size,a=t._id.charAt(0),i=t.side;return"free"!==t.anchor?n=t._anchorAxis:"x"===a?n={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:"y"===a&&(n={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),"top"===i||"left"===i?n._offset:"bottom"===i||"right"===i?n._offset+n._length:void 0},V.shouldShowZeroLine=function(e,t,n){var r=l.simpleMap(t.range,t.r2l);return r[0]*r[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===O)&&(Me(t,0)||!function(e,t,n,r){var a=n._mainAxis;if(a){var i=e._fullLayout,o=t._id.charAt(0),l=V.counterLetter(t._id),s=t._offset+(Math.abs(r[0])1)for(r=1;r2*o}(a,t))return"date";var m="strict"!==n.autotypenumbers;return function(e,t){for(var n=e.length,r=d(n),a=0,o=0,l={},c=0;c2*a}(a,m)?"category":function(e,t){for(var n=e.length,r=0;r=2){var l,u,c="";if(2===o.length)for(l=0;l<2;l++)if(u=_(o[l])){c=g;break}var d=a("pattern",c);if(d===g)for(l=0;l<2;l++)(u=_(o[l]))&&(t.bounds[l]=o[l]=u-1);if(d)for(l=0;l<2;l++)switch(u=o[l],d){case g:if(!r(u))return void(t.enabled=!1);if((u=+u)!==Math.floor(u)||u<0||u>=7)return void(t.enabled=!1);t.bounds[l]=o[l]=u;break;case y:if(!r(u))return void(t.enabled=!1);if((u=+u)<0||u>24)return void(t.enabled=!1);t.bounds[l]=o[l]=u}if(!1===n.autorange){var f=n.range;if(f[0]f[1])return void(t.enabled=!1)}else if(o[0]>f[0]&&o[1]r?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},t.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},t.isLinked=function(e,t){return i(t,e._axisMatchGroups)||i(t,e._axisConstraintGroups)}},4796:function(e,t,n){"use strict";var r=n(8116).isTypedArraySpec;e.exports=function(e,t,n,a){if("category"===t.type){var i,o=e.categoryarray,l=Array.isArray(o)&&o.length>0||r(o);l&&(i="array");var s,u=n("categoryorder",i);"array"===u&&(s=n("categoryarray")),l||"array"!==u||(u=t.categoryorder="trace"),"trace"===u?t._initialCategories=[]:"array"===u?t._initialCategories=s.slice():(s=function(e,t){var n,r,a,i=t.dataAttr||e._id.charAt(0),o={};if(t.axData)n=t.axData;else for(n=[],r=0;rr?a.substr(r):i.substr(n))+o:a+i+e*t:o}function m(e,t){for(var n=t._size,r=n.h/n.w,a={},i=Object.keys(e),o=0;ou*x)||w)for(n=0;nP&&ID&&(D=I);f/=(D-E)/(2*O),E=s.l2r(E),D=s.l2r(D),s.range=s._input.range=S=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function F(e,t,n,r,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",u(n,r)).attr("d",a+"Z")}function B(e,t,n){return e.append("path").attr("class","zoombox-corners").style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("transform",u(t,n)).attr("d","M0,0Z")}function U(e,t,n,r,a,i){e.attr("d",r+"M"+n.l+","+n.t+"v"+n.h+"h"+n.w+"v-"+n.h+"h-"+n.w+"Z"),H(e,t,a,i)}function H(e,t,n,r){n||(e.transition().style("fill",r>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function Y(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function V(e){O&&e.data&&e._context.showTips&&(a.notifier(a._(e,"Double-click to zoom back out"),"long"),O=!1)}function G(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,D)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function W(e,t,n,r,i){for(var o,l,s,u,c=!1,d={},f={},h=(i||{}).xaHash,p=(i||{}).yaHash,v=0;v=0)a._fullLayout._deactivateShape(a);else{var o=a._fullLayout.clickmode;if(Y(a),2!==e||ge||Ve(),me)o.indexOf("select")>-1&&S(n,a,J,Q,t.id,De),o.indexOf("event")>-1&&h.click(a,n,t.id);else if(1===e&&ge){var l=v?P:O,u="s"===v||"w"===g?0:1,d=l._name+".range["+u+"]",f=function(e,t){var n,r=e.range[t],a=Math.abs(r-e.range[1-t]);return"date"===e.type?r:"log"===e.type?(n=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,i("."+n+"g")(Math.pow(10,r))):(n=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,i("."+String(n)+"g")(r))}(l,u),p="left",m="middle";if(l.fixedrange)return;v?(m="n"===v?"top":"bottom","right"===l.side&&(p="right")):"e"===g&&(p="right"),a._context.showAxisRangeEntryBoxes&&r.select(be).call(c.makeEditable,{gd:a,immediate:!0,background:a._fullLayout.paper_bgcolor,text:String(f),fill:l.tickfont?l.tickfont.color:"#444",horizontalAlign:p,verticalAlign:m}).on("edit",(function(e){var t=l.d2r(e);void 0!==t&&s.call("_guiRelayout",a,d,t)}))}}}function Ne(t,n){if(e._transitioningWithDuration)return!1;var r=Math.max(0,Math.min(ee,he*t+_e)),a=Math.max(0,Math.min(te,pe*n+Ae)),i=Math.abs(r-_e),o=Math.abs(a-Ae);function l(){Se="",we.r=we.l,we.t=we.b,Le.attr("d","M0,0Z")}if(we.l=Math.min(_e,r),we.r=Math.max(_e,r),we.t=Math.min(Ae,a),we.b=Math.max(Ae,a),ne.isSubplotConstrained)i>D||o>D?(Se="xy",i/ee>o/te?(o=i*te/ee,Ae>a?we.t=Ae-o:we.b=Ae+o):(i=o*ee/te,_e>r?we.l=_e-i:we.r=_e+i),Le.attr("d",G(we))):l();else if(re.isSubplotConstrained)if(i>D||o>D){Se="xy";var s=Math.min(we.l/ee,(te-we.b)/te),u=Math.max(we.r/ee,(te-we.t)/te);we.l=s*ee,we.r=u*ee,we.b=(1-s)*te,we.t=(1-u)*te,Le.attr("d",G(we))}else l();else!ie||o0){var c;if(re.isSubplotConstrained||!ae&&1===ie.length){for(c=0;c1&&(void 0!==i.maxallowed&&le===(i.range[0]1&&(void 0!==o.maxallowed&&se===(o.range[0]b[1]-1/4096&&(t.domain=l),a.noneOrAll(e.domain,t.domain,l),"sync"===t.tickmode&&(t.tickmode="auto")}return n("layer"),t}},2568:function(e,t,n){"use strict";var r=n(5024);e.exports=function(e,t,n,a,i){i||(i={});var o=i.tickSuffixDflt,l=r(e);n("tickprefix")&&n("showtickprefix",l),n("ticksuffix",o)&&n("showticksuffix",l)}},6312:function(e,t,n){"use strict";var r=n(6808);e.exports=function(e,t,n,a){var i=t._template||{},o=t.type||i.type||"-";n("minallowed"),n("maxallowed");var l,s=n("range");s||a.noInsiderange||"log"===o||(!(l=n("insiderange"))||null!==l[0]&&null!==l[1]||(t.insiderange=!1,l=void 0),l&&(s=n("range",l)));var u,c=t.getAutorangeDflt(s,a),d=n("autorange",c);!s||(null!==s[0]||null!==s[1])&&(null!==s[0]&&null!==s[1]||"reversed"!==d&&!0!==d)&&(null===s[0]||"min"!==d&&"max reversed"!==d)&&(null===s[1]||"max"!==d&&"min reversed"!==d)||(s=void 0,delete t.range,t.autorange=!0,u=!0),u||(d=n("autorange",c=t.getAutorangeDflt(s,a))),d&&(r(n,d,s),"linear"!==o&&"-"!==o||n("rangemode")),t.cleanRange()}},1160:function(e,t,n){"use strict";var r=n(4284).FROM_BL;e.exports=function(e,t,n){void 0===n&&(n=r[e.constraintoward||"center"]);var a=[e.r2l(e.range[0]),e.r2l(e.range[1])],i=a[0]+(a[1]-a[0])*n;e.range=e._input.range=[e.l2r(i+(a[0]-i)*t),e.l2r(i+(a[1]-i)*t)],e.setScale()}},8344:function(e,t,n){"use strict";var r=n(3428),a=n(4336).E9,i=n(3400),o=i.numberFormat,l=n(8248),s=i.cleanNumber,u=i.ms2DateTime,c=i.dateTime2ms,d=i.ensureNumber,f=i.isArrayOrTypedArray,h=n(9032),p=h.FP_SAFE,v=h.BADNUM,m=h.LOG_CLIP,g=h.ONEWEEK,y=h.ONEDAY,x=h.ONEHOUR,b=h.ONEMIN,_=h.ONESEC,A=n(9811),w=n(3816),T=w.HOUR_PATTERN,k=w.WEEKDAY_PATTERN;function M(e){return Math.pow(10,e)}function S(e){return null!==e&&void 0!==e}e.exports=function(e,t){t=t||{};var n=e._id||"x",h=n.charAt(0);function C(t,n){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&n&&e.range&&2===e.range.length){var r=e.range[0],a=e.range[1];return.5*(r+a-2*m*Math.abs(r-a))}return v}function L(t,n,r,a){if((a||{}).msUTC&&l(t))return+t;var o=c(t,r||e.calendar);if(o===v){if(!l(t))return v;t=+t;var s=Math.floor(10*i.mod(t+.05,1)),u=Math.round(t-s/10);o=c(new Date(u))+s/10}return o}function E(t,n,r){return u(t,n,r||e.calendar)}function D(t){return e._categories[Math.round(t)]}function O(t){if(S(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"===typeof t?String(t):t);var n=e._categories.length-1;return e._categoriesMap[t]=n,n}return v}function P(t){if(e._categoriesMap)return e._categoriesMap[t]}function N(e){var t=P(e);return void 0!==t?t:l(e)?+e:void 0}function R(e){return l(e)?+e:P(e)}function j(e,t,n){return r.round(n+t*e,2)}function I(e,t,n){return(e-n)/t}var z=function(t){return l(t)?j(t,e._m,e._b):v},F=function(t){return I(t,e._m,e._b)};if(e.rangebreaks){var B="y"===h;z=function(t){if(!l(t))return v;var n=e._rangebreaks.length;if(!n)return j(t,e._m,e._b);var r=B;e.range[0]>e.range[1]&&(r=!r);for(var a=r?-1:1,i=a*t,o=0,s=0;sc)){o=i<(u+c)/2?s:s+1;break}o=s+1}var d=e._B[o]||0;return isFinite(d)?j(t,e._m2,d):0},F=function(t){var n=e._rangebreaks.length;if(!n)return I(t,e._m,e._b);for(var r=0,a=0;ae._rangebreaks[a].pmax&&(r=a+1);return I(t,e._m2,e._B[r])}}e.c2l="log"===e.type?C:d,e.l2c="log"===e.type?M:d,e.l2p=z,e.p2l=F,e.c2p="log"===e.type?function(e,t){return z(C(e,t))}:z,e.p2c="log"===e.type?function(e){return M(F(e))}:F,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=d,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=F,e.cleanPos=d):"log"===e.type?(e.d2r=e.d2l=function(e,t){return C(s(e),t)},e.r2d=e.r2c=function(e){return M(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=d,e.c2r=C,e.l2d=M,e.d2p=function(t,n){return e.l2p(e.d2r(t,n))},e.p2d=function(e){return M(F(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=F,e.cleanPos=d):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=L,e.c2d=e.c2r=e.l2d=e.l2r=E,e.d2p=e.r2p=function(t,n,r){return e.l2p(L(t,0,r))},e.p2d=e.p2r=function(e,t,n){return E(F(e),t,n)},e.cleanPos=function(t){return i.cleanDate(t,v,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=O,e.r2d=e.c2d=e.l2d=D,e.d2r=e.d2l_noadd=N,e.r2c=function(t){var n=R(t);return void 0!==n?n:e.fraction2r(.5)},e.l2r=e.c2r=d,e.r2l=R,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return D(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return"string"===typeof e&&""!==e?e:d(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=D,e.d2r=e.d2l_noadd=N,e.r2c=function(t){var n=N(t);return void 0!==n?n:e.fraction2r(.5)},e.r2c_just_indices=P,e.l2r=e.c2r=d,e.r2l=N,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return D(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return Array.isArray(e)||"string"===typeof e&&""!==e?e:d(e)},e.setupMultiCategory=function(r){var a,o,l=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length)for(var u in s)if(u!==n){var c=t[A.id2name(u)];l=l.concat(c._traceIndices)}var d=[[0,{}],[0,{}]],p=[];for(a=0;as[1]&&(a[l?0:1]=r),a[0]===a[1]){var u=e.l2r(n),c=e.l2r(r);if(void 0!==n){var d=u+1;void 0!==r&&(d=Math.min(d,c)),a[l?1:0]=d}if(void 0!==r){var f=c+1;void 0!==n&&(f=Math.max(f,u)),a[l?0:1]=f}}}},e.cleanRange=function(t,n){e._cleanRange(t,n),e.limitRange(t)},e._cleanRange=function(t,n){n||(n={}),t||(t="range");var r,a,o=i.nestedProperty(e,t).get();if(a=(a="date"===e.type?i.dfltRange(e.calendar):"y"===h?w.DFLTRANGEY:"realaxis"===e._name?[0,1]:n.dfltRange||w.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(a[0]=0),o&&2===o.length){var s=null===o[0],u=null===o[1];for("date"!==e.type||e.autorange||(o[0]=i.cleanDate(o[0],v,e.calendar),o[1]=i.cleanDate(o[1],v,e.calendar)),r=0;r<2;r++)if("date"===e.type){if(!i.isDateTime(o[r],e.calendar)){e[t]=a;break}if(e.r2l(o[0])===e.r2l(o[1])){var c=i.constrain(e.r2l(o[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);o[0]=e.l2r(c-1e3),o[1]=e.l2r(c+1e3);break}}else{if(!l(o[r])){if(s||u||!l(o[1-r])){e[t]=a;break}o[r]=o[1-r]*(r?10:.1)}if(o[r]<-p?o[r]=-p:o[r]>p&&(o[r]=p),o[0]===o[1]){var d=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=d,o[1]+=d}}}else i.nestedProperty(e,t).set(a)},e.setScale=function(n){var r=t._size;if(e.overlaying){var a=A.getFromId({_fullLayout:t},e.overlaying);e.domain=a.domain}var i=n&&e._r?"_r":"range",o=e.calendar;e.cleanRange(i);var l,s,u=e.r2l(e[i][0],o),c=e.r2l(e[i][1],o),d="y"===h;if(d?(e._offset=r.t+(1-e.domain[1])*r.h,e._length=r.h*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c):(e._offset=r.l+e.domain[0]*r.w,e._length=r.w*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(u,c),Math.max(u,c)),e._rangebreaks.length)){for(l=0;lc&&(f=!f),f&&e._rangebreaks.reverse();var p=f?-1:1;for(e._m2=p*e._length/(Math.abs(c-u)-e._lBreaks),e._B.push(-e._m2*(d?c:u)),l=0;la&&(a+=7,oa&&(a+=24,o=r&&o=r&&t=l.min&&(el.max&&(l.max=r),a=!1)}a&&u.push({min:e,max:r})}};for(r=0;rn.duration?(function(){for(var n={},r=0;r rect").call(o.setTranslate,0,0).call(o.setScale,1,1),e.plot.call(o.setTranslate,t._offset,n._offset).call(o.setScale,1,1);var r=e.plot.selectAll(".scatterlayer .trace");r.selectAll(".point").call(o.setPointGroupScale,1,1),r.selectAll(".textpoint").call(o.setTextPointsScale,1,1),r.call(o.hideOutsideRangePoints,e)}function m(t,n){var r=t.plotinfo,a=r.xaxis,s=r.yaxis,u=a._length,c=s._length,d=!!t.xr1,f=!!t.yr1,h=[];if(d){var p=i.simpleMap(t.xr0,a.r2l),v=i.simpleMap(t.xr1,a.r2l),m=p[1]-p[0],g=v[1]-v[0];h[0]=(p[0]*(1-n)+n*v[0]-p[0])/(p[1]-p[0])*u,h[2]=u*(1-n+n*g/m),a.range[0]=a.l2r(p[0]*(1-n)+n*v[0]),a.range[1]=a.l2r(p[1]*(1-n)+n*v[1])}else h[0]=0,h[2]=u;if(f){var y=i.simpleMap(t.yr0,s.r2l),x=i.simpleMap(t.yr1,s.r2l),b=y[1]-y[0],_=x[1]-x[0];h[1]=(y[1]*(1-n)+n*x[1]-y[1])/(y[0]-y[1])*c,h[3]=c*(1-n+n*_/b),s.range[0]=a.l2r(y[0]*(1-n)+n*x[0]),s.range[1]=s.l2r(y[1]*(1-n)+n*x[1])}else h[1]=0,h[3]=c;l.drawOne(e,a,{skipTitle:!0}),l.drawOne(e,s,{skipTitle:!0}),l.redrawComponents(e,[a._id,s._id]);var A=d?u/h[2]:1,w=f?c/h[3]:1,T=d?h[0]:0,k=f?h[1]:0,M=d?h[0]/h[2]*u:0,S=f?h[1]/h[3]*c:0,C=a._offset-M,L=s._offset-S;r.clipRect.call(o.setTranslate,T,k).call(o.setScale,1/A,1/w),r.plot.call(o.setTranslate,C,L).call(o.setScale,A,w),o.setPointGroupScale(r.zoomScalePts,1/A,1/w),o.setTextPointsScale(r.zoomScaleTxt,1/A,1/w)}l.redrawComponents(e)}},4944:function(e,t,n){"use strict";var r=n(4040).traceIs,a=n(2976);function i(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var n=i(e),a=r(e,"box-violin"),o=r(e._fullInput||{},"candlestick");return a&&!o&&t===n&&void 0===e[n]&&void 0===e[n+"0"]}e.exports=function(e,t,n,l){n("autotypenumbers",l.autotypenumbersDflt),"-"===n("type",(l.splomStash||{}).type)&&(function(e,t){if("-"===e.type){var n,l=e._id,s=l.charAt(0);-1!==l.indexOf("scene")&&(l=s);var u=function(e,t,n){for(var r=0;r0&&(a["_"+n+"axes"]||{})[t])return a;if((a[n+"axis"]||n)===t){if(o(a,n))return a;if((a[n]||[]).length||a[n+"0"])return a}}}(t,l,s);if(u)if("histogram"!==u.type||s!=={v:"y",h:"x"}[u.orientation||"v"]){var c=s+"calendar",d=u[c],f={noMultiCategory:!r(u,"cartesian")||r(u,"noMultiCategory")};if("box"===u.type&&u._hasPreCompStats&&s==={h:"x",v:"y"}[u.orientation||"v"]&&(f.noMultiCategory=!0),f.autotypenumbers=e.autotypenumbers,o(u,s)){var h=i(u),p=[];for(n=0;n0?".":"")+i;a.isPlainObject(o)?s(o,t,l,r+1):t(l,i,o)}}))}t.manageCommandObserver=function(e,n,r,o){var l={},s=!0;n&&n._commandObserver&&(l=n._commandObserver),l.cache||(l.cache={}),l.lookupTable={};var u=t.hasSimpleAPICommandBindings(e,r,l.lookupTable);if(n&&n._commandObserver){if(u)return l;if(n._commandObserver.remove)return n._commandObserver.remove(),n._commandObserver=null,l}if(u){i(e,u,l.cache),l.check=function(){if(s){var t=i(e,u,l.cache);return t.changed&&o&&void 0!==l.lookupTable[t.value]&&(l.disable(),Promise.resolve(o({value:t.value,type:u.type,prop:u.prop,traces:u.traces,index:l.lookupTable[t.value]})).then(l.enable,l.enable)),t.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],d=0;d=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),n.attr(i);var o=n.select(".js-link-to-tool"),l=n.select(".js-link-spacer"),s=n.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var n=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)n.on("click",(function(){A.sendDataToCloud(e)}));else{var r=window.location.pathname.split("/"),a=window.location.search;n.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+r[2].split(".")[0]+"/"+r[1]+a})}}(e,o),l.text(o.text()&&s.text()?" - ":"")}},A.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var n=r.select(e).append("div").attr("id","hiddenform").style("display","none"),a=n.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=A.graphJson(e,!1,"keepdata"),a.node().submit(),n.remove(),e.emit("plotly_afterexport"),!1}};var k=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],M=["year","month","dayMonth","dayMonthYear"];function S(e,t){var n=e._context.locale;n||(n="en-US");var r=!1,a={};function i(e){for(var n=!0,i=0;i1&&N.length>1){for(s.getComponentMethod("grid","sizeDefaults")(u,l),o=0;o15&&N.length>15&&0===l.shapes.length&&0===l.images.length,A.linkSubplots(f,l,c,r),A.cleanPlot(f,l,c,r);var F=!(!r._has||!r._has("gl2d")),B=!(!l._has||!l._has("gl2d")),U=!(!r._has||!r._has("cartesian"))||F,H=!(!l._has||!l._has("cartesian"))||B;U&&!H?r._bgLayer.remove():H&&!U&&(l._shouldCreateBgLayer=!0),r._zoomlayer&&!e._dragging&&v({_fullLayout:r}),function(e,t){var n,r=[];t.meta&&(n=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var a=0;a0){var c=1-2*l;r=Math.round(c*r),a=Math.round(c*a)}}var f=A.layoutAttributes.width.min,h=A.layoutAttributes.height.min;r1,v=!t.height&&Math.abs(n.height-a)>1;(v||p)&&(p&&(n.width=r),v&&(n.height=a)),e._initialAutoSize||(e._initialAutoSize={width:r,height:a}),A.sanitizeMargins(n)},A.supplyLayoutModuleDefaults=function(e,t,n,r){var a,i,o,l=s.componentsRegistry,u=t._basePlotModules,c=s.subplotsRegistry.cartesian;for(a in l)(o=l[a]).includeBasePlot&&o.includeBasePlot(e,t);for(var f in u.length||u.push(c),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),c.finalizeSubplots(e,t)),t._subplots)t._subplots[f].sort(d.subplotSort);for(i=0;i1&&(n.l/=g,n.r/=g)}if(h){var y=(n.t+n.b)/h;y>1&&(n.t/=y,n.b/=y)}var x=void 0!==n.xl?n.xl:n.x,b=void 0!==n.xr?n.xr:n.x,_=void 0!==n.yt?n.yt:n.y,w=void 0!==n.yb?n.yb:n.y;p[t]={l:{val:x,size:n.l+m},r:{val:b,size:n.r+m},b:{val:w,size:n.b+m},t:{val:_,size:n.t+m}},v[t]=1}else delete p[t],delete v[t];if(!r._replotting)return A.doAutoMargin(e)}},A.doAutoMargin=function(e){var t=e._fullLayout,n=t.width,r=t.height;t._size||(t._size={}),O(t);var a=t._size,i=t.margin,l={t:0,b:0,l:0,r:0},u=d.extendFlat({},a),c=i.l,f=i.r,h=i.t,v=i.b,m=t._pushmargin,g=t._pushmarginIds,y=t.minreducedwidth,x=t.minreducedheight;if(!1!==i.autoexpand){for(var b in m)g[b]||delete m[b];var _=e._fullLayout._reservedMargin;for(var w in _)for(var T in _[w]){var k=_[w][T];l[T]=Math.max(l[T],k)}for(var M in m.base={l:{val:0,size:c},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:v}},l){var S=0;for(var C in m)"base"!==C&&o(m[C][M].size)&&(S=m[C][M].size>S?m[C][M].size:S);var L=Math.max(0,i[M]-S);l[M]=Math.max(0,l[M]-L)}for(var E in m){var D=m[E].l||{},P=m[E].b||{},N=D.val,R=D.size,j=P.val,I=P.size,z=n-l.r-l.l,F=r-l.t-l.b;for(var B in m){if(o(R)&&m[B].r){var U=m[B].r.val,H=m[B].r.size;if(U>N){var Y=(R*U+(H-z)*N)/(U-N),V=(H*(1-N)+(R-z)*(1-U))/(U-N);Y+V>c+f&&(c=Y,f=V)}}if(o(I)&&m[B].t){var G=m[B].t.val,W=m[B].t.size;if(G>j){var q=(I*G+(W-F)*j)/(G-j),Z=(W*(1-j)+(I-F)*(1-G))/(G-j);q+Z>v+h&&(v=q,h=Z)}}}}}var X=d.constrain(n-i.l-i.r,2,y),J=d.constrain(r-i.t-i.b,2,x),Q=Math.max(0,n-X),K=Math.max(0,r-J);if(Q){var $=(c+f)/Q;$>1&&(c/=$,f/=$)}if(K){var ee=(v+h)/K;ee>1&&(v/=ee,h/=ee)}if(a.l=Math.round(c)+l.l,a.r=Math.round(f)+l.r,a.t=Math.round(h)+l.t,a.b=Math.round(v)+l.b,a.p=Math.round(i.pad),a.w=Math.round(n)-a.l-a.r,a.h=Math.round(r)-a.t-a.b,!t._replotting&&(A.didMarginChange(u,a)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=p.list(e,"",!0);for(var n in t)if(t[n].autoshift||t[n].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(g).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){r=!0})),n.redraw&&e._transitionData._interruptCallbacks.push((function(){return s.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var i=0,o=0;function l(){return i++,function(){var t;o++,r||o!==i||(t=a,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(n.redraw)return s.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)))}}n.runFn(l),setTimeout(l())}))}],i=d.syncOrAsync(a,e);return i&&i.then||(i=Promise.resolve()),i.then((function(){return e}))}A.didMarginChange=function(e,t){for(var n=0;n1)return!0}return!1},A.graphJson=function(e,t,n,r,a,i){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&A.supplyDefaults(e);var o=a?e._fullData:e.data,s=a?e._fullLayout:e.layout,u=(e._transitionData||{})._frames;function c(e,t){if("function"===typeof e)return t?"_function_":null;if(d.isPlainObject(e)){var r,a={};return Object.keys(e).sort().forEach((function(i){if(-1===["_","["].indexOf(i.charAt(0)))if("function"!==typeof e[i]){if("keepdata"===n){if("src"===i.substr(i.length-3))return}else if("keepstream"===n){if("string"===typeof(r=e[i+"src"])&&r.indexOf(":")>0&&!d.isPlainObject(e.stream))return}else if("keepall"!==n&&"string"===typeof(r=e[i+"src"])&&r.indexOf(":")>0)return;a[i]=c(e[i],t)}else t&&(a[i]="_function")})),a}var i=Array.isArray(e),o=d.isTypedArray(e);if((i||o)&&e.dtype&&e.shape){var s=e.bdata;return c({dtype:e.dtype,shape:e.shape,bdata:d.isArrayBuffer(s)?l.encode(s):s},t)}return i?e.map((function(e){return c(e,t)})):o?d.simpleMap(e,d.identity):d.isJSDate(e)?d.ms2DateTimeLocal(+e):e}var f={data:(o||[]).map((function(e){var n=c(e);return t&&delete n.fit,n}))};if(!t&&(f.layout=c(s),a)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return u&&(f.frames=c(u)),i&&(f.config=c(e._context,!0)),"object"===r?f:JSON.stringify(f)},A.modifyFrames=function(e,t){var n,r,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(n=0;n=0;i--)if(s[i].enabled){n._indexToPoints=s[i]._indexToPoints;break}r&&r.calc&&(o=r.calc(e,n))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=n,f[t]=o}}for(j(o,l,c),a=0;a0){for(var r=[],a=0;a-1&&(d[h[n]].title={text:""});for(n=0;n")?"":t.html(e).text()}));return t.remove(),n}(A)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),a.isIE()&&(A=(A=(A=A.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),A}},4664:function(e,t,n){"use strict";var r=n(3400);e.exports=function(e,t){for(var n=0;nd+u||!r(c))}for(var h=0;h=0)return e}else if("string"===typeof e&&"%"===(e=e.trim()).slice(-1)&&r(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function p(e,t,n,r,i,o){var l=!(!1===(o=o||{}).moduleHasSelected),s=!(!1===o.moduleHasUnselected),u=!(!1===o.moduleHasConstrain),c=!(!1===o.moduleHasCliponaxis),d=!(!1===o.moduleHasTextangle),h=!(!1===o.moduleHasInsideanchor),p=!!o.hasPathbar,v=Array.isArray(i)||"auto"===i,m=v||"inside"===i,g=v||"outside"===i;if(m||g){var y=f(r,"textfont",n.font),x=a.extendFlat({},y),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,f(r,"insidetextfont",x),p){var _=a.extendFlat({},y);b&&delete _.color,f(r,"pathbar.textfont",_)}g&&f(r,"outsidetextfont",y),l&&r("selected.textfont.color"),s&&r("unselected.textfont.color"),u&&r("constraintext"),c&&r("cliponaxis"),d&&r("textangle"),r("texttemplate")}m&&h&&r("insidetextanchor")}e.exports={supplyDefaults:function(e,t,n,r){function c(n,r){return a.coerce(e,t,d,n,r)}if(l(e,t,r,c)){s(e,t,r,c),c("xhoverformat"),c("yhoverformat"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate");var f=c("textposition");p(e,0,r,c,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u(e,t,c,n,r);var h=(t.marker.line||{}).color,v=o.getComponentMethod("errorbars","supplyDefaults");v(e,t,h||i.defaultLine,{axis:"y"}),v(e,t,h||i.defaultLine,{axis:"x",inherit:"y"}),a.coerceSelectionMarkerOpacity(t,c)}else t.visible=!1},crossTraceDefaults:function(e,t){var n,r;function i(e,t){return a.coerce(r._input,r,d,e,t)}for(var o=0;oi))return t}return void 0!==n?n:e.dflt},t.coerceColor=function(e,t,n){return a(t).isValid()?t:void 0!==n?n:e.dflt},t.coerceEnumerated=function(e,t,n){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==n?n:e.dflt},t.getValue=function(e,t){var n;return i(e)?t0?t+=n:c<0&&(t-=n)}return t}function N(e){var t=c,n=e.b,a=P(e);return r.inbox(n-t,a-t,_+(a-t)/(a-n)-1)}var R=e[d+"a"],j=e[f+"a"];v=Math.abs(R.r2c(R.range[1])-R.r2c(R.range[0]));var I=r.getDistanceFunction(a,h,p,(function(e){return(h(e)+p(e))/2}));if(r.getClosest(m,I,e),!1!==e.index&&m[e.index].p!==u){T||(L=function(e){return Math.min(k(e),e.p-y.bargroupwidth/2)},E=function(e){return Math.max(M(e),e.p+y.bargroupwidth/2)});var z=m[e.index],F=g.base?z.b+z.s:z.s;e[f+"0"]=e[f+"1"]=j.c2p(z[f],!0),e[f+"LabelVal"]=F;var B=y.extents[y.extents.round(z.p)];e[d+"0"]=R.c2p(x?L(z):B[0],!0),e[d+"1"]=R.c2p(x?E(z):B[1],!0);var U=void 0!==z.orig_p;return e[d+"LabelVal"]=U?z.orig_p:z.p,e.labelLabel=s(R,e[d+"LabelVal"],g[d+"hoverformat"]),e.valueLabel=s(j,e[f+"LabelVal"],g[f+"hoverformat"]),e.baseLabel=s(j,z.b,g[f+"hoverformat"]),e.spikeDistance=(function(e){var t=c,n=e.b,a=P(e);return r.inbox(n-t,a-t,A+(a-t)/(a-n)-1)}(z)+function(e){return D(k(e),M(e),A)}(z))/2,e[d+"Spike"]=R.c2p(z.p,!0),o(z,g,e),e.hovertemplate=g.hovertemplate,e}}function d(e,t){var n=t.mcc||e.marker.color,r=t.mlcc||e.marker.line.color,a=l(e,t);return i.opacity(n)?n:i.opacity(r)&&a?r:void 0}e.exports={hoverPoints:function(e,t,n,r,i){var o=c(e,t,n,r,i);if(o){var l=o.cd,s=l[0].trace,u=l[o.index];return o.color=d(s,u),a.getComponentMethod("errorbars","hoverInfo")(u,s,o),[o]}},hoverOnBars:c,getTraceColor:d}},1132:function(e,t,n){"use strict";e.exports={attributes:n(832),layoutAttributes:n(9324),supplyDefaults:n(1508).supplyDefaults,crossTraceDefaults:n(1508).crossTraceDefaults,supplyLayoutDefaults:n(7156),calc:n(9439),crossTraceCalc:n(6376).crossTraceCalc,colorbar:n(5528),arraysToCalcdata:n(4664),plot:n(8184).plot,style:n(100).style,styleOnSelect:n(100).styleOnSelect,hoverPoints:n(1020).hoverPoints,eventData:n(2160),selectPoints:n(5784),moduleType:"trace",name:"bar",basePlotModule:n(7952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},9324:function(e){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},7156:function(e,t,n){"use strict";var r=n(4040),a=n(4460),i=n(3400),o=n(9324),l=n(1508).validateCornerradius;e.exports=function(e,t,n){function s(n,r){return i.coerce(e,t,o,n,r)}for(var u=!1,c=!1,d=!1,f={},h=s("barmode"),p=0;p0)-(e<0)}function k(e,t){return e0}function C(e,t,n,r,a){return!(e<0||t<0)&&(n<=e&&r<=t||n<=t&&r<=e||(a?e>=n*(t/r):t>=r*(e/n)))}function L(e){return"auto"===e?0:e}function E(e,t){var n=Math.PI/180*t,r=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));return{x:e.width*a+e.height*r,y:e.width*r+e.height*a}}function D(e,t,n,r,a,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,u=i.anchor,c="end"===u,d="start"===u,f=((i.leftToRight||0)+1)/2,h=1-f,p=i.hasB,v=i.r,m=i.overhead,g=a.width,y=a.height,x=Math.abs(t-e),b=Math.abs(r-n),A=x>2*_&&b>2*_?_:0;x-=2*A,b-=2*A;var w=L(s);"auto"!==s||g<=x&&y<=b||!(g>x||y>b)||(g>b||y>x)&&g_){var C=function(e,t,n,r,a,i,o,l,s){var u,c,d,f,h,p=Math.max(0,Math.abs(t-e)-2*_),v=Math.max(0,Math.abs(r-n)-2*_),m=i-_,g=o?m-Math.sqrt(m*m-(m-o)*(m-o)):m,y=s?2*m:l?m-o:2*g,x=s?2*m:l?2*g:m-o;return a.y/a.x>=v/(p-y)?f=v/a.y:a.y/a.x<=(v-x)/p?f=p/a.x:!s&&l?(u=a.x*a.x+a.y*a.y/4,d=(p-m)*(p-m)+(v/2-m)*(v/2-m)-m*m,f=(-(c=-2*a.x*(p-m)-a.y*(v/2-m))+Math.sqrt(c*c-4*u*d))/(2*u)):s?(u=(a.x*a.x+a.y*a.y)/4,d=(p/2-m)*(p/2-m)+(v/2-m)*(v/2-m)-m*m,f=(-(c=-a.x*(p/2-m)-a.y*(v/2-m))+Math.sqrt(c*c-4*u*d))/(2*u)):(u=a.x*a.x/4+a.y*a.y,d=(p/2-m)*(p/2-m)+(v-m)*(v-m)-m*m,f=(-(c=-a.x*(p/2-m)-2*a.y*(v-m))+Math.sqrt(c*c-4*u*d))/(2*u)),f=Math.min(1,f),h=l?Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(v-a.y*f)/2)*(m-(v-a.y*f)/2)))-o):Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(p-a.x*f)/2)*(m-(p-a.x*f)/2)))-o),{scale:f,pad:h}}(e,t,n,r,S,v,m,o,p);T=C.scale,M=C.pad}else T=1,l&&(T=Math.min(1,x/S.x,b/S.y)),M=0;var D=a.left*h+a.right*f,O=(a.top+a.bottom)/2,P=(e+_)*h+(t-_)*f,N=(n+r)/2,R=0,j=0;if(d||c){var I=(o?S.x:S.y)/2;v&&(c||p)&&(A+=M);var z=o?k(e,t):k(n,r);o?d?(P=e+z*A,R=-z*I):(P=t-z*A,R=z*I):d?(N=n+z*A,j=-z*I):(N=r-z*A,j=z*I)}return{textX:D,textY:O,targetX:P,targetY:N,anchorX:R,anchorY:j,scale:T,rotate:w}}e.exports={plot:function(e,t,n,d,m,g){var A=t.xaxis,O=t.yaxis,P=e._fullLayout,N=e._context.staticPlot;m||(m={mode:P.barmode,norm:P.barmode,gap:P.bargap,groupgap:P.bargroupgap},h("bar",P));var R=i.makeTraceGroups(d,n,"trace bars").each((function(n){var u=r.select(this),d=n[0].trace,h=n[0].t,R="waterfall"===d.type,j="funnel"===d.type,I="histogram"===d.type,z="bar"===d.type,F=z||j,B=0;R&&d.connector.visible&&"between"===d.connector.mode&&(B=d.connector.line.width/2);var U="h"===d.orientation,H=S(m),Y=i.ensureSingle(u,"g","points"),V=w(d),G=Y.selectAll("g.point").data(i.identity,V);G.enter().append("g").classed("point",!0),G.exit().remove(),G.each((function(u,w){var S,R,j=r.select(this),Y=function(e,t,n,r){var a=[],i=[],o=r?t:n,l=r?n:t;return a[0]=o.c2p(e.s0,!0),i[0]=l.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=l.c2p(e.p1,!0),r?[a,i]:[i,a]}(u,A,O,U),V=Y[0][0],G=Y[0][1],W=Y[1][0],q=Y[1][1],Z=0===(U?G-V:q-W);if(Z&&F&&v.getLineWidth(d,u)&&(Z=!1),Z||(Z=!a(V)||!a(G)||!a(W)||!a(q)),u.isBlank=Z,Z&&(U?G=V:q=W),B&&!Z&&(U?(V-=k(V,G)*B,G+=k(V,G)*B):(W-=k(W,q)*B,q+=k(W,q)*B)),"waterfall"===d.type){if(!Z){var X=d[u.dir].marker;S=X.line.width,R=X.color}}else S=v.getLineWidth(d,u),R=u.mc||d.marker.color;function J(e){var t=r.round(S/2%1,2);return 0===m.gap&&0===m.groupgap?r.round(Math.round(e)-t,2):e}var Q=l.opacity(R)<1||S>.01?J:function(e,t,n){return n&&e===t?e:Math.abs(e-t)>=2?J(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(V=Q(V,G,U),G=Q(G,V,U),W=Q(W,q,!U),q=Q(q,W,!U));var K,$=U?A.c2p:O.c2p;K=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var ee,te,ne=z||I?function(e,t){if(!e)return 0;var n,r=U?Math.abs(q-W):Math.abs(G-V),a=U?Math.abs(G-V):Math.abs(q-W),i=Q(Math.abs($(K,!0)-$(0,!0))),o=u.hasB?Math.min(r/2,a/2):Math.min(r/2,i);return n="%"===t?r*(Math.min(50,e)/100):e,Q(Math.max(Math.min(n,o),0))}(h.cornerradiusvalue,h.cornerradiusform):0,re="M"+V+","+W+"V"+q+"H"+G+"V"+W+"Z",ae=0;if(ne&&u.s){var ie=0===T(u.s0)||T(u.s)===T(u.s0)?u.s1:u.s0;if((ae=Q(u.hasB?0:Math.abs($(K,!0)-$(ie,!0))))0?Math.sqrt(ae*(2*ne-ae)):0,de=oe>0?Math.max:Math.min;ee="M"+V+","+W+"V"+(q-ue*le)+"H"+de(G-(ne-ae)*oe,V)+"A "+ne+","+ne+" 0 0 "+se+" "+G+","+(q-ne*le-ce)+"V"+(W+ne*le+ce)+"A "+ne+","+ne+" 0 0 "+se+" "+de(G-(ne-ae)*oe,V)+","+(W+ue*le)+"Z"}else if(u.hasB)ee="M"+(V+ne*oe)+","+W+"A "+ne+","+ne+" 0 0 "+se+" "+V+","+(W+ne*le)+"V"+(q-ne*le)+"A "+ne+","+ne+" 0 0 "+se+" "+(V+ne*oe)+","+q+"H"+(G-ne*oe)+"A "+ne+","+ne+" 0 0 "+se+" "+G+","+(q-ne*le)+"V"+(W+ne*le)+"A "+ne+","+ne+" 0 0 "+se+" "+(G-ne*oe)+","+W+"Z";else{var fe=(te=Math.abs(q-W)+ae)0?Math.sqrt(ae*(2*ne-ae)):0,pe=le>0?Math.max:Math.min;ee="M"+(V+fe*oe)+","+W+"V"+pe(q-(ne-ae)*le,W)+"A "+ne+","+ne+" 0 0 "+se+" "+(V+ne*oe-he)+","+q+"H"+(G-ne*oe+he)+"A "+ne+","+ne+" 0 0 "+se+" "+(G-fe*oe)+","+pe(q-(ne-ae)*le,W)+"V"+W+"Z"}}else ee=re}else ee=re;var ve=M(i.ensureSingle(j,"path"),P,m,g);if(ve.style("vector-effect",N?"none":"non-scaling-stroke").attr("d",isNaN((G-V)*(q-W))||Z&&e._context.staticPlot?"M0,0Z":ee).call(s.setClipUrl,t.layerClipId,e),!P.uniformtext.mode&&H){var me=s.makePointStyleFns(d);s.singlePointStyle(u,ve,d,me,e)}!function(e,t,n,r,a,l,u,d,h,m,g,A,w){var T,S=t.xaxis,O=t.yaxis,P=e._fullLayout;function N(t,n,r){return i.ensureSingle(t,"text").text(n).attr({class:"bartext bartext-"+T,"text-anchor":"middle","data-notex":1}).call(s.font,r).call(o.convertToTspans,e)}var R=r[0].trace,j="h"===R.orientation,I=function(e,t,n,r,a){var o,l=t[0].trace,s=l.texttemplate;return o=s?function(e,t,n,r,a){var o=t[0].trace,l=i.castOption(o,n,"texttemplate");if(!l)return"";var s,u,d,f,h="histogram"===o.type,p="waterfall"===o.type,v="funnel"===o.type,m="h"===o.orientation;function g(e){return c(u,u.c2l(e),!0).text}function y(e){return c(f,f.c2l(e),!0).text}m?(s="y",u=a,d="x",f=r):(s="x",u=r,d="y",f=a);var x=t[n],_={};_.label=x.p,_.labelLabel=_[s+"Label"]=g(x.p);var A=i.castOption(o,x.i,"text");(0===A||A)&&(_.text=A),_.value=x.s,_.valueLabel=_[d+"Label"]=y(x.s);var w={};b(w,o,x.i),(h||void 0===w.x)&&(w.x=m?_.value:_.label),(h||void 0===w.y)&&(w.y=m?_.label:_.value),(h||void 0===w.xLabel)&&(w.xLabel=m?_.valueLabel:_.labelLabel),(h||void 0===w.yLabel)&&(w.yLabel=m?_.labelLabel:_.valueLabel),p&&(_.delta=+x.rawS||x.s,_.deltaLabel=y(_.delta),_.final=x.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial)),v&&(_.value=x.s,_.valueLabel=y(_.value),_.percentInitial=x.begR,_.percentInitialLabel=i.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=i.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=i.formatPercent(x.sumR));var T=i.castOption(o,x.i,"customdata");return T&&(_.customdata=T),i.texttemplateString(l,_,e._d3locale,w,_,o._meta||{})}(e,t,n,r,a):l.textinfo?function(e,t,n,r){var a=e[0].trace,o="h"===a.orientation,l="waterfall"===a.type,s="funnel"===a.type;function u(e){return c(o?r:n,e,!0).text}function d(e){return c(o?n:r,+e,!0).text}var f,h=a.textinfo,p=e[t],v=h.split("+"),m=[],g=function(e){return-1!==v.indexOf(e)};if(g("label")&&m.push(u(e[t].p)),g("text")&&(0===(f=i.castOption(a,p.i,"text"))||f)&&m.push(f),l){var y=+p.rawS||p.s,x=p.v,b=x-y;g("initial")&&m.push(d(b)),g("delta")&&m.push(d(y)),g("final")&&m.push(d(x))}if(s){g("value")&&m.push(d(p.s));var _=0;g("percent initial")&&_++,g("percent previous")&&_++,g("percent total")&&_++;var A=_>1;g("percent initial")&&(f=i.formatPercent(p.begR),A&&(f+=" of initial"),m.push(f)),g("percent previous")&&(f=i.formatPercent(p.difR),A&&(f+=" of previous"),m.push(f)),g("percent total")&&(f=i.formatPercent(p.sumR),A&&(f+=" of total"),m.push(f))}return m.join("
")}(t,n,r,a):v.getValue(l.text,n),v.coerceString(y,o)}(P,r,a,S,O);T=function(e,t){var n=v.getValue(e.textposition,t);return v.coerceEnumerated(x,n)}(R,a);var z="stack"===A.mode||"relative"===A.mode,F=r[a],B=!z||F._outmost,U=F.hasB,H=m&&m-g>_;if(I&&"none"!==T&&(!F.isBlank&&l!==u&&d!==h||"auto"!==T&&"inside"!==T)){var Y=P.font,V=p.getBarColor(r[a],R),G=p.getInsideTextFont(R,a,Y,V),W=p.getOutsideTextFont(R,a,Y),q=R.insidetextanchor||"end",Z=n.datum();j?"log"===S.type&&Z.s0<=0&&(l=S.range[0]0&&K>0;ae=H?U?C(ne-2*m,re,Q,K,j)||C(ne,re-2*m,Q,K,j):j?C(ne-(m-g),re,Q,K,j)||C(ne,re-2*(m-g),Q,K,j):C(ne,re-(m-g),Q,K,j)||C(ne-2*(m-g),re,Q,K,j):C(ne,re,Q,K,j),ie&&ae?T="inside":(T="outside",X.remove(),X=null)}else T="inside";if(!X){var oe=(X=N(n,I,$=i.ensureUniformFontSize(e,"outside"===T?W:G))).attr("transform");if(X.attr("transform",""),Q=(J=s.bBox(X.node())).width,K=J.height,X.attr("transform",oe),Q<=0||K<=0)return void X.remove()}var le,se=R.textangle;le="outside"===T?function(e,t,n,r,a,i){var o,l=!!i.isHorizontal,s=!!i.constrained,u=i.angle||0,c=a.width,d=a.height,f=Math.abs(t-e),h=Math.abs(r-n);o=l?h>2*_?_:0:f>2*_?_:0;var p=1;s&&(p=l?Math.min(1,h/d):Math.min(1,f/c));var v=L(u),m=E(a,v),g=(l?m.x:m.y)/2,y=(a.left+a.right)/2,x=(a.top+a.bottom)/2,b=(e+t)/2,A=(n+r)/2,w=0,T=0,M=l?k(t,e):k(n,r);return l?(b=t-M*o,w=M*g):(A=r+M*o,T=-M*g),{textX:y,textY:x,targetX:b,targetY:A,anchorX:w,anchorY:T,scale:p,rotate:v}}(l,u,d,h,J,{isHorizontal:j,constrained:"both"===R.constraintext||"outside"===R.constraintext,angle:se}):D(l,u,d,h,J,{isHorizontal:j,constrained:"both"===R.constraintext||"inside"===R.constraintext,angle:se,anchor:q,hasB:U,r:m,overhead:g}),le.fontSize=$.size,f("histogram"===R.type?"bar":R.type,le,P),F.transform=le;var ue=M(X,P,A,w);i.setTransormAndDisplay(ue,le)}else n.select("text").remove()}(e,t,j,n,w,V,G,W,q,ne,ae,m,g),t.layerClipId&&s.hideOutsideRangePoint(u,j.select("text"),A,O,d.xcalendar,d.ycalendar)}));var W=!1===d.cliponaxis;s.setClipUrl(u,W?null:t.layerClipId,e)}));u.getComponentMethod("errorbars","plot")(e,R,t,m)},toMoveInsideBar:D}},5784:function(e){"use strict";function t(e,t,n,r,a){var i=t.c2p(r?e.s0:e.p0,!0),o=t.c2p(r?e.s1:e.p1,!0),l=n.c2p(r?e.p0:e.s0,!0),s=n.c2p(r?e.p1:e.s1,!0);return a?[(i+o)/2,(l+s)/2]:r?[o,(l+s)/2]:[(i+o)/2,s]}e.exports=function(e,n){var r,a=e.cd,i=e.xaxis,o=e.yaxis,l=a[0].trace,s="funnel"===l.type,u="h"===l.orientation,c=[];if(!1===n)for(r=0;r1||0===a.bargap&&0===a.bargroupgap&&!e[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(r.select(this),t[0].trace,e)})),l.getComponentMethod("errorbars","style")(t)},styleTextPoints:v,styleOnSelect:function(e,t,n){var a=t[0].trace;a.selectedpoints?function(e,t,n){i.selectedPointStyle(e.selectAll("path"),t),function(e,t,n){e.each((function(e){var a,l=r.select(this);if(e.selected){a=o.ensureUniformFontSize(n,m(l,e,t,n));var s=t.selected.textfont&&t.selected.textfont.color;s&&(a.color=s),i.font(l,a)}else i.selectedTextStyle(l,t)}))}(e.selectAll("text"),t,n)}(n,a,e):(p(n,a,e),l.getComponentMethod("errorbars","style")(n))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:s}},5592:function(e,t,n){"use strict";var r=n(6308),a=n(4288).hasColorscale,i=n(7260),o=n(3400).coercePattern;e.exports=function(e,t,n,l,s){var u=n("marker.color",l),c=a(e,"marker");c&&i(e,t,s,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",r.defaultLine),a(e,"marker.line")&&i(e,t,s,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),o(n,"marker.pattern",u,c),n("selected.marker.color"),n("unselected.marker.color")}},2744:function(e,t,n){"use strict";var r=n(3428),a=n(3400);function i(e){return"_"+e+"Text_minsize"}e.exports={recordMinTextSize:function(e,t,n){if(n.uniformtext.mode){var r=i(e),a=n.uniformtext.minsize,o=t.scale*t.fontSize;t.hide=o=0})),("funnelarea"===t.type?g:t.sort)&&i.sort((function(e,t){return t.v-e.v})),i[0]&&(i[0].vTotal=m),i},crossTraceCalc:function(e,t){var n=(t||{}).type;n||(n="pie");var r=e._fullLayout,a=e.calcdata,i=r[n+"colorway"],l=r["_"+n+"colormap"];r["extend"+n+"colors"]&&(i=s(i,o));for(var u=0,c=0;c0){l=!0;break}}l||(o=0)}return{hasLabels:n,hasValues:i,len:o}}function c(e,t,n,r,a){r("marker.line.width")&&r("marker.line.color",a?void 0:n.paper_bgcolor);var i=r("marker.colors");s(r,"marker.pattern",i),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=n.paper_bgcolor)}e.exports={handleLabelsAndValues:u,handleMarkerDefaults:c,supplyDefaults:function(e,t,n,r){function s(n,r){return a.coerce(e,t,i,n,r)}var d=u(s("labels"),s("values")),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(s("label0"),s("dlabel")),f){t._length=f,c(e,t,r,s,!0),s("scalegroup");var h,p=s("text"),v=s("texttemplate");if(v||(h=s("textinfo",a.isArrayOrTypedArray(p)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),v||h&&"none"!==h){var m=s("textposition");l(e,t,r,s,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(m)||"auto"===m||"outside"===m)&&s("automargin"),("inside"===m||"auto"===m||Array.isArray(m))&&s("insidetextorientation")}else"none"===h&&s("textposition","none");o(t,r,s);var g=s("hole");if(s("title.text")){var y=s("title.position",g?"middle center":"top center");g||"middle center"!==y||(t.title.position="top center"),a.coerceFont(s,"title.font",r.font)}s("sort"),s("direction"),s("rotation"),s("pull")}else t.visible=!1}}},3644:function(e,t,n){"use strict";var r=n(624).appendArrayMultiPointValues;e.exports=function(e,t){var n={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return 1===e.pts.length&&(n.pointNumber=n.i=e.pts[0]),r(n,t,e.pts),"funnelarea"===t.type&&(delete n.v,delete n.i),n}},1552:function(e,t,n){"use strict";var r=n(3616),a=n(6308);e.exports=function(e,t,n,i){var o=n.marker.pattern;o&&o.shape?r.pointStyle(e,n,i,t):a.fill(e,t.color)}},9656:function(e,t,n){"use strict";var r=n(3400);function a(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}t.formatPiePercent=function(e,t){var n=a((100*e).toPrecision(3));return r.numSeparate(n,t)+"%"},t.formatPieValue=function(e,t){var n=a(e.toPrecision(10));return r.numSeparate(n,t)},t.getFirstFilled=function(e,t){if(r.isArrayOrTypedArray(e))for(var n=0;n"),name:d.hovertemplate||-1!==f.indexOf("name")?d.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:m.castOption(_.bgcolor,e.pts)||e.color,borderColor:m.castOption(_.bordercolor,e.pts),fontFamily:m.castOption(A.family,e.pts),fontSize:m.castOption(A.size,e.pts),fontColor:m.castOption(A.color,e.pts),nameLength:m.castOption(_.namelength,e.pts),textAlign:m.castOption(_.align,e.pts),hovertemplate:m.castOption(d.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[g(e,d)]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t,inOut_bbox:w}),e.bbox=w[0],u._hasHoverLabel=!0}u._hasHoverEvent=!0,t.emit("plotly_hover",{points:[g(e,d)],event:r.event})}})),e.on("mouseout",(function(e){var n=t._fullLayout,a=t._fullData[u.index],o=r.select(this).datum();u._hasHoverEvent&&(e.originalEvent=r.event,t.emit("plotly_unhover",{points:[g(o,a)],event:r.event}),u._hasHoverEvent=!1),u._hasHoverLabel&&(i.loneUnhover(n._hoverlayer.node()),u._hasHoverLabel=!1)})),e.on("click",(function(e){var n=t._fullLayout,a=t._fullData[u.index];t._dragging||!1===n.hovermode||(t._hoverdata=[g(e,a)],i.click(t,r.event))}))}function b(e,t,n){var r=m.castOption(e.insidetextfont.color,t.pts);!r&&e._input.textfont&&(r=m.castOption(e._input.textfont.color,t.pts));var a=m.castOption(e.insidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||n.family,i=m.castOption(e.insidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||n.size;return{color:r||o.contrast(t.color),family:a,size:i}}function _(e,t){for(var n,r,a=0;at&&t>r||n=-4;m-=2)g(Math.PI*m,"tan");for(m=4;m>=-4;m-=2)g(Math.PI*(m+1),"tan")}if(d||h){for(m=4;m>=-4;m-=2)g(Math.PI*(m+1.5),"rad");for(m=4;m>=-4;m-=2)g(Math.PI*(m+.5),"rad")}}if(l||p||d){var y=Math.sqrt(e.width*e.width+e.height*e.height);if((i={scale:a*r*2/y,rCenter:1-a,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,i.scale>=1)return i;v.push(i)}(p||h)&&((i=w(e,r,o,s,u)).textPosAngle=(t.startangle+t.stopangle)/2,v.push(i)),(p||f)&&((i=T(e,r,o,s,u)).textPosAngle=(t.startangle+t.stopangle)/2,v.push(i));for(var x=0,b=0,_=0;_=1)break}return v[x]}function w(e,t,n,r,a){t=Math.max(0,t-2*v);var i=e.width/e.height,o=S(i,r,t,n);return{scale:2*o/e.height,rCenter:k(i,o/t),rotate:M(a)}}function T(e,t,n,r,a){t=Math.max(0,t-2*v);var i=e.height/e.width,o=S(i,r,t,n);return{scale:2*o/e.width,rCenter:k(i,o/t),rotate:M(a+Math.PI/2)}}function k(e,t){return Math.cos(t)-e*t}function M(e){return(180/Math.PI*e+720)%180-90}function S(e,t,n,r){var a=e+1/(2*Math.tan(t));return n*Math.min(1/(Math.sqrt(a*a+.5)+a),r/(Math.sqrt(e*e+r/2)+e))}function C(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function L(e,t){var n=t.pxmid[0],r=t.pxmid[1],a=e.width/2,i=e.height/2;return n<0&&(a*=-1),r<0&&(i*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(i)*(a>0?1:-1)/2,y:i/(1+n*n/(r*r)),outside:!0}}function E(e,t){var n,r,a,i=e.trace,o={x:e.cx,y:e.cy},l={tx:0,ty:0};l.ty+=i.title.font.size,a=O(i),-1!==i.title.position.indexOf("top")?(o.y-=(1+a)*e.r,l.ty-=e.titleBox.height):-1!==i.title.position.indexOf("bottom")&&(o.y+=(1+a)*e.r);var s,u,c=(s=e.r,u=e.trace.aspectratio,s/(void 0===u?1:u)),d=t.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(d+=c,o.x-=(1+a)*c,l.tx+=e.titleBox.width/2):-1!==i.title.position.indexOf("center")?d*=2:-1!==i.title.position.indexOf("right")&&(d+=c,o.x+=(1+a)*c,l.tx-=e.titleBox.width/2),n=d/e.titleBox.width,r=D(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(n,r),tx:l.tx,ty:l.ty}}function D(e,t){var n=e.trace,r=t.h*(n.domain.y[1]-n.domain.y[0]);return Math.min(e.titleBox.height,r/2)}function O(e){var t,n=e.pull;if(!n)return 0;if(s.isArrayOrTypedArray(n))for(n=0,t=0;tn&&(n=e.pull[t]);return n}function P(e,t){for(var n=[],r=0;r1?c=(u=n.r)/a.aspectratio:u=(c=n.r)*a.aspectratio,s=(u*=(1+a.baseratio)/2)*c}o=Math.min(o,s/n.vTotal)}for(r=0;r")}if(i){var x=s.castOption(a,t.i,"texttemplate");if(x){var b=function(e){return{label:e.label,value:e.v,valueLabel:m.formatPieValue(e.v,r.separators),percent:e.v/n.vTotal,percentLabel:m.formatPiePercent(e.v/n.vTotal,r.separators),color:e.color,text:e.text,customdata:s.castOption(a,e.i,"customdata")}}(t),_=m.getFirstFilled(a.text,t.pts);(y(_)||""===_)&&(b.text=_),t.text=s.texttemplateString(x,b,e._fullLayout._d3locale,b,a._meta||{})}else t.text=""}}function j(e,t){var n=e.rotate*Math.PI/180,r=Math.cos(n),a=Math.sin(n),i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=i*r-o*a,e.textY=i*a+o*r,e.noCenter=!0}e.exports={plot:function(e,t){var n=e._context.staticPlot,i=e._fullLayout,f=i._size;p("pie",i),_(t,e),P(t,f);var v=s.makeTraceGroups(i._pielayer,t,"trace").each((function(t){var p=r.select(this),v=t[0],g=v.trace;!function(e){var t,n,r,a=e[0],i=a.r,o=a.trace,l=m.getRotationAngle(o.rotation),s=2*Math.PI/a.vTotal,u="px0",c="px1";if("counterclockwise"===o.direction){for(t=0;ta.vTotal/2?1:0,n.halfangle=Math.PI*Math.min(n.v/a.vTotal,.5),n.ring=1-o.hole,n.rInscribed=C(n,a))}(t),p.attr("stroke-linejoin","round"),p.each((function(){var y=r.select(this).selectAll("g.slice").data(t);y.enter().append("g").classed("slice",!0),y.exit().remove();var _=[[[],[]],[[],[]]],w=!1;y.each((function(a,o){if(a.hidden)r.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=g.index,_[a.pxmid[1]<0?0:1][a.pxmid[0]<0?0:1].push(a);var u=v.cx,c=v.cy,f=r.select(this),p=f.selectAll("path.surface").data([a]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),f.call(x,e,t),g.pull){var y=+m.castOption(g.pull,a.pts)||0;y>0&&(u+=y*a.pxmid[0],c+=y*a.pxmid[1])}a.cxFinal=u,a.cyFinal=c;var T=g.hole;if(a.v===v.vTotal){var k="M"+(u+a.px0[0])+","+(c+a.px0[1])+D(a.px0,a.pxmid,!0,1)+D(a.pxmid,a.px0,!0,1)+"Z";T?p.attr("d","M"+(u+T*a.px0[0])+","+(c+T*a.px0[1])+D(a.px0,a.pxmid,!1,T)+D(a.pxmid,a.px0,!1,T)+"Z"+k):p.attr("d",k)}else{var M=D(a.px0,a.px1,!0,1);if(T){var S=1-T;p.attr("d","M"+(u+T*a.px1[0])+","+(c+T*a.px1[1])+D(a.px1,a.px0,!1,T)+"l"+S*a.px0[0]+","+S*a.px0[1]+M+"Z")}else p.attr("d","M"+u+","+c+"l"+a.px0[0]+","+a.px0[1]+M+"Z")}R(e,a,v);var C=m.castOption(g.textposition,a.pts),E=f.selectAll("g.slicetext").data(a.text&&"none"!==C?[0]:[]);E.enter().append("g").classed("slicetext",!0),E.exit().remove(),E.each((function(){var n=s.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),f=s.ensureUniformFontSize(e,"outside"===C?function(e,t,n){var r=m.castOption(e.outsidetextfont.color,t.pts)||m.castOption(e.textfont.color,t.pts)||n.color,a=m.castOption(e.outsidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||n.family,i=m.castOption(e.outsidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||n.size;return{color:r,family:a,size:i}}(g,a,i.font):b(g,a,i.font));n.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,f).call(d.convertToTspans,e);var p,y=l.bBox(n.node());if("outside"===C)p=L(y,a);else if(p=A(y,a,v),"auto"===C&&p.scale<1){var x=s.ensureUniformFontSize(e,g.outsidetextfont);n.call(l.font,x),p=L(y=l.bBox(n.node()),a)}var _=p.textPosAngle,T=void 0===_?a.pxmid:N(v.r,_);if(p.targetX=u+T[0]*p.rCenter+(p.x||0),p.targetY=c+T[1]*p.rCenter+(p.y||0),j(p,y),p.outside){var k=p.targetY;a.yLabelMin=k-y.height/2,a.yLabelMid=k,a.yLabelMax=k+y.height/2,a.labelExtraX=0,a.labelExtraY=0,w=!0}p.fontSize=f.size,h(g.type,p,i),t[o].transform=p,s.setTransormAndDisplay(n,p)}))}function D(e,t,n,r){var i=r*(t[0]-e[0]),o=r*(t[1]-e[1]);return"a"+r*v.r+","+r*v.r+" 0 "+a.largeArc+(n?" 1 ":" 0 ")+i+","+o}}));var T=r.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);if(T.enter().append("g").classed("titletext",!0),T.exit().remove(),T.each((function(){var t,n=s.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),a=g.title.text;g._meta&&(a=s.templateString(a,g._meta)),n.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,g.title.font).call(d.convertToTspans,e),t="middle center"===g.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(v):E(v,f),n.attr("transform",c(t.x,t.y)+u(Math.min(1,t.scale))+c(t.tx,t.ty))})),w&&function(e,t){var n,r,a,i,o,l,u,c,d,f,h,p,v;function g(e,t){return e.pxmid[1]-t.pxmid[1]}function y(e,t){return t.pxmid[1]-e.pxmid[1]}function x(e,n){n||(n={});var a,c,d,h,p=n.labelExtraY+(r?n.yLabelMax:n.yLabelMin),v=r?e.yLabelMin:e.yLabelMax,g=r?e.yLabelMax:e.yLabelMin,y=e.cyFinal+o(e.px0[1],e.px1[1]),x=p-v;if(x*u>0&&(e.labelExtraY=x),s.isArrayOrTypedArray(t.pull))for(c=0;c=(m.castOption(t.pull,d.pts)||0)||((e.pxmid[1]-d.pxmid[1])*u>0?(x=d.cyFinal+o(d.px0[1],d.px1[1])-v-e.labelExtraY)*u>0&&(e.labelExtraY+=x):(g+e.labelExtraY-y)*u>0&&(a=3*l*Math.abs(c-f.indexOf(e)),(h=d.cxFinal+i(d.px0[0],d.px1[0])+a-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=h)))}for(r=0;r<2;r++)for(a=r?g:y,o=r?Math.max:Math.min,u=r?1:-1,n=0;n<2;n++){for(i=n?Math.max:Math.min,l=n?1:-1,(c=e[r][n]).sort(a),d=e[1-r][n],f=d.concat(c),p=[],h=0;hMath.abs(d)?l+="l"+d*e.pxmid[0]/e.pxmid[1]+","+d+"H"+(i+e.labelExtraX+u):l+="l"+e.labelExtraX+","+c+"v"+(d-c)+"h"+u}else l+="V"+(e.yLabelMid+e.labelExtraY)+"h"+u;s.ensureSingle(n,"path","textline").call(o.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:l,fill:"none"})}else n.select("path.textline").remove()}))}(y,g),w&&g.automargin){var k=l.bBox(p.node()),M=g.domain,S=f.w*(M.x[1]-M.x[0]),C=f.h*(M.y[1]-M.y[0]),D=(.5*S-v.r)/f.w,O=(.5*C-v.r)/f.h;a.autoMargin(e,"pie."+g.uid+".automargin",{xl:M.x[0]-D,xr:M.x[1]+D,yb:M.y[0]-O,yt:M.y[1]+O,l:Math.max(v.cx-v.r-k.left,0),r:Math.max(k.right-(v.cx+v.r),0),b:Math.max(k.bottom-(v.cy+v.r),0),t:Math.max(v.cy-v.r-k.top,0),pad:5})}}))}));setTimeout((function(){v.selectAll("tspan").each((function(){var e=r.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:R,transformInsideText:A,determineInsideTextFont:b,positionTitleOutside:E,prerenderTitles:_,layoutAreas:P,attachFxHandlers:x,computeTransform:j}},2152:function(e,t,n){"use strict";var r=n(3428),a=n(528),i=n(2744).resizeText;e.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");i(e,t,"pie"),t.each((function(t){var n=t[0].trace,i=r.select(this);i.style({opacity:n.opacity}),i.selectAll("path.surface").each((function(t){r.select(this).call(a,t,n,e)}))}))}},528:function(e,t,n){"use strict";var r=n(6308),a=n(9656).castOption,i=n(1552);e.exports=function(e,t,n,o){var l=n.marker.line,s=a(l.color,t.pts)||r.defaultLine,u=a(l.width,t.pts)||0;e.call(i,t,n,o).style("stroke-width",u).call(r.stroke,s)}},148:function(e,t,n){"use strict";var r=n(3400);e.exports=function(e,t){for(var n=0;ns&&E[g].gap;)g--;for(x=E[g].s,v=E.length-1;v>g;v--)E[v].s=x;for(;sS[d]&&d=0;d--){var f=e[d];if("scatter"===f.type&&f.xaxis===u.xaxis&&f.yaxis===u.yaxis){f.opacity=void 0;break}}}}}},8800:function(e,t,n){"use strict";var r=n(3400),a=n(4040),i=n(2904),o=n(8200),l=n(3028),s=n(3980),u=n(1147),c=n(3912),d=n(4428),f=n(6828),h=n(1731),p=n(124),v=n(840),m=n(3400).coercePattern;e.exports=function(e,t,n,g){function y(n,a){return r.coerce(e,t,i,n,a)}var x=s(e,t,g,y);if(x||(t.visible=!1),t.visible){u(e,t,g,y),y("xhoverformat"),y("yhoverformat");var b=c(e,t,g,y);"group"===g.scattermode&&void 0===t.orientation&&y("orientation","v");var _=!b&&x=Math.min(t,n)&&p<=Math.max(t,n)?0:1/0}var r=Math.max(3,e.mrc||0),a=1-1/r,i=Math.abs(f.c2p(e.x)-p);return i=Math.min(t,n)&&v<=Math.max(t,n)?0:1/0}var r=Math.max(3,e.mrc||0),a=1-1/r,i=Math.abs(h.c2p(e.y)-v);return in!==(u=a[r][1])>=n&&(o=a[r-1][0],l=a[r][0],u-s&&(i=o+(l-o)*(n-s)/(u-s),d=Math.min(d,i),p=Math.max(p,i)));return{x0:d=Math.max(d,0),x1:p=Math.min(p,f._length),y0:n,y1:n}}(d._polygons);null===O&&(O={x0:m[0],x1:m[0],y0:m[1],y1:m[1]});var P=l.defaultLine;return l.opacity(d.fillcolor)?P=d.fillcolor:l.opacity((d.line||{}).color)&&(P=d.line.color),r.extendFlat(e,{distance:e.maxHoverDistance,x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1,color:P,hovertemplate:!1}),delete e.index,d.text&&!r.isArrayOrTypedArray(d.text)?e.text=String(d.text):e.text=d.name,[e]}}},5875:function(e,t,n){"use strict";var r=n(3028);e.exports={hasLines:r.hasLines,hasMarkers:r.hasMarkers,hasText:r.hasText,isBubble:r.isBubble,attributes:n(2904),layoutAttributes:n(5308),supplyDefaults:n(8800),crossTraceDefaults:n(5036),supplyLayoutDefaults:n(9748),calc:n(6356).calc,crossTraceCalc:n(6664),arraysToCalcdata:n(148),plot:n(6504),colorbar:n(5528),formatLabels:n(6688),style:n(6844).style,styleOnSelect:n(6844).styleOnSelect,hoverPoints:n(8723),selectPoints:n(1560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:n(7952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},5308:function(e){"use strict";e.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},9748:function(e,t,n){"use strict";var r=n(3400),a=n(5308);e.exports=function(e,t){var n,i,o="group"===t.barmode;"group"===t.scattermode&&(n="scattergap",i=o?t.bargap:.2,r.coerce(e,t,a,n,i))}},6828:function(e,t,n){"use strict";var r=n(3400).isArrayOrTypedArray,a=n(4288).hasColorscale,i=n(7260);e.exports=function(e,t,n,o,l,s){s||(s={});var u=(e.marker||{}).color;u&&u._inputArray&&(u=u._inputArray),l("line.color",n),a(e,"line")?i(e,t,o,l,{prefix:"line.",cLetter:"c"}):l("line.color",!r(u)&&u||n),l("line.width"),s.noDash||l("line.dash"),s.backoff&&l("line.backoff")}},2340:function(e,t,n){"use strict";var r=n(3616),a=n(9032),i=a.BADNUM,o=a.LOG_CLIP,l=o+.5,s=o-.5,u=n(3400),c=u.segmentsIntersect,d=u.constrain,f=n(8200);e.exports=function(e,t){var n,a,o,h,p,v,m,g,y,x,b,_,A,w,T,k,M,S,C=t.trace||{},L=t.xaxis,E=t.yaxis,D="log"===L.type,O="log"===E.type,P=L._length,N=E._length,R=t.backoff,j=C.marker,I=t.connectGaps,z=t.baseTolerance,F=t.shape,B="linear"===F,U=C.fill&&"none"!==C.fill,H=[],Y=f.minTolerance,V=e.length,G=new Array(V),W=0;function q(n){var r=e[n];if(!r)return!1;var a=t.linearized?L.l2p(r.x):L.c2p(r.x),o=t.linearized?E.l2p(r.y):E.c2p(r.y);if(a===i){if(D&&(a=L.c2p(r.x,!0)),a===i)return!1;O&&o===i&&(a*=Math.abs(L._m*N*(L._m>0?l:s)/(E._m*P*(E._m>0?l:s)))),a*=1e3}if(o===i){if(O&&(o=E.c2p(r.y,!0)),o===i)return!1;o*=1e3}return[a,o]}function Z(e,t,n,r){var a=n-e,i=r-t,o=.5-e,l=.5-t,s=a*a+i*i,u=a*o+i*l;if(u>0&&uoe||e[1]se)return[d(e[0],ie,oe),d(e[1],le,se)]}function de(e,t){return e[0]===t[0]&&(e[0]===ie||e[0]===oe)||e[1]===t[1]&&(e[1]===le||e[1]===se)||void 0}function fe(e,t,n){return function(r,a){var i=ce(r),o=ce(a),l=[];if(i&&o&&de(i,o))return l;i&&l.push(i),o&&l.push(o);var s=2*u.constrain((r[e]+a[e])/2,t,n)-((i||r)[e]+(o||a)[e]);return s&&((i&&o?s>0===i[e]>o[e]?i:o:i||o)[e]+=s),l}}function he(e){var t=e[0],n=e[1],r=t===G[W-1][0],a=n===G[W-1][1];if(!r||!a)if(W>1){var i=t===G[W-2][0],o=n===G[W-2][1];r&&(t===ie||t===oe)&&i?o?W--:G[W-1]=e:a&&(n===le||n===se)&&o?i?W--:G[W-1]=e:G[W++]=e}else G[W++]=e}function pe(e){G[W-1][0]!==e[0]&&G[W-1][1]!==e[1]&&he([$,ee]),he(e),te=null,$=ee=0}"linear"===F||"spline"===F?re=function(e,t){for(var n=[],r=0,a=0;a<4;a++){var i=ue[a],o=c(e[0],e[1],t[0],t[1],i[0],i[1],i[2],i[3]);o&&(!r||Math.abs(o.x-n[0][0])>1||Math.abs(o.y-n[0][1])>1)&&(o=[o.x,o.y],r&&J(o,e)oe?oe:0,K=t[1]se?se:0,Q||K){if(W)if(te){var r=re(te,t);r.length>1&&(pe(r[0]),G[W++]=r[1])}else ne=re(G[W-1],t)[0],G[W++]=ne;else G[W++]=[Q||t[0],K||t[1]];var a=G[W-1];Q&&K&&(a[0]!==Q||a[1]!==K)?(te&&($!==Q&&ee!==K?he($&&ee?function(e,t){var n=t[0]-e[0],r=(t[1]-e[1])/n;return(e[1]*t[0]-t[1]*e[0])/n>0?[r>0?ie:oe,se]:[r>0?oe:ie,le]}(te,t):[$||Q,ee||K]):$&&ee&&he([$,ee])),he([Q,K])):$-Q&&ee-K&&he([Q||$,K||ee]),te=t,$=Q,ee=K}else te&&pe(re(te,t)[0]),G[W++]=t}for(n=0;nX(v,ge))break;o=v,(A=y[0]*g[0]+y[1]*g[1])>b?(b=A,h=v,m=!1):A<_&&(_=A,p=v,m=!0)}if(m?(me(h),o!==p&&me(p)):(p!==a&&me(p),o!==h&&me(h)),me(o),n>=e.length||!v)break;me(v),a=v}}else me(h)}te&&he([$||te[0],ee||te[1]]),H.push(G.slice(0,W))}var ye=F.slice(F.length-1);if(R&&"h"!==ye&&"v"!==ye){for(var xe=!1,be=-1,_e=[],Ae=0;Ae=0?s=h:(s=h=f,f++),s0?Math.max(n,i):0}}},5528:function(e){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},4428:function(e,t,n){"use strict";var r=n(6308),a=n(4288).hasColorscale,i=n(7260),o=n(3028);e.exports=function(e,t,n,l,s,u){var c=o.isBubble(e),d=(e.line||{}).color;u=u||{},d&&(n=d),s("marker.symbol"),s("marker.opacity",c?.7:1),s("marker.size"),u.noAngle||(s("marker.angle"),u.noAngleRef||s("marker.angleref"),u.noStandOff||s("marker.standoff")),s("marker.color",n),a(e,"marker")&&i(e,t,l,s,{prefix:"marker.",cLetter:"c"}),u.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),u.noLine||(s("marker.line.color",d&&!Array.isArray(d)&&t.marker.color!==d?d:c?r.background:r.defaultLine),a(e,"marker.line")&&i(e,t,l,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",c?1:0)),c&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),u.gradient&&"none"!==s("marker.gradient.type")&&s("marker.gradient.color")}},1147:function(e,t,n){"use strict";var r=n(3400).dateTick0,a=n(9032).ONEWEEK;function i(e,t){return r(t,e%a===0?1:0)}e.exports=function(e,t,n,r,a){if(a||(a={x:!0,y:!0}),a.x){var o=r("xperiod");o&&(r("xperiod0",i(o,t.xcalendar)),r("xperiodalignment"))}if(a.y){var l=r("yperiod");l&&(r("yperiod0",i(l,t.ycalendar)),r("yperiodalignment"))}}},6504:function(e,t,n){"use strict";var r=n(3428),a=n(4040),i=n(3400),o=i.ensureSingle,l=i.identity,s=n(3616),u=n(3028),c=n(2340),d=n(4328),f=n(2065).tester;function h(e,t,n,d,h,p,v){var m,g=e._context.staticPlot;!function(e,t,n,a,o){var l=n.xaxis,s=n.yaxis,c=r.extent(i.simpleMap(l.range,l.r2c)),d=r.extent(i.simpleMap(s.range,s.r2c)),f=a[0].trace;if(u.hasMarkers(f)){var h=f.marker.maxdisplayed;if(0!==h){var p=a.filter((function(e){return e.x>=c[0]&&e.x<=c[1]&&e.y>=d[0]&&e.y<=d[1]})),v=Math.ceil(p.length/h),m=0;o.forEach((function(e,n){var r=e[0].trace;u.hasMarkers(r)&&r.marker.maxdisplayed>0&&n0;function x(e){return y?e.transition():e}var b=n.xaxis,_=n.yaxis,A=d[0].trace,w=A.line,T=r.select(p),k=o(T,"g","errorbars"),M=o(T,"g","lines"),S=o(T,"g","points"),C=o(T,"g","text");if(a.getComponentMethod("errorbars","plot")(e,k,n,v),!0===A.visible){var L,E;x(T).style("opacity",A.opacity);var D,O,P=A.fill.charAt(A.fill.length-1);"x"!==P&&"y"!==P&&(P=""),"y"===P?(D=1,O=_.c2p(0,!0)):"x"===P&&(D=0,O=b.c2p(0,!0)),d[0][n.isRangePlot?"nodeRangePlot3":"node3"]=T;var N,R,j="",I=[],z=A._prevtrace,F=null,B=null;z&&(j=z._prevRevpath||"",E=z._nextFill,I=z._ownPolygons,F=z._fillsegments,B=z._fillElement);var U,H,Y,V,G,W,q="",Z="",X=[];A._polygons=[];var J=[],Q=[],K=i.noop;if(L=A._ownFill,u.hasLines(A)||"none"!==A.fill){E&&E.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(U=s.steps(w.shape),H=s.steps(w.shape.split("").reverse().join(""))):U=H="spline"===w.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),w.smoothing):s.smoothopen(e,w.smoothing)}:function(e){return"M"+e.join("L")},Y=function(e){return H(e.reverse())},Q=c(d,{xaxis:b,yaxis:_,trace:A,connectGaps:A.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:A.fill}),J=new Array(Q.length);var $=0;for(m=0;m0,m=d(e,t,n);(c=a.selectAll("g.trace").data(m,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),c.order(),function(e,t,n){t.each((function(t){var a=o(r.select(this),"g","fills");s.setClipUrl(a,n.layerClipId,e);var i=t[0].trace,u=[];i._ownfill&&u.push("_ownFill"),i._nexttrace&&u.push("_nextFill");var c=a.selectAll("g").data(u,l);c.enter().append("g"),c.exit().each((function(e){i[e]=null})).remove(),c.order().each((function(e){i[e]=o(r.select(this),"path","js-fill")}))}))}(e,c,t),v?(u&&(f=u()),r.transition().duration(i.duration).ease(i.easing).each("end",(function(){f&&f()})).each("interrupt",(function(){f&&f()})).each((function(){a.selectAll("g.trace").each((function(n,r){h(e,r,t,n,m,this,i)}))}))):c.each((function(n,r){h(e,r,t,n,m,this,i)})),p&&c.exit().remove(),a.selectAll("path:not([d])").remove()}},1560:function(e,t,n){"use strict";var r=n(3028);e.exports=function(e,t){var n,a,i,o,l=e.cd,s=e.xaxis,u=e.yaxis,c=[],d=l[0].trace;if(!r.hasMarkers(d)&&!r.hasText(d))return[];if(!1===t)for(n=0;na&&(a=c,o=u)}}return a?i(o):l};case"rms":return function(e,t){for(var n=0,a=0,o=0;o":return function(e){return h(e)>d};case">=":return function(e){return h(e)>=d};case"[]":return function(e){var t=h(e);return t>=d[0]&&t<=d[1]};case"()":return function(e){var t=h(e);return t>d[0]&&t=d[0]&&td[0]&&t<=d[1]};case"][":return function(e){var t=h(e);return t<=d[0]||t>=d[1]};case")(":return function(e){var t=h(e);return td[1]};case"](":return function(e){var t=h(e);return t<=d[0]||t>d[1]};case")[":return function(e){var t=h(e);return t=d[1]};case"{}":return function(e){return-1!==d.indexOf(h(e))};case"}{":return function(e){return-1===d.indexOf(h(e))}}}(n,i.getDataToCoordFunc(e,t,l,a),f),x={},b={},_=0;p?(m=function(e){x[e.astr]=r.extendDeep([],e.get()),e.set(new Array(d))},g=function(e,t){var n=x[e.astr][t];e.get()[t]=n}):(m=function(e){x[e.astr]=r.extendDeep([],e.get()),e.set([])},g=function(e,t){var n=x[e.astr][t];e.get().push(n)}),T(m);for(var A=o(t.transforms,n),w=0;w1?"%{group} (%{trace})":"%{group}");var s=e.styles,u=o.styles=[];if(s)for(i=0;i1&&-1!==a.indexOf("Macintosh")&&-1!==a.indexOf("Safari")&&(i=!0),i}},3428:function(e,t,n){var r,a;(function(){var i={version:"3.8.0"},o=[].slice,l=function(e){return o.call(e)},s=self.document;function u(e){return e&&(e.ownerDocument||e.document||e).documentElement}function c(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(s)try{l(s.documentElement.childNodes)[0].nodeType}catch(gi){l=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),s)try{s.createElement("DIV").style.setProperty("opacity",0,"")}catch(yi){var d=this.Element.prototype,f=d.setAttribute,h=d.setAttributeNS,p=this.CSSStyleDeclaration.prototype,v=p.setProperty;d.setAttribute=function(e,t){f.call(this,e,t+"")},d.setAttributeNS=function(e,t,n){h.call(this,e,t,n+"")},p.setProperty=function(e,t,n){v.call(this,e,t+"",n)}}function m(e,t){return et?1:e>=t?0:NaN}function g(e){return null===e?NaN:+e}function y(e){return!isNaN(e)}function x(e){return{left:function(t,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=t.length);r>>1;e(t[i],n)<0?r=i+1:a=i}return r},right:function(t,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=t.length);r>>1;e(t[i],n)>0?a=i:r=i+1}return r}}}i.ascending=m,i.descending=function(e,t){return te?1:t>=e?0:NaN},i.min=function(e,t){var n,r,a=-1,i=e.length;if(1===arguments.length){for(;++a=r){n=r;break}for(;++ar&&(n=r)}else{for(;++a=r){n=r;break}for(;++ar&&(n=r)}return n},i.max=function(e,t){var n,r,a=-1,i=e.length;if(1===arguments.length){for(;++a=r){n=r;break}for(;++an&&(n=r)}else{for(;++a=r){n=r;break}for(;++an&&(n=r)}return n},i.extent=function(e,t){var n,r,a,i=-1,o=e.length;if(1===arguments.length){for(;++i=r){n=a=r;break}for(;++ir&&(n=r),a=r){n=a=r;break}for(;++ir&&(n=r),a1)return o/(s-1)},i.deviation=function(){var e=i.variance.apply(this,arguments);return e?Math.sqrt(e):e};var b=x(m);function _(e){return e.length}i.bisectLeft=b.left,i.bisect=i.bisectRight=b.right,i.bisector=function(e){return x(1===e.length?function(t,n){return m(e(t),n)}:e)},i.shuffle=function(e,t,n){(i=arguments.length)<3&&(n=e.length,i<2&&(t=0));for(var r,a,i=n-t;i;)a=Math.random()*i--|0,r=e[i+t],e[i+t]=e[a+t],e[a+t]=r;return e},i.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},i.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],a=new Array(n<0?0:n);t=0;)for(t=(r=e[a]).length;--t>=0;)n[--o]=r[t];return n};var A=Math.abs;function w(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function T(){this._=Object.create(null)}i.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n===1/0)throw new Error("infinite range");var r,a=[],i=function(e){for(var t=1;e*t%1;)t*=10;return t}(A(n)),o=-1;if(e*=i,t*=i,(n*=i)<0)for(;(r=e+n*++o)>t;)a.push(r/i);else for(;(r=e+n*++o)=r.length)return t?t.call(n,i):e?i.sort(e):i;for(var s,u,c,d,f=-1,h=i.length,p=r[l++],v=new T;++f=r.length)return e;var n=[],i=a[t++];return e.forEach((function(e,r){n.push({key:e,values:l(r,t)})})),i?n.sort((function(e,t){return i(e.key,t.key)})):n}return n.map=function(e,t){return o(t,e,0)},n.entries=function(e){return l(o(i.map,e,0),0)},n.key=function(e){return r.push(e),n},n.sortKeys=function(e){return a[r.length-1]=e,n},n.sortValues=function(t){return e=t,n},n.rollup=function(e){return t=e,n},n},i.set=function(e){var t=new N;if(e)for(var n=0,r=e.length;n=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},i.event=null,i.requote=function(e){return e.replace(G,"\\$&")};var G=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,W={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};function q(e){return W(e,Q),e}var Z=function(e,t){return t.querySelector(e)},X=function(e,t){return t.querySelectorAll(e)},J=function(e,t){var n=e.matches||e[I(e,"matchesSelector")];return J=function(e,t){return n.call(e,t)},J(e,t)};"function"===typeof Sizzle&&(Z=function(e,t){return Sizzle(e,t)[0]||null},X=Sizzle,J=Sizzle.matchesSelector),i.selection=function(){return i.select(s.documentElement)};var Q=i.selection.prototype=[];function K(e){return"function"===typeof e?e:function(){return Z(e,this)}}function $(e){return"function"===typeof e?e:function(){return X(e,this)}}Q.select=function(e){var t,n,r,a,i=[];e=K(e);for(var o=-1,l=this.length;++o=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),te.hasOwnProperty(n)?{space:te[n],local:e}:e}},Q.attr=function(e,t){if(arguments.length<2){if("string"===typeof e){var n=this.node();return(e=i.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(ne(t,e[t]));return this}return this.each(ne(e,t))},Q.classed=function(e,t){if(arguments.length<2){if("string"===typeof e){var n=this.node(),r=(e=ie(e)).length,a=-1;if(t=n.classList){for(;++a=0;)(n=r[a])&&(i&&i!==n.nextSibling&&i.parentNode.insertBefore(n,i),i=n);return this},Q.sort=function(e){e=pe.apply(this,arguments);for(var t=-1,n=this.length;++t0&&(e=e.slice(0,a));var s=xe.get(e);function u(){var t=this[r];t&&(this.removeEventListener(e,t,t.$),delete this[r])}return s&&(e=s,o=_e),a?t?function(){var a=o(t,l(arguments));u.call(this),this.addEventListener(e,this[r]=a,a.$=n),a._=t}:u:t?F:function(){var t,n=new RegExp("^__on([^.]+)"+i.requote(e)+"$");for(var r in this)if(t=r.match(n)){var a=this[r];this.removeEventListener(t[1],a,a.$),delete this[r]}}}i.selection.enter=me,i.selection.enter.prototype=ge,ge.append=Q.append,ge.empty=Q.empty,ge.node=Q.node,ge.call=Q.call,ge.size=Q.size,ge.select=function(e){for(var t,n,r,a,i,o=[],l=-1,s=this.length;++l=t&&(t=a+1);!(o=l[t])&&++t1?Pe:e<-1?-Pe:Math.asin(e)}function Ie(e){return((e=Math.exp(e))+1/e)/2}var ze=Math.SQRT2;i.interpolateZoom=function(e,t){var n,r,a=e[0],i=e[1],o=e[2],l=t[0],s=t[1],u=t[2],c=l-a,d=s-i,f=c*c+d*d;if(f0&&(e=e.transition().duration(v)),e.call(A.event)}function S(){l&&l.domain(o.range().map((function(e){return(e-f.x)/f.k})).map(o.invert)),d&&d.domain(u.range().map((function(e){return(e-f.y)/f.k})).map(u.invert))}function C(e){m++||e({type:"zoomstart"})}function L(e){S(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function E(e){--m||(e({type:"zoomend"}),t=null)}function D(){var e=this,t=_.of(e,arguments),n=0,r=i.select(c(e)).on(y,(function(){n=1,k(i.mouse(e),a),L(t)})).on(x,(function(){r.on(y,null).on(x,null),o(n),E(t)})),a=w(i.mouse(e)),o=Te(e);Ka.call(e),C(t)}function O(){var e,t=this,n=_.of(t,arguments),r={},o=0,l=".zoom-"+i.event.changedTouches[0].identifier,s="touchmove"+l,u="touchend"+l,c=[],d=i.select(t),h=Te(t);function p(){var n=i.touches(t);return e=f.k,n.forEach((function(e){e.identifier in r&&(r[e.identifier]=w(e))})),n}function v(){var e=i.event.target;i.select(e).on(s,m).on(u,y),c.push(e);for(var n=i.event.changedTouches,l=0,d=n.length;l1){g=h[0];var x=h[1],b=g[0]-x[0],_=g[1]-x[1];o=b*b+_*_}}function m(){var l,s,u,c,d=i.touches(t);Ka.call(t);for(var f=0,h=d.length;f360?e-=360:e<0&&(e+=360),e<60?r+(a-r)*e/60:e<180?a:e<240?r+(a-r)*(240-e)/60:r}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,r=2*(n=n<0?0:n>1?1:n)-(a=n<=.5?n*(1+t):n+t-n*t),new ot(i(e+120),i(e),i(e-120))}function We(e,t,n){return this instanceof We?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof We?new We(e.h,e.c,e.l):nt(e instanceof Xe?e.l:(e=ht((e=i.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new We(e,t,n)}Ve.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ye(this.h,this.s,this.l/e)},Ve.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ye(this.h,this.s,e*this.l)},Ve.rgb=function(){return Ge(this.h,this.s,this.l)},i.hcl=We;var qe=We.prototype=new He;function Ze(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Xe(n,Math.cos(e*=Ne)*t,Math.sin(e)*t)}function Xe(e,t,n){return this instanceof Xe?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof Xe?new Xe(e.l,e.a,e.b):e instanceof We?Ze(e.h,e.c,e.l):ht((e=ot(e)).r,e.g,e.b):new Xe(e,t,n)}qe.brighter=function(e){return new We(this.h,this.c,Math.min(100,this.l+Je*(arguments.length?e:1)))},qe.darker=function(e){return new We(this.h,this.c,Math.max(0,this.l-Je*(arguments.length?e:1)))},qe.rgb=function(){return Ze(this.h,this.c,this.l).rgb()},i.lab=Xe;var Je=18,Qe=.95047,Ke=1,$e=1.08883,et=Xe.prototype=new He;function tt(e,t,n){var r=(e+16)/116,a=r+t/500,i=r-n/200;return new ot(it(3.2404542*(a=rt(a)*Qe)-1.5371385*(r=rt(r)*Ke)-.4985314*(i=rt(i)*$e)),it(-.969266*a+1.8760108*r+.041556*i),it(.0556434*a-.2040259*r+1.0572252*i))}function nt(e,t,n){return e>0?new We(Math.atan2(n,t)*Re,Math.sqrt(t*t+n*n),e):new We(NaN,NaN,e)}function rt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function at(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function it(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ot(e,t,n){return this instanceof ot?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof ot?new ot(e.r,e.g,e.b):dt(""+e,ot,Ge):new ot(e,t,n)}function lt(e){return new ot(e>>16,e>>8&255,255&e)}function st(e){return lt(e)+""}et.brighter=function(e){return new Xe(Math.min(100,this.l+Je*(arguments.length?e:1)),this.a,this.b)},et.darker=function(e){return new Xe(Math.max(0,this.l-Je*(arguments.length?e:1)),this.a,this.b)},et.rgb=function(){return tt(this.l,this.a,this.b)},i.rgb=ot;var ut=ot.prototype=new He;function ct(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function dt(e,t,n){var r,a,i,o=0,l=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(a=r[2].split(","),r[1]){case"hsl":return n(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return t(vt(a[0]),vt(a[1]),vt(a[2]))}return(i=mt.get(e))?t(i.r,i.g,i.b):(null==e||"#"!==e.charAt(0)||isNaN(i=parseInt(e.slice(1),16))||(4===e.length?(o=(3840&i)>>4,o|=o>>4,l=240&i,l|=l>>4,s=15&i,s|=s<<4):7===e.length&&(o=(16711680&i)>>16,l=(65280&i)>>8,s=255&i)),t(o,l,s))}function ft(e,t,n){var r,a,i=Math.min(e/=255,t/=255,n/=255),o=Math.max(e,t,n),l=o-i,s=(o+i)/2;return l?(a=s<.5?l/(o+i):l/(2-o-i),r=e==o?(t-n)/l+(t0&&s<1?0:r),new Ye(r,a,s)}function ht(e,t,n){var r=at((.4124564*(e=pt(e))+.3575761*(t=pt(t))+.1804375*(n=pt(n)))/Qe),a=at((.2126729*e+.7151522*t+.072175*n)/Ke);return Xe(116*a-16,500*(r-a),200*(a-at((.0193339*e+.119192*t+.9503041*n)/$e)))}function pt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}ut.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,a=30;return t||n||r?(t&&t=200&&t<300||304===t){try{e=n.call(a,u)}catch(gi){return void o.error.call(a,gi)}o.load.call(a,e)}else o.error.call(a,u)}return self.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(e)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=d:u.onreadystatechange=function(){u.readyState>3&&d()},u.onprogress=function(e){var t=i.event;i.event=e;try{o.progress.call(a,u)}finally{i.event=t}},a.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",a)},a.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",a):t},a.responseType=function(e){return arguments.length?(c=e,a):c},a.response=function(e){return n=e,a},["get","post"].forEach((function(e){a[e]=function(){return a.send.apply(a,[e].concat(l(arguments)))}})),a.send=function(n,r,i){if(2===arguments.length&&"function"===typeof r&&(i=r,r=null),u.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),u.setRequestHeader)for(var l in s)u.setRequestHeader(l,s[l]);return null!=t&&u.overrideMimeType&&u.overrideMimeType(t),null!=c&&(u.responseType=c),null!=i&&a.on("error",i).on("load",(function(e){i(null,e)})),o.beforesend.call(a,u),u.send(null==r?null:r),a},a.abort=function(){return u.abort(),a},i.rebind(a,o,"on"),null==r?a:a.get(function(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}(r))}mt.forEach((function(e,t){mt.set(e,lt(t))})),i.functor=gt,i.xhr=yt(R),i.dsv=function(e,t){var n=new RegExp('["'+e+"\n]"),r=e.charCodeAt(0);function a(e,n,r){arguments.length<3&&(r=n,n=null);var a=xt(e,t,null==n?i:o(n),r);return a.row=function(e){return arguments.length?a.response(null==(n=e)?i:o(e)):n},a}function i(e){return a.parse(e.responseText)}function o(e){return function(t){return a.parse(t.responseText,e)}}function l(t){return t.map(s).join(e)}function s(e){return n.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return a.parse=function(e,t){var n;return a.parseRows(e,(function(e,r){if(n)return n(e,r-1);var a=function(t){for(var n={},r=e.length,a=0;a=s)return o;if(a)return a=!1,i;var t=u;if(34===e.charCodeAt(t)){for(var n=t;n++24?(isFinite(t)&&(clearTimeout(wt),wt=setTimeout(Mt,t)),At=0):(At=1,Tt(Mt))}function St(){for(var e=Date.now(),t=bt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Ct(){for(var e,t=bt,n=1/0;t;)t.c?(t.t1&&(t=e[i[o-2]],n=e[i[o-1]],r=e[l],(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0])<=0);)--o;i[o++]=l}return i.slice(0,o)}function Ot(e,t){return e[0]-t[0]||e[1]-t[1]}i.timer=function(){kt.apply(this,arguments)},i.timer.flush=function(){St(),Ct()},i.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},i.geom={},i.geom.hull=function(e){var t=Lt,n=Et;if(arguments.length)return r(e);function r(e){if(e.length<3)return[];var r,a=gt(t),i=gt(n),o=e.length,l=[],s=[];for(r=0;r=0;--r)h.push(e[l[u[r]][2]]);for(r=+d;rCe)l=l.L;else{if(!((a=i-Jt(l,o))>Ce)){r>-Ce?(t=l.P,n=l):a>-Ce?(t=l,n=l.N):t=n=l;break}if(!l.R){t=l;break}l=l.R}var s=Gt(e);if(Ft.insert(t,s),t||n){if(t===n)return tn(t),n=Gt(t.site),Ft.insert(s,n),s.edge=n.edge=an(t.site,s.site),en(t),void en(n);if(n){tn(t),tn(n);var u=t.site,c=u.x,d=u.y,f=e.x-c,h=e.y-d,p=n.site,v=p.x-c,m=p.y-d,g=2*(f*m-h*v),y=f*f+h*h,x=v*v+m*m,b={x:(m*y-h*x)/g+c,y:(f*x-v*y)/g+d};ln(n.edge,u,p,b),s.edge=an(u,e,null,b),n.edge=an(e,p,null,b),en(t),en(n)}else s.edge=an(t.site,s.site)}}function Xt(e,t){var n=e.site,r=n.x,a=n.y,i=a-t;if(!i)return r;var o=e.P;if(!o)return-1/0;var l=(n=o.site).x,s=n.y,u=s-t;if(!u)return l;var c=l-r,d=1/i-1/u,f=c/u;return d?(-f+Math.sqrt(f*f-2*d*(c*c/(-2*u)-s+u/2+a-i/2)))/d+r:(r+l)/2}function Jt(e,t){var n=e.N;if(n)return Xt(n,t);var r=e.site;return r.y===t?r.x:1/0}function Qt(e){this.site=e,this.edges=[]}function Kt(e,t){return t.angle-e.angle}function $t(){cn(this),this.x=this.y=this.arc=this.site=this.cy=null}function en(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,a=e.site,i=n.site;if(r!==i){var o=a.x,l=a.y,s=r.x-o,u=r.y-l,c=i.x-o,d=2*(s*(m=i.y-l)-u*c);if(!(d>=-Le)){var f=s*s+u*u,h=c*c+m*m,p=(m*f-u*h)/d,v=(s*h-c*f)/d,m=v+l,g=Yt.pop()||new $t;g.arc=e,g.site=a,g.x=p+o,g.y=m+Math.sqrt(p*p+v*v),g.cy=m,e.circle=g;for(var y=null,x=Ut._;x;)if(g.y=l)return;if(f>p){if(i){if(i.y>=u)return}else i={x:m,y:s};n={x:m,y:u}}else{if(i){if(i.y1)if(f>p){if(i){if(i.y>=u)return}else i={x:(s-a)/r,y:s};n={x:(u-a)/r,y:u}}else{if(i){if(i.y=l)return}else i={x:o,y:r*o+a};n={x:l,y:r*l+a}}else{if(i){if(i.x0)){if(t/=f,f<0){if(t0){if(t>d)return;t>c&&(c=t)}if(t=a-s,f||!(t<0)){if(t/=f,f<0){if(t>d)return;t>c&&(c=t)}else if(f>0){if(t0)){if(t/=h,h<0){if(t0){if(t>d)return;t>c&&(c=t)}if(t=i-u,h||!(t<0)){if(t/=h,h<0){if(t>d)return;t>c&&(c=t)}else if(h>0){if(t0&&(e.a={x:s+c*f,y:u+c*h}),d<1&&(e.b={x:s+d*f,y:u+d*h}),e}}}}}),s=o.length;s--;)(!nn(t=o[s],e)||!l(t)||A(t.a.x-t.b.x)Ce||A(a-n)>Ce)&&(l.splice(o,0,new sn(on(i.site,c,A(r-d)Ce?{x:d,y:A(t-d)Ce?{x:A(n-p)Ce?{x:f,y:A(t-f)Ce?{x:A(n-h)=n&&u.x<=a&&u.y>=r&&u.y<=o?[[n,o],[a,o],[a,r],[n,r]]:[]).point=e[l]})),t}function l(e){return e.map((function(e,t){return{x:Math.round(r(e,t)/Ce)*Ce,y:Math.round(a(e,t)/Ce)*Ce,i:t}}))}return o.links=function(e){return pn(l(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},o.triangles=function(e){var t=[];return pn(l(e)).cells.forEach((function(n,r){for(var a,i,o,l,s=n.site,u=n.edges.sort(Kt),c=-1,d=u.length,f=u[d-1].edge,h=f.l===s?f.r:f.l;++ci&&(a=t.slice(i,a),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,s.push({i:o,x:An(n,r)})),i=kn.lastIndex;return iv&&(v=s.x),s.y>m&&(m=s.y),u.push(s.x),c.push(s.y);else for(d=0;dv&&(v=x),b>m&&(m=b),u.push(x),c.push(b)}var _=v-h,w=m-p;function T(e,t,n,r,a,i,o,l){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var s=e.x,u=e.y;if(null!=s)if(A(s-n)+A(u-r)<.01)k(e,t,n,r,a,i,o,l);else{var c=e.point;e.x=e.y=e.point=null,k(e,c,s,u,a,i,o,l),k(e,t,n,r,a,i,o,l)}else e.x=n,e.y=r,e.point=t}else k(e,t,n,r,a,i,o,l)}function k(e,t,n,r,a,i,o,l){var s=.5*(a+o),u=.5*(i+l),c=n>=s,d=r>=u,f=d<<1|c;e.leaf=!1,c?a=s:o=s,d?i=u:l=u,T(e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,n,r,a,i,o,l)}_>w?m=p+_:v=h+w;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){T(M,e,+g(e,++d),+y(e,d),h,p,v,m)},visit:function(e){xn(e,M,h,p,v,m)},find:function(e){return function(e,t,n,r,a,i,o){var l,s=1/0;return function e(u,c,d,f,h){if(!(c>i||d>o||f=_)<<1|t>=b,w=A+4;A=0&&!(n=i.interpolators[r](e,t)););return n}function Sn(e,t){var n,r=[],a=[],i=e.length,o=t.length,l=Math.min(e.length,t.length);for(n=0;n=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function jn(e){return 1-Math.cos(e*Pe)}function In(e){return Math.pow(2,10*(e-1))}function zn(e){return 1-Math.sqrt(1-e*e)}function Fn(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Bn(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Un(e){var t,n,r,a=[e.a,e.b],i=[e.c,e.d],o=Yn(a),l=Hn(a,i),s=Yn(((t=i)[0]+=(r=-l)*(n=a)[0],t[1]+=r*n[1],t))||0;a[0]*i[1]=0?e.slice(0,n):e,a=n>=0?e.slice(n+1):"in";return r=Ln.get(r)||Cn,a=En.get(a)||R,t=a(r.apply(null,o.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},i.interpolateHcl=function(e,t){e=i.hcl(e),t=i.hcl(t);var n=e.h,r=e.c,a=e.l,o=t.h-n,l=t.c-r,s=t.l-a;return isNaN(l)&&(l=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return Ze(n+o*e,r+l*e,a+s*e)+""}},i.interpolateHsl=function(e,t){e=i.hsl(e),t=i.hsl(t);var n=e.h,r=e.s,a=e.l,o=t.h-n,l=t.s-r,s=t.l-a;return isNaN(l)&&(l=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return Ge(n+o*e,r+l*e,a+s*e)+""}},i.interpolateLab=function(e,t){e=i.lab(e),t=i.lab(t);var n=e.l,r=e.a,a=e.b,o=t.l-n,l=t.a-r,s=t.b-a;return function(e){return tt(n+o*e,r+l*e,a+s*e)+""}},i.interpolateRound=Bn,i.transform=function(e){var t=s.createElementNS(i.ns.prefix.svg,"g");return(i.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Un(n?n.matrix:Vn)})(e)},Un.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Vn={a:1,b:0,c:0,d:1,e:0,f:0};function Gn(e){return e.length?e.pop()+",":""}function Wn(e,t){var n=[],r=[];return e=i.transform(e),t=i.transform(t),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var a=n.push("translate(",null,",",null,")");r.push({i:a-4,x:An(e[0],t[0])},{i:a-2,x:An(e[1],t[1])})}else(t[0]||t[1])&&n.push("translate("+t+")")}(e.translate,t.translate,n,r),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(Gn(n)+"rotate(",null,")")-2,x:An(e,t)})):t&&n.push(Gn(n)+"rotate("+t+")")}(e.rotate,t.rotate,n,r),function(e,t,n,r){e!==t?r.push({i:n.push(Gn(n)+"skewX(",null,")")-2,x:An(e,t)}):t&&n.push(Gn(n)+"skewX("+t+")")}(e.skew,t.skew,n,r),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var a=n.push(Gn(n)+"scale(",null,",",null,")");r.push({i:a-4,x:An(e[0],t[0])},{i:a-2,x:An(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(Gn(n)+"scale("+t+")")}(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,a=-1,i=r.length;++a0?n=t:(e.c=null,e.t=NaN,e=null,s.end({type:"end",alpha:n=0})):t>0&&(s.start({type:"start",alpha:n=t}),e=kt(l.tick)),l):n},l.start=function(){var e,t,n,i=g.length,s=y.length,c=u[0],p=u[1];for(e=0;e=0;)n.push(a[r])}function lr(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(i=e.children)&&(a=i.length))for(var a,i,o=-1;++o=0;)o.push(c=u[s]),c.parent=i,c.depth=i.depth+1;n&&(i.value=0),i.children=u}else n&&(i.value=+n.call(r,i,i.depth)||0),delete i.children;return lr(a,(function(t){var r,a;e&&(r=t.children)&&r.sort(e),n&&(a=t.parent)&&(a.value+=t.value)})),l}return r.sort=function(t){return arguments.length?(e=t,r):e},r.children=function(e){return arguments.length?(t=e,r):t},r.value=function(e){return arguments.length?(n=e,r):n},r.revalue=function(e){return n&&(or(e,(function(e){e.children&&(e.value=0)})),lr(e,(function(e){var t;e.children||(e.value=+n.call(r,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},r},i.layout.partition=function(){var e=i.layout.hierarchy(),t=[1,1];function n(e,t,r,a){var i=e.children;if(e.x=t,e.y=e.depth*a,e.dx=r,e.dy=a,i&&(o=i.length)){var o,l,s,u=-1;for(r=e.value?r/e.value:0;++ul&&(l=r),o.push(r)}for(n=0;na&&(r=n,a=t);return r}function _r(e){return e.reduce(Ar,0)}function Ar(e,t){return e+t[1]}function wr(e,t){return Tr(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Tr(e,t){for(var n=-1,r=+e[0],a=(e[1]-r)/t,i=[];++n<=t;)i[n]=a*n+r;return i}function kr(e){return[i.min(e),i.max(e)]}function Mr(e,t){return e.value-t.value}function Sr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Cr(e,t){e._pack_next=t,t._pack_prev=e}function Lr(e,t){var n=t.x-e.x,r=t.y-e.y,a=e.r+t.r;return.999*a*a>n*n+r*r}function Er(e){if((t=e.children)&&(s=t.length)){var t,n,r,a,i,o,l,s,u=1/0,c=-1/0,d=1/0,f=-1/0;if(t.forEach(Dr),(n=t[0]).x=-n.r,n.y=0,x(n),s>1&&((r=t[1]).x=r.r,r.y=0,x(r),s>2))for(Nr(n,r,a=t[2]),x(a),Sr(n,a),n._pack_prev=a,Sr(a,r),r=n._pack_next,i=3;i0)for(o=-1;++o=d[0]&&s<=d[1]&&((l=u[i.bisect(f,s,1,p)-1]).y+=v,l.push(a[o]));return u}return a.value=function(e){return arguments.length?(t=e,a):t},a.range=function(e){return arguments.length?(n=gt(e),a):n},a.bins=function(e){return arguments.length?(r="number"===typeof e?function(t){return Tr(t,e)}:gt(e),a):r},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},i.layout.pack=function(){var e,t=i.layout.hierarchy().sort(Mr),n=0,r=[1,1];function a(a,i){var o=t.call(this,a,i),l=o[0],s=r[0],u=r[1],c=null==e?Math.sqrt:"function"===typeof e?e:function(){return e};if(l.x=l.y=0,lr(l,(function(e){e.r=+c(e.value)})),lr(l,Er),n){var d=n*(e?1:Math.max(2*l.r/s,2*l.r/u))/2;lr(l,(function(e){e.r+=d})),lr(l,Er),lr(l,(function(e){e.r-=d}))}return Pr(l,s/2,u/2,e?1:1/Math.max(2*l.r/s,2*l.r/u)),o}return a.size=function(e){return arguments.length?(r=e,a):r},a.radius=function(t){return arguments.length?(e=null==t||"function"===typeof t?t:+t,a):e},a.padding=function(e){return arguments.length?(n=+e,a):n},ir(a,t)},i.layout.tree=function(){var e=i.layout.hierarchy().sort(null).value(null),t=Rr,n=[1,1],r=null;function a(a,i){var u=e.call(this,a,i),c=u[0],d=function(e){for(var t,n={A:null,children:[e]},r=[n];null!=(t=r.pop());)for(var a,i=t.children,o=0,l=i.length;oh.x&&(h=e),e.depth>p.depth&&(p=e)}));var v=t(f,h)/2-f.x,m=n[0]/(h.x+t(h,f)/2+v),g=n[1]/(p.depth||1);or(c,(function(e){e.x=(e.x+v)*m,e.y=e.depth*g}))}return u}function o(e){var n=e.children,r=e.parent.children,a=e.i?r[e.i-1]:null;if(n.length){!function(e){for(var t,n=0,r=0,a=e.children,i=a.length;--i>=0;)(t=a[i]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(e);var i=(n[0].z+n[n.length-1].z)/2;a?(e.z=a.z+t(e._,a._),e.m=e.z-i):e.z=i}else a&&(e.z=a.z+t(e._,a._));e.parent.A=function(e,n,r){if(n){for(var a,i=e,o=e,l=n,s=i.parent.children[0],u=i.m,c=o.m,d=l.m,f=s.m;l=Ir(l),i=jr(i),l&&i;)s=jr(s),(o=Ir(o)).a=e,(a=l.z+d-i.z-u+t(l._,i._))>0&&(zr(Fr(l,e,r),e,a),u+=a,c+=a),d+=l.m,u+=i.m,f+=s.m,c+=o.m;l&&!Ir(o)&&(o.t=l,o.m+=d-c),i&&!jr(s)&&(s.t=i,s.m+=u-f,r=e)}return r}(e,a,e.parent.A||r[0])}function l(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=n[0],e.y=e.depth*n[1]}return a.separation=function(e){return arguments.length?(t=e,a):t},a.size=function(e){return arguments.length?(r=null==(n=e)?s:null,a):r?null:n},a.nodeSize=function(e){return arguments.length?(r=null==(n=e)?null:s,a):r?n:null},ir(a,e)},i.layout.cluster=function(){var e=i.layout.hierarchy().sort(null).value(null),t=Rr,n=[1,1],r=!1;function a(a,o){var l,s=e.call(this,a,o),u=s[0],c=0;lr(u,(function(e){var n=e.children;n&&n.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),e.y=function(e){return 1+i.max(e,(function(e){return e.y}))}(n)):(e.x=l?c+=t(e,l):0,e.y=0,l=e)}));var d=Br(u),f=Ur(u),h=d.x-t(d,f)/2,p=f.x+t(f,d)/2;return lr(u,r?function(e){e.x=(e.x-u.x)*n[0],e.y=(u.y-e.y)*n[1]}:function(e){e.x=(e.x-h)/(p-h)*n[0],e.y=(1-(u.y?e.y/u.y:1))*n[1]}),s}return a.separation=function(e){return arguments.length?(t=e,a):t},a.size=function(e){return arguments.length?(r=null==(n=e),a):r?null:n},a.nodeSize=function(e){return arguments.length?(r=null!=(n=e),a):r?n:null},ir(a,e)},i.layout.treemap=function(){var e,t=i.layout.hierarchy(),n=Math.round,r=[1,1],a=null,o=Hr,l=!1,s="squarify",u=.5*(1+Math.sqrt(5));function c(e,t){for(var n,r,a=-1,i=e.length;++a0;)l.push(n=u[a-1]),l.area+=n.area,"squarify"!==s||(r=h(l,v))<=f?(u.pop(),f=r):(l.area-=l.pop().area,p(l,v,i,!1),v=Math.min(i.dx,i.dy),l.length=l.area=0,f=1/0);l.length&&(p(l,v,i,!0),l.length=l.area=0),t.forEach(d)}}function f(e){var t=e.children;if(t&&t.length){var n,r=o(e),a=t.slice(),i=[];for(c(a,r.dx*r.dy/e.value),i.area=0;n=a.pop();)i.push(n),i.area+=n.area,null!=n.z&&(p(i,n.z?r.dx:r.dy,r,!a.length),i.length=i.area=0);t.forEach(f)}}function h(e,t){for(var n,r=e.area,a=0,i=1/0,o=-1,l=e.length;++oa&&(a=n));return t*=t,(r*=r)?Math.max(t*a*u/r,r/(t*i*u)):1/0}function p(e,t,r,a){var i,o=-1,l=e.length,s=r.x,u=r.y,c=t?n(e.area/t):0;if(t==r.dx){for((a||c>r.dy)&&(c=r.dy);++or.dx)&&(c=r.dx);++o1);return e+t*n*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var e=i.random.normal.apply(i,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=i.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;n2?Jr:Wr,s=r?Zn:qn;return a=o(e,t,s,n),i=o(t,e,s,Mn),l}function l(e){return a(e)}return l.invert=function(e){return i(e)},l.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},l.range=function(e){return arguments.length?(t=e,o()):t},l.rangeRound=function(e){return l.range(e).interpolate(Bn)},l.clamp=function(e){return arguments.length?(r=e,o()):r},l.interpolate=function(e){return arguments.length?(n=e,o()):n},l.ticks=function(t){return ta(e,t)},l.tickFormat=function(t,n){return d3_scale_linearTickFormat(e,t,n)},l.nice=function(t){return $r(e,t),o()},l.copy=function(){return Qr(e,t,n,r)},o()}function Kr(e,t){return i.rebind(e,t,"range","rangeRound","interpolate","clamp")}function $r(e,t){return qr(e,Zr(ea(e,t)[2])),qr(e,Zr(ea(e,t)[2])),e}function ea(e,t){null==t&&(t=10);var n=Vr(e),r=n[1]-n[0],a=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*a;return i<=.15?a*=10:i<=.35?a*=5:i<=.75&&(a*=2),n[0]=Math.ceil(n[0]/a)*a,n[1]=Math.floor(n[1]/a)*a+.5*a,n[2]=a,n}function ta(e,t){return i.range.apply(i,ea(e,t))}function na(e,t,n,r){function a(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function i(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function o(t){return e(a(t))}return o.invert=function(t){return i(e.invert(t))},o.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(a)),o):r},o.base=function(n){return arguments.length?(t=+n,e.domain(r.map(a)),o):t},o.nice=function(){var t=qr(r.map(a),n?Math:ra);return e.domain(t),r=t.map(i),o},o.ticks=function(){var e=Vr(r),o=[],l=e[0],s=e[1],u=Math.floor(a(l)),c=Math.ceil(a(s)),d=t%1?2:t;if(isFinite(c-u)){if(n){for(;u0;f--)o.push(i(u)*f);for(u=0;o[u]s;c--);o=o.slice(u,c)}return o},o.copy=function(){return na(e.copy(),t,n,r)},Kr(o,e)}i.scale.linear=function(){return Qr([0,1],[0,1],Mn,!1)},i.scale.log=function(){return na(i.scale.linear().domain([0,1]),10,!0,[1,10])};var ra={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function aa(e,t,n){var r=ia(t),a=ia(1/t);function i(t){return e(r(t))}return i.invert=function(t){return a(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(r)),i):n},i.ticks=function(e){return ta(n,e)},i.tickFormat=function(e,t){return d3_scale_linearTickFormat(n,e,t)},i.nice=function(e){return i.domain($r(n,e))},i.exponent=function(o){return arguments.length?(r=ia(t=o),a=ia(1/t),e.domain(n.map(r)),i):t},i.copy=function(){return aa(e.copy(),t,n)},Kr(i,e)}function ia(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function oa(e,t){var n,r,a;function o(a){return r[((n.get(a)||("range"===t.t?n.set(a,e.push(a)):NaN))-1)%r.length]}function l(t,n){return i.range(e.length).map((function(e){return t+n*e}))}return o.domain=function(r){if(!arguments.length)return e;e=[],n=new T;for(var a,i=-1,l=r.length;++i0?n[r-1]:e[0],rd?0:1;if(u=Oe)return s(u,h)+(l?s(l,1-h):"")+"Z";var p,v,m,g,y,x,b,_,A,w,T,k,M=0,S=0,C=[];if((g=(+o.apply(this,arguments)||0)/2)&&(m=r===ma?Math.sqrt(l*l+u*u):+r.apply(this,arguments),h||(S*=-1),u&&(S=je(m/u*Math.sin(g))),l&&(M=je(m/l*Math.sin(g)))),u){y=u*Math.cos(c+S),x=u*Math.sin(c+S),b=u*Math.cos(d-S),_=u*Math.sin(d-S);var L=Math.abs(d-c-2*S)<=Ee?0:1;if(S&&Aa(y,x,b,_)===h^L){var E=(c+d)/2;y=u*Math.cos(E),x=u*Math.sin(E),b=_=null}}else y=x=0;if(l){A=l*Math.cos(d-M),w=l*Math.sin(d-M),T=l*Math.cos(c+M),k=l*Math.sin(c+M);var D=Math.abs(c-d+2*M)<=Ee?0:1;if(M&&Aa(A,w,T,k)===1-h^D){var O=(c+d)/2;A=l*Math.cos(O),w=l*Math.sin(O),T=k=null}}else A=w=0;if(f>Ce&&(p=Math.min(Math.abs(u-l)/2,+n.apply(this,arguments)))>.001){v=l0?0:1}function wa(e,t,n,r,a){var i=e[0]-t[0],o=e[1]-t[1],l=(a?r:-r)/Math.sqrt(i*i+o*o),s=l*o,u=-l*i,c=e[0]+s,d=e[1]+u,f=t[0]+s,h=t[1]+u,p=(c+f)/2,v=(d+h)/2,m=f-c,g=h-d,y=m*m+g*g,x=n-r,b=c*h-f*d,_=(g<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),A=(b*g-m*_)/y,w=(-b*m-g*_)/y,T=(b*g+m*_)/y,k=(-b*m+g*_)/y,M=A-p,S=w-v,C=T-p,L=k-v;return M*M+S*S>C*C+L*L&&(A=T,w=k),[[A-s,w-u],[A*n/x,w*n/x]]}function Ta(){return!0}function ka(e){var t=Lt,n=Et,r=Ta,a=Sa,i=a.key,o=.7;function l(i){var l,s=[],u=[],c=-1,d=i.length,f=gt(t),h=gt(n);function p(){s.push("M",a(e(u),o))}for(;++c1&&a.push("H",r[0]),a.join("")},"step-before":La,"step-after":Ea,basis:Pa,"basis-open":function(e){if(e.length<4)return Sa(e);for(var t,n=[],r=-1,a=e.length,i=[0],o=[0];++r<3;)t=e[r],i.push(t[0]),o.push(t[1]);for(n.push(Na(Ia,i)+","+Na(Ia,o)),--r;++r9&&(a=3*t/Math.sqrt(a),o[l]=a*n,o[l+1]=a*r);for(l=-1;++l<=s;)a=(e[Math.min(s,l+1)][0]-e[Math.max(0,l-1)][0])/(6*(1+o[l]*o[l])),i.push([a||0,o[l]*a||0]);return i}(e))}});function Sa(e){return e.length>1?e.join("L"):e+"Z"}function Ca(e){return e.join("L")+"Z"}function La(e){for(var t=0,n=e.length,r=e[0],a=[r[0],",",r[1]];++t1){l=t[1],i=e[s],s++,r+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-l[0])+","+(i[1]-l[1])+","+i[0]+","+i[1];for(var u=2;uEe)+",1 "+t}function s(e,t,n,r){return"Q 0,0 "+r}return i.radius=function(e){return arguments.length?(n=gt(e),i):n},i.source=function(t){return arguments.length?(e=gt(t),i):e},i.target=function(e){return arguments.length?(t=gt(e),i):t},i.startAngle=function(e){return arguments.length?(r=gt(e),i):r},i.endAngle=function(e){return arguments.length?(a=gt(e),i):a},i},i.svg.diagonal=function(){var e=Ha,t=Ya,n=Ga;function r(r,a){var i=e.call(this,r,a),o=t.call(this,r,a),l=(i.y+o.y)/2,s=[i,{x:i.x,y:l},{x:o.x,y:l},o];return"M"+(s=s.map(n))[0]+"C"+s[1]+" "+s[2]+" "+s[3]}return r.source=function(t){return arguments.length?(e=gt(t),r):e},r.target=function(e){return arguments.length?(t=gt(e),r):t},r.projection=function(e){return arguments.length?(n=e,r):n},r},i.svg.diagonal.radial=function(){var e=i.svg.diagonal(),t=Ga,n=e.projection;return e.projection=function(e){return arguments.length?n(function(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Pe;return[n*Math.cos(r),n*Math.sin(r)]}}(t=e)):t},e},i.svg.symbol=function(){var e=qa,t=Wa;function n(n,r){return(Xa.get(e.call(this,n,r))||Za)(t.call(this,n,r))}return n.type=function(t){return arguments.length?(e=gt(t),n):e},n.size=function(e){return arguments.length?(t=gt(e),n):t},n};var Xa=i.map({circle:Za,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Qa)),n=t*Qa;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Ja),n=t*Ja/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ja),n=t*Ja/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});i.svg.symbolTypes=Xa.keys();var Ja=Math.sqrt(3),Qa=Math.tan(30*Ne);Q.transition=function(e){for(var t,n,r=ti||++ai,a=li(e),i=[],o=ni||{time:Date.now(),ease:Rn,delay:0,duration:250},l=-1,s=this.length;++l0;)u[--f].call(e,o);if(i>=1)return d.event&&d.event.end.call(e,e.__data__,t),--c.count?delete c[r]:delete e[n],1}d||(i=a.time,o=kt((function(e){var t=d.delay;if(o.t=t+i,t<=e)return f(e-t);o.c=f}),0,i),d=c[r]={tween:new T,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:t},a=null,++c.count)}ri.call=Q.call,ri.empty=Q.empty,ri.node=Q.node,ri.size=Q.size,i.transition=function(e,t){return e&&e.transition?ti?e.transition(t):e:i.selection().transition(e)},i.transition.prototype=ri,ri.select=function(e){var t,n,r,a=this.id,i=this.namespace,o=[];e=K(e);for(var l=-1,s=this.length;++lrect,.s>rect").attr("width",o[1]-o[0])}function v(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function m(){var d,m,g=this,y=i.select(i.event.target),x=n.of(g,arguments),b=i.select(g),_=y.datum(),A=!/^(n|s)$/.test(_)&&r,w=!/^(e|w)$/.test(_)&&a,T=y.classed("extent"),k=Te(g),M=i.mouse(g),S=i.select(c(g)).on("keydown.brush",(function(){32==i.event.keyCode&&(T||(d=null,M[0]-=o[1],M[1]-=l[1],T=2),H())})).on("keyup.brush",(function(){32==i.event.keyCode&&2==T&&(M[0]+=o[1],M[1]+=l[1],T=0,H())}));if(i.event.changedTouches?S.on("touchmove.brush",E).on("touchend.brush",O):S.on("mousemove.brush",E).on("mouseup.brush",O),b.interrupt().selectAll("*").interrupt(),T)M[0]=o[0]-M[0],M[1]=l[0]-M[1];else if(_){var C=+/w$/.test(_),L=+/^n/.test(_);m=[o[1-C]-M[0],l[1-L]-M[1]],M[0]=o[C],M[1]=l[L]}else i.event.altKey&&(d=M.slice());function E(){var e=i.mouse(g),t=!1;m&&(e[0]+=m[0],e[1]+=m[1]),T||(i.event.altKey?(d||(d=[(o[0]+o[1])/2,(l[0]+l[1])/2]),M[0]=o[+(e[0]>2],i+=r[(3&n[t])<<4|n[t+1]>>4],i+=r[(15&n[t+1])<<2|n[t+2]>>6],i+=r[63&n[t+2]];return a%3===2?i=i.substring(0,i.length-1)+"=":a%3===1&&(i=i.substring(0,i.length-2)+"=="),i},l=function(e){var t,n,r,i,o,l=.75*e.length,s=e.length,u=0;"="===e[e.length-1]&&(l--,"="===e[e.length-2]&&l--);var c=new ArrayBuffer(l),d=new Uint8Array(c);for(t=0;t>4,d[u++]=(15&r)<<4|i>>2,d[u++]=(3&i)<<6|63&o;return c}},7624:function(e,t,n){"use strict";function r(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}n.d(t,{E9:function(){return f},SO:function(){return v}});var a,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){if(!(t=i.exec(e)))throw new Error("invalid format: "+e);var t;return new l({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function l(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function s(e,t){var n=r(e,t);if(!n)return e+"";var a=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+a:a.length>i+1?a.slice(0,i+1)+"."+a.slice(i+1):a+new Array(i-a.length+2).join("0")}o.prototype=l.prototype,l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var u={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return s(100*e,t)},r:s,s:function(e,t){var n=r(e,t);if(!n)return e+"";var i=n[0],o=n[1],l=o-(a=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length;return l===s?i:l>s?i+new Array(l-s+1).join("0"):l>0?i.slice(0,l)+"."+i.slice(l):"0."+new Array(1-l).join("0")+r(e,Math.max(0,t+l-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function c(e){return e}var d,f,h=Array.prototype.map,p=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function v(e){var t,n,i=void 0===e.grouping||void 0===e.thousands?c:(t=h.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,i=[],o=0,l=t[0],s=0;a>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),i.push(e.substring(a-=l,a+l)),!((s+=l+1)>r));)l=t[o=(o+1)%t.length];return i.reverse().join(n)}),l=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",d=void 0===e.decimal?".":e.decimal+"",f=void 0===e.numerals?c:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(h.call(e.numerals,String)),v=void 0===e.percent?"%":e.percent+"",m=void 0===e.minus?"-":e.minus+"",g=void 0===e.nan?"NaN":e.nan+"";function y(e){var t=(e=o(e)).fill,n=e.align,r=e.sign,c=e.symbol,h=e.zero,y=e.width,x=e.comma,b=e.precision,_=e.trim,A=e.type;"n"===A?(x=!0,A="g"):u[A]||(void 0===b&&(b=12),_=!0,A="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var w="$"===c?l:"#"===c&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",T="$"===c?s:/[%p]/.test(A)?v:"",k=u[A],M=/[defgprs%]/.test(A);function S(e){var o,l,s,u=w,c=T;if("c"===A)c=k(e)+c,e="";else{var v=(e=+e)<0||1/e<0;if(e=isNaN(e)?g:k(Math.abs(e),b),_&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),v&&0===+e&&"+"!==r&&(v=!1),u=(v?"("===r?r:m:"-"===r||"("===r?"":r)+u,c=("s"===A?p[8+a/3]:"")+c+(v&&"("===r?")":""),M)for(o=-1,l=e.length;++o(s=e.charCodeAt(o))||s>57){c=(46===s?d+e.slice(o+1):e.slice(o))+c,e=e.slice(0,o);break}}x&&!h&&(e=i(e,1/0));var S=u.length+e.length+c.length,C=S>1)+u+e+c+C.slice(S);break;default:e=C+u+e+c}return f(e)}return b=void 0===b?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return e+""},S}return{format:y,formatPrefix:function(e,t){var n,a=y(((e=o(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor((n=t,((n=r(Math.abs(n)))?n[1]:NaN)/3)))),l=Math.pow(10,-i),s=p[8+i/3];return function(e){return a(l*e)+s}}}}d=v({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),f=d.format,d.formatPrefix},4336:function(e,t,n){"use strict";n.d(t,{Yn:function(){return p},m_:function(){return f},E9:function(){return v}});var r=n(8208),a=n(8931),i=n(6192),o=n(8936),l=n(2171),s=n(3528);function u(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function c(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function d(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function f(e){var t=e.dateTime,n=e.date,l=e.time,s=e.periods,f=e.days,h=e.shortDays,p=e.months,v=e.shortMonths,g=A(s),y=w(s),x=A(f),b=w(f),_=A(h),Se=w(h),Ce=A(p),Le=w(p),Ee=A(v),De=w(v),Oe={a:function(e){return h[e.getDay()]},A:function(e){return f[e.getDay()]},b:function(e){return v[e.getMonth()]},B:function(e){return p[e.getMonth()]},c:null,d:V,e:V,f:X,H:G,I:W,j:q,L:Z,m:J,M:Q,p:function(e){return s[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ke,s:Me,S:K,u:$,U:ee,V:te,w:ne,W:re,x:null,X:null,y:ae,Y:ie,Z:oe,"%":Te},Pe={a:function(e){return h[e.getUTCDay()]},A:function(e){return f[e.getUTCDay()]},b:function(e){return v[e.getUTCMonth()]},B:function(e){return p[e.getUTCMonth()]},c:null,d:le,e:le,f:fe,H:se,I:ue,j:ce,L:de,m:he,M:pe,p:function(e){return s[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ke,s:Me,S:ve,u:me,U:ge,V:ye,w:xe,W:be,x:null,X:null,y:_e,Y:Ae,Z:we,"%":Te},Ne={a:function(e,t,n){var r=_.exec(t.slice(n));return r?(e.w=Se[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=x.exec(t.slice(n));return r?(e.w=b[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=Ee.exec(t.slice(n));return r?(e.m=De[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=Ce.exec(t.slice(n));return r?(e.m=Le[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return Ie(e,t,n,r)},d:N,e:N,f:B,H:j,I:j,j:R,L:F,m:P,M:I,p:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.p=y[r[0].toLowerCase()],n+r[0].length):-1},q:O,Q:H,s:Y,S:z,u:k,U:M,V:S,w:T,W:C,x:function(e,t,r){return Ie(e,n,t,r)},X:function(e,t,n){return Ie(e,l,t,n)},y:E,Y:L,Z:D,"%":U};function Re(e,t){return function(n){var r,a,i,o=[],l=-1,s=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++l53)return null;"w"in f||(f.w=1),"Z"in f?(s=(l=c(d(f.y,0,1))).getUTCDay(),l=s>4||0===s?r.ot.ceil(l):(0,r.ot)(l),l=a.c.offset(l,7*(f.V-1)),f.y=l.getUTCFullYear(),f.m=l.getUTCMonth(),f.d=l.getUTCDate()+(f.w+6)%7):(s=(l=u(d(f.y,0,1))).getDay(),l=s>4||0===s?i.qT.ceil(l):(0,i.qT)(l),l=o.c.offset(l,7*(f.V-1)),f.y=l.getFullYear(),f.m=l.getMonth(),f.d=l.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),s="Z"in f?c(d(f.y,0,1)).getUTCDay():u(d(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+7*f.W-(s+5)%7:f.w+7*f.U-(s+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,c(f)):u(f)}}function Ie(e,t,n,r){for(var a,i,o=0,l=t.length,s=n.length;o=s)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=Ne[a in m?t.charAt(o++):a])||(r=i(e,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}return Oe.x=Re(n,Oe),Oe.X=Re(l,Oe),Oe.c=Re(t,Oe),Pe.x=Re(n,Pe),Pe.X=Re(l,Pe),Pe.c=Re(t,Pe),{format:function(e){var t=Re(e+="",Oe);return t.toString=function(){return e},t},parse:function(e){var t=je(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Re(e+="",Pe);return t.toString=function(){return e},t},utcParse:function(e){var t=je(e+="",!0);return t.toString=function(){return e},t}}}var h,p,v,m={"-":"",_:" ",0:"0"},g=/^\s*\d+/,y=/^%/,x=/[\\^$*+?|[\]().{}]/g;function b(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i68?1900:2e3),n+r[0].length):-1}function D(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function O(e,t,n){var r=g.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function P(e,t,n){var r=g.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function N(e,t,n){var r=g.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function R(e,t,n){var r=g.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function j(e,t,n){var r=g.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function I(e,t,n){var r=g.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function z(e,t,n){var r=g.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function F(e,t,n){var r=g.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function B(e,t,n){var r=g.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function U(e,t,n){var r=y.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function H(e,t,n){var r=g.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Y(e,t,n){var r=g.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function V(e,t){return b(e.getDate(),t,2)}function G(e,t){return b(e.getHours(),t,2)}function W(e,t){return b(e.getHours()%12||12,t,2)}function q(e,t){return b(1+o.c.count((0,l.c)(e),e),t,3)}function Z(e,t){return b(e.getMilliseconds(),t,3)}function X(e,t){return Z(e,t)+"000"}function J(e,t){return b(e.getMonth()+1,t,2)}function Q(e,t){return b(e.getMinutes(),t,2)}function K(e,t){return b(e.getSeconds(),t,2)}function $(e){var t=e.getDay();return 0===t?7:t}function ee(e,t){return b(i.uU.count((0,l.c)(e)-1,e),t,2)}function te(e,t){var n=e.getDay();return e=n>=4||0===n?(0,i.kD)(e):i.kD.ceil(e),b(i.kD.count((0,l.c)(e),e)+(4===(0,l.c)(e).getDay()),t,2)}function ne(e){return e.getDay()}function re(e,t){return b(i.qT.count((0,l.c)(e)-1,e),t,2)}function ae(e,t){return b(e.getFullYear()%100,t,2)}function ie(e,t){return b(e.getFullYear()%1e4,t,4)}function oe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+b(t/60|0,"0",2)+b(t%60,"0",2)}function le(e,t){return b(e.getUTCDate(),t,2)}function se(e,t){return b(e.getUTCHours(),t,2)}function ue(e,t){return b(e.getUTCHours()%12||12,t,2)}function ce(e,t){return b(1+a.c.count((0,s.c)(e),e),t,3)}function de(e,t){return b(e.getUTCMilliseconds(),t,3)}function fe(e,t){return de(e,t)+"000"}function he(e,t){return b(e.getUTCMonth()+1,t,2)}function pe(e,t){return b(e.getUTCMinutes(),t,2)}function ve(e,t){return b(e.getUTCSeconds(),t,2)}function me(e){var t=e.getUTCDay();return 0===t?7:t}function ge(e,t){return b(r.EV.count((0,s.c)(e)-1,e),t,2)}function ye(e,t){var n=e.getUTCDay();return e=n>=4||0===n?(0,r.yA)(e):r.yA.ceil(e),b(r.yA.count((0,s.c)(e),e)+(4===(0,s.c)(e).getUTCDay()),t,2)}function xe(e){return e.getUTCDay()}function be(e,t){return b(r.ot.count((0,s.c)(e)-1,e),t,2)}function _e(e,t){return b(e.getUTCFullYear()%100,t,2)}function Ae(e,t){return b(e.getUTCFullYear()%1e4,t,4)}function we(){return"+0000"}function Te(){return"%"}function ke(e){return+e}function Me(e){return Math.floor(+e/1e3)}h=f({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],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"]}),p=h.format,h.parse,v=h.utcFormat,h.utcParse},8936:function(e,t,n){"use strict";n.d(t,{m:function(){return o}});var r=n(1628),a=n(9792),i=(0,r.c)((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*a.iy)/a.SK}),(function(e){return e.getDate()-1}));t.c=i;var o=i.range},9792:function(e,t,n){"use strict";n.d(t,{KK:function(){return l},SK:function(){return o},cg:function(){return i},iy:function(){return a},yc:function(){return r}});var r=1e3,a=6e4,i=36e5,o=864e5,l=6048e5},3220:function(e,t,n){"use strict";n.r(t),n.d(t,{timeDay:function(){return g.c},timeDays:function(){return g.m},timeFriday:function(){return y.iB},timeFridays:function(){return y.sJ},timeHour:function(){return v},timeHours:function(){return m},timeInterval:function(){return r.c},timeMillisecond:function(){return i},timeMilliseconds:function(){return o},timeMinute:function(){return f},timeMinutes:function(){return h},timeMonday:function(){return y.qT},timeMondays:function(){return y.QP},timeMonth:function(){return b},timeMonths:function(){return _},timeSaturday:function(){return y.Wc},timeSaturdays:function(){return y.aI},timeSecond:function(){return u},timeSeconds:function(){return c},timeSunday:function(){return y.uU},timeSundays:function(){return y.Ab},timeThursday:function(){return y.kD},timeThursdays:function(){return y.eC},timeTuesday:function(){return y.Mf},timeTuesdays:function(){return y.Oc},timeWednesday:function(){return y.eg},timeWednesdays:function(){return y.sn},timeWeek:function(){return y.uU},timeWeeks:function(){return y.Ab},timeYear:function(){return A.c},timeYears:function(){return A.Q},utcDay:function(){return L.c},utcDays:function(){return L.o},utcFriday:function(){return E.od},utcFridays:function(){return E.iG},utcHour:function(){return S},utcHours:function(){return C},utcMillisecond:function(){return i},utcMilliseconds:function(){return o},utcMinute:function(){return T},utcMinutes:function(){return k},utcMonday:function(){return E.ot},utcMondays:function(){return E.iO},utcMonth:function(){return O},utcMonths:function(){return P},utcSaturday:function(){return E.Ad},utcSaturdays:function(){return E.K8},utcSecond:function(){return u},utcSeconds:function(){return c},utcSunday:function(){return E.EV},utcSundays:function(){return E.Wq},utcThursday:function(){return E.yA},utcThursdays:function(){return E.ob},utcTuesday:function(){return E.sG},utcTuesdays:function(){return E.kl},utcWednesday:function(){return E._6},utcWednesdays:function(){return E.W_},utcWeek:function(){return E.EV},utcWeeks:function(){return E.Wq},utcYear:function(){return N.c},utcYears:function(){return N.i}});var r=n(1628),a=(0,r.c)((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?(0,r.c)((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):a:null};var i=a,o=a.range,l=n(9792),s=(0,r.c)((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*l.yc)}),(function(e,t){return(t-e)/l.yc}),(function(e){return e.getUTCSeconds()})),u=s,c=s.range,d=(0,r.c)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*l.yc)}),(function(e,t){e.setTime(+e+t*l.iy)}),(function(e,t){return(t-e)/l.iy}),(function(e){return e.getMinutes()})),f=d,h=d.range,p=(0,r.c)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*l.yc-e.getMinutes()*l.iy)}),(function(e,t){e.setTime(+e+t*l.cg)}),(function(e,t){return(t-e)/l.cg}),(function(e){return e.getHours()})),v=p,m=p.range,g=n(8936),y=n(6192),x=(0,r.c)((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),b=x,_=x.range,A=n(2171),w=(0,r.c)((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*l.iy)}),(function(e,t){return(t-e)/l.iy}),(function(e){return e.getUTCMinutes()})),T=w,k=w.range,M=(0,r.c)((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*l.cg)}),(function(e,t){return(t-e)/l.cg}),(function(e){return e.getUTCHours()})),S=M,C=M.range,L=n(8931),E=n(8208),D=(0,r.c)((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),O=D,P=D.range,N=n(3528)},1628:function(e,t,n){"use strict";n.d(t,{c:function(){return i}});var r=new Date,a=new Date;function i(e,t,n,o){function l(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return l.floor=function(t){return e(t=new Date(+t)),t},l.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},l.round=function(e){var t=l(e),n=l.ceil(e);return e-t0))return o;do{o.push(i=new Date(+n)),t(n,a),e(n)}while(i=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(l.count=function(t,i){return r.setTime(+t),a.setTime(+i),e(r),e(a),Math.floor(n(r,a))},l.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?l.filter(o?function(t){return o(t)%e===0}:function(t){return l.count(0,t)%e===0}):l:null}),l}},8931:function(e,t,n){"use strict";n.d(t,{o:function(){return o}});var r=n(1628),a=n(9792),i=(0,r.c)((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/a.SK}),(function(e){return e.getUTCDate()-1}));t.c=i;var o=i.range},8208:function(e,t,n){"use strict";n.d(t,{Ad:function(){return f},EV:function(){return o},K8:function(){return x},W_:function(){return m},Wq:function(){return h},_6:function(){return u},iG:function(){return y},iO:function(){return p},kl:function(){return v},ob:function(){return g},od:function(){return d},ot:function(){return l},sG:function(){return s},yA:function(){return c}});var r=n(1628),a=n(9792);function i(e){return(0,r.c)((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/a.KK}))}var o=i(0),l=i(1),s=i(2),u=i(3),c=i(4),d=i(5),f=i(6),h=o.range,p=l.range,v=s.range,m=u.range,g=c.range,y=d.range,x=f.range},3528:function(e,t,n){"use strict";n.d(t,{i:function(){return i}});var r=n(1628),a=(0,r.c)((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));a.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,r.c)((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},t.c=a;var i=a.range},6192:function(e,t,n){"use strict";n.d(t,{Ab:function(){return h},Mf:function(){return s},Oc:function(){return v},QP:function(){return p},Wc:function(){return f},aI:function(){return x},eC:function(){return g},eg:function(){return u},iB:function(){return d},kD:function(){return c},qT:function(){return l},sJ:function(){return y},sn:function(){return m},uU:function(){return o}});var r=n(1628),a=n(9792);function i(e){return(0,r.c)((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*a.iy)/a.KK}))}var o=i(0),l=i(1),s=i(2),u=i(3),c=i(4),d=i(5),f=i(6),h=o.range,p=l.range,v=s.range,m=u.range,g=c.range,y=d.range,x=f.range},2171:function(e,t,n){"use strict";n.d(t,{Q:function(){return i}});var r=n(1628),a=(0,r.c)((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));a.every=function(e){return isFinite(e=Math.floor(e))&&e>0?(0,r.c)((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},t.c=a;var i=a.range},1252:function(e){"use strict";var t,n="object"===typeof Reflect?Reflect:null,r=n&&"function"===typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"===typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!==e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,i),r(n)}function i(){"function"===typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&v(e,"error",t,n)}(e,a,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function l(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var a,i,o,u;if(l(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),o=i[t]),void 0===o)o=i[t]=n,++e._eventsCount;else if("function"===typeof o?o=i[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(a=s(e))>0&&o.length>a&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=c.bind(r);return a.listener=n,r.wrapFn=a,a}function f(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"===typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=i[e];if(void 0===s)return!1;if("function"===typeof s)r(s,this,t);else{var u=s.length,c=p(s,u);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){o=n[i].listener,a=i;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},8248:function(e,t,n){"use strict";var r=n(4576);e.exports=function(e){var t=typeof e;if("string"===t){var n=e;if(0===(e=+e)&&r(n))return!1}else if("number"!==t)return!1;return e-e<1}},2408:function(e){e.exports=function(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],u=t[7],c=t[8],d=t[9],f=t[10],h=t[11],p=t[12],v=t[13],m=t[14],g=t[15];return e[0]=l*(f*g-h*m)-d*(s*g-u*m)+v*(s*h-u*f),e[1]=-(r*(f*g-h*m)-d*(a*g-i*m)+v*(a*h-i*f)),e[2]=r*(s*g-u*m)-l*(a*g-i*m)+v*(a*u-i*s),e[3]=-(r*(s*h-u*f)-l*(a*h-i*f)+d*(a*u-i*s)),e[4]=-(o*(f*g-h*m)-c*(s*g-u*m)+p*(s*h-u*f)),e[5]=n*(f*g-h*m)-c*(a*g-i*m)+p*(a*h-i*f),e[6]=-(n*(s*g-u*m)-o*(a*g-i*m)+p*(a*u-i*s)),e[7]=n*(s*h-u*f)-o*(a*h-i*f)+c*(a*u-i*s),e[8]=o*(d*g-h*v)-c*(l*g-u*v)+p*(l*h-u*d),e[9]=-(n*(d*g-h*v)-c*(r*g-i*v)+p*(r*h-i*d)),e[10]=n*(l*g-u*v)-o*(r*g-i*v)+p*(r*u-i*l),e[11]=-(n*(l*h-u*d)-o*(r*h-i*d)+c*(r*u-i*l)),e[12]=-(o*(d*m-f*v)-c*(l*m-s*v)+p*(l*f-s*d)),e[13]=n*(d*m-f*v)-c*(r*m-a*v)+p*(r*f-a*d),e[14]=-(n*(l*m-s*v)-o*(r*m-a*v)+p*(r*s-a*l)),e[15]=n*(l*f-s*d)-o*(r*f-a*d)+c*(r*s-a*l),e}},6860:function(e){e.exports=function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},4492:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},4212:function(e){e.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},800:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],a=e[3],i=e[4],o=e[5],l=e[6],s=e[7],u=e[8],c=e[9],d=e[10],f=e[11],h=e[12],p=e[13],v=e[14],m=e[15];return(t*o-n*i)*(d*m-f*v)-(t*l-r*i)*(c*m-f*p)+(t*s-a*i)*(c*v-d*p)+(n*l-r*o)*(u*m-f*h)-(n*s-a*o)*(u*v-d*h)+(r*s-a*l)*(u*p-c*h)}},1784:function(e){e.exports=function(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=n+n,l=r+r,s=a+a,u=n*o,c=r*o,d=r*l,f=a*o,h=a*l,p=a*s,v=i*o,m=i*l,g=i*s;return e[0]=1-d-p,e[1]=c+g,e[2]=f-m,e[3]=0,e[4]=c-g,e[5]=1-u-p,e[6]=h+v,e[7]=0,e[8]=f+m,e[9]=h-v,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},1616:function(e){e.exports=function(e,t,n){var r,a,i,o=n[0],l=n[1],s=n[2],u=Math.sqrt(o*o+l*l+s*s);return Math.abs(u)<1e-6?null:(o*=u=1/u,l*=u,s*=u,r=Math.sin(t),a=Math.cos(t),i=1-a,e[0]=o*o*i+a,e[1]=l*o*i+s*r,e[2]=s*o*i-l*r,e[3]=0,e[4]=o*l*i-s*r,e[5]=l*l*i+a,e[6]=s*l*i+o*r,e[7]=0,e[8]=o*s*i+l*r,e[9]=l*s*i-o*r,e[10]=s*s*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}},1944:function(e){e.exports=function(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],l=r+r,s=a+a,u=i+i,c=r*l,d=r*s,f=r*u,h=a*s,p=a*u,v=i*u,m=o*l,g=o*s,y=o*u;return e[0]=1-(h+v),e[1]=d+y,e[2]=f-g,e[3]=0,e[4]=d-y,e[5]=1-(c+v),e[6]=p+m,e[7]=0,e[8]=f+g,e[9]=p-m,e[10]=1-(c+h),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}},9444:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8268:function(e){e.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},1856:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=n,e[7]=0,e[8]=0,e[9]=-n,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},9216:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=0,e[2]=-n,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=n,e[9]=0,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},7736:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=0,e[4]=-n,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8848:function(e){e.exports=function(e,t,n,r,a,i,o){var l=1/(n-t),s=1/(a-r),u=1/(i-o);return e[0]=2*i*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*i*s,e[6]=0,e[7]=0,e[8]=(n+t)*l,e[9]=(a+r)*s,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}},6635:function(e){e.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},6524:function(e,t,n){e.exports={create:n(4212),clone:n(6860),copy:n(4492),identity:n(6635),transpose:n(6520),invert:n(4308),adjoint:n(2408),determinant:n(800),multiply:n(944),translate:n(5176),scale:n(8152),rotate:n(16),rotateX:n(5456),rotateY:n(4840),rotateZ:n(4192),fromRotation:n(1616),fromRotationTranslation:n(1944),fromScaling:n(9444),fromTranslation:n(8268),fromXRotation:n(1856),fromYRotation:n(9216),fromZRotation:n(7736),fromQuat:n(1784),frustum:n(8848),perspective:n(1296),perspectiveFromFieldOfView:n(3688),ortho:n(7688),lookAt:n(6508),str:n(9412)}},4308:function(e){e.exports=function(e,t){var n=t[0],r=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],u=t[7],c=t[8],d=t[9],f=t[10],h=t[11],p=t[12],v=t[13],m=t[14],g=t[15],y=n*l-r*o,x=n*s-a*o,b=n*u-i*o,_=r*s-a*l,A=r*u-i*l,w=a*u-i*s,T=c*v-d*p,k=c*m-f*p,M=c*g-h*p,S=d*m-f*v,C=d*g-h*v,L=f*g-h*m,E=y*L-x*C+b*S+_*M-A*k+w*T;return E?(E=1/E,e[0]=(l*L-s*C+u*S)*E,e[1]=(a*C-r*L-i*S)*E,e[2]=(v*w-m*A+g*_)*E,e[3]=(f*A-d*w-h*_)*E,e[4]=(s*M-o*L-u*k)*E,e[5]=(n*L-a*M+i*k)*E,e[6]=(m*b-p*w-g*x)*E,e[7]=(c*w-f*b+h*x)*E,e[8]=(o*C-l*M+u*T)*E,e[9]=(r*M-n*C-i*T)*E,e[10]=(p*A-v*b+g*y)*E,e[11]=(d*b-c*A-h*y)*E,e[12]=(l*k-o*S-s*T)*E,e[13]=(n*S-r*k+a*T)*E,e[14]=(v*x-p*_-m*y)*E,e[15]=(c*_-d*x+f*y)*E,e):null}},6508:function(e,t,n){var r=n(6635);e.exports=function(e,t,n,a){var i,o,l,s,u,c,d,f,h,p,v=t[0],m=t[1],g=t[2],y=a[0],x=a[1],b=a[2],_=n[0],A=n[1],w=n[2];return Math.abs(v-_)<1e-6&&Math.abs(m-A)<1e-6&&Math.abs(g-w)<1e-6?r(e):(d=v-_,f=m-A,h=g-w,p=1/Math.sqrt(d*d+f*f+h*h),i=x*(h*=p)-b*(f*=p),o=b*(d*=p)-y*h,l=y*f-x*d,(p=Math.sqrt(i*i+o*o+l*l))?(i*=p=1/p,o*=p,l*=p):(i=0,o=0,l=0),s=f*l-h*o,u=h*i-d*l,c=d*o-f*i,(p=Math.sqrt(s*s+u*u+c*c))?(s*=p=1/p,u*=p,c*=p):(s=0,u=0,c=0),e[0]=i,e[1]=s,e[2]=d,e[3]=0,e[4]=o,e[5]=u,e[6]=f,e[7]=0,e[8]=l,e[9]=c,e[10]=h,e[11]=0,e[12]=-(i*v+o*m+l*g),e[13]=-(s*v+u*m+c*g),e[14]=-(d*v+f*m+h*g),e[15]=1,e)}},944:function(e){e.exports=function(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],u=t[6],c=t[7],d=t[8],f=t[9],h=t[10],p=t[11],v=t[12],m=t[13],g=t[14],y=t[15],x=n[0],b=n[1],_=n[2],A=n[3];return e[0]=x*r+b*l+_*d+A*v,e[1]=x*a+b*s+_*f+A*m,e[2]=x*i+b*u+_*h+A*g,e[3]=x*o+b*c+_*p+A*y,x=n[4],b=n[5],_=n[6],A=n[7],e[4]=x*r+b*l+_*d+A*v,e[5]=x*a+b*s+_*f+A*m,e[6]=x*i+b*u+_*h+A*g,e[7]=x*o+b*c+_*p+A*y,x=n[8],b=n[9],_=n[10],A=n[11],e[8]=x*r+b*l+_*d+A*v,e[9]=x*a+b*s+_*f+A*m,e[10]=x*i+b*u+_*h+A*g,e[11]=x*o+b*c+_*p+A*y,x=n[12],b=n[13],_=n[14],A=n[15],e[12]=x*r+b*l+_*d+A*v,e[13]=x*a+b*s+_*f+A*m,e[14]=x*i+b*u+_*h+A*g,e[15]=x*o+b*c+_*p+A*y,e}},7688:function(e){e.exports=function(e,t,n,r,a,i,o){var l=1/(t-n),s=1/(r-a),u=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+n)*l,e[13]=(a+r)*s,e[14]=(o+i)*u,e[15]=1,e}},1296:function(e){e.exports=function(e,t,n,r,a){var i=1/Math.tan(t/2),o=1/(r-a);return e[0]=i/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+r)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*r*o,e[15]=0,e}},3688:function(e){e.exports=function(e,t,n,r){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(o+l),u=2/(a+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(o-l)*s*.5,e[9]=(a-i)*u*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e}},16:function(e){e.exports=function(e,t,n,r){var a,i,o,l,s,u,c,d,f,h,p,v,m,g,y,x,b,_,A,w,T,k,M,S,C=r[0],L=r[1],E=r[2],D=Math.sqrt(C*C+L*L+E*E);return Math.abs(D)<1e-6?null:(C*=D=1/D,L*=D,E*=D,a=Math.sin(n),i=Math.cos(n),o=1-i,l=t[0],s=t[1],u=t[2],c=t[3],d=t[4],f=t[5],h=t[6],p=t[7],v=t[8],m=t[9],g=t[10],y=t[11],x=C*C*o+i,b=L*C*o+E*a,_=E*C*o-L*a,A=C*L*o-E*a,w=L*L*o+i,T=E*L*o+C*a,k=C*E*o+L*a,M=L*E*o-C*a,S=E*E*o+i,e[0]=l*x+d*b+v*_,e[1]=s*x+f*b+m*_,e[2]=u*x+h*b+g*_,e[3]=c*x+p*b+y*_,e[4]=l*A+d*w+v*T,e[5]=s*A+f*w+m*T,e[6]=u*A+h*w+g*T,e[7]=c*A+p*w+y*T,e[8]=l*k+d*M+v*S,e[9]=s*k+f*M+m*S,e[10]=u*k+h*M+g*S,e[11]=c*k+p*M+y*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}},5456:function(e){e.exports=function(e,t,n){var r=Math.sin(n),a=Math.cos(n),i=t[4],o=t[5],l=t[6],s=t[7],u=t[8],c=t[9],d=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+u*r,e[5]=o*a+c*r,e[6]=l*a+d*r,e[7]=s*a+f*r,e[8]=u*a-i*r,e[9]=c*a-o*r,e[10]=d*a-l*r,e[11]=f*a-s*r,e}},4840:function(e){e.exports=function(e,t,n){var r=Math.sin(n),a=Math.cos(n),i=t[0],o=t[1],l=t[2],s=t[3],u=t[8],c=t[9],d=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-u*r,e[1]=o*a-c*r,e[2]=l*a-d*r,e[3]=s*a-f*r,e[8]=i*r+u*a,e[9]=o*r+c*a,e[10]=l*r+d*a,e[11]=s*r+f*a,e}},4192:function(e){e.exports=function(e,t,n){var r=Math.sin(n),a=Math.cos(n),i=t[0],o=t[1],l=t[2],s=t[3],u=t[4],c=t[5],d=t[6],f=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a+u*r,e[1]=o*a+c*r,e[2]=l*a+d*r,e[3]=s*a+f*r,e[4]=u*a-i*r,e[5]=c*a-o*r,e[6]=d*a-l*r,e[7]=f*a-s*r,e}},8152:function(e){e.exports=function(e,t,n){var r=n[0],a=n[1],i=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},9412:function(e){e.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},5176:function(e){e.exports=function(e,t,n){var r,a,i,o,l,s,u,c,d,f,h,p,v=n[0],m=n[1],g=n[2];return t===e?(e[12]=t[0]*v+t[4]*m+t[8]*g+t[12],e[13]=t[1]*v+t[5]*m+t[9]*g+t[13],e[14]=t[2]*v+t[6]*m+t[10]*g+t[14],e[15]=t[3]*v+t[7]*m+t[11]*g+t[15]):(r=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],u=t[6],c=t[7],d=t[8],f=t[9],h=t[10],p=t[11],e[0]=r,e[1]=a,e[2]=i,e[3]=o,e[4]=l,e[5]=s,e[6]=u,e[7]=c,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=r*v+l*m+d*g+t[12],e[13]=a*v+s*m+f*g+t[13],e[14]=i*v+u*m+h*g+t[14],e[15]=o*v+c*m+p*g+t[15]),e}},6520:function(e){e.exports=function(e,t){if(e===t){var n=t[1],r=t[2],a=t[3],i=t[6],o=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},2264:function(e,t,n){"use strict";var r,a=n(1820);r="function"===typeof n.g.matchMedia?!n.g.matchMedia("(hover: none)").matches:a,e.exports=r},9184:function(e,t,n){"use strict";var r=n(1820);e.exports=r&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(n){e=!1}return e}()},1820:function(e){e.exports=!0},4576:function(e){"use strict";e.exports=function(e){for(var t,n=e.length,r=0;r13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},9128:function(e){var t={left:0,top:0};e.exports=function(e,n,r){n=n||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var a,i=e.clientX||0,o=e.clientY||0,l=(a=n)===window||a===document||a===document.body?t:a.getBoundingClientRect();return r[0]=i-l.left,r[1]=o-l.top,r}},8324:function(e,t,n){var r,a,i,o;a="Promise",i="undefined"!=typeof n.g?n.g:this,o=function(){"use strict";var e,t,n,r=Object.prototype.toString,a="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(m){e=function(e,t,n){return e[t]=n,e}}function i(e,r){n.add(e,r),t||(t=a(n.drain))}function o(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function l(){for(var e=0;e0&&i(l,n))}catch(m){c.call(new f(n),m)}}}function c(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&i(l,t))}function d(e,t,n,r){for(var a=0;a2&&(a.push([n].concat(i.splice(0,2))),o="l",n="m"==n?"l":"L");;){if(i.length==t[o])return i.unshift(n),a.push(i);if(i.lengthi!==h>i&&a<(f-c)*(i-d)/(h-d)+c&&(o=!o)}return o}},4756:function(e,t,n){var r,a=n(2928),i=n(8648),o=n(9819),l=n(1403),s=n(2368),u=n(7792),c=!1,d=i();function f(e,t,n){var a=r.segments(e),i=r.segments(t),o=n(r.combine(a,i));return r.polygon(o)}r={buildLog:function(e){return!0===e?c=a():!1===e&&(c=!1),!1!==c&&c.list},epsilon:function(e){return d.epsilon(e)},segments:function(e){var t=o(!0,d,c);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:o(!1,d,c).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:s.union(e.combined,c),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:s.intersect(e.combined,c),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:s.difference(e.combined,c),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:s.differenceRev(e.combined,c),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:s.xor(e.combined,c),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:l(e.segments,d,c),inverted:e.inverted}},polygonFromGeoJSON:function(e){return u.toPolygon(r,e)},polygonToGeoJSON:function(e){return u.fromPolygon(r,d,e)},union:function(e,t){return f(e,t,r.selectUnion)},intersect:function(e,t){return f(e,t,r.selectIntersect)},difference:function(e,t){return f(e,t,r.selectDifference)},differenceRev:function(e,t){return f(e,t,r.selectDifferenceRev)},xor:function(e,t){return f(e,t,r.selectXor)}},"object"===typeof window&&(window.PolyBool=r),e.exports=r},2928:function(e){e.exports=function(){var e,t=0,n=!1;function r(t,n){return e.list.push({type:t,data:n?JSON.parse(JSON.stringify(n)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return r("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return r("div_seg",{seg:e,pt:t}),r("chop",{seg:e,pt:t})},statusRemove:function(e){return r("pop_seg",{seg:e})},segmentUpdate:function(e){return r("seg_update",{seg:e})},segmentNew:function(e,t){return r("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return r("rem_seg",{seg:e})},tempStatus:function(e,t,n){return r("temp_status",{seg:e,above:t,below:n})},rewind:function(e){return r("rewind",{seg:e})},status:function(e,t,n){return r("status",{seg:e,above:t,below:n})},vert:function(t){return t===n?e:(n=t,r("vert",{x:t}))},log:function(e){return"string"!==typeof e&&(e=JSON.stringify(e,!1," ")),r("log",{txt:e})},reset:function(){return r("reset")},selected:function(e){return r("selected",{segs:e})},chainStart:function(e){return r("chain_start",{seg:e})},chainRemoveHead:function(e,t){return r("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return r("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return r("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return r("chain_match",{index:e})},chainClose:function(e){return r("chain_close",{index:e})},chainAddHead:function(e,t){return r("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return r("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return r("chain_con",{index1:e,index2:t})},chainReverse:function(e){return r("chain_rev",{index:e})},chainJoin:function(e,t){return r("chain_join",{index1:e,index2:t})},done:function(){return r("done")}}}},8648:function(e){e.exports=function(e){"number"!==typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"===typeof t&&(e=t),e},pointAboveOrOnLine:function(t,n,r){var a=n[0],i=n[1],o=r[0],l=r[1],s=t[0];return(o-a)*(t[1]-i)-(l-i)*(s-a)>=-e},pointBetween:function(t,n,r){var a=t[1]-n[1],i=r[0]-n[0],o=t[0]-n[0],l=r[1]-n[1],s=o*i+a*l;return!(s-e)},pointsSameX:function(t,n){return Math.abs(t[0]-n[0])e!=o-a>e&&(i-u)*(a-c)/(o-c)+u-r>e&&(l=!l),i=u,o=c}return l}};return t}},7792:function(e){var t={toPolygon:function(e,t){function n(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function n(t){var n=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[n]})}for(var r=n(t[0]),a=1;a0}))}function c(e,r){var a=e.seg,i=r.seg,o=a.start,l=a.end,u=i.start,c=i.end;n&&n.checkIntersection(a,i);var d=t.linesIntersect(o,l,u,c);if(!1===d){if(!t.pointsCollinear(o,l,u))return!1;if(t.pointsSame(o,c)||t.pointsSame(l,u))return!1;var f=t.pointsSame(o,u),h=t.pointsSame(l,c);if(f&&h)return r;var p=!f&&t.pointBetween(o,u,c),v=!h&&t.pointBetween(l,u,c);if(f)return v?s(r,l):s(e,c),r;p&&(h||(v?s(r,l):s(e,c)),s(r,o))}else 0===d.alongA&&(-1===d.alongB?s(e,u):0===d.alongB?s(e,d.pt):1===d.alongB&&s(e,c)),0===d.alongB&&(-1===d.alongA?s(r,o):0===d.alongA?s(r,d.pt):1===d.alongA&&s(r,l));return!1}for(var d=[];!i.isEmpty();){var f=i.getHead();if(n&&n.vert(f.pt[0]),f.isStart){n&&n.segmentNew(f.seg,f.primary);var h=u(f),p=h.before?h.before.ev:null,v=h.after?h.after.ev:null;function m(){if(p){var e=c(f,p);if(e)return e}return!!v&&c(f,v)}n&&n.tempStatus(f.seg,!!p&&p.seg,!!v&&v.seg);var g,y,x=m();if(x)e?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=f.seg.myFill,n&&n.segmentUpdate(x.seg),f.other.remove(),f.remove();if(i.getHead()!==f){n&&n.rewind(f.seg);continue}e?(y=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=v?v.seg.myFill.above:a,f.seg.myFill.above=y?!f.seg.myFill.below:f.seg.myFill.below):null===f.seg.otherFill&&(g=v?f.primary===v.primary?v.seg.otherFill.above:v.seg.myFill.above:f.primary?o:a,f.seg.otherFill={above:g,below:g}),n&&n.status(f.seg,!!p&&p.seg,!!v&&v.seg),f.other.status=h.insert(r.node({ev:f}))}else{var b=f.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(l.exists(b.prev)&&l.exists(b.next)&&c(b.prev.ev,b.next.ev),n&&n.statusRemove(b.ev.seg),b.remove(),!f.primary){var _=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=_}d.push(f.seg)}i.getHead().remove()}return n&&n.done(),d}return e?{addRegion:function(e){for(var r,a,i,o=e[e.length-1],s=0;s1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=P(e,360),t=P(t,100),n=P(n,100),0===t)r=a=i=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;r=o(s,l,e+1/3),a=o(s,l,e),i=o(s,l,e-1/3)}return{r:255*r,g:255*a,b:255*i}}(e.h,d,h),p=!0,v="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=O(s),{ok:p,format:e.format||v,r:u(255,c(l.r,0)),g:u(255,c(l.g,0)),b:u(255,c(l.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=l++}function h(e,t,n){e=P(e,255),t=P(t,255),n=P(n,255);var r,a,i=c(e,t,n),o=u(e,t,n),l=(i+o)/2;if(i==o)r=a=0;else{var s=i-o;switch(a=l>.5?s/(2-i-o):s/(i+o),i){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+a)%360,i.push(f(r));return i}function L(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,a=n.s,i=n.v,o=[],l=1/t;t--;)o.push(f({h:r,s:a,v:i})),i=(i+l)%1;return o}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:a.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=O(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return v(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,a){var i=[j(s(e).toString(16)),j(s(t).toString(16)),j(s(n).toString(16)),j(z(r))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*P(this._r,255))+"%",g:s(100*P(this._g,255))+"%",b:s(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*P(this._r,255))+"%, "+s(100*P(this._g,255))+"%, "+s(100*P(this._b,255))+"%)":"rgba("+s(100*P(this._r,255))+"%, "+s(100*P(this._g,255))+"%, "+s(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[v(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+m(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var a=f(e);n="#"+m(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(T,arguments)},monochromatic:function(){return this._applyCombination(L,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:I(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),a=f(t).toRgb(),i=n/100;return f({r:(a.r-r.r)*i+r.r,g:(a.g-r.g)*i+r.g,b:(a.b-r.b)*i+r.b,a:(a.a-r.a)*i+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(a.max(n.getLuminance(),r.getLuminance())+.05)/(a.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,a,i=f.readability(e,t);switch(a=!1,(r=function(e){var t,n;return t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA"),"small"!==n&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},f.mostReadable=function(e,t,n){var r,a,i,o,l=null,s=0;a=(n=n||{}).includeFallbackColors,i=n.level,o=n.size;for(var u=0;us&&(s=r,l=f(t[u]));return f.isReadable(e,l,{level:i,size:o})||!a?l:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var E=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(E);function O(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function P(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function N(e){return u(1,c(0,e))}function R(e){return parseInt(e,16)}function j(e){return 1==e.length?"0"+e:""+e}function I(e){return e<=1&&(e=100*e+"%"),e}function z(e){return a.round(255*parseFloat(e)).toString(16)}function F(e){return R(e)/255}var B=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function U(e){return!!B.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},7020:function(e,t,n){var r=n(8700),a=n(896),i=r.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,a(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"===typeof e){var n=e.match(s);return n?n[0]:""}var r=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(r,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(r,a)&&(i+="i"),i},monthNames:function(e){if("string"===typeof e){var t=e.match(u);return t?t[0]:""}var n=this._validateYear(e),r=e.month(),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][this.toChineseMonth(n,r)-1];return this.isIntercalaryMonth(n,r)&&(a="\u95f0"+a),a},monthNamesShort:function(e){if("string"===typeof e){var t=e.match(c);return t?t[0]:""}var n=this._validateYear(e),r=e.month(),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(n,r)-1];return this.isIntercalaryMonth(n,r)&&(a="\u95f0"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var n,r=parseInt(t);if(isNaN(r))"\u95f0"===t[0]&&(n=!0,t=t.substring(1)),"\u6708"===t[t.length-1]&&(t=t.substring(0,t.length-1)),r=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(t);else{var a=t[t.length-1];n="i"===a||"I"===a}return this.toMonthIndex(e,r,n)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),"number"!==typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,n){var a=this.intercalaryMonth(e);if(n&&t!==a||t<1||t>12)throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!n&&t<=a?t-1:t:t-1},toChineseMonth:function(e,t){e.year&&(t=(e=e.year()).month());var n=this.intercalaryMonth(e);if(t<0||t>(n?12:11))throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?t>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var n=this.intercalaryMonth(e);return!!n&&n===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(e,t,n){var a,o=this._validateYear(e,r.local.invalidyear),l=f[o-f[0]],s=l>>9&4095,u=l>>5&15,c=31&l;(a=i.newDate(s,u,c)).add(4-(a.dayOfWeek()||7),"d");var d=this.toJD(e,t,n)-a.toJD();return 1+Math.floor(d/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var n=d[e-d[0]];if(t>(n>>13?12:11))throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return n&1<<12-t?30:29},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var a=this._validate(e,l,n,r.local.invalidDate);e=this._validateYear(a.year()),t=a.month(),n=a.day();var o=this.isIntercalaryMonth(e,t),l=this.toChineseMonth(e,t),s=function(e,t,n,r,a){var i,o,l;if("object"===typeof e)o=e,i=t||{};else{var s;if(!("number"===typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"===typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"===typeof n&&n>=1&&n<=30))throw new Error("Lunar day outside range 1 - 30");"object"===typeof r?(s=!1,i=r):(s=!!r,i=a||{}),o={year:e,month:t,day:n,isIntercalary:s}}l=o.day-1;var u,c=d[o.year-d[0]],h=c>>13;u=h&&(o.month>h||o.isIntercalary)?o.month:o.month-1;for(var p=0;p>9&4095,(v>>5&15)-1,(31&v)+l);return i.year=m.getFullYear(),i.month=1+m.getMonth(),i.day=m.getDate(),i}(e,l,n,o);return i.toJD(s.year,s.month,s.day)},fromJD:function(e){var t=i.fromJD(e),n=function(e,t,n,r){var a,i;if("object"===typeof e)a=e,i=t||{};else{if(!("number"===typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"===typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"===typeof n&&n>=1&&n<=31))throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:n},i=r||{}}var o=f[a.year-f[0]],l=a.year<<9|a.month<<5|a.day;i.year=l>=o?a.year:a.year-1,o=f[i.year-f[0]];var s,u=new Date(o>>9&4095,(o>>5&15)-1,31&o),c=new Date(a.year,a.month-1,a.day);s=Math.round((c-u)/864e5);var h,p=d[i.year-d[0]];for(h=0;h<13;h++){var v=p&1<<12-h?30:29;if(s>13;return!m||h=2&&r<=6},extraInfo:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);return e=a.year()+(a.year()<0?1:0),t=a.month(),(n=a.day())+(t>1?16:0)+(t>2?32*(t-2):0)+400*(e-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var n=Math.floor(e/32)+1,r=e-32*(n-1)+1;return this.newDate(t<=0?t-1:t,n,r)}});var o={20:"Fruitbat",21:"Anchovy"};r.calendars.discworld=i},2787:function(e,t,n){var r=n(8700),a=n(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new r.baseCalendar,a(i.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4===3||e%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);return(e=a.year())<0&&e++,a.day()+30*(a.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,n=Math.floor((t-Math.floor((t+366)/1461))/365)+1;n<=0&&n--,t=Math.floor(e)+.5-this.newDate(n,1,1).toJD();var r=Math.floor(t/30)+1,a=t-30*(r-1)+1;return this.newDate(n,r,a)}}),r.calendars.ethiopian=i},2084:function(e,t,n){var r=n(8700),a=n(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}i.prototype=new r.baseCalendar,a(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return o(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year(),this.toJD(-1===e?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,r.local.invalidMonth),12===t&&this.leapYear(e)||8===t&&5===o(this.daysInYear(e),10)?30:9===t&&3===o(this.daysInYear(e),10)?29:this.daysPerMonth[t-1]},weekDay:function(e,t,n){return 6!==this.dayOfWeek(e,t,n)},extraInfo:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);e=a.year(),t=a.month(),n=a.day();var i=e<=0?e+1:e,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+n+1;if(t<7){for(var l=7;l<=this.monthsInYear(e);l++)o+=this.daysInMonth(e,l);for(l=1;l=this.toJD(-1===t?1:t+1,7,1);)t++;for(var n=ethis.toJD(t,n,this.daysInMonth(t,n));)n++;var r=e-this.toJD(t,n,1)+1;return this.newDate(t,n,r)}}),r.calendars.hebrew=i},6368:function(e,t,n){var r=n(8700),a=n(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new r.baseCalendar,a(i.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){return(11*this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return 5!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);return e=a.year(),t=a.month(),e=e<=0?e+1:e,(n=a.day())+Math.ceil(29.5*(t-1))+354*(e-1)+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var n=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),r=e-this.toJD(t,n,1)+1;return this.newDate(t,n,r)}}),r.calendars.islamic=i},4747:function(e,t,n){var r=n(8700),a=n(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new r.baseCalendar,a(i.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return(e=t.year()<0?t.year()+1:t.year())%4===0},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(4-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);return e=a.year(),t=a.month(),n=a.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+n-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,n=Math.floor((t-122.1)/365.25),r=Math.floor(365.25*n),a=Math.floor((t-r)/30.6001),i=a-Math.floor(a<14?1:13),o=n-Math.floor(i>2?4716:4715),l=t-r-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,l)}}),r.calendars.julian=i},5616:function(e,t,n){var r=n(8700),a=n(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}function l(e,t){return o(e-1,t)+1}i.prototype=new r.baseCalendar,a(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),!1},formatYear:function(e){e=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year();var t=Math.floor(e/400);return e%=400,e+=e<0?400:0,t+"."+Math.floor(e/20)+"."+e%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,n=0;n19||n>0&&r<0)throw"Invalid Mayan year";t=20*t+r}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),18},weekOfYear:function(e,t,n){return this._validate(e,t,n,r.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,r.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,r.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,n){return this._validate(e,t,n,r.local.invalidDate).day()},weekDay:function(e,t,n){return this._validate(e,t,n,r.local.invalidDate),!0},extraInfo:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate).toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=o(8+(e-=this.jdEpoch)+340,365);return[Math.floor(t/20)+1,o(t,20)]},_toTzolkin:function(e){return[l(20+(e-=this.jdEpoch),20),l(e+4,13)]},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var n=Math.floor(e/20),r=e%20;return this.newDate(t,n,r)}}),r.calendars.mayan=i},632:function(e,t,n){var r=n(8700),a=n(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new r.baseCalendar;var o=r.instance("gregorian");a(i.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return o.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidMonth);(e=a.year())<0&&e++;for(var i=a.day(),l=1;l=this.toJD(t+1,1,1);)t++;for(var n=e-Math.floor(this.toJD(t,1,1)+.5)+1,r=1;n>this.daysInMonth(t,r);)n-=this.daysInMonth(t,r),r++;return this.newDate(t,r,n)}}),r.calendars.nanakshahi=i},3040:function(e,t,n){var r=n(8700),a=n(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new r.baseCalendar,a(i.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){if(e=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear).year(),"undefined"===typeof this.NEPALI_CALENDAR_DATA[e])return this.daysPerYear;for(var t=0,n=this.minMonth;n<=12;n++)t+=this.NEPALI_CALENDAR_DATA[e][n];return t},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,r.local.invalidMonth),"undefined"===typeof this.NEPALI_CALENDAR_DATA[e]?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,n){return 6!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);e=a.year(),t=a.month(),n=a.day();var i=r.instance(),o=0,l=t,s=e;this._createMissingCalendarData(e);var u=e-(l>9||9===l&&n>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(9!==t&&(o=n,l--);9!==l;)l<=0&&(l=12,s--),o+=this.NEPALI_CALENDAR_DATA[s][l],l--;return 9===t?(o+=n-this.NEPALI_CALENDAR_DATA[s][0])<0&&(o+=i.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(e){var t=r.instance().fromJD(e),n=t.year(),a=t.dayOfYear(),i=n+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;a>s;)++o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(s-a);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var n=e-1;n0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-(r.dayOfWeek()+1)%7,"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return 5!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);e=a.year(),t=a.month(),n=a.day();var i=e-(e>=0?474:473),l=474+o(i,2820);return n+(t<=7?31*(t-1):30*(t-1)+6)+Math.floor((682*l-110)/2816)+365*(l-1)+1029983*Math.floor(i/2820)+this.jdEpoch-1},fromJD:function(e){var t=(e=Math.floor(e)+.5)-this.toJD(475,1,1),n=Math.floor(t/1029983),r=o(t,1029983),a=2820;if(1029982!==r){var i=Math.floor(r/366),l=o(r,366);a=Math.floor((2134*i+2816*l+2815)/1028522)+i+1}var s=a+2820*n+474;s=s<=0?s-1:s;var u=e-this.toJD(s,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),d=e-this.toJD(s,c,1)+1;return this.newDate(s,c,d)}}),r.calendars.persian=i,r.calendars.jalali=i},9075:function(e,t,n){var r=n(8700),a=n(896),i=r.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,a(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,n){var a=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),r.calendars.taiwan=o},4592:function(e,t,n){var r=n(8700),a=n(896),i=r.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new r.baseCalendar,a(o.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,n){var a=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var n=this._validate(e,t,this.minDay,r.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,n){return(this.dayOfWeek(e,t,n)||7)<6},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),r.calendars.thai=o},5348:function(e,t,n){var r=n(8700),a=n(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new r.baseCalendar,a(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,r.local.invalidYear);return 355===this.daysInYear(t.year())},weekOfYear:function(e,t,n){var r=this.newDate(e,t,n);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,n=1;n<=12;n++)t+=this.daysInMonth(e,n);return t},daysInMonth:function(e,t){for(var n=this._validate(e,t,this.minDay,r.local.invalidMonth).toJD()-24e5+.5,a=0,i=0;in)return o[a]-o[a-1];a++}return 30},weekDay:function(e,t,n){return 5!==this.dayOfWeek(e,t,n)},toJD:function(e,t,n){var a=this._validate(e,t,n,r.local.invalidDate),i=12*(a.year()-1)+a.month()-15292;return a.day()+o[i-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,n=0,r=0;rt);r++)n++;var a=n+15292,i=Math.floor((a-1)/12),l=i+1,s=a-12*i,u=t-o[n-1]+1;return this.newDate(l,s,u)},isValid:function(e,t,n){var a=r.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(e=null!=e.year?e.year:e)>=1276&&e<=1500),a},_validate:function(e,t,n,a){var i=r.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw a.replace(/\{0\}/,this.local.name);return i}}),r.calendars.ummalqura=i;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},8700:function(e,t,n){var r=n(896);function a(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(e,t,n,r){if(this._calendar=e,this._year=t,this._month=n,this._day=r,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function l(){this.shortYearCutoff="+10"}function s(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}r(a.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var n=this._localCals[e+"-"+t];if(!n&&this.calendars[e]&&(n=new this.calendars[e](t),this._localCals[e+"-"+t]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return n},newDate:function(e,t,n,r,a){return(r=(null!=e&&e.year?e.calendar():"string"===typeof r?this.instance(r,a):r)||this.instance()).newDate(e,t,n)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(n){for(var r="",a=0;n>0;){var i=n%10;r=(0===i?"":e[i]+t[a])+r,a++,n=Math.floor(n/10)}return 0===r.indexOf(e[1]+t[1])&&(r=r.substr(1)),r||e[0]}}}),r(i.prototype,{newDate:function(e,t,n){return this._calendar.newDate(null==e?this:e,t,n)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,n){if(!this._calendar.isValid(e,t,n))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=n,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),r(l.prototype,{_validateLevel:0,newDate:function(e,t,n){return null==e?this.today():(e.year&&(this._validate(e,t,n,u.local.invalidDate||u.regionalOptions[""].invalidDate),n=e.day(),t=e.month(),e=e.year()),new i(this,e,t,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+o(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var n=this._validate(e,t,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(e,t){var n=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,n,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),n},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,n){var r=this._validate(e,t,n,u.local.invalidDate||u.regionalOptions[""].invalidDate);return r.toJD()-this.newDate(r.year(),this.fromMonthOfYear(r.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,n){var r=this._validate(e,t,n,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(r))+2)%this.daysInWeek()},extraInfo:function(e,t,n){return this._validate(e,t,n,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(e,t,n){return this._validate(e,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,n),t,n)},_add:function(e,t,n){if(this._validateLevel++,"d"===n||"w"===n){var r=e.toJD()+t*("w"===n?this.daysInWeek():1),a=e.calendar().fromJD(r);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+("y"===n?t:0),o=e.monthOfYear()+("m"===n?t:0);a=e.day(),"y"===n?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):"m"===n&&(function(e){for(;ot-1+e.minMonth;)i++,o-=t,t=e.monthsInYear(i)}(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var l=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,l}catch(s){throw this._validateLevel--,s}},_correctAdd:function(e,t,n,r){if(!this.hasYearZero&&("y"===r||"m"===r)&&(0===t[0]||e.year()>0!==t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[r],i=n<0?-1:1;t=this._add(e,n*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,n){this._validate(e,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var r="y"===n?t:e.year(),a="m"===n?t:e.month(),i="d"===n?t:e.day();return"y"!==n&&"m"!==n||(i=Math.min(i,this.daysInMonth(r,a))),e.date(r,a,i)},isValid:function(e,t,n){this._validateLevel++;var r=this.hasYearZero||0!==e;if(r){var a=this.newDate(e,t,this.minDay);r=t>=this.minMonth&&t-this.minMonth=this.minDay&&n-this.minDay13.5?13:1),u=a-(s>2.5?4716:4715);return u<=0&&u--,this.newDate(u,s,l)},toJSDate:function(e,t,n){var r=this._validate(e,t,n,u.local.invalidDate||u.regionalOptions[""].invalidDate),a=new Date(r.year(),r.month()-1,r.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var u=e.exports=new a;u.cdate=i,u.baseCalendar=l,u.calendars.gregorian=s},5168:function(e,t,n){var r=n(896),a=n(8700);r(a.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),a.local=a.regionalOptions[""],r(a.cdate.prototype,{formatDate:function(e,t){return"string"!==typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),r(a.baseCalendar.prototype,{UNIX_EPOCH:a.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:a.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,n){if("string"!==typeof e&&(n=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var r,i,o,l,s=(n=n||{}).dayNamesShort||this.local.dayNamesShort,u=n.dayNames||this.local.dayNames,c=n.monthNumbers||this.local.monthNumbers,d=n.monthNamesShort||this.local.monthNamesShort,f=n.monthNames||this.local.monthNames,h=(n.calculateWeek||this.local.calculateWeek,function(t,n){for(var r=1;A+r1}),p=function(e,t,n,r){var a=""+t;if(h(e,r))for(;a.length1},x=function(e,n){var r=y(e,n),i=[2,3,r?4:2,r?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+i+"}"),l=t.substring(k).match(o);if(!l)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,k);return k+=l[0].length,parseInt(l[0],10)},b=this,_=function(){if("function"===typeof s){y("m");var e=s.call(b,t.substring(k));return k+=e.length,e}return x("m")},A=function(e,n,r,i){for(var o=y(e,i)?r:n,l=0;l-1){h=1,p=v;for(var C=this.daysInMonth(f,h);p>C;C=this.daysInMonth(f,h))h++,p-=C}return d>-1?this.fromJD(d):this.newDate(f,h,p)},determineDate:function(e,t,n,r,a){n&&"object"!==typeof n&&(a=r,r=n,n=null),"string"!==typeof r&&(a=r,r="");var i=this;return t=t?t.newDate():null,e=null==e?t:"string"===typeof e?function(e){try{return i.parseDate(r,e,a)}catch(s){}for(var t=((e=e.toLowerCase()).match(/^c/)&&n?n.newDate():null)||i.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,l=o.exec(e);l;)t.add(parseInt(l[1],10),l[2]||"d"),l=o.exec(e);return t}(e):"number"===typeof e?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e)}})}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(3472)}()},e.exports=t()},888:(e,t,n)=>{"use strict";var r=n(47);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},7:(e,t,n)=>{e.exports=n(888)()},47:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},463:(e,t,n)=>{"use strict";var r=n(791),a=n(296);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n