nopaque/app/static/external/plotly.js/js/plotly-basic.min.js
2024-04-11 14:13:04 +02:00

8 lines
988 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* plotly.js (basic - minified) v2.31.0
* Copyright 2012-2024, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
/*! For license information please see plotly-basic.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Plotly=t():e.Plotly=t()}(self,(function(){return function(){var e={9288:function(e,t,r){"use strict";var n=r(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");n.addStyleRule(o,a[i])}},6712:function(e,t,r){"use strict";e.exports=r(1843)},7240:function(e,t,r){"use strict";e.exports=r(1132)},6144:function(e,t,r){"use strict";e.exports=r(7776)},2016:function(e,t,r){"use strict";e.exports=r(4884)},5556:function(e,t,r){"use strict";e.exports=r(6744)},6489:function(e,t,r){"use strict";e.exports=r(2028)},3472:function(e,t,r){"use strict";var n=r(2016);n.register([r(7240),r(260),r(6712),r(5556),r(6489),r(7312),r(6144)]),e.exports=n},260:function(e,t,r){"use strict";e.exports=r(5792)},7312:function(e,t,r){"use strict";e.exports=r(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,r){"use strict";var n=r(2196),a=r(5376),i=r(3816),o=r(1780).templatedArray;r(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:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.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,r){"use strict";var n=r(3400),a=r(4460),i=r(6196).draw;function o(e){var t=e._fullLayout;n.filterVisible(t.annotations).forEach((function(t){var r=a.getFromId(e,t.xref),n=a.getFromId(e,t.yref),i=a.getRefType(t.xref),o=a.getRefType(t.yref);t._extremes={},"range"===i&&l(t,r),"range"===o&&l(t,n)}))}function l(e,t){var r,n=t._id,i=n.charAt(0),o=e[i],l=e["a"+i],s=e[i+"ref"],c=e["a"+i+"ref"],u=e["_"+i+"padplus"],f=e["_"+i+"padminus"],d={x:1,y:-1}[i]*e[i+"shift"],h=3*e.arrowsize*e.arrowwidth||0,p=h+d,v=h-d,g=3*e.startarrowsize*e.arrowwidth||0,y=g+d,m=g-d;if(c===s){var x=a.findExtremes(t,[t.r2c(o)],{ppadplus:p,ppadminus:v}),b=a.findExtremes(t,[t.r2c(l)],{ppadplus:Math.max(u,y),ppadminus:Math.max(f,m)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else y=l?y+l:y,m=l?m-l:m,r=a.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(u,p,y),ppadminus:Math.max(f,v,m)});e._extremes[n]=r}e.exports=function(e){var t=e._fullLayout;if(n.filterVisible(t.annotations).length&&e._fullData.length)return n.syncOrAsync([i,o],e)}},2300:function(e,t,r){"use strict";var n=r(3400),a=r(4040),i=r(1780).arrayEditor;function o(e,t){var r,n,a,i,o,s,c,u=e._fullLayout.annotations,f=[],d=[],h=[],p=(t||[]).length;for(r=0;r<u.length;r++)if(i=(a=u[r]).clicktoshow){for(n=0;n<p;n++)if(s=(o=t[n]).xaxis,c=o.yaxis,s._id===a.xref&&c._id===a.yref&&s.d2r(o.x)===l(a._xclick,s)&&c.d2r(o.y)===l(a._yclick,c)){(a.visible?"onout"===i?d:h:f).push(r);break}n===p&&a.visible&&"onout"===i&&d.push(r)}return{on:f,off:d,explicitOff:h}}function l(e,t){return"log"===t.type?t.l2r(e):t.d2r(e)}e.exports={hasClickToShow:function(e,t){var r=o(e,t);return r.on.length>0||r.explicitOff.length>0},onClick:function(e,t){var r,l,s=o(e,t),c=s.on,u=s.off.concat(s.explicitOff),f={},d=e._fullLayout.annotations;if(c.length||u.length){for(r=0;r<c.length;r++)(l=i(e.layout,"annotations",d[c[r]])).modifyItem("visible",!0),n.extendFlat(f,l.getUpdateObj());for(r=0;r<u.length;r++)(l=i(e.layout,"annotations",d[u[r]])).modifyItem("visible",!1),n.extendFlat(f,l.getUpdateObj());return a.call("update",e,{},f)}}}},7192:function(e,t,r){"use strict";var n=r(3400),a=r(6308);e.exports=function(e,t,r,i){i("opacity");var o=i("bgcolor"),l=i("bordercolor"),s=a.opacity(l);i("borderpad");var c=i("borderwidth"),u=i("showarrow");if(i("text",u?" ":r._dfltTitle.annotation),i("textangle"),n.coerceFont(i,"font",r.font),i("width"),i("align"),i("height")&&i("valign"),u){var f,d,h=i("arrowside");-1!==h.indexOf("end")&&(f=i("arrowhead"),d=i("arrowsize")),-1!==h.indexOf("start")&&(i("startarrowhead",f),i("startarrowsize",d)),i("arrowcolor",s?t.bordercolor:a.defaultLine),i("arrowwidth",2*(s&&c||1)),i("standoff"),i("startstandoff")}var p=i("hovertext"),v=r.hoverlabel||{};if(p){var g=i("hoverlabel.bgcolor",v.bgcolor||(a.opacity(o)?a.rgb(o):a.defaultLine)),y=i("hoverlabel.bordercolor",v.bordercolor||a.contrast(g));n.coerceFont(i,"hoverlabel.font",{family:v.font.family,size:v.font.size,color:v.font.color||y})}i("captureevents",!!p)}},9208:function(e,t,r){"use strict";var n=r(8248),a=r(6896);e.exports=function(e,t,r,i){t=t||{};var o="log"===r&&"linear"===t.type,l="linear"===r&&"log"===t.type;if(o||l)for(var s,c,u=e._fullLayout.annotations,f=t._id.charAt(0),d=0;d<u.length;d++)s=u[d],c="annotations["+d+"].",s[f+"ref"]===t._id&&h(f),s["a"+f+"ref"]===t._id&&h("a"+f);function h(e){var r=s[e],l=null;l=o?a(r,t.range):Math.pow(10,r),n(l)||(l=null),i(c+e,l)}}},5216:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(1272),o=r(7192),l=r(3916);function s(e,t,r){function i(r,a){return n.coerce(e,t,l,r,a)}var s=i("visible"),c=i("clicktoshow");if(s||c){o(e,t,r,i);for(var u=t.showarrow,f=["x","y"],d=[-10,-30],h={_fullLayout:r},p=0;p<2;p++){var v=f[p],g=a.coerceRef(e,t,h,v,"","paper");if("paper"!==g&&a.getFromId(h,g)._annIndices.push(t._index),a.coercePosition(t,h,i,g,v,.5),u){var y="a"+v,m=a.coerceRef(e,t,h,y,"pixel",["pixel","paper"]);"pixel"!==m&&m!==g&&(m=t[y]="pixel");var x="pixel"===m?d[p]:.4;a.coercePosition(t,h,i,m,y,x)}i(v+"anchor"),i(v+"shift")}if(n.noneOrAll(e,t,["x","y"]),u&&n.noneOrAll(e,t,["ax","ay"]),c){var b=i("xclick"),_=i("yclick");t._xclick=void 0===b?t.x:a.cleanPosition(b,h,t.xref),t._yclick=void 0===_?t.y:a.cleanPosition(_,h,t.yref)}}}e.exports=function(e,t){i(e,t,{name:"annotations",handleItemDefaults:s})}},6196:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(7316),o=r(3400),l=o.strTranslate,s=r(4460),c=r(6308),u=r(3616),f=r(3024),d=r(2736),h=r(3972),p=r(6476),v=r(1780).arrayEditor,g=r(3652);function y(e,t){var r=e._fullLayout.annotations[t]||{},n=s.getFromId(e,r.xref),a=s.getFromId(e,r.yref);n&&n.setScale(),a&&a.setScale(),x(e,r,t,!1,n,a)}function m(e,t,r,n,a){var i=a[r],o=a[r+"ref"],l=-1!==r.indexOf("y"),c="domain"===s.getRefType(o),u=l?n.h:n.w;return e?c?i+(l?-t:t)/e._length:e.p2r(e.r2p(i)+t):i+(l?-t:t)/u}function x(e,t,r,i,y,x){var b,_,w=e._fullLayout,T=e._fullLayout._size,M=e._context.edits;i?(b="annotation-"+i,_=i+".annotations"):(b="annotation",_="annotations");var k=v(e.layout,_,t),A=k.modifyBase,L=k.modifyItem,S=k.getUpdateObj;w._infolayer.selectAll("."+b+'[data-index="'+r+'"]').remove();var D="clip"+w._uid+"_ann"+r;if(t._input&&!1!==t.visible){var O={x:{},y:{}},C=+t.textangle||0,P=w._infolayer.append("g").classed(b,!0).attr("data-index",String(r)).style("opacity",t.opacity),I=P.append("g").classed("annotation-text-g",!0),R=M[t.showarrow?"annotationTail":"annotationPosition"],z=t.captureevents||M.annotationText||R,N=I.append("g").style("pointer-events",z?"all":null).call(h,"pointer").on("click",(function(){e._dragging=!1,e.emit("plotly_clickannotation",G(n.event))}));t.hovertext&&N.on("mouseover",(function(){var r=t.hoverlabel,n=r.font,a=this.getBoundingClientRect(),i=e.getBoundingClientRect();f.loneHover({x0:a.left-i.left,x1:a.right-i.left,y:(a.top+a.bottom)/2-i.top,text:t.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:e})})).on("mouseout",(function(){f.loneUnhover(w._hoverlayer.node())}));var F=t.borderwidth,E=t.borderpad,H=F+E,B=N.append("rect").attr("class","bg").style("stroke-width",F+"px").call(c.stroke,t.bordercolor).call(c.fill,t.bgcolor),j=t.width||t.height,Y=w._topclips.selectAll("#"+D).data(j?[0]:[]);Y.enter().append("clipPath").classed("annclip",!0).attr("id",D).append("rect"),Y.exit().remove();var V=t.font,U=w._meta?o.templateString(t.text,w._meta):t.text,q=N.append("text").classed("annotation-text",!0).text(U);M.annotationText?q.call(d.makeEditable,{delegate:N,gd:e}).call(Z).on("edit",(function(r){t.text=r,this.call(Z),L("text",r),y&&y.autorange&&A(y._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0),a.call("_guiRelayout",e,S())})):q.call(Z)}else n.selectAll("#"+D).remove();function G(e){var n={index:r,annotation:t._input,fullAnnotation:t,event:e};return i&&(n.subplotId=i),n}function Z(r){return r.call(u.font,V).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),d.convertToTspans(r,e,W),r}function W(){var r=q.selectAll("a");1===r.size()&&r.text()===q.text()&&N.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(B.node());var n=N.select(".annotation-text-math-group"),f=!n.empty(),v=u.bBox((f?n:q).node()),b=v.width,_=v.height,k=t.width||b,z=t.height||_,E=Math.round(k+2*H),V=Math.round(z+2*H);function U(e,t){return"auto"===t&&(t=e<1/3?"left":e>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var Z=!1,W=["x","y"],X=0;X<W.length;X++){var J,K,Q,$,ee,te=W[X],re=t[te+"ref"]||te,ne=t["a"+te+"ref"],ae={x:y,y:x}[te],ie=(C+("x"===te?0:-90))*Math.PI/180,oe=E*Math.cos(ie),le=V*Math.sin(ie),se=Math.abs(oe)+Math.abs(le),ce=t[te+"anchor"],ue=t[te+"shift"]*("x"===te?1:-1),fe=O[te],de=s.getRefType(re);if(ae&&"domain"!==de){var he=ae.r2fraction(t[te]);(he<0||he>1)&&(ne===re?((he=ae.r2fraction(t["a"+te]))<0||he>1)&&(Z=!0):Z=!0),J=ae._offset+ae.r2p(t[te]),$=.5}else{var pe="domain"===de;"x"===te?(Q=t[te],J=pe?ae._offset+ae._length*Q:J=T.l+T.w*Q):(Q=1-t[te],J=pe?ae._offset+ae._length*Q:J=T.t+T.h*Q),$=t.showarrow?.5:Q}if(t.showarrow){fe.head=J;var ve=t["a"+te];if(ee=oe*U(.5,t.xanchor)-le*U(.5,t.yanchor),ne===re){var ge=s.getRefType(ne);"domain"===ge?("y"===te&&(ve=1-ve),fe.tail=ae._offset+ae._length*ve):"paper"===ge?"y"===te?(ve=1-ve,fe.tail=T.t+T.h*ve):fe.tail=T.l+T.w*ve:fe.tail=ae._offset+ae.r2p(ve),K=ee}else fe.tail=J+ve,K=ee+ve;fe.text=fe.tail+ee;var ye=w["x"===te?"width":"height"];if("paper"===re&&(fe.head=o.constrain(fe.head,1,ye-1)),"pixel"===ne){var me=-Math.max(fe.tail-3,fe.text),xe=Math.min(fe.tail+3,fe.text)-ye;me>0?(fe.tail+=me,fe.text+=me):xe>0&&(fe.tail-=xe,fe.text-=xe)}fe.tail+=ue,fe.head+=ue}else K=ee=se*U($,ce),fe.text=J+ee;fe.text+=ue,ee+=ue,K+=ue,t["_"+te+"padplus"]=se/2+K,t["_"+te+"padminus"]=se/2-K,t["_"+te+"size"]=se,t["_"+te+"shift"]=ee}if(Z)N.remove();else{var be=0,_e=0;if("left"!==t.align&&(be=(k-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(_e=(z-_)*("middle"===t.valign?.5:1)),f)n.select("svg").attr({x:H+be-1,y:H+_e}).call(u.setClipUrl,j?D:null,e);else{var we=H+_e-v.top,Te=H+be-v.left;q.call(d.positionText,Te,we).call(u.setClipUrl,j?D:null,e)}Y.select("rect").call(u.setRect,H,H,k,z),B.call(u.setRect,F/2,F/2,E-F,V-F),N.call(u.setTranslate,Math.round(O.x.text-E/2),Math.round(O.y.text-V/2)),I.attr({transform:"rotate("+C+","+O.x.text+","+O.y.text+")"});var Me,ke=function(r,n){P.selectAll(".annotation-arrow-g").remove();var s=O.x.head,f=O.y.head,d=O.x.tail+r,h=O.y.tail+n,v=O.x.text+r,b=O.y.text+n,_=o.rotationXYMatrix(C,v,b),w=o.apply2DTransform(_),k=o.apply2DTransform2(_),D=+B.attr("width"),R=+B.attr("height"),z=v-.5*D,F=z+D,E=b-.5*R,H=E+R,j=[[z,E,z,H],[z,H,F,H],[F,H,F,E],[F,E,z,E]].map(k);if(!j.reduce((function(e,t){return e^!!o.segmentsIntersect(s,f,s+1e6,f+1e6,t[0],t[1],t[2],t[3])}),!1)){j.forEach((function(e){var t=o.segmentsIntersect(d,h,s,f,e[0],e[1],e[2],e[3]);t&&(d=t.x,h=t.y)}));var Y=t.arrowwidth,V=t.arrowcolor,U=t.arrowside,q=P.append("g").style({opacity:c.opacity(V)}).classed("annotation-arrow-g",!0),G=q.append("path").attr("d","M"+d+","+h+"L"+s+","+f).style("stroke-width",Y+"px").call(c.stroke,c.rgb(V));if(g(G,U,t),M.annotationPosition&&G.node().parentNode&&!i){var Z=s,W=f;if(t.standoff){var X=Math.sqrt(Math.pow(s-d,2)+Math.pow(f-h,2));Z+=t.standoff*(d-s)/X,W+=t.standoff*(h-f)/X}var J,K,Q=q.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(d-Z)+","+(h-W),transform:l(Z,W)}).style("stroke-width",Y+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");p.init({element:Q.node(),gd:e,prepFn:function(){var e=u.getTranslate(N);J=e.x,K=e.y,y&&y.autorange&&A(y._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0)},moveFn:function(e,r){var n=w(J,K),a=n[0]+e,i=n[1]+r;N.call(u.setTranslate,a,i),L("x",m(y,e,"x",T,t)),L("y",m(x,r,"y",T,t)),t.axref===t.xref&&L("ax",m(y,e,"ax",T,t)),t.ayref===t.yref&&L("ay",m(x,r,"ay",T,t)),q.attr("transform",l(e,r)),I.attr({transform:"rotate("+C+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",e,S());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&ke(0,0),R&&p.init({element:N.node(),gd:e,prepFn:function(){Me=I.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?L("ax",m(y,e,"ax",T,t)):L("ax",t.ax+e),t.ayref===t.yref?L("ay",m(x,r,"ay",T.w,t)):L("ay",t.ay+r),ke(e,r);else{if(i)return;var a,o;if(y)a=m(y,e,"x",T,t);else{var s=t._xsize/T.w,c=t.x+(t._xshift-t.xshift)/T.w-s/2;a=p.align(c+e/T.w,s,0,1,t.xanchor)}if(x)o=m(x,r,"y",T,t);else{var u=t._ysize/T.h,f=t.y-(t._yshift+t.yshift)/T.h-u/2;o=p.align(f-r/T.h,u,0,1,t.yanchor)}L("x",a),L("y",o),y&&x||(n=p.getCursor(y?.5:a,x?.5:o,t.xanchor,t.yanchor))}I.attr({transform:l(e,r)+Me}),h(N,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",G(n))},doneFn:function(){h(N),a.call("_guiRelayout",e,S());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 r=0;r<t.annotations.length;r++)t.annotations[r].visible&&y(e,r);return i.previousPromises(e)},drawOne:y,drawRaw:x}},3652:function(e,t,r){"use strict";var n=r(3428),a=r(6308),i=r(2196),o=r(3400),l=o.strScale,s=o.strRotate,c=o.strTranslate;e.exports=function(e,t,r){var o,u,f,d,h=e.node(),p=i[r.arrowhead||0],v=i[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),y=(r.arrowwidth||1)*(r.startarrowsize||1),m=t.indexOf("start")>=0,x=t.indexOf("end")>=0,b=p.backoff*g+r.standoff,_=v.backoff*y+r.startstandoff;if("line"===h.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=o.x-u.x,T=o.y-u.y;if(d=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void R();if(b){if(b*b>w*w+T*T)return void R();var M=b*Math.cos(f),k=b*Math.sin(f);u.x+=M,u.y+=k,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void R();var A=_*Math.cos(f),L=_*Math.sin(f);o.x-=A,o.y-=L,e.attr({x1:o.x,y1:o.y})}}else if("path"===h.nodeName){var S=h.getTotalLength(),D="";if(S<b+_)return void R();var O=h.getPointAtLength(0),C=h.getPointAtLength(.1);f=Math.atan2(O.y-C.y,O.x-C.x),o=h.getPointAtLength(Math.min(_,S)),D="0px,"+_+"px,";var P=h.getPointAtLength(S),I=h.getPointAtLength(S-.1);d=Math.atan2(P.y-I.y,P.x-I.x),u=h.getPointAtLength(Math.max(0,S-b)),D+=S-(D?_+b:b)+"px,"+S+"px",e.style("stroke-dasharray",D)}function R(){e.style("stroke-dasharray","0px,100px")}function z(t,i,o,u){t.path&&(t.noRotate&&(o=0),n.select(h.parentNode).append("path").attr({class:e.attr("class"),d:t.path,transform:c(i.x,i.y)+s(180*o/Math.PI)+l(u)}).style({fill:a.rgb(r.arrowcolor),"stroke-width":0}))}m&&z(v,o,f,y),x&&z(p,u,d,g)}},9180:function(e,t,r){"use strict";var n=r(6196),a=r(2300);e.exports={moduleType:"component",name:"annotations",layoutAttributes:r(3916),supplyLayoutDefaults:r(5216),includeBasePlot:r(6632)("annotations"),calcAutorange:r(272),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:a.hasClickToShow,onClick:a.onClick,convertCoords:r(9208)}},5899:function(e,t,r){"use strict";var n=r(3916),a=r(7824).overrideAll,i=r(1780).templatedArray;e.exports=a(i("annotation",{visible:n.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},76:function(e,t,r){"use strict";var n=r(3400),a=r(4460);function i(e,t){var r=t.fullSceneLayout.domain,i=t.fullLayout._size,o={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};e._xa={},n.extendFlat(e._xa,o),a.setConvert(e._xa),e._xa._offset=i.l+r.x[0]*i.w,e._xa.l2p=function(){return.5*(1+e._pdata[0]/e._pdata[3])*i.w*(r.x[1]-r.x[0])},e._ya={},n.extendFlat(e._ya,o),a.setConvert(e._ya),e._ya._offset=i.t+(1-r.y[1])*i.h,e._ya.l2p=function(){return.5*(1-e._pdata[1]/e._pdata[3])*i.h*(r.y[1]-r.y[0])}}e.exports=function(e){for(var t=e.fullSceneLayout.annotations,r=0;r<t.length;r++)i(t[r],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()}},2808:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(1272),o=r(7192),l=r(5899);function s(e,t,r,i){function s(r,a){return n.coerce(e,t,l,r,a)}function c(e){var n=e+"axis",i={_fullLayout:{}};return i._fullLayout[n]=r[n],a.coercePosition(t,i,s,e,e,.5)}s("visible")&&(o(e,t,i.fullLayout,s),c("x"),c("y"),c("z"),n.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",s("xanchor"),s("yanchor"),s("xshift"),s("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",s("ax",-10),s("ay",-30),n.noneOrAll(e,t,["ax","ay"])))}e.exports=function(e,t,r){i(e,t,{name:"annotations",handleItemDefaults:s,fullLayout:r.fullLayout})}},1836:function(e,t,r){"use strict";var n=r(6196).drawRaw,a=r(4424),i=["x","y","z"];e.exports=function(e){for(var t=e.fullSceneLayout,r=e.dataScale,o=t.annotations,l=0;l<o.length;l++){for(var s=o[l],c=!1,u=0;u<3;u++){var f=i[u],d=s[f],h=t[f+"axis"].r2fraction(d);if(h<0||h>1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+l+'"]').remove():(s._pdata=a(e.glplot.cameraParams,[t.xaxis.r2l(s.x)*r[0],t.yaxis.r2l(s.y)*r[1],t.zaxis.r2l(s.z)*r[2]]),n(e.graphDiv,s,l,e.id,s._xa,s._ya))}}},6864:function(e,t,r){"use strict";var n=r(4040),a=r(3400);e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(5899)}}},layoutAttributes:r(5899),handleDefaults:r(2808),includeBasePlot:function(e,t){var r=n.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,o=Object.keys(e),l=0;l<o.length;l++){var s=o[l];i.test(s)&&(e[s].annotations||[]).length&&(a.pushUnique(t._basePlotModules,r),a.pushUnique(t._subplots.gl3d,s))}},convert:r(76),draw:r(1836)}},4976:function(e,t,r){"use strict";e.exports=r(8700),r(5168),r(7020),r(7411),r(5668),r(2787),r(2084),r(6368),r(4747),r(5616),r(632),r(3040),r(1104),r(9075),r(4592),r(5348)},7776:function(e,t,r){"use strict";var n=r(4976),a=r(3400),i=r(9032),o=i.EPOCHJD,l=i.ONEDAY,s={valType:"enumerated",values:a.sortObjectKeys(n.calendars),editType:"calc",dflt:"gregorian"},c=function(e,t,r,n){var i={};return i[r]=s,a.coerce(e,t,i,r,n)},u="##",f={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:u,w:u,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},d={};function h(e){var t=d[e];return t||(d[e]=n.instance(e))}function p(e){return a.extendFlat({},s,{description:e})}function v(e){return"Sets the calendar system to use with `"+e+"` date data."}var g={xcalendar:p(v("x"))},y=a.extendFlat({},g,{ycalendar:p(v("y"))}),m=a.extendFlat({},y,{zcalendar:p(v("z"))}),x=p(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));e.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:y,bar:y,box:y,heatmap:y,contour:y,histogram:y,histogram2d:y,histogram2dcontour:y,scatter3d:m,surface:m,mesh3d:m,scattergl:y,ohlc:g,candlestick:g},layout:{calendar:p(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}},transforms:{filter:{valuecalendar:p(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `value`, if it is a date."].join(" ")),targetcalendar:p(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `target`, if it is an","array of dates. If `target` is a string (eg *x*) we use the","corresponding trace attribute (eg `xcalendar`) if it exists,","even if `targetcalendar` is provided."].join(" "))}}},layoutAttributes:s,handleDefaults:c,handleTraceDefaults:function(e,t,r,n){for(var a=0;a<r.length;a++)c(e,t,r[a]+"calendar",n.calendar)},CANONICAL_SUNDAY:{chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},CANONICAL_TICK:{chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},DFLTRANGE:{chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},getCal:h,worldCalFmt:function(e,t,r){for(var n,a,i,s,c,d=Math.floor((t+.05)/l)+o,p=h(r).fromJD(d),v=0;-1!==(v=e.indexOf("%",v));)"0"===(n=e.charAt(v+1))||"-"===n||"_"===n?(i=3,a=e.charAt(v+2),"_"===n&&(n="-")):(a=n,n="0",i=2),(s=f[a])?(c=s===u?u:p.formatDate(s[n]),e=e.substr(0,v)+c+e.substr(v+i),v+=c.length):v+=i;return e}}},2548:function(e,t){"use strict";t.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],t.defaultLine="#444",t.lightLine="#eee",t.background="#fff",t.borderLine="#BEC8D9",t.lightFraction=1e3/11},6308:function(e,t,r){"use strict";var n=r(9760),a=r(8248),i=r(8116).isTypedArray,o=e.exports={},l=r(2548);o.defaults=l.defaults;var s=o.defaultLine=l.defaultLine;o.lightLine=l.lightLine;var c=o.background=l.background;function u(e){if(a(e)||"string"!=typeof e)return e;var t=e.trim();if("rgb"!==t.substr(0,3))return e;var r=t.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return e;var n=r[1].trim().split(/\s*[\s,]\s*/),i="a"===t.charAt(3)&&4===n.length;if(!i&&3!==n.length)return e;for(var o=0;o<n.length;o++){if(!n[o].length)return e;if(n[o]=Number(n[o]),!(n[o]>=0))return e;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var l=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+l+", "+n[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(n(e))},o.opacity=function(e){return e?n(e).getAlpha():0},o.addOpacity=function(e,t){var r=n(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"},o.combine=function(e,t){var r=n(e).toRgb();if(1===r.a)return n(e).toRgbString();var a=n(t||c).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-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.interpolate=function(e,t,r){var a=n(e).toRgb(),i=n(t).toRgb(),o={r:r*a.r+(1-r)*i.r,g:r*a.g+(1-r)*i.g,b:r*a.b+(1-r)*i.b};return n(o).toRgbString()},o.contrast=function(e,t,r){var a=n(e);return 1!==a.getAlpha()&&(a=n(o.combine(e,c))),(a.isDark()?t?a.lighten(t):c:r?a.darken(r):s).toString()},o.stroke=function(e,t){var r=n(t);e.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(e,t){var r=n(t);e.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(e){if(e&&"object"==typeof e){var t,r,n,a,l=Object.keys(e);for(t=0;t<l.length;t++)if(a=e[n=l[t]],"color"===n.substr(n.length-5))if(Array.isArray(a))for(r=0;r<a.length;r++)a[r]=u(a[r]);else e[n]=u(a);else if("colorscale"===n.substr(n.length-10)&&Array.isArray(a))for(r=0;r<a.length;r++)Array.isArray(a[r])&&(a[r][1]=u(a[r][1]));else if(Array.isArray(a)){var s=a[0];if(!Array.isArray(s)&&s&&"object"==typeof s)for(r=0;r<a.length;r++)o.clean(a[r])}else a&&"object"==typeof a&&!i(a)&&o.clean(a)}}},616:function(e,t,r){"use strict";var n=r(4724),a=r(5376),i=r(2880).extendFlat,o=r(7824).overrideAll;e.exports=o({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:i({},n.ticks,{dflt:""}),ticklabeloverflow:i({},n.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:a({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string"},font:a({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:a({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},3964:function(e){"use strict";e.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},4013:function(e,t,r){"use strict";var n=r(3400),a=r(1780),i=r(6332),o=r(5404),l=r(5936),s=r(2568),c=r(616);e.exports=function(e,t,r){var u=a.newContainer(t,"colorbar"),f=e.colorbar||{};function d(e,t){return n.coerce(f,u,c,e,t)}var h=r.margin||{t:0,b:0,l:0,r:0},p=r.width-h.l-h.r,v=r.height-h.t-h.b,g="v"===d("orientation"),y=d("thicknessmode");d("thickness","fraction"===y?30/(g?p:v):30);var m=d("lenmode");d("len","fraction"===m?1:g?v:p);var x,b,_,w="paper"===d("yref"),T="paper"===d("xref"),M="left";g?(_="middle",M=T?"left":"right",x=T?1.02:1,b=.5):(_=w?"bottom":"top",M="center",x=.5,b=w?1.02:1),n.coerce(f,u,{x:{valType:"number",min:T?-2:0,max:T?3:1,dflt:x}},"x"),n.coerce(f,u,{y:{valType:"number",min:w?-2:0,max:w?3:1,dflt:b}},"y"),d("xanchor",M),d("xpad"),d("yanchor",_),d("ypad"),n.noneOrAll(f,u,["x","y"]),d("outlinecolor"),d("outlinewidth"),d("bordercolor"),d("borderwidth"),d("bgcolor");var k=n.coerce(f,u,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");d("ticklabeloverflow",-1!==k.indexOf("inside")?"hide past domain":"hide past div"),i(f,u,d,"linear");var A=r.font,L={noAutotickangles:!0,outerTicks:!1,font:A};-1!==k.indexOf("inside")&&(L.bgColor="black"),s(f,u,d,"linear",L),l(f,u,d,"linear",L),o(f,u,d,"linear",L),d("title.text",r._dfltTitle.colorbar);var S=u.showticklabels?u.tickfont:A,D=n.extendFlat({},S,{color:A.color,size:n.bigFont(S.size)});n.coerceFont(d,"title.font",D),d("title.side",g?"top":"right")}},7848:function(e,t,r){"use strict";var n=r(3428),a=r(9760),i=r(7316),o=r(4040),l=r(4460),s=r(6476),c=r(3400),u=c.strTranslate,f=r(2880).extendFlat,d=r(3972),h=r(3616),p=r(6308),v=r(1668),g=r(2736),y=r(4288).flipScale,m=r(5955),x=r(7668),b=r(4724),_=r(4284),w=_.LINE_SPACING,T=_.FROM_TL,M=_.FROM_BR,k=r(3964).cn;e.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+k.colorbar).data(function(e){var t,r,n,a,i=e._fullLayout,o=e.calcdata,l=[];function s(e){return f(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof a.calc?a.calc(e,n,t):(t._fillgradient=r.reversescale?y(r.colorscale):r.colorscale,t._zrange=[r[a.min],r[a.max]])}for(var u=0;u<o.length;u++){var d=o[u];if((n=d[0].trace)._module){var h=n._module.colorbar;if(!0===n.visible&&h)for(var p=Array.isArray(h),v=p?h:[h],g=0;g<v.length;g++){var m=(a=v[g]).container;(r=m?n[m]:n)&&r.showscale&&((t=s(r.colorbar))._id="cb"+n.uid+(p&&m?"-"+m:""),t._traceIndex=n.index,t._propPrefix=(m?m+".":"")+"colorbar.",t._meta=n._meta,c(),l.push(t))}}}for(var x in i._colorAxes)if((r=i[x]).showscale){var b=i._colorAxes[x];(t=s(r.colorbar))._id="cb"+x,t._propPrefix=x+".colorbar.",t._meta=i._meta,a={min:"cmin",max:"cmax"},"heatmap"!==b[0]&&(n=b[1],a.calc=n._module.colorbar.calc),c(),l.push(t)}return l}(e),(function(e){return e._id}));t.enter().append("g").attr("class",(function(e){return e._id})).classed(k.colorbar,!0),t.each((function(t){var r=n.select(this);c.ensureSingle(r,"rect",k.cbbg),c.ensureSingle(r,"g",k.cbfills),c.ensureSingle(r,"g",k.cblines),c.ensureSingle(r,"g",k.cbaxis,(function(e){e.classed(k.crisp,!0)})),c.ensureSingle(r,"g",k.cbtitleunshift,(function(e){e.append("g").classed(k.cbtitle,!0)})),c.ensureSingle(r,"rect",k.cboutline);var y=function(e,t,r){var o="v"===t.orientation,s=t.len,d=t.lenmode,y=t.thickness,_=t.thicknessmode,A=t.outlinewidth,L=t.borderwidth,S=t.bgcolor,D=t.xanchor,O=t.yanchor,C=t.xpad,P=t.ypad,I=t.x,R=o?t.y:1-t.y,z="paper"===t.yref,N="paper"===t.xref,F=r._fullLayout,E=F._size,H=t._fillcolor,B=t._line,j=t.title,Y=j.side,V=t._zrange||n.extent(("function"==typeof H?H:B.color).domain()),U="function"==typeof B.color?B.color:function(){return B.color},q="function"==typeof H?H:function(){return H},G=t._levels,Z=function(e,t,r){var n,a,i=t._levels,o=[],l=[],s=i.end+i.size/100,c=i.size,u=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(a=0;a<1e5&&(n=i.start+a*c,!(c>0?n>=s:n<=s));a++)n>u&&n<f&&o.push(n);if(t._fillgradient)l=[0];else if("function"==typeof t._fillcolor){var d=t._filllevels;if(d)for(s=d.end+d.size/100,c=d.size,a=0;a<1e5&&(n=d.start+a*c,!(c>0?n>=s:n<=s));a++)n>r[0]&&n<r[1]&&l.push(n);else(l=o.map((function(e){return e-i.size/2}))).push(l[l.length-1]+i.size)}else t._fillcolor&&"string"==typeof t._fillcolor&&(l=[0]);return i.size<0&&(o.reverse(),l.reverse()),{line:o,fill:l}}(0,t,V),W=Z.fill,X=Z.line,J=Math.round(y*("fraction"===_?o?E.w:E.h:1)),K=J/(o?E.w:E.h),Q=Math.round(s*("fraction"===d?o?E.h:E.w:1)),$=Q/(o?E.h:E.w),ee=N?E.w:r._fullLayout.width,te=z?E.h:r._fullLayout.height,re=Math.round(o?I*ee+C:R*te+P),ne={center:.5,right:1}[D]||0,ae={top:1,middle:.5}[O]||0,ie=o?I-ne*K:R-ae*K,oe=o?R-ae*$:I-ne*$,le=Math.round(o?te*(1-oe):ee*oe);t._lenFrac=$,t._thickFrac=K,t._uFrac=ie,t._vFrac=oe;var se=t._axis=function(e,t,r){var n=e._fullLayout,a="v"===t.orientation,i={type:"linear",range:r,tickmode:t.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:t.ticks,ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,showticklabels:t.showticklabels,labelalias:t.labelalias,ticklabelposition:t.ticklabelposition,ticklabeloverflow:t.ticklabeloverflow,ticklabelstep:t.ticklabelstep,tickfont:t.tickfont,tickangle:t.tickangle,tickformat:t.tickformat,exponentformat:t.exponentformat,minexponent:t.minexponent,separatethousands:t.separatethousands,showexponent:t.showexponent,showtickprefix:t.showtickprefix,tickprefix:t.tickprefix,showticksuffix:t.showticksuffix,ticksuffix:t.ticksuffix,title:t.title,showline:!0,anchor:"free",side:a?"right":"bottom",position:1},o=a?"y":"x",l={type:"linear",_id:o+t._id},s={letter:o,font:n.font,noAutotickangles:"y"===o,noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:n.calendar};function u(e,t){return c.coerce(i,l,b,e,t)}return m(i,l,u,s,n),x(i,l,u,s),l}(r,t,V);se.position=K+(o?I+C/E.w:R+P/E.h);var ce=-1!==["top","bottom"].indexOf(Y);if(o&&ce&&(se.title.side=Y,se.titlex=I+C/E.w,se.titley=oe+("top"===j.side?$-P/E.h:P/E.h)),o||ce||(se.title.side=Y,se.titley=R+P/E.h,se.titlex=oe+C/E.w),B.color&&"auto"===t.tickmode){se.tickmode="linear",se.tick0=G.start;var ue=G.size,fe=c.constrain(Q/50,4,15)+1,de=(V[1]-V[0])/((t.nticks||fe)*ue);if(de>1){var he=Math.pow(10,Math.floor(Math.log(de)/Math.LN10));ue*=he*c.roundUp(de/he,[2,5,10]),(Math.abs(G.start)/G.size+1e-6)%1<2e-6&&(se.tick0=0)}se.dtick=ue}se.domain=o?[oe+P/E.h,oe+$-P/E.h]:[oe+C/E.w,oe+$-C/E.w],se.setScale(),e.attr("transform",u(Math.round(E.l),Math.round(E.t)));var pe,ve=e.select("."+k.cbtitleunshift).attr("transform",u(-Math.round(E.l),-Math.round(E.t))),ge=se.ticklabelposition,ye=se.title.font.size,me=e.select("."+k.cbaxis),xe=0,be=0;function _e(n,a){var i={propContainer:se,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:F._dfltTitle.colorbar,containerGroup:e.select("."+k.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+o+",."+o+"-math-group").remove(),v.draw(r,n,f(i,a||{}))}return c.syncOrAsync([i.previousPromises,function(){var e,t;(o&&ce||!o&&!ce)&&("top"===Y&&(e=C+E.l+ee*I,t=P+E.t+te*(1-oe-$)+3+.75*ye),"bottom"===Y&&(e=C+E.l+ee*I,t=P+E.t+te*(1-oe)-3-.25*ye),"right"===Y&&(t=P+E.t+te*R+3+.75*ye,e=C+E.l+ee*oe),_e(se._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ce||o&&ce){var i,s=e.select("."+k.cbtitle),f=s.select("text"),d=[-A/2,A/2],p=s.select(".h"+se._id+"title-math-group").node(),v=15.6;if(f.node()&&(v=parseInt(f.node().style.fontSize,10)*w),p?(i=h.bBox(p),be=i.width,(xe=i.height)>v&&(d[1]-=(xe-v)/2)):f.node()&&!f.classed(k.jsPlaceholder)&&(i=h.bBox(f.node()),be=i.width,xe=i.height),o){if(xe){if(xe+=5,"top"===Y)se.domain[1]-=xe/E.h,d[1]*=-1;else{se.domain[0]+=xe/E.h;var y=g.lineCount(f);d[1]+=(1-y)*v}s.attr("transform",u(d[0],d[1])),se.setScale()}}else be&&("right"===Y&&(se.domain[0]+=(be+ye/2)/E.w),s.attr("transform",u(d[0],d[1])),se.setScale())}e.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",o?u(0,Math.round(E.h*(1-se.domain[1]))):u(Math.round(E.w*se.domain[0]),0)),me.attr("transform",o?u(0,Math.round(-E.t)):u(Math.round(-E.l),0));var m=e.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(W);m.enter().append("rect").classed(k.cbfill,!0).attr("style",""),m.exit().remove();var x=V.map(se.c2p).map(Math.round).sort((function(e,t){return e-t}));m.each((function(e,i){var l=[0===i?V[0]:(W[i]+W[i-1])/2,i===W.length-1?V[1]:(W[i]+W[i+1])/2].map(se.c2p).map(Math.round);o&&(l[1]=c.constrain(l[1]+(l[1]>l[0])?1:-1,x[0],x[1]));var s=n.select(this).attr(o?"x":"y",re).attr(o?"y":"x",n.min(l)).attr(o?"width":"height",Math.max(J,2)).attr(o?"height":"width",Math.max(n.max(l)-n.min(l),2));if(t._fillgradient)h.gradient(s,r,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=q(e).replace("e-","");s.attr("fill",a(u).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=re,r=Math.round(se.c2p(e))+B.width/2%1;n.select(this).attr("d","M"+(o?t+","+r:r+","+t)+(o?"h":"v")+J).call(h.lineGroupStyle,B.width,U(e),B.dash)})),me.selectAll("g."+se._id+"tick,path").remove();var _=re+J+(A||0)/2-("outside"===t.ticks?1:0),T=l.calcTicks(se),M=l.getTickSigns(se)[2];return l.drawTicks(r,se,{vals:"inside"===se.ticks?l.clipEnds(se,T):T,layer:me,path:l.makeTickPath(se,_,M),transFn:l.makeTransTickFn(se)}),l.drawLabels(r,se,{vals:T,layer:me,transFn:l.makeTransTickLabelFn(se),labelFns:l.makeLabelFns(se,_)})},function(){if(o&&!ce||!o&&ce){var e,a,i=se.position||0,l=se._offset+se._length/2;if("right"===Y)a=l,e=E.l+ee*i+10+ye*(se.showticklabels?1:.5);else if(e=l,"bottom"===Y&&(a=E.t+te*i+10+(-1===ge.indexOf("inside")?se.tickfont.size:0)+("intside"!==se.ticks&&t.ticklen||0)),"top"===Y){var s=j.text.split("<br>").length;a=E.t+te*i+10-J-w*ye*s}_e((o?"h":"v")+se._id+"title",{avoid:{selection:n.select(r).selectAll("g."+se._id+"tick"),side:Y,offsetTop:o?0:E.t,offsetLeft:o?E.l:0,maxShift:o?F.width:F.height},attributes:{x:e,y:a,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},i.previousPromises,function(){var n,l=J+A/2;-1===ge.indexOf("inside")&&(n=h.bBox(me.node()),l+=o?n.width:n.height),pe=ve.select("text");var c=0,f=o&&"top"===Y,v=!o&&"right"===Y,g=0;if(pe.node()&&!pe.classed(k.jsPlaceholder)){var m,x=ve.select(".h"+se._id+"title-math-group").node();x&&(o&&ce||!o&&!ce)?(c=(n=h.bBox(x)).width,m=n.height):(c=(n=h.bBox(ve.node())).right-E.l-(o?re:le),m=n.bottom-E.t-(o?le:re),o||"top"!==Y||(l+=n.height,g=n.height)),v&&(pe.attr("transform",u(c/2+ye/2,0)),c*=2),l=Math.max(l,o?c:m)}var b=2*(o?C:P)+l+L+A/2,w=0;!o&&j.text&&"bottom"===O&&R<=0&&(b+=w=b/2,g+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=g;var H=L+A,B=(o?re:le)-H/2-(o?C:0),V=(o?le:re)-(o?Q:P+g-w);e.select("."+k.cbbg).attr("x",B).attr("y",V).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max(Q+H,2)).call(p.fill,S).call(p.stroke,t.bordercolor).style("stroke-width",L);var U=v?Math.max(c-10,0):0;e.selectAll("."+k.cboutline).attr("x",(o?re:le+C)+U).attr("y",(o?le+P-Q:re)+(f?xe:0)).attr(o?"width":"height",Math.max(J,2)).attr(o?"height":"width",Math.max(Q-(o?2*P+xe:2*C+U),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":A});var q=o?ne*b:0,G=o?0:(1-ae)*b-g;if(q=N?E.l-q:-q,G=z?E.t-G:-G,e.attr("transform",u(q,G)),!o&&(L||a(S).getAlpha()&&!a.equals(F.paper_bgcolor,S))){var Z=me.selectAll("text"),W=Z[0].length,X=e.select("."+k.cbbg).node(),K=h.bBox(X),$=h.getTranslate(e);Z.each((function(e,t){var r=W-1;if(0===t||t===r){var n,a=h.bBox(this),i=h.getTranslate(this);if(t===r){var o=a.right+i.x;(n=K.right+$.x+le-L-2+I-o)>0&&(n=0)}else if(0===t){var l=a.left+i.x;(n=K.left+$.x+le+L+2-l)<0&&(n=0)}n&&(W<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var ee={},te=T[D],ie=M[D],oe=T[O],ue=M[O],fe=b-J;o?("pixels"===d?(ee.y=R,ee.t=Q*oe,ee.b=Q*ue):(ee.t=ee.b=0,ee.yt=R+s*oe,ee.yb=R-s*ue),"pixels"===_?(ee.x=I,ee.l=b*te,ee.r=b*ie):(ee.l=fe*te,ee.r=fe*ie,ee.xl=I-y*te,ee.xr=I+y*ie)):("pixels"===d?(ee.x=I,ee.l=Q*te,ee.r=Q*ie):(ee.l=ee.r=0,ee.xl=I+s*te,ee.xr=I-s*ie),"pixels"===_?(ee.y=1-R,ee.t=b*oe,ee.b=b*ue):(ee.t=fe*oe,ee.b=fe*ue,ee.yt=R-y*oe,ee.yb=R+y*ue));var de=t.y<.5?"b":"t",he=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var be={r:F.width-B-q,l:B+ee.r,b:F.height-V-G,t:V+ee.b};N&&z?i.autoMargin(r,t._id,ee):N?r._fullLayout._reservedMargin[t._id][de]=be[de]:z||o?r._fullLayout._reservedMargin[t._id][he]=be[he]:r._fullLayout._reservedMargin[t._id][de]=be[de]}],r)}(r,t,e);y&&y.then&&(e._promises||[]).push(y),e._context.edits.colorbarPosition&&function(e,t,r){var n,a,i,l="v"===t.orientation,c=r._fullLayout._size;s.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),d(e)},moveFn:function(r,o){e.attr("transform",n+u(r,o)),a=s.align((l?t._uFrac:t._vFrac)+r/c.w,l?t._thickFrac:t._lenFrac,0,1,t.xanchor),i=s.align((l?t._vFrac:1-t._uFrac)-o/c.h,l?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=s.getCursor(a,i,t.xanchor,t.yanchor);d(e,f)},doneFn:function(){if(d(e),void 0!==a&&void 0!==i){var n={};n[t._propPrefix+"x"]=a,n[t._propPrefix+"y"]=i,void 0!==t._traceIndex?o.call("_guiRestyle",r,n,t._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,t,e)})),t.exit().each((function(t){i.autoMargin(e,t._id)})).remove(),t.order()}}},553:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e){return n.isPlainObject(e.colorbar)}},5080:function(e,t,r){"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:r(616),supplyDefaults:r(4013),draw:r(7848).draw,hasColorbar:r(553)}},9084:function(e,t,r){"use strict";var n=r(616),a=r(3756).counter,i=r(2996),o=r(8304).scales;function l(e){return"`"+e+"`"}i(o),e.exports=function(e,t){e=e||"";var r,i=(t=t||{}).cLetter||"c",s=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),c="showScaleDflt"in t?t.showScaleDflt:"z"===i,u="string"==typeof t.colorscaleDflt?o[t.colorscaleDflt]:null,f=t.editTypeOverride||"",d=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,t.colorAttr):l(d+(r={z:"z",c:"color"}[i]));var h=i+"auto",p=i+"min",v=i+"max",g=i+"mid",y=(l(d+h),l(d+p),l(d+v),{});y[p]=y[v]=void 0;var m={};m[h]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},t.anim&&(x.color.anim=!0)),x[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:y},x[p]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[v]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:y},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,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:c,editType:"calc"},x.colorbar=n),t.noColorAxis||(x.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),x}},7128:function(e,t,r){"use strict";var n=r(8248),a=r(3400),i=r(4288).extractOpts;e.exports=function(e,t,r){var o,l=e._fullLayout,s=r.vals,c=r.containerStr,u=c?a.nestedProperty(t,c).get():t,f=i(u),d=!1!==f.auto,h=f.min,p=f.max,v=f.mid,g=function(){return a.aggNums(Math.min,null,s)},y=function(){return a.aggNums(Math.max,null,s)};void 0===h?h=g():d&&(h=u._colorAx&&n(h)?Math.min(h,g()):g()),void 0===p?p=y():d&&(p=u._colorAx&&n(p)?Math.max(p,y()):y()),d&&void 0!==v&&(p-v>v-h?h=v-(p-v):p-v<v-h&&(p=v+(v-h))),h===p&&(h-=.5,p+=.5),f._sync("min",h),f._sync("max",p),f.autocolorscale&&(o=h*p<0?l.colorscale.diverging:h>=0?l.colorscale.sequential:l.colorscale.sequentialminus,f._sync("colorscale",o))}},5504:function(e,t,r){"use strict";var n=r(3400),a=r(4288).hasColorscale,i=r(4288).extractOpts;e.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function o(e,a){var o=a.container?n.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)&&r(o,a.min),(s||void 0===l.max)&&r(o,a.max),l.autocolorscale&&r(o,"colorscale")}}for(var l=0;l<e.length;l++){var s=e[l],c=s._module.colorbar;if(c)if(Array.isArray(c))for(var u=0;u<c.length;u++)o(s,c[u]);else o(s,c);a(s,"marker.line")&&o(s,{container:"marker.line",min:"cmin",max:"cmax"})}for(var f in t._colorAxes)o(t[f],{min:"cmin",max:"cmax"})}},7260:function(e,t,r){"use strict";var n=r(8248),a=r(3400),i=r(553),o=r(4013),l=r(8304).isValid,s=r(4040).traceIs;function c(e,t){var r=t.slice(0,t.length-1);return t?a.nestedProperty(e,r).get()||{}:e}e.exports=function e(t,r,u,f,d){var h=d.prefix,p=d.cLetter,v="_module"in r,g=c(t,h),y=c(r,h),m=c(r._template||{},h)||{},x=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,u,f,d)};if(v){var b=u._colorAxes||{},_=f(h+"coloraxis");if(_){var w=s(r,"contour")&&a.nestedProperty(r,"contours.coloring").get()||"heatmap",T=b[_];return void(T?(T[2].push(x),T[0]!==w&&(T[0]=!1,a.warn(["Ignoring coloraxis:",_,"setting","as it is linked to incompatible colorscales."].join(" ")))):b[_]=[w,r,[x]])}}var M=g[p+"min"],k=g[p+"max"],A=n(M)&&n(k)&&M<k;f(h+p+"auto",!A)?f(h+p+"mid"):(f(h+p+"min"),f(h+p+"max"));var L,S,D=g.colorscale,O=m.colorscale;void 0!==D&&(L=!l(D)),void 0!==O&&(L=!l(O)),f(h+"autocolorscale",L),f(h+"colorscale"),f(h+"reversescale"),"marker.line."!==h&&(h&&v&&(S=i(g)),f(h+"showscale",S)&&(h&&m&&(y._template=m),o(g,y,u)))}},4288:function(e,t,r){"use strict";var n=r(3428),a=r(9760),i=r(8248),o=r(3400),l=r(6308),s=r(8304).isValid,c=["showscale","autocolorscale","colorscale","reversescale","colorbar"],u=["min","max","mid","auto"];function f(e){var t,r,n,a=e._colorAx,i=a||e,o={};for(r=0;r<c.length;r++)o[n=c[r]]=i[n];if(a)for(t="c",r=0;r<u.length;r++)o[n=u[r]]=i["c"+n];else{var l;for(r=0;r<u.length;r++)((l="c"+(n=u[r]))in i||(l="z"+n)in i)&&(o[n]=i[l]);t=l.charAt(0)}return o._sync=function(e,r){var n=-1!==u.indexOf(e)?t+e:e;i[n]=i["_"+n]=r},o}function d(e){for(var t=f(e),r=t.min,n=t.max,a=t.reversescale?h(t.colorscale):t.colorscale,i=a.length,o=new Array(i),l=new Array(i),s=0;s<i;s++){var c=a[s];o[s]=r+c[0]*(n-r),l[s]=c[1]}return{domain:o,range:l}}function h(e){for(var t=e.length,r=new Array(t),n=t-1,a=0;n>=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function p(e,t){t=t||{};for(var r=e.domain,o=e.range,s=o.length,c=new Array(s),u=0;u<s;u++){var f=a(o[u]).toRgb();c[u]=[f.r,f.g,f.b,f.a]}var d,h=n.scale.linear().domain(r).range(c).clamp(!0),p=t.noNumericCheck,g=t.returnArray;return(d=p&&g?h:p?function(e){return v(h(e))}:g?function(e){return i(e)?h(e):a(e).isValid()?e:l.defaultLine}:function(e){return i(e)?v(h(e)):a(e).isValid()?e:l.defaultLine}).domain=h.domain,d.range=function(){return o},d}function v(e){var t={r:e[0],g:e[1],b:e[2],a:e[3]};return a(t).toRgbString()}e.exports={hasColorscale:function(e,t,r){var n=t?o.nestedProperty(e,t).get()||{}:e,a=n[r||"color"];a&&a._inputArray&&(a=a._inputArray);var l=!1;if(o.isArrayOrTypedArray(a))for(var c=0;c<a.length;c++)if(i(a[c])){l=!0;break}return o.isPlainObject(n)&&(l||!0===n.showscale||i(n.cmin)&&i(n.cmax)||s(n.colorscale)||o.isPlainObject(n.colorbar))},extractOpts:f,extractScale:d,flipScale:h,makeColorScaleFunc:p,makeColorScaleFuncFromTrace:function(e,t){return p(d(e),t)}}},8932:function(e,t,r){"use strict";var n=r(8304),a=r(4288);e.exports={moduleType:"component",name:"colorscale",attributes:r(9084),layoutAttributes:r(2332),supplyLayoutDefaults:r(1608),handleDefaults:r(7260),crossTraceDefaults:r(5504),calc:r(7128),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:a.hasColorscale,extractOpts:a.extractOpts,extractScale:a.extractScale,flipScale:a.flipScale,makeColorScaleFunc:a.makeColorScaleFunc,makeColorScaleFuncFromTrace:a.makeColorScaleFuncFromTrace}},2332:function(e,t,r){"use strict";var n=r(2880).extendFlat,a=r(9084),i=r(8304).scales;e.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:i.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:i.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:i.RdBu,editType:"calc"}},coloraxis:n({_isSubplotObj:!0,editType:"calc"},a("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},1608:function(e,t,r){"use strict";var n=r(3400),a=r(1780),i=r(2332),o=r(7260);e.exports=function(e,t){function r(r,a){return n.coerce(e,t,i,r,a)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var l,s,c=t._colorAxes;function u(e,t){return n.coerce(l,s,i.coloraxis,e,t)}for(var f in c){var d=c[f];if(d[0])l=e[f]||{},(s=a.newContainer(t,f,"coloraxis"))._name=f,o(l,s,t,u,{prefix:"",cLetter:"c"});else{for(var h=0;h<d[2].length;h++)d[2][h]();delete t._colorAxes[f]}}}},8304:function(e,t,r){"use strict";var n=r(9760),a={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},i=a.RdBu;function o(e){var t=0;if(!Array.isArray(e)||e.length<2)return!1;if(!e[0]||!e[e.length-1])return!1;if(0!=+e[0][0]||1!=+e[e.length-1][0])return!1;for(var r=0;r<e.length;r++){var a=e[r];if(2!==a.length||+a[0]<t||!n(a[1]).isValid())return!1;t=+a[0]}return!0}e.exports={scales:a,defaultScale:i,get:function(e,t){if(t||(t=i),!e)return t;function r(){try{e=a[e]||JSON.parse(e)}catch(r){e=t}}return"string"==typeof e&&(r(),"string"==typeof e&&r()),o(e)?e:t},isValid:function(e){return void 0!==a[e]||o(e)}}},8316:function(e){"use strict";e.exports=function(e,t,r,n,a){var i=(e-r)/(n-r),o=i+t/(n-r),l=(i+o)/2;return"left"===a||"bottom"===a?i:"center"===a||"middle"===a?l:"right"===a||"top"===a?o:i<2/3-l?i:o>4/3-l?o:l}},7416:function(e,t,r){"use strict";var n=r(3400),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(e,t,r,i){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===i?0:"middle"===i?1:"top"===i?2:n.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,r){"use strict";var n=r(9128),a=r(2264),i=r(9184),o=r(3400).removeElement,l=r(3816),s=e.exports={};s.align=r(8316),s.getCursor=r(7416);var c=r(2616);function u(){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 f(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=c.wrapped,s.unhoverRaw=c.raw,s.init=function(e){var t,r,n,c,d,h,p,v,g=e.gd,y=1,m=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._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,r){return Math.abs(e)<r&&(e=0),Math.abs(t)<r&&(t=0),[e,t]};function _(i){g._dragged=!1,g._dragging=!0;var o=f(i);t=o[0],r=o[1],p=i.target,h=i,v=2===i.buttons||i.ctrlKey,void 0===i.clientX&&void 0===i.clientY&&(i.clientX=t,i.clientY=r),(n=(new Date).getTime())-g._mouseDownTime<m?y+=1:(y=1,g._mouseDownTime=n),e.prepFn&&e.prepFn(i,t,r),a&&!v?(d=u()).style.cursor=window.getComputedStyle(x).cursor:a||(d=document,c=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(x).cursor),document.addEventListener("mouseup",T),document.addEventListener("touchend",T),!1!==e.dragmode&&(i.preventDefault(),document.addEventListener("mousemove",w),document.addEventListener("touchmove",w,{passive:!1}))}function w(n){n.preventDefault();var a=f(n),i=e.minDrag||l.MINDRAG,o=b(a[0]-t,a[1]-r,i),c=o[0],u=o[1];(c||u)&&(g._dragged=!0,s.unhover(g,n)),g._dragged&&e.moveFn&&!v&&(g._dragdata={element:x,dx:c,dy:u},e.moveFn(c,u))}function T(t){if(delete g._dragdata,!1!==e.dragmode&&(t.preventDefault(),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w)),document.removeEventListener("mouseup",T),document.removeEventListener("touchend",T),a?o(d):c&&(d.documentElement.style.cursor=c,c=null),g._dragging){if(g._dragging=!1,(new Date).getTime()-g._mouseDownTime>m&&(y=Math.max(y-1,1)),g._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(y,h),!v){var r;try{r=new MouseEvent("click",t)}catch(e){var n=f(t);(r=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,n[0],n[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}p.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},s.coverSlip=u},2616:function(e,t,r){"use strict";var n=r(5924),a=r(1200),i=r(2200).getGraphDiv,o=r(2456),l=e.exports={};l.wrapped=function(e,t,r){(e=i(e))._fullLayout&&a.clear(e._fullLayout._uid+o.HOVERID),l.raw(e,t,r)},l.raw=function(e,t){var r=e._fullLayout,a=e._hoverdata;t||(t={}),t.target&&!e._dragged&&!1===n.triggerHandler(e,"plotly_beforehover",t)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._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,r){"use strict";var n=r(3428),a=r(3400),i=a.numberFormat,o=r(8248),l=r(9760),s=r(4040),c=r(6308),u=r(8932),f=a.strTranslate,d=r(2736),h=r(9616),p=r(4284).LINE_SPACING,v=r(3448).DESELECTDIM,g=r(3028),y=r(7152),m=r(624).appendArrayPointValue,x=e.exports={};function b(e,t,r,n){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),u=a.fgopacity,f=x.getPatternAttr(a.size,0,8),d=x.getPatternAttr(a.solidity,0,.3),h=t.uid;x.pattern(e,"point",r,h,o,f,d,void 0,a.fillmode,l,s,u)}else if(i&&"none"!==i.type){var p,v,g=i.type,y="scatterfill-"+t.uid;n&&(y="legendfill-"+t.uid),n||void 0===i.start&&void 0===i.stop?("horizontal"===g&&(g+="reversed"),e.call(x.gradient,r,y,g,i.colorscale,"fill")):("horizontal"===g?(p={x:i.start,y:0},v={x:i.stop,y:0}):"vertical"===g&&(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(A,r,y,"linear",i.colorscale,"fill",p,v,!0,!1))}else t.fillcolor&&e.call(c.fill,t.fillcolor)}x.font=function(e,t,r,n){a.isPlainObject(t)&&(n=t.color,r=t.size,t=t.family),t&&e.style("font-family",t),r+1&&e.style("font-size",r+"px"),n&&e.call(c.fill,n)},x.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)},x.setSize=function(e,t,r){e.attr("width",t).attr("height",r)},x.setRect=function(e,t,r,n,a){e.call(x.setPosition,t,r).call(x.setSize,n,a)},x.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),i=n.c2p(e.y);return!!(o(a)&&o(i)&&t.node())&&("text"===t.node().nodeName?t.attr("x",a).attr("y",i):t.attr("transform",f(a,i)),!0)},x.translatePoints=function(e,t,r){e.each((function(e){var a=n.select(this);x.translatePoint(e,a,t,r)}))},x.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,a=t.yaxis;e.each((function(t){var i=t[0].trace,o=i.xcalendar,l=i.ycalendar,c=s.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(c).each((function(e){x.hideOutsideRangePoint(e,n.select(this),r,a,o,l)}))}))}},x.crispRound=function(e,t,r){return t&&o(t)?e._context.staticPlot?t:t<1?1:Math.round(t):r||0},x.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";c.stroke(t,n||i.color),x.dashLine(t,l,o)},x.lineGroupStyle=function(e,t,r,a){e.style("fill","none").each((function(e){var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";n.select(this).call(c.stroke,r||i.color).call(x.dashLine,l,o)}))},x.dashLine=function(e,t,r){r=+r||0,t=x.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})},x.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e},x.singleFillStyle=function(e,t){var r=n.select(e.node());b(e,((r.data()[0]||[])[0]||{}).trace||{},t,!1)},x.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each((function(e){var a=n.select(this);e[0].trace&&b(a,e[0].trace,t,r)}))};var _=r(1984);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(_).forEach((function(e){var t=_[e],r=t.n;x.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),x.symbolNames[r]=e,x.symbolFuncs[r]=t.f,x.symbolBackOffs[r]=t.backoff||0,t.needLine&&(x.symbolNeedLines[r]=!0),t.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(x.symbolNoFill[r]=!0)}));var w=x.symbolNames.length;function T(e,t,r,n){var a=e%100;return x.symbolFuncs[a](t,r,n)+(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>=w||e>=400?0:Math.floor(Math.max(e,0))};var M=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 A(e,t,r,i,o,s,u,f,d,h){var p,v=o.length;"linear"===i?p={node:"linearGradient",attrs:{x1:u.x,y1:u.y,x2:f.x,y2:f.y,gradientUnits:d?"userSpaceOnUse":"objectBoundingBox"},reversed:h}:"radial"===i&&(p={node:"radialGradient",reversed:h});for(var g=new Array(v),y=0;y<v;y++)p.reversed?g[v-1-y]=[M(100*(1-o[y][0])),o[y][1]]:g[y]=[M(100*o[y][0]),o[y][1]];var m=t._fullLayout,x="g"+m._uid+"-"+r,b=m._defs.select(".gradients").selectAll("#"+x).data([i+g.join(";")],a.identity);b.exit().remove(),b.enter().append(p.node).each((function(){var e=n.select(this);p.attrs&&e.attr(p.attrs),e.attr("id",x);var t=e.selectAll("stop").data(g);t.exit().remove(),t.enter().append("stop"),t.each((function(e){var t=l(e[1]);n.select(this).attr({offset:e[0]+"%","stop-color":c.tinyRGB(t),"stop-opacity":t.getAlpha()})}))})),e.style(s,j(x,t)).style(s+"-opacity",null),e.classed("gradient_filled",!0)}x.gradient=function(e,t,r,n,a,i){var o=k[n];return A(e,t,r,o.type,a,i,o.start,o.stop,!1,o.reversed)},x.pattern=function(e,t,r,i,o,s,u,f,d,h,p,v){var g="legend"===t;f&&("overlay"===d?(h=f,p=c.contrast(h)):(h=void 0,p=f));var y,m,x,b,_,w,T,M,k,A=r._fullLayout,L="p"+A._uid+"-"+i,S={},D=l(p),O=c.tinyRGB(D),C=v*D.getAlpha();switch(o){case"/":y=s*Math.sqrt(2),m=s*Math.sqrt(2),w="path",S={d:x="M-"+y/4+","+m/4+"l"+y/2+",-"+m/2+"M0,"+m+"L"+y+",0M"+y/4*3+","+m/4*5+"l"+y/2+",-"+m/2,opacity:C,stroke:O,"stroke-width":(b=u*s)+"px"};break;case"\\":y=s*Math.sqrt(2),m=s*Math.sqrt(2),w="path",S={d:x="M"+y/4*3+",-"+m/4+"l"+y/2+","+m/2+"M0,0L"+y+","+m+"M-"+y/4+","+m/4*3+"l"+y/2+","+m/2,opacity:C,stroke:O,"stroke-width":(b=u*s)+"px"};break;case"x":y=s*Math.sqrt(2),m=s*Math.sqrt(2),x="M-"+y/4+","+m/4+"l"+y/2+",-"+m/2+"M0,"+m+"L"+y+",0M"+y/4*3+","+m/4*5+"l"+y/2+",-"+m/2+"M"+y/4*3+",-"+m/4+"l"+y/2+","+m/2+"M0,0L"+y+","+m+"M-"+y/4+","+m/4*3+"l"+y/2+","+m/2,b=s-s*Math.sqrt(1-u),w="path",S={d:x,opacity:C,stroke:O,"stroke-width":b+"px"};break;case"|":w="path",w="path",S={d:x="M"+(y=s)/2+",0L"+y/2+","+(m=s),opacity:C,stroke:O,"stroke-width":(b=u*s)+"px"};break;case"-":w="path",w="path",S={d:x="M0,"+(m=s)/2+"L"+(y=s)+","+m/2,opacity:C,stroke:O,"stroke-width":(b=u*s)+"px"};break;case"+":w="path",x="M"+(y=s)/2+",0L"+y/2+","+(m=s)+"M0,"+m/2+"L"+y+","+m/2,b=s-s*Math.sqrt(1-u),w="path",S={d:x,opacity:C,stroke:O,"stroke-width":b+"px"};break;case".":y=s,m=s,u<Math.PI/4?_=Math.sqrt(u*s*s/Math.PI):(T=u,M=Math.PI/4,1,_=(k=s/2)+(s/Math.sqrt(2)-k)*(T-M)/(1-M)),w="circle",S={cx:y/2,cy:m/2,r:_,opacity:C,fill:O}}var P=[o||"noSh",h||"noBg",p||"noFg",s,u].join(";"),I=A._defs.select(".patterns").selectAll("#"+L).data([P],a.identity);I.exit().remove(),I.enter().append("pattern").each((function(){var e=n.select(this);if(e.attr({id:L,width:y+"px",height:m+"px",patternUnits:"userSpaceOnUse",patternTransform:g?"scale(0.8)":""}),h){var t=l(h),r=c.tinyRGB(t),a=t.getAlpha(),i=e.selectAll("rect").data([0]);i.exit().remove(),i.enter().append("rect").attr({width:y+"px",height:m+"px",fill:r,"fill-opacity":a})}var o=e.selectAll(w).data([0]);o.exit().remove(),o.enter().append(w).attr(S)})),e.style("fill",j(L,r)).style("fill-opacity",null),e.classed("pattern_filled",!0)},x.initGradients=function(e){var t=e._fullLayout;a.ensureSingle(t._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),n.select(e).selectAll(".gradient_filled").classed("gradient_filled",!1)},x.initPatterns=function(e){var t=e._fullLayout;a.ensureSingle(t._defs,"g","patterns").selectAll("pattern").remove(),n.select(e).selectAll(".pattern_filled").classed("pattern_filled",!1)},x.getPatternAttr=function(e,t,r){return e&&a.isArrayOrTypedArray(e)?t<e.length?e[t]:r:e},x.pointStyle=function(e,t,r,a){if(e.size()){var i=x.makePointStyleFns(t);e.each((function(e){x.singlePointStyle(e,n.select(this),t,i,r,a)}))}},x.singlePointStyle=function(e,t,r,n,i,o){var l=r.marker,s=l.line;if(o&&o.i>=0&&void 0===e.i&&(e.i=o.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):void 0===e.mo?l.opacity:e.mo),n.ms2mrc){var u;u="various"===e.ms||"various"===l.size?3:n.ms2mrc(e.ms),e.mrc=u,n.selectedSizeFn&&(u=e.mrc=n.selectedSizeFn(e));var f=x.symbolNumber(e.mx||l.symbol)||0;e.om=f%200>=100;var d=te(e,r),h=U(e,r);t.attr("d",T(f,u,d,h))}var p,v,g,y=!1;if(e.so)g=s.outlierwidth,v=s.outliercolor,p=l.outliercolor;else{var m=(s||{}).width;g=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,v="mlc"in e?e.mlcc=n.lineScale(e.mlc):a.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,a.isArrayOrTypedArray(l.color)&&(p=c.defaultLine,y=!0),p="mc"in e?e.mcc=n.markerScale(e.mc):l.color||l.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(e))}if(e.om)t.call(c.stroke,p).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var b=l.gradient,_=e.mgt;_?y=!0:_=b&&b.type,a.isArrayOrTypedArray(_)&&(_=_[0],k[_]||(_=0));var w=l.pattern,M=w&&x.getPatternAttr(w.shape,e.i,"");if(_&&"none"!==_){var A=e.mgc;A?y=!0:A=b.color;var L=r.uid;y&&(L+="-"+e.i),x.gradient(t,i,L,_,[[0,A],[1,p]],"fill")}else if(M){var S=!1,D=w.fgcolor;!D&&o&&o.color&&(D=o.color,S=!0);var O=x.getPatternAttr(D,e.i,o&&o.color||null),C=x.getPatternAttr(w.bgcolor,e.i,null),P=w.fgopacity,I=x.getPatternAttr(w.size,e.i,8),R=x.getPatternAttr(w.solidity,e.i,.3);S=S||e.mcc||a.isArrayOrTypedArray(w.shape)||a.isArrayOrTypedArray(w.bgcolor)||a.isArrayOrTypedArray(w.fgcolor)||a.isArrayOrTypedArray(w.size)||a.isArrayOrTypedArray(w.solidity);var z=r.uid;S&&(z+="-"+e.i),x.pattern(t,"point",i,z,M,I,R,e.mcc,w.fillmode,C,O,P)}else a.isArrayOrTypedArray(p)?c.fill(t,p[e.i]):c.fill(t,p);g&&c.stroke(t,v)}},x.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=x.tryColorscale(r,""),t.lineScale=x.tryColorscale(r,"line"),s.traceIs(e,"symbols")&&(t.ms2mrc=g.isBubble(e)?y(e):function(){return(r.size||6)/2}),e.selectedpoints&&a.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},o=r.marker||{},l=n.marker||{},c=i.opacity,u=o.opacity,f=l.opacity,d=void 0!==u,h=void 0!==f;(a.isArrayOrTypedArray(c)||d||h)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?i.opacity:e.mo;return e.selected?d?u:t:h?f:v*t});var p=i.color,g=o.color,y=l.color;(g||y)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?g||t:y||t});var m=i.size,x=o.size,b=l.size,_=void 0!==x,w=void 0!==b;return s.traceIs(e,"symbols")&&(_||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||m/2;return e.selected?_?x/2:t:w?b/2:t}),t},x.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,s=i.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||l;return e.selected?s||t:u||(s?t:c.addOpacity(t,v))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedPointStyleFns(t),a=t.marker||{},i=[];r.selectedOpacityFn&&i.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&i.push((function(e,t){c.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&i.push((function(e,n){var i=n.mx||a.symbol||0,o=r.selectedSizeFn(n);e.attr("d",T(x.symbolNumber(i),o,te(n,t),U(n,t))),n.mrc2=o})),i.length&&e.each((function(e){for(var t=n.select(this),r=0;r<i.length;r++)i[r](t,e)}))}},x.tryColorscale=function(e,t){var r=t?a.nestedProperty(e,t).get():e;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&a.isArrayOrTypedArray(n))return u.makeColorScaleFuncFromTrace(r)}return a.identity};var L,S,D={start:1,end:-1,middle:0,bottom:1,top:-1};function O(e,t,r,a,i){var o=n.select(e.node().parentNode),l=-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle",s=-1!==t.indexOf("left")?"end":-1!==t.indexOf("right")?"start":"middle",c=a?a/.8+1:0,u=(d.lineCount(e)-1)*p+1,h=D[s]*c,v=.75*r+D[l]*c+(D[l]-1)*u*r/2;e.attr("text-anchor",s),i||o.attr("transform",f(h,v))}function C(e,t){var r=e.ts||t.textfont.size;return o(r)&&r>0?r:0}function P(e,t,r){return r&&(e=E(e)),t?R(e[1]):I(e[0])}function I(e){var t=n.round(e,2);return L=t,t}function R(e){var t=n.round(e,2);return S=t,t}function z(e,t,r,n){var a=e[0]-t[0],i=e[1]-t[1],o=r[0]-t[0],l=r[1]-t[1],s=Math.pow(a*a+i*i,.25),c=Math.pow(o*o+l*l,.25),u=(c*c*a-s*s*o)*n,f=(c*c*i-s*s*l)*n,d=3*c*(s+c),h=3*s*(s+c);return[[I(t[0]+(d&&u/d)),R(t[1]+(d&&f/d))],[I(t[0]-(h&&u/h)),R(t[1]-(h&&f/h))]]}x.textPointStyle=function(e,t,r){if(e.size()){var i;if(t.selectedpoints){var o=x.makeSelectedTextStyleFns(t);i=o.selectedTextColorFn}var l=t.texttemplate,s=r._fullLayout;e.each((function(e){var o=n.select(this),c=l?a.extractOption(e,t,"txt","texttemplate"):a.extractOption(e,t,"tx","text");if(c||0===c){if(l){var u=t._module.formatLabels,f=u?u(e,t,s):{},h={};m(h,t,e.i);var p=t._meta||{};c=a.texttemplateString(c,f,s._d3locale,h,e,p)}var v=e.tp||t.textposition,g=C(e,t),y=i?i(e):e.tc||t.textfont.color;o.call(x.font,e.tf||t.textfont.family,g,y).text(c).call(d.convertToTspans,r).call(O,v,g,e.mrc)}else o.remove()}))}},x.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedTextStyleFns(t);e.each((function(e){var a=n.select(this),i=r.selectedTextColorFn(e),o=e.tp||t.textposition,l=C(e,t);c.fill(a,i);var u=s.traceIs(t,"bar-like");O(a,o,l,e.mrc2||e.mrc,u)}))}},x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],a=[];for(r=1;r<e.length-1;r++)a.push(z(e[r-1],e[r],e[r+1],t));for(n+="Q"+a[0][0]+" "+e[1],r=2;r<e.length-1;r++)n+="C"+a[r-2][1]+" "+a[r-1][0]+" "+e[r];return n+"Q"+a[e.length-3][1]+" "+e[e.length-1]},x.smoothclosed=function(e,t){if(e.length<3)return"M"+e.join("L")+"Z";var r,n="M"+e[0],a=e.length-1,i=[z(e[a],e[0],e[1],t)];for(r=1;r<a;r++)i.push(z(e[r-1],e[r],e[r+1],t));for(i.push(z(e[a-1],e[a],e[0],t)),r=1;r<=a;r++)n+="C"+i[r-1][1]+" "+i[r][0]+" "+e[r];return n+"C"+i[a][1]+" "+i[0][0]+" "+e[0]+"Z"};var N={hv:function(e,t,r){return"H"+I(t[0])+"V"+P(t,1,r)},vh:function(e,t,r){return"V"+R(t[1])+"H"+P(t,0,r)},hvh:function(e,t,r){return"H"+I((e[0]+t[0])/2)+"V"+R(t[1])+"H"+P(t,0,r)},vhv:function(e,t,r){return"V"+R((e[1]+t[1])/2)+"H"+I(t[0])+"V"+P(t,1,r)}},F=function(e,t,r){return"L"+P(t,0,r)+","+P(t,1,r)};function E(e,t){var r=e.backoff,n=e.trace,i=e.d,o=e.i;if(r&&n&&n.marker&&n.marker.angle%360==0&&n.line&&"spline"!==n.line.shape){var l=a.isArrayOrTypedArray(r),s=e,c=t?t[0]:L||0,u=t?t[1]:S||0,f=s[0],d=s[1],h=f-c,p=d-u,v=Math.atan2(p,h),g=l?r[o]:r;if("auto"===g){var y=s.i;"scatter"===n.type&&y--;var m=s.marker,b=m.symbol;a.isArrayOrTypedArray(b)&&(b=b[y]);var _=m.size;a.isArrayOrTypedArray(_)&&(_=_[y]),g=m?x.symbolBackOffs[x.symbolNumber(b)]*_:0,g+=x.getMarkerStandoff(i[y],n)||0}var w=f-g*Math.cos(v),T=d-g*Math.sin(v);(w<=f&&w>=c||w>=f&&w<=c)&&(T<=d&&T>=u||T>=d&&T<=u)&&(e=[w,T])}return e}x.steps=function(e){var t=N[e]||F;return function(e){for(var r="M"+I(e[0][0])+","+R(e[0][1]),n=e.length,a=1;a<n;a++)r+=t(e[a-1],e[a],a===n-1);return r}},x.applyBackoff=E,x.makeTester=function(){var e=a.ensureSingleById(n.select("body"),"svg","js-plotly-tester",(function(e){e.attr(h.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})})),t=a.ensureSingle(e,"path","js-reference-point",(function(e){e.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})}));x.tester=e,x.testref=t},x.savedBBoxes={};var H=0;function B(e){var t=e.getAttribute("data-unformatted");if(null!==t)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}function j(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}x.bBox=function(e,t,r){var i,o,l;if(r||(r=B(e)),r){if(i=x.savedBBoxes[r])return a.extendFlat({},i)}else if(1===e.childNodes.length){var s=e.childNodes[0];if(r=B(s)){var c=+s.getAttribute("x")||0,u=+s.getAttribute("y")||0,f=s.getAttribute("transform");if(!f){var h=x.bBox(s,!1,r);return c&&(h.left+=c,h.right+=c),u&&(h.top+=u,h.bottom+=u),h}if(r+="~"+c+"~"+u+"~"+f,i=x.savedBBoxes[r])return a.extendFlat({},i)}}t?o=e:(l=x.tester.node(),o=e.cloneNode(!0),l.appendChild(o)),n.select(o).attr("transform",null).call(d.positionText,0,0);var p=o.getBoundingClientRect(),v=x.testref.node().getBoundingClientRect();t||l.removeChild(o);var g={height:p.height,width:p.width,left:p.left-v.left,top:p.top-v.top,right:p.right-v.left,bottom:p.bottom-v.top};return H>=1e4&&(x.savedBBoxes={},H=0),r&&(x.savedBBoxes[r]=g),H++,a.extendFlat({},g)},x.setClipUrl=function(e,t,r){e.attr("clip-path",j(t,r))},x.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},x.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=f(t,r)).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,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},x.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+="scale("+t+","+r+")").trim(),e[a]("transform",i),i};var Y=/\s*sc.*/;x.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(Y,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var V=/translate\([^)]*\)\s*$/;function U(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}x.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,a=n.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(V);e=1===t&&1===r?[]:[f(o,l),"scale("+t+","+r+")",f(-o,-l)],s&&e.push(s),a.attr("transform",e.join(""))}}))},x.getMarkerStandoff=U;var q,G,Z,W,X,J,K=Math.atan2,Q=Math.cos,$=Math.sin;function ee(e,t){var r=t[0],n=t[1];return[r*Q(e)-n*$(e),r*$(e)+n*Q(e)]}function te(e,t){var r,n,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);r=s[0],n=s[1]}else{var c=t._xA,u=t._yA;if(!c||!u)return 90;r=c.c2p(e.x),n=u.c2p(e.y)}if(t._geo){var f,d=e.lonlat[0],h=e.lonlat[1],p=t._geo.project([d,h+1e-5]),v=t._geo.project([d+1e-5,h]),g=K(v[1]-n,v[0]-r),y=K(p[1]-n,p[0]-r);if("north"===l)f=i/180*Math.PI;else if("previous"===l){var m=d/180*Math.PI,x=h/180*Math.PI,b=q/180*Math.PI,_=G/180*Math.PI,w=b-m,T=Q(_)*$(w),M=$(_)*Q(x)-Q(_)*$(x)*Q(w);f=-K(T,M)-Math.PI,q=d,G=h}var k=ee(g,[Q(f),0]),A=ee(y,[$(f),0]);i=K(k[1]+A[1],k[0]+A[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(r)&&o(n)){var L=r-Z,S=n-W,D=t.line&&t.line.shape||"",O=D.slice(D.length-1);"h"===O&&(S=0),"v"===O&&(L=0),i+=K(S,L)/Math.PI*180+90}else i=null}return Z=r,W=n,X=e.i,J=t.uid,i}x.getMarkerAngle=te},1984:function(e,t,r){"use strict";var n,a,i,o,l=r(9604),s=r(3428).round,c="M0,0Z",u=Math.sqrt(2),f=Math.sqrt(3),d=Math.PI,h=Math.cos,p=Math.sin;function v(e){return null===e}function g(e,t,r){if(!(e&&e%360!=0||t))return r;if(i===e&&o===t&&n===r)return a;function s(e,r){var n=h(e),a=p(e),i=r[0],o=r[1]+(t||0);return[i*n-o*a,i*a+o*n]}i=e,o=t,n=r;for(var c=e/180*d,u=0,f=0,v=l(r),g="",y=0;y<v.length;y++){var m=v[y],x=m[0],b=u,_=f;if("M"===x||"L"===x)u=+m[1],f=+m[2];else if("m"===x||"l"===x)u+=+m[1],f+=+m[2];else if("H"===x)u=+m[1];else if("h"===x)u+=+m[1];else if("V"===x)f=+m[1];else if("v"===x)f+=+m[1];else if("A"===x){u=+m[1],f=+m[2];var w=s(c,[+m[6],+m[7]]);m[6]=w[0],m[7]=w[1],m[3]=+m[3]+e}"H"!==x&&"V"!==x||(x="L"),"h"!==x&&"v"!==x||(x="l"),"m"!==x&&"l"!==x||(u-=b,f-=_);var T=s(c,[u,f]);"H"!==x&&"V"!==x||(x="L"),"M"!==x&&"L"!==x&&"m"!==x&&"l"!==x||(m[1]=T[0],m[2]=T[1]),m[0]=x,g+=m[0]+m.slice(1).join(",")}return a=g,g}e.exports={circle:{n:0,f:function(e,t,r){if(v(t))return c;var n=s(e,2),a="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?g(t,r,a):a}},square:{n:1,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(v(t))return c;var n=s(1.3*e,2);return g(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(v(t))return c;var n=s(.4*e,2),a=s(1.2*e,2);return g(t,r,"M"+a+","+n+"H"+n+"V"+a+"H-"+n+"V"+n+"H-"+a+"V-"+n+"H-"+n+"V-"+a+"H"+n+"V-"+n+"H"+a+"Z")}},x:{n:4,f:function(e,t,r){if(v(t))return c;var n=s(.8*e/u,2),a="l"+n+","+n,i="l"+n+",-"+n,o="l-"+n+",-"+n,l="l-"+n+","+n;return g(t,r,"M0,"+n+a+i+o+i+o+l+o+l+a+l+a+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(v(t))return c;var n=s(2*e/f,2);return g(t,r,"M-"+n+","+s(e/2,2)+"H"+n+"L0,-"+s(e,2)+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(v(t))return c;var n=s(2*e/f,2);return g(t,r,"M-"+n+",-"+s(e/2,2)+"H"+n+"L0,"+s(e,2)+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(v(t))return c;var n=s(2*e/f,2);return g(t,r,"M"+s(e/2,2)+",-"+n+"V"+n+"L-"+s(e,2)+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(v(t))return c;var n=s(2*e/f,2);return g(t,r,"M-"+s(e/2,2)+",-"+n+"V"+n+"L"+s(e,2)+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(v(t))return c;var n=s(.6*e,2),a=s(1.2*e,2);return g(t,r,"M-"+a+",-"+n+"H"+n+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(v(t))return c;var n=s(.6*e,2),a=s(1.2*e,2);return g(t,r,"M"+n+",-"+a+"V"+n+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(v(t))return c;var n=s(.6*e,2),a=s(1.2*e,2);return g(t,r,"M"+a+","+n+"H-"+n+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(v(t))return c;var n=s(.6*e,2),a=s(1.2*e,2);return g(t,r,"M-"+n+","+a+"V-"+n+"H"+a+"Z")}},pentagon:{n:13,f:function(e,t,r){if(v(t))return c;var n=s(.951*e,2),a=s(.588*e,2),i=s(-e,2),o=s(-.309*e,2);return g(t,r,"M"+n+","+o+"L"+a+","+s(.809*e,2)+"H-"+a+"L-"+n+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,t,r){if(v(t))return c;var n=s(e,2),a=s(e/2,2),i=s(e*f/2,2);return g(t,r,"M"+i+",-"+a+"V"+a+"L0,"+n+"L-"+i+","+a+"V-"+a+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(v(t))return c;var n=s(e,2),a=s(e/2,2),i=s(e*f/2,2);return g(t,r,"M-"+a+","+i+"H"+a+"L"+n+",0L"+a+",-"+i+"H-"+a+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(v(t))return c;var n=s(.924*e,2),a=s(.383*e,2);return g(t,r,"M-"+a+",-"+n+"H"+a+"L"+n+",-"+a+"V"+a+"L"+a+","+n+"H-"+a+"L-"+n+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,t,r){if(v(t))return c;var n=1.4*e,a=s(.225*n,2),i=s(.951*n,2),o=s(.363*n,2),l=s(.588*n,2),u=s(-n,2),f=s(-.309*n,2),d=s(.118*n,2),h=s(.809*n,2);return g(t,r,"M"+a+","+f+"H"+i+"L"+o+","+d+"L"+l+","+h+"L0,"+s(.382*n,2)+"L-"+l+","+h+"L-"+o+","+d+"L-"+i+","+f+"H-"+a+"L0,"+u+"Z")}},hexagram:{n:18,f:function(e,t,r){if(v(t))return c;var n=s(.66*e,2),a=s(.38*e,2),i=s(.76*e,2);return g(t,r,"M-"+i+",0l-"+a+",-"+n+"h"+i+"l"+a+",-"+n+"l"+a+","+n+"h"+i+"l-"+a+","+n+"l"+a+","+n+"h-"+i+"l-"+a+","+n+"l-"+a+",-"+n+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(v(t))return c;var n=s(e*f*.8,2),a=s(.8*e,2),i=s(1.6*e,2),o=s(4*e,2),l="A "+o+","+o+" 0 0 1 ";return g(t,r,"M-"+n+","+a+l+n+","+a+l+"0,-"+i+l+"-"+n+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(v(t))return c;var n=s(e*f*.8,2),a=s(.8*e,2),i=s(1.6*e,2),o=s(4*e,2),l="A "+o+","+o+" 0 0 1 ";return g(t,r,"M"+n+",-"+a+l+"-"+n+",-"+a+l+"0,"+i+l+n+",-"+a+"Z")}},"star-square":{n:21,f:function(e,t,r){if(v(t))return c;var n=s(1.1*e,2),a=s(2*e,2),i="A "+a+","+a+" 0 0 1 ";return g(t,r,"M-"+n+",-"+n+i+"-"+n+","+n+i+n+","+n+i+n+",-"+n+i+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(v(t))return c;var n=s(1.4*e,2),a=s(1.9*e,2),i="A "+a+","+a+" 0 0 1 ";return g(t,r,"M-"+n+",0"+i+"0,"+n+i+n+",0"+i+"0,-"+n+i+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(v(t))return c;var n=s(.7*e,2),a=s(1.4*e,2);return g(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(v(t))return c;var n=s(1.4*e,2),a=s(.7*e,2);return g(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(v(t))return c;var n=s(e,2),a=s(e/u,2);return g(t,r,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(v(t))return c;var n=s(1.3*e,2);return g(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(v(t))return c;var n=s(1.3*e,2),a=s(.65*e,2);return g(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(v(t))return c;var n=s(1.4*e,2);return g(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(v(t))return c;var n=s(1.2*e,2),a=s(.85*e,2);return g(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(v(t))return c;var n=s(e/2,2),a=s(e,2);return g(t,r,"M"+n+","+a+"V-"+a+"M"+(n-a)+",-"+a+"V"+a+"M"+a+","+n+"H-"+a+"M-"+a+","+(n-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(v(t))return c;var n=s(1.2*e,2),a=s(1.6*e,2),i=s(.8*e,2);return g(t,r,"M-"+n+","+i+"L0,0M"+n+","+i+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(v(t))return c;var n=s(1.2*e,2),a=s(1.6*e,2),i=s(.8*e,2);return g(t,r,"M-"+n+",-"+i+"L0,0M"+n+",-"+i+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(v(t))return c;var n=s(1.2*e,2),a=s(1.6*e,2),i=s(.8*e,2);return g(t,r,"M"+i+","+n+"L0,0M"+i+",-"+n+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(v(t))return c;var n=s(1.2*e,2),a=s(1.6*e,2),i=s(.8*e,2);return g(t,r,"M-"+i+","+n+"L0,0M-"+i+",-"+n+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(v(t))return c;var n=s(1.4*e,2);return g(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(v(t))return c;var n=s(1.4*e,2);return g(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M0,0L-"+n+","+s(2*e,2)+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M0,0L-"+n+",-"+s(2*e,2)+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(v(t))return c;var n=s(2*e,2),a=s(e,2);return g(t,r,"M0,0L"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(v(t))return c;var n=s(2*e,2),a=s(e,2);return g(t,r,"M0,0L-"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+s(2*e,2)+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(v(t))return c;var n=s(e,2);return g(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+s(2*e,2)+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(v(t))return c;var n=s(2*e,2),a=s(e,2);return g(t,r,"M0,-"+a+"V"+a+"M0,0L"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(v(t))return c;var n=s(2*e,2),a=s(e,2);return g(t,r,"M0,-"+a+"V"+a+"M0,0L-"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(v(t))return c;var n=d/2.5,a=2*e*h(n),i=2*e*p(n);return g(t,r,"M0,0L"+-a+","+i+"L"+a+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(v(t))return c;var n=d/4,a=2*e*h(n),i=2*e*p(n);return g(t,r,"M0,0L"+-a+","+i+"A "+2*e+","+2*e+" 0 0 1 "+a+","+i+"Z")},backoff:.4,noDot:!0}}},7644:function(e){"use strict";e.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},4880:function(e,t,r){"use strict";var n=r(8248),a=r(4040),i=r(4460),o=r(3400),l=r(3792);function s(e,t,r,a){var s=t["error_"+a]||{},c=[];if(s.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=l(s),f=0;f<e.length;f++){var d=e[f],h=d.i;if(void 0===h)h=f;else if(null===h)continue;var p=d[a];if(n(r.c2l(p))){var v=u(p,h);if(n(v[0])&&n(v[1])){var g=d[a+"s"]=p-v[0],y=d[a+"h"]=p+v[1];c.push(g,y)}}}var m=r._id,x=t._extremes[m],b=i.findExtremes(r,c,o.extendFlat({tozero:x.opts.tozero},{padded:!0}));x.min=x.min.concat(b.min),x.max=x.max.concat(b.max)}}e.exports=function(e){for(var t=e.calcdata,r=0;r<t.length;r++){var n=t[r],o=n[0].trace;if(!0===o.visible&&a.traceIs(o,"errorBarsOK")){var l=i.getFromId(e,o.xaxis),c=i.getFromId(e,o.yaxis);s(n,o,l,"x"),s(n,o,c,"y")}}}},3792:function(e){"use strict";function t(e,t){return"percent"===e?function(e){return Math.abs(e*t/100)}:"constant"===e?function(){return Math.abs(t)}:"sqrt"===e?function(e){return Math.sqrt(Math.abs(e))}:void 0}e.exports=function(e){var r=e.type,n=e.symmetric;if("data"===r){var a=e.array||[];if(n)return function(e,t){var r=+a[t];return[r,r]};var i=e.arrayminus||[];return function(e,t){var r=+a[t],n=+i[t];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=t(r,e.value),l=t(r,e.valueminus);return n||void 0===e.valueminus?function(e){var t=o(e);return[t,t]}:function(e){return[l(e),o(e)]}}},5200:function(e,t,r){"use strict";var n=r(8248),a=r(4040),i=r(3400),o=r(1780),l=r(7644);e.exports=function(e,t,r,s){var c="error_"+s.axis,u=o.newContainer(t,c),f=e[c]||{};function d(e,t){return i.coerce(f,u,l,e,t)}if(!1!==d("visible",void 0!==f.array||void 0!==f.value||"sqrt"===f.type)){var h=d("type","array"in f?"data":"percent"),p=!0;"sqrt"!==h&&(p=d("symmetric",!(("data"===h?"arrayminus":"valueminus")in f))),"data"===h?(d("array"),d("traceref"),p||(d("arrayminus"),d("tracerefminus"))):"percent"!==h&&"constant"!==h||(d("value"),p||d("valueminus"));var v="copy_"+s.inherit+"style";s.inherit&&(t["error_"+s.inherit]||{}).visible&&d(v,!(f.color||n(f.thickness)||n(f.width))),s.inherit&&u[v]||(d("color",r),d("thickness"),d("width",a.traceIs(t,"gl3d")?0:4))}}},4968:function(e,t,r){"use strict";var n=r(3400),a=r(7824).overrideAll,i=r(7644),o={error_x:n.extendFlat({},i),error_y:n.extendFlat({},i)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var l={error_x:n.extendFlat({},i),error_y:n.extendFlat({},i),error_z:n.extendFlat({},i)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,e.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:a(l,"calc","nested"),scattergl:a(o,"calc","nested")}},supplyDefaults:r(5200),calc:r(4880),makeComputeError:r(3792),plot:r(8512),style:r(2036),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}},8512:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=r(3616),o=r(3028);e.exports=function(e,t,r,l){var s=r.xaxis,c=r.yaxis,u=l&&l.duration>0,f=e._context.staticPlot;t.each((function(t){var d,h=t[0].trace,p=h.error_x||{},v=h.error_y||{};h.ids&&(d=function(e){return e.id});var g=o.hasMarkers(h)&&h.marker.maxdisplayed>0;v.visible||p.visible||(t=[]);var y=n.select(this).selectAll("g.errorbar").data(t,d);if(y.exit().remove(),t.length){p.visible||y.selectAll("path.xerror").remove(),v.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var m=y.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(l.duration).style("opacity",1),i.setClipUrl(y,r.layerClipId,e),y.each((function(e){var t=n.select(this),r=function(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return void 0!==e.yh&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),a(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),void 0!==e.xh&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),a(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}(e,s,c);if(!g||e.vis){var i,o=t.select("path.yerror");if(v.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var d=v.width;i="M"+(r.x-d)+","+r.yh+"h"+2*d+"m-"+d+",0V"+r.ys,r.noYS||(i+="m-"+d+",0h"+2*d),o.size()?u&&(o=o.transition().duration(l.duration).ease(l.easing)):o=t.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",i)}else o.remove();var h=t.select("path.xerror");if(p.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var y=(p.copy_ystyle?v:p).width;i="M"+r.xh+","+(r.y-y)+"v"+2*y+"m0,-"+y+"H"+r.xs,r.noXS||(i+="m0,-"+y+"v"+2*y),h.size()?u&&(h=h.transition().duration(l.duration).ease(l.easing)):h=t.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("xerror",!0),h.attr("d",i)}else h.remove()}}))}}))}},2036:function(e,t,r){"use strict";var n=r(3428),a=r(6308);e.exports=function(e){e.each((function(e){var t=e[0].trace,r=t.error_y||{},i=t.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),i.copy_ystyle&&(i=r),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)}))}},5756:function(e,t,r){"use strict";var n=r(5376),a=r(5460).hoverlabel,i=r(2880).extendFlat;e.exports={hoverlabel:{bgcolor:i({},a.bgcolor,{arrayOk:!0}),bordercolor:i({},a.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:i({},a.align,{arrayOk:!0}),namelength:i({},a.namelength,{arrayOk:!0}),editType:"none"}}},5056:function(e,t,r){"use strict";var n=r(3400),a=r(4040);function i(e,t,r,a){a=a||n.identity,Array.isArray(e)&&(t[0][r]=a(e))}e.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(e){return function(t){return n.coerceHoverinfo({hoverinfo:t},{_module:e._module},r)}}for(var l=0;l<t.length;l++){var s=t[l],c=s[0].trace;if(!a.traceIs(c,"pie-like")){var u=a.traceIs(c,"2dMap")?i:n.fillArray;u(c.hoverinfo,s,"hi",o(c)),c.hovertemplate&&u(c.hovertemplate,s,"ht"),c.hoverlabel&&(u(c.hoverlabel.bgcolor,s,"hbg"),u(c.hoverlabel.bordercolor,s,"hbc"),u(c.hoverlabel.font.size,s,"hts"),u(c.hoverlabel.font.color,s,"htc"),u(c.hoverlabel.font.family,s,"htf"),u(c.hoverlabel.namelength,s,"hnl"),u(c.hoverlabel.align,s,"hta"))}}}},2376:function(e,t,r){"use strict";var n=r(4040),a=r(3292).hover;e.exports=function(e,t,r){var i=n.getComponentMethod("annotations","onClick")(e,e._hoverdata);function o(){e.emit("plotly_click",{points:e._hoverdata,event:t})}void 0!==r&&a(e,t,r,!0),e._hoverdata&&t&&t.target&&(i&&i.then?i.then(o):o(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}},2456:function(e){"use strict";e.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},5448:function(e,t,r){"use strict";var n=r(3400),a=r(5756),i=r(6132);e.exports=function(e,t,r,o){var l=n.extendFlat({},o.hoverlabel);t.hovertemplate&&(l.namelength=-1),i(e,t,(function(r,i){return n.coerce(e,t,a,r,i)}),l)}},624:function(e,t,r){"use strict";var n=r(3400);t.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},t.isTraceInSubplots=function(e,r){if("splom"===e.type){for(var n=e.xaxes||[],a=e.yaxes||[],i=0;i<n.length;i++)for(var o=0;o<a.length;o++)if(-1!==r.indexOf(n[i]+a[o]))return!0;return!1}return-1!==r.indexOf(t.getSubplot(e))},t.flat=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=t;return r},t.p2c=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=e[n].p2c(t);return r},t.getDistanceFunction=function(e,r,n,a){return"closest"===e?a||t.quadrature(r,n):"x"===e.charAt(0)?r:n},t.getClosest=function(e,t,r){if(!1!==r.index)r.index>=0&&r.index<e.length?r.distance=0:r.index=!1;else for(var n=0;n<e.length;n++){var a=t(e[n]);a<=r.distance&&(r.index=n,r.distance=a)}return r},t.inbox=function(e,t,r){return e*t<0||0===e?r:1/0},t.quadrature=function(e,t){return function(r){var n=e(r),a=t(r);return Math.sqrt(n*n+a*a)}},t.makeEventData=function(e,r,n){var a="index"in e?e.index:e.pointNumber,i={data:r._input,fullData:r,curveNumber:r.index,pointNumber:a};if(r._indexToPoints){var o=r._indexToPoints[a];1===o.length?i.pointIndex=o[0]:i.pointIndices=o}else i.pointIndex=a;return r._module.eventData?i=r._module.eventData(i,e,r,n,a):("xVal"in e?i.x=e.xVal:"x"in e&&(i.x=e.x),"yVal"in e?i.y=e.yVal:"y"in e&&(i.y=e.y),e.xa&&(i.xaxis=e.xa),e.ya&&(i.yaxis=e.ya),void 0!==e.zLabelVal&&(i.z=e.zLabelVal)),t.appendArrayPointValue(i,r,a),i},t.appendArrayPointValue=function(e,t,r){var a=t._arrayAttrs;if(a)for(var l=0;l<a.length;l++){var s=a[l],c=i(s);if(void 0===e[c]){var u=o(n.nestedProperty(t,s).get(),r);void 0!==u&&(e[c]=u)}}},t.appendArrayMultiPointValues=function(e,t,r){var a=t._arrayAttrs;if(a)for(var l=0;l<a.length;l++){var s=a[l],c=i(s);if(void 0===e[c]){for(var u=n.nestedProperty(t,s).get(),f=new Array(r.length),d=0;d<r.length;d++)f[d]=o(u,r[d]);e[c]=f}}};var a={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function i(e){return a[e]||e}function o(e,t){return Array.isArray(t)?Array.isArray(e)&&Array.isArray(e[t[0]])?e[t[0]][t[1]]:void 0:e[t]}var l={x:!0,y:!0},s={"x unified":!0,"y unified":!0};t.isUnifiedHover=function(e){return"string"==typeof e&&!!s[e]},t.isXYhover=function(e){return"string"==typeof e&&!!l[e]}},3292:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=r(9760),o=r(3400),l=o.pushUnique,s=o.strTranslate,c=o.strRotate,u=r(5924),f=r(2736),d=r(2213),h=r(3616),p=r(6308),v=r(6476),g=r(4460),y=r(4040),m=r(624),x=r(2456),b=r(7864),_=r(1140),w=x.YANGLE,T=Math.PI*w/180,M=1/Math.sin(T),k=Math.cos(T),A=Math.sin(T),L=x.HOVERARROWSIZE,S=x.HOVERTEXTPAD,D={box:!0,ohlc:!0,violin:!0,candlestick:!0},O={scatter:!0,scattergl:!0,splom:!0};function C(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}t.hover=function(e,t,r,i){e=o.getGraphDiv(e);var s=t.target;o.throttle(e._fullLayout._uid+x.HOVERID,x.HOVERMINTIME,(function(){!function(e,t,r,i,s){r||(r="xy");var c,f=Array.isArray(r)?r:[r],h=e._fullLayout,x=h.hoversubplots,b=h._plots||[],_=b[r],w=h._has("cartesian"),T=t.hovermode||h.hovermode,k="x"===(T||"").charAt(0),A="y"===(T||"").charAt(0);if(w&&(k||A)&&"axis"===x)for(var S=f.length,P=0;P<S;P++)if(b[c=f[P]]){var R=g.getFromId(e,c,k?"x":"y")._subplotsWith;if(R&&R.length)for(var B=0;B<R.length;B++)l(f,R[B])}if(_&&"single"!==x){var U=_.overlays.map((function(e){return e.id}));f=f.concat(U)}for(var q=f.length,G=new Array(q),Z=new Array(q),W=!1,X=0;X<q;X++)if(b[c=f[X]])W=!0,G[X]=b[c].xaxis,Z[X]=b[c].yaxis;else{if(!h[c]||!h[c]._subplot)return void o.warn("Unrecognized subplot: "+c);var J=h[c]._subplot;G[X]=J.xaxis,Z[X]=J.yaxis}if(T&&!W&&(T="closest"),-1===["x","y","closest","x unified","y unified"].indexOf(T)||!e.calcdata||e.querySelector(".zoombox")||e._dragging)return v.unhoverRaw(e,t);var K=h.hoverdistance;-1===K&&(K=1/0);var Q=h.spikedistance;-1===Q&&(Q=1/0);var $,ee,te,re,ne,ae,ie,oe,le,se,ce,ue,fe,de=[],he=[],pe={hLinePoint:null,vLinePoint:null},ve=!1;if(Array.isArray(t))for(T="array",te=0;te<t.length;te++)(ne=e.calcdata[t[te].curveNumber||0])&&(ae=ne[0].trace,"skip"!==ne[0].trace.hoverinfo&&(he.push(ne),"h"===ae.orientation&&(ve=!0)));else{var ge,ye,me=e.calcdata.slice();for(me.sort((function(e,t){return(e[0].trace.zorder||0)-(t[0].trace.zorder||0)})),re=0;re<me.length;re++)ne=me[re],"skip"!==(ae=ne[0].trace).hoverinfo&&m.isTraceInSubplots(ae,f)&&(he.push(ne),"h"===ae.orientation&&(ve=!0));if(s){if(!1===u.triggerHandler(e,"plotly_beforehover",t))return;var xe=s.getBoundingClientRect();ge=t.clientX-xe.left,ye=t.clientY-xe.top,h._calcInverseTransform(e);var be=o.apply3DTransform(h._invTransform)(ge,ye);if(ge=be[0],ye=be[1],ge<0||ge>G[0]._length||ye<0||ye>Z[0]._length)return v.unhoverRaw(e,t)}else ge="xpx"in t?t.xpx:G[0]._length/2,ye="ypx"in t?t.ypx:Z[0]._length/2;if(t.pointerX=ge+G[0]._offset,t.pointerY=ye+Z[0]._offset,$="xval"in t?m.flat(f,t.xval):m.p2c(G,ge),ee="yval"in t?m.flat(f,t.yval):m.p2c(Z,ye),!a($[0])||!a(ee[0]))return o.warn("Fx.hover failed",t,e),v.unhoverRaw(e,t)}var _e=1/0;function we(r,n){for(re=0;re<he.length;re++)if((ne=he[re])&&ne[0]&&ne[0].trace&&!0===(ae=ne[0].trace).visible&&0!==ae._length&&-1===["carpet","contourcarpet"].indexOf(ae._module.name)){if(le=T,m.isUnifiedHover(le)&&(le=le.charAt(0)),"splom"===ae.type?ie=f[oe=0]:(ie=m.getSubplot(ae),oe=f.indexOf(ie)),ue={cd:ne,trace:ae,xa:G[oe],ya:Z[oe],maxHoverDistance:K,maxSpikeDistance:Q,index:!1,distance:Math.min(_e,K),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:p.defaultLine,name:ae.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},h[ie]&&(ue.subplot=h[ie]._subplot),h._splomScenes&&h._splomScenes[ae.uid]&&(ue.scene=h._splomScenes[ae.uid]),"array"===le){var i=t[re];"pointNumber"in i?(ue.index=i.pointNumber,le="closest"):(le="","xval"in i&&(se=i.xval,le="x"),"yval"in i&&(ce=i.yval,le=le?"closest":"y"))}else void 0!==r&&void 0!==n?(se=r,ce=n):(se=$[oe],ce=ee[oe]);if(fe=de.length,0!==K)if(ae._module&&ae._module.hoverPoints){var l=ae._module.hoverPoints(ue,se,ce,le,{finiteRange:!0,hoverLayer:h._hoverlayer,hoversubplots:x,gd:e});if(l)for(var s,c=0;c<l.length;c++)s=l[c],a(s.x0)&&a(s.y0)&&de.push(F(s,T))}else o.log("Unrecognized trace type in hover:",ae);if("closest"===T&&de.length>fe&&(de.splice(0,fe),_e=de[0].distance),w&&0!==Q&&0===de.length){ue.distance=Q,ue.index=!1;var u=ae._module.hoverPoints(ue,se,ce,"closest",{hoverLayer:h._hoverlayer});if(u&&(u=u.filter((function(e){return e.spikeDistance<=Q}))),u&&u.length){var d,v=u.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(v.length){var g=v[0];a(g.x0)&&a(g.y0)&&(d=Me(g),(!pe.vLinePoint||pe.vLinePoint.spikeDistance>d.spikeDistance)&&(pe.vLinePoint=d))}var y=u.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(y.length){var b=y[0];a(b.x0)&&a(b.y0)&&(d=Me(b),(!pe.hLinePoint||pe.hLinePoint.spikeDistance>d.spikeDistance)&&(pe.hLinePoint=d))}}}}}function Te(e,t,r){for(var n,a=null,i=1/0,o=0;o<e.length;o++)n=e[o].spikeDistance,r&&0===o&&(n=-1/0),n<=i&&n<=t&&(a=e[o],i=n);return a}function Me(e){return e?{xa:e.xa,ya:e.ya,x:void 0!==e.xSpike?e.xSpike:(e.x0+e.x1)/2,y:void 0!==e.ySpike?e.ySpike:(e.y0+e.y1)/2,distance:e.distance,spikeDistance:e.spikeDistance,curveNumber:e.trace.index,color:e.color,pointNumber:e.index}:null}we();var ke={fullLayout:h,container:h._hoverlayer,event:t},Ae=e._spikepoints,Le={vLinePoint:pe.vLinePoint,hLinePoint:pe.hLinePoint};e._spikepoints=Le;var Se=function(){"axis"!==x&&de.sort((function(e,t){return e.distance-t.distance})),de=function(e,t){for(var r=t.charAt(0),n=[],a=[],i=[],o=0;o<e.length;o++){var l=e[o];y.traceIs(l.trace,"bar-like")||y.traceIs(l.trace,"box-violin")?i.push(l):l.trace[r+"period"]?a.push(l):n.push(l)}return n.concat(a).concat(i)}(de,T)};Se();var De=T.charAt(0),Oe=("x"===De||"y"===De)&&de[0]&&O[de[0].trace.type];if(w&&0!==Q&&0!==de.length){var Ce=Te(de.filter((function(e){return e.ya.showspikes})),Q,Oe);pe.hLinePoint=Me(Ce);var Pe=Te(de.filter((function(e){return e.xa.showspikes})),Q,Oe);pe.vLinePoint=Me(Pe)}if(0===de.length){var Ie=v.unhoverRaw(e,t);return!w||null===pe.hLinePoint&&null===pe.vLinePoint||H(Ae)&&E(e,pe,ke),Ie}if(w&&H(Ae)&&E(e,pe,ke),m.isXYhover(le)&&0!==de[0].length&&"splom"!==de[0].trace.type){var Re=de[0],ze=(de=D[Re.trace.type]?de.filter((function(e){return e.trace.index===Re.trace.index})):[Re]).length;we(j("x",Re,h),j("y",Re,h));var Ne,Fe=[],Ee={},He=0,Be=function(e){var t=D[e.trace.type]?C(e):e.trace.index;if(Ee[t]){var r=Ee[t]-1,n=Fe[r];r>0&&Math.abs(e.distance)<Math.abs(n.distance)&&(Fe[r]=e)}else He++,Ee[t]=He,Fe.push(e)};for(Ne=0;Ne<ze;Ne++)Be(de[Ne]);for(Ne=de.length-1;Ne>ze-1;Ne--)Be(de[Ne]);de=Fe,Se()}var je=e._hoverdata,Ye=[],Ve=Y(e),Ue=V(e);for(te=0;te<de.length;te++){var qe=de[te],Ge=m.makeEventData(qe,qe.trace,qe.cd);if(!1!==qe.hovertemplate){var Ze=!1;qe.cd[qe.index]&&qe.cd[qe.index].ht&&(Ze=qe.cd[qe.index].ht),qe.hovertemplate=Ze||qe.trace.hovertemplate||!1}if(qe.xa&&qe.ya){var We=qe.x0+qe.xa._offset,Xe=qe.x1+qe.xa._offset,Je=qe.y0+qe.ya._offset,Ke=qe.y1+qe.ya._offset,Qe=Math.min(We,Xe),$e=Math.max(We,Xe),et=Math.min(Je,Ke),tt=Math.max(Je,Ke);Ge.bbox={x0:Qe+Ue,x1:$e+Ue,y0:et+Ve,y1:tt+Ve}}qe.eventData=[Ge],Ye.push(Ge)}e._hoverdata=Ye;var rt="y"===T&&(he.length>1||de.length>1)||"closest"===T&&ve&&de.length>1,nt=p.combine(h.plot_bgcolor||p.background,h.paper_bgcolor),at=I(de,{gd:e,hovermode:T,rotateLabels:rt,bgColor:nt,container:h._hoverlayer,outerContainer:h._paper.node(),commonLabelOpts:h.hoverlabel,hoverdistance:h.hoverdistance}),it=at.hoverLabels;if(m.isUnifiedHover(T)||(function(e,t,r,n){var a,i,o,l,s,c,u,f=t?"xa":"ya",d=t?"ya":"xa",h=0,p=1,v=e.size(),g=new Array(v),y=0,m=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(e){return e*r._invScaleX},T=function(e){return e*r._invScaleY};function k(e){var t=e[0],r=e[e.length-1];if(i=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.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 n=0;for(l=0;l<e.length;l++)(c=e[l]).pos+c.dp+c.size>t.pmax&&n++;for(l=e.length-1;l>=0&&!(n<=0);l--)(c=e[l]).pos>t.pmax-1&&(c.del=!0,n--);for(l=0;l<e.length&&!(n<=0);l++)if((c=e[l]).pos<t.pmin+1)for(c.del=!0,n--,o=2*c.size,s=e.length-1;s>=0;s--)e[s].dp-=o;for(l=e.length-1;l>=0&&!(n<=0);l--)(c=e[l]).pos+c.dp+c.size>t.pmax&&(c.del=!0,n--)}}}for(e.each((function(e){var n=e[f],a=e[d],i="x"===n._id.charAt(0),o=n.range;0===y&&o&&o[0]>o[1]!==i&&(p=-1);var l=0,s=i?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,h=z(e,t),v=e.anchor,k="end"===v?-1:1;if("middle"===v)u=(c=e.crossPos+(i?T(h.y-e.by/2):w(e.bx/2+e.tx2width/2)))+(i?T(e.by):w(e.bx));else if(i)u=(c=e.crossPos+T(L+h.y)-T(e.by/2-L))+T(e.by);else{var A=w(k*L+h.x),S=A+w(k*e.bx);c=e.crossPos+Math.min(A,S),u=e.crossPos+Math.max(A,S)}i?void 0!==b&&void 0!==_&&Math.min(u,_)-Math.max(c,b)>1&&("left"===a.side?(l=a._mainLinePosition,s=r.width):s=a._mainLinePosition):void 0!==m&&void 0!==x&&Math.min(u,x)-Math.max(c,m)>1&&("top"===a.side?(l=a._mainLinePosition,s=r.height):s=a._mainLinePosition)}g[y++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(i?M:1)/2,pmin:l,pmax:s}]})),g.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<g.length-1;){var A=g[l],S=g[l+1],D=A[A.length-1],O=S[0];if((i=D.pos+D.dp+D.size-O.pos-O.dp+O.size)>.01&&D.pmin===O.pmin&&D.pmax===O.pmax){for(s=S.length-1;s>=0;s--)S[s].dp+=i;for(A.push.apply(A,S),g.splice(l+1,1),u=0,s=A.length-1;s>=0;s--)u+=A[s].dp;for(o=u/A.length,s=A.length-1;s>=0;s--)A[s].dp-=o;a=!1}else l++}g.forEach(k)}for(l=g.length-1;l>=0;l--){var C=g[l];for(s=C.length-1;s>=0;s--){var P=C[s],I=P.datum;I.offset=P.dp,I.del=P.del}}}(it,rt,h,at.commonLabelBoundingBox),N(it,rt,h._invScaleX,h._invScaleY)),s&&s.tagName){var ot=y.getComponentMethod("annotations","hasClickToShow")(e,Ye);d(n.select(s),ot?"pointer":"")}s&&!i&&function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(e,0,je)&&(je&&e.emit("plotly_unhover",{event:t,points:je}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:G,yaxes:Z,xvals:$,yvals:ee}))}(e,t,r,i,s)}))},t.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var a=t.gd,i=Y(a),o=V(a),l=I(e.map((function(e){var r=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,l=e._y0||e.y0||e.y||0,s=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(r,n),f=Math.max(r,n),d=Math.min(l,s),h=Math.max(l,s),v=e.trace;if(y.traceIs(v,"gl3d")){var g=a._fullLayout[v.scene]._scene.container,m=g.offsetLeft,x=g.offsetTop;u+=m,f+=m,d+=x,h+=x}c.bbox={x0:u+o,x1:f+o,y0:d+i,y1:h+i},t.inOut_bbox&&t.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||p.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:c}})),{gd:a,hovermode:"closest",rotateLabels:!1,bgColor:t.bgColor||p.background,container:n.select(t.container),outerContainer:t.outerContainer||t.container}).hoverLabels,s=0,c=0;return l.sort((function(e,t){return e.y0-t.y0})).each((function(e,r){var n=e.y0-e.by/2;e.offset=n-5<s?s-n+5:0,s=n+e.by+e.offset,r===t.anchorIndex&&(c=e.offset)})).each((function(e){e.offset-=c})),N(l,!1,a._fullLayout._invScaleX,a._fullLayout._invScaleY),r?l:l.node()};var P=/<extra>([\s\S]*)<\/extra>/;function I(e,t){var r=t.gd,a=r._fullLayout,i=t.hovermode,l=t.rotateLabels,u=t.bgColor,d=t.container,v=t.outerContainer,g=t.commonLabelOpts||{};if(0===e.length)return[[]];var T=t.fontFamily||x.HOVERFONT,M=t.fontSize||x.HOVERFONTSIZE,k=e[0],A=k.xa,D=k.ya,O=i.charAt(0),P=O+"Label",I=k[P];if(void 0===I&&"multicategory"===A.type)for(var z=0;z<e.length&&void 0===(I=e[z][P]);z++);var N=U(r,v),F=N.top,E=N.width,H=N.height,B=void 0!==I&&k.distance<=t.hoverdistance&&("x"===i||"y"===i);if(B){var j,Y,V=!0;for(j=0;j<e.length;j++)if(V&&void 0===e[j].zLabel&&(V=!1),Y=e[j].hoverinfo||e[j].trace.hoverinfo){var q=Array.isArray(Y)?Y:Y.split("+");if(-1===q.indexOf("all")&&-1===q.indexOf(i)){B=!1;break}}V&&(B=!1)}var G=d.selectAll("g.axistext").data(B?[0]:[]);G.enter().append("g").classed("axistext",!0),G.exit().remove();var Z={minX:0,maxX:0,minY:0,maxY:0};if(G.each((function(){var e=n.select(this),t=o.ensureSingle(e,"path","",(function(e){e.style({"stroke-width":"1px"})})),l=o.ensureSingle(e,"text","",(function(e){e.attr("data-notex",1)})),c=g.bgcolor||p.defaultLine,u=g.bordercolor||p.contrast(c),d=p.contrast(c),v={family:g.font.family||T,size:g.font.size||M,color:g.font.color||d};t.style({fill:c,stroke:u}),l.text(I).call(h.font,v).call(f.positionText,0,0).call(f.convertToTspans,r),e.attr("transform","");var y,m,x=U(r,l.node());if("x"===i){var b="top"===A.side?"-":"";l.attr("text-anchor","middle").call(f.positionText,0,"top"===A.side?F-x.bottom-L-S:F-x.top+L+S),y=A._offset+(k.x0+k.x1)/2,m=D._offset+("top"===A.side?0:D._length);var _=x.width/2+S,w=y;y<_?w=_:y>a.width-_&&(w=a.width-_),t.attr("d","M"+(y-w)+",0L"+(y-w+L)+","+b+L+"H"+_+"v"+b+(2*S+x.height)+"H"+-_+"V"+b+L+"H"+(y-w-L)+"Z"),y=w,Z.minX=y-_,Z.maxX=y+_,"top"===A.side?(Z.minY=m-(2*S+x.height),Z.maxY=m-S):(Z.minY=m+S,Z.maxY=m+(2*S+x.height))}else{var O,C,P;"right"===D.side?(O="start",C=1,P="",y=A._offset+A._length):(O="end",C=-1,P="-",y=A._offset),m=D._offset+(k.y0+k.y1)/2,l.attr("text-anchor",O),t.attr("d","M0,0L"+P+L+","+L+"V"+(S+x.height/2)+"h"+P+(2*S+x.width)+"V-"+(S+x.height/2)+"H"+P+L+"V-"+L+"Z"),Z.minY=m-(S+x.height/2),Z.maxY=m+(S+x.height/2),"right"===D.side?(Z.minX=y+L,Z.maxX=y+L+(2*S+x.width)):(Z.minX=y-L-(2*S+x.width),Z.maxX=y-L);var R,z=x.height/2,N=F-x.top-z,E="clip"+a._uid+"commonlabel"+D._id;if(y<x.width+2*S+L){R="M-"+(L+S)+"-"+z+"h-"+(x.width-S)+"V"+z+"h"+(x.width-S)+"Z";var H=x.width-y+S;f.positionText(l,H,N),"end"===O&&l.selectAll("tspan").each((function(){var e=n.select(this),t=h.tester.append("text").text(e.text()).call(h.font,v),a=U(r,t.node());Math.round(a.width)<Math.round(x.width)&&e.attr("x",H-a.width),t.remove()}))}else f.positionText(l,C*(S+L),N),R=null;var B=a._topclips.selectAll("#"+E).data(R?[0]:[]);B.enter().append("clipPath").attr("id",E).append("path"),B.exit().remove(),B.select("path").attr("d",R),h.setClipUrl(l,R?E:null,r)}e.attr("transform",s(y,m))})),m.isUnifiedHover(i)){d.selectAll("g.hovertext").remove();var W=e.filter((function(e){return"none"!==e.hoverinfo}));if(0===W.length)return[];var X=a.hoverlabel,J=X.font,K={showlegend:!0,legend:{title:{text:I,font:J},font:J,bgcolor:X.bgcolor,bordercolor:X.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},Q={font:J};b(K,Q,r._fullData);var $=Q.legend;$.entries=[];for(var ee=0;ee<W.length;ee++){var te=W[ee];if("none"!==te.hoverinfo){var re=R(te,!0,i,a,I),ne=re[0],ae=re[1];te.name=ae,te.text=""!==ae?ae+" : "+ne:ne;var ie=te.cd[te.index];ie&&(ie.mc&&(te.mc=ie.mc),ie.mcc&&(te.mc=ie.mcc),ie.mlc&&(te.mlc=ie.mlc),ie.mlcc&&(te.mlc=ie.mlcc),ie.mlw&&(te.mlw=ie.mlw),ie.mrc&&(te.mrc=ie.mrc),ie.dir&&(te.dir=ie.dir)),te._distinct=!0,$.entries.push([te])}}$.entries.sort((function(e,t){return e[0].trace.index-t[0].trace.index})),$.layer=d,$._inHover=!0,$._groupTitleFont=X.grouptitlefont,_(r,$);var oe,le,se,ce,ue=d.select("g.legend"),fe=U(r,ue.node()),de=fe.width+2*S,he=fe.height+2*S,pe=W[0],ve=(pe.x0+pe.x1)/2,ge=(pe.y0+pe.y1)/2,ye=!(y.traceIs(pe.trace,"bar-like")||y.traceIs(pe.trace,"box-violin"));"y"===O?ye?(le=ge-S,oe=ge+S):(le=Math.min.apply(null,W.map((function(e){return Math.min(e.y0,e.y1)}))),oe=Math.max.apply(null,W.map((function(e){return Math.max(e.y0,e.y1)})))):le=oe=o.mean(W.map((function(e){return(e.y0+e.y1)/2})))-he/2,"x"===O?ye?(se=ve+S,ce=ve-S):(se=Math.max.apply(null,W.map((function(e){return Math.max(e.x0,e.x1)}))),ce=Math.min.apply(null,W.map((function(e){return Math.min(e.x0,e.x1)})))):se=ce=o.mean(W.map((function(e){return(e.x0+e.x1)/2})))-de/2;var me,xe,be=A._offset,_e=D._offset;return ce+=be-de,le+=_e-he,me=(se+=be)+de<E&&se>=0?se:ce+de<E&&ce>=0?ce:be+de<E?be:se-ve<ve-ce+de?E-de:0,me+=S,xe=(oe+=_e)+he<H&&oe>=0?oe:le+he<H&&le>=0?le:_e+he<H?_e:oe-ge<ge-le+he?H-he:0,xe+=S,ue.attr("transform",s(me-1,xe-1)),ue}var we=d.selectAll("g.hovertext").data(e,(function(e){return C(e)}));return we.enter().append("g").classed("hovertext",!0).each((function(){var e=n.select(this);e.append("rect").call(p.fill,p.addOpacity(u,.8)),e.append("text").classed("name",!0),e.append("path").style("stroke-width","1px"),e.append("text").classed("nums",!0).call(h.font,T,M)})),we.exit().remove(),we.each((function(e){var t=n.select(this).attr("transform",""),o=e.color;Array.isArray(o)&&(o=o[e.eventData[0].pointNumber]);var d=e.bgcolor||o,v=p.combine(p.opacity(d)?d:p.defaultLine,u),g=p.combine(p.opacity(o)?o:p.defaultLine,u),y=e.borderColor||p.contrast(v),m=R(e,B,i,a,I,t),x=m[0],b=m[1],_=t.select("text.nums").call(h.font,e.fontFamily||T,e.fontSize||M,e.fontColor||y).text(x).attr("data-notex",1).call(f.positionText,0,0).call(f.convertToTspans,r),k=t.select("text.name"),A=0,D=0;if(b&&b!==x){k.call(h.font,e.fontFamily||T,e.fontSize||M,g).text(b).attr("data-notex",1).call(f.positionText,0,0).call(f.convertToTspans,r);var O=U(r,k.node());A=O.width+2*S,D=O.height+2*S}else k.remove(),t.select("rect").remove();t.select("path").style({fill:v,stroke:y});var C=e.xa._offset+(e.x0+e.x1)/2,P=e.ya._offset+(e.y0+e.y1)/2,z=Math.abs(e.x1-e.x0),N=Math.abs(e.y1-e.y0),j=U(r,_.node()),Y=j.width/a._invScaleX,V=j.height/a._invScaleY;e.ty0=(F-j.top)/a._invScaleY,e.bx=Y+2*S,e.by=Math.max(V+2*S,D),e.anchor="start",e.txwidth=Y,e.tx2width=A,e.offset=0;var q,G,Z=(Y+L+S+A)*a._invScaleX;if(l)e.pos=C,q=P+N/2+Z<=H,G=P-N/2-Z>=0,"top"!==e.idealAlign&&q||!G?q?(P+=N/2,e.anchor="start"):e.anchor="middle":(P-=N/2,e.anchor="end"),e.crossPos=P;else{if(e.pos=P,q=C+z/2+Z<=E,G=C-z/2-Z>=0,"left"!==e.idealAlign&&q||!G)if(q)C+=z/2,e.anchor="start";else{e.anchor="middle";var W=Z/2,X=C+W-E,J=C-W;X>0&&(C-=X),J<0&&(C+=-J)}else C-=z/2,e.anchor="end";e.crossPos=C}_.attr("text-anchor",e.anchor),A&&k.attr("text-anchor",e.anchor),t.attr("transform",s(C,P)+(l?c(w):""))})),{hoverLabels:we,commonLabelBoundingBox:Z}}function R(e,t,r,n,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=B(e.name,e.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(s+="x: "+e.xLabel+"<br>"),void 0!==e.yLabel&&(s+="y: "+e.yLabel+"<br>"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[c+"Label"]===a?s=e[u+"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?"<br>":"")+e.text),void 0!==e.extraText&&(s+=(s?"<br>":"")+e.extraText),i&&""===s&&!e.hovertemplate&&(""===l&&i.remove(),s=l);var f=e.hovertemplate||!1;if(f){var d=e.hovertemplateLabels||e;e[c+"Label"]!==a&&(d[c+"other"]=d[c+"Val"],d[c+"otherLabel"]=d[c+"Label"]),s=(s=o.hovertemplateString(f,d,n._d3locale,e.eventData[0]||{},e.trace._meta)).replace(P,(function(t,r){return l=B(r,e.nameLength),""}))}return[s,l]}function z(e,t){var r=0,n=e.offset;return t&&(n*=-A,r=e.offset*k),{x:r,y:n}}function N(e,t,r,a){var i=function(e){return e*r},o=function(e){return e*a};e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var a,l,s,c,u=r.select("text.nums"),d=e.anchor,p="end"===d?-1:1,v=(c=(s=(l={start:1,end:-1,middle:0}[(a=e).anchor])*(L+S))+l*(a.txwidth+S),"middle"===a.anchor&&(s-=a.tx2width/2,c+=a.txwidth/2+S),{alignShift:l,textShiftX:s,text2ShiftX:c}),g=z(e,t),y=g.x,m=g.y,x="middle"===d;r.select("path").attr("d",x?"M-"+i(e.bx/2+e.tx2width/2)+","+o(m-e.by/2)+"h"+i(e.bx)+"v"+o(e.by)+"h-"+i(e.bx)+"Z":"M0,0L"+i(p*L+y)+","+o(L+m)+"v"+o(e.by/2-L)+"h"+i(p*e.bx)+"v-"+o(e.by)+"H"+i(p*L+y)+"V"+o(m-L)+"Z");var b=y+v.textShiftX,_=m+e.ty0-e.by/2+S,w=e.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==d?(u.attr("text-anchor","start"),b=x?-e.bx/2-e.tx2width/2+S:-e.bx-S):"right"===w&&"end"!==d&&(u.attr("text-anchor","end"),b=x?e.bx/2-e.tx2width/2-S:e.bx+S)),u.call(f.positionText,i(b),o(_)),e.tx2width&&(r.select("text.name").call(f.positionText,i(v.text2ShiftX+v.alignShift*S+y),o(m+e.ty0-e.by/2+S)),r.select("rect").call(h.setRect,i(v.text2ShiftX+(v.alignShift-1)*e.tx2width/2+y),o(m-e.by/2-1),i(e.tx2width),o(e.by+2)))}))}function F(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],l=e.cd[r]||{};function s(e){return e||a(e)&&0===e}var c=Array.isArray(r)?function(e,t){var a=o.castOption(i,r,e);return s(a)?a:o.extractOption({},n,"",t)}:function(e,t){return o.extractOption(l,n,e,t)};function u(t,r,n){var a=c(r,n);s(a)&&(e[t]=a)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===n.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:g.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:g.hoverLabelText(e.ya,e.yLabelVal,n.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 f=g.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+f+" / -"+g.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" ± "+f,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var d=g.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+d+" / -"+g.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" ± "+d,"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 E(e,t,r){var n,a,o=r.container,l=r.fullLayout,s=l._size,c=r.event,u=!!t.hLinePoint,f=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),f||u){var d=p.combine(l.plot_bgcolor,l.paper_bgcolor);if(u){var v,y,m=t.hLinePoint;n=m&&m.xa,"cursor"===(a=m&&m.ya).spikesnap?(v=c.pointerX,y=c.pointerY):(v=n._offset+m.x,y=a._offset+m.y);var x,b,_=i.readability(m.color,d)<1.5?p.contrast(d):m.color,w=a.spikemode,T=a.spikethickness,M=a.spikecolor||_,k=g.getPxPosition(e,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=k,b=v),-1!==w.indexOf("across")){var A=a._counterDomainMin,L=a._counterDomainMax;"free"===a.anchor&&(A=Math.min(A,a.position),L=Math.max(L,a.position)),x=s.l+A*s.w,b=s.l+L*s.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:y,y2:y,"stroke-width":T,stroke:M,"stroke-dasharray":h.dashStyle(a.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:y,y2:y,"stroke-width":T+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:k+("right"!==a.side?T:-T),cy:y,r:T,fill:M}).classed("spikeline",!0)}if(f){var S,D,O=t.vLinePoint;n=O&&O.xa,a=O&&O.ya,"cursor"===n.spikesnap?(S=c.pointerX,D=c.pointerY):(S=n._offset+O.x,D=a._offset+O.y);var C,P,I=i.readability(O.color,d)<1.5?p.contrast(d):O.color,R=n.spikemode,z=n.spikethickness,N=n.spikecolor||I,F=g.getPxPosition(e,n);if(-1!==R.indexOf("toaxis")||-1!==R.indexOf("across")){if(-1!==R.indexOf("toaxis")&&(C=F,P=D),-1!==R.indexOf("across")){var E=n._counterDomainMin,H=n._counterDomainMax;"free"===n.anchor&&(E=Math.min(E,n.position),H=Math.max(H,n.position)),C=s.t+(1-H)*s.h,P=s.t+(1-E)*s.h}o.insert("line",":first-child").attr({x1:S,x2:S,y1:C,y2:P,"stroke-width":z,stroke:N,"stroke-dasharray":h.dashStyle(n.spikedash,z)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:S,x2:S,y1:C,y2:P,"stroke-width":z+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==R.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:S,cy:F-("top"!==n.side?z:-z),r:z,fill:N}).classed("spikeline",!0)}}}function H(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function B(e,t){return f.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}function j(e,t,r){var n=t[e+"a"],a=t[e+"Val"],i=t.cd[0];if("category"===n.type||"multicategory"===n.type)a=n._categoriesMap[a];else if("date"===n.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 c=l[e+"End"];void 0===c&&(c=l[e]);var u=c-s;"end"===o?a+=u:"middle"===o&&(a+=u/2)}a=n.d2c(a)}return i&&i.t&&i.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(a+=i.t.dPos)),a}function Y(e){return e.offsetTop+e.clientTop}function V(e){return e.offsetLeft+e.clientLeft}function U(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,i=n.top,l=a+n.width,s=i+n.height,c=o.apply3DTransform(r._invTransform)(a,i),u=o.apply3DTransform(r._invTransform)(l,s),f=c[0],d=c[1],h=u[0],p=u[1];return{x:f,y:d,width:h-f,height:p-d,top:Math.min(d,p),left:Math.min(f,h),right:Math.max(f,h),bottom:Math.max(d,p)}}},6132:function(e,t,r){"use strict";var n=r(3400),a=r(6308),i=r(624).isUnifiedHover;e.exports=function(e,t,r,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)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},1008:function(e,t,r){"use strict";var n=r(3400),a=r(5460);e.exports=function(e,t){function r(r,i){return void 0!==t[r]?t[r]:n.coerce(e,t,a,r,i)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},3024:function(e,t,r){"use strict";var n=r(3428),a=r(3400),i=r(6476),o=r(624),l=r(5460),s=r(3292);e.exports={moduleType:"component",name:"fx",constants:r(2456),schema:{layout:l},attributes:r(5756),layoutAttributes:l,supplyLayoutGlobalDefaults:r(1976),supplyDefaults:r(5448),supplyLayoutDefaults:r(8336),calc:r(5056),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,r){return a.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return a.castOption(e,r,"hoverinfo",(function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:s.hover,unhover:i.unhover,loneHover:s.loneHover,loneUnhover:function(e){var t=a.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:r(2376)}},5460:function(e,t,r){"use strict";var n=r(2456),a=r(5376),i=a({editType:"none"});i.family.dflt=n.HOVERFONT,i.size.dflt=n.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"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},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,r){"use strict";var n=r(3400),a=r(5460),i=r(1008),o=r(6132);e.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}i(e,t)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var l=t._has("mapbox"),s=t._has("geo"),c=t._basePlotModules.length;"zoom"===t.dragmode&&((l||s)&&1===c||l&&s&&2===c)&&(t.dragmode="pan"),o(e,t,r),n.coerceFont(r,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},1976:function(e,t,r){"use strict";var n=r(3400),a=r(6132),i=r(5460);e.exports=function(e,t){a(e,t,(function(r,a){return n.coerce(e,t,i,r,a)}))}},2704:function(e,t,r){"use strict";var n=r(3400),a=r(3756).counter,i=r(6968).u,o=r(3816).idRegex,l=r(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 c(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});return Array.isArray(n)?n:a.length?a:void 0}function u(e,t,r,n,a,i){var o=t(e+"gap",r),l=t("domain."+e);t(e+"side",n);for(var s=new Array(a),c=l[0],u=(l[1]-c)/(a-o),f=u*(1-o),d=0;d<a;d++){var h=c+u*d;s[i?a-1-d:d]=[h,h+f]}return s}function f(e,t,r,n,a){var i,o=new Array(r);function l(e,r){-1!==t.indexOf(r)&&void 0===n[r]?(o[e]=r,n[r]=e):o[e]=""}if(Array.isArray(e))for(i=0;i<r;i++)l(i,e[i]);else for(l(0,a),i=1;i<r;i++)l(i,a+(i+1));return o}e.exports={moduleType:"component",name:"grid",schema:{layout:{grid:s}},layoutAttributes:s,sizeDefaults:function(e,t){var r=e.grid||{},a=c(t,r,"x"),i=c(t,r,"y");if(e.grid||a||i){var o,f,d=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),h=Array.isArray(a),p=Array.isArray(i),v=h&&a!==r.xaxes&&p&&i!==r.yaxes;d?(o=r.subplots.length,f=r.subplots[0].length):(p&&(o=i.length),h&&(f=a.length));var g=l.newContainer(t,"grid"),y=M("rows",o),m=M("columns",f);if(y*m>1){d||h||p||"independent"===M("pattern")&&(d=!0),g._hasSubplotGrid=d;var x,b,_="top to bottom"===M("roworder"),w=d?.2:.1,T=d?.3:.1;v&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:u("x",M,w,x,m),y:u("y",M,T,b,y,_)}}else delete t.grid}function M(e,t){return n.coerce(r,g,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,a,i,o,l,s,u,d=e.grid||{},h=t._subplots,p=r._hasSubplotGrid,v=r.rows,g=r.columns,y="independent"===r.pattern,m=r._axisMap={};if(p){var x=d.subplots||[];s=r.subplots=new Array(v);var b=1;for(n=0;n<v;n++){var _=s[n]=new Array(g),w=x[n]||[];for(a=0;a<g;a++)if(y?(l=1===b?"xy":"x"+b+"y"+b,b++):l=w[a],_[a]="",-1!==h.cartesian.indexOf(l)){if(u=l.indexOf("y"),i=l.slice(0,u),o=l.slice(u),void 0!==m[i]&&m[i]!==a||void 0!==m[o]&&m[o]!==n)continue;_[a]=l,m[i]=a,m[o]=n}}}else{var T=c(t,d,"x"),M=c(t,d,"y");r.xaxes=f(T,h.xaxis,g,m,"x"),r.yaxes=f(M,h.yaxis,v,m,"y")}var k=r._anchors={},A="top to bottom"===r.roworder;for(var L in m){var S,D,O,C=L.charAt(0),P=r[C+"side"];if(P.length<8)k[L]="free";else if("x"===C){if("t"===P.charAt(0)===A?(S=0,D=1,O=v):(S=v-1,D=-1,O=-1),p){var I=m[L];for(n=S;n!==O;n+=D)if((l=s[n][I])&&(u=l.indexOf("y"),l.slice(0,u)===L)){k[L]=l.slice(u);break}}else for(n=S;n!==O;n+=D)if(o=r.yaxes[n],-1!==h.cartesian.indexOf(L+o)){k[L]=o;break}}else if("l"===P.charAt(0)?(S=0,D=1,O=g):(S=g-1,D=-1,O=-1),p){var R=m[L];for(n=S;n!==O;n+=D)if((l=s[R][n])&&(u=l.indexOf("y"),l.slice(u)===L)){k[L]=l.slice(0,u);break}}else for(n=S;n!==O;n+=D)if(i=r.xaxes[n],-1!==h.cartesian.indexOf(i+L)){k[L]=i;break}}}}}},5760:function(e,t,r){"use strict";var n=r(3816),a=r(1780).templatedArray;r(6208),e.exports=a("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},3556:function(e,t,r){"use strict";var n=r(8248),a=r(6896);e.exports=function(e,t,r,i){t=t||{};var o="log"===r&&"linear"===t.type,l="linear"===r&&"log"===t.type;if(o||l)for(var s,c,u=e._fullLayout.images,f=t._id.charAt(0),d=0;d<u.length;d++)if(c="images["+d+"].",(s=u[d])[f+"ref"]===t._id){var h=s[f],p=s["size"+f],v=null,g=null;if(o){v=a(h,t.range);var y=p/Math.pow(10,v)/2;g=2*Math.log(y+Math.sqrt(1+y*y))/Math.LN10}else g=(v=Math.pow(10,h))*(Math.pow(10,p/2)-Math.pow(10,-p/2));n(v)?n(g)||(g=null):(v=null,g=null),i(c+f,v),i(c+"size"+f,g)}}},7404:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(1272),o=r(5760);function l(e,t,r){function i(r,a){return n.coerce(e,t,o,r,a)}var l=i("source");if(!i("visible",!!l))return t;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var s={_fullLayout:r},c=["x","y"],u=0;u<2;u++){var f=c[u],d=a.coerceRef(e,t,s,f,"paper",void 0);"paper"!==d&&a.getFromId(s,d)._imgIndices.push(t._index),a.coercePosition(t,s,i,d,f,0)}return t}e.exports=function(e,t){i(e,t,{name:"images",handleItemDefaults:l})}},963:function(e,t,r){"use strict";var n=r(3428),a=r(3616),i=r(4460),o=r(9811),l=r(9616);e.exports=function(e){var t,r,s=e._fullLayout,c=[],u={},f=[];for(r=0;r<s.images.length;r++){var d=s.images[r];if(d.visible)if("below"===d.layer&&"paper"!==d.xref&&"paper"!==d.yref){t=o.ref2id(d.xref)+o.ref2id(d.yref);var h=s._plots[t];if(!h){f.push(d);continue}h.mainplot&&(t=h.mainplot.id),u[t]||(u[t]=[]),u[t].push(d)}else"above"===d.layer?c.push(d):f.push(d)}var p={left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-.5},right:{sizing:"xMax",offset:-1}},v={top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-.5},bottom:{sizing:"YMax",offset:-1}};function g(t){var r=n.select(this);if(this._imgSrc!==t.source)if(r.attr("xmlns",l.svg),t.source&&"data:"===t.source.slice(0,5))r.attr("xlink:href",t.source),this._imgSrc=t.source;else{var a=new Promise(function(e){var n=new Image;function a(){r.remove(),e()}this.img=n,n.setAttribute("crossOrigin","anonymous"),n.onerror=a,n.onload=function(){var t=document.createElement("canvas");t.width=this.width,t.height=this.height,t.getContext("2d",{willReadFrequently:!0}).drawImage(this,0,0);var n=t.toDataURL("image/png");r.attr("xlink:href",n),e()},r.on("error",a),n.src=t.source,this._imgSrc=t.source}.bind(this));e._promises.push(a)}}function y(t){var r,o,l=n.select(this),c=i.getFromId(e,t.xref),u=i.getFromId(e,t.yref),f="domain"===i.getRefType(t.xref),d="domain"===i.getRefType(t.yref),h=s._size;r=void 0!==c?"string"==typeof t.xref&&f?c._length*t.sizex:Math.abs(c.l2p(t.sizex)-c.l2p(0)):t.sizex*h.w,o=void 0!==u?"string"==typeof t.yref&&d?u._length*t.sizey:Math.abs(u.l2p(t.sizey)-u.l2p(0)):t.sizey*h.h;var g,y,m=r*p[t.xanchor].offset,x=o*v[t.yanchor].offset,b=p[t.xanchor].sizing+v[t.yanchor].sizing;switch(g=void 0!==c?"string"==typeof t.xref&&f?c._length*t.x+c._offset:c.r2p(t.x)+c._offset:t.x*h.w+h.l,g+=m,y=void 0!==u?"string"==typeof t.yref&&d?u._length*(1-t.y)+u._offset:u.r2p(t.y)+u._offset:h.h-t.y*h.h+h.t,y+=x,t.sizing){case"fill":b+=" slice";break;case"stretch":b="none"}l.attr({x:g,y:y,width:r,height:o,preserveAspectRatio:b,opacity:t.opacity});var _=(c&&"domain"!==i.getRefType(t.xref)?c._id:"")+(u&&"domain"!==i.getRefType(t.yref)?u._id:"");a.setClipUrl(l,_?"clip"+s._uid+_:null,e)}var m=s._imageLowerLayer.selectAll("image").data(f),x=s._imageUpperLayer.selectAll("image").data(c);m.enter().append("image"),x.enter().append("image"),m.exit().remove(),x.exit().remove(),m.each((function(e){g.bind(this)(e),y.bind(this)(e)})),x.each((function(e){g.bind(this)(e),y.bind(this)(e)}));var b=Object.keys(s._plots);for(r=0;r<b.length;r++){t=b[r];var _=s._plots[t];if(_.imagelayer){var w=_.imagelayer.selectAll("image").data(u[t]||[]);w.enter().append("image"),w.exit().remove(),w.each((function(e){g.bind(this)(e),y.bind(this)(e)}))}}}},7402:function(e,t,r){"use strict";e.exports={moduleType:"component",name:"images",layoutAttributes:r(5760),supplyLayoutDefaults:r(7404),includeBasePlot:r(6632)("images"),draw:r(963),convertCoords:r(3556)}},3800:function(e,t,r){"use strict";var n=r(5376),a=r(2548);e.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:a.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:n({editType:"legend"}),grouptitlefont:n({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:n({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}},5196:function(e){"use strict";e.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},7864:function(e,t,r){"use strict";var n=r(4040),a=r(3400),i=r(1780),o=r(5464),l=r(3800),s=r(4859),c=r(2451);function u(e,t,r,u){var f=t[e]||{},d=i.newContainer(r,e);function h(e,t){return a.coerce(f,d,l,e,t)}var p=a.coerceFont(h,"font",r.font);if(h("bgcolor",r.paper_bgcolor),h("bordercolor"),h("visible")){for(var v,g=function(e,t){var r=v._input,n=v;return a.coerce(r,n,o,e,t)},y=r.font||{},m=a.coerceFont(h,"grouptitlefont",a.extendFlat({},y,{size:Math.round(1.1*y.size)})),x=0,b=!1,_="normal",w=(r.shapes||[]).filter((function(e){return e.showlegend})),T=u.concat(w).filter((function(t){return e===(t.legend||"legend")})),M=0;M<T.length;M++)if((v=T[M]).visible){var k=v._isShape;(v.showlegend||v._dfltShowLegend&&!(v._module&&v._module.attributes&&v._module.attributes.showlegend&&!1===v._module.attributes.showlegend.dflt))&&(x++,v.showlegend&&(b=!0,(!k&&n.traceIs(v,"pie-like")||!0===v._input.showlegend)&&x++),a.coerceFont(g,"legendgrouptitle.font",m)),(!k&&n.traceIs(v,"bar")&&"stack"===r.barmode||-1!==["tonextx","tonexty"].indexOf(v.fill))&&(_=c.isGrouped({traceorder:_})?"grouped+reversed":"reversed"),void 0!==v.legendgroup&&""!==v.legendgroup&&(_=c.isReversed({traceorder:_})?"reversed+grouped":"grouped")}var A=a.coerce(t,r,s,"showlegend",b&&x>("legend"===e?1:0));if(!1===A&&(r[e]=void 0),(!1!==A||f.uirevision)&&(h("uirevision",r.uirevision),!1!==A)){h("borderwidth");var L,S,D,O="h"===h("orientation"),C="paper"===h("yref"),P="paper"===h("xref"),I="left";if(O?(L=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?C?(S=1.1,D="bottom"):(S=1,D="top"):C?(S=-.1,D="top"):(S=0,D="bottom")):(S=1,D="auto",P?L=1.02:(L=1,I="right")),a.coerce(f,d,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:L}},"x"),a.coerce(f,d,{y:{valType:"number",editType:"legend",min:C?-2:0,max:C?3:1,dflt:S}},"y"),h("traceorder",_),c.isGrouped(r[e])&&h("tracegroupgap"),h("entrywidth"),h("entrywidthmode"),h("indentation"),h("itemsizing"),h("itemwidth"),h("itemclick"),h("itemdoubleclick"),h("groupclick"),h("xanchor",I),h("yanchor",D),h("valign"),a.noneOrAll(f,d,["x","y"]),h("title.text")){h("title.side",O?"left":"top");var R=a.extendFlat({},p,{size:a.bigFont(p.size)});a.coerceFont(h,"title.font",R)}}}}e.exports=function(e,t,r){var n,i=r.slice(),o=t.shapes;if(o)for(n=0;n<o.length;n++){var l=o[n];if(l.showlegend){var s={_input:l._input,visible:l.visible,showlegend:l.showlegend,legend:l.legend};i.push(s)}}var c=["legend"];for(n=0;n<i.length;n++)a.pushUnique(c,i[n].legend);for(t._legends=[],n=0;n<c.length;n++){var f=c[n];u(f,e,t,i),t[f]&&t[f].visible&&(t[f]._id=f),t._legends.push(f)}}},1140:function(e,t,r){"use strict";var n=r(3428),a=r(3400),i=r(7316),o=r(4040),l=r(5924),s=r(6476),c=r(3616),u=r(6308),f=r(2736),d=r(3048),h=r(5196),p=r(4284),v=p.LINE_SPACING,g=p.FROM_TL,y=p.FROM_BR,m=r(3076),x=r(2012),b=r(2451),_=1,w=/^legend[0-9]*$/;function T(e,t){var r,l,d=t||{},p=e._fullLayout,w=P(d),T=d._inHover;if(T?(l=d.layer,r="hover"):(l=p._infolayer,r=w),l){var L;if(r+=p._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0),T){if(!d.entries)return;L=m(d.entries,d)}else{for(var I=(e.calcdata||[]).slice(),R=p.shapes,z=0;z<R.length;z++){var N=R[z];if(N.showlegend){var F={_isShape:!0,_fullInput:N,index:N._index,name:N.name||N.label.text||"shape "+N._index,legend:N.legend,legendgroup:N.legendgroup,legendgrouptitle:N.legendgrouptitle,legendrank:N.legendrank,legendwidth:N.legendwidth,showlegend:N.showlegend,visible:N.visible,opacity:N.opacity,mode:"line"===N.type?"lines":"markers",line:N.line,marker:{line:N.line,color:N.fillcolor,size:12,symbol:"rect"===N.type?"square":"circle"===N.type?"circle":"hexagon2"}};I.push([{trace:F}])}}L=p.showlegend&&m(I,d,p._legends.length>1)}var E=p.hiddenlabels||[];if(!(T||p.showlegend&&L.length))return l.selectAll("."+w).remove(),p._topdefs.select("#"+r).remove(),i.autoMargin(e,w);var H=a.ensureSingle(l,"g",w,(function(e){T||e.attr("pointer-events","all")})),B=a.ensureSingleById(p._topdefs,"clipPath",r,(function(e){e.append("rect")})),j=a.ensureSingle(H,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));j.call(u.stroke,d.bordercolor).call(u.fill,d.bgcolor).style("stroke-width",d.borderwidth+"px");var Y,V=a.ensureSingle(H,"g","scrollbox"),U=d.title;d._titleWidth=0,d._titleHeight=0,U.text?((Y=a.ensureSingle(V,"text",w+"titletext")).attr("text-anchor","start").call(c.font,U.font).text(U.text),D(Y,V,e,d,_)):V.selectAll("."+w+"titletext").remove();var q=a.ensureSingle(H,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(u.fill,h.scrollBarColor)})),G=V.selectAll("g.groups").data(L);G.enter().append("g").attr("class","groups"),G.exit().remove();var Z=G.selectAll("g.traces").data(a.identity);Z.enter().append("g").attr("class","traces"),Z.exit().remove(),Z.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==E.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(A,e,d)})).call(x,e,d).each((function(){T||n.select(this).call(S,e,w)})),a.syncOrAsync([i.previousPromises,function(){return function(e,t,r,a){var i=e._fullLayout,o=P(a);a||(a=i[o]);var l=i._size,s=b.isVertical(a),u=b.isGrouped(a),f="fraction"===a.entrywidthmode,d=a.borderwidth,p=2*d,v=h.itemGap,g=a.indentation+a.itemwidth+2*v,y=2*(d+v),m=C(a),x=a.y<0||0===a.y&&"top"===m,_=a.y>1||1===a.y&&"bottom"===m,w=a.tracegroupgap,T={};a._maxHeight=Math.max(x||_?i.height/2:l.h,30);var k=0;a._width=0,a._height=0;var A=function(e){var t=0,r=0,n=e.title.side;return n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight)),[t,r]}(a);if(s)r.each((function(e){var t=e[0].height;c.setTranslate(this,d+A[0],d+A[1]+a._height+t/2+v),a._height+=t,a._width=Math.max(a._width,e[0].width)})),k=g+a._width,a._width+=v+g+p,a._height+=y,u&&(t.each((function(e,t){c.setTranslate(this,0,t*a.tracegroupgap)})),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var L=O(a),S=a.x<0||0===a.x&&"right"===L,D=a.x>1||1===a.x&&"left"===L,I=_||x,R=i.width/2;a._maxWidth=Math.max(S?I&&"left"===L?l.l+l.w:R:D?I&&"right"===L?l.r+l.w:R:l.w,2*g);var z=0,N=0;r.each((function(e){var t=M(e,a,g);z=Math.max(z,t),N+=t})),k=null;var F=0;if(u){var E=0,H=0,B=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=M(r,a,g),i=r[0].height;c.setTranslate(this,A[0],A[1]+d+v+i/2+t),t+=i,e=Math.max(e,n),T[r[0].trace.legendgroup]=e}));var r=e+v;H>0&&r+d+H>a._maxWidth?(F=Math.max(F,H),H=0,B+=E+w,E=t):E=Math.max(E,t),c.setTranslate(this,H,B),H+=r})),a._width=Math.max(F,H)+d,a._height=B+E+y}else{var j=r.size(),Y=N+p+(j-1)*v<a._maxWidth,V=0,U=0,q=0,G=0;r.each((function(e){var t=e[0].height,r=M(e,a,g),n=Y?r:z;f||(n+=v),n+d+U-v>=a._maxWidth&&(F=Math.max(F,G),U=0,q+=V,a._height+=V,V=0),c.setTranslate(this,A[0]+d+U,A[1]+d+q+t/2+v),G=U+r+v,U+=n,V=Math.max(V,t)})),Y?(a._width=U+p,a._height=V+y):(a._width=Math.max(F,G)+p,a._height+=V+y)}}a._width=Math.ceil(Math.max(a._width+A[0],a._titleWidth+2*(d+h.titlePad))),a._height=Math.ceil(Math.max(a._height+A[1],a._titleHeight+2*(d+h.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var Z=e._context.edits,W=Z.legendText||Z.legendPosition;r.each((function(e){var t=n.select(this).select("."+o+"toggle"),r=e[0].height,i=e[0].trace.legendgroup,l=M(e,a,g);u&&""!==i&&(l=T[i]);var d=W?g:k||l;s||f||(d+=v/2),c.setRect(t,0,-r/2,d,r)}))}(e,G,Z,d)},function(){var t,u,m,x,b=p._size,_=d.borderwidth,M="paper"===d.xref,A="paper"===d.yref;if(U.text&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*v,a=0,i=e.node(),o=c.bBox(i).width;"top center"===t.title.side?a=.5*(t._width-2*r-2*h.titlePad-o):"top right"===t.title.side&&(a=t._width-2*r-2*h.titlePad-o),f.positionText(e,r+h.titlePad+a,r+n)}}(Y,d,_),!T){var L,S;L=M?b.l+b.w*d.x-g[O(d)]*d._width:p.width*d.x-g[O(d)]*d._width,S=A?b.t+b.h*(1-d.y)-g[C(d)]*d._effHeight:p.height*(1-d.y)-g[C(d)]*d._effHeight;var D=function(e,t,r,n){var a=e._fullLayout,o=a[t],l=O(o),s=C(o),c="paper"===o.xref,u="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var f=o.y<.5?"b":"t",d=o.x<.5?"l":"r",h={r:a.width-r,l:r+o._width,b:a.height-n,t:n+o._effHeight};if(c&&u)return i.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*g[l],r:o._width*y[l],b:o._effHeight*y[s],t:o._effHeight*g[s]});c?e._fullLayout._reservedMargin[t][f]=h[f]:u||"v"===o.orientation?e._fullLayout._reservedMargin[t][d]=h[d]:e._fullLayout._reservedMargin[t][f]=h[f]}(e,w,L,S);if(D)return;if(p.margin.autoexpand){var P=L,I=S;L=M?a.constrain(L,0,p.width-d._width):P,S=A?a.constrain(S,0,p.height-d._effHeight):I,L!==P&&a.log("Constrain "+w+".x to make legend fit inside graph"),S!==I&&a.log("Constrain "+w+".y to make legend fit inside graph")}c.setTranslate(H,L,S)}if(q.on(".drag",null),H.on("wheel",null),T||d._height<=d._maxHeight||e._context.staticPlot){var R=d._effHeight;T&&(R=d._height),j.attr({width:d._width-_,height:R-_,x:_/2,y:_/2}),c.setTranslate(V,0,0),B.select("rect").attr({width:d._width-2*_,height:R-2*_,x:_,y:_}),c.setClipUrl(V,r,e),c.setRect(q,0,0,0,0),delete d._scrollY}else{var z,N,F,E=Math.max(h.scrollBarMinHeight,d._effHeight*d._effHeight/d._height),G=d._effHeight-E-2*h.scrollBarMargin,Z=d._height-d._effHeight,W=G/Z,X=Math.min(d._scrollY||0,Z);j.attr({width:d._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:d._effHeight-_,x:_/2,y:_/2}),B.select("rect").attr({width:d._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:d._effHeight-2*_,x:_,y:_+X}),c.setClipUrl(V,r,e),Q(X,E,W),H.on("wheel",(function(){Q(X=a.constrain(d._scrollY+n.event.deltaY/G*Z,0,Z),E,W),0!==X&&X!==Z&&n.event.preventDefault()}));var J=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;z="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,F=X})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(N="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,X=function(e,t,r){var n=(r-t)/W+e;return a.constrain(n,0,Z)}(F,z,N),Q(X,E,W))}));q.call(J);var K=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(z=e.changedTouches[0].clientY,F=X)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(N=e.changedTouches[0].clientY,X=function(e,t,r){var n=(t-r)/W+e;return a.constrain(n,0,Z)}(F,z,N),Q(X,E,W))}));V.call(K)}function Q(t,r,n){d._scrollY=e._fullLayout[w]._scrollY=t,c.setTranslate(V,0,-t),c.setRect(q,d._width,h.scrollBarMargin+t*n,h.scrollBarWidth,r),B.select("rect").attr("y",_+t)}e._context.edits.legendPosition&&(H.classed("cursor-move",!0),s.init({element:H.node(),gd:e,prepFn:function(){var e=c.getTranslate(H);m=e.x,x=e.y},moveFn:function(e,r){var n=m+e,a=x+r;c.setTranslate(H,n,a),t=s.align(n,d._width,b.l,b.l+b.w,d.xanchor),u=s.align(a+d._height,-d._height,b.t+b.h,b.t,d.yanchor)},doneFn:function(){if(void 0!==t&&void 0!==u){var r={};r[w+".x"]=t,r[w+".y"]=u,o.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=l.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));n.size()>0&&k(e,H,n,t,r)}}))}],e)}}function M(e,t,r){var n=e[0],a=n.width,i=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return"fraction"===i?t._maxWidth*o:r+(o||a)}function k(e,t,r,n,a){var i=r.data()[0][0].trace,s={event:a,node:r.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=r.datum()[0].label);var c=l.triggerHandler(e,"plotly_legendclick",s);if(1===n){if(!1===c)return;t._clickTimeout=setTimeout((function(){e._fullLayout&&d(r,e,n)}),e._context.doubleClickDelay)}else 2===n&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==l.triggerHandler(e,"plotly_legenddoubleclick",s)&&!1!==c&&d(r,e,n))}function A(e,t,r){var n,i,l=P(r),s=e.data()[0][0],u=s.trace,d=o.traceIs(u,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!d,v=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,i=s.groupTitle.font):(i=r.font,r.entries?n=s.text:(n=d?s.label:u.name,u._meta&&(n=a.templateString(n,u._meta))));var g=a.ensureSingle(e,"text",l+"text");g.attr("text-anchor","start").call(c.font,i).text(p?L(n,v):n);var y=r.indentation+r.itemwidth+2*h.itemGap;f.positionText(g,y,0),p?g.call(f.makeEditable,{gd:t,text:n}).call(D,e,t,r).on("edit",(function(n){this.text(L(n,v)).call(D,e,t,r);var i=s.trace._fullInput||{},l={};if(o.hasTransform(i,"groupby")){var c=o.getTransformIndices(i,"groupby"),f=c[c.length-1],d=a.keyedContainer(i,"transforms["+f+"].styles","target","value.name");d.set(s.trace._group,n),l=d.constructUpdate()}else l.name=n;return i._isShape?o.call("_guiRelayout",t,"shapes["+u.index+"].name",l.name):o.call("_guiRestyle",t,l,u.index)})):D(g,e,t,r)}function L(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function S(e,t,r){var i,o=t._context.doubleClickDelay,l=1,s=a.ensureSingle(e,"rect",r+"toggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(u.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(s.on("mousedown",(function(){(i=(new Date).getTime())-t._legendMouseDownTime<o?l+=1:(l=1,t._legendMouseDownTime=i)})),s.on("mouseup",(function(){if(!t._dragged&&!t._editing){var a=t._fullLayout[r];(new Date).getTime()-t._legendMouseDownTime>o&&(l=Math.max(l-1,1)),k(t,a,e,l,n.event)}})))}function D(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),f.convertToTspans(e,r,(function(){!function(e,t,r,n){var a=e.data()[0][0];if(r._inHover||!a||a.trace.showlegend){var i=e.select("g[class*=math-group]"),o=i.node(),l=P(r);r||(r=t._fullLayout[l]);var s,u,d=r.borderwidth,p=(n===_?r.title.font:a.groupTitle?a.groupTitle.font:r.font).size*v;if(o){var g=c.bBox(o);s=g.height,u=g.width,n===_?c.setTranslate(i,d,d+.75*s):c.setTranslate(i,0,.25*s)}else{var y="."+l+(n===_?"title":"")+"text",m=e.select(y),x=f.lineCount(m),b=m.node();if(s=p*x,u=b?c.bBox(b).width:0,n===_)"left"===r.title.side&&(u+=2*h.itemGap),f.positionText(m,d+h.titlePad,d+p);else{var w=2*h.itemGap+r.indentation+r.itemwidth;a.groupTitle&&(w=h.itemGap,u-=r.indentation+r.itemwidth),f.positionText(m,w,-p*((x-1)/2-.3))}}n===_?(r._titleWidth=u,r._titleHeight=s):(a.lineHeight=p,a.height=Math.max(s,16)+3,a.width=u)}else e.remove()}(t,r,n,a)}))}function O(e){return a.isRightAnchor(e)?"right":a.isCenterAnchor(e)?"center":"left"}function C(e){return a.isBottomAnchor(e)?"bottom":a.isMiddleAnchor(e)?"middle":"top"}function P(e){return e._id||"legend"}e.exports=function(e,t){if(t)T(e,t);else{var r=e._fullLayout,a=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var e=n.select(this),t=e.attr("class").split(" ")[0];t.match(w)&&-1===a.indexOf(t)&&e.remove()}));for(var i=0;i<a.length;i++){var o=a[i];T(e,e._fullLayout[o])}}}},3076:function(e,t,r){"use strict";var n=r(4040),a=r(2451);e.exports=function(e,t,r){var i,o,l=t._inHover,s=a.isGrouped(t),c=a.isReversed(t),u={},f=[],d=!1,h={},p=0,v=0;function g(e,n,i){if(!1!==t.visible&&(!r||e===t._id))if(""!==n&&a.isGrouped(t))-1===f.indexOf(n)?(f.push(n),d=!0,u[n]=[i]):u[n].push(i);else{var o="~~i"+p;f.push(o),u[o]=[i],p++}}for(i=0;i<e.length;i++){var y=e[i],m=y[0],x=m.trace,b=x.legend,_=x.legendgroup;if(l||x.visible&&x.showlegend)if(n.traceIs(x,"pie-like"))for(h[_]||(h[_]={}),o=0;o<y.length;o++){var w=y[o].label;h[_][w]||(g(b,_,{label:w,color:y[o].color,i:y[o].i,trace:x,pts:y[o].pts}),h[_][w]=!0,v=Math.max(v,(w||"").length))}else g(b,_,m),v=Math.max(v,(x.name||"").length)}if(!f.length)return[];var T=!d||!s,M=[];for(i=0;i<f.length;i++){var k=u[f[i]];T?M.push(k[0]):M.push(k)}for(T&&(M=[M]),i=0;i<M.length;i++){var A=1/0;for(o=0;o<M[i].length;o++){var L=M[i][o].trace.legendrank;A>L&&(A=L)}M[i][0]._groupMinRank=A,M[i][0]._preGroupSort=i}var S=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(M.forEach((function(e,t){e[0]._preGroupSort=t})),M.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),i=0;i<M.length;i++){M[i].forEach((function(e,t){e._preSort=t})),M[i].sort(S);var D=M[i][0].trace,O=null;for(o=0;o<M[i].length;o++){var C=M[i][o].trace.legendgrouptitle;if(C&&C.text){O=C,l&&(C.font=t._groupTitleFont);break}}if(c&&M[i].reverse(),O){var P=!1;for(o=0;o<M[i].length;o++)if(n.traceIs(M[i][o].trace,"pie-like")){P=!0;break}M[i].unshift({i:-1,groupTitle:O,noClick:P,trace:{showlegend:D.showlegend,legendgroup:D.legendgroup,visible:"toggleitem"===t.groupclick||D.visible}})}for(o=0;o<M[i].length;o++)M[i][o]=[M[i][o]]}return t._lgroupsLength=M.length,t._maxNameLength=v,M}},3048:function(e,t,r){"use strict";var n=r(4040),a=r(3400),i=a.pushUnique,o=!0;e.exports=function(e,t,r){var l=t._fullLayout;if(!t._dragged&&!t._editing){var s,c=l.legend.itemclick,u=l.legend.itemdoubleclick,f=l.legend.groupclick;if(1===r&&"toggle"===c&&"toggleothers"===u&&o&&t.data&&t._context.showTips?(a.notifier(a._(t,"Double-click on legend to isolate one trace"),"long"),o=!1):o=!1,1===r?s=c:2===r&&(s=u),s){var d="togglegroup"===f,h=l.hiddenlabels?l.hiddenlabels.slice():[],p=e.data()[0][0];if(!p.groupTitle||!p.noClick){var v=t._fullData,g=(l.shapes||[]).filter((function(e){return e.showlegend})),y=v.concat(g),m=p.trace;m._isShape&&(m=m._fullInput);var x,b,_,w,T,M=m.legendgroup,k={},A=[],L=[],S=[],D=(l.shapes||[]).map((function(e){return e._input})),O=!1,C=m.legend,P=m._fullInput;if(P&&P._isShape||!n.traceIs(m,"pie-like")){var I,R=M&&M.length,z=[];if(R)for(x=0;x<y.length;x++)(I=y[x]).visible&&I.legendgroup===M&&z.push(x);if("toggle"===s){var N;switch(m.visible){case!0:N="legendonly";break;case!1:N=!1;break;case"legendonly":N=!0}if(R)if(d)for(x=0;x<y.length;x++){var F=y[x];!1!==F.visible&&F.legendgroup===M&&ee(F,N)}else ee(m,N);else ee(m,N)}else if("toggleothers"===s){var E,H,B,j,Y=!0;for(x=0;x<y.length;x++)if(E=(j=y[x])===m,H=!0!==j.showlegend,!(E||H||R&&j.legendgroup===M||j.legend!==C||!0!==j.visible||n.traceIs(j,"notLegendIsolatable"))){Y=!1;break}for(x=0;x<y.length;x++)if(!1!==(j=y[x]).visible&&j.legend===C&&!n.traceIs(j,"notLegendIsolatable"))switch(m.visible){case"legendonly":ee(j,!0);break;case!0:B=!!Y||"legendonly",E=j===m,H=!0!==j.showlegend&&!j.legendgroup,ee(j,!!(E||R&&j.legendgroup===M||H)||B)}}for(x=0;x<L.length;x++)if(_=L[x]){var V=_.constructUpdate(),U=Object.keys(V);for(b=0;b<U.length;b++)w=U[b],(k[w]=k[w]||[])[S[x]]=V[w]}for(T=Object.keys(k),x=0;x<T.length;x++)for(w=T[x],b=0;b<A.length;b++)k[w].hasOwnProperty(b)||(k[w][b]=void 0);O?n.call("_guiUpdate",t,k,{shapes:D},A):n.call("_guiRestyle",t,k,A)}else{var q=p.label,G=h.indexOf(q);if("toggle"===s)-1===G?h.push(q):h.splice(G,1);else if("toggleothers"===s){var Z=-1!==G,W=[];for(x=0;x<t.calcdata.length;x++){var X=t.calcdata[x];for(b=0;b<X.length;b++){var J=X[b].label;C===X[0].trace.legend&&q!==J&&(-1===h.indexOf(J)&&(Z=!0),i(h,J),W.push(J))}}if(!Z)for(var K=0;K<W.length;K++){var Q=h.indexOf(W[K]);-1!==Q&&h.splice(Q,1)}}n.call("_guiRelayout",t,"hiddenlabels",h)}}}}function $(e,t){var r=A.indexOf(e),n=k.visible;return n||(n=k.visible=[]),-1===A.indexOf(e)&&(A.push(e),r=A.length-1),n[r]=t,r}function ee(e,t){if(!p.groupTitle||d){var r,i=e._fullInput||e,o=i._isShape,l=i.index;if(void 0===l&&(l=i._index),n.hasTransform(i,"groupby")){var s=L[l];if(!s){var c=n.getTransformIndices(i,"groupby"),u=c[c.length-1];s=a.keyedContainer(i,"transforms["+u+"].styles","target","value.visible"),L[l]=s}var f=s.get(e._group);void 0===f&&(f=!0),!1!==f&&s.set(e._group,t),S[l]=$(l,!1!==i.visible)}else{var h=!1!==i.visible&&t;o?(r=h,D[l].visible=r,O=!0):$(l,h)}}}}},2451:function(e,t){"use strict";t.isGrouped=function(e){return-1!==(e.traceorder||"").indexOf("grouped")},t.isVertical=function(e){return"h"!==e.orientation},t.isReversed=function(e){return-1!==(e.traceorder||"").indexOf("reversed")}},2780:function(e,t,r){"use strict";e.exports={moduleType:"component",name:"legend",layoutAttributes:r(3800),supplyLayoutDefaults:r(7864),draw:r(1140),style:r(2012)}},2012:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(3400),o=i.strTranslate,l=r(3616),s=r(6308),c=r(4288).extractOpts,u=r(3028),f=r(528),d=r(9656).castOption,h=r(5196);function p(e,t){return(t?"radial":"horizontal")+(e?"":"reversed")}function v(e){var t=e[0].trace,r=t.contours,n=u.hasLines(t),a=u.hasMarkers(t),i=t.visible&&t.fill&&"none"!==t.fill,o=!1,l=!1;if(r){var s=r.coloring;"lines"===s?o=!0:n="none"===s||"heatmap"===s||r.showlines,"constraint"===r.type?i="="!==r._operation:"fill"!==s&&"heatmap"!==s||(l=!0)}return{showMarker:a,showLine:n,showFill:i,showGradientLine:o,showGradientFill:l,anyLine:n||o,anyFill:i||l}}function g(e,t,r){return e&&i.isArrayOrTypedArray(e)?t:e>r?r:e}e.exports=function(e,t,r){var y=t._fullLayout;r||(r=y.legend);var m="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*h.itemGap)/2,_=o(b,0),w=function(e,t,r,n){var a;if(e+1)a=e;else{if(!(t&&t.width>0))return 0;a=t.width}return m?n:Math.min(a,r)};function T(e,i,o){var u=e[0].trace,f=u.marker||{},d=f.line||{},h=f.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?u.visible&&u.type===o:a.traceIs(u,"bar"),v=n.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=n.select(this),i=e[0],o=w(i.mlw,f.line,5,2);a.style("stroke-width",o+"px");var h=i.mcc;if(!r._inHover&&"mc"in i){var p=c(f),v=p.mid;void 0===v&&(v=(p.max+p.min)/2),h=l.tryColorscale(f,"")(v)}var y=h||i.mc||f.color,m=f.pattern,x=m&&l.getPatternAttr(m.shape,0,"");if(x){var b=l.getPatternAttr(m.bgcolor,0,null),_=l.getPatternAttr(m.fgcolor,0,null),T=m.fgopacity,M=g(m.size,8,10),k=g(m.solidity,.5,1),A="legend-"+u.uid;a.call(l.pattern,"legend",t,A,x,M,k,h,m.fillmode,b,_,T)}else a.call(s.fill,y);o&&s.stroke(a,i.mlc||d.color)}))}function M(e,r,o){var l=e[0],s=l.trace,c=o?s.visible&&s.type===o:a.traceIs(s,o),u=n.select(r).select("g.legendpoints").selectAll("path.legend"+o).data(c?[e]:[]);if(u.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),u.exit().remove(),u.size()){var h=s.marker||{},p=w(d(h.line.width,l.pts),h.line,5,2),v="pieLike",g=i.minExtend(s,{marker:{line:{width:p}}},v),y=i.minExtend(l,{trace:g},v);f(u,y,g,t)}}e.each((function(e){var t=n.select(this),a=i.ensureSingle(t,"g","layers");a.style("opacity",e[0].trace.opacity);var l=r.indentation,s=r.valign,c=e[0].lineHeight,u=e[0].height;if("middle"===s&&0===l||!c||!u)a.attr("transform",null);else{var f={top:1,bottom:-1}[s]*(.5*(c-u+3))||0,d=r.indentation;a.attr("transform",o(d,f))}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 r,a=e[0].trace,o=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="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"]],r=!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"]],r=!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"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!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"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(e,o){var u,f=n.select(this),d=c(a),h=d.colorscale,v=d.reversescale;if(h){if(!r){var g=h.length;u=0===o?h[v?g-1:0][1]:1===o?h[v?0:g-1][1]:h[Math.floor((g-1)/2)][1]}}else{var y=a.vertexcolor||a.facecolor||a.color;u=i.isArrayOrTypedArray(y)?y[o]||y[0]:y}f.attr("d",e[0]),u?f.call(s.fill,u):f.call((function(e){if(e.size()){var n="legendfill-"+a.uid;l.gradient(e,t,n,p(v,"radial"===r),h,"fill")}}))}))})).each((function(e){var t=e[0].trace,r="waterfall"===t.type;if(e[0]._distinct&&r){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,T(e,this,"waterfall")}var i=[];t.visible&&r&&(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=n.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 r=n.select(this),a=t[e[0]].marker,i=w(void 0,a.line,5,2);r.attr("d",e[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)}))})).each((function(e){T(e,this,"funnel")})).each((function(e){T(e,this)})).each((function(e){var r=e[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&a.traceIs(r,"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=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=w(void 0,r.line,5,2);e.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(e,r.line.color)}else{var c=i.minExtend(r,{marker:{size:m?12:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(l.pointStyle,c,t)}}))})).each((function(e){M(e,this,"funnelarea")})).each((function(e){M(e,this,"pie")})).each((function(e){var r,a,o=v(e),s=o.showFill,f=o.showLine,d=o.showGradientLine,h=o.showGradientFill,g=o.anyFill,y=o.anyLine,m=e[0],b=m.trace,_=c(b),T=_.colorscale,M=_.reversescale,k=u.hasMarkers(b)||!g?"M5,0":y?"M5,-2":"M5,-3",A=n.select(this),L=A.select(".legendfill").selectAll("path").data(s||h?[e]:[]);if(L.enter().append("path").classed("js-fill",!0),L.exit().remove(),L.attr("d",k+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(s)l.fillGroupStyle(e,t,!0);else{var r="legendfill-"+b.uid;l.gradient(e,t,r,p(M),T,"fill")}})),f||d){var S=w(void 0,b.line,10,5);a=i.minExtend(b,{line:{width:S}}),r=[i.minExtend(m,{trace:a})]}var D=A.select(".legendlines").selectAll("path").data(f||d?[r]:[]);D.enter().append("path").classed("js-line",!0),D.exit().remove(),D.attr("d",k+(d?"l"+x+",0.0001":"h"+x)).call(f?l.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;l.lineGroupStyle(e),l.gradient(e,t,r,p(M),T,"stroke")}})})).each((function(e){var r,a,o=v(e),s=o.anyFill,c=o.anyLine,f=o.showLine,d=o.showMarker,h=e[0],p=h.trace,g=!d&&!c&&!s&&u.hasText(p);function y(e,t,r,n){var a=i.nestedProperty(p,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(m&&o&&void 0!==n&&(o=n),r){if(o<r[0])return r[0];if(o>r[1])return r[1]}return o}function x(e){return h._distinct&&h.index&&e[h.index]?e[h.index]:e[0]}if(d||g||f){var b={},w={};if(d){b.mc=y("marker.color",x),b.mx=y("marker.symbol",x),b.mo=y("marker.opacity",i.mean,[.2,1]),b.mlc=y("marker.line.color",x),b.mlw=y("marker.line.width",i.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=y("marker.size",i.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=y("textposition",x),b.ts=10,b.tc=y("textfont.color",x),b.tf=y("textfont.family",x)),r=[i.minExtend(h,b)],(a=i.minExtend(p,w)).selectedpoints=null,a.texttemplate=null}var M=n.select(this).select("g.legendpoints"),k=M.selectAll("path.scatterpts").data(d?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),k.exit().remove(),k.call(l.pointStyle,a,t),d&&(r[0].mrc=3);var A=M.selectAll("g.pointtext").data(g?r:[]);A.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),A.exit().remove(),A.selectAll("text").call(l.textPointStyle,a,t)})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);r.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),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(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,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);r.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),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(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,r){"use strict";r(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,r){"use strict";var n=r(4040),a=r(7316),i=r(9811),o=r(9224),l=r(4016).eraseActiveShape,s=r(3400),c=s._,u=e.exports={};function f(e,t){var r,a,o=t.currentTarget,l=o.getAttribute("data-attr"),s=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},f=i.list(e,null,!0),d=c._cartesianSpikesEnabled;if("zoom"===l){var h,p="in"===s?.5:2,v=(1+p)/2,g=(1-p)/2;for(a=0;a<f.length;a++)if(!(r=f[a]).fixedrange)if(h=r._name,"auto"===s)u[h+".autorange"]=!0;else if("reset"===s)void 0===r._rangeInitial0&&void 0===r._rangeInitial1?u[h+".autorange"]=!0:void 0===r._rangeInitial0?(u[h+".autorange"]=r._autorangeInitial,u[h+".range"]=[null,r._rangeInitial1]):void 0===r._rangeInitial1?(u[h+".range"]=[r._rangeInitial0,null],u[h+".autorange"]=r._autorangeInitial):u[h+".range"]=[r._rangeInitial0,r._rangeInitial1],void 0!==r._showSpikeInitial&&(u[h+".showspikes"]=r._showSpikeInitial,"on"!==d||r._showSpikeInitial||(d="off"));else{var y=[r.r2l(r.range[0]),r.r2l(r.range[1])],m=[v*y[0]+g*y[1],v*y[1]+g*y[0]];u[h+".range[0]"]=r.l2r(m[0]),u[h+".range[1]"]=r.l2r(m[1])}}else"hovermode"!==l||"x"!==s&&"y"!==s||(s=c._isHoriz?"y":"x",o.setAttribute("data-val",s)),u[l]=s;c._cartesianSpikesEnabled=d,n.call("_guiRelayout",e,u)}function d(e,t){for(var r=t.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,o=e._fullLayout._subplots.gl3d||[],l={},s=a.split("."),c=0;c<o.length;c++)l[o[c]+"."+s[1]]=i;var u="pan"===i?i:"zoom";l.dragmode=u,n.call("_guiRelayout",e,l)}function h(e,t){for(var r=t.currentTarget.getAttribute("data-attr"),a="resetLastSave"===r,i="resetDefault"===r,o=e._fullLayout,l=o._subplots.gl3d||[],s={},c=0;c<l.length;c++){var u,f=l[c],d=f+".camera",h=f+".aspectratio",p=f+".aspectmode",v=o[f]._scene;a?(s[d+".up"]=v.viewInitial.up,s[d+".eye"]=v.viewInitial.eye,s[d+".center"]=v.viewInitial.center,u=!0):i&&(s[d+".up"]=null,s[d+".eye"]=null,s[d+".center"]=null,u=!0),u&&(s[h+".x"]=v.viewInitial.aspectratio.x,s[h+".y"]=v.viewInitial.aspectratio.y,s[h+".z"]=v.viewInitial.aspectratio.z,s[p]=v.viewInitial.aspectmode)}n.call("_guiRelayout",e,s)}function p(e,t){var r=t.currentTarget,n=r._previousVal,a=e._fullLayout,i=a._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],l={},s={};if(n)s=n,r._previousVal=null;else{for(var c=0;c<i.length;c++){var u=i[c],f=a[u],d=u+".hovermode";l[d]=f.hovermode,s[d]=!1;for(var h=0;h<3;h++){var p=o[h],v=u+"."+p+".showspikes";s[v]=!1,l[v]=f[p].showspikes}}r._previousVal=l}return s}function v(e,t){for(var r=t.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,o=e._fullLayout,l=o._subplots.geo||[],s=0;s<l.length;s++){var c=l[s],u=o[c];if("zoom"===a){var f=u.projection.scale,d="in"===i?2*f:.5*f;n.call("_guiRelayout",e,c+".projection.scale",d)}}"reset"===a&&x(e,"geo")}function g(e){var t=e._fullLayout;return!t.hovermode&&(t._has("cartesian")?t._isHoriz?"y":"x":"closest")}function y(e){var t=g(e);n.call("_guiRelayout",e,"hovermode",t)}function m(e,t){for(var r=t.currentTarget.getAttribute("data-val"),a=e._fullLayout,i=a._subplots.mapbox||[],o={},l=0;l<i.length;l++){var s=i[l],c=a[s].zoom,u="in"===r?1.05*c:c/1.05;o[s+".zoom"]=u}n.call("_guiRelayout",e,o)}function x(e,t){for(var r=e._fullLayout,a=r._subplots[t]||[],i={},o=0;o<a.length;o++)for(var l=a[o],s=r[l]._subplot.viewInitial,c=Object.keys(s),u=0;u<c.length;u++){var f=c[u];i[l+"."+f]=s[f]}n.call("_guiRelayout",e,i)}u.toImage={name:"toImage",title:function(e){var t=(e._context.toImageButtonOptions||{}).format||"png";return c(e,"png"===t?"Download plot as a png":"Download plot")},icon:o.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};s.notifier(c(e,"Taking snapshot - this may take a few seconds"),"long"),"svg"!==r.format&&s.isIE()&&(s.notifier(c(e,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach((function(e){e in t&&(r[e]=t[e])})),n.call("downloadImage",e,r).then((function(t){s.notifier(c(e,"Snapshot succeeded")+" - "+t,"long")})).catch((function(){s.notifier(c(e,"Sorry, there was a problem downloading your snapshot!"),"long")}))}},u.sendDataToCloud={name:"sendDataToCloud",title:function(e){return c(e,"Edit in Chart Studio")},icon:o.disk,click:function(e){a.sendDataToCloud(e)}},u.editInChartStudio={name:"editInChartStudio",title:function(e){return c(e,"Edit in Chart Studio")},icon:o.pencil,click:function(e){a.sendDataToCloud(e)}},u.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return c(e,"Zoom")},attr:"dragmode",val:"zoom",icon:o.zoombox,click:f},u.pan2d={name:"pan2d",_cat:"pan",title:function(e){return c(e,"Pan")},attr:"dragmode",val:"pan",icon:o.pan,click:f},u.select2d={name:"select2d",_cat:"select",title:function(e){return c(e,"Box Select")},attr:"dragmode",val:"select",icon:o.selectbox,click:f},u.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return c(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:o.lasso,click:f},u.drawclosedpath={name:"drawclosedpath",title:function(e){return c(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:o.drawclosedpath,click:f},u.drawopenpath={name:"drawopenpath",title:function(e){return c(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:o.drawopenpath,click:f},u.drawline={name:"drawline",title:function(e){return c(e,"Draw line")},attr:"dragmode",val:"drawline",icon:o.drawline,click:f},u.drawrect={name:"drawrect",title:function(e){return c(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:o.drawrect,click:f},u.drawcircle={name:"drawcircle",title:function(e){return c(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:o.drawcircle,click:f},u.eraseshape={name:"eraseshape",title:function(e){return c(e,"Erase active shape")},icon:o.eraseshape,click:l},u.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return c(e,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:f},u.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return c(e,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:f},u.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return c(e,"Autoscale")},attr:"zoom",val:"auto",icon:o.autoscale,click:f},u.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return c(e,"Reset axes")},attr:"zoom",val:"reset",icon:o.home,click:f},u.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return c(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:f},u.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return c(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:o.tooltip_compare,gravity:"ne",click:f},u.zoom3d={name:"zoom3d",_cat:"zoom",title:function(e){return c(e,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:o.zoombox,click:d},u.pan3d={name:"pan3d",_cat:"pan",title:function(e){return c(e,"Pan")},attr:"scene.dragmode",val:"pan",icon:o.pan,click:d},u.orbitRotation={name:"orbitRotation",title:function(e){return c(e,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:o["3d_rotate"],click:d},u.tableRotation={name:"tableRotation",title:function(e){return c(e,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:o["z-axis"],click:d},u.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(e){return c(e,"Reset camera to default")},attr:"resetDefault",icon:o.home,click:h},u.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(e){return c(e,"Reset camera to last save")},attr:"resetLastSave",icon:o.movie,click:h},u.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(e,t){var r=p(e,t);n.call("_guiRelayout",e,r)}},u.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(e){return c(e,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:v},u.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(e){return c(e,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:v},u.resetGeo={name:"resetGeo",_cat:"reset",title:function(e){return c(e,"Reset")},attr:"reset",val:null,icon:o.autoscale,click:v},u.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:y},u.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:y},u.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:y},u.resetViewSankey={name:"resetSankeyGroup",title:function(e){return c(e,"Reset view")},icon:o.home,click:function(e){for(var t={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<e._fullData.length;r++){var a=e._fullData[r]._viewInitial;t["node.groups"].push(a.node.groups.slice()),t["node.x"].push(a.node.x.slice()),t["node.y"].push(a.node.y.slice())}n.call("restyle",e,t)}},u.toggleHover={name:"toggleHover",title:function(e){return c(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(e,t){var r=p(e,t);r.hovermode=g(e),n.call("_guiRelayout",e,r)}},u.resetViews={name:"resetViews",title:function(e){return c(e,"Reset views")},icon:o.home,click:function(e,t){var r=t.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),f(e,t),r.setAttribute("data-attr","resetLastSave"),h(e,t),x(e,"geo"),x(e,"mapbox")}},u.toggleSpikelines={name:"toggleSpikelines",title:function(e){return c(e,"Toggle Spike Lines")},icon:o.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(e){var t=e._fullLayout,r=t._cartesianSpikesEnabled;t._cartesianSpikesEnabled="on"===r?"off":"on",n.call("_guiRelayout",e,function(e){for(var t="on"===e._fullLayout._cartesianSpikesEnabled,r=i.list(e,null,!0),n={},a=0;a<r.length;a++){var o=r[a];n[o._name+".showspikes"]=!!t||o._showSpikeInitial}return n}(e))}},u.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(e){return c(e,"Reset view")},attr:"reset",icon:o.home,click:function(e){x(e,"mapbox")}},u.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(e){return c(e,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:m},u.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(e){return c(e,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:m}},6052:function(e,t,r){"use strict";var n=r(1868),a=Object.keys(n),i=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],o=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(i),l=[];a.forEach((function(e){!function(e){if(-1===o.indexOf(e._cat||e.name)){var t=e.name,r=(e._cat||e.name).toLowerCase();-1===l.indexOf(t)&&l.push(t),-1===l.indexOf(r)&&l.push(r)}}(n[e])})),l.sort(),e.exports={DRAW_MODES:i,backButtons:o,foreButtons:l}},824:function(e,t,r){"use strict";var n=r(3400),a=r(6308),i=r(1780),o=r(6540);e.exports=function(e,t){var r=e.modebar||{},l=i.newContainer(t,"modebar");function s(e,t){return n.coerce(r,l,o,e,t)}s("orientation"),s("bgcolor",a.addOpacity(t.paper_bgcolor,.5));var c=a.contrast(a.rgb(t.modebar.bgcolor));s("color",a.addOpacity(c,.3)),s("activecolor",a.addOpacity(c,.7)),s("uirevision",t.uirevision),s("add"),s("remove")}},3080:function(e,t,r){"use strict";e.exports={moduleType:"component",name:"modebar",layoutAttributes:r(6540),supplyLayoutDefaults:r(824),manage:r(8816)}},8816:function(e,t,r){"use strict";var n=r(9811),a=r(3028),i=r(4040),o=r(624).isUnifiedHover,l=r(6400),s=r(1868),c=r(6052).DRAW_MODES,u=r(3400).extendDeep;e.exports=function(e){var t=e._fullLayout,r=e._context,f=t._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var d,h=r.modeBarButtons;d=Array.isArray(h)&&h.length?function(e){for(var t=u([],e),r=0;r<t.length;r++)for(var n=t[r],a=0;a<n.length;a++){var i=n[a];if("string"==typeof i){if(void 0===s[i])throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "));t[r][a]=s[i]}}return t}(h):!r.displayModeBar&&r.watermark?[]:function(e){var t=e._fullLayout,r=e._fullData,l=e._context;function u(e,t){if("string"==typeof t){if(t.toLowerCase()===e.toLowerCase())return!0}else{var r=t.name,n=t._cat||t.name;if(r===e||n===e.toLowerCase())return!0}return!1}var f=t.modebar.add;"string"==typeof f&&(f=[f]);var d=t.modebar.remove;"string"==typeof d&&(d=[d]);var h=l.modeBarButtonsToAdd.concat(f.filter((function(e){for(var t=0;t<l.modeBarButtonsToRemove.length;t++)if(u(e,l.modeBarButtonsToRemove[t]))return!1;return!0}))),p=l.modeBarButtonsToRemove.concat(d.filter((function(e){for(var t=0;t<l.modeBarButtonsToAdd.length;t++)if(u(e,l.modeBarButtonsToAdd[t]))return!1;return!0}))),v=t._has("cartesian"),g=t._has("gl3d"),y=t._has("geo"),m=t._has("pie"),x=t._has("funnelarea"),b=t._has("gl2d"),_=t._has("ternary"),w=t._has("mapbox"),T=t._has("polar"),M=t._has("smith"),k=t._has("sankey"),A=function(e){for(var t=n.list({_fullLayout:e},null,!0),r=0;r<t.length;r++)if(!t[r].fixedrange)return!1;return!0}(t),L=o(t.hovermode),S=[];function D(e){if(e.length){for(var t=[],r=0;r<e.length;r++){for(var n=e[r],a=s[n],i=a.name.toLowerCase(),o=(a._cat||a.name).toLowerCase(),l=!1,c=0;c<p.length;c++){var u=p[c].toLowerCase();if(u===i||u===o){l=!0;break}}l||t.push(s[n])}S.push(t)}}var O=["toImage"];l.showEditInChartStudio?O.push("editInChartStudio"):l.showSendToCloud&&O.push("sendDataToCloud"),D(O);var C=[],P=[],I=[],R=[];(v||b||m||x||_)+y+g+w+T+M>1?(P=["toggleHover"],I=["resetViews"]):y?(C=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],I=["resetGeo"]):g?(P=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(C=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],I=["resetViewMapbox"]):b?P=["hoverClosestGl2d"]:m?P=["hoverClosestPie"]:k?(P=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):P=["toggleHover"],v&&(P=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(e){for(var t=0;t<e.length;t++)if(!i.traceIs(e[t],"noHover"))return!1;return!0}(r)||L)&&(P=[]),!v&&!b||A||(C=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==I[0]&&(I=["resetScale2d"])),g?R=["zoom3d","pan3d","orbitRotation","tableRotation"]:(v||b)&&!A||_?R=["zoom2d","pan2d"]:w||y?R=["pan2d"]:T&&(R=["zoom2d"]),function(e){for(var t=!1,r=0;r<e.length&&!t;r++){var n=e[r];n._module&&n._module.selectPoints&&(i.traceIs(n,"scatter-like")?(a.hasMarkers(n)||a.hasText(n))&&(t=!0):i.traceIs(n,"box-violin")&&"all"!==n.boxpoints&&"all"!==n.points||(t=!0))}return t}(r)&&R.push("select2d","lasso2d");var z=[],N=function(e){-1===z.indexOf(e)&&-1!==P.indexOf(e)&&z.push(e)};if(Array.isArray(h)){for(var F=[],E=0;E<h.length;E++){var H=h[E];"string"==typeof H?(H=H.toLowerCase(),-1!==c.indexOf(H)?(t._has("mapbox")||t._has("cartesian"))&&R.push(H):"togglespikelines"===H?N("toggleSpikelines"):"togglehover"===H?N("toggleHover"):"hovercompare"===H?N("hoverCompareCartesian"):"hoverclosest"===H?(N("hoverClosestCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestGl2d"),N("hoverClosestPie")):"v1hovermode"===H&&(N("toggleHover"),N("hoverClosestCartesian"),N("hoverCompareCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestGl2d"),N("hoverClosestPie"))):F.push(H)}h=F}return D(R),D(C.concat(I)),D(z),function(e,t){if(t.length)if(Array.isArray(t[0]))for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t);return e}(S,h)}(e),f?f.update(e,d):t._modeBar=l(e,d)}else f&&(f.destroy(),delete t._modeBar)}},6400:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=r(3400),o=r(9224),l=r(5788).version,s=new DOMParser;function c(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var u=c.prototype;u.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this._uid=a,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",t=t.reverse());var o=n.modebar,l="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";i.deleteRelatedStyleRule(a),i.addRelatedStyleRule(a,l+"#"+a+" .modebar-group","background-color: "+o.bgcolor),i.addRelatedStyleRule(a,"#"+a+" .modebar-btn .icon path","fill: "+o.color),i.addRelatedStyleRule(a,"#"+a+" .modebar-btn:hover .icon path","fill: "+o.activecolor),i.addRelatedStyleRule(a,"#"+a+" .modebar-btn.active .icon path","fill: "+o.activecolor);var s=!this.hasButtons(t),c=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||c||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var f=this.getLogo();r.watermark&&(f.className=f.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(f,this.element.childNodes[0]):this.element.appendChild(f),this.hasLogo=!0}this.updateActiveButton()},u.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(e){var r=t.createGroup();e.forEach((function(e){var n=e.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");t.buttonsNames.push(n);var a=t.createButton(e);t.buttonElements.push(a),r.appendChild(a)})),t.element.appendChild(r)}))},u.createGroup=function(){var e=document.createElement("div");return e.className="modebar-group",e},u.createButton=function(e){var t=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var a=e.title;void 0===a?a=e.name:"function"==typeof a&&(a=a(this.graphInfo)),(a||0===a)&&r.setAttribute("data-title",a),void 0!==e.attr&&r.setAttribute("data-attr",e.attr);var i=e.val;if(void 0!==i&&("function"==typeof i&&(i=i(this.graphInfo)),r.setAttribute("data-val",i)),"function"!=typeof e.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){e.click(t.graphInfo,r),t.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&n.select(r).classed("active",!0);var l=e.icon;return"function"==typeof l?r.appendChild(l()):r.appendChild(this.createIcon(l||o.question)),r.setAttribute("data-gravity",e.gravity||"n"),r},u.createIcon=function(e){var t,r=a(e.height)?Number(e.height):e.ascent-e.descent,n="http://www.w3.org/2000/svg";if(e.path){(t=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,e.width,r].join(" ")),t.setAttribute("class","icon");var i=document.createElementNS(n,"path");i.setAttribute("d",e.path),e.transform?i.setAttribute("transform",e.transform):void 0!==e.ascent&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(i)}return e.svg&&(t=s.parseFromString(e.svg,"application/xml").childNodes[0]),t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},u.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach((function(e){var a=e.getAttribute("data-val")||!0,o=e.getAttribute("data-attr"),l="true"===e.getAttribute("data-toggle"),s=n.select(e);if(l)o===r&&s.classed("active",!s.classed("active"));else{var c=null===o?o:i.nestedProperty(t,o).get();s.classed("active",c===a)}}))},u.hasButtons=function(e){var t=this.buttons;if(!t)return!1;if(e.length!==t.length)return!1;for(var r=0;r<e.length;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;n<e[r].length;n++)if(e[r][n].name!==t[r][n].name)return!1}return!0},u.getLogo=function(){var e=this.createGroup(),t=document.createElement("a");return t.href="https://plotly.com/",t.target="_blank",t.setAttribute("data-title",i._(this.graphInfo,"Produced with Plotly.js")+" (v"+l+")"),t.className="modebar-btn plotlyjsicon modebar-btn--logo",t.appendChild(this.createIcon(o.newplotlylogo)),e.appendChild(t),e},u.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},u.destroy=function(){i.removeElement(this.container.querySelector(".modebar")),i.deleteRelatedStyleRule(this._uid)},e.exports=function(e,t){var r=e._fullLayout,a=new c({graphInfo:e,container:r._modebardiv.node(),buttons:t});return r._privateplot&&n.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}},6680:function(e,t,r){"use strict";var n=r(5376),a=r(2548),i=(0,r(1780).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});e.exports={visible:{valType:"boolean",editType:"plot"},buttons:i,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:n({editType:"plot"}),bgcolor:{valType:"color",dflt:a.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:a.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},5984:function(e){"use strict";e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},2148:function(e,t,r){"use strict";var n=r(3400),a=r(6308),i=r(1780),o=r(1272),l=r(6680),s=r(5984);function c(e,t,r,a){var i=a.calendar;function o(r,a){return n.coerce(e,t,l.buttons,r,a)}if(o("visible")){var s=o("step");"all"!==s&&(!i||"gregorian"===i||"month"!==s&&"year"!==s?o("stepmode"):t.stepmode="backward",o("count")),o("label")}}e.exports=function(e,t,r,u,f){var d=e.rangeselector||{},h=i.newContainer(t,"rangeselector");function p(e,t){return n.coerce(d,h,l,e,t)}if(p("visible",o(d,h,{name:"buttons",handleItemDefaults:c,calendar:f}).length>0)){var v=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),a=0,i=0;i<n.length;i++){var o=t[n[i]].domain;o&&(a=Math.max(o[1],a))}return[e.domain[0],a+s.yPad]}(t,r,u);p("x",v[0]),p("y",v[1]),n.noneOrAll(e,t,["x","y"]),p("xanchor"),p("yanchor"),n.coerceFont(p,"font",r.font);var g=p("bgcolor");p("activecolor",a.contrast(g,s.lightAmount,s.darkAmount)),p("bordercolor"),p("borderwidth")}}},216:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(7316),o=r(6308),l=r(3616),s=r(3400),c=s.strTranslate,u=r(2736),f=r(9811),d=r(4284),h=d.LINE_SPACING,p=d.FROM_TL,v=d.FROM_BR,g=r(5984),y=r(8040);function m(e){return e._id}function x(e,t,r){var n=s.ensureSingle(e,"rect","selector-rect",(function(e){e.attr("shape-rendering","crispEdges")}));n.attr({rx:g.rx,ry:g.ry}),n.call(o.stroke,t.bordercolor).call(o.fill,function(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}(t,r)).style("stroke-width",t.borderwidth+"px")}function b(e,t,r,n){var a,i;s.ensureSingle(e,"text","selector-text",(function(e){e.attr("text-anchor","middle")})).call(l.font,t.font).text((a=r,i=n._fullLayout._meta,a.label?i?s.templateString(a.label,i):a.label:"all"===a.step?"all":a.count+a.step.charAt(0))).call((function(e){u.convertToTspans(e,n)}))}e.exports=function(e){var t=e._fullLayout._infolayer.selectAll(".rangeselector").data(function(e){for(var t=f.list(e,"x",!0),r=[],n=0;n<t.length;n++){var a=t[n];a.rangeselector&&a.rangeselector.visible&&r.push(a)}return r}(e),m);t.enter().append("g").classed("rangeselector",!0),t.exit().remove(),t.style({cursor:"pointer","pointer-events":"all"}),t.each((function(t){var r=n.select(this),o=t,f=o.rangeselector,d=r.selectAll("g.button").data(s.filterVisible(f.buttons));d.enter().append("g").classed("button",!0),d.exit().remove(),d.each((function(t){var r=n.select(this),i=y(o,t);t._isActive=function(e,t,r){if("all"===t.step)return!0===e.autorange;var n=Object.keys(r);return e.range[0]===r[n[0]]&&e.range[1]===r[n[1]]}(o,t,i),r.call(x,f,t),r.call(b,f,t,e),r.on("click",(function(){e._dragged||a.call("_guiRelayout",e,i)})),r.on("mouseover",(function(){t._isHovered=!0,r.call(x,f,t)})),r.on("mouseout",(function(){t._isHovered=!1,r.call(x,f,t)}))})),function(e,t,r,a,o){var f=0,d=0,y=r.borderwidth;t.each((function(){var e=n.select(this).select(".selector-text"),t=r.font.size*h,a=Math.max(t*u.lineCount(e),16)+3;d=Math.max(d,a)})),t.each((function(){var e=n.select(this),t=e.select(".selector-rect"),a=e.select(".selector-text"),i=a.node()&&l.bBox(a.node()).width,o=r.font.size*h,s=u.lineCount(a),p=Math.max(i+10,g.minButtonWidth);e.attr("transform",c(y+f,y)),t.attr({x:0,y:0,width:p,height:d}),u.positionText(a,p/2,d/2-(s-1)*o/2+3),f+=p+5}));var m=e._fullLayout._size,x=m.l+m.w*r.x,b=m.t+m.h*(1-r.y),_="left";s.isRightAnchor(r)&&(x-=f,_="right"),s.isCenterAnchor(r)&&(x-=f/2,_="center");var w="top";s.isBottomAnchor(r)&&(b-=d,w="bottom"),s.isMiddleAnchor(r)&&(b-=d/2,w="middle"),f=Math.ceil(f),d=Math.ceil(d),x=Math.round(x),b=Math.round(b),i.autoMargin(e,a+"-range-selector",{x:r.x,y:r.y,l:f*p[_],r:f*v[_],b:d*v[w],t:d*p[w]}),o.attr("transform",c(x,b))}(e,d,f,o._name,r)}))}},8040:function(e,t,r){"use strict";var n=r(3220),a=r(3400).titleCase;e.exports=function(e,t){var r=e._name,i={};if("all"===t.step)i[r+".autorange"]=!0;else{var o=function(e,t){var r,i=e.range,o=new Date(e.r2l(i[1])),l=t.step,s=n["utc"+a(l)],c=t.count;switch(t.stepmode){case"backward":r=e.l2r(+s.offset(o,-c));break;case"todate":var u=s.offset(o,-c);r=e.l2r(+s.ceil(u))}return[r,i[1]]}(e,t);i[r+".range[0]"]=o[0],i[r+".range[1]"]=o[1]}return i}},1152:function(e,t,r){"use strict";e.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(6680)}}},layoutAttributes:r(6680),handleDefaults:r(2148),draw:r(216)}},8820:function(e,t,r){"use strict";var n=r(2548);e.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot"},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},6652:function(e,t,r){"use strict";var n=r(9811).list,a=r(9280).getAutoRange,i=r(4636);e.exports=function(e){for(var t=n(e,"x",!0),r=0;r<t.length;r++){var o=t[r],l=o[i.name];l&&l.visible&&l.autorange&&(l._input.autorange=!0,l._input.range=l.range=a(e,o))}}},4636:function(e){"use strict";e.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},1659:function(e,t,r){"use strict";var n=r(3400),a=r(1780),i=r(9811),o=r(8820),l=r(936);e.exports=function(e,t,r){var s=e[r],c=t[r];if(s.rangeslider||t._requestRangeslider[c._id]){n.isPlainObject(s.rangeslider)||(s.rangeslider={});var u,f,d=s.rangeslider,h=a.newContainer(c,"rangeslider");if(_("visible")){_("bgcolor",t.plot_bgcolor),_("bordercolor"),_("borderwidth"),_("thickness"),_("autorange",!c.isValidRange(d.range)),_("range");var p=t._subplots;if(p)for(var v=p.cartesian.filter((function(e){return e.substr(0,e.indexOf("y"))===i.name2id(r)})).map((function(e){return e.substr(e.indexOf("y"),e.length)})),g=n.simpleMap(v,i.id2name),y=0;y<g.length;y++){var m=g[y];u=d[m]||{},f=a.newContainer(h,m,"yaxis");var x,b=t[m];u.range&&b.isValidRange(u.range)&&(x="fixed"),"match"!==w("rangemode",x)&&w("range",b.range.slice())}h._input=d}}function _(e,t){return n.coerce(d,h,o,e,t)}function w(e,t){return n.coerce(u,f,l,e,t)}}},60:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(7316),o=r(3400),l=o.strTranslate,s=r(3616),c=r(6308),u=r(1668),f=r(7952),d=r(9811),h=r(6476),p=r(3972),v=r(4636);function g(e){return"number"==typeof e.clientX?e.clientX:e.touches&&e.touches.length>0?e.touches[0].clientX:0}function y(e,t,r,n){var a=o.ensureSingle(e,"rect",v.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),i=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,f=s.crispRound(t,n.borderwidth);a.attr({width:n._width+i,height:n._height+i,transform:l(u,u),"stroke-width":f}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function m(e,t,r,n){var a=t._fullLayout;o.ensureSingleById(a._topdefs,"clipPath",n._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function x(e,t,r,a){var l,c=t.calcdata,u=e.selectAll("g."+v.rangePlotClassName).data(r._subplotsWith,o.identity);u.enter().append("g").attr("class",(function(e){return v.rangePlotClassName+" "+e})).call(s.setClipUrl,a._clipId,t),u.order(),u.exit().remove(),u.each((function(e,o){var s=n.select(this),u=0===o,h=d.getFromId(t,e,"y"),p=h._name,v=a[p],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:a.range.slice(),calendar:r.calendar},width:a._width,height:a._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[p]={type:h.type,domain:[0,1],range:"match"!==v.rangemode?v.range.slice():h.range.slice(),calendar:h.calendar},h.rangebreaks&&(g.layout[p].rangebreaks=h.rangebreaks),i.supplyDefaults(g);var y=g._fullLayout.xaxis,m=g._fullLayout[p];y.clearCalc(),y.setScale(),m.clearCalc(),m.setScale();var x={id:e,plotgroup:s,xaxis:y,yaxis:m,isRangePlot:!0};u?l=x:(x.mainplot="xy",x.mainplotinfo=l),f.rangePlot(t,x,function(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n],i=a[0].trace;i.xaxis+i.yaxis===t&&r.push(a)}return r}(c,e))}))}function b(e,t,r,n,a){o.ensureSingle(e,"rect",v.maskMinClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(c.fill,v.maskColor),o.ensureSingle(e,"rect",v.maskMaxClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(c.fill,v.maskColor),"match"!==a.rangemode&&(o.ensureSingle(e,"rect",v.maskMinOppAxisClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).call(c.fill,v.maskOppAxisColor),o.ensureSingle(e,"rect",v.maskMaxOppAxisClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).style("border-top",v.maskOppBorder).call(c.fill,v.maskOppAxisColor))}function _(e,t,r,n){t._context.staticPlot||o.ensureSingle(e,"rect",v.slideBoxClassName,(function(e){e.attr({y:0,cursor:v.slideBoxCursor,"shape-rendering":"crispEdges"})})).attr({height:n._height,fill:v.slideBoxFill})}function w(e,t,r,n){var a=o.ensureSingle(e,"g",v.grabberMinClassName),i=o.ensureSingle(e,"g",v.grabberMaxClassName),l={x:0,width:v.handleWidth,rx:v.handleRadius,fill:c.background,stroke:c.defaultLine,"stroke-width":v.handleStrokeWidth,"shape-rendering":"crispEdges"},s={y:Math.round(n._height/4),height:Math.round(n._height/2)};o.ensureSingle(a,"rect",v.handleMinClassName,(function(e){e.attr(l)})).attr(s),o.ensureSingle(i,"rect",v.handleMaxClassName,(function(e){e.attr(l)})).attr(s);var u={width:v.grabAreaWidth,x:0,y:0,fill:v.grabAreaFill,cursor:t._context.staticPlot?void 0:v.grabAreaCursor};o.ensureSingle(a,"rect",v.grabAreaMinClassName,(function(e){e.attr(u)})).attr("height",n._height),o.ensureSingle(i,"rect",v.grabAreaMaxClassName,(function(e){e.attr(u)})).attr("height",n._height)}e.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,i=0;i<r.length;i++){var s=r[i][v.name];s._clipId=s._id+"-"+t._uid}var c=t._infolayer.selectAll("g."+v.containerClassName).data(r,(function(e){return e._name}));c.exit().each((function(e){var r=e[v.name];t._topdefs.select("#"+r._clipId).remove()})).remove(),0!==r.length&&(c.enter().append("g").classed(v.containerClassName,!0).attr("pointer-events","all"),c.each((function(r){var i=n.select(this),s=r[v.name],c=t[d.id2name(r.anchor)],f=s[d.id2name(r.anchor)];if(s.range){var T,M=o.simpleMap(s.range,r.r2l),k=o.simpleMap(r.range,r.r2l);T=k[0]<k[1]?[Math.min(M[0],k[0]),Math.max(M[1],k[1])]:[Math.max(M[0],k[0]),Math.min(M[1],k[1])],s.range=s._input.range=o.simpleMap(T,r.l2r)}r.cleanRange("rangeslider.range");var A=t._size,L=r.domain;s._width=A.w*(L[1]-L[0]);var S=Math.round(A.l+A.w*L[0]),D=Math.round(A.t+A.h*(1-r._counterDomainMin)+("bottom"===r.side?r._depth:0)+s._offsetShift+v.extraPad);i.attr("transform",l(S,D)),s._rl=o.simpleMap(s.range,r.r2l);var O=s._rl[0],C=s._rl[1],P=C-O;if(s.p2d=function(e){return e/s._width*P+O},s.d2p=function(e){return(e-O)/P*s._width},r.rangebreaks){var I=r.locateBreaks(O,C);if(I.length){var R,z,N=0;for(R=0;R<I.length;R++)N+=(z=I[R]).max-z.min;var F=s._width/(C-O-N),E=[-F*O];for(R=0;R<I.length;R++)z=I[R],E.push(E[E.length-1]-F*(z.max-z.min));for(s.d2p=function(e){for(var t=E[0],r=0;r<I.length;r++){var n=I[r];if(e>=n.max)t=E[r+1];else if(e<n.min)break}return t+F*e},R=0;R<I.length;R++)(z=I[R]).pmin=s.d2p(z.min),z.pmax=s.d2p(z.max);s.p2d=function(e){for(var t=E[0],r=0;r<I.length;r++){var n=I[r];if(e>=n.pmax)t=E[r+1];else if(e<n.pmin)break}return(e-t)/F}}}if("match"!==f.rangemode){var H=c.r2l(f.range[0]),B=c.r2l(f.range[1])-H;s.d2pOppAxis=function(e){return(e-H)/B*s._height}}i.call(y,e,r,s).call(m,e,r,s).call(x,e,r,s).call(b,e,r,s,f).call(_,e,r,s).call(w,e,r,s),function(e,t,r,i){if(!t._context.staticPlot){var l=e.select("rect."+v.slideBoxClassName).node(),s=e.select("rect."+v.grabAreaMinClassName).node(),c=e.select("rect."+v.grabAreaMaxClassName).node();e.on("mousedown",u),e.on("touchstart",u)}function u(){var u=n.event,f=u.target,d=g(u),v=d-e.node().getBoundingClientRect().left,y=i.d2p(r._rl[0]),m=i.d2p(r._rl[1]),x=h.coverSlip();function b(e){var u,h,b,_=+g(e)-d;switch(f){case l:if(b="ew-resize",y+_>r._length||m+_<0)return;u=y+_,h=m+_;break;case s:if(b="col-resize",y+_>r._length)return;u=y+_,h=m;break;case c:if(b="col-resize",m+_<0)return;u=y,h=m+_;break;default:b="ew-resize",u=v,h=v+_}if(h<u){var w=h;h=u,u=w}i._pixelMin=u,i._pixelMax=h,p(n.select(x),b),function(e,t,r,n){function i(e){return r.l2r(o.constrain(e,n._rl[0],n._rl[1]))}var l=i(n.p2d(n._pixelMin)),s=i(n.p2d(n._pixelMax));window.requestAnimationFrame((function(){a.call("_guiRelayout",t,r._name+".range",[l,s])}))}(0,t,r,i)}function _(){x.removeEventListener("mousemove",b),x.removeEventListener("mouseup",_),this.removeEventListener("touchmove",b),this.removeEventListener("touchend",_),o.removeElement(x)}this.addEventListener("touchmove",b),this.addEventListener("touchend",_),x.addEventListener("mousemove",b),x.addEventListener("mouseup",_)}}(i,e,r,s),function(e,t,r,n,a,i){var s=v.handleWidth/2;function c(e){return o.constrain(e,0,n._width)}function u(e){return o.constrain(e,0,n._height)}function f(e){return o.constrain(e,-s,n._width+s)}var d=c(n.d2p(r._rl[0])),h=c(n.d2p(r._rl[1]));if(e.select("rect."+v.slideBoxClassName).attr("x",d).attr("width",h-d),e.select("rect."+v.maskMinClassName).attr("width",d),e.select("rect."+v.maskMaxClassName).attr("x",h).attr("width",n._width-h),"match"!==i.rangemode){var p=n._height-u(n.d2pOppAxis(a._rl[1])),g=n._height-u(n.d2pOppAxis(a._rl[0]));e.select("rect."+v.maskMinOppAxisClassName).attr("x",d).attr("height",p).attr("width",h-d),e.select("rect."+v.maskMaxOppAxisClassName).attr("x",d).attr("y",g).attr("height",n._height-g).attr("width",h-d),e.select("rect."+v.slideBoxClassName).attr("y",p).attr("height",g-p)}var y=.5,m=Math.round(f(d-s))-y,x=Math.round(f(h-s))+y;e.select("g."+v.grabberMinClassName).attr("transform",l(m,y)),e.select("g."+v.grabberMaxClassName).attr("transform",l(x,y))}(i,0,r,s,c,f),"bottom"===r.side&&u.draw(e,r._id+"title",{propContainer:r,propName:r._name+".title",placeholder:t._dfltTitle.x,attributes:{x:r._offset+r._length/2,y:D+s._height+s._offsetShift+10+1.5*r.title.font.size,"text-anchor":"middle"}})})))}},7944:function(e,t,r){"use strict";var n=r(9811),a=r(2736),i=r(4636),o=r(4284).LINE_SPACING,l=i.name;function s(e){var t=e&&e[l];return t&&t.visible}t.isVisible=s,t.makeData=function(e){var t=n.list({_fullLayout:e},"x",!0),r=e.margin,a=[];if(!e._has("gl2d"))for(var i=0;i<t.length;i++){var o=t[i];if(s(o)){a.push(o);var c=o[l];c._id=l+o._id,c._height=(e.height-r.b-r.t)*c.thickness,c._offsetShift=Math.floor(c.borderwidth/2)}}e._rangeSliderData=a},t.autoMarginOpts=function(e,t){var r=e._fullLayout,n=t[l],s=t._id.charAt(0),c=0,u=0;return"bottom"===t.side&&(c=t._depth,t.title.text!==r._dfltTitle[s]&&(u=1.5*t.title.font.size+10+n._offsetShift,u+=(t.title.text.match(a.BR_TAG_ALL)||[]).length*t.title.font.size*o)),{x:0,y:t._counterDomainMin,l:0,r:0,t:0,b:n._height+c+Math.max(r.margin.b,u),pad:i.extraPad+2*n._offsetShift}}},9692:function(e,t,r){"use strict";var n=r(3400),a=r(8820),i=r(936),o=r(7944);e.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},a,{yaxis:i})}}},layoutAttributes:r(8820),handleDefaults:r(1659),calcAutorange:r(6652),draw:r(60),isVisible:o.isVisible,makeData:o.makeData,autoMarginOpts:o.autoMarginOpts}},936:function(e){"use strict";e.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},3956:function(e,t,r){"use strict";var n=r(3916),a=r(2904).line,i=r(8192).u,o=r(2880).extendFlat,l=r(7824).overrideAll,s=r(1780).templatedArray;r(6208),e.exports=l(s("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:o({},n.xref,{}),yref:o({},n.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:a.color,width:o({},a.width,{min:1,dflt:1}),dash:o({},i,{dflt:"dot"})}}),"arraydraw","from-root")},3280:function(e){"use strict";e.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},4224:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(1272),o=r(3956),l=r(5152);function s(e,t,r){function i(r,a){return n.coerce(e,t,o,r,a)}var s=i("path"),c="path"!==i("type",s?"path":"rect");c&&delete t.path,i("opacity"),i("line.color"),i("line.width"),i("line.dash");for(var u=["x","y"],f=0;f<2;f++){var d,h,p,v=u[f],g={_fullLayout:r},y=a.coerceRef(e,t,g,v);if((d=a.getFromId(g,y))._selectionIndices.push(t._index),p=l.rangeToShapePosition(d),h=l.shapePositionToRange(d),c){var m=v+"0",x=v+"1",b=e[m],_=e[x];e[m]=h(e[m],!0),e[x]=h(e[x],!0),a.coercePosition(t,g,i,y,m),a.coercePosition(t,g,i,y,x);var w=t[m],T=t[x];void 0!==w&&void 0!==T&&(t[m]=p(w),t[x]=p(T),e[m]=b,e[x]=_)}}c&&n.noneOrAll(e,t,["x0","x1","y0","y1"])}e.exports=function(e,t){i(e,t,{name:"selections",handleItemDefaults:s});for(var r=t.selections,n=0;n<r.length;n++){var a=r[n];a&&void 0===a.path&&(void 0!==a.x0&&void 0!==a.x1&&void 0!==a.y0&&void 0!==a.y1||(t.selections[n]=null))}}},3640:function(e,t,r){"use strict";var n=r(9856).readPaths,a=r(5496),i=r(1936).clearOutlineControllers,o=r(6308),l=r(3616),s=r(1780).arrayEditor,c=r(5152),u=c.getPathString;function f(e){var t=e._fullLayout;for(var r in i(e),t._selectionLayer.selectAll("path").remove(),t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var a=0;a<t.selections.length;a++)h(e,a)}function d(e){return e._context.editSelection}function h(e,t){e._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+t+'"]').remove();var r=c.makeSelectionsOptionsAndPlotinfo(e,t),i=r.options,h=r.plotinfo;i._input&&function(r){var c=u(e,i),g={"data-index":t,"fill-rule":"evenodd",d:c},y=i.opacity,m="rgba(0,0,0,0)",x=i.line.color||o.contrast(e._fullLayout.plot_bgcolor),b=i.line.width,_=i.line.dash;b||(b=5,_="solid");var w=d(e)&&e._fullLayout._activeSelectionIndex===t;w&&(m=e._fullLayout.activeselection.fillcolor,y=e._fullLayout.activeselection.opacity);for(var T=[],M=1;M>=0;M--){var k=r.append("path").attr(g).style("opacity",M?.1:y).call(o.stroke,x).call(o.fill,m).call(l.dashLine,M?"solid":_,M?4+b:b);if(p(k,e,i),w){var A=s(e.layout,"selections",i);k.style({cursor:"move"});var L={element:k.node(),plotinfo:h,gd:e,editHelpers:A,isActiveSelection:!0},S=n(c,e);a(S,k,L)}else k.style("pointer-events",M?"all":"none");T[M]=k}var D=T[0];T[1].node().addEventListener("click",(function(){return function(e,t){if(d(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeSelectionIndex)return void v(e);e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=v,f(e)}}}(e,D)}))}(e._fullLayout._selectionLayer)}function p(e,t,r){var n=r.xref+r.yref;l.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function v(e){d(e)&&e._fullLayout._activeSelectionIndex>=0&&(i(e),delete e._fullLayout._activeSelectionIndex,f(e))}e.exports={draw:f,drawOne:h,activateLastSelection:function(e){if(d(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=v,f(e)}}}},4200:function(e,t,r){"use strict";var n=r(8192).u,a=r(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({},n,{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,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},5968:function(e,t,r){"use strict";var n=r(2760).selectMode,a=r(1936).clearOutline,i=r(9856),o=i.readPaths,l=i.writePaths,s=i.fixDatesForPaths;e.exports=function(e,t){if(e.length){var r=e[0][0];if(r){var i=r.getAttribute("d"),c=t.gd,u=c._fullLayout.newselection,f=t.plotinfo,d=f.xaxis,h=f.yaxis,p=t.isActiveSelection,v=t.dragmode,g=(c.layout||{}).selections||[];if(!n(v)&&void 0!==p){var y=c._fullLayout._activeSelectionIndex;if(y<g.length)switch(c._fullLayout.selections[y].type){case"rect":v="select";break;case"path":v="lasso"}}var m,x=o(i,c,f,p),b={xref:d._id,yref:h._id,opacity:u.opacity,line:{color:u.line.color,width:u.line.width,dash:u.line.dash}};1===x.length&&(m=x[0]),m&&5===m.length&&"select"===v?(b.type="rect",b.x0=m[0][1],b.y0=m[0][2],b.x1=m[2][1],b.y1=m[2][2]):(b.type="path",d&&h&&s(x,d,h),b.path=l(x),m=null),a(c);for(var _=t.editHelpers,w=(_||{}).modifyItem,T=[],M=0;M<g.length;M++){var k=c._fullLayout.selections[M];if(k){if(T[M]=k._input,void 0!==p&&M===c._fullLayout._activeSelectionIndex){var A=b;switch(k.type){case"rect":w("x0",A.x0),w("x1",A.x1),w("y0",A.y0),w("y1",A.y1);break;case"path":w("path",A.path)}}}else T[M]=k}return void 0===p?(T.push(b),T):_?_.getUpdateObj():{}}}}},5840:function(e,t,r){"use strict";var n=r(3400).strTranslate;function a(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}e.exports={p2r:a,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t="y"===e._id.charAt(0)?1:0;return function(r){return a(e,r[t])}},getTransform:function(e){return n(e.xaxis._offset,e.yaxis._offset)}}},2676:function(e,t,r){"use strict";var n=r(3640),a=r(3156);e.exports={moduleType:"component",name:"selections",layoutAttributes:r(3956),supplyLayoutDefaults:r(4224),supplyDrawNewSelectionDefaults:r(1004),includeBasePlot:r(6632)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:a.reselect,prepSelect:a.prepSelect,clearOutline:a.clearOutline,clearSelectionsCache:a.clearSelectionsCache,selectOnClick:a.selectOnClick}},3156:function(e,t,r){"use strict";var n=r(4756),a=r(1456),i=r(4040),o=r(3616).dashStyle,l=r(6308),s=r(3024),c=r(624).makeEventData,u=r(2760),f=u.freeMode,d=u.rectMode,h=u.drawMode,p=u.openMode,v=u.selectMode,g=r(5152),y=r(3068),m=r(5496),x=r(1936).clearOutline,b=r(9856),_=b.handleEllipse,w=b.readPaths,T=r(3940).newShapes,M=r(5968),k=r(3640).activateLastSelection,A=r(3400),L=A.sorterAsc,S=r(2065),D=r(1200),O=r(9811).getFromId,C=r(3696),P=r(9172).redrawReglTraces,I=r(3280),R=I.MINSELECT,z=S.filter,N=S.tester,F=r(5840),E=F.p2r,H=F.axValue,B=F.getTransform;function j(e){return void 0!==e.subplot}function Y(e,t,r,n,a,i,o){var l,s,c,u,f,d,h,v,g,y=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(y)){G(e,t,i);var _=function(e,t){var r,n,a=e[0],i=-1,o=[];for(n=0;n<t.length;n++)if(r=t[n],a.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===a.hoverOnBox)break;void 0!==a.pointNumber?i=a.pointNumber:void 0!==a.binNumber&&(i=a.binNumber,o=a.pointNumbers);break}return{pointNumber:i,pointNumbers:o,searchInfo:r}}(y,l=X(t,r,n,a));if(_.pointNumbers.length>0?function(e,t){var r,n,a,i=[];for(a=0;a<e.length;a++)(r=e[a]).cd[0].trace.selectedpoints&&r.cd[0].trace.selectedpoints.length>0&&i.push(r);if(1===i.length&&i[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(a=0;a<t.pointNumbers.length;a++)if(n.selectedpoints.indexOf(t.pointNumbers[a])<0)return!1;return!0}return!1}(l,_):function(e){var t,r,n=0;for(r=0;r<e.length;r++)if((t=e[r].cd[0].trace).selectedpoints){if(t.selectedpoints.length>1)return!1;if((n+=t.selectedpoints.length)>1)return!1}return 1===n}(l)&&(d=K(_))){for(o&&o.remove(),g=0;g<l.length;g++)(s=l[g])._module.selectPoints(s,!1);Q(t,l),Z(i),x&&de(t)}else{for(h=e.shiftKey&&(void 0!==d?d:K(_)),c=function(e,t,r){return{pointNumber:e,searchInfo:t,subtract:!!r}}(_.pointNumber,_.searchInfo,h),u=q(i.selectionDefs.concat([c])),g=0;g<l.length;g++)if(f=ee(l[g]._module.selectPoints(l[g],u),l[g]),b.length)for(var w=0;w<f.length;w++)b.push(f[w]);else b=f;if(Q(t,l,v={points:b}),c&&i&&i.selectionDefs.push(c),o){var T=i.mergedPolygons,M=p(i.dragmode);m(te(T,M),o,i)}x&&fe(t,v)}}}function V(e){return"pointNumber"in e&&"searchInfo"in e}function U(e){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(t,r,n,a){var i=e.searchInfo.cd[0].trace._expandedIndex;return a.cd[0].trace._expandedIndex===i&&n===e.pointNumber},isRect:!1,degenerate:!1,subtract:!!e.subtract}}function q(e){if(e.length){for(var t=[],r=V(e[0])?0:e[0][0][0],n=r,a=V(e[0])?0:e[0][0][1],i=a,o=0;o<e.length;o++)if(V(e[o]))t.push(U(e[o]));else{var l=N(e[o]);l.subtract=!!e[o].subtract,t.push(l),r=Math.min(r,l.xmin),n=Math.max(n,l.xmax),a=Math.min(a,l.ymin),i=Math.max(i,l.ymax)}return{xmin:r,xmax:n,ymin:a,ymax:i,pts:[],contains:function(e,r,n,a){for(var i=!1,o=0;o<t.length;o++)t[o].contains(e,r,n,a)&&(i=!t[o].subtract);return i},isRect:!1,degenerate:!1}}}function G(e,t,r){var n=t._fullLayout,a=r.plotinfo,i=r.dragmode,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===a.id,l=(e.shiftKey||e.altKey)&&!(h(i)&&p(i));o&&l&&a.selection&&a.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=a.selection.selectionDefs,r.mergedPolygons=a.selection.mergedPolygons):l&&a.selection||Z(r),o||(x(t),n._lastSelectedSubplot=a.id)}function Z(e,t){var r=e.dragmode,n=e.plotinfo,a=e.gd;(function(e){return e._fullLayout._activeShapeIndex>=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(r),s=v(r);if(l||s){var c,u,f=o.selectAll(".select-outline-"+n.id);f&&a._fullLayout._outlining&&(l&&(c=T(f,e)),c&&i.call("_guiRelayout",a,{shapes:c}),s&&!j(e)&&(u=M(f,e)),u&&(a._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",a,{selections:u}).then((function(){t&&k(a)}))),a._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function W(e){return e._id}function X(e,t,r,n){if(!e.calcdata)return[];var a,i,o,l=[],s=t.map(W),c=r.map(W);for(o=0;o<e.calcdata.length;o++)if(!0===(i=(a=e.calcdata[o])[0].trace).visible&&i._module&&i._module.selectPoints)if(!j({subplot:n})||i.subplot!==n&&i.geo!==n)if("splom"===i.type){if(i._xaxes[s[0]]&&i._yaxes[c[0]]){var u=J(i._module,a,t[0],r[0]);u.scene=e._fullLayout._splomScenes[i.uid],l.push(u)}}else if("sankey"===i.type){var f=J(i._module,a,t[0],r[0]);l.push(f)}else{if(!(-1!==s.indexOf(i.xaxis)||i._xA&&i._xA.overlaying))continue;if(!(-1!==c.indexOf(i.yaxis)||i._yA&&i._yA.overlaying))continue;l.push(J(i._module,a,O(e,i.xaxis),O(e,i.yaxis)))}else l.push(J(i._module,a,t[0],r[0]));return l}function J(e,t,r,n){return{_module:e,cd:t,xaxis:r,yaxis:n}}function K(e){var t=e.searchInfo.cd[0].trace,r=e.pointNumber,n=e.pointNumbers,a=n.length>0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(a)>-1}function Q(e,t,r){var n,a;for(n=0;n<t.length;n++){var o=t[n].cd[0].trace._fullInput,l=e._fullLayout._tracePreGUI[o.uid]||{};void 0===l.selectedpoints&&(l.selectedpoints=o._input.selectedpoints||null)}if(r){var s=r.points||[];for(n=0;n<t.length;n++)(a=t[n].cd[0].trace)._input.selectedpoints=a._fullInput.selectedpoints=[],a._fullInput!==a&&(a.selectedpoints=[]);for(var c=0;c<s.length;c++){var u=s[c],f=u.data,d=u.fullData,h=u.pointIndex,p=u.pointIndices;p?([].push.apply(f.selectedpoints,p),a._fullInput!==a&&[].push.apply(d.selectedpoints,p)):(f.selectedpoints.push(h),a._fullInput!==a&&d.selectedpoints.push(h))}}else for(n=0;n<t.length;n++)delete(a=t[n].cd[0].trace).selectedpoints,delete a._input.selectedpoints,a._fullInput!==a&&delete a._fullInput.selectedpoints;!function(e,t){for(var r=!1,n=0;n<t.length;n++){var a=t[n],o=a.cd;i.traceIs(o[0].trace,"regl")&&(r=!0);var l=a._module,s=l.styleOnSelect||l.style;s&&(s(e,o,o[0].node3),o[0].nodeRangePlot3&&s(e,o,o[0].nodeRangePlot3))}r&&(C(e),P(e))}(e,t)}function $(e,t,r){for(var a=(r?n.difference:n.union)({regions:e},{regions:[t]}).regions.reverse(),i=0;i<a.length;i++){var o=a[i];o.subtract=le(o,a.slice(0,i))}return a}function ee(e,t){if(Array.isArray(e))for(var r=t.cd,n=t.cd[0].trace,a=0;a<e.length;a++)e[a]=c(e[a],n,r);return e}function te(e,t){for(var r=[],n=0;n<e.length;n++){r[n]=[];for(var a=0;a<e[n].length;a++){r[n][a]=[],r[n][a][0]=a?"L":"M";for(var i=0;i<e[n][a].length;i++)r[n][a].push(e[n][a][i])}t||r[n].push(["Z",r[n][0][1],r[n][0][2]])}return r}function re(e,t){for(var r,n,a=[],i=[],o=0;o<t.length;o++){var l=t[o];n=l._module.selectPoints(l,e),i.push(n),r=ee(n,l),a=a.concat(r)}return a}function ne(e,t,r,n,a){var i,o,l,s=!!n;a&&(i=a.plotinfo,o=a.xaxes[0]._id,l=a.yaxes[0]._id);var c=[],u=[],f=oe(e),d=e._fullLayout;if(i){var p=d._zoomlayer,g=d.dragmode,y=h(g),m=v(g);if(y||m){var x=O(e,o,"x"),b=O(e,l,"y");if(x&&b){var _=p.selectAll(".select-outline-"+i.id);if(_&&e._fullLayout._outlining&&_.length){for(var T=_[0][0].getAttribute("d"),M=w(T,e,i),k=[],A=0;A<M.length;A++){for(var L=M[A],S=[],D=0;D<L.length;D++)S.push([se(x,L[D][1]),se(b,L[D][2])]);S.xref=o,S.yref=l,S.subtract=le(S,k),k.push(S)}f=f.concat(k)}}}}var C=o&&l?[o+l]:d._subplots.cartesian;!function(e){var t=e.calcdata;if(t)for(var r=0;r<t.length;r++){var n=t[r][0].trace,a=e._fullLayout._splomScenes;if(a){var i=a[n.uid];i&&(i.selectBatch=[])}}}(e);for(var P={},I=0;I<C.length;I++){var R=C[I],z=R.indexOf("y"),N=R.slice(0,z),F=R.slice(z),E=o&&l?r:void 0;if(E=ie(f,N,F,E)){var H=n;if(!s){var B=O(e,N,"x"),j=O(e,F,"y");H=X(e,[B],[j],R);for(var Y=0;Y<H.length;Y++){var V=H[Y],U=V.cd[0],q=U.trace;if("scattergl"===V._module.name&&!U.t.xpx){var G=q.x,Z=q.y,W=q._length;U.t.xpx=[],U.t.ypx=[];for(var J=0;J<W;J++)U.t.xpx[J]=B.c2p(G[J]),U.t.ypx[J]=j.c2p(Z[J])}"splom"===V._module.name&&(P[q.uid]||(P[q.uid]=!0))}}var K=re(E,H);c=c.concat(K),u=u.concat(H)}}var $={points:c};Q(e,u,$);var ee=d.clickmode.indexOf("event")>-1&&t;if(!i&&t){var te=oe(e,!0);if(te.length){var ne=te[0].xref,he=te[0].yref;if(ne&&he){var pe=ce(te);ue([O(e,ne,"x"),O(e,he,"y")])($,pe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&fe(e,$),d._reselect=!1}if(!i&&d._deselect){var ve=d._deselect;(function(e,t,r){for(var n=0;n<r.length;n++){var a=r[n];if(a.xaxis&&a.xaxis._id===e&&a.yaxis&&a.yaxis._id===t)return!0}return!1})(o=ve.xref,l=ve.yref,u)||ae(e,o,l,n),ee&&($.points.length?fe(e,$):de(e)),d._deselect=!1}return{eventData:$,selectionTesters:r}}function ae(e,t,r,n){n=X(e,[O(e,t,"x")],[O(e,r,"y")],t+r);for(var a=0;a<n.length;a++){var i=n[a];i._module.selectPoints(i,!1)}Q(e,n)}function ie(e,t,r,n){for(var a,i=0;i<e.length;i++){var o=e[i];t===o.xref&&r===o.yref&&(a?n=q(a=$(a,o,!!o.subtract)):(a=[o],n=N(o)))}return n}function oe(e,t){for(var r=[],n=e._fullLayout,a=n.selections,i=a.length,o=0;o<i;o++)if(!t||o===n._activeSelectionIndex){var l=a[o];if(l){var s,c,u,f,d,h=l.xref,p=l.yref,v=O(e,h,"x"),m=O(e,p,"y");if("rect"===l.type){d=[];var x=se(v,l.x0),b=se(v,l.x1),_=se(m,l.y0),w=se(m,l.y1);d=[[x,_],[x,w],[b,w],[b,_]],s=Math.min(x,b),c=Math.max(x,b),u=Math.min(_,w),f=Math.max(_,w),d.xmin=s,d.xmax=c,d.ymin=u,d.ymax=f,d.xref=h,d.yref=p,d.subtract=!1,d.isRect=!0,r.push(d)}else if("path"===l.type)for(var T=l.path.split("Z"),M=[],k=0;k<T.length;k++){var A=T[k];if(A){A+="Z";var L=g.extractPathCoords(A,y.paramIsX,"raw"),S=g.extractPathCoords(A,y.paramIsY,"raw");s=1/0,c=-1/0,u=1/0,f=-1/0,d=[];for(var D=0;D<L.length;D++){var C=se(v,L[D]),P=se(m,S[D]);d.push([C,P]),s=Math.min(C,s),c=Math.max(C,c),u=Math.min(P,u),f=Math.max(P,f)}d.xmin=s,d.xmax=c,d.ymin=u,d.ymax=f,d.xref=h,d.yref=p,d.subtract=le(d,M),M.push(d),r.push(d)}}}}return r}function le(e,t){for(var r=!1,n=0;n<t.length;n++)for(var i=t[n],o=0;o<e.length;o++)if(a(e[o],i)){r=!r;break}return r}function se(e,t){return"date"===e.type&&(t=t.replace("_"," ")),"log"===e.type?e.c2p(t):e.r2p(t,null,e.calendar)}function ce(e){for(var t=e.length,r=[],n=0;n<t;n++){var a=e[n];r=(r=r.concat(a)).concat([a[0]])}return(i=r).isRect=5===i.length&&i[0][0]===i[4][0]&&i[0][1]===i[4][1]&&i[0][0]===i[1][0]&&i[2][0]===i[3][0]&&i[0][1]===i[3][1]&&i[1][1]===i[2][1]||i[0][1]===i[1][1]&&i[2][1]===i[3][1]&&i[0][0]===i[3][0]&&i[1][0]===i[2][0],i.isRect&&(i.xmin=Math.min(i[0][0],i[2][0]),i.xmax=Math.max(i[0][0],i[2][0]),i.ymin=Math.min(i[0][1],i[2][1]),i.ymax=Math.max(i[0][1],i[2][1])),i;var i}function ue(e){return function(t,r){for(var n,a,i=0;i<e.length;i++){var o=e[i],l=o._id,s=l.charAt(0);if(r.isRect){n||(n={});var c=r[s+"min"],u=r[s+"max"];void 0!==c&&void 0!==u&&(n[l]=[E(o,c),E(o,u)].sort(L))}else a||(a={}),a[l]=r.map(H(o))}n&&(t.range=n),a&&(t.lassoPoints=a)}}function fe(e,t){t&&(t.selections=(e.layout||{}).selections||[]),e.emit("plotly_selected",t)}function de(e){e.emit("plotly_deselect",null)}e.exports={reselect:ne,prepSelect:function(e,t,r,n,a){var c=!j(n),u=f(a),g=d(a),y=p(a),x=h(a),b=v(a),w="drawcircle"===a,T="drawline"===a||w,M=n.gd,k=M._fullLayout,L=b&&"immediate"===k.newselection.mode&&c,S=k._zoomlayer,O=n.element.getBoundingClientRect(),C=n.plotinfo,P=B(C),F=t-O.left,E=r-O.top;k._calcInverseTransform(M);var H=A.apply3DTransform(k._invTransform)(F,E);F=H[0],E=H[1];var V,U,W,J,K,ee,ie,oe=k._invScaleX,le=k._invScaleY,se=F,he=E,pe="M"+F+","+E,ve=n.xaxes[0],ge=n.yaxes[0],ye=ve._length,me=ge._length,xe=e.altKey&&!(h(a)&&y);G(e,M,n),u&&(V=z([[F,E]],I.BENDPX));var be=S.selectAll("path.select-outline-"+C.id).data([1]),_e=x?k.newshape:k.newselection;x&&(n.hasText=_e.label.text||_e.label.texttemplate);var we=x&&!y?_e.fillcolor:"rgba(0,0,0,0)",Te=_e.line.color||(c?l.contrast(M._fullLayout.plot_bgcolor):"#7f7f7f");be.enter().append("path").attr("class","select-outline select-outline-"+C.id).style({opacity:x?_e.opacity/2:1,"stroke-dasharray":o(_e.line.dash,_e.line.width),"stroke-width":_e.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,Te).call(l.fill,we).attr("fill-rule","evenodd").classed("cursor-move",!!x).attr("transform",P).attr("d",pe+"Z");var Me=S.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",P).attr("d","M0,0Z");if(x&&n.hasText){var ke=S.select(".label-temp");ke.empty()&&(ke=S.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ae=k._uid+I.SELECTID,Le=[],Se=X(M,n.xaxes,n.yaxes,n.subplot);L&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(c){var e=ve._id,t=ge._id;ae(M,e,t,Se);for(var r=(M.layout||{}).selections||[],n=[],a=!1,o=0;o<r.length;o++){var l=k.selections[o];l.xref!==e||l.yref!==t?n.push(r[o]):a=!0}a&&(M._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",M,{selections:n}))}});var De=function(e){return e.plotinfo.fillRangeItems||ue(e.xaxes.concat(e.yaxes))}(n);n.moveFn=function(e,t){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),se=Math.max(0,Math.min(ye,oe*e+F)),he=Math.max(0,Math.min(me,le*t+E));var r=Math.abs(se-F),a=Math.abs(he-E);if(g){var i,o,l;if(b){var s=k.selectdirection;switch(i="any"===s?a<Math.min(.6*r,R)?"h":r<Math.min(.6*a,R)?"v":"d":s){case"h":o=w?me/2:0,l=me;break;case"v":o=w?ye/2:0,l=ye}}if(x)switch(k.newshape.drawdirection){case"vertical":i="h",o=w?me/2:0,l=me;break;case"horizontal":i="v",o=w?ye/2:0,l=ye;break;case"ortho":r<a?(i="h",o=E,l=he):(i="v",o=F,l=se);break;default:i="d"}"h"===i?((J=T?_(w,[se,o],[se,l]):[[F,o],[F,l],[se,l],[se,o]]).xmin=T?se:Math.min(F,se),J.xmax=T?se:Math.max(F,se),J.ymin=Math.min(o,l),J.ymax=Math.max(o,l),Me.attr("d","M"+J.xmin+","+(E-R)+"h-4v"+2*R+"h4ZM"+(J.xmax-1)+","+(E-R)+"h4v"+2*R+"h-4Z")):"v"===i?((J=T?_(w,[o,he],[l,he]):[[o,E],[o,he],[l,he],[l,E]]).xmin=Math.min(o,l),J.xmax=Math.max(o,l),J.ymin=T?he:Math.min(E,he),J.ymax=T?he:Math.max(E,he),Me.attr("d","M"+(F-R)+","+J.ymin+"v-4h"+2*R+"v4ZM"+(F-R)+","+(J.ymax-1)+"v4h"+2*R+"v-4Z")):"d"===i&&((J=T?_(w,[F,E],[se,he]):[[F,E],[F,he],[se,he],[se,E]]).xmin=Math.min(F,se),J.xmax=Math.max(F,se),J.ymin=Math.min(E,he),J.ymax=Math.max(E,he),Me.attr("d","M0,0Z"))}else u&&(V.addPt([se,he]),J=V.filtered);if(n.selectionDefs&&n.selectionDefs.length?(W=$(n.mergedPolygons,J,xe),J.subtract=xe,U=q(n.selectionDefs.concat([J]))):(W=[J],U=N(J)),m(te(W,y),be,n),b){var c,f=ne(M,!1),d=f.eventData?f.eventData.points.slice():[];f=ne(M,!1,U,Se,n),U=f.selectionTesters,ie=f.eventData,c=V?V.filtered:ce(W),D.throttle(Ae,I.SELECTDELAY,(function(){for(var e=(Le=re(U,Se)).slice(),t=0;t<d.length;t++){for(var r=d[t],n=!1,a=0;a<e.length;a++)if(e[a].curveNumber===r.curveNumber&&e[a].pointNumber===r.pointNumber){n=!0;break}n||e.push(r)}e.length&&(ie||(ie={}),ie.points=e),De(ie,c),function(e,t){e.emit("plotly_selecting",t)}(M,ie)}))}},n.clickFn=function(e,t){if(Me.remove(),M._fullLayout._activeShapeIndex>=0)M._fullLayout._deactivateShape(M);else if(!x){var r=k.clickmode;D.done(Ae).then((function(){if(D.clear(Ae),2===e){for(be.remove(),K=0;K<Se.length;K++)(ee=Se[K])._module.selectPoints(ee,!1);if(Q(M,Se),Z(n),de(M),Se.length){var a=Se[0].xaxis,o=Se[0].yaxis;if(a&&o){for(var l=[],c=M._fullLayout.selections,u=0;u<c.length;u++){var f=c[u];f&&(f.xref===a._id&&f.yref===o._id||l.push(f))}l.length<c.length&&(M._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",M,{selections:l}))}}}else r.indexOf("select")>-1&&Y(t,M,n.xaxes,n.yaxes,n.subplot,n,be),"event"===r&&fe(M,void 0);s.click(M,t,C.id)})).catch(A.error)}},n.doneFn=function(){Me.remove(),D.done(Ae).then((function(){D.clear(Ae),!L&&J&&n.selectionDefs&&(J.subtract=xe,n.selectionDefs.push(J),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,W)),(L||x)&&Z(n,L),n.doneFnCompleted&&n.doneFnCompleted(Le),b&&fe(M,ie)})).catch(A.error)}},clearOutline:x,clearSelectionsCache:Z,selectOnClick:Y}},6056:function(e,t,r){"use strict";var n=r(3916),a=r(5376),i=r(2904).line,o=r(8192).u,l=r(2880).extendFlat,s=r(1780).templatedArray,c=(r(6208),r(5464)),u=r(1776).ye,f=r(7728);e.exports=s("shape",{visible:l({},c.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:l({},c.legend,{editType:"calc+arraydraw"}),legendgroup:l({},c.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:l({},c.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:a({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:l({},c.legendrank,{editType:"calc+arraydraw"}),legendwidth:l({},c.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:l({},n.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({},n.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:u({},{keys:Object.keys(f)}),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,r){"use strict";var n=r(3400),a=r(4460),i=r(3068),o=r(5152);function l(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function s(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,r,a,l,s){var c=e/2,u=s;if("pixel"===t){var f=l?o.extractPathCoords(l,s?i.paramIsY:i.paramIsX):[r,a],d=n.aggNums(Math.max,null,f),h=n.aggNums(Math.min,null,f),p=h<0?Math.abs(h)+c:c,v=d>0?d+c:c;return{ppad:c,ppadplus:u?p:v,ppadminus:u?v:p}}return{ppad:c}}function u(e,t,r,n,a){var l="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[l(t),l(r)];if(n){var s,c,u,f,d=1/0,h=-1/0,p=n.match(i.segmentRE);for("date"===e.type&&(l=o.decodeDate(l)),s=0;s<p.length;s++)void 0!==(c=a[p[s].charAt(0)].drawn)&&(!(u=p[s].substr(1).match(i.paramRE))||u.length<c||((f=l(u[c]))<d&&(d=f),f>h&&(h=f)));return h>=d?[d,h]:void 0}}e.exports=function(e){var t=e._fullLayout,r=n.filterVisible(t.shapes);if(r.length&&e._fullData.length)for(var o=0;o<r.length;o++){var c,f,d=r[o];d._extremes={};var h=a.getRefType(d.xref),p=a.getRefType(d.yref);if("paper"!==d.xref&&"domain"!==h){var v="pixel"===d.xsizemode?d.xanchor:d.x0,g="pixel"===d.xsizemode?d.xanchor:d.x1;(f=u(c=a.getFromId(e,d.xref),v,g,d.path,i.paramIsX))&&(d._extremes[c._id]=a.findExtremes(c,f,l(d)))}if("paper"!==d.yref&&"domain"!==p){var y="pixel"===d.ysizemode?d.yanchor:d.y0,m="pixel"===d.ysizemode?d.yanchor:d.y1;(f=u(c=a.getFromId(e,d.yref),y,m,d.path,i.paramIsY))&&(d._extremes[c._id]=a.findExtremes(c,f,s(d)))}}}},3068:function(e){"use strict";e.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},3712:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(1272),o=r(6056),l=r(5152);function s(e,t,r){function i(r,a){return n.coerce(e,t,o,r,a)}if(t._isShape=!0,i("visible")){i("showlegend")&&(i("legend"),i("legendwidth"),i("legendgroup"),i("legendgrouptitle.text"),n.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var s=i("path"),c=i("type",s?"path":"rect"),u="path"!==c;u&&delete t.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule"),i("line.width")&&(i("line.color"),i("line.dash"));for(var f=i("xsizemode"),d=i("ysizemode"),h=["x","y"],p=0;p<2;p++){var v,g,y,m=h[p],x=m+"anchor",b="x"===m?f:d,_={_fullLayout:r},w=a.coerceRef(e,t,_,m,void 0,"paper");if("range"===a.getRefType(w)?((v=a.getFromId(_,w))._shapeIndices.push(t._index),y=l.rangeToShapePosition(v),g=l.shapePositionToRange(v)):g=y=n.identity,u){var T=m+"0",M=m+"1",k=e[T],A=e[M];e[T]=g(e[T],!0),e[M]=g(e[M],!0),"pixel"===b?(i(T,0),i(M,10)):(a.coercePosition(t,_,i,w,T,.25),a.coercePosition(t,_,i,w,M,.75)),t[T]=y(t[T]),t[M]=y(t[M]),e[T]=k,e[M]=A}if("pixel"===b){var L=e[x];e[x]=g(e[x],!0),a.coercePosition(t,_,i,w,x,.25),t[x]=y(t[x]),e[x]=L}}u&&n.noneOrAll(e,t,["x0","x1","y0","y1"]);var S,D,O="line"===c;if(u&&(S=i("label.texttemplate")),S||(D=i("label.text")),D||S){i("label.textangle");var C=i("label.textposition",O?"middle":"middle center");i("label.xanchor"),i("label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(O,C)),i("label.padding"),n.coerceFont(i,"label.font",r.font)}}}e.exports=function(e,t){i(e,t,{name:"shapes",handleItemDefaults:s})}},728:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(2736),o=r(3616),l=r(9856).readPaths,s=r(5152),c=s.getPathString,u=r(7728),f=r(4284).FROM_TL;e.exports=function(e,t,r,d){if(d.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var h;if(r.label.texttemplate){var p={};if("path"!==r.type){var v=a.getFromId(e,r.xref),g=a.getFromId(e,r.yref);for(var y in u){var m=u[y](r,v,g);void 0!==m&&(p[y]=m)}}h=n.texttemplateStringForShapes(r.label.texttemplate,{},e._fullLayout._d3locale,p)}else h=r.label.text;var x,b,_,w,T={"data-index":t},M=r.label.font,k=d.append("g").attr(T).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(h);if(r.path){var A=c(e,r),L=l(A,e);x=1/0,_=1/0,b=-1/0,w=-1/0;for(var S=0;S<L.length;S++)for(var D=0;D<L[S].length;D++)for(var O=L[S][D],C=1;C<O.length;C+=2){var P=O[C],I=O[C+1];x=Math.min(x,P),b=Math.max(b,P),_=Math.min(_,I),w=Math.max(w,I)}}else{var R=a.getFromId(e,r.xref),z=a.getRefType(r.xref),N=a.getFromId(e,r.yref),F=a.getRefType(r.yref),E=s.getDataToPixel(e,R,!1,z),H=s.getDataToPixel(e,N,!0,F);x=E(r.x0),b=E(r.x1),_=H(r.y0),w=H(r.y1)}var B=r.label.textangle;"auto"===B&&(B="line"===r.type?function(e,t,r,n){var a,i;return i=Math.abs(r-e),a=r>=e?t-n:n-t,-180/Math.PI*Math.atan2(a,i)}(x,_,b,w):0),k.call((function(t){return t.call(o.font,M).attr({}),i.convertToTspans(t,e),t}));var j=function(e,t,r,n,a,i,o){var l,s,c,u,d=a.label.textposition,h=a.label.textangle,p=a.label.padding,v=a.type,g=Math.PI/180*i,y=Math.sin(g),m=Math.cos(g),x=a.label.xanchor,b=a.label.yanchor;if("line"===v){"start"===d?(l=e,s=t):"end"===d?(l=r,s=n):(l=(e+r)/2,s=(t+n)/2),"auto"===x&&(x="start"===d?"auto"===h?r>e?"left":r<e?"right":"center":r>e?"right":r<e?"left":"center":"end"===d?"auto"===h?r>e?"right":r<e?"left":"center":r>e?"left":r<e?"right":"center":"center");var _={bottom:-1,middle:0,top:1};if("auto"===h){var w=_[b];c=-p*y*w,u=p*m*w}else c=p*{left:1,center:0,right:-1}[x],u=p*_[b];l+=c,s+=u}else c=p+3,-1!==d.indexOf("right")?(l=Math.max(e,r)-c,"auto"===x&&(x="right")):-1!==d.indexOf("left")?(l=Math.min(e,r)+c,"auto"===x&&(x="left")):(l=(e+r)/2,"auto"===x&&(x="center")),s=-1!==d.indexOf("top")?Math.min(t,n):-1!==d.indexOf("bottom")?Math.max(t,n):(t+n)/2,u=p,"bottom"===b?s-=u:"top"===b&&(s+=u);var T=f[b],M=a.label.font.size,k=o.height;return{textx:l+(k*T-M)*y,texty:s+-(k*T-M)*m,xanchor:x}}(x,_,b,w,r,B,o.bBox(k.node())),Y=j.textx,V=j.texty,U=j.xanchor;k.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[U],y:V,x:Y,transform:"rotate("+B+","+Y+","+V+")"}).call(i.positionText,Y,V)}}},5496:function(e,t,r){"use strict";var n=r(3400).strTranslate,a=r(6476),i=r(2760),o=i.drawMode,l=i.selectMode,s=r(4040),c=r(6308),u=r(7e3),f=u.i000,d=u.i090,h=u.i180,p=u.i270,v=r(1936).clearOutlineControllers,g=r(9856),y=g.pointsOnRectangle,m=g.pointsOnEllipse,x=g.writePaths,b=r(3940).newShapes,_=r(3940).createShapeObj,w=r(5968),T=r(728);function M(e,t){var r,n,a,i=e[t][1],o=e[t][2],l=e.length;return n=e[r=(t+1)%l][1],a=e[r][2],n===i&&a===o&&(n=e[r=(t+2)%l][1],a=e[r][2]),[r,n,a]}e.exports=function e(t,r,i,u){u||(u=0);var g=i.gd;function k(){e(t,r,i,u++),(m(t[0])||i.hasText)&&A({redrawing:!0})}function A(e){var t={};void 0!==i.isActiveShape&&(i.isActiveShape=!1,t=b(r,i)),void 0!==i.isActiveSelection&&(i.isActiveSelection=!1,t=w(r,i),g._fullLayout._reselect=!0),Object.keys(t).length&&s.call((e||{}).redrawing?"relayout":"_guiRelayout",g,t)}var L,S,D,O,C,P=g._fullLayout._zoomlayer,I=i.dragmode,R=o(I),z=l(I);if((R||z)&&(g._fullLayout._outlining=!0),v(g),r.attr("d",x(t)),u||!i.isActiveShape&&!i.isActiveSelection||(C=function(e,t){for(var r=0;r<t.length;r++){var n=t[r];e[r]=[];for(var a=0;a<n.length;a++){e[r][a]=[];for(var i=0;i<n[a].length;i++)e[r][a][i]=n[a][i]}}return e}([],t),function(e){L=[];for(var r=0;r<t.length;r++){var o=t[r],l=y(o),s=!l&&m(o);L[r]=[];for(var u=o.length,v=0;v<u;v++)if("Z"!==o[v][0]&&(!s||v===f||v===d||v===h||v===p)){var x,b=l&&i.isActiveSelection;b&&(x=M(o,v));var _=o[v][1],w=o[v][2],T=e.append(b?"rect":"circle").attr("data-i",r).attr("data-j",v).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(b){var k=x[1]-_,A=x[2]-w,S=A?5:Math.max(Math.min(25,Math.abs(k)-5),5),D=k?5:Math.max(Math.min(25,Math.abs(A)-5),5);T.classed(A?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",S).attr("height",D).attr("x",_-S/2).attr("y",w-D/2).attr("transform",n(k/2,A/2))}else T.classed("cursor-grab",!0).attr("r",5).attr("cx",_).attr("cy",w);L[r][v]={element:T.node(),gd:g,prepFn:E,doneFn:B,clickFn:j},a.init(L[r][v])}}}(P.append("g").attr("class","outline-controllers")),function(){if(S=[],t.length){S[0]={element:r[0][0],gd:g,prepFn:V,doneFn:U,clickFn:q},a.init(S[0])}}()),R&&i.hasText){var N=P.select(".label-temp"),F=_(r,i,i.dragmode);T(g,"label-temp",F,N)}function E(e){D=+e.srcElement.getAttribute("data-i"),O=+e.srcElement.getAttribute("data-j"),L[D][O].moveFn=H}function H(e,r){if(t.length){var n=C[D][O][1],a=C[D][O][2],o=t[D],l=o.length;if(y(o)){var s=e,c=r;i.isActiveSelection&&(M(o,O)[1]===o[O][1]?c=0:s=0);for(var u=0;u<l;u++)if(u!==O){var f=o[u];f[1]===o[O][1]&&(f[1]=n+s),f[2]===o[O][2]&&(f[2]=a+c)}if(o[O][1]=n+s,o[O][2]=a+c,!y(o))for(var d=0;d<l;d++)for(var h=0;h<o[d].length;h++)o[d][h]=C[D][d][h]}else o[O][1]=n+e,o[O][2]=a+r;k()}}function B(){A()}function j(e,r){if(2===e){D=+r.srcElement.getAttribute("data-i"),O=+r.srcElement.getAttribute("data-j");var n=t[D];y(n)||m(n)||function(){if(t.length&&t[D]&&t[D].length){for(var e=[],r=0;r<t[D].length;r++)r!==O&&e.push(t[D][r]);e.length>1&&(2!==e.length||"Z"!==e[1][0])&&(0===O&&(e[0][0]="M"),t[D]=e,k(),A())}}()}}function Y(e,r){!function(e,r){if(t.length)for(var n=0;n<t.length;n++)for(var a=0;a<t[n].length;a++)for(var i=0;i+2<t[n][a].length;i+=2)t[n][a][i+1]=C[n][a][i+1]+e,t[n][a][i+2]=C[n][a][i+2]+r}(e,r),k()}function V(e){(D=+e.srcElement.getAttribute("data-i"))||(D=0),S[D].moveFn=Y}function U(){A()}function q(e){2===e&&function(e){if(l(e._fullLayout.dragmode)){v(e);var t=e._fullLayout._activeSelectionIndex,r=(e.layout||{}).selections||[];if(t<r.length){for(var n=[],a=0;a<r.length;a++)a!==t&&n.push(r[a]);delete e._fullLayout._activeSelectionIndex;var i=e._fullLayout.selections[t];e._fullLayout._deselect={xref:i.xref,yref:i.yref},s.call("_guiRelayout",e,{selections:n})}}}(g)}}},4016:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(3400),o=r(4460),l=r(9856).readPaths,s=r(5496),c=r(728),u=r(1936).clearOutlineControllers,f=r(6308),d=r(3616),h=r(1780).arrayEditor,p=r(6476),v=r(3972),g=r(3068),y=r(5152),m=y.getPathString;function x(e){var t=e._fullLayout;for(var r in t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove(),t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var a=0;a<t.shapes.length;a++)!0===t.shapes[a].visible&&w(e,a)}function b(e){return!!e._fullLayout._outlining}function _(e){return!e._context.edits.shapePosition}function w(e,t){e._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+t+'"]').remove();var r=y.makeShapesOptionsAndPlotinfo(e,t),u=r.options,w=r.plotinfo;function A(r){var A=m(e,u),L={"data-index":t,"fill-rule":u.fillrule,d:A},S=u.opacity,D=u.fillcolor,O=u.line.width?u.line.color:"rgba(0,0,0,0)",C=u.line.width,P=u.line.dash;C||!0!==u.editable||(C=5,P="solid");var I="Z"!==A[A.length-1],R=_(e)&&u.editable&&e._fullLayout._activeShapeIndex===t;R&&(D=I?"rgba(0,0,0,0)":e._fullLayout.activeshape.fillcolor,S=e._fullLayout.activeshape.opacity);var z,N=r.append("g").classed("shape-group",!0).attr({"data-index":t}),F=N.append("path").attr(L).style("opacity",S).call(f.stroke,O).call(f.fill,D).call(d.dashLine,P,C);if(T(N,e,u),c(e,t,u,N),(R||e._context.edits.shapePosition)&&(z=h(e.layout,"shapes",u)),R){F.style({cursor:"move"});var E={element:F.node(),plotinfo:w,gd:e,editHelpers:z,hasText:u.label.text||u.label.texttemplate,isActiveShape:!0},H=l(A,e);s(H,F,E)}else e._context.edits.shapePosition?function(e,t,r,l,s,u){var f,h,x,_,w,k,A,L,S,D,O,C,P,I,R,z,N=10,F=10,E="pixel"===r.xsizemode,H="pixel"===r.ysizemode,B="line"===r.type,j="path"===r.type,Y=u.modifyItem,V=n.select(t.node().parentNode),U=o.getFromId(e,r.xref),q=o.getRefType(r.xref),G=o.getFromId(e,r.yref),Z=o.getRefType(r.yref),W=y.getDataToPixel(e,U,!1,q),X=y.getDataToPixel(e,G,!0,Z),J=y.getPixelToData(e,U,!1,q),K=y.getPixelToData(e,G,!0,Z),Q=B?function(){var e=10,n=Math.max(r.line.width,e),a=s.append("g").attr("data-index",l).attr("drag-helper",!0);a.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":n,"stroke-opacity":"0"});var i={"fill-opacity":"0"},o=Math.max(n/2,e);return a.append("circle").attr({"data-line-point":"start-point",cx:E?W(r.xanchor)+r.x0:W(r.x0),cy:H?X(r.yanchor)-r.y0:X(r.y0),r:o}).style(i).classed("cursor-grab",!0),a.append("circle").attr({"data-line-point":"end-point",cx:E?W(r.xanchor)+r.x1:W(r.x1),cy:H?X(r.yanchor)-r.y1:X(r.y1),r:o}).style(i).classed("cursor-grab",!0),a}():t,$={element:Q.node(),gd:e,prepFn:function(n){b(e)||(E&&(w=W(r.xanchor)),H&&(k=X(r.yanchor)),"path"===r.type?R=r.path:(f=E?r.x0:W(r.x0),h=H?r.y0:X(r.y0),x=E?r.x1:W(r.x1),_=H?r.y1:X(r.y1)),f<x?(S=f,P="x0",D=x,I="x1"):(S=x,P="x1",D=f,I="x0"),!H&&h<_||H&&h>_?(A=h,O="y0",L=_,C="y1"):(A=_,O="y1",L=h,C="y0"),ee(n),ne(s,r),function(e,t,r){var n=t.xref,a=t.yref,i=o.getFromId(r,n),l=o.getFromId(r,a),s="";"paper"===n||i.autorange||(s+=n),"paper"===a||l.autorange||(s+=a),d.setClipUrl(e,s?"clip"+r._fullLayout._uid+s:null,r)}(t,r,e),$.moveFn="move"===z?te:re,$.altKey=n.altKey)},doneFn:function(){b(e)||(v(t),ae(s),T(t,e,r),a.call("_guiRelayout",e,u.getUpdateObj()))},clickFn:function(){b(e)||ae(s)}};function ee(r){if(b(e))z=null;else if(B)z="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=$.element.getBoundingClientRect(),a=n.right-n.left,i=n.bottom-n.top,o=r.clientX-n.left,l=r.clientY-n.top,s=!j&&a>N&&i>F&&!r.shiftKey?p.getCursor(o/a,1-l/i):"move";v(t,s),z=s.split("-")[0]}}function te(n,a){if("path"===r.type){var i=function(e){return e},o=i,u=i;E?Y("xanchor",r.xanchor=J(w+n)):(o=function(e){return J(W(e)+n)},U&&"date"===U.type&&(o=y.encodeDate(o))),H?Y("yanchor",r.yanchor=K(k+a)):(u=function(e){return K(X(e)+a)},G&&"date"===G.type&&(u=y.encodeDate(u))),Y("path",r.path=M(R,o,u))}else E?Y("xanchor",r.xanchor=J(w+n)):(Y("x0",r.x0=J(f+n)),Y("x1",r.x1=J(x+n))),H?Y("yanchor",r.yanchor=K(k+a)):(Y("y0",r.y0=K(h+a)),Y("y1",r.y1=K(_+a)));t.attr("d",m(e,r)),ne(s,r),c(e,l,r,V)}function re(n,a){if(j){var i=function(e){return e},o=i,u=i;E?Y("xanchor",r.xanchor=J(w+n)):(o=function(e){return J(W(e)+n)},U&&"date"===U.type&&(o=y.encodeDate(o))),H?Y("yanchor",r.yanchor=K(k+a)):(u=function(e){return K(X(e)+a)},G&&"date"===G.type&&(u=y.encodeDate(u))),Y("path",r.path=M(R,o,u))}else if(B){if("resize-over-start-point"===z){var d=f+n,p=H?h-a:h+a;Y("x0",r.x0=E?d:J(d)),Y("y0",r.y0=H?p:K(p))}else if("resize-over-end-point"===z){var v=x+n,g=H?_-a:_+a;Y("x1",r.x1=E?v:J(v)),Y("y1",r.y1=H?g:K(g))}}else{var b=function(e){return-1!==z.indexOf(e)},T=b("n"),q=b("s"),Z=b("w"),Q=b("e"),$=T?A+a:A,ee=q?L+a:L,te=Z?S+n:S,re=Q?D+n:D;H&&(T&&($=A-a),q&&(ee=L-a)),(!H&&ee-$>F||H&&$-ee>F)&&(Y(O,r[O]=H?$:K($)),Y(C,r[C]=H?ee:K(ee))),re-te>N&&(Y(P,r[P]=E?te:J(te)),Y(I,r[I]=E?re:J(re)))}t.attr("d",m(e,r)),ne(s,r),c(e,l,r,V)}function ne(e,t){(E||H)&&function(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=W(E?t.xanchor:i.midRange(r?[t.x0,t.x1]:y.extractPathCoords(t.path,g.paramIsX))),o=X(H?t.yanchor:i.midRange(r?[t.y0,t.y1]:y.extractPathCoords(t.path,g.paramIsY)));if(a=y.roundPositionForSharpStrokeRendering(a,1),o=y.roundPositionForSharpStrokeRendering(o,1),E&&H){var l="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",l)}else if(E){var s="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",s)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function ae(e){e.selectAll(".visual-cue").remove()}p.init($),Q.node().onmousemove=ee}(e,F,u,t,r,z):!0===u.editable&&F.style("pointer-events",I||f.opacity(D)*S<=.5?"stroke":"all");F.node().addEventListener("click",(function(){return function(e,t){if(_(e)){var r=+t.node().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,F)}))}u._input&&!0===u.visible&&("above"===u.layer?A(e._fullLayout._shapeUpperLayer):"paper"===u.xref||"paper"===u.yref?A(e._fullLayout._shapeLowerLayer):"between"===u.layer?A(w.shapelayerBetween):w._hadPlotinfo?A((w.mainplotinfo||w).shapelayer):A(e._fullLayout._shapeLowerLayer))}function T(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");d.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function M(e,t,r){return e.replace(g.segmentRE,(function(e){var n=0,a=e.charAt(0),i=g.paramIsX[a],o=g.paramIsY[a],l=g.numParams[a];return a+e.substr(1).replace(g.paramRE,(function(e){return n>=l||(i[n]?e=t(e):o[n]&&(e=r(e)),n++),e}))}))}function k(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(u(e),delete e._fullLayout._activeShapeIndex,x(e))}e.exports={draw:x,drawOne:w,eraseActiveShape:function(e){if(_(e)){u(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t<r.length){for(var n=[],i=0;i<r.length;i++)i!==t&&n.push(r[i]);return delete e._fullLayout._activeShapeIndex,a.call("_guiRelayout",e,{shapes:n})}}},drawLabel:c}},2872:function(e,t,r){"use strict";var n=r(7824).overrideAll,a=r(5464),i=r(5376),o=r(8192).u,l=r(2880).extendFlat,s=r(1776).ye,c=r(7728);e.exports=n({newshape:{visible:l({},a.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},a.legend,{}),legendgroup:l({},a.legendgroup,{}),legendgrouptitle:{text:l({},a.legendgrouptitle.text,{}),font:i({})},legendrank:l({},a.legendrank,{}),legendwidth:l({},a.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},o,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:l({},a.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:s({newshape:!0},{keys:Object.keys(c)}),font:i({}),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"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")},7e3:function(e){"use strict";e.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},5144:function(e,t,r){"use strict";var n=r(6308),a=r(3400);e.exports=function(e,t,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),a.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var i=(e||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(i)),r("newshape.line.dash")}var o="drawline"===e.dragmode,l=r("newshape.label.text"),s=r("newshape.label.texttemplate");if(l||s){r("newshape.label.textangle");var c=r("newshape.label.textposition",o?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(o,c)),r("newshape.label.padding"),a.coerceFont(r,"newshape.label.font",t.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},9856:function(e,t,r){"use strict";var n=r(9604),a=r(7e3),i=a.CIRCLE_SIDES,o=a.SQRT2,l=r(5840),s=l.p2r,c=l.r2p,u=[0,3,4,5,6,1,2],f=[0,3,4,1,2];function d(e,t){return Math.abs(e-t)<=1e-6}function h(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}t.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n<t;n++)for(var a=e[n].length,i=0;i<a;i++){var o=e[n][i][0];if("Z"===o)r+="Z";else for(var l=e[n][i].length,s=0;s<l;s++){var c=s;"Q"===o||"S"===o?c=f[s]:"C"===o&&(c=u[s]),r+=e[n][i][c],s>0&&s<l-1&&(r+=",")}}return r},t.readPaths=function(e,t,r,a){var o,l,u,f=n(e),d=[],h=-1,p=0,v=0,g=function(){l=p,u=v};g();for(var y=0;y<f.length;y++){var m,x,b,_,w=[],T=f[y][0],M=T;switch(T){case"M":d[++h]=[],p=+f[y][1],v=+f[y][2],w.push([M,p,v]),g();break;case"Q":case"S":m=+f[y][1],b=+f[y][2],p=+f[y][3],v=+f[y][4],w.push([M,p,v,m,b]);break;case"C":m=+f[y][1],b=+f[y][2],x=+f[y][3],_=+f[y][4],p=+f[y][5],v=+f[y][6],w.push([M,p,v,m,b,x,_]);break;case"T":case"L":p=+f[y][1],v=+f[y][2],w.push([M,p,v]);break;case"H":M="L",p=+f[y][1],w.push([M,p,v]);break;case"V":M="L",v=+f[y][1],w.push([M,p,v]);break;case"A":M="L";var k=+f[y][1],A=+f[y][2];+f[y][4]||(k=-k,A=-A);var L=p-k,S=v;for(o=1;o<=i/2;o++){var D=2*Math.PI*o/i;w.push([M,L+k*Math.cos(D),S+A*Math.sin(D)])}break;case"Z":p===l&&v===u||(p=l,v=u,w.push([M,p,v]))}for(var O=(r||{}).domain,C=t._fullLayout._size,P=r&&"pixel"===r.xsizemode,I=r&&"pixel"===r.ysizemode,R=!1===a,z=0;z<w.length;z++){for(o=0;o+2<7;o+=2){var N=w[z][o+1],F=w[z][o+2];void 0!==N&&void 0!==F&&(p=N,v=F,r&&(r.xaxis&&r.xaxis.p2r?(R&&(N-=r.xaxis._offset),N=P?c(r.xaxis,r.xanchor)+N:s(r.xaxis,N)):(R&&(N-=C.l),O?N=O.x[0]+N/C.w:N/=C.w),r.yaxis&&r.yaxis.p2r?(R&&(F-=r.yaxis._offset),F=I?c(r.yaxis,r.yanchor)-F:s(r.yaxis,F)):(R&&(F-=C.t),F=O?O.y[1]-F/C.h:1-F/C.h)),w[z][o+1]=N,w[z][o+2]=F)}d[h].push(w[z].slice())}}return d},t.pointsOnRectangle=function(e){if(5!==e.length)return!1;for(var t=1;t<3;t++){if(!d(e[0][t]-e[1][t],e[3][t]-e[2][t]))return!1;if(!d(e[0][t]-e[3][t],e[1][t]-e[2][t]))return!1}return!(!d(e[0][1],e[1][1])&&!d(e[0][1],e[3][1])||!(h(e[0],e[1])*h(e[0],e[3])))},t.pointsOnEllipse=function(e){var t=e.length;if(t!==i+1)return!1;t=i;for(var r=0;r<t;r++){var n=(2*t-r)%t,a=(t/2+n)%t,o=(t/2+r)%t;if(!d(h(e[r],e[o]),h(e[n],e[a])))return!1}return!0},t.handleEllipse=function(e,r,n){if(!e)return[r,n];var a=t.ellipseOver({x0:r[0],y0:r[1],x1:n[0],y1:n[1]}),l=(a.x1+a.x0)/2,s=(a.y1+a.y0)/2,c=(a.x1-a.x0)/2,u=(a.y1-a.y0)/2;c||(c=u/=o),u||(u=c/=o);for(var f=[],d=0;d<i;d++){var h=2*d*Math.PI/i;f.push([l+c*Math.cos(h),s+u*Math.sin(h)])}return f},t.ellipseOver=function(e){var t=e.x0,r=e.y0,n=e.x1,a=e.y1,i=n-t,l=a-r,s=((t-=i)+n)/2,c=((r-=l)+a)/2;return{x0:s-(i*=o),y0:c-(l*=o),x1:s+i,y1:c+l}},t.fixDatesForPaths=function(e,t,r){var n="date"===t.type,a="date"===r.type;if(!n&&!a)return e;for(var i=0;i<e.length;i++)for(var o=0;o<e[i].length;o++)for(var l=0;l+2<e[i][o].length;l+=2)n&&(e[i][o][l+1]=e[i][o][l+1].replace(" ","_")),a&&(e[i][o][l+2]=e[i][o][l+2].replace(" ","_"));return e}},3940:function(e,t,r){"use strict";var n=r(2760),a=n.drawMode,i=n.openMode,o=r(7e3),l=o.i000,s=o.i090,c=o.i180,u=o.i270,f=o.cos45,d=o.sin45,h=r(5840),p=h.p2r,v=h.r2p,g=r(1936).clearOutline,y=r(9856),m=y.readPaths,x=y.writePaths,b=y.ellipseOver,_=y.fixDatesForPaths;function w(e,t,r){var n,a=e[0][0],o=t.gd,h=a.getAttribute("d"),g=o._fullLayout.newshape,y=t.plotinfo,w=t.isActiveShape,T=y.xaxis,M=y.yaxis,k=!!y.domain||!y.xaxis,A=!!y.domain||!y.yaxis,L=i(r),S=m(h,o,y,w),D={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:k?"paper":T._id,yref:A?"paper":M._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(L||(D.fillcolor=g.fillcolor,D.fillrule=g.fillrule),1===S.length&&(n=S[0]),n&&5===n.length&&"drawrect"===r)D.type="rect",D.x0=n[0][1],D.y0=n[0][2],D.x1=n[2][1],D.y1=n[2][2];else if(n&&"drawline"===r)D.type="line",D.x0=n[0][1],D.y0=n[0][2],D.x1=n[1][1],D.y1=n[1][2];else if(n&&"drawcircle"===r){D.type="circle";var O=n[l][1],C=n[s][1],P=n[c][1],I=n[u][1],R=n[l][2],z=n[s][2],N=n[c][2],F=n[u][2],E=y.xaxis&&("date"===y.xaxis.type||"log"===y.xaxis.type),H=y.yaxis&&("date"===y.yaxis.type||"log"===y.yaxis.type);E&&(O=v(y.xaxis,O),C=v(y.xaxis,C),P=v(y.xaxis,P),I=v(y.xaxis,I)),H&&(R=v(y.yaxis,R),z=v(y.yaxis,z),N=v(y.yaxis,N),F=v(y.yaxis,F));var B=(C+I)/2,j=(R+N)/2,Y=b({x0:B,y0:j,x1:B+(I-C+P-O)/2*f,y1:j+(F-z+N-R)/2*d});E&&(Y.x0=p(y.xaxis,Y.x0),Y.x1=p(y.xaxis,Y.x1)),H&&(Y.y0=p(y.yaxis,Y.y0),Y.y1=p(y.yaxis,Y.y1)),D.x0=Y.x0,D.y0=Y.y0,D.x1=Y.x1,D.y1=Y.y1}else D.type="path",T&&M&&_(S,T,M),D.path=x(S),n=null;return D}e.exports={newShapes:function(e,t){if(e.length&&e[0][0]){var r=t.gd,n=t.isActiveShape,i=t.dragmode,o=(r.layout||{}).shapes||[];if(!a(i)&&void 0!==n){var l=r._fullLayout._activeShapeIndex;if(l<o.length)switch(r._fullLayout.shapes[l].type){case"rect":i="drawrect";break;case"circle":i="drawcircle";break;case"line":i="drawline";break;case"path":var s=o[l].path||"";i="Z"===s[s.length-1]?"drawclosedpath":"drawopenpath"}}var c=w(e,t,i);g(r);for(var u=t.editHelpers,f=(u||{}).modifyItem,d=[],h=0;h<o.length;h++){var p=r._fullLayout.shapes[h];if(d[h]=p._input,void 0!==n&&h===r._fullLayout._activeShapeIndex){var v=c;switch(p.type){case"line":case"rect":case"circle":f("x0",v.x0),f("x1",v.x1),f("y0",v.y0),f("y1",v.y1);break;case"path":f("path",v.path)}}}return void 0===n?(d.push(c),d):u?u.getUpdateObj():{}}},createShapeObj:w}},1936:function(e){"use strict";e.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}},5152:function(e,t,r){"use strict";var n=r(3068),a=r(3400),i=r(4460);t.rangeToShapePosition=function(e){return"log"===e.type?e.r2d:function(e){return e}},t.shapePositionToRange=function(e){return"log"===e.type?e.d2r:function(e){return e}},t.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}},t.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}},t.extractPathCoords=function(e,t,r){var i=[];return e.match(n.segmentRE).forEach((function(e){var o=t[e.charAt(0)].drawn;if(void 0!==o){var l=e.substr(1).match(n.paramRE);if(l&&!(l.length<o)){var s=l[o],c=r?s:a.cleanNumber(s);i.push(c)}}})),i},t.getDataToPixel=function(e,r,n,a){var i,o=e._fullLayout._size;if(r)if("domain"===a)i=function(e){return r._length*(n?1-e:e)+r._offset};else{var l=t.shapePositionToRange(r);i=function(e){return r._offset+r.r2p(l(e,!0))},"date"===r.type&&(i=t.decodeDate(i))}else i=n?function(e){return o.t+o.h*(1-e)}:function(e){return o.l+o.w*e};return i},t.getPixelToData=function(e,r,n,a){var i,o=e._fullLayout._size;if(r)if("domain"===a)i=function(e){var t=(e-r._offset)/r._length;return n?1-t:t};else{var l=t.rangeToShapePosition(r);i=function(e){return l(r.p2r(e-r._offset))}}else i=n?function(e){return 1-(e-o.t)/o.h}:function(e){return(e-o.l)/o.w};return i},t.roundPositionForSharpStrokeRendering=function(e,t){var r=1===Math.round(t%2),n=Math.round(e);return r?n+.5:n},t.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&"paper"!==r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}},t.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}},t.getPathString=function(e,r){var o,l,s,c,u,f,d,h,p=r.type,v=i.getRefType(r.xref),g=i.getRefType(r.yref),y=i.getFromId(e,r.xref),m=i.getFromId(e,r.yref),x=e._fullLayout._size;if(y?"domain"===v?l=function(e){return y._offset+y._length*e}:(o=t.shapePositionToRange(y),l=function(e){return y._offset+y.r2p(o(e,!0))}):l=function(e){return x.l+x.w*e},m?"domain"===g?c=function(e){return m._offset+m._length*(1-e)}:(s=t.shapePositionToRange(m),c=function(e){return m._offset+m.r2p(s(e,!0))}):c=function(e){return x.t+x.h*(1-e)},"path"===p)return y&&"date"===y.type&&(l=t.decodeDate(l)),m&&"date"===m.type&&(c=t.decodeDate(c)),function(e,t,r){var i=e.path,o=e.xsizemode,l=e.ysizemode,s=e.xanchor,c=e.yanchor;return i.replace(n.segmentRE,(function(e){var i=0,u=e.charAt(0),f=n.paramIsX[u],d=n.paramIsY[u],h=n.numParams[u],p=e.substr(1).replace(n.paramRE,(function(e){return f[i]?e="pixel"===o?t(s)+Number(e):t(e):d[i]&&(e="pixel"===l?r(c)-Number(e):r(e)),++i>h&&(e="X"),e}));return i>h&&(p=p.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+e)),u+p}))}(r,l,c);if("pixel"===r.xsizemode){var b=l(r.xanchor);u=b+r.x0,f=b+r.x1}else u=l(r.x0),f=l(r.x1);if("pixel"===r.ysizemode){var _=c(r.yanchor);d=_-r.y0,h=_-r.y1}else d=c(r.y0),h=c(r.y1);if("line"===p)return"M"+u+","+d+"L"+f+","+h;if("rect"===p)return"M"+u+","+d+"H"+f+"V"+h+"H"+u+"Z";var w=(u+f)/2,T=(d+h)/2,M=Math.abs(w-u),k=Math.abs(T-d),A="A"+M+","+k,L=w+M+","+T;return"M"+L+A+" 0 1,1 "+w+","+(T-k)+A+" 0 0,1 "+L+"Z"}},1592:function(e,t,r){"use strict";var n=r(4016);e.exports={moduleType:"component",name:"shapes",layoutAttributes:r(6056),supplyLayoutDefaults:r(3712),supplyDrawNewShapeDefaults:r(5144),includeBasePlot:r(6632)("shapes"),calcAutorange:r(6084),draw:n.draw,drawOne:n.drawOne}},7728:function(e){"use strict";function t(e,t){return t?t.d2l(e):e}function r(e,t){return t?t.l2d(e):e}function n(e,r){return t(e.x1,r)-t(e.x0,r)}function a(e,r,n){return t(e.y1,n)-t(e.y0,n)}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,r){return"line"!==e.type?void 0:a(e,0,r)/n(e,t)},dx:n,dy:a,width:function(e,t){return Math.abs(n(e,t))},height:function(e,t,r){return Math.abs(a(e,0,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(n(e,t),2)+Math.pow(a(e,0,r),2))},xcenter:function(e,n){return r((t(e.x1,n)+t(e.x0,n))/2,n)},ycenter:function(e,n,a){return r((t(e.y1,a)+t(e.y0,a))/2,a)}}},9861:function(e,t,r){"use strict";var n=r(5376),a=r(6741),i=r(2880).extendDeepAll,o=r(7824).overrideAll,l=r(5656),s=r(1780).templatedArray,c=r(876),u=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:u,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:n({})},font:n({}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor},bgcolor:{valType:"color",dflt:c.railBgColor},bordercolor:{valType:"color",dflt:c.railBorderColor},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth},ticklen:{valType:"number",min:0,dflt:c.tickLength},tickcolor:{valType:"color",dflt:c.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:c.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,r){"use strict";var n=r(3400),a=r(1272),i=r(9861),o=r(876).name,l=i.steps;function s(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}for(var l=a(e,t,{name:"steps",handleItemDefaults:c}),s=0,u=0;u<l.length;u++)l[u].visible&&s++;if(s<2?t.visible=!1:o("visible")){t._stepCount=s;var f=t._visibleSteps=n.filterVisible(l);(l[o("active")]||{}).visible||(t.active=f[0]._index),o("x"),o("y"),n.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("len"),o("lenmode"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("currentvalue.visible")&&(o("currentvalue.xanchor"),o("currentvalue.prefix"),o("currentvalue.suffix"),o("currentvalue.offset"),n.coerceFont(o,"currentvalue.font",t.font)),o("transition.duration"),o("transition.easing"),o("bgcolor"),o("activebgcolor"),o("bordercolor"),o("borderwidth"),o("ticklen"),o("tickwidth"),o("tickcolor"),o("minorticklen")}}function c(e,t){function r(r,a){return n.coerce(e,t,l,r,a)}if("skip"===e.method||Array.isArray(e.args)?r("visible"):t.visible=!1){r("method"),r("args");var a=r("label","step-"+t._index);r("value",a),r("execute")}}e.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:s})}},9664:function(e,t,r){"use strict";var n=r(3428),a=r(7316),i=r(6308),o=r(3616),l=r(3400),s=l.strTranslate,c=r(2736),u=r(1780).arrayEditor,f=r(876),d=r(4284),h=d.LINE_SPACING,p=d.FROM_TL,v=d.FROM_BR;function g(e){return f.autoMarginIdRoot+e._index}function y(e){return e._index}function m(e,t){var r=o.tester.selectAll("g."+f.labelGroupClass).data(t._visibleSteps);r.enter().append("g").classed(f.labelGroupClass,!0);var i=0,s=0;r.each((function(e){var r=_(n.select(this),{step:e},t).node();if(r){var a=o.bBox(r);s=Math.max(s,a.height),i=Math.max(i,a.width)}})),r.remove();var u=t._dims={};u.inputAreaWidth=Math.max(f.railWidth,f.gripHeight);var d=e._fullLayout._size;u.lx=d.l+d.w*t.x,u.ly=d.t+d.h*(1-t.y),"fraction"===t.lenmode?u.outerLength=Math.round(d.w*t.len):u.outerLength=t.len,u.inputAreaStart=0,u.inputAreaLength=Math.round(u.outerLength-t.pad.l-t.pad.r);var h=(u.inputAreaLength-2*f.stepInset)/(t._stepCount-1),y=i+f.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(y/h)),u.labelHeight=s,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,t.currentvalue.visible){var m=o.tester.append("g");r.each((function(e){var r=x(m,t,e.label),n=r.node()&&o.bBox(r.node())||{width:0,height:0},a=c.lineCount(r);u.currentValueMaxWidth=Math.max(u.currentValueMaxWidth,Math.ceil(n.width)),u.currentValueHeight=Math.max(u.currentValueHeight,Math.ceil(n.height)),u.currentValueMaxLines=Math.max(u.currentValueMaxLines,a)})),u.currentValueTotalHeight=u.currentValueHeight+t.currentvalue.offset,m.remove()}u.height=u.currentValueTotalHeight+f.tickOffset+t.ticklen+f.labelOffset+u.labelHeight+t.pad.t+t.pad.b;var b="left";l.isRightAnchor(t)&&(u.lx-=u.outerLength,b="right"),l.isCenterAnchor(t)&&(u.lx-=u.outerLength/2,b="center");var w="top";l.isBottomAnchor(t)&&(u.ly-=u.height,w="bottom"),l.isMiddleAnchor(t)&&(u.ly-=u.height/2,w="middle"),u.outerLength=Math.ceil(u.outerLength),u.height=Math.ceil(u.height),u.lx=Math.round(u.lx),u.ly=Math.round(u.ly);var T={y:t.y,b:u.height*v[w],t:u.height*p[w]};"fraction"===t.lenmode?(T.l=0,T.xl=t.x-t.len*p[b],T.r=0,T.xr=t.x+t.len*v[b]):(T.x=t.x,T.l=u.outerLength*p[b],T.r=u.outerLength*v[b]),a.autoMargin(e,g(t),T)}function x(e,t,r){if(t.currentvalue.visible){var n,a,i=t._dims;switch(t.currentvalue.xanchor){case"right":n=i.inputAreaLength-f.currentValueInset-i.currentValueMaxWidth,a="left";break;case"center":n=.5*i.inputAreaLength,a="middle";break;default:n=f.currentValueInset,a="left"}var s=l.ensureSingle(e,"text",f.labelClass,(function(e){e.attr({"text-anchor":a,"data-notex":1})})),u=t.currentvalue.prefix?t.currentvalue.prefix:"";if("string"==typeof r)u+=r;else{var d=t.steps[t.active].label,p=t._gd._fullLayout._meta;p&&(d=l.templateString(d,p)),u+=d}t.currentvalue.suffix&&(u+=t.currentvalue.suffix),s.call(o.font,t.currentvalue.font).text(u).call(c.convertToTspans,t._gd);var v=c.lineCount(s),g=(i.currentValueMaxLines+1-v)*t.currentvalue.font.size*h;return c.positionText(s,n,g),s}}function b(e,t,r){l.ensureSingle(e,"rect",f.gripRectClass,(function(n){n.call(k,t,e,r).style("pointer-events","all")})).attr({width:f.gripWidth,height:f.gripHeight,rx:f.gripRadius,ry:f.gripRadius}).call(i.stroke,r.bordercolor).call(i.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function _(e,t,r){var n=l.ensureSingle(e,"text",f.labelClass,(function(e){e.attr({"text-anchor":"middle","data-notex":1})})),a=t.step.label,i=r._gd._fullLayout._meta;return i&&(a=l.templateString(a,i)),n.call(o.font,r.font).text(a).call(c.convertToTspans,r._gd),n}function w(e,t){var r=l.ensureSingle(e,"g",f.labelsClass),a=t._dims,i=r.selectAll("g."+f.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(f.labelGroupClass,!0),i.exit().remove(),i.each((function(e){var r=n.select(this);r.call(_,e,t),o.setTranslate(r,S(t,e.fraction),f.tickOffset+t.ticklen+t.font.size*h+f.labelOffset+a.currentValueTotalHeight)}))}function T(e,t,r,n,a){var i=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[i]._index;o!==r.active&&M(e,t,r,o,!0,a)}function M(e,t,r,n,i,o){var l=r.active;r.active=n,u(e.layout,f.name,r).applyUpdate("active",n);var s=r.steps[r.active];t.call(L,r,o),t.call(x,r),e.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:l}),s&&s.method&&i&&(t._nextMethod?(t._nextMethod.step=s,t._nextMethod.doCallback=i,t._nextMethod.doTransition=o):(t._nextMethod={step:s,doCallback:i,doTransition:o},t._nextMethodRaf=window.requestAnimationFrame((function(){var r=t._nextMethod.step;r.method&&(r.execute&&a.executeAPICommand(e,r.method,r.args),t._nextMethod=null,t._nextMethodRaf=null)}))))}function k(e,t,r){if(!t._context.staticPlot){var a=r.node(),o=n.select(t);e.on("mousedown",s),e.on("touchstart",s)}function l(){return r.data()[0]}function s(){var e=l();t.emit("plotly_sliderstart",{slider:e});var s=r.select("."+f.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),s.call(i.fill,e.activebgcolor);var c=D(e,n.mouse(a)[0]);function u(){var e=l(),i=D(e,n.mouse(a)[0]);T(t,r,e,i,!1)}function d(){var e=l();e._dragging=!1,s.call(i.fill,e.bgcolor),o.on("mouseup",null),o.on("mousemove",null),o.on("touchend",null),o.on("touchmove",null),t.emit("plotly_sliderend",{slider:e,step:e.steps[e.active]})}T(t,r,e,c,!0),e._dragging=!0,o.on("mousemove",u),o.on("touchmove",u),o.on("mouseup",d),o.on("touchend",d)}}function A(e,t){var r=e.selectAll("rect."+f.tickRectClass).data(t._visibleSteps),a=t._dims;r.enter().append("rect").classed(f.tickRectClass,!0),r.exit().remove(),r.attr({width:t.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(e,r){var l=r%a.labelStride==0,s=n.select(this);s.attr({height:l?t.ticklen:t.minorticklen}).call(i.fill,t.tickcolor),o.setTranslate(s,S(t,r/(t._stepCount-1))-.5*t.tickwidth,(l?f.tickOffset:f.minorTickOffset)+a.currentValueTotalHeight)}))}function L(e,t,r){for(var n=e.select("rect."+f.gripRectClass),a=0,i=0;i<t._stepCount;i++)if(t._visibleSteps[i]._index===t.active){a=i;break}var o=S(t,a/(t._stepCount-1));if(!t._invokingCommand){var l=n;r&&t.transition.duration>0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*f.gripWidth,t._dims.currentValueTotalHeight))}}function S(e,t){var r=e._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,t))}function D(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function O(e,t,r){var n=r._dims,a=l.ensureSingle(e,"rect",f.railTouchRectClass,(function(n){n.call(k,t,e,r).style("pointer-events","all")}));a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function C(e,t){var r=t._dims,n=r.inputAreaLength-2*f.railInset,a=l.ensureSingle(e,"rect",f.railRectClass);a.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(a,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}e.exports=function(e){var t=e._context.staticPlot,r=e._fullLayout,i=function(e,t){for(var r=e[f.name],n=[],a=0;a<r.length;a++){var i=r[a];i.visible&&(i._gd=t,n.push(i))}return n}(r,e),l=r._infolayer.selectAll("g."+f.containerClassName).data(i.length>0?[0]:[]);function s(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),a.autoMargin(e,g(t))}if(l.enter().append("g").classed(f.containerClassName,!0).style("cursor",t?null:"ew-resize"),l.exit().each((function(){n.select(this).selectAll("g."+f.groupClassName).each(s)})).remove(),0!==i.length){var c=l.selectAll("g."+f.groupClassName).data(i,y);c.enter().append("g").classed(f.groupClassName,!0),c.exit().each(s).remove();for(var u=0;u<i.length;u++){var d=i[u];m(e,d)}c.each((function(t){var r=n.select(this);!function(e){var t=e._dims;t.labelSteps=[];for(var r=e._stepCount,n=0;n<r;n+=t.labelStride)t.labelSteps.push({fraction:n/(r-1),step:e._visibleSteps[n]})}(t),a.manageCommandObserver(e,t,t._visibleSteps,(function(t){var n=r.data()[0];n.active!==t.index&&(n._dragging||M(e,r,n,t.index,!1,!0))})),function(e,t,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),t.call(x,r).call(C,r).call(w,r).call(A,r).call(O,e,r).call(b,e,r);var n=r._dims;o.setTranslate(t,n.lx+r.pad.l,n.ly+r.pad.t),t.call(L,r,!1),t.call(x,r)}(e,n.select(this),t)}))}}},7544:function(e,t,r){"use strict";var n=r(876);e.exports={moduleType:"component",name:n.name,layoutAttributes:r(9861),supplyLayoutDefaults:r(8132),draw:r(9664)}},1668:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=r(7316),o=r(4040),l=r(3400),s=l.strTranslate,c=r(3616),u=r(6308),f=r(2736),d=r(3448),h=r(4284).OPPOSITE_SIDE,p=/ [XY][0-9]* /;e.exports={draw:function(e,t,r){var v,g=r.propContainer,y=r.propName,m=r.placeholder,x=r.traceIndex,b=r.avoid||{},_=r.attributes,w=r.transform,T=r.containerGroup,M=e._fullLayout,k=1,A=!1,L=g.title,S=(L&&L.text?L.text:"").trim(),D=L&&L.font?L.font:{},O=D.family,C=D.size,P=D.color;"title.text"===y?v="titleText":-1!==y.indexOf("axis")?v="axisTitleText":y.indexOf(!0)&&(v="colorbarTitleText");var I=e._context.edits[v];""===S?k=0:S.replace(p," % ")===m.replace(p," % ")&&(k=.2,A=!0,I||(S="")),r._meta?S=l.templateString(S,r._meta):M._meta&&(S=l.templateString(S,M._meta));var R,z=S||I;T||(T=l.ensureSingle(M._infolayer,"g","g-"+t),R=M._hColorbarMoveTitle);var N=T.selectAll("text").data(z?[0]:[]);if(N.enter().append("text"),N.text(S).attr("class",t),N.exit().remove(),!z)return T;function F(e){l.syncOrAsync([E,H],e)}function E(t){var r;return!w&&R&&(w={}),w?(r="",w.rotate&&(r+="rotate("+[w.rotate,_.x,_.y]+")"),(w.offset||R)&&(r+=s(0,(w.offset||0)-(R||0)))):r=null,t.attr("transform",r),t.style({"font-family":O,"font-size":n.round(C,2)+"px",fill:u.rgb(P),opacity:k*u.opacity(P),"font-weight":i.fontWeight}).attr(_).call(f.convertToTspans,e),i.previousPromises(e)}function H(t){var r=n.select(t.node().parentNode);if(b&&b.selection&&b.side&&S){r.attr("transform",null);var i=h[b.side],o="left"===b.side||"top"===b.side?-1:1,u=a(b.pad)?b.pad:2,f=c.bBox(r.node()),d={t:0,b:0,l:0,r:0},p=e._fullLayout._reservedMargin;for(var v in p)for(var y in p[v]){var m=p[v][y];d[y]=Math.max(d[y],m)}var x={left:d.l,top:d.t,right:M.width-d.r,bottom:M.height-d.b},_=b.maxShift||o*(x[b.side]-f[b.side]),w=0;if(_<0)w=_;else{var T=b.offsetLeft||0,k=b.offsetTop||0;f.left-=T,f.right-=T,f.top-=k,f.bottom-=k,b.selection.each((function(){var e=c.bBox(this);l.bBoxIntersect(f,e,u)&&(w=Math.max(w,o*(e[b.side]-f[i])+u))})),w=Math.min(_,w),g._titleScoot=Math.abs(w)}if(w>0||_<0){var A={left:[-w,0],right:[w,0],top:[0,-w],bottom:[0,w]}[b.side];r.attr("transform",s(A[0],A[1]))}}}return N.call(F),I&&(S?N.on(".opacity",null):(k=0,A=!0,N.text(m).on("mouseover.opacity",(function(){n.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)}))),N.call(f.makeEditable,{gd:e}).on("edit",(function(t){void 0!==x?o.call("_guiRestyle",e,y,t,x):o.call("_guiRelayout",e,y,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(F)})).on("input",(function(e){this.text(e||" ").call(f.positionText,_.x,_.y)}))),N.classed("js-placeholder",A),T}}},8444:function(e,t,r){"use strict";var n=r(5376),a=r(2548),i=r(2880).extendFlat,o=r(7824).overrideAll,l=r(6741),s=r(1780).templatedArray,c=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:c,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:n({}),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:"◄",right:"►",up:"▲",down:"▼"}}},1384:function(e,t,r){"use strict";var n=r(3400),a=r(1272),i=r(8444),o=r(1331).name,l=i.buttons;function s(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}o("visible",a(e,t,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(e,t){function r(r,a){return n.coerce(e,t,l,r,a)}r("visible","skip"===e.method||Array.isArray(e.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}e.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:s})}},4420:function(e,t,r){"use strict";var n=r(3428),a=r(7316),i=r(6308),o=r(3616),l=r(3400),s=r(2736),c=r(1780).arrayEditor,u=r(4284).LINE_SPACING,f=r(1331),d=r(7400);function h(e){return e._index}function p(e,t){return+e.attr(f.menuIndexAttrName)===t._index}function v(e,t,r,n,a,i,o,l){t.active=o,c(e.layout,f.name,t).applyUpdate("active",o),"buttons"===t.type?y(e,n,null,null,t):"dropdown"===t.type&&(a.attr(f.menuIndexAttrName,"-1"),g(e,n,a,i,t),l||y(e,n,a,i,t))}function g(e,t,r,n,a){var i=l.ensureSingle(t,"g",f.headerClassName,(function(e){e.style("pointer-events","all")})),s=a._dims,c=a.active,u=a.buttons[c]||f.blankHeaderOpts,d={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},h={width:s.headerWidth,height:s.headerHeight};i.call(m,a,u,e).call(A,a,d,h),l.ensureSingle(t,"text",f.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(o.font,a.font).text(f.arrowSymbol[a.direction])})).attr({x:s.headerWidth-f.arrowOffsetX+a.pad.l,y:s.headerHeight/2+f.textOffsetY+a.pad.t}),i.on("click",(function(){r.call(L,String(p(r,a)?-1:a._index)),y(e,t,r,n,a)})),i.on("mouseover",(function(){i.call(w)})),i.on("mouseout",(function(){i.call(T,a)})),o.setTranslate(t,s.lx,s.ly)}function y(e,t,r,i,o){r||(r=t).attr("pointer-events","all");var s=function(e){return-1==+e.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll("g."+c).data(l.filterVisible(s)),d=u.enter().append("g").classed(c,!0),h=u.exit();"dropdown"===o.type?(d.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var p=0,g=0,y=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?g=y.headerHeight+f.gapButtonHeader:p=y.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-f.gapButtonHeader+f.gapButton-y.openHeight),"dropdown"===o.type&&"left"===o.direction&&(p=-f.gapButtonHeader+f.gapButton-y.openWidth);var b={x:y.lx+p+o.pad.l,y:y.ly+g+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},M={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(l,s){var c=n.select(this);c.call(m,o,l,e).call(A,o,b),c.on("click",(function(){n.event.defaultPrevented||(l.execute&&(l.args2&&o.active===s?(v(e,o,0,t,r,i,-1),a.executeAPICommand(e,l.method,l.args2)):(v(e,o,0,t,r,i,s),a.executeAPICommand(e,l.method,l.args))),e.emit("plotly_buttonclicked",{menu:o,button:l,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(M.w=Math.max(y.openWidth,y.headerWidth),M.h=b.y-M.t):(M.w=b.x-M.l,M.h=Math.max(y.openHeight,y.headerHeight)),M.direction=o.direction,i&&(u.size()?function(e,t,r,n,a,i){var o,l,s,c=a.direction,u="up"===c||"down"===c,d=a._dims,h=a.active;if(u)for(l=0,s=0;s<h;s++)l+=d.heights[s]+f.gapButton;else for(o=0,s=0;s<h;s++)o+=d.widths[s]+f.gapButton;n.enable(i,o,l),n.hbar&&n.hbar.attr("opacity","0").transition().attr("opacity","1"),n.vbar&&n.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,i,o,M):function(e){var t=!!e.hbar,r=!!e.vbar;t&&e.hbar.transition().attr("opacity","0").each("end",(function(){t=!1,r||e.disable()})),r&&e.vbar.transition().attr("opacity","0").each("end",(function(){r=!1,t||e.disable()}))}(i))}function m(e,t,r,n){e.call(x,t).call(b,t,r,n)}function x(e,t){l.ensureSingle(e,"rect",f.itemRectClassName,(function(e){e.attr({rx:f.rx,ry:f.ry,"shape-rendering":"crispEdges"})})).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px")}function b(e,t,r,n){var a=l.ensureSingle(e,"text",f.itemTextClassName,(function(e){e.attr({"text-anchor":"start","data-notex":1})})),i=r.label,c=n._fullLayout._meta;c&&(i=l.templateString(i,c)),a.call(o.font,t.font).text(i).call(s.convertToTspans,n)}function _(e,t){var r=t.active;e.each((function(e,a){var o=n.select(this);a===r&&t.showactive&&o.select("rect."+f.itemRectClassName).call(i.fill,f.activeColor)}))}function w(e){e.select("rect."+f.itemRectClassName).call(i.fill,f.hoverColor)}function T(e,t){e.select("rect."+f.itemRectClassName).call(i.fill,t.bgcolor)}function M(e,t){var r=t._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},i=o.tester.selectAll("g."+f.dropdownButtonClassName).data(l.filterVisible(t.buttons));i.enter().append("g").classed(f.dropdownButtonClassName,!0);var c=-1!==["up","down"].indexOf(t.direction);i.each((function(a,i){var l=n.select(this);l.call(m,t,a,e);var d=l.select("."+f.itemTextClassName),h=d.node()&&o.bBox(d.node()).width,p=Math.max(h+f.textPadX,f.minWidth),v=t.font.size*u,g=s.lineCount(d),y=Math.max(v*g,f.minHeight)+f.textOffsetY;y=Math.ceil(y),p=Math.ceil(p),r.widths[i]=p,r.heights[i]=y,r.height1=Math.max(r.height1,y),r.width1=Math.max(r.width1,p),c?(r.totalWidth=Math.max(r.totalWidth,p),r.openWidth=r.totalWidth,r.totalHeight+=y+f.gapButton,r.openHeight+=y+f.gapButton):(r.totalWidth+=p+f.gapButton,r.openWidth+=p+f.gapButton,r.totalHeight=Math.max(r.totalHeight,y),r.openHeight=r.totalHeight)})),c?r.totalHeight-=f.gapButton:r.totalWidth-=f.gapButton,r.headerWidth=r.width1+f.arrowPadX,r.headerHeight=r.height1,"dropdown"===t.type&&(c?(r.width1+=f.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=f.arrowPadX),i.remove();var d=r.totalWidth+t.pad.l+t.pad.r,h=r.totalHeight+t.pad.t+t.pad.b,p=e._fullLayout._size;r.lx=p.l+p.w*t.x,r.ly=p.t+p.h*(1-t.y);var v="left";l.isRightAnchor(t)&&(r.lx-=d,v="right"),l.isCenterAnchor(t)&&(r.lx-=d/2,v="center");var g="top";l.isBottomAnchor(t)&&(r.ly-=h,g="bottom"),l.isMiddleAnchor(t)&&(r.ly-=h/2,g="middle"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),a.autoMargin(e,k(t),{x:t.x,y:t.y,l:d*({right:1,center:.5}[v]||0),r:d*({left:1,center:.5}[v]||0),b:h*({top:1,middle:.5}[g]||0),t:h*({bottom:1,middle:.5}[g]||0)})}function k(e){return f.autoMarginIdRoot+e._index}function A(e,t,r,n){n=n||{};var a=e.select("."+f.itemRectClassName),i=e.select("."+f.itemTextClassName),l=t.borderwidth,c=r.index,d=t._dims;o.setTranslate(e,l+r.x,l+r.y);var h=-1!==["up","down"].indexOf(t.direction),p=n.height||(h?d.heights[c]:d.height1);a.attr({x:0,y:0,width:n.width||(h?d.width1:d.widths[c]),height:p});var v=t.font.size*u,g=(s.lineCount(i)-1)*v/2;s.positionText(i,f.textOffsetX,p/2-g+f.textOffsetY),h?r.y+=d.heights[c]+r.yPad:r.x+=d.widths[c]+r.xPad,r.index++}function L(e,t){e.attr(f.menuIndexAttrName,t||"-1").selectAll("g."+f.dropdownButtonClassName).remove()}e.exports=function(e){var t=e._fullLayout,r=l.filterVisible(t[f.name]);function i(t){a.autoMargin(e,k(t))}var o=t._menulayer.selectAll("g."+f.containerClassName).data(r.length>0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(i)})).remove(),0!==r.length){var s=o.selectAll("g."+f.headerGroupClassName).data(r,h);s.enter().append("g").classed(f.headerGroupClassName,!0);for(var c=l.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),u=0;u<r.length;u++){var m=r[u];M(e,m)}var x="updatemenus"+t._uid,b=new d(e,c,x);s.enter().size()&&(c.node().parentNode.appendChild(c.node()),c.call(L)),s.exit().each((function(e){c.call(L),i(e)})).remove(),s.each((function(t){var r=n.select(this),i="dropdown"===t.type?c:null;a.manageCommandObserver(e,t,t.buttons,(function(n){v(e,t,t.buttons[n.index],r,i,b,n.index,!0)})),"dropdown"===t.type?(g(e,r,c,b,t),p(c,t)&&y(e,r,c,b,t)):y(e,r,null,null,t)}))}}},6908:function(e,t,r){"use strict";var n=r(1331);e.exports={moduleType:"component",name:n.name,layoutAttributes:r(8444),supplyLayoutDefaults:r(1384),draw:r(4420)}},7400:function(e,t,r){"use strict";e.exports=l;var n=r(3428),a=r(6308),i=r(3616),o=r(3400);function l(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(e,t,r){var o=this.gd._fullLayout,s=o.width,c=o.height;this.position=e;var u,f,d,h,p=this.position.l,v=this.position.w,g=this.position.t,y=this.position.h,m=this.position.direction,x="down"===m,b="left"===m,_="up"===m,w=v,T=y;x||b||"right"===m||_||(this.position.direction="down",x=!0),x||_?(f=(u=p)+w,x?(d=g,T=(h=Math.min(d+T,c))-d):T=(h=g+T)-(d=Math.max(h-T,0))):(h=(d=g)+T,b?w=(f=p+w)-(u=Math.max(f-w,0)):(u=p,w=(f=Math.min(u+w,s))-u)),this._box={l:u,t:d,w:w,h:T};var M=v>w,k=l.barLength+2*l.barPad,A=l.barWidth+2*l.barPad,L=p,S=g+y;S+A>c&&(S=c-A);var D=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,l.barColor),M?(this.hbar=D.attr({rx:l.barRadius,ry:l.barRadius,x:L,y:S,width:k,height:A}),this._hbarXMin=L+k/2,this._hbarTranslateMax=w-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=y>T,C=l.barWidth+2*l.barPad,P=l.barLength+2*l.barPad,I=p+v,R=g;I+C>s&&(I=s-C);var z=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,l.barColor),O?(this.vbar=z.attr({rx:l.barRadius,ry:l.barRadius,x:I,y:R,width:C,height:P}),this._vbarYMin=R+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var N=this.id,F=u-.5,E=O?f+C+.5:f+.5,H=d-.5,B=M?h+A+.5:h+.5,j=o._topdefs.selectAll("#"+N).data(M||O?[0]:[]);if(j.exit().remove(),j.enter().append("clipPath").attr("id",N).append("rect"),M||O?(this._clipRect=j.select("rect").attr({x:Math.floor(F),y:Math.floor(H),width:Math.ceil(E)-Math.floor(F),height:Math.ceil(B)-Math.floor(H)}),this.container.call(i.setClipUrl,N,this.gd),this.bg.attr({x:p,y:g,width:v,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),M||O){var Y=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(V),O&&this.vbar.on(".drag",null).call(V)}this.setTranslate(t,r)},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-=n.event.dx),this.vbar&&(t-=n.event.dy),this.setTranslate(e,t)},l.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=n.event.deltaY),this.vbar&&(t+=n.event.deltaY),this.setTranslate(e,t)},l.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,a=r+this._hbarTranslateMax;e=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=t+this._vbarYMin,l=i+this._vbarTranslateMax;t=(o.constrain(n.event.y,i,l)-i)/(l-i)*(this.position.h-this._box.h)}this.setTranslate(e,t)},l.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=o.constrain(e||0,0,r),t=o.constrain(t||0,0,n),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/r;this.hbar.call(i.setTranslate,e+a*this._hbarTranslateMax,t)}if(this.vbar){var l=t/n;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,r){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,"("+r+"). 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",r,"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:""}},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,r){"use strict";t.version=r(5788).version,r(8324),r(9288);for(var n=r(4040),a=t.register=n.register,i=r(2448),o=Object.keys(i),l=0;l<o.length;l++){var s=o[l];"_"!==s.charAt(0)&&(t[s]=i[s]),a({moduleType:"apiMethod",name:s,fn:i[s]})}a(r(5875)),a([r(9180),r(6864),r(2676),r(1592),r(7402),r(6908),r(7544),r(9692),r(1152),r(2704),r(4968),r(8932),r(5080),r(2780),r(3024),r(3080)]),a([r(6580),r(1680)]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(a(window.PlotlyLocales),delete window.PlotlyLocales),t.Icons=r(9224);var c=r(3024),u=r(7316);t.Plots={resize:u.resize,graphJson:u.graphJson,sendDataToCloud:u.sendDataToCloud},t.Fx={hover:c.hover,unhover:c.unhover,loneHover:c.loneHover,loneUnhover:c.loneUnhover},t.Snapshot=r(8904),t.PlotSchema=r(3060)},9224:function(e){"use strict";e.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>","<defs>"," <style>"," .cls-0{fill:#000;}"," .cls-1{fill:#FFF;}"," .cls-2{fill:#F26;}"," .cls-3{fill:#D69;}"," .cls-4{fill:#BAC;}"," .cls-5{fill:#9EF;}"," </style>","</defs>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle class='cls-5' cx='102' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='54' r='6'/>"," <circle class='cls-3' cx='54' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='54' r='6'/>"," <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].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,r){"use strict";var n=r(435),a=n.mod,i=n.modHalf,o=Math.PI,l=2*o;function s(e){return Math.abs(e[1]-e[0])>l-1e-14}function c(e,t){return i(t-e,l)}function u(e,t){if(s(t))return!0;var r,n;t[0]<t[1]?(r=t[0],n=t[1]):(r=t[1],n=t[0]),(r=a(r,l))>(n=a(n,l))&&(n+=l);var i=a(e,l),o=i+l;return i>=r&&i<=n||o>=r&&o<=n}function f(e,t,r,n,a,i,c){a=a||0,i=i||0;var u,f,d,h,p,v=s([r,n]);function g(e,t){return[e*Math.cos(t)+a,i-e*Math.sin(t)]}v?(u=0,f=o,d=l):r<n?(u=r,d=n):(u=n,d=r),e<t?(h=e,p=t):(h=t,p=e);var y,m=Math.abs(d-u)<=o?0:1;function x(e,t,r){return"A"+[e,e]+" "+[0,m,r]+" "+g(e,t)}return v?y=null===h?"M"+g(p,u)+x(p,f,0)+x(p,d,0)+"Z":"M"+g(h,u)+x(h,f,0)+x(h,d,0)+"ZM"+g(p,u)+x(p,f,1)+x(p,d,1)+"Z":null===h?(y="M"+g(p,u)+x(p,d,0),c&&(y+="L0,0Z")):y="M"+g(h,u)+"L"+g(p,u)+x(p,d,0)+"L"+g(h,d)+x(h,u,1)+"Z",y}e.exports={deg2rad:function(e){return e/180*o},rad2deg:function(e){return e/o*180},angleDelta:c,angleDist:function(e,t){return Math.abs(c(e,t))},isFullCircle:s,isAngleInsideSector:u,isPtInsideSector:function(e,t,r,n){return!!u(t,n)&&(r[0]<r[1]?(a=r[0],i=r[1]):(a=r[1],i=r[0]),e>=a&&e<=i);var a,i},pathArc:function(e,t,r,n,a){return f(null,e,t,r,n,a,0)},pathSector:function(e,t,r,n,a){return f(null,e,t,r,n,a,1)},pathAnnulus:function(e,t,r,n,a,i){return f(e,t,r,n,a,i,1)}}},8116:function(e,t,r){"use strict";var n=r(3160).decode,a=r(3620),i=Array.isArray,o=ArrayBuffer,l=DataView;function s(e){return o.isView(e)&&!(e instanceof l)}function c(e){return i(e)||s(e)}t.isTypedArray=s,t.isArrayOrTypedArray=c,t.isArray1D=function(e){return!c(e[0])},t.ensureArray=function(e,t){return i(e)||(e=[]),e.length=t,e};var u={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 f(e){return e.constructor===ArrayBuffer}function d(e,t,r){if(c(e)){if(c(e[0])){for(var n=r,a=0;a<e.length;a++)n=t(n,e[a].length);return n}return e.length}return 0}u.uint8c=u.u1c,u.uint8=u.u1,u.int8=u.i1,u.uint16=u.u2,u.int16=u.i2,u.uint32=u.u4,u.int32=u.i4,u.float32=u.f4,u.float64=u.f8,t.isArrayBuffer=f,t.decodeTypedArraySpec=function(e){var t=[],r=function(e){return{bdata:e.bdata,dtype:e.dtype,shape:e.shape}}(e),a=r.dtype,i=u[a];if(!i)throw new Error('Error in dtype: "'+a+'"');var o=i.BYTES_PER_ELEMENT,l=r.bdata;f(l)||(l=n(l));var s=void 0===r.shape?[l.byteLength/o]:(""+r.shape).split(",");s.reverse();var c,d,h=s.length,p=+s[0],v=o*p,g=0;if(1===h)t=new i(l);else if(2===h)for(c=+s[1],d=0;d<c;d++)t[d]=new i(l,g,p),g+=v;else{if(3!==h)throw new Error("ndim: "+h+'is not supported with the shape:"'+r.shape+'"');c=+s[1];for(var y=+s[2],m=0;m<y;m++)for(t[m]=[],d=0;d<c;d++)t[m][d]=new i(l,g,p),g+=v}return t.bdata=r.bdata,t.dtype=r.dtype,t.shape=s.reverse().join(","),e._inputArray=t,t},t.isTypedArraySpec=function(e){return a(e)&&e.hasOwnProperty("dtype")&&"string"==typeof e.dtype&&e.hasOwnProperty("bdata")&&("string"==typeof e.bdata||f(e.bdata))&&(void 0===e.shape||e.hasOwnProperty("shape")&&("string"==typeof e.shape||"number"==typeof e.shape))},t.concat=function(){var e,t,r,n,a,o,l,s,c=[],u=!0,f=0;for(r=0;r<arguments.length;r++)(o=(n=arguments[r]).length)&&(t?c.push(n):(t=n,a=o),i(n)?e=!1:(u=!1,f?e!==n.constructor&&(e=!1):e=n.constructor),f+=o);if(!f)return[];if(!c.length)return t;if(u)return t.concat.apply(t,c);if(e){for((l=new e(f)).set(t),r=0;r<c.length;r++)n=c[r],l.set(n,a),a+=n.length;return l}for(l=new Array(f),s=0;s<t.length;s++)l[s]=t[s];for(r=0;r<c.length;r++){for(n=c[r],s=0;s<n.length;s++)l[a+s]=n[s];a+=s}return l},t.maxRowLength=function(e){return d(e,Math.max,0)},t.minRowLength=function(e){return d(e,Math.min,1/0)}},4037:function(e,t,r){"use strict";var n=r(8248),a=r(9032).BADNUM,i=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;e.exports=function(e){return"string"==typeof e&&(e=e.replace(i,"")),n(e)?Number(e):a}},3696:function(e){"use strict";e.exports=function(e){var t=e._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each((function(e){e.regl&&e.regl.clear({color:!0,depth:!0})}))}},5352:function(e){"use strict";e.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}},3064:function(e,t,r){"use strict";var n=r(8248),a=r(9760),i=r(5464),o=r(8304),l=r(6308),s=r(3448).DESELECTDIM,c=r(2296),u=r(3756).counter,f=r(435).modHalf,d=r(8116).isArrayOrTypedArray,h=r(8116).isTypedArraySpec,p=r(8116).decodeTypedArraySpec;function v(e,r){var n=t.valObjectMeta[r.valType];if(r.arrayOk&&d(e))return!0;if(n.validateFunction)return n.validateFunction(e,r);var a={},i=a,o={set:function(e){i=e}};return n.coerceFunction(e,o,a,r),i!==a}t.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(d(e)?e:h(e)?p(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),-1===n.values.indexOf(e)?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;n<r.length;n++){var a=String(r[n]);if("/"===a.charAt(0)&&"/"===a.charAt(a.length-1)){if(new RegExp(a.substr(1,a.length-2)).test(e))return!0}else if(e===r[n])return!0}return!1}},boolean:{coerceFunction:function(e,t,r){!0===e||!1===e?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,a){!n(e)||void 0!==a.min&&e<a.min||void 0!==a.max&&e>a.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,a){e%1||!n(e)||void 0!==a.min&&e<a.min||void 0!==a.max&&e>a.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var a="number"==typeof e;!0!==n.strict&&a?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){a(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return a(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(o.get(e,r))}},angle:{coerceFunction:function(e,t,r){"auto"===e?t.set("auto"):n(e)?t.set(f(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||u(r);"string"==typeof e&&a.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!u(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if(-1===(n.extras||[]).indexOf(e))if("string"==typeof e){for(var a=e.split("+"),i=0;i<a.length;){var o=a[i];-1===n.flags.indexOf(o)||a.indexOf(o)<i?a.splice(i,1):i++}a.length?t.set(a.join("+")):t.set(r)}else t.set(r);else t.set(e)}},any:{coerceFunction:function(e,t,r){void 0===e?t.set(r):t.set(h(e)?p(e):e)}},info_array:{coerceFunction:function(e,r,n,a){function i(e,r,n){var a,i={set:function(e){a=e}};return void 0===n&&(n=r.dflt),t.valObjectMeta[r.valType].coerceFunction(e,i,n,r),a}if(h(e)&&(e=p(e)),d(e)){var o,l,s,c,u,f,v=2===a.dimensions||"1-2"===a.dimensions&&Array.isArray(e)&&d(e[0]),g=a.items,y=[],m=Array.isArray(g),x=m&&v&&d(g[0]),b=v&&m&&!x,_=m&&!b?g.length:e.length;if(n=Array.isArray(n)?n:[],v)for(o=0;o<_;o++)for(y[o]=[],s=d(e[o])?e[o]:[],u=b?g.length:m?g[o].length:s.length,l=0;l<u;l++)c=b?g[l]:m?g[o][l]:g,void 0!==(f=i(s[l],c,(n[o]||[])[l]))&&(y[o][l]=f);else for(o=0;o<_;o++)void 0!==(f=i(e[o],m?g[o]:g,n[o]))&&(y[o]=f);r.set(y)}else r.set(n)},validateFunction:function(e,t){if(!d(e))return!1;var r=t.items,n=Array.isArray(r),a=2===t.dimensions;if(!t.freeLength&&e.length!==r.length)return!1;for(var i=0;i<e.length;i++)if(a){if(!d(e[i])||!t.freeLength&&e[i].length!==r[i].length)return!1;for(var o=0;o<e[i].length;o++)if(!v(e[i][o],n?r[i][o]:r))return!1}else if(!v(e[i],n?r[i]:r))return!1;return!0}}},t.coerce=function(e,r,n,a,i){var o=c(n,a).get(),l=c(e,a),s=c(r,a),u=l.get(),f=r._template;if(void 0===u&&f&&(u=c(f,a).get(),f=0),void 0===i&&(i=o.dflt),o.arrayOk){if(d(u))return s.set(u),u;if(h(u))return u=p(u),s.set(u),u}var g=t.valObjectMeta[o.valType].coerceFunction;g(u,s,i,o);var y=s.get();return f&&y===i&&!v(u,o)&&(g(u=c(f,a).get(),s,i,o),y=s.get()),y},t.coerce2=function(e,r,n,a,i){var o=c(e,a),l=t.coerce(e,r,n,a,i);return null!=o.get()&&l},t.coerceFont=function(e,t,r){var n={};return r=r||{},n.family=e(t+".family",r.family),n.size=e(t+".size",r.size),n.color=e(t+".color",r.color),n},t.coercePattern=function(e,t,r,n){if(e(t+".shape")){e(t+".solidity"),e(t+".size");var a="overlay"===e(t+".fillmode");if(!n){var i=e(t+".bgcolor",a?r:void 0);e(t+".fgcolor",a?l.contrast(i):r)}e(t+".fgopacity",a?.5:1)}},t.coerceHoverinfo=function(e,r,n){var a,o=r._module.attributes,l=o.hoverinfo?o:i,s=l.hoverinfo;if(1===n._dataLength){var c="all"===s.dflt?s.flags.slice():s.dflt.split("+");c.splice(c.indexOf("name"),1),a=c.join("+")}return t.coerce(e,r,l,"hoverinfo",a)},t.coerceSelectionMarkerOpacity=function(e,t){if(e.marker){var r,n,a=e.marker.opacity;void 0!==a&&(d(a)||e.selected||e.unselected||(r=a,n=s*a),t("selected.marker.opacity",r),t("unselected.marker.opacity",n))}},t.validate=v},7555:function(e,t,r){"use strict";var n,a,i=r(4336).Yn,o=r(8248),l=r(4248),s=r(435).mod,c=r(9032),u=c.BADNUM,f=c.ONEDAY,d=c.ONEHOUR,h=c.ONEMIN,p=c.ONESEC,v=c.EPOCHJD,g=r(4040),y=r(4336).E9,m=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,b=(new Date).getFullYear()-70;function _(e){return e&&g.componentsRegistry.calendars&&"string"==typeof e&&"gregorian"!==e}function w(e,t){return String(e+Math.pow(10,t)).substr(1)}t.dateTick0=function(e,r){var n=function(e,t){return _(e)?t?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:g.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}(e,!!r);if(r<2)return n;var a=t.dateTime2ms(n,e);return a+=f*(r-1),t.ms2DateTime(a,0,e)},t.dfltRange=function(e){return _(e)?g.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]},t.isJSDate=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.getTime},t.dateTime2ms=function(e,r){if(t.isJSDate(e)){var i=e.getTimezoneOffset()*h,o=(e.getUTCMinutes()-e.getMinutes())*h+(e.getUTCSeconds()-e.getSeconds())*p+(e.getUTCMilliseconds()-e.getMilliseconds());if(o){var l=3*h;i=i-l/2+s(o-i+l/2,l)}return(e=Number(e)-i)>=n&&e<=a?e:u}if("string"!=typeof e&&"number"!=typeof e)return u;e=String(e);var c=_(r),y=e.charAt(0);!c||"G"!==y&&"g"!==y||(e=e.substr(1),r="");var w=c&&"chinese"===r.substr(0,7),T=e.match(w?x:m);if(!T)return u;var M=T[1],k=T[3]||"1",A=Number(T[5]||1),L=Number(T[7]||0),S=Number(T[9]||0),D=Number(T[11]||0);if(c){if(2===M.length)return u;var O;M=Number(M);try{var C=g.getComponentMethod("calendars","getCal")(r);if(w){var P="i"===k.charAt(k.length-1);k=parseInt(k,10),O=C.newDate(M,C.toMonthIndex(M,k,P),A)}else O=C.newDate(M,Number(k),A)}catch(e){return u}return O?(O.toJD()-v)*f+L*d+S*h+D*p:u}M=2===M.length?(Number(M)+2e3-b)%100+b:Number(M),k-=1;var I=new Date(Date.UTC(2e3,k,A,L,S));return I.setUTCFullYear(M),I.getUTCMonth()!==k||I.getUTCDate()!==A?u:I.getTime()+D*p},n=t.MIN_MS=t.dateTime2ms("-9999"),a=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(e,r){return t.dateTime2ms(e,r)!==u};var T=90*f,M=3*d,k=5*h;function A(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+w(t,2)+":"+w(r,2),(n||a)&&(e+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;e+="."+w(a,i)}return e}t.ms2DateTime=function(e,t,r){if("number"!=typeof e||!(e>=n&&e<=a))return u;t||(t=0);var i,o,l,c,m,x,b=Math.floor(10*s(e+.05,1)),w=Math.round(e-b/10);if(_(r)){var L=Math.floor(w/f)+v,S=Math.floor(s(e,f));try{i=g.getComponentMethod("calendars","getCal")(r).fromJD(L).formatDate("yyyy-mm-dd")}catch(e){i=y("G%Y-%m-%d")(new Date(w))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=t<T?Math.floor(S/d):0,l=t<T?Math.floor(S%d/h):0,c=t<M?Math.floor(S%h/p):0,m=t<k?S%p*10+b:0}else x=new Date(w),i=y("%Y-%m-%d")(x),o=t<T?x.getUTCHours():0,l=t<T?x.getUTCMinutes():0,c=t<M?x.getUTCSeconds():0,m=t<k?10*x.getUTCMilliseconds()+b:0;return A(i,o,l,c,m)},t.ms2DateTimeLocal=function(e){if(!(e>=n+f&&e<=a-f))return u;var t=Math.floor(10*s(e+.05,1)),r=new Date(Math.round(e-t/10));return A(i("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},t.cleanDate=function(e,r,n){if(e===u)return r;if(t.isJSDate(e)||"number"==typeof e&&isFinite(e)){if(_(n))return l.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(!(e=t.ms2DateTimeLocal(+e))&&void 0!==r)return r}else if(!t.isDateTime(e,n))return l.error("unrecognized date",e),r;return e};var L=/%\d?f/g,S=/%h/g,D={1:"1",2:"1",3:"2",4:"2"};function O(e,t,r,n){e=e.replace(L,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(t+.05));if(e=e.replace(S,(function(){return D[r("%q")(a)]})),_(n))try{e=g.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(e){return"Invalid"}return r(e)(a)}var C=[59,59.9,59.99,59.999,59.9999];t.formatDate=function(e,t,r,n,a,i){if(a=_(a)&&a,!t)if("y"===r)t=i.year;else if("m"===r)t=i.month;else{if("d"!==r)return function(e,t){var r=s(e+.05,f),n=w(Math.floor(r/d),2)+":"+w(s(Math.floor(r/h),60),2);if("M"!==t){o(t)||(t=0);var a=(100+Math.min(s(e/p,60),C[t])).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(e,r)+"\n"+O(i.dayMonthYear,e,n,a);t=i.dayMonth+"\n"+i.year}return O(t,e,n,a)};var P=3*f;t.incrementMonth=function(e,t,r){r=_(r)&&r;var n=s(e,f);if(e=Math.round(e-n),r)try{var a=Math.round(e/f)+v,i=g.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-v)*f+n}catch(t){l.error("invalid ms "+e+" in calendar "+r)}var c=new Date(e+P);return c.setUTCMonth(c.getUTCMonth()+t)+n-P},t.findExactDates=function(e,t){for(var r,n,a=0,i=0,l=0,s=0,c=_(t)&&g.getComponentMethod("calendars","getCal")(t),u=0;u<e.length;u++)if(n=e[u],o(n)){if(!(n%f))if(c)try{1===(r=c.fromJD(n/f+v)).day()?1===r.month()?a++:i++:l++}catch(e){}else 1===(r=new Date(n)).getUTCDate()?0===r.getUTCMonth()?a++:i++:l++}else s++;l+=i+=a;var d=e.length-s;return{exactYears:a/d,exactMonths:i/d,exactDays:l/d}}},2200:function(e,t,r){"use strict";var n=r(3428),a=r(4248),i=r(2248),o=r(6524);function l(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function s(e,t,r){var n="plotly.js-style-"+e,i=document.getElementById(n);i||((i=document.createElement("style")).setAttribute("id",n),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var o=i.sheet;o.insertRule?o.insertRule(t+"{"+r+"}",0):o.addRule?o.addRule(t,r,0):a.warn("addStyleRule failed")}function c(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(e){return+e}))}function u(e){for(var t=[];f(e);)t.push(e),e=e.parentNode;return t}function f(e){return e&&(e instanceof Element||e instanceof HTMLElement)}e.exports={getGraphDiv:function(e){var t;if("string"==typeof e){if(null===(t=document.getElementById(e)))throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}if(null==e)throw new Error("DOM element provided is null or undefined");return e},isPlotDiv:function(e){var t=n.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")},removeElement:l,addStyleRule:function(e,t){s("global",e,t)},addRelatedStyleRule:s,deleteRelatedStyleRule:function(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&l(r)},getFullTransformMatrix:function(e){var t=u(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach((function(e){var t=c(e);if(t){var n=i.convertCssMatrix(t);r=o.multiply(r,r,n)}})),r},getElementTransformMatrix:c,getElementAndAncestors:u,equalDomRects:function(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}}},5924:function(e,t,r){"use strict";var n=r(1252).EventEmitter,a={init:function(e){if(e._ev instanceof n)return e;var t=new n,r=new n;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,a){"undefined"!=typeof jQuery&&jQuery(e).trigger(n,a),t.emit(n,a),r.emit(n,a)},e},triggerHandler:function(e,t,r){var n,a;"undefined"!=typeof jQuery&&(n=jQuery(e).triggerHandler(t,r));var i=e._ev;if(!i)return n;var o,l=i._events[t];if(!l)return n;function s(e){return e.listener?(i.removeListener(t,e.listener),e.fired?void 0:(e.fired=!0,e.listener.apply(i,[r]))):e.apply(i,[r])}for(l=Array.isArray(l)?l:[l],o=0;o<l.length-1;o++)s(l[o]);return a=s(l[o]),void 0!==n?n:a},purge:function(e){return delete e._ev,delete e.on,delete e.once,delete e.removeListener,delete e.removeAllListeners,delete e.emit,delete e._ev,delete e._internalEv,delete e._internalOn,delete e._internalOnce,delete e._removeInternalListener,delete e._removeAllInternalListeners,e}};e.exports=a},2880:function(e,t,r){"use strict";var n=r(3620),a=Array.isArray;function i(e,t,r,o){var l,s,c,u,f,d,h,p=e[0],v=e.length;if(2===v&&a(p)&&a(e[1])&&0===p.length){if(h=function(e,t){var r,n;for(r=0;r<e.length;r++){if(null!==(n=e[r])&&"object"==typeof n)return!1;void 0!==n&&(t[r]=n)}return!0}(e[1],p),h)return p;p.splice(0,p.length)}for(var g=1;g<v;g++)for(s in l=e[g])c=p[s],u=l[s],o&&a(u)?p[s]=u:t&&u&&(n(u)||(f=a(u)))?(f?(f=!1,d=c&&a(c)?c:[]):d=c&&n(c)?c:{},p[s]=i([d,u],t,r,o)):(void 0!==u||r)&&(p[s]=u);return p}t.extendFlat=function(){return i(arguments,!1,!1,!1)},t.extendDeep=function(){return i(arguments,!0,!1,!1)},t.extendDeepAll=function(){return i(arguments,!0,!0,!1)},t.extendDeepNoArrays=function(){return i(arguments,!0,!1,!0)}},8944:function(e){"use strict";e.exports=function(e){for(var t={},r=[],n=0,a=0;a<e.length;a++){var i=e[a];1!==t[i]&&(t[i]=1,r[n++]=i)}return r}},3880:function(e){"use strict";function t(e){return!0===e.visible}function r(e){var t=e[0].trace;return!0===t.visible&&0!==t._length}e.exports=function(e){for(var n,a=(n=e,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:t),i=[],o=0;o<e.length;o++){var l=e[o];a(l)&&i.push(l)}return i}},2348:function(e,t,r){"use strict";var n,a,i,o=r(435).mod;function l(e,t,r,n,a,i,o,l){var s=r-e,c=a-e,u=o-a,f=n-t,d=i-t,h=l-i,p=s*h-u*f;if(0===p)return null;var v=(c*h-u*d)/p,g=(c*f-s*d)/p;return g<0||g>1||v<0||v>1?null:{x:e+s*v,y:t+f*v}}function s(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,l=a-t;return o*o+l*l}var s=n*t-a*e;return s*s/r}t.segmentsIntersect=l,t.segmentDistance=function(e,t,r,n,a,i,o,c){if(l(e,t,r,n,a,i,o,c))return 0;var u=r-e,f=n-t,d=o-a,h=c-i,p=u*u+f*f,v=d*d+h*h,g=Math.min(s(u,f,p,a-e,i-t),s(u,f,p,o-e,c-t),s(d,h,v,e-a,t-i),s(d,h,v,r-a,n-i));return Math.sqrt(g)},t.getTextLocation=function(e,t,r,l){if(e===a&&l===i||(n={},a=e,i=l),n[r])return n[r];var s=e.getPointAtLength(o(r-l/2,t)),c=e.getPointAtLength(o(r+l/2,t)),u=Math.atan((c.y-s.y)/(c.x-s.x)),f=e.getPointAtLength(o(r,t)),d={x:(4*f.x+s.x+c.x)/6,y:(4*f.y+s.y+c.y)/6,theta:u};return n[r]=d,d},t.clearLocationCache=function(){a=null},t.getVisibleSegment=function(e,t,r){var n,a,i=t.left,o=t.right,l=t.top,s=t.bottom,c=0,u=e.getTotalLength(),f=u;function d(t){var r=e.getPointAtLength(t);0===t?n=r:t===u&&(a=r);var c=r.x<i?i-r.x:r.x>o?r.x-o:0,f=r.y<l?l-r.y:r.y>s?r.y-s:0;return Math.sqrt(c*c+f*f)}for(var h=d(c);h;){if((c+=h+r)>f)return;h=d(c)}for(h=d(f);h;){if(c>(f-=h+r))return;h=d(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&&f===u&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},t.findPointOnPath=function(e,t,r,n){for(var a,i,o,l=(n=n||{}).pathLength||e.getTotalLength(),s=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(l)[r]?-1:1,f=0,d=0,h=l;f<c;){if(a=(d+h)/2,o=(i=e.getPointAtLength(a))[r]-t,Math.abs(o)<s)return i;u*o>0?h=a:d=a,f++}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 r=1/Math.abs(t),n=r>1?(r*e+r*t)/r:e+t,a=String(n).length;if(a>16){var i=String(t).length;if(a>=String(e).length+i){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},3400:function(e,t,r){"use strict";var n=r(3428),a=r(4336).E9,i=r(7624).E9,o=r(8248),l=r(9032),s=l.FP_SAFE,c=-s,u=l.BADNUM,f=e.exports={};f.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 d={};f.warnBadFormat=function(e){var t=String(e);d[t]||(d[t]=1,f.warn('encountered bad format: "'+t+'"'))},f.noFormat=function(e){return String(e)},f.numberFormat=function(e){var t;try{t=i(f.adjustFormat(e))}catch(t){return f.warnBadFormat(e),f.noFormat}return t},f.nestedProperty=r(2296),f.keyedContainer=r(7804),f.relativeAttr=r(3193),f.isPlainObject=r(3620),f.toLogRange=r(6896),f.relinkPrivateKeys=r(1528);var h=r(8116);f.isArrayBuffer=h.isArrayBuffer,f.isTypedArray=h.isTypedArray,f.isArrayOrTypedArray=h.isArrayOrTypedArray,f.isArray1D=h.isArray1D,f.ensureArray=h.ensureArray,f.concat=h.concat,f.maxRowLength=h.maxRowLength,f.minRowLength=h.minRowLength;var p=r(435);f.mod=p.mod,f.modHalf=p.modHalf;var v=r(3064);f.valObjectMeta=v.valObjectMeta,f.coerce=v.coerce,f.coerce2=v.coerce2,f.coerceFont=v.coerceFont,f.coercePattern=v.coercePattern,f.coerceHoverinfo=v.coerceHoverinfo,f.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,f.validate=v.validate;var g=r(7555);f.dateTime2ms=g.dateTime2ms,f.isDateTime=g.isDateTime,f.ms2DateTime=g.ms2DateTime,f.ms2DateTimeLocal=g.ms2DateTimeLocal,f.cleanDate=g.cleanDate,f.isJSDate=g.isJSDate,f.formatDate=g.formatDate,f.incrementMonth=g.incrementMonth,f.dateTick0=g.dateTick0,f.dfltRange=g.dfltRange,f.findExactDates=g.findExactDates,f.MIN_MS=g.MIN_MS,f.MAX_MS=g.MAX_MS;var y=r(4952);f.findBin=y.findBin,f.sorterAsc=y.sorterAsc,f.sorterDes=y.sorterDes,f.distinctVals=y.distinctVals,f.roundUp=y.roundUp,f.sort=y.sort,f.findIndexOfMin=y.findIndexOfMin,f.sortObjectKeys=r(2996);var m=r(3084);f.aggNums=m.aggNums,f.len=m.len,f.mean=m.mean,f.median=m.median,f.midRange=m.midRange,f.variance=m.variance,f.stdev=m.stdev,f.interp=m.interp;var x=r(2248);f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(1864);f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=r(8308);f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=r(2348);f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=r(2880);f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var M=r(4248);f.log=M.log,f.warn=M.warn,f.error=M.error;var k=r(3756);f.counterRegex=k.counter;var A=r(1200);f.throttle=A.throttle,f.throttleDone=A.done,f.clearThrottle=A.clear;var L=r(2200);function S(e){var t={};for(var r in e)for(var n=e[r],a=0;a<n.length;a++)t[n[a]]=+r;return t}f.getGraphDiv=L.getGraphDiv,f.isPlotDiv=L.isPlotDiv,f.removeElement=L.removeElement,f.addStyleRule=L.addStyleRule,f.addRelatedStyleRule=L.addRelatedStyleRule,f.deleteRelatedStyleRule=L.deleteRelatedStyleRule,f.getFullTransformMatrix=L.getFullTransformMatrix,f.getElementTransformMatrix=L.getElementTransformMatrix,f.getElementAndAncestors=L.getElementAndAncestors,f.equalDomRects=L.equalDomRects,f.clearResponsive=r(5352),f.preserveDrawingBuffer=r(4296),f.makeTraceGroups=r(988),f._=r(8356),f.notifier=r(1792),f.filterUnique=r(8944),f.filterVisible=r(3880),f.pushUnique=r(2416),f.increment=r(1396),f.cleanNumber=r(4037),f.ensureNumber=function(e){return o(e)?(e=Number(e))>s||e<c?u:e:u},f.isIndex=function(e,t){return!(void 0!==t&&e>=t)&&o(e)&&e>=0&&e%1==0},f.noop=r(6628),f.identity=r(5536),f.repeat=function(e,t){for(var r=new Array(t),n=0;n<t;n++)r[n]=e;return r},f.swapAttrs=function(e,t,r,n){r||(r="x"),n||(n="y");for(var a=0;a<t.length;a++){var i=t[a],o=f.nestedProperty(e,i.replace("?",r)),l=f.nestedProperty(e,i.replace("?",n)),s=o.get();o.set(l.get()),l.set(s)}},f.raiseToTop=function(e){e.parentNode.appendChild(e)},f.cancelTransition=function(e){return e.transition().duration(0)},f.constrain=function(e,t,r){return t>r?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},f.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},f.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),l=0;l<i;l++)o[l]=t(e[l],r,n,a);return o},f.randstr=function e(t,r,n,a){if(n||(n=16),void 0===r&&(r=24),r<=0)return"0";var i,o,l=Math.log(Math.pow(2,r))/Math.log(n),s="";for(i=2;l===1/0;i*=2)l=Math.log(Math.pow(2,r/i))/Math.log(n)*i;var c=l-Math.floor(l);for(i=0;i<Math.floor(l);i++)s=Math.floor(Math.random()*n).toString(n)+s;c&&(o=Math.pow(n,c),s=Math.floor(Math.random()*o).toString(n)+s);var u=parseInt(s,n);return t&&t[s]||u!==1/0&&u>=Math.pow(2,r)?a>10?(f.warn("randstr failed uniqueness"),s):e(t,r,n,(a||0)+1):s},f.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},f.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,a,i,o=e.length,l=2*o,s=2*t-1,c=new Array(s),u=new Array(o);for(r=0;r<s;r++)c[r]=(1-Math.cos(Math.PI*(r+1)/t))/(2*t);for(r=0;r<o;r++){for(i=0,n=0;n<s;n++)(a=r+n+1-t)<-o?a-=l*Math.round(a/l):a>=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=o&&(a=l-1-a),i+=e[a]*c[n];u[r]=i}return u},f.syncOrAsync=function(e,t,r){var n;function a(){return f.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(a);return r&&r(t)},f.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},f.noneOrAll=function(e,t,r){if(e){var n,a=!1,i=!0;for(n=0;n<r.length;n++)null!=e[r[n]]?a=!0:i=!1;if(a&&!i)for(n=0;n<r.length;n++)e[r[n]]=t[r[n]]}},f.mergeArray=function(e,t,r,n){var a="function"==typeof n;if(f.isArrayOrTypedArray(e))for(var i=Math.min(e.length,t.length),o=0;o<i;o++){var l=e[o];t[o][r]=a?n(l):l}},f.mergeArrayCastPositive=function(e,t,r){return f.mergeArray(e,t,r,(function(e){var t=+e;return isFinite(t)&&t>0?t:0}))},f.fillArray=function(e,t,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(e))for(var a=0;a<t.length;a++)t[a][r]=n(e[a])},f.castOption=function(e,t,r,n){n=n||f.identity;var a=f.nestedProperty(e,r).get();return f.isArrayOrTypedArray(a)?Array.isArray(t)&&f.isArrayOrTypedArray(a[t[0]])?n(a[t[0]][t[1]]):n(a[t]):a},f.extractOption=function(e,t,r,n){if(r in e)return e[r];var a=f.nestedProperty(t,n).get();return Array.isArray(a)?void 0:a},f.tagSelected=function(e,t,r){var n,a,i=t.selectedpoints,o=t._indexToPoints;o&&(n=S(o));for(var l=0;l<i.length;l++){var s=i[l];if(f.isIndex(s)||f.isArrayOrTypedArray(s)&&f.isIndex(s[0])&&f.isIndex(s[1])){var c=n?n[s]:s,u=r?r[c]:c;void 0!==(a=u)&&a<e.length&&(e[u].selected=1)}}},f.selIndices2selPoints=function(e){var t=e.selectedpoints,r=e._indexToPoints;if(r){for(var n=S(r),a=[],i=0;i<t.length;i++){var o=t[i];if(f.isIndex(o)){var l=n[o];f.isIndex(l)&&a.push(l)}}return a}return t},f.getTargetArray=function(e,t){var r=t.target;if("string"==typeof r&&r){var n=f.nestedProperty(e,r).get();return!!f.isArrayOrTypedArray(n)&&n}return!!f.isArrayOrTypedArray(r)&&r},f.minExtend=function e(t,r,n){var a={};"object"!=typeof r&&(r={});var i,o,l,s="pieLike"===n?-1:3,c=Object.keys(t);for(i=0;i<c.length;i++)l=t[o=c[i]],"_"!==o.charAt(0)&&"function"!=typeof l&&("module"===o?a[o]=l:Array.isArray(l)?a[o]="colorscale"===o||-1===s?l.slice():l.slice(0,s):f.isTypedArray(l)?a[o]=-1===s?l.subarray():l.subarray(0,s):a[o]=l&&"object"==typeof l?e(t[o],r[o],n):l);for(c=Object.keys(r),i=0;i<c.length;i++)"object"==typeof(l=r[o=c[i]])&&o in a&&"object"==typeof a[o]||(a[o]=l);return a},f.titleCase=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},f.containsAny=function(e,t){for(var r=0;r<t.length;r++)if(-1!==e.indexOf(t[r]))return!0;return!1},f.isIE=function(){return void 0!==window.navigator.msSaveBlob};var D=/Version\/[\d\.]+.*Safari/;f.isSafari=function(){return D.test(window.navigator.userAgent)};var O=/iPad|iPhone|iPod/;f.isIOS=function(){return O.test(window.navigator.userAgent)};var C=/Firefox\/(\d+)\.\d+/;f.getFirefoxVersion=function(){var e=C.exec(window.navigator.userAgent);if(e&&2===e.length){var t=parseInt(e[1]);if(!isNaN(t))return t}return null},f.isD3Selection=function(e){return e instanceof n.selection},f.ensureSingle=function(e,t,r,n){var a=e.select(t+(r?"."+r:""));if(a.size())return a;var i=e.append(t);return r&&i.classed(r,!0),n&&i.call(n),i},f.ensureSingleById=function(e,t,r,n){var a=e.select(t+"#"+r);if(a.size())return a;var i=e.append(t).attr("id",r);return n&&i.call(n),i},f.objectFromPath=function(e,t){for(var r,n=e.split("."),a=r={},i=0;i<n.length;i++){var o=n[i],l=null,s=n[i].match(/(.*)\[([0-9]+)\]/);s?(o=s[1],l=s[2],r=r[o]=[],i===n.length-1?r[l]=t:r[l]={},r=r[l]):(i===n.length-1?r[o]=t:r[o]={},r=r[o])}return a};var P=/^([^\[\.]+)\.(.+)?/,I=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function R(e){return"__"===e.slice(0,2)}f.expandObjectPaths=function(e){var t,r,n,a,i,o,l;if("object"==typeof e&&!Array.isArray(e))for(r in e)if(e.hasOwnProperty(r))if(t=r.match(P)){if(a=e[r],R(n=t[1]))continue;delete e[r],e[n]=f.extendDeepNoArrays(e[n]||{},f.objectFromPath(r,f.expandObjectPaths(a))[n])}else if(t=r.match(I)){if(a=e[r],R(n=t[1]))continue;if(i=parseInt(t[2]),delete e[r],e[n]=e[n]||[],"."===t[3])l=t[4],o=e[n][i]=e[n][i]||{},f.extendDeepNoArrays(o,f.objectFromPath(l,f.expandObjectPaths(a)));else{if(R(n))continue;e[n][i]=f.expandObjectPaths(a)}}else{if(R(r))continue;e[r]=f.expandObjectPaths(e[r])}return e},f.numSeparate=function(e,t,r){if(r||(r=!1),"string"!=typeof t||0===t.length)throw new Error("Separator string required for formatting!");"number"==typeof e&&(e=String(e));var n=/(\d+)(\d{3})/,a=t.charAt(0),i=t.charAt(1),o=e.split("."),l=o[0],s=o.length>1?a+o[1]:"";if(i&&(o.length>1||l.length>4||r))for(;n.test(l);)l=l.replace(n,"$1"+i+"$2");return l+s},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var z=/^\w*$/;f.templateString=function(e,t){var r={};return e.replace(f.TEMPLATE_STRING_REGEX,(function(e,n){var a;return z.test(n)?a=t[n]:(r[n]=r[n]||f.nestedProperty(t,n).get,a=r[n]()),f.isValidTextValue(a)?a:""}))};var N={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return j.apply(N,arguments)};var F={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return j.apply(F,arguments)};var E=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,H={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=function(){return j.apply(H,arguments)};var B=/^[:|\|]/;function j(e,t,r){var n=this,i=arguments;t||(t={});var o={};return e.replace(f.TEMPLATE_STRING_REGEX,(function(e,l,s){var c="_xother"===l||"_yother"===l,u="_xother_"===l||"_yother_"===l,d="xother_"===l||"yother_"===l,h="xother"===l||"yother"===l||c||d||u,p=l;(c||u)&&(p=p.substring(1)),(d||u)&&(p=p.substring(0,p.length-1));var v,g,y,m=null,x=null;if(n.parseMultDiv){var b=function(e){var t=e.match(E);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(p);p=b.key,m=b.op,x=b.number}if(h){if(void 0===(v=t[p]))return""}else for(y=3;y<i.length;y++)if(g=i[y]){if(g.hasOwnProperty(p)){v=g[p];break}if(z.test(p)||(v=f.nestedProperty(g,p).get(),(v=o[p]||f.nestedProperty(g,p).get())&&(o[p]=v)),void 0!==v)break}if(void 0!==v&&("*"===m&&(v*=x),"/"===m&&(v/=x)),void 0===v&&n)return n.count<n.max&&(f.warn("Variable '"+p+"' in "+n.name+" could not be found!"),v=e),n.count===n.max&&f.warn("Too many "+n.name+" warnings - additional warnings will be suppressed"),n.count++,e;if(s){var _;if(":"===s[0]&&(_=r?r.numberFormat:f.numberFormat,""!==v&&(v=_(s.replace(B,""))(v))),"|"===s[0]){_=r?r.timeFormat:a;var w=f.dateTime2ms(v);v=f.formatDate(w,s.replace(B,""),!1,_)}}else{var T=p+"Label";t.hasOwnProperty(T)&&(v=t[T])}return h&&(v="("+v+")",(c||u)&&(v=" "+v),(d||u)&&(v+=" ")),v}))}f.subplotSort=function(e,t){for(var r=Math.min(e.length,t.length)+1,n=0,a=0,i=0;i<r;i++){var o=e.charCodeAt(i)||0,l=t.charCodeAt(i)||0,s=o>=48&&o<=57,c=l>=48&&l<=57;if(s&&(n=10*n+o-48),c&&(a=10*a+l-48),!s||!c){if(n!==a)return n-a;if(o!==l)return o-l}}return a-n};var Y=2e9;f.seedPseudoRandom=function(){Y=2e9},f.pseudoRandom=function(){var e=Y;return Y=(69069*Y+1)%4294967296,Math.abs(Y-e)<429496729?f.pseudoRandom():Y/4294967296},f.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},a=f.extractOption(e,t,"htx","hovertext");if(f.isValidTextValue(a))return n(a);var i=f.extractOption(e,t,"tx","text");return f.isValidTextValue(i)?n(i):void 0},f.isValidTextValue=function(e){return e||0===e},f.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n<t;n++)-1!==r.indexOf(".")&&(r=(r=r.replace("0%","%")).replace(".%","%"));return r},f.isHidden=function(e){var t=window.getComputedStyle(e).display;return!t||"none"===t},f.strTranslate=function(e,t){return e||t?"translate("+e+","+t+")":""},f.strRotate=function(e){return e?"rotate("+e+")":""},f.strScale=function(e){return 1!==e?"scale("+e+")":""},f.getTextTransform=function(e){var t=e.noCenter,r=e.textX,n=e.textY,a=e.targetX,i=e.targetY,o=e.anchorX||0,l=e.anchorY||0,s=e.rotate,c=e.scale;return c?c>1&&(c=1):c=0,f.strTranslate(a-c*(r+o),i-c*(n+l))+f.strScale(c)+(s?"rotate("+s+(t?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(e,t){e.attr("transform",f.getTextTransform(t)),e.style("display",t.scale?null:"none")},f.ensureUniformFontSize=function(e,t){var r=f.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},f.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},f.bigFont=function(e){return Math.round(1.2*e)};var V=f.getFirefoxVersion(),U=null!==V&&V<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.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,r){"use strict";var n=r(2296),a=/^\w*$/;e.exports=function(e,t,r,i){var o,l,s;r=r||"name",i=i||"value";var c={};t&&t.length?(s=n(e,t),l=s.get()):l=e,t=t||"";var u={};if(l)for(o=0;o<l.length;o++)u[l[o][r]]=o;var f=a.test(i),d={set:function(e,t){var a=null===t?4:0;if(!l){if(!s||4===a)return;l=[],s.set(l)}var o=u[e];if(void 0===o){if(4===a)return;a|=3,o=l.length,u[e]=o}else t!==(f?l[o][i]:n(l[o],i).get())&&(a|=2);var h=l[o]=l[o]||{};return h[r]=e,f?h[i]=t:n(h,i).set(t),null!==t&&(a&=-5),c[o]=c[o]|a,d},get:function(e){if(l){var t=u[e];return void 0===t?void 0:f?l[t][i]:n(l[t],i).get()}},rename:function(e,t){var n=u[e];return void 0===n||(c[n]=1|c[n],u[t]=n,delete u[e],l[n][r]=t),d},remove:function(e){var t=u[e];if(void 0===t)return d;var a=l[t];if(Object.keys(a).length>2)return c[t]=2|c[t],d.set(e,null);if(f){for(o=t;o<l.length;o++)c[o]=3|c[o];for(o=t;o<l.length;o++)u[l[o][r]]--;l.splice(t,1),delete u[e]}else n(a,i).set(null),c[t]=6|c[t];return d},constructUpdate:function(){for(var e,a,o={},s=Object.keys(c),u=0;u<s.length;u++)a=s[u],e=t+"["+a+"]",l[a]?(1&c[a]&&(o[e+"."+r]=l[a][r]),2&c[a]&&(o[e+"."+i]=f?4&c[a]?null:l[a][i]:4&c[a]?null:n(l[a],i).get())):o[e]=null;return o}};return d}},8356:function(e,t,r){"use strict";var n=r(4040);e.exports=function(e,t){for(var r=e._context.locale,a=0;a<2;a++){for(var i=e._context.locales,o=0;o<2;o++){var l=(i[r]||{}).dictionary;if(l){var s=l[t];if(s)return s}i=n.localeRegistry}var c=r.split("-")[0];if(c===r)break;r=c}return t}},4248:function(e,t,r){"use strict";var n=r(556).dfltConfig,a=r(1792),i=e.exports={};i.log=function(){var e;if(n.logging>1){var t=["LOG:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(n.notifyOnLogging>1){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);a(r.join("<br>"),"long")}},i.warn=function(){var e;if(n.logging>0){var t=["WARN:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(n.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);a(r.join("<br>"),"stick")}},i.error=function(){var e;if(n.logging>0){var t=["ERROR:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.error.apply(console,t)}if(n.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);a(r.join("<br>"),"stick")}}},988:function(e,t,r){"use strict";var n=r(3428);e.exports=function(e,t,r){var a=e.selectAll("g."+r.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));a.exit().remove(),a.enter().append("g").attr("class",r),a.order();var i=e.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each((function(e){e[0][i]=n.select(this)})),a}},2248:function(e,t,r){"use strict";var n=r(6524);t.init2dArray=function(e,t){for(var r=new Array(e),n=0;n<e;n++)r[n]=new Array(t);return r},t.transposeRagged=function(e){var t,r,n=0,a=e.length;for(t=0;t<a;t++)n=Math.max(n,e[t].length);var i=new Array(n);for(t=0;t<n;t++)for(i[t]=new Array(a),r=0;r<a;r++)i[t][r]=e[r][t];return i},t.dot=function(e,r){if(!e.length||!r.length||e.length!==r.length)return null;var n,a,i=e.length;if(e[0].length)for(n=new Array(i),a=0;a<i;a++)n[a]=t.dot(e[a],r);else if(r[0].length){var o=t.transposeRagged(r);for(n=new Array(o.length),a=0;a<o.length;a++)n[a]=t.dot(e,o[a])}else for(n=0,a=0;a<i;a++)n+=e[a]*r[a];return n},t.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]},t.rotationMatrix=function(e){var t=e*Math.PI/180;return[[Math.cos(t),-Math.sin(t),0],[Math.sin(t),Math.cos(t),0],[0,0,1]]},t.rotationXYMatrix=function(e,r,n){return t.dot(t.dot(t.translationMatrix(r,n),t.rotationMatrix(e)),t.translationMatrix(-r,-n))},t.apply3DTransform=function(e){return function(){var r=arguments,n=1===arguments.length?r[0]:[r[0],r[1],r[2]||0];return t.dot(e,[n[0],n[1],n[2],1]).slice(0,3)}},t.apply2DTransform=function(e){return function(){var r=arguments;3===r.length&&(r=r[0]);var n=1===arguments.length?r[0]:[r[0],r[1]];return t.dot(e,[n[0],n[1],1]).slice(0,2)}},t.apply2DTransform2=function(e){var r=t.apply2DTransform(e);return function(e){return r(e.slice(0,2)).concat(r(e.slice(2,4)))}},t.convertCssMatrix=function(e){if(e){var t=e.length;if(16===t)return e;if(6===t)return[e[0],e[1],0,0,e[2],e[3],0,0,0,0,1,0,e[4],e[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},t.inverseTransformMatrix=function(e){var t=[];return n.invert(t,e),[[t[0],t[1],t[2],t[3]],[t[4],t[5],t[6],t[7]],[t[8],t[9],t[10],t[11]],[t[12],t[13],t[14],t[15]]]}},435:function(e){"use strict";e.exports={mod:function(e,t){var r=e%t;return r<0?r+t:r},modHalf:function(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}}},2296:function(e,t,r){"use strict";var n=r(8248),a=r(8116).isArrayOrTypedArray;function i(e,t){return function(){var r,n,o,l,s,c=e;for(l=0;l<t.length-1;l++){if(-1===(r=t[l])){for(n=!0,o=[],s=0;s<c.length;s++)o[s]=i(c[s],t.slice(l+1))(),o[s]!==o[0]&&(n=!1);return n?o[0]:o}if("number"==typeof r&&!a(c))return;if("object"!=typeof(c=c[r])||null===c)return}if("object"==typeof c&&null!==c&&null!==(o=c[t[l]]))return o}}e.exports=function(e,t){if(n(t))t=String(t);else if("string"!=typeof t||"[-1]"===t.substr(t.length-4))throw"bad property string";var r,a,o,l,c=t.split(".");for(l=0;l<c.length;l++)if("__"===String(c[l]).slice(0,2))throw"bad property string";for(l=0;l<c.length;){if(r=String(c[l]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(r[1])c[l]=r[1];else{if(0!==l)throw"bad property string";c.splice(0,1)}for(a=r[2].substr(1,r[2].length-2).split("]["),o=0;o<a.length;o++)l++,c.splice(l,0,Number(a[o]))}l++}return"object"!=typeof e?function(e,t,r){return{set:function(){throw"bad container"},get:function(){},astr:t,parts:r,obj:e}}(e,t,c):{set:s(e,c,t),get:i(e,c),astr:t,parts:c,obj:e}};var o=/(^|\.)args\[/;function l(e,t){return void 0===e||null===e&&!t.match(o)}function s(e,t,r){return function(n){var i,o,s=e,d="",h=[[e,d]],p=l(n,r);for(o=0;o<t.length-1;o++){if("number"==typeof(i=t[o])&&!a(s))throw"array index but container is not an array";if(-1===i){if(p=!u(s,t.slice(o+1),n,r))break;return}if(!f(s,i,t[o+1],p))break;if("object"!=typeof(s=s[i])||null===s)throw"container is not an object";d=c(d,i),h.push([s,d])}if(p){if(o===t.length-1&&(delete s[t[o]],Array.isArray(s)&&+t[o]==s.length-1))for(;s.length&&void 0===s[s.length-1];)s.pop()}else s[t[o]]=n}}function c(e,t){var r=t;return n(t)?r="["+t+"]":e&&(r="."+t),e+r}function u(e,t,r,n){var i,o=a(r),c=!0,u=r,d=n.replace("-1",0),h=!o&&l(r,d),p=t[0];for(i=0;i<e.length;i++)d=n.replace("-1",i),o&&(h=l(u=r[i%r.length],d)),h&&(c=!1),f(e,i,p,h)&&s(e[i],t,n.replace("-1",i))(u);return c}function f(e,t,r,n){if(void 0===e[t]){if(n)return!1;e[t]="number"==typeof r?[]:{}}return!0}},6628:function(e){"use strict";e.exports=function(){}},1792:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=[];e.exports=function(e,t){if(-1===i.indexOf(e)){i.push(e);var r=1e3;a(t)?r=t:"long"===t&&(r=3e3);var o=n.select("body").selectAll(".plotly-notifier").data([0]);o.enter().append("div").classed("plotly-notifier",!0),o.selectAll(".notifier-note").data(i).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(e){var a=n.select(this);a.append("button").classed("notifier-close",!0).html("&times;").on("click",(function(){a.transition().call(l)}));for(var i=a.append("p"),o=e.split(/<br\s*\/?>/g),s=0;s<o.length;s++)s&&i.append("br"),i.append("span").text(o[s]);"stick"===t?a.transition().duration(350).style("opacity",1):a.transition().duration(700).style("opacity",1).transition().delay(r).call(l)}))}function l(e){e.duration(700).style("opacity",0).each("end",(function(e){var t=i.indexOf(e);-1!==t&&i.splice(t,1),n.select(this).remove()}))}}},2213:function(e,t,r){"use strict";var n=r(3972),a="data-savedcursor";e.exports=function(e,t){var r=e.attr(a);if(t){if(!r){for(var i=(e.attr("class")||"").split(" "),o=0;o<i.length;o++){var l=i[o];0===l.indexOf("cursor-")&&e.attr(a,l.substr(7)).classed(l,!1)}e.attr(a)||e.attr(a,"!!")}n(e,t)}else r&&(e.attr(a,null),"!!"===r?n(e):n(e,r))}},2065:function(e,t,r){"use strict";var n=r(2248).dot,a=r(9032).BADNUM,i=e.exports={};i.tester=function(e){var t,r=e.slice(),n=r[0][0],i=n,o=r[0][1],l=o;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),t=1;t<r.length;t++)n=Math.min(n,r[t][0]),i=Math.max(i,r[t][0]),o=Math.min(o,r[t][1]),l=Math.max(l,r[t][1]);var s,c=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(c=!0,s=function(e){return e[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(c=!0,s=function(e){return e[1]===r[0][1]}));var u=!0,f=r[0];for(t=1;t<r.length;t++)if(f[0]!==r[t][0]||f[1]!==r[t][1]){u=!1;break}return{xmin:n,xmax:i,ymin:o,ymax:l,pts:r,contains:c?function(e,t){var r=e[0],c=e[1];return!(r===a||r<n||r>i||c===a||c<o||c>l||t&&s(e))}:function(e,t){var s=e[0],c=e[1];if(s===a||s<n||s>i||c===a||c<o||c>l)return!1;var u,f,d,h,p,v=r.length,g=r[0][0],y=r[0][1],m=0;for(u=1;u<v;u++)if(f=g,d=y,g=r[u][0],y=r[u][1],!(s<(h=Math.min(f,g))||s>Math.max(f,g)||c>Math.max(d,y)))if(c<Math.min(d,y))s!==h&&m++;else{if(c===(p=g===f?c:d+(s-f)*(y-d)/(g-f)))return 1!==u||!t;c<=p&&s!==h&&m++}return m%2==1},isRect:c,degenerate:u}},i.isSegmentBent=function(e,t,r,a){var i,o,l,s=e[t],c=[e[r][0]-s[0],e[r][1]-s[1]],u=n(c,c),f=Math.sqrt(u),d=[-c[1]/f,c[0]/f];for(i=t+1;i<r;i++)if(o=[e[i][0]-s[0],e[i][1]-s[1]],(l=n(o,c))<0||l>u||Math.abs(n(o,d))>a)return!0;return!1},i.filter=function(e,t){var r=[e[0]],n=0,a=0;function o(o){e.push(o);var l=r.length,s=n;r.splice(a+1);for(var c=s+1;c<e.length;c++)(c===e.length-1||i.isSegmentBent(e,s,c+1,t))&&(r.push(e[c]),r.length<l-2&&(n=c,a=r.length-1),s=c)}return e.length>1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}},4296:function(e,t,r){"use strict";var n=r(8248),a=r(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 r=a({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var i=t.split(" "),o=1;o<i.length;o++)if(-1!==i[o].indexOf("Safari"))for(var l=o-1;l>-1;l--){var s=i[l];if("Version/"===s.substr(0,8)){var c=s.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}return r}},2416:function(e){"use strict";e.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;n<e.length;n++)if(e[n]instanceof RegExp&&e[n].toString()===r)return e;e.push(t)}else!t&&0!==t||-1!==e.indexOf(t)||e.push(t);return e}},4552:function(e,t,r){"use strict";var n=r(3400),a=r(556).dfltConfig,i={add:function(e,t,r,n,i){var o,l;e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},l=e.undoQueue.index,e.autoplay?e.undoQueue.inSequence||(e.autoplay=!1):(!e.undoQueue.sequence||e.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(l,e.undoQueue.queue.length-l,o),e.undoQueue.index+=1):o=e.undoQueue.queue[l-1],e.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(t),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(i)),e.undoQueue.queue.length>a.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,r;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,r=0;r<t.undo.calls.length;r++)i.plotDo(e,t.undo.calls[r],t.undo.args[r]);e.undoQueue.inSequence=!1,e.autoplay=!1}},redo:function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index>=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r<t.redo.calls.length;r++)i.plotDo(e,t.redo.calls[r],t.redo.args[r]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}},plotDo:function(e,t,r){e.autoplay=!0,r=function(e,t){for(var r,a=[],i=0;i<t.length;i++)r=t[i],a[i]=r===e?r:"object"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return a}(e,r),t.apply(null,r)}};e.exports=i},3756:function(e,t){"use strict";t.counter=function(e,t,r,n){var a=(t||"")+(r?"":"$"),i=!1===n?"":"^";return"xy"===e?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+a):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+a)}},3193:function(e){"use strict";var t=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;e.exports=function(e,n){for(;n;){var a=e.match(t);if(a)e=a[1];else{if(!e.match(r))throw new Error("bad relativeAttr call:"+[e,n]);e=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return e&&"["!==n.charAt(0)?e+"."+n:e+n}},1528:function(e,t,r){"use strict";var n=r(8116).isArrayOrTypedArray,a=r(3620);e.exports=function e(t,r){for(var i in r){var o=r[i],l=t[i];if(l!==o)if("_"===i.charAt(0)||"function"==typeof o){if(i in t)continue;t[i]=o}else if(n(o)&&n(l)&&a(o[0])){if("customdata"===i||"ids"===i)continue;for(var s=Math.min(o.length,l.length),c=0;c<s;c++)l[c]!==o[c]&&a(o[c])&&a(l[c])&&e(l[c],o[c])}else a(o)&&a(l)&&(e(l,o),Object.keys(l).length||delete t[i])}}},4952:function(e,t,r){"use strict";var n=r(8248),a=r(4248),i=r(5536),o=r(9032).BADNUM,l=1e-9;function s(e,t){return e<t}function c(e,t){return e<=t}function u(e,t){return e>t}function f(e,t){return e>=t}t.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-l)-1:Math.floor((e-t.start)/t.size+l);var i,o,d=0,h=t.length,p=0,v=h>1?(t[h-1]-t[0])/(h-1):1;for(o=v>=0?r?s:c:r?f:u,e+=v*l*(r?-1:1)*(v>=0?1:-1);d<h&&p++<100;)o(t[i=Math.floor((d+h)/2)],e)?d=i+1:h=i;return p>90&&a.log("Long binary search..."),d-1},t.sorterAsc=function(e,t){return e-t},t.sorterDes=function(e,t){return t-e},t.distinctVals=function(e){var r,n=e.slice();for(n.sort(t.sorterAsc),r=n.length-1;r>-1&&n[r]===o;r--);for(var a,i=n[r]-n[0]||1,l=i/(r||1)/1e4,s=[],c=0;c<=r;c++){var u=n[c],f=u-a;void 0===a?(s.push(u),a=u):f>l&&(i=Math.min(i,f),s.push(u),a=u)}return{vals:s,minDiff:i}},t.roundUp=function(e,t,r){for(var n,a=0,i=t.length-1,o=0,l=r?0:1,s=r?1:0,c=r?Math.ceil:Math.floor;a<i&&o++<100;)t[n=c((a+i)/2)]<=e?a=n+l:i=n-s;return t[a]},t.sort=function(e,t){for(var r=0,n=0,a=1;a<e.length;a++){var i=t(e[a],e[a-1]);if(i<0?r=1:i>0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},t.findIndexOfMin=function(e,t){t=t||i;for(var r,n=1/0,a=0;a<e.length;a++){var o=t(e[a]);o<n&&(n=o,r=a)}return r}},3972:function(e){"use strict";e.exports=function(e,t){(e.attr("class")||"").split(" ").forEach((function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)})),t&&e.classed("cursor-"+t,!0)}},2996:function(e){"use strict";e.exports=function(e){return Object.keys(e).sort()}},3084:function(e,t,r){"use strict";var n=r(8248),a=r(8116).isArrayOrTypedArray;t.aggNums=function(e,r,i,o){var l,s;if((!o||o>i.length)&&(o=i.length),n(r)||(r=!1),a(i[0])){for(s=new Array(o),l=0;l<o;l++)s[l]=t.aggNums(e,r,i[l]);i=s}for(l=0;l<o;l++)n(r)?n(i[l])&&(r=e(+r,+i[l])):r=i[l];return r},t.len=function(e){return t.aggNums((function(e){return e+1}),0,e)},t.mean=function(e,r){return r||(r=t.len(e)),t.aggNums((function(e,t){return e+t}),0,e)/r},t.midRange=function(e){if(void 0!==e&&0!==e.length)return(t.aggNums(Math.max,null,e)+t.aggNums(Math.min,null,e))/2},t.variance=function(e,r,a){return r||(r=t.len(e)),n(a)||(a=t.mean(e,r)),t.aggNums((function(e,t){return e+Math.pow(t-a,2)}),0,e)/r},t.stdev=function(e,r,n){return Math.sqrt(t.variance(e,r,n))},t.median=function(e){var r=e.slice().sort();return t.interp(r,.5)},t.interp=function(e,t){if(!n(t))throw"n should be a finite number";if((t=t*e.length-.5)<0)return e[0];if(t>e.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},2736:function(e,t,r){"use strict";var n=r(3428),a=r(3400),i=a.strTranslate,o=r(9616),l=r(4284).LINE_SPACING,s=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(e,r,g){var L=e.text(),S=!e.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&L.match(s),C=n.select(e.node().parentNode);if(!C.empty()){var P=e.attr("class")?e.attr("class").split(" ")[0]:"text";return P+="-math",C.selectAll("svg."+P).remove(),C.selectAll("g."+P+"-group").remove(),e.style("display",null).attr({"data-unformatted":L,"data-math":"N"}),S?(r&&r._promises||[]).push(new Promise((function(t){e.style("display","none");var r=parseInt(e.node().style.fontSize,10),o={fontSize:r};!function(e,t,r){var i,o,l,s,d=parseInt((MathJax.version||"").split(".")[0]);if(2===d||3===d){var h=function(){var r="math-output-"+a.randstr({},64),i=(s=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(e.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===d?MathJax.Hub.Typeset(i):MathJax.typeset([i])},p=function(){var t=s.select(2===d?".MathJax_SVG":".MathJax"),i=!t.empty()&&s.select("svg").node();if(i){var o,l=i.getBoundingClientRect();o=2===d?n.select("body").select("#MathJax_SVG_glyphs"):t.select("defs"),r(t,o,l)}else a.log("There was an error in the tex syntax.",e),r();s.remove()};2===d?MathJax.Hub.Queue((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:f},displayAlign:"left"})}),(function(){if("SVG"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),h,p,(function(){if("SVG"!==i)return MathJax.Hub.setRenderer(i)}),(function(){return void 0!==l&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(o)})):3===d&&(o=a.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=f,"svg"!==(i=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){h(),p(),"svg"!==i&&(MathJax.config.startup.output=i),MathJax.config=o})))}else a.warn("No MathJax version:",MathJax.version)}(S[2],o,(function(n,a,o){C.selectAll("svg."+P).remove(),C.selectAll("g."+P+"-group").remove();var l=n&&n.select("svg");if(!l||!l.node())return I(),void t();var s=C.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":L,"data-math":"Y"});s.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild);var c=o.width,u=o.height;l.attr({class:P,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=e.node().style.fill||"black",d=l.select("g");d.attr({fill:f,stroke:f});var h=d.node().getBoundingClientRect(),p=h.width,v=h.height;(p>c||v>u)&&(l.style("overflow","hidden"),p=(h=l.node().getBoundingClientRect()).width,v=h.height);var y=+e.attr("x"),m=+e.attr("y"),x=-(r||e.node().getBoundingClientRect().height)/4;if("y"===P[0])s.attr({transform:"rotate("+[-90,y,m]+")"+i(-p/2,x-v/2)});else if("l"===P[0])m=x-v/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))y=0,m=x;else{var b=e.attr("text-anchor");y-=p*("middle"===b?.5:"end"===b?1:0),m=m+x-v/2}l.attr({x:y,y:m}),g&&g.call(e,s),t(s)}))}))):I(),e}function I(){C.empty()||(P=e.attr("class")+"-math",C.select("svg."+P).remove()),e.text("").style("white-space","pre");var r=function(e,t){t=t.replace(y," ");var r,i=!1,s=[],c=-1;function u(){c++;var t=document.createElementNS(o.svg,"tspan");n.select(t).attr({class:"line",dy:c*l+"em"}),e.appendChild(t),r=t;var a=s;if(s=[{node:t}],a.length>1)for(var i=1;i<a.length;i++)f(a[i])}function f(e){var t,a=e.type,i={};if("a"===a){t="a";var l=e.target,c=e.href,u=e.popup;c&&(i={"xlink:xlink:show":"_blank"===l||"_"!==l.charAt(0)?"new":"replace",target:l,"xlink:xlink:href":c},u&&(i.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+u+'");return false;'))}else t="tspan";e.style&&(i.style=e.style);var f=document.createElementNS(o.svg,t);if("sup"===a||"sub"===a){g(r,v),r.appendChild(f);var d=document.createElementNS(o.svg,"tspan");g(d,v),n.select(d).attr("dy",p[a]),i.dy=h[a],r.appendChild(f),r.appendChild(d)}else r.appendChild(f);n.select(f).attr(i),r=e.node=f,s.push(e)}function g(e,t){e.appendChild(document.createTextNode(t))}function L(e){if(1!==s.length){var n=s.pop();e!==n.type&&a.log("Start tag <"+n.type+"> doesnt match end tag <"+e+">. Pretending it did match.",t),r=s[s.length-1].node}else a.log("Ignoring unexpected end tag </"+e+">.",t)}b.test(t)?u():(r=e,s=[{node:e}]);for(var S=t.split(m),C=0;C<S.length;C++){var P=S[C],I=P.match(x),R=I&&I[2].toLowerCase(),z=d[R];if("br"===R)u();else if(void 0===z)g(r,D(P));else if(I[1])L(R);else{var N=I[4],F={type:R},E=k(N,_);if(E?(E=E.replace(A,"$1 fill:"),z&&(E+=";"+z)):z&&(E=z),E&&(F.style=E),"a"===R){i=!0;var H=k(N,w);if(H){var B=O(H);B&&(F.href=B,F.target=k(N,T)||"_blank",F.popup=k(N,M))}}f(F)}}return i}(e.node(),L);r&&e.style("pointer-events","all"),t.positionText(e),g&&g.call(e)}};var c=/(<|&lt;|&#60;)/g,u=/(>|&gt;|&#62;)/g,f=[["$","$"],["\\(","\\)"]],d={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="",g=["http:","https:","mailto:","",void 0,":"],y=t.NEWLINES=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=/<br(\s+.*)?>/i;t.BR_TAG_ALL=/<br(\s+.*)?>/gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,M=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&D(n)}var A=/(^|;)\s*color:/;t.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],a=e.split(m),i=[],o="",l=0,s=0;s<a.length;s++){var c=a[s],u=c.match(x),f=u&&u[2].toLowerCase();if(f)-1!==n.indexOf(f)&&(i.push(c),o=f);else{var d=c.length;if(l+d<r)i.push(c),l+=d;else if(l<r){var h=r-l;o&&("br"!==o||h<=3||d<=3)&&i.pop(),r>3?i.push(c.substr(0,h-3)+"..."):i.push(c.substr(0,h));break}o=""}}return i.join("")};var L={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function D(e){return e.replace(S,(function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):L[t])||e}))}function O(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var a=r.protocol,i=n.protocol;return-1!==g.indexOf(a)&&-1!==g.indexOf(i)?t:""}function C(e,t,r){var n,i,o,l=r.horizontalAlign,s=r.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return i="bottom"===s?function(){return c.bottom-n.height}:"middle"===s?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="right"===l?function(){return c.right-n.width}:"center"===l?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var e=o()-u.left,t=i()-u.top,l=r.gd||{};if(r.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=D,t.sanitizeHTML=function(e){e=e.replace(y," ");for(var t=document.createElement("p"),r=t,a=[],i=e.split(m),o=0;o<i.length;o++){var l=i[o],s=l.match(x),c=s&&s[2].toLowerCase();if(c in d)if(s[1])a.length&&(r=a.pop());else{var u=s[4],f=k(u,_),h=f?{style:f}:{};if("a"===c){var p=k(u,w);if(p){var v=O(p);if(v){h.href=v;var g=k(u,T);g&&(h.target=g)}}}var b=document.createElement(c);r.appendChild(b),n.select(b).attr(h),r=b,a.push(b)}else r.appendChild(document.createTextNode(D(l)))}return t.innerHTML},t.lineCount=function(e){return e.selectAll("tspan.line").size()||1},t.positionText=function(e,t,r){return e.each((function(){var e=n.select(this);function a(t,r){return void 0===r?null===(r=e.attr(t))&&(e.attr(t,0),r=0):e.attr(t,r),r}var i=a("x",t),o=a("y",r);"text"===this.nodeName&&e.selectAll("tspan.line").attr({x:i,y:o})}))};var P="1px ";t.makeTextShadow=function(e){return P+P+P+e+", -"+P+"-"+P+P+e+", "+P+"-"+P+P+e+", -"+P+P+P+e},t.makeEditable=function(e,t){var r=t.gd,a=t.delegate,i=n.dispatch("edit","input","cancel"),o=a||e;if(e.style({"pointer-events":a?"none":"all"}),1!==e.size())throw new Error("boo");function l(){var a,l,c,u,f;a=n.select(r).select(".svg-container"),l=a.append("div"),c=e.node().style,u=parseFloat(c.fontSize||12),void 0===(f=t.text)&&(f=e.attr("data-unformatted")),l.classed("plugin-editable editable",!0).style({position:"absolute","font-family":c.fontFamily||"Arial","font-size":u,color:t.fill||c.fill||"black",opacity:1,"background-color":t.background||"transparent",outline:"#ffffff33 1px solid",margin:[-u/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(f).call(C(e,a,t)).on("blur",(function(){r._editing=!1,e.text(this.textContent).style({opacity:1});var t,a=n.select(this).attr("class");(t=a?"."+a.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(e.node().parentNode).select(t).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),i.edit.call(e,o)})).on("focus",(function(){var e=this;r._editing=!0,n.select(document).on("mouseup",(function(){if(n.event.target===e)return!1;document.activeElement===l.node()&&l.node().blur()}))})).on("keyup",(function(){27===n.event.which?(r._editing=!1,e.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),i.cancel.call(e,this.textContent)):(i.input.call(e,this.textContent),n.select(this).call(C(e,a,t)))})).on("keydown",(function(){13===n.event.which&&this.blur()})).call(s),e.style({opacity:0});var d,h=o.attr("class");(d=h?"."+h.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(e.node().parentNode).select(d).style({opacity:0})}function s(e){var t=e.node(),r=document.createRange();r.selectNodeContents(t);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),t.focus()}return t.immediate?l():o.on("click",l),n.rebind(e,i,"on")}},1200:function(e,t){"use strict";var r={};function n(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}t.throttle=function(e,t,a){var i=r[e],o=Date.now();if(!i){for(var l in r)r[l].ts<o-6e4&&delete r[l];i=r[e]={ts:0,timer:null}}function s(){a(),i.ts=Date.now(),i.onDone&&(i.onDone(),i.onDone=null)}n(i),o>i.ts+t?s():i.timer=setTimeout((function(){s(),i.timer=null}),t)},t.done=function(e){var t=r[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},t.clear=function(e){if(e)n(r[e]),delete r[e];else for(var a in r)t.clear(a)}},6896:function(e,t,r){"use strict";var n=r(8248);e.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var r=Math.log(Math.min(t[0],t[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),r}},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,r){"use strict";var n=r(4040);e.exports=function(e){for(var t,r,a=n.layoutArrayContainers,i=n.layoutArrayRegexes,o=e.split("[")[0],l=0;l<i.length;l++)if((r=e.match(i[l]))&&0===r.index){t=r[0];break}if(t||(t=a[a.indexOf(o)]),!t)return!1;var s=e.substr(t.length);return s?!!(r=s.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:t,index:Number(r[1]),property:r[3]||""}:{array:t,index:"",property:""}}},7824:function(e,t,r){"use strict";var n=r(2880).extendFlat,a=r(3620),i={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},o={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},l=i.flags.slice().concat(["fullReplot"]),s=o.flags.slice().concat("layoutReplot");function c(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!1;return t}function u(e,t,r){var i=n({},e);for(var o in i){var l=i[o];a(l)&&(i[o]=f(l,t,0,o))}return"from-root"===r&&(i.editType=t),i}function f(e,t,r,a){if(e.valType){var i=n({},e);if(i.editType=t,Array.isArray(e.items)){i.items=new Array(e.items.length);for(var o=0;o<e.items.length;o++)i.items[o]=f(e.items[o],t)}return i}return u(e,t,"_"===a.charAt(0)?"nested":"from-root")}e.exports={traces:i,layout:o,traceFlags:function(){return c(l)},layoutFlags:function(){return c(s)},update:function(e,t){var r=t.editType;if(r&&"none"!==r)for(var n=r.split("+"),a=0;a<n.length;a++)e[n[a]]=!0},overrideAll:u}},3404:function(e,t,r){"use strict";var n=r(8248),a=r(1784),i=r(4040),o=r(3400),l=r(7316),s=r(9811),c=r(6308),u=s.cleanId,f=s.getFromTrace,d=i.traceIs;function h(e,t){var r=e[t],n=t.charAt(0);r&&"paper"!==r&&(e[t]=u(r,n,!0))}function p(e){function t(t,r){var n=e[t],a=e.title&&e.title[r];n&&!a&&(e.title||(e.title={}),e.title[r]=e[t],delete e[t])}e&&("string"!=typeof e.title&&"number"!=typeof e.title||(e.title={text:e.title}),t("titlefont","font"),t("titleposition","position"),t("titleside","side"),t("titleoffset","offset"))}function v(e){if(!o.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,("string"==typeof t||"number"==typeof t)&&String(t)}function g(e,t,r,n){if(r&&!n)return e;if(n&&!r)return t;if(!e.trim())return t;if(!t.trim())return e;var a,i=Math.min(e.length,t.length);for(a=0;a<i&&e.charAt(a)===t.charAt(a);a++);return e.substr(0,a).trim()}function y(e){var t="middle",r="center";return"string"==typeof e&&(-1!==e.indexOf("top")?t="top":-1!==e.indexOf("bottom")&&(t="bottom"),-1!==e.indexOf("left")?r="left":-1!==e.indexOf("right")&&(r="right")),t+" "+r}function m(e,t){return t in e&&"object"==typeof e[t]&&0===Object.keys(e[t]).length}t.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},t.cleanLayout=function(e){var r,n;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,f=(l.subplotsRegistry.ternary||{}).attrRegex,d=(l.subplotsRegistry.gl3d||{}).attrRegex,v=Object.keys(e);for(r=0;r<v.length;r++){var g=v[r];if(i&&i.test(g)){var y=e[g];y.anchor&&"free"!==y.anchor&&(y.anchor=u(y.anchor)),y.overlaying&&(y.overlaying=u(y.overlaying)),y.type||(y.isdate?y.type="date":y.islog?y.type="log":!1===y.isdate&&!1===y.islog&&(y.type="linear")),"withzero"!==y.autorange&&"tozero"!==y.autorange||(y.autorange=!0,y.rangemode="tozero"),y.insiderange&&delete y.range,delete y.islog,delete y.isdate,delete y.categories,m(y,"domain")&&delete y.domain,void 0!==y.autotick&&(void 0===y.tickmode&&(y.tickmode=y.autotick?"auto":"linear"),delete y.autotick),p(y)}else if(s&&s.test(g))p(e[g].radialaxis);else if(f&&f.test(g)){var x=e[g];p(x.aaxis),p(x.baxis),p(x.caxis)}else if(d&&d.test(g)){var b=e[g],_=b.cameraposition;if(Array.isArray(_)&&4===_[0].length){var w=_[0],T=_[1],M=_[2],k=a([],w),A=[];for(n=0;n<3;++n)A[n]=T[n]+M*k[2+4*n];b.camera={eye:{x:A[0],y:A[1],z:A[2]},center:{x:T[0],y:T[1],z:T[2]},up:{x:0,y:0,z:1}},delete b.cameraposition}p(b.xaxis),p(b.yaxis),p(b.zaxis)}}var L=Array.isArray(e.annotations)?e.annotations.length:0;for(r=0;r<L;r++){var S=e.annotations[r];o.isPlainObject(S)&&(S.ref&&("paper"===S.ref?(S.xref="paper",S.yref="paper"):"data"===S.ref&&(S.xref="x",S.yref="y"),delete S.ref),h(S,"xref"),h(S,"yref"))}var D=Array.isArray(e.shapes)?e.shapes.length:0;for(r=0;r<D;r++){var O=e.shapes[r];o.isPlainObject(O)&&(h(O,"xref"),h(O,"yref"))}var C=Array.isArray(e.images)?e.images.length:0;for(r=0;r<C;r++){var P=e.images[r];o.isPlainObject(P)&&(h(P,"xref"),h(P,"yref"))}var I=e.legend;return I&&(I.x>3?(I.x=1.02,I.xanchor="left"):I.x<-2&&(I.x=-.02,I.xanchor="right"),I.y>3?(I.y=1.02,I.yanchor="bottom"):I.y<-2&&(I.y=-.02,I.yanchor="top")),p(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),c.clean(e),e.template&&e.template.layout&&t.cleanLayout(e.template.layout),e},t.cleanData=function(e){for(var r=0;r<e.length;r++){var n,a=e[r];if("histogramy"===a.type&&"xbins"in a&&!("ybins"in a)&&(a.ybins=a.xbins,delete a.xbins),a.error_y&&"opacity"in a.error_y){var s=c.defaults,f=a.error_y.color||(d(a,"bar")?c.defaultLine:s[r%s.length]);a.error_y.color=c.addOpacity(c.rgb(f),c.opacity(f)*a.error_y.opacity),delete a.error_y.opacity}if("bardir"in a&&("h"!==a.bardir||!d(a,"bar")&&"histogram"!==a.type.substr(0,9)||(a.orientation="h",t.swapXYData(a)),delete a.bardir),"histogramy"===a.type&&t.swapXYData(a),"histogramx"!==a.type&&"histogramy"!==a.type||(a.type="histogram"),"scl"in a&&!("colorscale"in a)&&(a.colorscale=a.scl,delete a.scl),"reversescl"in a&&!("reversescale"in a)&&(a.reversescale=a.reversescl,delete a.reversescl),a.xaxis&&(a.xaxis=u(a.xaxis,"x")),a.yaxis&&(a.yaxis=u(a.yaxis,"y")),d(a,"gl3d")&&a.scene&&(a.scene=l.subplotsRegistry.gl3d.cleanId(a.scene)),!d(a,"pie-like")&&!d(a,"bar-like"))if(Array.isArray(a.textposition))for(n=0;n<a.textposition.length;n++)a.textposition[n]=y(a.textposition[n]);else a.textposition&&(a.textposition=y(a.textposition));var h=i.getModule(a);if(h&&h.colorbar){var x=h.colorbar.container,b=x?a[x]:a;b&&b.colorscale&&("YIGnBu"===b.colorscale&&(b.colorscale="YlGnBu"),"YIOrRd"===b.colorscale&&(b.colorscale="YlOrRd"))}if("surface"===a.type&&o.isPlainObject(a.contours)){var _=["x","y","z"];for(n=0;n<_.length;n++){var w=a.contours[_[n]];o.isPlainObject(w)&&(w.highlightColor&&(w.highlightcolor=w.highlightColor,delete w.highlightColor),w.highlightWidth&&(w.highlightwidth=w.highlightWidth,delete w.highlightWidth))}}if("candlestick"===a.type||"ohlc"===a.type){var T=!1!==(a.increasing||{}).showlegend,M=!1!==(a.decreasing||{}).showlegend,k=v(a.increasing),A=v(a.decreasing);if(!1!==k&&!1!==A){var L=g(k,A,T,M);L&&(a.name=L)}else!k&&!A||a.name||(a.name=k||A)}if(Array.isArray(a.transforms)){var S=a.transforms;for(n=0;n<S.length;n++){var D=S[n];if(o.isPlainObject(D))switch(D.type){case"filter":D.filtersrc&&(D.target=D.filtersrc,delete D.filtersrc),D.calendar&&(D.valuecalendar||(D.valuecalendar=D.calendar),delete D.calendar);break;case"groupby":if(D.styles=D.styles||D.style,D.styles&&!Array.isArray(D.styles)){var O=D.styles,C=Object.keys(O);D.styles=[];for(var P=0;P<C.length;P++)D.styles.push({target:C[P],value:O[C[P]]})}}}}m(a,"line")&&delete a.line,"marker"in a&&(m(a.marker,"line")&&delete a.marker.line,m(a,"marker")&&delete a.marker),c.clean(a),a.autobinx&&(delete a.autobinx,delete a.xbins),a.autobiny&&(delete a.autobiny,delete a.ybins),p(a),a.colorbar&&p(a.colorbar),a.marker&&a.marker.colorbar&&p(a.marker.colorbar),a.line&&a.line.colorbar&&p(a.line.colorbar),a.aaxis&&p(a.aaxis),a.baxis&&p(a.baxis)}},t.swapXYData=function(e){var t;if(o.swapAttrs(e,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(e.z)&&Array.isArray(e.z[0])&&(e.transpose?delete e.transpose:e.transpose=!0),e.error_x&&e.error_y){var r=e.error_y,n="copy_ystyle"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);o.swapAttrs(e,["error_?.copy_ystyle"]),n&&o.swapAttrs(e,["error_?.color","error_?.thickness","error_?.width"])}if("string"==typeof e.hoverinfo){var a=e.hoverinfo.split("+");for(t=0;t<a.length;t++)"x"===a[t]?a[t]="y":"y"===a[t]&&(a[t]="x");e.hoverinfo=a.join("+")}},t.coerceTraceIndices=function(e,t){if(n(t))return[t];if(!Array.isArray(t)||!t.length)return e.data.map((function(e,t){return t}));if(Array.isArray(t)){for(var r=[],a=0;a<t.length;a++)o.isIndex(t[a],e.data.length)?r.push(t[a]):o.warn("trace index (",t[a],") is not a number or is out of bounds");return r}return t},t.manageArrayContainers=function(e,t,r){var a=e.obj,i=e.parts,l=i.length,s=i[l-1],c=n(s);if(c&&null===t){var u=i.slice(0,l-1).join(".");o.nestedProperty(a,u).get().splice(s,1)}else c&&void 0===e.get()?(void 0===e.get()&&(r[e.astr]=null),e.set(t)):e.set(t)};var x=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function b(e){var t=e.search(x);if(t>0)return e.substr(0,t)}t.hasParent=function(e,t){for(var r=b(t);r;){if(r in e)return!0;r=b(r)}return!1};var _=["x","y","z"];t.clearAxisTypes=function(e,t,r){for(var n=0;n<t.length;n++)for(var a=e._fullData[n],i=0;i<3;i++){var l=f(e,a,_[i]);if(l&&"log"!==l.type){var s=l._name,c=l._id.substr(1);if("scene"===c.substr(0,5)){if(void 0!==r[c])continue;s=c+"."+s}var u=s+".type";void 0===r[s]&&void 0===r[u]&&o.nestedProperty(e.layout,u).set(null)}}}},2448:function(e,t,r){"use strict";var n=r(6424);t._doPlot=n._doPlot,t.newPlot=n.newPlot,t.restyle=n.restyle,t.relayout=n.relayout,t.redraw=n.redraw,t.update=n.update,t._guiRestyle=n._guiRestyle,t._guiRelayout=n._guiRelayout,t._guiUpdate=n._guiUpdate,t._storeDirectGUIEdit=n._storeDirectGUIEdit,t.react=n.react,t.extendTraces=n.extendTraces,t.prependTraces=n.prependTraces,t.addTraces=n.addTraces,t.deleteTraces=n.deleteTraces,t.moveTraces=n.moveTraces,t.purge=n.purge,t.addFrames=n.addFrames,t.deleteFrames=n.deleteFrames,t.animate=n.animate,t.setPlotConfig=n.setPlotConfig;var a=r(2200).getGraphDiv,i=r(4016).eraseActiveShape;t.deleteActiveShape=function(e){return i(a(e))},t.toImage=r(7024),t.validate=r(1480),t.downloadImage=r(7412);var o=r(4828);t.makeTemplate=o.makeTemplate,t.validateTemplate=o.validateTemplate},7680:function(e,t,r){"use strict";var n=r(3620),a=r(6628),i=r(4248),o=r(4952).sorterAsc,l=r(4040);t.containerArrayMatch=r(9820);var s=t.isAddVal=function(e){return"add"===e||n(e)},c=t.isRemoveVal=function(e){return null===e||"remove"===e};t.applyContainerArrayChanges=function(e,t,r,n,u){var f=t.astr,d=l.getComponentMethod(f,"supplyLayoutDefaults"),h=l.getComponentMethod(f,"draw"),p=l.getComponentMethod(f,"drawOne"),v=n.replot||n.recalc||d===a||h===a,g=e.layout,y=e._fullLayout;if(r[""]){Object.keys(r).length>1&&i.warn("Full array edits are incompatible with other edits",f);var m=r[""][""];if(c(m))t.set(null);else{if(!Array.isArray(m))return i.warn("Unrecognized full array edit value",f,m),!0;t.set(m)}return!v&&(d(g,y),h(e),!0)}var x,b,_,w,T,M,k,A,L=Object.keys(r).map(Number).sort(o),S=t.get(),D=S||[],O=u(y,f).get(),C=[],P=-1,I=D.length;for(x=0;x<L.length;x++)if(w=r[_=L[x]],T=Object.keys(w),M=w[""],k=s(M),_<0||_>D.length-(k?0:1))i.warn("index out of range",f,_);else if(void 0!==M)T.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",f,_),c(M)?C.push(_):k?("add"===M&&(M={}),D.splice(_,0,M),O&&O.splice(_,0,{})):i.warn("Unrecognized full object edit value",f,_,M),-1===P&&(P=_);else for(b=0;b<T.length;b++)A=f+"["+_+"].",u(D[_],T[b],A).set(w[T[b]]);for(x=C.length-1;x>=0;x--)D.splice(C[x],1),O&&O.splice(C[x],1);if(D.length?S||t.set(D):t.set(null),v)return!1;if(d(g,y),p!==a){var R;if(-1===P)R=L;else{for(I=Math.max(D.length,I),R=[],x=0;x<L.length&&!((_=L[x])>=P);x++)R.push(_);for(x=P;x<I;x++)R.push(x)}for(x=0;x<R.length;x++)p(e,R[x])}else h(e);return!0}},6424:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=r(2264),o=r(3400),l=o.nestedProperty,s=r(5924),c=r(4552),u=r(4040),f=r(3060),d=r(7316),h=r(4460),p=r(6312),v=r(4724),g=r(3616),y=r(6308),m=r(2464).initInteractions,x=r(9616),b=r(2676).clearOutline,_=r(556).dfltConfig,w=r(7680),T=r(3404),M=r(9172),k=r(7824),A=r(3816).AX_NAME_PATTERN,L=0;function S(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function D(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){o.error(e)}}function O(e,t){D(e,y.combine(t,"white"))}function C(e,t){if(!e._context){e._context=o.extendDeep({},_);var r=n.select("base");e._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var a,l,s,c=e._context;if(t){for(l=Object.keys(t),a=0;a<l.length;a++)"editable"!==(s=l[a])&&"edits"!==s&&s in c&&("setBackground"===s&&"opaque"===t[s]?c[s]=O:c[s]=t[s]);t.plot3dPixelRatio&&!c.plotGlPixelRatio&&(c.plotGlPixelRatio=c.plot3dPixelRatio);var u=t.editable;if(void 0!==u)for(c.editable=u,l=Object.keys(c.edits),a=0;a<l.length;a++)c.edits[l[a]]=u;if(t.edits)for(l=Object.keys(t.edits),a=0;a<l.length;a++)(s=l[a])in c.edits&&(c.edits[s]=t.edits[s]);c._exportedPlot=t._exportedPlot}c.staticPlot&&(c.editable=!1,c.edits={},c.autosizable=!1,c.scrollZoom=!1,c.doubleClick=!1,c.showTips=!1,c.showLink=!1,c.displayModeBar=!1),"hover"!==c.displayModeBar||i||(c.displayModeBar=!0),"transparent"!==c.setBackground&&"function"==typeof c.setBackground||(c.setBackground=D),c._hasZeroHeight=c._hasZeroHeight||0===e.clientHeight,c._hasZeroWidth=c._hasZeroWidth||0===e.clientWidth;var f=c.scrollZoom,d=c._scrollZoom={};if(!0===f)d.cartesian=1,d.gl3d=1,d.geo=1,d.mapbox=1;else if("string"==typeof f){var h=f.split("+");for(a=0;a<h.length;a++)d[h[a]]=1}else!1!==f&&(d.gl3d=1,d.geo=1,d.mapbox=1)}function P(e,t){var r,n,a=t+1,i=[];for(r=0;r<e.length;r++)(n=e[r])<0?i.push(a+n):i.push(n);return i}function I(e,t,r){var n,a;for(n=0;n<t.length;n++){if((a=t[n])!==parseInt(a,10))throw new Error("all values in "+r+" must be integers");if(a>=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+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 "+r+" must be unique.")}}function R(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),I(e,t,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&I(e,r,"newIndices"),void 0!==r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function z(e,t,r,n,i){!function(e,t,r,n){var a=o.isPlainObject(n);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(void 0===r)throw new Error("indices must be an integer or array of integers");for(var i in I(e,r,"indices"),t){if(!Array.isArray(t[i])||t[i].length!==r.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in n)||!Array.isArray(n[i])||n[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,r,n);for(var s=function(e,t,r,n){var i,s,c,u,f,d=o.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=P(r,e.data.length-1),t)for(var v=0;v<r.length;v++){if(i=e.data[r[v]],s=(c=l(i,p)).get(),u=t[p][v],!o.isArrayOrTypedArray(u))throw new Error("attribute: "+p+" index: "+v+" must be an array");if(!o.isArrayOrTypedArray(s))throw new Error("cannot extend missing or non-array attribute: "+p);if(s.constructor!==u.constructor)throw new Error("cannot extend array with an array of a different type: "+p);f=d?n[p][v]:n,a(f)||(f=-1),h.push({prop:c,target:s,insert:u,maxp:Math.floor(f)})}return h}(e,t,r,n),c={},u={},f=0;f<s.length;f++){var d=s[f].prop,h=s[f].maxp,p=i(s[f].target,s[f].insert,h);d.set(p[0]),Array.isArray(c[d.astr])||(c[d.astr]=[]),c[d.astr].push(p[1]),Array.isArray(u[d.astr])||(u[d.astr]=[]),u[d.astr].push(s[f].target.length)}return{update:c,maxPoints:u}}function N(e,t){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}function F(e,r,n,a){e=o.getGraphDiv(e),T.clearPromiseQueue(e);var i={};if("string"==typeof r)i[r]=n;else{if(!o.isPlainObject(r))return o.warn("Restyle fail.",r,n,a),Promise.reject();i=o.extendFlat({},r),void 0===a&&(a=n)}Object.keys(i).length&&(e.changed=!0);var l=T.coerceTraceIndices(e,a),s=j(e,i,l),u=s.flags;u.calc&&(e.calcdata=void 0),u.clearAxisTypes&&T.clearAxisTypes(e,l,{});var f=[];u.fullReplot?f.push(t._doPlot):(f.push(d.previousPromises),d.supplyDefaults(e),u.markerSize&&(d.doCalcdata(e),q(f)),u.style&&f.push(M.doTraceStyle),u.colorbars&&f.push(M.doColorBars),f.push(S)),f.push(d.rehover,d.redrag,d.reselect),c.add(e,F,[e,s.undoit,s.traces],F,[e,s.redoit,s.traces]);var h=o.syncOrAsync(f,e);return h&&h.then||(h=Promise.resolve()),h.then((function(){return e.emit("plotly_restyle",s.eventData),e}))}function E(e){return void 0===e?null:e}function H(e,t){return t?function(t,r,n){var a=l(t,r),i=a.set;return a.set=function(t){B((n||"")+r,a.get(),t,e),i(t)},a}:l}function B(e,t,r,n){if(Array.isArray(t)||Array.isArray(r))for(var a=Array.isArray(t)?t:[],i=Array.isArray(r)?r:[],l=Math.max(a.length,i.length),s=0;s<l;s++)B(e+"["+s+"]",a[s],i[s],n);else if(o.isPlainObject(t)||o.isPlainObject(r)){var c=o.isPlainObject(t)?t:{},u=o.isPlainObject(r)?r:{},f=o.extendFlat({},c,u);for(var d in f)B(e+"."+d,c[d],u[d],n)}else void 0===n[e]&&(n[e]=E(t))}function j(e,t,r){var n,a=e._fullLayout,i=e._fullData,s=e.data,c=a._guiEditing,p=H(a._preGUI,c),v=o.extendDeepAll({},t);Y(t);var g,y=k.traceFlags(),m={},x={};function b(){return r.map((function(){}))}function _(e){var t=h.id2name(e);-1===g.indexOf(t)&&g.push(t)}function w(e){return"LAYOUT"+e+".autorange"}function M(e){return"LAYOUT"+e+".range"}function A(e){for(var t=e;t<i.length;t++)if(i[t]._input===s[e])return i[t]}function L(n,i,o){if(Array.isArray(n))n.forEach((function(e){L(e,i,o)}));else if(!(n in t)&&!T.hasParent(t,n)){var l;if("LAYOUT"===n.substr(0,6))l=p(e.layout,n.replace("LAYOUT",""));else{var u=r[o];l=H(a._tracePreGUI[A(u)._fullInput.uid],c)(s[u],n)}n in x||(x[n]=b()),void 0===x[n][o]&&(x[n][o]=E(l.get())),void 0!==i&&l.set(i)}}function S(e){return function(t){return i[t][e]}}function D(e){return function(t,n){return!1===t?i[r[n]][e]:null}}for(var O in t){if(T.hasParent(t,O))throw new Error("cannot set "+O+" and a parent attribute simultaneously");var C,P,I,R,z,N,F=t[O];if("autobinx"!==O&&"autobiny"!==O||(O=O.charAt(O.length-1)+"bins",F=Array.isArray(F)?F.map(D(O)):!1===F?r.map(S(O)):null),m[O]=F,"LAYOUT"!==O.substr(0,6)){for(x[O]=b(),n=0;n<r.length;n++)if(C=s[r[n]],P=A(r[n]),R=(I=H(a._tracePreGUI[P._fullInput.uid],c)(C,O)).get(),void 0!==(z=Array.isArray(F)?F[n%F.length]:F)){var B=I.parts[I.parts.length-1],j=O.substr(0,O.length-B.length-1),V=j?j+".":"",U=j?l(P,j).get():P;if((N=f.getTraceValObject(P,I.parts))&&N.impliedEdits&&null!==z)for(var q in N.impliedEdits)L(o.relativeAttr(O,q),N.impliedEdits[q],n);else if("thicknessmode"!==B&&"lenmode"!==B||R===z||"fraction"!==z&&"pixels"!==z||!U){if("type"===O&&("pie"===z!=("pie"===R)||"funnelarea"===z!=("funnelarea"===R))){var G="x",Z="y";"bar"!==z&&"bar"!==R||"h"!==C.orientation||(G="y",Z="x"),o.swapAttrs(C,["?","?src"],"labels",G),o.swapAttrs(C,["d?","?0"],"label",G),o.swapAttrs(C,["?","?src"],"values",Z),"pie"===R||"funnelarea"===R?(l(C,"marker.color").set(l(C,"marker.colors").get()),a._pielayer.selectAll("g.trace").remove()):u.traceIs(C,"cartesian")&&l(C,"marker.colors").set(l(C,"marker.color").get())}}else{var W=a._size,X=U.orient,J="top"===X||"bottom"===X;if("thicknessmode"===B){var K=J?W.h:W.w;L(V+"thickness",U.thickness*("fraction"===z?1/K:K),n)}else{var Q=J?W.w:W.h;L(V+"len",U.len*("fraction"===z?1/Q:Q),n)}}if(x[O][n]=E(R),-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(O)){if("orientation"===O){I.set(z);var $=C.x&&!C.y?"h":"v";if((I.get()||$)===P.orientation)continue}else"orientationaxes"===O&&(C.orientation={v:"h",h:"v"}[P.orientation]);T.swapXYData(C),y.calc=y.clearAxisTypes=!0}else-1!==d.dataArrayContainers.indexOf(I.parts[0])?(T.manageArrayContainers(I,z,x),y.calc=!0):(N?N.arrayOk&&!u.traceIs(P,"regl")&&(o.isArrayOrTypedArray(z)||o.isArrayOrTypedArray(R))?y.calc=!0:k.update(y,N):y.calc=!0,I.set(z))}if(-1!==["swapxyaxes","orientationaxes"].indexOf(O)&&h.swap(e,r),"orientationaxes"===O){var ee=l(e.layout,"hovermode"),te=ee.get();"x"===te?ee.set("y"):"y"===te?ee.set("x"):"x unified"===te?ee.set("y unified"):"y unified"===te&&ee.set("x unified")}if(-1!==["orientation","type"].indexOf(O)){for(g=[],n=0;n<r.length;n++){var re=s[r[n]];u.traceIs(re,"cartesian")&&(_(re.xaxis||"x"),_(re.yaxis||"y"))}L(g.map(w),!0,0),L(g.map(M),[0,1],0)}}else I=p(e.layout,O.replace("LAYOUT","")),x[O]=[E(I.get())],I.set(Array.isArray(F)?F[0]:F),y.calc=!0}return(y.calc||y.plot)&&(y.fullReplot=!0),{flags:y,undoit:x,redoit:m,traces:r,eventData:o.extendDeepNoArrays([],[v,r])}}function Y(e){var t,r,n,a=o.counterRegex("axis",".title",!1,!1),i=/colorbar\.title$/,l=Object.keys(e);for(t=0;t<l.length;t++)r=l[t],n=e[r],"title"!==r&&!a.test(r)&&!i.test(r)||"string"!=typeof n&&"number"!=typeof n?r.indexOf("titlefont")>-1&&-1===r.indexOf("grouptitlefont")?s(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?s(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?s(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&s(r,r.replace("titleoffset","title.offset")):s(r,r.replace("title","title.text"));function s(t,r){e[r]=e[t],delete e[t]}}function V(e,t,r){e=o.getGraphDiv(e),T.clearPromiseQueue(e);var n={};if("string"==typeof t)n[t]=r;else{if(!o.isPlainObject(t))return o.warn("Relayout fail.",t,r),Promise.reject();n=o.extendFlat({},t)}Object.keys(n).length&&(e.changed=!0);var a=X(e,n),i=a.flags;i.calc&&(e.calcdata=void 0);var l=[d.previousPromises];i.layoutReplot?l.push(M.layoutReplot):Object.keys(n).length&&(U(e,i,a)||d.supplyDefaults(e),i.legend&&l.push(M.doLegend),i.layoutstyle&&l.push(M.layoutStyles),i.axrange&&q(l,a.rangesAltered),i.ticks&&l.push(M.doTicksRelayout),i.modebar&&l.push(M.doModeBar),i.camera&&l.push(M.doCamera),i.colorbars&&l.push(M.doColorBars),l.push(S)),l.push(d.rehover,d.redrag,d.reselect),c.add(e,V,[e,a.undoit],V,[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 U(e,t,r){var n,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(n,a,v,e,t)},c={};for(var u in r.rangesAltered){var f=h.id2name(u);if(n=e.layout[f],a=i[f],p(n,a,s,c),a._matchGroup)for(var d in a._matchGroup)if(d!==u){var g=i[h.id2name(d)];g.autorange=a.autorange,g.range=a.range.slice(),g._input.range=a.range.slice()}}return!0}function q(e,t){var r=t?function(e){var r=[];for(var n in t){var a=h.getFromId(e,n);if(r.push(n),-1!==(a.ticklabelposition||"").indexOf("inside")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var i in a._matchGroup)t[i]||r.push(i)}return h.draw(e,r,{skipTitle:!0})}:function(e){return h.draw(e,"redraw")};e.push(b,M.doAutoRangeAndConstraints,r,M.drawData,M.finalDraw)}var G=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Z=/^[xyz]axis[0-9]*\.autorange$/,W=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(e,t){var r,n,a,i=e.layout,s=e._fullLayout,c=s._guiEditing,d=H(s._preGUI,c),p=Object.keys(t),v=h.list(e),g=o.extendDeepAll({},t),y={};for(Y(t),p=Object.keys(t),n=0;n<p.length;n++)if(0===p[n].indexOf("allaxes")){for(a=0;a<v.length;a++){var m=v[a]._id.substr(1),x=-1!==m.indexOf("scene")?m+".":"",b=p[n].replace("allaxes",x+v[a]._name);t[b]||(t[b]=t[p[n]])}delete t[p[n]]}var _=k.layoutFlags(),M={},L={};function S(e,r){if(Array.isArray(e))e.forEach((function(e){S(e,r)}));else if(!(e in t)&&!T.hasParent(t,e)){var n=d(i,e);e in L||(L[e]=E(n.get())),void 0!==r&&n.set(r)}}var D,O={};function C(e){var t=h.name2id(e.split(".")[0]);return O[t]=1,t}for(var P in t){if(T.hasParent(t,P))throw new Error("cannot set "+P+" and a parent attribute simultaneously");for(var I=d(i,P),R=t[P],z=I.parts.length-1;z>0&&"string"!=typeof I.parts[z];)z--;var N=I.parts[z],F=I.parts[z-1]+"."+N,B=I.parts.slice(0,z).join("."),j=l(e.layout,B).get(),V=l(s,B).get(),U=I.get();if(void 0!==R){M[P]=R,L[P]="reverse"===N?R:E(U);var q=f.getLayoutValObject(s,I.parts);if(q&&q.impliedEdits&&null!==R)for(var X in q.impliedEdits)S(o.relativeAttr(P,X),q.impliedEdits[X]);if(-1!==["width","height"].indexOf(P))if(R){S("autosize",null);var K="height"===P?"width":"height";S(K,s[K])}else s[P]=e._initialAutoSize[P];else if("autosize"===P)S("width",R?null:s.width),S("height",R?null:s.height);else if(F.match(G))C(F),l(s,B+"._inputRange").set(null);else if(F.match(Z)){C(F),l(s,B+"._inputRange").set(null);var Q=l(s,B).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else F.match(W)&&l(s,B+"._inputDomain").set(null);if("type"===N){D=j;var $="linear"===V.type&&"log"===R,ee="log"===V.type&&"linear"===R;if($||ee){if(D&&D.range)if(V.autorange)$&&(D.range=D.range[1]>D.range[0]?[1,2]:[2,1]);else{var te=D.range[0],re=D.range[1];$?(te<=0&&re<=0&&S(B+".autorange",!0),te<=0?te=re/1e6:re<=0&&(re=te/1e6),S(B+".range[0]",Math.log(te)/Math.LN10),S(B+".range[1]",Math.log(re)/Math.LN10)):(S(B+".range[0]",Math.pow(10,te)),S(B+".range[1]",Math.pow(10,re)))}else S(B+".autorange",!0);Array.isArray(s._subplots.polar)&&s._subplots.polar.length&&s[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete s[I.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(e,V,R,S),u.getComponentMethod("images","convertCoords")(e,V,R,S)}else S(B+".autorange",!0),S(B+".range",null);l(s,B+"._inputRange").set(null)}else if(N.match(A)){var ne=l(s,P).get(),ae=(R||{}).type;ae&&"-"!==ae||(ae="linear"),u.getComponentMethod("annotations","convertCoords")(e,ne,ae,S),u.getComponentMethod("images","convertCoords")(e,ne,ae,S)}var ie=w.containerArrayMatch(P);if(ie){r=ie.array,n=ie.index;var oe=ie.property,le=q||{editType:"calc"};""!==n&&""===oe&&(w.isAddVal(R)?L[P]=null:w.isRemoveVal(R)?L[P]=(l(i,r).get()||[])[n]:o.warn("unrecognized full object value",t)),k.update(_,le),y[r]||(y[r]={});var se=y[r][n];se||(se=y[r][n]={}),se[oe]=R,delete t[P]}else"reverse"===N?(j.range?j.range.reverse():(S(B+".autorange",!0),j.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):("dragmode"===P&&(!1===R&&!1!==U||!1!==R&&!1===U)||s._has("scatter-like")&&s._has("regl")&&"dragmode"===P&&("lasso"===R||"select"===R)&&"lasso"!==U&&"select"!==U||s._has("gl2d")?_.plot=!0:q?k.update(_,q):_.calc=!0,I.set(R))}}for(r in y)w.applyContainerArrayChanges(e,d(i,r),y[r],_,d)||(_.plot=!0);for(var ce in O){var ue=(D=h.getFromId(e,ce))&&D._constraintGroup;if(ue)for(var fe in _.calc=!0,ue)O[fe]||(h.getFromId(e,fe)._constraintShrinkable=!0)}(J(e)||t.height||t.width)&&(_.plot=!0);var de=s.shapes;for(n=0;n<de.length;n++)if(de[n].showlegend){_.calc=!0;break}return(_.plot||_.calc)&&(_.layoutReplot=!0),{flags:_,rangesAltered:O,undoit:L,redoit:M,eventData:g}}function J(e){var t=e._fullLayout,r=t.width,n=t.height;return e.layout.autosize&&d.plotAutoSize(e,e.layout,t),t.width!==r||t.height!==n}function K(e,r,n,a){e=o.getGraphDiv(e),T.clearPromiseQueue(e),o.isPlainObject(r)||(r={}),o.isPlainObject(n)||(n={}),Object.keys(r).length&&(e.changed=!0),Object.keys(n).length&&(e.changed=!0);var i=T.coerceTraceIndices(e,a),l=j(e,o.extendFlat({},r),i),s=l.flags,u=X(e,o.extendFlat({},n)),f=u.flags;(s.calc||f.calc)&&(e.calcdata=void 0),s.clearAxisTypes&&T.clearAxisTypes(e,i,n);var h=[];f.layoutReplot?h.push(M.layoutReplot):s.fullReplot?h.push(t._doPlot):(h.push(d.previousPromises),U(e,f,u)||d.supplyDefaults(e),s.style&&h.push(M.doTraceStyle),(s.colorbars||f.colorbars)&&h.push(M.doColorBars),f.legend&&h.push(M.doLegend),f.layoutstyle&&h.push(M.layoutStyles),f.axrange&&q(h,u.rangesAltered),f.ticks&&h.push(M.doTicksRelayout),f.modebar&&h.push(M.doModeBar),f.camera&&h.push(M.doCamera),h.push(S)),h.push(d.rehover,d.redrag,d.reselect),c.add(e,K,[e,l.undoit,u.undoit,l.traces],K,[e,l.redoit,u.redoit,l.traces]);var p=o.syncOrAsync(h,e);return p&&p.then||(p=Promise.resolve(e)),p.then((function(){return e.emit("plotly_update",{data:l.eventData,layout:u.eventData}),e}))}function Q(e){return function(t){t._fullLayout._guiEditing=!0;var r=e.apply(null,arguments);return t._fullLayout._guiEditing=!1,r}}var $=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],ee=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function te(e,t){for(var r=0;r<t.length;r++){var n=t[r],a=e.match(n.pattern);if(a){var i=a[1]||"";return{head:i,tail:e.substr(i.length+1),attr:n.attr}}}}function re(e,t){var r=l(t,e).get();if(void 0!==r)return r;var n=e.split(".");for(n.pop();n.length>1;)if(n.pop(),void 0!==(r=l(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ne(e,t){for(var r=0;r<t.length;r++)if(t[r]._fullInput.uid===e)return r;return-1}function ae(e,t,r){for(var n=0;n<t.length;n++)if(t[n].uid===e)return n;return!t[r]||t[r].uid?-1:r}function ie(e,t){var r=o.isPlainObject(e),n=Array.isArray(e);return r||n?(r&&o.isPlainObject(t)||n&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function oe(e,t,r,n){var a,i,s,c=n.getValObject,u=n.flags,f=n.immutable,d=n.inArray,h=n.arrayIndex;function p(){var e=a.editType;d&&-1!==e.indexOf("arraydraw")?o.pushUnique(u.arrays[d],h):(k.update(u,a),"none"!==e&&u.nChanges++,n.transition&&a.anim&&u.nChangesAnim++,(G.test(s)||Z.test(s))&&(u.rangesAltered[r[0]]=1),W.test(s)&&l(t,"_inputDomain").set(null),"datarevision"===i&&(u.newDataRevision=1))}function v(e){return"data_array"===e.valType||e.arrayOk}for(i in e){if(u.calc&&!n.transition)return;var g=e[i],y=t[i],m=r.concat(i);if(s=m.join("."),"_"!==i.charAt(0)&&"function"!=typeof g&&g!==y){if(("tick0"===i||"dtick"===i)&&"geo"!==r[0]){var x=t.tickmode;if("auto"===x||"array"===x||!x)continue}if(("range"!==i||!t.autorange)&&("zmin"!==i&&"zmax"!==i||"contourcarpet"!==t.type)&&(a=c(m))&&(!a._compareAsJSON||JSON.stringify(g)!==JSON.stringify(y))){var b,_=a.valType,w=v(a),T=Array.isArray(g),M=Array.isArray(y);if(T&&M){var A="_input_"+i,L=e[A],S=t[A];if(Array.isArray(L)&&L===S)continue}if(void 0===y)w&&T?u.calc=!0:p();else if(a._isLinkedToArray){var D=[],O=!1;d||(u.arrays[i]=D);var C=Math.min(g.length,y.length),P=Math.max(g.length,y.length);if(C!==P){if("arraydraw"!==a.editType){p();continue}O=!0}for(b=0;b<C;b++)oe(g[b],y[b],m.concat(b),o.extendFlat({inArray:i,arrayIndex:b},n));if(O)for(b=C;b<P;b++)D.push(b)}else!_&&o.isPlainObject(g)?oe(g,y,m,n):w?T&&M?(f&&(u.calc=!0),(f||n.newDataRevision)&&p()):T!==M?u.calc=!0:p():T&&M&&g.length===y.length&&String(g)===String(y)||p()}}}for(i in t)if(!(i in e)&&"_"!==i.charAt(0)&&"function"!=typeof t[i]){if(v(a=c(r.concat(i)))&&Array.isArray(t[i]))return void(u.calc=!0);p()}}function le(e,t){var r;for(r in e)if("_"!==r.charAt(0)){var n=e[r],a=t[r];if(n!==a)if(o.isPlainObject(n)&&o.isPlainObject(a)){if(le(n,a))return!0}else{if(!Array.isArray(n)||!Array.isArray(a))return!0;if(n.length!==a.length)return!0;for(var i=0;i<n.length;i++)if(n[i]!==a[i]){if(!o.isPlainObject(n[i])||!o.isPlainObject(a[i]))return!0;if(le(n[i],a[i]))return!0}}}}function se(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!o.equalDomRects(r,t._lastBBox)){var n=t._invTransform=o.inverseTransformMatrix(o.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}t.animate=function(e,t,r){if(e=o.getGraphDiv(e),!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var n=e._transitionData;n._frameQueue||(n._frameQueue=[]);var a=(r=d.supplyAnimationDefaults(r)).transition,i=r.frame;function l(e){return Array.isArray(a)?e>=a.length?a[0]:a[e]:a}function s(e){return Array.isArray(i)?e>=i.length?i[0]:i[e]:i}function c(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(i,u){function f(){e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var t=function(){n._animationRaf=window.requestAnimationFrame(t),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,d.transition(e,t.frame.data,t.frame.layout,T.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};t()}var h,p,v=0;function g(e){return Array.isArray(a)?v>=a.length?e.transitionOpts=a[v]:e.transitionOpts=a[0]:e.transitionOpts=a,v++,e}var y=[],m=null==t,x=Array.isArray(t);if(m||x||!o.isPlainObject(t)){if(m||-1!==["string","number"].indexOf(typeof t))for(h=0;h<n._frames.length;h++)(p=n._frames[h])&&(m||String(p.group)===String(t))&&y.push({type:"byname",name:String(p.name),data:g({name:p.name})});else if(x)for(h=0;h<t.length;h++){var b=t[h];-1!==["number","string"].indexOf(typeof b)?(b=String(b),y.push({type:"byname",name:b,data:g({name:b})})):o.isPlainObject(b)&&y.push({type:"object",data:g(o.extendFlat({},b))})}}else y.push({type:"object",data:g(o.extendFlat({},t))});for(h=0;h<y.length;h++)if("byname"===(p=y[h]).type&&!n._frameHash[p.data.name])return o.warn('animate failure: frame not found: "'+p.data.name+'"'),void u();-1!==["next","immediate"].indexOf(r.mode)&&function(){if(0!==n._frameQueue.length){for(;n._frameQueue.length;){var t=n._frameQueue.pop();t.onInterrupt&&t.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}(),"reverse"===r.direction&&y.reverse();var _=e._fullLayout._currentFrame;if(_&&r.fromcurrent){var w=-1;for(h=0;h<y.length;h++)if("byname"===(p=y[h]).type&&p.name===_){w=h;break}if(w>0&&w<y.length-1){var M=[];for(h=0;h<y.length;h++)p=y[h],("byname"!==y[h].type||h>w)&&M.push(p);y=M}}y.length>0?function(t){if(0!==t.length){for(var a=0;a<t.length;a++){var o;o="byname"===t[a].type?d.computeFrame(e,t[a].name):t[a].data;var h=s(a),p=l(a);p.duration=Math.min(p.duration,h.duration);var v={frame:o,name:t[a].name,frameOpts:h,transitionOpts:p};a===t.length-1&&(v.onComplete=c(i,2),v.onInterrupt=u),n._frameQueue.push(v)}"immediate"===r.mode&&(n._lastFrameAt=-1/0),n._animationRaf||f()}}(y):(e.emit("plotly_animated"),i())}))},t.addFrames=function(e,t,r){if(e=o.getGraphDiv(e),null==t)return Promise.resolve();if(!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,a,i,l,s=e._transitionData._frames,u=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var f=s.length+2*t.length,h=[],p={};for(n=t.length-1;n>=0;n--)if(o.isPlainObject(t[n])){var v=t[n].name,g=(u[v]||p[v]||{}).name,y=t[n].name,m=u[g]||p[g];g&&y&&"number"==typeof y&&m&&L<5&&(L++,o.warn('addFrames: overwriting frame "'+(u[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===L&&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:d.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}h.sort((function(e,t){return e.index>t.index?-1:e.index<t.index?1:0}));var x=[],b=[],_=s.length;for(n=h.length-1;n>=0;n--){if("number"==typeof(a=h[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+e._transitionData._counter++];);if(u[a.name]){for(i=0;i<s.length&&(s[i]||{}).name!==a.name;i++);x.push({type:"replace",index:i,value:a}),b.unshift({type:"replace",index:i,value:s[i]})}else l=Math.max(0,Math.min(h[n].index,_)),x.push({type:"insert",index:l,value:a}),b.unshift({type:"delete",index:l}),_++}var w=d.modifyFrames,T=d.modifyFrames,M=[e,b],k=[e,x];return c&&c.add(e,w,M,T,k),d.modifyFrames(e,x)},t.deleteFrames=function(e,t){if(e=o.getGraphDiv(e),!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);var r,n,a=e._transitionData._frames,i=[],l=[];if(!t)for(t=[],r=0;r<a.length;r++)t.push(r);for((t=t.slice()).sort(),r=t.length-1;r>=0;r--)n=t[r],i.push({type:"delete",index:n}),l.unshift({type:"insert",index:n,value:a[n]});var s=d.modifyFrames,u=d.modifyFrames,f=[e,l],h=[e,i];return c&&c.add(e,s,f,u,h),d.modifyFrames(e,i)},t.addTraces=function e(r,n,a){r=o.getGraphDiv(r);var i,l,s=[],u=t.deleteTraces,f=e,d=[r,s],h=[r,n];for(function(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n<t.length;n++)if("object"!=typeof(a=t[n])||Array.isArray(a)||null===a)throw new Error("all values in traces array must be non-array objects");if(void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&r.length!==t.length)throw new Error("if indices is specified, traces.length must equal indices.length")}(r,n,a),Array.isArray(n)||(n=[n]),n=n.map((function(e){return o.extendFlat({},e)})),T.cleanData(n),i=0;i<n.length;i++)r.data.push(n[i]);for(i=0;i<n.length;i++)s.push(-n.length+i);if(void 0===a)return l=t.redraw(r),c.add(r,u,d,f,h),l;Array.isArray(a)||(a=[a]);try{R(r,s,a)}catch(e){throw r.data.splice(r.data.length-n.length,n.length),e}return c.startSequence(r),c.add(r,u,d,f,h),l=t.moveTraces(r,s,a),c.stopSequence(r),l},t.deleteTraces=function e(r,n){r=o.getGraphDiv(r);var a,i,l=[],s=t.addTraces,u=e,f=[r,l,n],d=[r,n];if(void 0===n)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(n)||(n=[n]),I(r,n,"indices"),(n=P(n,r.data.length-1)).sort(o.sorterDes),a=0;a<n.length;a+=1)i=r.data.splice(n[a],1)[0],l.push(i);var h=t.redraw(r);return c.add(r,s,f,u,d),h},t.extendTraces=function e(r,n,a,i){var l=z(r=o.getGraphDiv(r),n,a,i,(function(e,t,r){var n,a;if(o.isTypedArray(e))if(r<0){var i=new e.constructor(0),l=N(e,t);r<0?(n=l,a=i):(n=i,a=l)}else if(n=new e.constructor(r),a=new e.constructor(e.length+t.length-r),r===t.length)n.set(t),a.set(e);else if(r<t.length){var s=t.length-r;n.set(t.subarray(s)),a.set(e),a.set(t.subarray(0,s),e.length)}else{var c=r-t.length,u=e.length-c;n.set(e.subarray(u)),n.set(t,c),a.set(e.subarray(0,u))}else n=e.concat(t),a=r>=0&&r<n.length?n.splice(0,n.length-r):[];return[n,a]})),s=t.redraw(r),u=[r,l.update,a,l.maxPoints];return c.add(r,t.prependTraces,u,e,arguments),s},t.moveTraces=function e(r,n,a){var i,l=[],s=[],u=e,f=e,d=[r=o.getGraphDiv(r),a,n],h=[r,n,a];if(R(r,n,a),n=Array.isArray(n)?n:[n],void 0===a)for(a=[],i=0;i<n.length;i++)a.push(-n.length+i);for(a=Array.isArray(a)?a:[a],n=P(n,r.data.length-1),a=P(a,r.data.length-1),i=0;i<r.data.length;i++)-1===n.indexOf(i)&&l.push(r.data[i]);for(i=0;i<n.length;i++)s.push({newIndex:a[i],trace:r.data[n[i]]});for(s.sort((function(e,t){return e.newIndex-t.newIndex})),i=0;i<s.length;i+=1)l.splice(s[i].newIndex,0,s[i].trace);r.data=l;var p=t.redraw(r);return c.add(r,u,d,f,h),p},t.prependTraces=function e(r,n,a,i){var l=z(r=o.getGraphDiv(r),n,a,i,(function(e,t,r){var n,a;if(o.isTypedArray(e))if(r<=0){var i=new e.constructor(0),l=N(t,e);r<0?(n=l,a=i):(n=i,a=l)}else if(n=new e.constructor(r),a=new e.constructor(e.length+t.length-r),r===t.length)n.set(t),a.set(e);else if(r<t.length){var s=t.length-r;n.set(t.subarray(0,s)),a.set(t.subarray(s)),a.set(e,s)}else{var c=r-t.length;n.set(t),n.set(e.subarray(0,c),t.length),a.set(e.subarray(c))}else n=t.concat(e),a=r>=0&&r<n.length?n.splice(r,n.length):[];return[n,a]})),s=t.redraw(r),u=[r,l.update,a,l.maxPoints];return c.add(r,t.extendTraces,u,e,arguments),s},t.newPlot=function(e,r,n,a){return e=o.getGraphDiv(e),d.cleanPlot([],{},e._fullData||[],e._fullLayout||{}),d.purge(e),t._doPlot(e,r,n,a)},t._doPlot=function(e,r,a,i){var l;if(e=o.getGraphDiv(e),s.init(e),o.isPlainObject(r)){var c=r;r=c.data,a=c.layout,i=c.config,l=c.frames}if(!1===s.triggerHandler(e,"plotly_beforeplot",[r,a,i]))return Promise.reject();r||a||o.isPlotDiv(e)||o.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e),C(e,i),a||(a={}),n.select(e).classed("js-plotly-plot",!0),g.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var f=0===(e.data||[]).length&&Array.isArray(r);Array.isArray(r)&&(T.cleanData(r),f?e.data=r:e.data.push.apply(e.data,r),e.empty=!1),e.layout&&!f||(e.layout=T.cleanLayout(a)),d.supplyDefaults(e);var p=e._fullLayout,v=p._has("cartesian");p._replotting=!0,(f||p._shouldCreateBgLayer)&&(function(e){var t=n.select(e),r=e._fullLayout;if(r._calcInverseTransform=se,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var a={};n.selectAll("defs").each((function(){this.id&&(a[this.id.split("-")[1]]=1)})),r._uid=o.randstr(a)}r._paperdiv.selectAll(".main-svg").attr(x.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var l=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=l.append("g").classed("imagelayer",!0),r._shapeUpperLayer=l.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}(e),p._shouldCreateBgLayer&&delete p._shouldCreateBgLayer),g.initGradients(e),g.initPatterns(e),f&&h.saveShowSpikeInitial(e);var y=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;y&&d.doCalcdata(e);for(var b=0;b<e.calcdata.length;b++)e.calcdata[b][0].trace=e._fullData[b];e._context.responsive?e._responsiveChartHandler||(e._responsiveChartHandler=function(){o.isHidden(e)||d.resize(e)},window.addEventListener("resize",e._responsiveChartHandler)):o.clearResponsive(e);var _=o.extendFlat({},p._size),w=0;function k(){if(d.clearAutoMarginIds(e),M.drawMarginPushers(e),h.allowAutoMargin(e),e._fullLayout.title.text&&e._fullLayout.title.automargin&&d.allowAutoMargin(e,"title.automargin"),p._has("pie"))for(var t=e._fullData,r=0;r<t.length;r++){var n=t[r];"pie"===n.type&&n.automargin&&d.allowAutoMargin(e,"pie."+n.uid+".automargin")}return d.doAutoMargin(e),d.previousPromises(e)}function A(){e._transitioning||(M.doAutoRangeAndConstraints(e),f&&h.saveRangeInitial(e),u.getComponentMethod("rangeslider","calcAutorange")(e))}var L=[d.previousPromises,function(){if(l)return t.addFrames(e,l)},function t(){for(var r=p._basePlotModules,n=0;n<r.length;n++)r[n].drawFramework&&r[n].drawFramework(e);!p._glcanvas&&p._has("gl")&&(p._glcanvas=p._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],(function(e){return e.key})),p._glcanvas.enter().append("canvas").attr("class",(function(e){return"gl-canvas gl-canvas-"+e.key.replace("Layer","")})).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var a=e._context.plotGlPixelRatio;if(p._glcanvas){p._glcanvas.attr("width",p.width*a).attr("height",p.height*a).style("width",p.width+"px").style("height",p.height+"px");var i=p._glcanvas.data()[0].regl;if(i&&(Math.floor(p.width*a)!==i._gl.drawingBufferWidth||Math.floor(p.height*a)!==i._gl.drawingBufferHeight)){var l="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!w)return o.log(l+" Clearing graph and plotting again."),d.cleanPlot([],{},e._fullData,p),d.supplyDefaults(e),p=e._fullLayout,d.doCalcdata(e),w++,t();o.error(l)}}return"h"===p.modebar.orientation?p._modebardiv.style("height",null).style("width","100%"):p._modebardiv.style("width",null).style("height",p.height+"px"),d.previousPromises(e)},k,function(){if(d.didMarginChange(_,p._size))return o.syncOrAsync([k,M.layoutStyles],e)}];v&&L.push((function(){if(y)return o.syncOrAsync([u.getComponentMethod("shapes","calcAutorange"),u.getComponentMethod("annotations","calcAutorange"),A],e);A()})),L.push(M.layoutStyles),v&&L.push((function(){return h.draw(e,f?"":"redraw")}),(function(e){var t=e._fullLayout._insideTickLabelsUpdaterange;if(t)return e._fullLayout._insideTickLabelsUpdaterange=void 0,V(e,t).then((function(){h.saveRangeInitial(e,!0)}))})),L.push(M.drawData,M.finalDraw,m,d.addLinks,d.rehover,d.redrag,d.reselect,d.doAutoMargin,d.previousPromises);var D=o.syncOrAsync(L,e);return D&&D.then||(D=Promise.resolve()),D.then((function(){return S(e),e}))},t.purge=function(e){var t=(e=o.getGraphDiv(e))._fullLayout||{},r=e._fullData||[];return d.cleanPlot([],{},r,t),d.purge(e),s.purge(e),t._container&&t._container.remove(),delete e._context,e},t.react=function(e,r,n,a){var i,s;e=o.getGraphDiv(e),T.clearPromiseQueue(e);var c=e._fullData,h=e._fullLayout;if(o.isPlotDiv(e)&&c&&h){if(o.isPlainObject(r)){var p=r;r=p.data,n=p.layout,a=p.config,i=p.frames}var v=!1;if(a){var g=o.extendDeep({},e._context);e._context=void 0,C(e,a),v=le(g,e._context)}e.data=r||[],T.cleanData(e.data),e.layout=n||{},T.cleanLayout(e.layout),function(e,t,r,n){var a,i,s,c,u,f,d,h,p,v,g=n._preGUI,y=[],m={},x={};for(a in g){if(u=te(a,$)){if(p=u.head,v=u.tail,i=u.attr||p+".uirevision",(c=(s=l(n,i).get())&&re(i,t))&&c===s){if(null===(f=g[a])&&(f=void 0),ie(h=(d=l(t,a)).get(),f)){void 0===h&&"autorange"===v&&y.push(p),d.set(E(l(n,a).get()));continue}if("autorange"===v||"range["===v.substr(0,6)){var b=g[p+".range[0]"],_=g[p+".range[1]"],w=g[p+".autorange"];if(w||null===w&&null===b&&null===_){if(!(p in m)){var T=l(t,p).get();m[p]=T&&(T.autorange||!1!==T.autorange&&(!T.range||2!==T.range.length))}if(m[p]){d.set(E(l(n,a).get()));continue}}}}}else o.warn("unrecognized GUI edit: "+a);delete g[a],u&&"range["===u.tail.substr(0,6)&&(x[u.head]=1)}for(var M=0;M<y.length;M++){var k=y[M];if(x[k]){var A=l(t,k).get();A&&delete A.autorange}}var L=n._tracePreGUI;for(var S in L){var D,O=L[S],C=null;for(a in O){if(!C){var P=ne(S,r);if(P<0){delete L[S];break}var I=ae(S,e,(D=r[P]._fullInput).index);if(I<0){delete L[S];break}C=e[I]}if(u=te(a,ee)){if(u.attr?c=(s=l(n,u.attr).get())&&re(u.attr,t):(s=D.uirevision,void 0===(c=C.uirevision)&&(c=t.uirevision)),c&&c===s&&(null===(f=O[a])&&(f=void 0),ie(h=(d=l(C,a)).get(),f))){d.set(E(l(D,a).get()));continue}}else o.warn("unrecognized GUI edit: "+a+" in trace uid "+S);delete O[a]}}}(e.data,e.layout,c,h),d.supplyDefaults(e,{skipUpdateCalc:!0});var y=e._fullData,m=e._fullLayout,x=void 0===m.datarevision,b=m.transition,_=function(e,t,r,n,a){var i=k.layoutFlags();return i.arrays={},i.rangesAltered={},i.nChanges=0,i.nChangesAnim=0,oe(t,r,[],{getValObject:function(e){return f.getLayoutValObject(r,e)},flags:i,immutable:n,transition:a,gd:e}),(i.plot||i.calc)&&(i.layoutReplot=!0),a&&i.nChanges&&i.nChangesAnim&&(i.anim=i.nChanges===i.nChangesAnim?"all":"some"),i}(e,h,m,x,b),w=_.newDataRevision,A=function(e,t,r,n,a,i){var o=t.length===r.length;if(!a&&!o)return{fullReplot:!0,calc:!0};var l,s,c=k.traceFlags();c.arrays={},c.nChanges=0,c.nChangesAnim=0;var u={getValObject:function(e){var t=f.getTraceValObject(s,e);return!s._module.animatable&&t.anim&&(t.anim=!1),t},flags:c,immutable:n,transition:a,newDataRevision:i,gd:e},h={};for(l=0;l<t.length;l++)if(r[l]){if(s=r[l]._fullInput,d.hasMakesDataTransform(s)&&(s=r[l]),h[s.uid])continue;h[s.uid]=1,oe(t[l]._fullInput,s,[],u)}return(c.calc||c.plot)&&(c.fullReplot=!0),a&&c.nChanges&&c.nChangesAnim&&(c.anim=c.nChanges===c.nChangesAnim&&o?"all":"some"),c}(e,c,y,x,b,w);if(J(e)&&(_.layoutReplot=!0),A.calc||_.calc){e.calcdata=void 0;for(var L=Object.getOwnPropertyNames(m),D=0;D<L.length;D++){var O=L[D],P=O.substring(0,5);if("xaxis"===P||"yaxis"===P){var I=m[O]._emptyCategories;I&&I()}}}else d.supplyDefaultsUpdateCalc(e.calcdata,y);var R=[];if(i&&(e._transitionData={},d.createTransitionData(e),R.push((function(){return t.addFrames(e,i)}))),m.transition&&!v&&(A.anim||_.anim))_.ticks&&R.push(M.doTicksRelayout),d.doCalcdata(e),M.doAutoRangeAndConstraints(e),R.push((function(){return d.transitionFromReact(e,A,_,h)}));else if(A.fullReplot||_.layoutReplot||v)e._fullLayout._skipDefaults=!0,R.push(t._doPlot);else{for(var z in _.arrays){var N=_.arrays[z];if(N.length){var F=u.getComponentMethod(z,"drawOne");if(F!==o.noop)for(var H=0;H<N.length;H++)F(e,N[H]);else{var B=u.getComponentMethod(z,"draw");if(B===o.noop)throw new Error("cannot draw components: "+z);B(e)}}}R.push(d.previousPromises),A.style&&R.push(M.doTraceStyle),(A.colorbars||_.colorbars)&&R.push(M.doColorBars),_.legend&&R.push(M.doLegend),_.layoutstyle&&R.push(M.layoutStyles),_.axrange&&q(R),_.ticks&&R.push(M.doTicksRelayout),_.modebar&&R.push(M.doModeBar),_.camera&&R.push(M.doCamera),R.push(S)}R.push(d.rehover,d.redrag,d.reselect),(s=o.syncOrAsync(R,e))&&s.then||(s=Promise.resolve(e))}else s=t.newPlot(e,r,n,a);return s.then((function(){return e.emit("plotly_react",{data:r,layout:n}),e}))},t.redraw=function(e){if(e=o.getGraphDiv(e),!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);return T.cleanData(e.data),T.cleanLayout(e.layout),e.calcdata=void 0,t._doPlot(e).then((function(){return e.emit("plotly_redraw"),e}))},t.relayout=V,t.restyle=F,t.setPlotConfig=function(e){return o.extendFlat(_,e)},t.update=K,t._guiRelayout=Q(V),t._guiRestyle=Q(F),t._guiUpdate=Q(K),t._storeDirectGUIEdit=function(e,t,r){for(var n in r)B(n,l(e,n).get(),r[n],t)}},556:function(e){"use strict";var t={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},r={};!function e(t,r){for(var n in t){var a=t[n];a.valType?r[n]=a.dflt:(r[n]||(r[n]={}),e(a,r[n]))}}(t,r),e.exports={configAttributes:t,dfltConfig:r}},3060:function(e,t,r){"use strict";var n=r(4040),a=r(3400),i=r(5464),o=r(4859),l=r(6672),s=r(5656),c=r(556).configAttributes,u=r(7824),f=a.extendDeepAll,d=a.isPlainObject,h=a.isArrayOrTypedArray,p=a.nestedProperty,v=a.valObjectMeta,g="_isSubplotObj",y="_isLinkedToArray",m="_deprecated",x=[g,y,"_arrayAttrRegexps",m];function b(e,t,r){if(!e)return!1;if(e._isLinkedToArray)if(_(t[r]))r++;else if(r<t.length)return!1;for(;r<t.length;r++){var n=e[t[r]];if(!d(n))break;if(e=n,r===t.length-1)break;if(e._isLinkedToArray){if(!_(t[++r]))return!1}else if("info_array"===e.valType){var a=t[++r];if(!_(a))return!1;var i=e.items;if(Array.isArray(i)){if(a>=i.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];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 w(){var e,t,r={};for(e in f(r,o),n.subplotsRegistry)if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a<t.attr.length;a++)M(r,t,t.attr[a]);else M(r,t,"subplot"===t.attr?t.name:t.attr);for(e in n.componentsRegistry){var i=(t=n.componentsRegistry[e]).schema;if(i&&(i.subplots||i.layout)){var l=i.subplots;if(l&&l.xaxis&&!l.yaxis)for(var s in l.xaxis)delete r.yaxis[s];delete r.xaxis.shift,delete r.xaxis.autoshift}else"colorscale"===t.name?f(r,t.layoutAttributes):t.layoutAttributes&&k(r,t.layoutAttributes,t.name)}return{layoutAttributes:T(r)}}function T(e){return function(e){t.crawl(e,(function(e,r,n){t.isValObject(e)?!0!==e.arrayOk&&"data_array"!==e.valType||(n[r+"src"]={valType:"string",editType:"none"}):d(e)&&(e.role="object")}))}(e),function(e){t.crawl(e,(function(e,t,r){if(e){var n=e[y];n&&(delete e[y],r[t]={items:{}},r[t].items[n]=e,r[t].role="object")}}))}(e),function(e){!function e(t){for(var r in t)if(d(t[r]))e(t[r]);else if(Array.isArray(t[r]))for(var n=0;n<t[r].length;n++)e(t[r][n]);else t[r]instanceof RegExp&&(t[r]=t[r].toString())}(e)}(e),e}function M(e,t,r){var n=p(e,r),a=f({},t.layoutAttributes);a[g]=!0,n.set(a)}function k(e,t,r){var n=p(e,r);n.set(f(n.get()||{},t))}t.IS_SUBPLOT_OBJ=g,t.IS_LINKED_TO_ARRAY=y,t.DEPRECATED=m,t.UNDERSCORE_ATTRS=x,t.get=function(){var e={};n.allTypes.forEach((function(r){e[r]=function(e){var r,a;a=(r=n.modules[e]._module).basePlotModule;var o={type:null},l=f({},i),s=f({},r.attributes);t.crawl(s,(function(e,t,r,n,a){p(l,a).set(void 0),void 0===e&&p(s,a).set(void 0)})),f(o,l),n.traceIs(e,"noOpacity")&&delete o.opacity,n.traceIs(e,"showLegend")||(delete o.showlegend,delete o.legendgroup),n.traceIs(e,"noHover")&&(delete o.hoverinfo,delete o.hoverlabel),r.selectPoints||delete o.selectedpoints,f(o,s),a.attributes&&f(o,a.attributes),o.type=e;var c={meta:r.meta||{},categories:r.categories||{},animatable:Boolean(r.animatable),type:e,attributes:T(o)};if(r.layoutAttributes){var u={};f(u,r.layoutAttributes),c.layoutAttributes=T(u)}return r.animatable||t.crawl(c,(function(e){t.isValObject(e)&&"anim"in e&&delete e.anim})),c}(r)}));var r,a={};return Object.keys(n.transformsRegistry).forEach((function(e){a[e]=function(e){var t=n.transformsRegistry[e],r=f({},t.attributes);return Object.keys(n.componentsRegistry).forEach((function(t){var a=n.componentsRegistry[t];a.schema&&a.schema.transforms&&a.schema.transforms[e]&&Object.keys(a.schema.transforms[e]).forEach((function(t){k(r,a.schema.transforms[e][t],t)}))})),{attributes:T(r)}}(e)})),{defs:{valObjects:v,metaKeys:x.concat(["description","role","editType","impliedEdits"]),editType:{traces:u.traces,layout:u.layout},impliedEdits:{}},traces:e,layout:w(),transforms:a,frames:(r={frames:f({},l)},T(r),r.frames),animation:T(s),config:T(c)}},t.crawl=function(e,r,n,a){var i=n||0;a=a||"",Object.keys(e).forEach((function(n){var o=e[n];if(-1===x.indexOf(n)){var l=(a?a+".":"")+n;r(o,n,e,i,l),t.isValObject(o)||d(o)&&"impliedEdits"!==n&&t.crawl(o,r,i+1,l)}}))},t.isValObject=function(e){return e&&void 0!==e.valType},t.findArrayAttributes=function(e){var r,n,a=[],o=[],l=[];function s(e,t,n,a){o=o.slice(0,a).concat([t]),l=l.slice(0,a).concat([e&&e._isLinkedToArray]),e&&("data_array"===e.valType||!0===e.arrayOk)&&("colorbar"!==o[a-1]||"ticktext"!==t&&"tickvals"!==t)&&c(r,0,"")}function c(e,t,r){var i=e[o[t]],s=r+o[t];if(t===o.length-1)h(i)&&a.push(n+s);else if(l[t]){if(Array.isArray(i))for(var u=0;u<i.length;u++)d(i[u])&&c(i[u],t+1,s+"["+u+"].")}else d(i)&&c(i,t+1,s+".")}r=e,n="",t.crawl(i,s),e._module&&e._module.attributes&&t.crawl(e._module.attributes,s);var u=e.transforms;if(u)for(var f=0;f<u.length;f++){var p=u[f],v=p._module;v&&(n="transforms["+f+"].",r=p,t.crawl(v.attributes,s))}return a},t.getTraceValObject=function(e,t){var r,a,o=t[0],l=1;if("transforms"===o){if(1===t.length)return i.transforms;var s=e.transforms;if(!Array.isArray(s)||!s.length)return!1;var c=t[1];if(!_(c)||c>=s.length)return!1;a=(r=(n.transformsRegistry[s[c].type]||{}).attributes)&&r[t[2]],l=3}else{var u=e._module;if(u||(u=(n.modules[e.type||i.type.dflt]||{})._module),!u)return!1;if(!(a=(r=u.attributes)&&r[o])){var f=u.basePlotModule;f&&f.attributes&&(a=f.attributes[o])}a||(a=i[o])}return b(a,t,l)},t.getLayoutValObject=function(e,t){var r=function(e,t){var r,a,i,l,s=e._basePlotModules;if(s){var c;for(r=0;r<s.length;r++){if((i=s[r]).attrRegex&&i.attrRegex.test(t)){if(i.layoutAttrOverrides)return i.layoutAttrOverrides;!c&&i.layoutAttributes&&(c=i.layoutAttributes)}var u=i.baseLayoutAttrOverrides;if(u&&t in u)return u[t]}if(c)return c}var f=e._modules;if(f)for(r=0;r<f.length;r++)if((l=f[r].layoutAttributes)&&t in l)return l[t];for(a in n.componentsRegistry){if("colorscale"===(i=n.componentsRegistry[a]).name&&0===t.indexOf("coloraxis"))return i.layoutAttributes[t];if(!i.schema&&t===i.name)return i.layoutAttributes}return t in o&&o[t]}(e,t[0]);return b(r,t,1)}},1780:function(e,t,r){"use strict";var n=r(3400),a=r(5464),i="templateitemname",o={name:{valType:"string",editType:"none"}};function l(e){return e&&"string"==typeof e}function s(e){var t=e.length-1;return"s"!==e.charAt(t)&&n.warn("bad argument to arrayDefaultKey: "+e),e.substr(0,e.length-1)+"defaults"}o[i]={valType:"string",editType:"calc"},t.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=o.name,t[i]=o[i],t},t.traceTemplater=function(e){var t,r,i={};for(t in e)r=e[t],Array.isArray(r)&&r.length&&(i[t]=0);return{newTrace:function(o){var l={type:t=n.coerce(o,{},a,"type"),_template:null};if(t in i){r=e[t];var s=i[t]%r.length;i[t]++,l._template=r[s]}return l}}},t.newContainer=function(e,t,r){var a=e._template,i=a&&(a[t]||r&&a[r]);return n.isPlainObject(i)||(i=null),e[t]={_template:i}},t.arrayTemplater=function(e,t,r){var n=e._template,a=n&&n[s(t)],o=n&&n[t];Array.isArray(o)&&o.length||(o=[]);var c={};return{newItem:function(e){var t={name:e.name,_input:e},n=t[i]=e[i];if(!l(n))return t._template=a,t;for(var s=0;s<o.length;s++){var u=o[s];if(u.name===n)return c[n]=1,t._template=u,t}return t[r]=e[r]||!1,t._template=!1,t},defaultItems:function(){for(var e=[],t=0;t<o.length;t++){var r=o[t],n=r.name;if(l(n)&&!c[n]){var a={_template:r,name:n,_input:{_templateitemname:n}};a[i]=r[i],e.push(a),c[n]=1}}return e}}},t.arrayDefaultKey=s,t.arrayEditor=function(e,t,r){var a=(n.nestedProperty(e,t).get()||[]).length,o=r._index,l=o>=a&&(r._input||{})._templateitemname;l&&(o=a);var s,c=t+"["+o+"]";function u(){s={},l&&(s[c]={},s[c][i]=l)}function f(e,t){l?n.nestedProperty(s[c],e).set(t):s[c+"."+e]=t}function d(){var e=s;return u(),e}return u(),{modifyBase:function(e,t){s[e]=t},modifyItem:f,getUpdateObj:d,applyUpdate:function(t,r){t&&f(t,r);var a=d();for(var i in a)n.nestedProperty(e,i).set(a[i])}}}},9172:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(7316),o=r(3400),l=r(2736),s=r(3696),c=r(6308),u=r(3616),f=r(1668),d=r(3080),h=r(4460),p=r(4284),v=r(1888),g=v.enforce,y=v.clean,m=r(9280).doAutoRange,x="start";function b(e,t,r){for(var n=0;n<r.length;n++){var a=r[n][0],i=r[n][1];if(!(a[0]>=e[1]||a[1]<=e[0])&&i[0]<t[1]&&i[1]>t[0])return!0}return!1}function _(e){var r,a,l,s,f,v,g=e._fullLayout,y=g._size,m=y.p,x=h.list(e,"",!0);if(g._paperdiv.style({width:e._context.responsive&&g.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":g.width+"px",height:e._context.responsive&&g.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(u.setSize,g.width,g.height),e._context.setBackground(e,g.paper_bgcolor),t.drawMainTitle(e),d.manage(e),!g._has("cartesian"))return i.previousPromises(e);function _(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-m-n:t._offset+t._length+m+n:y.t+y.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+m+n:t._offset-m-n:y.l+y.w*(e.position||0)+n%1}for(r=0;r<x.length;r++){var T=(s=x[r])._anchorAxis;s._linepositions={},s._lw=u.crispRound(e,s.linewidth,1),s._mainLinePosition=_(s,T,s.side),s._mainMirrorPosition=s.mirror&&T?_(s,T,p.OPPOSITE_SIDE[s.side]):null}var k=[],A=[],L=[],S=1===c.opacity(g.paper_bgcolor)&&1===c.opacity(g.plot_bgcolor)&&g.paper_bgcolor===g.plot_bgcolor;for(a in g._plots)if((l=g._plots[a]).mainplot)l.bg&&l.bg.remove(),l.bg=void 0;else{var D=l.xaxis.domain,O=l.yaxis.domain,C=l.plotgroup;if(b(D,O,L)){var P=C.node(),I=l.bg=o.ensureSingle(C,"rect","bg");P.insertBefore(I.node(),P.childNodes[0]),A.push(a)}else C.select("rect.bg").remove(),L.push([D,O]),S||(k.push(a),A.push(a))}var R,z,N,F,E,H,B,j,Y,V,U,q,G,Z=g._bgLayer.selectAll(".bg").data(k);for(Z.enter().append("rect").classed("bg",!0),Z.exit().remove(),Z.each((function(e){g._plots[e].bg=n.select(this)})),r=0;r<A.length;r++)l=g._plots[A[r]],f=l.xaxis,v=l.yaxis,l.bg&&void 0!==f._offset&&void 0!==v._offset&&l.bg.call(u.setRect,f._offset-m,v._offset-m,f._length+2*m,v._length+2*m).call(c.fill,g.plot_bgcolor).style("stroke-width",0);if(!g._hasOnlyLargeSploms)for(a in g._plots){l=g._plots[a],f=l.xaxis,v=l.yaxis;var W,X,J=l.clipId="clip"+g._uid+a+"plot",K=o.ensureSingleById(g._clips,"clipPath",J,(function(e){e.classed("plotclip",!0).append("rect")}));l.clipRect=K.select("rect").attr({width:f._length,height:v._length}),u.setTranslate(l.plot,f._offset,v._offset),l._hasClipOnAxisFalse?(W=null,X=J):(W=J,X=null),u.setClipUrl(l.plot,W,e),l.layerClipId=X}function Q(e){return"M"+R+","+e+"H"+z}function $(e){return"M"+f._offset+","+e+"h"+f._length}function ee(e){return"M"+e+","+j+"V"+B}function te(e){return void 0!==v._shift&&(e+=v._shift),"M"+e+","+v._offset+"v"+v._length}function re(e,t,r){if(!e.showline||a!==e._mainSubplot)return"";if(!e._anchorAxis)return r(e._mainLinePosition);var n=t(e._mainLinePosition);return e.mirror&&(n+=t(e._mainMirrorPosition)),n}for(a in g._plots){l=g._plots[a],f=l.xaxis,v=l.yaxis;var ne="M0,0";w(f,a)&&(E=M(f,"left",v,x),R=f._offset-(E?m+E:0),H=M(f,"right",v,x),z=f._offset+f._length+(H?m+H:0),N=_(f,v,"bottom"),F=_(f,v,"top"),!(G=!f._anchorAxis||a!==f._mainSubplot)||"allticks"!==f.mirror&&"all"!==f.mirror||(f._linepositions[a]=[N,F]),ne=re(f,Q,$),G&&f.showline&&("all"===f.mirror||"allticks"===f.mirror)&&(ne+=Q(N)+Q(F)),l.xlines.style("stroke-width",f._lw+"px").call(c.stroke,f.showline?f.linecolor:"rgba(0,0,0,0)")),l.xlines.attr("d",ne);var ae="M0,0";w(v,a)&&(U=M(v,"bottom",f,x),B=v._offset+v._length+(U?m:0),q=M(v,"top",f,x),j=v._offset-(q?m:0),Y=_(v,f,"left"),V=_(v,f,"right"),!(G=!v._anchorAxis||a!==v._mainSubplot)||"allticks"!==v.mirror&&"all"!==v.mirror||(v._linepositions[a]=[Y,V]),ae=re(v,ee,te),G&&v.showline&&("all"===v.mirror||"allticks"===v.mirror)&&(ae+=ee(Y)+ee(V)),l.ylines.style("stroke-width",v._lw+"px").call(c.stroke,v.showline?v.linecolor:"rgba(0,0,0,0)")),l.ylines.attr("d",ae)}return h.makeClipPaths(e),i.previousPromises(e)}function w(e,t){return(e.ticks||e.showline)&&(t===e._mainSubplot||"all"===e.mirror||"allticks"===e.mirror)}function T(e,t,r){if(!r.showline||!r._lw)return!1;if("all"===r.mirror||"allticks"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var a=p.FROM_BL[t];return r.side===t?n.domain[a]===e.domain[a]:r.mirror&&n.domain[1-a]===e.domain[1-a]}function M(e,t,r,n){if(T(e,t,r))return r._lw;for(var a=0;a<n.length;a++){var i=n[a];if(i._mainAxis===r._mainAxis&&T(e,t,i))return i._lw}return 0}t.layoutStyles=function(e){return o.syncOrAsync([i.doAutoMargin,_],e)},t.drawMainTitle=function(e){var t,r=e._fullLayout.title,a=e._fullLayout,s=function(e){var t=e.title,r="middle";return o.isRightAnchor(t)?r="end":o.isLeftAnchor(t)&&(r=x),r}(a),c=function(e){var t=e.title,r="0em";return o.isTopAnchor(t)?r=p.CAP_SHIFT+"em":o.isMiddleAnchor(t)&&(r=p.MID_SHIFT+"em"),r}(a),d=function(e,t){var r=e.title,n=e._size,a=0;return"0em"!==t&&t?t===p.CAP_SHIFT+"em"&&(a=r.pad.t):a=-r.pad.b,"auto"===r.y?n.t/2:"paper"===r.yref?n.t+n.h-n.h*r.y+a:e.height-e.height*r.y+a}(a,c),h=function(e,t){var r=e.title,n=e._size,a=0;return t===x?a=r.pad.l:"end"===t&&(a=-r.pad.r),"paper"===r.xref?n.l+n.w*r.x+a:e.width*r.x+a}(a,s);if(f.draw(e,"gtitle",{propContainer:a,propName:"title.text",placeholder:a._dfltTitle.plot,attributes:{x:h,y:d,"text-anchor":s,dy:c}}),r.text&&r.automargin){var v=n.selectAll(".gtitle"),g=u.bBox(v.node()).height,y=function(e,t,r){var n=t.y,a=t.yanchor,i=n>.5?"t":"b",o=e._fullLayout.margin[i],l=0;return"paper"===t.yref?l=r+t.pad.t+t.pad.b:"container"===t.yref&&(l=function(e,t,r,n,a){var i=0;return"middle"===r&&(i+=a/2),"t"===e?("top"===r&&(i+=a),i+=n-t*n):("bottom"===r&&(i+=a),i+=t*n),i}(i,n,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),l>o?l:0}(e,r,g);if(y>0){!function(e,t,r,n){var a="title.automargin",l=e._fullLayout.title,s=l.y>.5?"t":"b",c={x:l.x,y:l.y,t:0,b:0},u={};"paper"===l.yref&&function(e,t,r,n,a){var i="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,l=o.isTopAnchor(t)?n:n-a,s="b"===r?i-l:l;return!(o.isTopAnchor(t)&&"t"===r||o.isBottomAnchor(t)&&"b"===r)&&s<a}(e,l,s,t,n)?c[s]=r:"container"===l.yref&&(u[s]=r,e._fullLayout._reservedMargin[a]=u),i.allowAutoMargin(e,a),i.autoMargin(e,a,c)}(e,d,y,g),v.attr({x:h,y:d,"text-anchor":s,dy:(t=r.yanchor,"top"===t?p.CAP_SHIFT+.3+"em":"bottom"===t?"-0.3em":p.MID_SHIFT+"em")}).call(l.positionText,h,d);var m=(r.text.match(l.BR_TAG_ALL)||[]).length;if(m){var b=p.LINE_SPACING*m+p.MID_SHIFT;0===r.y&&(b=-b),v.selectAll(".line").each((function(){var e=+this.getAttribute("dy").slice(0,-2)-b+"em";this.setAttribute("dy",e)}))}}}},t.doTraceStyle=function(e){var r,n=e.calcdata,o=[];for(r=0;r<n.length;r++){var l=n[r],c=l[0]||{},u=c.trace||{},f=u._module||{},d=f.arraysToCalcdata;d&&d(l,u);var h=f.editStyle;h&&o.push({fn:h,cd0:c})}if(o.length){for(r=0;r<o.length;r++){var p=o[r];p.fn(e,p.cd0)}s(e),t.redrawReglTraces(e)}return i.style(e),a.getComponentMethod("legend","draw")(e),i.previousPromises(e)},t.doColorBars=function(e){return a.getComponentMethod("colorbar","draw")(e),i.previousPromises(e)},t.layoutReplot=function(e){var t=e.layout;return e.layout=void 0,a.call("_doPlot",e,"",t)},t.doLegend=function(e){return a.getComponentMethod("legend","draw")(e),i.previousPromises(e)},t.doTicksRelayout=function(e){return h.draw(e,"redraw"),e._fullLayout._hasOnlyLargeSploms&&(a.subplotsRegistry.splom.updateGrid(e),s(e),t.redrawReglTraces(e)),t.drawMainTitle(e),i.previousPromises(e)},t.doModeBar=function(e){var t=e._fullLayout;d.manage(e);for(var r=0;r<t._basePlotModules.length;r++){var n=t._basePlotModules[r].updateFx;n&&n(e)}return i.previousPromises(e)},t.doCamera=function(e){for(var t=e._fullLayout,r=t._subplots.gl3d,n=0;n<r.length;n++){var a=t[r[n]];a._scene.setViewport(a)}},t.drawData=function(e){var r=e._fullLayout;s(e);for(var n=r._basePlotModules,o=0;o<n.length;o++)n[o].plot(e);return t.redrawReglTraces(e),i.style(e),a.getComponentMethod("selections","draw")(e),a.getComponentMethod("shapes","draw")(e),a.getComponentMethod("annotations","draw")(e),a.getComponentMethod("images","draw")(e),r._replotting=!1,i.previousPromises(e)},t.redrawReglTraces=function(e){var t=e._fullLayout;if(t._has("regl")){var r,n,a=e._fullData,i=[],l=[];for(t._hasOnlyLargeSploms&&t._splomGrid.draw(),r=0;r<a.length;r++){var s=a[r];!0===s.visible&&0!==s._length&&("splom"===s.type?t._splomScenes[s.uid].draw():"scattergl"===s.type?o.pushUnique(i,s.xaxis+s.yaxis):"scatterpolargl"===s.type&&o.pushUnique(l,s.subplot))}for(r=0;r<i.length;r++)(n=t._plots[i[r]])._scene&&n._scene.draw();for(r=0;r<l.length;r++)(n=t[l[r]]._subplot)._scene&&n._scene.draw()}},t.doAutoRangeAndConstraints=function(e){for(var t,r=h.list(e,"",!0),n={},a=0;a<r.length;a++)if(!n[(t=r[a])._id]){n[t._id]=1,y(e,t),m(e,t);var i=t._matchGroup;if(i)for(var o in i){var l=h.getFromId(e,o);m(e,l,t.range),n[o]=1}}g(e)},t.finalDraw=function(e){a.getComponentMethod("rangeslider","draw")(e),a.getComponentMethod("rangeselector","draw")(e)},t.drawMarginPushers=function(e){a.getComponentMethod("legend","draw")(e),a.getComponentMethod("rangeselector","draw")(e),a.getComponentMethod("sliders","draw")(e),a.getComponentMethod("updatemenus","draw")(e),a.getComponentMethod("colorbar","draw")(e)}},4828:function(e,t,r){"use strict";var n=r(3400),a=n.isPlainObject,i=r(3060),o=r(7316),l=r(5464),s=r(1780),c=r(556).dfltConfig;function u(e,t){e=n.extendDeep({},e);var r,i,o=Object.keys(e).sort();function l(t,r,n){if(a(r)&&a(t))u(t,r);else if(Array.isArray(r)&&Array.isArray(t)){var o=s.arrayTemplater({_template:e},n);for(i=0;i<r.length;i++){var l=r[i],c=o.newItem(l)._template;c&&u(c,l)}var f=o.defaultItems();for(i=0;i<f.length;i++)r.push(f[i]._template);for(i=0;i<r.length;i++)delete r[i].templateitemname}}for(r=0;r<o.length;r++){var c=o[r],d=e[c];if(c in t?l(d,t[c],c):t[c]=d,f(c)===c)for(var h in t){var p=f(h);h===p||p!==c||h in e||l(d,t[h],c)}}}function f(e){return e.replace(/[0-9]+$/,"")}function d(e,t,r,i,o){var l=o&&r(o);for(var c in e){var u=e[c],h=v(e,c,i),p=v(e,c,o),g=r(p);if(!g){var y=f(c);y!==c&&(g=r(p=v(e,y,o)))}if(!(l&&l===g||!g||g._noTemplating||"data_array"===g.valType||g.arrayOk&&Array.isArray(u)))if(!g.valType&&a(u))d(u,t,r,h,p);else if(g._isLinkedToArray&&Array.isArray(u))for(var m=!1,x=0,b={},_=0;_<u.length;_++){var w=u[_];if(a(w)){var T=w.name;if(T)b[T]||(d(w,t,r,v(u,x,h),v(u,x,p)),x++,b[T]=1);else if(!m){var M=v(e,s.arrayDefaultKey(c),i),k=v(u,x,h);d(w,t,r,k,v(u,x,p));var A=n.nestedProperty(t,k);n.nestedProperty(t,M).set(A.get()),A.set(null),m=!0}}}else n.nestedProperty(t,h).set(u)}}function h(e,t){return i.getLayoutValObject(e,n.nestedProperty({},t).parts)}function p(e,t){return i.getTraceValObject(e,n.nestedProperty({},t).parts)}function v(e,t,r){return r?Array.isArray(e)?r+"["+t+"]":r+"."+t:t}function g(e){for(var t=0;t<e.length;t++)if(a(e[t]))return!0}function y(e){var t;switch(e.code){case"data":t="The template has no key data.";break;case"layout":t="The template has no key layout.";break;case"missing":t=e.path?"There are no templates for item "+e.path+" with name "+e.templateitemname:"There are no templates for trace "+e.index+", of type "+e.traceType+".";break;case"unused":t=e.path?"The template item at "+e.path+" was not used in constructing the plot.":e.dataCount?"Some of the templates of type "+e.traceType+" were not used. The template has "+e.templateCount+" traces, the data only has "+e.dataCount+" of this type.":"The template has "+e.templateCount+" traces of type "+e.traceType+" but there are none in the data.";break;case"reused":t="Some of the templates of type "+e.traceType+" were used more than once. The template has "+e.templateCount+" traces, the data has "+e.dataCount+" of this type."}return e.msg=t,e}t.makeTemplate=function(e){e=n.isPlainObject(e)?e:n.getGraphDiv(e),e=n.extendDeep({_context:c},{data:e.data,layout:e.layout}),o.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var i={data:{},layout:{}};t.forEach((function(e){var t={};d(e,t,p.bind(null,e));var r=n.coerce(e,{},l,"type"),a=i.data[r];a||(a=i.data[r]=[]),a.push(t)})),d(r,i.layout,h.bind(null,r)),delete i.layout.template;var s=r.template;if(a(s)){var f,v,g,y,m,x,b=s.layout;a(b)&&u(b,i.layout);var _=s.data;if(a(_)){for(v in i.data)if(g=_[v],Array.isArray(g)){for(x=(m=i.data[v]).length,y=g.length,f=0;f<x;f++)u(g[f%y],m[f]);for(f=x;f<y;f++)m.push(n.extendDeep({},g[f]))}for(v in _)v in i.data||(i.data[v]=n.extendDeep([],_[v]))}}return i},t.validateTemplate=function(e,t){var r=n.extendDeep({},{_context:c,data:e.data,layout:e.layout}),i=r.layout||{};a(t)||(t=i.template||{});var l=t.layout,s=t.data,u=[];r.layout=i,r.layout.template=t,o.supplyDefaults(r);var d=r._fullLayout,h=r._fullData,p={};if(a(l)?(function e(t,r){for(var n in t)if("_"!==n.charAt(0)&&a(t[n])){var i,o=f(n),l=[];for(i=0;i<r.length;i++)l.push(v(t,n,r[i])),o!==n&&l.push(v(t,o,r[i]));for(i=0;i<l.length;i++)p[l[i]]=1;e(t[n],l)}}(d,["layout"]),function e(t,r){for(var n in t)if(-1===n.indexOf("defaults")&&a(t[n])){var i=v(t,n,r);p[i]?e(t[n],i):u.push({code:"unused",path:i})}}(l,"layout")):u.push({code:"layout"}),a(s)){for(var m,x={},b=0;b<h.length;b++){var _=h[b];x[m=_.type]=(x[m]||0)+1,_._fullInput._template||u.push({code:"missing",index:_._fullInput.index,traceType:m})}for(m in s){var w=s[m].length,T=x[m]||0;w>T?u.push({code:"unused",traceType:m,templateCount:w,dataCount:T}):T>w&&u.push({code:"reused",traceType:m,templateCount:w,dataCount:T})}}else u.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var i=t[n],o=v(t,n,r);a(i)?(Array.isArray(t)&&!1===i._template&&i.templateitemname&&u.push({code:"missing",path:o,templateitemname:i.templateitemname}),e(i,o)):Array.isArray(i)&&g(i)&&e(i,o)}}({data:h,layout:d},""),u.length)return u.map(y)}},7024:function(e,t,r){"use strict";var n=r(8248),a=r(6424),i=r(7316),o=r(3400),l=r(7030),s=r(7164),c=r(3268),u=r(5788).version,f={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 r,d,h,p;function v(e){return!(e in t)||o.validate(t[e],f[e])}if(t=t||{},o.isPlainObject(e)?(r=e.data||[],d=e.layout||{},h=e.config||{},p={}):(e=o.getGraphDiv(e),r=o.extendDeep([],e.data),d=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(f.format.values,", "," or ")+".");var g={};function y(e,r){return o.coerce(t,g,f,e,r)}var m=y("format"),x=y("width"),b=y("height"),_=y("scale"),w=y("setBackground"),T=y("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var k=o.extendFlat({},d);x?k.width=x:null===t.width&&n(p.width)&&(k.width=p.width),b?k.height=b:null===t.height&&n(p.height)&&(k.height=p.height);var A=o.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),L=l.getRedrawFunc(M);function S(){return new Promise((function(e){setTimeout(e,l.getDelay(M._fullLayout))}))}function D(){return new Promise((function(e,t){var r=s(M,m,_),n=M._fullLayout.width,f=M._fullLayout.height;function d(){a.purge(M),document.body.removeChild(M)}if("full-json"===m){var h=i.graphJson(M,!1,"keepdata","object",!0,!0);return h.version=u,h=JSON.stringify(h),d(),e(T?h:l.encodeJSON(h))}if(d(),"svg"===m)return e(T?r:l.encodeSVG(r));var p=document.createElement("canvas");p.id=o.randstr(),c({format:m,width:n,height:f,scale:_,canvas:p,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){a.newPlot(M,r,k,A).then(L).then(S).then(D).then((function(t){e(function(e){return T?e.replace(l.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},1480:function(e,t,r){"use strict";var n=r(3400),a=r(7316),i=r(3060),o=r(556).dfltConfig,l=n.isPlainObject,s=Array.isArray,c=n.isArrayOrTypedArray;function u(e,t,r,a,i,o){o=o||[];for(var f=Object.keys(e),d=0;d<f.length;d++){var g=f[d];if("transforms"!==g){var y=o.slice();y.push(g);var m=e[g],x=t[g],b=v(r,g),_=(b||{}).valType,w="info_array"===_,T="colorscale"===_,M=(b||{}).items;if(p(r,g))if(l(m)&&l(x)&&"any"!==_)u(m,x,b,a,i,y);else if(w&&s(m)){m.length>x.length&&a.push(h("unused",i,y.concat(x.length)));var k,A,L,S,D,O=x.length,C=Array.isArray(M);if(C&&(O=Math.min(O,M.length)),2===b.dimensions)for(A=0;A<O;A++)if(s(m[A])){m[A].length>x[A].length&&a.push(h("unused",i,y.concat(A,x[A].length)));var P=x[A].length;for(k=0;k<(C?Math.min(P,M[A].length):P);k++)L=C?M[A][k]:M,S=m[A][k],D=x[A][k],n.validate(S,L)?D!==S&&D!==+S&&a.push(h("dynamic",i,y.concat(A,k),S,D)):a.push(h("value",i,y.concat(A,k),S))}else a.push(h("array",i,y.concat(A),m[A]));else for(A=0;A<O;A++)L=C?M[A]:M,S=m[A],D=x[A],n.validate(S,L)?D!==S&&D!==+S&&a.push(h("dynamic",i,y.concat(A),S,D)):a.push(h("value",i,y.concat(A),S))}else if(b.items&&!w&&s(m)){var I,R,z=M[Object.keys(M)[0]],N=[];for(I=0;I<x.length;I++){var F=x[I]._index||I;if((R=y.slice()).push(F),l(m[F])&&l(x[I])){N.push(F);var E=m[F],H=x[I];l(E)&&!1!==E.visible&&!1===H.visible?a.push(h("invisible",i,R)):u(E,H,z,a,i,R)}}for(I=0;I<m.length;I++)(R=y.slice()).push(I),l(m[I])?-1===N.indexOf(I)&&a.push(h("unused",i,R)):a.push(h("object",i,R,m[I]))}else!l(m)&&l(x)?a.push(h("object",i,y,m)):c(m)||!c(x)||w||T?g in t?n.validate(m,b)?"enumerated"===b.valType&&(b.coerceNumber&&m!==+x||m!==x)&&a.push(h("dynamic",i,y,m,x)):a.push(h("value",i,y,m)):a.push(h("unused",i,y,m)):a.push(h("array",i,y,m));else a.push(h("schema",i,y))}}return a}e.exports=function(e,t){void 0===e&&(e=[]),void 0===t&&(t={});var r,c,f=i.get(),d=[],p={_context:n.extendFlat({},o)};s(e)?(p.data=n.extendDeep([],e),r=e):(p.data=[],r=[],d.push(h("array","data"))),l(t)?(p.layout=n.extendDeep({},t),c=t):(p.layout={},c={},arguments.length>1&&d.push(h("object","layout"))),a.supplyDefaults(p);for(var v=p._fullData,g=r.length,y=0;y<g;y++){var m=r[y],x=["data",y];if(l(m)){var b=v[y],_=b.type,w=f.traces[_].attributes;w.type={valType:"enumerated",values:[_]},!1===b.visible&&!1!==m.visible&&d.push(h("invisible",x)),u(m,b,w,d,x);var T=m.transforms,M=b.transforms;if(T){s(T)||d.push(h("array",x,["transforms"])),x.push("transforms");for(var k=0;k<T.length;k++){var A=["transforms",k],L=T[k].type;if(l(T[k])){var S=f.transforms[L]?f.transforms[L].attributes:{};S.type={valType:"enumerated",values:Object.keys(f.transforms)},u(T[k],M[k],S,d,x,A)}else d.push(h("object",x,A))}}}else d.push(h("object",x))}var D=p._fullLayout,O=function(e,t){for(var r=e.layout.layoutAttributes,a=0;a<t.length;a++){var i=t[a],o=e.traces[i.type],l=o.layoutAttributes;l&&(i.subplot?n.extendFlat(r[o.attributes.subplot.dflt],l):n.extendFlat(r,l))}return r}(f,v);return u(c,D,O,d,"layout"),0===d.length?void 0:d};var f={object:function(e,t){return("layout"===e&&""===t?"The layout argument":"data"===e[0]&&""===t?"Trace "+e[1]+" in the data argument":d(e)+"key "+t)+" must be linked to an object container"},array:function(e,t){return("data"===e?"The data argument":d(e)+"key "+t)+" must be linked to an array container"},schema:function(e,t){return d(e)+"key "+t+" is not part of the schema"},unused:function(e,t,r){var n=l(r)?"container":"key";return d(e)+n+" "+t+" did not get coerced"},dynamic:function(e,t,r,n){return[d(e)+"key",t,"(set to '"+r+"')","got reset to","'"+n+"'","during defaults."].join(" ")},invisible:function(e,t){return(t?d(e)+"item "+t:"Trace "+e[1])+" got defaulted to be not visible"},value:function(e,t,r){return[d(e)+"key "+t,"is set to an invalid value ("+r+")"].join(" ")}};function d(e){return s(e)?"In data trace "+e[1]+", ":"In "+e+", "}function h(e,t,r,a,i){var o,l;r=r||"",s(t)?(o=t[0],l=t[1]):(o=t,l=null);var c=function(e){if(!s(e))return String(e);for(var t="",r=0;r<e.length;r++){var n=e[r];"number"==typeof n?t=t.substr(0,t.length-1)+"["+n+"]":t+=n,r<e.length-1&&(t+=".")}return t}(r),u=f[e](t,c,a,i);return n.log(u),{code:e,container:o,trace:l,path:r,astr:c,msg:u}}function p(e,t){var r=y(t),n=r.keyMinusId,a=r.id;return!!(n in e&&e[n]._isSubplotObj&&a)||t in e}function v(e,t){return t in e?e[t]:e[y(t).keyMinusId]}var g=n.counterRegex("([a-z]+)");function y(e){var t=e.match(g);return{keyMinusId:t&&t[1],id:t&&t[2]}}},5656:function(e){"use strict";e.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},1272:function(e,t,r){"use strict";var n=r(3400),a=r(1780);e.exports=function(e,t,r){var i,o,l=r.name,s=r.inclusionAttr||"visible",c=t[l],u=n.isArrayOrTypedArray(e[l])?e[l]:[],f=t[l]=[],d=a.arrayTemplater(t,l,s);for(i=0;i<u.length;i++){var h=u[i];n.isPlainObject(h)?o=d.newItem(h):(o=d.newItem({}))[s]=!1,o._index=i,!1!==o[s]&&r.handleItemDefaults(h,o,t,r),f.push(o)}var p=d.defaultItems();for(i=0;i<p.length;i++)(o=p[i])._index=f.length,r.handleItemDefaults({},o,t,r,{}),f.push(o);if(n.isArrayOrTypedArray(c)){var v=Math.min(c.length,f.length);for(i=0;i<v;i++)n.relinkPrivateKeys(f[i],c[i])}return f}},5464:function(e,t,r){"use strict";var n=r(5376),a=r(5756);e.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:n({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:a.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},1220:function(e,t,r){"use strict";var n=r(8248),a=r(3400),i=a.dateTime2ms,o=a.incrementMonth,l=r(9032).ONEAVGMONTH;e.exports=function(e,t,r,a){if("date"!==t.type)return{vals:a};var s=e[r+"periodalignment"];if(!s)return{vals:a};var c,u=e[r+"period"];if(n(u)){if((u=+u)<=0)return{vals:a}}else if("string"==typeof u&&"M"===u.charAt(0)){var f=+u.substring(1);if(!(f>0&&Math.round(f)===f))return{vals:a};c=f}for(var d=t.calendar,h="start"===s,p="end"===s,v=e[r+"period0"],g=i(v,d)||0,y=[],m=[],x=[],b=a.length,_=0;_<b;_++){var w,T,M,k=a[_];if(c){for(w=Math.round((k-g)/(c*l)),M=o(g,c*w,d);M>k;)M=o(M,-c,d);for(;M<=k;)M=o(M,c,d);T=o(M,-c,d)}else{for(M=g+(w=Math.round((k-g)/u))*u;M>k;)M-=u;for(;M<=k;)M+=u;T=M-u}y[_]=h?T:p?M:(T+M)/2,m[_]=T,x[_]=M}return{vals:y,starts:m,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,r){"use strict";var n=r(3428),a=r(8248),i=r(3400),o=r(9032).FP_SAFE,l=r(4040),s=r(3616),c=r(9811),u=c.getFromId,f=c.isLinked;function d(e,t){var r,n,a=[],o=e._fullLayout,l=p(o,t,0),s=p(o,t,1),c=g(e,t),u=c.min,f=c.max;if(0===u.length||0===f.length)return i.simpleMap(t.range,t.r2l);var d=u[0].val,v=f[0].val;for(r=1;r<u.length&&d===v;r++)d=Math.min(d,u[r].val);for(r=1;r<f.length&&d===v;r++)v=Math.max(v,f[r].val);var y=t.autorange,m="reversed"===y||"min reversed"===y||"max reversed"===y;if(!m&&t.range){var x=i.simpleMap(t.range,t.r2l);m=x[1]<x[0]}"reversed"===t.autorange&&(t.autorange=!0);var b,_,w,T,k,A,L=t.rangemode,S="tozero"===L,D="nonnegative"===L,O=t._length,C=O/10,P=0;for(r=0;r<u.length;r++)for(b=u[r],n=0;n<f.length;n++)(A=(_=f[n]).val-b.val-h(t,b.val,_.val))>0&&((k=O-l(b)-s(_))>C?A/k>P&&(w=b,T=_,P=A/k):A/O>P&&(w={val:b.val,nopad:1},T={val:_.val,nopad:1},P=A/O));if(d===v){var I=d-1,R=d+1;if(S)if(0===d)a=[0,1];else{var z=(d>0?f:u).reduce((function(e,t){return Math.max(e,s(t))}),0),N=d/(1-Math.min(.5,z/O));a=d>0?[0,N]:[N,0]}else a=D?[Math.max(0,I),Math.max(1,R)]:[I,R]}else S?(w.val>=0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:0,nopad:1})):D&&(w.val-P*l(w)<0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:1,nopad:1})),P=(T.val-w.val-h(t,b.val,_.val))/(O-l(w)-s(T)),a=[w.val-P*l(w),T.val+P*s(T)];return a=M(a,t),t.limitRange&&t.limitRange(),m&&a.reverse(),i.simpleMap(a,t.l2r||Number)}function h(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i<a.length;i++){var o=a[i];n+=o.max-o.min}return n}function p(e,t,r){var a=.05*t._length,o=t._anchorAxis||{};if(-1!==(t.ticklabelposition||"").indexOf("inside")||-1!==(o.ticklabelposition||"").indexOf("inside")){var l=t.isReversed();if(!l){var c=i.simpleMap(t.range,t.r2l);l=c[1]<c[0]}l&&(r=!r)}var u=0;return f(e,t._id)||(u=function(e,t,r){var a=0,o="x"===t._id.charAt(0);for(var l in e._plots){var c=e._plots[l];if(t._id===c.xaxis._id||t._id===c.yaxis._id){var u=(o?c.yaxis:c.xaxis)||{};if(-1!==(u.ticklabelposition||"").indexOf("inside")&&(!r&&("left"===u.side||"bottom"===u.side)||r&&("top"===u.side||"right"===u.side))){if(u._vals){var f=i.deg2rad(u._tickAngles[u._id+"tick"]||0),d=Math.abs(Math.cos(f)),h=Math.abs(Math.sin(f));if(!u._vals[0].bb){var p=u._id+"tick";u._selections[p].each((function(e){var t=n.select(this);t.select(".text-math-group").empty()&&(e.bb=s.bBox(t.node()))}))}for(var g=0;g<u._vals.length;g++){var y=u._vals[g].bb;if(y){var m=2*v+y.width,x=2*v+y.height;a=Math.max(a,o?Math.max(m*d,x*h):Math.max(x*d,m*h))}}}"inside"===u.ticks&&"inside"===u.ticklabelposition&&(a+=u.ticklen||0)}}}return a}(e,t,r)),a=Math.max(u,a),"domain"===t.constrain&&t._inputDomain&&(a*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(e){return e.nopad?0:e.pad+(e.extrapad?a:u)}}e.exports={applyAutorangeOptions:M,getAutoRange:d,makePadFn:p,doAutoRange:function(e,t,r){if(t.setScale(),t.autorange){t.range=r?r.slice():d(e,t),t._r=t.range.slice(),t._rl=i.simpleMap(t._r,t.r2l);var n=t._input,a={};a[t._attr+".range"]=t.range,a[t._attr+".autorange"]=t.autorange,l.call("_storeDirectGUIEdit",e.layout,e._fullLayout._preGUI,a),n.range=t.range.slice(),n.autorange=t.autorange}var o=t._anchorAxis;if(o&&o.rangeslider){var s=o.rangeslider[t._name];s&&"auto"===s.rangemode&&(s.range=d(e,t)),o._input.rangeslider[t._name]=i.extendFlat({},s)}},findExtremes:function(e,t,r){r||(r={}),e._m||e.setScale();var n,i,l,s,c,u,f,d,h,p=[],v=[],g=t.length,x=r.padded||!1,_=r.tozero&&("linear"===e.type||"-"===e.type),w="log"===e.type,T=!1,M=r.vpadLinearized||!1;function k(e){if(Array.isArray(e))return T=!0,function(t){return Math.max(Number(e[t]||0),0)};var t=Math.max(Number(e||0),0);return function(){return t}}var A=k((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),L=k((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=k(r.vpadplus||r.vpad),D=k(r.vpadminus||r.vpad);if(!T){if(d=1/0,h=-1/0,w)for(n=0;n<g;n++)(i=t[n])<d&&i>0&&(d=i),i>h&&i<o&&(h=i);else for(n=0;n<g;n++)(i=t[n])<d&&i>-o&&(d=i),i>h&&i<o&&(h=i);t=[d,h],g=2}var O={tozero:_,extrapad:x};function C(r){l=t[r],a(l)&&(u=A(r),f=L(r),M?(s=e.c2l(l)-D(r),c=e.c2l(l)+S(r)):(d=l-D(r),h=l+S(r),w&&d<h/10&&(d=h/10),s=e.c2l(d),c=e.c2l(h)),_&&(s=Math.min(0,s),c=Math.max(0,c)),b(s)&&y(p,s,f,O),b(c)&&m(v,c,u,O))}var P=Math.min(6,g);for(n=0;n<P;n++)C(n);for(n=g-1;n>=P;n--)C(n);return{min:p,max:v,opts:r}},concatExtremes:g};var v=3;function g(e,t,r){var n,a,i,o=t._id,l=e._fullData,s=e._fullLayout,c=[],f=[];function d(e,t){for(n=0;n<t.length;n++){var r=e[t[n]],l=(r._extremes||{})[o];if(!0===r.visible&&l){for(a=0;a<l.min.length;a++)i=l.min[a],y(c,i.val,i.pad,{extrapad:i.extrapad});for(a=0;a<l.max.length;a++)i=l.max[a],m(f,i.val,i.pad,{extrapad:i.extrapad})}}}if(d(l,t._traceIndices),d(s.annotations||[],t._annIndices||[]),d(s.shapes||[],t._shapeIndices||[]),t._matchGroup&&!r)for(var h in t._matchGroup)if(h!==t._id){var p=u(e,h),v=g(e,p,!0),x=t._length/p._length;for(a=0;a<v.min.length;a++)i=v.min[a],y(c,i.val,i.pad*x,{extrapad:i.extrapad});for(a=0;a<v.max.length;a++)i=v.max[a],m(f,i.val,i.pad*x,{extrapad:i.extrapad})}return{min:c,max:f}}function y(e,t,r,n){x(e,t,r,n,_)}function m(e,t,r,n){x(e,t,r,n,w)}function x(e,t,r,n,a){for(var i=n.tozero,o=n.extrapad,l=!0,s=0;s<e.length&&l;s++){var c=e[s];if(a(c.val,t)&&c.pad>=r&&(c.extrapad||!o)){l=!1;break}a(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(s,1),s--)}if(l){var u=i&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function b(e){return a(e)&&Math.abs(e)<o}function _(e,t){return e<=t}function w(e,t){return e>=t}function T(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))<e.d2l(r)}function M(e,t){if(!t||!t.autorangeoptions)return e;var r=e[0],n=e[1],a=t.autorangeoptions.include;if(void 0!==a){var o=t.d2l(r),l=t.d2l(n);i.isArrayOrTypedArray(a)||(a=[a]);for(var s=0;s<a.length;s++){var c=t.d2l(a[s]);o>=c&&(o=c,r=c),l<=c&&(l=c,n=c)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&T(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&T(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&T(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&T(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}},6808:function(e){"use strict";e.exports=function(e,t,r){var n,a;if(r){var i="reversed"===t||"min reversed"===t||"max reversed"===t;n=r[i?1:0],a=r[i?0:1]}var o=e("autorangeoptions.minallowed",null===a?n:void 0),l=e("autorangeoptions.maxallowed",null===n?a:void 0);void 0===o&&e("autorangeoptions.clipmin"),void 0===l&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},4460:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=r(7316),o=r(4040),l=r(3400),s=l.strTranslate,c=r(2736),u=r(1668),f=r(6308),d=r(3616),h=r(4724),p=r(8728),v=r(9032),g=v.ONEMAXYEAR,y=v.ONEAVGYEAR,m=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,w=v.ONEMAXMONTH,T=v.ONEAVGMONTH,M=v.ONEMINMONTH,k=v.ONEWEEK,A=v.ONEDAY,L=A/2,S=v.ONEHOUR,D=v.ONEMIN,O=v.ONESEC,C=v.MINUS_SIGN,P=v.BADNUM,I={K:"zeroline"},R={K:"gridline",L:"path"},z={K:"minor-gridline",L:"path"},N={K:"tick",L:"path"},F={K:"tick",L:"text"},E={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},H=r(4284),B=H.MID_SHIFT,j=H.CAP_SHIFT,Y=H.LINE_SPACING,V=H.OPPOSITE_SIDE,U=e.exports={};U.setConvert=r(8344);var q=r(2976),G=r(9811),Z=G.idSort,W=G.isLinked;U.id2name=G.id2name,U.name2id=G.name2id,U.cleanId=G.cleanId,U.list=G.list,U.listIds=G.listIds,U.getFromId=G.getFromId,U.getFromTrace=G.getFromTrace;var X=r(9280);U.getAutoRange=X.getAutoRange,U.findExtremes=X.findExtremes;var J=1e-4;function K(e){var t=(e[1]-e[0])*J;return[e[0]-t,e[1]+t]}U.coerceRef=function(e,t,r,n,a,i){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return a||(a=s[0]||("string"==typeof i?i:i[0])),i||(i=a),s=s.concat(s.map((function(e){return e+" domain"}))),u[c]={valType:"enumerated",values:s.concat(i?"string"==typeof i?[i]:i:[]),dflt:a},l.coerce(e,t,u,c)},U.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},U.coercePosition=function(e,t,r,n,a,i){var o,s;if("range"!==U.getRefType(n))o=l.ensureNumber,s=r(a,i);else{var c=U.getFromId(t,n);s=r(a,i=c.fraction2r(i)),o=c.cleanPos}e[a]=o(s)},U.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?l.ensureNumber:U.getFromId(t,r).cleanPos)(e)},U.redrawComponents=function(e,t){t=t||U.listIds(e);var r=e._fullLayout;function n(n,a,i,l){for(var s=o.getComponentMethod(n,a),c={},u=0;u<t.length;u++)for(var f=r[U.id2name(t[u])][i],d=0;d<f.length;d++){var h=f[d];if(!c[h]&&(s(e,h),c[h]=1,l))return}}n("annotations","drawOne","_annIndices"),n("shapes","drawOne","_shapeIndices"),n("images","draw","_imgIndices",!0),n("selections","drawOne","_selectionIndices")};var Q=U.getDataConversions=function(e,t,r,n){var a,i="x"===r||"y"===r||"z"===r?r:n;if(l.isArrayOrTypedArray(i)){if(a={type:q(n,void 0,{autotypenumbers:e._fullLayout.autotypenumbers}),_categories:[]},U.setConvert(a),"category"===a.type)for(var o=0;o<n.length;o++)a.d2c(n[o])}else a=U.getFromTrace(e,t,i);return a?{d2c:a.d2c,c2d:a.c2d}:"ids"===i?{d2c:ee,c2d:ee}:{d2c:$,c2d:$}};function $(e){return+e}function ee(e){return String(e)}function te(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function re(e,t){return Math.abs(e/t-1)<.001}function ne(e){return+e.substring(1)}function ae(e,t){return e.rangebreaks&&(t=t.filter((function(t){return e.maskBreaks(t.x)!==P}))),t}function ie(e){var t=e._mainAxis,r=[];if(t._vals)for(var n=0;n<t._vals.length;n++)if(!t._vals[n].noTick){var a=t.l2p(t._vals[n].x),i=e.p2l(a),o=U.tickText(e,i);t._vals[n].minor&&(o.minor=!0,o.text=""),r.push(o)}return ae(e,r)}function oe(e,t){var r=K(l.simpleMap(e.range,e.r2l)),n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i="category"===e.type?e.d2l_noadd:e.d2l;"log"===e.type&&"L"!==String(e.dtick).charAt(0)&&(e.dtick="L"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var o=[],s=0;s<=1;s++)if((void 0===t||!(t&&s||!1===t&&!s))&&(!s||e.minor)){var c=s?e.minor.tickvals:e.tickvals,u=s?[]:e.ticktext;if(c){l.isArrayOrTypedArray(u)||(u=[]);for(var f=0;f<c.length;f++){var d=i(c[f]);if(d>n&&d<a){var h=U.tickText(e,d,!1,String(u[f]));s&&(h.minor=!0,h.text=""),o.push(h)}}}}return ae(e,o)}U.getDataToCoordFunc=function(e,t,r,n){return Q(e,t,r,n).d2c},U.counterLetter=function(e){var t=e.charAt(0);return"x"===t?"y":"y"===t?"x":void 0},U.minDtick=function(e,t,r,n){-1===["log","category","multicategory"].indexOf(e.type)&&n?void 0===e._minDtick?(e._minDtick=t,e._forceTick0=r):e._minDtick&&((e._minDtick/t+1e-6)%1<2e-6&&((r-e._forceTick0)/t%1+1.000001)%1<2e-6?(e._minDtick=t,e._forceTick0=r):((t/e._minDtick+1e-6)%1>2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},U.saveRangeInitial=function(e,t){for(var r=U.list(e,"",!0),n=!1,a=0;a<r.length;a++){var i=r[a],o=void 0===i._rangeInitial0&&void 0===i._rangeInitial1,l=o||i.range[0]!==i._rangeInitial0||i.range[1]!==i._rangeInitial1,s=i.autorange;(o&&!0!==s||t&&l)&&(i._rangeInitial0="min"===s||"max reversed"===s?void 0:i.range[0],i._rangeInitial1="max"===s||"min reversed"===s?void 0:i.range[1],i._autorangeInitial=s,n=!0)}return n},U.saveShowSpikeInitial=function(e,t){for(var r=U.list(e,"",!0),n=!1,a="on",i=0;i<r.length;i++){var o=r[i],l=void 0===o._showSpikeInitial,s=l||!(o.showspikes===o._showspikes);(l||t&&s)&&(o._showSpikeInitial=o.showspikes,n=!0),"on"!==a||o.showspikes||(a="off")}return e._fullLayout._cartesianSpikesEnabled=a,n},U.autoBin=function(e,t,r,n,i,o){var s,c=l.aggNums(Math.min,null,e),u=l.aggNums(Math.max,null,e);if("category"===t.type||"multicategory"===t.type)return{start:c-.5,end:u+.5,size:Math.max(1,Math.round(o)||1),_dataSpan:u-c};if(i||(i=t.calendar),s="log"===t.type?{type:"linear",range:[c,u]}:{type:t.type,range:l.simpleMap([c,u],t.c2r,0,i),calendar:i},U.setConvert(s),o=o&&p.dtick(o,s.type))s.dtick=o,s.tick0=p.tick0(void 0,s.type,i);else{var f;if(r)f=(u-c)/r;else{var d=l.distinctVals(e),h=Math.pow(10,Math.floor(Math.log(d.minDiff)/Math.LN10)),v=h*l.roundUp(d.minDiff/h,[.9,1.9,4.9,9.9],!0);f=Math.max(v,2*l.stdev(e)/Math.pow(e.length,n?.25:.4)),a(f)||(f=1)}U.autoTicks(s,f)}var g,y=s.dtick,m=U.tickIncrement(U.tickFirst(s),y,"reverse",i);if("number"==typeof y)m=function(e,t,r,n,i){var o=0,l=0,s=0,c=0;function u(t){return(1+100*(t-e)/r.dtick)%100<2}for(var f=0;f<t.length;f++)t[f]%1==0?s++:a(t[f])||c++,u(t[f])&&o++,u(t[f]+r.dtick/2)&&l++;var d=t.length-c;if(s===d&&"date"!==r.type)r.dtick<1?e=n-.5*r.dtick:(e-=.5)+r.dtick<n&&(e+=r.dtick);else if(l<.1*d&&(o>.3*d||u(n)||u(i))){var h=r.dtick/2;e+=e+h<n?h:-h}return e}(m,e,s,c,u),g=m+(1+Math.floor((u-m)/y))*y;else for("M"===s.dtick.charAt(0)&&(m=function(e,t,r,n,a){var i=l.findExactDates(t,a);if(i.exactDays>.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?e=U.tickIncrement(e,"M6","reverse")+1.5*A:i.exactMonths>.8?e=U.tickIncrement(e,"M1","reverse")+15.5*A:e-=L;var s=U.tickIncrement(e,r);if(s<=n)return s}return e}(m,e,y,c,i)),g=m;g<=u;)g=U.tickIncrement(g,y,!1,i);return{start:t.c2r(m,0,i),end:t.c2r(g,0,i),size:y,_dataSpan:u-c}},U.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n,i=t.dtick&&a(t._tmin);if(i){var o=U.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,.99*o+.01*t._tmin]}else{var s=l.simpleMap(t.range,t.r2l);n=[s[0],.8*s[0]+.2*s[1]]}if(e.range=l.simpleMap(n,t.l2r),e._isMinor=!0,U.prepTicks(e,r),i){var c=a(t.dtick),u=a(e.dtick),f=c?t.dtick:+t.dtick.substring(1),d=u?e.dtick:+e.dtick.substring(1);c&&u?te(f,d)?f===2*k&&d===2*A&&(e.dtick=k):f===2*k&&d===3*A?e.dtick=k:f!==k||(t._input.minor||{}).nticks?re(f/d,2.5)?e.dtick=f/2:e.dtick=f:e.dtick=A:"M"===String(t.dtick).charAt(0)?u?e.dtick="M1":te(f,d)?f>=12&&2===d&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?te(f,d)||(e.dtick=re(f/d,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)},U.prepTicks=function(e,t){var r=l.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,i=e.nticks;i||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?l.bigFont(e.tickfont.size||12):15,i=e._length/n):(n="y"===e._id.charAt(0)?40:80,i=l.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(i*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,U.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 r(){return!(a(e.dtick)||"M"!==e.dtick.charAt(0))}var n=r(),i=U.getTickFormat(e);if(i){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=S,o&&!n&&e.dtick<S&&(e.dtick=S)):/%p/.test(i)?(t=L,o&&!n&&e.dtick<L&&(e.dtick=L)):/%[Aadejuwx]/.test(i)?(t=A,o&&!n&&e.dtick<A&&(e.dtick=A)):/%[UVW]/.test(i)?(t=k,o&&!n&&e.dtick<k&&(e.dtick=k)):/%[Bbm]/.test(i)?(t=T,o&&(n?ne(e.dtick)<1:e.dtick<M)&&(e.dtick="M1")):/%[q]/.test(i)?(t=b,o&&(n?ne(e.dtick)<3:e.dtick<_)&&(e.dtick="M3")):/%[Yy]/.test(i)&&(t=y,o&&(n?ne(e.dtick)<12:e.dtick<m)&&(e.dtick="M12")))}(n=r())&&e.tick0===e._dowTick0&&(e.tick0=e._rawTick0),e._definedDelta=t}(e),e.tick0||(e.tick0="date"===e.type?"2000-01-01":0),"date"===e.type&&e.dtick<.1&&(e.dtick=.1),ve(e)},U.calcTicks=function(e,t){for(var r,n,i=e.type,o=e.calendar,s=e.ticklabelstep,c="period"===e.ticklabelmode,u=l.simpleMap(e.range,e.r2l,void 0,void 0,t),f=u[1]<u[0],d=Math.min(u[0],u[1]),h=Math.max(u[0],u[1]),p=Math.max(1e3,e._length||0),v=[],D=[],O=[],C=[],I=e.minor&&(e.minor.ticks||e.minor.showgrid),R=1;R>=(I?0:1);R--){var z=!R;R?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var N=R?e:l.extendFlat({},e,e.minor);if(z?U.prepMinorTicks(N,e,t):U.prepTicks(N,t),"array"!==N.tickmode)if("sync"!==N.tickmode){var F=K(u),E=F[0],H=F[1],B=a(N.dtick),j="log"===i&&!(B||"L"===N.dtick.charAt(0)),Y=U.tickFirst(N,t);if(R){if(e._tmin=Y,Y<E!==f)break;"category"!==i&&"multicategory"!==i||(H=f?Math.max(-.5,H):Math.min(e._categories.length-.5,H))}var V,q,G=null,Z=Y;R&&(B?q=e.dtick:"date"===i?"string"==typeof e.dtick&&"M"===e.dtick.charAt(0)&&(q=T*e.dtick.substring(1)):q=e._roughDTick,V=Math.round((e.r2l(Z)-e.r2l(e.tick0))/q)-1);var W=N.dtick;for(N.rangebreaks&&N._tick0Init!==N.tick0&&(Z=ze(Z,e),f||(Z=U.tickIncrement(Z,W,!f,o))),R&&c&&(Z=U.tickIncrement(Z,W,!f,o),V--);f?Z>=H:Z<=H;Z=U.tickIncrement(Z,W,f,o)){if(R&&V++,N.rangebreaks&&!f){if(Z<E)continue;if(N.maskBreaks(Z)===P&&ze(Z,N)>=h)break}if(O.length>p||Z===G)break;G=Z;var X={value:Z};R?(j&&Z!==(0|Z)&&(X.simpleLabel=!0),s>1&&V%s&&(X.skipLabel=!0),O.push(X)):(X.minor=!0,C.push(X))}}else O=[],v=ie(e);else R?(O=[],v=oe(e,!z)):(C=[],D=oe(e,!z))}if(I&&!("inside"===e.minor.ticks&&"outside"===e.ticks||"outside"===e.minor.ticks&&"inside"===e.ticks)){for(var J=O.map((function(e){return e.value})),Q=[],$=0;$<C.length;$++){var ee=C[$],te=ee.value;if(-1===J.indexOf(te)){for(var re=!1,ne=0;!re&&ne<O.length;ne++)1e7+O[ne].value===1e7+te&&(re=!0);re||Q.push(ee)}}C=Q}if(c&&function(e,t,r){for(var n=0;n<e.length;n++){var a=e[n].value,i=n,o=n+1;n<e.length-1?(i=n,o=n+1):n>0?(i=n-1,o=n):(i=n,o=n);var l,s=e[i].value,c=e[o].value,u=Math.abs(c-s),f=r||u,d=0;f>=m?d=u>=m&&u<=g?u:y:r===b&&f>=_?d=u>=_&&u<=x?u:b:f>=M?d=u>=M&&u<=w?u:T:r===k&&f>=k?d=k:f>=A?d=A:r===L&&f>=L?d=L:r===S&&f>=S&&(d=S),d>=u&&(d=u,l=!0);var h=a+d;if(t.rangebreaks&&d>0){for(var p=0,v=0;v<84;v++){var D=(v+.5)/84;t.maskBreaks(a*(1-D)+D*h)!==P&&p++}(d*=p/84)||(e[n].drop=!0),l&&u>k&&(d=u)}(d>0||0===n)&&(e[n].periodX=a+d/2)}}(O,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(r=O.length-1;r>-1;r--)if(O[r].drop)O.splice(r,1);else{O[r].value=ze(O[r].value,e);var ce=e.c2p(O[r].value);(ae?se>ce-le:se<ce+le)?O.splice(f?r+1:r,1):se=ce}}Re(e)&&360===Math.abs(u[1]-u[0])&&O.pop(),e._tmax=(O[O.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var ue,fe,de=function(t){t.text="",e._prevDateHead=n};for(O=O.concat(C),r=0;r<O.length;r++){var he=O[r].minor,pe=O[r].value;he?D.push({x:pe,minor:!0}):(n=e._prevDateHead,ue=U.tickText(e,pe,!1,O[r].simpleLabel),void 0!==(fe=O[r].periodX)&&(ue.periodX=fe,(fe>h||fe<d)&&(fe>h&&(ue.periodX=h),fe<d&&(ue.periodX=d),de(ue))),O[r].skipLabel&&de(ue),v.push(ue))}return v=v.concat(D),e._inCalcTicks=!1,c&&v.length&&(v[0].noTick=!0),v};var le=[2,5,10],se=[1,2,3,6,12],ce=[1,2,5,10,15,30],ue=[1,2,3,7,14],fe=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],de=[-.301,0,.301,.699,1],he=[15,30,45,90,180];function pe(e,t,r){return t*l.roundUp(e/t,r)}function ve(e){var t=e.dtick;if(e._tickexponent=0,a(t)||"string"==typeof t||(t=1),"category"!==e.type&&"multicategory"!==e.type||(e._tickround=null),"date"===e.type){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),i=n.length;if("M"===String(t).charAt(0))i>10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12==0?"y":"m";else if(t>=A&&i<=10||t>=15*A)e._tickround="d";else if(t>=D&&i<=16||t>=S)e._tickround="M";else if(t>=O&&i<=19||t>=D)e._tickround="S";else{var o=e.l2r(r+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])),c=Math.floor(Math.log(s)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(me(e.exponentformat)&&!xe(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function ge(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}U.autoTicks=function(e,t,r){var n;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>y)t/=y,n=i(10),e.dtick="M"+12*pe(t,n,le);else if(o>T)t/=T,e.dtick="M"+pe(t,1,se);else if(o>A){if(e.dtick=pe(t,A,e._hasDayOfWeekBreaks?[1,2,7,14]:ue),!r){var s=U.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(s)?e.tick0=l.dateTick0(e.calendar,2):e.tick0=l.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else o>S?e.dtick=pe(t,S,se):o>D?e.dtick=pe(t,D,ce):o>O?e.dtick=pe(t,O,ce):(n=i(10),e.dtick=pe(t,n,le))}else if("log"===e.type){e.tick0=0;var u=l.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var f=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/f,n=i(10),e.dtick="L"+pe(t,n,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))):Re(e)?(e.tick0=0,n=1,e.dtick=pe(t,n,he)):(e.tick0=0,n=i(10),e.dtick=pe(t,n,le));if(0===e.dtick&&(e.dtick=1),!a(e.dtick)&&"string"!=typeof e.dtick){var d=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(d)}},U.tickIncrement=function(e,t,r,i){var o=r?-1:1;if(a(t))return l.increment(e,o*t);var s=t.charAt(0),c=o*Number(t.substr(1));if("M"===s)return l.incrementMonth(e,c,i);if("L"===s)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===s){var u="D2"===t?de:fe,f=e+.01*o,d=l.roundUp(l.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(t)},U.tickFirst=function(e,t){var r=e.r2l||Number,i=l.simpleMap(e.range,r,void 0,void 0,t),o=i[1]<i[0],s=o?Math.floor:Math.ceil,c=K(i)[0],u=e.dtick,f=r(e.tick0);if(a(u)){var d=s((c-f)/u)*u+f;return"category"!==e.type&&"multicategory"!==e.type||(d=l.constrain(d,0,e._categories.length-1)),d}var h=u.charAt(0),p=Number(u.substr(1));if("M"===h){for(var v,g,y,m=0,x=f;m<10;){if(((v=U.tickIncrement(x,u,o,e.calendar))-c)*(x-c)<=0)return o?Math.min(x,v):Math.max(x,v);g=(c-(x+v)/2)/(v-x),y=h+(Math.abs(Math.round(g))||1)*p,x=U.tickIncrement(x,y,g<0?!o:o,e.calendar),m++}return l.error("tickFirst did not converge",e),x}if("L"===h)return Math.log(s((Math.pow(10,c)-f)/p)*p+f)/Math.LN10;if("D"===h){var b="D2"===u?de:fe,_=l.roundUp(l.mod(c,1),b,o);return Math.floor(c)+Math.log(n.round(Math.pow(10,_),1))/Math.LN10}throw"unrecognized dtick "+String(u)},U.tickText=function(e,t,r,n){var i,o=ge(e,t),s="array"===e.tickmode,c=r||s,u=e.type,f="category"===u?e.d2l_noadd:e.d2l,d=function(t){var r=e.l2p(t);return r>=0&&r<=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<e.ticktext.length&&!(Math.abs(t-f(e.tickvals[i]))<p);i++);if(i<e.ticktext.length)return o.text=String(e.ticktext[i]),o.xbnd=[d(o.x-.5),d(o.x+e.dtick-.5)],o}function v(n){if(void 0===n)return!0;if(r)return"none"===n;var a={first:e._tmin,last:e._tmax}[n];return"all"!==n&&t!==a}var g=r?"never":"none"!==e.exponentformat&&v(e.showexponent)?"hide":"";if("date"===u?function(e,t,r,n){var i=e._tickround,o=r&&e.hoverformat||U.getTickFormat(e);(n=!o&&n)&&(i=a(i)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[i]);var s,c=l.formatDate(t.x,o,i,e._dateFormat,e.calendar,e._extraFormat),u=c.indexOf("\n");if(-1!==u&&(s=c.substr(u+1),c=c.substr(0,u)),n&&(void 0===s||"00:00:00"!==c&&"00:00"!==c?8===c.length&&(c=c.replace(/:00$/,"")):(c=s,s="")),s)if(r)"d"===i?c+=", "+s:c=s+(c?", "+c:"");else if(e._inCalcTicks&&e._prevDateHead===s){var f=Ne(e),d=e._trueSide||e.side;(!f&&"top"===d||f&&"bottom"===d)&&(c+="<br> ")}else e._prevDateHead=s,c+="<br>"+s;t.text=c}(e,o,r,c):"log"===u?function(e,t,r,n,i){var o=e.dtick,s=t.x,c=e.tickformat,u="string"==typeof o&&o.charAt(0);if("never"===i&&(i=""),n&&"L"!==u&&(o="L3",u="L"),c||"L"===u)t.text=be(Math.pow(10,s),e,i,n);else if(a(o)||"D"===u&&l.mod(s+.01,1)<.1){var f=Math.round(s),d=Math.abs(f),h=e.exponentformat;"power"===h||me(h)&&xe(f)?(t.text=0===f?1:1===f?"10":"10<sup>"+(f>1?"":C)+d+"</sup>",t.fontSize*=1.25):("e"===h||"E"===h)&&d>2?t.text="1"+h+(f>0?"+":C)+d:(t.text=be(Math.pow(10,s),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)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,c,g):"category"===u?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r=""),t.text=String(r)}(e,o):"multicategory"===u?function(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}(e,o,r):Re(e)?function(e,t,r,n,a){if("radians"!==e.thetaunit||r)t.text=be(t.x,e,a,n);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}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,a=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)t.text=be(l.deg2rad(t.x),e,a,n);else{var s=t.x<0;1===o[1]?1===o[0]?t.text="π":t.text=o[0]+"π":t.text=["<sup>",o[0],"</sup>","","<sub>",o[1],"</sub>","π"].join(""),s&&(t.text=C+t.text)}}}}(e,o,r,c,g):function(e,t,r,n,a){"never"===a?a="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=be(t.x,e,a,n)}(e,o,0,c,g),n||(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 y=e.labelalias[o.text];"string"==typeof y&&(o.text=y)}return("boundaries"===e.tickson||e.showdividers)&&(o.xbnd=[d(o.x-.5),d(o.x+e.dtick-.5)]),o},U.hoverLabelText=function(e,t,r){r&&(e=l.extendFlat({},e,{hoverformat:r}));var n=l.isArrayOrTypedArray(t)?t[0]:t,a=l.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==a&&a!==n)return U.hoverLabelText(e,n,r)+" - "+U.hoverLabelText(e,a,r);var i="log"===e.type&&n<=0,o=U.tickText(e,e.c2l(i?-n:n),"hover").text;return i?0===n?"0":C+o:o};var ye=["f","p","n","μ","m","","k","M","G","T"];function me(e){return"SI"===e||"B"===e}function xe(e){return e>14||e<-15}function be(e,t,r,n){var i=e<0,o=t._tickround,s=r||t.exponentformat||"B",c=t._tickexponent,u=U.getTickFormat(t),f=t.separatethousands;if(n){var d={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(d),o=(Number(d._tickround)||0)+4,c=d._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,C);var h,p=Math.pow(10,-o)/2;if("none"===s&&(c=0),(e=Math.abs(e))<p)e="0",i=!1;else{if(e+=p,c&&(e*=Math.pow(10,-c),o+=c),0===o)e=String(Math.floor(e));else if(o<0){e=(e=String(Math.round(e))).substr(0,e.length+o);for(var v=o;v<0;v++)e+="0"}else{var g=(e=String(e)).indexOf(".")+1;g&&(e=e.substr(0,g+o).replace(/\.?0+$/,""))}e=l.numSeparate(e,t._separators,f)}return c&&"hide"!==s&&(me(s)&&xe(c)&&(s="power"),h=c<0?C+-c:"power"!==s?"+"+c:String(c),"e"===s||"E"===s?e+=s+h:"power"===s?e+="×10<sup>"+h+"</sup>":"B"===s&&9===c?e+="B":me(s)&&(e+=ye[c/3+5])),i?C+e:e}function _e(e,t){if(e){var r=Object.keys(E).reduce((function(e,r){return-1!==t.indexOf(r)&&E[r].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){r[t]||(1===t.length?e[t]=0:delete e[t])}))}}function we(e,t){for(var r=[],n={},a=0;a<t.length;a++){var i=t[a];n[i.text2]?n[i.text2].push(i.x):n[i.text2]=[i.x]}for(var o in n)r.push(ge(e,l.interp(n[o],.5),o));return r}function Te(e){return void 0!==e.periodX?e.periodX:e.x}function Me(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}function ke(e){var t=e.title.font.size,r=(e.title.text.match(c.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r?t*(j+r*Y):t*j:r?t*(r+1)*Y:t}function Ae(e,t){var r=e.l2p(t);return r>1&&r<e._length-1}function Le(e){var t=n.select(e),r=t.select(".text-math-group");return r.empty()?t.select("text"):r}function Se(e){return e._id+".automargin"}function De(e){return Se(e)+".mirror"}function Oe(e){return e._id+".rangeslider"}function Ce(e,t){for(var r=0;r<t.length;r++)-1===e.indexOf(t[r])&&e.push(t[r])}function Pe(e,t,r){var n,a,i=[],o=[],s=e.layout;for(n=0;n<t.length;n++)i.push(U.getFromId(e,t[n]));for(n=0;n<r.length;n++)o.push(U.getFromId(e,r[n]));var c=Object.keys(h),u=["anchor","domain","overlaying","position","side","tickangle","editType"],f=["linear","log"];for(n=0;n<c.length;n++){var d=c[n],p=i[0][d],v=o[0][d],g=!0,y=!1,m=!1;if("_"!==d.charAt(0)&&"function"!=typeof p&&-1===u.indexOf(d)){for(a=1;a<i.length&&g;a++){var x=i[a][d];"type"===d&&-1!==f.indexOf(p)&&-1!==f.indexOf(x)&&p!==x?y=!0:x!==p&&(g=!1)}for(a=1;a<o.length&&g;a++){var b=o[a][d];"type"===d&&-1!==f.indexOf(v)&&-1!==f.indexOf(b)&&v!==b?m=!0:o[a][d]!==v&&(g=!1)}g&&(y&&(s[i[0]._name].type="linear"),m&&(s[o[0]._name].type="linear"),Ie(s,d,i,o,e._fullLayout._dfltTitle))}}for(n=0;n<e._fullLayout.annotations.length;n++){var _=e._fullLayout.annotations[n];-1!==t.indexOf(_.xref)&&-1!==r.indexOf(_.yref)&&l.swapAttrs(s.annotations[n],["?"])}}function Ie(e,t,r,n,a){var i,o=l.nestedProperty,s=o(e[r[0]._name],t).get(),c=o(e[n[0]._name],t).get();for("title"===t&&(s&&s.text===a.x&&(s.text=a.y),c&&c.text===a.y&&(c.text=a.x)),i=0;i<r.length;i++)o(e,r[i]._name+"."+t).set(c);for(i=0;i<n.length;i++)o(e,n[i]._name+"."+t).set(s)}function Re(e){return"angularaxis"===e._id}function ze(e,t){for(var r=t._rangebreaks.length,n=0;n<r;n++){var a=t._rangebreaks[n];if(e>=a.min&&e<a.max)return a.max}return e}function Ne(e){return-1!==(e.ticklabelposition||"").indexOf("inside")}function Fe(e,t){Ne(e._anchorAxis||{})&&e._hideCounterAxisInsideTickLabels&&e._hideCounterAxisInsideTickLabels(t)}function Ee(e,t,r,n){var a,i="free"===e.anchor||void 0!==e.overlaying&&!1!==e.overlaying?e.overlaying:e._id;a=n?"right"===e.side?t:-t:t,i in r||(r[i]={}),e.side in r[i]||(r[i][e.side]=0),r[i][e.side]+=a}U.getTickFormat=function(e){var t,r,n,a,i,o,l,s;function c(e){return"string"!=typeof e?e:Number(e.replace("M",""))*T}function u(e,t){var r=["L","D"];if(typeof e==typeof t){if("number"==typeof e)return e-t;var n=r.indexOf(e.charAt(0)),a=r.indexOf(t.charAt(0));return n===a?Number(e.replace(/(L|D)/g,""))-Number(t.replace(/(L|D)/g,"")):n-a}return"number"==typeof e?1:-1}function f(e,t){var r=null===t[0],n=null===t[1],a=u(e,t[0])>=0,i=u(e,t[1])<=0;return(r||a)&&(n||i)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t<e.tickformatstops.length;t++)if((n=e.tickformatstops[t]).enabled&&(a=e.dtick,o=void 0,void 0,void 0,o=c||function(e){return e},l=(i=n.dtickrange)[0],s=i[1],(!l&&"number"!=typeof l||o(l)<=o(a))&&(!s&&"number"!=typeof s||o(s)>=o(a)))){r=n;break}break;case"log":for(t=0;t<e.tickformatstops.length;t++)if((n=e.tickformatstops[t]).enabled&&f(e.dtick,n.dtickrange)){r=n;break}}return r?r.value:e.tickformat},U.getSubplots=function(e,t){var r=e._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),a=t?U.findSubplotsWithAxis(n,t):n;return a.sort((function(e,t){var r=e.substr(1).split("y"),n=t.substr(1).split("y");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]})),a},U.findSubplotsWithAxis=function(e,t){for(var r=new RegExp("x"===t._id.charAt(0)?"^"+t._id+"y":t._id+"$"),n=[],a=0;a<e.length;a++){var i=e[a];r.test(i)&&n.push(i)}return n},U.makeClipPaths=function(e){var t=e._fullLayout;if(!t._hasOnlyLargeSploms){var r,a,i={_offset:0,_length:t.width,_id:""},o={_offset:0,_length:t.height,_id:""},l=U.list(e,"x",!0),s=U.list(e,"y",!0),c=[];for(r=0;r<l.length;r++)for(c.push({x:l[r],y:o}),a=0;a<s.length;a++)0===r&&c.push({x:i,y:s[a]}),c.push({x:l[r],y:s[a]});var u=t._clips.selectAll(".axesclip").data(c,(function(e){return e.x._id+e.y._id}));u.enter().append("clipPath").classed("axesclip",!0).attr("id",(function(e){return"clip"+t._uid+e.x._id+e.y._id})).append("rect"),u.exit().remove(),u.each((function(e){n.select(this).select("rect").attr({x:e.x._offset||0,y:e.y._offset||0,width:e.x._length||1,height:e.y._length||1})}))}},U.draw=function(e,t,r){var n=e._fullLayout;"redraw"===t&&n._paper.selectAll("g.subplot").each((function(e){var t=e[0],r=n._plots[t];if(r){var a=r.xaxis,i=r.yaxis;r.xaxislayer.selectAll("."+a._id+"tick").remove(),r.yaxislayer.selectAll("."+i._id+"tick").remove(),r.xaxislayer.selectAll("."+a._id+"tick2").remove(),r.yaxislayer.selectAll("."+i._id+"tick2").remove(),r.xaxislayer.selectAll("."+a._id+"divider").remove(),r.yaxislayer.selectAll("."+i._id+"divider").remove(),r.minorGridlayer&&r.minorGridlayer.selectAll("path").remove(),r.gridlayer&&r.gridlayer.selectAll("path").remove(),r.zerolinelayer&&r.zerolinelayer.selectAll("path").remove(),n._infolayer.select(".g-"+a._id+"title").remove(),n._infolayer.select(".g-"+i._id+"title").remove()}}));var a=t&&"redraw"!==t?t:U.listIds(e),i=U.list(e).filter((function(e){return e.autoshift})).map((function(e){return e.overlaying}));a.map((function(t){var r=U.getFromId(e,t);if("sync"===r.tickmode&&r.overlaying){var n=a.findIndex((function(e){return e===r.overlaying}));n>=0&&a.unshift(a.splice(n,1).shift())}}));var o={false:{left:0,right:0}};return l.syncOrAsync(a.map((function(t){return function(){if(t){var n=U.getFromId(e,t);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=i;var a=U.drawOne(e,n,r);return n._shiftPusher&&Ee(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=l.simpleMap(n._r,n.r2l),a}}})))},U.drawOne=function(e,t,r){var n,a,s,c=(r=r||{}).axShifts||{},h=r.overlayingShiftedAx||[];t.setScale();var p=e._fullLayout,v=t._id,g=v.charAt(0),y=U.counterLetter(v),m=p._plots[t._mainSubplot];if(m){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),Ee(t,x,c,!0),Ee(t,t.shift||0,c,!1)}!0===r.skipTitle&&void 0!==t._shift||(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,c));var b=m[g+"axislayer"],_=t._mainLinePosition,w=_+=t._shift,T=t._mainMirrorPosition,M=t._vals=U.calcTicks(t),k=[t.mirror,w,T].join("_");for(n=0;n<M.length;n++)M[n].axInfo=k;t._selections={},t._tickAngles&&(t._prevTickAngles=t._tickAngles),t._tickAngles={},t._depth=null;var A={};if(t.visible){var L,S,D=U.makeTransTickFn(t),O=U.makeTransTickLabelFn(t),C="inside"===t.ticks,P="outside"===t.ticks;if("boundaries"===t.tickson){var I=function(e,t){var r,n=[],a=function(e,t){var r=e.xbnd[t];null!==r&&n.push(l.extendFlat({},e,{x:r}))};if(t.length){for(r=0;r<t.length;r++)a(t[r],0);a(t[r-1],1)}return n}(0,M);S=U.clipEnds(t,I),L=C?S:I}else S=U.clipEnds(t,M),L=C&&"period"!==t.ticklabelmode?S:M;var R,z=t._gridVals=S,N=function(e,t){var r,n,a=[],i=t.length&&t[t.length-1].x<t[0].x,o=function(e,t){var r=e.xbnd[t];null!==r&&a.push(l.extendFlat({},e,{x:r}))};if(e.showdividers&&t.length){for(r=0;r<t.length;r++){var s=t[r];s.text2!==n&&o(s,i?1:0),n=s.text2}o(t[r-1],i?0:1)}return a}(t,M);if(!p._hasOnlyLargeSploms){var F=t._subplotsWith,E={};for(n=0;n<F.length;n++){a=F[n];var H=(s=p._plots[a])[y+"axis"],B=H._mainAxis._id;if(!E[B]){E[B]=1;var j="x"===g?"M0,"+H._offset+"v"+H._length:"M"+H._offset+",0h"+H._length;U.drawGrid(e,t,{vals:z,counterAxis:H,layer:s.gridlayer.select("."+v),minorLayer:s.minorGridlayer.select("."+v),path:j,transFn:D}),U.drawZeroLine(e,t,{counterAxis:H,layer:s.zerolinelayer,path:j,transFn:D})}}}var q=U.getTickSigns(t),G=U.getTickSigns(t,"minor");if(t.ticks||t.minor&&t.minor.ticks){var Z,W,X,J,K=U.makeTickPath(t,w,q[2]),Q=U.makeTickPath(t,w,G[2],{minor:!0});if(t._anchorAxis&&t.mirror&&!0!==t.mirror?(Z=U.makeTickPath(t,T,q[3]),W=U.makeTickPath(t,T,G[3],{minor:!0}),X=K+Z,J=Q+W):(Z="",W="",X=K,J=Q),t.showdividers&&P&&"boundaries"===t.tickson){var $={};for(n=0;n<N.length;n++)$[N[n].x]=1;R=function(e){return $[e.x]?Z:X}}else R=function(e){return e.minor?J:X}}if(U.drawTicks(e,t,{vals:L,layer:b,path:R,transFn:D}),"allticks"===t.mirror){var ee=Object.keys(t._linepositions||{});for(n=0;n<ee.length;n++){a=ee[n],s=p._plots[a];var te=t._linepositions[a]||[],re=te[0],ne=te[1],ae=te[2],ie=U.makeTickPath(t,re,ae?q[0]:G[0],{minor:ae})+U.makeTickPath(t,ne,ae?q[1]:G[1],{minor:ae});U.drawTicks(e,t,{vals:L,layer:s[g+"axislayer"],path:ie,transFn:D})}}var oe=[];if(oe.push((function(){return U.drawLabels(e,t,{vals:M,layer:b,plotinfo:s,transFn:O,labelFns:U.makeLabelFns(t,w)})})),"multicategory"===t.type){var le={x:2,y:10}[g];oe.push((function(){var r={x:"height",y:"width"}[g],n=ce()[r]+le+(t._tickAngles[v+"tick"]?t.tickfont.size*Y:0);return U.drawLabels(e,t,{vals:we(t,M),layer:b,cls:v+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:D,labelFns:U.makeLabelFns(t,w+n*q[4])})})),oe.push((function(){return t._depth=q[4]*(ce("tick2")[t.side]-w),function(e,t,r){var n=t._id+"divider",a=r.vals,i=r.layer.selectAll("path."+n).data(a,Me);i.exit().remove(),i.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(f.stroke,t.dividercolor).style("stroke-width",d.crispRound(e,t.dividerwidth,1)+"px"),i.attr("transform",r.transFn).attr("d",r.path)}(e,t,{vals:N,layer:b,path:U.makeTickPath(t,w,q[4],{len:t._depth}),transFn:D})}))}else t.title.hasOwnProperty("standoff")&&oe.push((function(){t._depth=q[4]*(ce()[t.side]-w)}));var se=o.getComponentMethod("rangeslider","isVisible")(t);return r.skipTitle||se&&"bottom"===t.side||oe.push((function(){return function(e,t){var r,n=e._fullLayout,a=t._id,i=a.charAt(0),o=t.title.font.size;if(t.title.hasOwnProperty("standoff"))r=t._depth+t.title.standoff+ke(t);else{var l=Ne(t);if("multicategory"===t.type)r=t._depth;else{var s=1.5*o;l&&(s=.5*o,"outside"===t.ticks&&(s+=t.ticklen)),r=10+s+(t.linewidth?t.linewidth-1:0)}l||(r+="x"===i?"top"===t.side?o*(t.showticklabels?1:0):o*(t.showticklabels?1.5:.5):"right"===t.side?o*(t.showticklabels?1:.5):o*(t.showticklabels?.5:0))}var c,f,h,p,v=U.getPxPosition(e,t);if("x"===i?(f=t._offset+t._length/2,h="top"===t.side?v-r:v+r):(h=t._offset+t._length/2,f="right"===t.side?v+r:v-r,c={rotate:"-90",offset:0}),"multicategory"!==t.type){var g=t._selections[t._id+"tick"];if(p={selection:g,side:t.side},g&&g.node()&&g.node().parentNode){var y=d.getTranslate(g.node().parentNode);p.offsetLeft=y.x,p.offsetTop=y.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return t._titleStandoff=r,u.draw(e,a+"title",{propContainer:t,propName:t._name+".title.text",placeholder:n._dfltTitle[i],avoid:p,transform:c,attributes:{x:f,y:h,"text-anchor":"middle"}})}(e,t)})),oe.push((function(){var r,n,a,l,s=t.side.charAt(0),c=V[t.side].charAt(0),u=U.getPxPosition(e,t),f=P?t.ticklen:0;(t.automargin||se||t._shiftPusher)&&("multicategory"===t.type?r=ce("tick2"):(r=ce(),"x"===g&&"b"===s&&(t._depth=Math.max(r.width>0?r.bottom-u:0,f))));var d=0,h=0;if(t._shiftPusher&&(d=Math.max(f,r.height>0?"l"===s?u-r.left:r.right-u:0),t.title.text!==p._dfltTitle[g]&&(h=(t._titleStandoff||0)+(t._titleScoot||0),"l"===s&&(h+=ke(t))),t._fullDepth=Math.max(d,h)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var v=[0,1],m="number"==typeof t._shift?t._shift:0;if("x"===g){if("b"===s?n[s]=t._depth:(n[s]=t._depth=Math.max(r.width>0?u-r.top:0,f),v.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var b=t._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===s?(t._depth=Math.max(r.height>0?u-r.left:0,f),n[s]=t._depth-m):(t._depth=Math.max(r.height>0?r.right-u:0,f),n[s]=t._depth+m,v.reverse()),r.height>0){var _=r.bottom-(t._offset+t._length);_>0&&(n.yb=0,n.b=_);var w=t._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[y]="free"===t.anchor?t.position:t._anchorAxis.domain[v[0]],t.title.text!==p._dfltTitle[g]&&(n[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})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(a[c]+=f),!0===t.mirror||"ticks"===t.mirror?a[y]=t._anchorAxis.domain[v[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(a[y]=[t._counterDomainMin,t._counterDomainMax][v[1]]))}se&&(l=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(_e(n,t.automargin),_e(a,t.automargin)),i.autoMargin(e,Se(t),n),i.autoMargin(e,De(t),a),i.autoMargin(e,Oe(t),l)})),l.syncOrAsync(oe)}}function ce(e){var r=v+(e||"tick");return A[r]||(A[r]=function(e,t,r){var n,a,i,o;if(e._selections[t].size())n=1/0,a=-1/0,i=1/0,o=-1/0,e._selections[t].each((function(){var e=Le(this),t=d.bBox(e.node().parentNode);n=Math.min(n,t.top),a=Math.max(a,t.bottom),i=Math.min(i,t.left),o=Math.max(o,t.right)}));else{var l=U.makeLabelFns(e,r);n=a=l.yFn({dx:0,dy:0,fontSize:0}),i=o=l.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:a,left:i,right:o,height:a-n,width:o-i}}(t,r,w)),A[r]}},U.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],a=e.side===n?1:-1,i=[-1,1,a,-a];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(i=i.map((function(e){return-e}))),e.side&&i.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),i},U.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))}},U.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=function(e){return-1!==t.indexOf(e)},n=r("top"),a=r("left"),i=r("right"),o=r("bottom"),l=r("inside"),s=o||a||n||i;if(!s&&!l)return[0,0];var c=e.side,u=s?(e.tickwidth||0)/2:0,f=3,d=e.tickfont?e.tickfont.size:12;return(o||n)&&(u+=d*j,f+=(e.linewidth||0)/2),(a||i)&&(u+=(e.linewidth||0)/2,f+=3),l&&"top"===c&&(f-=d*(1-j)),(a||n)&&(u=-u),"bottom"!==c&&"right"!==c||(f=-f),[s?u:0,l?f:0]}(e),r=t[0],n=t[1];return"x"===e._id.charAt(0)?function(t){return s(r+e._offset+e.l2p(Te(t)),n)}:function(t){return s(n,r+e._offset+e.l2p(Te(t)))}},U.makeTickPath=function(e,t,r,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=void 0!==n.len?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+l*r)+"v"+i*r:"M"+(t+l*r)+",0h"+i*r},U.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=function(e){return-1!==n.indexOf(e)},o=i("top"),s=i("left"),c=i("right"),u=i("bottom")||s||o||c,f=i("inside"),d="inside"===n&&"inside"===e.ticks||!f&&"outside"===e.ticks&&"boundaries"!==e.tickson,h=0,p=0,v=d?e.ticklen:0;if(f?v*=-1:u&&(v=0),d&&(h+=v,r)){var g=l.deg2rad(r);h=v*Math.cos(g)+1,p=v*Math.sin(g)}e.showticklabels&&(d||e.showline)&&(h+=.2*e.tickfont.size);var y,m,x,b,_,w={labelStandoff:h+=(e.linewidth||1)/2*(f?-1:1),labelShift:p},T=0,M=e.side,k=e._id.charAt(0),A=e.tickangle;if("x"===k)b=(_=!f&&"bottom"===M||f&&"top"===M)?1:-1,f&&(b*=-1),y=p*b,m=t+h*b,x=_?1:-.2,90===Math.abs(A)&&(f?x+=B:x=-90===A&&"bottom"===M?j:90===A&&"top"===M?B:.5,T=B/2*(A/90)),w.xFn=function(e){return e.dx+y+T*e.fontSize},w.yFn=function(e){return e.dy+m+e.fontSize*x},w.anchorFn=function(e,t){if(u){if(s)return"end";if(c)return"start"}return a(t)&&0!==t&&180!==t?t*b<0!==f?"end":"start":"middle"},w.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==f?-n:0};else if("y"===k){if(b=(_=!f&&"left"===M||f&&"right"===M)?1:-1,f&&(b*=-1),y=h,m=p*b,x=0,f||90!==Math.abs(A)||(x=-90===A&&"left"===M||90===A&&"right"===M?j:.5),f){var L=a(A)?+A:0;if(0!==L){var S=l.deg2rad(L);T=Math.abs(Math.sin(S))*j*b,x=0}}w.xFn=function(e){return e.dx+t-(y+e.fontSize*x)*b+T*e.fontSize},w.yFn=function(e){return e.dy+m+e.fontSize*B},w.anchorFn=function(e,t){return a(t)&&90===Math.abs(t)?"middle":_?"end":"start"},w.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},U.drawTicks=function(e,t,r){r=r||{};var a=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?r.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),o=r.layer.selectAll("path."+a).data(i,Me);o.exit().remove(),o.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(e){return f.stroke(n.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(r){return d.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Fe(t,[N]),o.attr("transform",r.transFn)},U.drawGrid=function(e,t,r){if(r=r||{},"sync"!==t.tickmode){var a=t._id+"grid",i=t.minor&&t.minor.showgrid,o=i?r.vals.filter((function(e){return e.minor})):[],l=t.showgrid?r.vals.filter((function(e){return!e.minor})):[],s=r.counterAxis;if(s&&U.shouldShowZeroLine(e,t,s))for(var c="array"===t.tickmode,u=0;u<l.length;u++){var h=l[u].x;if(c?!h:Math.abs(h)<t.dtick/100){if(l=l.slice(0,u).concat(l.slice(u+1)),!c)break;u--}}t._gw=d.crispRound(e,t.gridwidth,1);for(var p=i?d.crispRound(e,t.minor.gridwidth,1):0,v=r.layer,g=r.minorLayer,y=1;y>=0;y--){var m=y?v:g;if(m){var x=m.selectAll("path."+a).data(y?l:o,Me);x.exit().remove(),x.enter().append("path").classed(a,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each((function(e){return f.stroke(n.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return d.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 r.path&&x.attr("d",r.path)}}Fe(t,[R,z])}},U.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=U.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return Z(e.id,t.id)}))})),i.attr("transform",r.transFn).attr("d",r.path).call(f.stroke,t.zerolinecolor||f.defaultLine).style("stroke-width",d.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Fe(t,[I])},U.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,o=t._id,u=r.cls||o+"tick",f=r.vals.filter((function(e){return e.text})),h=r.labelFns,p=r.secondary?0:t.tickangle,v=(t._prevTickAngles||{})[u],g=r.layer.selectAll("g."+u).data(t.showticklabels?f:[],Me),y=[];function m(e,i){e.each((function(e){var o=n.select(this),l=o.select(".text-math-group"),u=h.anchorFn(e,i),f=r.transFn.call(o.node(),e)+(a(i)&&0!=+i?" rotate("+i+","+h.xFn(e)+","+(h.yFn(e)-e.fontSize/2)+")":""),p=c.lineCount(o),v=Y*e.fontSize,g=h.heightFn(e,a(i)?+i:0,(p-1)*v);if(g&&(f+=s(0,g)),l.empty()){var y=o.select("text");y.attr({transform:f,"text-anchor":u}),y.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var m=d.bBox(l.node()).width*{end:-.5,start:.5}[u];l.attr("transform",f+s(m,0))}}))}g.enter().append("g").classed(u,1).append("text").attr("text-anchor","middle").each((function(t){var r=n.select(this),a=e._promises.length;r.call(c.positionText,h.xFn(t),h.yFn(t)).call(d.font,t.font,t.fontSize,t.fontColor).text(t.text).call(c.convertToTspans,e),e._promises[a]?y.push(e._promises.pop().then((function(){m(r,p)}))):m(r,p)})),Fe(t,[F]),g.exit().remove(),r.repositionOnUpdate&&g.each((function(e){n.select(this).select("text").call(c.positionText,h.xFn(e),h.yFn(e))})),t._adjustTickLabelsOverflow=function(){var r=t.ticklabeloverflow;if(r&&"allow"!==r){var a=-1!==r.indexOf("hide"),o="x"===t._id.charAt(0),s=0,c=o?e._fullLayout.width:e._fullLayout.height;if(-1!==r.indexOf("domain")){var u=l.simpleMap(t.range,t.r2l);s=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var f=Math.min(s,c),h=Math.max(s,c),p=t.side,v=1/0,y=-1/0;for(var m in g.each((function(e){var r=n.select(this);if(r.select(".text-math-group").empty()){var i=d.bBox(r.node()),l=0;o?(i.right>h||i.left<f)&&(l=1):(i.bottom>h||i.top+(t.tickangle?0:e.fontSize/4)<f)&&(l=1);var s=r.select("text");l?a&&s.style("opacity",0):(s.style("opacity",1),v="bottom"===p||"right"===p?Math.min(v,o?i.top:i.left):-1/0,y="top"===p||"left"===p?Math.max(y,o?i.bottom:i.right):1/0)}})),i._plots){var x=i._plots[m];if(t._id===x.xaxis._id||t._id===x.yaxis._id){var b=o?x.yaxis:x.xaxis;b&&(b["_visibleLabelMin_"+t._id]=v,b["_visibleLabelMax_"+t._id]=y)}}}},t._hideCounterAxisInsideTickLabels=function(e){var r="x"===t._id.charAt(0),a=[];for(var o in i._plots){var l=i._plots[o];t._id!==l.xaxis._id&&t._id!==l.yaxis._id||a.push(r?l.yaxis:l.xaxis)}a.forEach((function(r,a){r&&Ne(r)&&(e||[I,z,R,N,F]).forEach((function(e){var o="tick"===e.K&&"text"===e.L&&"period"===t.ticklabelmode,l=i._plots[t._mainSubplot];(e.K===I.K?l.zerolinelayer.selectAll("."+t._id+"zl"):e.K===z.K?l.minorGridlayer.selectAll("."+t._id):e.K===R.K?l.gridlayer.selectAll("."+t._id):l[t._id.charAt(0)+"axislayer"]).each((function(){var i=n.select(this);e.L&&(i=i.selectAll(e.L)),i.each((function(i){var l=t.l2p(o?Te(i):i.x)+t._offset,s=n.select(this);l<t["_visibleLabelMax_"+r._id]&&l>t["_visibleLabelMin_"+r._id]?s.style("display","none"):"tick"!==e.K||a||s.style("display",null)}))}))}))}))},m(g,v+1?v:p);var x=null;t._selections&&(t._selections[u]=g);var b=[function(){return y.length&&Promise.all(y)}];t.automargin&&i._redrawFromAutoMarginCount&&90===v?(x=v,b.push((function(){m(g,v)}))):b.push((function(){if(m(g,p),f.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){x=t.autotickangles[0];var e,n=0,a=[],i=1;if(g.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),o=Le(this),l=d.bBox(o.node());i=Math.max(i,c.lineCount(o)),a.push({top:0,bottom:10,height:10,left:r-l.width/2,right:r+l.width/2+2,width:l.width+2})})),"boundaries"!==t.tickson&&!t.showdividers||r.secondary){var o=f.length,s=Math.abs((f[o-1].x-f[0].x)*t._m)/(o-1),u=t.ticklabelposition||"",h=function(e){return-1!==u.indexOf(e)},v=h("top"),y=h("left"),b=h("right"),_=h("bottom")||y||v||b?(t.tickwidth||0)+6:0,w=s,T=1.25*n*i,M=w/Math.sqrt(Math.pow(w,2)+Math.pow(T,2)),k=t.autotickangles.map((function(e){return e*Math.PI/180})),A=k.find((function(e){return Math.abs(Math.cos(e))<=M}));void 0===A&&(A=k.reduce((function(e,t){return Math.abs(Math.cos(e))<Math.abs(Math.cos(t))?e:t}),k[0]));var L=A*(180/Math.PI);for(e=0;e<a.length-1;e++)if(l.bBoxIntersect(a[e],a[e+1],_)){x=L;break}}else{var S=2;for(t.ticks&&(S+=t.tickwidth/2),e=0;e<a.length;e++){var D=f[e].xbnd,O=a[e];if(null!==D[0]&&O.left-t.l2p(D[0])<S||null!==D[1]&&t.l2p(D[1])-O.right<S){x=90;break}}}x&&m(g,x)}})),t._tickAngles&&b.push((function(){t._tickAngles[u]=null===x?a(p)?p:0:x}));var _=function(){var e=0,r=0;return g.each((function(n,a){var i,o=Le(this);o.select(".text-math-group").empty()&&(t._vals[a]&&(i=t._vals[a].bb||d.bBox(o.node()),t._vals[a].bb=i),e=Math.max(e,i.width),r=Math.max(r,i.height))})),{labelsMaxW:e,labelsMaxH:r}},w=t._anchorAxis;if(w&&(w.autorange||w.insiderange)&&Ne(t)&&!W(i,t._id)&&(i._insideTickLabelsUpdaterange||(i._insideTickLabelsUpdaterange={}),w.autorange&&(i._insideTickLabelsUpdaterange[w._name+".autorange"]=w.autorange,b.push(_)),w.insiderange)){var T=_(),M="y"===t._id.charAt(0)?T.labelsMaxW:T.labelsMaxH;M+=6,"inside"===t.ticklabelposition&&(M+=t.ticklen||0);var k="right"===t.side||"top"===t.side?1:-1,A=1===k?1:0,L=1===k?0:1,S=[];S[L]=w.range[L];var D=w.range,O=w.r2p(D[A]),C=w.r2p(D[L]),P=i._insideTickLabelsUpdaterange[w._name+".range"];if(P){var E=w.r2p(P[A]),H=w.r2p(P[L]),B=k*("y"===t._id.charAt(0)?1:-1);B*O<B*E&&(O=E,S[A]=D[A]=P[A]),B*C>B*H&&(C=H,S[L]=D[L]=P[L])}var j=Math.abs(C-O);j-M>0?M*=1+M/(j-=M):M=0,"y"!==t._id.charAt(0)&&(M=-M),S[A]=w.p2r(w.r2p(D[A])+k*M),"min"===w.autorange||"max reversed"===w.autorange?(S[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(S[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),i._insideTickLabelsUpdaterange[w._name+".range"]=S}var V=l.syncOrAsync(b);return V&&V.then&&e._promises.push(V),V},U.getPxPosition=function(e,t){var r,n=e._fullLayout._size,a=t._id.charAt(0),i=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===a?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===a&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===i||"left"===i?r._offset:"bottom"===i||"right"===i?r._offset+r._length:void 0},U.shouldShowZeroLine=function(e,t,r){var n=l.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===P)&&(Ae(t,0)||!function(e,t,r,n){var a=r._mainAxis;if(a){var i=e._fullLayout,o=t._id.charAt(0),l=U.counterLetter(t._id),s=t._offset+(Math.abs(n[0])<Math.abs(n[1])==("x"===o)?0:t._length),c=i._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return h(r);for(var u=U.list(e,l),f=0;f<u.length;f++){var d=u[f];if(d._mainAxis===a&&h(d))return!0}}function h(e){if(!e.showline||!e.linewidth)return!1;var r=Math.max((e.linewidth+t.zerolinewidth)/2,1);function n(e){return"number"==typeof e&&Math.abs(e-s)<r}if(n(e._mainLinePosition)||n(e._mainMirrorPosition))return!0;var a=e._linepositions||{};for(var i in a)if(n(a[i][0])||n(a[i][1]))return!0}}(e,t,r,n)||function(e,t){for(var r=e._fullData,n=t._mainSubplot,a=t._id.charAt(0),i=0;i<r.length;i++){var l=r[i];if(!0===l.visible&&l.xaxis+l.yaxis===n){if(o.traceIs(l,"bar-like")&&l.orientation==={x:"h",y:"v"}[a])return!0;if(l.fill&&l.fill.charAt(l.fill.length-1)===a)return!0}}return!1}(e,t))},U.clipEnds=function(e,t){return t.filter((function(t){return Ae(e,t.x)}))},U.allowAutoMargin=function(e){for(var t=U.list(e,"",!0),r=0;r<t.length;r++){var n=t[r];n.automargin&&(i.allowAutoMargin(e,Se(n)),n.mirror&&i.allowAutoMargin(e,De(n))),o.getComponentMethod("rangeslider","isVisible")(n)&&i.allowAutoMargin(e,Oe(n))}},U.swap=function(e,t){for(var r=function(e,t){var r,n,a=[];for(r=0;r<t.length;r++){var i=[],o=e._fullData[t[r]].xaxis,l=e._fullData[t[r]].yaxis;if(o&&l){for(n=0;n<a.length;n++)-1===a[n].x.indexOf(o)&&-1===a[n].y.indexOf(l)||i.push(n);if(i.length){var s,c=a[i[0]];if(i.length>1)for(n=1;n<i.length;n++)s=a[i[n]],Ce(c.x,s.x),Ce(c.y,s.y);Ce(c.x,[o]),Ce(c.y,[l])}else a.push({x:[o],y:[l]})}}return a}(e,t),n=0;n<r.length;n++)Pe(e,r[n].x,r[n].y)}},2976:function(e,t,r){"use strict";var n=r(8248),a=r(3400),i=r(9032).BADNUM,o=a.isArrayOrTypedArray,l=a.isDateTime,s=a.cleanNumber,c=Math.round;function u(e,t){return t?n(e):"number"==typeof e}function f(e){return Math.max(1,(e-1)/1e3)}e.exports=function(e,t,r){var a=e,d=r.noMultiCategory;if(o(a)&&!a.length)return"-";if(!d&&function(e){return o(e[0])&&o(e[1])}(a))return"multicategory";if(d&&Array.isArray(a[0])){for(var h=[],p=0;p<a.length;p++)if(o(a[p]))for(var v=0;v<a[p].length;v++)h.push(a[p][v]);a=h}if(function(e,t){for(var r=e.length,a=f(r),i=0,o=0,s={},u=0;u<r;u+=a){var d=e[c(u)],h=String(d);s[h]||(s[h]=1,l(d,t)&&i++,n(d)&&o++)}return i>2*o}(a,t))return"date";var g="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=f(r),a=0,o=0,l={},u=0;u<r;u+=n){var d=e[c(u)],h=String(d);if(!l[h]){l[h]=1;var p=typeof d;"boolean"===p?o++:(t?s(d)!==i:"number"===p)?a++:"string"===p&&o++}}return o>2*a}(a,g)?"category":function(e,t){for(var r=e.length,n=0;n<r;n++)if(u(e[n],t))return!0;return!1}(a,g)?"linear":"-"}},5955:function(e,t,r){"use strict";var n=r(8248),a=r(4040),i=r(3400),o=r(1780),l=r(1272),s=r(4724),c=r(6332),u=r(5404),f=r(5936),d=r(2568),h=r(4796),p=r(2136),v=r(6312),g=r(8344),y=r(3816).WEEKDAY_PATTERN,m=r(3816).HOUR_PATTERN;function x(e,t,r){function a(r,n){return i.coerce(e,t,s.rangebreaks,r,n)}if(a("enabled")){var o=a("bounds");if(o&&o.length>=2){var l,c,u="";if(2===o.length)for(l=0;l<2;l++)if(c=_(o[l])){u=y;break}var f=a("pattern",u);if(f===y)for(l=0;l<2;l++)(c=_(o[l]))&&(t.bounds[l]=o[l]=c-1);if(f)for(l=0;l<2;l++)switch(c=o[l],f){case y:if(!n(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[l]=o[l]=c;break;case m:if(!n(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[l]=o[l]=c}if(!1===r.autorange){var d=r.range;if(d[0]<d[1]){if(o[0]<d[0]&&o[1]>d[1])return void(t.enabled=!1)}else if(o[0]>d[0]&&o[1]<d[1])return void(t.enabled=!1)}}else{var h=a("values");if(!h||!h.length)return void(t.enabled=!1);a("dvalue")}}}e.exports=function(e,t,r,n,m){var b,_=n.letter,w=n.font||{},T=n.splomStash||{},M=r("visible",!n.visibleDflt),k=t._template||{},A=t.type||k.type||"-";"date"===A&&(a.getComponentMethod("calendars","handleDefaults")(e,t,"calendar",n.calendar),n.noTicklabelmode||(b=r("ticklabelmode")));var L="";n.noTicklabelposition&&"multicategory"!==A||(L=i.coerce(e,t,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:"period"===b?["outside","inside"]:"x"===_?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||r("ticklabeloverflow",-1!==L.indexOf("inside")?"hide past domain":"category"===A||"multicategory"===A?"allow":"hide past div"),g(t,m),v(e,t,r,n),h(e,t,r,n),"category"===A||n.noHover||r("hoverformat");var S=r("color"),D=S!==s.color.dflt?S:w.color,O=T.label||m._dfltTitle[_];if(d(e,t,r,A,n),!M)return t;r("title.text",O),i.coerceFont(r,"title.font",{family:w.family,size:i.bigFont(w.size),color:D}),c(e,t,r,A);var C=n.hasMinor;if(C&&(o.newContainer(t,"minor"),c(e,t,r,A,{isMinor:!0})),f(e,t,r,A,n),u(e,t,r,n),C){var P=n.isMinor;n.isMinor=!0,u(e,t,r,n),n.isMinor=P}p(e,t,r,{dfltColor:S,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:C,attributes:s}),!C||t.minor.ticks||t.minor.showgrid||delete t.minor,(t.showline||t.ticks)&&r("mirror");var I,R="multicategory"===A;if(n.noTickson||"category"!==A&&!R||!t.ticks&&!t.showgrid||(R&&(I="boundaries"),"boundaries"===r("tickson",I)&&delete t.ticklabelposition),R&&r("showdividers")&&(r("dividercolor"),r("dividerwidth")),"date"===A)if(l(e,t,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:x}),t.rangebreaks.length){for(var z=0;z<t.rangebreaks.length;z++)if(t.rangebreaks[z].pattern===y){t._hasDayOfWeekBreaks=!0;break}if(g(t,m),m._has("scattergl")||m._has("splom"))for(var N=0;N<n.data.length;N++){var F=n.data[N];"scattergl"!==F.type&&"splom"!==F.type||(F.visible=!1,i.warn(F.type+" traces do not work on axes with rangebreaks. Setting trace "+F.index+" to `visible: false`."))}}else delete t.rangebreaks;return t};var b={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function _(e){if("string"==typeof e)return b[e.substr(0,3).toLowerCase()]}},9736:function(e,t,r){"use strict";var n=r(6880),a=n.FORMAT_LINK,i=n.DATE_FORMAT_LINK;function o(e,t){return["Sets the "+e+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+a+"."].join(" ")}function l(e,t){return o(e,t)+[" And for dates see: "+i+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}e.exports={axisHoverFormat:function(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?o:l)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:o,descriptionWithDates:l}},9811:function(e,t,r){"use strict";var n=r(4040),a=r(3816);function i(e,t){if(t&&t.length)for(var r=0;r<t.length;r++)if(t[r][e])return!0;return!1}t.id2name=function(e){if("string"==typeof e&&e.match(a.AX_ID_PATTERN)){var t=e.split(" ")[0].substr(1);return"1"===t&&(t=""),e.charAt(0)+"axis"+t}},t.name2id=function(e){if(e.match(a.AX_NAME_PATTERN)){var t=e.substr(5);return"1"===t&&(t=""),e.charAt(0)+t}},t.cleanId=function(e,t,r){var n=/( domain)$/.test(e);if("string"==typeof e&&e.match(a.AX_ID_PATTERN)&&(!t||e.charAt(0)===t)&&(!n||r)){var i=e.split(" ")[0].substr(1).replace(/^0+/,"");return"1"===i&&(i=""),e.charAt(0)+i+(n&&r?" domain":"")}},t.list=function(e,r,n){var a=e._fullLayout;if(!a)return[];var i,o=t.listIds(e,r),l=new Array(o.length);for(i=0;i<o.length;i++){var s=o[i];l[i]=a[s.charAt(0)+"axis"+s.substr(1)]}if(!n){var c=a._subplots.gl3d||[];for(i=0;i<c.length;i++){var u=a[c[i]];r?l.push(u[r+"axis"]):l.push(u.xaxis,u.yaxis,u.zaxis)}}return l},t.listIds=function(e,t){var r=e._fullLayout;if(!r)return[];var n=r._subplots;return t?n[t+"axis"]:n.xaxis.concat(n.yaxis)},t.getFromId=function(e,r,n){var a=e._fullLayout;return r=void 0===r||"string"!=typeof r?r:r.replace(" domain",""),"x"===n?r=r.replace(/y[0-9]*/,""):"y"===n&&(r=r.replace(/x[0-9]*/,"")),a[t.id2name(r)]},t.getFromTrace=function(e,r,a){var i=e._fullLayout,o=null;if(n.traceIs(r,"gl3d")){var l=r.scene;"scene"===l.substr(0,5)&&(o=i[l][a+"axis"])}else o=t.getFromId(e,r[a+"axis"]||a);return o},t.idSort=function(e,t){var r=e.charAt(0),n=t.charAt(0);return r!==n?r>n?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,r){"use strict";var n=r(8116).isTypedArraySpec;e.exports=function(e,t,r,a){if("category"===t.type){var i,o=e.categoryarray,l=Array.isArray(o)&&o.length>0||n(o);l&&(i="array");var s,c=r("categoryorder",i);"array"===c&&(s=r("categoryarray")),l||"array"!==c||(c=t.categoryorder="trace"),"trace"===c?t._initialCategories=[]:"array"===c?t._initialCategories=s.slice():(s=function(e,t){var r,n,a,i=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;n<t.data.length;n++){var l=t.data[n];l[i+"axis"]===e._id&&r.push(l)}for(n=0;n<r.length;n++){var s=r[n][i];for(a=0;a<s.length;a++){var c=s[a];null!=c&&(o[c]=1)}}return Object.keys(o)}(t,a).sort(),"category ascending"===c?t._initialCategories=s:"category descending"===c&&(t._initialCategories=s.reverse()))}}},8728:function(e,t,r){"use strict";var n=r(8248),a=r(3400),i=r(9032),o=i.ONEDAY,l=i.ONEWEEK;t.dtick=function(e,t){var r="log"===t,a="date"===t,i="category"===t,l=a?o:1;if(!e)return l;if(n(e))return(e=Number(e))<=0?l:i?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if("string"!=typeof e||!a&&!r)return l;var s=e.charAt(0),c=e.substr(1);return(c=n(c)?Number(c):0)<=0||!(a&&"M"===s&&c===Math.round(c)||r&&"L"===s||r&&"D"===s&&(1===c||2===c))?l:e},t.tick0=function(e,t,r,i){return"date"===t?a.cleanDate(e,a.dateTick0(r,i%l==0?1:0)):"D1"!==i&&"D2"!==i?n(e)?Number(e):0:void 0}},3816:function(e,t,r){"use strict";var n=r(3756).counter;e.exports={idRegex:{x:n("x","( domain)?"),y:n("y","( domain)?")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},1888:function(e,t,r){"use strict";var n=r(3400),a=r(9280),i=r(9811).id2name,o=r(4724),l=r(1160),s=r(8344),c=r(9032).ALMOST_EQUAL,u=r(4284).FROM_BL;function f(e,t,r){var a=r.axIds,l=r.layoutOut,s=r.hasImage,c=l._axisConstraintGroups,u=l._axisMatchGroups,f=t._id,v=f.charAt(0),g=((l._splomAxes||{})[v]||{})[f]||{},y=t._id,m="x"===y.charAt(0);function x(r,a){return n.coerce(e,t,o,r,a)}t._matchGroup=null,t._constraintGroup=null,x("constrain",s?"domain":"range"),n.coerce(e,t,{constraintoward:{valType:"enumerated",values:m?["left","center","right"]:["bottom","middle","top"],dflt:m?"center":"middle"}},"constraintoward");var b,_,w=t.type,T=[];for(b=0;b<a.length;b++)(_=a[b])!==y&&l[i(_)].type===w&&T.push(_);var M=h(c,y);if(M){var k=[];for(b=0;b<T.length;b++)M[_=T[b]]||k.push(_);T=k}var A,L,S=T.length;S&&(e.matches||g.matches)&&(A=n.coerce(e,t,{matches:{valType:"enumerated",values:T,dflt:-1!==T.indexOf(g.matches)?g.matches:void 0}},"matches"));var D=s&&!m?t.anchor:void 0;if(S&&!A&&(e.scaleanchor||D)&&(L=n.coerce(e,t,{scaleanchor:{valType:"enumerated",values:T.concat([!1])}},"scaleanchor",D)),A){t._matchGroup=p(u,y,A,1);var O=l[i(A)],C=d(l,t)/d(l,O);m!==("x"===A.charAt(0))&&(C=(m?"x":"y")+C),p(c,y,A,C)}else e.matches&&-1!==a.indexOf(e.matches)&&n.warn("ignored "+t._name+'.matches: "'+e.matches+'" to avoid an infinite loop');if(L){var P=x("scaleratio");P||(P=t.scaleratio=1),p(c,y,L,P)}else e.scaleanchor&&-1!==a.indexOf(e.scaleanchor)&&n.warn("ignored "+t._name+'.scaleanchor: "'+e.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function d(e,t){var r=t.domain;return r||(r=e[i(t.overlaying)].domain),r[1]-r[0]}function h(e,t){for(var r=0;r<e.length;r++)if(e[r][t])return e[r];return null}function p(e,t,r,n){var a,i,o,l,s,c=h(e,t);null===c?((c={})[t]=1,s=e.length,e.push(c)):s=e.indexOf(c);var u=Object.keys(c);for(a=0;a<e.length;a++)if(o=e[a],a!==s&&o[r]){var f=o[r];for(i=0;i<u.length;i++)o[l=u[i]]=v(f,v(n,c[l]));return void e.splice(s,1)}if(1!==n)for(i=0;i<u.length;i++){var d=u[i];c[d]=v(n,c[d])}c[r]=1}function v(e,t){var r,n,a="",i="";"string"==typeof e&&(r=(a=e.match(/^[xy]*/)[0]).length,e=+e.substr(r)),"string"==typeof t&&(n=(i=t.match(/^[xy]*/)[0]).length,t=+t.substr(n));var o=e*t;return r||n?r&&n&&a.charAt(0)!==i.charAt(0)?r===n?o:(r>n?a.substr(n):i.substr(r))+o:a+i+e*t:o}function g(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;o<i.length;o++){var l=i[o],s=e[l];if("string"==typeof s){var c=s.match(/^[xy]*/)[0],u=c.length;s=+s.substr(u);for(var f="y"===c.charAt(0)?n:1/n,d=0;d<u;d++)s*=f}a[l]=s}return a}function y(e,t){var r=e._inputDomain,n=u[e.constraintoward],a=r[0]+(r[1]-r[0])*n;e.domain=e._input.domain=[a+(r[0]-a)/t,a+(r[1]-a)/t],e.setScale()}t.handleDefaults=function(e,t,r){var a,o,l,c,u,d,h,p,v=r.axIds,g=r.axHasImage,y=t._axisConstraintGroups=[],m=t._axisMatchGroups=[];for(a=0;a<v.length;a++)f(u=e[c=i(v[a])],d=t[c],{axIds:v,layoutOut:t,hasImage:g[c]});function x(e,r){for(a=0;a<e.length;a++)for(l in o=e[a])t[i(l)][r]=o}for(x(m,"_matchGroup"),a=0;a<y.length;a++)for(l in o=y[a])if((d=t[i(l)]).fixedrange){for(var b in o){var _=i(b);!1===(e[_]||{}).fixedrange&&n.warn("fixedrange was specified as false for axis "+_+" but was overridden because another axis in its constraint group has fixedrange true"),t[_].fixedrange=!0}break}for(a=0;a<y.length;){for(l in o=y[a]){(d=t[i(l)])._matchGroup&&Object.keys(d._matchGroup).length===Object.keys(o).length&&(y.splice(a,1),a--);break}a++}x(y,"_constraintGroup");var w=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],T=!1,M=!1;function k(){p=d[h],"rangebreaks"===h&&(M=d._hasDayOfWeekBreaks)}for(a=0;a<m.length;a++){o=m[a];for(var A=0;A<w.length;A++){var L;for(l in h=w[A],p=null,o)if(u=e[c=i(l)],d=t[c],h in d){if(!d.matches&&(L=d,h in u)){k();break}null===p&&h in u&&k()}if("range"===h&&p&&u.range&&2===u.range.length&&null!==u.range[0]&&null!==u.range[1]&&(T=!0),"autorange"===h&&null===p&&T&&(p=!1),null===p&&h in L&&(p=L[h]),null!==p)for(l in o)(d=t[i(l)])[h]="range"===h?p.slice():p,"rangebreaks"===h&&(d._hasDayOfWeekBreaks=M,s(d,t))}}},t.enforce=function(e){var t,r,n,o,s,u,f,d,h=e._fullLayout,p=h._axisConstraintGroups||[];for(t=0;t<p.length;t++){n=g(p[t],h);var v=Object.keys(n),m=1/0,x=0,b=1/0,_={},w={},T=!1;for(r=0;r<v.length;r++)w[o=v[r]]=s=h[i(o)],s._inputDomain?s.domain=s._inputDomain.slice():s._inputDomain=s.domain.slice(),s._inputRange||(s._inputRange=s.range.slice()),s.setScale(),_[o]=u=Math.abs(s._m)/n[o],m=Math.min(m,u),"domain"!==s.constrain&&s._constraintShrinkable||(b=Math.min(b,u)),delete s._constraintShrinkable,x=Math.max(x,u),"domain"===s.constrain&&(T=!0);if(!(m>c*x)||T)for(r=0;r<v.length;r++)if(u=_[o=v[r]],f=(s=w[o]).constrain,u!==b||"domain"===f)if(d=u/b,"range"===f)l(s,d);else{var M=s._inputDomain,k=(s.domain[1]-s.domain[0])/(M[1]-M[0]),A=(s.r2l(s.range[1])-s.r2l(s.range[0]))/(s.r2l(s._inputRange[1])-s.r2l(s._inputRange[0]));if((d/=k)*A<1){s.domain=s._input.domain=M.slice(),l(s,d);continue}if(A<1&&(s.range=s._input.range=s._inputRange.slice(),d*=A),s.autorange){var L=s.r2l(s.range[0]),S=s.r2l(s.range[1]),D=(L+S)/2,O=D,C=D,P=Math.abs(S-D),I=D-P*d*1.0001,R=D+P*d*1.0001,z=a.makePadFn(h,s,0),N=a.makePadFn(h,s,1);y(s,d);var F,E,H=Math.abs(s._m),B=a.concatExtremes(e,s),j=B.min,Y=B.max;for(E=0;E<j.length;E++)(F=j[E].val-z(j[E])/H)>I&&F<O&&(O=F);for(E=0;E<Y.length;E++)(F=Y[E].val+N(Y[E])/H)<R&&F>C&&(C=F);d/=(C-O)/(2*P),O=s.l2r(O),C=s.l2r(C),s.range=s._input.range=L<S?[O,C]:[C,O]}y(s,d)}}},t.getAxisGroup=function(e,t){for(var r=e._axisMatchGroups,n=0;n<r.length;n++)if(r[n][t])return"g"+n;return t},t.clean=function(e,t){if(t._inputDomain){for(var r=!1,n=t._id,a=e._fullLayout._axisConstraintGroups,i=0;i<a.length;i++)if(a[i][n]){r=!0;break}r&&"domain"===t.constrain||(t._input.domain=t.domain=t._inputDomain,delete t._inputDomain)}}},1184:function(e,t,r){"use strict";var n=r(3428),a=r(3400),i=a.numberFormat,o=r(9760),l=r(9184),s=r(4040),c=a.strTranslate,u=r(2736),f=r(6308),d=r(3616),h=r(3024),p=r(4460),v=r(3972),g=r(6476),y=r(2760),m=y.selectingOrDrawing,x=y.freeMode,b=r(4284).FROM_TL,_=r(3696),w=r(9172).redrawReglTraces,T=r(7316),M=r(9811).getFromId,k=r(2676).prepSelect,A=r(2676).clearOutline,L=r(2676).selectOnClick,S=r(1160),D=r(3816),O=D.MINDRAG,C=D.MINZOOM,P=!0;function I(e,t,r,n){var i=a.ensureSingle(e.draglayer,t,r,(function(t){t.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",e.id)}));return i.call(v,n),i.node()}function R(e,t,r,a,i,o,l){var s=I(e,"rect",t,r);return n.select(s).call(d.setRect,a,i,o,l),s}function z(e,t){for(var r=0;r<e.length;r++)if(!e[r].fixedrange)return t;return""}function N(e,t,r,n,a){for(var i=0;i<e.length;i++){var o=e[i];if(!o.fixedrange)if(o.rangebreaks){var l="y"===o._id.charAt(0),s=l?1-t:t,c=l?1-r:r;n[o._name+".range[0]"]=o.l2r(o.p2l(s*o._length)),n[o._name+".range[1]"]=o.l2r(o.p2l(c*o._length))}else{var u=o._rl[0],f=o._rl[1]-u;n[o._name+".range[0]"]=o.l2r(u+f*t),n[o._name+".range[1]"]=o.l2r(u+f*r)}}if(a&&a.length){var d=(t+(1-r))/2;N(a,d,1-d,n,[])}}function F(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(!n.fixedrange){if(n.rangebreaks){var a=n._length,i=(n.p2l(0+t)-n.p2l(0)+(n.p2l(a+t)-n.p2l(a)))/2;n.range=[n.l2r(n._rl[0]-i),n.l2r(n._rl[1]-i)]}else n.range=[n.l2r(n._rl[0]-t/n._m),n.l2r(n._rl[1]-t/n._m)];n.limitRange&&n.limitRange()}}}function E(e){return 1-(e>=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function H(e,t,r,n,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",c(r,n)).attr("d",a+"Z")}function B(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(t,r)).attr("d","M0,0Z")}function j(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Y(e,t,a,i)}function Y(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function V(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function U(e){P&&e.data&&e._context.showTips&&(a.notifier(a._(e,"Double-click to zoom back out"),"long"),P=!1)}function q(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,C)/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 G(e,t,r,n,i){for(var o,l,s,c,u=!1,f={},d={},h=(i||{}).xaHash,p=(i||{}).yaHash,v=0;v<t.length;v++){var g=t[v];for(o in r)if(g[o]){for(s in g)i&&(h[s]||p[s])||("x"===s.charAt(0)?r:n)[s]||(f[s]=o);for(l in n)i&&(h[l]||p[l])||!g[l]||(u=!0)}for(l in n)if(g[l])for(c in g)i&&(h[c]||p[c])||("x"===c.charAt(0)?r:n)[c]||(d[c]=l)}u&&(a.extendFlat(f,d),d={});var y={},m=[];for(s in f){var x=M(e,s);m.push(x),y[x._id]=x}var b={},_=[];for(c in d){var w=M(e,c);_.push(w),b[w._id]=w}return{xaHash:y,yaHash:b,xaxes:m,yaxes:_,xLinks:f,yLinks:d,isSubplotConstrained:u}}function Z(e,t){if(l){var r=void 0!==e.onwheel?"wheel":"mousewheel";e._onwheel&&e.removeEventListener(r,e._onwheel),e._onwheel=t,e.addEventListener(r,t,{passive:!1})}else void 0!==e.onwheel?e.onwheel=t:void 0!==e.onmousewheel?e.onmousewheel=t:e.isAddedWheelEvent||(e.isAddedWheelEvent=!0,e.addEventListener("wheel",t,{passive:!1}))}function W(e){var t=[];for(var r in e)t.push(e[r]);return t}e.exports={makeDragBox:function(e,t,r,l,c,f,v,y){var P,I,Y,X,J,K,Q,$,ee,te,re,ne,ae,ie,oe,le,se,ce,ue,fe,de,he,pe,ve=e._fullLayout._zoomlayer,ge=v+y==="nsew",ye=1===(v+y).length;function me(){if(P=t.xaxis,I=t.yaxis,ee=P._length,te=I._length,Q=P._offset,$=I._offset,(Y={})[P._id]=P,(X={})[I._id]=I,v&&y)for(var r=t.overlays,n=0;n<r.length;n++){var a=r[n].xaxis;Y[a._id]=a;var i=r[n].yaxis;X[i._id]=i}J=W(Y),K=W(X),ae=z(J,y),ie=z(K,v),oe=!ie&&!ae,ne=G(e,e._fullLayout._axisMatchGroups,Y,X);var o=(re=G(e,e._fullLayout._axisConstraintGroups,Y,X,ne)).isSubplotConstrained||ne.isSubplotConstrained;le=y||o,se=v||o;var l=e._fullLayout;ce=l._has("scattergl"),ue=l._has("splom"),fe=l._has("svg")}r+=t.yaxis._shift,me();var xe=function(e,t,r){return e?"nsew"===e?r?"":"pan"===t?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}(ie+ae,e._fullLayout.dragmode,ge),be=R(t,v+y+"drag",xe,r,l,c,f);if(oe&&!ge)return be.onmousedown=null,be.style.pointerEvents="none",be;var _e,we,Te,Me,ke,Ae,Le,Se,De,Oe,Ce={element:be,gd:e,plotinfo:t};function Pe(){Ce.plotinfo.selection=!1,A(e)}function Ie(e,r){var a=Ce.gd;if(a._fullLayout._activeShapeIndex>=0)a._fullLayout._deactivateShape(a);else{var o=a._fullLayout.clickmode;if(V(a),2!==e||ye||Ue(),ge)o.indexOf("select")>-1&&L(r,a,J,K,t.id,Ce),o.indexOf("event")>-1&&h.click(a,r,t.id);else if(1===e&&ye){var l=v?I:P,c="s"===v||"w"===y?0:1,f=l._name+".range["+c+"]",d=function(e,t){var r,n=e.range[t],a=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,i("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,i("."+String(r)+"g")(n))}(l,c),p="left",g="middle";if(l.fixedrange)return;v?(g="n"===v?"top":"bottom","right"===l.side&&(p="right")):"e"===y&&(p="right"),a._context.showAxisRangeEntryBoxes&&n.select(be).call(u.makeEditable,{gd:a,immediate:!0,background:a._fullLayout.paper_bgcolor,text:String(d),fill:l.tickfont?l.tickfont.color:"#444",horizontalAlign:p,verticalAlign:g}).on("edit",(function(e){var t=l.d2r(e);void 0!==t&&s.call("_guiRelayout",a,f,t)}))}}}function Re(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,he*t+_e)),a=Math.max(0,Math.min(te,pe*r+we)),i=Math.abs(n-_e),o=Math.abs(a-we);function l(){Le="",Te.r=Te.l,Te.t=Te.b,De.attr("d","M0,0Z")}if(Te.l=Math.min(_e,n),Te.r=Math.max(_e,n),Te.t=Math.min(we,a),Te.b=Math.max(we,a),re.isSubplotConstrained)i>C||o>C?(Le="xy",i/ee>o/te?(o=i*te/ee,we>a?Te.t=we-o:Te.b=we+o):(i=o*ee/te,_e>n?Te.l=_e-i:Te.r=_e+i),De.attr("d",q(Te))):l();else if(ne.isSubplotConstrained)if(i>C||o>C){Le="xy";var s=Math.min(Te.l/ee,(te-Te.b)/te),c=Math.max(Te.r/ee,(te-Te.t)/te);Te.l=s*ee,Te.r=c*ee,Te.b=(1-s)*te,Te.t=(1-c)*te,De.attr("d",q(Te))}else l();else!ie||o<Math.min(Math.max(.6*i,O),C)?i<O||!ae?l():(Te.t=0,Te.b=te,Le="x",De.attr("d",function(e,t){return"M"+(e.l-.5)+","+(t-C-.5)+"h-3v"+(2*C+1)+"h3ZM"+(e.r+.5)+","+(t-C-.5)+"h3v"+(2*C+1)+"h-3Z"}(Te,we))):!ae||i<Math.min(.6*o,C)?(Te.l=0,Te.r=ee,Le="y",De.attr("d",function(e,t){return"M"+(t-C-.5)+","+(e.t-.5)+"v-3h"+(2*C+1)+"v3ZM"+(t-C-.5)+","+(e.b+.5)+"v3h"+(2*C+1)+"v-3Z"}(Te,_e))):(Le="xy",De.attr("d",q(Te)));Te.w=Te.r-Te.l,Te.h=Te.b-Te.t,Le&&(Oe=!0),e._dragged=Oe,j(Se,De,Te,ke,Ae,Me),ze(),e.emit("plotly_relayouting",de),Ae=!0}function ze(){de={},"xy"!==Le&&"x"!==Le||(N(J,Te.l/ee,Te.r/ee,de,re.xaxes),Ye("x",de)),"xy"!==Le&&"y"!==Le||(N(K,(te-Te.b)/te,(te-Te.t)/te,de,re.yaxes),Ye("y",de))}function Ne(){ze(),V(e),qe(),U(e)}Ce.prepFn=function(t,r,n){var i=Ce.dragmode,l=e._fullLayout.dragmode;l!==i&&(Ce.dragmode=l),me(),he=e._fullLayout._invScaleX,pe=e._fullLayout._invScaleY,oe||(ge?t.shiftKey?"pan"===l?l="zoom":m(l)||(l="pan"):t.ctrlKey&&(l="pan"):l="pan"),x(l)?Ce.minDrag=1:Ce.minDrag=void 0,m(l)?(Ce.xaxes=J,Ce.yaxes=K,k(t,r,n,Ce,l)):(Ce.clickFn=Ie,m(i)&&Pe(),oe||("zoom"===l?(Ce.moveFn=Re,Ce.doneFn=Ne,Ce.minDrag=1,function(t,r,n){var i=be.getBoundingClientRect();_e=r-i.left,we=n-i.top,e._fullLayout._calcInverseTransform(e);var l=a.apply3DTransform(e._fullLayout._invTransform)(_e,we);_e=l[0],we=l[1],Te={l:_e,r:_e,w:0,t:we,b:we,h:0},Me=e._hmpixcount?e._hmlumcount/e._hmpixcount:o(e._fullLayout.plot_bgcolor).getLuminance(),Ae=!1,Le="xy",Oe=!1,Se=H(ve,Me,Q,$,ke="M0,0H"+ee+"V"+te+"H0V0"),De=B(ve,Q,$)}(0,r,n)):"pan"===l&&(Ce.moveFn=je,Ce.doneFn=qe))),e._fullLayout._redrag=function(){var t=e._dragdata;if(t&&t.element===be){var r=e._fullLayout.dragmode;m(r)||(me(),Ge([0,0,ee,te]),Ce.moveFn(t.dx,t.dy))}}},g.init(Ce);var Fe=[0,0,ee,te],Ee=null,He=D.REDRAWDELAY,Be=t.mainplot?e._fullLayout._plots[t.mainplot]:t;function je(t,r){if(t*=he,r*=pe,!e._transitioningWithDuration){if(e._fullLayout._replotting=!0,"ew"===ae||"ns"===ie){var n=ae?-t:0,a=ie?-r:0;if(ne.isSubplotConstrained){if(ae&&ie){var i=(t/ee-r/te)/2;n=-(t=i*ee),a=-(r=-i*te)}ie?n=-a*ee/te:a=-n*te/ee}return ae&&(F(J,t),Ye("x")),ie&&(F(K,r),Ye("y")),Ge([n,a,ee,te]),Ve(),void e.emit("plotly_relayouting",de)}var o,l,s="w"===ae==("n"===ie)?1:-1;if(ae&&ie&&(re.isSubplotConstrained||ne.isSubplotConstrained)){var c=(t/ee+s*r/te)/2;t=c*ee,r=s*c*te}if("w"===ae?t=h(J,0,t):"e"===ae?t=h(J,1,-t):ae||(t=0),"n"===ie?r=h(K,1,r):"s"===ie?r=h(K,0,-r):ie||(r=0),o="w"===ae?t:0,l="n"===ie?r:0,re.isSubplotConstrained&&!ne.isSubplotConstrained||ne.isSubplotConstrained&&ae&&ie&&s>0){var u;if(ne.isSubplotConstrained||!ae&&1===ie.length){for(u=0;u<J.length;u++)J[u].range=J[u]._r.slice(),S(J[u],1-r/te);o=(t=r*ee/te)/2}if(ne.isSubplotConstrained||!ie&&1===ae.length){for(u=0;u<K.length;u++)K[u].range=K[u]._r.slice(),S(K[u],1-t/ee);l=(r=t*te/ee)/2}}ne.isSubplotConstrained&&ie||Ye("x"),ne.isSubplotConstrained&&ae||Ye("y");var f=ee-t,d=te-r;!ne.isSubplotConstrained||ae&&ie||(ae?(l=o?0:t*te/ee,d=f*te/ee):(o=l?0:r*ee/te,f=d*ee/te)),Ge([o,l,f,d]),Ve(),e.emit("plotly_relayouting",de)}function h(e,t,r){for(var n,a,i=1-t,o=0;o<e.length;o++){var l=e[o];if(!l.fixedrange){n=l,a=l._rl[i]+(l._rl[t]-l._rl[i])/E(r/l._length);var s=l.l2r(a);!1!==s&&void 0!==s&&(l.range[t]=s)}}return n._length*(n._rl[t]-a)/(n._rl[t]-n._rl[i])}}function Ye(e,t){for(var r=ne.isSubplotConstrained?{x:K,y:J}[e]:ne[e+"axes"],n=ne.isSubplotConstrained?{x:J,y:K}[e]:[],a=0;a<r.length;a++){var i=r[a],o=i._id,l=ne.xLinks[o]||ne.yLinks[o],s=n[0]||Y[l]||X[l];s&&(t?(t[i._name+".range[0]"]=t[s._name+".range[0]"],t[i._name+".range[1]"]=t[s._name+".range[1]"]):i.range=s.range.slice())}}function Ve(){var r,n=[];function a(e){for(r=0;r<e.length;r++)e[r].fixedrange||n.push(e[r]._id)}function i(e,t){for(r=0;r<e.length;r++){var a=e[r],i=a[t];a.fixedrange||"sync"!==i.tickmode||n.push(i._id)}}for(le&&(a(J),a(re.xaxes),a(ne.xaxes),i(t.overlays,"xaxis")),se&&(a(K),a(re.yaxes),a(ne.yaxes),i(t.overlays,"yaxis")),de={},r=0;r<n.length;r++){var o=n[r],l=M(e,o);p.drawOne(e,l,{skipTitle:!0}),de[l._name+".range[0]"]=l.range[0],de[l._name+".range[1]"]=l.range[1]}p.redrawComponents(e,n)}function Ue(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,r=[];ae&&(r=r.concat(J)),ie&&(r=r.concat(K)),ne.xaxes&&(r=r.concat(ne.xaxes)),ne.yaxes&&(r=r.concat(ne.yaxes));var n,a,i={};if("reset+autosize"===t)for(t="autosize",a=0;a<r.length;a++){var o=(n=r[a])._rangeInitial0,l=n._rangeInitial1,c=void 0!==o||void 0!==l;if(c&&(void 0!==o&&o!==n.range[0]||void 0!==l&&l!==n.range[1])||!c&&!0!==n.autorange){t="reset";break}}if("autosize"===t)for(a=0;a<r.length;a++)(n=r[a]).fixedrange||(i[n._name+".autorange"]=!0);else if("reset"===t)for((ae||re.isSubplotConstrained)&&(r=r.concat(re.xaxes)),ie&&!re.isSubplotConstrained&&(r=r.concat(re.yaxes)),re.isSubplotConstrained&&(ae?ie||(r=r.concat(K)):r=r.concat(J)),a=0;a<r.length;a++)if(!(n=r[a]).fixedrange){var u=n._name,f=n._autorangeInitial;void 0===n._rangeInitial0&&void 0===n._rangeInitial1?i[u+".autorange"]=!0:void 0===n._rangeInitial0?(i[u+".autorange"]=f,i[u+".range"]=[null,n._rangeInitial1]):void 0===n._rangeInitial1?(i[u+".range"]=[n._rangeInitial0,null],i[u+".autorange"]=f):i[u+".range"]=[n._rangeInitial0,n._rangeInitial1]}e.emit("plotly_doubleclick",null),s.call("_guiRelayout",e,i)}}function qe(){Ge([0,0,ee,te]),a.syncOrAsync([T.previousPromises,function(){e._fullLayout._replotting=!1,s.call("_guiRelayout",e,de)}],e)}function Ge(t){var r,n,i,o,l=e._fullLayout,c=l._plots,u=l._subplots.cartesian;if(ue&&s.subplotsRegistry.splom.drag(e),ce)for(r=0;r<u.length;r++)if(i=(n=c[u[r]]).xaxis,o=n.yaxis,n._scene){var f=a.simpleMap(i.range,i.r2l),h=a.simpleMap(o.range,o.r2l);i.limitRange&&i.limitRange(),o.limitRange&&o.limitRange(),f=i.range,h=o.range,n._scene.update({range:[f[0],h[0],f[1],h[1]]})}if((ue||ce)&&(_(e),w(e)),fe){var p=t[2]/P._length,g=t[3]/I._length;for(r=0;r<u.length;r++){i=(n=c[u[r]]).xaxis,o=n.yaxis;var m,x,b,T,M=(le||ne.isSubplotConstrained)&&!i.fixedrange&&Y[i._id],k=(se||ne.isSubplotConstrained)&&!o.fixedrange&&X[o._id];if(M?(m=p,b=y||ne.isSubplotConstrained?t[0]:Xe(i,m)):ne.xaHash[i._id]?(m=p,b=t[0]*i._length/P._length):ne.yaHash[i._id]?(m=g,b="ns"===ie?-t[1]*i._length/I._length:Xe(i,m,{n:"top",s:"bottom"}[ie])):b=We(i,m=Ze(i,p,g)),m>1&&(void 0!==i.maxallowed&&le===(i.range[0]<i.range[1]?"e":"w")||void 0!==i.minallowed&&le===(i.range[0]<i.range[1]?"w":"e"))&&(m=1,b=0),k?(x=g,T=v||ne.isSubplotConstrained?t[1]:Xe(o,x)):ne.yaHash[o._id]?(x=g,T=t[1]*o._length/I._length):ne.xaHash[o._id]?(x=p,T="ew"===ae?-t[0]*o._length/P._length:Xe(o,x,{e:"right",w:"left"}[ae])):T=We(o,x=Ze(o,p,g)),x>1&&(void 0!==o.maxallowed&&se===(o.range[0]<o.range[1]?"n":"s")||void 0!==o.minallowed&&se===(o.range[0]<o.range[1]?"s":"n"))&&(x=1,T=0),m||x){m||(m=1),x||(x=1);var A=i._offset-b/m,L=o._offset-T/x;n.clipRect.call(d.setTranslate,b,T).call(d.setScale,m,x),n.plot.call(d.setTranslate,A,L).call(d.setScale,1/m,1/x),m===n.xScaleFactor&&x===n.yScaleFactor||(d.setPointGroupScale(n.zoomScalePts,m,x),d.setTextPointsScale(n.zoomScaleTxt,m,x)),d.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),n.xScaleFactor=m,n.yScaleFactor=x}}}}function Ze(e,t,r){return e.fixedrange?0:le&&re.xaHash[e._id]?t:se&&(re.isSubplotConstrained?re.xaHash:re.yaHash)[e._id]?r:0}function We(e,t){return t?(e.range=e._r.slice(),S(e,t),Xe(e,t)):0}function Xe(e,t,r){return e._length*(1-t)*b[r||e.constraintoward||"middle"]}return v.length*y.length!=1&&Z(be,(function(t){if(e._context._scrollZoom.cartesian||e._fullLayout._enablescrollzoom){if(Pe(),e._transitioningWithDuration)return t.preventDefault(),void t.stopPropagation();me(),clearTimeout(Ee);var r=-t.deltaY;if(isFinite(r)||(r=t.wheelDelta/10),isFinite(r)){var n,i=Math.exp(-Math.min(Math.max(r,-20),20)/200),o=Be.draglayer.select(".nsewdrag").node().getBoundingClientRect(),l=(t.clientX-o.left)/o.width,s=(o.bottom-t.clientY)/o.height;if(le){for(y||(l=.5),n=0;n<J.length;n++)c(J[n],l,i);Ye("x"),Fe[2]*=i,Fe[0]+=Fe[2]*l*(1/i-1)}if(se){for(v||(s=.5),n=0;n<K.length;n++)c(K[n],s,i);Ye("y"),Fe[3]*=i,Fe[1]+=Fe[3]*(1-s)*(1/i-1)}Ge(Fe),Ve(),e.emit("plotly_relayouting",de),Ee=setTimeout((function(){e._fullLayout&&(Fe=[0,0,ee,te],qe())}),He),t.preventDefault()}else a.log("Did not find wheel motion attributes: ",t)}function c(e,t,r){if(!e.fixedrange){var n=a.simpleMap(e.range,e.r2l),i=n[0]+(n[1]-n[0])*t;e.range=n.map((function(t){return e.l2r(i+(t-i)*r)}))}}})),be},makeDragger:I,makeRectDragger:R,makeZoombox:H,makeCorners:B,updateZoombox:j,xyCorners:q,transitionZoombox:Y,removeZoombox:V,showDoubleClickNotifier:U,attachWheelEventHandler:Z}},2464:function(e,t,r){"use strict";var n=r(3428),a=r(3024),i=r(6476),o=r(3972),l=r(1184).makeDragBox,s=r(3816).DRAGGERSIZE;t.initInteractions=function(e){var r=e._fullLayout;if(e._context.staticPlot)n.select(e).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(e,t){if((r._plots[e].mainplot&&!0)===(r._plots[t].mainplot&&!0)){var n=e.split("y"),a=t.split("y");return n[0]===a[0]?Number(n[1]||1)-Number(a[1]||1):Number(n[0]||1)-Number(a[0]||1)}return r._plots[e].mainplot?1:-1})).forEach((function(t){var n=r._plots[t],o=n.xaxis,c=n.yaxis;if(!n.mainplot){var u=l(e,n,o._offset,c._offset,o._length,c._length,"ns","ew");u.onmousemove=function(r){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===t&&e._fullLayout._plots[t]&&a.hover(e,r,t)},a.hover(e,r,t),e._fullLayout._lasthover=u,e._fullLayout._hoversubplot=t},u.onmouseout=function(t){e._dragging||(e._fullLayout._hoversubplot=null,i.unhover(e,t))},e._context.showAxisDragHandles&&(l(e,n,o._offset-s,c._offset-s,s,s,"n","w"),l(e,n,o._offset+o._length,c._offset-s,s,s,"n","e"),l(e,n,o._offset-s,c._offset+c._length,s,s,"s","w"),l(e,n,o._offset+o._length,c._offset+c._length,s,s,"s","e"))}if(e._context.showAxisDragHandles){if(t===o._mainSubplot){var f=o._mainLinePosition;"top"===o.side&&(f-=s),l(e,n,o._offset+.1*o._length,f,.8*o._length,s,"","ew"),l(e,n,o._offset,f,.1*o._length,s,"","w"),l(e,n,o._offset+.9*o._length,f,.1*o._length,s,"","e")}if(t===c._mainSubplot){var d=c._mainLinePosition;"right"!==c.side&&(d-=s),l(e,n,d,c._offset+.1*c._length,s,.8*c._length,"ns",""),l(e,n,d,c._offset+.9*c._length,s,.1*c._length,"s",""),l(e,n,d,c._offset,s,.1*c._length,"n","")}}}));var o=r._hoverlayer.node();o.onmousemove=function(t){t.target=e._fullLayout._lasthover,a.hover(e,t,r._hoversubplot)},o.onclick=function(t){t.target=e._fullLayout._lasthover,a.click(e,t)},o.onmousedown=function(t){e._fullLayout._lasthover.onmousedown(t)},t.updateFx(e)}},t.updateFx=function(e){var t=e._fullLayout,r="pan"===t.dragmode?"move":"crosshair";o(t._draggers,r)}},6632:function(e,t,r){"use strict";var n=r(4040),a=r(3400),i=r(9811);e.exports=function(e){return function(t,r){var o=t[e];if(Array.isArray(o))for(var l=n.subplotsRegistry.cartesian,s=l.idRegex,c=r._subplots,u=c.xaxis,f=c.yaxis,d=c.cartesian,h=r._has("cartesian")||r._has("gl2d"),p=0;p<o.length;p++){var v=o[p];if(a.isPlainObject(v)){var g=i.cleanId(v.xref,"x",!1),y=i.cleanId(v.yref,"y",!1),m=s.x.test(g),x=s.y.test(y);if(m||x){h||a.pushUnique(r._basePlotModules,l);var b=!1;m&&-1===u.indexOf(g)&&(u.push(g),b=!0),x&&-1===f.indexOf(y)&&(f.push(y),b=!0),b&&m&&x&&d.push(g+y)}}}}}},7952:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(3400),o=r(7316),l=r(3616),s=r(4888)._M,c=r(9811),u=r(3816),f=r(9616),d=i.ensureSingle;function h(e,t,r){return i.ensureSingle(e,t,r,(function(e){e.datum(r)}))}function p(e,t,r,o,c){for(var f,d,h,p=u.traceLayerClasses,v=e._fullLayout,g=v._modules,y={},m=0;m<r.length;m++){var x=r[m][0].trace.zorder||0;y[x]||(y[x]=[]),y[x].push(r[m])}for(var b=[],_=[],w=Object.keys(y).map(Number).sort(i.sorterAsc),T=0;T<w.length;T++)for(var M=w[T],k=0;k<g.length;k++){var A=(f=g[k]).name,L=a.modules[A].categories;if(L.svg){var S=(f.layerName||A+"layer")+(T?Number(T)+1:""),D=f.plot;h=(d=s(r,D,M))[0],r=d[1],h.length&&b.push({i:p.indexOf(S),zorder:T,className:S,plotMethod:D,cdModule:h}),L.zoomScale&&_.push("."+S)}}b.sort((function(e,t){return(e.zorder||0)-(t.zorder||0)||e.i-t.i}));var O=t.plot.selectAll("g.mlayer").data(b,(function(e){return e.className}));if(O.enter().append("g").attr("class",(function(e){return e.className})).classed("mlayer",!0).classed("rangeplot",t.isRangePlot),O.exit().remove(),O.order(),O.each((function(r){var a=n.select(this),i=r.className;r.plotMethod(e,t,r.cdModule,a,o,c),-1===u.clipOnAxisFalseQuery.indexOf("."+i)&&l.setClipUrl(a,t.layerClipId,e)})),v._has("scattergl")&&(f=a.getModule("scattergl"),h=s(r,f)[0],f.plot(e,t,h)),!e._context.staticPlot&&(t._hasClipOnAxisFalse&&(t.clipOnAxisFalseTraces=t.plot.selectAll(u.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),_.length)){var C=t.plot.selectAll(_.join(",")).selectAll(".trace");t.zoomScalePts=C.selectAll("path.point"),t.zoomScaleTxt=C.selectAll(".textpoint")}}function v(e,t){var r=t.plotgroup,n=t.id,a=u.layerValue2layerClass[t.xaxis.layer],i=u.layerValue2layerClass[t.yaxis.layer],o=e._fullLayout._hasOnlyLargeSploms;if(t.mainplot){var l=t.mainplotinfo,s=l.plotgroup,f=n+"-x",p=n+"-y";t.minorGridlayer=l.minorGridlayer,t.gridlayer=l.gridlayer,t.zerolinelayer=l.zerolinelayer,d(l.overlinesBelow,"path",f),d(l.overlinesBelow,"path",p),d(l.overaxesBelow,"g",f),d(l.overaxesBelow,"g",p),t.plot=d(l.overplot,"g",n),d(l.overlinesAbove,"path",f),d(l.overlinesAbove,"path",p),d(l.overaxesAbove,"g",f),d(l.overaxesAbove,"g",p),t.xlines=s.select(".overlines-"+a).select("."+f),t.ylines=s.select(".overlines-"+i).select("."+p),t.xaxislayer=s.select(".overaxes-"+a).select("."+f),t.yaxislayer=s.select(".overaxes-"+i).select("."+p)}else if(o)t.xlines=d(r,"path","xlines-above"),t.ylines=d(r,"path","ylines-above"),t.xaxislayer=d(r,"g","xaxislayer-above"),t.yaxislayer=d(r,"g","yaxislayer-above");else{var v=d(r,"g","layer-subplot");t.shapelayer=d(v,"g","shapelayer"),t.imagelayer=d(v,"g","imagelayer"),t.minorGridlayer=d(r,"g","minor-gridlayer"),t.gridlayer=d(r,"g","gridlayer"),t.zerolinelayer=d(r,"g","zerolinelayer");var g=d(r,"g","layer-between");t.shapelayerBetween=d(g,"g","shapelayer"),t.imagelayerBetween=d(g,"g","imagelayer"),d(r,"path","xlines-below"),d(r,"path","ylines-below"),t.overlinesBelow=d(r,"g","overlines-below"),d(r,"g","xaxislayer-below"),d(r,"g","yaxislayer-below"),t.overaxesBelow=d(r,"g","overaxes-below"),t.plot=d(r,"g","plot"),t.overplot=d(r,"g","overplot"),t.xlines=d(r,"path","xlines-above"),t.ylines=d(r,"path","ylines-above"),t.overlinesAbove=d(r,"g","overlines-above"),d(r,"g","xaxislayer-above"),d(r,"g","yaxislayer-above"),t.overaxesAbove=d(r,"g","overaxes-above"),t.xlines=r.select(".xlines-"+a),t.ylines=r.select(".ylines-"+i),t.xaxislayer=r.select(".xaxislayer-"+a),t.yaxislayer=r.select(".yaxislayer-"+i)}o||(h(t.minorGridlayer,"g",t.xaxis._id),h(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map((function(e){return e[0]})).sort(c.idSort),h(t.gridlayer,"g",t.xaxis._id),h(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map((function(e){return e[0]})).sort(c.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0)}function g(e,t){if(e){var r={};for(var a in e.each((function(e){var a=e[0];n.select(this).remove(),y(a,t),r[a]=!0})),t._plots)for(var i=t._plots[a].overlays||[],o=0;o<i.length;o++){var l=i[o];r[l.id]&&l.plot.selectAll(".trace").remove()}}}function y(e,t){t._draggers.selectAll("g."+e).remove(),t._defs.select("#clip"+t._uid+e+"plot").remove()}t.name="cartesian",t.attr=["xaxis","yaxis"],t.idRoot=["x","y"],t.idRegex=u.idRegex,t.attrRegex=u.attrRegex,t.attributes=r(6720),t.layoutAttributes=r(4724),t.supplyLayoutDefaults=r(7352),t.transitionAxes=r(3736),t.finalizeSubplots=function(e,t){var r,n,a,o=t._subplots,l=o.xaxis,s=o.yaxis,f=o.cartesian,d=f.concat(o.gl2d||[]),h={},p={};for(r=0;r<d.length;r++){var v=d[r].split("y");h[v[0]]=1,p["y"+v[1]]=1}for(r=0;r<l.length;r++)h[n=l[r]]||(a=(e[c.id2name(n)]||{}).anchor,u.idRegex.y.test(a)||(a="y"),f.push(n+a),d.push(n+a),p[a]||(p[a]=1,i.pushUnique(s,a)));for(r=0;r<s.length;r++)p[a=s[r]]||(n=(e[c.id2name(a)]||{}).anchor,u.idRegex.x.test(n)||(n="x"),f.push(n+a),d.push(n+a),h[n]||(h[n]=1,i.pushUnique(l,n)));if(!d.length){for(var g in n="",a="",e)u.attrRegex.test(g)&&("x"===g.charAt(0)?(!n||+g.substr(5)<+n.substr(5))&&(n=g):(!a||+g.substr(5)<+a.substr(5))&&(a=g));n=n?c.name2id(n):"x",a=a?c.name2id(a):"y",l.push(n),s.push(a),f.push(n+a)}},t.plot=function(e,t,r,n){var a,i=e._fullLayout,o=i._subplots.cartesian,l=e.calcdata;if(!Array.isArray(t))for(t=[],a=0;a<l.length;a++)t.push(a);for(a=0;a<o.length;a++){for(var s,c=o[a],u=i._plots[c],f=[],d=0;d<l.length;d++){var h=l[d],v=h[0].trace;v.xaxis+v.yaxis===c&&((-1!==t.indexOf(v.index)||v.carpet)&&(s&&s[0].trace.xaxis+s[0].trace.yaxis===c&&-1!==["tonextx","tonexty","tonext"].indexOf(v.fill)&&-1===f.indexOf(s)&&f.push(s),f.push(h)),s=h)}p(e,u,f,r,n)}},t.clean=function(e,t,r,n){var a,i,o,l=n._plots||{},s=t._plots||{},u=n._subplots||{};if(n._hasOnlyLargeSploms&&!t._hasOnlyLargeSploms)for(o in l)(a=l[o]).plotgroup&&a.plotgroup.remove();var f=n._has&&n._has("gl"),d=t._has&&t._has("gl");if(f&&!d)for(o in l)(a=l[o])._scene&&a._scene.destroy();if(u.xaxis&&u.yaxis){var h=c.listIds({_fullLayout:n});for(i=0;i<h.length;i++){var p=h[i];t[c.id2name(p)]||n._infolayer.selectAll(".g-"+p+"title").remove()}}var v=n._has&&n._has("cartesian"),m=t._has&&t._has("cartesian");if(v&&!m)g(n._cartesianlayer.selectAll(".subplot"),n),n._defs.selectAll(".axesclip").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(u.cartesian)for(i=0;i<u.cartesian.length;i++){var x=u.cartesian[i];if(!s[x]){var b="."+x+",."+x+"-x,."+x+"-y";n._cartesianlayer.selectAll(b).remove(),y(x,n)}}},t.drawFramework=function(e){var t=e._fullLayout,r=function(e){var t,r,n,a,i,o,l=e._fullLayout,s=l._subplots.cartesian,c=s.length,u=[],f=[];for(t=0;t<c;t++){n=s[t],i=(a=l._plots[n]).xaxis,o=a.yaxis;var d=i._mainAxis,h=o._mainAxis,p=d._id+h._id,v=l._plots[p];a.overlays=[],p!==n&&v?(a.mainplot=p,a.mainplotinfo=v,f.push(n)):(a.mainplot=void 0,a.mainplotinfo=void 0,u.push(n))}for(t=0;t<f.length;t++)n=f[t],(a=l._plots[n]).mainplotinfo.overlays.push(a);var g=u.concat(f),y=new Array(c);for(t=0;t<c;t++){n=g[t],i=(a=l._plots[n]).xaxis,o=a.yaxis;var m=[n,i.layer,o.layer,i.overlaying||"",o.overlaying||""];for(r=0;r<a.overlays.length;r++)m.push(a.overlays[r].id);y[t]=m}return y}(e),a=t._cartesianlayer.selectAll(".subplot").data(r,String);a.enter().append("g").attr("class",(function(e){return"subplot "+e[0]})),a.order(),a.exit().call(g,t),a.each((function(r){var a=r[0],i=t._plots[a];i.plotgroup=n.select(this),v(e,i),i.draglayer=d(t._draggers,"g",a)}))},t.rangePlot=function(e,t,r){v(e,t),p(e,t,r),o.style(e)},t.toSVG=function(e){var t=e._fullLayout._glimages,r=n.select(e).selectAll(".svg-container");r.filter((function(e,t){return t===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this,r=e.toDataURL("image/png");t.append("svg:image").attr({xmlns:f.svg,"xlink:href":r,preserveAspectRatio:"none",x:0,y:0,width:e.style.width,height:e.style.height})}))},t.updateFx=r(2464).updateFx},4724:function(e,t,r){"use strict";var n=r(5376),a=r(2548),i=r(8192).u,o=r(2880).extendFlat,l=r(1780).templatedArray,s=r(9736).descriptionWithDates,c=r(9032).ONEDAY,u=r(3816),f=u.HOUR_PATTERN,d=u.WEEKDAY_PATTERN,h={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},p=o({},h,{values:h.values.slice().concat(["sync"])});function v(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},m={valType:"data_array",editType:"ticks"},x={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function b(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function _(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var w={valType:"color",dflt:a.defaultLine,editType:"ticks"},T={valType:"color",dflt:a.lightLine,editType:"ticks"};function M(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var k=o({},i,{editType:"ticks"}),A={valType:"boolean",editType:"ticks"};e.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:a.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:n({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"calc"},rangebreaks:l("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[d,f,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:c},editType:"calc"}),tickmode:p,nticks:v(),tick0:g,dtick:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:m,ticktext:{valType:"data_array",editType:"ticks"},ticks:x,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:b(),tickwidth:_(),tickcolor:w,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:o({},i,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:n({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:s("tick label")},tickformatstops:l("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:s("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:a.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:A,gridcolor:T,gridwidth:M(),griddash:k,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:a.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:a.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot"},minor:{tickmode:h,nticks:v("minor"),tick0:g,dtick:y,tickvals:m,ticks:x,ticklen:b("minor"),tickwidth:_("minor"),tickcolor:w,gridcolor:T,gridwidth:M("minor"),griddash:k,showgrid:A,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks"},title:{valType:"string",editType:"ticks"},titlefont:n({editType:"ticks"})}}},7352:function(e,t,r){"use strict";var n=r(3400),a=r(6308),i=r(624).isUnifiedHover,o=r(1008),l=r(1780),s=r(4859),c=r(4724),u=r(4944),f=r(5955),d=r(1888),h=r(7668),p=r(9811),v=p.id2name,g=p.name2id,y=r(3816).AX_ID_PATTERN,m=r(4040),x=m.traceIs,b=m.getComponentMethod;function _(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}e.exports=function(e,t,r){var m,w,T=t.autotypenumbers,M={},k={},A={},L={},S={},D={},O={},C={},P={},I={};for(m=0;m<r.length;m++){var R=r[m];if(x(R,"cartesian")||x(R,"gl2d")){var z,N;if(R.xaxis)z=v(R.xaxis),_(M,z,R);else if(R.xaxes)for(w=0;w<R.xaxes.length;w++)_(M,v(R.xaxes[w]),R);if(R.yaxis)N=v(R.yaxis),_(M,N,R);else if(R.yaxes)for(w=0;w<R.yaxes.length;w++)_(M,v(R.yaxes[w]),R);"funnel"===R.type?"h"===R.orientation?(z&&(k[z]=!0),N&&(O[N]=!0)):N&&(A[N]=!0):"image"===R.type?(N&&(C[N]=!0),z&&(C[z]=!0)):(N&&(S[N]=!0,D[N]=!0),x(R,"carpet")&&("carpet"!==R.type||R._cheater)||z&&(L[z]=!0)),"carpet"===R.type&&R._cheater&&z&&(k[z]=!0),x(R,"2dMap")&&(P[z]=!0,P[N]=!0),x(R,"oriented")&&(I["h"===R.orientation?N:z]=!0)}}var F=t._subplots,E=F.xaxis,H=F.yaxis,B=n.simpleMap(E,v),j=n.simpleMap(H,v),Y=B.concat(j),V=a.background;E.length&&H.length&&(V=n.coerce(e,t,s,"plot_bgcolor"));var U,q,G,Z,W,X=a.combine(V,t.paper_bgcolor);function J(){var e=M[U]||[];W._traceIndices=e.map((function(e){return e._expandedIndex})),W._annIndices=[],W._shapeIndices=[],W._selectionIndices=[],W._imgIndices=[],W._subplotsWith=[],W._counterAxes=[],W._name=W._attr=U,W._id=q}function K(e,t){return n.coerce(Z,W,c,e,t)}function Q(e,t){return n.coerce2(Z,W,c,e,t)}function $(e){return"x"===e?H:E}function ee(t,r){for(var n="x"===t?B:j,a=[],i=0;i<n.length;i++){var o=n[i];o===r||(e[o]||{}).overlaying||a.push(g(o))}return a}var te={x:$("x"),y:$("y")},re=te.x.concat(te.y),ne={},ae=[];function ie(){var e=Z.matches;y.test(e)&&-1===re.indexOf(e)&&(ne[e]=Z.type,ae=Object.keys(ne))}var oe=o(e,t),le=i(oe);for(m=0;m<Y.length;m++){U=Y[m],q=g(U),G=U.charAt(0),n.isPlainObject(e[U])||(e[U]={}),Z=e[U],W=l.newContainer(t,U,G+"axis"),J();var se="x"===G&&!L[U]&&k[U]||"y"===G&&!S[U]&&A[U],ce="y"===G&&(!D[U]&&O[U]||C[U]),ue={hasMinor:!0,letter:G,font:t.font,outerTicks:P[U],showGrid:!I[U],data:M[U]||[],bgColor:X,calendar:t.calendar,automargin:!0,visibleDflt:se,reverseDflt:ce,autotypenumbersDflt:T,splomStash:((t._splomAxes||{})[G]||{})[q],noAutotickangles:"y"===G};K("uirevision",t.uirevision),u(Z,W,K,ue),f(Z,W,K,ue,t);var fe=le&&G===oe.charAt(0),de=Q("spikecolor",le?W.color:void 0),he=Q("spikethickness",le?1.5:void 0),pe=Q("spikedash",le?"dot":void 0),ve=Q("spikemode",le?"across":void 0),ge=Q("spikesnap");K("showspikes",!!(fe||de||he||pe||ve||ge))||(delete W.spikecolor,delete W.spikethickness,delete W.spikedash,delete W.spikemode,delete W.spikesnap);var ye=v(Z.overlaying),me=[0,1];if(void 0!==t[ye]){var xe=v(t[ye].anchor);void 0!==t[xe]&&(me=t[xe].domain)}h(Z,W,K,{letter:G,counterAxes:te[G],overlayableAxes:ee(G,U),grid:t.grid,overlayingDomain:me}),K("title.standoff"),ie(),W._input=Z}for(m=0;m<ae.length;){q=ae[m++],G=(U=v(q)).charAt(0),n.isPlainObject(e[U])||(e[U]={}),Z=e[U],W=l.newContainer(t,U,G+"axis"),J();var be={letter:G,font:t.font,outerTicks:P[U],showGrid:!I[U],data:[],bgColor:X,calendar:t.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((t._splomAxes||{})[G]||{})[q]};K("uirevision",t.uirevision),W.type=ne[q]||"linear",f(Z,W,K,be,t),h(Z,W,K,{letter:G,counterAxes:te[G],overlayableAxes:ee(G,U),grid:t.grid}),K("fixedrange"),ie(),W._input=Z}var _e=b("rangeslider","handleDefaults"),we=b("rangeselector","handleDefaults");for(m=0;m<B.length;m++)U=B[m],Z=e[U],W=t[U],_e(e,t,U),"date"===W.type&&we(Z,W,t,j,W.calendar),K("fixedrange");for(m=0;m<j.length;m++){U=j[m],Z=e[U],W=t[U];var Te=t[v(W.anchor)];K("fixedrange",b("rangeslider","isVisible")(Te))}d.handleDefaults(e,t,{axIds:re.concat(ae).sort(p.idSort),axHasImage:C})}},2136:function(e,t,r){"use strict";var n=r(9760).mix,a=r(2548),i=r(3400);e.exports=function(e,t,r,o){var l=(o=o||{}).dfltColor;function s(r,n){return i.coerce2(e,t,o.attributes,r,n)}var c=s("linecolor",l),u=s("linewidth");r("showline",o.showLine||!!c||!!u)||(delete t.linecolor,delete t.linewidth);var f=s("gridcolor",n(l,o.bgColor,o.blend||a.lightFraction).toRgbString()),d=s("gridwidth"),h=s("griddash");if(r("showgrid",o.showGrid||!!f||!!d||!!h)||(delete t.gridcolor,delete t.gridwidth,delete t.griddash),o.hasMinor){var p=s("minor.gridcolor",n(t.gridcolor,o.bgColor,67).toRgbString()),v=s("minor.gridwidth",t.gridwidth||1),g=s("minor.griddash",t.griddash||"solid");r("minor.showgrid",!!p||!!v||!!g)||(delete t.minor.gridcolor,delete t.minor.gridwidth,delete t.minor.griddash)}if(!o.noZeroLine){var y=s("zerolinecolor",l),m=s("zerolinewidth");r("zeroline",o.showGrid||!!y||!!m)||(delete t.zerolinecolor,delete t.zerolinewidth)}}},7668:function(e,t,r){"use strict";var n=r(8248),a=r(3400);e.exports=function(e,t,r,i){var o,l,s,c,u,f,d=i.counterAxes||[],h=i.overlayableAxes||[],p=i.letter,v=i.grid,g=i.overlayingDomain;v&&(l=v._domains[p][v._axisMap[t._id]],o=v._anchors[t._id],l&&(s=v[p+"side"].split(" ")[0],c=v.domain[p]["right"===s||"top"===s?1:0])),l=l||[0,1],o=o||(n(e.position)?"free":d[0]||"free"),s=s||("x"===p?"bottom":"left"),c=c||0,u=0,f=!1;var y=a.coerce(e,t,{anchor:{valType:"enumerated",values:["free"].concat(d),dflt:o}},"anchor"),m=a.coerce(e,t,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:s}},"side");"free"===y&&("y"===p&&(r("autoshift")&&(c="left"===m?g[0]:g[1],f=!t.automargin||t.automargin,u="left"===m?-3:3),r("shift",u)),r("position",c)),r("automargin",f);var x=!1;if(h.length&&(x=a.coerce(e,t,{overlaying:{valType:"enumerated",values:[!1].concat(h),dflt:!1}},"overlaying")),!x){var b=r("domain",l);b[0]>b[1]-1/4096&&(t.domain=l),a.noneOrAll(e.domain,t.domain,l),"sync"===t.tickmode&&(t.tickmode="auto")}return r("layer"),t}},2568:function(e,t,r){"use strict";var n=r(5024);e.exports=function(e,t,r,a,i){i||(i={});var o=i.tickSuffixDflt,l=n(e);r("tickprefix")&&r("showtickprefix",l),r("ticksuffix",o)&&r("showticksuffix",l)}},6312:function(e,t,r){"use strict";var n=r(6808);e.exports=function(e,t,r,a){var i=t._template||{},o=t.type||i.type||"-";r("minallowed"),r("maxallowed");var l,s=r("range");s||a.noInsiderange||"log"===o||(!(l=r("insiderange"))||null!==l[0]&&null!==l[1]||(t.insiderange=!1,l=void 0),l&&(s=r("range",l)));var c,u=t.getAutorangeDflt(s,a),f=r("autorange",u);!s||(null!==s[0]||null!==s[1])&&(null!==s[0]&&null!==s[1]||"reversed"!==f&&!0!==f)&&(null===s[0]||"min"!==f&&"max reversed"!==f)&&(null===s[1]||"max"!==f&&"min reversed"!==f)||(s=void 0,delete t.range,t.autorange=!0,c=!0),c||(f=r("autorange",u=t.getAutorangeDflt(s,a))),f&&(n(r,f,s),"linear"!==o&&"-"!==o||r("rangemode")),t.cleanRange()}},1160:function(e,t,r){"use strict";var n=r(4284).FROM_BL;e.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var a=[e.r2l(e.range[0]),e.r2l(e.range[1])],i=a[0]+(a[1]-a[0])*r;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,r){"use strict";var n=r(3428),a=r(4336).E9,i=r(3400),o=i.numberFormat,l=r(8248),s=i.cleanNumber,c=i.ms2DateTime,u=i.dateTime2ms,f=i.ensureNumber,d=i.isArrayOrTypedArray,h=r(9032),p=h.FP_SAFE,v=h.BADNUM,g=h.LOG_CLIP,y=h.ONEWEEK,m=h.ONEDAY,x=h.ONEHOUR,b=h.ONEMIN,_=h.ONESEC,w=r(9811),T=r(3816),M=T.HOUR_PATTERN,k=T.WEEKDAY_PATTERN;function A(e){return Math.pow(10,e)}function L(e){return null!=e}e.exports=function(e,t){t=t||{};var r=e._id||"x",h=r.charAt(0);function S(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],a=e.range[1];return.5*(n+a-2*g*Math.abs(n-a))}return v}function D(t,r,n,a){if((a||{}).msUTC&&l(t))return+t;var o=u(t,n||e.calendar);if(o===v){if(!l(t))return v;t=+t;var s=Math.floor(10*i.mod(t+.05,1)),c=Math.round(t-s/10);o=u(new Date(c))+s/10}return o}function O(t,r,n){return c(t,r,n||e.calendar)}function C(t){return e._categories[Math.round(t)]}function P(t){if(L(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 r=e._categories.length-1;return e._categoriesMap[t]=r,r}return v}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function R(e){var t=I(e);return void 0!==t?t:l(e)?+e:void 0}function z(e){return l(e)?+e:I(e)}function N(e,t,r){return n.round(r+t*e,2)}function F(e,t,r){return(e-r)/t}var E=function(t){return l(t)?N(t,e._m,e._b):v},H=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var B="y"===h;E=function(t){if(!l(t))return v;var r=e._rangebreaks.length;if(!r)return N(t,e._m,e._b);var n=B;e.range[0]>e.range[1]&&(n=!n);for(var a=n?-1:1,i=a*t,o=0,s=0;s<r;s++){var c=a*e._rangebreaks[s].min,u=a*e._rangebreaks[s].max;if(i<c)break;if(!(i>u)){o=i<(c+u)/2?s:s+1;break}o=s+1}var f=e._B[o]||0;return isFinite(f)?N(t,e._m2,f):0},H=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,a=0;a<r&&!(t<e._rangebreaks[a].pmin);a++)t>e._rangebreaks[a].pmax&&(n=a+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?S:f,e.l2c="log"===e.type?A:f,e.l2p=E,e.p2l=H,e.c2p="log"===e.type?function(e,t){return E(S(e,t))}:E,e.p2c="log"===e.type?function(e){return A(H(e))}:H,-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=f,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=H,e.cleanPos=f):"log"===e.type?(e.d2r=e.d2l=function(e,t){return S(s(e),t)},e.r2d=e.r2c=function(e){return A(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=f,e.c2r=S,e.l2d=A,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return A(H(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=H,e.cleanPos=f):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=D,e.c2d=e.c2r=e.l2d=e.l2r=O,e.d2p=e.r2p=function(t,r,n){return e.l2p(D(t,0,n))},e.p2d=e.p2r=function(e,t,r){return O(H(e),t,r)},e.cleanPos=function(t){return i.cleanDate(t,v,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=C,e.d2r=e.d2l_noadd=R,e.r2c=function(t){var r=z(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=f,e.r2l=z,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return C(H(e))},e.r2p=e.d2p,e.p2r=H,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:f(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=C,e.d2r=e.d2l_noadd=R,e.r2c=function(t){var r=R(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=I,e.l2r=e.c2r=f,e.r2l=R,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return C(H(e))},e.r2p=e.d2p,e.p2r=H,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:f(e)},e.setupMultiCategory=function(n){var a,o,l=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length)for(var c in s)if(c!==r){var u=t[w.id2name(c)];l=l.concat(u._traceIndices)}var f=[[0,{}],[0,{}]],p=[];for(a=0;a<l.length;a++){var v=n[l[a]];if(h in v){var g=v[h],y=v._length||i.minRowLength(g);if(d(g[0])&&d(g[1]))for(o=0;o<y;o++){var m=g[0][o],x=g[1][o];L(m)&&L(x)&&(p.push([m,x]),m in f[0][1]||(f[0][1][m]=f[0][0]++),x in f[1][1]||(f[1][1][x]=f[1][0]++))}}}for(p.sort((function(e,t){var r=f[0][1],n=r[e[0]]-r[t[0]];if(n)return n;var a=f[1][1];return a[e[1]]-a[t[1]]})),a=0;a<p.length;a++)P(p[a])}),e.fraction2r=function(t){var r=e.r2l(e.range[0]),n=e.r2l(e.range[1]);return e.l2r(r+t*(n-r))},e.r2fraction=function(t){var r=e.r2l(e.range[0]),n=e.r2l(e.range[1]);return(e.r2l(t)-r)/(n-r)},e.limitRange=function(t){var r=e.minallowed,n=e.maxallowed;if(void 0!==r||void 0!==n){t||(t="range");var a=i.nestedProperty(e,t).get(),o=i.simpleMap(a,e.r2l),l=o[1]<o[0];l&&o.reverse();var s=i.simpleMap([r,n],e.r2l);if(void 0!==r&&o[0]<s[0]&&(a[l?1:0]=r),void 0!==n&&o[1]>s[1]&&(a[l?0:1]=n),a[0]===a[1]){var c=e.l2r(r),u=e.l2r(n);if(void 0!==r){var f=c+1;void 0!==n&&(f=Math.min(f,u)),a[l?1:0]=f}if(void 0!==n){var d=u+1;void 0!==r&&(d=Math.max(d,c)),a[l?0:1]=d}}}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,a,o=i.nestedProperty(e,t).get();if(a=(a="date"===e.type?i.dfltRange(e.calendar):"y"===h?T.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||T.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(a[0]=0),o&&2===o.length){var s=null===o[0],c=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)),n=0;n<2;n++)if("date"===e.type){if(!i.isDateTime(o[n],e.calendar)){e[t]=a;break}if(e.r2l(o[0])===e.r2l(o[1])){var u=i.constrain(e.r2l(o[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);o[0]=e.l2r(u-1e3),o[1]=e.l2r(u+1e3);break}}else{if(!l(o[n])){if(s||c||!l(o[1-n])){e[t]=a;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-p?o[n]=-p:o[n]>p&&(o[n]=p),o[0]===o[1]){var f=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=f,o[1]+=f}}}else i.nestedProperty(e,t).set(a)},e.setScale=function(r){var n=t._size;if(e.overlaying){var a=w.getFromId({_fullLayout:t},e.overlaying);e.domain=a.domain}var i=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(i);var l,s,c=e.r2l(e[i][0],o),u=e.r2l(e[i][1],o),f="y"===h;if(f?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(l=0;l<e._rangebreaks.length;l++)s=e._rangebreaks[l],e._lBreaks+=Math.abs(s.max-s.min);var d=f;c>u&&(d=!d),d&&e._rangebreaks.reverse();var p=d?-1:1;for(e._m2=p*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(f?u:c)),l=0;l<e._rangebreaks.length;l++)s=e._rangebreaks[l],e._B.push(e._B[e._B.length-1]-p*e._m2*(s.max-s.min));for(l=0;l<e._rangebreaks.length;l++)(s=e._rangebreaks[l]).pmin=E(s.min),s.pmax=E(s.max)}if(!isFinite(e._m)||!isFinite(e._b)||e._length<0)throw t._replotting=!1,new Error("Something went wrong with axis scaling")},e.maskBreaks=function(t){var r,n,a,o,l,c=e.rangebreaks||[];c._cachedPatterns||(c._cachedPatterns=c.map((function(t){return t.enabled&&t.bounds?i.simpleMap(t.bounds,t.pattern?s:e.d2c):null}))),c._cachedValues||(c._cachedValues=c.map((function(t){return t.enabled&&t.values?i.simpleMap(t.values,e.d2c).sort(i.sorterAsc):null})));for(var u=0;u<c.length;u++){var f=c[u];if(f.enabled)if(f.bounds){var d=f.pattern;switch(n=(r=c._cachedPatterns[u])[0],a=r[1],d){case k:o=(l=new Date(t)).getUTCDay(),n>a&&(a+=7,o<n&&(o+=7));break;case M:o=(l=new Date(t)).getUTCHours()+(l.getUTCMinutes()/60+l.getUTCSeconds()/3600+l.getUTCMilliseconds()/36e5),n>a&&(a+=24,o<n&&(o+=24));break;case"":o=t}if(o>=n&&o<a)return v}else for(var h=c._cachedValues[u],p=0;p<h.length;p++)if(a=(n=h[p])+f.dvalue,t>=n&&t<a)return v}return t},e.locateBreaks=function(t,r){var n,a,o,l,c=[];if(!e.rangebreaks)return c;var u=e.rangebreaks.slice().sort((function(e,t){return e.pattern===k&&t.pattern===M?-1:t.pattern===k&&e.pattern===M?1:0})),f=function(e,n){if((e=i.constrain(e,t,r))!==(n=i.constrain(n,t,r))){for(var a=!0,o=0;o<c.length;o++){var l=c[o];e<l.max&&n>=l.min&&(e<l.min&&(l.min=e),n>l.max&&(l.max=n),a=!1)}a&&c.push({min:e,max:n})}};for(n=0;n<u.length;n++){var d=u[n];if(d.enabled)if(d.bounds){var h=t,p=r;d.pattern&&(h=Math.floor(h)),o=(a=i.simpleMap(d.bounds,d.pattern?s:e.r2l))[0],l=a[1];var v,g,w=new Date(h);switch(d.pattern){case k:g=y,v=(l-o+(l<o?7:0))*m,h+=o*m-(w.getUTCDay()*m+w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;case M:g=m,v=(l-o+(l<o?24:0))*x,h+=o*x-(w.getUTCHours()*x+w.getUTCMinutes()*b+w.getUTCSeconds()*_+w.getUTCMilliseconds());break;default:h=Math.min(a[0],a[1]),v=g=(p=Math.max(a[0],a[1]))-h}for(var T=h;T<p;T+=g)f(T,T+v)}else for(var A=i.simpleMap(d.values,e.d2c),L=0;L<A.length;L++)f(o=A[L],l=o+d.dvalue)}return c.sort((function(e,t){return e.min-t.min})),c},e.makeCalcdata=function(t,r,n){var a,o,l,s,c=e.type,u="date"===c&&t[r+"calendar"];if(r in t){if(a=t[r],s=t._length||i.minRowLength(a),i.isTypedArray(a)&&("linear"===c||"log"===c)){if(s===a.length)return a;if(a.subarray)return a.subarray(0,s)}if("multicategory"===c)return function(e,t){for(var r=new Array(t),n=0;n<t;n++){var a=(e[0]||[])[n],i=(e[1]||[])[n];r[n]=I([a,i])}return r}(a,s);for(o=new Array(s),l=0;l<s;l++)o[l]=e.d2c(a[l],0,u,n)}else{var f=r+"0"in t?e.d2c(t[r+"0"],0,u):0,d=t["d"+r]?Number(t["d"+r]):1;for(a=t[{x:"y",y:"x"}[r]],s=t._length||a.length,o=new Array(s),l=0;l<s;l++)o[l]=f+l*d}if(e.rangebreaks)for(l=0;l<s;l++)o[l]=e.maskBreaks(o[l]);return o},e.isValidRange=function(t,r){return Array.isArray(t)&&2===t.length&&(r&&null===t[0]||l(e.r2l(t[0])))&&(r&&null===t[1]||l(e.r2l(t[1])))},e.getAutorangeDflt=function(t,r){var n=!e.isValidRange(t,"nullOk");return n&&r&&r.reverseDflt?n="reversed":t&&(null===t[0]&&null===t[1]?n=!0:null===t[0]&&null!==t[1]?n="min":null!==t[0]&&null===t[1]&&(n="max")),n},e.isReversed=function(){var t=e.autorange;return"reversed"===t||"min reversed"===t||"max reversed"===t},e.isPtWithinRange=function(t,r){var n=e.c2l(t[h],null,r),a=e.r2l(e.range[0]),i=e.r2l(e.range[1]);return a<i?a<=n&&n<=i:i<=n&&n<=a},e._emptyCategories=function(){e._categories=[],e._categoriesMap={}},e.clearCalc=function(){var r=e._matchGroup;if(r){var n=null,a=null;for(var i in r){var o=t[w.id2name(i)];if(o._categories){n=o._categories,a=o._categoriesMap;break}}n&&a?(e._categories=n,e._categoriesMap=a):e._emptyCategories()}else e._emptyCategories();if(e._initialCategories)for(var l=0;l<e._initialCategories.length;l++)P(e._initialCategories[l])},e.sortByInitialCategories=function(){var n=[];if(e._emptyCategories(),e._initialCategories)for(var a=0;a<e._initialCategories.length;a++)P(e._initialCategories[a]);n=n.concat(e._traceIndices);var i=e._matchGroup;for(var o in i)if(r!==o){var l=t[w.id2name(o)];l._categories=e._categories,l._categoriesMap=e._categoriesMap,n=n.concat(l._traceIndices)}return n};var j=t._d3locale;"date"===e.type&&(e._dateFormat=j?j.timeFormat:a,e._extraFormat=t._extraFormat),e._separators=t.separators,e._numFormat=j?j.numberFormat:o,delete e._minDtick,delete e._forceTick0}},5024:function(e){"use strict";e.exports=function(e){var t=["showexponent","showtickprefix","showticksuffix"].filter((function(t){return void 0!==e[t]}));if(t.every((function(r){return e[r]===e[t[0]]}))||1===t.length)return e[t[0]]}},5936:function(e,t,r){"use strict";var n=r(3400),a=r(6308).contrast,i=r(4724),o=r(5024),l=r(1272);function s(e,t){function r(r,a){return n.coerce(e,t,i.tickformatstops,r,a)}r("enabled")&&(r("dtickrange"),r("value"))}e.exports=function(e,t,r,c,u){u||(u={});var f=r("labelalias");n.isPlainObject(f)||delete t.labelalias;var d=o(e);if(r("showticklabels")){var h=u.font||{},p=t.color,v=-1!==(t.ticklabelposition||"").indexOf("inside")?a(u.bgColor):p&&p!==i.color.dflt?p:h.color;if(n.coerceFont(r,"tickfont",{family:h.family,size:h.size,color:v}),u.noTicklabelstep||"multicategory"===c||"log"===c||r("ticklabelstep"),!u.noAng){var g=r("tickangle");u.noAutotickangles||"auto"!==g||r("autotickangles")}if("category"!==c){var y=r("tickformat");l(e,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:s}),t.tickformatstops.length||delete t.tickformatstops,u.noExp||y||"date"===c||(r("showexponent",d),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},5404:function(e,t,r){"use strict";var n=r(3400),a=r(4724);e.exports=function(e,t,r,i){var o=i.isMinor,l=o?e.minor||{}:e,s=o?t.minor:t,c=o?a.minor:a,u=o?"minor.":"",f=n.coerce2(l,s,c,"ticklen",o?.6*(t.ticklen||5):void 0),d=n.coerce2(l,s,c,"tickwidth",o?t.tickwidth||1:void 0),h=n.coerce2(l,s,c,"tickcolor",(o?t.tickcolor:void 0)||s.color);r(u+"ticks",!o&&i.outerTicks||f||d||h?"outside":"")||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}},6332:function(e,t,r){"use strict";var n=r(8728),a=r(3400).isArrayOrTypedArray,i=r(8116).isTypedArraySpec,o=r(8116).decodeTypedArraySpec;e.exports=function(e,t,r,l,s){s||(s={});var c=s.isMinor,u=c?e.minor||{}:e,f=c?t.minor:t,d=c?"minor.":"";function h(e){var t=u[e];return i(t)&&(t=o(t)),void 0!==t?t:(f._template||{})[e]}var p=h("tick0"),v=h("dtick"),g=h("tickvals"),y=r(d+"tickmode",a(g)?"array":v?"linear":"auto");if("auto"===y||"sync"===y)r(d+"nticks");else if("linear"===y){var m=f.dtick=n.dtick(v,l);f.tick0=n.tick0(p,l,t.calendar,m)}else"multicategory"!==l&&(void 0===r(d+"tickvals")?f.tickmode="auto":c||r("ticktext"))}},3736:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(3400),o=r(3616),l=r(4460);e.exports=function(e,t,r,s){var c=e._fullLayout;if(0!==t.length){var u,f,d,h;s&&(u=s());var p=n.ease(r.easing);return e._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(h),h=null,function(){for(var r={},n=0;n<t.length;n++){var i=t[n],o=i.plotinfo.xaxis,l=i.plotinfo.yaxis;i.xr0&&(r[o._name+".range"]=i.xr0.slice()),i.yr0&&(r[l._name+".range"]=i.yr0.slice())}return a.call("relayout",e,r).then((function(){for(var e=0;e<t.length;e++)v(t[e].plotinfo)}))}()})),f=Date.now(),h=window.requestAnimationFrame((function n(){d=Date.now();for(var i=Math.min(1,(d-f)/r.duration),o=p(i),l=0;l<t.length;l++)g(t[l],o);d-f>r.duration?(function(){for(var r={},n=0;n<t.length;n++){var i=t[n],o=i.plotinfo.xaxis,l=i.plotinfo.yaxis;i.xr1&&(r[o._name+".range"]=i.xr1.slice()),i.yr1&&(r[l._name+".range"]=i.yr1.slice())}u&&u(),a.call("relayout",e,r).then((function(){for(var e=0;e<t.length;e++)v(t[e].plotinfo)}))}(),h=window.cancelAnimationFrame(n)):h=window.requestAnimationFrame(n)})),Promise.resolve()}function v(e){var t=e.xaxis,r=e.yaxis;c._defs.select("#"+e.clipId+"> rect").call(o.setTranslate,0,0).call(o.setScale,1,1),e.plot.call(o.setTranslate,t._offset,r._offset).call(o.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,e)}function g(t,r){var n=t.plotinfo,a=n.xaxis,s=n.yaxis,c=a._length,u=s._length,f=!!t.xr1,d=!!t.yr1,h=[];if(f){var p=i.simpleMap(t.xr0,a.r2l),v=i.simpleMap(t.xr1,a.r2l),g=p[1]-p[0],y=v[1]-v[0];h[0]=(p[0]*(1-r)+r*v[0]-p[0])/(p[1]-p[0])*c,h[2]=c*(1-r+r*y/g),a.range[0]=a.l2r(p[0]*(1-r)+r*v[0]),a.range[1]=a.l2r(p[1]*(1-r)+r*v[1])}else h[0]=0,h[2]=c;if(d){var m=i.simpleMap(t.yr0,s.r2l),x=i.simpleMap(t.yr1,s.r2l),b=m[1]-m[0],_=x[1]-x[0];h[1]=(m[1]*(1-r)+r*x[1]-m[1])/(m[0]-m[1])*u,h[3]=u*(1-r+r*_/b),s.range[0]=a.l2r(m[0]*(1-r)+r*x[0]),s.range[1]=s.l2r(m[1]*(1-r)+r*x[1])}else h[1]=0,h[3]=u;l.drawOne(e,a,{skipTitle:!0}),l.drawOne(e,s,{skipTitle:!0}),l.redrawComponents(e,[a._id,s._id]);var w=f?c/h[2]:1,T=d?u/h[3]:1,M=f?h[0]:0,k=d?h[1]:0,A=f?h[0]/h[2]*c:0,L=d?h[1]/h[3]*u:0,S=a._offset-A,D=s._offset-L;n.clipRect.call(o.setTranslate,M,k).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,S,D).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}l.redrawComponents(e)}},4944:function(e,t,r){"use strict";var n=r(4040).traceIs,a=r(2976);function i(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var r=i(e),a=n(e,"box-violin"),o=n(e._fullInput||{},"candlestick");return a&&!o&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}e.exports=function(e,t,r,l){r("autotypenumbers",l.autotypenumbersDflt),"-"===r("type",(l.splomStash||{}).type)&&(function(e,t){if("-"===e.type){var r,l=e._id,s=l.charAt(0);-1!==l.indexOf("scene")&&(l=s);var c=function(e,t,r){for(var n=0;n<e.length;n++){var a=e[n];if("splom"===a.type&&a._length>0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(t,l,s);if(c)if("histogram"!==c.type||s!=={v:"y",h:"x"}[c.orientation||"v"]){var u=s+"calendar",f=c[u],d={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&s==={h:"x",v:"y"}[c.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=e.autotypenumbers,o(c,s)){var h=i(c),p=[];for(r=0;r<t.length;r++){var v=t[r];n(v,"box-violin")&&(v[s+"axis"]||s)===l&&(void 0!==v[h]?p.push(v[h][0]):void 0!==v.name?p.push(v.name):p.push("text"),v[u]!==f&&(f=void 0))}e.type=a(p,f,d)}else if("splom"===c.type){var g=c.dimensions[c._axesDim[l]];g.visible&&(e.type=a(g.values,f,d))}else e.type=a(c[s]||[c[s+"0"]],f,d)}else e.type="linear"}}(t,l.data),"-"===t.type?t.type="linear":e.type=t.type)}},2460:function(e,t,r){"use strict";var n=r(4040),a=r(3400);function i(e,t,r){var n,i,o,l=!1;if("data"===t.type)n=e._fullData[null!==t.traces?t.traces[0]:0];else{if("layout"!==t.type)return!1;n=e._fullLayout}return i=a.nestedProperty(n,t.prop).get(),(o=r[t.type]=r[t.type]||{}).hasOwnProperty(t.prop)&&o[t.prop]!==i&&(l=!0),o[t.prop]=i,{changed:l,value:i}}function o(e,t){var r=[],n=t[0],i={};if("string"==typeof n)i[n]=t[1];else{if(!a.isPlainObject(n))return r;i=n}return s(i,(function(e,t,n){r.push({type:"layout",prop:e,value:n})}),"",0),r}function l(e,t){var r,n,i,o,l=[];if(n=t[0],i=t[1],r=t[2],o={},"string"==typeof n)o[n]=i;else{if(!a.isPlainObject(n))return l;o=n,void 0===r&&(r=i)}return void 0===r&&(r=null),s(o,(function(t,n,a){var i,o;if(Array.isArray(a)){o=a.slice();var s=Math.min(o.length,e.data.length);r&&(s=Math.min(s,r.length)),i=[];for(var c=0;c<s;c++)i[c]=r?r[c]:c}else o=a,i=r?r.slice():null;if(null===i)Array.isArray(o)&&(o=o[0]);else if(Array.isArray(i)){if(!Array.isArray(o)){var u=o;o=[];for(var f=0;f<i.length;f++)o[f]=u}o.length=Math.min(i.length,o.length)}l.push({type:"data",prop:t,traces:i,value:o})}),"",0),l}function s(e,t,r,n){Object.keys(e).forEach((function(i){var o=e[i];if("_"!==i[0]){var l=r+(n>0?".":"")+i;a.isPlainObject(o)?s(o,t,l,n+1):t(l,i,o)}}))}t.manageCommandObserver=function(e,r,n,o){var l={},s=!0;r&&r._commandObserver&&(l=r._commandObserver),l.cache||(l.cache={}),l.lookupTable={};var c=t.hasSimpleAPICommandBindings(e,n,l.lookupTable);if(r&&r._commandObserver){if(c)return l;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,l}if(c){i(e,c,l.cache),l.check=function(){if(s){var t=i(e,c,l.cache);return t.changed&&o&&void 0!==l.lookupTable[t.value]&&(l.disable(),Promise.resolve(o({value:t.value,type:c.type,prop:c.prop,traces:c.traces,index:l.lookupTable[t.value]})).then(l.enable,l.enable)),t.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f<u.length;f++)e._internalOn(u[f],l.check);l.remove=function(){for(var t=0;t<u.length;t++)e._removeInternalListener(u[t],l.check)}}else a.log("Unable to automatically bind plot updates to API command"),l.lookupTable={},l.remove=function(){};return l.disable=function(){s=!1},l.enable=function(){s=!0},r&&(r._commandObserver=l),l},t.hasSimpleAPICommandBindings=function(e,r,n){var a,i,o=r.length;for(a=0;a<o;a++){var l,s=r[a],c=s.method,u=s.args;if(Array.isArray(u)||(u=[]),!c)return!1;var f=t.computeAPICommandBindings(e,c,u);if(1!==f.length)return!1;if(i){if((l=f[0]).type!==i.type)return!1;if(l.prop!==i.prop)return!1;if(Array.isArray(i.traces)){if(!Array.isArray(l.traces))return!1;l.traces.sort();for(var d=0;d<i.traces.length;d++)if(i.traces[d]!==l.traces[d])return!1}else if(l.prop!==i.prop)return!1}else i=f[0],Array.isArray(i.traces)&&i.traces.sort();var h=(l=f[0]).value;if(Array.isArray(h)){if(1!==h.length)return!1;h=h[0]}n&&(n[h]=a)}return i},t.executeAPICommand=function(e,t,r){if("skip"===t)return Promise.resolve();var i=n.apiMethodRegistry[t],o=[e];Array.isArray(r)||(r=[]);for(var l=0;l<r.length;l++)o.push(r[l]);return i.apply(null,o).catch((function(e){return a.warn("API call to Plotly."+t+" rejected.",e),Promise.reject(e)}))},t.computeAPICommandBindings=function(e,t,r){var n;switch(Array.isArray(r)||(r=[]),t){case"restyle":n=l(e,r);break;case"relayout":n=o(0,r);break;case"update":n=l(e,[r[0],r[2]]).concat(o(0,[r[1]]));break;case"animate":n=function(e,t){return Array.isArray(t[0])&&1===t[0].length&&-1!==["string","number"].indexOf(typeof t[0][0])?[{type:"layout",prop:"_currentFrame",value:t[0][0].toString()}]:[]}(0,r);break;default:n=[]}return n}},6968:function(e,t,r){"use strict";var n=r(2880).extendFlat;t.u=function(e,t){t=t||{};var r={valType:"info_array",editType:(e=e||{}).editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},a=(e.name&&e.name,e.trace,t.description&&t.description,{x:n({},r,{}),y:n({},r,{}),editType:e.editType});return e.noGridCell||(a.row={valType:"integer",min:0,dflt:0,editType:e.editType},a.column={valType:"integer",min:0,dflt:0,editType:e.editType}),a},t.Q=function(e,t,r,n){var a=n&&n.x||[0,1],i=n&&n.y||[0,1],o=t.grid;if(o){var l=r("domain.column");void 0!==l&&(l<o.columns?a=o._domains.x[l]:delete e.domain.column);var s=r("domain.row");void 0!==s&&(s<o.rows?i=o._domains.y[s]:delete e.domain.row)}var c=r("domain.x",a),u=r("domain.y",i);c[0]<c[1]||(e.domain.x=a.slice()),u[0]<u[1]||(e.domain.y=i.slice())}},5376:function(e){"use strict";e.exports=function(e){var t=e.editType,r=e.colorEditType;void 0===r&&(r=t);var n={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:r},editType:t};return e.autoSize&&(n.size.dflt="auto"),e.autoColor&&(n.color.dflt="auto"),e.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},6672:function(e){"use strict";e.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},4888:function(e,t,r){"use strict";var n=r(4040);r(3816).SUBPLOT_PATTERN;t._M=function(e,t,r){var a,i=[],o=[];if(!(a="string"==typeof t?n.getModule(t).plot:"function"==typeof t?t:t.plot))return[i,e];for(var l=r,s=0;s<e.length;s++){var c=e[s],u=c[0].trace,f=void 0!==u.zorder;!0===u.visible&&0!==u._length&&(!u._module||u._module.plot!==a||f&&u.zorder!==l?o.push(c):i.push(c))}return[i,o]}},4424:function(e){"use strict";function t(e,t){var r,n,a=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)a[n]+=e[4*r+n]*t[r];return a}e.exports=function(e,r){return t(e.projection,t(e.view,t(e.model,[r[0],r[1],r[2],1])))}},4859:function(e,t,r){"use strict";var n=r(5376),a=r(5656),i=r(2548),o=r(2872),l=r(4200),s=r(6741),c=r(2880).extendFlat,u=n({editType:"calc"});u.family.dflt='"Open Sans", verdana, arial, sans-serif',u.size.dflt=12,u.color.dflt=i.defaultLine,e.exports={font:u,title:{text:{valType:"string",editType:"layoutstyle"},font:n({editType:"layoutstyle"}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:c(s({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:i.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:i.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:i.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:o.newshape,activeshape:o.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:c({},a.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:n({editType:"layoutstyle"})}}},6741:function(e){"use strict";e.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}},7316:function(e,t,r){"use strict";var n=r(3428),a=r(4336).m_,i=r(7624).SO,o=r(8248),l=r(3160),s=r(4040),c=r(3060),u=r(1780),f=r(3400),d=r(6308),h=r(9032).BADNUM,p=r(9811),v=r(1936).clearOutline,g=r(5308),y=r(5656),m=r(6672),x=r(4888)._M,b=f.relinkPrivateKeys,_=f._,w=e.exports={};f.extendFlat(w,s),w.attributes=r(5464),w.attributes.type.values=w.allTypes,w.fontAttrs=r(5376),w.layoutAttributes=r(4859),w.fontWeight="normal";var T=w.transformsRegistry,M=r(2460);w.executeAPICommand=M.executeAPICommand,w.computeAPICommandBindings=M.computeAPICommandBindings,w.manageCommandObserver=M.manageCommandObserver,w.hasSimpleAPICommandBindings=M.hasSimpleAPICommandBindings,w.redrawText=function(e){return e=f.getGraphDiv(e),new Promise((function(t){setTimeout((function(){e._fullLayout&&(s.getComponentMethod("annotations","draw")(e),s.getComponentMethod("legend","draw")(e),s.getComponentMethod("colorbar","draw")(e),t(w.previousPromises(e)))}),300)}))},w.resize=function(e){var t;e=f.getGraphDiv(e);var r=new Promise((function(r,n){e&&!f.isHidden(e)||n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=r,e._redrawTimer=setTimeout((function(){if(!e.layout||e.layout.width&&e.layout.height||f.isHidden(e))r(e);else{delete e.layout.width,delete e.layout.height;var t=e.changed;e.autoplay=!0,s.call("relayout",e,{autosize:!0}).then((function(){e.changed=t,e._resolveResize===r&&(delete e._resolveResize,r(e))}))}}),100)}));return t&&t(r),r},w.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then((function(){e._promises=[]}))},w.addLinks=function(e){if(e._context.showLink||e._context.showSources){var t=e._fullLayout,r=f.ensureSingle(t._paper,"text","js-plot-link-container",(function(e){e.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:d.defaultLine,"pointer-events":"all"}).each((function(){var e=n.select(this);e.append("tspan").classed("js-link-to-tool",!0),e.append("tspan").classed("js-link-spacer",!0),e.append("tspan").classed("js-sourcelinks",!0)}))})),a=r.node(),i={y:t._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var o=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),s=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=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)r.on("click",(function(){w.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}(e,o),l.text(o.text()&&s.text()?" - ":"")}},w.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(e,!1,"keepdata"),a.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var k=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];function L(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,a={};function i(e){for(var r=!0,i=0;i<t.length;i++){var o=t[i];a[o]||(e[o]?a[o]=e[o]:r=!1)}r&&(n=!0)}for(var o=0;o<2;o++){for(var l=e._context.locales,c=0;c<2;c++){var u=(l[r]||{}).format;if(u&&(i(u),n))break;l=s.localeRegistry}var f=r.split("-")[0];if(n||f===r)break;r=f}return n||i(s.localeRegistry.en.format),a}function S(e,t){var r={_fullLayout:t},n="x"===e._id.charAt(0),a=e._mainAxis._anchorAxis,i="",o="",l="";if(a&&(l=a._mainAxis._id,i=n?e._id+l:l+e._id),!i||!t._plots[i]){i="";for(var s=e._counterAxes,c=0;c<s.length;c++){var u=s[c],f=n?e._id+u:u+e._id;o||(o=f);var d=p.getFromId(r,u);if(l&&d.overlaying===l){i=f;break}}}return i||o}function D(e){var t=e.transforms;if(Array.isArray(t)&&t.length)for(var r=0;r<t.length;r++){var n=t[r],a=n._module||T[n.type];if(a&&a.makesData)return!0}return!1}function O(e,t,r,n){for(var a=e.transforms,i=[e],o=0;o<a.length;o++){var l=a[o],s=T[l.type];s&&s.transform&&(i=s.transform(i,{transform:l,fullTrace:e,fullData:t,layout:r,fullLayout:n,transformIndex:o}))}return i}function C(e){return"string"==typeof e&&"px"===e.substr(e.length-2)&&parseFloat(e)}function P(e){var t=e.margin;if(!e._size){var r=e._size={l:Math.round(t.l),r:Math.round(t.r),t:Math.round(t.t),b:Math.round(t.b),p:Math.round(t.pad)};r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b}e._pushmargin||(e._pushmargin={}),e._pushmarginIds||(e._pushmarginIds={}),e._reservedMargin||(e._reservedMargin={})}w.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults)delete n._skipDefaults;else{var o,l=e._fullLayout={},c=e.layout||{},u=e._fullData||[],d=e._fullData=[],h=e.data||[],p=e.calcdata||[],g=e._context||{};e._transitionData||w.createTransitionData(e),l._dfltTitle={plot:_(e,"Click to enter Plot title"),x:_(e,"Click to enter X axis title"),y:_(e,"Click to enter Y axis title"),colorbar:_(e,"Click to enter Colorscale title"),annotation:_(e,"new text")},l._traceWord=_(e,"trace");var y=L(e,k);if(l._mapboxAccessToken=g.mapboxAccessToken,n._initialAutoSizeIsDone){var m=n.width,x=n.height;w.supplyLayoutGlobalDefaults(c,l,y),c.width||(l.width=m),c.height||(l.height=x),w.sanitizeMargins(l)}else{w.supplyLayoutGlobalDefaults(c,l,y);var T=!c.width||!c.height,M=l.autosize,S=g.autosizable;T&&(M||S)?w.plotAutoSize(e,c,l):T&&w.sanitizeMargins(l),!M&&T&&(c.width=l.width,c.height=l.height)}l._d3locale=function(e,t){return e.decimal=t.charAt(0),e.thousands=t.charAt(1),{numberFormat:function(t){try{t=i(e).format(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return t},timeFormat:a(e).utcFormat}}(y,l.separators),l._extraFormat=L(e,A),l._initialAutoSizeIsDone=!0,l._dataLength=h.length,l._modules=[],l._visibleModules=[],l._basePlotModules=[];var D=l._subplots=function(){var e,t,r=s.collectableSubplotTypes,n={};if(!r){r=[];var a=s.subplotsRegistry;for(var i in a){var o=a[i].attr;if(o&&(r.push(i),Array.isArray(o)))for(t=0;t<o.length;t++)f.pushUnique(r,o[t])}}for(e=0;e<r.length;e++)n[r[e]]=[];return n}(),O=l._splomAxes={x:{},y:{}},C=l._splomSubplots={};l._splomGridDflt={},l._scatterStackOpts={},l._firstScatter={},l._alignmentOpts={},l._colorAxes={},l._requestRangeslider={},l._traceUids=function(e,t){var r,n,a=t.length,i=[];for(r=0;r<e.length;r++){var o=e[r]._fullInput;o!==n&&i.push(o),n=o}var l=i.length,s=new Array(a),c={};function u(e,t){s[t]=e,c[e]=1}function d(e,t){if(e&&"string"==typeof e&&!c[e])return u(e,t),!0}for(r=0;r<a;r++){var h=t[r].uid;"number"==typeof h&&(h=String(h)),d(h,r)||r<l&&d(i[r].uid,r)||u(f.randstr(c),r)}return s}(u,h),l._globalTransforms=(e._context||{}).globalTransforms,w.supplyDataDefaults(h,d,c,l);var I=Object.keys(O.x),R=Object.keys(O.y);if(I.length>1&&R.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o<I.length;o++)f.pushUnique(D.xaxis,I[o]);for(o=0;o<R.length;o++)f.pushUnique(D.yaxis,R[o]);for(var z in C)f.pushUnique(D.cartesian,z)}if(l._has=w._hasPlotType.bind(l),u.length===d.length)for(o=0;o<d.length;o++)b(d[o],u[o]);w.supplyLayoutModuleDefaults(c,l,d,e._transitionData);var N=l._visibleModules,F=[];for(o=0;o<N.length;o++){var E=N[o].crossTraceDefaults;E&&f.pushUnique(F,E)}for(o=0;o<F.length;o++)F[o](d,l);l._hasOnlyLargeSploms=1===l._basePlotModules.length&&"splom"===l._basePlotModules[0].name&&I.length>15&&R.length>15&&0===l.shapes.length&&0===l.images.length,w.linkSubplots(d,l,u,n),w.cleanPlot(d,l,u,n);var H=!(!n._has||!n._has("gl2d")),B=!(!l._has||!l._has("gl2d")),j=!(!n._has||!n._has("cartesian"))||H,Y=!(!l._has||!l._has("cartesian"))||B;j&&!Y?n._bgLayer.remove():Y&&!j&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&v({_fullLayout:n}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var a=0;a<e.length;a++){var i=e[a];i.meta?n[i.index]=i._meta={meta:i.meta}:t.meta&&(i._meta={meta:t.meta}),t.meta&&(i._meta.layout={meta:t.meta})}n.length&&(r||(r=t._meta={}),r.data=n)}(d,l),b(l,n),s.getComponentMethod("colorscale","crossTraceDefaults")(d,l),l._preGUI||(l._preGUI={}),l._tracePreGUI||(l._tracePreGUI={});var V,U=l._tracePreGUI,q={};for(V in U)q[V]="old";for(o=0;o<d.length;o++)q[V=d[o]._fullInput.uid]||(U[V]={}),q[V]="new";for(V in q)"old"===q[V]&&delete U[V];P(l),s.getComponentMethod("rangeslider","makeData")(l),r||p.length!==d.length||w.supplyDefaultsUpdateCalc(p,d)}},w.supplyDefaultsUpdateCalc=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],a=(e[r]||[])[0];if(a&&a.trace){var i=a.trace;if(i._hasCalcTransform){var o,l,s,c=i._arrayAttrs;for(o=0;o<c.length;o++)l=c[o],s=f.nestedProperty(i,l).get().slice(),f.nestedProperty(n,l).set(s)}a.trace=n}}},w.createTransitionData=function(e){e._transitionData||(e._transitionData={}),e._transitionData._frames||(e._transitionData._frames=[]),e._transitionData._frameHash||(e._transitionData._frameHash={}),e._transitionData._counter||(e._transitionData._counter=0),e._transitionData._interruptCallbacks||(e._transitionData._interruptCallbacks=[])},w._hasPlotType=function(e){var t,r=this._basePlotModules||[];for(t=0;t<r.length;t++)if(r[t].name===e)return!0;var n=this._modules||[];for(t=0;t<n.length;t++){var a=n[t].name;if(a===e)return!0;var i=s.modules[a];if(i&&i.categories[e])return!0}return!1},w.cleanPlot=function(e,t,r,n){var a,i,o=n._basePlotModules||[];for(a=0;a<o.length;a++){var l=o[a];l.clean&&l.clean(e,t,r,n)}var s=n._has&&n._has("gl"),c=t._has&&t._has("gl");s&&!c&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(".gl-canvas").remove(),n._glcontainer.selectAll(".no-webgl").remove(),n._glcanvas=null);var u=!!n._infolayer;e:for(a=0;a<r.length;a++){var f=r[a].uid;for(i=0;i<e.length;i++)if(f===e[i].uid)continue e;u&&n._infolayer.select(".cb"+f).remove()}},w.linkSubplots=function(e,t,r,n){var a,i,o=n._plots||{},l=t._plots={},c=t._subplots,u={_fullData:e,_fullLayout:t},d=c.cartesian.concat(c.gl2d||[]);for(a=0;a<d.length;a++){var h,v=d[a],g=o[v],y=p.getFromId(u,v,"x"),m=p.getFromId(u,v,"y");for(g?h=l[v]=g:(h=l[v]={}).id=v,y._counterAxes.push(m._id),m._counterAxes.push(y._id),y._subplotsWith.push(v),m._subplotsWith.push(v),h.xaxis=y,h.yaxis=m,h._hasClipOnAxisFalse=!1,i=0;i<e.length;i++){var x=e[i];if(x.xaxis===h.xaxis._id&&x.yaxis===h.yaxis._id&&!1===x.cliponaxis){h._hasClipOnAxisFalse=!0;break}}}var b,_=p.list(u,null,!0);for(a=0;a<_.length;a++){var w=null;(b=_[a]).overlaying&&(w=p.getFromId(u,b.overlaying))&&w.overlaying&&(b.overlaying=!1,w=null),b._mainAxis=w||b,w&&(b.domain=w.domain.slice()),b._anchorAxis="free"===b.anchor?null:p.getFromId(u,b.anchor)}for(a=0;a<_.length;a++)if((b=_[a])._counterAxes.sort(p.idSort),b._subplotsWith.sort(f.subplotSort),b._mainSubplot=S(b,t),b._counterAxes.length&&(b.spikemode&&-1!==b.spikemode.indexOf("across")||b.automargin&&b.mirror&&"free"!==b.anchor||s.getComponentMethod("rangeslider","isVisible")(b))){var T=1,M=0;for(i=0;i<b._counterAxes.length;i++){var k=p.getFromId(u,b._counterAxes[i]);T=Math.min(T,k.domain[0]),M=Math.max(M,k.domain[1])}T<M&&(b._counterDomainMin=T,b._counterDomainMax=M)}},w.clearExpandedTraceDefaultColors=function(e){var t,r,n;for(r=[],(t=e._module._colorAttrs)||(e._module._colorAttrs=t=[],c.crawl(e._module.attributes,(function(e,n,a,i){r[i]=n,r.length=i+1,"color"===e.valType&&void 0===e.dflt&&t.push(r.join("."))}))),n=0;n<t.length;n++)f.nestedProperty(e,"_input."+t[n]).get()||f.nestedProperty(e,t[n]).set(null)},w.supplyDataDefaults=function(e,t,r,n){var a,i,o,l=n._modules,c=n._visibleModules,d=n._basePlotModules,h=0,p=0;function v(e){t.push(e);var r=e._module;r&&(f.pushUnique(l,r),!0===e.visible&&f.pushUnique(c,r),f.pushUnique(d,e._module.basePlotModule),h++,!1!==e._input.visible&&p++)}n._transformModules=[];var g={},y=[],m=(r.template||{}).data||{},x=u.traceTemplater(m);for(a=0;a<e.length;a++){if(o=e[a],(i=x.newTrace(o)).uid=n._traceUids[a],w.supplyTraceDefaults(o,i,p,n,a),i.index=a,i._input=o,i._expandedIndex=h,i.transforms&&i.transforms.length)for(var _=!1!==o.visible&&!1===i.visible,T=O(i,t,r,n),M=0;M<T.length;M++){var k=T[M],A={_template:i._template,type:i.type,uid:i.uid+M};_&&!1===k.visible&&delete k.visible,w.supplyTraceDefaults(k,A,h,n,a),b(A,k),A.index=a,A._input=o,A._fullInput=i,A._expandedIndex=h,A._expandedInput=k,v(A)}else i._fullInput=i,i._expandedInput=i,v(i);s.traceIs(i,"carpetAxis")&&(g[i.carpet]=i),s.traceIs(i,"carpetDependent")&&y.push(a)}for(a=0;a<y.length;a++)if((i=t[y[a]]).visible){var L=g[i.carpet];i._carpet=L,L&&L.visible?(i.xaxis=L.xaxis,i.yaxis=L.yaxis):i.visible=!1}},w.supplyAnimationDefaults=function(e){var t;e=e||{};var r={};function n(t,n){return f.coerce(e||{},r,y,t,n)}if(n("mode"),n("direction"),n("fromcurrent"),Array.isArray(e.frame))for(r.frame=[],t=0;t<e.frame.length;t++)r.frame[t]=w.supplyAnimationFrameDefaults(e.frame[t]||{});else r.frame=w.supplyAnimationFrameDefaults(e.frame||{});if(Array.isArray(e.transition))for(r.transition=[],t=0;t<e.transition.length;t++)r.transition[t]=w.supplyAnimationTransitionDefaults(e.transition[t]||{});else r.transition=w.supplyAnimationTransitionDefaults(e.transition||{});return r},w.supplyAnimationFrameDefaults=function(e){var t={};function r(r,n){return f.coerce(e||{},t,y.frame,r,n)}return r("duration"),r("redraw"),t},w.supplyAnimationTransitionDefaults=function(e){var t={};function r(r,n){return f.coerce(e||{},t,y.transition,r,n)}return r("duration"),r("easing"),t},w.supplyFrameDefaults=function(e){var t={};function r(r,n){return f.coerce(e,t,m,r,n)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),t},w.supplyTraceDefaults=function(e,t,r,n,a){var i,o=n.colorway||d.defaults,l=o[r%o.length];function c(r,n){return f.coerce(e,t,w.attributes,r,n)}var u=c("visible");c("type"),c("name",n._traceWord+" "+a),c("uirevision",n.uirevision);var h=w.getModule(t);if(t._module=h,h){var p=h.basePlotModule,v=p.attr,g=p.attributes;if(v&&g){var y=n._subplots,m="";if(u||"gl2d"!==p.name){if(Array.isArray(v))for(i=0;i<v.length;i++){var x=v[i],b=f.coerce(e,t,g,x);y[x]&&f.pushUnique(y[x],b),m+=b}else m=f.coerce(e,t,g,v);y[p.name]&&f.pushUnique(y[p.name],m)}}}if(u){if(c("customdata"),c("ids"),c("meta"),s.traceIs(t,"showLegend")?(f.coerce(e,t,h.attributes.showlegend?h.attributes:w.attributes,"showlegend"),c("legend"),c("legendwidth"),c("legendgroup"),c("legendgrouptitle.text"),c("legendrank"),t._dfltShowLegend=!0):t._dfltShowLegend=!1,h&&h.supplyDefaults(e,t,l,n),s.traceIs(t,"noOpacity")||c("opacity"),s.traceIs(t,"notLegendIsolatable")&&(t.visible=!!t.visible),s.traceIs(t,"noHover")||(t.hovertemplate||f.coerceHoverinfo(e,t,n),"parcats"!==t.type&&s.getComponentMethod("fx","supplyDefaults")(e,t,l,n)),h&&h.selectPoints){var _=c("selectedpoints");f.isTypedArray(_)&&(t.selectedpoints=Array.from(_))}w.supplyTransformDefaults(e,t,n)}return t},w.hasMakesDataTransform=D,w.supplyTransformDefaults=function(e,t,r){if(t._length||D(e)){var n=r._globalTransforms||[],a=r._transformModules||[];if(Array.isArray(e.transforms)||0!==n.length)for(var i=e.transforms||[],o=n.concat(i),l=t.transforms=[],s=0;s<o.length;s++){var c,u=o[s],d=u.type,h=T[d],p=!(u._module&&u._module===h),v=h&&"function"==typeof h.transform;h||f.warn("Unrecognized transform type "+d+"."),h&&h.supplyDefaults&&(p||v)?((c=h.supplyDefaults(u,t,r,e)).type=d,c._module=h,f.pushUnique(a,h)):c=f.extendFlat({},u),l.push(c)}}},w.supplyLayoutGlobalDefaults=function(e,t,r){function n(r,n){return f.coerce(e,t,w.layoutAttributes,r,n)}var a=e.template;f.isPlainObject(a)&&(t.template=a,t._template=a.layout,t._dataTemplate=a.data),n("autotypenumbers");var i=f.coerceFont(n,"font"),o=i.size;f.coerceFont(n,"title.font",f.extendFlat({},i,{size:Math.round(1.4*o)})),n("title.text",t._dfltTitle.plot),n("title.xref");var l=n("title.yref");n("title.pad.t"),n("title.pad.r"),n("title.pad.b"),n("title.pad.l");var c=n("title.automargin");n("title.x"),n("title.xanchor"),n("title.y"),n("title.yanchor"),c&&("paper"===l&&(0!==t.title.y&&(t.title.y=1),"auto"===t.title.yanchor&&(t.title.yanchor=0===t.title.y?"top":"bottom")),"container"===l&&("auto"===t.title.y&&(t.title.y=1),"auto"===t.title.yanchor&&(t.title.yanchor=t.title.y<.5?"bottom":"top"))),n("uniformtext.mode")&&n("uniformtext.minsize"),n("autosize",!(e.width&&e.height)),n("width"),n("height"),n("minreducedwidth"),n("minreducedheight"),n("margin.l"),n("margin.r"),n("margin.t"),n("margin.b"),n("margin.pad"),n("margin.autoexpand"),e.width&&e.height&&w.sanitizeMargins(t),s.getComponentMethod("grid","sizeDefaults")(e,t),n("paper_bgcolor"),n("separators",r.decimal+r.thousands),n("hidesources"),n("colorway"),n("datarevision");var u=n("uirevision");n("editrevision",u),n("selectionrevision",u),s.getComponentMethod("modebar","supplyLayoutDefaults")(e,t),s.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(e,t,n),s.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(e,t,n),n("meta"),f.isPlainObject(e.transition)&&(n("transition.duration"),n("transition.easing"),n("transition.ordering")),s.getComponentMethod("calendars","handleDefaults")(e,t,"calendar"),s.getComponentMethod("fx","supplyLayoutGlobalDefaults")(e,t,n),f.coerce(e,t,g,"scattermode")},w.plotAutoSize=function(e,t,r){var n,a,i=e._context||{},l=i.frameMargins,s=f.isPlotDiv(e);if(s&&e.emit("plotly_autosize"),i.fillFrame)n=window.innerWidth,a=window.innerHeight,document.body.style.overflow="hidden";else{var c=s?window.getComputedStyle(e):{};if(n=C(c.width)||C(c.maxWidth)||r.width,a=C(c.height)||C(c.maxHeight)||r.height,o(l)&&l>0){var u=1-2*l;n=Math.round(u*n),a=Math.round(u*a)}}var d=w.layoutAttributes.width.min,h=w.layoutAttributes.height.min;n<d&&(n=d),a<h&&(a=h);var p=!t.width&&Math.abs(r.width-n)>1,v=!t.height&&Math.abs(r.height-a)>1;(v||p)&&(p&&(r.width=n),v&&(r.height=a)),e._initialAutoSize||(e._initialAutoSize={width:n,height:a}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,n){var a,i,o,l=s.componentsRegistry,c=t._basePlotModules,u=s.subplotsRegistry.cartesian;for(a in l)(o=l[a]).includeBasePlot&&o.includeBasePlot(e,t);for(var d in c.length||c.push(u),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t)),t._subplots)t._subplots[d].sort(f.subplotSort);for(i=0;i<c.length;i++)(o=c[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(e,t,r);var h=t._modules;for(i=0;i<h.length;i++)(o=h[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(e,t,r);var p=t._transformModules;for(i=0;i<p.length;i++)(o=p[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(e,t,r,n);for(a in l)(o=l[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(e,t,r)},w.purge=function(e){var t=e._fullLayout||{};void 0!==t._glcontainer&&(t._glcontainer.selectAll(".gl-canvas").remove(),t._glcontainer.remove(),t._glcanvas=null),t._modeBar&&t._modeBar.destroy(),e._transitionData&&(e._transitionData._interruptCallbacks&&(e._transitionData._interruptCallbacks.length=0),e._transitionData._animationRaf&&window.cancelAnimationFrame(e._transitionData._animationRaf)),f.clearThrottle(),f.clearResponsive(e),delete e.data,delete e.layout,delete e._fullData,delete e._fullLayout,delete e.calcdata,delete e.empty,delete e.fid,delete e.undoqueue,delete e.undonum,delete e.autoplay,delete e.changed,delete e._promises,delete e._redrawTimer,delete e._hmlumcount,delete e._hmpixcount,delete e._transitionData,delete e._transitioning,delete e._initialAutoSize,delete e._transitioningWithDuration,delete e._dragging,delete e._dragged,delete e._dragdata,delete e._hoverdata,delete e._snapshotInProgress,delete e._editing,delete e._mouseDownTime,delete e._legendMouseDownTime,e.removeAllListeners&&e.removeAllListeners()},w.style=function(e){var t,r=e._fullLayout._visibleModules,n=[];for(t=0;t<r.length;t++){var a=r[t];a.style&&f.pushUnique(n,a.style)}for(t=0;t<n.length;t++)n[t](e)},w.sanitizeMargins=function(e){if(e&&e.margin){var t,r=e.width,n=e.height,a=e.margin,i=r-(a.l+a.r),o=n-(a.t+a.b);i<0&&(t=(r-1)/(a.l+a.r),a.l=Math.floor(t*a.l),a.r=Math.floor(t*a.r)),o<0&&(t=(n-1)/(a.t+a.b),a.t=Math.floor(t*a.t),a.b=Math.floor(t*a.b))}},w.clearAutoMarginIds=function(e){e._fullLayout._pushmarginIds={}},w.allowAutoMargin=function(e,t){e._fullLayout._pushmarginIds[t]=1},w.autoMargin=function(e,t,r){var n=e._fullLayout,a=n.width,i=n.height,o=n.margin,l=n.minreducedwidth,s=n.minreducedheight,c=f.constrain(a-o.l-o.r,2,l),u=f.constrain(i-o.t-o.b,2,s),d=Math.max(0,a-c),h=Math.max(0,i-u),p=n._pushmargin,v=n._pushmarginIds;if(!1!==o.autoexpand){if(r){var g=r.pad;if(void 0===g&&(g=Math.min(12,o.l,o.r,o.t,o.b)),d){var y=(r.l+r.r)/d;y>1&&(r.l/=y,r.r/=y)}if(h){var m=(r.t+r.b)/h;m>1&&(r.t/=m,r.b/=m)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:T,size:r.b+g},t:{val:_,size:r.t+g}},v[t]=1}else delete p[t],delete v[t];if(!n._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),P(t);var a=t._size,i=t.margin,l={t:0,b:0,l:0,r:0},c=f.extendFlat({},a),u=i.l,d=i.r,h=i.t,v=i.b,g=t._pushmargin,y=t._pushmarginIds,m=t.minreducedwidth,x=t.minreducedheight;if(!1!==i.autoexpand){for(var b in g)y[b]||delete g[b];var _=e._fullLayout._reservedMargin;for(var T in _)for(var M in _[T]){var k=_[T][M];l[M]=Math.max(l[M],k)}for(var A in g.base={l:{val:0,size:u},r:{val:1,size:d},t:{val:1,size:h},b:{val:0,size:v}},l){var L=0;for(var S in g)"base"!==S&&o(g[S][A].size)&&(L=g[S][A].size>L?g[S][A].size:L);var D=Math.max(0,i[A]-L);l[A]=Math.max(0,l[A]-D)}for(var O in g){var C=g[O].l||{},I=g[O].b||{},R=C.val,z=C.size,N=I.val,F=I.size,E=r-l.r-l.l,H=n-l.t-l.b;for(var B in g){if(o(z)&&g[B].r){var j=g[B].r.val,Y=g[B].r.size;if(j>R){var V=(z*j+(Y-E)*R)/(j-R),U=(Y*(1-R)+(z-E)*(1-j))/(j-R);V+U>u+d&&(u=V,d=U)}}if(o(F)&&g[B].t){var q=g[B].t.val,G=g[B].t.size;if(q>N){var Z=(F*q+(G-H)*N)/(q-N),W=(G*(1-N)+(F-H)*(1-q))/(q-N);Z+W>v+h&&(v=Z,h=W)}}}}}var X=f.constrain(r-i.l-i.r,2,m),J=f.constrain(n-i.t-i.b,2,x),K=Math.max(0,r-X),Q=Math.max(0,n-J);if(K){var $=(u+d)/K;$>1&&(u/=$,d/=$)}if(Q){var ee=(v+h)/Q;ee>1&&(v/=ee,h/=ee)}if(a.l=Math.round(u)+l.l,a.r=Math.round(d)+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(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&(w.didMarginChange(c,a)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=p.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(y).length);if(t._redrawFromAutoMarginCount<te)return s.call("_doPlot",e);t._size=c,f.warn("Too many auto-margin redraws.")}!function(e){var t=p.list(e,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach((function(e){for(var r=0;r<t.length;r++){var n=t[r][e];n&&n()}}))}(e)};var I=["l","r","t","b","p","w","h"];function R(e,t,r){var n=!1,a=[w.previousPromises,function(){if(e._transitionData)return e._transitioning=!1,function(e){var t=Promise.resolve();if(!e)return t;for(;e.length;)t=t.then(e.shift());return t}(e._transitionData._interruptCallbacks)},r.prepareFn,w.rehover,w.reselect,function(){return e.emit("plotly_transitioning",[]),new Promise((function(a){e._transitioning=!0,t.duration>0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.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++,n||o!==i||(t=a,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)))}}r.runFn(l),setTimeout(l())}))}],i=f.syncOrAsync(a,e);return i&&i.then||(i=Promise.resolve()),i.then((function(){return e}))}w.didMarginChange=function(e,t){for(var r=0;r<I.length;r++){var n=I[r],a=e[n],i=t[n];if(!o(a)||Math.abs(i-a)>1)return!0}return!1},w.graphJson=function(e,t,r,n,a,i){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var o=a?e._fullData:e.data,s=a?e._fullLayout:e.layout,c=(e._transitionData||{})._frames;function u(e,t){if("function"==typeof e)return t?"_function_":null;if(f.isPlainObject(e)){var n,a={};return Object.keys(e).sort().forEach((function(i){if(-1===["_","["].indexOf(i.charAt(0)))if("function"!=typeof e[i]){if("keepdata"===r){if("src"===i.substr(i.length-3))return}else if("keepstream"===r){if("string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0&&!f.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0)return;a[i]=u(e[i],t)}else t&&(a[i]="_function")})),a}var i=Array.isArray(e),o=f.isTypedArray(e);if((i||o)&&e.dtype&&e.shape){var s=e.bdata;return u({dtype:e.dtype,shape:e.shape,bdata:f.isArrayBuffer(s)?l.encode(s):s},t)}return i?e.map((function(e){return u(e,t)})):o?f.simpleMap(e,f.identity):f.isJSDate(e)?f.ms2DateTimeLocal(+e):e}var d={data:(o||[]).map((function(e){var r=u(e);return t&&delete r.fit,r}))};if(!t&&(d.layout=u(s),a)){var h=s._size;d.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return c&&(d.frames=u(c)),i&&(d.config=u(e._context,!0)),"object"===n?d:JSON.stringify(d)},w.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r<t.length;r++)switch((n=t[r]).type){case"replace":a=n.value;var l=(i[n.index]||{}).name,s=a.name;i[n.index]=o[s]=a,s!==l&&(delete o[l],o[s]=a);break;case"insert":o[(a=n.value).name]=a,i.splice(n.index,0,a);break;case"delete":delete o[(a=i[n.index]).name],i.splice(n.index,1)}return Promise.resolve()},w.computeFrame=function(e,t){var r,n,a,i,o=e._transitionData._frameHash;if(!t)throw new Error("computeFrame must be given a string frame name");var l=o[t.toString()];if(!l)return!1;for(var s=[l],c=[l.name];l.baseframe&&(l=o[l.baseframe.toString()])&&-1===c.indexOf(l.name);)s.push(l),c.push(l.name);for(var u={};l=s.pop();)if(l.layout&&(u.layout=w.extendLayout(u.layout,l.layout)),l.data){if(u.data||(u.data=[]),!(n=l.traces))for(n=[],r=0;r<l.data.length;r++)n[r]=r;for(u.traces||(u.traces=[]),r=0;r<l.data.length;r++)null!=(a=n[r])&&(-1===(i=u.traces.indexOf(a))&&(i=u.data.length,u.traces[i]=a),u.data[i]=w.extendTrace(u.data[i],l.data[r]))}return u},w.recomputeFrameHash=function(e){for(var t=e._transitionData._frameHash={},r=e._transitionData._frames,n=0;n<r.length;n++){var a=r[n];a&&a.name&&(t[a.name]=a)}},w.extendObjectWithContainers=function(e,t,r){var n,a,i,o,l,s,c,u=f.extendDeepNoArrays({},t||{}),d=f.expandObjectPaths(u),h={};if(r&&r.length)for(i=0;i<r.length;i++)void 0===(a=(n=f.nestedProperty(d,r[i])).get())?f.nestedProperty(h,r[i]).set(null):(n.set(null),f.nestedProperty(h,r[i]).set(a));if(e=f.extendDeepNoArrays(e||{},d),r&&r.length)for(i=0;i<r.length;i++)if(s=f.nestedProperty(h,r[i]).get()){for(c=(l=f.nestedProperty(e,r[i])).get(),Array.isArray(c)||(c=[],l.set(c)),o=0;o<s.length;o++){var p=s[o];c[o]=null===p?null:w.extendObjectWithContainers(c[o],p)}l.set(c)}return e},w.dataArrayContainers=["transforms","dimensions"],w.layoutArrayContainers=s.layoutArrayContainers,w.extendTrace=function(e,t){return w.extendObjectWithContainers(e,t,w.dataArrayContainers)},w.extendLayout=function(e,t){return w.extendObjectWithContainers(e,t,w.layoutArrayContainers)},w.transition=function(e,t,r,n,a,i){var o={redraw:a.redraw},l={},s=[];return o.prepareFn=function(){for(var a=Array.isArray(t)?t.length:0,i=n.slice(0,a),o=0;o<i.length;o++){var c=i[o],u=e._fullData[c]._module;if(u){if(u.animatable){var d=u.basePlotModule.name;l[d]||(l[d]=[]),l[d].push(c)}e.data[i[o]]=w.extendTrace(e.data[i[o]],t[o])}}var h=f.expandObjectPaths(f.extendDeepNoArrays({},r)),p=/^[xy]axis[0-9]*$/;for(var v in h)p.test(v)&&delete h[v].range;w.extendLayout(e.layout,h),delete e.calcdata,w.supplyDefaults(e),w.doCalcdata(e);var g=f.expandObjectPaths(r);if(g){var y=e._fullLayout._plots;for(var m in y){var x=y[m],b=x.xaxis,_=x.yaxis,T=b.range.slice(),M=_.range.slice(),k=null,A=null,L=null,S=null;Array.isArray(g[b._name+".range"])?k=g[b._name+".range"].slice():Array.isArray((g[b._name]||{}).range)&&(k=g[b._name].range.slice()),Array.isArray(g[_._name+".range"])?A=g[_._name+".range"].slice():Array.isArray((g[_._name]||{}).range)&&(A=g[_._name].range.slice()),T&&k&&(b.r2l(T[0])!==b.r2l(k[0])||b.r2l(T[1])!==b.r2l(k[1]))&&(L={xr0:T,xr1:k}),M&&A&&(_.r2l(M[0])!==_.r2l(A[0])||_.r2l(M[1])!==_.r2l(A[1]))&&(S={yr0:M,yr1:A}),(L||S)&&s.push(f.extendFlat({plotinfo:x},L,S))}}return Promise.resolve()},o.runFn=function(t){var n,a,o=e._fullLayout._basePlotModules,c=s.length;if(r)for(a=0;a<o.length;a++)o[a].transitionAxes&&o[a].transitionAxes(e,s,i,t);for(var u in c?((n=f.extendFlat({},i)).duration=0,delete l.cartesian):n=i,l){var d=l[u];e._fullData[d[0]]._module.basePlotModule.plot(e,d,n,t)}},R(e,i,o)},w.transitionFromReact=function(e,t,r,n){var a=e._fullLayout,i=a.transition,o={},l=[];return o.prepareFn=function(){var e=a._plots;for(var i in o.redraw=!1,"some"===t.anim&&(o.redraw=!0),"some"===r.anim&&(o.redraw=!0),e){var s=e[i],c=s.xaxis,u=s.yaxis,d=n[c._name].range.slice(),h=n[u._name].range.slice(),p=c.range.slice(),v=u.range.slice();c.setScale(),u.setScale();var g=null,y=null;c.r2l(d[0])===c.r2l(p[0])&&c.r2l(d[1])===c.r2l(p[1])||(g={xr0:d,xr1:p}),u.r2l(h[0])===u.r2l(v[0])&&u.r2l(h[1])===u.r2l(v[1])||(y={yr0:h,yr1:v}),(g||y)&&l.push(f.extendFlat({plotinfo:s},g,y))}return Promise.resolve()},o.runFn=function(r){for(var n,a,o,s=e._fullData,c=e._fullLayout._basePlotModules,u=[],d=0;d<s.length;d++)u.push(d);function h(){if(e._fullLayout)for(var t=0;t<c.length;t++)c[t].transitionAxes&&c[t].transitionAxes(e,l,n,r)}function p(){if(e._fullLayout)for(var t=0;t<c.length;t++)c[t].plot(e,o,a,r)}l.length&&t.anim?"traces first"===i.ordering?(n=f.extendFlat({},i,{duration:0}),o=u,a=i,setTimeout(h,i.duration),p()):(n=i,o=null,a=f.extendFlat({},i,{duration:0}),setTimeout(p,n.duration),h()):l.length?(n=i,h()):t.anim&&(o=u,a=i,p())},R(e,i,o)},w.doCalcdata=function(e,t){var r,n,a,i,o=p.list(e),l=e._fullData,u=e._fullLayout,d=new Array(l.length),v=(e.calcdata||[]).slice();for(e.calcdata=d,u._numBoxes=0,u._numViolins=0,u._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,u._piecolormap={},u._sunburstcolormap={},u._treemapcolormap={},u._iciclecolormap={},u._funnelareacolormap={},a=0;a<l.length;a++)Array.isArray(t)&&-1===t.indexOf(a)&&(d[a]=v[a]);for(a=0;a<l.length;a++)(r=l[a])._arrayAttrs=c.findArrayAttributes(r),r._extremes={};var g=u._subplots.polar||[];for(a=0;a<g.length;a++)o.push(u[g[a]].radialaxis,u[g[a]].angularaxis);for(var y in u._colorAxes){var m=u[y];!1!==m.cauto&&(delete m.cmin,delete m.cmax)}var x=!1;function b(t){if(r=l[t],n=r._module,!0===r.visible&&r.transforms){if(n&&n.calc){var a=n.calc(e,r);a[0]&&a[0].t&&a[0].t._scene&&delete a[0].t._scene.dirty}for(i=0;i<r.transforms.length;i++){var o=r.transforms[i];(n=T[o.type])&&n.calcTransform&&(r._hasCalcTransform=!0,x=!0,n.calcTransform(e,r,o))}}}function _(t,a){if(r=l[t],!!(n=r._module).isContainer===a){var o=[];if(!0===r.visible&&0!==r._length){delete r._indexToPoints;var s=r.transforms||[];for(i=s.length-1;i>=0;i--)if(s[i].enabled){r._indexToPoints=s[i]._indexToPoints;break}n&&n.calc&&(o=n.calc(e,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[t]=o}}for(N(o,l,u),a=0;a<l.length;a++)_(a,!0);for(a=0;a<l.length;a++)b(a);for(x&&N(o,l,u),a=0;a<l.length;a++)_(a,!0);for(a=0;a<l.length;a++)_(a,!1);F(e);var w=function(e,t){var r,n,a,i,o,l=[];function c(e,r,n){var a=r._id.charAt(0);if("histogram2dcontour"===e){var i=r._counterAxes[0],o=p.getFromId(t,i),l="x"===a||"x"===i&&"category"===o.type,s="y"===a||"y"===i&&"category"===o.type;return function(e,t){return 0===e||0===t||l&&e===n[t].length-1||s&&t===n.length-1?-1:("y"===a?t:e)-1}}return function(e,t){return"y"===a?t:e}}var u={min:function(e){return f.aggNums(Math.min,null,e)},max:function(e){return f.aggNums(Math.max,null,e)},sum:function(e){return f.aggNums((function(e,t){return e+t}),null,e)},total:function(e){return f.aggNums((function(e,t){return e+t}),null,e)},mean:function(e){return f.mean(e)},median:function(e){return f.median(e)}};function d(e,t){return e[1]-t[1]}function h(e,t){return t[1]-e[1]}for(r=0;r<e.length;r++){var v=e[r];if("category"===v.type){var g=v.categoryorder.match(z);if(g){var y=g[1],m=g[2],x=v._id.charAt(0),b="x"===x,_=[];for(n=0;n<v._categories.length;n++)_.push([v._categories[n],[]]);for(n=0;n<v._traceIndices.length;n++){var w=v._traceIndices[n],T=t._fullData[w];if(!0===T.visible){var M=T.type;s.traceIs(T,"histogram")&&(delete T._xautoBinFinished,delete T._yautoBinFinished);var k="splom"===M,A="scattergl"===M,L=t.calcdata[w];for(a=0;a<L.length;a++){var S,D,O=L[a];if(k){var C=T._axesDim[v._id];if(!b){var P=T._diag[C][0];P&&(v=t._fullLayout[p.id2name(P)])}var I=O.trace.dimensions[C].values;for(i=0;i<I.length;i++)for(S=v._categoriesMap[I[i]],o=0;o<O.trace.dimensions.length;o++)if(o!==C){var R=O.trace.dimensions[o];_[S][1].push(R.values[i])}}else if(A){for(i=0;i<O.t.x.length;i++)b?(S=O.t.x[i],D=O.t.y[i]):(S=O.t.y[i],D=O.t.x[i]),_[S][1].push(D);O.t&&O.t._scene&&delete O.t._scene.dirty}else if(O.hasOwnProperty("z")){D=O.z;var N=c(T.type,v,D);for(i=0;i<D.length;i++)for(o=0;o<D[i].length;o++)(S=N(o,i))+1&&_[S][1].push(D[i][o])}else for(void 0===(S=O.p)&&(S=O[x]),void 0===(D=O.s)&&(D=O.v),void 0===D&&(D=b?O.y:O.x),Array.isArray(D)||(D=void 0===D?[]:[D]),i=0;i<D.length;i++)_[S][1].push(D[i])}}}v._categoriesValue=_;var F=[];for(n=0;n<_.length;n++)F.push([_[n][0],u[y](_[n][1])]);F.sort("descending"===m?h:d),v._categoriesAggregatedValue=F,v._initialCategories=F.map((function(e){return e[0]})),l=l.concat(v.sortByInitialCategories())}}}return l}(o,e);if(w.length){for(u._numBoxes=0,u._numViolins=0,a=0;a<w.length;a++)_(w[a],!0);for(a=0;a<w.length;a++)_(w[a],!1);F(e)}s.getComponentMethod("fx","calc")(e),s.getComponentMethod("errorbars","calc")(e)};var z=/(total|sum|min|max|mean|median) (ascending|descending)/;function N(e,t,r){var n={};function a(e){e.clearCalc(),"multicategory"===e.type&&e.setupMultiCategory(t),n[e._id]=1}f.simpleMap(e,a);for(var i=r._axisMatchGroups||[],o=0;o<i.length;o++)for(var l in i[o])n[l]||a(r[p.id2name(l)])}function F(e){var t,r,n,a=e._fullLayout,i=a._visibleModules,o={};for(r=0;r<i.length;r++){var l=i[r],s=l.crossTraceCalc;if(s){var c=l.basePlotModule.name;o[c]?f.pushUnique(o[c],s):o[c]=[s]}}for(n in o){var u=o[n],d=a._subplots[n];if(Array.isArray(d))for(t=0;t<d.length;t++){var h=d[t],p="cartesian"===n?a._plots[h]:a[h];for(r=0;r<u.length;r++)u[r](e,p,h)}else for(r=0;r<u.length;r++)u[r](e)}}w.rehover=function(e){e._fullLayout._rehover&&e._fullLayout._rehover()},w.redrag=function(e){e._fullLayout._redrag&&e._fullLayout._redrag()},w.reselect=function(e){var t=e._fullLayout,r=(e.layout||{}).selections,n=t._previousSelections;t._previousSelections=r;var a=t._reselect||JSON.stringify(r)!==JSON.stringify(n);s.getComponentMethod("selections","reselect")(e,a)},w.generalUpdatePerTraceModule=function(e,t,r,n){var a,i=t.traceHash,o={};for(a=0;a<r.length;a++){var l=r[a],s=l[0].trace;s.visible&&(o[s.type]=o[s.type]||[],o[s.type].push(l))}for(var c in i)if(!o[c]){var u=i[c][0];u[0].trace.visible=!1,o[c]=[u]}for(var d in o){var h=o[d];h[0][0].trace._module.plot(e,t,f.filterVisible(h),n)}t.traceHash=o},w.plotBasePlot=function(e,t,r,n,a){var i=s.getModule(e),o=x(t.calcdata,i)[0];i.plot(t,o,n,a)},w.cleanBasePlot=function(e,t,r,n,a){var i=a._has&&a._has(e),o=r._has&&r._has(e);i&&!o&&a["_"+e+"layer"].selectAll("g.trace").remove()}},1776:function(e,t,r){"use strict";var n=r(6880);function a(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var n=[],a=0;a<r.length;a++)n[a]="`"+r[a]+"`";t+="Finally, the template string has access to ",t=1===r.length?t+"variable "+n[0]:t+"variables "+n.slice(0,-1).join(", ")+" and "+n.slice(-1)+"."}return t}n.FORMAT_LINK,n.DATE_FORMAT_LINK,t.Ks=function(e,t){e=e||{},a(t=t||{});var r={valType:"string",dflt:"",editType:e.editType||"none"};return!1!==e.arrayOk&&(r.arrayOk=!0),r},t.Gw=function(e,t){e=e||{},a(t=t||{});var r={valType:"string",dflt:"",editType:e.editType||"calc"};return!1!==e.arrayOk&&(r.arrayOk=!0),r},t.ye=function(e,t){return t=t||{},(e=e||{}).newshape,a(t),{valType:"string",dflt:"",editType:e.editType||"arraydraw"}}},4040:function(e,t,r){"use strict";var n=r(4248),a=r(6628),i=r(2416),o=r(3620),l=r(2200).addStyleRule,s=r(2880),c=r(5464),u=r(4859),f=s.extendFlat,d=s.extendDeepAll;function h(e){var r=e.name,a=e.categories,i=e.meta;if(t.modules[r])n.log("Type "+r+" already registered");else{t.subplotsRegistry[e.basePlotModule.name]||function(e){var r=e.name;if(t.subplotsRegistry[r])n.log("Plot type "+r+" already registered.");else for(var a in y(e),t.subplotsRegistry[r]=e,t.componentsRegistry)b(a,e.name)}(e.basePlotModule);for(var o={},s=0;s<a.length;s++)o[a[s]]=!0,t.allCategories[a[s]]=!0;for(var c in t.modules[r]={_module:e,categories:o},i&&Object.keys(i).length&&(t.modules[r].meta=i),t.allTypes.push(r),t.componentsRegistry)m(c,r);e.layoutAttributes&&f(t.traceLayoutAttributes,e.layoutAttributes);var u=e.basePlotModule,d=u.name;if("mapbox"===d){var h=u.constants.styleRules;for(var p in h)l(".js-plotly-plot .plotly .mapboxgl-"+p,h[p])}"geo"!==d&&"mapbox"!==d||void 0!==window.PlotlyGeoAssets||(window.PlotlyGeoAssets={topojson:{}})}}function p(e){if("string"!=typeof e.name)throw new Error("Component module *name* must be a string.");var r=e.name;for(var n in t.componentsRegistry[r]=e,e.layoutAttributes&&(e.layoutAttributes._isLinkedToArray&&i(t.layoutArrayContainers,r),y(e)),t.modules)m(r,n);for(var a in t.subplotsRegistry)b(r,a);for(var o in t.transformsRegistry)x(r,o);e.schema&&e.schema.layout&&d(u,e.schema.layout)}function v(e){if("string"!=typeof e.name)throw new Error("Transform module *name* must be a string.");var r="Transform module "+e.name,a="function"==typeof e.transform,i="function"==typeof e.calcTransform;if(!a&&!i)throw new Error(r+" is missing a *transform* or *calcTransform* method.");for(var l in a&&i&&n.log([r+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),o(e.attributes)||n.log(r+" registered without an *attributes* object."),"function"!=typeof e.supplyDefaults&&n.log(r+" registered without a *supplyDefaults* method."),t.transformsRegistry[e.name]=e,t.componentsRegistry)x(l,e.name)}function g(e){var r=e.name,n=r.split("-")[0],a=e.dictionary,i=e.format,o=a&&Object.keys(a).length,l=i&&Object.keys(i).length,s=t.localeRegistry,c=s[r];if(c||(s[r]=c={}),n!==r){var u=s[n];u||(s[n]=u={}),o&&u.dictionary===c.dictionary&&(u.dictionary=a),l&&u.format===c.format&&(u.format=i)}o&&(c.dictionary=a),l&&(c.format=i)}function y(e){if(e.layoutAttributes){var r=e.layoutAttributes._arrayAttrRegexps;if(r)for(var n=0;n<r.length;n++)i(t.layoutArrayRegexes,r[n])}}function m(e,r){var n=t.componentsRegistry[e].schema;if(n&&n.traces){var a=n.traces[r];a&&d(t.modules[r]._module.attributes,a)}}function x(e,r){var n=t.componentsRegistry[e].schema;if(n&&n.transforms){var a=n.transforms[r];a&&d(t.transformsRegistry[r].attributes,a)}}function b(e,r){var n=t.componentsRegistry[e].schema;if(n&&n.subplots){var a=t.subplotsRegistry[r],i=a.layoutAttributes,o="subplot"===a.attr?a.name:a.attr;Array.isArray(o)&&(o=o[0]);var l=n.subplots[o];i&&l&&d(i,l)}}function _(e){return"object"==typeof e&&(e=e.type),e}t.modules={},t.allCategories={},t.allTypes=[],t.subplotsRegistry={},t.transformsRegistry={},t.componentsRegistry={},t.layoutArrayContainers=[],t.layoutArrayRegexes=[],t.traceLayoutAttributes={},t.localeRegistry={},t.apiMethodRegistry={},t.collectableSubplotTypes=null,t.register=function(e){if(t.collectableSubplotTypes=null,!e)throw new Error("No argument passed to Plotly.register.");e&&!Array.isArray(e)&&(e=[e]);for(var r=0;r<e.length;r++){var n=e[r];if(!n)throw new Error("Invalid module was attempted to be registered!");switch(n.moduleType){case"trace":h(n);break;case"transform":v(n);break;case"component":p(n);break;case"locale":g(n);break;case"apiMethod":var a=n.name;t.apiMethodRegistry[a]=n.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},t.getModule=function(e){var r=t.modules[_(e)];return!!r&&r._module},t.traceIs=function(e,r){if("various"===(e=_(e)))return!1;var a=t.modules[e];return a||(e&&n.log("Unrecognized trace type "+e+"."),a=t.modules[c.type.dflt]),!!a.categories[r]},t.getTransformIndices=function(e,t){for(var r=[],n=e.transforms||[],a=0;a<n.length;a++)n[a].type===t&&r.push(a);return r},t.hasTransform=function(e,t){for(var r=e.transforms||[],n=0;n<r.length;n++)if(r[n].type===t)return!0;return!1},t.getComponentMethod=function(e,r){var n=t.componentsRegistry[e];return n&&n[r]||a},t.call=function(){var e=arguments[0],r=[].slice.call(arguments,1);return t.apiMethodRegistry[e].apply(null,r)}},1536:function(e,t,r){"use strict";var n=r(4040),a=r(3400),i=a.extendFlat,o=a.extendDeep;function l(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}e.exports=function(e,t){var r,a,s=e.data,c=e.layout,u=o([],s),f=o({},c,l(t.tileClass)),d=e._context||{};if(t.width&&(f.width=t.width),t.height&&(f.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){f.annotations=[];var h=Object.keys(f);for(r=0;r<h.length;r++)a=h[r],["xaxis","yaxis","zaxis"].indexOf(a.slice(0,5))>-1&&(f[h[r]].title={text:""});for(r=0;r<u.length;r++){var p=u[r];p.showscale=!1,p.marker&&(p.marker.showscale=!1),n.traceIs(p,"pie-like")&&(p.textposition="none")}}if(Array.isArray(t.annotations))for(r=0;r<t.annotations.length;r++)f.annotations.push(t.annotations[r]);var v=Object.keys(f).filter((function(e){return e.match(/^scene\d*$/)}));if(v.length){var g={};for("thumbnail"===t.tileClass&&(g={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<v.length;r++){var y=f[v[r]];y.xaxis||(y.xaxis={}),y.yaxis||(y.yaxis={}),y.zaxis||(y.zaxis={}),i(y.xaxis,g),i(y.yaxis,g),i(y.zaxis,g),y._scene=null}}var m=document.createElement("div");t.tileClass&&(m.className=t.tileClass);var x={gd:m,td:m,layout:f,data:u,config:{staticPlot:void 0===t.staticPlot||t.staticPlot,plotGlPixelRatio:void 0===t.plotGlPixelRatio?2:t.plotGlPixelRatio,displaylogo:t.displaylogo||!1,showLink:t.showLink||!1,showTips:t.showTips||!1,mapboxAccessToken:d.mapboxAccessToken}};return"transparent"!==t.setBackground&&(x.config.setBackground=t.setBackground||"opaque"),x.gd.defaultLayout=l(t.tileClass),x}},7412:function(e,t,r){"use strict";var n=r(3400),a=r(7024),i=r(8616),o=r(7030);e.exports=function(e,t){var r;return n.isPlainObject(e)||(r=n.getGraphDiv(e)),(t=t||{}).format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise((function(l,s){r&&r._snapshotInProgress&&s(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==t.format&&s(new Error(o.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var c=a(e,t),u=t.filename||e.fn||"newplot";u+="."+t.format.replace("-","."),c.then((function(e){return r&&(r._snapshotInProgress=!1),i(e,u,t.format)})).then((function(e){l(e)})).catch((function(e){r&&(r._snapshotInProgress=!1),s(e)}))}))}},8616:function(e,t,r){"use strict";var n=r(3400),a=r(7030);e.exports=function(e,t,r){var i=document.createElement("a"),o="download"in i;return new Promise((function(l,s){var c,u;if(n.isIE())return c=a.createBlob(e,"svg"),window.navigator.msSaveBlob(c,t),c=null,l(t);if(o)return c=a.createBlob(e,r),u=a.createObjectURL(c),i.href=u,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),a.revokeObjectURL(u),c=null,l(t);if(n.isSafari()){var f="svg"===r?",":";base64,";return a.octetStream(f+encodeURIComponent(e)),l(t)}s(new Error("download error"))}))}},7030:function(e,t,r){"use strict";var n=r(4040);t.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("gl2d")||e._has("mapbox"))?500:0},t.getRedrawFunc=function(e){return function(){n.getComponentMethod("colorbar","draw")(e)}},t.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},t.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var a=window.URL||window.webkitURL;t.createObjectURL=function(e){return a.createObjectURL(e)},t.revokeObjectURL=function(e){return a.revokeObjectURL(e)},t.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),a=0;a<t;a++)n[a]=e.charCodeAt(a);return r}(window.atob(e));return new window.Blob([r],{type:"image/"+t})},t.octetStream=function(e){document.location.href="data:application/octet-stream"+e},t.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,t.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},8904:function(e,t,r){"use strict";var n=r(7030),a={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:r(1536),toSVG:r(7164),svgToImg:r(3268),toImage:r(1808),downloadImage:r(7412)};e.exports=a},3268:function(e,t,r){"use strict";var n=r(3400),a=r(1252).EventEmitter,i=r(7030);e.exports=function(e){var t=e.emitter||new a,r=new Promise((function(a,o){var l=window.Image,s=e.svg,c=e.format||"png";if(n.isIE()&&"svg"!==c){var u=new Error(i.MSG_IE_BAD_FORMAT);return o(u),e.promise?r:t.emit("error",u)}var f,d,h=e.canvas,p=e.scale||1,v=e.width||300,g=e.height||150,y=p*v,m=p*g,x=h.getContext("2d",{willReadFrequently:!0}),b=new l;"svg"===c||n.isSafari()?d=i.encodeSVG(s):(f=i.createBlob(s,"svg"),d=i.createObjectURL(f)),h.width=y,h.height=m,b.onload=function(){var r;switch(f=null,i.revokeObjectURL(d),"svg"!==c&&x.drawImage(b,0,0,y,m),c){case"jpeg":r=h.toDataURL("image/jpeg");break;case"png":r=h.toDataURL("image/png");break;case"webp":r=h.toDataURL("image/webp");break;case"svg":r=d;break;default:var n="Image format is not jpeg, png, svg or webp.";if(o(new Error(n)),!e.promise)return t.emit("error",n)}a(r),e.promise||t.emit("success",r)},b.onerror=function(r){if(f=null,i.revokeObjectURL(d),o(r),!e.promise)return t.emit("error",r)},b.src=d}));return e.promise?r:t}},1808:function(e,t,r){"use strict";var n=r(1252).EventEmitter,a=r(4040),i=r(3400),o=r(7030),l=r(1536),s=r(7164),c=r(3268);e.exports=function(e,t){var r=new n,u=l(e,{format:"png"}),f=u.gd;f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);var d=o.getRedrawFunc(f);return a.call("_doPlot",f,u.data,u.layout,u.config).then(d).then((function(){var e=o.getDelay(f._fullLayout);setTimeout((function(){var e=s(f),n=document.createElement("canvas");n.id=i.randstr(),(r=c({format:t.format,width:f._fullLayout.width,height:f._fullLayout.height,canvas:n,emitter:r,svg:e})).clean=function(){f&&document.body.removeChild(f)}}),e)})).catch((function(e){r.emit("error",e)})),r}},7164:function(e,t,r){"use strict";var n=r(3428),a=r(3400),i=r(3616),o=r(6308),l=r(9616),s=/"/g,c="TOBESTRIPPED",u=new RegExp('("'+c+")|("+c+'")',"g");e.exports=function(e,t,r){var f,d=e._fullLayout,h=d._paper,p=d._toppaper,v=d.width,g=d.height;h.insert("rect",":first-child").call(i.setRect,0,0,v,g).call(o.fill,d.paper_bgcolor);var y=d._basePlotModules||[];for(f=0;f<y.length;f++){var m=y[f];m.toSVG&&m.toSVG(e)}if(p){var x=p.node().childNodes,b=Array.prototype.slice.call(x);for(f=0;f<b.length;f++){var _=b[f];_.childNodes.length&&h.node().appendChild(_)}}d._draggers&&d._draggers.remove(),h.node().style.background="",h.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each((function(){var e=n.select(this);if("hidden"!==this.style.visibility&&"none"!==this.style.display){e.style({visibility:null,display:null});var t=this.style.fontFamily;t&&-1!==t.indexOf('"')&&e.style("font-family",t.replace(s,c))}else e.remove()})),h.selectAll(".gradient_filled,.pattern_filled").each((function(){var e=n.select(this),t=this.style.fill;t&&-1!==t.indexOf("url(")&&e.style("fill",t.replace(s,c));var r=this.style.stroke;r&&-1!==r.indexOf("url(")&&e.style("stroke",r.replace(s,c))})),"pdf"!==t&&"eps"!==t||h.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),h.node().setAttributeNS(l.xmlns,"xmlns",l.svg),h.node().setAttributeNS(l.xmlns,"xmlns:xlink",l.xlink),"svg"===t&&r&&(h.attr("width",r*v),h.attr("height",r*g),h.attr("viewBox","0 0 "+v+" "+g));var w=(new window.XMLSerializer).serializeToString(h.node());return w=(w=(w=function(e){var t=n.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,(function(e){return"&lt;"===e?"&#60;":"&rt;"===e?"&#62;":-1!==e.indexOf("<")||-1!==e.indexOf(">")?"":t.html(e).text()}));return t.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")).replace(u,"'"),a.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},4664:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){for(var r=0;r<e.length;r++)e[r].i=r;n.mergeArray(t.text,e,"tx"),n.mergeArray(t.hovertext,e,"htx");var a=t.marker;if(a){n.mergeArray(a.opacity,e,"mo",!0),n.mergeArray(a.color,e,"mc");var i=a.line;i&&(n.mergeArray(i.color,e,"mlc"),n.mergeArrayCastPositive(i.width,e,"mlw"))}}},832:function(e,t,r){"use strict";var n=r(2904),a=r(9736).axisHoverFormat,i=r(1776).Ks,o=r(1776).Gw,l=r(9084),s=r(5376),c=r(8048),u=r(8192).c,f=r(2880).extendFlat,d=s({editType:"calc",arrayOk:!0,colorEditType:"style"}),h=f({},n.marker.line.width,{dflt:0}),p=f({width:h,editType:"calc"},l("marker.line")),v=f({line:p,editType:"calc"},l("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:u,cornerradius:{valType:"any",editType:"calc"}});e.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),text:n.text,texttemplate:o({editType:"plot"},{keys:c.eventDataKeys}),hovertext:n.hovertext,hovertemplate:i({},{keys:c.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:f({},d,{}),insidetextfont:f({},d,{}),outsidetextfont:f({},d,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:f({},n.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:v,offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:"style"},textfont:n.selected.textfont,editType:"style"},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:"style"},textfont:n.unselected.textfont,editType:"style"},zorder:n.zorder,_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"]}}}},9439:function(e,t,r){"use strict";var n=r(4460),a=r(1220),i=r(4288).hasColorscale,o=r(7128),l=r(4664),s=r(4500);e.exports=function(e,t){var r,c,u,f,d,h,p=n.getFromId(e,t.xaxis||"x"),v=n.getFromId(e,t.yaxis||"y"),g={msUTC:!(!t.base&&0!==t.base)};"h"===t.orientation?(r=p.makeCalcdata(t,"x",g),u=v.makeCalcdata(t,"y"),f=a(t,v,"y",u),d=!!t.yperiodalignment,h="y"):(r=v.makeCalcdata(t,"y",g),u=p.makeCalcdata(t,"x"),f=a(t,p,"x",u),d=!!t.xperiodalignment,h="x"),c=f.vals;for(var y=Math.min(c.length,r.length),m=new Array(y),x=0;x<y;x++)m[x]={p:c[x],s:r[x]},d&&(m[x].orig_p=u[x],m[x][h+"End"]=f.ends[x],m[x][h+"Start"]=f.starts[x]),t.ids&&(m[x].id=String(t.ids[x]));return i(t,"marker")&&o(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),i(t,"marker.line")&&o(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),l(m,t),s(m,t),m}},8048:function(e){"use strict";e.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},6376:function(e,t,r){"use strict";var n=r(8248),a=r(3400).isArrayOrTypedArray,i=r(9032).BADNUM,o=r(4040),l=r(4460),s=r(1888).getAxisGroup,c=r(2592);function u(e,t,r,o,u){if(o.length){var b,_,w,T;switch(function(e,t){var r,i;for(r=0;r<t.length;r++){var o,l=t[r],s=l[0].trace,c="funnel"===s.type?s._base:s.base,u="h"===s.orientation?s.xcalendar:s.ycalendar,f="category"===e.type||"multicategory"===e.type?function(){return null}:e.d2c;if(a(c)){for(i=0;i<Math.min(c.length,l.length);i++)o=f(c[i],0,u),n(o)?(l[i].b=+o,l[i].hasB=1):l[i].b=0;for(;i<l.length;i++)l[i].b=0}else{o=f(c,0,u);var d=n(o);for(o=d?o:0,i=0;i<l.length;i++)l[i].b=o,d&&(l[i].hasB=1)}}}(r,o),u.mode){case"overlay":f(t,r,o,u);break;case"group":for(b=[],_=[],w=0;w<o.length;w++)void 0===(T=o[w])[0].trace.offset?_.push(T):b.push(T);_.length&&function(e,t,r,n,a){var o=new c(n,{posAxis:t,sepNegVal:!1,overlapNoMerge:!a.norm});(function(e,t,r,n){for(var a=e._fullLayout,i=r.positions,o=r.distinctPositions,l=r.minDiff,c=r.traces,u=c.length,f=i.length!==o.length,d=l*(1-n.gap),g=s(a,t._id)+c[0][0].trace.orientation,y=a._alignmentOpts[g]||{},m=0;m<u;m++){var x,b,_=c[m],w=_[0].trace,T=y[w.alignmentgroup]||{},M=Object.keys(T.offsetGroups||{}).length,k=(x=M?d/M:f?d/u:d)*(1-(n.groupgap||0));b=M?((2*w._offsetIndex+1-M)*x-k)/2:f?((2*m+1-u)*x-k)/2:-k/2;var A=_[0].t;A.barwidth=k,A.poffset=b,A.bargroupwidth=d,A.bardelta=l}r.binWidth=c[0][0].t.barwidth/100,h(r),p(t,r),v(t,r,f)})(e,t,o,a),function(e,t){for(var r=e.traces,n=0;n<r.length;n++){var a=r[n];if(void 0===a[0].trace.base)for(var o=new c([a],{posAxis:t,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<a.length;l++){var s=a[l];if(s.p!==i){var u=o.put(s.p,s.b+s.s);u&&(s.b=u)}}}}(o,t),a.norm?(y(o),m(r,o,a)):g(r,o)}(e,t,r,_,u),b.length&&f(t,r,b,u);break;case"stack":case"relative":for(b=[],_=[],w=0;w<o.length;w++)void 0===(T=o[w])[0].trace.base?_.push(T):b.push(T);!function(e){if(!(e.length<2)){var t,r,a,i,o,l;for(t=0;t<e.length&&void 0===(i=(r=e[t][0].trace).marker?r.marker.cornerradius:void 0);t++);if(void 0!==i)for(o=n(i)?+i:+i.slice(0,-1),l=n(i)?"px":"%",t=0;t<e.length;t++)(a=e[t][0].t).cornerradiusvalue=o,a.cornerradiusform=l}}(_),_.length&&function(e,t,r,n,a){var o=new c(n,{posAxis:t,sepNegVal:"relative"===a.mode,overlapNoMerge:!(a.norm||"stack"===a.mode||"relative"===a.mode)});d(t,o,a),function(e,t,r){var n,a,o,s,c,u,f=x(e),d=t.traces;for(s=0;s<d.length;s++)if("funnel"===(a=(n=d[s])[0].trace).type)for(c=0;c<n.length;c++)(u=n[c]).s!==i&&t.put(u.p,-.5*u.s);for(s=0;s<d.length;s++){o="funnel"===(a=(n=d[s])[0].trace).type;var h=[];for(c=0;c<n.length;c++)if((u=n[c]).s!==i){var p;p=o?u.s:u.s+u.b;var v=t.put(u.p,p),g=v+p;u.b=v,u[f]=g,r.norm||(h.push(g),u.hasB&&h.push(v))}r.norm||(a._extremes[e._id]=l.findExtremes(e,h,{tozero:!0,padded:!0}))}}(r,o,a);for(var s=0;s<n.length;s++)for(var u=n[s],f=0;f<u.length;f++){var h=u[f];h.s!==i&&h.b+h.s===o.get(h.p,h.s)&&(h._outmost=!0)}a.norm&&m(r,o,a)}(0,t,r,_,u),b.length&&f(t,r,b,u)}!function(e){var t,r,a,i,o,l,s;for(t=0;t<e.length;t++)a=(r=e[t])[0].trace,void 0===(i=r[0].t).cornerradiusvalue&&void 0!==(o=a.marker?a.marker.cornerradius:void 0)&&(l=n(o)?+o:+o.slice(0,-1),s=n(o)?"px":"%",i.cornerradiusvalue=l,i.cornerradiusform=s)}(o),function(e,t){var r,i,o,l=x(t),s={},c=1/0,u=-1/0;for(r=0;r<e.length;r++)for(o=e[r],i=0;i<o.length;i++){var f=o[i].p;n(f)&&(c=Math.min(c,f),u=Math.max(u,f))}var d=1e4/(u-c),h=s.round=function(e){return String(Math.round(d*(e-c)))},p={},v={},g=e.some((function(e){var t=e[0].trace;return"marker"in t&&t.marker.cornerradius}));for(r=0;r<e.length;r++){(o=e[r])[0].t.extents=s;var y=o[0].t.poffset,m=a(y);for(i=0;i<o.length;i++){var b=o[i],_=b[l]-b.w/2;if(n(_)){var w=b[l]+b.w/2,T=h(b.p);s[T]?s[T]=[Math.min(_,s[T][0]),Math.max(w,s[T][1])]:s[T]=[_,w]}if(b.p0=b.p+(m?y[i]:y),b.p1=b.p0+b.w,b.s0=b.b,b.s1=b.s0+b.s,g){var M=Math.min(b.s0,b.s1)||0,k=Math.max(b.s0,b.s1)||0,A=b[l];p[A]=A in p?Math.min(p[A],M):M,v[A]=A in v?Math.max(v[A],k):k}}}g&&function(e,t,r,n){for(var a=x(n),i=0;i<e.length;i++)for(var o=e[i],l=0;l<o.length;l++){var s=o[l],c=s[a];s._sMin=t[c],s._sMax=r[c]}}(e,p,v,t)}(o,t)}}function f(e,t,r,n){for(var a=0;a<r.length;a++){var i=r[a],o=new c([i],{posAxis:e,sepNegVal:!1,overlapNoMerge:!n.norm});d(e,o,n),n.norm?(y(o),m(t,o,n)):g(t,o)}}function d(e,t,r){for(var n=t.minDiff,a=t.traces,i=n*(1-r.gap),o=i*(1-(r.groupgap||0)),l=-o/2,s=0;s<a.length;s++){var c=a[s][0].t;c.barwidth=o,c.poffset=l,c.bargroupwidth=i,c.bardelta=n}t.binWidth=a[0][0].t.barwidth/100,h(t),p(e,t),v(e,t)}function h(e){var t,r,i=e.traces;for(t=0;t<i.length;t++){var o,l=i[t],s=l[0],c=s.trace,u=s.t,f=c._offset||c.offset,d=u.poffset;if(a(f)){for(o=Array.prototype.slice.call(f,0,l.length),r=0;r<o.length;r++)n(o[r])||(o[r]=d);for(r=o.length;r<l.length;r++)o.push(d);u.poffset=o}else void 0!==f&&(u.poffset=f);var h=c._width||c.width,p=u.barwidth;if(a(h)){var v=Array.prototype.slice.call(h,0,l.length);for(r=0;r<v.length;r++)n(v[r])||(v[r]=p);for(r=v.length;r<l.length;r++)v.push(p);if(u.barwidth=v,void 0===f){for(o=[],r=0;r<l.length;r++)o.push(d+(p-v[r])/2);u.poffset=o}}else void 0!==h&&(u.barwidth=h,void 0===f&&(u.poffset=d+(p-h)/2))}}function p(e,t){for(var r=t.traces,n=x(e),i=0;i<r.length;i++)for(var o=r[i],l=o[0].t,s=l.poffset,c=a(s),u=l.barwidth,f=a(u),d=0;d<o.length;d++){var h=o[d],p=h.w=f?u[d]:u;void 0===h.p&&(h.p=h[n],h["orig_"+n]=h[n]);var v=(c?s[d]:s)+p/2;h[n]=h.p+v}}function v(e,t,r){var n=t.traces,i=t.minDiff/2;l.minDtick(e,t.minDiff,t.distinctPositions[0],r);for(var o=0;o<n.length;o++){var s,c,u,f,d=n[o],h=d[0],p=h.trace,v=[];for(f=0;f<d.length;f++)c=(s=d[f]).p-i,u=s.p+i,v.push(c,u);if(p.width||p.offset){var g=h.t,y=g.poffset,m=g.barwidth,x=a(y),b=a(m);for(f=0;f<d.length;f++){s=d[f];var _=x?y[f]:y,w=b?m[f]:m;u=(c=s.p+_)+w,v.push(c,u)}}p._extremes[e._id]=l.findExtremes(e,v,{padded:!1})}}function g(e,t){for(var r=t.traces,n=x(e),a=0;a<r.length;a++){for(var i=r[a],o=i[0].trace,s="scatter"===o.type,c="v"===o.orientation,u=[],f=!1,d=0;d<i.length;d++){var h=i[d],p=s?0:h.b,v=s?c?h.y:h.x:p+h.s;h[n]=v,u.push(v),h.hasB&&u.push(p),h.hasB&&h.b||(f=!0)}o._extremes[e._id]=l.findExtremes(e,u,{tozero:f,padded:!0})}}function y(e){for(var t=e.traces,r=0;r<t.length;r++)for(var n=t[r],a=0;a<n.length;a++){var o=n[a];o.s!==i&&e.put(o.p,o.b+o.s)}}function m(e,t,r){var a=t.traces,o=x(e),s="fraction"===r.norm?1:100,c=s/1e9,u=e.l2c(e.c2l(0)),f="stack"===r.mode?s:u;function d(t){return n(e.c2l(t))&&(t<u-c||t>f+c||!n(u))}for(var h=0;h<a.length;h++){for(var p=a[h],v=p[0].trace,g=[],y=!1,m=!1,b=0;b<p.length;b++){var _=p[b];if(_.s!==i){var w=Math.abs(s/t.get(_.p,_.s));_.b*=w,_.s*=w;var T=_.b,M=T+_.s;_[o]=M,g.push(M),m=m||d(M),_.hasB&&(g.push(T),m=m||d(T)),_.hasB&&_.b||(y=!0)}}v._extremes[e._id]=l.findExtremes(e,g,{tozero:y,padded:m})}}function x(e){return e._id.charAt(0)}e.exports={crossTraceCalc:function(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,l=e.calcdata,s=[],c=[],f=0;f<i.length;f++){var d=i[f];if(!0===d.visible&&o.traceIs(d,"bar")&&d.xaxis===r._id&&d.yaxis===n._id&&("h"===d.orientation?s.push(l[f]):c.push(l[f]),d._computePh))for(var h=e.calcdata[f],p=0;p<h.length;p++)"function"==typeof h[p].ph0&&(h[p].ph0=h[p].ph0()),"function"==typeof h[p].ph1&&(h[p].ph1=h[p].ph1())}var v={xCat:"category"===r.type||"multicategory"===r.type,yCat:"category"===n.type||"multicategory"===n.type,mode:a.barmode,norm:a.barnorm,gap:a.bargap,groupgap:a.bargroupgap};u(e,r,n,c,v),u(e,n,r,s,v)},setGroupPositions:u}},1508:function(e,t,r){"use strict";var n=r(8248),a=r(3400),i=r(6308),o=r(4040),l=r(3980),s=r(1147),c=r(5592),u=r(11),f=r(832),d=a.coerceFont;function h(e){if(n(e)){if((e=+e)>=0)return e}else if("string"==typeof e&&"%"===(e=e.trim()).slice(-1)&&n(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function p(e,t,r,n,i,o){var l=!(!1===(o=o||{}).moduleHasSelected),s=!(!1===o.moduleHasUnselected),c=!(!1===o.moduleHasConstrain),u=!(!1===o.moduleHasCliponaxis),f=!(!1===o.moduleHasTextangle),h=!(!1===o.moduleHasInsideanchor),p=!!o.hasPathbar,v=Array.isArray(i)||"auto"===i,g=v||"inside"===i,y=v||"outside"===i;if(g||y){var m=d(n,"textfont",r.font),x=a.extendFlat({},m),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,d(n,"insidetextfont",x),p){var _=a.extendFlat({},m);b&&delete _.color,d(n,"pathbar.textfont",_)}y&&d(n,"outsidetextfont",m),l&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),c&&n("constraintext"),u&&n("cliponaxis"),f&&n("textangle"),n("texttemplate")}g&&h&&n("insidetextanchor")}e.exports={supplyDefaults:function(e,t,r,n){function u(r,n){return a.coerce(e,t,f,r,n)}if(l(e,t,n,u)){s(e,t,n,u),u("xhoverformat"),u("yhoverformat"),u("zorder"),u("orientation",t.x&&!t.y?"h":"v"),u("base"),u("offset"),u("width"),u("text"),u("hovertext"),u("hovertemplate");var d=u("textposition");p(e,0,n,u,d,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c(e,t,u,r,n);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,u)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,n;function i(e,t){return a.coerce(n._input,n,f,e,t)}for(var o=0;o<e.length;o++)if("bar"===(n=e[o]).type){r=n._input;var l=i("marker.cornerradius",t.barcornerradius);n.marker&&(n.marker.cornerradius=h(l)),"group"===t.barmode&&u(r,n,t,i)}},handleText:p,validateCornerradius:h}},2160:function(e){"use strict";e.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},444:function(e,t,r){"use strict";var n=r(8248),a=r(9760),i=r(3400).isArrayOrTypedArray;t.coerceString=function(e,t,r){if("string"==typeof t){if(t||!e.noBlank)return t}else if(("number"==typeof t||!0===t)&&!e.strict)return String(t);return void 0!==r?r:e.dflt},t.coerceNumber=function(e,t,r){if(n(t)){t=+t;var a=e.min,i=e.max;if(!(void 0!==a&&t<a||void 0!==i&&t>i))return t}return void 0!==r?r:e.dflt},t.coerceColor=function(e,t,r){return a(t).isValid()?t:void 0!==r?r:e.dflt},t.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},t.getValue=function(e,t){var r;return i(e)?t<e.length&&(r=e[t]):r=e,r},t.getLineWidth=function(e,t){return 0<t.mlw?t.mlw:i(e.marker.line.width)?0:e.marker.line.width}},1020:function(e,t,r){"use strict";var n=r(3024),a=r(4040),i=r(6308),o=r(3400).fillText,l=r(444).getLineWidth,s=r(4460).hoverLabelText,c=r(9032).BADNUM;function u(e,t,r,a,i){var l,u,f,d,h,p,v,g=e.cd,y=g[0].trace,m=g[0].t,x="closest"===a,b="waterfall"===y.type,_=e.maxHoverDistance,w=e.maxSpikeDistance;"h"===y.orientation?(l=r,u=t,f="y",d="x",h=R,p=P):(l=t,u=r,f="x",d="y",p=R,h=P);var T=y[f+"period"],M=x||T;function k(e){return L(e,-1)}function A(e){return L(e,1)}function L(e,t){var r=e.w;return e[f]+t*r/2}function S(e){return e[f+"End"]-e[f+"Start"]}var D=x?k:T?function(e){return e.p-S(e)/2}:function(e){return Math.min(k(e),e.p-m.bardelta/2)},O=x?A:T?function(e){return e.p+S(e)/2}:function(e){return Math.max(A(e),e.p+m.bardelta/2)};function C(e,t,r){return i.finiteRange&&(r=0),n.inbox(e-l,t-l,r+Math.min(1,Math.abs(t-e)/v)-1)}function P(e){return C(D(e),O(e),_)}function I(e){var t=e[d];if(b){var r=Math.abs(e.rawS)||0;u>0?t+=r:u<0&&(t-=r)}return t}function R(e){var t=u,r=e.b,a=I(e);return n.inbox(r-t,a-t,_+(a-t)/(a-r)-1)}var z=e[f+"a"],N=e[d+"a"];v=Math.abs(z.r2c(z.range[1])-z.r2c(z.range[0]));var F=n.getDistanceFunction(a,h,p,(function(e){return(h(e)+p(e))/2}));if(n.getClosest(g,F,e),!1!==e.index&&g[e.index].p!==c){M||(D=function(e){return Math.min(k(e),e.p-m.bargroupwidth/2)},O=function(e){return Math.max(A(e),e.p+m.bargroupwidth/2)});var E=g[e.index],H=y.base?E.b+E.s:E.s;e[d+"0"]=e[d+"1"]=N.c2p(E[d],!0),e[d+"LabelVal"]=H;var B=m.extents[m.extents.round(E.p)];e[f+"0"]=z.c2p(x?D(E):B[0],!0),e[f+"1"]=z.c2p(x?O(E):B[1],!0);var j=void 0!==E.orig_p;return e[f+"LabelVal"]=j?E.orig_p:E.p,e.labelLabel=s(z,e[f+"LabelVal"],y[f+"hoverformat"]),e.valueLabel=s(N,e[d+"LabelVal"],y[d+"hoverformat"]),e.baseLabel=s(N,E.b,y[d+"hoverformat"]),e.spikeDistance=(function(e){var t=u,r=e.b,a=I(e);return n.inbox(r-t,a-t,w+(a-t)/(a-r)-1)}(E)+function(e){return C(k(e),A(e),w)}(E))/2,e[f+"Spike"]=z.c2p(E.p,!0),o(E,y,e),e.hovertemplate=y.hovertemplate,e}}function f(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=l(e,t);return i.opacity(r)?r:i.opacity(n)&&a?n:void 0}e.exports={hoverPoints:function(e,t,r,n,i){var o=u(e,t,r,n,i);if(o){var l=o.cd,s=l[0].trace,c=l[o.index];return o.color=f(s,c),a.getComponentMethod("errorbars","hoverInfo")(c,s,o),[o]}},hoverOnBars:u,getTraceColor:f}},1132:function(e,t,r){"use strict";e.exports={attributes:r(832),layoutAttributes:r(9324),supplyDefaults:r(1508).supplyDefaults,crossTraceDefaults:r(1508).crossTraceDefaults,supplyLayoutDefaults:r(7156),calc:r(9439),crossTraceCalc:r(6376).crossTraceCalc,colorbar:r(5528),arraysToCalcdata:r(4664),plot:r(8184).plot,style:r(100).style,styleOnSelect:r(100).styleOnSelect,hoverPoints:r(1020).hoverPoints,eventData:r(2160),selectPoints:r(5784),moduleType:"trace",name:"bar",basePlotModule:r(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,r){"use strict";var n=r(4040),a=r(4460),i=r(3400),o=r(9324),l=r(1508).validateCornerradius;e.exports=function(e,t,r){function s(r,n){return i.coerce(e,t,o,r,n)}for(var c=!1,u=!1,f=!1,d={},h=s("barmode"),p=0;p<r.length;p++){var v=r[p];if(n.traceIs(v,"bar")&&v.visible){if(c=!0,"group"===h){var g=v.xaxis+v.yaxis;d[g]&&(f=!0),d[g]=!0}v.visible&&"histogram"===v.type&&"category"!==a.getFromId({_fullLayout:t},v["v"===v.orientation?"xaxis":"yaxis"]).type&&(u=!0)}}if(c){"overlay"!==h&&s("barnorm"),s("bargap",u&&!f?0:.2),s("bargroupgap");var y=s("barcornerradius");t.barcornerradius=l(y)}else delete t.barmode}},8184:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=r(3400),o=r(2736),l=r(6308),s=r(3616),c=r(4040),u=r(4460).tickText,f=r(2744),d=f.recordMinTextSize,h=f.clearMinTextSize,p=r(100),v=r(444),g=r(8048),y=r(832),m=y.text,x=y.textposition,b=r(624).appendArrayPointValue,_=g.TEXTPAD;function w(e){return e.id}function T(e){if(e.ids)return w}function M(e){return(e>0)-(e<0)}function k(e,t){return e<t?1:-1}function A(e,t,r,n){var a;return!t.uniformtext.mode&&L(r)?(n&&(a=n()),e.transition().duration(r.duration).ease(r.easing).each("end",(function(){a&&a()})).each("interrupt",(function(){a&&a()}))):e}function L(e){return e&&e.duration>0}function S(e,t,r,n,a){return!(e<0||t<0)&&(r<=e&&n<=t||r<=t&&n<=e||(a?e>=r*(t/n):t>=n*(e/r)))}function D(e){return"auto"===e?0:e}function O(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:e.width*a+e.height*n,y:e.width*n+e.height*a}}function C(e,t,r,n,a,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,c=i.anchor,u="end"===c,f="start"===c,d=((i.leftToRight||0)+1)/2,h=1-d,p=i.hasB,v=i.r,g=i.overhead,y=a.width,m=a.height,x=Math.abs(t-e),b=Math.abs(n-r),w=x>2*_&&b>2*_?_:0;x-=2*w,b-=2*w;var T=D(s);"auto"!==s||y<=x&&m<=b||!(y>x||m>b)||(y>b||m>x)&&y<m==x<b||(T+=90);var M,A,L=O(a,T);if(v&&v-g>_){var S=function(e,t,r,n,a,i,o,l,s){var c,u,f,d,h=Math.max(0,Math.abs(t-e)-2*_),p=Math.max(0,Math.abs(n-r)-2*_),v=i-_,g=o?v-Math.sqrt(v*v-(v-o)*(v-o)):v,y=s?2*v:l?v-o:2*g,m=s?2*v:l?2*g:v-o;return a.y/a.x>=p/(h-y)?d=p/a.y:a.y/a.x<=(p-m)/h?d=h/a.x:!s&&l?(c=a.x*a.x+a.y*a.y/4,f=(h-v)*(h-v)+(p/2-v)*(p/2-v)-v*v,d=(-(u=-2*a.x*(h-v)-a.y*(p/2-v))+Math.sqrt(u*u-4*c*f))/(2*c)):s?(c=(a.x*a.x+a.y*a.y)/4,f=(h/2-v)*(h/2-v)+(p/2-v)*(p/2-v)-v*v,d=(-(u=-a.x*(h/2-v)-a.y*(p/2-v))+Math.sqrt(u*u-4*c*f))/(2*c)):(c=a.x*a.x/4+a.y*a.y,f=(h/2-v)*(h/2-v)+(p-v)*(p-v)-v*v,d=(-(u=-a.x*(h/2-v)-2*a.y*(p-v))+Math.sqrt(u*u-4*c*f))/(2*c)),{scale:d=Math.min(1,d),pad:l?Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(p-a.y*d)/2)*(v-(p-a.y*d)/2)))-o):Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(h-a.x*d)/2)*(v-(h-a.x*d)/2)))-o)}}(e,t,r,n,L,v,g,o,p);M=S.scale,A=S.pad}else M=1,l&&(M=Math.min(1,x/L.x,b/L.y)),A=0;var C=a.left*h+a.right*d,P=(a.top+a.bottom)/2,I=(e+_)*h+(t-_)*d,R=(r+n)/2,z=0,N=0;if(f||u){var F=(o?L.x:L.y)/2;v&&(u||p)&&(w+=A);var E=o?k(e,t):k(r,n);o?f?(I=e+E*w,z=-E*F):(I=t-E*w,z=E*F):f?(R=r+E*w,N=-E*F):(R=n-E*w,N=E*F)}return{textX:C,textY:P,targetX:I,targetY:R,anchorX:z,anchorY:N,scale:M,rotate:T}}e.exports={plot:function(e,t,r,f,g,y){var w=t.xaxis,P=t.yaxis,I=e._fullLayout,R=e._context.staticPlot;g||(g={mode:I.barmode,norm:I.barmode,gap:I.bargap,groupgap:I.bargroupgap},h("bar",I));var z=i.makeTraceGroups(f,r,"trace bars").each((function(r){var c=n.select(this),f=r[0].trace,h=r[0].t,z="waterfall"===f.type,N="funnel"===f.type,F="histogram"===f.type,E="bar"===f.type,H=E||N,B=0;z&&f.connector.visible&&"between"===f.connector.mode&&(B=f.connector.line.width/2);var j="h"===f.orientation,Y=L(g),V=i.ensureSingle(c,"g","points"),U=T(f),q=V.selectAll("g.point").data(i.identity,U);q.enter().append("g").classed("point",!0),q.exit().remove(),q.each((function(c,T){var L,z,N=n.select(this),V=function(e,t,r,n){var a=[],i=[],o=n?t:r,l=n?r: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),n?[a,i]:[i,a]}(c,w,P,j),U=V[0][0],q=V[0][1],G=V[1][0],Z=V[1][1],W=0==(j?q-U:Z-G);if(W&&H&&v.getLineWidth(f,c)&&(W=!1),W||(W=!(a(U)&&a(q)&&a(G)&&a(Z))),c.isBlank=W,W&&(j?q=U:Z=G),B&&!W&&(j?(U-=k(U,q)*B,q+=k(U,q)*B):(G-=k(G,Z)*B,Z+=k(G,Z)*B)),"waterfall"===f.type){if(!W){var X=f[c.dir].marker;L=X.line.width,z=X.color}}else L=v.getLineWidth(f,c),z=c.mc||f.marker.color;function J(e){var t=n.round(L/2%1,2);return 0===g.gap&&0===g.groupgap?n.round(Math.round(e)-t,2):e}var K=l.opacity(z)<1||L>.01?J:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?J(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(U=K(U,q,j),q=K(q,U,j),G=K(G,Z,!j),Z=K(Z,G,!j));var Q,$=j?w.c2p:P.c2p;Q=c.s0>0?c._sMax:c.s0<0?c._sMin:c.s1>0?c._sMax:c._sMin;var ee,te,re=E||F?function(e,t){if(!e)return 0;var r,n=j?Math.abs(Z-G):Math.abs(q-U),a=j?Math.abs(q-U):Math.abs(Z-G),i=K(Math.abs($(Q,!0)-$(0,!0))),o=c.hasB?Math.min(n/2,a/2):Math.min(n/2,i);return r="%"===t?n*(Math.min(50,e)/100):e,K(Math.max(Math.min(r,o),0))}(h.cornerradiusvalue,h.cornerradiusform):0,ne="M"+U+","+G+"V"+Z+"H"+q+"V"+G+"Z",ae=0;if(re&&c.s){var ie=0===M(c.s0)||M(c.s)===M(c.s0)?c.s1:c.s0;if((ae=K(c.hasB?0:Math.abs($(Q,!0)-$(ie,!0))))<re){var oe=k(U,q),le=k(G,Z),se=oe===-le?1:0;if(j)if(c.hasB)ee="M"+(U+re*oe)+","+G+"A "+re+","+re+" 0 0 "+se+" "+U+","+(G+re*le)+"V"+(Z-re*le)+"A "+re+","+re+" 0 0 "+se+" "+(U+re*oe)+","+Z+"H"+(q-re*oe)+"A "+re+","+re+" 0 0 "+se+" "+q+","+(Z-re*le)+"V"+(G+re*le)+"A "+re+","+re+" 0 0 "+se+" "+(q-re*oe)+","+G+"Z";else{var ce=(te=Math.abs(q-U)+ae)<re?re-Math.sqrt(te*(2*re-te)):0,ue=ae>0?Math.sqrt(ae*(2*re-ae)):0,fe=oe>0?Math.max:Math.min;ee="M"+U+","+G+"V"+(Z-ce*le)+"H"+fe(q-(re-ae)*oe,U)+"A "+re+","+re+" 0 0 "+se+" "+q+","+(Z-re*le-ue)+"V"+(G+re*le+ue)+"A "+re+","+re+" 0 0 "+se+" "+fe(q-(re-ae)*oe,U)+","+(G+ce*le)+"Z"}else if(c.hasB)ee="M"+(U+re*oe)+","+G+"A "+re+","+re+" 0 0 "+se+" "+U+","+(G+re*le)+"V"+(Z-re*le)+"A "+re+","+re+" 0 0 "+se+" "+(U+re*oe)+","+Z+"H"+(q-re*oe)+"A "+re+","+re+" 0 0 "+se+" "+q+","+(Z-re*le)+"V"+(G+re*le)+"A "+re+","+re+" 0 0 "+se+" "+(q-re*oe)+","+G+"Z";else{var de=(te=Math.abs(Z-G)+ae)<re?re-Math.sqrt(te*(2*re-te)):0,he=ae>0?Math.sqrt(ae*(2*re-ae)):0,pe=le>0?Math.max:Math.min;ee="M"+(U+de*oe)+","+G+"V"+pe(Z-(re-ae)*le,G)+"A "+re+","+re+" 0 0 "+se+" "+(U+re*oe-he)+","+Z+"H"+(q-re*oe+he)+"A "+re+","+re+" 0 0 "+se+" "+(q-de*oe)+","+pe(Z-(re-ae)*le,G)+"V"+G+"Z"}}else ee=ne}else ee=ne;var ve=A(i.ensureSingle(N,"path"),I,g,y);if(ve.style("vector-effect",R?"none":"non-scaling-stroke").attr("d",isNaN((q-U)*(Z-G))||W&&e._context.staticPlot?"M0,0Z":ee).call(s.setClipUrl,t.layerClipId,e),!I.uniformtext.mode&&Y){var ge=s.makePointStyleFns(f);s.singlePointStyle(c,ve,f,ge,e)}!function(e,t,r,n,a,l,c,f,h,g,y,w,T){var M,L=t.xaxis,P=t.yaxis,I=e._fullLayout;function R(t,r,n){return i.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+M,"text-anchor":"middle","data-notex":1}).call(s.font,n).call(o.convertToTspans,e)}var z=n[0].trace,N="h"===z.orientation,F=function(e,t,r,n,a){var o,l=t[0].trace;return o=l.texttemplate?function(e,t,r,n,a){var o=t[0].trace,l=i.castOption(o,r,"texttemplate");if(!l)return"";var s,c,f,d,h="histogram"===o.type,p="waterfall"===o.type,v="funnel"===o.type,g="h"===o.orientation;function y(e){return u(d,d.c2l(e),!0).text}g?(s="y",c=a,f="x",d=n):(s="x",c=n,f="y",d=a);var m,x=t[r],_={};_.label=x.p,_.labelLabel=_[s+"Label"]=(m=x.p,u(c,c.c2l(m),!0).text);var w=i.castOption(o,x.i,"text");(0===w||w)&&(_.text=w),_.value=x.s,_.valueLabel=_[f+"Label"]=y(x.s);var T={};b(T,o,x.i),(h||void 0===T.x)&&(T.x=g?_.value:_.label),(h||void 0===T.y)&&(T.y=g?_.label:_.value),(h||void 0===T.xLabel)&&(T.xLabel=g?_.valueLabel:_.labelLabel),(h||void 0===T.yLabel)&&(T.yLabel=g?_.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 M=i.castOption(o,x.i,"customdata");return M&&(_.customdata=M),i.texttemplateString(l,_,e._d3locale,T,_,o._meta||{})}(e,t,r,n,a):l.textinfo?function(e,t,r,n){var a=e[0].trace,o="h"===a.orientation,l="waterfall"===a.type,s="funnel"===a.type;function c(e){return u(o?r:n,+e,!0).text}var f,d,h=a.textinfo,p=e[t],v=h.split("+"),g=[],y=function(e){return-1!==v.indexOf(e)};if(y("label")&&g.push((d=e[t].p,u(o?n:r,d,!0).text)),y("text")&&(0===(f=i.castOption(a,p.i,"text"))||f)&&g.push(f),l){var m=+p.rawS||p.s,x=p.v,b=x-m;y("initial")&&g.push(c(b)),y("delta")&&g.push(c(m)),y("final")&&g.push(c(x))}if(s){y("value")&&g.push(c(p.s));var _=0;y("percent initial")&&_++,y("percent previous")&&_++,y("percent total")&&_++;var w=_>1;y("percent initial")&&(f=i.formatPercent(p.begR),w&&(f+=" of initial"),g.push(f)),y("percent previous")&&(f=i.formatPercent(p.difR),w&&(f+=" of previous"),g.push(f)),y("percent total")&&(f=i.formatPercent(p.sumR),w&&(f+=" of total"),g.push(f))}return g.join("<br>")}(t,r,n,a):v.getValue(l.text,r),v.coerceString(m,o)}(I,n,a,L,P);M=function(e,t){var r=v.getValue(e.textposition,t);return v.coerceEnumerated(x,r)}(z,a);var E="stack"===w.mode||"relative"===w.mode,H=n[a],B=!E||H._outmost,j=H.hasB,Y=g&&g-y>_;if(F&&"none"!==M&&(!H.isBlank&&l!==c&&f!==h||"auto"!==M&&"inside"!==M)){var V=I.font,U=p.getBarColor(n[a],z),q=p.getInsideTextFont(z,a,V,U),G=p.getOutsideTextFont(z,a,V),Z=z.insidetextanchor||"end",W=r.datum();N?"log"===L.type&&W.s0<=0&&(l=L.range[0]<L.range[1]?0:L._length):"log"===P.type&&W.s0<=0&&(f=P.range[0]<P.range[1]?P._length:0);var X,J,K,Q,$,ee=Math.abs(c-l),te=Math.abs(h-f),re=ee-2*_,ne=te-2*_;if("outside"===M&&(B||H.hasB||(M="inside")),"auto"===M)if(B){M="inside",X=R(r,F,$=i.ensureUniformFontSize(e,q)),K=(J=s.bBox(X.node())).width,Q=J.height;var ae,ie=K>0&&Q>0;ae=Y?j?S(re-2*g,ne,K,Q,N)||S(re,ne-2*g,K,Q,N):N?S(re-(g-y),ne,K,Q,N)||S(re,ne-2*(g-y),K,Q,N):S(re,ne-(g-y),K,Q,N)||S(re-2*(g-y),ne,K,Q,N):S(re,ne,K,Q,N),ie&&ae?M="inside":(M="outside",X.remove(),X=null)}else M="inside";if(!X){var oe=(X=R(r,F,$=i.ensureUniformFontSize(e,"outside"===M?G:q))).attr("transform");if(X.attr("transform",""),K=(J=s.bBox(X.node())).width,Q=J.height,X.attr("transform",oe),K<=0||Q<=0)return void X.remove()}var le,se=z.textangle;le="outside"===M?function(e,t,r,n,a,i){var o,l=!!i.isHorizontal,s=!!i.constrained,c=i.angle||0,u=a.width,f=a.height,d=Math.abs(t-e),h=Math.abs(n-r);o=l?h>2*_?_:0:d>2*_?_:0;var p=1;s&&(p=l?Math.min(1,h/f):Math.min(1,d/u));var v=D(c),g=O(a,v),y=(l?g.x:g.y)/2,m=(a.left+a.right)/2,x=(a.top+a.bottom)/2,b=(e+t)/2,w=(r+n)/2,T=0,M=0,A=l?k(t,e):k(r,n);return l?(b=t-A*o,T=A*y):(w=n+A*o,M=-A*y),{textX:m,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:M,scale:p,rotate:v}}(l,c,f,h,J,{isHorizontal:N,constrained:"both"===z.constraintext||"outside"===z.constraintext,angle:se}):C(l,c,f,h,J,{isHorizontal:N,constrained:"both"===z.constraintext||"inside"===z.constraintext,angle:se,anchor:Z,hasB:j,r:g,overhead:y}),le.fontSize=$.size,d("histogram"===z.type?"bar":z.type,le,I),H.transform=le;var ce=A(X,I,w,T);i.setTransormAndDisplay(ce,le)}else r.select("text").remove()}(e,t,N,r,T,U,q,G,Z,re,ae,g,y),t.layerClipId&&s.hideOutsideRangePoint(c,N.select("text"),w,P,f.xcalendar,f.ycalendar)}));var G=!1===f.cliponaxis;s.setClipUrl(c,G?null:t.layerClipId,e)}));c.getComponentMethod("errorbars","plot")(e,z,t,g)},toMoveInsideBar:C}},5784:function(e){"use strict";function t(e,t,r,n,a){var i=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),l=r.c2p(n?e.p0:e.s0,!0),s=r.c2p(n?e.p1:e.s1,!0);return a?[(i+o)/2,(l+s)/2]:n?[o,(l+s)/2]:[(i+o)/2,s]}e.exports=function(e,r){var n,a=e.cd,i=e.xaxis,o=e.yaxis,l=a[0].trace,s="funnel"===l.type,c="h"===l.orientation,u=[];if(!1===r)for(n=0;n<a.length;n++)a[n].selected=0;else for(n=0;n<a.length;n++){var f=a[n],d="ct"in f?f.ct:t(f,i,o,c,s);r.contains(d,!1,n,e)?(u.push({pointNumber:n,x:i.c2d(f.x),y:o.c2d(f.y)}),f.selected=1):f.selected=0}return u}},2592:function(e,t,r){"use strict";e.exports=a;var n=r(3400).distinctVals;function a(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,a=t.posAxis._id.charAt(0),i=[],o=0;o<e.length;o++){for(var l=e[o],s=0;s<l.length;s++){var c=l[s],u=c.p;void 0===u&&(u=c[a]),void 0!==u&&i.push(u)}l[0]&&l[0].width1&&(r=Math.min(l[0].width1,r))}this.positions=i;var f=n(i);this.distinctPositions=f.vals,1===f.vals.length&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(f.minDiff,r);var d=(t.posAxis||{}).type;"category"!==d&&"multicategory"!==d||(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}a.prototype.put=function(e,t){var r=this.getLabel(e,t),n=this.bins[r]||0;return this.bins[r]=n+t,n},a.prototype.get=function(e,t){var r=this.getLabel(e,t);return this.bins[r]||0},a.prototype.getLabel=function(e,t){return(t<0&&this.sepNegVal?"v":"^")+(this.overlapNoMerge?e:Math.round(e/this.binWidth))}},100:function(e,t,r){"use strict";var n=r(3428),a=r(6308),i=r(3616),o=r(3400),l=r(4040),s=r(2744).resizeText,c=r(832),u=c.textfont,f=c.insidetextfont,d=c.outsidetextfont,h=r(444);function p(e,t,r){i.pointStyle(e.selectAll("path"),t,r),v(e,t,r)}function v(e,t,r){e.selectAll("text").each((function(e){var a=n.select(this),l=o.ensureUniformFontSize(r,g(a,e,t,r));i.font(a,l)}))}function g(e,t,r,n){var a=n._fullLayout.font,i=r.textfont;if(e.classed("bartext-inside")){var o=_(t,r);i=m(r,t.i,a,o)}else e.classed("bartext-outside")&&(i=x(r,t.i,a));return i}function y(e,t,r){return b(u,e.textfont,t,r)}function m(e,t,r,n){var i=y(e,t,r);return(void 0===e._input.textfont||void 0===e._input.textfont.color||Array.isArray(e.textfont.color)&&void 0===e.textfont.color[t])&&(i={color:a.contrast(n),family:i.family,size:i.size}),b(f,e.insidetextfont,t,i)}function x(e,t,r){var n=y(e,t,r);return b(d,e.outsidetextfont,t,n)}function b(e,t,r,n){t=t||{};var a=h.getValue(t.family,r),i=h.getValue(t.size,r),o=h.getValue(t.color,r);return{family:h.coerceString(e.family,a,n.family),size:h.coerceNumber(e.size,i,n.size),color:h.coerceColor(e.color,o,n.color)}}function _(e,t){return"waterfall"===t.type?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}e.exports={style:function(e){var t=n.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");s(e,t,"bar");var r=t.size(),a=e._fullLayout;t.style("opacity",(function(e){return e[0].trace.opacity})).each((function(e){("stack"===a.barmode&&r>1||0===a.bargap&&0===a.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(n.select(this),t[0].trace,e)})),l.getComponentMethod("errorbars","style")(t)},styleTextPoints:v,styleOnSelect:function(e,t,r){var a=t[0].trace;a.selectedpoints?function(e,t,r){i.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var a,l=n.select(this);if(e.selected){a=o.ensureUniformFontSize(r,g(l,e,t,r));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,r)}(r,a,e):(p(r,a,e),l.getComponentMethod("errorbars","style")(r))},getInsideTextFont:m,getOutsideTextFont:x,getBarColor:_,resizeText:s}},5592:function(e,t,r){"use strict";var n=r(6308),a=r(4288).hasColorscale,i=r(7260),o=r(3400).coercePattern;e.exports=function(e,t,r,l,s){var c=r("marker.color",l),u=a(e,"marker");u&&i(e,t,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(e,"marker.line")&&i(e,t,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",c,u),r("selected.marker.color"),r("unselected.marker.color")}},2744:function(e,t,r){"use strict";var n=r(3428),a=r(3400);function i(e){return"_"+e+"Text_minsize"}e.exports={recordMinTextSize:function(e,t,r){if(r.uniformtext.mode){var n=i(e),a=r.uniformtext.minsize,o=t.scale*t.fontSize;t.hide=o<a,r[n]=r[n]||1/0,t.hide||(r[n]=Math.min(r[n],Math.max(o,a)))}},clearMinTextSize:function(e,t){t[i(e)]=void 0},resizeText:function(e,t,r){var i=e._fullLayout,o=i["_"+r+"Text_minsize"];if(o){var l,s="hide"===i.uniformtext.mode;switch(r){case"funnelarea":case"pie":case"sunburst":l="g.slice";break;case"treemap":case"icicle":l="g.slice, g.pathbar";break;default:l="g.points > g.point"}t.selectAll(l).each((function(e){var t=e.transform;if(t){t.scale=s&&t.hide?0:o/t.fontSize;var r=n.select(this).select("text");a.setTransormAndDisplay(r,t)}}))}}}},4996:function(e,t,r){"use strict";var n=r(5464),a=r(6968).u,i=r(5376),o=r(2548),l=r(1776).Ks,s=r(1776).Gw,c=r(2880).extendFlat,u=r(8192).c,f=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});e.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:u,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:c({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},f,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},f,{}),outsidetextfont:c({},f,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},f,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:a({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:c({},f,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},36:function(e,t,r){"use strict";var n=r(7316);t.name="pie",t.plot=function(e,r,a,i){n.plotBasePlot(t.name,e,r,a,i)},t.clean=function(e,r,a,i){n.cleanBasePlot(t.name,e,r,a,i)}},5768:function(e,t,r){"use strict";var n=r(8248),a=r(9760),i=r(6308),o={};function l(e){return function(t,r){return!!t&&!!(t=a(t)).isValid()&&(t=i.addOpacity(t,t.getAlpha()),e[r]||(e[r]=t),t)}}function s(e,t){var r,n=JSON.stringify(e),i=t[n];if(!i){for(i=e.slice(),r=0;r<e.length;r++)i.push(a(e[r]).lighten(20).toHexString());for(r=0;r<e.length;r++)i.push(a(e[r]).darken(20).toHexString());t[n]=i}return i}e.exports={calc:function(e,t){var r,a,i=[],o=e._fullLayout,s=o.hiddenlabels||[],c=t.labels,u=t.marker.colors||[],f=t.values,d=t._length,h=t._hasValues&&d;if(t.dlabel)for(c=new Array(d),r=0;r<d;r++)c[r]=String(t.label0+r*t.dlabel);var p={},v=l(o["_"+t.type+"colormap"]),g=0,y=!1;for(r=0;r<d;r++){var m,x,b;if(h){if(m=f[r],!n(m))continue;m=+m}else m=1;void 0!==(x=c[r])&&""!==x||(x=r);var _=p[x=String(x)];void 0===_?(p[x]=i.length,(b=-1!==s.indexOf(x))||(g+=m),i.push({v:m,label:x,color:v(u[r],x),i:r,pts:[r],hidden:b})):(y=!0,(a=i[_]).v+=m,a.pts.push(r),a.hidden||(g+=m),!1===a.color&&u[r]&&(a.color=v(u[r],x)))}return i=i.filter((function(e){return e.v>=0})),("funnelarea"===t.type?y:t.sort)&&i.sort((function(e,t){return t.v-e.v})),i[0]&&(i[0].vTotal=g),i},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,i=n[r+"colorway"],l=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(i=s(i,o));for(var c=0,u=0;u<a.length;u++){var f=a[u];if(f[0].trace.type===r)for(var d=0;d<f.length;d++){var h=f[d];!1===h.color&&(l[h.label]?h.color=l[h.label]:(l[h.label]=h.color=i[c%i.length],c++))}}},makePullColorFn:l,generateExtendedColors:s}},4174:function(e,t,r){"use strict";var n=r(8248),a=r(3400),i=r(4996),o=r(6968).Q,l=r(1508).handleText,s=r(3400).coercePattern;function c(e,t){var r=a.isArrayOrTypedArray(e),i=a.isArrayOrTypedArray(t),o=Math.min(r?e.length:1/0,i?t.length:1/0);if(isFinite(o)||(o=0),o&&i){for(var l,s=0;s<o;s++){var c=t[s];if(n(c)&&c>0){l=!0;break}}l||(o=0)}return{hasLabels:r,hasValues:i,len:o}}function u(e,t,r,n,a){n("marker.line.width")&&n("marker.line.color",a?void 0:r.paper_bgcolor);var i=n("marker.colors");s(n,"marker.pattern",i),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}e.exports={handleLabelsAndValues:c,handleMarkerDefaults:u,supplyDefaults:function(e,t,r,n){function s(r,n){return a.coerce(e,t,i,r,n)}var f=c(s("labels"),s("values")),d=f.len;if(t._hasLabels=f.hasLabels,t._hasValues=f.hasValues,!t._hasLabels&&t._hasValues&&(s("label0"),s("dlabel")),d){t._length=d,u(e,t,n,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 g=s("textposition");l(e,t,n,s,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&s("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&s("insidetextorientation")}else"none"===h&&s("textposition","none");o(t,n,s);var y=s("hole");if(s("title.text")){var m=s("title.position",y?"middle center":"top center");y||"middle center"!==m||(t.title.position="top center"),a.coerceFont(s,"title.font",n.font)}s("sort"),s("direction"),s("rotation"),s("pull")}else t.visible=!1}}},3644:function(e,t,r){"use strict";var n=r(624).appendArrayMultiPointValues;e.exports=function(e,t){var r={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&&(r.pointNumber=r.i=e.pts[0]),n(r,t,e.pts),"funnelarea"===t.type&&(delete r.v,delete r.i),r}},1552:function(e,t,r){"use strict";var n=r(3616),a=r(6308);e.exports=function(e,t,r,i){var o=r.marker.pattern;o&&o.shape?n.pointStyle(e,r,i,t):a.fill(e,t.color)}},9656:function(e,t,r){"use strict";var n=r(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 r=a((100*e).toPrecision(3));return n.numSeparate(r,t)+"%"},t.formatPieValue=function(e,t){var r=a(e.toPrecision(10));return n.numSeparate(r,t)},t.getFirstFilled=function(e,t){if(n.isArrayOrTypedArray(e))for(var r=0;r<t.length;r++){var a=e[t[r]];if(a||0===a||""===a)return a}},t.castOption=function(e,r){return n.isArrayOrTypedArray(e)?t.getFirstFilled(e,r):e||void 0},t.getRotationAngle=function(e){return("auto"===e?0:e)*Math.PI/180}},5792:function(e,t,r){"use strict";e.exports={attributes:r(4996),supplyDefaults:r(4174).supplyDefaults,supplyLayoutDefaults:r(248),layoutAttributes:r(5204),calc:r(5768).calc,crossTraceCalc:r(5768).crossTraceCalc,plot:r(7820).plot,style:r(2152),styleOne:r(528),moduleType:"trace",name:"pie",basePlotModule:r(36),categories:["pie-like","pie","showLegend"],meta:{}}},5204:function(e){"use strict";e.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},248:function(e,t,r){"use strict";var n=r(3400),a=r(5204);e.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("hiddenlabels"),r("piecolorway",t.colorway),r("extendpiecolors")}},7820:function(e,t,r){"use strict";var n=r(3428),a=r(7316),i=r(3024),o=r(6308),l=r(3616),s=r(3400),c=s.strScale,u=s.strTranslate,f=r(2736),d=r(2744),h=d.recordMinTextSize,p=d.clearMinTextSize,v=r(8048).TEXTPAD,g=r(9656),y=r(3644),m=r(3400).isValidTextValue;function x(e,t,r){var a=r[0],o=a.cx,l=a.cy,c=a.trace,u="funnelarea"===c.type;"_hasHoverLabel"in c||(c._hasHoverLabel=!1),"_hasHoverEvent"in c||(c._hasHoverEvent=!1),e.on("mouseover",(function(e){var r=t._fullLayout,f=t._fullData[c.index];if(!t._dragging&&!1!==r.hovermode){var d=f.hoverinfo;if(Array.isArray(d)&&(d=i.castHoverinfo({hoverinfo:[g.castOption(d,e.pts)],_module:c._module},r,0)),"all"===d&&(d="label+text+value+percent+name"),f.hovertemplate||"none"!==d&&"skip"!==d&&d){var h=e.rInscribed||0,p=o+e.pxmid[0]*(1-h),v=l+e.pxmid[1]*(1-h),m=r.separators,x=[];if(d&&-1!==d.indexOf("label")&&x.push(e.label),e.text=g.castOption(f.hovertext||f.text,e.pts),d&&-1!==d.indexOf("text")){var b=e.text;s.isValidTextValue(b)&&x.push(b)}e.value=e.v,e.valueLabel=g.formatPieValue(e.v,m),d&&-1!==d.indexOf("value")&&x.push(e.valueLabel),e.percent=e.v/a.vTotal,e.percentLabel=g.formatPiePercent(e.percent,m),d&&-1!==d.indexOf("percent")&&x.push(e.percentLabel);var _=f.hoverlabel,w=_.font,T=[];i.loneHover({trace:c,x0:p-h*a.r,x1:p+h*a.r,y:v,_x0:u?o+e.TL[0]:p-h*a.r,_x1:u?o+e.TR[0]:p+h*a.r,_y0:u?l+e.TL[1]:v-h*a.r,_y1:u?l+e.BL[1]:v+h*a.r,text:x.join("<br>"),name:f.hovertemplate||-1!==d.indexOf("name")?f.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:g.castOption(_.bgcolor,e.pts)||e.color,borderColor:g.castOption(_.bordercolor,e.pts),fontFamily:g.castOption(w.family,e.pts),fontSize:g.castOption(w.size,e.pts),fontColor:g.castOption(w.color,e.pts),nameLength:g.castOption(_.namelength,e.pts),textAlign:g.castOption(_.align,e.pts),hovertemplate:g.castOption(f.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[y(e,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t,inOut_bbox:T}),e.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[y(e,f)],event:n.event})}})),e.on("mouseout",(function(e){var r=t._fullLayout,a=t._fullData[c.index],o=n.select(this).datum();c._hasHoverEvent&&(e.originalEvent=n.event,t.emit("plotly_unhover",{points:[y(o,a)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(i.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),e.on("click",(function(e){var r=t._fullLayout,a=t._fullData[c.index];t._dragging||!1===r.hovermode||(t._hoverdata=[y(e,a)],i.click(t,n.event))}))}function b(e,t,r){var n=g.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=g.castOption(e._input.textfont.color,t.pts));var a=g.castOption(e.insidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,i=g.castOption(e.insidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size;return{color:n||o.contrast(t.color),family:a,size:i}}function _(e,t){for(var r,n,a=0;a<e.length;a++)if((n=(r=e[a][0]).trace).title.text){var i=n.title.text;n._meta&&(i=s.templateString(i,n._meta));var o=l.tester.append("text").attr("data-notex",1).text(i).call(l.font,n.title.font).call(f.convertToTspans,t),c=l.bBox(o.node(),!0);r.titleBox={width:c.width,height:c.height},o.remove()}}function w(e,t,r){var n=r.r||t.rpx1,a=t.rInscribed;if(t.startangle===t.stopangle)return{rCenter:1-a,scale:0,rotate:0,textPosAngle:0};var i,o=t.ring,l=1===o&&Math.abs(t.startangle-t.stopangle)===2*Math.PI,s=t.halfangle,c=t.midangle,u=r.trace.insidetextorientation,f="horizontal"===u,d="tangential"===u,h="radial"===u,p="auto"===u,v=[];if(!p){var g,y=function(r,a){if(function(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r<t&&t<n}(t,r)){var l=Math.abs(r-t.startangle),s=Math.abs(r-t.stopangle),c=l<s?l:s;(i="tan"===a?M(e,n,o,c,0):T(e,n,o,c,Math.PI/2)).textPosAngle=r,v.push(i)}};if(f||d){for(g=4;g>=-4;g-=2)y(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)y(Math.PI*(g+1),"tan")}if(f||h){for(g=4;g>=-4;g-=2)y(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)y(Math.PI*(g+.5),"rad")}}if(l||p||f){var m=Math.sqrt(e.width*e.width+e.height*e.height);if((i={scale:a*n*2/m,rCenter:1-a,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,i.scale>=1)return i;v.push(i)}(p||h)&&((i=T(e,n,o,s,c)).textPosAngle=(t.startangle+t.stopangle)/2,v.push(i)),(p||d)&&((i=M(e,n,o,s,c)).textPosAngle=(t.startangle+t.stopangle)/2,v.push(i));for(var x=0,b=0,_=0;_<v.length;_++){var w=v[_].scale;if(b<w&&(b=w,x=_),!p&&b>=1)break}return v[x]}function T(e,t,r,n,a){t=Math.max(0,t-2*v);var i=e.width/e.height,o=L(i,n,t,r);return{scale:2*o/e.height,rCenter:k(i,o/t),rotate:A(a)}}function M(e,t,r,n,a){t=Math.max(0,t-2*v);var i=e.height/e.width,o=L(i,n,t,r);return{scale:2*o/e.width,rCenter:k(i,o/t),rotate:A(a+Math.PI/2)}}function k(e,t){return Math.cos(t)-e*t}function A(e){return(180/Math.PI*e+720)%180-90}function L(e,t,r,n){var a=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(a*a+.5)+a),n/(Math.sqrt(e*e+n/2)+e))}function S(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function D(e,t){var r=t.pxmid[0],n=t.pxmid[1],a=e.width/2,i=e.height/2;return r<0&&(a*=-1),n<0&&(i*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(i)*(a>0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function O(e,t){var r,n,a,i=e.trace,o={x:e.cx,y:e.cy},l={tx:0,ty:0};l.ty+=i.title.font.size,a=P(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,c=e.r/(void 0===(s=e.trace.aspectratio)?1:s),u=t.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(u+=c,o.x-=(1+a)*c,l.tx+=e.titleBox.width/2):-1!==i.title.position.indexOf("center")?u*=2:-1!==i.title.position.indexOf("right")&&(u+=c,o.x+=(1+a)*c,l.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=C(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:l.tx,ty:l.ty}}function C(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function P(e){var t,r=e.pull;if(!r)return 0;if(s.isArrayOrTypedArray(r))for(r=0,t=0;t<e.pull.length;t++)e.pull[t]>r&&(r=e.pull[t]);return r}function I(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n][0],i=a.trace,o=i.domain,l=t.w*(o.x[1]-o.x[0]),s=t.h*(o.y[1]-o.y[0]);i.title.text&&"middle center"!==i.title.position&&(s-=C(a,t));var c=l/2,u=s/2;"funnelarea"!==i.type||i.scalegroup||(u/=i.aspectratio),a.r=Math.min(c,u)/(1+P(i)),a.cx=t.l+t.w*(i.domain.x[1]+i.domain.x[0])/2,a.cy=t.t+t.h*(1-i.domain.y[0])-s/2,i.title.text&&-1!==i.title.position.indexOf("bottom")&&(a.cy-=C(a,t)),i.scalegroup&&-1===r.indexOf(i.scalegroup)&&r.push(i.scalegroup)}!function(e,t){for(var r,n,a,i=0;i<t.length;i++){var o=1/0,l=t[i];for(n=0;n<e.length;n++)if((a=(r=e[n][0]).trace).scalegroup===l){var s;if("pie"===a.type)s=r.r*r.r;else if("funnelarea"===a.type){var c,u;a.aspectratio>1?u=(c=r.r)/a.aspectratio:c=(u=r.r)*a.aspectratio,s=(c*=(1+a.baseratio)/2)*u}o=Math.min(o,s/r.vTotal)}for(n=0;n<e.length;n++)if((a=(r=e[n][0]).trace).scalegroup===l){var f=o*r.vTotal;"funnelarea"===a.type&&(f/=(1+a.baseratio)/2,f/=a.aspectratio),r.r=Math.sqrt(f)}}}(e,r)}function R(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function z(e,t,r){var n=e._fullLayout,a=r.trace,i=a.texttemplate,o=a.textinfo;if(!i&&o&&"none"!==o){var l,c=o.split("+"),u=function(e){return-1!==c.indexOf(e)},f=u("label"),d=u("text"),h=u("value"),p=u("percent"),v=n.separators;if(l=f?[t.label]:[],d){var y=g.getFirstFilled(a.text,t.pts);m(y)&&l.push(y)}h&&l.push(g.formatPieValue(t.v,v)),p&&l.push(g.formatPiePercent(t.v/r.vTotal,v)),t.text=l.join("<br>")}if(i){var x=s.castOption(a,t.i,"texttemplate");if(x){var b=function(e){return{label:e.label,value:e.v,valueLabel:g.formatPieValue(e.v,n.separators),percent:e.v/r.vTotal,percentLabel:g.formatPiePercent(e.v/r.vTotal,n.separators),color:e.color,text:e.text,customdata:s.castOption(a,e.i,"customdata")}}(t),_=g.getFirstFilled(a.text,t.pts);(m(_)||""===_)&&(b.text=_),t.text=s.texttemplateString(x,b,e._fullLayout._d3locale,b,a._meta||{})}else t.text=""}}function N(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),a=Math.sin(r),i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=i*n-o*a,e.textY=i*a+o*n,e.noCenter=!0}e.exports={plot:function(e,t){var r=e._context.staticPlot,i=e._fullLayout,d=i._size;p("pie",i),_(t,e),I(t,d);var v=s.makeTraceGroups(i._pielayer,t,"trace").each((function(t){var p=n.select(this),v=t[0],y=v.trace;!function(e){var t,r,n,a=e[0],i=a.r,o=a.trace,l=g.getRotationAngle(o.rotation),s=2*Math.PI/a.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(t=0;t<e.length&&e[t].hidden;t++);if(t===e.length)return;l+=s*e[t].v,s*=-1,c="px1",u="px0"}for(n=R(i,l),t=0;t<e.length;t++)(r=e[t]).hidden||(r[c]=n,r.startangle=l,l+=s*r.v/2,r.pxmid=R(i,l),r.midangle=l,n=R(i,l+=s*r.v/2),r.stopangle=l,r[u]=n,r.largeArc=r.v>a.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/a.vTotal,.5),r.ring=1-o.hole,r.rInscribed=S(r,a))}(t),p.attr("stroke-linejoin","round"),p.each((function(){var m=n.select(this).selectAll("g.slice").data(t);m.enter().append("g").classed("slice",!0),m.exit().remove();var _=[[[],[]],[[],[]]],T=!1;m.each((function(a,o){if(a.hidden)n.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=y.index,_[a.pxmid[1]<0?0:1][a.pxmid[0]<0?0:1].push(a);var c=v.cx,u=v.cy,d=n.select(this),p=d.selectAll("path.surface").data([a]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),d.call(x,e,t),y.pull){var m=+g.castOption(y.pull,a.pts)||0;m>0&&(c+=m*a.pxmid[0],u+=m*a.pxmid[1])}a.cxFinal=c,a.cyFinal=u;var M=y.hole;if(a.v===v.vTotal){var k="M"+(c+a.px0[0])+","+(u+a.px0[1])+C(a.px0,a.pxmid,!0,1)+C(a.pxmid,a.px0,!0,1)+"Z";M?p.attr("d","M"+(c+M*a.px0[0])+","+(u+M*a.px0[1])+C(a.px0,a.pxmid,!1,M)+C(a.pxmid,a.px0,!1,M)+"Z"+k):p.attr("d",k)}else{var A=C(a.px0,a.px1,!0,1);if(M){var L=1-M;p.attr("d","M"+(c+M*a.px1[0])+","+(u+M*a.px1[1])+C(a.px1,a.px0,!1,M)+"l"+L*a.px0[0]+","+L*a.px0[1]+A+"Z")}else p.attr("d","M"+c+","+u+"l"+a.px0[0]+","+a.px0[1]+A+"Z")}z(e,a,v);var S=g.castOption(y.textposition,a.pts),O=d.selectAll("g.slicetext").data(a.text&&"none"!==S?[0]:[]);O.enter().append("g").classed("slicetext",!0),O.exit().remove(),O.each((function(){var r=s.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),d=s.ensureUniformFontSize(e,"outside"===S?function(e,t,r){return{color:g.castOption(e.outsidetextfont.color,t.pts)||g.castOption(e.textfont.color,t.pts)||r.color,family:g.castOption(e.outsidetextfont.family,t.pts)||g.castOption(e.textfont.family,t.pts)||r.family,size:g.castOption(e.outsidetextfont.size,t.pts)||g.castOption(e.textfont.size,t.pts)||r.size}}(y,a,i.font):b(y,a,i.font));r.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,d).call(f.convertToTspans,e);var p,m=l.bBox(r.node());if("outside"===S)p=D(m,a);else if(p=w(m,a,v),"auto"===S&&p.scale<1){var x=s.ensureUniformFontSize(e,y.outsidetextfont);r.call(l.font,x),p=D(m=l.bBox(r.node()),a)}var _=p.textPosAngle,M=void 0===_?a.pxmid:R(v.r,_);if(p.targetX=c+M[0]*p.rCenter+(p.x||0),p.targetY=u+M[1]*p.rCenter+(p.y||0),N(p,m),p.outside){var k=p.targetY;a.yLabelMin=k-m.height/2,a.yLabelMid=k,a.yLabelMax=k+m.height/2,a.labelExtraX=0,a.labelExtraY=0,T=!0}p.fontSize=d.size,h(y.type,p,i),t[o].transform=p,s.setTransormAndDisplay(r,p)}))}function C(e,t,r,n){var i=n*(t[0]-e[0]),o=n*(t[1]-e[1]);return"a"+n*v.r+","+n*v.r+" 0 "+a.largeArc+(r?" 1 ":" 0 ")+i+","+o}}));var M=n.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);if(M.enter().append("g").classed("titletext",!0),M.exit().remove(),M.each((function(){var t,r=s.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),a=y.title.text;y._meta&&(a=s.templateString(a,y._meta)),r.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,y.title.font).call(f.convertToTspans,e),t="middle center"===y.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):O(v,d),r.attr("transform",u(t.x,t.y)+c(Math.min(1,t.scale))+u(t.tx,t.ty))})),T&&function(e,t){var r,n,a,i,o,l,c,u,f,d,h,p,v;function y(e,t){return e.pxmid[1]-t.pxmid[1]}function m(e,t){return t.pxmid[1]-e.pxmid[1]}function x(e,r){r||(r={});var a,u,f,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),v=n?e.yLabelMin:e.yLabelMax,y=n?e.yLabelMax:e.yLabelMin,m=e.cyFinal+o(e.px0[1],e.px1[1]),x=p-v;if(x*c>0&&(e.labelExtraY=x),s.isArrayOrTypedArray(t.pull))for(u=0;u<d.length;u++)(f=d[u])===e||(g.castOption(t.pull,e.pts)||0)>=(g.castOption(t.pull,f.pts)||0)||((e.pxmid[1]-f.pxmid[1])*c>0?(x=f.cyFinal+o(f.px0[1],f.px1[1])-v-e.labelExtraY)*c>0&&(e.labelExtraY+=x):(y+e.labelExtraY-m)*c>0&&(a=3*l*Math.abs(u-d.indexOf(e)),(h=f.cxFinal+i(f.px0[0],f.px1[0])+a-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=h)))}for(n=0;n<2;n++)for(a=n?y:m,o=n?Math.max:Math.min,c=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,l=r?1:-1,(u=e[n][r]).sort(a),f=e[1-n][r],d=f.concat(u),p=[],h=0;h<u.length;h++)void 0!==u[h].yLabelMid&&p.push(u[h]);for(v=!1,h=0;n&&h<f.length;h++)if(void 0!==f[h].yLabelMid){v=f[h];break}for(h=0;h<p.length;h++){var b=h&&p[h-1];v&&!h&&(b=v),x(p[h],b)}}}(_,y),function(e,t){e.each((function(e){var r=n.select(this);if(e.labelExtraX||e.labelExtraY){var a=r.select("g.slicetext text");e.transform.targetX+=e.labelExtraX,e.transform.targetY+=e.labelExtraY,s.setTransormAndDisplay(a,e.transform);var i=e.cxFinal+e.pxmid[0],l="M"+i+","+(e.cyFinal+e.pxmid[1]),c=(e.yLabelMax-e.yLabelMin)*(e.pxmid[0]<0?-1:1)/4;if(e.labelExtraX){var u=e.labelExtraX*e.pxmid[1]/e.pxmid[0],f=e.yLabelMid+e.labelExtraY-(e.cyFinal+e.pxmid[1]);Math.abs(u)>Math.abs(f)?l+="l"+f*e.pxmid[0]/e.pxmid[1]+","+f+"H"+(i+e.labelExtraX+c):l+="l"+e.labelExtraX+","+u+"v"+(f-u)+"h"+c}else l+="V"+(e.yLabelMid+e.labelExtraY)+"h"+c;s.ensureSingle(r,"path","textline").call(o.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:l,fill:"none"})}else r.select("path.textline").remove()}))}(m,y),T&&y.automargin){var k=l.bBox(p.node()),A=y.domain,L=d.w*(A.x[1]-A.x[0]),S=d.h*(A.y[1]-A.y[0]),C=(.5*L-v.r)/d.w,P=(.5*S-v.r)/d.h;a.autoMargin(e,"pie."+y.uid+".automargin",{xl:A.x[0]-C,xr:A.x[1]+C,yb:A.y[0]-P,yt:A.y[1]+P,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=n.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:z,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:O,prerenderTitles:_,layoutAreas:I,attachFxHandlers:x,computeTransform:N}},2152:function(e,t,r){"use strict";var n=r(3428),a=r(528),i=r(2744).resizeText;e.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");i(e,t,"pie"),t.each((function(t){var r=t[0].trace,i=n.select(this);i.style({opacity:r.opacity}),i.selectAll("path.surface").each((function(t){n.select(this).call(a,t,r,e)}))}))}},528:function(e,t,r){"use strict";var n=r(6308),a=r(9656).castOption,i=r(1552);e.exports=function(e,t,r,o){var l=r.marker.line,s=a(l.color,t.pts)||n.defaultLine,c=a(l.width,t.pts)||0;e.call(i,t,r,o).style("stroke-width",c).call(n.stroke,s)}},148:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){for(var r=0;r<e.length;r++)e[r].i=r;n.mergeArray(t.text,e,"tx"),n.mergeArray(t.texttemplate,e,"txt"),n.mergeArray(t.hovertext,e,"htx"),n.mergeArray(t.customdata,e,"data"),n.mergeArray(t.textposition,e,"tp"),t.textfont&&(n.mergeArrayCastPositive(t.textfont.size,e,"ts"),n.mergeArray(t.textfont.color,e,"tc"),n.mergeArray(t.textfont.family,e,"tf"));var a=t.marker;if(a){n.mergeArrayCastPositive(a.size,e,"ms"),n.mergeArrayCastPositive(a.opacity,e,"mo"),n.mergeArray(a.symbol,e,"mx"),n.mergeArray(a.angle,e,"ma"),n.mergeArray(a.standoff,e,"mf"),n.mergeArray(a.color,e,"mc");var i=a.line;a.line&&(n.mergeArray(i.color,e,"mlc"),n.mergeArrayCastPositive(i.width,e,"mlw"));var o=a.gradient;o&&"none"!==o.type&&(n.mergeArray(o.type,e,"mgt"),n.mergeArray(o.color,e,"mgc"))}}},2904:function(e,t,r){"use strict";var n=r(9736).axisHoverFormat,a=r(1776).Gw,i=r(1776).Ks,o=r(9084),l=r(5376),s=r(8192).u,c=r(8192).c,u=r(3616),f=r(8200),d=r(2880).extendFlat,h=r(3544);e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:{valType:"any",dflt:0,editType:"calc"},yperiod:{valType:"any",dflt:0,editType:"calc"},xperiod0:{valType:"any",editType:"calc"},yperiod0:{valType:"any",editType:"calc"},xperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},yperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},xhoverformat:n("x"),yhoverformat:n("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:a({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:i({},{keys:f.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:d({},s,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:h(!0),fillgradient:d({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:c,marker:d({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:d({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:l({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}},6356:function(e,t,r){"use strict";var n=r(8248),a=r(3400),i=r(4460),o=r(1220),l=r(9032).BADNUM,s=r(3028),c=r(136),u=r(148),f=r(4500);function d(e,t,r,n,a,o,l){var c=t._length,u=e._fullLayout,f=r._id,d=n._id,h=u._firstScatter[v(t)]===t.uid,p=(g(t,u,r,n)||{}).orientation,y=t.fill;r._minDtick=0,n._minDtick=0;var m={padded:!0},x={padded:!0};l&&(m.ppad=x.ppad=l);var b=c<2||a[0]!==a[c-1]||o[0]!==o[c-1];b&&("tozerox"===y||"tonextx"===y&&(h||"h"===p))?m.tozero=!0:(t.error_y||{}).visible||"tonexty"!==y&&"tozeroy"!==y&&(s.hasMarkers(t)||s.hasText(t))||(m.padded=!1,m.ppad=0),b&&("tozeroy"===y||"tonexty"===y&&(h||"v"===p))?x.tozero=!0:"tonextx"!==y&&"tozerox"!==y||(x.padded=!1),f&&(t._extremes[f]=i.findExtremes(r,a,m)),d&&(t._extremes[d]=i.findExtremes(n,o,x))}function h(e,t){if(s.hasMarkers(e)){var r,n=e.marker,o=1.6*(e.marker.sizeref||1);if(r="area"===e.marker.sizemode?function(e){return Math.max(Math.sqrt((e||0)/o),3)}:function(e){return Math.max((e||0)/o,3)},a.isArrayOrTypedArray(n.size)){var l={type:"linear"};i.setConvert(l);for(var c=l.makeCalcdata(e.marker,"size"),u=new Array(t),f=0;f<t;f++)u[f]=r(c[f]);return u}return r(n.size)}}function p(e,t){var r=v(t),n=e._firstScatter;n[r]||(n[r]=t.uid)}function v(e){var t=e.stackgroup;return e.xaxis+e.yaxis+e.type+(t?"-"+t:"")}function g(e,t,r,n){var a=e.stackgroup;if(a){var i=t._scatterStackOpts[r._id+n._id][a],o="v"===i.orientation?n:r;return"linear"===o.type||"log"===o.type?i:void 0}}e.exports={calc:function(e,t){var r,s,v,y,m,x,b=e._fullLayout,_=t._xA=i.getFromId(e,t.xaxis||"x","x"),w=t._yA=i.getFromId(e,t.yaxis||"y","y"),T=_.makeCalcdata(t,"x"),M=w.makeCalcdata(t,"y"),k=o(t,_,"x",T),A=o(t,w,"y",M),L=k.vals,S=A.vals,D=t._length,O=new Array(D),C=t.ids,P=g(t,b,_,w),I=!1;p(b,t);var R,z="x",N="y";P?(a.pushUnique(P.traceIndices,t._expandedIndex),(r="v"===P.orientation)?(N="s",R="x"):(z="s",R="y"),m="interpolate"===P.stackgaps):d(e,t,_,w,L,S,h(t,D));var F=!!t.xperiodalignment,E=!!t.yperiodalignment;for(s=0;s<D;s++){var H=O[s]={},B=n(L[s]),j=n(S[s]);B&&j?(H[z]=L[s],H[N]=S[s],F&&(H.orig_x=T[s],H.xEnd=k.ends[s],H.xStart=k.starts[s]),E&&(H.orig_y=M[s],H.yEnd=A.ends[s],H.yStart=A.starts[s])):P&&(r?B:j)?(H[R]=r?L[s]:S[s],H.gap=!0,m?(H.s=l,I=!0):H.s=0):H[z]=H[N]=l,C&&(H.id=String(C[s]))}if(u(O,t),c(e,t),f(O,t),P){for(s=0;s<O.length;)O[s][R]===l?O.splice(s,1):s++;if(a.sort(O,(function(e,t){return e[R]-t[R]||e.i-t.i})),I){for(s=0;s<O.length-1&&O[s].gap;)s++;for((x=O[s].s)||(x=O[s].s=0),v=0;v<s;v++)O[v].s=x;for(y=O.length-1;y>s&&O[y].gap;)y--;for(x=O[y].s,v=O.length-1;v>y;v--)O[v].s=x;for(;s<y;)if(O[++s].gap){for(v=s+1;O[v].gap;)v++;for(var Y=O[s-1][R],V=O[s-1].s,U=(O[v].s-V)/(O[v][R]-Y);s<v;)O[s].s=V+(O[s][R]-Y)*U,s++}}}return O},calcMarkerSize:h,calcAxisExpansion:d,setFirstScatter:p,getStackOpts:g}},4500:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){n.isArrayOrTypedArray(t.selectedpoints)&&n.tagSelected(e,t)}},136:function(e,t,r){"use strict";var n=r(4288).hasColorscale,a=r(7128),i=r(3028);e.exports=function(e,t){i.hasLines(t)&&n(t,"line")&&a(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),i.hasMarkers(t)&&(n(t,"marker")&&a(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),n(t,"marker.line")&&a(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},8200:function(e){"use strict";e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},6664:function(e,t,r){"use strict";var n=r(6356),a=r(6376).setGroupPositions;function i(e,t,r,n,a,i,o){a[n]=!0;var l={i:null,gap:!0,s:0};if(l[o]=r,e.splice(t,0,l),t&&r===e[t-1][o]){var s=e[t-1];l.s=s.s,l.i=s.i,l.gap=s.gap}else i&&(l.s=function(e,t,r,n){var a=e[t-1],i=e[t+1];return i?a?a.s+(i.s-a.s)*(r-a[n])/(i[n]-a[n]):i.s:a.s}(e,t,r,o));t||(e[0].t=e[1].t,e[0].trace=e[1].trace,delete e[1].t,delete e[1].trace)}e.exports=function(e,t){"group"===e._fullLayout.scattermode&&function(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,o=e._fullData,l=e.calcdata,s=[],c=[],u=0;u<o.length;u++){var f=o[u];!0===f.visible&&"scatter"===f.type&&f.xaxis===r._id&&f.yaxis===n._id&&("h"===f.orientation?s.push(l[u]):"v"===f.orientation&&c.push(l[u]))}var d={mode:i.scattermode,gap:i.scattergap};a(e,r,n,c,d),a(e,n,r,s,d)}(e,t);var r=t.xaxis,o=t.yaxis,l=r._id+o._id,s=e._fullLayout._scatterStackOpts[l];if(s){var c,u,f,d,h,p,v,g,y,m,x,b,_,w,T,M=e.calcdata;for(var k in s){var A=(m=s[k]).traceIndices;if(A.length){for(x="interpolate"===m.stackgaps,b=m.groupnorm,"v"===m.orientation?(_="x",w="y"):(_="y",w="x"),T=new Array(A.length),c=0;c<T.length;c++)T[c]=!1;p=M[A[0]];var L=new Array(p.length);for(c=0;c<p.length;c++)L[c]=p[c][_];for(c=1;c<A.length;c++){for(h=M[A[c]],u=f=0;u<h.length;u++){for(v=h[u][_];v>L[f]&&f<L.length;f++)i(h,u,L[f],c,T,x,_),u++;if(v!==L[f]){for(d=0;d<c;d++)i(M[A[d]],f,v,d,T,x,_);L.splice(f,0,v)}f++}for(;f<L.length;f++)i(h,u,L[f],c,T,x,_),u++}var S=L.length;for(u=0;u<p.length;u++){for(g=p[u][w]=p[u].s,c=1;c<A.length;c++)(h=M[A[c]])[0].trace._rawLength=h[0].trace._length,h[0].trace._length=S,g+=h[u].s,h[u][w]=g;if(b)for(y=("fraction"===b?g:g/100)||1,c=0;c<A.length;c++){var D=M[A[c]][u];D[w]/=y,D.sNorm=D.s/y}}for(c=0;c<A.length;c++){var O=(h=M[A[c]])[0].trace,C=n.calcMarkerSize(O,O._rawLength),P=Array.isArray(C);if(C&&T[c]||P){var I=C;for(C=new Array(S),u=0;u<S;u++)C[u]=h[u].gap?0:P?I[h[u].i]:I}var R=new Array(S),z=new Array(S);for(u=0;u<S;u++)R[u]=h[u].x,z[u]=h[u].y;n.calcAxisExpansion(e,O,r,o,R,z,C),h[0].t.orientation=m.orientation}}}}}},5036:function(e,t,r){"use strict";var n=r(3400),a=r(11),i=r(2904);e.exports=function(e,t){var r,o,l;function s(e){return n.coerce(o._input,o,i,e)}if("group"===t.scattermode)for(l=0;l<e.length;l++)"scatter"===(o=e[l]).type&&(r=o._input,a(r,o,t,s));for(l=0;l<e.length;l++){var c=e[l];if("scatter"===c.type){var u=c.fill;if("none"!==u&&"toself"!==u&&(c.opacity=void 0,"tonexty"===u||"tonextx"===u))for(var f=l-1;f>=0;f--){var d=e[f];if("scatter"===d.type&&d.xaxis===c.xaxis&&d.yaxis===c.yaxis){d.opacity=void 0;break}}}}}},8800:function(e,t,r){"use strict";var n=r(3400),a=r(4040),i=r(2904),o=r(8200),l=r(3028),s=r(3980),c=r(1147),u=r(3912),f=r(4428),d=r(6828),h=r(1731),p=r(124),v=r(840),g=r(3400).coercePattern;e.exports=function(e,t,r,y){function m(r,a){return n.coerce(e,t,i,r,a)}var x=s(e,t,y,m);if(x||(t.visible=!1),t.visible){c(e,t,y,m),m("xhoverformat"),m("yhoverformat"),m("zorder");var b=u(e,t,y,m);"group"===y.scattermode&&void 0===t.orientation&&m("orientation","v");var _=!b&&x<o.PTS_LINESONLY?"lines+markers":"lines";m("text"),m("hovertext"),m("mode",_),l.hasMarkers(t)&&f(e,t,r,y,m,{gradient:!0}),l.hasLines(t)&&(d(e,t,r,y,m,{backoff:!0}),h(e,t,m),m("connectgaps"),m("line.simplify")),l.hasText(t)&&(m("texttemplate"),p(e,t,y,m));var w=[];(l.hasMarkers(t)||l.hasText(t))&&(m("cliponaxis"),m("marker.maxdisplayed"),w.push("points")),m("fill",b?b.fillDflt:"none"),"none"!==t.fill&&(v(e,t,r,m,{moduleHasFillgradient:!0}),l.hasLines(t)||h(e,t,m),g(m,"fillpattern",t.fillcolor,!1));var T=(t.line||{}).color,M=(t.marker||{}).color;"tonext"!==t.fill&&"toself"!==t.fill||w.push("fills"),m("hoveron",w.join("+")||"points"),"fills"!==t.hoveron&&m("hovertemplate");var k=a.getComponentMethod("errorbars","supplyDefaults");k(e,t,T||M||r,{axis:"y"}),k(e,t,T||M||r,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,m)}}},3544:function(e){"use strict";e.exports=function(e){return{valType:"color",editType:"style",anim:!0}}},840:function(e,t,r){"use strict";var n=r(6308),a=r(3400).isArrayOrTypedArray;e.exports=function(e,t,r,i,o){o||(o={});var l,s=!1;if(t.marker){var c=t.marker.color,u=(t.marker.line||{}).color;c&&!a(c)?s=c:u&&!a(u)&&(s=u)}if(o.moduleHasFillgradient&&"none"!==i("fillgradient.type")){i("fillgradient.start"),i("fillgradient.stop");var f=i("fillgradient.colorscale");f&&(l=function(e){for(var t=n.interpolate(e[0][1],e[1][1],.5),r=2;r<e.length;r++){var a=n.interpolate(e[r-1][1],e[r][1],.5);t=n.interpolate(t,a,e[r-1][0]/e[r][0])}return t}(f))}i("fillcolor",n.addOpacity((t.line||{}).color||s||l||r,.5))}},6688:function(e,t,r){"use strict";var n=r(4460);e.exports=function(e,t,r){var a={},i={_fullLayout:r},o=n.getFromTrace(i,t,"x"),l=n.getFromTrace(i,t,"y"),s=e.orig_x;void 0===s&&(s=e.x);var c=e.orig_y;return void 0===c&&(c=e.y),a.xLabel=n.tickText(o,o.c2l(s),!0).text,a.yLabel=n.tickText(l,l.c2l(c),!0).text,a}},4928:function(e,t,r){"use strict";var n=r(6308),a=r(3028);e.exports=function(e,t){var r,i;if("lines"===e.mode)return(r=e.line.color)&&n.opacity(r)?r:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var o=t.mcc||(e.marker||{}).color,l=t.mlcc||((e.marker||{}).line||{}).color;return(i=o&&n.opacity(o)?o:l&&n.opacity(l)&&(t.mlw||((e.marker||{}).line||{}).width)?l:"")?n.opacity(i)<.3?n.addOpacity(i,.3):i:(r=(e.line||{}).color)&&n.opacity(r)&&a.hasLines(e)&&e.line.width?r:e.fillcolor}},11:function(e,t,r){"use strict";var n=r(1888).getAxisGroup;e.exports=function(e,t,r,a){var i=t.orientation,o=t[{v:"x",h:"y"}[i]+"axis"],l=n(r,o)+i,s=r._alignmentOpts||{},c=a("alignmentgroup"),u=s[l];u||(u=s[l]={});var f=u[c];f?f.traces.push(t):f=u[c]={traces:[t],alignmentIndex:Object.keys(u).length,offsetGroups:{}};var d=a("offsetgroup"),h=f.offsetGroups,p=h[d];d&&(p||(p=h[d]={offsetIndex:Object.keys(h).length}),t._offsetIndex=p.offsetIndex)}},8723:function(e,t,r){"use strict";var n=r(3400),a=r(3024),i=r(4040),o=r(4928),l=r(6308),s=n.fillText;e.exports=function(e,t,r,c){var u=e.cd,f=u[0].trace,d=e.xa,h=e.ya,p=d.c2p(t),v=h.c2p(r),g=[p,v],y=f.hoveron||"",m=-1!==f.mode.indexOf("markers")?3:.5,x=!!f.xperiodalignment,b=!!f.yperiodalignment;if(-1!==y.indexOf("points")){var _=function(e){var t=Math.max(m,e.mrc||0),r=d.c2p(e.x)-p,n=h.c2p(e.y)-v;return Math.max(Math.sqrt(r*r+n*n)-t,1-m/t)},w=a.getDistanceFunction(c,(function(e){if(x){var t=d.c2p(e.xStart),r=d.c2p(e.xEnd);return p>=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(d.c2p(e.x)-p);return i<n?a*i/n:i-n+a}),(function(e){if(b){var t=h.c2p(e.yStart),r=h.c2p(e.yEnd);return v>=Math.min(t,r)&&v<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(h.c2p(e.y)-v);return i<n?a*i/n:i-n+a}),_);if(a.getClosest(u,w,e),!1!==e.index){var T=u[e.index],M=d.c2p(T.x,!0),k=h.c2p(T.y,!0),A=T.mrc||1;e.index=T.i;var L=u[0].t.orientation,S=L&&(T.sNorm||T.s),D="h"===L?S:void 0!==T.orig_x?T.orig_x:T.x,O="v"===L?S:void 0!==T.orig_y?T.orig_y:T.y;return n.extendFlat(e,{color:o(f,T),x0:M-A,x1:M+A,xLabelVal:D,y0:k-A,y1:k+A,yLabelVal:O,spikeDistance:_(T),hovertemplate:f.hovertemplate}),s(T,f,e),i.getComponentMethod("errorbars","hoverInfo")(T,f,e),[e]}}function C(e){if(!e)return!1;var t=e.node();try{var r=new DOMPoint(g[0],g[1]);return t.isPointInFill(r)}catch(e){var n=t.ownerSVGElement.createSVGPoint();return n.x=g[0],n.y=g[1],t.isPointInFill(n)}}if(-1!==y.indexOf("fills")&&f._fillElement&&C(f._fillElement)&&!C(f._fillExclusionElement)){var P=function(e){var t,r,n,a,i,o,l,s,c,u=[],f=1/0,p=-1/0,v=1/0,y=-1/0;for(t=0;t<e.length;t++){var m=e[t];m.contains(g)&&(u.push(m),v=Math.min(v,m.ymin),y=Math.max(y,m.ymax))}if(0===u.length)return null;for(r=((v=Math.max(v,0))+(y=Math.min(y,h._length)))/2,t=0;t<u.length;t++)for(a=u[t].pts,n=1;n<a.length;n++)(s=a[n-1][1])>r!=(c=a[n][1])>=r&&(o=a[n-1][0],l=a[n][0],c-s&&(i=o+(l-o)*(r-s)/(c-s),f=Math.min(f,i),p=Math.max(p,i)));return{x0:f=Math.max(f,0),x1:p=Math.min(p,d._length),y0:r,y1:r}}(f._polygons);null===P&&(P={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var I=l.defaultLine;return l.opacity(f.fillcolor)?I=f.fillcolor:l.opacity((f.line||{}).color)&&(I=f.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:P.x0,x1:P.x1,y0:P.y0,y1:P.y1,color:I,hovertemplate:!1}),delete e.index,f.text&&!n.isArrayOrTypedArray(f.text)?e.text=String(f.text):e.text=f.name,[e]}}},5875:function(e,t,r){"use strict";var n=r(3028);e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(2904),layoutAttributes:r(5308),supplyDefaults:r(8800),crossTraceDefaults:r(5036),supplyLayoutDefaults:r(9748),calc:r(6356).calc,crossTraceCalc:r(6664),arraysToCalcdata:r(148),plot:r(6504),colorbar:r(5528),formatLabels:r(6688),style:r(6844).style,styleOnSelect:r(6844).styleOnSelect,hoverPoints:r(8723),selectPoints:r(1560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(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,r){"use strict";var n=r(3400),a=r(5308);e.exports=function(e,t){var r,i="group"===t.barmode;"group"===t.scattermode&&("scattergap",r=i?t.bargap:.2,n.coerce(e,t,a,"scattergap",r))}},6828:function(e,t,r){"use strict";var n=r(3400).isArrayOrTypedArray,a=r(4288).hasColorscale,i=r(7260);e.exports=function(e,t,r,o,l,s){s||(s={});var c=(e.marker||{}).color;c&&c._inputArray&&(c=c._inputArray),l("line.color",r),a(e,"line")?i(e,t,o,l,{prefix:"line.",cLetter:"c"}):l("line.color",!n(c)&&c||r),l("line.width"),s.noDash||l("line.dash"),s.backoff&&l("line.backoff")}},2340:function(e,t,r){"use strict";var n=r(3616),a=r(9032),i=a.BADNUM,o=a.LOG_CLIP,l=o+.5,s=o-.5,c=r(3400),u=c.segmentsIntersect,f=c.constrain,d=r(8200);e.exports=function(e,t){var r,a,o,h,p,v,g,y,m,x,b,_,w,T,M,k,A,L,S=t.trace||{},D=t.xaxis,O=t.yaxis,C="log"===D.type,P="log"===O.type,I=D._length,R=O._length,z=t.backoff,N=S.marker,F=t.connectGaps,E=t.baseTolerance,H=t.shape,B="linear"===H,j=S.fill&&"none"!==S.fill,Y=[],V=d.minTolerance,U=e.length,q=new Array(U),G=0;function Z(r){var n=e[r];if(!n)return!1;var a=t.linearized?D.l2p(n.x):D.c2p(n.x),o=t.linearized?O.l2p(n.y):O.c2p(n.y);if(a===i){if(C&&(a=D.c2p(n.x,!0)),a===i)return!1;P&&o===i&&(a*=Math.abs(D._m*R*(D._m>0?l:s)/(O._m*I*(O._m>0?l:s)))),a*=1e3}if(o===i){if(P&&(o=O.c2p(n.y,!0)),o===i)return!1;o*=1e3}return[a,o]}function W(e,t,r,n){var a=r-e,i=n-t,o=.5-e,l=.5-t,s=a*a+i*i,c=a*o+i*l;if(c>0&&c<s){var u=o*i-l*a;if(u*u<s)return!0}}function X(e,t){var r=e[0]/I,n=e[1]/R,a=Math.max(0,-r,r-1,-n,n-1);return a&&void 0!==A&&W(r,n,A,L)&&(a=0),a&&t&&W(r,n,t[0]/I,t[1]/R)&&(a=0),(1+d.toleranceGrowth*a)*E}function J(e,t){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)}var K,Q,$,ee,te,re,ne,ae=d.maxScreensAway,ie=-I*ae,oe=I*(1+ae),le=-R*ae,se=R*(1+ae),ce=[[ie,le,oe,le],[oe,le,oe,se],[oe,se,ie,se],[ie,se,ie,le]];function ue(e){if(e[0]<ie||e[0]>oe||e[1]<le||e[1]>se)return[f(e[0],ie,oe),f(e[1],le,se)]}function fe(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 de(e,t,r){return function(n,a){var i=ue(n),o=ue(a),l=[];if(i&&o&&fe(i,o))return l;i&&l.push(i),o&&l.push(o);var s=2*c.constrain((n[e]+a[e])/2,t,r)-((i||n)[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],r=e[1],n=t===q[G-1][0],a=r===q[G-1][1];if(!n||!a)if(G>1){var i=t===q[G-2][0],o=r===q[G-2][1];n&&(t===ie||t===oe)&&i?o?G--:q[G-1]=e:a&&(r===le||r===se)&&o?i?G--:q[G-1]=e:q[G++]=e}else q[G++]=e}function pe(e){q[G-1][0]!==e[0]&&q[G-1][1]!==e[1]&&he([$,ee]),he(e),te=null,$=ee=0}"linear"===H||"spline"===H?ne=function(e,t){for(var r=[],n=0,a=0;a<4;a++){var i=ce[a],o=u(e[0],e[1],t[0],t[1],i[0],i[1],i[2],i[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&J(o,e)<J(r[0],e)?r.unshift(o):r.push(o),n++)}return r}:"hv"===H||"vh"===H?ne=function(e,t){var r=[],n=ue(e),a=ue(t);return n&&a&&fe(n,a)||(n&&r.push(n),a&&r.push(a)),r}:"hvh"===H?ne=de(0,ie,oe):"vhv"===H&&(ne=de(1,le,se));var ve=c.isArrayOrTypedArray(N);function ge(t){if(t&&z&&(t.i=r,t.d=e,t.trace=S,t.marker=ve?N[t.i]:N,t.backoff=z),A=t[0]/I,L=t[1]/R,K=t[0]<ie?ie:t[0]>oe?oe:0,Q=t[1]<le?le:t[1]>se?se:0,K||Q){if(G)if(te){var n=ne(te,t);n.length>1&&(pe(n[0]),q[G++]=n[1])}else re=ne(q[G-1],t)[0],q[G++]=re;else q[G++]=[K||t[0],Q||t[1]];var a=q[G-1];K&&Q&&(a[0]!==K||a[1]!==Q)?(te&&($!==K&&ee!==Q?he($&&ee?(i=te,l=(o=t)[0]-i[0],s=(o[1]-i[1])/l,(i[1]*o[0]-o[1]*i[0])/l>0?[s>0?ie:oe,se]:[s>0?oe:ie,le]):[$||K,ee||Q]):$&&ee&&he([$,ee])),he([K,Q])):$-K&&ee-Q&&he([K||$,Q||ee]),te=t,$=K,ee=Q}else te&&pe(ne(te,t)[0]),q[G++]=t;var i,o,l,s}for(r=0;r<U;r++)if(a=Z(r)){for(G=0,te=null,ge(a),r++;r<U;r++){if(!(h=Z(r))){if(F)continue;break}if(B&&t.simplify){var ye=Z(r+1);if(x=J(h,a),j&&(0===G||G===U-1)||!(x<X(h,ye)*V)){for(y=[(h[0]-a[0])/x,(h[1]-a[1])/x],p=a,b=x,_=T=M=0,g=!1,o=h,r++;r<e.length;r++){if(v=ye,ye=Z(r+1),!v){if(F)continue;break}if(k=(m=[v[0]-a[0],v[1]-a[1]])[0]*y[1]-m[1]*y[0],T=Math.min(T,k),(M=Math.max(M,k))-T>X(v,ye))break;o=v,(w=m[0]*y[0]+m[1]*y[1])>b?(b=w,h=v,g=!1):w<_&&(_=w,p=v,g=!0)}if(g?(ge(h),o!==p&&ge(p)):(p!==a&&ge(p),o!==h&&ge(h)),ge(o),r>=e.length||!v)break;ge(v),a=v}}else ge(h)}te&&he([$||te[0],ee||te[1]]),Y.push(q.slice(0,G))}var me=H.slice(H.length-1);if(z&&"h"!==me&&"v"!==me){for(var xe=!1,be=-1,_e=[],we=0;we<Y.length;we++)for(var Te=0;Te<Y[we].length-1;Te++){var Me=Y[we][Te],ke=Y[we][Te+1],Ae=n.applyBackoff(ke,Me);Ae[0]===ke[0]&&Ae[1]===ke[1]||(xe=!0),_e[be+1]||(_e[++be]=[Me,[Ae[0],Ae[1]]])}return xe?_e:Y}return Y}},1731:function(e){"use strict";e.exports=function(e,t,r){"spline"===r("line.shape")&&r("line.smoothing")}},4328:function(e){"use strict";var t={tonextx:1,tonexty:1,tonext:1};e.exports=function(e,r,n){var a,i,o,l,s,c={},u=!1,f=-1,d=0,h=-1;for(i=0;i<n.length;i++)(o=(a=n[i][0].trace).stackgroup||"")?o in c?s=c[o]:(s=c[o]=d,d++):a.fill in t&&h>=0?s=h:(s=h=d,d++),s<f&&(u=!0),a._groupIndex=f=s;var p=n.slice();u&&p.sort((function(e,t){var r=e[0].trace,n=t[0].trace;return r._groupIndex-n._groupIndex||r.index-n.index}));var v={};for(i=0;i<p.length;i++)o=(a=p[i][0].trace).stackgroup||"",!0===a.visible?(a._nexttrace=null,a.fill in t&&(l=v[o],a._prevtrace=l||null,l&&(l._nexttrace=a)),a._ownfill=a.fill&&("tozero"===a.fill.substr(0,6)||"toself"===a.fill||"to"===a.fill.substr(0,2)&&!a._prevtrace),v[o]=a):a._prevtrace=a._nexttrace=a._ownfill=null;return p}},7152:function(e,t,r){"use strict";var n=r(8248);e.exports=function(e,t){t||(t=2);var r=e.marker,a=r.sizeref||1,i=r.sizemin||0,o="area"===r.sizemode?function(e){return Math.sqrt(e/a)}:function(e){return e/a};return function(e){var r=o(e/t);return n(r)&&r>0?Math.max(r,i):0}}},5528:function(e){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},4428:function(e,t,r){"use strict";var n=r(6308),a=r(4288).hasColorscale,i=r(7260),o=r(3028);e.exports=function(e,t,r,l,s,c){var u=o.isBubble(e),f=(e.line||{}).color;c=c||{},f&&(r=f),s("marker.symbol"),s("marker.opacity",u?.7:1),s("marker.size"),c.noAngle||(s("marker.angle"),c.noAngleRef||s("marker.angleref"),c.noStandOff||s("marker.standoff")),s("marker.color",r),a(e,"marker")&&i(e,t,l,s,{prefix:"marker.",cLetter:"c"}),c.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),c.noLine||(s("marker.line.color",f&&!Array.isArray(f)&&t.marker.color!==f?f:u?n.background:n.defaultLine),a(e,"marker.line")&&i(e,t,l,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",u?1:0)),u&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),c.gradient&&"none"!==s("marker.gradient.type")&&s("marker.gradient.color")}},1147:function(e,t,r){"use strict";var n=r(3400).dateTick0,a=r(9032).ONEWEEK;function i(e,t){return n(t,e%a==0?1:0)}e.exports=function(e,t,r,n,a){if(a||(a={x:!0,y:!0}),a.x){var o=n("xperiod");o&&(n("xperiod0",i(o,t.xcalendar)),n("xperiodalignment"))}if(a.y){var l=n("yperiod");l&&(n("yperiod0",i(l,t.ycalendar)),n("yperiodalignment"))}}},6504:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(3400),o=i.ensureSingle,l=i.identity,s=r(3616),c=r(3028),u=r(2340),f=r(4328),d=r(2065).tester;function h(e,t,r,f,h,p,v){var g,y=e._context.staticPlot;!function(e,t,r,a,o){var l=r.xaxis,s=r.yaxis,u=n.extent(i.simpleMap(l.range,l.r2c)),f=n.extent(i.simpleMap(s.range,s.r2c)),d=a[0].trace;if(c.hasMarkers(d)){var h=d.marker.maxdisplayed;if(0!==h){var p=a.filter((function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=f[0]&&e.y<=f[1]})),v=Math.ceil(p.length/h),g=0;o.forEach((function(e,r){var n=e[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r<t&&g++}));var y=Math.round(g*v/3+Math.floor(g/3)*v/7.1);a.forEach((function(e){delete e.vis})),p.forEach((function(e,t){0===Math.round((t+y)%v)&&(e.vis=!0)}))}}}(0,t,r,f,h);var m=!!v&&v.duration>0;function x(e){return m?e.transition():e}var b=r.xaxis,_=r.yaxis,w=f[0].trace,T=w.line,M=n.select(p),k=o(M,"g","errorbars"),A=o(M,"g","lines"),L=o(M,"g","points"),S=o(M,"g","text");if(a.getComponentMethod("errorbars","plot")(e,k,r,v),!0===w.visible){var D,O;x(M).style("opacity",w.opacity);var C,P,I=w.fill.charAt(w.fill.length-1);"x"!==I&&"y"!==I&&(I=""),"y"===I?(C=1,P=_.c2p(0,!0)):"x"===I&&(C=0,P=b.c2p(0,!0)),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=M;var R,z,N="",F=[],E=w._prevtrace,H=null,B=null;E&&(N=E._prevRevpath||"",O=E._nextFill,F=E._ownPolygons,H=E._fillsegments,B=E._fillElement);var j,Y,V,U,q,G,Z="",W="",X=[];w._polygons=[];var J=[],K=[],Q=i.noop;if(D=w._ownFill,c.hasLines(w)||"none"!==w.fill){O&&O.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(T.shape)?(j=s.steps(T.shape),Y=s.steps(T.shape.split("").reverse().join(""))):j=Y="spline"===T.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),T.smoothing):s.smoothopen(e,T.smoothing)}:function(e){return"M"+e.join("L")},V=function(e){return Y(e.reverse())},K=u(f,{xaxis:b,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,backoff:T.backoff,simplify:T.simplify,fill:w.fill}),J=new Array(K.length);var $=0;for(g=0;g<K.length;g++){var ee,te=K[g];ee&&I?ee.push.apply(ee,te):(ee=te.slice(),J[$]=ee,$++)}w._fillElement=null,w._fillExclusionElement=B,w._fillsegments=J.slice(0,$),J=w._fillsegments,K.length&&(U=K[0][0].slice(),G=(q=K[K.length-1])[q.length-1].slice()),Q=function(e){return function(t){if(R=j(t),z=V(t),Z?I?(Z+="L"+R.substr(1),W=z+"L"+W.substr(1)):(Z+="Z"+R,W=z+"Z"+W):(Z=R,W=z),c.hasLines(w)){var r=n.select(this);if(r.datum(f),e)x(r.style("opacity",0).attr("d",R).call(s.lineGroupStyle)).style("opacity",1);else{var a=x(r);a.attr("d",R),s.singleLineStyle(f,a)}}}}}var re=A.selectAll(".js-line").data(K);x(re.exit()).style("opacity",0).remove(),re.each(Q(!1)),re.enter().append("path").classed("js-line",!0).style("vector-effect",y?"none":"non-scaling-stroke").call(s.lineGroupStyle).each(Q(!0)),s.setClipUrl(re,r.layerClipId,e);var ne=function(){var e=new Array(J.length);for(g=0;g<J.length;g++)e[g]=d(J[g]);return e},ae=function(e){var t,r;if(e&&0!==e.length){for(t=new Array(e.length-1+J.length),r=0;r<e.length-1;r++)t[r]=d(e[r]);var n=e[e.length-1].slice();for(n.reverse(),r=0;r<J.length;r++)t[e.length-1+r]=d(J[r].concat(n))}else for(t=new Array(J.length),r=0;r<J.length;r++){var a=J[r][0].slice(),i=J[r][J[r].length-1].slice();a[C]=i[C]=P;var o=[i,a].concat(J[r]);t[r]=d(o)}return t};K.length?(D?(D.datum(f),U&&G&&(I?(U[C]=G[C]=P,x(D).attr("d","M"+G+"L"+U+"L"+Z.substr(1)).call(s.singleFillStyle,e),X=ae(null)):(x(D).attr("d",Z+"Z").call(s.singleFillStyle,e),X=ne())),w._polygons=X,w._fillElement=D):O&&("tonext"===w.fill.substr(0,6)&&Z&&N?("tonext"===w.fill?(x(O).attr("d",Z+"Z"+N+"Z").call(s.singleFillStyle,e),X=ne(),w._polygons=X.concat(F)):(x(O).attr("d",Z+"L"+N.substr(1)+"Z").call(s.singleFillStyle,e),X=ae(H),w._polygons=X),w._fillElement=O):oe(O)),w._prevRevpath=W):(D?oe(D):O&&oe(O),w._prevRevpath=null),w._ownPolygons=X,L.datum(f),S.datum(f),function(t,a,i){var o,u=i[0].trace,f=c.hasMarkers(u),d=c.hasText(u),h=fe(u),p=de,v=de;if(f||d){var g=l,y=u.stackgroup,w=y&&"infer zero"===e._fullLayout._scatterStackOpts[b._id+_._id][y].stackgaps;u.marker.maxdisplayed||u._needsCull?g=w?se:le:y&&!w&&(g=ce),f&&(p=g),d&&(v=g)}var T,M=(o=t.selectAll("path.point").data(p,h)).enter().append("path").classed("point",!0);m&&M.call(s.pointStyle,u,e).call(s.translatePoints,b,_).style("opacity",0).transition().style("opacity",1),o.order(),f&&(T=s.makePointStyleFns(u)),o.each((function(t){var a=n.select(this),i=x(a);s.translatePoint(t,i,b,_)?(s.singlePointStyle(t,i,u,T,e),r.layerClipId&&s.hideOutsideRangePoint(t,i,b,_,u.xcalendar,u.ycalendar),u.customdata&&a.classed("plotly-customdata",null!==t.data&&void 0!==t.data)):i.remove()})),m?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=a.selectAll("g").data(v,h)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each((function(e){var t=n.select(this),a=x(t.select("text"));s.translatePoint(e,a,b,_)?r.layerClipId&&s.hideOutsideRangePoint(e,t,b,_,u.xcalendar,u.ycalendar):t.remove()})),o.selectAll("text").call(s.textPointStyle,u,e).each((function(e){var t=b.c2p(e.x),r=_.c2p(e.y);n.select(this).selectAll("tspan.line").each((function(){x(n.select(this)).attr({x:t,y:r})}))})),o.exit().remove()}(L,S,f);var ie=!1===w.cliponaxis?null:r.layerClipId;s.setClipUrl(L,ie,e),s.setClipUrl(S,ie,e)}function oe(e){x(e).attr("d","M0,0Z")}function le(e){return e.filter((function(e){return!e.gap&&e.vis}))}function se(e){return e.filter((function(e){return e.vis}))}function ce(e){return e.filter((function(e){return!e.gap}))}function ue(e){return e.id}function fe(e){if(e.ids)return ue}function de(){return!1}}e.exports=function(e,t,r,a,i,c){var u,d,p=!i,v=!!i&&i.duration>0,g=f(e,t,r);(u=a.selectAll("g.trace").data(g,(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),u.order(),function(e,t,r){t.each((function(t){var a=o(n.select(this),"g","fills");s.setClipUrl(a,r.layerClipId,e);var i=t[0].trace,c=[];i._ownfill&&c.push("_ownFill"),i._nexttrace&&c.push("_nextFill");var u=a.selectAll("g").data(c,l);u.enter().append("g"),u.exit().each((function(e){i[e]=null})).remove(),u.order().each((function(e){i[e]=o(n.select(this),"path","js-fill")}))}))}(e,u,t),v?(c&&(d=c()),n.transition().duration(i.duration).ease(i.easing).each("end",(function(){d&&d()})).each("interrupt",(function(){d&&d()})).each((function(){a.selectAll("g.trace").each((function(r,n){h(e,n,t,r,g,this,i)}))}))):u.each((function(r,n){h(e,n,t,r,g,this,i)})),p&&u.exit().remove(),a.selectAll("path:not([d])").remove()}},1560:function(e,t,r){"use strict";var n=r(3028);e.exports=function(e,t){var r,a,i,o,l=e.cd,s=e.xaxis,c=e.yaxis,u=[],f=l[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===t)for(r=0;r<l.length;r++)l[r].selected=0;else for(r=0;r<l.length;r++)a=l[r],i=s.c2p(a.x),o=c.c2p(a.y),null!==a.i&&t.contains([i,o],!1,r,e)?(u.push({pointNumber:a.i,x:s.c2d(a.x),y:c.c2d(a.y)}),a.selected=1):a.selected=0;return u}},3912:function(e){"use strict";var t=["orientation","groupnorm","stackgaps"];e.exports=function(e,r,n,a){var i=n._scatterStackOpts,o=a("stackgroup");if(o){var l=r.xaxis+r.yaxis,s=i[l];s||(s=i[l]={});var c=s[o],u=!1;c?c.traces.push(r):(c=s[o]={traceIndices:[],traces:[r]},u=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},d=0;d<t.length;d++){var h=t[d],p=h+"Found";if(!c[p]){var v=void 0!==e[h],g="orientation"===h;if((v||u)&&(c[h]=a(h,f[h]),g&&(c.fillDflt="h"===c[h]?"tonextx":"tonexty"),v&&(c[p]=!0,!u&&(delete c.traces[0][h],g))))for(var y=0;y<c.traces.length-1;y++){var m=c.traces[y];m._input.fill!==m.fill&&(m.fill=c.fillDflt)}}}return c}}},6844:function(e,t,r){"use strict";var n=r(3428),a=r(3616),i=r(4040);function o(e,t,r){a.pointStyle(e.selectAll("path.point"),t,r)}function l(e,t,r){a.textPointStyle(e.selectAll("text"),t,r)}e.exports={style:function(e){var t=n.select(e).selectAll("g.trace.scatter");t.style("opacity",(function(e){return e[0].trace.opacity})),t.selectAll("g.points").each((function(t){o(n.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.text").each((function(t){l(n.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.trace path.js-line").call(a.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(a.fillGroupStyle,e,!1),i.getComponentMethod("errorbars","style")(t)},stylePoints:o,styleText:l,styleOnSelect:function(e,t,r){var n=t[0].trace;n.selectedpoints?(a.selectedPointStyle(r.selectAll("path.point"),n),a.selectedTextStyle(r.selectAll("text"),n)):(o(r,n,e),l(r,n,e))}}},3028:function(e,t,r){"use strict";var n=r(3400),a=r(8116).isTypedArraySpec;e.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){var t=e.marker;return n.isPlainObject(t)&&(n.isArrayOrTypedArray(t.size)||a(t.size))}}},124:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t,r,a,i){i=i||{},a("textposition"),n.coerceFont(a,"textfont",i.font||r.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}},3980:function(e,t,r){"use strict";var n=r(3400),a=r(4040);e.exports=function(e,t,r,i){var o,l=i("x"),s=i("y");if(a.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],r),l){var c=n.minRowLength(l);s?o=Math.min(c,n.minRowLength(s)):(o=c,i("y0"),i("dy"))}else{if(!s)return 0;o=n.minRowLength(s),i("x0"),i("dx")}return t._length=o,o}},1843:function(e,t,r){"use strict";var n=r(4460),a=r(3400),i=r(3060),o=r(468).W,l=r(9032).BADNUM;t.moduleType="transform",t.name="aggregate";var s=t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},c=s.aggregations;function u(e,t,r,i){if(i.enabled){for(var o=i.target,s=a.nestedProperty(t,o),c=s.get(),u=function(e,t){var r=e.func,n=t.d2c,i=t.c2d;switch(r){case"count":return f;case"first":return d;case"last":return h;case"sum":return function(e,t){for(var r=0,a=0;a<t.length;a++){var o=n(e[t[a]]);o!==l&&(r+=o)}return i(r)};case"avg":return function(e,t){for(var r=0,a=0,o=0;o<t.length;o++){var s=n(e[t[o]]);s!==l&&(r+=s,a++)}return a?i(r/a):l};case"min":return function(e,t){for(var r=1/0,a=0;a<t.length;a++){var o=n(e[t[a]]);o!==l&&(r=Math.min(r,o))}return r===1/0?l:i(r)};case"max":return function(e,t){for(var r=-1/0,a=0;a<t.length;a++){var o=n(e[t[a]]);o!==l&&(r=Math.max(r,o))}return r===-1/0?l:i(r)};case"range":return function(e,t){for(var r=1/0,a=-1/0,o=0;o<t.length;o++){var s=n(e[t[o]]);s!==l&&(r=Math.min(r,s),a=Math.max(a,s))}return a===-1/0||r===1/0?l:i(a-r)};case"change":return function(e,t){var r=n(e[t[0]]),a=n(e[t[t.length-1]]);return r===l||a===l?l:i(a-r)};case"median":return function(e,t){for(var r=[],o=0;o<t.length;o++){var s=n(e[t[o]]);s!==l&&r.push(s)}if(!r.length)return l;r.sort(a.sorterAsc);var c=(r.length-1)/2;return i((r[Math.floor(c)]+r[Math.ceil(c)])/2)};case"mode":return function(e,t){for(var r={},a=0,o=l,s=0;s<t.length;s++){var c=n(e[t[s]]);if(c!==l){var u=r[c]=(r[c]||0)+1;u>a&&(a=u,o=c)}}return a?i(o):l};case"rms":return function(e,t){for(var r=0,a=0,o=0;o<t.length;o++){var s=n(e[t[o]]);s!==l&&(r+=s*s,a++)}return a?i(Math.sqrt(r/a)):l};case"stddev":return function(t,r){var a,i=0,o=0,s=1,c=l;for(a=0;a<r.length&&c===l;a++)c=n(t[r[a]]);if(c===l)return l;for(;a<r.length;a++){var u=n(t[r[a]]);if(u!==l){var f=u-c;i+=f,o+=f*f,s++}}var d="sample"===e.funcmode?s-1:s;return d?Math.sqrt((o-i*i/s)/d):0}}}(i,n.getDataConversions(e,t,o,c)),p=new Array(r.length),v=0;v<r.length;v++)p[v]=u(c,r[v]);s.set(p),"count"===i.func&&a.pushUnique(t._arrayAttrs,o)}}function f(e,t){return t.length}function d(e,t){return e[t[0]]}function h(e,t){return e[t[t.length-1]]}t.supplyDefaults=function(e,t){var r,n={};function o(t,r){return a.coerce(e,n,s,t,r)}if(!o("enabled"))return n;var l=i.findArrayAttributes(t),u={};for(r=0;r<l.length;r++)u[l[r]]=1;var f=o("groups");if(!Array.isArray(f)){if(!u[f])return n.enabled=!1,n;u[f]=0}var d,h=e.aggregations||[],p=n.aggregations=new Array(h.length);function v(e,t){return a.coerce(h[r],d,c,e,t)}for(r=0;r<h.length;r++){d={_index:r};var g=v("target"),y=v("func");v("enabled")&&g&&(u[g]||"count"===y&&void 0===u[g])?("stddev"===y&&v("funcmode"),u[g]=0,p[r]=d):p[r]={enabled:!1,_index:r}}for(r=0;r<l.length;r++)u[l[r]]&&p.push({target:l[r],func:c.func.dflt,enabled:!0,_index:-1});return n},t.calcTransform=function(e,t,r){if(r.enabled){var n=r.groups,i=a.getTargetArray(t,{target:n});if(i){var l,s,c,f,d={},h={},p=[],v=o(t.transforms,r),g=i.length;for(t._length&&(g=Math.min(g,t._length)),l=0;l<g;l++)void 0===(c=d[s=i[l]])?(d[s]=p.length,f=[l],p.push(f),h[d[s]]=v(l)):(p[c].push(l),h[d[s]]=(h[d[s]]||[]).concat(v(l)));r._indexToPoints=h;var y=r.aggregations;for(l=0;l<y.length;l++)u(e,t,p,y[l]);"string"==typeof n&&u(e,t,p,{target:n,func:"first",enabled:!0}),t._length=p.length}}}},6744:function(e,t,r){"use strict";var n=r(3400),a=r(4040),i=r(4460),o=r(468).W,l=r(9104),s=l.COMPARISON_OPS,c=l.INTERVAL_OPS,u=l.SET_OPS;t.moduleType="transform",t.name="filter",t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},operation:{valType:"enumerated",values:[].concat(s).concat(c).concat(u),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},preservegaps:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc"},t.supplyDefaults=function(e){var r={};function i(a,i){return n.coerce(e,r,t.attributes,a,i)}if(i("enabled")){var o=i("target");if(n.isArrayOrTypedArray(o)&&0===o.length)return r.enabled=!1,r;i("preservegaps"),i("operation"),i("value");var l=a.getComponentMethod("calendars","handleDefaults");l(e,r,"valuecalendar",null),l(e,r,"targetcalendar",null)}return r},t.calcTransform=function(e,t,r){if(r.enabled){var a=n.getTargetArray(t,r);if(a){var l=r.target,f=a.length;t._length&&(f=Math.min(f,t._length));var d=r.targetcalendar,h=t._arrayAttrs,p=r.preservegaps;if("string"==typeof l){var v=n.nestedProperty(t,l+"calendar").get();v&&(d=v)}var g,y,m=function(e,t,r){var a=e.operation,i=e.value,o=n.isArrayOrTypedArray(i);function l(e){return-1!==e.indexOf(a)}var f,d=function(r){return t(r,0,e.valuecalendar)},h=function(e){return t(e,0,r)};switch(l(s)?f=d(o?i[0]:i):l(c)?f=o?[d(i[0]),d(i[1])]:[d(i),d(i)]:l(u)&&(f=o?i.map(d):[d(i)]),a){case"=":return function(e){return h(e)===f};case"!=":return function(e){return h(e)!==f};case"<":return function(e){return h(e)<f};case"<=":return function(e){return h(e)<=f};case">":return function(e){return h(e)>f};case">=":return function(e){return h(e)>=f};case"[]":return function(e){var t=h(e);return t>=f[0]&&t<=f[1]};case"()":return function(e){var t=h(e);return t>f[0]&&t<f[1]};case"[)":return function(e){var t=h(e);return t>=f[0]&&t<f[1]};case"(]":return function(e){var t=h(e);return t>f[0]&&t<=f[1]};case"][":return function(e){var t=h(e);return t<=f[0]||t>=f[1]};case")(":return function(e){var t=h(e);return t<f[0]||t>f[1]};case"](":return function(e){var t=h(e);return t<=f[0]||t>f[1]};case")[":return function(e){var t=h(e);return t<f[0]||t>=f[1]};case"{}":return function(e){return-1!==f.indexOf(h(e))};case"}{":return function(e){return-1===f.indexOf(h(e))}}}(r,i.getDataToCoordFunc(e,t,l,a),d),x={},b={},_=0;p?(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set(new Array(f))},y=function(e,t){var r=x[e.astr][t];e.get()[t]=r}):(g=function(e){x[e.astr]=n.extendDeep([],e.get()),e.set([])},y=function(e,t){var r=x[e.astr][t];e.get().push(r)}),M(g);for(var w=o(t.transforms,r),T=0;T<f;T++)m(a[T])?(M(y,T),b[_++]=w(T)):p&&_++;r._indexToPoints=b,t._length=_}}function M(e,r){for(var a=0;a<h.length;a++)e(n.nestedProperty(t,h[a]),r)}}},2028:function(e,t,r){"use strict";var n=r(3400),a=r(3060),i=r(7316),o=r(468).W;function l(e,t){var r,l,s,c,u,f,d,h,p,v,g=t.transform,y=t.transformIndex,m=e.transforms[y].groups,x=o(e.transforms,g);if(!n.isArrayOrTypedArray(m)||0===m.length)return[e];var b=n.filterUnique(m),_=new Array(b.length),w=m.length,T=a.findArrayAttributes(e),M=g.styles||[],k={};for(r=0;r<M.length;r++)k[M[r].target]=M[r].value;g.styles&&(v=n.keyedContainer(g,"styles","target","value.name"));var A={},L={};for(r=0;r<b.length;r++){A[f=b[r]]=r,L[f]=0,(d=_[r]=n.extendDeepNoArrays({},e))._group=f,d.transforms[y]._indexToPoints={};var S=null;for(v&&(S=v.get(f)),d.name=S||""===S?S:n.templateString(g.nameformat,{trace:e.name,group:f}),h=d.transforms,d.transforms=[],l=0;l<h.length;l++)d.transforms[l]=n.extendDeepNoArrays({},h[l]);for(l=0;l<T.length;l++)n.nestedProperty(d,T[l]).set([])}for(s=0;s<T.length;s++){for(c=T[s],l=0,p=[];l<b.length;l++)p[l]=n.nestedProperty(_[l],c).get();for(u=n.nestedProperty(e,c).get(),l=0;l<w;l++)p[A[m[l]]].push(u[l])}for(l=0;l<w;l++)(d=_[A[m[l]]]).transforms[y]._indexToPoints[L[m[l]]]=x(l),L[m[l]]++;for(r=0;r<b.length;r++)f=b[r],d=_[r],i.clearExpandedTraceDefaultColors(d),d=n.extendDeepNoArrays(d,k[f]||{});return _}t.moduleType="transform",t.name="groupby",t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},t.supplyDefaults=function(e,r,a){var i,o={};function l(r,a){return n.coerce(e,o,t.attributes,r,a)}if(!l("enabled"))return o;l("groups"),l("nameformat",a._dataLength>1?"%{group} (%{trace})":"%{group}");var s=e.styles,c=o.styles=[];if(s)for(i=0;i<s.length;i++){var u=c[i]={};n.coerce(s[i],c[i],t.attributes.styles,"target");var f=n.coerce(s[i],c[i],t.attributes.styles,"value");n.isPlainObject(f)?u.value=n.extendDeep({},f):f&&delete u.value}return o},t.transform=function(e,t){var r,n,a,i=[];for(n=0;n<e.length;n++)for(r=l(e[n],t),a=0;a<r.length;a++)i.push(r[a]);return i}},468:function(e,t){"use strict";t.W=function(e,t){for(var r,n,a=0;a<e.length&&(r=e[a])!==t;a++)r._indexToPoints&&!1!==r.enabled&&(n=r._indexToPoints);var i=n?function(e){return n[e]}:function(e){return[e]};return i}},6272:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(468).W,o=r(9032).BADNUM;t.moduleType="transform",t.name="sort",t.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},order:{valType:"enumerated",values:["ascending","descending"],dflt:"ascending",editType:"calc"},editType:"calc"},t.supplyDefaults=function(e){var r={};function a(a,i){return n.coerce(e,r,t.attributes,a,i)}return a("enabled")&&(a("target"),a("order")),r},t.calcTransform=function(e,t,r){if(r.enabled){var l=n.getTargetArray(t,r);if(l){var s=r.target,c=l.length;t._length&&(c=Math.min(c,t._length));var u,f,d=t._arrayAttrs,h=function(e,t,r,n){var a,i=new Array(n),l=new Array(n);for(a=0;a<n;a++)i[a]={v:t[a],i:a};for(i.sort(function(e,t){switch(e.order){case"ascending":return function(e,r){var n=t(e.v),a=t(r.v);return n===o?1:a===o?-1:n-a};case"descending":return function(e,r){var n=t(e.v),a=t(r.v);return n===o?1:a===o?-1:a-n}}}(e,r)),a=0;a<n;a++)l[a]=i[a].i;return l}(r,l,a.getDataToCoordFunc(e,t,s,l),c),p=i(t.transforms,r),v={};for(u=0;u<d.length;u++){var g=n.nestedProperty(t,d[u]),y=g.get(),m=new Array(c);for(f=0;f<c;f++)m[f]=y[h[f]];g.set(m)}for(f=0;f<c;f++)v[f]=p(h[f]);r._indexToPoints=v,t._length=c}}}},5788:function(e,t){"use strict";t.version="2.31.0"},5928:function(e){"use strict";e.exports=a,e.exports.isMobile=a,e.exports.default=a;var t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function a(e){e||(e={});var a=e.ua;if(a||"undefined"==typeof navigator||(a=navigator.userAgent),a&&a.headers&&"string"==typeof a.headers["user-agent"]&&(a=a.headers["user-agent"]),"string"!=typeof a)return!1;var i=t.test(a)&&!r.test(a)||!!e.tablet&&n.test(a);return!i&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==a.indexOf("Macintosh")&&-1!==a.indexOf("Safari")&&(i=!0),i}},3428:function(e,t,r){var n,a;(function(){var i={version:"3.8.0"},o=[].slice,l=function(e){return o.call(e)},s=self.document;function c(e){return e&&(e.ownerDocument||e.document||e).documentElement}function u(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(s)try{l(s.documentElement.childNodes)[0].nodeType}catch(e){l=function(e){for(var t=e.length,r=new Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),s)try{s.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var f=this.Element.prototype,d=f.setAttribute,h=f.setAttributeNS,p=this.CSSStyleDeclaration.prototype,v=p.setProperty;f.setAttribute=function(e,t){d.call(this,e,t+"")},f.setAttributeNS=function(e,t,r){h.call(this,e,t,r+"")},p.setProperty=function(e,t,r){v.call(this,e,t+"",r)}}function g(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function y(e){return null===e?NaN:+e}function m(e){return!isNaN(e)}function x(e){return{left:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n<a;){var i=n+a>>>1;e(t[i],r)<0?n=i+1:a=i}return n},right:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n<a;){var i=n+a>>>1;e(t[i],r)>0?a=i:n=i+1}return n}}}i.ascending=g,i.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},i.min=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a<i;)if(null!=(n=e[a])&&n>=n){r=n;break}for(;++a<i;)null!=(n=e[a])&&r>n&&(r=n)}else{for(;++a<i;)if(null!=(n=t.call(e,e[a],a))&&n>=n){r=n;break}for(;++a<i;)null!=(n=t.call(e,e[a],a))&&r>n&&(r=n)}return r},i.max=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a<i;)if(null!=(n=e[a])&&n>=n){r=n;break}for(;++a<i;)null!=(n=e[a])&&n>r&&(r=n)}else{for(;++a<i;)if(null!=(n=t.call(e,e[a],a))&&n>=n){r=n;break}for(;++a<i;)null!=(n=t.call(e,e[a],a))&&n>r&&(r=n)}return r},i.extent=function(e,t){var r,n,a,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(n=e[i])&&n>=n){r=a=n;break}for(;++i<o;)null!=(n=e[i])&&(r>n&&(r=n),a<n&&(a=n))}else{for(;++i<o;)if(null!=(n=t.call(e,e[i],i))&&n>=n){r=a=n;break}for(;++i<o;)null!=(n=t.call(e,e[i],i))&&(r>n&&(r=n),a<n&&(a=n))}return[r,a]},i.sum=function(e,t){var r,n=0,a=e.length,i=-1;if(1===arguments.length)for(;++i<a;)m(r=+e[i])&&(n+=r);else for(;++i<a;)m(r=+t.call(e,e[i],i))&&(n+=r);return n},i.mean=function(e,t){var r,n=0,a=e.length,i=-1,o=a;if(1===arguments.length)for(;++i<a;)m(r=y(e[i]))?n+=r:--o;else for(;++i<a;)m(r=y(t.call(e,e[i],i)))?n+=r:--o;if(o)return n/o},i.quantile=function(e,t){var r=(e.length-1)*t+1,n=Math.floor(r),a=+e[n-1],i=r-n;return i?a+i*(e[n]-a):a},i.median=function(e,t){var r,n=[],a=e.length,o=-1;if(1===arguments.length)for(;++o<a;)m(r=y(e[o]))&&n.push(r);else for(;++o<a;)m(r=y(t.call(e,e[o],o)))&&n.push(r);if(n.length)return i.quantile(n.sort(g),.5)},i.variance=function(e,t){var r,n,a=e.length,i=0,o=0,l=-1,s=0;if(1===arguments.length)for(;++l<a;)m(r=y(e[l]))&&(o+=(n=r-i)*(r-(i+=n/++s)));else for(;++l<a;)m(r=y(t.call(e,e[l],l)))&&(o+=(n=r-i)*(r-(i+=n/++s)));if(s>1)return o/(s-1)},i.deviation=function(){var e=i.variance.apply(this,arguments);return e?Math.sqrt(e):e};var b=x(g);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,r){return g(e(t),r)}:e)},i.shuffle=function(e,t,r){(i=arguments.length)<3&&(r=e.length,i<2&&(t=0));for(var n,a,i=r-t;i;)a=Math.random()*i--|0,n=e[i+t],e[i+t]=e[a+t],e[a+t]=n;return e},i.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},i.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],a=new Array(r<0?0:r);t<r;)a[t]=[n,n=e[++t]];return a},i.transpose=function(e){if(!(a=e.length))return[];for(var t=-1,r=i.min(e,_),n=new Array(r);++t<r;)for(var a,o=-1,l=n[t]=new Array(a);++o<a;)l[o]=e[o][t];return n},i.zip=function(){return i.transpose(arguments)},i.keys=function(e){var t=[];for(var r in e)t.push(r);return t},i.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},i.entries=function(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t},i.merge=function(e){for(var t,r,n,a=e.length,i=-1,o=0;++i<a;)o+=e[i].length;for(r=new Array(o);--a>=0;)for(t=(n=e[a]).length;--t>=0;)r[--o]=n[t];return r};var w=Math.abs;function T(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function M(){this._=Object.create(null)}i.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),(t-e)/r==1/0)throw new Error("infinite range");var n,a=[],i=function(e){for(var t=1;e*t%1;)t*=10;return t}(w(r)),o=-1;if(e*=i,t*=i,(r*=i)<0)for(;(n=e+r*++o)>t;)a.push(n/i);else for(;(n=e+r*++o)<t;)a.push(n/i);return a},i.map=function(e,t){var r=new M;if(e instanceof M)e.forEach((function(e,t){r.set(e,t)}));else if(Array.isArray(e)){var n,a=-1,i=e.length;if(1===arguments.length)for(;++a<i;)r.set(a,e[a]);else for(;++a<i;)r.set(t.call(e,n=e[a],a),n)}else for(var o in e)r.set(o,e[o]);return r};var k="__proto__",A="\0";function L(e){return(e+="")===k||e[0]===A?A+e:e}function S(e){return(e+="")[0]===A?e.slice(1):e}function D(e){return L(e)in this._}function O(e){return(e=L(e))in this._&&delete this._[e]}function C(){var e=[];for(var t in this._)e.push(S(t));return e}function P(){var e=0;for(var t in this._)++e;return e}function I(){for(var e in this._)return!1;return!0}function R(){this._=Object.create(null)}function z(e){return e}function N(e,t,r){return function(){var n=r.apply(t,arguments);return n===t?e:n}}function F(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,n=E.length;r<n;++r){var a=E[r]+t;if(a in e)return a}}T(M,{has:D,get:function(e){return this._[L(e)]},set:function(e,t){return this._[L(e)]=t},remove:O,keys:C,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:S(t),value:this._[t]});return e},size:P,empty:I,forEach:function(e){for(var t in this._)e.call(this,S(t),this._[t])}}),i.nest=function(){var e,t,r={},n=[],a=[];function o(a,i,l){if(l>=n.length)return t?t.call(r,i):e?i.sort(e):i;for(var s,c,u,f,d=-1,h=i.length,p=n[l++],v=new M;++d<h;)(f=v.get(s=p(c=i[d])))?f.push(c):v.set(s,[c]);return a?(c=a(),u=function(e,t){c.set(e,o(a,t,l))}):(c={},u=function(e,t){c[e]=o(a,t,l)}),v.forEach(u),c}function l(e,t){if(t>=n.length)return e;var r=[],i=a[t++];return e.forEach((function(e,n){r.push({key:e,values:l(n,t)})})),i?r.sort((function(e,t){return i(e.key,t.key)})):r}return r.map=function(e,t){return o(t,e,0)},r.entries=function(e){return l(o(i.map,e,0),0)},r.key=function(e){return n.push(e),r},r.sortKeys=function(e){return a[n.length-1]=e,r},r.sortValues=function(t){return e=t,r},r.rollup=function(e){return t=e,r},r},i.set=function(e){var t=new R;if(e)for(var r=0,n=e.length;r<n;++r)t.add(e[r]);return t},T(R,{has:D,add:function(e){return this._[L(e+="")]=!0,e},remove:O,values:C,size:P,empty:I,forEach:function(e){for(var t in this._)e.call(this,S(t))}}),i.behavior={},i.rebind=function(e,t){for(var r,n=1,a=arguments.length;++n<a;)e[r=arguments[n]]=N(e,t,t[r]);return e};var E=["webkit","ms","moz","Moz","o","O"];function H(){}function B(){}function j(e){var t=[],r=new M;function n(){for(var r,n=t,a=-1,i=n.length;++a<i;)(r=n[a].on)&&r.apply(this,arguments);return e}return n.on=function(n,a){var i,o=r.get(n);return arguments.length<2?o&&o.on:(o&&(o.on=null,t=t.slice(0,i=t.indexOf(o)).concat(t.slice(i+1)),r.remove(n)),a&&t.push(r.set(n,{on:a})),e)},n}function Y(){i.event.preventDefault()}function V(){for(var e,t=i.event;e=t.sourceEvent;)t=e;return t}function U(e){for(var t=new B,r=0,n=arguments.length;++r<n;)t[arguments[r]]=j(t);return t.of=function(r,n){return function(a){try{var o=a.sourceEvent=i.event;a.target=e,i.event=a,t[a.type].apply(r,n)}finally{i.event=o}}},t}i.dispatch=function(){for(var e=new B,t=-1,r=arguments.length;++t<r;)e[arguments[t]]=j(e);return e},B.prototype.on=function(e,t){var r=e.indexOf("."),n="";if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},i.event=null,i.requote=function(e){return e.replace(q,"\\$&")};var q=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,G={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function Z(e){return G(e,K),e}var W=function(e,t){return t.querySelector(e)},X=function(e,t){return t.querySelectorAll(e)},J=function(e,t){var r=e.matches||e[F(e,"matchesSelector")];return J=function(e,t){return r.call(e,t)},J(e,t)};"function"==typeof Sizzle&&(W=function(e,t){return Sizzle(e,t)[0]||null},X=Sizzle,J=Sizzle.matchesSelector),i.selection=function(){return i.select(s.documentElement)};var K=i.selection.prototype=[];function Q(e){return"function"==typeof e?e:function(){return W(e,this)}}function $(e){return"function"==typeof e?e:function(){return X(e,this)}}K.select=function(e){var t,r,n,a,i=[];e=Q(e);for(var o=-1,l=this.length;++o<l;){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=-1,c=n.length;++s<c;)(a=n[s])?(t.push(r=e.call(a,a.__data__,s,o)),r&&"__data__"in a&&(r.__data__=a.__data__)):t.push(null)}return Z(i)},K.selectAll=function(e){var t,r,n=[];e=$(e);for(var a=-1,i=this.length;++a<i;)for(var o=this[a],s=-1,c=o.length;++s<c;)(r=o[s])&&(n.push(t=l(e.call(r,r.__data__,s,a))),t.parentNode=r);return Z(n)};var ee="http://www.w3.org/1999/xhtml",te={svg:"http://www.w3.org/2000/svg",xhtml:ee,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function re(e,t){return e=i.ns.qualify(e),null==t?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:"function"==typeof t?e.local?function(){var r=t.apply(this,arguments);null==r?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}:function(){var r=t.apply(this,arguments);null==r?this.removeAttribute(e):this.setAttribute(e,r)}:e.local?function(){this.setAttributeNS(e.space,e.local,t)}:function(){this.setAttribute(e,t)}}function ne(e){return e.trim().replace(/\s+/g," ")}function ae(e){return new RegExp("(?:^|\\s+)"+i.requote(e)+"(?:\\s+|$)","g")}function ie(e){return(e+"").trim().split(/^|\s+/)}function oe(e,t){var r=(e=ie(e).map(le)).length;return"function"==typeof t?function(){for(var n=-1,a=t.apply(this,arguments);++n<r;)e[n](this,a)}:function(){for(var n=-1;++n<r;)e[n](this,t)}}function le(e){var t=ae(e);return function(r,n){if(a=r.classList)return n?a.add(e):a.remove(e);var a=r.getAttribute("class")||"";n?(t.lastIndex=0,t.test(a)||r.setAttribute("class",ne(a+" "+e))):r.setAttribute("class",ne(a.replace(t," ")))}}function se(e,t,r){return null==t?function(){this.style.removeProperty(e)}:"function"==typeof t?function(){var n=t.apply(this,arguments);null==n?this.style.removeProperty(e):this.style.setProperty(e,n,r)}:function(){this.style.setProperty(e,t,r)}}function ce(e,t){return null==t?function(){delete this[e]}:"function"==typeof t?function(){var r=t.apply(this,arguments);null==r?delete this[e]:this[e]=r}:function(){this[e]=t}}function ue(e){return"function"==typeof e?e:(e=i.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,r=this.namespaceURI;return r===ee&&t.documentElement.namespaceURI===ee?t.createElement(e):t.createElementNS(r,e)}}function fe(){var e=this.parentNode;e&&e.removeChild(this)}function de(e){return{__data__:e}}function he(e){return function(){return J(this,e)}}function pe(e){return arguments.length||(e=g),function(t,r){return t&&r?e(t.__data__,r.__data__):!t-!r}}function ve(e,t){for(var r=0,n=e.length;r<n;r++)for(var a,i=e[r],o=0,l=i.length;o<l;o++)(a=i[o])&&t(a,o,r);return e}function ge(e){return G(e,ye),e}i.ns={prefix:te,qualify:function(e){var t=e.indexOf(":"),r=e;return t>=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),te.hasOwnProperty(r)?{space:te[r],local:e}:e}},K.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node();return(e=i.ns.qualify(e)).local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}for(t in e)this.each(re(t,e[t]));return this}return this.each(re(e,t))},K.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),n=(e=ie(e)).length,a=-1;if(t=r.classList){for(;++a<n;)if(!t.contains(e[a]))return!1}else for(t=r.getAttribute("class");++a<n;)if(!ae(e[a]).test(t))return!1;return!0}for(t in e)this.each(oe(t,e[t]));return this}return this.each(oe(e,t))},K.style=function(e,t,r){var n=arguments.length;if(n<3){if("string"!=typeof e){for(r in n<2&&(t=""),e)this.each(se(r,e[r],t));return this}if(n<2){var a=this.node();return u(a).getComputedStyle(a,null).getPropertyValue(e)}r=""}return this.each(se(e,t,r))},K.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(ce(t,e[t]));return this}return this.each(ce(e,t))},K.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},K.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},K.append=function(e){return e=ue(e),this.select((function(){return this.appendChild(e.apply(this,arguments))}))},K.insert=function(e,t){return e=ue(e),t=Q(t),this.select((function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)}))},K.remove=function(){return this.each(fe)},K.data=function(e,t){var r,n,a=-1,i=this.length;if(!arguments.length){for(e=new Array(i=(r=this[0]).length);++a<i;)(n=r[a])&&(e[a]=n.__data__);return e}function o(e,r){var n,a,i,o=e.length,u=r.length,f=Math.min(o,u),d=new Array(u),h=new Array(u),p=new Array(o);if(t){var v,g=new M,y=new Array(o);for(n=-1;++n<o;)(a=e[n])&&(g.has(v=t.call(a,a.__data__,n))?p[n]=a:g.set(v,a),y[n]=v);for(n=-1;++n<u;)(a=g.get(v=t.call(r,i=r[n],n)))?!0!==a&&(d[n]=a,a.__data__=i):h[n]=de(i),g.set(v,!0);for(n=-1;++n<o;)n in y&&!0!==g.get(y[n])&&(p[n]=e[n])}else{for(n=-1;++n<f;)a=e[n],i=r[n],a?(a.__data__=i,d[n]=a):h[n]=de(i);for(;n<u;++n)h[n]=de(r[n]);for(;n<o;++n)p[n]=e[n]}h.update=d,h.parentNode=d.parentNode=p.parentNode=e.parentNode,l.push(h),s.push(d),c.push(p)}var l=ge([]),s=Z([]),c=Z([]);if("function"==typeof e)for(;++a<i;)o(r=this[a],e.call(r,r.parentNode.__data__,a));else for(;++a<i;)o(r=this[a],e);return s.enter=function(){return l},s.exit=function(){return c},s},K.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},K.filter=function(e){var t,r,n,a=[];"function"!=typeof e&&(e=he(e));for(var i=0,o=this.length;i<o;i++){a.push(t=[]),t.parentNode=(r=this[i]).parentNode;for(var l=0,s=r.length;l<s;l++)(n=r[l])&&e.call(n,n.__data__,l,i)&&t.push(n)}return Z(a)},K.order=function(){for(var e=-1,t=this.length;++e<t;)for(var r,n=this[e],a=n.length-1,i=n[a];--a>=0;)(r=n[a])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},K.sort=function(e){e=pe.apply(this,arguments);for(var t=-1,r=this.length;++t<r;)this[t].sort(e);return this.order()},K.each=function(e){return ve(this,(function(t,r,n){e.call(t,t.__data__,r,n)}))},K.call=function(e){var t=l(arguments);return e.apply(t[0]=this,t),this},K.empty=function(){return!this.node()},K.node=function(){for(var e=0,t=this.length;e<t;e++)for(var r=this[e],n=0,a=r.length;n<a;n++){var i=r[n];if(i)return i}return null},K.size=function(){var e=0;return ve(this,(function(){++e})),e};var ye=[];function me(e,t,r){var n="__on"+e,a=e.indexOf("."),o=be;a>0&&(e=e.slice(0,a));var s=xe.get(e);function c(){var t=this[n];t&&(this.removeEventListener(e,t,t.$),delete this[n])}return s&&(e=s,o=_e),a?t?function(){var a=o(t,l(arguments));c.call(this),this.addEventListener(e,this[n]=a,a.$=r),a._=t}:c:t?H:function(){var t,r=new RegExp("^__on([^.]+)"+i.requote(e)+"$");for(var n in this)if(t=n.match(r)){var a=this[n];this.removeEventListener(t[1],a,a.$),delete this[n]}}}i.selection.enter=ge,i.selection.enter.prototype=ye,ye.append=K.append,ye.empty=K.empty,ye.node=K.node,ye.call=K.call,ye.size=K.size,ye.select=function(e){for(var t,r,n,a,i,o=[],l=-1,s=this.length;++l<s;){n=(a=this[l]).update,o.push(t=[]),t.parentNode=a.parentNode;for(var c=-1,u=a.length;++c<u;)(i=a[c])?(t.push(n[c]=r=e.call(a.parentNode,i.__data__,c,l)),r.__data__=i.__data__):t.push(null)}return Z(o)},ye.insert=function(e,t){var r,n,a;return arguments.length<2&&(r=this,t=function(e,t,i){var o,l=r[i].update,s=l.length;for(i!=a&&(a=i,n=0),t>=n&&(n=t+1);!(o=l[n])&&++n<s;);return o}),K.insert.call(this,e,t)},i.select=function(e){var t;return"string"==typeof e?(t=[W(e,s)]).parentNode=s.documentElement:(t=[e]).parentNode=c(e),Z([t])},i.selectAll=function(e){var t;return"string"==typeof e?(t=l(X(e,s))).parentNode=s.documentElement:(t=l(e)).parentNode=null,Z([t])},K.on=function(e,t,r){var n=arguments.length;if(n<3){if("string"!=typeof e){for(r in n<2&&(t=!1),e)this.each(me(r,e[r],t));return this}if(n<2)return(n=this.node()["__on"+e])&&n._;r=!1}return this.each(me(e,t,r))};var xe=i.map({mouseenter:"mouseover",mouseleave:"mouseout"});function be(e,t){return function(r){var n=i.event;i.event=r,t[0]=this.__data__;try{e.apply(this,t)}finally{i.event=n}}}function _e(e,t){var r=be(e,t);return function(e){var t=this,n=e.relatedTarget;n&&(n===t||8&n.compareDocumentPosition(t))||r.call(t,e)}}s&&xe.forEach((function(e){"on"+e in s&&xe.remove(e)}));var we,Te=0;function Me(e){var t=".dragsuppress-"+ ++Te,r="click"+t,n=i.select(u(e)).on("touchmove"+t,Y).on("dragstart"+t,Y).on("selectstart"+t,Y);if(null==we&&(we=!("onselectstart"in e)&&F(e.style,"userSelect")),we){var a=c(e).style,o=a[we];a[we]="none"}return function(e){if(n.on(t,null),we&&(a[we]=o),e){var i=function(){n.on(r,null)};n.on(r,(function(){Y(),i()}),!0),setTimeout(i,0)}}}i.mouse=function(e){return Ae(e,V())};var ke=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ae(e,t){t.changedTouches&&(t=t.changedTouches[0]);var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();if(ke<0){var a=u(e);if(a.scrollX||a.scrollY){var o=(r=i.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();ke=!(o.f||o.e),r.remove()}}return ke?(n.x=t.pageX,n.y=t.pageY):(n.x=t.clientX,n.y=t.clientY),[(n=n.matrixTransform(e.getScreenCTM().inverse())).x,n.y]}var l=e.getBoundingClientRect();return[t.clientX-l.left-e.clientLeft,t.clientY-l.top-e.clientTop]}function Le(){return i.event.changedTouches[0].identifier}i.touch=function(e,t,r){if(arguments.length<3&&(r=t,t=V().changedTouches),t)for(var n,a=0,i=t.length;a<i;++a)if((n=t[a]).identifier===r)return Ae(e,n)},i.behavior.drag=function(){var e=U(a,"drag","dragstart","dragend"),t=null,r=o(H,i.mouse,u,"mousemove","mouseup"),n=o(Le,i.touch,z,"touchmove","touchend");function a(){this.on("mousedown.drag",r).on("touchstart.drag",n)}function o(r,n,a,o,l){return function(){var s,c=this,u=i.event.target.correspondingElement||i.event.target,f=c.parentNode,d=e.of(c,arguments),h=0,p=r(),v=".drag"+(null==p?"":"-"+p),g=i.select(a(u)).on(o+v,(function(){var e,t,r=n(f,p);r&&(e=r[0]-m[0],t=r[1]-m[1],h|=e|t,m=r,d({type:"drag",x:r[0]+s[0],y:r[1]+s[1],dx:e,dy:t}))})).on(l+v,(function(){n(f,p)&&(g.on(o+v,null).on(l+v,null),y(h),d({type:"dragend"}))})),y=Me(u),m=n(f,p);s=t?[(s=t.apply(c,arguments)).x-m[0],s.y-m[1]]:[0,0],d({type:"dragstart"})}}return a.origin=function(e){return arguments.length?(t=e,a):t},i.rebind(a,e,"on")},i.touches=function(e,t){return arguments.length<2&&(t=V().touches),t?l(t).map((function(t){var r=Ae(e,t);return r.identifier=t.identifier,r})):[]};var Se=1e-6,De=Se*Se,Oe=Math.PI,Ce=2*Oe,Pe=Ce-Se,Ie=Oe/2,Re=Oe/180,ze=180/Oe;function Ne(e){return e>1?Ie:e<-1?-Ie:Math.asin(e)}function Fe(e){return((e=Math.exp(e))+1/e)/2}var Ee=Math.SQRT2;i.interpolateZoom=function(e,t){var r,n,a=e[0],i=e[1],o=e[2],l=t[0],s=t[1],c=t[2],u=l-a,f=s-i,d=u*u+f*f;if(d<De)n=Math.log(c/o)/Ee,r=function(e){return[a+e*u,i+e*f,o*Math.exp(Ee*e*n)]};else{var h=Math.sqrt(d),p=(c*c-o*o+4*d)/(2*o*2*h),v=(c*c-o*o-4*d)/(2*c*2*h),g=Math.log(Math.sqrt(p*p+1)-p),y=Math.log(Math.sqrt(v*v+1)-v);n=(y-g)/Ee,r=function(e){var t,r=e*n,l=Fe(g),s=o/(2*h)*(l*(t=Ee*r+g,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[a+s*u,i+s*f,o*l/Fe(Ee*r+g)]}}return r.duration=1e3*n,r},i.behavior.zoom=function(){var e,t,r,n,a,o,l,c,f,d={x:0,y:0,k:1},h=[960,500],p=je,v=250,g=0,y="mousedown.zoom",m="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",_=U(w,"zoomstart","zoom","zoomend");function w(e){e.on(y,C).on(Be+".zoom",I).on("dblclick.zoom",R).on(b,P)}function T(e){return[(e[0]-d.x)/d.k,(e[1]-d.y)/d.k]}function M(e){d.k=Math.max(p[0],Math.min(p[1],e))}function k(e,t){t=function(e){return[e[0]*d.k+d.x,e[1]*d.k+d.y]}(t),d.x+=e[0]-t[0],d.y+=e[1]-t[1]}function A(e,r,n,a){e.__chart__={x:d.x,y:d.y,k:d.k},M(Math.pow(2,a)),k(t=r,n),e=i.select(e),v>0&&(e=e.transition().duration(v)),e.call(w.event)}function L(){l&&l.domain(o.range().map((function(e){return(e-d.x)/d.k})).map(o.invert)),f&&f.domain(c.range().map((function(e){return(e-d.y)/d.k})).map(c.invert))}function S(e){g++||e({type:"zoomstart"})}function D(e){L(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function O(e){--g||(e({type:"zoomend"}),t=null)}function C(){var e=this,t=_.of(e,arguments),r=0,n=i.select(u(e)).on(m,(function(){r=1,k(i.mouse(e),a),D(t)})).on(x,(function(){n.on(m,null).on(x,null),o(r),O(t)})),a=T(i.mouse(e)),o=Me(e);Ja.call(e),S(t)}function P(){var e,t=this,r=_.of(t,arguments),n={},o=0,l=".zoom-"+i.event.changedTouches[0].identifier,s="touchmove"+l,c="touchend"+l,u=[],f=i.select(t),h=Me(t);function p(){var r=i.touches(t);return e=d.k,r.forEach((function(e){e.identifier in n&&(n[e.identifier]=T(e))})),r}function v(){var e=i.event.target;i.select(e).on(s,g).on(c,m),u.push(e);for(var r=i.event.changedTouches,l=0,f=r.length;l<f;++l)n[r[l].identifier]=null;var h=p(),v=Date.now();if(1===h.length){if(v-a<500){var y=h[0];A(t,y,n[y.identifier],Math.floor(Math.log(d.k)/Math.LN2)+1),Y()}a=v}else if(h.length>1){y=h[0];var x=h[1],b=y[0]-x[0],_=y[1]-x[1];o=b*b+_*_}}function g(){var l,s,c,u,f=i.touches(t);Ja.call(t);for(var d=0,h=f.length;d<h;++d,u=null)if(c=f[d],u=n[c.identifier]){if(s)break;l=c,s=u}if(u){var p=(p=c[0]-l[0])*p+(p=c[1]-l[1])*p,v=o&&Math.sqrt(p/o);l=[(l[0]+c[0])/2,(l[1]+c[1])/2],s=[(s[0]+u[0])/2,(s[1]+u[1])/2],M(v*e)}a=null,k(l,s),D(r)}function m(){if(i.event.touches.length){for(var e=i.event.changedTouches,t=0,a=e.length;t<a;++t)delete n[e[t].identifier];for(var o in n)return void p()}i.selectAll(u).on(l,null),f.on(y,C).on(b,P),h(),O(r)}v(),S(r),f.on(y,null).on(b,v)}function I(){var a=_.of(this,arguments);n?clearTimeout(n):(Ja.call(this),e=T(t=r||i.mouse(this)),S(a)),n=setTimeout((function(){n=null,O(a)}),50),Y(),M(Math.pow(2,.002*He())*d.k),k(t,e),D(a)}function R(){var e=i.mouse(this),t=Math.log(d.k)/Math.LN2;A(this,e,T(e),i.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}return Be||(Be="onwheel"in s?(He=function(){return-i.event.deltaY*(i.event.deltaMode?120:1)},"wheel"):"onmousewheel"in s?(He=function(){return i.event.wheelDelta},"mousewheel"):(He=function(){return-i.event.detail},"MozMousePixelScroll")),w.event=function(e){e.each((function(){var e=_.of(this,arguments),r=d;$a?i.select(this).transition().each("start.zoom",(function(){d=this.__chart__||{x:0,y:0,k:1},S(e)})).tween("zoom:zoom",(function(){var n=h[0],a=h[1],o=t?t[0]:n/2,l=t?t[1]:a/2,s=i.interpolateZoom([(o-d.x)/d.k,(l-d.y)/d.k,n/d.k],[(o-r.x)/r.k,(l-r.y)/r.k,n/r.k]);return function(t){var r=s(t),a=n/r[2];this.__chart__=d={x:o-r[0]*a,y:l-r[1]*a,k:a},D(e)}})).each("interrupt.zoom",(function(){O(e)})).each("end.zoom",(function(){O(e)})):(this.__chart__=d,S(e),D(e),O(e))}))},w.translate=function(e){return arguments.length?(d={x:+e[0],y:+e[1],k:d.k},L(),w):[d.x,d.y]},w.scale=function(e){return arguments.length?(d={x:d.x,y:d.y,k:null},M(+e),L(),w):d.k},w.scaleExtent=function(e){return arguments.length?(p=null==e?je:[+e[0],+e[1]],w):p},w.center=function(e){return arguments.length?(r=e&&[+e[0],+e[1]],w):r},w.size=function(e){return arguments.length?(h=e&&[+e[0],+e[1]],w):h},w.duration=function(e){return arguments.length?(v=+e,w):v},w.x=function(e){return arguments.length?(l=e,o=e.copy(),d={x:0,y:0,k:1},w):l},w.y=function(e){return arguments.length?(f=e,c=e.copy(),d={x:0,y:0,k:1},w):f},i.rebind(w,_,"on")};var He,Be,je=[0,1/0];function Ye(){}function Ve(e,t,r){return this instanceof Ve?(this.h=+e,this.s=+t,void(this.l=+r)):arguments.length<2?e instanceof Ve?new Ve(e.h,e.s,e.l):ut(""+e,ft,Ve):new Ve(e,t,r)}i.color=Ye,Ye.prototype.toString=function(){return this.rgb()+""},i.hsl=Ve;var Ue=Ve.prototype=new Ye;function qe(e,t,r){var n,a;function i(e){return Math.round(255*function(e){return e>360?e-=360:e<0&&(e+=360),e<60?n+(a-n)*e/60:e<180?a:e<240?n+(a-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(a=r<=.5?r*(1+t):r+t-r*t),new it(i(e+120),i(e),i(e-120))}function Ge(e,t,r){return this instanceof Ge?(this.h=+e,this.c=+t,void(this.l=+r)):arguments.length<2?e instanceof Ge?new Ge(e.h,e.c,e.l):function(e,t,r){return e>0?new Ge(Math.atan2(r,t)*ze,Math.sqrt(t*t+r*r),e):new Ge(NaN,NaN,e)}(e instanceof Xe?e.l:(e=dt((e=i.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Ge(e,t,r)}Ue.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ve(this.h,this.s,this.l/e)},Ue.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ve(this.h,this.s,e*this.l)},Ue.rgb=function(){return qe(this.h,this.s,this.l)},i.hcl=Ge;var Ze=Ge.prototype=new Ye;function We(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Xe(r,Math.cos(e*=Re)*t,Math.sin(e)*t)}function Xe(e,t,r){return this instanceof Xe?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Xe?new Xe(e.l,e.a,e.b):e instanceof Ge?We(e.h,e.c,e.l):dt((e=it(e)).r,e.g,e.b):new Xe(e,t,r)}Ze.brighter=function(e){return new Ge(this.h,this.c,Math.min(100,this.l+Je*(arguments.length?e:1)))},Ze.darker=function(e){return new Ge(this.h,this.c,Math.max(0,this.l-Je*(arguments.length?e:1)))},Ze.rgb=function(){return We(this.h,this.c,this.l).rgb()},i.lab=Xe;var Je=18,Ke=.95047,Qe=1,$e=1.08883,et=Xe.prototype=new Ye;function tt(e,t,r){var n=(e+16)/116,a=n+t/500,i=n-r/200;return new it(at(3.2404542*(a=rt(a)*Ke)-1.5371385*(n=rt(n)*Qe)-.4985314*(i=rt(i)*$e)),at(-.969266*a+1.8760108*n+.041556*i),at(.0556434*a-.2040259*n+1.0572252*i))}function rt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function nt(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function at(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function it(e,t,r){return this instanceof it?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof it?new it(e.r,e.g,e.b):ut(""+e,it,qe):new it(e,t,r)}function ot(e){return new it(e>>16,e>>8&255,255&e)}function lt(e){return ot(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=it;var st=it.prototype=new Ye;function ct(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ut(e,t,r){var n,a,i,o=0,l=0,s=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return t(pt(a[0]),pt(a[1]),pt(a[2]))}return(i=vt.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,r){var n,a,i=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),l=o-i,s=(o+i)/2;return l?(a=s<.5?l/(o+i):l/(2-o-i),n=e==o?(t-r)/l+(t<r?6:0):t==o?(r-e)/l+2:(e-t)/l+4,n*=60):(n=NaN,a=s>0&&s<1?0:n),new Ve(n,a,s)}function dt(e,t,r){var n=nt((.4124564*(e=ht(e))+.3575761*(t=ht(t))+.1804375*(r=ht(r)))/Ke),a=nt((.2126729*e+.7151522*t+.072175*r)/Qe);return Xe(116*a-16,500*(n-a),200*(a-nt((.0193339*e+.119192*t+.9503041*r)/$e)))}function ht(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}st.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,a=30;return t||r||n?(t&&t<a&&(t=a),r&&r<a&&(r=a),n&&n<a&&(n=a),new it(Math.min(255,t/e),Math.min(255,r/e),Math.min(255,n/e))):new it(a,a,a)},st.darker=function(e){return new it((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},st.hsl=function(){return ft(this.r,this.g,this.b)},st.toString=function(){return"#"+ct(this.r)+ct(this.g)+ct(this.b)};var vt=i.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function gt(e){return"function"==typeof e?e:function(){return e}}function yt(e){return function(t,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),mt(t,r,e,n)}}function mt(e,t,r,n){var a={},o=i.dispatch("beforesend","progress","load","error"),s={},c=new XMLHttpRequest,u=null;function f(){var e,t=c.status;if(!t&&function(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}(c)||t>=200&&t<300||304===t){try{e=r.call(a,c)}catch(e){return void o.error.call(a,e)}o.load.call(a,e)}else o.error.call(a,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(e)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=f:c.onreadystatechange=function(){c.readyState>3&&f()},c.onprogress=function(e){var t=i.event;i.event=e;try{o.progress.call(a,c)}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?(u=e,a):u},a.response=function(e){return r=e,a},["get","post"].forEach((function(e){a[e]=function(){return a.send.apply(a,[e].concat(l(arguments)))}})),a.send=function(r,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),c.open(r,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),c.setRequestHeader)for(var l in s)c.setRequestHeader(l,s[l]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=u&&(c.responseType=u),null!=i&&a.on("error",i).on("load",(function(e){i(null,e)})),o.beforesend.call(a,c),c.send(null==n?null:n),a},a.abort=function(){return c.abort(),a},i.rebind(a,o,"on"),null==n?a:a.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(n))}vt.forEach((function(e,t){vt.set(e,ot(t))})),i.functor=gt,i.xhr=yt(z),i.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function a(e,r,n){arguments.length<3&&(n=r,r=null);var a=mt(e,t,null==r?i:o(r),n);return a.row=function(e){return arguments.length?a.response(null==(r=e)?i:o(e)):r},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 r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return a.parse=function(e,t){var r;return a.parseRows(e,(function(e,n){if(r)return r(e,n-1);var a=function(t){for(var r={},n=e.length,a=0;a<n;++a)r[e[a]]=t[a];return r};r=t?function(e,r){return t(a(e),r)}:a}))},a.parseRows=function(e,t){var r,a,i={},o={},l=[],s=e.length,c=0,u=0;function f(){if(c>=s)return o;if(a)return a=!1,i;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++<s;)if(34===e.charCodeAt(r)){if(34!==e.charCodeAt(r+1))break;++r}return c=r+2,13===(l=e.charCodeAt(r+1))?(a=!0,10===e.charCodeAt(r+2)&&++c):10===l&&(a=!0),e.slice(t+1,r).replace(/""/g,'"')}for(;c<s;){var l,u=1;if(10===(l=e.charCodeAt(c++)))a=!0;else if(13===l)a=!0,10===e.charCodeAt(c)&&(++c,++u);else if(l!==n)continue;return e.slice(t,c-u)}return e.slice(t)}for(;(r=f())!==o;){for(var d=[];r!==i&&r!==o;)d.push(r),r=f();t&&null==(d=t(d,u++))||l.push(d)}return l},a.format=function(t){if(Array.isArray(t[0]))return a.formatRows(t);var r=new R,n=[];return t.forEach((function(e){for(var t in e)r.has(t)||n.push(r.add(t))})),[n.map(s).join(e)].concat(t.map((function(t){return n.map((function(e){return s(t[e])})).join(e)}))).join("\n")},a.formatRows=function(e){return e.map(l).join("\n")},a},i.csv=i.dsv(",","text/csv"),i.tsv=i.dsv("\t","text/tab-separated-values");var xt,bt,_t,wt,Tt=this[F(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};function Mt(e,t,r){var n=arguments.length;n<2&&(t=0),n<3&&(r=Date.now());var a={c:e,t:r+t,n:null};return bt?bt.n=a:xt=a,bt=a,_t||(wt=clearTimeout(wt),_t=1,Tt(kt)),a}function kt(){var e=At(),t=Lt()-e;t>24?(isFinite(t)&&(clearTimeout(wt),wt=setTimeout(kt,t)),_t=0):(_t=1,Tt(kt))}function At(){for(var e=Date.now(),t=xt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Lt(){for(var e,t=xt,r=1/0;t;)t.c?(t.t<r&&(r=t.t),t=(e=t).n):t=e?e.n=t.n:xt=t.n;return bt=e,r}function St(e){return e[0]}function Dt(e){return e[1]}function Ot(e){for(var t,r,n,a=e.length,i=[0,1],o=2,l=2;l<a;l++){for(;o>1&&(t=e[i[o-2]],r=e[i[o-1]],n=e[l],(r[0]-t[0])*(n[1]-t[1])-(r[1]-t[1])*(n[0]-t[0])<=0);)--o;i[o++]=l}return i.slice(0,o)}function Ct(e,t){return e[0]-t[0]||e[1]-t[1]}i.timer=function(){Mt.apply(this,arguments)},i.timer.flush=function(){At(),Lt()},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=St,r=Dt;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,a=gt(t),i=gt(r),o=e.length,l=[],s=[];for(n=0;n<o;n++)l.push([+a.call(this,e[n],n),+i.call(this,e[n],n),n]);for(l.sort(Ct),n=0;n<o;n++)s.push([l[n][0],-l[n][1]]);var c=Ot(l),u=Ot(s),f=u[0]===c[0],d=u[u.length-1]===c[c.length-1],h=[];for(n=c.length-1;n>=0;--n)h.push(e[l[c[n]][2]]);for(n=+f;n<u.length-d;++n)h.push(e[l[u[n]][2]]);return h}return n.x=function(e){return arguments.length?(t=e,n):t},n.y=function(e){return arguments.length?(r=e,n):r},n},i.geom.polygon=function(e){return G(e,Pt),e};var Pt=i.geom.polygon.prototype=[];function It(e,t,r){return(r[0]-t[0])*(e[1]-t[1])<(r[1]-t[1])*(e[0]-t[0])}function Rt(e,t,r,n){var a=e[0],i=r[0],o=t[0]-a,l=n[0]-i,s=e[1],c=r[1],u=t[1]-s,f=n[1]-c,d=(l*(s-c)-f*(a-i))/(f*o-l*u);return[a+d*o,s+d*u]}function zt(e){var t=e[0],r=e[e.length-1];return!(t[0]-r[0]||t[1]-r[1])}Pt.area=function(){for(var e,t=-1,r=this.length,n=this[r-1],a=0;++t<r;)e=n,n=this[t],a+=e[1]*n[0]-e[0]*n[1];return.5*a},Pt.centroid=function(e){var t,r,n=-1,a=this.length,i=0,o=0,l=this[a-1];for(arguments.length||(e=-1/(6*this.area()));++n<a;)t=l,l=this[n],r=t[0]*l[1]-l[0]*t[1],i+=(t[0]+l[0])*r,o+=(t[1]+l[1])*r;return[i*e,o*e]},Pt.clip=function(e){for(var t,r,n,a,i,o,l=zt(e),s=-1,c=this.length-zt(this),u=this[c-1];++s<c;){for(t=e.slice(),e.length=0,a=this[s],i=t[(n=t.length-l)-1],r=-1;++r<n;)It(o=t[r],u,a)?(It(i,u,a)||e.push(Rt(i,o,u,a)),e.push(o)):It(i,u,a)&&e.push(Rt(i,o,u,a)),i=o;l&&e.push(e[0]),u=a}return e};var Nt,Ft,Et,Ht,Bt,jt=[],Yt=[];function Vt(){lr(this),this.edge=this.site=this.circle=null}function Ut(e){var t=jt.pop()||new Vt;return t.site=e,t}function qt(e){er(e),Et.remove(e),jt.push(e),lr(e)}function Gt(e){var t=e.circle,r=t.x,n=t.cy,a={x:r,y:n},i=e.P,o=e.N,l=[e];qt(e);for(var s=i;s.circle&&w(r-s.circle.x)<Se&&w(n-s.circle.cy)<Se;)i=s.P,l.unshift(s),qt(s),s=i;l.unshift(s),er(s);for(var c=o;c.circle&&w(r-c.circle.x)<Se&&w(n-c.circle.cy)<Se;)o=c.N,l.push(c),qt(c),c=o;l.push(c),er(c);var u,f=l.length;for(u=1;u<f;++u)c=l[u],s=l[u-1],ar(c.edge,s.site,c.site,a);s=l[0],(c=l[f-1]).edge=nr(s.site,c.site,null,a),$t(s),$t(c)}function Zt(e){for(var t,r,n,a,i=e.x,o=e.y,l=Et._;l;)if((n=Wt(l,o)-i)>Se)l=l.L;else{if(!((a=i-Xt(l,o))>Se)){n>-Se?(t=l.P,r=l):a>-Se?(t=l,r=l.N):t=r=l;break}if(!l.R){t=l;break}l=l.R}var s=Ut(e);if(Et.insert(t,s),t||r){if(t===r)return er(t),r=Ut(t.site),Et.insert(s,r),s.edge=r.edge=nr(t.site,s.site),$t(t),void $t(r);if(r){er(t),er(r);var c=t.site,u=c.x,f=c.y,d=e.x-u,h=e.y-f,p=r.site,v=p.x-u,g=p.y-f,y=2*(d*g-h*v),m=d*d+h*h,x=v*v+g*g,b={x:(g*m-h*x)/y+u,y:(d*x-v*m)/y+f};ar(r.edge,c,p,b),s.edge=nr(c,e,null,b),r.edge=nr(e,p,null,b),$t(t),$t(r)}else s.edge=nr(t.site,s.site)}}function Wt(e,t){var r=e.site,n=r.x,a=r.y,i=a-t;if(!i)return n;var o=e.P;if(!o)return-1/0;var l=(r=o.site).x,s=r.y,c=s-t;if(!c)return l;var u=l-n,f=1/i-1/c,d=u/c;return f?(-d+Math.sqrt(d*d-2*f*(u*u/(-2*c)-s+c/2+a-i/2)))/f+n:(n+l)/2}function Xt(e,t){var r=e.N;if(r)return Wt(r,t);var n=e.site;return n.y===t?n.x:1/0}function Jt(e){this.site=e,this.edges=[]}function Kt(e,t){return t.angle-e.angle}function Qt(){lr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $t(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,a=e.site,i=r.site;if(n!==i){var o=a.x,l=a.y,s=n.x-o,c=n.y-l,u=i.x-o,f=2*(s*(g=i.y-l)-c*u);if(!(f>=-De)){var d=s*s+c*c,h=u*u+g*g,p=(g*d-c*h)/f,v=(s*h-u*d)/f,g=v+l,y=Yt.pop()||new Qt;y.arc=e,y.site=a,y.x=p+o,y.y=g+Math.sqrt(p*p+v*v),y.cy=g,e.circle=y;for(var m=null,x=Bt._;x;)if(y.y<x.y||y.y===x.y&&y.x<=x.x){if(!x.L){m=x.P;break}x=x.L}else{if(!x.R){m=x;break}x=x.R}Bt.insert(m,y),m||(Ht=y)}}}}function er(e){var t=e.circle;t&&(t.P||(Ht=t.N),Bt.remove(t),Yt.push(t),lr(t),e.circle=null)}function tr(e,t){var r=e.b;if(r)return!0;var n,a,i=e.a,o=t[0][0],l=t[1][0],s=t[0][1],c=t[1][1],u=e.l,f=e.r,d=u.x,h=u.y,p=f.x,v=f.y,g=(d+p)/2,y=(h+v)/2;if(v===h){if(g<o||g>=l)return;if(d>p){if(i){if(i.y>=c)return}else i={x:g,y:s};r={x:g,y:c}}else{if(i){if(i.y<s)return}else i={x:g,y:c};r={x:g,y:s}}}else if(a=y-(n=(d-p)/(v-h))*g,n<-1||n>1)if(d>p){if(i){if(i.y>=c)return}else i={x:(s-a)/n,y:s};r={x:(c-a)/n,y:c}}else{if(i){if(i.y<s)return}else i={x:(c-a)/n,y:c};r={x:(s-a)/n,y:s}}else if(h<v){if(i){if(i.x>=l)return}else i={x:o,y:n*o+a};r={x:l,y:n*l+a}}else{if(i){if(i.x<o)return}else i={x:l,y:n*l+a};r={x:o,y:n*o+a}}return e.a=i,e.b=r,!0}function rr(e,t){this.l=e,this.r=t,this.a=this.b=null}function nr(e,t,r,n){var a=new rr(e,t);return Nt.push(a),r&&ar(a,e,t,r),n&&ar(a,t,e,n),Ft[e.i].edges.push(new ir(a,e,t)),Ft[t.i].edges.push(new ir(a,t,e)),a}function ar(e,t,r,n){e.a||e.b?e.l===r?e.b=n:e.a=n:(e.a=n,e.l=t,e.r=r)}function ir(e,t,r){var n=e.a,a=e.b;this.edge=e,this.site=t,this.angle=r?Math.atan2(r.y-t.y,r.x-t.x):e.l===t?Math.atan2(a.x-n.x,n.y-a.y):Math.atan2(n.x-a.x,a.y-n.y)}function or(){this._=null}function lr(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function sr(e,t){var r=t,n=t.R,a=r.U;a?a.L===r?a.L=n:a.R=n:e._=n,n.U=a,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function cr(e,t){var r=t,n=t.L,a=r.U;a?a.L===r?a.L=n:a.R=n:e._=n,n.U=a,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function ur(e){for(;e.L;)e=e.L;return e}function fr(e,t){var r,n,a,i=e.sort(dr).pop();for(Nt=[],Ft=new Array(e.length),Et=new or,Bt=new or;;)if(a=Ht,i&&(!a||i.y<a.y||i.y===a.y&&i.x<a.x))i.x===r&&i.y===n||(Ft[i.i]=new Jt(i),Zt(i),r=i.x,n=i.y),i=e.pop();else{if(!a)break;Gt(a.arc)}t&&(function(e){for(var t,r,n,a,i,o=Nt,l=(r=e[0][0],n=e[0][1],a=e[1][0],i=e[1][1],function(e){var t,o=e.a,l=e.b,s=o.x,c=o.y,u=0,f=1,d=l.x-s,h=l.y-c;if(t=r-s,d||!(t>0)){if(t/=d,d<0){if(t<u)return;t<f&&(f=t)}else if(d>0){if(t>f)return;t>u&&(u=t)}if(t=a-s,d||!(t<0)){if(t/=d,d<0){if(t>f)return;t>u&&(u=t)}else if(d>0){if(t<u)return;t<f&&(f=t)}if(t=n-c,h||!(t>0)){if(t/=h,h<0){if(t<u)return;t<f&&(f=t)}else if(h>0){if(t>f)return;t>u&&(u=t)}if(t=i-c,h||!(t<0)){if(t/=h,h<0){if(t>f)return;t>u&&(u=t)}else if(h>0){if(t<u)return;t<f&&(f=t)}return u>0&&(e.a={x:s+u*d,y:c+u*h}),f<1&&(e.b={x:s+f*d,y:c+f*h}),e}}}}}),s=o.length;s--;)(!tr(t=o[s],e)||!l(t)||w(t.a.x-t.b.x)<Se&&w(t.a.y-t.b.y)<Se)&&(t.a=t.b=null,o.splice(s,1))}(t),function(e){for(var t,r,n,a,i,o,l,s,c,u,f=e[0][0],d=e[1][0],h=e[0][1],p=e[1][1],v=Ft,g=v.length;g--;)if((i=v[g])&&i.prepare())for(s=(l=i.edges).length,o=0;o<s;)n=(u=l[o].end()).x,a=u.y,t=(c=l[++o%s].start()).x,r=c.y,(w(n-t)>Se||w(a-r)>Se)&&(l.splice(o,0,new ir((y=i.site,m=u,x=w(n-f)<Se&&p-a>Se?{x:f,y:w(t-f)<Se?r:p}:w(a-p)<Se&&d-n>Se?{x:w(r-p)<Se?t:d,y:p}:w(n-d)<Se&&a-h>Se?{x:d,y:w(t-d)<Se?r:h}:w(a-h)<Se&&n-f>Se?{x:w(r-h)<Se?t:f,y:h}:null,b=void 0,(b=new rr(y,null)).a=m,b.b=x,Nt.push(b),b),i.site,null)),++s);var y,m,x,b}(t));var o={cells:Ft,edges:Nt};return Et=Bt=Nt=Ft=null,o}function dr(e,t){return t.y-e.y||t.x-e.x}Jt.prototype.prepare=function(){for(var e,t=this.edges,r=t.length;r--;)(e=t[r].edge).b&&e.a||t.splice(r,1);return t.sort(Kt),t.length},ir.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},or.prototype={insert:function(e,t){var r,n,a;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=ur(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)r===(n=r.U).L?(a=n.R)&&a.C?(r.C=a.C=!1,n.C=!0,e=n):(e===r.R&&(sr(this,r),r=(e=r).U),r.C=!1,n.C=!0,cr(this,n)):(a=n.L)&&a.C?(r.C=a.C=!1,n.C=!0,e=n):(e===r.L&&(cr(this,r),r=(e=r).U),r.C=!1,n.C=!0,sr(this,n)),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,r,n,a=e.U,i=e.L,o=e.R;if(r=i?o?ur(o):i:o,a?a.L===e?a.L=r:a.R=r:this._=r,i&&o?(n=r.C,r.C=e.C,r.L=i,i.U=r,r!==o?(a=r.U,r.U=e.U,e=r.R,a.L=e,r.R=o,o.U=r):(r.U=a,a=r,e=r.R)):(n=e.C,e=r),e&&(e.U=a),!n)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===a.L){if((t=a.R).C&&(t.C=!1,a.C=!0,sr(this,a),t=a.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,cr(this,t),t=a.R),t.C=a.C,a.C=t.R.C=!1,sr(this,a),e=this._;break}}else if((t=a.L).C&&(t.C=!1,a.C=!0,cr(this,a),t=a.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,sr(this,t),t=a.L),t.C=a.C,a.C=t.L.C=!1,cr(this,a),e=this._;break}t.C=!0,e=a,a=a.U}while(!e.C);e&&(e.C=!1)}}},i.geom.voronoi=function(e){var t=St,r=Dt,n=t,a=r,i=hr;if(e)return o(e);function o(e){var t=new Array(e.length),r=i[0][0],n=i[0][1],a=i[1][0],o=i[1][1];return fr(l(e),i).cells.forEach((function(i,l){var s=i.edges,c=i.site;(t[l]=s.length?s.map((function(e){var t=e.start();return[t.x,t.y]})):c.x>=r&&c.x<=a&&c.y>=n&&c.y<=o?[[r,o],[a,o],[a,n],[r,n]]:[]).point=e[l]})),t}function l(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/Se)*Se,y:Math.round(a(e,t)/Se)*Se,i:t}}))}return o.links=function(e){return fr(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 fr(l(e)).cells.forEach((function(r,n){for(var a,i,o,l,s=r.site,c=r.edges.sort(Kt),u=-1,f=c.length,d=c[f-1].edge,h=d.l===s?d.r:d.l;++u<f;)a=h,h=(d=c[u].edge).l===s?d.r:d.l,n<a.i&&n<h.i&&(o=a,l=h,((i=s).x-l.x)*(o.y-i.y)-(i.x-o.x)*(l.y-i.y)<0)&&t.push([e[n],e[a.i],e[h.i]])})),t},o.x=function(e){return arguments.length?(n=gt(t=e),o):t},o.y=function(e){return arguments.length?(a=gt(r=e),o):r},o.clipExtent=function(e){return arguments.length?(i=null==e?hr:e,o):i===hr?null:i},o.size=function(e){return arguments.length?o.clipExtent(e&&[[0,0],e]):i===hr?null:i&&i[1]},o};var hr=[[-1e6,-1e6],[1e6,1e6]];function pr(e){return e.x}function vr(e){return e.y}function gr(e,t,r,n,a,i){if(!e(t,r,n,a,i)){var o=.5*(r+a),l=.5*(n+i),s=t.nodes;s[0]&&gr(e,s[0],r,n,o,l),s[1]&&gr(e,s[1],o,n,a,l),s[2]&&gr(e,s[2],r,l,o,i),s[3]&&gr(e,s[3],o,l,a,i)}}function yr(e,t){e=i.rgb(e),t=i.rgb(t);var r=e.r,n=e.g,a=e.b,o=t.r-r,l=t.g-n,s=t.b-a;return function(e){return"#"+ct(Math.round(r+o*e))+ct(Math.round(n+l*e))+ct(Math.round(a+s*e))}}function mr(e,t){var r,n={},a={};for(r in e)r in t?n[r]=Tr(e[r],t[r]):a[r]=e[r];for(r in t)r in e||(a[r]=t[r]);return function(e){for(r in n)a[r]=n[r](e);return a}}function xr(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function br(e,t){var r,n,a,i=_r.lastIndex=wr.lastIndex=0,o=-1,l=[],s=[];for(e+="",t+="";(r=_r.exec(e))&&(n=wr.exec(t));)(a=n.index)>i&&(a=t.slice(i,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(n=n[0])?l[o]?l[o]+=n:l[++o]=n:(l[++o]=null,s.push({i:o,x:xr(r,n)})),i=wr.lastIndex;return i<t.length&&(a=t.slice(i),l[o]?l[o]+=a:l[++o]=a),l.length<2?s[0]?(t=s[0].x,function(e){return t(e)+""}):function(){return t}:(t=s.length,function(e){for(var r,n=0;n<t;++n)l[(r=s[n]).i]=r.x(e);return l.join("")})}i.geom.delaunay=function(e){return i.geom.voronoi().triangles(e)},i.geom.quadtree=function(e,t,r,n,a){var i,o=St,l=Dt;if(i=arguments.length)return o=pr,l=vr,3===i&&(a=r,n=t,r=t=0),s(e);function s(e){var s,c,u,f,d,h,p,v,g,y=gt(o),m=gt(l);if(null!=t)h=t,p=r,v=n,g=a;else if(v=g=-(h=p=1/0),c=[],u=[],d=e.length,i)for(f=0;f<d;++f)(s=e[f]).x<h&&(h=s.x),s.y<p&&(p=s.y),s.x>v&&(v=s.x),s.y>g&&(g=s.y),c.push(s.x),u.push(s.y);else for(f=0;f<d;++f){var x=+y(s=e[f],f),b=+m(s,f);x<h&&(h=x),b<p&&(p=b),x>v&&(v=x),b>g&&(g=b),c.push(x),u.push(b)}var _=v-h,T=g-p;function M(e,t,r,n,a,i,o,l){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var s=e.x,c=e.y;if(null!=s)if(w(s-r)+w(c-n)<.01)k(e,t,r,n,a,i,o,l);else{var u=e.point;e.x=e.y=e.point=null,k(e,u,s,c,a,i,o,l),k(e,t,r,n,a,i,o,l)}else e.x=r,e.y=n,e.point=t}else k(e,t,r,n,a,i,o,l)}function k(e,t,r,n,a,i,o,l){var s=.5*(a+o),c=.5*(i+l),u=r>=s,f=n>=c,d=f<<1|u;e.leaf=!1,u?a=s:o=s,f?i=c:l=c,M(e=e.nodes[d]||(e.nodes[d]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,a,i,o,l)}_>T?g=p+_:v=h+T;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){M(A,e,+y(e,++f),+m(e,f),h,p,v,g)}};if(A.visit=function(e){gr(e,A,h,p,v,g)},A.find=function(e){return function(e,t,r,n,a,i,o){var l,s=1/0;return function e(c,u,f,d,h){if(!(u>i||f>o||d<n||h<a)){if(p=c.point){var p,v=t-c.x,g=r-c.y,y=v*v+g*g;if(y<s){var m=Math.sqrt(s=y);n=t-m,a=r-m,i=t+m,o=r+m,l=p}}for(var x=c.nodes,b=.5*(u+d),_=.5*(f+h),w=(r>=_)<<1|t>=b,T=w+4;w<T;++w)if(c=x[3&w])switch(3&w){case 0:e(c,u,f,b,_);break;case 1:e(c,b,f,d,_);break;case 2:e(c,u,_,b,h);break;case 3:e(c,b,_,d,h)}}}(e,n,a,i,o),l}(A,e[0],e[1],h,p,v,g)},f=-1,null==t){for(;++f<d;)M(A,e[f],c[f],u[f],h,p,v,g);--f}else e.forEach(A.add);return c=u=e=s=null,A}return s.x=function(e){return arguments.length?(o=e,s):o},s.y=function(e){return arguments.length?(l=e,s):l},s.extent=function(e){return arguments.length?(null==e?t=r=n=a=null:(t=+e[0][0],r=+e[0][1],n=+e[1][0],a=+e[1][1]),s):null==t?null:[[t,r],[n,a]]},s.size=function(e){return arguments.length?(null==e?t=r=n=a=null:(t=r=0,n=+e[0],a=+e[1]),s):null==t?null:[n-t,a-r]},s},i.interpolateRgb=yr,i.interpolateObject=mr,i.interpolateNumber=xr,i.interpolateString=br;var _r=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wr=new RegExp(_r.source,"g");function Tr(e,t){for(var r,n=i.interpolators.length;--n>=0&&!(r=i.interpolators[n](e,t)););return r}function Mr(e,t){var r,n=[],a=[],i=e.length,o=t.length,l=Math.min(e.length,t.length);for(r=0;r<l;++r)n.push(Tr(e[r],t[r]));for(;r<i;++r)a[r]=e[r];for(;r<o;++r)a[r]=t[r];return function(e){for(r=0;r<l;++r)a[r]=n[r](e);return a}}i.interpolate=Tr,i.interpolators=[function(e,t){var r=typeof t;return("string"===r?vt.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?yr:br:t instanceof Ye?yr:Array.isArray(t)?Mr:"object"===r&&isNaN(t)?mr:xr)(e,t)}],i.interpolateArray=Mr;var kr=function(){return z},Ar=i.map({linear:kr,poly:function(e){return function(t){return Math.pow(t,e)}},quad:function(){return Or},cubic:function(){return Cr},sin:function(){return Ir},exp:function(){return Rr},circle:function(){return zr},elastic:function(e,t){var r;return arguments.length<2&&(t=.45),arguments.length?r=t/Ce*Math.asin(1/e):(e=1,r=t/4),function(n){return 1+e*Math.pow(2,-10*n)*Math.sin((n-r)*Ce/t)}},back:function(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}},bounce:function(){return Nr}}),Lr=i.map({in:z,out:Sr,"in-out":Dr,"out-in":function(e){return Dr(Sr(e))}});function Sr(e){return function(t){return 1-e(1-t)}}function Dr(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Or(e){return e*e}function Cr(e){return e*e*e}function Pr(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function Ir(e){return 1-Math.cos(e*Ie)}function Rr(e){return Math.pow(2,10*(e-1))}function zr(e){return 1-Math.sqrt(1-e*e)}function Nr(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 Fr(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function Er(e){var t,r,n,a=[e.a,e.b],i=[e.c,e.d],o=Br(a),l=Hr(a,i),s=Br(((t=i)[0]+=(n=-l)*(r=a)[0],t[1]+=n*r[1],t))||0;a[0]*i[1]<i[0]*a[1]&&(a[0]*=-1,a[1]*=-1,o*=-1,l*=-1),this.rotate=(o?Math.atan2(a[1],a[0]):Math.atan2(-i[0],i[1]))*ze,this.translate=[e.e,e.f],this.scale=[o,s],this.skew=s?Math.atan2(l,s)*ze:0}function Hr(e,t){return e[0]*t[0]+e[1]*t[1]}function Br(e){var t=Math.sqrt(Hr(e,e));return t&&(e[0]/=t,e[1]/=t),t}i.ease=function(e){var t,r=e.indexOf("-"),n=r>=0?e.slice(0,r):e,a=r>=0?e.slice(r+1):"in";return n=Ar.get(n)||kr,a=Lr.get(a)||z,t=a(n.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 r=e.h,n=e.c,a=e.l,o=t.h-r,l=t.c-n,s=t.l-a;return isNaN(l)&&(l=0,n=isNaN(n)?t.c:n),isNaN(o)?(o=0,r=isNaN(r)?t.h:r):o>180?o-=360:o<-180&&(o+=360),function(e){return We(r+o*e,n+l*e,a+s*e)+""}},i.interpolateHsl=function(e,t){e=i.hsl(e),t=i.hsl(t);var r=e.h,n=e.s,a=e.l,o=t.h-r,l=t.s-n,s=t.l-a;return isNaN(l)&&(l=0,n=isNaN(n)?t.s:n),isNaN(o)?(o=0,r=isNaN(r)?t.h:r):o>180?o-=360:o<-180&&(o+=360),function(e){return qe(r+o*e,n+l*e,a+s*e)+""}},i.interpolateLab=function(e,t){e=i.lab(e),t=i.lab(t);var r=e.l,n=e.a,a=e.b,o=t.l-r,l=t.a-n,s=t.b-a;return function(e){return tt(r+o*e,n+l*e,a+s*e)+""}},i.interpolateRound=Fr,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 r=t.transform.baseVal.consolidate()}return new Er(r?r.matrix:jr)})(e)},Er.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var jr={a:1,b:0,c:0,d:1,e:0,f:0};function Yr(e){return e.length?e.pop()+",":""}function Vr(e,t){var r=[],n=[];return e=i.transform(e),t=i.transform(t),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push("translate(",null,",",null,")");n.push({i:a-4,x:xr(e[0],t[0])},{i:a-2,x:xr(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(e.translate,t.translate,r,n),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Yr(r)+"rotate(",null,")")-2,x:xr(e,t)})):t&&r.push(Yr(r)+"rotate("+t+")")}(e.rotate,t.rotate,r,n),function(e,t,r,n){e!==t?n.push({i:r.push(Yr(r)+"skewX(",null,")")-2,x:xr(e,t)}):t&&r.push(Yr(r)+"skewX("+t+")")}(e.skew,t.skew,r,n),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push(Yr(r)+"scale(",null,",",null,")");n.push({i:a-4,x:xr(e[0],t[0])},{i:a-2,x:xr(e[1],t[1])})}else 1===t[0]&&1===t[1]||r.push(Yr(r)+"scale("+t+")")}(e.scale,t.scale,r,n),e=t=null,function(e){for(var t,a=-1,i=n.length;++a<i;)r[(t=n[a]).i]=t.x(e);return r.join("")}}function Ur(e,t){return t=(t-=e=+e)||1/t,function(r){return(r-e)/t}}function qr(e,t){return t=(t-=e=+e)||1/t,function(r){return Math.max(0,Math.min(1,(r-e)/t))}}function Gr(e){for(var t=e.source,r=e.target,n=function(e,t){if(e===t)return e;for(var r=Zr(e),n=Zr(t),a=r.pop(),i=n.pop(),o=null;a===i;)o=a,a=r.pop(),i=n.pop();return o}(t,r),a=[t];t!==n;)t=t.parent,a.push(t);for(var i=a.length;r!==n;)a.splice(i,0,r),r=r.parent;return a}function Zr(e){for(var t=[],r=e.parent;null!=r;)t.push(e),e=r,r=r.parent;return t.push(e),t}function Wr(e){e.fixed|=2}function Xr(e){e.fixed&=-7}function Jr(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Kr(e){e.fixed&=-5}function Qr(e,t,r){var n=0,a=0;if(e.charge=0,!e.leaf)for(var i,o=e.nodes,l=o.length,s=-1;++s<l;)null!=(i=o[s])&&(Qr(i,t,r),e.charge+=i.charge,n+=i.charge*i.cx,a+=i.charge*i.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var c=t*r[e.point.index];e.charge+=e.pointCharge=c,n+=c*e.point.x,a+=c*e.point.y}e.cx=n/e.charge,e.cy=a/e.charge}i.interpolateTransform=Vr,i.layout={},i.layout.bundle=function(){return function(e){for(var t=[],r=-1,n=e.length;++r<n;)t.push(Gr(e[r]));return t}},i.layout.chord=function(){var e,t,r,n,a,o,l,s={},c=0;function u(){var s,u,d,h,p,v={},g=[],y=i.range(n),m=[];for(e=[],t=[],s=0,h=-1;++h<n;){for(u=0,p=-1;++p<n;)u+=r[h][p];g.push(u),m.push(i.range(n)),s+=u}for(a&&y.sort((function(e,t){return a(g[e],g[t])})),o&&m.forEach((function(e,t){e.sort((function(e,n){return o(r[t][e],r[t][n])}))})),s=(Ce-c*n)/s,u=0,h=-1;++h<n;){for(d=u,p=-1;++p<n;){var x=y[h],b=m[x][p],_=r[x][b],w=u,T=u+=_*s;v[x+"-"+b]={index:x,subindex:b,startAngle:w,endAngle:T,value:_}}t[x]={index:x,startAngle:d,endAngle:u,value:g[x]},u+=c}for(h=-1;++h<n;)for(p=h-1;++p<n;){var M=v[h+"-"+p],k=v[p+"-"+h];(M.value||k.value)&&e.push(M.value<k.value?{source:k,target:M}:{source:M,target:k})}l&&f()}function f(){e.sort((function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)}))}return s.matrix=function(a){return arguments.length?(n=(r=a)&&r.length,e=t=null,s):r},s.padding=function(r){return arguments.length?(c=r,e=t=null,s):c},s.sortGroups=function(r){return arguments.length?(a=r,e=t=null,s):a},s.sortSubgroups=function(t){return arguments.length?(o=t,e=null,s):o},s.sortChords=function(t){return arguments.length?(l=t,e&&f(),s):l},s.chords=function(){return e||u(),e},s.groups=function(){return t||u(),t},s},i.layout.force=function(){var e,t,r,n,a,o,l={},s=i.dispatch("start","tick","end"),c=[1,1],u=.9,f=$r,d=en,h=-30,p=tn,v=.1,g=.64,y=[],m=[];function x(e){return function(t,r,n,a){if(t.point!==e){var i=t.cx-e.x,o=t.cy-e.y,l=a-r,s=i*i+o*o;if(l*l/g<s){if(s<p){var c=t.charge/s;e.px-=i*c,e.py-=o*c}return!0}t.point&&s&&s<p&&(c=t.pointCharge/s,e.px-=i*c,e.py-=o*c)}return!t.charge}}function b(e){e.px=i.event.x,e.py=i.event.y,l.resume()}return l.tick=function(){if((r*=.99)<.005)return e=null,s.end({type:"end",alpha:r=0}),!0;var t,l,f,d,p,g,b,_,w,T=y.length,M=m.length;for(l=0;l<M;++l)d=(f=m[l]).source,(g=(_=(p=f.target).x-d.x)*_+(w=p.y-d.y)*w)&&(_*=g=r*a[l]*((g=Math.sqrt(g))-n[l])/g,w*=g,p.x-=_*(b=d.weight+p.weight?d.weight/(d.weight+p.weight):.5),p.y-=w*b,d.x+=_*(b=1-b),d.y+=w*b);if((b=r*v)&&(_=c[0]/2,w=c[1]/2,l=-1,b))for(;++l<T;)(f=y[l]).x+=(_-f.x)*b,f.y+=(w-f.y)*b;if(h)for(Qr(t=i.geom.quadtree(y),r,o),l=-1;++l<T;)(f=y[l]).fixed||t.visit(x(f));for(l=-1;++l<T;)(f=y[l]).fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*u,f.y-=(f.py-(f.py=f.y))*u);s.tick({type:"tick",alpha:r})},l.nodes=function(e){return arguments.length?(y=e,l):y},l.links=function(e){return arguments.length?(m=e,l):m},l.size=function(e){return arguments.length?(c=e,l):c},l.linkDistance=function(e){return arguments.length?(f="function"==typeof e?e:+e,l):f},l.distance=l.linkDistance,l.linkStrength=function(e){return arguments.length?(d="function"==typeof e?e:+e,l):d},l.friction=function(e){return arguments.length?(u=+e,l):u},l.charge=function(e){return arguments.length?(h="function"==typeof e?e:+e,l):h},l.chargeDistance=function(e){return arguments.length?(p=e*e,l):Math.sqrt(p)},l.gravity=function(e){return arguments.length?(v=+e,l):v},l.theta=function(e){return arguments.length?(g=e*e,l):Math.sqrt(g)},l.alpha=function(t){return arguments.length?(t=+t,r?t>0?r=t:(e.c=null,e.t=NaN,e=null,s.end({type:"end",alpha:r=0})):t>0&&(s.start({type:"start",alpha:r=t}),e=Mt(l.tick)),l):r},l.start=function(){var e,t,r,i=y.length,s=m.length,u=c[0],p=c[1];for(e=0;e<i;++e)(r=y[e]).index=e,r.weight=0;for(e=0;e<s;++e)"number"==typeof(r=m[e]).source&&(r.source=y[r.source]),"number"==typeof r.target&&(r.target=y[r.target]),++r.source.weight,++r.target.weight;for(e=0;e<i;++e)r=y[e],isNaN(r.x)&&(r.x=v("x",u)),isNaN(r.y)&&(r.y=v("y",p)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(n=[],"function"==typeof f)for(e=0;e<s;++e)n[e]=+f.call(this,m[e],e);else for(e=0;e<s;++e)n[e]=f;if(a=[],"function"==typeof d)for(e=0;e<s;++e)a[e]=+d.call(this,m[e],e);else for(e=0;e<s;++e)a[e]=d;if(o=[],"function"==typeof h)for(e=0;e<i;++e)o[e]=+h.call(this,y[e],e);else for(e=0;e<i;++e)o[e]=h;function v(r,n){if(!t){for(t=new Array(i),c=0;c<i;++c)t[c]=[];for(c=0;c<s;++c){var a=m[c];t[a.source.index].push(a.target),t[a.target.index].push(a.source)}}for(var o,l=t[e],c=-1,u=l.length;++c<u;)if(!isNaN(o=l[c][r]))return o;return Math.random()*n}return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){if(t||(t=i.behavior.drag().origin(z).on("dragstart.force",Wr).on("drag.force",b).on("dragend.force",Xr)),!arguments.length)return t;this.on("mouseover.force",Jr).on("mouseout.force",Kr).call(t)},i.rebind(l,s,"on")};var $r=20,en=1,tn=1/0;function rn(e,t){return i.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=cn,e}function nn(e,t){for(var r=[e];null!=(e=r.pop());)if(t(e),(a=e.children)&&(n=a.length))for(var n,a;--n>=0;)r.push(a[n])}function an(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(i=e.children)&&(a=i.length))for(var a,i,o=-1;++o<a;)r.push(i[o]);for(;null!=(e=n.pop());)t(e)}function on(e){return e.children}function ln(e){return e.value}function sn(e,t){return t.value-e.value}function cn(e){return i.merge(e.map((function(e){return(e.children||[]).map((function(t){return{source:e,target:t}}))})))}i.layout.hierarchy=function(){var e=sn,t=on,r=ln;function n(a){var i,o=[a],l=[];for(a.depth=0;null!=(i=o.pop());)if(l.push(i),(c=t.call(n,i,i.depth))&&(s=c.length)){for(var s,c,u;--s>=0;)o.push(u=c[s]),u.parent=i,u.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return an(a,(function(t){var n,a;e&&(n=t.children)&&n.sort(e),r&&(a=t.parent)&&(a.value+=t.value)})),l}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(nn(e,(function(e){e.children&&(e.value=0)})),an(e,(function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},n},i.layout.partition=function(){var e=i.layout.hierarchy(),t=[1,1];function r(e,t,n,a){var i=e.children;if(e.x=t,e.y=e.depth*a,e.dx=n,e.dy=a,i&&(o=i.length)){var o,l,s,c=-1;for(n=e.value?n/e.value:0;++c<o;)r(l=i[c],t,s=l.value*n,a),t+=s}}function n(e){var t=e.children,r=0;if(t&&(a=t.length))for(var a,i=-1;++i<a;)r=Math.max(r,n(t[i]));return 1+r}function a(a,i){var o=e.call(this,a,i);return r(o[0],0,t[0],t[1]/n(o[0])),o}return a.size=function(e){return arguments.length?(t=e,a):t},rn(a,e)},i.layout.pie=function(){var e=Number,t=un,r=0,n=Ce,a=0;function o(l){var s,c=l.length,u=l.map((function(t,r){return+e.call(o,t,r)})),f=+("function"==typeof r?r.apply(this,arguments):r),d=("function"==typeof n?n.apply(this,arguments):n)-f,h=Math.min(Math.abs(d)/c,+("function"==typeof a?a.apply(this,arguments):a)),p=h*(d<0?-1:1),v=i.sum(u),g=v?(d-c*p)/v:0,y=i.range(c),m=[];return null!=t&&y.sort(t===un?function(e,t){return u[t]-u[e]}:function(e,r){return t(l[e],l[r])}),y.forEach((function(e){m[e]={data:l[e],value:s=u[e],startAngle:f,endAngle:f+=s*g+p,padAngle:h}})),m}return o.value=function(t){return arguments.length?(e=t,o):e},o.sort=function(e){return arguments.length?(t=e,o):t},o.startAngle=function(e){return arguments.length?(r=e,o):r},o.endAngle=function(e){return arguments.length?(n=e,o):n},o.padAngle=function(e){return arguments.length?(a=e,o):a},o};var un={};function fn(e){return e.x}function dn(e){return e.y}function hn(e,t,r){e.y0=t,e.y=r}i.layout.stack=function(){var e=z,t=gn,r=yn,n=hn,a=fn,o=dn;function l(s,c){if(!(h=s.length))return s;var u=s.map((function(t,r){return e.call(l,t,r)})),f=u.map((function(e){return e.map((function(e,t){return[a.call(l,e,t),o.call(l,e,t)]}))})),d=t.call(l,f,c);u=i.permute(u,d),f=i.permute(f,d);var h,p,v,g,y=r.call(l,f,c),m=u[0].length;for(v=0;v<m;++v)for(n.call(l,u[0][v],g=y[v],f[0][v][1]),p=1;p<h;++p)n.call(l,u[p][v],g+=f[p-1][v][1],f[p][v][1]);return s}return l.values=function(t){return arguments.length?(e=t,l):e},l.order=function(e){return arguments.length?(t="function"==typeof e?e:pn.get(e)||gn,l):t},l.offset=function(e){return arguments.length?(r="function"==typeof e?e:vn.get(e)||yn,l):r},l.x=function(e){return arguments.length?(a=e,l):a},l.y=function(e){return arguments.length?(o=e,l):o},l.out=function(e){return arguments.length?(n=e,l):n},l};var pn=i.map({"inside-out":function(e){var t,r,n=e.length,a=e.map(mn),o=e.map(xn),l=i.range(n).sort((function(e,t){return a[e]-a[t]})),s=0,c=0,u=[],f=[];for(t=0;t<n;++t)r=l[t],s<c?(s+=o[r],u.push(r)):(c+=o[r],f.push(r));return f.reverse().concat(u)},reverse:function(e){return i.range(e.length).reverse()},default:gn}),vn=i.map({silhouette:function(e){var t,r,n,a=e.length,i=e[0].length,o=[],l=0,s=[];for(r=0;r<i;++r){for(t=0,n=0;t<a;t++)n+=e[t][r][1];n>l&&(l=n),o.push(n)}for(r=0;r<i;++r)s[r]=(l-o[r])/2;return s},wiggle:function(e){var t,r,n,a,i,o,l,s,c,u=e.length,f=e[0],d=f.length,h=[];for(h[0]=s=c=0,r=1;r<d;++r){for(t=0,a=0;t<u;++t)a+=e[t][r][1];for(t=0,i=0,l=f[r][0]-f[r-1][0];t<u;++t){for(n=0,o=(e[t][r][1]-e[t][r-1][1])/(2*l);n<t;++n)o+=(e[n][r][1]-e[n][r-1][1])/l;i+=o*e[t][r][1]}h[r]=s-=a?i/a*l:0,s<c&&(c=s)}for(r=0;r<d;++r)h[r]-=c;return h},expand:function(e){var t,r,n,a=e.length,i=e[0].length,o=1/a,l=[];for(r=0;r<i;++r){for(t=0,n=0;t<a;t++)n+=e[t][r][1];if(n)for(t=0;t<a;t++)e[t][r][1]/=n;else for(t=0;t<a;t++)e[t][r][1]=o}for(r=0;r<i;++r)l[r]=0;return l},zero:yn});function gn(e){return i.range(e.length)}function yn(e){for(var t=-1,r=e[0].length,n=[];++t<r;)n[t]=0;return n}function mn(e){for(var t,r=1,n=0,a=e[0][1],i=e.length;r<i;++r)(t=e[r][1])>a&&(n=r,a=t);return n}function xn(e){return e.reduce(bn,0)}function bn(e,t){return e+t[1]}function _n(e,t){return wn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function wn(e,t){for(var r=-1,n=+e[0],a=(e[1]-n)/t,i=[];++r<=t;)i[r]=a*r+n;return i}function Tn(e){return[i.min(e),i.max(e)]}function Mn(e,t){return e.value-t.value}function kn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function An(e,t){e._pack_next=t,t._pack_prev=e}function Ln(e,t){var r=t.x-e.x,n=t.y-e.y,a=e.r+t.r;return.999*a*a>r*r+n*n}function Sn(e){if((t=e.children)&&(s=t.length)){var t,r,n,a,i,o,l,s,c=1/0,u=-1/0,f=1/0,d=-1/0;if(t.forEach(Dn),(r=t[0]).x=-r.r,r.y=0,x(r),s>1&&((n=t[1]).x=n.r,n.y=0,x(n),s>2))for(Pn(r,n,a=t[2]),x(a),kn(r,a),r._pack_prev=a,kn(a,n),n=r._pack_next,i=3;i<s;i++){Pn(r,n,a=t[i]);var h=0,p=1,v=1;for(o=n._pack_next;o!==n;o=o._pack_next,p++)if(Ln(o,a)){h=1;break}if(1==h)for(l=r._pack_prev;l!==o._pack_prev&&!Ln(l,a);l=l._pack_prev,v++);h?(p<v||p==v&&n.r<r.r?An(r,n=o):An(r=l,n),i--):(kn(r,a),n=a,x(a))}var g=(c+u)/2,y=(f+d)/2,m=0;for(i=0;i<s;i++)(a=t[i]).x-=g,a.y-=y,m=Math.max(m,a.r+Math.sqrt(a.x*a.x+a.y*a.y));e.r=m,t.forEach(On)}function x(e){c=Math.min(e.x-e.r,c),u=Math.max(e.x+e.r,u),f=Math.min(e.y-e.r,f),d=Math.max(e.y+e.r,d)}}function Dn(e){e._pack_next=e._pack_prev=e}function On(e){delete e._pack_next,delete e._pack_prev}function Cn(e,t,r,n){var a=e.children;if(e.x=t+=n*e.x,e.y=r+=n*e.y,e.r*=n,a)for(var i=-1,o=a.length;++i<o;)Cn(a[i],t,r,n)}function Pn(e,t,r){var n=e.r+r.r,a=t.x-e.x,i=t.y-e.y;if(n&&(a||i)){var o=t.r+r.r,l=a*a+i*i,s=.5+((n*=n)-(o*=o))/(2*l),c=Math.sqrt(Math.max(0,2*o*(n+l)-(n-=l)*n-o*o))/(2*l);r.x=e.x+s*a+c*i,r.y=e.y+s*i-c*a}else r.x=e.x+n,r.y=e.y}function In(e,t){return e.parent==t.parent?1:2}function Rn(e){var t=e.children;return t.length?t[0]:e.t}function zn(e){var t,r=e.children;return(t=r.length)?r[t-1]:e.t}function Nn(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function Fn(e,t,r){return e.a.parent===t.parent?e.a:r}function En(e){var t=e.children;return t&&t.length?En(t[0]):e}function Hn(e){var t,r=e.children;return r&&(t=r.length)?Hn(r[t-1]):e}function Bn(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function jn(e,t){var r=e.x+t[3],n=e.y+t[0],a=e.dx-t[1]-t[3],i=e.dy-t[0]-t[2];return a<0&&(r+=a/2,a=0),i<0&&(n+=i/2,i=0),{x:r,y:n,dx:a,dy:i}}function Yn(e){var t=e[0],r=e[e.length-1];return t<r?[t,r]:[r,t]}function Vn(e){return e.rangeExtent?e.rangeExtent():Yn(e.range())}function Un(e,t,r,n){var a=r(e[0],e[1]),i=n(t[0],t[1]);return function(e){return i(a(e))}}function qn(e,t){var r,n=0,a=e.length-1,i=e[n],o=e[a];return o<i&&(r=n,n=a,a=r,r=i,i=o,o=r),e[n]=t.floor(i),e[a]=t.ceil(o),e}function Gn(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Zn}i.layout.histogram=function(){var e=!0,t=Number,r=Tn,n=_n;function a(a,o){for(var l,s,c=[],u=a.map(t,this),f=r.call(this,u,o),d=n.call(this,f,u,o),h=(o=-1,u.length),p=d.length-1,v=e?1:1/h;++o<p;)(l=c[o]=[]).dx=d[o+1]-(l.x=d[o]),l.y=0;if(p>0)for(o=-1;++o<h;)(s=u[o])>=f[0]&&s<=f[1]&&((l=c[i.bisect(d,s,1,p)-1]).y+=v,l.push(a[o]));return c}return a.value=function(e){return arguments.length?(t=e,a):t},a.range=function(e){return arguments.length?(r=gt(e),a):r},a.bins=function(e){return arguments.length?(n="number"==typeof e?function(t){return wn(t,e)}:gt(e),a):n},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},i.layout.pack=function(){var e,t=i.layout.hierarchy().sort(Mn),r=0,n=[1,1];function a(a,i){var o=t.call(this,a,i),l=o[0],s=n[0],c=n[1],u=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(l.x=l.y=0,an(l,(function(e){e.r=+u(e.value)})),an(l,Sn),r){var f=r*(e?1:Math.max(2*l.r/s,2*l.r/c))/2;an(l,(function(e){e.r+=f})),an(l,Sn),an(l,(function(e){e.r-=f}))}return Cn(l,s/2,c/2,e?1:1/Math.max(2*l.r/s,2*l.r/c)),o}return a.size=function(e){return arguments.length?(n=e,a):n},a.radius=function(t){return arguments.length?(e=null==t||"function"==typeof t?t:+t,a):e},a.padding=function(e){return arguments.length?(r=+e,a):r},rn(a,t)},i.layout.tree=function(){var e=i.layout.hierarchy().sort(null).value(null),t=In,r=[1,1],n=null;function a(a,i){var c=e.call(this,a,i),u=c[0],f=function(e){for(var t,r={A:null,children:[e]},n=[r];null!=(t=n.pop());)for(var a,i=t.children,o=0,l=i.length;o<l;++o)n.push((i[o]=a={_:i[o],parent:t,children:(a=i[o].children)&&a.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=a);return r.children[0]}(u);if(an(f,o),f.parent.m=-f.z,nn(f,l),n)nn(u,s);else{var d=u,h=u,p=u;nn(u,(function(e){e.x<d.x&&(d=e),e.x>h.x&&(h=e),e.depth>p.depth&&(p=e)}));var v=t(d,h)/2-d.x,g=r[0]/(h.x+t(h,d)/2+v),y=r[1]/(p.depth||1);nn(u,(function(e){e.x=(e.x+v)*g,e.y=e.depth*y}))}return c}function o(e){var r=e.children,n=e.parent.children,a=e.i?n[e.i-1]:null;if(r.length){!function(e){for(var t,r=0,n=0,a=e.children,i=a.length;--i>=0;)(t=a[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var i=(r[0].z+r[r.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,r,n){if(r){for(var a,i=e,o=e,l=r,s=i.parent.children[0],c=i.m,u=o.m,f=l.m,d=s.m;l=zn(l),i=Rn(i),l&&i;)s=Rn(s),(o=zn(o)).a=e,(a=l.z+f-i.z-c+t(l._,i._))>0&&(Nn(Fn(l,e,n),e,a),c+=a,u+=a),f+=l.m,c+=i.m,d+=s.m,u+=o.m;l&&!zn(o)&&(o.t=l,o.m+=f-u),i&&!Rn(s)&&(s.t=i,s.m+=c-d,n=e)}return n}(e,a,e.parent.A||n[0])}function l(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=r[0],e.y=e.depth*r[1]}return a.separation=function(e){return arguments.length?(t=e,a):t},a.size=function(e){return arguments.length?(n=null==(r=e)?s:null,a):n?null:r},a.nodeSize=function(e){return arguments.length?(n=null==(r=e)?null:s,a):n?r:null},rn(a,e)},i.layout.cluster=function(){var e=i.layout.hierarchy().sort(null).value(null),t=In,r=[1,1],n=!1;function a(a,o){var l,s=e.call(this,a,o),c=s[0],u=0;an(c,(function(e){var r=e.children;r&&r.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(r),e.y=function(e){return 1+i.max(e,(function(e){return e.y}))}(r)):(e.x=l?u+=t(e,l):0,e.y=0,l=e)}));var f=En(c),d=Hn(c),h=f.x-t(f,d)/2,p=d.x+t(d,f)/2;return an(c,n?function(e){e.x=(e.x-c.x)*r[0],e.y=(c.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(p-h)*r[0],e.y=(1-(c.y?e.y/c.y:1))*r[1]}),s}return a.separation=function(e){return arguments.length?(t=e,a):t},a.size=function(e){return arguments.length?(n=null==(r=e),a):n?null:r},a.nodeSize=function(e){return arguments.length?(n=null!=(r=e),a):n?r:null},rn(a,e)},i.layout.treemap=function(){var e,t=i.layout.hierarchy(),r=Math.round,n=[1,1],a=null,o=Bn,l=!1,s="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,n,a=-1,i=e.length;++a<i;)n=(r=e[a]).value*(t<0?0:t),r.area=isNaN(n)||n<=0?0:n}function f(e){var t=e.children;if(t&&t.length){var r,n,a,i=o(e),l=[],c=t.slice(),d=1/0,v="slice"===s?i.dx:"dice"===s?i.dy:"slice-dice"===s?1&e.depth?i.dy:i.dx:Math.min(i.dx,i.dy);for(u(c,i.dx*i.dy/e.value),l.area=0;(a=c.length)>0;)l.push(r=c[a-1]),l.area+=r.area,"squarify"!==s||(n=h(l,v))<=d?(c.pop(),d=n):(l.area-=l.pop().area,p(l,v,i,!1),v=Math.min(i.dx,i.dy),l.length=l.area=0,d=1/0);l.length&&(p(l,v,i,!0),l.length=l.area=0),t.forEach(f)}}function d(e){var t=e.children;if(t&&t.length){var r,n=o(e),a=t.slice(),i=[];for(u(a,n.dx*n.dy/e.value),i.area=0;r=a.pop();)i.push(r),i.area+=r.area,null!=r.z&&(p(i,r.z?n.dx:n.dy,n,!a.length),i.length=i.area=0);t.forEach(d)}}function h(e,t){for(var r,n=e.area,a=0,i=1/0,o=-1,l=e.length;++o<l;)(r=e[o].area)&&(r<i&&(i=r),r>a&&(a=r));return t*=t,(n*=n)?Math.max(t*a*c/n,n/(t*i*c)):1/0}function p(e,t,n,a){var i,o=-1,l=e.length,s=n.x,c=n.y,u=t?r(e.area/t):0;if(t==n.dx){for((a||u>n.dy)&&(u=n.dy);++o<l;)(i=e[o]).x=s,i.y=c,i.dy=u,s+=i.dx=Math.min(n.x+n.dx-s,u?r(i.area/u):0);i.z=!0,i.dx+=n.x+n.dx-s,n.y+=u,n.dy-=u}else{for((a||u>n.dx)&&(u=n.dx);++o<l;)(i=e[o]).x=s,i.y=c,i.dx=u,c+=i.dy=Math.min(n.y+n.dy-c,u?r(i.area/u):0);i.z=!1,i.dy+=n.y+n.dy-c,n.x+=u,n.dx-=u}}function v(r){var a=e||t(r),i=a[0];return i.x=i.y=0,i.value?(i.dx=n[0],i.dy=n[1]):i.dx=i.dy=0,e&&t.revalue(i),u([i],i.dx*i.dy/i.value),(e?d:f)(i),l&&(e=a),a}return v.size=function(e){return arguments.length?(n=e,v):n},v.padding=function(e){if(!arguments.length)return a;function t(t){return jn(t,e)}var r;return o=null==(a=e)?Bn:"function"==(r=typeof e)?function(t){var r=e.call(v,t,t.depth);return null==r?Bn(t):jn(t,"number"==typeof r?[r,r,r,r]:r)}:"number"===r?(e=[e,e,e,e],t):t,v},v.round=function(e){return arguments.length?(r=e?Math.round:Number,v):r!=Number},v.sticky=function(t){return arguments.length?(l=t,e=null,v):l},v.ratio=function(e){return arguments.length?(c=e,v):c},v.mode=function(e){return arguments.length?(s=e+"",v):s},rn(v,t)},i.random={normal:function(e,t){var r=arguments.length;return r<2&&(t=1),r<1&&(e=0),function(){var r,n,a;do{a=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!a||a>1);return e+t*r*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,r=0;r<e;r++)t+=Math.random();return t}}},i.scale={};var Zn={floor:z,ceil:z};function Wn(e,t,r,n){var a=[],o=[],l=0,s=Math.min(e.length,t.length)-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<=s;)a.push(r(e[l-1],e[l])),o.push(n(t[l-1],t[l]));return function(t){var r=i.bisect(e,t,1,s)-1;return o[r](a[r](t))}}function Xn(e,t,r,n){var a,i;function o(){var o=Math.min(e.length,t.length)>2?Wn:Un,s=n?qr:Ur;return a=o(e,t,s,r),i=o(t,e,s,Tr),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(Fr)},l.clamp=function(e){return arguments.length?(n=e,o()):n},l.interpolate=function(e){return arguments.length?(r=e,o()):r},l.ticks=function(t){return $n(e,t)},l.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},l.nice=function(t){return Kn(e,t),o()},l.copy=function(){return Xn(e,t,r,n)},o()}function Jn(e,t){return i.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Kn(e,t){return qn(e,Gn(Qn(e,t)[2])),qn(e,Gn(Qn(e,t)[2])),e}function Qn(e,t){null==t&&(t=10);var r=Yn(e),n=r[1]-r[0],a=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),i=t/n*a;return i<=.15?a*=10:i<=.35?a*=5:i<=.75&&(a*=2),r[0]=Math.ceil(r[0]/a)*a,r[1]=Math.floor(r[1]/a)*a+.5*a,r[2]=a,r}function $n(e,t){return i.range.apply(i,Qn(e,t))}function ea(e,t,r,n){function a(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function i(e){return r?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?(r=t[0]>=0,e.domain((n=t.map(Number)).map(a)),o):n},o.base=function(r){return arguments.length?(t=+r,e.domain(n.map(a)),o):t},o.nice=function(){var t=qn(n.map(a),r?Math:ta);return e.domain(t),n=t.map(i),o},o.ticks=function(){var e=Yn(n),o=[],l=e[0],s=e[1],c=Math.floor(a(l)),u=Math.ceil(a(s)),f=t%1?2:t;if(isFinite(u-c)){if(r){for(;c<u;c++)for(var d=1;d<f;d++)o.push(i(c)*d);o.push(i(c))}else for(o.push(i(c));c++<u;)for(d=f-1;d>0;d--)o.push(i(c)*d);for(c=0;o[c]<l;c++);for(u=o.length;o[u-1]>s;u--);o=o.slice(c,u)}return o},o.copy=function(){return ea(e.copy(),t,r,n)},Jn(o,e)}i.scale.linear=function(){return Xn([0,1],[0,1],Tr,!1)},i.scale.log=function(){return ea(i.scale.linear().domain([0,1]),10,!0,[1,10])};var ta={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function ra(e,t,r){var n=na(t),a=na(1/t);function i(t){return e(n(t))}return i.invert=function(t){return a(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain((r=t.map(Number)).map(n)),i):r},i.ticks=function(e){return $n(r,e)},i.tickFormat=function(e,t){return d3_scale_linearTickFormat(r,e,t)},i.nice=function(e){return i.domain(Kn(r,e))},i.exponent=function(o){return arguments.length?(n=na(t=o),a=na(1/t),e.domain(r.map(n)),i):t},i.copy=function(){return ra(e.copy(),t,r)},Jn(i,e)}function na(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function aa(e,t){var r,n,a;function o(a){return n[((r.get(a)||("range"===t.t?r.set(a,e.push(a)):NaN))-1)%n.length]}function l(t,r){return i.range(e.length).map((function(e){return t+r*e}))}return o.domain=function(n){if(!arguments.length)return e;e=[],r=new M;for(var a,i=-1,l=n.length;++i<l;)r.has(a=n[i])||r.set(a,e.push(a));return o[t.t].apply(o,t.a)},o.range=function(e){return arguments.length?(n=e,a=0,t={t:"range",a:arguments},o):n},o.rangePoints=function(r,i){arguments.length<2&&(i=0);var s=r[0],c=r[1],u=e.length<2?(s=(s+c)/2,0):(c-s)/(e.length-1+i);return n=l(s+u*i/2,u),a=0,t={t:"rangePoints",a:arguments},o},o.rangeRoundPoints=function(r,i){arguments.length<2&&(i=0);var s=r[0],c=r[1],u=e.length<2?(s=c=Math.round((s+c)/2),0):(c-s)/(e.length-1+i)|0;return n=l(s+Math.round(u*i/2+(c-s-(e.length-1+i)*u)/2),u),a=0,t={t:"rangeRoundPoints",a:arguments},o},o.rangeBands=function(r,i,s){arguments.length<2&&(i=0),arguments.length<3&&(s=i);var c=r[1]<r[0],u=r[c-0],f=(r[1-c]-u)/(e.length-i+2*s);return n=l(u+f*s,f),c&&n.reverse(),a=f*(1-i),t={t:"rangeBands",a:arguments},o},o.rangeRoundBands=function(r,i,s){arguments.length<2&&(i=0),arguments.length<3&&(s=i);var c=r[1]<r[0],u=r[c-0],f=r[1-c],d=Math.floor((f-u)/(e.length-i+2*s));return n=l(u+Math.round((f-u-(e.length-i)*d)/2),d),c&&n.reverse(),a=Math.round(d*(1-i)),t={t:"rangeRoundBands",a:arguments},o},o.rangeBand=function(){return a},o.rangeExtent=function(){return Yn(t.a[0])},o.copy=function(){return aa(e,t)},o.domain(e)}i.scale.pow=function(){return ra(i.scale.linear(),1,[0,1])},i.scale.sqrt=function(){return i.scale.pow().exponent(.5)},i.scale.ordinal=function(){return aa([],{t:"range",a:[[]]})},i.scale.category10=function(){return i.scale.ordinal().range(ia)},i.scale.category20=function(){return i.scale.ordinal().range(oa)},i.scale.category20b=function(){return i.scale.ordinal().range(la)},i.scale.category20c=function(){return i.scale.ordinal().range(sa)};var ia=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(lt),oa=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(lt),la=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(lt),sa=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(lt);function ca(e,t){var r;function n(){var n=0,o=t.length;for(r=[];++n<o;)r[n-1]=i.quantile(e,n/o);return a}function a(e){if(!isNaN(e=+e))return t[i.bisect(r,e)]}return a.domain=function(t){return arguments.length?(e=t.map(y).filter(m).sort(g),n()):e},a.range=function(e){return arguments.length?(t=e,n()):t},a.quantiles=function(){return r},a.invertExtent=function(n){return(n=t.indexOf(n))<0?[NaN,NaN]:[n>0?r[n-1]:e[0],n<r.length?r[n]:e[e.length-1]]},a.copy=function(){return ca(e,t)},n()}function ua(e,t,r){var n,a;function i(t){return r[Math.max(0,Math.min(a,Math.floor(n*(t-e))))]}function o(){return n=r.length/(t-e),a=r.length-1,i}return i.domain=function(r){return arguments.length?(e=+r[0],t=+r[r.length-1],o()):[e,t]},i.range=function(e){return arguments.length?(r=e,o()):r},i.invertExtent=function(t){return[t=(t=r.indexOf(t))<0?NaN:t/n+e,t+1/n]},i.copy=function(){return ua(e,t,r)},o()}function fa(e,t){function r(r){if(r<=r)return t[i.bisect(e,r)]}return r.domain=function(t){return arguments.length?(e=t,r):e},r.range=function(e){return arguments.length?(t=e,r):t},r.invertExtent=function(r){return r=t.indexOf(r),[e[r-1],e[r]]},r.copy=function(){return fa(e,t)},r}function da(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(r){return arguments.length?(e=r.map(t),t):e},t.ticks=function(t){return $n(e,t)},t.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},t.copy=function(){return da(e)},t}function ha(){return 0}i.scale.quantile=function(){return ca([],[])},i.scale.quantize=function(){return ua(0,1,[0,1])},i.scale.threshold=function(){return fa([.5],[0,1])},i.scale.identity=function(){return da([0,1])},i.svg={},i.svg.arc=function(){var e=va,t=ga,r=ha,n=pa,a=ya,i=ma,o=xa;function l(){var l=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+t.apply(this,arguments)),u=a.apply(this,arguments)-Ie,f=i.apply(this,arguments)-Ie,d=Math.abs(f-u),h=u>f?0:1;if(c<l&&(p=c,c=l,l=p),d>=Pe)return s(c,h)+(l?s(l,1-h):"")+"Z";var p,v,g,y,m,x,b,_,w,T,M,k,A=0,L=0,S=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=n===pa?Math.sqrt(l*l+c*c):+n.apply(this,arguments),h||(L*=-1),c&&(L=Ne(g/c*Math.sin(y))),l&&(A=Ne(g/l*Math.sin(y)))),c){m=c*Math.cos(u+L),x=c*Math.sin(u+L),b=c*Math.cos(f-L),_=c*Math.sin(f-L);var D=Math.abs(f-u-2*L)<=Oe?0:1;if(L&&ba(m,x,b,_)===h^D){var O=(u+f)/2;m=c*Math.cos(O),x=c*Math.sin(O),b=_=null}}else m=x=0;if(l){w=l*Math.cos(f-A),T=l*Math.sin(f-A),M=l*Math.cos(u+A),k=l*Math.sin(u+A);var C=Math.abs(u-f+2*A)<=Oe?0:1;if(A&&ba(w,T,M,k)===1-h^C){var P=(u+f)/2;w=l*Math.cos(P),T=l*Math.sin(P),M=k=null}}else w=T=0;if(d>Se&&(p=Math.min(Math.abs(c-l)/2,+r.apply(this,arguments)))>.001){v=l<c^h?0:1;var I=p,R=p;if(d<Oe){var z=null==M?[w,T]:null==b?[m,x]:Rt([m,x],[M,k],[b,_],[w,T]),N=m-z[0],F=x-z[1],E=b-z[0],H=_-z[1],B=1/Math.sin(Math.acos((N*E+F*H)/(Math.sqrt(N*N+F*F)*Math.sqrt(E*E+H*H)))/2),j=Math.sqrt(z[0]*z[0]+z[1]*z[1]);R=Math.min(p,(l-j)/(B-1)),I=Math.min(p,(c-j)/(B+1))}if(null!=b){var Y=_a(null==M?[w,T]:[M,k],[m,x],c,I,h),V=_a([b,_],[w,T],c,I,h);p===I?S.push("M",Y[0],"A",I,",",I," 0 0,",v," ",Y[1],"A",c,",",c," 0 ",1-h^ba(Y[1][0],Y[1][1],V[1][0],V[1][1]),",",h," ",V[1],"A",I,",",I," 0 0,",v," ",V[0]):S.push("M",Y[0],"A",I,",",I," 0 1,",v," ",V[0])}else S.push("M",m,",",x);if(null!=M){var U=_a([m,x],[M,k],l,-R,h),q=_a([w,T],null==b?[m,x]:[b,_],l,-R,h);p===R?S.push("L",q[0],"A",R,",",R," 0 0,",v," ",q[1],"A",l,",",l," 0 ",h^ba(q[1][0],q[1][1],U[1][0],U[1][1]),",",1-h," ",U[1],"A",R,",",R," 0 0,",v," ",U[0]):S.push("L",q[0],"A",R,",",R," 0 0,",v," ",U[0])}else S.push("L",w,",",T)}else S.push("M",m,",",x),null!=b&&S.push("A",c,",",c," 0 ",D,",",h," ",b,",",_),S.push("L",w,",",T),null!=M&&S.push("A",l,",",l," 0 ",C,",",1-h," ",M,",",k);return S.push("Z"),S.join("")}function s(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}return l.innerRadius=function(t){return arguments.length?(e=gt(t),l):e},l.outerRadius=function(e){return arguments.length?(t=gt(e),l):t},l.cornerRadius=function(e){return arguments.length?(r=gt(e),l):r},l.padRadius=function(e){return arguments.length?(n=e==pa?pa:gt(e),l):n},l.startAngle=function(e){return arguments.length?(a=gt(e),l):a},l.endAngle=function(e){return arguments.length?(i=gt(e),l):i},l.padAngle=function(e){return arguments.length?(o=gt(e),l):o},l.centroid=function(){var r=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,n=(+a.apply(this,arguments)+ +i.apply(this,arguments))/2-Ie;return[Math.cos(n)*r,Math.sin(n)*r]},l};var pa="auto";function va(e){return e.innerRadius}function ga(e){return e.outerRadius}function ya(e){return e.startAngle}function ma(e){return e.endAngle}function xa(e){return e&&e.padAngle}function ba(e,t,r,n){return(e-r)*t-(t-n)*e>0?0:1}function _a(e,t,r,n,a){var i=e[0]-t[0],o=e[1]-t[1],l=(a?n:-n)/Math.sqrt(i*i+o*o),s=l*o,c=-l*i,u=e[0]+s,f=e[1]+c,d=t[0]+s,h=t[1]+c,p=(u+d)/2,v=(f+h)/2,g=d-u,y=h-f,m=g*g+y*y,x=r-n,b=u*h-d*f,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*m-b*b)),w=(b*y-g*_)/m,T=(-b*g-y*_)/m,M=(b*y+g*_)/m,k=(-b*g+y*_)/m,A=w-p,L=T-v,S=M-p,D=k-v;return A*A+L*L>S*S+D*D&&(w=M,T=k),[[w-s,T-c],[w*r/x,T*r/x]]}function wa(){return!0}function Ta(e){var t=St,r=Dt,n=wa,a=ka,i=a.key,o=.7;function l(i){var l,s=[],c=[],u=-1,f=i.length,d=gt(t),h=gt(r);function p(){s.push("M",a(e(c),o))}for(;++u<f;)n.call(this,l=i[u],u)?c.push([+d.call(this,l,u),+h.call(this,l,u)]):c.length&&(p(),c=[]);return c.length&&p(),s.length?s.join(""):null}return l.x=function(e){return arguments.length?(t=e,l):t},l.y=function(e){return arguments.length?(r=e,l):r},l.defined=function(e){return arguments.length?(n=e,l):n},l.interpolate=function(e){return arguments.length?(i="function"==typeof e?a=e:(a=Ma.get(e)||ka).key,l):i},l.tension=function(e){return arguments.length?(o=e,l):o},l}i.svg.line=function(){return Ta(z)};var Ma=i.map({linear:ka,"linear-closed":Aa,step:function(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t<r;)a.push("H",(n[0]+(n=e[t])[0])/2,"V",n[1]);return r>1&&a.push("H",n[0]),a.join("")},"step-before":La,"step-after":Sa,basis:Ca,"basis-open":function(e){if(e.length<4)return ka(e);for(var t,r=[],n=-1,a=e.length,i=[0],o=[0];++n<3;)t=e[n],i.push(t[0]),o.push(t[1]);for(r.push(Pa(za,i)+","+Pa(za,o)),--n;++n<a;)t=e[n],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),Na(r,i,o);return r.join("")},"basis-closed":function(e){for(var t,r,n=-1,a=e.length,i=a+4,o=[],l=[];++n<4;)r=e[n%a],o.push(r[0]),l.push(r[1]);for(t=[Pa(za,o),",",Pa(za,l)],--n;++n<i;)r=e[n%a],o.shift(),o.push(r[0]),l.shift(),l.push(r[1]),Na(t,o,l);return t.join("")},bundle:function(e,t){var r=e.length-1;if(r)for(var n,a,i=e[0][0],o=e[0][1],l=e[r][0]-i,s=e[r][1]-o,c=-1;++c<=r;)a=c/r,(n=e[c])[0]=t*n[0]+(1-t)*(i+a*l),n[1]=t*n[1]+(1-t)*(o+a*s);return Ca(e)},cardinal:function(e,t){return e.length<3?ka(e):e[0]+Da(e,Oa(e,t))},"cardinal-open":function(e,t){return e.length<4?ka(e):e[1]+Da(e.slice(1,-1),Oa(e,t))},"cardinal-closed":function(e,t){return e.length<3?Aa(e):e[0]+Da((e.push(e[0]),e),Oa([e[e.length-2]].concat(e,[e[1]]),t))},monotone:function(e){return e.length<3?ka(e):e[0]+Da(e,function(e){for(var t,r,n,a,i=[],o=function(e){for(var t=0,r=e.length-1,n=[],a=e[0],i=e[1],o=n[0]=Fa(a,i);++t<r;)n[t]=(o+(o=Fa(a=i,i=e[t+1])))/2;return n[t]=o,n}(e),l=-1,s=e.length-1;++l<s;)t=Fa(e[l],e[l+1]),w(t)<Se?o[l]=o[l+1]=0:(a=(r=o[l]/t)*r+(n=o[l+1]/t)*n)>9&&(a=3*t/Math.sqrt(a),o[l]=a*r,o[l+1]=a*n);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 ka(e){return e.length>1?e.join("L"):e+"Z"}function Aa(e){return e.join("L")+"Z"}function La(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t<r;)a.push("V",(n=e[t])[1],"H",n[0]);return a.join("")}function Sa(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t<r;)a.push("H",(n=e[t])[0],"V",n[1]);return a.join("")}function Da(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return ka(e);var r=e.length!=t.length,n="",a=e[0],i=e[1],o=t[0],l=o,s=1;if(r&&(n+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],a=e[1],s=2),t.length>1){l=t[1],i=e[s],s++,n+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-l[0])+","+(i[1]-l[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,s++)i=e[s],l=t[c],n+="S"+(i[0]-l[0])+","+(i[1]-l[1])+","+i[0]+","+i[1]}if(r){var u=e[s];n+="Q"+(i[0]+2*l[0]/3)+","+(i[1]+2*l[1]/3)+","+u[0]+","+u[1]}return n}function Oa(e,t){for(var r,n=[],a=(1-t)/2,i=e[0],o=e[1],l=1,s=e.length;++l<s;)r=i,i=o,o=e[l],n.push([a*(o[0]-r[0]),a*(o[1]-r[1])]);return n}function Ca(e){if(e.length<3)return ka(e);var t=1,r=e.length,n=e[0],a=n[0],i=n[1],o=[a,a,a,(n=e[1])[0]],l=[i,i,i,n[1]],s=[a,",",i,"L",Pa(za,o),",",Pa(za,l)];for(e.push(e[r-1]);++t<=r;)n=e[t],o.shift(),o.push(n[0]),l.shift(),l.push(n[1]),Na(s,o,l);return e.pop(),s.push("L",n),s.join("")}function Pa(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}Ma.forEach((function(e,t){t.key=e,t.closed=/-closed$/.test(e)}));var Ia=[0,2/3,1/3,0],Ra=[0,1/3,2/3,0],za=[0,1/6,2/3,1/6];function Na(e,t,r){e.push("C",Pa(Ia,t),",",Pa(Ia,r),",",Pa(Ra,t),",",Pa(Ra,r),",",Pa(za,t),",",Pa(za,r))}function Fa(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Ea(e){for(var t,r,n,a=-1,i=e.length;++a<i;)r=(t=e[a])[0],n=t[1]-Ie,t[0]=r*Math.cos(n),t[1]=r*Math.sin(n);return e}function Ha(e){var t=St,r=St,n=0,a=Dt,i=wa,o=ka,l=o.key,s=o,c="L",u=.7;function f(l){var f,d,h,p=[],v=[],g=[],y=-1,m=l.length,x=gt(t),b=gt(n),_=t===r?function(){return d}:gt(r),w=n===a?function(){return h}:gt(a);function T(){p.push("M",o(e(g),u),c,s(e(v.reverse()),u),"Z")}for(;++y<m;)i.call(this,f=l[y],y)?(v.push([d=+x.call(this,f,y),h=+b.call(this,f,y)]),g.push([+_.call(this,f,y),+w.call(this,f,y)])):v.length&&(T(),v=[],g=[]);return v.length&&T(),p.length?p.join(""):null}return f.x=function(e){return arguments.length?(t=r=e,f):r},f.x0=function(e){return arguments.length?(t=e,f):t},f.x1=function(e){return arguments.length?(r=e,f):r},f.y=function(e){return arguments.length?(n=a=e,f):a},f.y0=function(e){return arguments.length?(n=e,f):n},f.y1=function(e){return arguments.length?(a=e,f):a},f.defined=function(e){return arguments.length?(i=e,f):i},f.interpolate=function(e){return arguments.length?(l="function"==typeof e?o=e:(o=Ma.get(e)||ka).key,s=o.reverse||o,c=o.closed?"M":"L",f):l},f.tension=function(e){return arguments.length?(u=e,f):u},f}function Ba(e){return e.source}function ja(e){return e.target}function Ya(e){return e.radius}function Va(e){return[e.x,e.y]}function Ua(){return 64}function qa(){return"circle"}function Ga(e){var t=Math.sqrt(e/Oe);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}i.svg.line.radial=function(){var e=Ta(Ea);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},La.reverse=Sa,Sa.reverse=La,i.svg.area=function(){return Ha(z)},i.svg.area.radial=function(){var e=Ha(Ea);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},i.svg.chord=function(){var e=Ba,t=ja,r=Ya,n=ya,a=ma;function i(r,n){var a,i,c=o(this,e,r,n),u=o(this,t,r,n);return"M"+c.p0+l(c.r,c.p1,c.a1-c.a0)+(i=u,((a=c).a0==i.a0&&a.a1==i.a1?s(c.r,c.p1,c.r,c.p0):s(c.r,c.p1,u.r,u.p0)+l(u.r,u.p1,u.a1-u.a0)+s(u.r,u.p1,c.r,c.p0))+"Z")}function o(e,t,i,o){var l=t.call(e,i,o),s=r.call(e,l,o),c=n.call(e,l,o)-Ie,u=a.call(e,l,o)-Ie;return{r:s,a0:c,a1:u,p0:[s*Math.cos(c),s*Math.sin(c)],p1:[s*Math.cos(u),s*Math.sin(u)]}}function l(e,t,r){return"A"+e+","+e+" 0 "+ +(r>Oe)+",1 "+t}function s(e,t,r,n){return"Q 0,0 "+n}return i.radius=function(e){return arguments.length?(r=gt(e),i):r},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?(n=gt(e),i):n},i.endAngle=function(e){return arguments.length?(a=gt(e),i):a},i},i.svg.diagonal=function(){var e=Ba,t=ja,r=Va;function n(n,a){var i=e.call(this,n,a),o=t.call(this,n,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(r))[0]+"C"+s[1]+" "+s[2]+" "+s[3]}return n.source=function(t){return arguments.length?(e=gt(t),n):e},n.target=function(e){return arguments.length?(t=gt(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},i.svg.diagonal.radial=function(){var e=i.svg.diagonal(),t=Va,r=e.projection;return e.projection=function(e){return arguments.length?r(function(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Ie;return[r*Math.cos(n),r*Math.sin(n)]}}(t=e)):t},e},i.svg.symbol=function(){var e=qa,t=Ua;function r(r,n){return(Za.get(e.call(this,r,n))||Ga)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=gt(t),r):e},r.size=function(e){return arguments.length?(t=gt(e),r):t},r};var Za=i.map({circle:Ga,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*Xa)),r=t*Xa;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",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/Wa),r=t*Wa/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Wa),r=t*Wa/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});i.svg.symbolTypes=Za.keys();var Wa=Math.sqrt(3),Xa=Math.tan(30*Re);K.transition=function(e){for(var t,r,n=$a||++ri,a=ii(e),i=[],o=ei||{time:Date.now(),ease:Pr,delay:0,duration:250},l=-1,s=this.length;++l<s;){i.push(t=[]);for(var c=this[l],u=-1,f=c.length;++u<f;)(r=c[u])&&oi(r,u,a,n,o),t.push(r)}return Qa(i,a,n)},K.interrupt=function(e){return this.each(null==e?Ja:Ka(ii(e)))};var Ja=Ka(ii());function Ka(e){return function(){var t,r,n;(t=this[e])&&(n=t[r=t.active])&&(n.timer.c=null,n.timer.t=NaN,--t.count?delete t[r]:delete this[e],t.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function Qa(e,t,r){return G(e,ti),e.namespace=t,e.id=r,e}var $a,ei,ti=[],ri=0;function ni(e,t,r,n){var a=e.id,i=e.namespace;return ve(e,"function"==typeof r?function(e,o,l){e[i][a].tween.set(t,n(r.call(e,e.__data__,o,l)))}:(r=n(r),function(e){e[i][a].tween.set(t,r)}))}function ai(e){return null==e&&(e=""),function(){this.textContent=e}}function ii(e){return null==e?"__transition__":"__transition_"+e+"__"}function oi(e,t,r,n,a){var i,o,l,s,c,u=e[r]||(e[r]={active:0,count:0}),f=u[n];function d(r){var a=u.active,d=u[a];for(var p in d&&(d.timer.c=null,d.timer.t=NaN,--u.count,delete u[a],d.event&&d.event.interrupt.call(e,e.__data__,d.index)),u)if(+p<n){var v=u[p];v.timer.c=null,v.timer.t=NaN,--u.count,delete u[p]}o.c=h,Mt((function(){return o.c&&h(r||1)&&(o.c=null,o.t=NaN),1}),0,i),u.active=n,f.event&&f.event.start.call(e,e.__data__,t),c=[],f.tween.forEach((function(r,n){(n=n.call(e,e.__data__,t))&&c.push(n)})),s=f.ease,l=f.duration}function h(a){for(var i=a/l,o=s(i),d=c.length;d>0;)c[--d].call(e,o);if(i>=1)return f.event&&f.event.end.call(e,e.__data__,t),--u.count?delete u[n]:delete e[r],1}f||(i=a.time,o=Mt((function(e){var t=f.delay;if(o.t=t+i,t<=e)return d(e-t);o.c=d}),0,i),f=u[n]={tween:new M,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:t},a=null,++u.count)}ti.call=K.call,ti.empty=K.empty,ti.node=K.node,ti.size=K.size,i.transition=function(e,t){return e&&e.transition?$a?e.transition(t):e:i.selection().transition(e)},i.transition.prototype=ti,ti.select=function(e){var t,r,n,a=this.id,i=this.namespace,o=[];e=Q(e);for(var l=-1,s=this.length;++l<s;){o.push(t=[]);for(var c=this[l],u=-1,f=c.length;++u<f;)(n=c[u])&&(r=e.call(n,n.__data__,u,l))?("__data__"in n&&(r.__data__=n.__data__),oi(r,u,i,a,n[i][a]),t.push(r)):t.push(null)}return Qa(o,i,a)},ti.selectAll=function(e){var t,r,n,a,i,o=this.id,l=this.namespace,s=[];e=$(e);for(var c=-1,u=this.length;++c<u;)for(var f=this[c],d=-1,h=f.length;++d<h;)if(n=f[d]){i=n[l][o],r=e.call(n,n.__data__,d,c),s.push(t=[]);for(var p=-1,v=r.length;++p<v;)(a=r[p])&&oi(a,p,l,o,i),t.push(a)}return Qa(s,l,o)},ti.filter=function(e){var t,r,n=[];"function"!=typeof e&&(e=he(e));for(var a=0,i=this.length;a<i;a++){n.push(t=[]);for(var o,l=0,s=(o=this[a]).length;l<s;l++)(r=o[l])&&e.call(r,r.__data__,l,a)&&t.push(r)}return Qa(n,this.namespace,this.id)},ti.tween=function(e,t){var r=this.id,n=this.namespace;return arguments.length<2?this.node()[n][r].tween.get(e):ve(this,null==t?function(t){t[n][r].tween.remove(e)}:function(a){a[n][r].tween.set(e,t)})},ti.attr=function(e,t){if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var r="transform"==e?Vr:Tr,n=i.ns.qualify(e);function a(){this.removeAttribute(n)}function o(){this.removeAttributeNS(n.space,n.local)}return ni(this,"attr."+e,t,n.local?function(e){return null==e?o:(e+="",function(){var t,a=this.getAttributeNS(n.space,n.local);return a!==e&&(t=r(a,e),function(e){this.setAttributeNS(n.space,n.local,t(e))})})}:function(e){return null==e?a:(e+="",function(){var t,a=this.getAttribute(n);return a!==e&&(t=r(a,e),function(e){this.setAttribute(n,t(e))})})})},ti.attrTween=function(e,t){var r=i.ns.qualify(e);return this.tween("attr."+e,r.local?function(e,n){var a=t.call(this,e,n,this.getAttributeNS(r.space,r.local));return a&&function(e){this.setAttributeNS(r.space,r.local,a(e))}}:function(e,n){var a=t.call(this,e,n,this.getAttribute(r));return a&&function(e){this.setAttribute(r,a(e))}})},ti.style=function(e,t,r){var n=arguments.length;if(n<3){if("string"!=typeof e){for(r in n<2&&(t=""),e)this.style(r,e[r],t);return this}r=""}function a(){this.style.removeProperty(e)}return ni(this,"style."+e,t,(function(t){return null==t?a:(t+="",function(){var n,a=u(this).getComputedStyle(this,null).getPropertyValue(e);return a!==t&&(n=Tr(a,t),function(t){this.style.setProperty(e,n(t),r)})})}))},ti.styleTween=function(e,t,r){return arguments.length<3&&(r=""),this.tween("style."+e,(function(n,a){var i=t.call(this,n,a,u(this).getComputedStyle(this,null).getPropertyValue(e));return i&&function(t){this.style.setProperty(e,i(t),r)}}))},ti.text=function(e){return ni(this,"text",e,ai)},ti.remove=function(){var e=this.namespace;return this.each("end.transition",(function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)}))},ti.ease=function(e){var t=this.id,r=this.namespace;return arguments.length<1?this.node()[r][t].ease:("function"!=typeof e&&(e=i.ease.apply(i,arguments)),ve(this,(function(n){n[r][t].ease=e})))},ti.delay=function(e){var t=this.id,r=this.namespace;return arguments.length<1?this.node()[r][t].delay:ve(this,"function"==typeof e?function(n,a,i){n[r][t].delay=+e.call(n,n.__data__,a,i)}:(e=+e,function(n){n[r][t].delay=e}))},ti.duration=function(e){var t=this.id,r=this.namespace;return arguments.length<1?this.node()[r][t].duration:ve(this,"function"==typeof e?function(n,a,i){n[r][t].duration=Math.max(1,e.call(n,n.__data__,a,i))}:(e=Math.max(1,e),function(n){n[r][t].duration=e}))},ti.each=function(e,t){var r=this.id,n=this.namespace;if(arguments.length<2){var a=ei,o=$a;try{$a=r,ve(this,(function(t,a,i){ei=t[n][r],e.call(t,t.__data__,a,i)}))}finally{ei=a,$a=o}}else ve(this,(function(a){var o=a[n][r];(o.event||(o.event=i.dispatch("start","end","interrupt"))).on(e,t)}));return this},ti.transition=function(){for(var e,t,r,n=this.id,a=++ri,i=this.namespace,o=[],l=0,s=this.length;l<s;l++){o.push(e=[]);for(var c,u=0,f=(c=this[l]).length;u<f;u++)(t=c[u])&&oi(t,u,i,a,{time:(r=t[i][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),e.push(t)}return Qa(o,i,a)},i.svg.axis=function(){var e,t=i.scale.linear(),r=li,n=6,a=6,o=3,s=[10],c=null;function u(l){l.each((function(){var l,u=i.select(this),f=this.__chart__||t,d=this.__chart__=t.copy(),h=null==c?d.ticks?d.ticks.apply(d,s):d.domain():c,p=null==e?d.tickFormat?d.tickFormat.apply(d,s):z:e,v=u.selectAll(".tick").data(h,d),g=v.enter().insert("g",".domain").attr("class","tick").style("opacity",Se),y=i.transition(v.exit()).style("opacity",Se).remove(),m=i.transition(v.order()).style("opacity",1),x=Math.max(n,0)+o,b=Vn(d),_=u.selectAll(".domain").data([0]),w=(_.enter().append("path").attr("class","domain"),i.transition(_));g.append("line"),g.append("text");var T,M,k,A,L=g.select("line"),S=m.select("line"),D=v.select("text").text(p),O=g.select("text"),C=m.select("text"),P="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(l=ci,T="x",k="y",M="x2",A="y2",D.attr("dy",P<0?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+P*a+"V0H"+b[1]+"V"+P*a)):(l=ui,T="y",k="x",M="y2",A="x2",D.attr("dy",".32em").style("text-anchor",P<0?"end":"start"),w.attr("d","M"+P*a+","+b[0]+"H0V"+b[1]+"H"+P*a)),L.attr(A,P*n),O.attr(k,P*x),S.attr(M,0).attr(A,P*n),C.attr(T,0).attr(k,P*x),d.rangeBand){var I=d,R=I.rangeBand()/2;f=d=function(e){return I(e)+R}}else f.rangeBand?f=d:y.call(l,d,f);g.call(l,f,d),m.call(l,d,d)}))}return u.scale=function(e){return arguments.length?(t=e,u):t},u.orient=function(e){return arguments.length?(r=e in si?e+"":li,u):r},u.ticks=function(){return arguments.length?(s=l(arguments),u):s},u.tickValues=function(e){return arguments.length?(c=e,u):c},u.tickFormat=function(t){return arguments.length?(e=t,u):e},u.tickSize=function(e){var t=arguments.length;return t?(n=+e,a=+arguments[t-1],u):n},u.innerTickSize=function(e){return arguments.length?(n=+e,u):n},u.outerTickSize=function(e){return arguments.length?(a=+e,u):a},u.tickPadding=function(e){return arguments.length?(o=+e,u):o},u.tickSubdivide=function(){return arguments.length&&u},u};var li="bottom",si={top:1,right:1,bottom:1,left:1};function ci(e,t,r){e.attr("transform",(function(e){var n=t(e);return"translate("+(isFinite(n)?n:r(e))+",0)"}))}function ui(e,t,r){e.attr("transform",(function(e){var n=t(e);return"translate(0,"+(isFinite(n)?n:r(e))+")"}))}i.svg.brush=function(){var e,t,r=U(d,"brushstart","brush","brushend"),n=null,a=null,o=[0,0],l=[0,0],s=!0,c=!0,f=di[0];function d(e){e.each((function(){var e=i.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",g).on("touchstart.brush",g),t=e.selectAll(".background").data([0]);t.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),e.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var r=e.selectAll(".resize").data(f,z);r.exit().remove(),r.enter().append("g").attr("class",(function(e){return"resize "+e})).style("cursor",(function(e){return fi[e]})).append("rect").attr("x",(function(e){return/[ew]$/.test(e)?-3:null})).attr("y",(function(e){return/^[ns]/.test(e)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),r.style("display",d.empty()?"none":null);var o,l=i.transition(e),s=i.transition(t);n&&(o=Vn(n),s.attr("x",o[0]).attr("width",o[1]-o[0]),p(l)),a&&(o=Vn(a),s.attr("y",o[0]).attr("height",o[1]-o[0]),v(l)),h(l)}))}function h(e){e.selectAll(".resize").attr("transform",(function(e){return"translate("+o[+/e$/.test(e)]+","+l[+/^s/.test(e)]+")"}))}function p(e){e.select(".extent").attr("x",o[0]),e.selectAll(".extent,.n>rect,.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 g(){var f,g,y=this,m=i.select(i.event.target),x=r.of(y,arguments),b=i.select(y),_=m.datum(),w=!/^(n|s)$/.test(_)&&n,T=!/^(e|w)$/.test(_)&&a,M=m.classed("extent"),k=Me(y),A=i.mouse(y),L=i.select(u(y)).on("keydown.brush",(function(){32==i.event.keyCode&&(M||(f=null,A[0]-=o[1],A[1]-=l[1],M=2),Y())})).on("keyup.brush",(function(){32==i.event.keyCode&&2==M&&(A[0]+=o[1],A[1]+=l[1],M=0,Y())}));if(i.event.changedTouches?L.on("touchmove.brush",O).on("touchend.brush",P):L.on("mousemove.brush",O).on("mouseup.brush",P),b.interrupt().selectAll("*").interrupt(),M)A[0]=o[0]-A[0],A[1]=l[0]-A[1];else if(_){var S=+/w$/.test(_),D=+/^n/.test(_);g=[o[1-S]-A[0],l[1-D]-A[1]],A[0]=o[S],A[1]=l[D]}else i.event.altKey&&(f=A.slice());function O(){var e=i.mouse(y),t=!1;g&&(e[0]+=g[0],e[1]+=g[1]),M||(i.event.altKey?(f||(f=[(o[0]+o[1])/2,(l[0]+l[1])/2]),A[0]=o[+(e[0]<f[0])],A[1]=l[+(e[1]<f[1])]):f=null),w&&C(e,n,0)&&(p(b),t=!0),T&&C(e,a,1)&&(v(b),t=!0),t&&(h(b),x({type:"brush",mode:M?"move":"resize"}))}function C(r,n,a){var i,u,d=Vn(n),h=d[0],p=d[1],v=A[a],g=a?l:o,y=g[1]-g[0];if(M&&(h-=v,p-=y+v),i=(a?c:s)?Math.max(h,Math.min(p,r[a])):r[a],M?u=(i+=v)+y:(f&&(v=Math.max(h,Math.min(p,2*f[a]-i))),v<i?(u=i,i=v):u=v),g[0]!=i||g[1]!=u)return a?t=null:e=null,g[0]=i,g[1]=u,!0}function P(){O(),b.style("pointer-events","all").selectAll(".resize").style("display",d.empty()?"none":null),i.select("body").style("cursor",null),L.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),k(),x({type:"brushend"})}b.style("pointer-events","none").selectAll(".resize").style("display",null),i.select("body").style("cursor",m.style("cursor")),x({type:"brushstart"}),O()}return d.event=function(n){n.each((function(){var n=r.of(this,arguments),a={x:o,y:l,i:e,j:t},s=this.__chart__||a;this.__chart__=a,$a?i.select(this).transition().each("start.brush",(function(){e=s.i,t=s.j,o=s.x,l=s.y,n({type:"brushstart"})})).tween("brush:brush",(function(){var r=Mr(o,a.x),i=Mr(l,a.y);return e=t=null,function(e){o=a.x=r(e),l=a.y=i(e),n({type:"brush",mode:"resize"})}})).each("end.brush",(function(){e=a.i,t=a.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})})):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))}))},d.x=function(e){return arguments.length?(f=di[!(n=e)<<1|!a],d):n},d.y=function(e){return arguments.length?(f=di[!n<<1|!(a=e)],d):a},d.clamp=function(e){return arguments.length?(n&&a?(s=!!e[0],c=!!e[1]):n?s=!!e:a&&(c=!!e),d):n&&a?[s,c]:n?s:a?c:null},d.extent=function(r){var i,s,c,u,f;return arguments.length?(n&&(i=r[0],s=r[1],a&&(i=i[0],s=s[0]),e=[i,s],n.invert&&(i=n(i),s=n(s)),s<i&&(f=i,i=s,s=f),i==o[0]&&s==o[1]||(o=[i,s])),a&&(c=r[0],u=r[1],n&&(c=c[1],u=u[1]),t=[c,u],a.invert&&(c=a(c),u=a(u)),u<c&&(f=c,c=u,u=f),c==l[0]&&u==l[1]||(l=[c,u])),d):(n&&(e?(i=e[0],s=e[1]):(i=o[0],s=o[1],n.invert&&(i=n.invert(i),s=n.invert(s)),s<i&&(f=i,i=s,s=f))),a&&(t?(c=t[0],u=t[1]):(c=l[0],u=l[1],a.invert&&(c=a.invert(c),u=a.invert(u)),u<c&&(f=c,c=u,u=f))),n&&a?[[i,c],[s,u]]:n?[i,s]:a&&[c,u])},d.clear=function(){return d.empty()||(o=[0,0],l=[0,0],e=t=null),d},d.empty=function(){return!!n&&o[0]==o[1]||!!a&&l[0]==l[1]},i.rebind(d,r,"on")};var fi={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},di=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];function hi(e){return JSON.parse(e.responseText)}function pi(e){var t=s.createRange();return t.selectNode(s.body),t.createContextualFragment(e.responseText)}i.text=yt((function(e){return e.responseText})),i.json=function(e,t){return mt(e,"application/json",hi,t)},i.html=function(e,t){return mt(e,"text/html",pi,t)},i.xml=yt((function(e){return e.responseXML})),void 0===(a="function"==typeof(n=i)?n.call(t,r,t,e):n)||(e.exports=a)}).apply(self)},3160:function(e,t,r){"use strict";r.r(t),r.d(t,{decode:function(){return l},encode:function(){return o}});for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a="undefined"==typeof Uint8Array?[]:new Uint8Array(256),i=0;i<64;i++)a[n.charCodeAt(i)]=i;var o=function(e){var t,r=new Uint8Array(e),a=r.length,i="";for(t=0;t<a;t+=3)i+=n[r[t]>>2],i+=n[(3&r[t])<<4|r[t+1]>>4],i+=n[(15&r[t+1])<<2|r[t+2]>>6],i+=n[63&r[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,r,n,i,o,l=.75*e.length,s=e.length,c=0;"="===e[e.length-1]&&(l--,"="===e[e.length-2]&&l--);var u=new ArrayBuffer(l),f=new Uint8Array(u);for(t=0;t<s;t+=4)r=a[e.charCodeAt(t)],n=a[e.charCodeAt(t+1)],i=a[e.charCodeAt(t+2)],o=a[e.charCodeAt(t+3)],f[c++]=r<<2|n>>4,f[c++]=(15&n)<<4|i>>2,f[c++]=(3&i)<<6|63&o;return u}},7624:function(e,t,r){"use strict";function n(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}r.d(t,{E9:function(){return d},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 r=n(e,t);if(!r)return e+"";var a=r[0],i=r[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 c={"%":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 r=n(e,t);if(!r)return e+"";var i=r[0],o=r[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")+n(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 u(e){return e}var f,d,h=Array.prototype.map,p=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function v(e){var t,r,i=void 0===e.grouping||void 0===e.thousands?u:(t=h.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var a=e.length,i=[],o=0,l=t[0],s=0;a>0&&l>0&&(s+l+1>n&&(l=Math.max(1,n-s)),i.push(e.substring(a-=l,a+l)),!((s+=l+1)>n));)l=t[o=(o+1)%t.length];return i.reverse().join(r)}),l=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",f=void 0===e.decimal?".":e.decimal+"",d=void 0===e.numerals?u: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+"",g=void 0===e.minus?"-":e.minus+"",y=void 0===e.nan?"NaN":e.nan+"";function m(e){var t=(e=o(e)).fill,r=e.align,n=e.sign,u=e.symbol,h=e.zero,m=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):c[w]||(void 0===b&&(b=12),_=!0,w="g"),(h||"0"===t&&"="===r)&&(h=!0,t="0",r="=");var T="$"===u?l:"#"===u&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",M="$"===u?s:/[%p]/.test(w)?v:"",k=c[w],A=/[defgprs%]/.test(w);function L(e){var o,l,s,c=T,u=M;if("c"===w)u=k(e)+u,e="";else{var v=(e=+e)<0||1/e<0;if(e=isNaN(e)?y:k(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,n=1,a=-1;n<r;++n)switch(e[n]){case".":a=t=n;break;case"0":0===a&&(a=n),t=n;break;default:if(!+e[n])break e;a>0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),v&&0==+e&&"+"!==n&&(v=!1),c=(v?"("===n?n:g:"-"===n||"("===n?"":n)+c,u=("s"===w?p[8+a/3]:"")+u+(v&&"("===n?")":""),A)for(o=-1,l=e.length;++o<l;)if(48>(s=e.charCodeAt(o))||s>57){u=(46===s?f+e.slice(o+1):e.slice(o))+u,e=e.slice(0,o);break}}x&&!h&&(e=i(e,1/0));var L=c.length+e.length+u.length,S=L<m?new Array(m-L+1).join(t):"";switch(x&&h&&(e=i(S+e,S.length?m-u.length:1/0),S=""),r){case"<":e=c+e+u+S;break;case"=":e=c+S+e+u;break;case"^":e=S.slice(0,L=S.length>>1)+c+e+u+S.slice(L);break;default:e=S+c+e+u}return d(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),L.toString=function(){return e+""},L}return{format:m,formatPrefix:function(e,t){var r,a=m(((e=o(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor((r=t,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),l=Math.pow(10,-i),s=p[8+i/3];return function(e){return a(l*e)+s}}}}f=v({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),d=f.format,f.formatPrefix},4336:function(e,t,r){"use strict";r.d(t,{Yn:function(){return p},m_:function(){return d},E9:function(){return v}});var n=r(8208),a=r(8931),i=r(6192),o=r(8936),l=r(2171),s=r(3528);function c(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 u(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 f(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function d(e){var t=e.dateTime,r=e.date,l=e.time,s=e.periods,d=e.days,h=e.shortDays,p=e.months,v=e.shortMonths,y=w(s),m=T(s),x=w(d),b=T(d),_=w(h),Le=T(h),Se=w(p),De=T(p),Oe=w(v),Ce=T(v),Pe={a:function(e){return h[e.getDay()]},A:function(e){return d[e.getDay()]},b:function(e){return v[e.getMonth()]},B:function(e){return p[e.getMonth()]},c:null,d:U,e:U,f:X,H:q,I:G,j:Z,L:W,m:J,M:K,p:function(e){return s[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ke,s:Ae,S:Q,u:$,U:ee,V:te,w:re,W:ne,x:null,X:null,y:ae,Y:ie,Z:oe,"%":Me},Ie={a:function(e){return h[e.getUTCDay()]},A:function(e){return d[e.getUTCDay()]},b:function(e){return v[e.getUTCMonth()]},B:function(e){return p[e.getUTCMonth()]},c:null,d:le,e:le,f:de,H:se,I:ce,j:ue,L:fe,m:he,M:pe,p:function(e){return s[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ke,s:Ae,S:ve,u:ge,U:ye,V:me,w:xe,W:be,x:null,X:null,y:_e,Y:we,Z:Te,"%":Me},Re={a:function(e,t,r){var n=_.exec(t.slice(r));return n?(e.w=Le[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=x.exec(t.slice(r));return n?(e.w=b[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=Oe.exec(t.slice(r));return n?(e.m=Ce[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=Se.exec(t.slice(r));return n?(e.m=De[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return Fe(e,t,r,n)},d:R,e:R,f:B,H:N,I:N,j:z,L:H,m:I,M:F,p:function(e,t,r){var n=y.exec(t.slice(r));return n?(e.p=m[n[0].toLowerCase()],r+n[0].length):-1},q:P,Q:Y,s:V,S:E,u:k,U:A,V:L,w:M,W:S,x:function(e,t,n){return Fe(e,r,t,n)},X:function(e,t,r){return Fe(e,l,t,r)},y:O,Y:D,Z:C,"%":j};function ze(e,t){return function(r){var n,a,i,o=[],l=-1,s=0,c=e.length;for(r instanceof Date||(r=new Date(+r));++l<c;)37===e.charCodeAt(l)&&(o.push(e.slice(s,l)),null!=(a=g[n=e.charAt(++l)])?n=e.charAt(++l):a="e"===n?" ":"0",(i=t[n])&&(n=i(r,a)),o.push(n),s=l+1);return o.push(e.slice(s,l)),o.join("")}}function Ne(e,t){return function(r){var l,s,d=f(1900,void 0,1);if(Fe(d,e,r+="",0)!=r.length)return null;if("Q"in d)return new Date(d.Q);if("s"in d)return new Date(1e3*d.s+("L"in d?d.L:0));if(t&&!("Z"in d)&&(d.Z=0),"p"in d&&(d.H=d.H%12+12*d.p),void 0===d.m&&(d.m="q"in d?d.q:0),"V"in d){if(d.V<1||d.V>53)return null;"w"in d||(d.w=1),"Z"in d?(s=(l=u(f(d.y,0,1))).getUTCDay(),l=s>4||0===s?n.ot.ceil(l):(0,n.ot)(l),l=a.c.offset(l,7*(d.V-1)),d.y=l.getUTCFullYear(),d.m=l.getUTCMonth(),d.d=l.getUTCDate()+(d.w+6)%7):(s=(l=c(f(d.y,0,1))).getDay(),l=s>4||0===s?i.qT.ceil(l):(0,i.qT)(l),l=o.c.offset(l,7*(d.V-1)),d.y=l.getFullYear(),d.m=l.getMonth(),d.d=l.getDate()+(d.w+6)%7)}else("W"in d||"U"in d)&&("w"in d||(d.w="u"in d?d.u%7:"W"in d?1:0),s="Z"in d?u(f(d.y,0,1)).getUTCDay():c(f(d.y,0,1)).getDay(),d.m=0,d.d="W"in d?(d.w+6)%7+7*d.W-(s+5)%7:d.w+7*d.U-(s+6)%7);return"Z"in d?(d.H+=d.Z/100|0,d.M+=d.Z%100,u(d)):c(d)}}function Fe(e,t,r,n){for(var a,i,o=0,l=t.length,s=r.length;o<l;){if(n>=s)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=Re[a in g?t.charAt(o++):a])||(n=i(e,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}return Pe.x=ze(r,Pe),Pe.X=ze(l,Pe),Pe.c=ze(t,Pe),Ie.x=ze(r,Ie),Ie.X=ze(l,Ie),Ie.c=ze(t,Ie),{format:function(e){var t=ze(e+="",Pe);return t.toString=function(){return e},t},parse:function(e){var t=Ne(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=ze(e+="",Ie);return t.toString=function(){return e},t},utcParse:function(e){var t=Ne(e+="",!0);return t.toString=function(){return e},t}}}var h,p,v,g={"-":"",_:" ",0:"0"},y=/^\s*\d+/,m=/^%/,x=/[\\^$*+?|[\]().{}]/g;function b(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function _(e){return e.replace(x,"\\$&")}function w(e){return new RegExp("^(?:"+e.map(_).join("|")+")","i")}function T(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function M(e,t,r){var n=y.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function k(e,t,r){var n=y.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function A(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function L(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function S(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function D(e,t,r){var n=y.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function O(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function C(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function P(e,t,r){var n=y.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function I(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function R(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function z(e,t,r){var n=y.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function N(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function F(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function E(e,t,r){var n=y.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function H(e,t,r){var n=y.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function B(e,t,r){var n=y.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function j(e,t,r){var n=m.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Y(e,t,r){var n=y.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function V(e,t,r){var n=y.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function U(e,t){return b(e.getDate(),t,2)}function q(e,t){return b(e.getHours(),t,2)}function G(e,t){return b(e.getHours()%12||12,t,2)}function Z(e,t){return b(1+o.c.count((0,l.c)(e),e),t,3)}function W(e,t){return b(e.getMilliseconds(),t,3)}function X(e,t){return W(e,t)+"000"}function J(e,t){return b(e.getMonth()+1,t,2)}function K(e,t){return b(e.getMinutes(),t,2)}function Q(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 r=e.getDay();return e=r>=4||0===r?(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 re(e){return e.getDay()}function ne(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 ce(e,t){return b(e.getUTCHours()%12||12,t,2)}function ue(e,t){return b(1+a.c.count((0,s.c)(e),e),t,3)}function fe(e,t){return b(e.getUTCMilliseconds(),t,3)}function de(e,t){return fe(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 ge(e){var t=e.getUTCDay();return 0===t?7:t}function ye(e,t){return b(n.EV.count((0,s.c)(e)-1,e),t,2)}function me(e,t){var r=e.getUTCDay();return e=r>=4||0===r?(0,n.yA)(e):n.yA.ceil(e),b(n.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(n.ot.count((0,s.c)(e)-1,e),t,2)}function _e(e,t){return b(e.getUTCFullYear()%100,t,2)}function we(e,t){return b(e.getUTCFullYear()%1e4,t,4)}function Te(){return"+0000"}function Me(){return"%"}function ke(e){return+e}function Ae(e){return Math.floor(+e/1e3)}h=d({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,r){"use strict";r.d(t,{m:function(){return o}});var n=r(1628),a=r(9792),i=(0,n.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,r){"use strict";r.d(t,{KK:function(){return l},SK:function(){return o},cg:function(){return i},iy:function(){return a},yc:function(){return n}});var n=1e3,a=6e4,i=36e5,o=864e5,l=6048e5},3220:function(e,t,r){"use strict";r.r(t),r.d(t,{timeDay:function(){return y.c},timeDays:function(){return y.m},timeFriday:function(){return m.iB},timeFridays:function(){return m.sJ},timeHour:function(){return v},timeHours:function(){return g},timeInterval:function(){return n.c},timeMillisecond:function(){return i},timeMilliseconds:function(){return o},timeMinute:function(){return d},timeMinutes:function(){return h},timeMonday:function(){return m.qT},timeMondays:function(){return m.QP},timeMonth:function(){return b},timeMonths:function(){return _},timeSaturday:function(){return m.Wc},timeSaturdays:function(){return m.aI},timeSecond:function(){return c},timeSeconds:function(){return u},timeSunday:function(){return m.uU},timeSundays:function(){return m.Ab},timeThursday:function(){return m.kD},timeThursdays:function(){return m.eC},timeTuesday:function(){return m.Mf},timeTuesdays:function(){return m.Oc},timeWednesday:function(){return m.eg},timeWednesdays:function(){return m.sn},timeWeek:function(){return m.uU},timeWeeks:function(){return m.Ab},timeYear:function(){return w.c},timeYears:function(){return w.Q},utcDay:function(){return D.c},utcDays:function(){return D.o},utcFriday:function(){return O.od},utcFridays:function(){return O.iG},utcHour:function(){return L},utcHours:function(){return S},utcMillisecond:function(){return i},utcMilliseconds:function(){return o},utcMinute:function(){return M},utcMinutes:function(){return k},utcMonday:function(){return O.ot},utcMondays:function(){return O.iO},utcMonth:function(){return P},utcMonths:function(){return I},utcSaturday:function(){return O.Ad},utcSaturdays:function(){return O.K8},utcSecond:function(){return c},utcSeconds:function(){return u},utcSunday:function(){return O.EV},utcSundays:function(){return O.Wq},utcThursday:function(){return O.yA},utcThursdays:function(){return O.ob},utcTuesday:function(){return O.sG},utcTuesdays:function(){return O.kl},utcWednesday:function(){return O._6},utcWednesdays:function(){return O.W_},utcWeek:function(){return O.EV},utcWeeks:function(){return O.Wq},utcYear:function(){return R.c},utcYears:function(){return R.i}});var n=r(1628),a=(0,n.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,n.c)((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):a:null};var i=a,o=a.range,l=r(9792),s=(0,n.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()})),c=s,u=s.range,f=(0,n.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()})),d=f,h=f.range,p=(0,n.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,g=p.range,y=r(8936),m=r(6192),x=(0,n.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,w=r(2171),T=(0,n.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()})),M=T,k=T.range,A=(0,n.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()})),L=A,S=A.range,D=r(8931),O=r(8208),C=(0,n.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()})),P=C,I=C.range,R=r(3528)},1628:function(e,t,r){"use strict";r.d(t,{c:function(){return i}});var n=new Date,a=new Date;function i(e,t,r,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(r){return e(r=new Date(r-1)),t(r,1),e(r),r},l.round=function(e){var t=l(e),r=l.ceil(e);return e-t<r-e?t:r},l.offset=function(e,r){return t(e=new Date(+e),null==r?1:Math.floor(r)),e},l.range=function(r,n,a){var i,o=[];if(r=l.ceil(r),a=null==a?1:Math.floor(a),!(r<n&&a>0))return o;do{o.push(i=new Date(+r)),t(r,a),e(r)}while(i<r&&r<n);return o},l.filter=function(r){return i((function(t){if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(l.count=function(t,i){return n.setTime(+t),a.setTime(+i),e(n),e(a),Math.floor(r(n,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,r){"use strict";r.d(t,{o:function(){return o}});var n=r(1628),a=r(9792),i=(0,n.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,r){"use strict";r.d(t,{Ad:function(){return d},EV:function(){return o},K8:function(){return x},W_:function(){return g},Wq:function(){return h},_6:function(){return c},iG:function(){return m},iO:function(){return p},kl:function(){return v},ob:function(){return y},od:function(){return f},ot:function(){return l},sG:function(){return s},yA:function(){return u}});var n=r(1628),a=r(9792);function i(e){return(0,n.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),c=i(3),u=i(4),f=i(5),d=i(6),h=o.range,p=l.range,v=s.range,g=c.range,y=u.range,m=f.range,x=d.range},3528:function(e,t,r){"use strict";r.d(t,{i:function(){return i}});var n=r(1628),a=(0,n.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,n.c)((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null},t.c=a;var i=a.range},6192:function(e,t,r){"use strict";r.d(t,{Ab:function(){return h},Mf:function(){return s},Oc:function(){return v},QP:function(){return p},Wc:function(){return d},aI:function(){return x},eC:function(){return y},eg:function(){return c},iB:function(){return f},kD:function(){return u},qT:function(){return l},sJ:function(){return m},sn:function(){return g},uU:function(){return o}});var n=r(1628),a=r(9792);function i(e){return(0,n.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),c=i(3),u=i(4),f=i(5),d=i(6),h=o.range,p=l.range,v=s.range,g=c.range,y=u.range,m=f.range,x=d.range},2171:function(e,t,r){"use strict";r.d(t,{Q:function(){return i}});var n=r(1628),a=(0,n.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,n.c)((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null},t.c=a;var i=a.range},1252:function(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.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(r,n){function a(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,a)}))},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 c(e,t,r,n){var a,i,o,c;if(l(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(a=s(e))>0&&o.length>a&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){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 f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=u.bind(n);return a.listener=r,n.wrapFn=a,a}function d(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"==typeof a?r?[a.listener||a]:[a]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(a):p(a,a.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function v(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(i){n.once&&e.removeEventListener(t,a),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var a="error"===e,i=this._events;if(void 0!==i)a=a&&void 0===i.error;else if(!a)return!1;if(a){var o;if(t.length>0&&(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)n(s,this,t);else{var c=s.length,u=p(s,c);for(r=0;r<c;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return l(t),this.on(e,f(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,f(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,a,i,o;if(l(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(a=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,a=i;break}if(a<0)return this;0===a?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,a),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var a,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(a=i[n])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(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,r){"use strict";var n=r(4576);e.exports=function(e){var t=typeof e;if("string"===t){var r=e;if(0==(e=+e)&&n(r))return!1}else if("number"!==t)return!1;return e-e<1}},2408:function(e){e.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],c=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],y=t[15];return e[0]=l*(d*y-h*g)-f*(s*y-c*g)+v*(s*h-c*d),e[1]=-(n*(d*y-h*g)-f*(a*y-i*g)+v*(a*h-i*d)),e[2]=n*(s*y-c*g)-l*(a*y-i*g)+v*(a*c-i*s),e[3]=-(n*(s*h-c*d)-l*(a*h-i*d)+f*(a*c-i*s)),e[4]=-(o*(d*y-h*g)-u*(s*y-c*g)+p*(s*h-c*d)),e[5]=r*(d*y-h*g)-u*(a*y-i*g)+p*(a*h-i*d),e[6]=-(r*(s*y-c*g)-o*(a*y-i*g)+p*(a*c-i*s)),e[7]=r*(s*h-c*d)-o*(a*h-i*d)+u*(a*c-i*s),e[8]=o*(f*y-h*v)-u*(l*y-c*v)+p*(l*h-c*f),e[9]=-(r*(f*y-h*v)-u*(n*y-i*v)+p*(n*h-i*f)),e[10]=r*(l*y-c*v)-o*(n*y-i*v)+p*(n*c-i*l),e[11]=-(r*(l*h-c*f)-o*(n*h-i*f)+u*(n*c-i*l)),e[12]=-(o*(f*g-d*v)-u*(l*g-s*v)+p*(l*d-s*f)),e[13]=r*(f*g-d*v)-u*(n*g-a*v)+p*(n*d-a*f),e[14]=-(r*(l*g-s*v)-o*(n*g-a*v)+p*(n*s-a*l)),e[15]=r*(l*d-s*f)-o*(n*d-a*f)+u*(n*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],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],l=e[6],s=e[7],c=e[8],u=e[9],f=e[10],d=e[11],h=e[12],p=e[13],v=e[14],g=e[15];return(t*o-r*i)*(f*g-d*v)-(t*l-n*i)*(u*g-d*p)+(t*s-a*i)*(u*v-f*p)+(r*l-n*o)*(c*g-d*h)-(r*s-a*o)*(c*v-f*h)+(n*s-a*l)*(c*p-u*h)}},1784:function(e){e.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,l=n+n,s=a+a,c=r*o,u=n*o,f=n*l,d=a*o,h=a*l,p=a*s,v=i*o,g=i*l,y=i*s;return e[0]=1-f-p,e[1]=u+y,e[2]=d-g,e[3]=0,e[4]=u-y,e[5]=1-c-p,e[6]=h+v,e[7]=0,e[8]=d+g,e[9]=h-v,e[10]=1-c-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},1616:function(e){e.exports=function(e,t,r){var n,a,i,o=r[0],l=r[1],s=r[2],c=Math.sqrt(o*o+l*l+s*s);return Math.abs(c)<1e-6?null:(o*=c=1/c,l*=c,s*=c,n=Math.sin(t),i=1-(a=Math.cos(t)),e[0]=o*o*i+a,e[1]=l*o*i+s*n,e[2]=s*o*i-l*n,e[3]=0,e[4]=o*l*i-s*n,e[5]=l*l*i+a,e[6]=s*l*i+o*n,e[7]=0,e[8]=o*s*i+l*n,e[9]=l*s*i-o*n,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,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=n+n,s=a+a,c=i+i,u=n*l,f=n*s,d=n*c,h=a*s,p=a*c,v=i*c,g=o*l,y=o*s,m=o*c;return e[0]=1-(h+v),e[1]=f+m,e[2]=d-y,e[3]=0,e[4]=f-m,e[5]=1-(u+v),e[6]=p+g,e[7]=0,e[8]=d+y,e[9]=p-g,e[10]=1-(u+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[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 r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,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 r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,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 r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,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,r,n,a,i,o){var l=1/(r-t),s=1/(a-n),c=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]=(r+t)*l,e[9]=(a+n)*s,e[10]=(o+i)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*c,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,r){e.exports={create:r(4212),clone:r(6860),copy:r(4492),identity:r(6635),transpose:r(6520),invert:r(4308),adjoint:r(2408),determinant:r(800),multiply:r(944),translate:r(5176),scale:r(8152),rotate:r(16),rotateX:r(5456),rotateY:r(4840),rotateZ:r(4192),fromRotation:r(1616),fromRotationTranslation:r(1944),fromScaling:r(9444),fromTranslation:r(8268),fromXRotation:r(1856),fromYRotation:r(9216),fromZRotation:r(7736),fromQuat:r(1784),frustum:r(8848),perspective:r(1296),perspectiveFromFieldOfView:r(3688),ortho:r(7688),lookAt:r(6508),str:r(9412)}},4308:function(e){e.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],c=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],y=t[15],m=r*l-n*o,x=r*s-a*o,b=r*c-i*o,_=n*s-a*l,w=n*c-i*l,T=a*c-i*s,M=u*v-f*p,k=u*g-d*p,A=u*y-h*p,L=f*g-d*v,S=f*y-h*v,D=d*y-h*g,O=m*D-x*S+b*L+_*A-w*k+T*M;return O?(O=1/O,e[0]=(l*D-s*S+c*L)*O,e[1]=(a*S-n*D-i*L)*O,e[2]=(v*T-g*w+y*_)*O,e[3]=(d*w-f*T-h*_)*O,e[4]=(s*A-o*D-c*k)*O,e[5]=(r*D-a*A+i*k)*O,e[6]=(g*b-p*T-y*x)*O,e[7]=(u*T-d*b+h*x)*O,e[8]=(o*S-l*A+c*M)*O,e[9]=(n*A-r*S-i*M)*O,e[10]=(p*w-v*b+y*m)*O,e[11]=(f*b-u*w-h*m)*O,e[12]=(l*k-o*L-s*M)*O,e[13]=(r*L-n*k+a*M)*O,e[14]=(v*x-p*_-g*m)*O,e[15]=(u*_-f*x+d*m)*O,e):null}},6508:function(e,t,r){var n=r(6635);e.exports=function(e,t,r,a){var i,o,l,s,c,u,f,d,h,p,v=t[0],g=t[1],y=t[2],m=a[0],x=a[1],b=a[2],_=r[0],w=r[1],T=r[2];return Math.abs(v-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(y-T)<1e-6?n(e):(f=v-_,d=g-w,h=y-T,i=x*(h*=p=1/Math.sqrt(f*f+d*d+h*h))-b*(d*=p),o=b*(f*=p)-m*h,l=m*d-x*f,(p=Math.sqrt(i*i+o*o+l*l))?(i*=p=1/p,o*=p,l*=p):(i=0,o=0,l=0),s=d*l-h*o,c=h*i-f*l,u=f*o-d*i,(p=Math.sqrt(s*s+c*c+u*u))?(s*=p=1/p,c*=p,u*=p):(s=0,c=0,u=0),e[0]=i,e[1]=s,e[2]=f,e[3]=0,e[4]=o,e[5]=c,e[6]=d,e[7]=0,e[8]=l,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*v+o*g+l*y),e[13]=-(s*v+c*g+u*y),e[14]=-(f*v+d*g+h*y),e[15]=1,e)}},944:function(e){e.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],f=t[8],d=t[9],h=t[10],p=t[11],v=t[12],g=t[13],y=t[14],m=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*l+_*f+w*v,e[1]=x*a+b*s+_*d+w*g,e[2]=x*i+b*c+_*h+w*y,e[3]=x*o+b*u+_*p+w*m,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*n+b*l+_*f+w*v,e[5]=x*a+b*s+_*d+w*g,e[6]=x*i+b*c+_*h+w*y,e[7]=x*o+b*u+_*p+w*m,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*n+b*l+_*f+w*v,e[9]=x*a+b*s+_*d+w*g,e[10]=x*i+b*c+_*h+w*y,e[11]=x*o+b*u+_*p+w*m,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*n+b*l+_*f+w*v,e[13]=x*a+b*s+_*d+w*g,e[14]=x*i+b*c+_*h+w*y,e[15]=x*o+b*u+_*p+w*m,e}},7688:function(e){e.exports=function(e,t,r,n,a,i,o){var l=1/(t-r),s=1/(n-a),c=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*c,e[11]=0,e[12]=(t+r)*l,e[13]=(a+n)*s,e[14]=(o+i)*c,e[15]=1,e}},1296:function(e){e.exports=function(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,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+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}},3688:function(e){e.exports=function(e,t,r,n){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),c=2/(a+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-l)*s*.5,e[9]=(a-i)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}},16:function(e){e.exports=function(e,t,r,n){var a,i,o,l,s,c,u,f,d,h,p,v,g,y,m,x,b,_,w,T,M,k,A,L,S=n[0],D=n[1],O=n[2],C=Math.sqrt(S*S+D*D+O*O);return Math.abs(C)<1e-6?null:(S*=C=1/C,D*=C,O*=C,a=Math.sin(r),o=1-(i=Math.cos(r)),l=t[0],s=t[1],c=t[2],u=t[3],f=t[4],d=t[5],h=t[6],p=t[7],v=t[8],g=t[9],y=t[10],m=t[11],x=S*S*o+i,b=D*S*o+O*a,_=O*S*o-D*a,w=S*D*o-O*a,T=D*D*o+i,M=O*D*o+S*a,k=S*O*o+D*a,A=D*O*o-S*a,L=O*O*o+i,e[0]=l*x+f*b+v*_,e[1]=s*x+d*b+g*_,e[2]=c*x+h*b+y*_,e[3]=u*x+p*b+m*_,e[4]=l*w+f*T+v*M,e[5]=s*w+d*T+g*M,e[6]=c*w+h*T+y*M,e[7]=u*w+p*T+m*M,e[8]=l*k+f*A+v*L,e[9]=s*k+d*A+g*L,e[10]=c*k+h*A+y*L,e[11]=u*k+p*A+m*L,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,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],l=t[6],s=t[7],c=t[8],u=t[9],f=t[10],d=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+c*n,e[5]=o*a+u*n,e[6]=l*a+f*n,e[7]=s*a+d*n,e[8]=c*a-i*n,e[9]=u*a-o*n,e[10]=f*a-l*n,e[11]=d*a-s*n,e}},4840:function(e){e.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],c=t[8],u=t[9],f=t[10],d=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-c*n,e[1]=o*a-u*n,e[2]=l*a-f*n,e[3]=s*a-d*n,e[8]=i*n+c*a,e[9]=o*n+u*a,e[10]=l*n+f*a,e[11]=s*n+d*a,e}},4192:function(e){e.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],c=t[4],u=t[5],f=t[6],d=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+c*n,e[1]=o*a+u*n,e[2]=l*a+f*n,e[3]=s*a+d*n,e[4]=c*a-i*n,e[5]=u*a-o*n,e[6]=f*a-l*n,e[7]=d*a-s*n,e}},8152:function(e){e.exports=function(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,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,r){var n,a,i,o,l,s,c,u,f,d,h,p,v=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*v+t[4]*g+t[8]*y+t[12],e[13]=t[1]*v+t[5]*g+t[9]*y+t[13],e[14]=t[2]*v+t[6]*g+t[10]*y+t[14],e[15]=t[3]*v+t[7]*g+t[11]*y+t[15]):(n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],f=t[8],d=t[9],h=t[10],p=t[11],e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=l,e[5]=s,e[6]=c,e[7]=u,e[8]=f,e[9]=d,e[10]=h,e[11]=p,e[12]=n*v+l*g+f*y+t[12],e[13]=a*v+s*g+d*y+t[13],e[14]=i*v+c*g+h*y+t[14],e[15]=o*v+u*g+p*y+t[15]),e}},6520:function(e){e.exports=function(e,t){if(e===t){var r=t[1],n=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]=r,e[6]=t[9],e[7]=t[13],e[8]=n,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,r){"use strict";var n,a=r(1820);n="function"==typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:a,e.exports=n},9184:function(e,t,r){"use strict";var n=r(1820);e.exports=n&&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(t){e=!1}return e}()},1820:function(e){e.exports=!0},4576:function(e){"use strict";e.exports=function(e){for(var t,r=e.length,n=0;n<r;n++)if(((t=e.charCodeAt(n))<9||t>13)&&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,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var a,i=e.clientX||0,o=e.clientY||0,l=(a=r)===window||a===document||a===document.body?t:a.getBoundingClientRect();return n[0]=i-l.left,n[1]=o-l.top,n}},8324:function(e,t,r){var n,a,i,o;a="Promise",o=function(){"use strict";var e,t,r,n=Object.prototype.toString,a="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch(t){e=function(e,t,r){return e[t]=r,e}}function i(e,n){r.add(e,n),t||(t=a(r.drain))}function o(e){var t,r=typeof e;return null==e||"object"!=r&&"function"!=r||(t=e.then),"function"==typeof t&&t}function l(){for(var e=0;e<this.chain.length;e++)s(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function s(e,t,r){var n,a;try{!1===t?r.reject(e.msg):(n=!0===t?e.msg:t.call(void 0,e.msg))===r.promise?r.reject(TypeError("Promise-chain cycle")):(a=o(n))?a.call(n,r.resolve,r.reject):r.resolve(n)}catch(e){r.reject(e)}}function c(e){var t,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(t=o(e))?i((function(){var n=new d(r);try{t.call(e,(function(){c.apply(n,arguments)}),(function(){u.apply(n,arguments)}))}catch(e){u.call(n,e)}})):(r.msg=e,r.state=1,r.chain.length>0&&i(l,r))}catch(e){u.call(new d(r),e)}}}function u(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 f(e,t,r,n){for(var a=0;a<t.length;a++)!function(a){e.resolve(t[a]).then((function(e){r(a,e)}),n)}(a)}function d(e){this.def=e,this.triggered=!1}function h(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function p(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new h(this);this.then=function(e,r){var n={success:"function"!=typeof e||e,failure:"function"==typeof r&&r};return n.promise=new this.constructor((function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t})),t.chain.push(n),0!==t.state&&i(l,t),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,(function(e){c.call(t,e)}),(function(e){u.call(t,e)}))}catch(e){u.call(t,e)}}r=function(){var e,r,n;function a(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(t,i){n=new a(t,i),r?r.next=n:e=n,r=n,n=void 0},drain:function(){var n=e;for(e=r=t=void 0;n;)n.fn.call(n.self),n=n.next}}}();var v=e({},"constructor",p,!1);return p.prototype=v,e(v,"__NPO__",0,!1),e(p,"resolve",(function(e){return e&&"object"==typeof e&&1===e.__NPO__?e:new this((function(t,r){if("function"!=typeof t||"function"!=typeof r)throw TypeError("Not a function");t(e)}))})),e(p,"reject",(function(e){return new this((function(t,r){if("function"!=typeof t||"function"!=typeof r)throw TypeError("Not a function");r(e)}))})),e(p,"all",(function(e){var t=this;return"[object Array]"!=n.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t((function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");var a=e.length,i=Array(a),o=0;f(t,e,(function(e,t){i[e]=t,++o===a&&r(i)}),n)}))})),e(p,"race",(function(e){var t=this;return"[object Array]"!=n.call(e)?t.reject(TypeError("Not an array")):new t((function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");f(t,e,(function(e,t){r(t)}),n)}))})),p},(i=void 0!==r.g?r.g:this)[a]=i[a]||o(),e.exports?e.exports=i[a]:void 0===(n=function(){return i[a]}.call(t,r,t,e))||(e.exports=n)},896:function(e){"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var i,o,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var c in i=Object(arguments[s]))r.call(i,c)&&(l[c]=i[c]);if(t){o=t(i);for(var u=0;u<o.length;u++)n.call(i,o[u])&&(l[o[u]]=i[o[u]])}}return l}},9604:function(e){e.exports=function(e){var a=[];return e.replace(r,(function(e,r,i){var o=r.toLowerCase();for(i=function(e){var t=e.match(n);return t?t.map(Number):[]}(i),"m"==o&&i.length>2&&(a.push([r].concat(i.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(i.length==t[o])return i.unshift(r),a.push(i);if(i.length<t[o])throw new Error("malformed path data");a.push([r].concat(i.splice(0,t[o])))}})),a};var t={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=/([astvzqmhlc])([^astvzqmhlc]*)/gi,n=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi},1456:function(e){e.exports=function(e,t,r,n){var a=e[0],i=e[1],o=!1;void 0===r&&(r=0),void 0===n&&(n=t.length);for(var l=n-r,s=0,c=l-1;s<l;c=s++){var u=t[s+r][0],f=t[s+r][1],d=t[c+r][0],h=t[c+r][1];f>i!=h>i&&a<(d-u)*(i-f)/(h-f)+u&&(o=!o)}return o}},4756:function(e,t,r){var n,a=r(2928),i=r(8648),o=r(9819),l=r(1403),s=r(2368),c=r(7792),u=!1,f=i();function d(e,t,r){var a=n.segments(e),i=n.segments(t),o=r(n.combine(a,i));return n.polygon(o)}n={buildLog:function(e){return!0===e?u=a():!1===e&&(u=!1),!1!==u&&u.list},epsilon:function(e){return f.epsilon(e)},segments:function(e){var t=o(!0,f,u);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:o(!1,f,u).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:s.union(e.combined,u),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:s.intersect(e.combined,u),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:s.difference(e.combined,u),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:s.differenceRev(e.combined,u),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:s.xor(e.combined,u),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:l(e.segments,f,u),inverted:e.inverted}},polygonFromGeoJSON:function(e){return c.toPolygon(n,e)},polygonToGeoJSON:function(e){return c.fromPolygon(n,f,e)},union:function(e,t){return d(e,t,n.selectUnion)},intersect:function(e,t){return d(e,t,n.selectIntersect)},difference:function(e,t){return d(e,t,n.selectDifference)},differenceRev:function(e,t){return d(e,t,n.selectDifferenceRev)},xor:function(e,t){return d(e,t,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),e.exports=n},2928:function(e){e.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("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,r,n){var a=r[0],i=r[1],o=n[0],l=n[1],s=t[0];return(o-a)*(t[1]-i)-(l-i)*(s-a)>=-e},pointBetween:function(t,r,n){var a=t[1]-r[1],i=n[0]-r[0],o=t[0]-r[0],l=n[1]-r[1],s=o*i+a*l;return!(s<e||s-(i*i+l*l)>-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])<e},pointsSameY:function(t,r){return Math.abs(t[1]-r[1])<e},pointsSame:function(e,r){return t.pointsSameX(e,r)&&t.pointsSameY(e,r)},pointsCompare:function(e,r){return t.pointsSameX(e,r)?t.pointsSameY(e,r)?0:e[1]<r[1]?-1:1:e[0]<r[0]?-1:1},pointsCollinear:function(t,r,n){var a=t[0]-r[0],i=t[1]-r[1],o=r[0]-n[0],l=r[1]-n[1];return Math.abs(a*l-o*i)<e},linesIntersect:function(t,r,n,a){var i=r[0]-t[0],o=r[1]-t[1],l=a[0]-n[0],s=a[1]-n[1],c=i*s-o*l;if(Math.abs(c)<e)return!1;var u=t[0]-n[0],f=t[1]-n[1],d=(l*f-s*u)/c,h=(i*f-o*u)/c,p={alongA:0,alongB:0,pt:[t[0]+d*i,t[1]+d*o]};return p.alongA=d<=-e?-2:d<e?-1:d-1<=-e?0:d-1<e?1:2,p.alongB=h<=-e?-2:h<e?-1:h-1<=-e?0:h-1<e?1:2,p},pointInsideRegion:function(t,r){for(var n=t[0],a=t[1],i=r[r.length-1][0],o=r[r.length-1][1],l=!1,s=0;s<r.length;s++){var c=r[s][0],u=r[s][1];u-a>e!=o-a>e&&(i-c)*(a-u)/(o-u)+c-n>e&&(l=!l),i=c,o=u}return l}};return t}},7792:function(e){var t={toPolygon:function(e,t){function r(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function r(t){var r=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[r]})}for(var n=r(t[0]),a=1;a<t.length;a++)n=e.selectDifference(e.combine(n,r(t[a])));return n}if("Polygon"===t.type)return e.polygon(r(t.coordinates));if("MultiPolygon"===t.type){for(var n=e.segments({inverted:!1,regions:[]}),a=0;a<t.coordinates.length;a++)n=e.selectUnion(e.combine(n,r(t.coordinates[a])));return e.polygon(n)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(e,t,r){function n(e,r){return t.pointInsideRegion([.5*(e[0][0]+e[1][0]),.5*(e[0][1]+e[1][1])],r)}function a(e){return{region:e,children:[]}}r=e.polygon(e.segments(r));var i=a(null);function o(e,t){for(var r=0;r<e.children.length;r++)if(n(t,(l=e.children[r]).region))return void o(l,t);var i=a(t);for(r=0;r<e.children.length;r++){var l;n((l=e.children[r]).region,t)&&(i.children.push(l),e.children.splice(r,1),r--)}e.children.push(i)}for(var l=0;l<r.regions.length;l++){var s=r.regions[l];s.length<3||o(i,s)}function c(e,t){for(var r=0,n=e[e.length-1][0],a=e[e.length-1][1],i=[],o=0;o<e.length;o++){var l=e[o][0],s=e[o][1];i.push([l,s]),r+=s*n-l*a,n=l,a=s}return r<0!==t&&i.reverse(),i.push([i[0][0],i[0][1]]),i}var u=[];function f(e){var t=[c(e.region,!1)];u.push(t);for(var r=0;r<e.children.length;r++)t.push(d(e.children[r]))}function d(e){for(var t=0;t<e.children.length;t++)f(e.children[t]);return c(e.region,!0)}for(l=0;l<i.children.length;l++)f(i.children[l]);return u.length<=0?{type:"Polygon",coordinates:[]}:1==u.length?{type:"Polygon",coordinates:u[0]}:{type:"MultiPolygon",coordinates:u}}};e.exports=t},9819:function(e,t,r){var n=r(8088);e.exports=function(e,t,r){function a(e,t,n){return{id:r?r.segmentId():-1,start:e,end:t,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var i=n.create();function o(e,r){i.insertBefore(e,(function(n){return a=e.isStart,i=e.pt,o=r,l=n.isStart,s=n.pt,c=n.other.pt,(0!==(u=t.pointsCompare(i,s))?u:t.pointsSame(o,c)?0:a!==l?a?1:-1:t.pointAboveOrOnLine(o,l?s:c,l?c:s)?1:-1)<0;var a,i,o,l,s,c,u}))}function l(e,t){var r=function(e,t){var r=n.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return o(r,e.end),r}(e,t);return function(e,t,r){var a=n.node({isStart:!1,pt:t.end,seg:t,primary:r,other:e,status:null});e.other=a,o(a,e.pt)}(r,e,t),r}function s(e,t){var n=a(t,e.seg.end,e.seg);return function(e,t){r&&r.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,o(e.other,e.pt)}(e,t),l(n,e.primary)}function c(a,o){var l=n.create();function c(e){return l.findTransition((function(r){var n,a,i,o,l,s;return n=e,a=r.ev,i=n.seg.start,o=n.seg.end,l=a.seg.start,s=a.seg.end,(t.pointsCollinear(i,l,s)?t.pointsCollinear(o,l,s)||t.pointAboveOrOnLine(o,l,s)?1:-1:t.pointAboveOrOnLine(i,l,s)?1:-1)>0}))}function u(e,n){var a=e.seg,i=n.seg,o=a.start,l=a.end,c=i.start,u=i.end;r&&r.checkIntersection(a,i);var f=t.linesIntersect(o,l,c,u);if(!1===f){if(!t.pointsCollinear(o,l,c))return!1;if(t.pointsSame(o,u)||t.pointsSame(l,c))return!1;var d=t.pointsSame(o,c),h=t.pointsSame(l,u);if(d&&h)return n;var p=!d&&t.pointBetween(o,c,u),v=!h&&t.pointBetween(l,c,u);if(d)return v?s(n,l):s(e,u),n;p&&(h||(v?s(n,l):s(e,u)),s(n,o))}else 0===f.alongA&&(-1===f.alongB?s(e,c):0===f.alongB?s(e,f.pt):1===f.alongB&&s(e,u)),0===f.alongB&&(-1===f.alongA?s(n,o):0===f.alongA?s(n,f.pt):1===f.alongA&&s(n,l));return!1}for(var f=[];!i.isEmpty();){var d=i.getHead();if(r&&r.vert(d.pt[0]),d.isStart){r&&r.segmentNew(d.seg,d.primary);var h=c(d),p=h.before?h.before.ev:null,v=h.after?h.after.ev:null;function g(){if(p){var e=u(d,p);if(e)return e}return!!v&&u(d,v)}r&&r.tempStatus(d.seg,!!p&&p.seg,!!v&&v.seg);var y,m,x=g();if(x)e?(m=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=d.seg.myFill,r&&r.segmentUpdate(x.seg),d.other.remove(),d.remove();if(i.getHead()!==d){r&&r.rewind(d.seg);continue}e?(m=null===d.seg.myFill.below||d.seg.myFill.above!==d.seg.myFill.below,d.seg.myFill.below=v?v.seg.myFill.above:a,d.seg.myFill.above=m?!d.seg.myFill.below:d.seg.myFill.below):null===d.seg.otherFill&&(y=v?d.primary===v.primary?v.seg.otherFill.above:v.seg.myFill.above:d.primary?o:a,d.seg.otherFill={above:y,below:y}),r&&r.status(d.seg,!!p&&p.seg,!!v&&v.seg),d.other.status=h.insert(n.node({ev:d}))}else{var b=d.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)&&u(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!d.primary){var _=d.seg.myFill;d.seg.myFill=d.seg.otherFill,d.seg.otherFill=_}f.push(d.seg)}i.getHead().remove()}return r&&r.done(),f}return e?{addRegion:function(e){for(var n,a,i,o=e[e.length-1],s=0;s<e.length;s++){n=o,o=e[s];var c=t.pointsCompare(n,o);0!==c&&l((a=c<0?n:o,i=c<0?o:n,{id:r?r.segmentId():-1,start:a,end:i,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(e){return c(e,!1)}}:{calculate:function(e,t,r,n){return e.forEach((function(e){l(a(e.start,e.end,e),!0)})),r.forEach((function(e){l(a(e.start,e.end,e),!1)})),c(t,n)}}}},8088:function(e){e.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,a=e.root.next;null!==a;){if(r(a))return t.prev=a.prev,t.next=a,a.prev.next=t,void(a.prev=t);n=a,a=a.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;null!==n&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(e){return e.prev=r,e.next=n,r.next=e,null!==n&&(n.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}},1403:function(e){e.exports=function(e,t,r){var n=[],a=[];return e.forEach((function(e){var i=e.start,o=e.end;if(t.pointsSame(i,o))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(e);for(var l={index:0,matches_head:!1,matches_pt1:!1},s={index:0,matches_head:!1,matches_pt1:!1},c=l,u=0;u<n.length;u++){var f=(g=n[u])[0],d=(g[1],g[g.length-1]);if(g[g.length-2],t.pointsSame(f,i)){if(M(u,!0,!0))break}else if(t.pointsSame(f,o)){if(M(u,!0,!1))break}else if(t.pointsSame(d,i)){if(M(u,!1,!0))break}else if(t.pointsSame(d,o)&&M(u,!1,!1))break}if(c===l)return n.push([i,o]),void(r&&r.chainNew(i,o));if(c===s){r&&r.chainMatch(l.index);var h=l.index,p=l.matches_pt1?o:i,v=l.matches_head,g=n[h],y=v?g[0]:g[g.length-1],m=v?g[1]:g[g.length-2],x=v?g[g.length-1]:g[0],b=v?g[g.length-2]:g[1];return t.pointsCollinear(m,y,p)&&(v?(r&&r.chainRemoveHead(l.index,p),g.shift()):(r&&r.chainRemoveTail(l.index,p),g.pop()),y=m),t.pointsSame(x,p)?(n.splice(h,1),t.pointsCollinear(b,x,y)&&(v?(r&&r.chainRemoveTail(l.index,y),g.pop()):(r&&r.chainRemoveHead(l.index,y),g.shift())),r&&r.chainClose(l.index),void a.push(g)):void(v?(r&&r.chainAddHead(l.index,p),g.unshift(p)):(r&&r.chainAddTail(l.index,p),g.push(p)))}var _=l.index,w=s.index;r&&r.chainConnect(_,w);var T=n[_].length<n[w].length;l.matches_head?s.matches_head?T?(k(_),A(_,w)):(k(w),A(w,_)):A(w,_):s.matches_head?A(_,w):T?(k(_),A(w,_)):(k(w),A(_,w))}function M(e,t,r){return c.index=e,c.matches_head=t,c.matches_pt1=r,c===l?(c=s,!1):(c=null,!0)}function k(e){r&&r.chainReverse(e),n[e].reverse()}function A(e,a){var i=n[e],o=n[a],l=i[i.length-1],s=i[i.length-2],c=o[0],u=o[1];t.pointsCollinear(s,l,c)&&(r&&r.chainRemoveTail(e,l),i.pop(),l=s),t.pointsCollinear(l,c,u)&&(r&&r.chainRemoveHead(a,c),o.shift()),r&&r.chainJoin(e,a),n[e]=i.concat(o),n.splice(a,1)}})),a}},2368:function(e){function t(e,t,r){var n=[];return e.forEach((function(e){var a=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);0!==t[a]&&n.push({id:r?r.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[a],below:2===t[a]},otherFill:null})})),r&&r.selected(n),n}var r={union:function(e,r){return t(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(e,r){return t(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(e,r){return t(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(e,r){return t(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(e,r){return t(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};e.exports=r},9760:function(e,t,r){var n;!function(a){var i=/^\s+/,o=/\s+$/,l=0,s=a.round,c=a.min,u=a.max,f=a.random;function d(e,t){if(t=t||{},(e=e||"")instanceof d)return e;if(!(this instanceof d))return new d(e,t);var r=function(e){var t,r,n,l={r:0,g:0,b:0},s=1,f=null,d=null,h=null,p=!1,v=!1;return"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(o,"").toLowerCase();var t,r=!1;if(O[e])e=O[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=V.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=V.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=V.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=V.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=V.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=V.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=V.hex8.exec(e))?{r:z(t[1]),g:z(t[2]),b:z(t[3]),a:H(t[4]),format:r?"name":"hex8"}:(t=V.hex6.exec(e))?{r:z(t[1]),g:z(t[2]),b:z(t[3]),format:r?"name":"hex"}:(t=V.hex4.exec(e))?{r:z(t[1]+""+t[1]),g:z(t[2]+""+t[2]),b:z(t[3]+""+t[3]),a:H(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=V.hex3.exec(e))&&{r:z(t[1]+""+t[1]),g:z(t[2]+""+t[2]),b:z(t[3]+""+t[3]),format:r?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,r=e.g,n=e.b,l={r:255*I(t,255),g:255*I(r,255),b:255*I(n,255)},p=!0,v="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(f=F(e.s),d=F(e.v),l=function(e,t,r){e=6*I(e,360),t=I(t,100),r=I(r,100);var n=a.floor(e),i=e-n,o=r*(1-t),l=r*(1-i*t),s=r*(1-(1-i)*t),c=n%6;return{r:255*[r,l,o,o,s,r][c],g:255*[s,r,r,l,o,o][c],b:255*[o,o,s,r,r,l][c]}}(e.h,f,d),p=!0,v="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(f=F(e.s),h=F(e.l),l=function(e,t,r){var n,a,i;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=I(e,360),t=I(t,100),r=I(r,100),0===t)n=a=i=r;else{var l=r<.5?r*(1+t):r+t-r*t,s=2*r-l;n=o(s,l,e+1/3),a=o(s,l,e),i=o(s,l,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,f,h),p=!0,v="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=P(s),{ok:p,format:e.format||v,r:c(255,u(l.r,0)),g:c(255,u(l.g,0)),b:c(255,u(l.b,0)),a:s}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=s(100*this._a)/100,this._format=t.format||r.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=r.ok,this._tc_id=l++}function h(e,t,r){e=I(e,255),t=I(t,255),r=I(r,255);var n,a,i=u(e,t,r),o=c(e,t,r),l=(i+o)/2;if(i==o)n=a=0;else{var s=i-o;switch(a=l>.5?s/(2-i-o):s/(i+o),i){case e:n=(t-r)/s+(t<r?6:0);break;case t:n=(r-e)/s+2;break;case r:n=(e-t)/s+4}n/=6}return{h:n,s:a,l:l}}function p(e,t,r){e=I(e,255),t=I(t,255),r=I(r,255);var n,a,i=u(e,t,r),o=c(e,t,r),l=i,s=i-o;if(a=0===i?0:s/i,i==o)n=0;else{switch(i){case e:n=(t-r)/s+(t<r?6:0);break;case t:n=(r-e)/s+2;break;case r:n=(e-t)/s+4}n/=6}return{h:n,s:a,v:l}}function v(e,t,r,n){var a=[N(s(e).toString(16)),N(s(t).toString(16)),N(s(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function g(e,t,r,n){return[N(E(n)),N(s(e).toString(16)),N(s(t).toString(16)),N(s(r).toString(16))].join("")}function y(e,t){t=0===t?0:t||10;var r=d(e).toHsl();return r.s-=t/100,r.s=R(r.s),d(r)}function m(e,t){t=0===t?0:t||10;var r=d(e).toHsl();return r.s+=t/100,r.s=R(r.s),d(r)}function x(e){return d(e).desaturate(100)}function b(e,t){t=0===t?0:t||10;var r=d(e).toHsl();return r.l+=t/100,r.l=R(r.l),d(r)}function _(e,t){t=0===t?0:t||10;var r=d(e).toRgb();return r.r=u(0,c(255,r.r-s(-t/100*255))),r.g=u(0,c(255,r.g-s(-t/100*255))),r.b=u(0,c(255,r.b-s(-t/100*255))),d(r)}function w(e,t){t=0===t?0:t||10;var r=d(e).toHsl();return r.l-=t/100,r.l=R(r.l),d(r)}function T(e,t){var r=d(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,d(r)}function M(e){var t=d(e).toHsl();return t.h=(t.h+180)%360,d(t)}function k(e){var t=d(e).toHsl(),r=t.h;return[d(e),d({h:(r+120)%360,s:t.s,l:t.l}),d({h:(r+240)%360,s:t.s,l:t.l})]}function A(e){var t=d(e).toHsl(),r=t.h;return[d(e),d({h:(r+90)%360,s:t.s,l:t.l}),d({h:(r+180)%360,s:t.s,l:t.l}),d({h:(r+270)%360,s:t.s,l:t.l})]}function L(e){var t=d(e).toHsl(),r=t.h;return[d(e),d({h:(r+72)%360,s:t.s,l:t.l}),d({h:(r+216)%360,s:t.s,l:t.l})]}function S(e,t,r){t=t||6,r=r||30;var n=d(e).toHsl(),a=360/r,i=[d(e)];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(d(n));return i}function D(e,t){t=t||6;for(var r=d(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],l=1/t;t--;)o.push(d({h:n,s:a,v:i})),i=(i+l)%1;return o}d.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,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.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*(r<=.03928?r/12.92:a.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=P(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),r=s(100*e.s),n=s(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+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),r=s(100*e.s),n=s(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+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,r,n,a){var i=[N(s(e).toString(16)),N(s(t).toString(16)),N(s(r).toString(16)),N(E(n))];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*I(this._r,255))+"%",g:s(100*I(this._g,255))+"%",b:s(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*I(this._r,255))+"%, "+s(100*I(this._g,255))+"%, "+s(100*I(this._b,255))+"%)":"rgba("+s(100*I(this._r,255))+"%, "+s(100*I(this._g,255))+"%, "+s(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(C[v(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=d(e);r="#"+g(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(y,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(M,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(L,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(A,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:F(e[n]));e=r}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:f(),g:f(),b:f()})},d.mix=function(e,t,r){r=0===r?0:r||50;var n=d(e).toRgb(),a=d(t).toRgb(),i=r/100;return d({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},d.readability=function(e,t){var r=d(e),n=d(t);return(a.max(r.getLuminance(),n.getLuminance())+.05)/(a.min(r.getLuminance(),n.getLuminance())+.05)},d.isReadable=function(e,t,r){var n,a,i,o,l,s=d.readability(e,t);switch(a=!1,(i=r,"AA"!==(o=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==o&&(o="AA"),"small"!==(l=(i.size||"small").toLowerCase())&&"large"!==l&&(l="small"),n={level:o,size:l}).level+n.size){case"AAsmall":case"AAAlarge":a=s>=4.5;break;case"AAlarge":a=s>=3;break;case"AAAsmall":a=s>=7}return a},d.mostReadable=function(e,t,r){var n,a,i,o,l=null,s=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var c=0;c<t.length;c++)(n=d.readability(e,t[c]))>s&&(s=n,l=d(t[c]));return d.isReadable(e,l,{level:i,size:o})||!a?l:(r.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],r))};var O=d.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"},C=d.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(O);function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function R(e){return c(1,u(0,e))}function z(e){return parseInt(e,16)}function N(e){return 1==e.length?"0"+e:""+e}function F(e){return e<=1&&(e=100*e+"%"),e}function E(e){return a.round(255*parseFloat(e)).toString(16)}function H(e){return z(e)/255}var B,j,Y,V=(j="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",Y="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+j),rgba:new RegExp("rgba"+Y),hsl:new RegExp("hsl"+j),hsla:new RegExp("hsla"+Y),hsv:new RegExp("hsv"+j),hsva:new RegExp("hsva"+Y),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!!V.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(n=function(){return d}.call(t,r,t,e))||(e.exports=n)}(Math)},7020:function(e,t,r){var n=r(8700),a=r(896),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.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 r=e.match(s);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if("string"==typeof e){var t=e.match(c);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(u);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var a=t[t.length-1];r="i"===a||"I"===a}return this.toMonthIndex(e,n,r)},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,r){var a=this.intercalaryMonth(e);if(r&&t!==a||t<1||t>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!r&&t<=a?t-1:t:t-1},toChineseMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);if(t<0||t>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?t<r?t+1:t:t+1},intercalaryMonth:function(e){return e=this._validateYear(e),f[e-f[0]]>>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(e,t,r){var a,o=this._validateYear(e,n.local.invalidyear),l=d[o-d[0]],s=l>>9&4095,c=l>>5&15,u=31&l;(a=i.newDate(s,c,u)).add(4-(a.dayOfWeek()||7),"d");var f=this.toJD(e,t,r)-a.toJD();return 1+Math.floor(f/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 r=f[e-f[0]];if(t>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-t?30:29},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,l,r,n.local.invalidDate);e=this._validateYear(a.year()),t=a.month(),r=a.day();var o=this.isIntercalaryMonth(e,t),l=this.toChineseMonth(e,t),s=function(e,t,r,n,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 r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(s=!1,i=n):(s=!!n,i={}),o={year:e,month:t,day:r,isIntercalary:s}}l=o.day-1;var c,u=f[o.year-f[0]],h=u>>13;c=h&&(o.month>h||o.isIntercalary)?o.month:o.month-1;for(var p=0;p<c;p++)l+=u&1<<12-p?30:29;var v=d[o.year-d[0]],g=new Date(v>>9&4095,(v>>5&15)-1,(31&v)+l);return i.year=g.getFullYear(),i.month=1+g.getMonth(),i.day=g.getDate(),i}(e,l,r,o);return i.toJD(s.year,s.month,s.day)},fromJD:function(e){var t=i.fromJD(e),r=function(e,t,r,n){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 r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i={}}var o=d[a.year-d[0]],l=a.year<<9|a.month<<5|a.day;i.year=l>=o?a.year:a.year-1,o=d[i.year-d[0]];var s,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(a.year,a.month-1,a.day);s=Math.round((u-c)/864e5);var h,p=f[i.year-f[0]];for(h=0;h<13;h++){var v=p&1<<12-h?30:29;if(s<v)break;s-=v}var g=p>>13;return!g||h<g?(i.isIntercalary=!1,i.month=1+h):h===g?(i.isIntercalary=!0,i.month=h):(i.isIntercalary=!1,i.month=h),i.day=1+s,i}(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(l),r=this._validateYear(+t[1]),n=+t[2],a=!!t[3],i=this.toMonthIndex(r,n,a),o=+t[4];return this.newDate(r,i,o)},add:function(e,t,r){var n=e.year(),a=e.month(),i=this.isIntercalaryMonth(n,a),l=this.toChineseMonth(n,a),s=Object.getPrototypeOf(o.prototype).add.call(this,e,t,r);if("y"===r){var c=s.year(),u=s.month(),f=this.isIntercalaryMonth(c,l),d=i&&f?this.toMonthIndex(c,l,!0):this.toMonthIndex(c,l,!1);d!==u&&s.month(d)}return s}});var l=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,s=/^\d?\d[iI]?/m,c=/^闰?十?[一二三四五六七八九]?月/m,u=/^闰?十?[一二三四五六七八九]?/m;n.calendars.chinese=o;var f=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],d=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},7411:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Coptic",jdEpoch:1825029.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:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.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,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.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,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.coptic=i},5668:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){return(this._validate(e,t,r,n.local.invalidDate).day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year()+(a.year()<0?1:0),t=a.month(),(r=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 r=Math.floor(e/32)+1,n=e-32*(r-1)+1;return this.newDate(t<=0?t-1:t,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=i},2787:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.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,n.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,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.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,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.ethiopian=i},2084:function(e,t,r){var n=r(8700),a=r(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 n.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,n.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,n.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,n.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,n.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,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e<=0?e+1:e,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var l=7;l<=this.monthsInYear(e);l++)o+=this.daysInMonth(e,l);for(l=1;l<t;l++)o+=this.daysInMonth(e,l)}else for(l=7;l<t;l++)o+=this.daysInMonth(e,l);return o},_delay1:function(e){var t=Math.floor((235*e-234)/19),r=12084+13753*t,n=29*t+Math.floor(r/25920);return o(3*(n+1),7)<3&&n++,n},_delay2:function(e){var t=this._delay1(e-1),r=this._delay1(e);return this._delay1(e+1)-r==356?2:r-t==382?1:0},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor(98496*(e-this.jdEpoch)/35975351)-1;e>=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=e<this.toJD(t,1,1)?7:1;e>this.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.hebrew=i},6368:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.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īs","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,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),e=e<=0?e+1:e,(r=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 r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.islamic=i},4747:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.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,n.local.invalidYear);return(e=t.year()<0?t.year()+1:t.year())%4==0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),r=a.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*r),a=Math.floor((t-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),l=t-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,l)}}),n.calendars.julian=i},5616:function(e,t,r){var n=r(8700),a=r(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 n.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,n.local.invalidYear),!1},formatYear:function(e){e=this._validate(e,this.minMonth,this.minDay,n.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,r=0;r<e.length;r++){var n=parseInt(e[r],10);if(Math.abs(n)>19||r>0&&n<0)throw"Invalid Mayan year";t=20*t+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate).day()},weekDay:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),!0},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.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,r){var a=this._validate(e,t,r,n.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 r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}}),n.calendars.mayan=i},632:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar;var o=n.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,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidMonth);(e=a.year())<0&&e++;for(var i=a.day(),l=1;l<a.month();l++)i+=this.daysPerMonth[l-1];return i+o.toJD(e+1468,3,13)},fromJD:function(e){e=Math.floor(e+.5);for(var t=Math.floor((e-(this.jdEpoch-1))/366);e>=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}}),n.calendars.nanakshahi=i},3040:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.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,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){if(e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[e])return this.daysPerYear;for(var t=0,r=this.minMonth;r<=12;r++)t+=this.NEPALI_CALENDAR_DATA[e][r];return t},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[e]?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=n.instance(),o=0,l=t,s=e;this._createMissingCalendarData(e);var c=e-(l>9||9===l&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(9!==t&&(o=r,l--);9!==l;)l<=0&&(l=12,s--),o+=this.NEPALI_CALENDAR_DATA[s][l],l--;return 9===t?(o+=r-this.NEPALI_CALENDAR_DATA[s][0])<0&&(o+=i.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(e){var t=n.instance().fromJD(e),r=t.year(),a=t.dayOfYear(),i=r+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 c=this.NEPALI_CALENDAR_DATA[i][o]-(s-a);return this.newDate(i,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r<e+2;r++)void 0===this.NEPALI_CALENDAR_DATA[r]&&(this.NEPALI_CALENDAR_DATA[r]=t)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),n.calendars.nepali=i},1104:function(e,t,r){var n=r(8700),a=r(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 n.baseCalendar,a(i.prototype,{name:"Persian",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return 682*((t.year()-(t.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e-(e>=0?474:473),l=474+o(i,2820);return r+(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),r=Math.floor(t/1029983),n=o(t,1029983),a=2820;if(1029982!==n){var i=Math.floor(n/366),l=o(n,366);a=Math.floor((2134*i+2816*l+2815)/1028522)+i+1}var s=a+2820*r+474;s=s<=0?s-1:s;var c=e-this.toJD(s,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),f=e-this.toJD(s,u,1)+1;return this.newDate(s,u,f)}}),n.calendars.persian=i,n.calendars.jalali=i},9075:function(e,t,r){var n=r(8700),a=r(896),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.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,n.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,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)}}),n.calendars.taiwan=o},4592:function(e,t,r){var n=r(8700),a=r(896),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.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,n.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,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)}}),n.calendars.thai=o},5348:function(e,t,r){var n=r(8700),a=r(896);function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.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āthā","Yawm al-Arbaā","Yawm al-Khamīs","Yawm al-Juma","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,n.local.invalidYear);return 355===this.daysInYear(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,a=0,i=0;i<o.length;i++){if(o[i]>r)return o[a]-o[a-1];a++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.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,r=0,n=0;n<o.length&&!(o[n]>t);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),l=i+1,s=a-12*i,c=t-o[r-1]+1;return this.newDate(l,s,c)},isValid:function(e,t,r){var a=n.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(e=null!=e.year?e.year:e)>=1276&&e<=1500),a},_validate:function(e,t,r,a){var i=n.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw a.replace(/\{0\}/,this.local.name);return i}}),n.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,r){var n=r(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,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.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[""]}n(a.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return(n=(null!=e&&e.year?e.calendar():"string"==typeof n?this.instance(n,a):n)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(0===i?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),n(i.prototype,{newDate:function(e,t,r){return this._calendar.newDate(null==e?this:e,t,r)},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,r){if(!this._calendar.isValid(e,t,r))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,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(c.local.differentCalendars||c.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)}}),n(l.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new i(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+o(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var n=e.toJD()+t*("w"===r?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0);a=e.day(),"y"===r?(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"===r&&(function(e){for(;o<e.minMonth;)i--,o+=e.monthsInYear(i);for(var t=e.monthsInYear(i);o>t-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(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||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"]}[n],i=r<0?-1:1;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),a="m"===r?t:e.month(),i="d"===r?t:e.day();return"y"!==r&&"m"!==r||(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth<this.monthsInYear(a)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(a)}return this._validateLevel--,n},toJSDate:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return c.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(e){return this.fromJD(c.instance().fromJSDate(e).toJD())},_validate:function(e,t,r,n){if(e.year){if(0===this._validateLevel&&this.name!==e.calendar().name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,e.calendar().local.name);return e}try{if(this._validateLevel++,1===this._validateLevel&&!this.isValid(e,t,r))throw n.replace(/\{0\}/,this.local.name);var a=this.newDate(e,t,r);return this._validateLevel--,a}catch(e){throw this._validateLevel--,e}}}),s.prototype=new l,n(s.prototype,{name:"Gregorian",jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],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,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==0&&(e%100!=0||e%400==0)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<3&&(t+=12,e--);var a=Math.floor(e/100),i=2-a+Math.floor(a/4);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r+i-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=Math.floor((t-1867216.25)/36524.25),n=1524+(r=t+1+r-Math.floor(r/4)),a=Math.floor((n-122.1)/365.25),i=Math.floor(365.25*a),o=Math.floor((n-i)/30.6001),l=n-i-Math.floor(30.6001*o),s=o-(o>13.5?13:1),c=a-(s>2.5?4716:4715);return c<=0&&c--,this.newDate(c,s,l)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.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 c=e.exports=new a;c.cdate=i,c.baseCalendar=l,c.calendars.gregorian=s},5168:function(e,t,r){var n=r(896),a=r(8700);n(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[""],n(a.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),n(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,r){if("string"!=typeof e&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var n,i,o,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,s=r.dayNames||this.local.dayNames,c=r.monthNumbers||this.local.monthNumbers,u=r.monthNamesShort||this.local.monthNamesShort,f=r.monthNames||this.local.monthNames,d=(r.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;_+n<e.length&&e.charAt(_+n)===t;)n++;return _+=n-1,Math.floor(n/(r||1))>1}),h=function(e,t,r,n){var a=""+t;if(d(e,n))for(;a.length<r;)a="0"+a;return a},p=this,v=function(e){return"function"==typeof c?c.call(p,e,d("m")):m(h("m",e.month(),2))},g=function(e,t){return t?"function"==typeof f?f.call(p,e):f[e.month()-p.minMonth]:"function"==typeof u?u.call(p,e):u[e.month()-p.minMonth]},y=this.local.digits,m=function(e){return r.localNumbers&&y?y(e):e},x="",b=!1,_=0;_<e.length;_++)if(b)"'"!==e.charAt(_)||d("'")?x+=e.charAt(_):b=!1;else switch(e.charAt(_)){case"d":x+=m(h("d",t.day(),2));break;case"D":x+=("D",n=t.dayOfWeek(),i=l,o=s,d("D")?o[n]:i[n]);break;case"o":x+=h("o",t.dayOfYear(),3);break;case"w":x+=h("w",t.weekOfYear(),2);break;case"m":x+=v(t);break;case"M":x+=g(t,d("M"));break;case"y":x+=d("y",2)?t.year():(t.year()%100<10?"0":"")+t.year()%100;break;case"Y":d("Y",2),x+=t.formatYear();break;case"J":x+=t.toJD();break;case"@":x+=(t.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":x+=(t.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":d("'")?x+="'":b=!0;break;default:x+=e.charAt(_)}return x},parseDate:function(e,t,r){if(null==t)throw a.local.invalidArguments||a.regionalOptions[""].invalidArguments;if(""===(t="object"==typeof t?t.toString():t+""))return null;e=e||this.local.dateFormat;var n=(r=r||{}).shortYearCutoff||this.shortYearCutoff;n="string"!=typeof n?n:this.today().year()%100+parseInt(n,10);for(var i=r.dayNamesShort||this.local.dayNamesShort,o=r.dayNames||this.local.dayNames,l=r.parseMonth||this.local.parseMonth,s=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,f=-1,d=-1,h=-1,p=-1,v=-1,g=!1,y=!1,m=function(t,r){for(var n=1;A+n<e.length&&e.charAt(A+n)===t;)n++;return A+=n-1,Math.floor(n/(r||1))>1},x=function(e,r){var n=m(e,r),i=[2,3,n?4:2,n?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){m("m");var e=s.call(b,t.substring(k));return k+=e.length,e}return x("m")},w=function(e,r,n,i){for(var o=m(e,i)?n:r,l=0;l<o.length;l++)if(t.substr(k,o[l].length).toLowerCase()===o[l].toLowerCase())return k+=o[l].length,l+b.minMonth;throw(a.local.unknownNameAt||a.regionalOptions[""].unknownNameAt).replace(/\{0\}/,k)},T=function(){if("function"==typeof u){var e=m("M")?u.call(b,t.substring(k)):c.call(b,t.substring(k));return k+=e.length,e}return w("M",c,u)},M=function(){if(t.charAt(k)!==e.charAt(A))throw(a.local.unexpectedLiteralAt||a.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,k);k++},k=0,A=0;A<e.length;A++)if(y)"'"!==e.charAt(A)||m("'")?M():y=!1;else switch(e.charAt(A)){case"d":p=x("d");break;case"D":w("D",i,o);break;case"o":v=x("o");break;case"w":x("w");break;case"m":h=_();break;case"M":h=T();break;case"y":var L=A;g=!m("y",2),A=L,d=x("y",2);break;case"Y":d=x("Y",2);break;case"J":f=x("J")+.5,"."===t.charAt(k)&&(k++,x("J"));break;case"@":f=x("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":f=x("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":k=t.length;break;case"'":m("'")?M():y=!0;break;default:M()}if(k<t.length)throw a.local.unexpectedText||a.regionalOptions[""].unexpectedText;if(-1===d?d=this.today().year():d<100&&g&&(d+=-1===n?1900:this.today().year()-this.today().year()%100-(d<=n?0:100)),"string"==typeof h&&(h=l.call(this,d,h)),v>-1){h=1,p=v;for(var S=this.daysInMonth(d,h);p>S;S=this.daysInMonth(d,h))h++,p-=S}return f>-1?this.fromJD(f):this.newDate(d,h,p)},determineDate:function(e,t,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return t=t?t.newDate():null,null==e?t:"string"==typeof e?function(e){try{return i.parseDate(n,e,a)}catch(e){}for(var t=((e=e.toLowerCase()).match(/^c/)&&r?r.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 r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}return r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(3472)}()}));