@deephaven/code-studio 0.40.3 → 0.40.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/{AppRoot-a9081354.js → AppRoot-fc9e2e47.js} +2 -2
- package/build/assets/{AppRoot-a9081354.js.map → AppRoot-fc9e2e47.js.map} +1 -1
- package/build/assets/{index-2e5617e0.js → index-083cc9ad.js} +2 -2
- package/build/assets/{index-2e5617e0.js.map → index-083cc9ad.js.map} +1 -1
- package/build/assets/{index-941356c7.js → index-b9a7a908.js} +2 -2
- package/build/assets/{index-941356c7.js.map → index-b9a7a908.js.map} +1 -1
- package/build/assets/plotly-071d96ca.js +7 -0
- package/build/assets/{plotly-ebf80adc.js.map → plotly-071d96ca.js.map} +1 -1
- package/build/assets/{useConnection-0e37dba9.js → useConnection-534b145e.js} +2 -2
- package/build/assets/{useConnection-0e37dba9.js.map → useConnection-534b145e.js.map} +1 -1
- package/build/index.html +1 -1
- package/package.json +30 -30
- package/build/assets/plotly-ebf80adc.js +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{g as Li,c as CA}from"./helpers-042e6b4d.js";import{r as DA,p as $A,f as _t,t as da,d as yt,g as f1,a as Al,i as PA,b as c1,e as uh,c as u1,m as EA,h as v1,j as d1,k as RA,n as zA,l as IA,o as FA,q as h1,s as NA,u as HA,v as OA,w as BA,x as jA,y as GA,z as UA,A as vh,B as p1}from"./vendor-aaea4a59.js";var m1={};(function(t){function e(x){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},e(x)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var r=o(DA),a=i($A);function i(x){return x&&x.__esModule?x:{default:x}}function n(x){if(typeof WeakMap!="function")return null;var _=new WeakMap,T=new WeakMap;return(n=function(S){return S?T:_})(x)}function o(x,_){if(!_&&x&&x.__esModule)return x;if(x===null||e(x)!=="object"&&typeof x!="function")return{default:x};var T=n(_);if(T&&T.has(x))return T.get(x);var k={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in x)if(M!=="default"&&Object.prototype.hasOwnProperty.call(x,M)){var D=S?Object.getOwnPropertyDescriptor(x,M):null;D&&(D.get||D.set)?Object.defineProperty(k,M,D):k[M]=x[M]}return k.default=x,T&&T.set(x,k),k}function l(x,_){if(!(x instanceof _))throw new TypeError("Cannot call a class as a function")}function s(x,_){for(var T=0;T<_.length;T++){var k=_[T];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(x,k.key,k)}}function f(x,_,T){return _&&s(x.prototype,_),T&&s(x,T),Object.defineProperty(x,"prototype",{writable:!1}),x}function c(x,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(_&&_.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),Object.defineProperty(x,"prototype",{writable:!1}),_&&v(x,_)}function v(x,_){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(k,S){return k.__proto__=S,k},v(x,_)}function u(x){var _=p();return function(){var k=y(x),S;if(_){var M=y(this).constructor;S=Reflect.construct(k,arguments,M)}else S=k.apply(this,arguments);return h(this,S)}}function h(x,_){if(_&&(e(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d(x)}function d(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function y(x){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},y(x)}var m=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],g=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],w=typeof window<"u";function b(x){var _=function(T){c(S,T);var k=u(S);function S(M){var D;return l(this,S),D=k.call(this,M),D.p=Promise.resolve(),D.resizeHandler=null,D.handlers={},D.syncWindowResize=D.syncWindowResize.bind(d(D)),D.syncEventHandlers=D.syncEventHandlers.bind(d(D)),D.attachUpdateEvents=D.attachUpdateEvents.bind(d(D)),D.getRef=D.getRef.bind(d(D)),D.handleUpdate=D.handleUpdate.bind(d(D)),D.figureCallback=D.figureCallback.bind(d(D)),D.updatePlotly=D.updatePlotly.bind(d(D)),D}return f(S,[{key:"updatePlotly",value:function(D,A,C){var $=this;this.p=this.p.then(function(){if(!$.unmounting){if(!$.el)throw new Error("Missing element reference");return x.react($.el,{data:$.props.data,layout:$.props.layout,config:$.props.config,frames:$.props.frames})}}).then(function(){$.unmounting||($.syncWindowResize(D),$.syncEventHandlers(),$.figureCallback(A),C&&$.attachUpdateEvents())}).catch(function(N){$.props.onError&&$.props.onError(N)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(D){this.unmounting=!1;var A=D.frames&&D.frames.length?D.frames.length:0,C=this.props.frames&&this.props.frames.length?this.props.frames.length:0,$=!(D.layout===this.props.layout&&D.data===this.props.data&&D.config===this.props.config&&C===A),N=D.revision!==void 0,E=D.revision!==this.props.revision;!$&&(!N||N&&!E)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&w&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),x.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var D=this;!this.el||!this.el.removeListener||g.forEach(function(A){D.el.on(A,D.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var D=this;!this.el||!this.el.removeListener||g.forEach(function(A){D.el.removeListener(A,D.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(D){if(typeof D=="function"){var A=this.el,C=A.data,$=A.layout,N=this.el._transitionData?this.el._transitionData._frames:null,E={data:C,layout:$,frames:N};D(E,this.el)}}},{key:"syncWindowResize",value:function(D){var A=this;w&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return x.Plots.resize(A.el)},window.addEventListener("resize",this.resizeHandler),D&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(D){this.el=D,this.props.debug&&w&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var D=this;m.forEach(function(A){var C=D.props["on"+A],$=D.handlers[A],N=!!$;C&&!N?D.addEventHandler(A,C):!C&&N?D.removeEventHandler(A):C&&N&&C!==$&&(D.removeEventHandler(A),D.addEventHandler(A,C))})}},{key:"addEventHandler",value:function(D,A){this.handlers[D]=A,this.el.on(this.getPlotlyEventName(D),this.handlers[D])}},{key:"removeEventHandler",value:function(D){this.el.removeListener(this.getPlotlyEventName(D),this.handlers[D]),delete this.handlers[D]}},{key:"getPlotlyEventName",value:function(D){return"plotly_"+D.toLowerCase()}},{key:"render",value:function(){return r.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),S}(r.Component);return _.propTypes={data:a.default.arrayOf(a.default.object),config:a.default.object,layout:a.default.object,frames:a.default.arrayOf(a.default.object),revision:a.default.number,onInitialized:a.default.func,onPurge:a.default.func,onError:a.default.func,onUpdate:a.default.func,debug:a.default.bool,style:a.default.object,className:a.default.string,useResizeHandler:a.default.bool,divId:a.default.string},m.forEach(function(T){_.propTypes["on"+T]=a.default.func}),_.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},_}})(m1);const vO=Li(m1);var y1={},sc={};sc.version="2.18.2";var g1={exports:{}},ir={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"},Xr={},dh=Array.isArray,VA=ArrayBuffer,WA=DataView;function b1(t){return VA.isView(t)&&!(t instanceof WA)}Xr.isTypedArray=b1;function Df(t){return dh(t)||b1(t)}Xr.isArrayOrTypedArray=Df;function XA(t){return!Df(t[0])}Xr.isArray1D=XA;Xr.ensureArray=function(t,e){return dh(t)||(t=[]),t.length=e,t};Xr.concat=function(){var t=[],e=!0,r=0,a,i,n,o,l,s,f,c;for(n=0;n<arguments.length;n++)o=arguments[n],s=o.length,s&&(i?t.push(o):(i=o,l=s),dh(o)?a=!1:(e=!1,r?a!==o.constructor&&(a=!1):a=o.constructor),r+=s);if(!r)return[];if(!t.length)return i;if(e)return i.concat.apply(i,t);if(a){for(f=new a(r),f.set(i),n=0;n<t.length;n++)o=t[n],f.set(o,l),l+=o.length;return f}for(f=new Array(r),c=0;c<i.length;c++)f[c]=i[c];for(n=0;n<t.length;n++){for(o=t[n],c=0;c<o.length;c++)f[l+c]=o[c];l+=c}return f};Xr.maxRowLength=function(t){return x1(t,Math.max,0)};Xr.minRowLength=function(t){return x1(t,Math.min,1/0)};function x1(t,e,r){if(Df(t))if(Df(t[0])){for(var a=r,i=0;i<t.length;i++)a=e(a,t[i].length);return a}else return t.length;return 0}var _1=_t,hh=Xr.isArrayOrTypedArray,ph=function(e,r){if(_1(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";for(var a=0,i=r.split("."),n,o,l;a<i.length;){if(n=String(i[a]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),n){if(n[1])i[a]=n[1];else if(a===0)i.splice(0,1);else throw"bad property string";for(o=n[2].substr(1,n[2].length-2).split("]["),l=0;l<o.length;l++)a++,i.splice(a,0,Number(o[l]))}a++}return typeof e!="object"?KA(e,r,i):{set:T1(e,i,r),get:w1(e,i),astr:r,parts:i,obj:e}};function w1(t,e){return function(){var r=t,a,i,n,o,l;for(o=0;o<e.length-1;o++){if(a=e[o],a===-1){for(i=!0,n=[],l=0;l<r.length;l++)n[l]=w1(r[l],e.slice(o+1))(),n[l]!==n[0]&&(i=!1);return i?n[0]:n}if(typeof a=="number"&&!hh(r)||(r=r[a],typeof r!="object"||r===null))return}if(!(typeof r!="object"||r===null)&&(n=r[e[o]],n!==null))return n}}var YA=/(^|\.)args\[/;function od(t,e){return t===void 0||t===null&&!e.match(YA)}function T1(t,e,r){return function(a){var i=t,n="",o=od(a,r),l,s;for(s=0;s<e.length-1;s++){if(l=e[s],typeof l=="number"&&!hh(i))throw"array index but container is not an array";if(l===-1){if(o=!ZA(i,e.slice(s+1),a,r),o)break;return}if(!k1(i,l,e[s+1],o))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";n=qA(n,l)}if(o){if(s===e.length-1&&(delete i[e[s]],Array.isArray(i)&&+e[s]===i.length-1))for(;i.length&&i[i.length-1]===void 0;)i.pop()}else i[e[s]]=a}}function qA(t,e){var r=e;return _1(e)?r="["+e+"]":t&&(r="."+e),t+r}function ZA(t,e,r,a){var i=hh(r),n=!0,o=r,l=a.replace("-1",0),s=i?!1:od(r,l),f=e[0],c;for(c=0;c<t.length;c++)l=a.replace("-1",c),i&&(o=r[c%r.length],s=od(o,l)),s&&(n=!1),k1(t,c,f,s)&&T1(t[c],e,a.replace("-1",c))(o);return n}function k1(t,e,r,a){if(t[e]===void 0){if(a)return!1;typeof r=="number"?t[e]=[]:t[e]={}}return!0}function KA(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var An=ph,QA=/^\w*$/,JA=0,Qp=1,us=2,Jp=3,Fi=4,eM=function(e,r,a,i){a=a||"name",i=i||"value";var n,o,l,s={};r&&r.length?(l=An(e,r),o=l.get()):o=e,r=r||"";var f={};if(o)for(n=0;n<o.length;n++)f[o[n][a]]=n;var c=QA.test(i),v={set:function(u,h){var d=h===null?Fi:JA;if(!o){if(!l||d===Fi)return;o=[],l.set(o)}var p=f[u];if(p===void 0){if(d===Fi)return;d=d|Jp,p=o.length,f[u]=p}else h!==(c?o[p][i]:An(o[p],i).get())&&(d=d|us);var y=o[p]=o[p]||{};return y[a]=u,c?y[i]=h:An(y,i).set(h),h!==null&&(d=d&~Fi),s[p]=s[p]|d,v},get:function(u){if(o){var h=f[u];if(h!==void 0)return c?o[h][i]:An(o[h],i).get()}},rename:function(u,h){var d=f[u];return d===void 0||(s[d]=s[d]|Qp,f[h]=d,delete f[u],o[d][a]=h),v},remove:function(u){var h=f[u];if(h===void 0)return v;var d=o[h];if(Object.keys(d).length>2)return s[h]=s[h]|us,v.set(u,null);if(c){for(n=h;n<o.length;n++)s[n]=s[n]|Jp;for(n=h;n<o.length;n++)f[o[n][a]]--;o.splice(h,1),delete f[u]}else An(d,i).set(null),s[h]=s[h]|us|Fi;return v},constructUpdate:function(){for(var u,h,d={},p=Object.keys(s),y=0;y<p.length;y++)h=p[y],u=r+"["+h+"]",o[h]?(s[h]&Qp&&(d[u+"."+a]=o[h][a]),s[h]&us&&(c?d[u+"."+i]=s[h]&Fi?null:o[h][i]:d[u+"."+i]=s[h]&Fi?null:An(o[h],i).get())):d[u]=null;return d}};return v},tM=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,rM=/^[^\.\[\]]+$/,aM=function(t,e){for(;e;){var r=t.match(tM);if(r)t=r[1];else if(t.match(rM))t="";else throw new Error("bad relativeAttr call:"+[t,e]);if(e.charAt(0)==="^")e=e.slice(1);else break}return t&&e.charAt(0)!=="["?t+"."+e:t+e},Wl=function(e){return window&&window.process&&window.process.versions?Object.prototype.toString.call(e)==="[object Object]":Object.prototype.toString.call(e)==="[object Object]"&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")},iM=_t,mh=function(e,r){if(e>0)return Math.log(e)/Math.LN10;var a=Math.log(Math.min(r[0],r[1]))/Math.LN10;return iM(a)||(a=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),a},em=Xr.isArrayOrTypedArray,Fo=Wl,nM=function t(e,r){for(var a in r){var i=r[a],n=e[a];if(n!==i)if(a.charAt(0)==="_"||typeof i=="function"){if(a in e)continue;e[a]=i}else if(em(i)&&em(n)&&Fo(i[0])){if(a==="customdata"||a==="ids")continue;for(var o=Math.min(i.length,n.length),l=0;l<o;l++)n[l]!==i[l]&&Fo(i[l])&&Fo(n[l])&&t(n[l],i[l])}else Fo(i)&&Fo(n)&&(t(n,i),Object.keys(n).length||delete e[a])}};function oM(t,e){var r=t%e;return r<0?r+e:r}function lM(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}var Xl={mod:oM,modHalf:lM},A1={},Dr=function(t){var e=t.editType,r=t.colorEditType;r===void 0&&(r=e);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:e,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:e},color:{valType:"color",editType:r},editType:e,description:""+(t.description||"")};return t.autoSize&&(a.size.dflt="auto"),t.autoColor&&(a.color.dflt="auto"),t.arrayOk&&(a.family.arrayOk=!0,a.size.arrayOk=!0,a.color.arrayOk=!0),a},fc={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"},M1=fc,S1=Dr,yh=S1({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});yh.family.dflt=M1.HOVERFONT;yh.size.dflt=M1.HOVERFONTSIZE;var Yl={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:yh,grouptitlefont:S1({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}},Kt={},tm=Wl,No=Array.isArray;function sM(t,e){var r,a;for(r=0;r<t.length;r++){if(a=t[r],a!==null&&typeof a=="object")return!1;a!==void 0&&(e[r]=a)}return!0}Kt.extendFlat=function(){return ql(arguments,!1,!1,!1)};Kt.extendDeep=function(){return ql(arguments,!0,!1,!1)};Kt.extendDeepAll=function(){return ql(arguments,!0,!0,!1)};Kt.extendDeepNoArrays=function(){return ql(arguments,!0,!1,!0)};function ql(t,e,r,a){var i=t[0],n=t.length,o,l,s,f,c,v,u;if(n===2&&No(i)&&No(t[1])&&i.length===0){if(u=sM(t[1],i),u)return i;i.splice(0,i.length)}for(var h=1;h<n;h++){o=t[h];for(l in o)s=i[l],f=o[l],a&&No(f)?i[l]=f:e&&f&&(tm(f)||(c=No(f)))?(c?(c=!1,v=s&&No(s)?s:[]):v=s&&tm(s)?s:{},i[l]=ql([v,f],e,r,a)):(typeof f<"u"||r)&&(i[l]=f)}return i}var fM=Dr,vs=Yl.hoverlabel,ds=Kt.extendFlat,cc={hoverlabel:{bgcolor:ds({},vs.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:ds({},vs.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:fM({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:ds({},vs.align,{arrayOk:!0}),namelength:ds({},vs.namelength,{arrayOk:!0}),editType:"none"}},cM=Dr,uM=cc,Ba={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:cM({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with `*reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")},legendwidth:{valType:"number",min:0,editType:"style",description:"Sets the width (in px or fraction) of the legend for this trace."},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appear as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:uM.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}},vM=da,uc={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)"]]},L1=uc.RdBu;function dM(t,e){if(e||(e=L1),!t)return e;function r(){try{t=uc[t]||JSON.parse(t)}catch{t=e}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),C1(t)?t:e}function C1(t){var e=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;r<t.length;r++){var a=t[r];if(a.length!==2||+a[0]<e||!vM(a[1]).isValid())return!1;e=+a[0]}return!0}function hM(t){return uc[t]!==void 0?!0:C1(t)}var Ao={scales:uc,defaultScale:L1,get:dM,isValid:hM},D1={exports:{}},$r={};$r.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];$r.defaultLine="#444";$r.lightLine="#eee";$r.background="#fff";$r.borderLine="#BEC8D9";$r.lightFraction=100*(14-4)/(15-4);var Sa=da,pM=_t,mM=Xr.isTypedArray,gr=D1.exports={},vc=$r;gr.defaults=vc.defaults;var yM=gr.defaultLine=vc.defaultLine;gr.lightLine=vc.lightLine;var ld=gr.background=vc.background;gr.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"};gr.rgb=function(t){return gr.tinyRGB(Sa(t))};gr.opacity=function(t){return t?Sa(t).getAlpha():0};gr.addOpacity=function(t,e){var r=Sa(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"};gr.combine=function(t,e){var r=Sa(t).toRgb();if(r.a===1)return Sa(t).toRgbString();var a=Sa(e||ld).toRgb(),i=a.a===1?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},n={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 Sa(n).toRgbString()};gr.contrast=function(t,e,r){var a=Sa(t);a.getAlpha()!==1&&(a=Sa(gr.combine(t,ld)));var i=a.isDark()?e?a.lighten(e):ld:r?a.darken(r):yM;return i.toString()};gr.stroke=function(t,e){var r=Sa(e);t.style({stroke:gr.tinyRGB(r),"stroke-opacity":r.getAlpha()})};gr.fill=function(t,e){var r=Sa(e);t.style({fill:gr.tinyRGB(r),"fill-opacity":r.getAlpha()})};gr.clean=function(t){if(!(!t||typeof t!="object")){var e=Object.keys(t),r,a,i,n;for(r=0;r<e.length;r++)if(i=e[r],n=t[i],i.substr(i.length-5)==="color")if(Array.isArray(n))for(a=0;a<n.length;a++)n[a]=Jc(n[a]);else t[i]=Jc(n);else if(i.substr(i.length-10)==="colorscale"&&Array.isArray(n))for(a=0;a<n.length;a++)Array.isArray(n[a])&&(n[a][1]=Jc(n[a][1]));else if(Array.isArray(n)){var o=n[0];if(!Array.isArray(o)&&o&&typeof o=="object")for(a=0;a<n.length;a++)gr.clean(n[a])}else n&&typeof n=="object"&&!mM(n)&&gr.clean(n)}};function Jc(t){if(pM(t)||typeof t!="string")return t;var e=t.trim();if(e.substr(0,3)!=="rgb")return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var a=r[1].trim().split(/\s*[\s,]\s*/),i=e.charAt(3)==="a"&&a.length===4;if(!i&&a.length!==3)return t;for(var n=0;n<a.length;n++){if(!a[n].length||(a[n]=Number(a[n]),!(a[n]>=0)))return t;if(n===3)a[n]>1&&(a[n]=1);else if(a[n]>=1)return t}var o=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return i?"rgba("+o+", "+a[3]+")":"rgb("+o+")"}var ut=D1.exports,Zl={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2},Mo={};Mo.counter=function(t,e,r,a){var i=(e||"")+(r?"":"$"),n=a===!1?"":"^";return t==="xy"?new RegExp(n+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(n+t+"([2-9]|[1-9][0-9]+)?"+i)};(function(t){var e=_t,r=da,a=Ba,i=Ao,n=ut,o=Zl.DESELECTDIM,l=ph,s=Mo.counter,f=Xl.modHalf,c=Xr.isArrayOrTypedArray;t.valObjectMeta={data_array:{description:["An {array} of data.","The value MUST be an {array}, or we ignore it.","Note that typed arrays (e.g. Float32Array) are supported."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){c(u)?h.set(u):d!==void 0&&h.set(d)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(u,h,d,p){p.coerceNumber&&(u=+u),p.values.indexOf(u)===-1?h.set(d):h.set(u)},validateFunction:function(u,h){h.coerceNumber&&(u=+u);for(var d=h.values,p=0;p<d.length;p++){var y=String(d[p]);if(y.charAt(0)==="/"&&y.charAt(y.length-1)==="/"){var m=new RegExp(y.substr(1,y.length-2));if(m.test(u))return!0}else if(u===d[p])return!0}return!1}},boolean:{description:"A boolean (true/false) value.",requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){u===!0||u===!1?h.set(u):h.set(d)}},number:{description:["A number or a numeric value","(e.g. a number inside a string).","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,h,d,p){!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?h.set(d):h.set(+u)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,h,d,p){u%1||!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?h.set(d):h.set(+u)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(u,h,d,p){if(typeof u!="string"){var y=typeof u=="number";p.strict===!0||!y?h.set(d):h.set(String(u))}else p.noBlank&&!u?h.set(d):h.set(u)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(u,h,d){r(u).isValid()?h.set(u):h.set(d)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){function p(y){return r(y).isValid()}!Array.isArray(u)||!u.length?h.set(d):u.every(p)?h.set(u):h.set(d)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(i.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){h.set(i.get(u,d))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(u,h,d){u==="auto"?h.set("auto"):e(u)?h.set(f(+u,360)):h.set(d)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(u,h,d,p){var y=p.regex||s(d);if(typeof u=="string"&&y.test(u)){h.set(u);return}h.set(d)},validateFunction:function(u,h){var d=h.dflt;return u===d?!0:typeof u!="string"?!1:!!s(d).test(u)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(u,h,d,p){if((p.extras||[]).indexOf(u)!==-1){h.set(u);return}if(typeof u!="string"){h.set(d);return}for(var y=u.split("+"),m=0;m<y.length;){var g=y[m];p.flags.indexOf(g)===-1||y.indexOf(g)<m?y.splice(m,1):m++}y.length?h.set(y.join("+")):h.set(d)}},any:{description:"Any type.",requiredOpts:[],otherOpts:["dflt","values","arrayOk"],coerceFunction:function(u,h,d){u===void 0?h.set(d):h.set(u)}},info_array:{description:["An {array} of plot information."].join(" "),requiredOpts:["items"],otherOpts:["dflt","freeLength","dimensions"],coerceFunction:function(u,h,d,p){function y($,N,E){var P,R={set:function(L){P=L}};return E===void 0&&(E=N.dflt),t.valObjectMeta[N.valType].coerceFunction($,R,E,N),P}var m=p.dimensions===2||p.dimensions==="1-2"&&Array.isArray(u)&&Array.isArray(u[0]);if(!Array.isArray(u)){h.set(d);return}var g=p.items,w=[],b=Array.isArray(g),x=b&&m&&Array.isArray(g[0]),_=m&&b&&!x,T=b&&!_?g.length:u.length,k,S,M,D,A,C;if(d=Array.isArray(d)?d:[],m)for(k=0;k<T;k++)for(w[k]=[],M=Array.isArray(u[k])?u[k]:[],_?A=g.length:b?A=g[k].length:A=M.length,S=0;S<A;S++)_?D=g[S]:b?D=g[k][S]:D=g,C=y(M[S],D,(d[k]||[])[S]),C!==void 0&&(w[k][S]=C);else for(k=0;k<T;k++)C=y(u[k],b?g[k]:g,d[k]),C!==void 0&&(w[k]=C);h.set(w)},validateFunction:function(u,h){if(!Array.isArray(u))return!1;var d=h.items,p=Array.isArray(d),y=h.dimensions===2;if(!h.freeLength&&u.length!==d.length)return!1;for(var m=0;m<u.length;m++)if(y){if(!Array.isArray(u[m])||!h.freeLength&&u[m].length!==d[m].length)return!1;for(var g=0;g<u[m].length;g++)if(!v(u[m][g],p?d[m][g]:d))return!1}else if(!v(u[m],p?d[m]:d))return!1;return!0}}},t.coerce=function(u,h,d,p,y){var m=l(d,p).get(),g=l(u,p),w=l(h,p),b=g.get(),x=h._template;if(b===void 0&&x&&(b=l(x,p).get(),x=0),y===void 0&&(y=m.dflt),m.arrayOk&&c(b))return w.set(b),b;var _=t.valObjectMeta[m.valType].coerceFunction;_(b,w,y,m);var T=w.get();return x&&T===y&&!v(b,m)&&(b=l(x,p).get(),_(b,w,y,m),T=w.get()),T},t.coerce2=function(u,h,d,p,y){var m=l(u,p),g=t.coerce(u,h,d,p,y),w=m.get();return w!=null?g:!1},t.coerceFont=function(u,h,d){var p={};return d=d||{},p.family=u(h+".family",d.family),p.size=u(h+".size",d.size),p.color=u(h+".color",d.color),p},t.coercePattern=function(u,h,d,p){var y=u(h+".shape");if(y){u(h+".solidity"),u(h+".size");var m=u(h+".fillmode"),g=m==="overlay";if(!p){var w=u(h+".bgcolor",g?d:void 0);u(h+".fgcolor",g?n.contrast(w):d)}u(h+".fgopacity",g?.5:1)}},t.coerceHoverinfo=function(u,h,d){var p=h._module.attributes,y=p.hoverinfo?p:a,m=y.hoverinfo,g;if(d._dataLength===1){var w=m.dflt==="all"?m.flags.slice():m.dflt.split("+");w.splice(w.indexOf("name"),1),g=w.join("+")}return t.coerce(u,h,y,"hoverinfo",g)},t.coerceSelectionMarkerOpacity=function(u,h){if(u.marker){var d=u.marker.opacity;if(d!==void 0){var p,y;!c(d)&&!u.selected&&!u.unselected&&(p=d,y=o*d),h("selected.marker.opacity",p),h("unselected.marker.opacity",y)}}};function v(u,h){var d=t.valObjectMeta[h.valType];if(h.arrayOk&&c(u))return!0;if(d.validateFunction)return d.validateFunction(u,h);var p={},y=p,m={set:function(g){y=g}};return d.coerceFunction(u,m,p,h),y!==p}t.validate=v})(A1);var $1={},P1={exports:{}},E1={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},editSelection:{valType:"boolean",dflt:!0,description:"Enables moving selections."},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","<path-to-plotly.js>/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},R1={};function z1(t,e){for(var r in t){var a=t[r];a.valType?e[r]=a.dflt:(e[r]||(e[r]={}),z1(a,e[r]))}}z1(E1,R1);var So={configAttributes:E1,dfltConfig:R1},eu=yt,gM=_t,Ho=[],I1=function(t,e){if(Ho.indexOf(t)!==-1)return;Ho.push(t);var r=1e3;gM(e)?r=e:e==="long"&&(r=3e3);var a=eu.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(Ho);function n(o){o.duration(700).style("opacity",0).each("end",function(l){var s=Ho.indexOf(l);s!==-1&&Ho.splice(s,1),eu.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=eu.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(n)});for(var s=l.append("p"),f=o.split(/<br\s*\/?>/g),c=0;c<f.length;c++)c&&s.append("br"),s.append("span").text(f[c]);e==="stick"?l.transition().duration(350).style("opacity",1):l.transition().duration(700).style("opacity",1).transition().delay(r).call(n)})},vo=So.dfltConfig,gh=I1,bh=P1.exports={};bh.log=function(){var t;if(vo.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(vo.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);gh(r.join("<br>"),"long")}};bh.warn=function(){var t;if(vo.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(vo.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);gh(r.join("<br>"),"stick")}};bh.error=function(){var t;if(vo.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(vo.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);gh(r.join("<br>"),"stick")}};var Lo=P1.exports,tt={},xh=function(){},F1=function(e,r){if(r instanceof RegExp){for(var a=r.toString(),i=0;i<e.length;i++)if(e[i]instanceof RegExp&&e[i].toString()===a)return e;e.push(r)}else(r||r===0)&&e.indexOf(r)===-1&&e.push(r);return e},dc={};(function(t){var e=f1;t.init2dArray=function(r,a){for(var i=new Array(r),n=0;n<r;n++)i[n]=new Array(a);return i},t.transposeRagged=function(r){var a=0,i=r.length,n,o;for(n=0;n<i;n++)a=Math.max(a,r[n].length);var l=new Array(a);for(n=0;n<a;n++)for(l[n]=new Array(i),o=0;o<i;o++)l[n][o]=r[o][n];return l},t.dot=function(r,a){if(!(r.length&&a.length)||r.length!==a.length)return null;var i=r.length,n,o;if(r[0].length)for(n=new Array(i),o=0;o<i;o++)n[o]=t.dot(r[o],a);else if(a[0].length){var l=t.transposeRagged(a);for(n=new Array(l.length),o=0;o<l.length;o++)n[o]=t.dot(r,l[o])}else for(n=0,o=0;o<i;o++)n+=r[o]*a[o];return n},t.translationMatrix=function(r,a){return[[1,0,r],[0,1,a],[0,0,1]]},t.rotationMatrix=function(r){var a=r*Math.PI/180;return[[Math.cos(a),-Math.sin(a),0],[Math.sin(a),Math.cos(a),0],[0,0,1]]},t.rotationXYMatrix=function(r,a,i){return t.dot(t.dot(t.translationMatrix(a,i),t.rotationMatrix(r)),t.translationMatrix(-a,-i))},t.apply3DTransform=function(r){return function(){var a=arguments,i=arguments.length===1?a[0]:[a[0],a[1],a[2]||0];return t.dot(r,[i[0],i[1],i[2],1]).slice(0,3)}},t.apply2DTransform=function(r){return function(){var a=arguments;a.length===3&&(a=a[0]);var i=arguments.length===1?a[0]:[a[0],a[1]];return t.dot(r,[i[0],i[1],1]).slice(0,2)}},t.apply2DTransform2=function(r){var a=t.apply2DTransform(r);return function(i){return a(i.slice(0,2)).concat(a(i.slice(2,4)))}},t.convertCssMatrix=function(r){if(r){var a=r.length;if(a===16)return r;if(a===6)return[r[0],r[1],0,0,r[2],r[3],0,0,0,0,1,0,r[4],r[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},t.inverseTransformMatrix=function(r){var a=[];return e.invert(a,r),[[a[0],a[1],a[2],a[3]],[a[4],a[5],a[6],a[7]],[a[8],a[9],a[10],a[11]],[a[12],a[13],a[14],a[15]]]}})(dc);var bM=yt,xM=Lo,_M=dc,wM=f1;function TM(t){var e;if(typeof t=="string"){if(e=document.getElementById(t),e===null)throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}else if(t==null)throw new Error("DOM element provided is null or undefined");return t}function kM(t){var e=bM.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")}function N1(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function AM(t,e){H1("global",t,e)}function H1(t,e,r){var a="plotly.js-style-"+t,i=document.getElementById(a);i||(i=document.createElement("style"),i.setAttribute("id",a),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var n=i.sheet;n.insertRule?n.insertRule(e+"{"+r+"}",0):n.addRule?n.addRule(e,r,0):xM.warn("addStyleRule failed")}function MM(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&N1(r)}function SM(t){var e=B1(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach(function(a){var i=O1(a);if(i){var n=_M.convertCssMatrix(i);r=wM.multiply(r,r,n)}}),r}function O1(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function B1(t){for(var e=[];LM(t);)e.push(t),t=t.parentNode;return e}function LM(t){return t&&(t instanceof Element||t instanceof HTMLElement)}function CM(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}var _h={getGraphDiv:TM,isPlotDiv:kM,removeElement:N1,addStyleRule:AM,addRelatedStyleRule:H1,deleteRelatedStyleRule:MM,getFullTransformMatrix:SM,getElementTransformMatrix:O1,getElementAndAncestors:B1,equalDomRects:CM},hc={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"],description:["Describes how a new animate call interacts with currently-running","animations. If `immediate`, current animations are interrupted and","the new animation is started. If `next`, the current frame is allowed","to complete, after which the new animation is started. If `afterall`","all existing frames are animated to completion before the new animation","is started."].join(" ")},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward",description:["The direction in which to play the frames triggered by the animation call"].join(" ")},fromcurrent:{valType:"boolean",dflt:!1,description:["Play frames starting at the current frame instead of the beginning."].join(" ")},frame:{duration:{valType:"number",min:0,dflt:500,description:["The duration in milliseconds of each frame. If greater than the frame","duration, it will be limited to the frame duration."].join(" ")},redraw:{valType:"boolean",dflt:!0,description:["Redraw the plot at completion of the transition. This is desirable","for transitions that include properties that cannot be transitioned,","but may significantly slow down updates that do not require a full","redraw of the plot"].join(" ")}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none",description:["The duration of the transition, in milliseconds. If equal to zero,","updates are synchronous."].join(" ")},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",description:"The easing function used for the transition"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none",description:["Determines whether the figure's layout or traces smoothly transitions","during updates that make both traces and layout change."].join(" ")}}},Da={};Da.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style",description:["Sets the dash style of lines. Set to a dash type string","(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)","or a dash length list in px (eg *5px,10px,2px,2px*)."].join(" ")};Da.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")};var DM=Da.dash,$M=Kt.extendFlat,PM={newshape:{line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,editType:"none",description:"Sets the line width (in px)."},dash:$M({},DM,{dflt:"solid",editType:"none"}),editType:"none"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"none",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"none",description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"none",description:"Specifies whether new shapes are drawn below or above traces."},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",editType:"none",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},editType:"none"},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",editType:"none",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active shape."},editType:"none"}},EM=Da.dash,RM=Kt.extendFlat,zM={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:RM({},EM,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}},wh=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the left side of the component."},editType:e}},sd=Dr,IM=hc,uf=$r,rm=PM,am=zM,FM=wh,im=Kt.extendFlat,pc=sd({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});pc.family.dflt='"Open Sans", verdana, arial, sans-serif';pc.size.dflt=12;pc.color.dflt=uf.defaultLine;var Kl={font:pc,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:sd({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:im(FM({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:uf.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:uf.background,editType:"layoutstyle",description:["Sets the background color of the plotting area in-between x and y axes."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","This is the default value; however it could be overridden for individual axes."].join(" ")},separators:{valType:"string",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise)."].join(" ")},showlegend:{valType:"boolean",editType:"legend",description:["Determines whether or not a legend is drawn.","Default is `true` if there is a trace to show and any of these:","a) Two or more traces would by default be shown in the legend.","b) One pie trace is shown in the legend.","c) One trace is explicitly given with `showlegend: true`."].join(" ")},colorway:{valType:"colorlist",dflt:uf.defaults,editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Used to allow user interactions with the plot to persist after","`Plotly.react` calls that are unaware of these interactions.","If `uirevision` is omitted, or if it is given and it changed from","the previous `Plotly.react` call, the exact new figure is used.","If `uirevision` is truthy and did NOT change, any attribute","that has been affected by user interactions and did not receive a","different value in the new figure will keep the interaction value.","`layout.uirevision` attribute serves as the default for","`uirevision` attributes in various sub-containers. For finer","control you can set these sub-attributes directly. For example,","if your app separately controls the data on the x and y axes you","might set `xaxis.uirevision=*time*` and `yaxis.uirevision=*cost*`.","Then if only the y data is changed, you can update","`yaxis.uirevision=*quantity*` and the y axis range will reset but","the x axis range will retain any user-driven zoom."].join(" ")},editrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in `editable: true`","configuration, other than trace names and axis titles.","Defaults to `layout.uirevision`."].join(" ")},selectionrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in selected points","from all traces."].join(" ")},template:{valType:"any",editType:"calc",description:["Default attributes to be applied to the plot. Templates can be","created from existing plots using `Plotly.makeTemplate`, or","created manually. They should be objects with format:","`{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`","`layoutTemplate` and `traceTemplate` are objects matching the","attribute structure of `layout` and a data trace. ","Trace templates are applied cyclically to traces of each type.","Container arrays (eg `annotations`) have special handling:","An object ending in `defaults` (eg `annotationdefaults`) is applied","to each array item. But if an item has a `templateitemname` key","we look in the template array for an item with matching `name` and","apply that instead. If no matching `name` is found we mark the item","invisible. Any named template item not referenced is appended to","the end of the array, so you can use this for a watermark annotation","or a logo image, for example. To omit one of these items on the plot,","make an item with matching `templateitemname` and `visible: false`."].join(" ")},newshape:rm.newshape,activeshape:rm.activeshape,newselection:am.newselection,activeselection:am.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:im({},IM.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:sd({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}};(function(t){var e=Lo,r=xh,a=F1,i=Wl,n=_h.addStyleRule,o=Kt,l=Ba,s=Kl,f=o.extendFlat,c=o.extendDeepAll;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(_){if(t.collectableSubplotTypes=null,_)_&&!Array.isArray(_)&&(_=[_]);else throw new Error("No argument passed to Plotly.register.");for(var T=0;T<_.length;T++){var k=_[T];if(!k)throw new Error("Invalid module was attempted to be registered!");switch(k.moduleType){case"trace":v(k);break;case"transform":d(k);break;case"component":h(k);break;case"locale":p(k);break;case"apiMethod":var S=k.name;t.apiMethodRegistry[S]=k.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},t.getModule=function(x){var _=t.modules[b(x)];return _?_._module:!1},t.traceIs=function(x,_){if(x=b(x),x==="various")return!1;var T=t.modules[x];return T||(x&&e.log("Unrecognized trace type "+x+"."),T=t.modules[l.type.dflt]),!!T.categories[_]},t.getTransformIndices=function(x,_){for(var T=[],k=x.transforms||[],S=0;S<k.length;S++)k[S].type===_&&T.push(S);return T},t.hasTransform=function(x,_){for(var T=x.transforms||[],k=0;k<T.length;k++)if(T[k].type===_)return!0;return!1},t.getComponentMethod=function(x,_){var T=t.componentsRegistry[x];return T&&T[_]||r},t.call=function(){var x=arguments[0],_=[].slice.call(arguments,1);return t.apiMethodRegistry[x].apply(null,_)};function v(x){var _=x.name,T=x.categories,k=x.meta;if(t.modules[_]){e.log("Type "+_+" already registered");return}t.subplotsRegistry[x.basePlotModule.name]||u(x.basePlotModule);for(var S={},M=0;M<T.length;M++)S[T[M]]=!0,t.allCategories[T[M]]=!0;t.modules[_]={_module:x,categories:S},k&&Object.keys(k).length&&(t.modules[_].meta=k),t.allTypes.push(_);for(var D in t.componentsRegistry)m(D,_);x.layoutAttributes&&f(t.traceLayoutAttributes,x.layoutAttributes);var A=x.basePlotModule,C=A.name;if(C==="mapbox"){var $=A.constants.styleRules;for(var N in $)n(".js-plotly-plot .plotly .mapboxgl-"+N,$[N])}(C==="geo"||C==="mapbox")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function u(x){var _=x.name;if(t.subplotsRegistry[_]){e.log("Plot type "+_+" already registered.");return}y(x),t.subplotsRegistry[_]=x;for(var T in t.componentsRegistry)w(T,x.name)}function h(x){if(typeof x.name!="string")throw new Error("Component module *name* must be a string.");var _=x.name;t.componentsRegistry[_]=x,x.layoutAttributes&&(x.layoutAttributes._isLinkedToArray&&a(t.layoutArrayContainers,_),y(x));for(var T in t.modules)m(_,T);for(var k in t.subplotsRegistry)w(_,k);for(var S in t.transformsRegistry)g(_,S);x.schema&&x.schema.layout&&c(s,x.schema.layout)}function d(x){if(typeof x.name!="string")throw new Error("Transform module *name* must be a string.");var _="Transform module "+x.name,T=typeof x.transform=="function",k=typeof x.calcTransform=="function";if(!T&&!k)throw new Error(_+" is missing a *transform* or *calcTransform* method.");T&&k&&e.log([_+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),i(x.attributes)||e.log(_+" registered without an *attributes* object."),typeof x.supplyDefaults!="function"&&e.log(_+" registered without a *supplyDefaults* method."),t.transformsRegistry[x.name]=x;for(var S in t.componentsRegistry)g(S,x.name)}function p(x){var _=x.name,T=_.split("-")[0],k=x.dictionary,S=x.format,M=k&&Object.keys(k).length,D=S&&Object.keys(S).length,A=t.localeRegistry,C=A[_];if(C||(A[_]=C={}),T!==_){var $=A[T];$||(A[T]=$={}),M&&$.dictionary===C.dictionary&&($.dictionary=k),D&&$.format===C.format&&($.format=S)}M&&(C.dictionary=k),D&&(C.format=S)}function y(x){if(x.layoutAttributes){var _=x.layoutAttributes._arrayAttrRegexps;if(_)for(var T=0;T<_.length;T++)a(t.layoutArrayRegexes,_[T])}}function m(x,_){var T=t.componentsRegistry[x].schema;if(!(!T||!T.traces)){var k=T.traces[_];k&&c(t.modules[_]._module.attributes,k)}}function g(x,_){var T=t.componentsRegistry[x].schema;if(!(!T||!T.transforms)){var k=T.transforms[_];k&&c(t.transformsRegistry[_].attributes,k)}}function w(x,_){var T=t.componentsRegistry[x].schema;if(!(!T||!T.subplots)){var k=t.subplotsRegistry[_],S=k.layoutAttributes,M=k.attr==="subplot"?k.name:k.attr;Array.isArray(M)&&(M=M[0]);var D=T.subplots[M];S&&D&&c(S,D)}}function b(x){return typeof x=="object"&&(x=x.type),x}})(tt);(function(t){var e=Al.timeFormat,r=_t,a=Lo,i=Xl.mod,n=ir,o=n.BADNUM,l=n.ONEDAY,s=n.ONEHOUR,f=n.ONEMIN,c=n.ONESEC,v=n.EPOCHJD,u=tt,h=Al.utcFormat,d=/^\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,p=/^\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,y=new Date().getFullYear()-70;function m(P){return P&&u.componentsRegistry.calendars&&typeof P=="string"&&P!=="gregorian"}t.dateTick0=function(P,R){var L=g(P,!!R);if(R<2)return L;var z=t.dateTime2ms(L,P);return z+=l*(R-1),t.ms2DateTime(z,0,P)};function g(P,R){return m(P)?R?u.getComponentMethod("calendars","CANONICAL_SUNDAY")[P]:u.getComponentMethod("calendars","CANONICAL_TICK")[P]:R?"2000-01-02":"2000-01-01"}t.dfltRange=function(P){return m(P)?u.getComponentMethod("calendars","DFLTRANGE")[P]:["2000-01-01","2001-01-01"]},t.isJSDate=function(P){return typeof P=="object"&&P!==null&&typeof P.getTime=="function"};var w,b;t.dateTime2ms=function(P,R){if(t.isJSDate(P)){var L=P.getTimezoneOffset()*f,z=(P.getUTCMinutes()-P.getMinutes())*f+(P.getUTCSeconds()-P.getSeconds())*c+(P.getUTCMilliseconds()-P.getMilliseconds());if(z){var I=3*f;L=L-I/2+i(z-L+I/2,I)}return P=Number(P)-L,P>=w&&P<=b?P:o}if(typeof P!="string"&&typeof P!="number")return o;P=String(P);var H=m(R),V=P.charAt(0);H&&(V==="G"||V==="g")&&(P=P.substr(1),R="");var O=H&&R.substr(0,7)==="chinese",X=P.match(O?p:d);if(!X)return o;var G=X[1],Y=X[3]||"1",K=Number(X[5]||1),Z=Number(X[7]||0),q=Number(X[9]||0),ie=Number(X[11]||0);if(H){if(G.length===2)return o;G=Number(G);var fe;try{var be=u.getComponentMethod("calendars","getCal")(R);if(O){var ne=Y.charAt(Y.length-1)==="i";Y=parseInt(Y,10),fe=be.newDate(G,be.toMonthIndex(G,Y,ne),K)}else fe=be.newDate(G,Number(Y),K)}catch{return o}return fe?(fe.toJD()-v)*l+Z*s+q*f+ie*c:o}G.length===2?G=(Number(G)+2e3-y)%100+y:G=Number(G),Y-=1;var U=new Date(Date.UTC(2e3,Y,K,Z,q));return U.setUTCFullYear(G),U.getUTCMonth()!==Y||U.getUTCDate()!==K?o:U.getTime()+ie*c},w=t.MIN_MS=t.dateTime2ms("-9999"),b=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(P,R){return t.dateTime2ms(P,R)!==o};function x(P,R){return String(P+Math.pow(10,R)).substr(1)}var _=90*l,T=3*s,k=5*f;t.ms2DateTime=function(P,R,L){if(typeof P!="number"||!(P>=w&&P<=b))return o;R||(R=0);var z=Math.floor(i(P+.05,1)*10),I=Math.round(P-z/10),H,V,O,X,G,Y;if(m(L)){var K=Math.floor(I/l)+v,Z=Math.floor(i(P,l));try{H=u.getComponentMethod("calendars","getCal")(L).fromJD(K).formatDate("yyyy-mm-dd")}catch{H=h("G%Y-%m-%d")(new Date(I))}if(H.charAt(0)==="-")for(;H.length<11;)H="-0"+H.substr(1);else for(;H.length<10;)H="0"+H;V=R<_?Math.floor(Z/s):0,O=R<_?Math.floor(Z%s/f):0,X=R<T?Math.floor(Z%f/c):0,G=R<k?Z%c*10+z:0}else Y=new Date(I),H=h("%Y-%m-%d")(Y),V=R<_?Y.getUTCHours():0,O=R<_?Y.getUTCMinutes():0,X=R<T?Y.getUTCSeconds():0,G=R<k?Y.getUTCMilliseconds()*10+z:0;return S(H,V,O,X,G)},t.ms2DateTimeLocal=function(P){if(!(P>=w+l&&P<=b-l))return o;var R=Math.floor(i(P+.05,1)*10),L=new Date(Math.round(P-R/10)),z=e("%Y-%m-%d")(L),I=L.getHours(),H=L.getMinutes(),V=L.getSeconds(),O=L.getUTCMilliseconds()*10+R;return S(z,I,H,V,O)};function S(P,R,L,z,I){if((R||L||z||I)&&(P+=" "+x(R,2)+":"+x(L,2),(z||I)&&(P+=":"+x(z,2),I))){for(var H=4;I%10===0;)H-=1,I/=10;P+="."+x(I,H)}return P}t.cleanDate=function(P,R,L){if(P===o)return R;if(t.isJSDate(P)||typeof P=="number"&&isFinite(P)){if(m(L))return a.error("JS Dates and milliseconds are incompatible with world calendars",P),R;if(P=t.ms2DateTimeLocal(+P),!P&&R!==void 0)return R}else if(!t.isDateTime(P,L))return a.error("unrecognized date",P),R;return P};var M=/%\d?f/g,D=/%h/g,A={1:"1",2:"1",3:"2",4:"2"};function C(P,R,L,z){P=P.replace(M,function(H){var V=Math.min(+H.charAt(1)||6,6),O=(R/1e3%1+2).toFixed(V).substr(2).replace(/0+$/,"")||"0";return O});var I=new Date(Math.floor(R+.05));if(P=P.replace(D,function(){return A[L("%q")(I)]}),m(z))try{P=u.getComponentMethod("calendars","worldCalFmt")(P,R,z)}catch{return"Invalid"}return L(P)(I)}var $=[59,59.9,59.99,59.999,59.9999];function N(P,R){var L=i(P+.05,l),z=x(Math.floor(L/s),2)+":"+x(i(Math.floor(L/f),60),2);if(R!=="M"){r(R)||(R=0);var I=Math.min(i(P/c,60),$[R]),H=(100+I).toFixed(R).substr(1);R>0&&(H=H.replace(/0+$/,"").replace(/[\.]$/,"")),z+=":"+H}return z}t.formatDate=function(P,R,L,z,I,H){if(I=m(I)&&I,!R)if(L==="y")R=H.year;else if(L==="m")R=H.month;else if(L==="d")R=H.dayMonth+`
|
|
2
|
+
`+H.year;else return N(P,L)+`
|
|
3
|
+
`+C(H.dayMonthYear,P,z,I);return C(R,P,z,I)};var E=3*l;t.incrementMonth=function(P,R,L){L=m(L)&&L;var z=i(P,l);if(P=Math.round(P-z),L)try{var I=Math.round(P/l)+v,H=u.getComponentMethod("calendars","getCal")(L),V=H.fromJD(I);return R%12?H.add(V,R,"m"):H.add(V,R/12,"y"),(V.toJD()-v)*l+z}catch{a.error("invalid ms "+P+" in calendar "+L)}var O=new Date(P+E);return O.setUTCMonth(O.getUTCMonth()+R)+z-E},t.findExactDates=function(P,R){for(var L=0,z=0,I=0,H=0,V,O,X=m(R)&&u.getComponentMethod("calendars","getCal")(R),G=0;G<P.length;G++){if(O=P[G],!r(O)){H++;continue}if(!(O%l))if(X)try{V=X.fromJD(O/l+v),V.day()===1?V.month()===1?L++:z++:I++}catch{}else V=new Date(O),V.getUTCDate()===1?V.getUTCMonth()===0?L++:z++:I++}z+=L,I+=z;var Y=P.length-H;return{exactYears:L/Y,exactMonths:z/Y,exactDays:I/Y}}})($1);var Th={},j1=function(e){return e};(function(t){var e=_t,r=Lo,a=j1,i=ir.BADNUM,n=1e-9;t.findBin=function(c,v,u){if(e(v.start))return u?Math.ceil((c-v.start)/v.size-n)-1:Math.floor((c-v.start)/v.size+n);var h=0,d=v.length,p=0,y=d>1?(v[d-1]-v[0])/(d-1):1,m,g;for(y>=0?g=u?o:l:g=u?f:s,c+=y*n*(u?-1:1)*(y>=0?1:-1);h<d&&p++<100;)m=Math.floor((h+d)/2),g(v[m],c)?h=m+1:d=m;return p>90&&r.log("Long binary search..."),h-1};function o(c,v){return c<v}function l(c,v){return c<=v}function s(c,v){return c>v}function f(c,v){return c>=v}t.sorterAsc=function(c,v){return c-v},t.sorterDes=function(c,v){return v-c},t.distinctVals=function(c){var v=c.slice();v.sort(t.sorterAsc);var u;for(u=v.length-1;u>-1&&v[u]===i;u--);for(var h=v[u]-v[0]||1,d=h/(u||1)/1e4,p=[],y,m=0;m<=u;m++){var g=v[m],w=g-y;y===void 0?(p.push(g),y=g):w>d&&(h=Math.min(h,w),p.push(g),y=g)}return{vals:p,minDiff:h}},t.roundUp=function(c,v,u){for(var h=0,d=v.length-1,p,y=0,m=u?0:1,g=u?1:0,w=u?Math.ceil:Math.floor;h<d&&y++<100;)p=w((h+d)/2),v[p]<=c?h=p+m:d=p-g;return v[h]},t.sort=function(c,v){for(var u=0,h=0,d=1;d<c.length;d++){var p=v(c[d],c[d-1]);if(p<0?u=1:p>0&&(h=1),u&&h)return c.sort(v)}return h?c:c.reverse()},t.findIndexOfMin=function(c,v){v=v||a;for(var u=1/0,h,d=0;d<c.length;d++){var p=v(c[d]);p<u&&(u=p,h=d)}return h}})(Th);var kh=function(e){return Object.keys(e).sort()},G1={};(function(t){var e=_t,r=Xr.isArrayOrTypedArray;t.aggNums=function(a,i,n,o){var l,s;if((!o||o>n.length)&&(o=n.length),e(i)||(i=!1),r(n[0])){for(s=new Array(o),l=0;l<o;l++)s[l]=t.aggNums(a,i,n[l]);n=s}for(l=0;l<o;l++)e(i)?e(n[l])&&(i=a(+i,+n[l])):i=n[l];return i},t.len=function(a){return t.aggNums(function(i){return i+1},0,a)},t.mean=function(a,i){return i||(i=t.len(a)),t.aggNums(function(n,o){return n+o},0,a)/i},t.midRange=function(a){if(!(a===void 0||a.length===0))return(t.aggNums(Math.max,null,a)+t.aggNums(Math.min,null,a))/2},t.variance=function(a,i,n){return i||(i=t.len(a)),e(n)||(n=t.mean(a,i)),t.aggNums(function(o,l){return o+Math.pow(l-n,2)},0,a)/i},t.stdev=function(a,i,n){return Math.sqrt(t.variance(a,i,n))},t.median=function(a){var i=a.slice().sort();return t.interp(i,.5)},t.interp=function(a,i){if(!e(i))throw"n should be a finite number";if(i=i*a.length-.5,i<0)return a[0];if(i>a.length-1)return a[a.length-1];var n=i%1;return n*a[Math.ceil(i)]+(1-n)*a[Math.floor(i)]}})(G1);var U1=Xl,tu=U1.mod,NM=U1.modHalf,Ml=Math.PI,xi=2*Ml;function HM(t){return t/180*Ml}function OM(t){return t/Ml*180}function Ah(t){return Math.abs(t[1]-t[0])>xi-1e-14}function V1(t,e){return NM(e-t,xi)}function BM(t,e){return Math.abs(V1(t,e))}function W1(t,e){if(Ah(e))return!0;var r,a;e[0]<e[1]?(r=e[0],a=e[1]):(r=e[1],a=e[0]),r=tu(r,xi),a=tu(a,xi),r>a&&(a+=xi);var i=tu(t,xi),n=i+xi;return i>=r&&i<=a||n>=r&&n<=a}function jM(t,e,r,a){if(!W1(e,a))return!1;var i,n;return r[0]<r[1]?(i=r[0],n=r[1]):(i=r[1],n=r[0]),t>=i&&t<=n}function Mh(t,e,r,a,i,n,o){i=i||0,n=n||0;var l=Ah([r,a]),s,f,c,v,u;l?(s=0,f=Ml,c=xi):r<a?(s=r,c=a):(s=a,c=r),t<e?(v=t,u=e):(v=e,u=t);function h(m,g){return[m*Math.cos(g)+i,n-m*Math.sin(g)]}var d=Math.abs(c-s)<=Ml?0:1;function p(m,g,w){return"A"+[m,m]+" "+[0,d,w]+" "+h(m,g)}var y;return l?v===null?y="M"+h(u,s)+p(u,f,0)+p(u,c,0)+"Z":y="M"+h(v,s)+p(v,f,0)+p(v,c,0)+"ZM"+h(u,s)+p(u,f,1)+p(u,c,1)+"Z":v===null?(y="M"+h(u,s)+p(u,c,0),o&&(y+="L0,0Z")):y="M"+h(v,s)+"L"+h(u,s)+p(u,c,0)+"L"+h(v,c)+p(v,s,1)+"Z",y}function GM(t,e,r,a,i){return Mh(null,t,e,r,a,i,0)}function UM(t,e,r,a,i){return Mh(null,t,e,r,a,i,1)}function VM(t,e,r,a,i,n){return Mh(t,e,r,a,i,n,1)}var WM={deg2rad:HM,rad2deg:OM,angleDelta:V1,angleDist:BM,isFullCircle:Ah,isAngleInsideSector:W1,isPtInsideSector:jM,pathArc:GM,pathSector:UM,pathAnnulus:VM},hn={};hn.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=1/3};hn.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>1/3&&e.x<2/3};hn.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=2/3};hn.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=2/3};hn.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>1/3&&e.y<2/3};hn.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=1/3};var pn={},ru=Xl.mod;pn.segmentsIntersect=X1;function X1(t,e,r,a,i,n,o,l){var s=r-t,f=i-t,c=o-i,v=a-e,u=n-e,h=l-n,d=s*h-c*v;if(d===0)return null;var p=(f*h-c*u)/d,y=(f*v-s*u)/d;return y<0||y>1||p<0||p>1?null:{x:t+s*p,y:e+v*p}}pn.segmentDistance=function(e,r,a,i,n,o,l,s){if(X1(e,r,a,i,n,o,l,s))return 0;var f=a-e,c=i-r,v=l-n,u=s-o,h=f*f+c*c,d=v*v+u*u,p=Math.min(hs(f,c,h,n-e,o-r),hs(f,c,h,l-e,s-r),hs(v,u,d,e-n,r-o),hs(v,u,d,a-n,i-o));return Math.sqrt(p)};function hs(t,e,r,a,i){var n=a*t+i*e;if(n<0)return a*a+i*i;if(n>r){var o=a-t,l=i-e;return o*o+l*l}else{var s=a*e-i*t;return s*s/r}}var ps,fd,nm;pn.getTextLocation=function(e,r,a,i){if((e!==fd||i!==nm)&&(ps={},fd=e,nm=i),ps[a])return ps[a];var n=e.getPointAtLength(ru(a-i/2,r)),o=e.getPointAtLength(ru(a+i/2,r)),l=Math.atan((o.y-n.y)/(o.x-n.x)),s=e.getPointAtLength(ru(a,r)),f=(s.x*4+n.x+o.x)/6,c=(s.y*4+n.y+o.y)/6,v={x:f,y:c,theta:l};return ps[a]=v,v};pn.clearLocationCache=function(){fd=null};pn.getVisibleSegment=function(e,r,a){var i=r.left,n=r.right,o=r.top,l=r.bottom,s=0,f=e.getTotalLength(),c=f,v,u;function h(p){var y=e.getPointAtLength(p);p===0?v=y:p===f&&(u=y);var m=y.x<i?i-y.x:y.x>n?y.x-n:0,g=y.y<o?o-y.y:y.y>l?y.y-l:0;return Math.sqrt(m*m+g*g)}for(var d=h(s);d;){if(s+=d+a,s>c)return;d=h(s)}for(d=h(c);d;){if(c-=d+a,s>c)return;d=h(c)}return{min:s,max:c,len:c-s,total:f,isClosed:s===0&&c===f&&Math.abs(v.x-u.x)<.1&&Math.abs(v.y-u.y)<.1}};pn.findPointOnPath=function(e,r,a,i){i=i||{};for(var n=i.pathLength||e.getTotalLength(),o=i.tolerance||.001,l=i.iterationLimit||30,s=e.getPointAtLength(0)[a]>e.getPointAtLength(n)[a]?-1:1,f=0,c=0,v=n,u,h,d;f<l;){if(u=(c+v)/2,h=e.getPointAtLength(u),d=h[a]-r,Math.abs(d)<o)return h;s*d>0?v=u:c=u,f++}return h};var mc={};(function(t){var e={};t.throttle=function(i,n,o){var l=e[i],s=Date.now();if(!l){for(var f in e)e[f].ts<s-6e4&&delete e[f];l=e[i]={ts:0,timer:null}}r(l);function c(){o(),l.ts=Date.now(),l.onDone&&(l.onDone(),l.onDone=null)}if(s>l.ts+n){c();return}l.timer=setTimeout(function(){c(),l.timer=null},n)},t.done=function(a){var i=e[a];return!i||!i.timer?Promise.resolve():new Promise(function(n){var o=i.onDone;i.onDone=function(){o&&o(),n(),i.onDone=null}})},t.clear=function(a){if(a)r(e[a]),delete e[a];else for(var i in e)t.clear(i)};function r(a){a&&a.timer!==null&&(clearTimeout(a.timer),a.timer=null)}})(mc);var XM=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)},YM=_t,qM=PA,ZM=function(e){var r;if(e&&e.hasOwnProperty("userAgent")?r=e.userAgent:r=KM(),typeof r!="string")return!0;var a=qM({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!a)for(var i=r.split(" "),n=1;n<i.length;n++){var o=i[n];if(o.indexOf("Safari")!==-1)for(var l=n-1;l>-1;l--){var s=i[l];if(s.substr(0,8)==="Version/"){var f=s.substr(8).split(".")[0];if(YM(f)&&(f=+f),f>=13)return!0}}}return a};function KM(){var t;return typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),t}var QM=yt,JM=function(e,r,a){var i=e.selectAll("g."+a.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});i.exit().remove(),i.enter().append("g").attr("class",a),i.order();var n=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each(function(o){o[0][n]=QM.select(this)}),i},eS=tt,tS=function(e,r){for(var a=e._context.locale,i=0;i<2;i++){for(var n=e._context.locales,o=0;o<2;o++){var l=(n[a]||{}).dictionary;if(l){var s=l[r];if(s)return s}n=eS.localeRegistry}var f=a.split("-")[0];if(f===a)break;a=f}return r},rS=function(e){for(var r={},a=[],i=0,n=0;n<e.length;n++){var o=e[n];r[o]!==1&&(r[o]=1,a[i++]=o)}return a},aS=function(e){for(var r=oS(e)?nS:iS,a=[],i=0;i<e.length;i++){var n=e[i];r(n)&&a.push(n)}return a};function iS(t){return t.visible===!0}function nS(t){var e=t[0].trace;return e.visible===!0&&e._length!==0}function oS(t){return Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace}var lS=function(e,r){if(!r)return e;var a=1/Math.abs(r),i=a>1?(a*e+a*r)/a:e+r,n=String(i).length;if(n>16){var o=String(r).length,l=String(e).length;if(n>=l+o){var s=parseFloat(i).toPrecision(12);s.indexOf("e+")===-1&&(i=+s)}}return i},sS=_t,fS=ir.BADNUM,cS=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,uS=function(e){return typeof e=="string"&&(e=e.replace(cS,"")),sS(e)?Number(e):fS},ul=yt,vS=Al.utcFormat,dS=c1.format,Y1=_t,q1=ir,Z1=q1.FP_SAFE,hS=-Z1,om=q1.BADNUM,ee=g1.exports={};ee.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:e==="0.f"?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var lm={};ee.warnBadFormat=function(t){var e=String(t);lm[e]||(lm[e]=1,ee.warn('encountered bad format: "'+e+'"'))};ee.noFormat=function(t){return String(t)};ee.numberFormat=function(t){var e;try{e=dS(ee.adjustFormat(t))}catch{return ee.warnBadFormat(t),ee.noFormat}return e};ee.nestedProperty=ph;ee.keyedContainer=eM;ee.relativeAttr=aM;ee.isPlainObject=Wl;ee.toLogRange=mh;ee.relinkPrivateKeys=nM;var mn=Xr;ee.isTypedArray=mn.isTypedArray;ee.isArrayOrTypedArray=mn.isArrayOrTypedArray;ee.isArray1D=mn.isArray1D;ee.ensureArray=mn.ensureArray;ee.concat=mn.concat;ee.maxRowLength=mn.maxRowLength;ee.minRowLength=mn.minRowLength;var K1=Xl;ee.mod=K1.mod;ee.modHalf=K1.modHalf;var Ci=A1;ee.valObjectMeta=Ci.valObjectMeta;ee.coerce=Ci.coerce;ee.coerce2=Ci.coerce2;ee.coerceFont=Ci.coerceFont;ee.coercePattern=Ci.coercePattern;ee.coerceHoverinfo=Ci.coerceHoverinfo;ee.coerceSelectionMarkerOpacity=Ci.coerceSelectionMarkerOpacity;ee.validate=Ci.validate;var ta=$1;ee.dateTime2ms=ta.dateTime2ms;ee.isDateTime=ta.isDateTime;ee.ms2DateTime=ta.ms2DateTime;ee.ms2DateTimeLocal=ta.ms2DateTimeLocal;ee.cleanDate=ta.cleanDate;ee.isJSDate=ta.isJSDate;ee.formatDate=ta.formatDate;ee.incrementMonth=ta.incrementMonth;ee.dateTick0=ta.dateTick0;ee.dfltRange=ta.dfltRange;ee.findExactDates=ta.findExactDates;ee.MIN_MS=ta.MIN_MS;ee.MAX_MS=ta.MAX_MS;var yn=Th;ee.findBin=yn.findBin;ee.sorterAsc=yn.sorterAsc;ee.sorterDes=yn.sorterDes;ee.distinctVals=yn.distinctVals;ee.roundUp=yn.roundUp;ee.sort=yn.sort;ee.findIndexOfMin=yn.findIndexOfMin;ee.sortObjectKeys=kh;var Di=G1;ee.aggNums=Di.aggNums;ee.len=Di.len;ee.mean=Di.mean;ee.median=Di.median;ee.midRange=Di.midRange;ee.variance=Di.variance;ee.stdev=Di.stdev;ee.interp=Di.interp;var $a=dc;ee.init2dArray=$a.init2dArray;ee.transposeRagged=$a.transposeRagged;ee.dot=$a.dot;ee.translationMatrix=$a.translationMatrix;ee.rotationMatrix=$a.rotationMatrix;ee.rotationXYMatrix=$a.rotationXYMatrix;ee.apply3DTransform=$a.apply3DTransform;ee.apply2DTransform=$a.apply2DTransform;ee.apply2DTransform2=$a.apply2DTransform2;ee.convertCssMatrix=$a.convertCssMatrix;ee.inverseTransformMatrix=$a.inverseTransformMatrix;var ja=WM;ee.deg2rad=ja.deg2rad;ee.rad2deg=ja.rad2deg;ee.angleDelta=ja.angleDelta;ee.angleDist=ja.angleDist;ee.isFullCircle=ja.isFullCircle;ee.isAngleInsideSector=ja.isAngleInsideSector;ee.isPtInsideSector=ja.isPtInsideSector;ee.pathArc=ja.pathArc;ee.pathSector=ja.pathSector;ee.pathAnnulus=ja.pathAnnulus;var Co=hn;ee.isLeftAnchor=Co.isLeftAnchor;ee.isCenterAnchor=Co.isCenterAnchor;ee.isRightAnchor=Co.isRightAnchor;ee.isTopAnchor=Co.isTopAnchor;ee.isMiddleAnchor=Co.isMiddleAnchor;ee.isBottomAnchor=Co.isBottomAnchor;var Do=pn;ee.segmentsIntersect=Do.segmentsIntersect;ee.segmentDistance=Do.segmentDistance;ee.getTextLocation=Do.getTextLocation;ee.clearLocationCache=Do.clearLocationCache;ee.getVisibleSegment=Do.getVisibleSegment;ee.findPointOnPath=Do.findPointOnPath;var yc=Kt;ee.extendFlat=yc.extendFlat;ee.extendDeep=yc.extendDeep;ee.extendDeepAll=yc.extendDeepAll;ee.extendDeepNoArrays=yc.extendDeepNoArrays;var Sh=Lo;ee.log=Sh.log;ee.warn=Sh.warn;ee.error=Sh.error;var pS=Mo;ee.counterRegex=pS.counter;var Lh=mc;ee.throttle=Lh.throttle;ee.throttleDone=Lh.done;ee.clearThrottle=Lh.clear;var Ga=_h;ee.getGraphDiv=Ga.getGraphDiv;ee.isPlotDiv=Ga.isPlotDiv;ee.removeElement=Ga.removeElement;ee.addStyleRule=Ga.addStyleRule;ee.addRelatedStyleRule=Ga.addRelatedStyleRule;ee.deleteRelatedStyleRule=Ga.deleteRelatedStyleRule;ee.getFullTransformMatrix=Ga.getFullTransformMatrix;ee.getElementTransformMatrix=Ga.getElementTransformMatrix;ee.getElementAndAncestors=Ga.getElementAndAncestors;ee.equalDomRects=Ga.equalDomRects;ee.clearResponsive=XM;ee.preserveDrawingBuffer=ZM;ee.makeTraceGroups=JM;ee._=tS;ee.notifier=I1;ee.filterUnique=rS;ee.filterVisible=aS;ee.pushUnique=F1;ee.increment=lS;ee.cleanNumber=uS;ee.ensureNumber=function(e){return Y1(e)?(e=Number(e),e>Z1||e<hS?om:e):om};ee.isIndex=function(t,e){return e!==void 0&&t>=e?!1:Y1(t)&&t>=0&&t%1===0};ee.noop=xh;ee.identity=j1;ee.repeat=function(t,e){for(var r=new Array(e),a=0;a<e;a++)r[a]=t;return r};ee.swapAttrs=function(t,e,r,a){r||(r="x"),a||(a="y");for(var i=0;i<e.length;i++){var n=e[i],o=ee.nestedProperty(t,n.replace("?",r)),l=ee.nestedProperty(t,n.replace("?",a)),s=o.get();o.set(l.get()),l.set(s)}};ee.raiseToTop=function(e){e.parentNode.appendChild(e)};ee.cancelTransition=function(t){return t.transition().duration(0)};ee.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))};ee.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r};ee.simpleMap=function(t,e,r,a,i){for(var n=t.length,o=new Array(n),l=0;l<n;l++)o[l]=e(t[l],r,a,i);return o};ee.randstr=function t(e,r,a,i){if(a||(a=16),r===void 0&&(r=24),r<=0)return"0";var n=Math.log(Math.pow(2,r))/Math.log(a),o="",l,s,f;for(l=2;n===1/0;l*=2)n=Math.log(Math.pow(2,r/l))/Math.log(a)*l;var c=n-Math.floor(n);for(l=0;l<Math.floor(n);l++)f=Math.floor(Math.random()*a).toString(a),o=f+o;c&&(s=Math.pow(a,c),f=Math.floor(Math.random()*s).toString(a),o=f+o);var v=parseInt(o,a);return e&&e[o]||v!==1/0&&v>=Math.pow(2,r)?i>10?(ee.warn("randstr failed uniqueness"),o):t(e,r,a,(i||0)+1):o};ee.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(a){a[e]=t,r[a.name]=a,r.optionList.push(a)},r["_"+e]=t,r};ee.smooth=function(t,e){if(e=Math.round(e)||0,e<2)return t;var r=t.length,a=2*r,i=2*e-1,n=new Array(i),o=new Array(r),l,s,f,c;for(l=0;l<i;l++)n[l]=(1-Math.cos(Math.PI*(l+1)/e))/(2*e);for(l=0;l<r;l++){for(c=0,s=0;s<i;s++)f=l+s+1-e,f<-r?f-=a*Math.round(f/a):f>=a&&(f-=a*Math.floor(f/a)),f<0?f=-1-f:f>=r&&(f=a-1-f),c+=t[f]*n[s];o[l]=c}return o};ee.syncOrAsync=function(t,e,r){var a,i;function n(){return ee.syncOrAsync(t,e,r)}for(;t.length;)if(i=t.splice(0,1)[0],a=i(e),a&&a.then)return a.then(n);return r&&r(e)};ee.stripTrailingSlash=function(t){return t.substr(-1)==="/"?t.substr(0,t.length-1):t};ee.noneOrAll=function(t,e,r){if(t){var a=!1,i=!0,n,o;for(n=0;n<r.length;n++)o=t[r[n]],o!=null?a=!0:i=!1;if(a&&!i)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}};ee.mergeArray=function(t,e,r,a){var i=typeof a=="function";if(ee.isArrayOrTypedArray(t))for(var n=Math.min(t.length,e.length),o=0;o<n;o++){var l=t[o];e[o][r]=i?a(l):l}};ee.mergeArrayCastPositive=function(t,e,r){return ee.mergeArray(t,e,r,function(a){var i=+a;return isFinite(i)&&i>0?i:0})};ee.fillArray=function(t,e,r,a){if(a=a||ee.identity,ee.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=a(t[i])};ee.castOption=function(t,e,r,a){a=a||ee.identity;var i=ee.nestedProperty(t,r).get();return ee.isArrayOrTypedArray(i)?Array.isArray(e)&&ee.isArrayOrTypedArray(i[e[0]])?a(i[e[0]][e[1]]):a(i[e]):i};ee.extractOption=function(t,e,r,a){if(r in t)return t[r];var i=ee.nestedProperty(e,a).get();if(!Array.isArray(i))return i};function Q1(t){var e={};for(var r in t)for(var a=t[r],i=0;i<a.length;i++)e[a[i]]=+r;return e}ee.tagSelected=function(t,e,r){var a=e.selectedpoints,i=e._indexToPoints,n;i&&(n=Q1(i));function o(v){return v!==void 0&&v<t.length}for(var l=0;l<a.length;l++){var s=a[l];if(ee.isIndex(s)||ee.isArrayOrTypedArray(s)&&ee.isIndex(s[0])&&ee.isIndex(s[1])){var f=n?n[s]:s,c=r?r[f]:f;o(c)&&(t[c].selected=1)}}};ee.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var a=Q1(r),i=[],n=0;n<e.length;n++){var o=e[n];if(ee.isIndex(o)){var l=a[o];ee.isIndex(l)&&i.push(l)}}return i}else return e};ee.getTargetArray=function(t,e){var r=e.target;if(typeof r=="string"&&r){var a=ee.nestedProperty(t,r).get();return Array.isArray(a)?a:!1}else if(Array.isArray(r))return r;return!1};ee.minExtend=function(t,e){var r={};typeof e!="object"&&(e={});var a=3,i=Object.keys(t),n,o,l;for(n=0;n<i.length;n++)o=i[n],l=t[o],!(o.charAt(0)==="_"||typeof l=="function")&&(o==="module"?r[o]=l:Array.isArray(l)?o==="colorscale"?r[o]=l.slice():r[o]=l.slice(0,a):ee.isTypedArray(l)?r[o]=l.subarray(0,a):l&&typeof l=="object"?r[o]=ee.minExtend(t[o],e[o]):r[o]=l);for(i=Object.keys(e),n=0;n<i.length;n++)o=i[n],l=e[o],(typeof l!="object"||!(o in r)||typeof r[o]!="object")&&(r[o]=l);return r};ee.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)};ee.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(t.indexOf(e[r])!==-1)return!0;return!1};ee.isIE=function(){return typeof window.navigator.msSaveBlob<"u"};var mS=/Version\/[\d\.]+.*Safari/;ee.isSafari=function(){return mS.test(window.navigator.userAgent)};var yS=/iPad|iPhone|iPod/;ee.isIOS=function(){return yS.test(window.navigator.userAgent)};var gS=/Firefox\/(\d+)\.\d+/;ee.getFirefoxVersion=function(){var t=gS.exec(window.navigator.userAgent);if(t&&t.length===2){var e=parseInt(t[1]);if(!isNaN(e))return e}return null};ee.isD3Selection=function(t){return t instanceof ul.selection};ee.ensureSingle=function(t,e,r,a){var i=t.select(e+(r?"."+r:""));if(i.size())return i;var n=t.append(e);return r&&n.classed(r,!0),a&&n.call(a),n};ee.ensureSingleById=function(t,e,r,a){var i=t.select(e+"#"+r);if(i.size())return i;var n=t.append(e).attr("id",r);return a&&n.call(a),n};ee.objectFromPath=function(t,e){for(var r=t.split("."),a,i=a={},n=0;n<r.length;n++){var o=r[n],l=null,s=r[n].match(/(.*)\[([0-9]+)\]/);s?(o=s[1],l=s[2],a=a[o]=[],n===r.length-1?a[l]=e:a[l]={},a=a[l]):(n===r.length-1?a[o]=e:a[o]={},a=a[o])}return i};var bS=/^([^\[\.]+)\.(.+)?/,xS=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;ee.expandObjectPaths=function(t){var e,r,a,i,n,o,l;if(typeof t=="object"&&!Array.isArray(t))for(r in t)t.hasOwnProperty(r)&&((e=r.match(bS))?(i=t[r],a=e[1],delete t[r],t[a]=ee.extendDeepNoArrays(t[a]||{},ee.objectFromPath(r,ee.expandObjectPaths(i))[a])):(e=r.match(xS))?(i=t[r],a=e[1],n=parseInt(e[2]),delete t[r],t[a]=t[a]||[],e[3]==="."?(l=e[4],o=t[a][n]=t[a][n]||{},ee.extendDeepNoArrays(o,ee.objectFromPath(l,ee.expandObjectPaths(i)))):t[a][n]=ee.expandObjectPaths(i)):t[r]=ee.expandObjectPaths(t[r]));return t};ee.numSeparate=function(t,e,r){if(r||(r=!1),typeof e!="string"||e.length===0)throw new Error("Separator string required for formatting!");typeof t=="number"&&(t=String(t));var a=/(\d+)(\d{3})/,i=e.charAt(0),n=e.charAt(1),o=t.split("."),l=o[0],s=o.length>1?i+o[1]:"";if(n&&(o.length>1||l.length>4||r))for(;a.test(l);)l=l.replace(a,"$1"+n+"$2");return l+s};ee.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var J1=/^\w*$/;ee.templateString=function(t,e){var r={};return t.replace(ee.TEMPLATE_STRING_REGEX,function(a,i){var n;return J1.test(i)?n=e[i]:(r[i]=r[i]||ee.nestedProperty(e,i).get,n=r[i]()),ee.isValidTextValue(n)?n:""})};var _S={max:10,count:0,name:"hovertemplate"};ee.hovertemplateString=function(){return e_.apply(_S,arguments)};var wS={max:10,count:0,name:"texttemplate"};ee.texttemplateString=function(){return e_.apply(wS,arguments)};var sm=/^[:|\|]/;function e_(t,e,r){var a=this,i=arguments;e||(e={});var n={};return t.replace(ee.TEMPLATE_STRING_REGEX,function(o,l,s){var f=l==="xother"||l==="yother",c=l==="_xother"||l==="_yother",v=l==="_xother_"||l==="_yother_",u=l==="xother_"||l==="yother_",h=f||c||u||v,d=l;(c||v)&&(d=d.substring(1)),(u||v)&&(d=d.substring(0,d.length-1));var p;if(h){if(p=e[d],p===void 0)return""}else{var y,m;for(m=3;m<i.length;m++)if(y=i[m],!!y){if(y.hasOwnProperty(d)){p=y[d];break}if(J1.test(d)||(p=ee.nestedProperty(y,d).get(),p=n[d]||ee.nestedProperty(y,d).get(),p&&(n[d]=p)),p!==void 0)break}}if(p===void 0&&a)return a.count<a.max&&(ee.warn("Variable '"+d+"' in "+a.name+" could not be found!"),p=o),a.count===a.max&&ee.warn("Too many "+a.name+" warnings - additional warnings will be suppressed"),a.count++,o;if(s){var g;if(s[0]===":"&&(g=r?r.numberFormat:ee.numberFormat,p=g(s.replace(sm,""))(p)),s[0]==="|"){g=r?r.timeFormat:vS;var w=ee.dateTime2ms(p);p=ee.formatDate(w,s.replace(sm,""),!1,g)}}else{var b=d+"Label";e.hasOwnProperty(b)&&(p=e[b])}return h&&(p="("+p+")",(c||v)&&(p=" "+p),(u||v)&&(p=p+" ")),p})}var ms=48,fm=57;ee.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,a=0,i=0,n=0;n<r;n++){var o=t.charCodeAt(n)||0,l=e.charCodeAt(n)||0,s=o>=ms&&o<=fm,f=l>=ms&&l<=fm;if(s&&(a=10*a+o-ms),f&&(i=10*i+l-ms),!s||!f){if(a!==i)return a-i;if(o!==l)return o-l}}return i-a};var Xn=2e9;ee.seedPseudoRandom=function(){Xn=2e9};ee.pseudoRandom=function(){var t=Xn;return Xn=(69069*Xn+1)%4294967296,Math.abs(Xn-t)<429496729?ee.pseudoRandom():Xn/4294967296};ee.fillText=function(t,e,r){var a=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=ee.extractOption(t,e,"htx","hovertext");if(ee.isValidTextValue(i))return a(i);var n=ee.extractOption(t,e,"tx","text");if(ee.isValidTextValue(n))return a(n)};ee.isValidTextValue=function(t){return t||t===0};ee.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",a=0;a<e;a++)r.indexOf(".")!==-1&&(r=r.replace("0%","%"),r=r.replace(".%","%"));return r};ee.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||e==="none"};ee.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""};ee.strRotate=function(t){return t?"rotate("+t+")":""};ee.strScale=function(t){return t!==1?"scale("+t+")":""};ee.getTextTransform=function(t){var e=t.noCenter,r=t.textX,a=t.textY,i=t.targetX,n=t.targetY,o=t.anchorX||0,l=t.anchorY||0,s=t.rotate,f=t.scale;return f?f>1&&(f=1):f=0,ee.strTranslate(i-f*(r+o),n-f*(a+l))+ee.strScale(f)+(s?"rotate("+s+(e?"":" "+r+" "+a)+")":"")};ee.setTransormAndDisplay=function(t,e){t.attr("transform",ee.getTextTransform(e)),t.style("display",e.scale?null:"none")};ee.ensureUniformFontSize=function(t,e){var r=ee.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r};ee.join2=function(t,e,r){var a=t.length;return a>1?t.slice(0,-1).join(e)+r+t[a-1]:t.join(e)};ee.bigFont=function(t){return Math.round(1.2*t)};var cm=ee.getFirefoxVersion(),TS=cm!==null&&cm<86;ee.getPositionFromD3Event=function(){return TS?[ul.event.layerX,ul.event.layerY]:[ul.event.offsetX,ul.event.offsetY]};var de=g1.exports,kS=de,um={"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 vm in um){var AS=vm.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");kS.addStyleRule(AS,um[vm])}var Yt={},Ch={},au=uh.EventEmitter,MS={init:function(t){if(t._ev instanceof au)return t;var e=new au,r=new au;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(a,i){typeof jQuery<"u"&&jQuery(t).trigger(a,i),e.emit(a,i),r.emit(a,i)},t},triggerHandler:function(t,e,r){var a,i;typeof jQuery<"u"&&(a=jQuery(t).triggerHandler(e,r));var n=t._ev;if(!n)return a;var o=n._events[e];if(!o)return a;function l(f){if(f.listener){if(n.removeListener(e,f.listener),!f.fired)return f.fired=!0,f.listener.apply(n,[r])}else return f.apply(n,[r])}o=Array.isArray(o)?o:[o];var s;for(s=0;s<o.length-1;s++)l(o[s]);return i=l(o[s]),a!==void 0?a:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}},Ql=MS,dm=de,SS=So.dfltConfig;function LS(t,e){for(var r=[],a,i=0;i<e.length;i++)a=e[i],a===t?r[i]=a:typeof a=="object"?r[i]=Array.isArray(a)?dm.extendDeep([],a):dm.extendDeepAll({},a):r[i]=a;return r}var ri={};ri.add=function(t,e,r,a,i){var n,o;if(t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},o=t.undoQueue.index,t.autoplay){t.undoQueue.inSequence||(t.autoplay=!1);return}!t.undoQueue.sequence||t.undoQueue.beginSequence?(n={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(o,t.undoQueue.queue.length-o,n),t.undoQueue.index+=1):n=t.undoQueue.queue[o-1],t.undoQueue.beginSequence=!1,n&&(n.undo.calls.unshift(e),n.undo.args.unshift(r),n.redo.calls.push(a),n.redo.args.push(i)),t.undoQueue.queue.length>SS.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)};ri.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0};ri.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1};ri.undo=function(e){var r,a;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,r=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a<r.undo.calls.length;a++)ri.plotDo(e,r.undo.calls[a],r.undo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1}};ri.redo=function(e){var r,a;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index>=e.undoQueue.queue.length)){for(r=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a<r.redo.calls.length;a++)ri.plotDo(e,r.redo.calls[a],r.redo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}};ri.plotDo=function(t,e,r){t.autoplay=!0,r=LS(t,r),e.apply(null,r)};var CS=ri,$o={},t_={_isLinkedToArray:"frames_entry",group:{valType:"string",description:["An identifier that specifies the group to which the frame belongs,","used by animate to select a subset of frames."].join(" ")},name:{valType:"string",description:"A label by which to identify the frame"},traces:{valType:"any",description:["A list of trace indices that identify the respective traces in the","data attribute"].join(" ")},baseframe:{valType:"string",description:["The name of the frame into which this frame's properties are merged","before applying. This is used to unify properties and avoid needing","to specify the same values for the same properties in multiple frames."].join(" ")},data:{valType:"any",description:["A list of traces this frame modifies. The format is identical to the","normal trace definition."].join(" ")},layout:{valType:"any",description:["Layout properties which this frame modifies. The format is identical","to the normal layout definition."].join(" ")}},r_=de,a_=r_.extendFlat,DS=r_.isPlainObject,i_={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"],description:["trace attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*clearAxisTypes* resets the types of the axes this trace is on, because new data could","cause the automatic axis type detection to change. Log type will not be cleared, as that","is never automatically chosen so must have been user-specified.","*plot* (re)plots but without first clearing `gd.calcdata`.","*style* only calls `module.style` (or module.editStyle) for all trace modules and redraws the legend.","*markerSize* is like *style*, but propagate axis-range changes due to scatter `marker.size`","*colorbars* only redraws colorbars."].join(" ")},n_={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"],description:["layout attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*plot* (re)plots but without first clearing `gd.calcdata`.","*legend* only redraws the legend.","*ticks* only redraws axis ticks, labels, and gridlines.","*axrange* minimal sequence when updating axis ranges.","*layoutstyle* reapplies global and SVG cartesian axis styles.","*modebar* just updates the modebar.","*camera* just updates the camera settings for gl3d scenes.","*arraydraw* allows component arrays to invoke the redraw routines just for the","component(s) that changed.","*colorbars* only redraws colorbars."].join(" ")},$S=i_.flags.slice().concat(["fullReplot"]),PS=n_.flags.slice().concat("layoutReplot"),ai={traces:i_,layout:n_,traceFlags:function(){return hm($S)},layoutFlags:function(){return hm(PS)},update:function(t,e){var r=e.editType;if(r&&r!=="none")for(var a=r.split("+"),i=0;i<a.length;i++)t[a[i]]=!0},overrideAll:o_};function hm(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function o_(t,e,r){var a=a_({},t);for(var i in a){var n=a[i];DS(n)&&(a[i]=l_(n,e,r,i))}return r==="from-root"&&(a.editType=e),a}function l_(t,e,r,a){if(t.valType){var i=a_({},t);if(i.editType=e,Array.isArray(t.items)){i.items=new Array(t.items.length);for(var n=0;n<t.items.length;n++)i.items[n]=l_(t.items[n],e)}return i}else return o_(t,e,a.charAt(0)==="_"?"nested":"from-root")}(function(t){var e=tt,r=de,a=Ba,i=Kl,n=t_,o=hc,l=So.configAttributes,s=ai,f=r.extendDeepAll,c=r.isPlainObject,v=r.isArrayOrTypedArray,u=r.nestedProperty,h=r.valObjectMeta,d="_isSubplotObj",p="_isLinkedToArray",y="_arrayAttrRegexps",m="_deprecated",g=[d,p,y,m];t.IS_SUBPLOT_OBJ=d,t.IS_LINKED_TO_ARRAY=p,t.DEPRECATED=m,t.UNDERSCORE_ATTRS=g,t.get=function(){var E={};e.allTypes.forEach(function(R){E[R]=_(R)});var P={};return Object.keys(e.transformsRegistry).forEach(function(R){P[R]=k(R)}),{defs:{valObjects:h,metaKeys:g.concat(["description","role","editType","impliedEdits"]),editType:{traces:s.traces,layout:s.layout},impliedEdits:{description:["Sometimes when an attribute is changed, other attributes","must be altered as well in order to achieve the intended","result. For example, when `range` is specified, it is","important to set `autorange` to `false` or the new `range`","value would be lost in the redraw. `impliedEdits` is the","mechanism to do this: `impliedEdits: {autorange: false}`.","Each key is a relative paths to the attribute string to","change, using *^* to ascend into the parent container,","for example `range[0]` has `impliedEdits: {*^autorange*: false}`.","A value of `undefined` means that the attribute will not be","changed, but its previous value should be recorded in case","we want to reverse this change later. For example, `autorange`","has `impliedEdits: {*range[0]*: undefined, *range[1]*:undefined}","because the range will likely be changed by redraw."].join(" ")}},traces:E,layout:T(),transforms:P,frames:S(),animation:M(o),config:M(l)}},t.crawl=function(E,P,R,L){var z=R||0;L=L||"",Object.keys(E).forEach(function(I){var H=E[I];if(g.indexOf(I)===-1){var V=(L?L+".":"")+I;P(H,I,E,z,V),!t.isValObject(H)&&c(H)&&I!=="impliedEdits"&&t.crawl(H,P,z+1,V)}})},t.isValObject=function(E){return E&&E.valType!==void 0},t.findArrayAttributes=function(E){var P=[],R=[],L=[],z,I;function H(K,Z,q,ie){R=R.slice(0,ie).concat([Z]),L=L.slice(0,ie).concat([K&&K._isLinkedToArray]);var fe=K&&(K.valType==="data_array"||K.arrayOk===!0)&&!(R[ie-1]==="colorbar"&&(Z==="ticktext"||Z==="tickvals"));fe&&V(z,0,"")}function V(K,Z,q){var ie=K[R[Z]],fe=q+R[Z];if(Z===R.length-1)v(ie)&&P.push(I+fe);else if(L[Z]){if(Array.isArray(ie))for(var be=0;be<ie.length;be++)c(ie[be])&&V(ie[be],Z+1,fe+"["+be+"].")}else c(ie)&&V(ie,Z+1,fe+".")}z=E,I="",t.crawl(a,H),E._module&&E._module.attributes&&t.crawl(E._module.attributes,H);var O=E.transforms;if(O)for(var X=0;X<O.length;X++){var G=O[X],Y=G._module;Y&&(I="transforms["+X+"].",z=G,t.crawl(Y.attributes,H))}return P},t.getTraceValObject=function(E,P){var R=P[0],L=1,z,I;if(R==="transforms"){if(P.length===1)return a.transforms;var H=E.transforms;if(!Array.isArray(H)||!H.length)return!1;var V=P[1];if(!x(V)||V>=H.length)return!1;z=(e.transformsRegistry[H[V].type]||{}).attributes,I=z&&z[P[2]],L=3}else{var O=E._module;if(O||(O=(e.modules[E.type||a.type.dflt]||{})._module),!O)return!1;if(z=O.attributes,I=z&&z[R],!I){var X=O.basePlotModule;X&&X.attributes&&(I=X.attributes[R])}I||(I=a[R])}return b(I,P,L)},t.getLayoutValObject=function(E,P){var R=w(E,P[0]);return b(R,P,1)};function w(E,P){var R,L,z,I,H=E._basePlotModules;if(H){var V;for(R=0;R<H.length;R++){if(z=H[R],z.attrRegex&&z.attrRegex.test(P)){if(z.layoutAttrOverrides)return z.layoutAttrOverrides;!V&&z.layoutAttributes&&(V=z.layoutAttributes)}var O=z.baseLayoutAttrOverrides;if(O&&P in O)return O[P]}if(V)return V}var X=E._modules;if(X){for(R=0;R<X.length;R++)if(I=X[R].layoutAttributes,I&&P in I)return I[P]}for(L in e.componentsRegistry){if(z=e.componentsRegistry[L],z.name==="colorscale"&&P.indexOf("coloraxis")===0)return z.layoutAttributes[P];if(!z.schema&&P===z.name)return z.layoutAttributes}return P in i?i[P]:!1}function b(E,P,R){if(!E)return!1;if(E._isLinkedToArray){if(x(P[R]))R++;else if(R<P.length)return!1}for(;R<P.length;R++){var L=E[P[R]];if(c(L))E=L;else break;if(R===P.length-1)break;if(E._isLinkedToArray){if(R++,!x(P[R]))return!1}else if(E.valType==="info_array"){R++;var z=P[R];if(!x(z))return!1;var I=E.items;if(Array.isArray(I)){if(z>=I.length)return!1;if(E.dimensions===2){if(R++,P.length===R)return E;var H=P[R];if(!x(H))return!1;E=I[z][H]}else E=I[z]}else E=I}}return E}function x(E){return E===Math.round(E)&&E>=0}function _(E){var P,R;P=e.modules[E]._module,R=P.basePlotModule;var L={};L.type=null;var z=f({},a),I=f({},P.attributes);t.crawl(I,function(O,X,G,Y,K){u(z,K).set(void 0),O===void 0&&u(I,K).set(void 0)}),f(L,z),e.traceIs(E,"noOpacity")&&delete L.opacity,e.traceIs(E,"showLegend")||(delete L.showlegend,delete L.legendgroup),e.traceIs(E,"noHover")&&(delete L.hoverinfo,delete L.hoverlabel),P.selectPoints||delete L.selectedpoints,f(L,I),R.attributes&&f(L,R.attributes),L.type=E;var H={meta:P.meta||{},categories:P.categories||{},animatable:!!P.animatable,type:E,attributes:M(L)};if(P.layoutAttributes){var V={};f(V,P.layoutAttributes),H.layoutAttributes=M(V)}return P.animatable||t.crawl(H,function(O){t.isValObject(O)&&"anim"in O&&delete O.anim}),H}function T(){var E={},P,R;f(E,i);for(P in e.subplotsRegistry)if(R=e.subplotsRegistry[P],!!R.layoutAttributes)if(Array.isArray(R.attr))for(var L=0;L<R.attr.length;L++)$(E,R,R.attr[L]);else{var z=R.attr==="subplot"?R.name:R.attr;$(E,R,z)}for(P in e.componentsRegistry){R=e.componentsRegistry[P];var I=R.schema;if(I&&(I.subplots||I.layout)){var H=I.subplots;if(H&&H.xaxis&&!H.yaxis)for(var V in H.xaxis)delete E.yaxis[V];delete E.xaxis.shift,delete E.xaxis.autoshift}else R.name==="colorscale"?f(E,R.layoutAttributes):R.layoutAttributes&&N(E,R.layoutAttributes,R.name)}return{layoutAttributes:M(E)}}function k(E){var P=e.transformsRegistry[E],R=f({},P.attributes);return Object.keys(e.componentsRegistry).forEach(function(L){var z=e.componentsRegistry[L];z.schema&&z.schema.transforms&&z.schema.transforms[E]&&Object.keys(z.schema.transforms[E]).forEach(function(I){N(R,z.schema.transforms[E][I],I)})}),{attributes:M(R)}}function S(){var E={frames:f({},n)};return M(E),E.frames}function M(E){return D(E),A(E),C(E),E}function D(E){function P(L){return{valType:"string",description:"Sets the source reference on Chart Studio Cloud for `"+L+"`.",editType:"none"}}function R(L,z,I){t.isValObject(L)?(L.arrayOk===!0||L.valType==="data_array")&&(I[z+"src"]=P(z)):c(L)&&(L.role="object")}t.crawl(E,R)}function A(E){function P(R,L,z){if(R){var I=R[p];I&&(delete R[p],z[L]={items:{}},z[L].items[I]=R,z[L].role="object")}}t.crawl(E,P)}function C(E){function P(R){for(var L in R)if(c(R[L]))P(R[L]);else if(Array.isArray(R[L]))for(var z=0;z<R[L].length;z++)P(R[L][z]);else R[L]instanceof RegExp&&(R[L]=R[L].toString())}P(E)}function $(E,P,R){var L=u(E,R),z=f({},P.layoutAttributes);z[d]=!0,L.set(z)}function N(E,P,R){var L=u(E,R);L.set(f(L.get()||{},P))}})($o);var s_={exports:{}},It={},lo=de,ES=Ba,wi="templateitemname",cd={name:{valType:"string",editType:"none",description:["When used in a template, named items are created in the output figure","in addition to any items the figure already has in this array.","You can modify these items in the output figure by making your own","item with `templateitemname` matching this `name`","alongside your modifications (including `visible: false` or","`enabled: false` to hide it).","Has no effect outside of a template."].join(" ")}};cd[wi]={valType:"string",editType:"calc",description:["Used to refer to a named item in this array in the template. Named","items from the template will be created even without a matching item","in the input figure, but you can modify one by making an item with","`templateitemname` matching its `name`, alongside your modifications","(including `visible: false` or `enabled: false` to hide it).","If there is no template or no matching item, this item will be","hidden unless you explicitly show it with `visible: true`."].join(" ")};It.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=cd.name,e[wi]=cd[wi],e};It.traceTemplater=function(t){var e={},r,a;for(r in t)a=t[r],Array.isArray(a)&&a.length&&(e[r]=0);function i(n){r=lo.coerce(n,{},ES,"type");var o={type:r,_template:null};if(r in e){a=t[r];var l=e[r]%a.length;e[r]++,o._template=a[l]}return o}return{newTrace:i}};It.newContainer=function(t,e,r){var a=t._template,i=a&&(a[e]||r&&a[r]);lo.isPlainObject(i)||(i=null);var n=t[e]={_template:i};return n};It.arrayTemplater=function(t,e,r){var a=t._template,i=a&&a[f_(e)],n=a&&a[e];(!Array.isArray(n)||!n.length)&&(n=[]);var o={};function l(f){var c={name:f.name,_input:f},v=c[wi]=f[wi];if(!pm(v))return c._template=i,c;for(var u=0;u<n.length;u++){var h=n[u];if(h.name===v)return o[v]=1,c._template=h,c}return c[r]=f[r]||!1,c._template=!1,c}function s(){for(var f=[],c=0;c<n.length;c++){var v=n[c],u=v.name;if(pm(u)&&!o[u]){var h={_template:v,name:u,_input:{_templateitemname:u}};h[wi]=v[wi],f.push(h),o[u]=1}}return f}return{newItem:l,defaultItems:s}};function pm(t){return t&&typeof t=="string"}function f_(t){var e=t.length-1;return t.charAt(e)!=="s"&&lo.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}It.arrayDefaultKey=f_;It.arrayEditor=function(t,e,r){var a=(lo.nestedProperty(t,e).get()||[]).length,i=r._index,n=i>=a&&(r._input||{})._templateitemname;n&&(i=a);var o=e+"["+i+"]",l;function s(){l={},n&&(l[o]={},l[o][wi]=n)}s();function f(h,d){l[h]=d}function c(h,d){n?lo.nestedProperty(l[o],h).set(d):l[o+"."+h]=d}function v(){var h=l;return s(),h}function u(h,d){h&&c(h,d);var p=v();for(var y in p)lo.nestedProperty(t,y).set(p[y])}return{modifyBase:f,modifyItem:c,getUpdateObj:v,applyUpdate:u}};var nr={},Oo=Mo.counter,Hr={idRegex:{x:Oo("x","( domain)?"),y:Oo("y","( domain)?")},attrRegex:Oo("[xy]axis"),xAxisMatch:Oo("xaxis"),yAxisMatch:Oo("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"}};(function(t){var e=tt,r=Hr;t.id2name=function(n){if(!(typeof n!="string"||!n.match(r.AX_ID_PATTERN))){var o=n.split(" ")[0].substr(1);return o==="1"&&(o=""),n.charAt(0)+"axis"+o}},t.name2id=function(n){if(n.match(r.AX_NAME_PATTERN)){var o=n.substr(5);return o==="1"&&(o=""),n.charAt(0)+o}},t.cleanId=function(n,o,l){var s=/( domain)$/.test(n);if(!(typeof n!="string"||!n.match(r.AX_ID_PATTERN))&&!(o&&n.charAt(0)!==o)&&!(s&&!l)){var f=n.split(" ")[0].substr(1).replace(/^0+/,"");return f==="1"&&(f=""),n.charAt(0)+f+(s&&l?" domain":"")}},t.list=function(i,n,o){var l=i._fullLayout;if(!l)return[];var s=t.listIds(i,n),f=new Array(s.length),c;for(c=0;c<s.length;c++){var v=s[c];f[c]=l[v.charAt(0)+"axis"+v.substr(1)]}if(!o){var u=l._subplots.gl3d||[];for(c=0;c<u.length;c++){var h=l[u[c]];n?f.push(h[n+"axis"]):f.push(h.xaxis,h.yaxis,h.zaxis)}}return f},t.listIds=function(i,n){var o=i._fullLayout;if(!o)return[];var l=o._subplots;return n?l[n+"axis"]:l.xaxis.concat(l.yaxis)},t.getFromId=function(i,n,o){var l=i._fullLayout;return n=n===void 0||typeof n!="string"?n:n.replace(" domain",""),o==="x"?n=n.replace(/y[0-9]*/,""):o==="y"&&(n=n.replace(/x[0-9]*/,"")),l[t.id2name(n)]},t.getFromTrace=function(i,n,o){var l=i._fullLayout,s=null;if(e.traceIs(n,"gl3d")){var f=n.scene;f.substr(0,5)==="scene"&&(s=l[f][o+"axis"])}else s=t.getFromId(i,n[o+"axis"]||o);return s},t.idSort=function(i,n){var o=i.charAt(0),l=n.charAt(0);return o!==l?o>l?1:-1:+(i.substr(1)||1)-+(n.substr(1)||1)},t.ref2id=function(i){return/^[xyz]/.test(i)?i.split(" ")[0]:!1};function a(i,n){if(n&&n.length){for(var o=0;o<n.length;o++)if(n[o][i])return!0}return!1}t.isLinked=function(i,n){return a(n,i._axisMatchGroups)||a(n,i._axisConstraintGroups)}})(nr);function RS(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()}function zS(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}var gn={clearOutlineControllers:RS,clearOutline:zS},Dh={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc",description:["Determines how scatter points at the same location coordinate","are displayed on the graph.","With *group*, the scatter points are plotted next to one another","centered around the shared location.","With *overlay*, the scatter points are plotted over one another,","you might need to reduce *opacity* to see multiple scatter points."].join(" ")},scattergap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between scatter points of","adjacent location coordinates.","Defaults to `bargap`."].join(" ")}},Jl={},pl=tt,IS=Hr.SUBPLOT_PATTERN;Jl.getSubplotCalcData=function(t,e,r){var a=pl.subplotsRegistry[e];if(!a)return[];for(var i=a.attr,n=[],o=0;o<t.length;o++){var l=t[o],s=l[0].trace;s[i]===r&&n.push(l)}return n};Jl.getModuleCalcData=function(t,e){var r=[],a=[],i;if(typeof e=="string"?i=pl.getModule(e).plot:typeof e=="function"?i=e:i=e.plot,!i)return[r,t];for(var n=0;n<t.length;n++){var o=t[n],l=o[0].trace;l.visible!==!0||l._length===0||(l._module.plot===i?r.push(o):a.push(o))}return[r,a]};Jl.getSubplotData=function(e,r,a){if(!pl.subplotsRegistry[r])return[];var i=pl.subplotsRegistry[r].attr,n=[],o,l,s;if(r==="gl2d"){var f=a.match(IS);l="x"+f[1],s="y"+f[2]}for(var c=0;c<e.length;c++)o=e[c],r==="gl2d"&&pl.traceIs(o,"gl2d")?o[i[0]]===l&&o[i[1]]===s&&n.push(o):o[i]===a&&n.push(o);return n};var iu={},mm;function FS(){return mm||(mm=1,function(t){var e=tt,r=de;t.manageCommandObserver=function(s,f,c,v){var u={},h=!0;f&&f._commandObserver&&(u=f._commandObserver),u.cache||(u.cache={}),u.lookupTable={};var d=t.hasSimpleAPICommandBindings(s,c,u.lookupTable);if(f&&f._commandObserver){if(d)return u;if(f._commandObserver.remove)return f._commandObserver.remove(),f._commandObserver=null,u}if(d){a(s,d,u.cache),u.check=function(){if(h){var g=a(s,d,u.cache);return g.changed&&v&&u.lookupTable[g.value]!==void 0&&(u.disable(),Promise.resolve(v({value:g.value,type:d.type,prop:d.prop,traces:d.traces,index:u.lookupTable[g.value]})).then(u.enable,u.enable)),g.changed}};for(var p=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],y=0;y<p.length;y++)s._internalOn(p[y],u.check);u.remove=function(){for(var m=0;m<p.length;m++)s._removeInternalListener(p[m],u.check)}}else r.log("Unable to automatically bind plot updates to API command"),u.lookupTable={},u.remove=function(){};return u.disable=function(){h=!1},u.enable=function(){h=!0},f&&(f._commandObserver=u),u},t.hasSimpleAPICommandBindings=function(s,f,c){var v,u=f.length,h;for(v=0;v<u;v++){var d,p=f[v],y=p.method,m=p.args;if(Array.isArray(m)||(m=[]),!y)return!1;var g=t.computeAPICommandBindings(s,y,m);if(g.length!==1)return!1;if(!h)h=g[0],Array.isArray(h.traces)&&h.traces.sort();else{if(d=g[0],d.type!==h.type||d.prop!==h.prop)return!1;if(Array.isArray(h.traces))if(Array.isArray(d.traces)){d.traces.sort();for(var w=0;w<h.traces.length;w++)if(h.traces[w]!==d.traces[w])return!1}else return!1;else if(d.prop!==h.prop)return!1}d=g[0];var b=d.value;if(Array.isArray(b))if(b.length===1)b=b[0];else return!1;c&&(c[b]=v)}return h};function a(s,f,c){var v,u,h,d=!1;if(f.type==="data")v=s._fullData[f.traces!==null?f.traces[0]:0];else if(f.type==="layout")v=s._fullLayout;else return!1;return u=r.nestedProperty(v,f.prop).get(),h=c[f.type]=c[f.type]||{},h.hasOwnProperty(f.prop)&&h[f.prop]!==u&&(d=!0),h[f.prop]=u,{changed:d,value:u}}t.executeAPICommand=function(s,f,c){if(f==="skip")return Promise.resolve();var v=e.apiMethodRegistry[f],u=[s];Array.isArray(c)||(c=[]);for(var h=0;h<c.length;h++)u.push(c[h]);return v.apply(null,u).catch(function(d){return r.warn("API call to Plotly."+f+" rejected.",d),Promise.reject(d)})},t.computeAPICommandBindings=function(s,f,c){var v;switch(Array.isArray(c)||(c=[]),f){case"restyle":v=o(s,c);break;case"relayout":v=n(s,c);break;case"update":v=o(s,[c[0],c[2]]).concat(n(s,[c[1]]));break;case"animate":v=i(s,c);break;default:v=[]}return v};function i(s,f){return Array.isArray(f[0])&&f[0].length===1&&["string","number"].indexOf(typeof f[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:f[0][0].toString()}]:[]}function n(s,f){var c=[],v=f[0],u={};if(typeof v=="string")u[v]=f[1];else if(r.isPlainObject(v))u=v;else return c;return l(u,function(h,d,p){c.push({type:"layout",prop:h,value:p})},"",0),c}function o(s,f){var c,v,u,h,d=[];if(v=f[0],u=f[1],c=f[2],h={},typeof v=="string")h[v]=u;else if(r.isPlainObject(v))h=v,c===void 0&&(c=u);else return d;return c===void 0&&(c=null),l(h,function(p,y,m){var g,w;if(Array.isArray(m)){w=m.slice();var b=Math.min(w.length,s.data.length);c&&(b=Math.min(b,c.length)),g=[];for(var x=0;x<b;x++)g[x]=c?c[x]:x}else w=m,g=c?c.slice():null;if(g===null)Array.isArray(w)&&(w=w[0]);else if(Array.isArray(g)){if(!Array.isArray(w)){var _=w;w=[];for(var T=0;T<g.length;T++)w[T]=_}w.length=Math.min(g.length,w.length)}d.push({type:"data",prop:p,traces:g,value:w})},"",0),d}function l(s,f,c,v){Object.keys(s).forEach(function(u){var h=s[u];if(u[0]!=="_"){var d=c+(v>0?".":"")+u;r.isPlainObject(h)?l(h,f,d,v+1):f(d,u,h)}})}}(iu)),iu}var c_=yt,NS=Al.timeFormatLocale,HS=c1.formatLocale,$f=_t,St=tt,u_=$o,OS=It,He=de,v_=ut,ym=ir.BADNUM,Gr=nr,BS=gn.clearOutline,jS=Dh,$h=hc,GS=t_,US=Jl.getModuleCalcData,ud=He.relinkPrivateKeys,Mn=He._,Ee=s_.exports={};He.extendFlat(Ee,St);Ee.attributes=Ba;Ee.attributes.type.values=Ee.allTypes;Ee.fontAttrs=Dr;Ee.layoutAttributes=Kl;Ee.fontWeight="normal";var gc=Ee.transformsRegistry,bc=FS();Ee.executeAPICommand=bc.executeAPICommand;Ee.computeAPICommandBindings=bc.computeAPICommandBindings;Ee.manageCommandObserver=bc.manageCommandObserver;Ee.hasSimpleAPICommandBindings=bc.hasSimpleAPICommandBindings;Ee.redrawText=function(t){return t=He.getGraphDiv(t),new Promise(function(e){setTimeout(function(){t._fullLayout&&(St.getComponentMethod("annotations","draw")(t),St.getComponentMethod("legend","draw")(t),St.getComponentMethod("colorbar","draw")(t),e(Ee.previousPromises(t)))},300)})};Ee.resize=function(t){t=He.getGraphDiv(t);var e,r=new Promise(function(a,i){(!t||He.isHidden(t))&&i(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=a,t._redrawTimer=setTimeout(function(){if(!t.layout||t.layout.width&&t.layout.height||He.isHidden(t)){a(t);return}delete t.layout.width,delete t.layout.height;var n=t.changed;t.autoplay=!0,St.call("relayout",t,{autosize:!0}).then(function(){t.changed=n,t._resolveResize===a&&(delete t._resolveResize,a(t))})},100)});return e&&e(r),r};Ee.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})};Ee.addLinks=function(t){if(!(!t._context.showLink&&!t._context.showSources)){var e=t._fullLayout,r=He.ensureSingle(e._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:v_.defaultLine,"pointer-events":"all"}).each(function(){var f=c_.select(this);f.append("tspan").classed("js-link-to-tool",!0),f.append("tspan").classed("js-link-spacer",!0),f.append("tspan").classed("js-sourcelinks",!0)})}),a=r.node(),i={y:e._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=e.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=e._paper.attr("width")-7),r.attr(i);var n=r.select(".js-link-to-tool"),o=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&VS(t,n),o.text(n.text()&&l.text()?" - ":"")}};function VS(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",function(){Ee.sendDataToCloud(t)});else{var a=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+i})}}Ee.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=c_.select(t).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"}),i=a.append("input").attr({type:"text",name:"data"});return i.node().value=Ee.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var WS=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],XS=["year","month","dayMonth","dayMonthYear"];Ee.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,a=t._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var i=t._fullLayout={},n=t.layout||{},o=t._fullData||[],l=t._fullData=[],s=t.data||[],f=t.calcdata||[],c=t._context||{},v;t._transitionData||Ee.createTransitionData(t),i._dfltTitle={plot:Mn(t,"Click to enter Plot title"),x:Mn(t,"Click to enter X axis title"),y:Mn(t,"Click to enter Y axis title"),colorbar:Mn(t,"Click to enter Colorscale title"),annotation:Mn(t,"new text")},i._traceWord=Mn(t,"trace");var u=gm(t,WS);if(i._mapboxAccessToken=c.mapboxAccessToken,a._initialAutoSizeIsDone){var h=a.width,d=a.height;Ee.supplyLayoutGlobalDefaults(n,i,u),n.width||(i.width=h),n.height||(i.height=d),Ee.sanitizeMargins(i)}else{Ee.supplyLayoutGlobalDefaults(n,i,u);var p=!n.width||!n.height,y=i.autosize,m=c.autosizable,g=p&&(y||m);g?Ee.plotAutoSize(t,n,i):p&&Ee.sanitizeMargins(i),!y&&p&&(n.width=i.width,n.height=i.height)}i._d3locale=ZS(u,i.separators),i._extraFormat=gm(t,XS),i._initialAutoSizeIsDone=!0,i._dataLength=s.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var w=i._subplots=qS(),b=i._splomAxes={x:{},y:{}},x=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=YS(o,s),i._globalTransforms=(t._context||{}).globalTransforms,Ee.supplyDataDefaults(s,l,n,i);var _=Object.keys(b.x),T=Object.keys(b.y);if(_.length>1&&T.length>1){for(St.getComponentMethod("grid","sizeDefaults")(n,i),v=0;v<_.length;v++)He.pushUnique(w.xaxis,_[v]);for(v=0;v<T.length;v++)He.pushUnique(w.yaxis,T[v]);for(var k in x)He.pushUnique(w.cartesian,k)}if(i._has=Ee._hasPlotType.bind(i),o.length===l.length)for(v=0;v<l.length;v++)ud(l[v],o[v]);Ee.supplyLayoutModuleDefaults(n,i,l,t._transitionData);var S=i._visibleModules,M=[];for(v=0;v<S.length;v++){var D=S[v].crossTraceDefaults;D&&He.pushUnique(M,D)}for(v=0;v<M.length;v++)M[v](l,i);i._hasOnlyLargeSploms=i._basePlotModules.length===1&&i._basePlotModules[0].name==="splom"&&_.length>15&&T.length>15&&i.shapes.length===0&&i.images.length===0,Ee.linkSubplots(l,i,o,a),Ee.cleanPlot(l,i,o,a);var A=!!(a._has&&a._has("gl2d")),C=!!(i._has&&i._has("gl2d")),$=!!(a._has&&a._has("cartesian")),N=!!(i._has&&i._has("cartesian")),E=$||A,P=N||C;E&&!P?a._bgLayer.remove():P&&!E&&(i._shouldCreateBgLayer=!0),a._zoomlayer&&!t._dragging&&BS({_fullLayout:a}),KS(l,i),ud(i,a),St.getComponentMethod("colorscale","crossTraceDefaults")(l,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var R=i._tracePreGUI,L={},z;for(z in R)L[z]="old";for(v=0;v<l.length;v++)z=l[v]._fullInput.uid,L[z]||(R[z]={}),L[z]="new";for(z in L)L[z]==="old"&&delete R[z];h_(i),St.getComponentMethod("rangeslider","makeData")(i),!r&&f.length===l.length&&Ee.supplyDefaultsUpdateCalc(f,l)};Ee.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var a=e[r],i=(t[r]||[])[0];if(i&&i.trace){var n=i.trace;if(n._hasCalcTransform){var o=n._arrayAttrs,l,s,f;for(l=0;l<o.length;l++)s=o[l],f=He.nestedProperty(n,s).get().slice(),He.nestedProperty(a,s).set(f)}i.trace=a}}};function YS(t,e){var r=e.length,a=[],i,n;for(i=0;i<t.length;i++){var o=t[i]._fullInput;o!==n&&a.push(o),n=o}var l=a.length,s=new Array(r),f={};function c(h,d){s[d]=h,f[h]=1}function v(h,d){if(h&&typeof h=="string"&&!f[h])return c(h,d),!0}for(i=0;i<r;i++){var u=e[i].uid;typeof u=="number"&&(u=String(u)),!v(u,i)&&(i<l&&v(a[i].uid,i)||c(He.randstr(f),i))}return s}function qS(){var t=St.collectableSubplotTypes,e={},r,a;if(!t){t=[];var i=St.subplotsRegistry;for(var n in i){var o=i[n],l=o.attr;if(l&&(t.push(n),Array.isArray(l)))for(a=0;a<l.length;a++)He.pushUnique(t,l[a])}}for(r=0;r<t.length;r++)e[t[r]]=[];return e}function gm(t,e){var r=t._context.locale;r||(r="en-US");var a=!1,i={};function n(v){for(var u=!0,h=0;h<e.length;h++){var d=e[h];i[d]||(v[d]?i[d]=v[d]:u=!1)}u&&(a=!0)}for(var o=0;o<2;o++){for(var l=t._context.locales,s=0;s<2;s++){var f=(l[r]||{}).format;if(f&&(n(f),a))break;l=St.localeRegistry}var c=r.split("-")[0];if(a||c===r)break;r=c}return a||n(St.localeRegistry.en.format),i}function ZS(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(r){try{r=HS(t).format(He.adjustFormat(r))}catch{return He.warnBadFormat(r),He.noFormat}return r},timeFormat:NS(t).utcFormat}}function KS(t,e){var r,a=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i<t.length;i++){var n=t[i];n.meta?a[n.index]=n._meta={meta:n.meta}:e.meta&&(n._meta={meta:e.meta}),e.meta&&(n._meta.layout={meta:e.meta})}a.length&&(r||(r=e._meta={}),r.data=a)}Ee.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])};Ee._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var a=this._modules||[];for(e=0;e<a.length;e++){var i=a[e].name;if(i===t)return!0;var n=St.modules[i];if(n&&n.categories[t])return!0}return!1};Ee.cleanPlot=function(t,e,r,a){var i,n,o=a._basePlotModules||[];for(i=0;i<o.length;i++){var l=o[i];l.clean&&l.clean(t,e,r,a)}var s=a._has&&a._has("gl"),f=e._has&&e._has("gl");s&&!f&&a._glcontainer!==void 0&&(a._glcontainer.selectAll(".gl-canvas").remove(),a._glcontainer.selectAll(".no-webgl").remove(),a._glcanvas=null);var c=!!a._infolayer;e:for(i=0;i<r.length;i++){var v=r[i],u=v.uid;for(n=0;n<t.length;n++){var h=t[n];if(u===h.uid)continue e}c&&a._infolayer.select(".cb"+u).remove()}};Ee.linkSubplots=function(t,e,r,a){var i,n,o=a._plots||{},l=e._plots={},s=e._subplots,f={_fullData:t,_fullLayout:e},c=s.cartesian.concat(s.gl2d||[]);for(i=0;i<c.length;i++){var v=c[i],u=o[v],h=Gr.getFromId(f,v,"x"),d=Gr.getFromId(f,v,"y"),p;for(u?p=l[v]=u:(p=l[v]={},p.id=v),h._counterAxes.push(d._id),d._counterAxes.push(h._id),h._subplotsWith.push(v),d._subplotsWith.push(v),p.xaxis=h,p.yaxis=d,p._hasClipOnAxisFalse=!1,n=0;n<t.length;n++){var y=t[n];if(y.xaxis===p.xaxis._id&&y.yaxis===p.yaxis._id&&y.cliponaxis===!1){p._hasClipOnAxisFalse=!0;break}}}var m=Gr.list(f,null,!0),g;for(i=0;i<m.length;i++){g=m[i];var w=null;g.overlaying&&(w=Gr.getFromId(f,g.overlaying),w&&w.overlaying&&(g.overlaying=!1,w=null)),g._mainAxis=w||g,w&&(g.domain=w.domain.slice()),g._anchorAxis=g.anchor==="free"?null:Gr.getFromId(f,g.anchor)}for(i=0;i<m.length;i++)if(g=m[i],g._counterAxes.sort(Gr.idSort),g._subplotsWith.sort(He.subplotSort),g._mainSubplot=QS(g,e),g._counterAxes.length&&(g.spikemode&&g.spikemode.indexOf("across")!==-1||g.automargin&&g.mirror&&g.anchor!=="free"||St.getComponentMethod("rangeslider","isVisible")(g))){var b=1,x=0;for(n=0;n<g._counterAxes.length;n++){var _=Gr.getFromId(f,g._counterAxes[n]);b=Math.min(b,_.domain[0]),x=Math.max(x,_.domain[1])}b<x&&(g._counterDomainMin=b,g._counterDomainMax=x)}};function QS(t,e){var r={_fullLayout:e},a=t._id.charAt(0)==="x",i=t._mainAxis._anchorAxis,n="",o="",l="";if(i&&(l=i._mainAxis._id,n=a?t._id+l:l+t._id),!n||!e._plots[n]){n="";for(var s=t._counterAxes,f=0;f<s.length;f++){var c=s[f],v=a?t._id+c:c+t._id;o||(o=v);var u=Gr.getFromId(r,c);if(l&&u.overlaying===l){n=v;break}}}return n||o}Ee.clearExpandedTraceDefaultColors=function(t){var e,r,a;function i(o,l,s,f){r[f]=l,r.length=f+1,o.valType==="color"&&o.dflt===void 0&&e.push(r.join("."))}for(r=[],e=t._module._colorAttrs,e||(t._module._colorAttrs=e=[],u_.crawl(t._module.attributes,i)),a=0;a<e.length;a++){var n=He.nestedProperty(t,"_input."+e[a]);n.get()||He.nestedProperty(t,e[a]).set(null)}};Ee.supplyDataDefaults=function(t,e,r,a){var i=a._modules,n=a._visibleModules,o=a._basePlotModules,l=0,s=0,f,c,v;a._transformModules=[];function u(T){e.push(T);var k=T._module;k&&(He.pushUnique(i,k),T.visible===!0&&He.pushUnique(n,k),He.pushUnique(o,T._module.basePlotModule),l++,T._input.visible!==!1&&s++)}var h={},d=[],p=(r.template||{}).data||{},y=OS.traceTemplater(p);for(f=0;f<t.length;f++){if(v=t[f],c=y.newTrace(v),c.uid=a._traceUids[f],Ee.supplyTraceDefaults(v,c,s,a,f),c.index=f,c._input=v,c._expandedIndex=l,c.transforms&&c.transforms.length)for(var m=v.visible!==!1&&c.visible===!1,g=JS(c,e,r,a),w=0;w<g.length;w++){var b=g[w],x={_template:c._template,type:c.type,uid:c.uid+w};m&&b.visible===!1&&delete b.visible,Ee.supplyTraceDefaults(b,x,l,a,f),ud(x,b),x.index=f,x._input=v,x._fullInput=c,x._expandedIndex=l,x._expandedInput=b,u(x)}else c._fullInput=c,c._expandedInput=c,u(c);St.traceIs(c,"carpetAxis")&&(h[c.carpet]=c),St.traceIs(c,"carpetDependent")&&d.push(f)}for(f=0;f<d.length;f++)if(c=e[d[f]],!!c.visible){var _=h[c.carpet];if(c._carpet=_,!_||!_.visible){c.visible=!1;continue}c.xaxis=_.xaxis,c.yaxis=_.yaxis}};Ee.supplyAnimationDefaults=function(t){t=t||{};var e,r={};function a(i,n){return He.coerce(t||{},r,$h,i,n)}if(a("mode"),a("direction"),a("fromcurrent"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=Ee.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=Ee.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=Ee.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=Ee.supplyAnimationTransitionDefaults(t.transition||{});return r};Ee.supplyAnimationFrameDefaults=function(t){var e={};function r(a,i){return He.coerce(t||{},e,$h.frame,a,i)}return r("duration"),r("redraw"),e};Ee.supplyAnimationTransitionDefaults=function(t){var e={};function r(a,i){return He.coerce(t||{},e,$h.transition,a,i)}return r("duration"),r("easing"),e};Ee.supplyFrameDefaults=function(t){var e={};function r(a,i){return He.coerce(t,e,GS,a,i)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e};Ee.supplyTraceDefaults=function(t,e,r,a,i){var n=a.colorway||v_.defaults,o=n[r%n.length],l;function s(g,w){return He.coerce(t,e,Ee.attributes,g,w)}var f=s("visible");s("type"),s("name",a._traceWord+" "+i),s("uirevision",a.uirevision);var c=Ee.getModule(e);if(e._module=c,c){var v=c.basePlotModule,u=v.attr,h=v.attributes;if(u&&h){var d=a._subplots,p="";if(f||v.name!=="gl2d"){if(Array.isArray(u))for(l=0;l<u.length;l++){var y=u[l],m=He.coerce(t,e,h,y);d[y]&&He.pushUnique(d[y],m),p+=m}else p=He.coerce(t,e,h,u);d[v.name]&&He.pushUnique(d[v.name],p)}}}return f&&(s("customdata"),s("ids"),s("meta"),St.traceIs(e,"showLegend")?(He.coerce(t,e,c.attributes.showlegend?c.attributes:Ee.attributes,"showlegend"),s("legendwidth"),s("legendgroup"),s("legendgrouptitle.text"),s("legendrank"),e._dfltShowLegend=!0):e._dfltShowLegend=!1,c&&c.supplyDefaults(t,e,o,a),St.traceIs(e,"noOpacity")||s("opacity"),St.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),St.traceIs(e,"noHover")||(e.hovertemplate||He.coerceHoverinfo(t,e,a),e.type!=="parcats"&&St.getComponentMethod("fx","supplyDefaults")(t,e,o,a)),c&&c.selectPoints&&s("selectedpoints"),Ee.supplyTransformDefaults(t,e,a)),e};function d_(t){var e=t.transforms;if(Array.isArray(e)&&e.length)for(var r=0;r<e.length;r++){var a=e[r],i=a._module||gc[a.type];if(i&&i.makesData)return!0}return!1}Ee.hasMakesDataTransform=d_;Ee.supplyTransformDefaults=function(t,e,r){if(e._length||d_(t)){var a=r._globalTransforms||[],i=r._transformModules||[];if(!(!Array.isArray(t.transforms)&&a.length===0))for(var n=t.transforms||[],o=a.concat(n),l=e.transforms=[],s=0;s<o.length;s++){var f=o[s],c=f.type,v=gc[c],u,h=!(f._module&&f._module===v),d=v&&typeof v.transform=="function";v||He.warn("Unrecognized transform type "+c+"."),v&&v.supplyDefaults&&(h||d)?(u=v.supplyDefaults(f,e,r,t),u.type=c,u._module=v,He.pushUnique(i,v)):u=He.extendFlat({},f),l.push(u)}}};function JS(t,e,r,a){for(var i=t.transforms,n=[t],o=0;o<i.length;o++){var l=i[o],s=gc[l.type];s&&s.transform&&(n=s.transform(n,{transform:l,fullTrace:t,fullData:e,layout:r,fullLayout:a,transformIndex:o}))}return n}Ee.supplyLayoutGlobalDefaults=function(t,e,r){function a(f,c){return He.coerce(t,e,Ee.layoutAttributes,f,c)}var i=t.template;He.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),a("autotypenumbers");var n=He.coerceFont(a,"font"),o=n.size;He.coerceFont(a,"title.font",He.extendFlat({},n,{size:Math.round(o*1.4)})),a("title.text",e._dfltTitle.plot),a("title.xref"),a("title.yref"),a("title.x"),a("title.y"),a("title.xanchor"),a("title.yanchor"),a("title.pad.t"),a("title.pad.r"),a("title.pad.b"),a("title.pad.l");var l=a("uniformtext.mode");l&&a("uniformtext.minsize"),a("autosize",!(t.width&&t.height)),a("width"),a("height"),a("minreducedwidth"),a("minreducedheight"),a("margin.l"),a("margin.r"),a("margin.t"),a("margin.b"),a("margin.pad"),a("margin.autoexpand"),t.width&&t.height&&Ee.sanitizeMargins(e),St.getComponentMethod("grid","sizeDefaults")(t,e),a("paper_bgcolor"),a("separators",r.decimal+r.thousands),a("hidesources"),a("colorway"),a("datarevision");var s=a("uirevision");a("editrevision",s),a("selectionrevision",s),St.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),St.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,a),St.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(t,e,a),a("meta"),He.isPlainObject(t.transition)&&(a("transition.duration"),a("transition.easing"),a("transition.ordering")),St.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),St.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,a),He.coerce(t,e,jS,"scattermode")};function ys(t){return typeof t=="string"&&t.substr(t.length-2)==="px"&&parseFloat(t)}Ee.plotAutoSize=function(e,r,a){var i=e._context||{},n=i.frameMargins,o,l,s=He.isPlotDiv(e);if(s&&e.emit("plotly_autosize"),i.fillFrame)o=window.innerWidth,l=window.innerHeight,document.body.style.overflow="hidden";else{var f=s?window.getComputedStyle(e):{};if(o=ys(f.width)||ys(f.maxWidth)||a.width,l=ys(f.height)||ys(f.maxHeight)||a.height,$f(n)&&n>0){var c=1-2*n;o=Math.round(c*o),l=Math.round(c*l)}}var v=Ee.layoutAttributes.width.min,u=Ee.layoutAttributes.height.min;o<v&&(o=v),l<u&&(l=u);var h=!r.width&&Math.abs(a.width-o)>1,d=!r.height&&Math.abs(a.height-l)>1;(d||h)&&(h&&(a.width=o),d&&(a.height=l)),e._initialAutoSize||(e._initialAutoSize={width:o,height:l}),Ee.sanitizeMargins(a)};Ee.supplyLayoutModuleDefaults=function(t,e,r,a){var i=St.componentsRegistry,n=e._basePlotModules,o,l,s,f=St.subplotsRegistry.cartesian;for(o in i)s=i[o],s.includeBasePlot&&s.includeBasePlot(t,e);n.length||n.push(f),e._has("cartesian")&&(St.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e));for(var c in e._subplots)e._subplots[c].sort(He.subplotSort);for(l=0;l<n.length;l++)s=n[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var v=e._modules;for(l=0;l<v.length;l++)s=v[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var u=e._transformModules;for(l=0;l<u.length;l++)s=u[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r,a);for(o in i)s=i[o],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r)};Ee.purge=function(t){var e=t._fullLayout||{};e._glcontainer!==void 0&&(e._glcontainer.selectAll(".gl-canvas").remove(),e._glcontainer.remove(),e._glcanvas=null),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),He.clearThrottle(),He.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._dragdata,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()};Ee.style=function(t){var e=t._fullLayout._visibleModules,r=[],a;for(a=0;a<e.length;a++){var i=e[a];i.style&&He.pushUnique(r,i.style)}for(a=0;a<r.length;a++)r[a](t)};Ee.sanitizeMargins=function(t){if(!(!t||!t.margin)){var e=t.width,r=t.height,a=t.margin,i=e-(a.l+a.r),n=r-(a.t+a.b),o;i<0&&(o=(e-1)/(a.l+a.r),a.l=Math.floor(o*a.l),a.r=Math.floor(o*a.r)),n<0&&(o=(r-1)/(a.t+a.b),a.t=Math.floor(o*a.t),a.b=Math.floor(o*a.b))}};Ee.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}};Ee.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1};function h_(t){var e=t.margin;if(!t._size){var r=t._size={l:Math.round(e.l),r:Math.round(e.r),t:Math.round(e.t),b:Math.round(e.b),p:Math.round(e.pad)};r.w=Math.round(t.width)-r.l-r.r,r.h=Math.round(t.height)-r.t-r.b}t._pushmargin||(t._pushmargin={}),t._pushmarginIds||(t._pushmarginIds={})}var p_=2,m_=2;Ee.autoMargin=function(t,e,r){var a=t._fullLayout,i=a.width,n=a.height,o=a.margin,l=a.minreducedwidth,s=a.minreducedheight,f=He.constrain(i-o.l-o.r,p_,l),c=He.constrain(n-o.t-o.b,m_,s),v=Math.max(0,i-f),u=Math.max(0,n-c),h=a._pushmargin,d=a._pushmarginIds;if(o.autoexpand!==!1){if(!r)delete h[e],delete d[e];else{var p=r.pad;if(p===void 0&&(p=Math.min(12,o.l,o.r,o.t,o.b)),v){var y=(r.l+r.r)/v;y>1&&(r.l/=y,r.r/=y)}if(u){var m=(r.t+r.b)/u;m>1&&(r.t/=m,r.b/=m)}var g=r.xl!==void 0?r.xl:r.x,w=r.xr!==void 0?r.xr:r.x,b=r.yt!==void 0?r.yt:r.y,x=r.yb!==void 0?r.yb:r.y;h[e]={l:{val:g,size:r.l+p},r:{val:w,size:r.r+p},b:{val:x,size:r.b+p},t:{val:b,size:r.t+p}},d[e]=1}if(!a._replotting)return Ee.doAutoMargin(t)}};function eL(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=Gr.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}Ee.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,a=e.height;e._size||(e._size={}),h_(e);var i=e._size,n=e.margin,o=He.extendFlat({},i),l=n.l,s=n.r,f=n.t,c=n.b,v=e._pushmargin,u=e._pushmarginIds,h=e.minreducedwidth,d=e.minreducedheight;if(e.margin.autoexpand!==!1){for(var p in v)u[p]||delete v[p];v.base={l:{val:0,size:l},r:{val:1,size:s},t:{val:1,size:f},b:{val:0,size:c}};for(var y in v){var m=v[y].l||{},g=v[y].b||{},w=m.val,b=m.size,x=g.val,_=g.size;for(var T in v){if($f(b)&&v[T].r){var k=v[T].r.val,S=v[T].r.size;if(k>w){var M=(b*k+(S-r)*w)/(k-w),D=(S*(1-w)+(b-r)*(1-k))/(k-w);M+D>l+s&&(l=M,s=D)}}if($f(_)&&v[T].t){var A=v[T].t.val,C=v[T].t.size;if(A>x){var $=(_*A+(C-a)*x)/(A-x),N=(C*(1-x)+(_-a)*(1-A))/(A-x);$+N>c+f&&(c=$,f=N)}}}}}var E=He.constrain(r-n.l-n.r,p_,h),P=He.constrain(a-n.t-n.b,m_,d),R=Math.max(0,r-E),L=Math.max(0,a-P);if(R){var z=(l+s)/R;z>1&&(l/=z,s/=z)}if(L){var I=(c+f)/L;I>1&&(c/=I,f/=I)}if(i.l=Math.round(l),i.r=Math.round(s),i.t=Math.round(f),i.b=Math.round(c),i.p=Math.round(n.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(a)-i.t-i.b,!e._replotting&&(Ee.didMarginChange(o,i)||eL(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var H=3*(1+Object.keys(u).length);if(e._redrawFromAutoMarginCount<H)return St.call("_doPlot",t);e._size=o,He.warn("Too many auto-margin redraws.")}tL(t)};function tL(t){var e=Gr.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var a=0;a<e.length;a++){var i=e[a][r];i&&i()}})}var bm=["l","r","t","b","p","w","h"];Ee.didMarginChange=function(t,e){for(var r=0;r<bm.length;r++){var a=bm[r],i=t[a],n=e[a];if(!$f(i)||Math.abs(n-i)>1)return!0}return!1};Ee.graphJson=function(t,e,r,a,i,n){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&Ee.supplyDefaults(t);var o=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function f(u,h){if(typeof u=="function")return h?"_function_":null;if(He.isPlainObject(u)){var d={},p;return Object.keys(u).sort().forEach(function(y){if(["_","["].indexOf(y.charAt(0))===-1){if(typeof u[y]=="function"){h&&(d[y]="_function");return}if(r==="keepdata"){if(y.substr(y.length-3)==="src")return}else if(r==="keepstream"){if(p=u[y+"src"],typeof p=="string"&&p.indexOf(":")>0&&!He.isPlainObject(u.stream))return}else if(r!=="keepall"&&(p=u[y+"src"],typeof p=="string"&&p.indexOf(":")>0))return;d[y]=f(u[y],h)}}),d}return Array.isArray(u)?u.map(function(y){return f(y,h)}):He.isTypedArray(u)?He.simpleMap(u,He.identity):He.isJSDate(u)?He.ms2DateTimeLocal(+u):u}var c={data:(o||[]).map(function(u){var h=f(u);return e&&delete h.fit,h})};if(!e&&(c.layout=f(l),i)){var v=l._size;c.layout.computed={margin:{b:v.b,l:v.l,r:v.r,t:v.t}}}return s&&(c.frames=f(s)),n&&(c.config=f(t._context,!0)),a==="object"?c:JSON.stringify(c)};Ee.modifyFrames=function(t,e){var r,a,i,n=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch(a=e[r],a.type){case"replace":i=a.value;var l=(n[a.index]||{}).name,s=i.name;n[a.index]=o[s]=i,s!==l&&(delete o[l],o[s]=i);break;case"insert":i=a.value,o[i.name]=i,n.splice(a.index,0,i);break;case"delete":i=n[a.index],delete o[i.name],n.splice(a.index,1);break}return Promise.resolve()};Ee.computeFrame=function(t,e){var r=t._transitionData._frameHash,a,i,n,o;if(!e)throw new Error("computeFrame must be given a string frame name");var l=r[e.toString()];if(!l)return!1;for(var s=[l],f=[l.name];l.baseframe&&(l=r[l.baseframe.toString()])&&f.indexOf(l.name)===-1;)s.push(l),f.push(l.name);for(var c={};l=s.pop();)if(l.layout&&(c.layout=Ee.extendLayout(c.layout,l.layout)),l.data){if(c.data||(c.data=[]),i=l.traces,!i)for(i=[],a=0;a<l.data.length;a++)i[a]=a;for(c.traces||(c.traces=[]),a=0;a<l.data.length;a++)n=i[a],n!=null&&(o=c.traces.indexOf(n),o===-1&&(o=c.data.length,c.traces[o]=n),c.data[o]=Ee.extendTrace(c.data[o],l.data[a]))}return c};Ee.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,a=0;a<r.length;a++){var i=r[a];i&&i.name&&(e[i.name]=i)}};Ee.extendObjectWithContainers=function(t,e,r){var a,i,n,o,l,s,f,c,v=He.extendDeepNoArrays({},e||{}),u=He.expandObjectPaths(v),h={};if(r&&r.length)for(n=0;n<r.length;n++)a=He.nestedProperty(u,r[n]),i=a.get(),i===void 0?He.nestedProperty(h,r[n]).set(null):(a.set(null),He.nestedProperty(h,r[n]).set(i));if(t=He.extendDeepNoArrays(t||{},u),r&&r.length){for(n=0;n<r.length;n++)if(l=He.nestedProperty(h,r[n]),f=l.get(),!!f){for(s=He.nestedProperty(t,r[n]),c=s.get(),Array.isArray(c)||(c=[],s.set(c)),o=0;o<f.length;o++){var d=f[o];d===null?c[o]=null:c[o]=Ee.extendObjectWithContainers(c[o],d)}s.set(c)}}return t};Ee.dataArrayContainers=["transforms","dimensions"];Ee.layoutArrayContainers=St.layoutArrayContainers;Ee.extendTrace=function(t,e){return Ee.extendObjectWithContainers(t,e,Ee.dataArrayContainers)};Ee.extendLayout=function(t,e){return Ee.extendObjectWithContainers(t,e,Ee.layoutArrayContainers)};Ee.transition=function(t,e,r,a,i,n){var o={redraw:i.redraw},l={},s=[];return o.prepareFn=function(){for(var f=Array.isArray(e)?e.length:0,c=a.slice(0,f),v=0;v<c.length;v++){var u=c[v],h=t._fullData[u],d=h._module;if(d){if(d.animatable){var p=d.basePlotModule.name;l[p]||(l[p]=[]),l[p].push(u)}t.data[c[v]]=Ee.extendTrace(t.data[c[v]],e[v])}}var y=He.expandObjectPaths(He.extendDeepNoArrays({},r)),m=/^[xy]axis[0-9]*$/;for(var g in y)m.test(g)&&delete y[g].range;Ee.extendLayout(t.layout,y),delete t.calcdata,Ee.supplyDefaults(t),Ee.doCalcdata(t);var w=He.expandObjectPaths(r);if(w){var b=t._fullLayout._plots;for(var x in b){var _=b[x],T=_.xaxis,k=_.yaxis,S=T.range.slice(),M=k.range.slice(),D=null,A=null,C=null,$=null;Array.isArray(w[T._name+".range"])?D=w[T._name+".range"].slice():Array.isArray((w[T._name]||{}).range)&&(D=w[T._name].range.slice()),Array.isArray(w[k._name+".range"])?A=w[k._name+".range"].slice():Array.isArray((w[k._name]||{}).range)&&(A=w[k._name].range.slice()),S&&D&&(T.r2l(S[0])!==T.r2l(D[0])||T.r2l(S[1])!==T.r2l(D[1]))&&(C={xr0:S,xr1:D}),M&&A&&(k.r2l(M[0])!==k.r2l(A[0])||k.r2l(M[1])!==k.r2l(A[1]))&&($={yr0:M,yr1:A}),(C||$)&&s.push(He.extendFlat({plotinfo:_},C,$))}}return Promise.resolve()},o.runFn=function(f){var c,v=t._fullLayout._basePlotModules,u=s.length,h;if(r)for(h=0;h<v.length;h++)v[h].transitionAxes&&v[h].transitionAxes(t,s,n,f);u?(c=He.extendFlat({},n),c.duration=0,delete l.cartesian):c=n;for(var d in l){var p=l[d],y=t._fullData[p[0]]._module;y.basePlotModule.plot(t,p,c,f)}},y_(t,n,o)};Ee.transitionFromReact=function(t,e,r,a){var i=t._fullLayout,n=i.transition,o={},l=[];return o.prepareFn=function(){var s=i._plots;o.redraw=!1,e.anim==="some"&&(o.redraw=!0),r.anim==="some"&&(o.redraw=!0);for(var f in s){var c=s[f],v=c.xaxis,u=c.yaxis,h=a[v._name].range.slice(),d=a[u._name].range.slice(),p=v.range.slice(),y=u.range.slice();v.setScale(),u.setScale();var m=null,g=null;(v.r2l(h[0])!==v.r2l(p[0])||v.r2l(h[1])!==v.r2l(p[1]))&&(m={xr0:h,xr1:p}),(u.r2l(d[0])!==u.r2l(y[0])||u.r2l(d[1])!==u.r2l(y[1]))&&(g={yr0:d,yr1:y}),(m||g)&&l.push(He.extendFlat({plotinfo:c},m,g))}return Promise.resolve()},o.runFn=function(s){for(var f=t._fullData,c=t._fullLayout,v=c._basePlotModules,u,h,d,p=[],y=0;y<f.length;y++)p.push(y);function m(){if(t._fullLayout)for(var w=0;w<v.length;w++)v[w].transitionAxes&&v[w].transitionAxes(t,l,u,s)}function g(){if(t._fullLayout)for(var w=0;w<v.length;w++)v[w].plot(t,d,h,s)}l.length&&e.anim?n.ordering==="traces first"?(u=He.extendFlat({},n,{duration:0}),d=p,h=n,setTimeout(m,n.duration),g()):(u=n,d=null,h=He.extendFlat({},n,{duration:0}),setTimeout(g,u.duration),m()):l.length?(u=n,m()):e.anim&&(d=p,h=n,g())},y_(t,n,o)};function y_(t,e,r){var a=!1;function i(v){var u=Promise.resolve();if(!v)return u;for(;v.length;)u=u.then(v.shift());return u}function n(v){if(v)for(;v.length;)v.shift()}function o(){return t.emit("plotly_transitioning",[]),new Promise(function(v){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){a=!0}),r.redraw&&t._transitionData._interruptCallbacks.push(function(){return St.call("redraw",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var u=0,h=0;function d(){return u++,function(){h++,!a&&h===u&&l(v)}}r.runFn(d),setTimeout(d())})}function l(v){if(t._transitionData)return n(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return St.call("redraw",t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])}).then(v)}function s(){if(t._transitionData)return t._transitioning=!1,i(t._transitionData._interruptCallbacks)}var f=[Ee.previousPromises,s,r.prepareFn,Ee.rehover,Ee.reselect,o],c=He.syncOrAsync(f,t);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return t})}Ee.doCalcdata=function(t,e){var r=Gr.list(t),a=t._fullData,i=t._fullLayout,n,o,l,s,f=new Array(a.length),c=(t.calcdata||[]).slice();for(t.calcdata=f,i._numBoxes=0,i._numViolins=0,i._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,i._piecolormap={},i._sunburstcolormap={},i._treemapcolormap={},i._iciclecolormap={},i._funnelareacolormap={},l=0;l<a.length;l++)if(Array.isArray(e)&&e.indexOf(l)===-1){f[l]=c[l];continue}for(l=0;l<a.length;l++)n=a[l],n._arrayAttrs=u_.findArrayAttributes(n),n._extremes={};var v=i._subplots.polar||[];for(l=0;l<v.length;l++)r.push(i[v[l]].radialaxis,i[v[l]].angularaxis);for(var u in i._colorAxes){var h=i[u];h.cauto!==!1&&(delete h.cmin,delete h.cmax)}var d=!1;function p(g){if(n=a[g],o=n._module,n.visible===!0&&n.transforms){if(o&&o.calc){var w=o.calc(t,n);w[0]&&w[0].t&&w[0].t._scene&&delete w[0].t._scene.dirty}for(s=0;s<n.transforms.length;s++){var b=n.transforms[s];o=gc[b.type],o&&o.calcTransform&&(n._hasCalcTransform=!0,d=!0,o.calcTransform(t,n,b))}}}function y(g,w){if(n=a[g],o=n._module,!!o.isContainer===w){var b=[];if(n.visible===!0&&n._length!==0){delete n._indexToPoints;var x=n.transforms||[];for(s=x.length-1;s>=0;s--)if(x[s].enabled){n._indexToPoints=x[s]._indexToPoints;break}o&&o.calc&&(b=o.calc(t,n))}(!Array.isArray(b)||!b[0])&&(b=[{x:ym,y:ym}]),b[0].t||(b[0].t={}),b[0].trace=n,f[g]=b}}for(xm(r,a,i),l=0;l<a.length;l++)y(l,!0);for(l=0;l<a.length;l++)p(l);for(d&&xm(r,a,i),l=0;l<a.length;l++)y(l,!0);for(l=0;l<a.length;l++)y(l,!1);_m(t);var m=aL(r,t);if(m.length){for(i._numBoxes=0,i._numViolins=0,l=0;l<m.length;l++)y(m[l],!0);for(l=0;l<m.length;l++)y(m[l],!1);_m(t)}St.getComponentMethod("fx","calc")(t),St.getComponentMethod("errorbars","calc")(t)};var rL=/(total|sum|min|max|mean|median) (ascending|descending)/;function aL(t,e){var r=[],a,i,n,o,l;function s(E,P,R){var L=P._id.charAt(0);if(E==="histogram2dcontour"){var z=P._counterAxes[0],I=Gr.getFromId(e,z),H=L==="x"||z==="x"&&I.type==="category",V=L==="y"||z==="y"&&I.type==="category";return function(O,X){return O===0||X===0||H&&O===R[X].length-1||V&&X===R.length-1?-1:(L==="y"?X:O)-1}}else return function(O,X){return L==="y"?X:O}}var f={min:function(E){return He.aggNums(Math.min,null,E)},max:function(E){return He.aggNums(Math.max,null,E)},sum:function(E){return He.aggNums(function(P,R){return P+R},null,E)},total:function(E){return He.aggNums(function(P,R){return P+R},null,E)},mean:function(E){return He.mean(E)},median:function(E){return He.median(E)}};for(a=0;a<t.length;a++){var c=t[a];if(c.type==="category"){var v=c.categoryorder.match(rL);if(v){var u=v[1],h=v[2],d=c._id.charAt(0),p=d==="x",y=[];for(i=0;i<c._categories.length;i++)y.push([c._categories[i],[]]);for(i=0;i<c._traceIndices.length;i++){var m=c._traceIndices[i],g=e._fullData[m];if(g.visible===!0){var w=g.type;St.traceIs(g,"histogram")&&(delete g._xautoBinFinished,delete g._yautoBinFinished);var b=w==="splom",x=w==="scattergl",_=e.calcdata[m];for(n=0;n<_.length;n++){var T=_[n],k,S;if(b){var M=g._axesDim[c._id];if(!p){var D=g._diag[M][0];D&&(c=e._fullLayout[Gr.id2name(D)])}var A=T.trace.dimensions[M].values;for(o=0;o<A.length;o++)for(k=c._categoriesMap[A[o]],l=0;l<T.trace.dimensions.length;l++)if(l!==M){var C=T.trace.dimensions[l];y[k][1].push(C.values[o])}}else if(x){for(o=0;o<T.t.x.length;o++)p?(k=T.t.x[o],S=T.t.y[o]):(k=T.t.y[o],S=T.t.x[o]),y[k][1].push(S);T.t&&T.t._scene&&delete T.t._scene.dirty}else if(T.hasOwnProperty("z")){S=T.z;var $=s(g.type,c,S);for(o=0;o<S.length;o++)for(l=0;l<S[o].length;l++)k=$(l,o),k+1&&y[k][1].push(S[o][l])}else for(k=T.p,k===void 0&&(k=T[d]),S=T.s,S===void 0&&(S=T.v),S===void 0&&(S=p?T.y:T.x),Array.isArray(S)||(S===void 0?S=[]:S=[S]),o=0;o<S.length;o++)y[k][1].push(S[o])}}}c._categoriesValue=y;var N=[];for(i=0;i<y.length;i++)N.push([y[i][0],f[u](y[i][1])]);N.sort(function(E,P){return E[1]-P[1]}),c._categoriesAggregatedValue=N,c._initialCategories=N.map(function(E){return E[0]}),h==="descending"&&c._initialCategories.reverse(),r=r.concat(c.sortByInitialCategories())}}}return r}function xm(t,e,r){var a={};function i(s){s.clearCalc(),s.type==="multicategory"&&s.setupMultiCategory(e),a[s._id]=1}He.simpleMap(t,i);for(var n=r._axisMatchGroups||[],o=0;o<n.length;o++)for(var l in n[o])a[l]||i(r[Gr.id2name(l)])}function _m(t){var e=t._fullLayout,r=e._visibleModules,a={},i,n,o;for(n=0;n<r.length;n++){var l=r[n],s=l.crossTraceCalc;if(s){var f=l.basePlotModule.name;a[f]?He.pushUnique(a[f],s):a[f]=[s]}}for(o in a){var c=a[o],v=e._subplots[o];if(Array.isArray(v))for(i=0;i<v.length;i++){var u=v[i],h=o==="cartesian"?e._plots[u]:e[u];for(n=0;n<c.length;n++)c[n](t,h,u)}else for(n=0;n<c.length;n++)c[n](t)}}Ee.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()};Ee.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()};Ee.reselect=function(t){var e=t._fullLayout,r=(t.layout||{}).selections,a=e._previousSelections;e._previousSelections=r;var i=e._reselect||JSON.stringify(r)!==JSON.stringify(a);St.getComponentMethod("selections","reselect")(t,i)};Ee.generalUpdatePerTraceModule=function(t,e,r,a){var i=e.traceHash,n={},o;for(o=0;o<r.length;o++){var l=r[o],s=l[0].trace;s.visible&&(n[s.type]=n[s.type]||[],n[s.type].push(l))}for(var f in i)if(!n[f]){var c=i[f][0],v=c[0].trace;v.visible=!1,n[f]=[c]}for(var u in n){var h=n[u],d=h[0][0].trace._module;d.plot(t,e,He.filterVisible(h),a)}e.traceHash=n};Ee.plotBasePlot=function(t,e,r,a,i){var n=St.getModule(t),o=US(e.calcdata,n)[0];n.plot(e,o,a,i)};Ee.cleanBasePlot=function(t,e,r,a,i){var n=i._has&&i._has(t),o=r._has&&r._has(t);n&&!o&&i["_"+t+"layer"].selectAll("g.trace").remove()};var sr=s_.exports,g_={exports:{}},wr={},bn={};(function(t){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}})(bn);var Yr={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"}};(function(t){var e=yt,r=de,a=r.strTranslate,i=bn,n=Yr.LINE_SPACING,o=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(L,z,I){var H=L.text(),V=!L.attr("data-notex")&&z&&z._context.typesetMath&&typeof MathJax<"u"&&H.match(o),O=e.select(L.node().parentNode);if(O.empty())return;var X=L.attr("class")?L.attr("class").split(" ")[0]:"text";X+="-math",O.selectAll("svg."+X).remove(),O.selectAll("g."+X+"-group").remove(),L.style("display",null).attr({"data-unformatted":H,"data-math":"N"});function G(){O.empty()||(X=L.attr("class")+"-math",O.select("svg."+X).remove()),L.text("").style("white-space","pre");var Y=N(L.node(),H);Y&&L.style("pointer-events","all"),t.positionText(L),I&&I.call(L)}return V?(z&&z._promises||[]).push(new Promise(function(Y){L.style("display","none");var K=parseInt(L.node().style.fontSize,10),Z={fontSize:K};v(V[2],Z,function(q,ie,fe){O.selectAll("svg."+X).remove(),O.selectAll("g."+X+"-group").remove();var be=q&&q.select("svg");if(!be||!be.node()){G(),Y();return}var ne=O.append("g").classed(X+"-group",!0).attr({"pointer-events":"none","data-unformatted":H,"data-math":"Y"});ne.node().appendChild(be.node()),ie&&ie.node()&&be.node().insertBefore(ie.node().cloneNode(!0),be.node().firstChild);var U=fe.width,ae=fe.height;be.attr({class:X,height:ae,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ce=L.node().style.fill||"black",se=be.select("g");se.attr({fill:ce,stroke:ce});var pe=se.node().getBoundingClientRect(),ge=pe.width,_e=pe.height;(ge>U||_e>ae)&&(be.style("overflow","hidden"),pe=be.node().getBoundingClientRect(),ge=pe.width,_e=pe.height);var le=+L.attr("x"),De=+L.attr("y"),Ae=K||L.node().getBoundingClientRect().height,ze=-Ae/4;if(X[0]==="y")ne.attr({transform:"rotate("+[-90,le,De]+")"+a(-ge/2,ze-_e/2)});else if(X[0]==="l")De=ze-_e/2;else if(X[0]==="a"&&X.indexOf("atitle")!==0)le=0,De=ze;else{var Ve=L.attr("text-anchor");le=le-ge*(Ve==="middle"?.5:Ve==="end"?1:0),De=De+ze-_e/2}be.attr({x:le,y:De}),I&&I.call(L,ne),Y(ne)})})):G(),L};var l=/(<|<|<)/g,s=/(>|>|>)/g;function f(L){return L.replace(l,"\\lt ").replace(s,"\\gt ")}var c=[["$","$"],["\\(","\\)"]];function v(L,z,I){var H=parseInt((MathJax.version||"").split(".")[0]);if(H!==2&&H!==3){r.warn("No MathJax version:",MathJax.version);return}var V,O,X,G,Y=function(){return O=r.extendDeepAll({},MathJax.Hub.config),X=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:c},displayAlign:"left"})},K=function(){O=r.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=c},Z=function(){if(V=MathJax.Hub.config.menuSettings.renderer,V!=="SVG")return MathJax.Hub.setRenderer("SVG")},q=function(){V=MathJax.config.startup.output,V!=="svg"&&(MathJax.config.startup.output="svg")},ie=function(){var ce="math-output-"+r.randstr({},64);G=e.select("body").append("div").attr({id:ce}).style({visibility:"hidden",position:"absolute","font-size":z.fontSize+"px"}).text(f(L));var se=G.node();return H===2?MathJax.Hub.Typeset(se):MathJax.typeset([se])},fe=function(){var ce=G.select(H===2?".MathJax_SVG":".MathJax"),se=!ce.empty()&&G.select("svg").node();if(!se)r.log("There was an error in the tex syntax.",L),I();else{var pe=se.getBoundingClientRect(),ge;H===2?ge=e.select("body").select("#MathJax_SVG_glyphs"):ge=ce.select("defs"),I(ce,ge,pe)}G.remove()},be=function(){if(V!=="SVG")return MathJax.Hub.setRenderer(V)},ne=function(){V!=="svg"&&(MathJax.config.startup.output=V)},U=function(){return X!==void 0&&(MathJax.Hub.processSectionDelay=X),MathJax.Hub.Config(O)},ae=function(){MathJax.config=O};H===2?MathJax.Hub.Queue(Y,Z,ie,fe,be,U):H===3&&(K(),q(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ie(),fe(),ne(),ae()}))}var u={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"},d={sub:"-0.21em",sup:"0.42em"},p="",y=["http:","https:","mailto:","",void 0,":"],m=t.NEWLINES=/(\r\n?|\n)/g,g=/(<[^<>]*>)/,w=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=/<br(\s+.*)?>/i;t.BR_TAG_ALL=/<br(\s+.*)?>/gi;var x=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(L,z){if(!L)return null;var I=L.match(z),H=I&&(I[3]||I[4]);return H&&C(H)}var M=/(^|;)\s*color:/;t.plainText=function(L,z){z=z||{};for(var I=z.len!==void 0&&z.len!==-1?z.len:1/0,H=z.allowedTags!==void 0?z.allowedTags:["br"],V="...",O=V.length,X=L.split(g),G=[],Y="",K=0,Z=0;Z<X.length;Z++){var q=X[Z],ie=q.match(w),fe=ie&&ie[2].toLowerCase();if(fe)H.indexOf(fe)!==-1&&(G.push(q),Y=fe);else{var be=q.length;if(K+be<I)G.push(q),K+=be;else if(K<I){var ne=I-K;Y&&(Y!=="br"||ne<=O||be<=O)&&G.pop(),I>O?G.push(q.substr(0,ne-O)+V):G.push(q.substr(0,ne));break}Y=""}}return G.join("")};var D={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},A=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(L){return L.replace(A,function(z,I){var H;return I.charAt(0)==="#"?H=$(I.charAt(1)==="x"?parseInt(I.substr(2),16):parseInt(I.substr(1),10)):H=D[I],H||z})}t.convertEntities=C;function $(L){if(!(L>1114111)){var z=String.fromCodePoint;if(z)return z(L);var I=String.fromCharCode;return L<=65535?I(L):I((L>>10)+55232,L%1024+56320)}}function N(L,z){z=z.replace(m," ");var I=!1,H=[],V,O=-1;function X(){O++;var _e=document.createElementNS(i.svg,"tspan");e.select(_e).attr({class:"line",dy:O*n+"em"}),L.appendChild(_e),V=_e;var le=H;if(H=[{node:_e}],le.length>1)for(var De=1;De<le.length;De++)G(le[De])}function G(_e){var le=_e.type,De={},Ae;if(le==="a"){Ae="a";var ze=_e.target,Ve=_e.href,oe=_e.popup;Ve&&(De={"xlink:xlink:show":ze==="_blank"||ze.charAt(0)!=="_"?"new":"replace",target:ze,"xlink:xlink:href":Ve},oe&&(De.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+oe+'");return false;'))}else Ae="tspan";_e.style&&(De.style=_e.style);var Ce=document.createElementNS(i.svg,Ae);if(le==="sup"||le==="sub"){Y(V,p),V.appendChild(Ce);var re=document.createElementNS(i.svg,"tspan");Y(re,p),e.select(re).attr("dy",d[le]),De.dy=h[le],V.appendChild(Ce),V.appendChild(re)}else V.appendChild(Ce);e.select(Ce).attr(De),V=_e.node=Ce,H.push(_e)}function Y(_e,le){_e.appendChild(document.createTextNode(le))}function K(_e){if(H.length===1){r.log("Ignoring unexpected end tag </"+_e+">.",z);return}var le=H.pop();_e!==le.type&&r.log("Start tag <"+le.type+"> doesnt match end tag <"+_e+">. Pretending it did match.",z),V=H[H.length-1].node}var Z=b.test(z);Z?X():(V=L,H=[{node:L}]);for(var q=z.split(g),ie=0;ie<q.length;ie++){var fe=q[ie],be=fe.match(w),ne=be&&be[2].toLowerCase(),U=u[ne];if(ne==="br")X();else if(U===void 0)Y(V,C(fe));else if(be[1])K(ne);else{var ae=be[4],ce={type:ne},se=S(ae,x);if(se?(se=se.replace(M,"$1 fill:"),U&&(se+=";"+U)):U&&(se=U),se&&(ce.style=se),ne==="a"){I=!0;var pe=S(ae,_);if(pe){var ge=E(pe);ge&&(ce.href=ge,ce.target=S(ae,T)||"_blank",ce.popup=S(ae,k))}}G(ce)}}return I}function E(L){var z=encodeURI(decodeURI(L)),I=document.createElement("a"),H=document.createElement("a");I.href=L,H.href=z;var V=I.protocol,O=H.protocol;return y.indexOf(V)!==-1&&y.indexOf(O)!==-1?z:""}t.sanitizeHTML=function(z){z=z.replace(m," ");for(var I=document.createElement("p"),H=I,V=[],O=z.split(g),X=0;X<O.length;X++){var G=O[X],Y=G.match(w),K=Y&&Y[2].toLowerCase();if(K in u)if(Y[1])V.length&&(H=V.pop());else{var Z=Y[4],q=S(Z,x),ie=q?{style:q}:{};if(K==="a"){var fe=S(Z,_);if(fe){var be=E(fe);if(be){ie.href=be;var ne=S(Z,T);ne&&(ie.target=ne)}}}var U=document.createElement(K);H.appendChild(U),e.select(U).attr(ie),H=U,V.push(U)}else H.appendChild(document.createTextNode(C(G)))}var ae="innerHTML";return I[ae]},t.lineCount=function(z){return z.selectAll("tspan.line").size()||1},t.positionText=function(z,I,H){return z.each(function(){var V=e.select(this);function O(Y,K){return K===void 0?(K=V.attr(Y),K===null&&(V.attr(Y,0),K=0)):V.attr(Y,K),K}var X=O("x",I),G=O("y",H);this.nodeName==="text"&&V.selectAll("tspan.line").attr({x:X,y:G})})};function P(L,z,I){var H=I.horizontalAlign,V=I.verticalAlign||"top",O=L.node().getBoundingClientRect(),X=z.node().getBoundingClientRect(),G,Y,K;return V==="bottom"?Y=function(){return O.bottom-G.height}:V==="middle"?Y=function(){return O.top+(O.height-G.height)/2}:Y=function(){return O.top},H==="right"?K=function(){return O.right-G.width}:H==="center"?K=function(){return O.left+(O.width-G.width)/2}:K=function(){return O.left},function(){G=this.node().getBoundingClientRect();var Z=K()-X.left,q=Y()-X.top,ie=I.gd||{};if(I.gd){ie._fullLayout._calcInverseTransform(ie);var fe=r.apply3DTransform(ie._fullLayout._invTransform)(Z,q);Z=fe[0],q=fe[1]}return this.style({top:q+"px",left:Z+"px","z-index":1e3}),this}}var R="1px ";t.makeTextShadow=function(L){var z=R,I=R,H=R;return z+I+H+L+", -"+z+"-"+I+H+L+", "+z+"-"+I+H+L+", -"+z+I+H+L},t.makeEditable=function(L,z){var I=z.gd,H=z.delegate,V=e.dispatch("edit","input","cancel"),O=H||L;if(L.style({"pointer-events":H?"none":"all"}),L.size()!==1)throw new Error("boo");function X(){Y(),L.style({opacity:0});var K=O.attr("class"),Z;K?Z="."+K.split(" ")[0]+"-math-group":Z="[class*=-math-group]",Z&&e.select(L.node().parentNode).select(Z).style({opacity:0})}function G(K){var Z=K.node(),q=document.createRange();q.selectNodeContents(Z);var ie=window.getSelection();ie.removeAllRanges(),ie.addRange(q),Z.focus()}function Y(){var K=e.select(I),Z=K.select(".svg-container"),q=Z.append("div"),ie=L.node().style,fe=parseFloat(ie.fontSize||12),be=z.text;be===void 0&&(be=L.attr("data-unformatted")),q.classed("plugin-editable editable",!0).style({position:"absolute","font-family":ie.fontFamily||"Arial","font-size":fe,color:z.fill||ie.fill||"black",opacity:1,"background-color":z.background||"transparent",outline:"#ffffff33 1px solid",margin:[-fe/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(be).call(P(L,Z,z)).on("blur",function(){I._editing=!1,L.text(this.textContent).style({opacity:1});var ne=e.select(this).attr("class"),U;ne?U="."+ne.split(" ")[0]+"-math-group":U="[class*=-math-group]",U&&e.select(L.node().parentNode).select(U).style({opacity:0});var ae=this.textContent;e.select(this).transition().duration(0).remove(),e.select(document).on("mouseup",null),V.edit.call(L,ae)}).on("focus",function(){var ne=this;I._editing=!0,e.select(document).on("mouseup",function(){if(e.event.target===ne)return!1;document.activeElement===q.node()&&q.node().blur()})}).on("keyup",function(){e.event.which===27?(I._editing=!1,L.style({opacity:1}),e.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),V.cancel.call(L,this.textContent)):(V.input.call(L,this.textContent),e.select(this).call(P(L,Z,z)))}).on("keydown",function(){e.event.which===13&&this.blur()}).call(G)}return z.immediate?X():O.on("click",X),e.rebind(L,V,"on")}})(wr);var b_={exports:{}},iL=yt,vf=da,ml=_t,gs=de,wm=ut,nL=Ao.isValid;function oL(t,e,r){var a=e?gs.nestedProperty(t,e).get()||{}:t,i=a[r||"color"],n=!1;if(gs.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(ml(i[o])){n=!0;break}}return gs.isPlainObject(a)&&(n||a.showscale===!0||ml(a.cmin)&&ml(a.cmax)||nL(a.colorscale)||gs.isPlainObject(a.colorbar))}var Tm=["showscale","autocolorscale","colorscale","reversescale","colorbar"],Bo=["min","max","mid","auto"];function x_(t){var e=t._colorAx,r=e||t,a={},i,n,o;for(n=0;n<Tm.length;n++)o=Tm[n],a[o]=r[o];if(e)for(i="c",n=0;n<Bo.length;n++)o=Bo[n],a[o]=r["c"+o];else{var l;for(n=0;n<Bo.length;n++){if(o=Bo[n],l="c"+o,l in r){a[o]=r[l];continue}l="z"+o,l in r&&(a[o]=r[l])}i=l.charAt(0)}return a._sync=function(s,f){var c=Bo.indexOf(s)!==-1?i+s:s;r[c]=r["_"+c]=f},a}function __(t){for(var e=x_(t),r=e.min,a=e.max,i=e.reversescale?w_(e.colorscale):e.colorscale,n=i.length,o=new Array(n),l=new Array(n),s=0;s<n;s++){var f=i[s];o[s]=r+f[0]*(a-r),l[s]=f[1]}return{domain:o,range:l}}function w_(t){for(var e=t.length,r=new Array(e),a=e-1,i=0;a>=0;a--,i++){var n=t[a];r[i]=[1-n[0],n[1]]}return r}function T_(t,e){e=e||{};for(var r=t.domain,a=t.range,i=a.length,n=new Array(i),o=0;o<i;o++){var l=vf(a[o]).toRgb();n[o]=[l.r,l.g,l.b,l.a]}var s=iL.scale.linear().domain(r).range(n).clamp(!0),f=e.noNumericCheck,c=e.returnArray,v;return f&&c?v=s:f?v=function(u){return km(s(u))}:c?v=function(u){return ml(u)?s(u):vf(u).isValid()?u:wm.defaultLine}:v=function(u){return ml(u)?km(s(u)):vf(u).isValid()?u:wm.defaultLine},v.domain=s.domain,v.range=function(){return a},v}function lL(t,e){return T_(__(t),e)}function km(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return vf(e).toRgbString()}var Pa={hasColorscale:oL,extractOpts:x_,extractScale:__,flipScale:w_,makeColorScaleFunc:T_,makeColorScaleFuncFromTrace:lL},k_={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"},A_=k_,sL=A_.FORMAT_LINK,fL=A_.DATE_FORMAT_LINK;function cL(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?Ph:M_)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}}function Ph(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+sL+"."].join(" ")}function M_(t,e){return Ph(t,e)+[" And for dates see: "+fL+".","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(" ")}var Po={axisHoverFormat:cL,descriptionOnlyNumbers:Ph,descriptionWithDates:M_},nu=Dr,eo=$r,S_=Da.dash,Eh=Kt.extendFlat,Am=It.templatedArray,Mm=Po.descriptionWithDates,uL=ir.ONEDAY,Na=Hr,ou=Na.HOUR_PATTERN,lu=Na.WEEKDAY_PATTERN,df={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0},description:["Sets the tick mode for this axis.","If *auto*, the number of ticks is set via `nticks`.","If *linear*, the placement of the ticks is determined by","a starting position `tick0` and a tick step `dtick`","(*linear* is the default value if `tick0` and `dtick` are provided).","If *array*, the placement of the ticks is set via `tickvals`","and the tick text is `ticktext`.","(*array* is the default value if `tickvals` is provided)."].join(" ")},vL=Eh({},df,{values:df.values.slice().concat(["sync"]),description:[df.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function Sm(t){return{valType:"integer",min:0,dflt:t?5:0,editType:"ticks",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")}}var Lm={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the placement of the first tick on this axis.","Use with `dtick`.","If the axis `type` is *log*, then you must take the log of your starting tick","(e.g. to set the starting tick to 100, set the `tick0` to 2)","except when `dtick`=*L<f>* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},Cm={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L<f>*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M<n>* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},Dm={valType:"data_array",editType:"ticks",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},$m={valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")};function Pm(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return t||(e.dflt=5),e}function Em(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return t||(e.dflt=1),e}var Rm={valType:"color",dflt:eo.defaultLine,editType:"ticks",description:"Sets the tick color."},zm={valType:"color",dflt:eo.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function Im(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the width (in px) of the grid lines."};return t||(e.dflt=1),e}var Fm=Eh({},S_,{editType:"ticks"}),Nm={valType:"boolean",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")},ii={visible:{valType:"boolean",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:eo.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:nu({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},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,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},scaleanchor:{valType:"enumerated",values:[Na.idRegex.x.toString(),Na.idRegex.y.toString()],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[Na.idRegex.x.toString(),Na.idRegex.y.toString()],editType:"calc",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","will match the range of the corresponding axis in data-coordinates space.","Moreover, matching axes share auto-range values, category lists and","histogram auto-bins.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Moreover, note that matching axes must have the same `type`."].join(" ")},rangebreaks:Am("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this axis rangebreak is enabled or disabled.","Please note that `rangebreaks` only work for *date* axis type."].join(" ")},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the lower and upper bounds of this axis rangebreak.","Can be used with `pattern`."].join(" ")},pattern:{valType:"enumerated",values:[lu,ou,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+lu+"* - days of the week in English e.g. 'Sunday' or `sun`","(matching is case-insensitive and considers only the first three characters),","as well as Sunday-based integers between 0 and 6.","If *"+ou+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+lu+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+ou+"', bounds: [17, 8] }"," breaks from 5pm to 8am (i.e. skips non-work hours)."].join(" ")},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"},description:["Sets the coordinate values corresponding to the rangebreaks.","An alternative to `bounds`.","Use `dvalue` to set the size of the values along the axis."].join(" ")},dvalue:{valType:"number",editType:"calc",min:0,dflt:uL,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:vL,nticks:Sm(),tick0:Lm,dtick:Cm,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks",description:["Sets the spacing between tick labels as compared to the spacing between ticks.","A value of 1 (default) means each tick gets a label.","A value of 2 means shows every 2nd label.","A larger value n means only every nth tick is labeled.","`tick0` determines which labels are shown.","Not implemented for axes with `type` *log* or *multicategory*, or when `tickmode` is *array*."].join(" ")},tickvals:Dm,ticktext:{valType:"data_array",editType:"ticks",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:$m,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},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",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:Pm(),tickwidth:Em(),tickcolor:Rm,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:Eh({},S_,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:nu({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Mm("tick label")},tickformatstops:Am("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not this stop is used.","If `false`, this stop is ignored even within its `dtickrange`."].join(" ")},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",editType:"ticks",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Mm("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:eo.defaultLine,editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:Nm,gridcolor:zm,gridwidth:Im(),griddash:Fm,zeroline:{valType:"boolean",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:eo.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:eo.defaultLine,editType:"ticks",description:["Sets the color of the dividers","Only has an effect on *multicategory* axes."].join(" ")},dividerwidth:{valType:"number",dflt:1,editType:"ticks",description:["Sets the width (in px) of the dividers","Only has an effect on *multicategory* axes."].join(" ")},anchor:{valType:"enumerated",values:["free",Na.idRegex.x.toString(),Na.idRegex.y.toString()],editType:"plot",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",Na.idRegex.x.toString(),Na.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},minor:{tickmode:df,nticks:Sm("minor"),tick0:Lm,dtick:Cm,tickvals:Dm,ticks:$m,ticklen:Pm("minor"),tickwidth:Em("minor"),tickcolor:Rm,gridcolor:zm,gridwidth:Im("minor"),griddash:Fm,showgrid:Nm,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},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",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},autoshift:{valType:"boolean",dflt:!1,editType:"plot",description:["Automatically reposition the axis to avoid","overlap with other axes with the same `overlaying` value.","This repositioning will account for any `shift` amount applied to other","axes on the same side with `autoshift` is set to true.","Only has an effect if `anchor` is set to *free*."].join(" ")},shift:{valType:"number",editType:"plot",description:["Moves the axis a given number of pixels from where it would have been otherwise.","Accepts both positive and negative values, which will shift the axis either right","or left, respectively.","If `autoshift` is set to true, then this defaults to a padding of -3 if `side` is set to *left*.","and defaults to +3 if `side` is set to *right*. Defaults to 0 if `autoshift` is set to false.","Only has an effect if `anchor` is set to *free*."].join(" ")},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",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:nu({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}},Vt=ii,su=Dr,Hm=Kt.extendFlat,dL=ai.overrideAll,Rh=dL({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,description:["Sets the x position of the color bar (in plot fraction).","Defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",min:-2,max:3,description:["Sets the y position of the color bar (in plot fraction).","Defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:Vt.linecolor,outlinewidth:Vt.linewidth,bordercolor:Vt.linecolor,borderwidth:{valType:"number",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:Vt.minor.tickmode,nticks:Vt.nticks,tick0:Vt.tick0,dtick:Vt.dtick,tickvals:Vt.tickvals,ticktext:Vt.ticktext,ticks:Hm({},Vt.ticks,{dflt:""}),ticklabeloverflow:Hm({},Vt.ticklabeloverflow,{description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","In other cases the default is *hide past div*."].join(" ")}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",description:["Determines where tick labels are drawn relative to the ticks.","Left and right options are used when `orientation` is *h*,","top and bottom when `orientation` is *v*."].join(" ")},ticklen:Vt.ticklen,tickwidth:Vt.tickwidth,tickcolor:Vt.tickcolor,ticklabelstep:Vt.ticklabelstep,showticklabels:Vt.showticklabels,tickfont:su({description:"Sets the color bar's tick label font"}),tickangle:Vt.tickangle,tickformat:Vt.tickformat,tickformatstops:Vt.tickformatstops,tickprefix:Vt.tickprefix,showtickprefix:Vt.showtickprefix,ticksuffix:Vt.ticksuffix,showticksuffix:Vt.showticksuffix,separatethousands:Vt.separatethousands,exponentformat:Vt.exponentformat,minexponent:Vt.minexponent,showexponent:Vt.showexponent,title:{text:{valType:"string",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:su({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:su({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root"),hL=Rh,pL=Mo.counter,mL=kh,L_=Ao.scales,yL=mL(L_);function jo(t){return"`"+t+"`"}var xn=function(e,r){e=e||"",r=r||{};var a=r.cLetter||"c",i="onlyIfNumerical"in r?r.onlyIfNumerical:!!e,n="noScale"in r?r.noScale:e==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:a==="z",l=typeof r.colorscaleDflt=="string"?L_[r.colorscaleDflt]:null,s=r.editTypeOverride||"",f=e?e+".":"",c,v;"colorAttr"in r?(c=r.colorAttr,v=r.colorAttr):(c={z:"z",c:"color"}[a],v="in "+jo(f+c));var u=i?" Has an effect only if "+v+" is set to a numerical array.":"",h=a+"auto",d=a+"min",p=a+"max",y=a+"mid",m=jo(f+h),g=jo(f+d),w=jo(f+p),b=g+" and "+w,x={};x[d]=x[p]=void 0;var _={};_[h]=!1;var T={};return c==="color"&&(T.color={valType:"color",arrayOk:!0,editType:s||"style",description:["Sets the",e,"color.","It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to",b,"if set."].join(" ")},r.anim&&(T.color.anim=!0)),T[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:x,description:["Determines whether or not the color domain is computed","with respect to the input data (here "+v+") or the bounds set in",b+u,"Defaults to `false` when",b,"are set by the user."].join(" ")},T[d]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:_,description:["Sets the lower bound of the color domain."+u,"Value should have the same units as",v,"and if set,",w,"must be set as well."].join(" ")},T[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:_,description:["Sets the upper bound of the color domain."+u,"Value should have the same units as",v,"and if set,",g,"must be set as well."].join(" ")},T[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:x,description:["Sets the mid-point of the color domain by scaling",g,"and/or",w,"to be equidistant to this point."+u,"Value should have the same units as",v+".","Has no effect when",m,"is `false`."].join(" ")},T.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+u,"The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use",b+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+yL+"."].join(" ")},T.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether the colorscale is a default palette (`autocolorscale: true`)","or the palette determined by",jo(f+"colorscale")+"."+u,"In case `colorscale` is unspecified or `autocolorscale` is true, the default","palette will be chosen according to whether numbers in the `color` array are","all positive, all negative or mixed."].join(" ")},T.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true."+u,"If true,",g,"will correspond to the last color","in the array and",w,"will correspond to the first color."].join(" ")},n||(T.showscale={valType:"boolean",dflt:o,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace."+u].join(" ")},T.colorbar=hL),r.noColorAxis||(T.coloraxis={valType:"subplotid",regex:pL("coloraxis"),dflt:null,editType:"calc",description:["Sets a reference to a shared color axis.","References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc.","Settings for these shared color axes are set in the layout, under","`layout.coloraxis`, `layout.coloraxis2`, etc.","Note that multiple color scales can be linked to the same color axis."].join(" ")}),T},gL=Kt.extendFlat,bL=xn,fu=Ao.scales,cu="Note that `autocolorscale` must be true for this attribute to work.",C_={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:fu.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",cu].join(" ")},sequentialminus:{valType:"colorscale",dflt:fu.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",cu].join(" ")},diverging:{valType:"colorscale",dflt:fu.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",cu].join(" ")}},coloraxis:gL({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},bL("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))},xL=de,D_=function(e){return xL.isPlainObject(e.colorbar)},xc={},vd=_t,Om=de,$_=ir,_L=$_.ONEDAY,wL=$_.ONEWEEK;xc.dtick=function(t,e){var r=e==="log",a=e==="date",i=e==="category",n=a?_L:1;if(!t)return n;if(vd(t))return t=Number(t),t<=0?n:i?Math.max(1,Math.round(t)):a?Math.max(.1,t):t;if(typeof t!="string"||!(a||r))return n;var o=t.charAt(0),l=t.substr(1);return l=vd(l)?Number(l):0,l<=0||!(a&&o==="M"&&l===Math.round(l)||r&&o==="L"||r&&o==="D"&&(l===1||l===2))?n:t};xc.tick0=function(t,e,r,a){if(e==="date")return Om.cleanDate(t,Om.dateTick0(r,a%wL===0?1:0));if(!(a==="D1"||a==="D2"))return vd(t)?Number(t):0};var Bm=xc,TL=de.isArrayOrTypedArray,P_=function(e,r,a,i,n){n||(n={});var o=n.isMinor,l=o?e.minor||{}:e,s=o?r.minor:r,f=o?"minor.":"";function c(g){var w=l[g];return w!==void 0?w:(s._template||{})[g]}var v=c("tick0"),u=c("dtick"),h=c("tickvals"),d=TL(h)?"array":u?"linear":"auto",p=a(f+"tickmode",d);if(p==="auto"||p==="sync")a(f+"nticks");else if(p==="linear"){var y=s.dtick=Bm.dtick(u,i);s.tick0=Bm.tick0(v,i,r.calendar,y)}else if(i!=="multicategory"){var m=a(f+"tickvals");m===void 0?s.tickmode="auto":o||a("ticktext")}},uu=de,jm=ii,E_=function(e,r,a,i){var n=i.isMinor,o=n?e.minor||{}:e,l=n?r.minor:r,s=n?jm.minor:jm,f=n?"minor.":"",c=uu.coerce2(o,l,s,"ticklen",n?(r.ticklen||5)*.6:void 0),v=uu.coerce2(o,l,s,"tickwidth",n?r.tickwidth||1:void 0),u=uu.coerce2(o,l,s,"tickcolor",(n?r.tickcolor:void 0)||l.color),h=a(f+"ticks",!n&&i.outerTicks||c||v||u?"outside":"");h||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)},R_=function(e){var r=["showexponent","showtickprefix","showticksuffix"],a=r.filter(function(n){return e[n]!==void 0}),i=function(n){return e[n]===e[a[0]]};if(a.every(i)||a.length===1)return e[a[0]]},bs=de,kL=It,Ua=function(e,r,a){var i=a.name,n=a.inclusionAttr||"visible",o=r[i],l=bs.isArrayOrTypedArray(e[i])?e[i]:[],s=r[i]=[],f=kL.arrayTemplater(r,i,n),c,v;for(c=0;c<l.length;c++){var u=l[c];bs.isPlainObject(u)?v=f.newItem(u):(v=f.newItem({}),v[n]=!1),v._index=c,v[n]!==!1&&a.handleItemDefaults(u,v,r,a),s.push(v)}var h=f.defaultItems();for(c=0;c<h.length;c++)v=h[c],v._index=s.length,a.handleItemDefaults({},v,r,a,{}),s.push(v);if(bs.isArrayOrTypedArray(o)){var d=Math.min(o.length,s.length);for(c=0;c<d;c++)bs.relinkPrivateKeys(s[c],o[c])}return s},z_=de,AL=ut.contrast,I_=ii,ML=R_,SL=Ua,F_=function(e,r,a,i,n){n||(n={});var o=ML(e),l=a("showticklabels");if(l){var s=n.font||{},f=r.color,c=r.ticklabelposition||"",v=c.indexOf("inside")!==-1?AL(n.bgColor):f&&f!==I_.color.dflt?f:s.color;if(z_.coerceFont(a,"tickfont",{family:s.family,size:s.size,color:v}),!n.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&a("ticklabelstep"),n.noAng||a("tickangle"),i!=="category"){var u=a("tickformat");SL(e,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:LL}),r.tickformatstops.length||delete r.tickformatstops,!n.noExp&&!u&&i!=="date"&&(a("showexponent",o),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function LL(t,e){function r(i,n){return z_.coerce(t,e,I_.tickformatstops,i,n)}var a=r("enabled");a&&(r("dtickrange"),r("value"))}var CL=R_,N_=function(e,r,a,i,n){n||(n={});var o=n.tickSuffixDflt,l=CL(e),s=a("tickprefix");s&&a("showtickprefix",l);var f=a("ticksuffix",o);f&&a("showticksuffix",l)},Sn=de,DL=It,$L=P_,PL=E_,EL=F_,RL=N_,zL=Rh,H_=function(e,r,a){var i=DL.newContainer(r,"colorbar"),n=e.colorbar||{};function o(w,b){return Sn.coerce(n,i,zL,w,b)}var l=a.margin||{t:0,b:0,l:0,r:0},s=a.width-l.l-l.r,f=a.height-l.t-l.b,c=o("orientation"),v=c==="v",u=o("thicknessmode");o("thickness",u==="fraction"?30/(v?s:f):30);var h=o("lenmode");o("len",h==="fraction"?1:v?f:s),o("x",v?1.02:.5),o("xanchor",v?"left":"center"),o("xpad"),o("y",v?.5:1.02),o("yanchor",v?"middle":"bottom"),o("ypad"),Sn.noneOrAll(n,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var d=Sn.coerce(n,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",d.indexOf("inside")!==-1?"hide past domain":"hide past div"),$L(n,i,o,"linear");var p=a.font,y={outerTicks:!1,font:p};d.indexOf("inside")!==-1&&(y.bgColor="black"),RL(n,i,o,"linear",y),EL(n,i,o,"linear",y),PL(n,i,o,"linear"),o("title.text",a._dfltTitle.colorbar);var m=i.tickfont,g=Sn.extendFlat({},m,{color:p.color,size:Sn.bigFont(m.size)});Sn.coerceFont(o,"title.font",g),o("title.side",v?"top":"right")},Gm=_t,dd=de,IL=D_,FL=H_,Um=Ao.isValid,NL=tt.traceIs;function vu(t,e){var r=e.slice(0,e.length-1);return e?dd.nestedProperty(t,r).get()||{}:t}var es=function t(e,r,a,i,n){var o=n.prefix,l=n.cLetter,s="_module"in r,f=vu(e,o),c=vu(r,o),v=vu(r._template||{},o)||{},u=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,a,i,n)};if(s){var h=a._colorAxes||{},d=i(o+"coloraxis");if(d){var p=NL(r,"contour")&&dd.nestedProperty(r,"contours.coloring").get()||"heatmap",y=h[d];y?(y[2].push(u),y[0]!==p&&(y[0]=!1,dd.warn(["Ignoring coloraxis:",d,"setting","as it is linked to incompatible colorscales."].join(" ")))):h[d]=[p,r,[u]];return}}var m=f[l+"min"],g=f[l+"max"],w=Gm(m)&&Gm(g)&&m<g,b=i(o+l+"auto",!w);b?i(o+l+"mid"):(i(o+l+"min"),i(o+l+"max"));var x=f.colorscale,_=v.colorscale,T;if(x!==void 0&&(T=!Um(x)),_!==void 0&&(T=!Um(_)),i(o+"autocolorscale",T),i(o+"colorscale"),i(o+"reversescale"),o!=="marker.line."){var k;o&&s&&(k=IL(f));var S=i(o+"showscale",k);S&&(o&&v&&(c._template=v),FL(f,c,a))}},Vm=de,HL=It,Wm=C_,OL=es,BL=function(e,r){function a(v,u){return Vm.coerce(e,r,Wm,v,u)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var i=r._colorAxes,n,o;function l(v,u){return Vm.coerce(n,o,Wm.coloraxis,v,u)}for(var s in i){var f=i[s];if(f[0])n=e[s]||{},o=HL.newContainer(r,s,"coloraxis"),o._name=s,OL(n,o,r,l,{prefix:"",cLetter:"c"});else{for(var c=0;c<f[2].length;c++)f[2][c]();delete r._colorAxes[s]}}},jL=de,GL=Pa.hasColorscale,UL=Pa.extractOpts,VL=function(e,r){function a(c,v){var u=c["_"+v];u!==void 0&&(c[v]=u)}function i(c,v){var u=v.container?jL.nestedProperty(c,v.container).get():c;if(u)if(u.coloraxis)u._colorAx=r[u.coloraxis];else{var h=UL(u),d=h.auto;(d||h.min===void 0)&&a(u,v.min),(d||h.max===void 0)&&a(u,v.max),h.autocolorscale&&a(u,"colorscale")}}for(var n=0;n<e.length;n++){var o=e[n],l=o._module.colorbar;if(l)if(Array.isArray(l))for(var s=0;s<l.length;s++)i(o,l[s]);else i(o,l);GL(o,"marker.line")&&i(o,{container:"marker.line",min:"cmin",max:"cmax"})}for(var f in r._colorAxes)i(r[f],{min:"cmin",max:"cmax"})},Xm=_t,du=de,WL=Pa.extractOpts,zh=function(e,r,a){var i=e._fullLayout,n=a.vals,o=a.containerStr,l=o?du.nestedProperty(r,o).get():r,s=WL(l),f=s.auto!==!1,c=s.min,v=s.max,u=s.mid,h=function(){return du.aggNums(Math.min,null,n)},d=function(){return du.aggNums(Math.max,null,n)};if(c===void 0?c=h():f&&(l._colorAx&&Xm(c)?c=Math.min(c,h()):c=h()),v===void 0?v=d():f&&(l._colorAx&&Xm(v)?v=Math.max(v,d()):v=d()),f&&u!==void 0&&(v-u>u-c?c=u-(v-u):v-u<u-c&&(v=u+(u-c))),c===v&&(c-=.5,v+=.5),s._sync("min",c),s._sync("max",v),s.autocolorscale){var p;c*v<0?p=i.colorscale.diverging:c>=0?p=i.colorscale.sequential:p=i.colorscale.sequentialminus,s._sync("colorscale",p)}},xs=Ao,Ln=Pa,ho={moduleType:"component",name:"colorscale",attributes:xn,layoutAttributes:C_,supplyLayoutDefaults:BL,handleDefaults:es,crossTraceDefaults:VL,calc:zh,scales:xs.scales,defaultScale:xs.defaultScale,getScale:xs.get,isValidScale:xs.isValid,hasColorscale:Ln.hasColorscale,extractOpts:Ln.extractOpts,extractScale:Ln.extractScale,flipScale:Ln.flipScale,makeColorScaleFunc:Ln.makeColorScaleFunc,makeColorScaleFuncFromTrace:Ln.makeColorScaleFuncFromTrace},Ym=de,Pr={hasLines:function(t){return t.visible&&t.mode&&t.mode.indexOf("lines")!==-1},hasMarkers:function(t){return t.visible&&(t.mode&&t.mode.indexOf("markers")!==-1||t.type==="splom")},hasText:function(t){return t.visible&&t.mode&&t.mode.indexOf("text")!==-1},isBubble:function(t){return Ym.isPlainObject(t.marker)&&Ym.isArrayOrTypedArray(t.marker.size)}},XL=_t,O_=function(e,r){r||(r=2);var a=e.marker,i=a.sizeref||1,n=a.sizemin||0,o=a.sizemode==="area"?function(l){return Math.sqrt(l/i)}:function(l){return l/i};return function(l){var s=o(l/r);return XL(s)&&s>0?Math.max(s,n):0}},ha={};(function(t){var e=de;t.getSubplot=function(l){return l.subplot||l.xaxis+l.yaxis||l.geo},t.isTraceInSubplots=function(l,s){if(l.type==="splom"){for(var f=l.xaxes||[],c=l.yaxes||[],v=0;v<f.length;v++)for(var u=0;u<c.length;u++)if(s.indexOf(f[v]+c[u])!==-1)return!0;return!1}return s.indexOf(t.getSubplot(l))!==-1},t.flat=function(l,s){for(var f=new Array(l.length),c=0;c<l.length;c++)f[c]=s;return f},t.p2c=function(l,s){for(var f=new Array(l.length),c=0;c<l.length;c++)f[c]=l[c].p2c(s);return f},t.getDistanceFunction=function(l,s,f,c){return l==="closest"?c||t.quadrature(s,f):l.charAt(0)==="x"?s:f},t.getClosest=function(l,s,f){if(f.index!==!1)f.index>=0&&f.index<l.length?f.distance=0:f.index=!1;else for(var c=0;c<l.length;c++){var v=s(l[c]);v<=f.distance&&(f.index=c,f.distance=v)}return f},t.inbox=function(l,s,f){return l*s<0||l===0?f:1/0},t.quadrature=function(l,s){return function(f){var c=l(f),v=s(f);return Math.sqrt(c*c+v*v)}},t.makeEventData=function(l,s,f){var c="index"in l?l.index:l.pointNumber,v={data:s._input,fullData:s,curveNumber:s.index,pointNumber:c};if(s._indexToPoints){var u=s._indexToPoints[c];u.length===1?v.pointIndex=u[0]:v.pointIndices=u}else v.pointIndex=c;return s._module.eventData?v=s._module.eventData(v,l,s,f,c):("xVal"in l?v.x=l.xVal:"x"in l&&(v.x=l.x),"yVal"in l?v.y=l.yVal:"y"in l&&(v.y=l.y),l.xa&&(v.xaxis=l.xa),l.ya&&(v.yaxis=l.ya),l.zLabelVal!==void 0&&(v.z=l.zLabelVal)),t.appendArrayPointValue(v,s,c),v},t.appendArrayPointValue=function(l,s,f){var c=s._arrayAttrs;if(c)for(var v=0;v<c.length;v++){var u=c[v],h=a(u);if(l[h]===void 0){var d=e.nestedProperty(s,u).get(),p=i(d,f);p!==void 0&&(l[h]=p)}}},t.appendArrayMultiPointValues=function(l,s,f){var c=s._arrayAttrs;if(c)for(var v=0;v<c.length;v++){var u=c[v],h=a(u);if(l[h]===void 0){for(var d=e.nestedProperty(s,u).get(),p=new Array(f.length),y=0;y<f.length;y++)p[y]=i(d,f[y]);l[h]=p}}};var r={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function a(l){return r[l]||l}function i(l,s){if(Array.isArray(s)){if(Array.isArray(l)&&Array.isArray(l[s[0]]))return l[s[0]][s[1]]}else return l[s]}var n={x:!0,y:!0},o={"x unified":!0,"y unified":!0};t.isUnifiedHover=function(l){return typeof l!="string"?!1:!!o[l]},t.isXYhover=function(l){return typeof l!="string"?!1:!!n[l]}})(ha);var hu,qm;function YL(){if(qm)return hu;qm=1;var t=u1,e=yt.round,r="M0,0Z",a=Math.sqrt(2),i=Math.sqrt(3),n=Math.PI,o=Math.cos,l=Math.sin;hu={circle:{n:0,f:function(d,p,y){if(s(p))return r;var m=e(d,2),g="M"+m+",0A"+m+","+m+" 0 1,1 0,-"+m+"A"+m+","+m+" 0 0,1 "+m+",0Z";return y?h(p,y,g):g}},square:{n:1,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"H-"+m+"V-"+m+"H"+m+"Z")}},diamond:{n:2,f:function(d,p,y){if(s(p))return r;var m=e(d*1.3,2);return h(p,y,"M"+m+",0L0,"+m+"L-"+m+",0L0,-"+m+"Z")}},cross:{n:3,f:function(d,p,y){if(s(p))return r;var m=e(d*.4,2),g=e(d*1.2,2);return h(p,y,"M"+g+","+m+"H"+m+"V"+g+"H-"+m+"V"+m+"H-"+g+"V-"+m+"H-"+m+"V-"+g+"H"+m+"V-"+m+"H"+g+"Z")}},x:{n:4,f:function(d,p,y){if(s(p))return r;var m=e(d*.8/a,2),g="l"+m+","+m,w="l"+m+",-"+m,b="l-"+m+",-"+m,x="l-"+m+","+m;return h(p,y,"M0,"+m+g+w+b+w+b+x+b+x+g+x+g+"Z")}},"triangle-up":{n:5,f:function(d,p,y){if(s(p))return r;var m=e(d*2/i,2),g=e(d/2,2),w=e(d,2);return h(p,y,"M-"+m+","+g+"H"+m+"L0,-"+w+"Z")}},"triangle-down":{n:6,f:function(d,p,y){if(s(p))return r;var m=e(d*2/i,2),g=e(d/2,2),w=e(d,2);return h(p,y,"M-"+m+",-"+g+"H"+m+"L0,"+w+"Z")}},"triangle-left":{n:7,f:function(d,p,y){if(s(p))return r;var m=e(d*2/i,2),g=e(d/2,2),w=e(d,2);return h(p,y,"M"+g+",-"+m+"V"+m+"L-"+w+",0Z")}},"triangle-right":{n:8,f:function(d,p,y){if(s(p))return r;var m=e(d*2/i,2),g=e(d/2,2),w=e(d,2);return h(p,y,"M-"+g+",-"+m+"V"+m+"L"+w+",0Z")}},"triangle-ne":{n:9,f:function(d,p,y){if(s(p))return r;var m=e(d*.6,2),g=e(d*1.2,2);return h(p,y,"M-"+g+",-"+m+"H"+m+"V"+g+"Z")}},"triangle-se":{n:10,f:function(d,p,y){if(s(p))return r;var m=e(d*.6,2),g=e(d*1.2,2);return h(p,y,"M"+m+",-"+g+"V"+m+"H-"+g+"Z")}},"triangle-sw":{n:11,f:function(d,p,y){if(s(p))return r;var m=e(d*.6,2),g=e(d*1.2,2);return h(p,y,"M"+g+","+m+"H-"+m+"V-"+g+"Z")}},"triangle-nw":{n:12,f:function(d,p,y){if(s(p))return r;var m=e(d*.6,2),g=e(d*1.2,2);return h(p,y,"M-"+m+","+g+"V-"+m+"H"+g+"Z")}},pentagon:{n:13,f:function(d,p,y){if(s(p))return r;var m=e(d*.951,2),g=e(d*.588,2),w=e(-d,2),b=e(d*-.309,2),x=e(d*.809,2);return h(p,y,"M"+m+","+b+"L"+g+","+x+"H-"+g+"L-"+m+","+b+"L0,"+w+"Z")}},hexagon:{n:14,f:function(d,p,y){if(s(p))return r;var m=e(d,2),g=e(d/2,2),w=e(d*i/2,2);return h(p,y,"M"+w+",-"+g+"V"+g+"L0,"+m+"L-"+w+","+g+"V-"+g+"L0,-"+m+"Z")}},hexagon2:{n:15,f:function(d,p,y){if(s(p))return r;var m=e(d,2),g=e(d/2,2),w=e(d*i/2,2);return h(p,y,"M-"+g+","+w+"H"+g+"L"+m+",0L"+g+",-"+w+"H-"+g+"L-"+m+",0Z")}},octagon:{n:16,f:function(d,p,y){if(s(p))return r;var m=e(d*.924,2),g=e(d*.383,2);return h(p,y,"M-"+g+",-"+m+"H"+g+"L"+m+",-"+g+"V"+g+"L"+g+","+m+"H-"+g+"L-"+m+","+g+"V-"+g+"Z")}},star:{n:17,f:function(d,p,y){if(s(p))return r;var m=d*1.4,g=e(m*.225,2),w=e(m*.951,2),b=e(m*.363,2),x=e(m*.588,2),_=e(-m,2),T=e(m*-.309,2),k=e(m*.118,2),S=e(m*.809,2),M=e(m*.382,2);return h(p,y,"M"+g+","+T+"H"+w+"L"+b+","+k+"L"+x+","+S+"L0,"+M+"L-"+x+","+S+"L-"+b+","+k+"L-"+w+","+T+"H-"+g+"L0,"+_+"Z")}},hexagram:{n:18,f:function(d,p,y){if(s(p))return r;var m=e(d*.66,2),g=e(d*.38,2),w=e(d*.76,2);return h(p,y,"M-"+w+",0l-"+g+",-"+m+"h"+w+"l"+g+",-"+m+"l"+g+","+m+"h"+w+"l-"+g+","+m+"l"+g+","+m+"h-"+w+"l-"+g+","+m+"l-"+g+",-"+m+"h-"+w+"Z")}},"star-triangle-up":{n:19,f:function(d,p,y){if(s(p))return r;var m=e(d*i*.8,2),g=e(d*.8,2),w=e(d*1.6,2),b=e(d*4,2),x="A "+b+","+b+" 0 0 1 ";return h(p,y,"M-"+m+","+g+x+m+","+g+x+"0,-"+w+x+"-"+m+","+g+"Z")}},"star-triangle-down":{n:20,f:function(d,p,y){if(s(p))return r;var m=e(d*i*.8,2),g=e(d*.8,2),w=e(d*1.6,2),b=e(d*4,2),x="A "+b+","+b+" 0 0 1 ";return h(p,y,"M"+m+",-"+g+x+"-"+m+",-"+g+x+"0,"+w+x+m+",-"+g+"Z")}},"star-square":{n:21,f:function(d,p,y){if(s(p))return r;var m=e(d*1.1,2),g=e(d*2,2),w="A "+g+","+g+" 0 0 1 ";return h(p,y,"M-"+m+",-"+m+w+"-"+m+","+m+w+m+","+m+w+m+",-"+m+w+"-"+m+",-"+m+"Z")}},"star-diamond":{n:22,f:function(d,p,y){if(s(p))return r;var m=e(d*1.4,2),g=e(d*1.9,2),w="A "+g+","+g+" 0 0 1 ";return h(p,y,"M-"+m+",0"+w+"0,"+m+w+m+",0"+w+"0,-"+m+w+"-"+m+",0Z")}},"diamond-tall":{n:23,f:function(d,p,y){if(s(p))return r;var m=e(d*.7,2),g=e(d*1.4,2);return h(p,y,"M0,"+g+"L"+m+",0L0,-"+g+"L-"+m+",0Z")}},"diamond-wide":{n:24,f:function(d,p,y){if(s(p))return r;var m=e(d*1.4,2),g=e(d*.7,2);return h(p,y,"M0,"+g+"L"+m+",0L0,-"+g+"L-"+m+",0Z")}},hourglass:{n:25,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"H-"+m+"L"+m+",-"+m+"H-"+m+"Z")},noDot:!0},bowtie:{n:26,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"V-"+m+"L-"+m+","+m+"V-"+m+"Z")},noDot:!0},"circle-cross":{n:27,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M0,"+m+"V-"+m+"M"+m+",0H-"+m+"M"+m+",0A"+m+","+m+" 0 1,1 0,-"+m+"A"+m+","+m+" 0 0,1 "+m+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(d,p,y){if(s(p))return r;var m=e(d,2),g=e(d/a,2);return h(p,y,"M"+g+","+g+"L-"+g+",-"+g+"M"+g+",-"+g+"L-"+g+","+g+"M"+m+",0A"+m+","+m+" 0 1,1 0,-"+m+"A"+m+","+m+" 0 0,1 "+m+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M0,"+m+"V-"+m+"M"+m+",0H-"+m+"M"+m+","+m+"H-"+m+"V-"+m+"H"+m+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"L-"+m+",-"+m+"M"+m+",-"+m+"L-"+m+","+m+"M"+m+","+m+"H-"+m+"V-"+m+"H"+m+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(d,p,y){if(s(p))return r;var m=e(d*1.3,2);return h(p,y,"M"+m+",0L0,"+m+"L-"+m+",0L0,-"+m+"ZM0,-"+m+"V"+m+"M-"+m+",0H"+m)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(d,p,y){if(s(p))return r;var m=e(d*1.3,2),g=e(d*.65,2);return h(p,y,"M"+m+",0L0,"+m+"L-"+m+",0L0,-"+m+"ZM-"+g+",-"+g+"L"+g+","+g+"M-"+g+","+g+"L"+g+",-"+g)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(d,p,y){if(s(p))return r;var m=e(d*1.4,2);return h(p,y,"M0,"+m+"V-"+m+"M"+m+",0H-"+m)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"L-"+m+",-"+m+"M"+m+",-"+m+"L-"+m+","+m)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(d,p,y){if(s(p))return r;var m=e(d*1.2,2),g=e(d*.85,2);return h(p,y,"M0,"+m+"V-"+m+"M"+m+",0H-"+m+"M"+g+","+g+"L-"+g+",-"+g+"M"+g+",-"+g+"L-"+g+","+g)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(d,p,y){if(s(p))return r;var m=e(d/2,2),g=e(d,2);return h(p,y,"M"+m+","+g+"V-"+g+"M"+(m-g)+",-"+g+"V"+g+"M"+g+","+m+"H-"+g+"M-"+g+","+(m-g)+"H"+g)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(d,p,y){if(s(p))return r;var m=e(d*1.2,2),g=e(d*1.6,2),w=e(d*.8,2);return h(p,y,"M-"+m+","+w+"L0,0M"+m+","+w+"L0,0M0,-"+g+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(d,p,y){if(s(p))return r;var m=e(d*1.2,2),g=e(d*1.6,2),w=e(d*.8,2);return h(p,y,"M-"+m+",-"+w+"L0,0M"+m+",-"+w+"L0,0M0,"+g+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(d,p,y){if(s(p))return r;var m=e(d*1.2,2),g=e(d*1.6,2),w=e(d*.8,2);return h(p,y,"M"+w+","+m+"L0,0M"+w+",-"+m+"L0,0M-"+g+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(d,p,y){if(s(p))return r;var m=e(d*1.2,2),g=e(d*1.6,2),w=e(d*.8,2);return h(p,y,"M-"+w+","+m+"L0,0M-"+w+",-"+m+"L0,0M"+g+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(d,p,y){if(s(p))return r;var m=e(d*1.4,2);return h(p,y,"M"+m+",0H-"+m)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(d,p,y){if(s(p))return r;var m=e(d*1.4,2);return h(p,y,"M0,"+m+"V-"+m)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+",-"+m+"L-"+m+","+m)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"L-"+m+",-"+m)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(d,p,y){if(s(p))return r;var m=e(d,2),g=e(d*2,2);return h(p,y,"M0,0L-"+m+","+g+"H"+m+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(d,p,y){if(s(p))return r;var m=e(d,2),g=e(d*2,2);return h(p,y,"M0,0L-"+m+",-"+g+"H"+m+"Z")},noDot:!0},"arrow-left":{n:47,f:function(d,p,y){if(s(p))return r;var m=e(d*2,2),g=e(d,2);return h(p,y,"M0,0L"+m+",-"+g+"V"+g+"Z")},noDot:!0},"arrow-right":{n:48,f:function(d,p,y){if(s(p))return r;var m=e(d*2,2),g=e(d,2);return h(p,y,"M0,0L-"+m+",-"+g+"V"+g+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(d,p,y){if(s(p))return r;var m=e(d,2),g=e(d*2,2);return h(p,y,"M-"+m+",0H"+m+"M0,0L-"+m+","+g+"H"+m+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(d,p,y){if(s(p))return r;var m=e(d,2),g=e(d*2,2);return h(p,y,"M-"+m+",0H"+m+"M0,0L-"+m+",-"+g+"H"+m+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(d,p,y){if(s(p))return r;var m=e(d*2,2),g=e(d,2);return h(p,y,"M0,-"+g+"V"+g+"M0,0L"+m+",-"+g+"V"+g+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(d,p,y){if(s(p))return r;var m=e(d*2,2),g=e(d,2);return h(p,y,"M0,-"+g+"V"+g+"M0,0L-"+m+",-"+g+"V"+g+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(d,p,y){if(s(p))return r;var m=n/2.5,g=2*d*o(m),w=2*d*l(m);return h(p,y,"M0,0L"+-g+","+w+"L"+g+","+w+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(d,p,y){if(s(p))return r;var m=n/4,g=2*d*o(m),w=2*d*l(m);return h(p,y,"M0,0L"+-g+","+w+"A "+2*d+","+2*d+" 0 0 1 "+g+","+w+"Z")},backoff:.4,noDot:!0}};function s(d){return d===null}var f,c,v,u;function h(d,p,y){if((!d||d%360===0)&&!p)return y;if(v===d&&u===p&&f===y)return c;v=d,u=p,f=y;function m($,N){var E=o($),P=l($),R=N[0],L=N[1]+(p||0);return[R*E-L*P,R*P+L*E]}for(var g=d/180*n,w=0,b=0,x=t(y),_="",T=0;T<x.length;T++){var k=x[T],S=k[0],M=w,D=b;if(S==="M"||S==="L")w=+k[1],b=+k[2];else if(S==="m"||S==="l")w+=+k[1],b+=+k[2];else if(S==="H")w=+k[1];else if(S==="h")w+=+k[1];else if(S==="V")b=+k[1];else if(S==="v")b+=+k[1];else if(S==="A"){w=+k[1],b=+k[2];var A=m(g,[+k[6],+k[7]]);k[6]=A[0],k[7]=A[1],k[3]=+k[3]+d}(S==="H"||S==="V")&&(S="L"),(S==="h"||S==="v")&&(S="l"),(S==="m"||S==="l")&&(w-=M,b-=D);var C=m(g,[w,b]);(S==="H"||S==="V")&&(S="L"),(S==="M"||S==="L"||S==="m"||S==="l")&&(k[1]=C[0],k[2]=C[1]),k[0]=S,_+=k[0]+k.slice(1).join(",")}return c=_,_}return hu}var hr=yt,Ht=de,qL=Ht.numberFormat,cn=_t,hd=da,_c=tt,Cr=ut,ZL=ho,Sl=Ht.strTranslate,Ih=wr,KL=bn,QL=Yr,JL=QL.LINE_SPACING,B_=Zl.DESELECTDIM,eC=Pr,tC=O_,rC=ha.appendArrayPointValue,Re=b_.exports={};Re.font=function(t,e,r,a){Ht.isPlainObject(e)&&(a=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),a&&t.call(Cr.fill,a)};Re.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)};Re.setSize=function(t,e,r){t.attr("width",e).attr("height",r)};Re.setRect=function(t,e,r,a,i){t.call(Re.setPosition,e,r).call(Re.setSize,a,i)};Re.translatePoint=function(t,e,r,a){var i=r.c2p(t.x),n=a.c2p(t.y);if(cn(i)&&cn(n)&&e.node())e.node().nodeName==="text"?e.attr("x",i).attr("y",n):e.attr("transform",Sl(i,n));else return!1;return!0};Re.translatePoints=function(t,e,r){t.each(function(a){var i=hr.select(this);Re.translatePoint(a,i,e,r)})};Re.hideOutsideRangePoint=function(t,e,r,a,i,n){e.attr("display",r.isPtWithinRange(t,i)&&a.isPtWithinRange(t,n)?null:"none")};Re.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,a=e.yaxis;t.each(function(i){var n=i[0].trace,o=n.xcalendar,l=n.ycalendar,s=_c.traceIs(n,"bar-like")?".bartext":".point,.textpoint";t.selectAll(s).each(function(f){Re.hideOutsideRangePoint(f,hr.select(this),r,a,o,l)})})}};Re.crispRound=function(t,e,r){return!e||!cn(e)?r||0:t._context.staticPlot?e:e<1?1:Math.round(e)};Re.singleLineStyle=function(t,e,r,a,i){e.style("fill","none");var n=(((t||[])[0]||{}).trace||{}).line||{},o=r||n.width||0,l=i||n.dash||"";Cr.stroke(e,a||n.color),Re.dashLine(e,l,o)};Re.lineGroupStyle=function(t,e,r,a){t.style("fill","none").each(function(i){var n=(((i||[])[0]||{}).trace||{}).line||{},o=e||n.width||0,l=a||n.dash||"";hr.select(this).call(Cr.stroke,r||n.color).call(Re.dashLine,l,o)})};Re.dashLine=function(t,e,r){r=+r||0,e=Re.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})};Re.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return t==="solid"?t="":t==="dot"?t=r+"px,"+r+"px":t==="dash"?t=3*r+"px,"+3*r+"px":t==="longdash"?t=5*r+"px,"+5*r+"px":t==="dashdot"?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":t==="longdashdot"&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t};function j_(t,e,r){var a=e.fillpattern,i=a&&Re.getPatternAttr(a.shape,0,"");if(i){var n=Re.getPatternAttr(a.bgcolor,0,null),o=Re.getPatternAttr(a.fgcolor,0,null),l=a.fgopacity,s=Re.getPatternAttr(a.size,0,8),f=Re.getPatternAttr(a.solidity,0,.3),c=e.uid;Re.pattern(t,"point",r,c,i,s,f,void 0,a.fillmode,n,o,l)}else e.fillcolor&&t.call(Cr.fill,e.fillcolor)}Re.singleFillStyle=function(t,e){var r=hr.select(t.node()),a=r.data(),i=((a[0]||[])[0]||{}).trace||{};j_(t,i,e)};Re.fillGroupStyle=function(t,e){t.style("stroke-width",0).each(function(r){var a=hr.select(this);r[0].trace&&j_(a,r[0].trace,e)})};var Zm=YL();Re.symbolNames=[];Re.symbolFuncs=[];Re.symbolBackOffs=[];Re.symbolNeedLines={};Re.symbolNoDot={};Re.symbolNoFill={};Re.symbolList=[];Object.keys(Zm).forEach(function(t){var e=Zm[t],r=e.n;Re.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),Re.symbolNames[r]=t,Re.symbolFuncs[r]=e.f,Re.symbolBackOffs[r]=e.backoff||0,e.needLine&&(Re.symbolNeedLines[r]=!0),e.noDot?Re.symbolNoDot[r]=!0:Re.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(Re.symbolNoFill[r]=!0)});var aC=Re.symbolNames.length,iC="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Re.symbolNumber=function(t){if(cn(t))t=+t;else if(typeof t=="string"){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=Re.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=aC||t>=400?0:Math.floor(Math.max(t,0))};function G_(t,e,r,a){var i=t%100;return Re.symbolFuncs[i](e,r,a)+(t>=200?iC:"")}var Km={x1:1,x2:0,y1:0,y2:0},Qm={x1:0,x2:0,y1:1,y2:0},Jm=qL("~f"),U_={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:Km},horizontalreversed:{node:"linearGradient",attrs:Km,reversed:!0},vertical:{node:"linearGradient",attrs:Qm},verticalreversed:{node:"linearGradient",attrs:Qm,reversed:!0}};Re.gradient=function(t,e,r,a,i,n){for(var o=i.length,l=U_[a],s=new Array(o),f=0;f<o;f++)l.reversed?s[o-1-f]=[Jm((1-i[f][0])*100),i[f][1]]:s[f]=[Jm(i[f][0]*100),i[f][1]];var c=e._fullLayout,v="g"+c._uid+"-"+r,u=c._defs.select(".gradients").selectAll("#"+v).data([a+s.join(";")],Ht.identity);u.exit().remove(),u.enter().append(l.node).each(function(){var h=hr.select(this);l.attrs&&h.attr(l.attrs),h.attr("id",v);var d=h.selectAll("stop").data(s);d.exit().remove(),d.enter().append("stop"),d.each(function(p){var y=hd(p[1]);hr.select(this).attr({offset:p[0]+"%","stop-color":Cr.tinyRGB(y),"stop-opacity":y.getAlpha()})})}),t.style(n,Fh(v,e)).style(n+"-opacity",null),t.classed("gradient_filled",!0)};Re.pattern=function(t,e,r,a,i,n,o,l,s,f,c,v){var u=e==="legend";l&&(s==="overlay"?(f=l,c=Cr.contrast(f)):(f=void 0,c=l));var h=r._fullLayout,d="p"+h._uid+"-"+a,p,y,m=function(C,$,N,E,P){return E+(P-E)*(C-$)/(N-$)},g,w,b,x,_={},T=hd(c),k=Cr.tinyRGB(T),S=T.getAlpha(),M=v*S;switch(i){case"/":p=n*Math.sqrt(2),y=n*Math.sqrt(2),g="M-"+p/4+","+y/4+"l"+p/2+",-"+y/2+"M0,"+y+"L"+p+",0M"+p/4*3+","+y/4*5+"l"+p/2+",-"+y/2,w=o*n,x="path",_={d:g,opacity:M,stroke:k,"stroke-width":w+"px"};break;case"\\":p=n*Math.sqrt(2),y=n*Math.sqrt(2),g="M"+p/4*3+",-"+y/4+"l"+p/2+","+y/2+"M0,0L"+p+","+y+"M-"+p/4+","+y/4*3+"l"+p/2+","+y/2,w=o*n,x="path",_={d:g,opacity:M,stroke:k,"stroke-width":w+"px"};break;case"x":p=n*Math.sqrt(2),y=n*Math.sqrt(2),g="M-"+p/4+","+y/4+"l"+p/2+",-"+y/2+"M0,"+y+"L"+p+",0M"+p/4*3+","+y/4*5+"l"+p/2+",-"+y/2+"M"+p/4*3+",-"+y/4+"l"+p/2+","+y/2+"M0,0L"+p+","+y+"M-"+p/4+","+y/4*3+"l"+p/2+","+y/2,w=n-n*Math.sqrt(1-o),x="path",_={d:g,opacity:M,stroke:k,"stroke-width":w+"px"};break;case"|":p=n,y=n,x="path",g="M"+p/2+",0L"+p/2+","+y,w=o*n,x="path",_={d:g,opacity:M,stroke:k,"stroke-width":w+"px"};break;case"-":p=n,y=n,x="path",g="M0,"+y/2+"L"+p+","+y/2,w=o*n,x="path",_={d:g,opacity:M,stroke:k,"stroke-width":w+"px"};break;case"+":p=n,y=n,x="path",g="M"+p/2+",0L"+p/2+","+y+"M0,"+y/2+"L"+p+","+y/2,w=n-n*Math.sqrt(1-o),x="path",_={d:g,opacity:M,stroke:k,"stroke-width":w+"px"};break;case".":p=n,y=n,o<Math.PI/4?b=Math.sqrt(o*n*n/Math.PI):b=m(o,Math.PI/4,1,n/2,n/Math.sqrt(2)),x="circle",_={cx:p/2,cy:y/2,r:b,opacity:M,fill:k};break}var D=[i||"noSh",f||"noBg",c||"noFg",n,o].join(";"),A=h._defs.select(".patterns").selectAll("#"+d).data([D],Ht.identity);A.exit().remove(),A.enter().append("pattern").each(function(){var C=hr.select(this);if(C.attr({id:d,width:p+"px",height:y+"px",patternUnits:"userSpaceOnUse",patternTransform:u?"scale(0.8)":""}),f){var $=hd(f),N=Cr.tinyRGB($),E=$.getAlpha(),P=C.selectAll("rect").data([0]);P.exit().remove(),P.enter().append("rect").attr({width:p+"px",height:y+"px",fill:N,"fill-opacity":E})}var R=C.selectAll(x).data([0]);R.exit().remove(),R.enter().append(x).attr(_)}),t.style("fill",Fh(d,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)};Re.initGradients=function(t){var e=t._fullLayout,r=Ht.ensureSingle(e._defs,"g","gradients");r.selectAll("linearGradient,radialGradient").remove(),hr.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)};Re.initPatterns=function(t){var e=t._fullLayout,r=Ht.ensureSingle(e._defs,"g","patterns");r.selectAll("pattern").remove(),hr.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)};Re.getPatternAttr=function(t,e,r){return t&&Ht.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t};Re.pointStyle=function(t,e,r){if(t.size()){var a=Re.makePointStyleFns(e);t.each(function(i){Re.singlePointStyle(i,hr.select(this),e,a,r)})}};Re.singlePointStyle=function(t,e,r,a,i){var n=r.marker,o=n.line;if(e.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(t):t.mo===void 0?n.opacity:t.mo),a.ms2mrc){var l;t.ms==="various"||n.size==="various"?l=3:l=a.ms2mrc(t.ms),t.mrc=l,a.selectedSizeFn&&(l=t.mrc=a.selectedSizeFn(t));var s=Re.symbolNumber(t.mx||n.symbol)||0;t.om=s%200>=100;var f=Hh(t,r),c=Nh(t,r);e.attr("d",G_(s,l,f,c))}var v=!1,u,h,d;if(t.so)d=o.outlierwidth,h=o.outliercolor,u=n.outliercolor;else{var p=(o||{}).width;d=(t.mlw+1||p+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in t?h=t.mlcc=a.lineScale(t.mlc):Ht.isArrayOrTypedArray(o.color)?h=Cr.defaultLine:h=o.color,Ht.isArrayOrTypedArray(n.color)&&(u=Cr.defaultLine,v=!0),"mc"in t?u=t.mcc=a.markerScale(t.mc):u=n.color||"rgba(0,0,0,0)",a.selectedColorFn&&(u=a.selectedColorFn(t))}if(t.om)e.call(Cr.stroke,u).style({"stroke-width":(d||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:d)+"px");var y=n.gradient,m=t.mgt;m?v=!0:m=y&&y.type,Ht.isArrayOrTypedArray(m)&&(m=m[0],U_[m]||(m=0));var g=n.pattern,w=g&&Re.getPatternAttr(g.shape,t.i,"");if(m&&m!=="none"){var b=t.mgc;b?v=!0:b=y.color;var x=r.uid;v&&(x+="-"+t.i),Re.gradient(e,i,x,m,[[0,b],[1,u]],"fill")}else if(w){var _=Re.getPatternAttr(g.bgcolor,t.i,null),T=Re.getPatternAttr(g.fgcolor,t.i,null),k=g.fgopacity,S=Re.getPatternAttr(g.size,t.i,8),M=Re.getPatternAttr(g.solidity,t.i,.3),D=t.mcc||Ht.isArrayOrTypedArray(g.shape)||Ht.isArrayOrTypedArray(g.bgcolor)||Ht.isArrayOrTypedArray(g.size)||Ht.isArrayOrTypedArray(g.solidity),A=r.uid;D&&(A+="-"+t.i),Re.pattern(e,"point",i,A,w,S,M,t.mcc,g.fillmode,_,T,k)}else Cr.fill(e,u);d&&Cr.stroke(e,h)}};Re.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=Re.tryColorscale(r,""),e.lineScale=Re.tryColorscale(r,"line"),_c.traceIs(t,"symbols")&&(e.ms2mrc=eC.isBubble(t)?tC(t):function(){return(r.size||6)/2}),t.selectedpoints&&Ht.extendFlat(e,Re.makeSelectedPointStyleFns(t)),e};Re.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},a=t.unselected||{},i=t.marker||{},n=r.marker||{},o=a.marker||{},l=i.opacity,s=n.opacity,f=o.opacity,c=s!==void 0,v=f!==void 0;(Ht.isArrayOrTypedArray(l)||c||v)&&(e.selectedOpacityFn=function(b){var x=b.mo===void 0?i.opacity:b.mo;return b.selected?c?s:x:v?f:B_*x});var u=i.color,h=n.color,d=o.color;(h||d)&&(e.selectedColorFn=function(b){var x=b.mcc||u;return b.selected?h||x:d||x});var p=i.size,y=n.size,m=o.size,g=y!==void 0,w=m!==void 0;return _c.traceIs(t,"symbols")&&(g||w)&&(e.selectedSizeFn=function(b){var x=b.mrc||p/2;return b.selected?g?y/2:x:w?m/2:x}),e};Re.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},a=t.unselected||{},i=t.textfont||{},n=r.textfont||{},o=a.textfont||{},l=i.color,s=n.color,f=o.color;return e.selectedTextColorFn=function(c){var v=c.tc||l;return c.selected?s||v:f||(s?v:Cr.addOpacity(v,B_))},e};Re.selectedPointStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Re.makeSelectedPointStyleFns(e),a=e.marker||{},i=[];r.selectedOpacityFn&&i.push(function(n,o){n.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&i.push(function(n,o){Cr.fill(n,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(n,o){var l=o.mx||a.symbol||0,s=r.selectedSizeFn(o);n.attr("d",G_(Re.symbolNumber(l),s,Hh(o,e),Nh(o,e))),o.mrc2=s}),i.length&&t.each(function(n){for(var o=hr.select(this),l=0;l<i.length;l++)i[l](o,n)})}};Re.tryColorscale=function(t,e){var r=e?Ht.nestedProperty(t,e).get():t;if(r){var a=r.color;if((r.colorscale||r._colorAx)&&Ht.isArrayOrTypedArray(a))return ZL.makeColorScaleFuncFromTrace(r)}return Ht.identity};var pu={start:1,end:-1,middle:0,bottom:1,top:-1};function V_(t,e,r,a,i){var n=hr.select(t.node().parentNode),o=e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle",l=e.indexOf("left")!==-1?"end":e.indexOf("right")!==-1?"start":"middle",s=a?a/.8+1:0,f=(Ih.lineCount(t)-1)*JL+1,c=pu[l]*s,v=r*.75+pu[o]*s+(pu[o]-1)*f*r/2;t.attr("text-anchor",l),i||n.attr("transform",Sl(c,v))}function W_(t,e){var r=t.ts||e.textfont.size;return cn(r)&&r>0?r:0}Re.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var i=Re.makeSelectedTextStyleFns(e);a=i.selectedTextColorFn}var n=e.texttemplate,o=r._fullLayout;t.each(function(l){var s=hr.select(this),f=n?Ht.extractOption(l,e,"txt","texttemplate"):Ht.extractOption(l,e,"tx","text");if(!f&&f!==0){s.remove();return}if(n){var c=e._module.formatLabels,v=c?c(l,e,o):{},u={};rC(u,e,l.i);var h=e._meta||{};f=Ht.texttemplateString(f,v,o._d3locale,u,l,h)}var d=l.tp||e.textposition,p=W_(l,e),y=a?a(l):l.tc||e.textfont.color;s.call(Re.font,l.tf||e.textfont.family,p,y).text(f).call(Ih.convertToTspans,r).call(V_,d,p,l.mrc)})}};Re.selectedTextStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Re.makeSelectedTextStyleFns(e);t.each(function(a){var i=hr.select(this),n=r.selectedTextColorFn(a),o=a.tp||e.textposition,l=W_(a,e);Cr.fill(i,n);var s=_c.traceIs(e,"bar-like");V_(i,o,l,a.mrc2||a.mrc,s)})}};var ey=.5;Re.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r="M"+t[0],a=[],i;for(i=1;i<t.length-1;i++)a.push(hf(t[i-1],t[i],t[i+1],e));for(r+="Q"+a[0][0]+" "+t[1],i=2;i<t.length-1;i++)r+="C"+a[i-2][1]+" "+a[i-1][0]+" "+t[i];return r+="Q"+a[t.length-3][1]+" "+t[t.length-1],r};Re.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r="M"+t[0],a=t.length-1,i=[hf(t[a],t[0],t[1],e)],n;for(n=1;n<a;n++)i.push(hf(t[n-1],t[n],t[n+1],e));for(i.push(hf(t[a-1],t[a],t[0],e)),n=1;n<=a;n++)r+="C"+i[n-1][1]+" "+i[n][0]+" "+t[n];return r+="C"+i[a][1]+" "+i[0][0]+" "+t[0]+"Z",r};var X_,Y_;function to(t,e,r){return r&&(t=q_(t)),e?an(t[1]):rn(t[0])}function rn(t){var e=hr.round(t,2);return X_=e,e}function an(t){var e=hr.round(t,2);return Y_=e,e}function hf(t,e,r,a){var i=t[0]-e[0],n=t[1]-e[1],o=r[0]-e[0],l=r[1]-e[1],s=Math.pow(i*i+n*n,ey/2),f=Math.pow(o*o+l*l,ey/2),c=(f*f*i-s*s*o)*a,v=(f*f*n-s*s*l)*a,u=3*f*(s+f),h=3*s*(s+f);return[[rn(e[0]+(u&&c/u)),an(e[1]+(u&&v/u))],[rn(e[0]-(h&&c/h)),an(e[1]-(h&&v/h))]]}var nC={hv:function(t,e,r){return"H"+rn(e[0])+"V"+to(e,1,r)},vh:function(t,e,r){return"V"+an(e[1])+"H"+to(e,0,r)},hvh:function(t,e,r){return"H"+rn((t[0]+e[0])/2)+"V"+an(e[1])+"H"+to(e,0,r)},vhv:function(t,e,r){return"V"+an((t[1]+e[1])/2)+"H"+rn(e[0])+"V"+to(e,1,r)}},oC=function(t,e,r){return"L"+to(e,0,r)+","+to(e,1,r)};Re.steps=function(t){var e=nC[t]||oC;return function(r){for(var a="M"+rn(r[0][0])+","+an(r[0][1]),i=r.length,n=1;n<i;n++)a+=e(r[n-1],r[n],n===i-1);return a}};function q_(t,e){var r=t.backoff,a=t.trace,i=t.d,n=t.i;if(r&&a&&a.marker&&a.marker.angle%360===0&&a.line&&a.line.shape!=="spline"){var o=Ht.isArrayOrTypedArray(r),l=t,s=e?e[0]:X_||0,f=e?e[1]:Y_||0,c=l[0],v=l[1],u=c-s,h=v-f,d=Math.atan2(h,u),p=o?r[n]:r;if(p==="auto"){var y=l.i;a.type==="scatter"&&y--;var m=l.marker,g=m.symbol;Ht.isArrayOrTypedArray(g)&&(g=g[y]);var w=m.size;Ht.isArrayOrTypedArray(w)&&(w=w[y]),p=m?Re.symbolBackOffs[Re.symbolNumber(g)]*w:0,p+=Re.getMarkerStandoff(i[y],a)||0}var b=c-p*Math.cos(d),x=v-p*Math.sin(d);(b<=c&&b>=s||b>=c&&b<=s)&&(x<=v&&x>=f||x>=v&&x<=f)&&(t=[b,x])}return t}Re.applyBackoff=q_;Re.makeTester=function(){var t=Ht.ensureSingleById(hr.select("body"),"svg","js-plotly-tester",function(r){r.attr(KL.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),e=Ht.ensureSingle(t,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Re.tester=t,Re.testref=e};Re.savedBBoxes={};var mu=0,lC=1e4;Re.bBox=function(t,e,r){r||(r=ty(t));var a;if(r){if(a=Re.savedBBoxes[r],a)return Ht.extendFlat({},a)}else if(t.childNodes.length===1){var i=t.childNodes[0];if(r=ty(i),r){var n=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,l=i.getAttribute("transform");if(!l){var s=Re.bBox(i,!1,r);return n&&(s.left+=n,s.right+=n),o&&(s.top+=o,s.bottom+=o),s}if(r+="~"+n+"~"+o+"~"+l,a=Re.savedBBoxes[r],a)return Ht.extendFlat({},a)}}var f,c;e?f=t:(c=Re.tester.node(),f=t.cloneNode(!0),c.appendChild(f)),hr.select(f).attr("transform",null).call(Ih.positionText,0,0);var v=f.getBoundingClientRect(),u=Re.testref.node().getBoundingClientRect();e||c.removeChild(f);var h={height:v.height,width:v.width,left:v.left-u.left,top:v.top-u.top,right:v.right-u.left,bottom:v.bottom-u.top};return mu>=lC&&(Re.savedBBoxes={},mu=0),r&&(Re.savedBBoxes[r]=h),mu++,Ht.extendFlat({},h)};function ty(t){var e=t.getAttribute("data-unformatted");if(e!==null)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}Re.setClipUrl=function(t,e,r){t.attr("clip-path",Fh(e,r))};function Fh(t,e){if(!t)return null;var r=e._context,a=r._exportedPlot?"":r._baseUrl||"";return a?"url('"+a+"#"+t+"')":"url(#"+t+")"}Re.getTranslate=function(t){var e=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=t.attr?"attr":"getAttribute",a=t[r]("transform")||"",i=a.replace(e,function(n,o,l){return[o,l].join(" ")}).split(" ");return{x:+i[0]||0,y:+i[1]||0}};Re.setTranslate=function(t,e,r){var a=/(\btranslate\(.*?\);?)/,i=t.attr?"attr":"getAttribute",n=t.attr?"attr":"setAttribute",o=t[i]("transform")||"";return e=e||0,r=r||0,o=o.replace(a,"").trim(),o+=Sl(e,r),o=o.trim(),t[n]("transform",o),o};Re.getScale=function(t){var e=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=t.attr?"attr":"getAttribute",a=t[r]("transform")||"",i=a.replace(e,function(n,o,l){return[o,l].join(" ")}).split(" ");return{x:+i[0]||1,y:+i[1]||1}};Re.setScale=function(t,e,r){var a=/(\bscale\(.*?\);?)/,i=t.attr?"attr":"getAttribute",n=t.attr?"attr":"setAttribute",o=t[i]("transform")||"";return e=e||1,r=r||1,o=o.replace(a,"").trim(),o+="scale("+e+","+r+")",o=o.trim(),t[n]("transform",o),o};var sC=/\s*sc.*/;Re.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,!!t){var a=e===1&&r===1?"":"scale("+e+","+r+")";t.each(function(){var i=(this.getAttribute("transform")||"").replace(sC,"");i+=a,i=i.trim(),this.setAttribute("transform",i)})}};var fC=/translate\([^)]*\)\s*$/;Re.setTextPointsScale=function(t,e,r){t&&t.each(function(){var a,i=hr.select(this),n=i.select("text");if(n.node()){var o=parseFloat(n.attr("x")||0),l=parseFloat(n.attr("y")||0),s=(i.attr("transform")||"").match(fC);e===1&&r===1?a=[]:a=[Sl(o,l),"scale("+e+","+r+")",Sl(-o,-l)],s&&a.push(s),i.attr("transform",a.join(""))}})};function Nh(t,e){var r;return t&&(r=t.mf),r===void 0&&(r=e.marker&&e.marker.standoff||0),!e._geo&&!e._xA?-r:r}Re.getMarkerStandoff=Nh;var Go=Math.atan2,qi=Math.cos,ro=Math.sin;function ry(t,e){var r=e[0],a=e[1];return[r*qi(t)-a*ro(t),r*ro(t)+a*qi(t)]}var ay,iy,ny,oy,yu,gu;function Hh(t,e){var r=t.ma;r===void 0&&(r=e.marker.angle||0);var a,i,n=e.marker.angleref;if(n==="previous"||n==="north"){if(e._geo){var o=e._geo.project(t.lonlat);a=o[0],i=o[1]}else{var l=e._xA,s=e._yA;if(l&&s)a=l.c2p(t.x),i=s.c2p(t.y);else return 90}if(e._geo){var f=t.lonlat[0],c=t.lonlat[1],v=e._geo.project([f,c+1e-5]),u=e._geo.project([f+1e-5,c]),h=Go(u[1]-i,u[0]-a),d=Go(v[1]-i,v[0]-a),p;if(n==="north")p=r/180*Math.PI;else if(n==="previous"){var y=f/180*Math.PI,m=c/180*Math.PI,g=ay/180*Math.PI,w=iy/180*Math.PI,b=g-y,x=qi(w)*ro(b),_=ro(w)*qi(m)-qi(w)*ro(m)*qi(b);p=-Go(x,_)-Math.PI,ay=f,iy=c}var T=ry(h,[qi(p),0]),k=ry(d,[ro(p),0]);r=Go(T[1]+k[1],T[0]+k[0])/Math.PI*180,n==="previous"&&!(gu===e.uid&&t.i===yu+1)&&(r=null)}if(n==="previous"&&!e._geo)if(gu===e.uid&&t.i===yu+1&&cn(a)&&cn(i)){var S=a-ny,M=i-oy,D=e.line&&e.line.shape||"",A=D.slice(D.length-1);A==="h"&&(M=0),A==="v"&&(S=0),r+=Go(M,S)/Math.PI*180+90}else r=null}return ny=a,oy=i,yu=t.i,gu=e.uid,r}Re.getMarkerAngle=Hh;var Et=b_.exports,_s=yt,cC=_t,ly=sr,sy=tt,Yn=de,fy=Yn.strTranslate,cy=Et,uy=ut,bu=wr,vy=Zl,uC=Yr.OPPOSITE_SIDE,dy=/ [XY][0-9]* /;function vC(t,e,r){var a=r.propContainer,i=r.propName,n=r.placeholder,o=r.traceIndex,l=r.avoid||{},s=r.attributes,f=r.transform,c=r.containerGroup,v=t._fullLayout,u=1,h=!1,d=a.title,p=(d&&d.text?d.text:"").trim(),y=d&&d.font?d.font:{},m=y.family,g=y.size,w=y.color,b;i==="title.text"?b="titleText":i.indexOf("axis")!==-1?b="axisTitleText":i.indexOf("colorbar"!==-1)&&(b="colorbarTitleText");var x=t._context.edits[b];p===""?u=0:p.replace(dy," % ")===n.replace(dy," % ")&&(u=.2,h=!0,x||(p="")),r._meta?p=Yn.templateString(p,r._meta):v._meta&&(p=Yn.templateString(p,v._meta));var _=p||x,T;c||(c=Yn.ensureSingle(v._infolayer,"g","g-"+e),T=v._hColorbarMoveTitle);var k=c.selectAll("text").data(_?[0]:[]);if(k.enter().append("text"),k.text(p).attr("class",e),k.exit().remove(),!_)return c;function S(C){Yn.syncOrAsync([M,D],C)}function M(C){var $;return!f&&T&&(f={}),f?($="",f.rotate&&($+="rotate("+[f.rotate,s.x,s.y]+")"),(f.offset||T)&&($+=fy(0,(f.offset||0)-(T||0)))):$=null,C.attr("transform",$),C.style({"font-family":m,"font-size":_s.round(g,2)+"px",fill:uy.rgb(w),opacity:u*uy.opacity(w),"font-weight":ly.fontWeight}).attr(s).call(bu.convertToTspans,t),ly.previousPromises(t)}function D(C){var $=_s.select(C.node().parentNode);if(l&&l.selection&&l.side&&p){$.attr("transform",null);var N=uC[l.side],E=l.side==="left"||l.side==="top"?-1:1,P=cC(l.pad)?l.pad:2,R=cy.bBox($.node()),L={left:0,top:0,right:v.width,bottom:v.height},z=l.maxShift||E*(L[l.side]-R[l.side]),I=0;if(z<0)I=z;else{var H=l.offsetLeft||0,V=l.offsetTop||0;R.left-=H,R.right-=H,R.top-=V,R.bottom-=V,l.selection.each(function(){var X=cy.bBox(this);Yn.bBoxIntersect(R,X,P)&&(I=Math.max(I,E*(X[l.side]-R[N])+P))}),I=Math.min(z,I),a._titleScoot=Math.abs(I)}if(I>0||z<0){var O={left:[-I,0],right:[I,0],top:[0,-I],bottom:[0,I]}[l.side];$.attr("transform",fy(O[0],O[1]))}}}k.call(S);function A(){u=0,h=!0,k.text(n).on("mouseover.opacity",function(){_s.select(this).transition().duration(vy.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){_s.select(this).transition().duration(vy.HIDE_PLACEHOLDER).style("opacity",0)})}return x&&(p?k.on(".opacity",null):A(),k.call(bu.makeEditable,{gd:t}).on("edit",function(C){o!==void 0?sy.call("_guiRestyle",t,i,C,o):sy.call("_guiRelayout",t,i,C)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(S)}).on("input",function(C){this.text(C||" ").call(bu.positionText,s.x,s.y)})),k.classed("js-placeholder",h),c}var wc={draw:vC},dC=yt,hC=Al.utcFormat,Gt=de,pC=Gt.numberFormat,Ea=_t,ui=Gt.cleanNumber,mC=Gt.ms2DateTime,hy=Gt.dateTime2ms,Ra=Gt.ensureNumber,py=Gt.isArrayOrTypedArray,$i=ir,ws=$i.FP_SAFE,ma=$i.BADNUM,yC=$i.LOG_CLIP,gC=$i.ONEWEEK,Ts=$i.ONEDAY,ks=$i.ONEHOUR,my=$i.ONEMIN,yy=$i.ONESEC,As=nr,Pf=Hr,Ms=Pf.HOUR_PATTERN,Ss=Pf.WEEKDAY_PATTERN;function Uo(t){return Math.pow(10,t)}function xu(t){return t!=null}var Oh=function(e,r){r=r||{};var a=e._id||"x",i=a.charAt(0);function n(b,x){if(b>0)return Math.log(b)/Math.LN10;if(b<=0&&x&&e.range&&e.range.length===2){var _=e.range[0],T=e.range[1];return .5*(_+T-2*yC*Math.abs(_-T))}else return ma}function o(b,x,_,T){if((T||{}).msUTC&&Ea(b))return+b;var k=hy(b,_||e.calendar);if(k===ma)if(Ea(b)){b=+b;var S=Math.floor(Gt.mod(b+.05,1)*10),M=Math.round(b-S/10);k=hy(new Date(M))+S/10}else return ma;return k}function l(b,x,_){return mC(b,x,_||e.calendar)}function s(b){return e._categories[Math.round(b)]}function f(b){if(xu(b)){if(e._categoriesMap===void 0&&(e._categoriesMap={}),e._categoriesMap[b]!==void 0)return e._categoriesMap[b];e._categories.push(typeof b=="number"?String(b):b);var x=e._categories.length-1;return e._categoriesMap[b]=x,x}return ma}function c(b,x){for(var _=new Array(x),T=0;T<x;T++){var k=(b[0]||[])[T],S=(b[1]||[])[T];_[T]=v([k,S])}return _}function v(b){if(e._categoriesMap)return e._categoriesMap[b]}function u(b){var x=v(b);if(x!==void 0)return x;if(Ea(b))return+b}function h(b){return Ea(b)?+b:v(b)}function d(b,x,_){return dC.round(_+x*b,2)}function p(b,x,_){return(b-_)/x}var y=function(x){return Ea(x)?d(x,e._m,e._b):ma},m=function(b){return p(b,e._m,e._b)};if(e.rangebreaks){var g=i==="y";y=function(b){if(!Ea(b))return ma;var x=e._rangebreaks.length;if(!x)return d(b,e._m,e._b);var _=g;e.range[0]>e.range[1]&&(_=!_);for(var T=_?-1:1,k=T*b,S=0,M=0;M<x;M++){var D=T*e._rangebreaks[M].min,A=T*e._rangebreaks[M].max;if(k<D)break;if(k>A)S=M+1;else{S=k<(D+A)/2?M:M+1;break}}var C=e._B[S]||0;return isFinite(C)?d(b,e._m2,C):0},m=function(b){var x=e._rangebreaks.length;if(!x)return p(b,e._m,e._b);for(var _=0,T=0;T<x&&!(b<e._rangebreaks[T].pmin);T++)b>e._rangebreaks[T].pmax&&(_=T+1);return p(b,e._m2,e._B[_])}}e.c2l=e.type==="log"?n:Ra,e.l2c=e.type==="log"?Uo:Ra,e.l2p=y,e.p2l=m,e.c2p=e.type==="log"?function(b,x){return y(n(b,x))}:y,e.p2c=e.type==="log"?function(b){return Uo(m(b))}:m,["linear","-"].indexOf(e.type)!==-1?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=ui,e.c2d=e.c2r=e.l2d=e.l2r=Ra,e.d2p=e.r2p=function(b){return e.l2p(ui(b))},e.p2d=e.p2r=m,e.cleanPos=Ra):e.type==="log"?(e.d2r=e.d2l=function(b,x){return n(ui(b),x)},e.r2d=e.r2c=function(b){return Uo(ui(b))},e.d2c=e.r2l=ui,e.c2d=e.l2r=Ra,e.c2r=n,e.l2d=Uo,e.d2p=function(b,x){return e.l2p(e.d2r(b,x))},e.p2d=function(b){return Uo(m(b))},e.r2p=function(b){return e.l2p(ui(b))},e.p2r=m,e.cleanPos=Ra):e.type==="date"?(e.d2r=e.r2d=Gt.identity,e.d2c=e.r2c=e.d2l=e.r2l=o,e.c2d=e.c2r=e.l2d=e.l2r=l,e.d2p=e.r2p=function(b,x,_){return e.l2p(o(b,0,_))},e.p2d=e.p2r=function(b,x,_){return l(m(b),x,_)},e.cleanPos=function(b){return Gt.cleanDate(b,ma,e.calendar)}):e.type==="category"?(e.d2c=e.d2l=f,e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=u,e.r2c=function(b){var x=h(b);return x!==void 0?x:e.fraction2r(.5)},e.l2r=e.c2r=Ra,e.r2l=h,e.d2p=function(b){return e.l2p(e.r2c(b))},e.p2d=function(b){return s(m(b))},e.r2p=e.d2p,e.p2r=m,e.cleanPos=function(b){return typeof b=="string"&&b!==""?b:Ra(b)}):e.type==="multicategory"&&(e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=u,e.r2c=function(b){var x=u(b);return x!==void 0?x:e.fraction2r(.5)},e.r2c_just_indices=v,e.l2r=e.c2r=Ra,e.r2l=u,e.d2p=function(b){return e.l2p(e.r2c(b))},e.p2d=function(b){return s(m(b))},e.r2p=e.d2p,e.p2r=m,e.cleanPos=function(b){return Array.isArray(b)||typeof b=="string"&&b!==""?b:Ra(b)},e.setupMultiCategory=function(b){var x=e._traceIndices,_,T,k=e._matchGroup;if(k&&e._categories.length===0){for(var S in k)if(S!==a){var M=r[As.id2name(S)];x=x.concat(M._traceIndices)}}var D=[[0,{}],[0,{}]],A=[];for(_=0;_<x.length;_++){var C=b[x[_]];if(i in C){var $=C[i],N=C._length||Gt.minRowLength($);if(py($[0])&&py($[1]))for(T=0;T<N;T++){var E=$[0][T],P=$[1][T];xu(E)&&xu(P)&&(A.push([E,P]),E in D[0][1]||(D[0][1][E]=D[0][0]++),P in D[1][1]||(D[1][1][P]=D[1][0]++))}}}for(A.sort(function(R,L){var z=D[0][1],I=z[R[0]]-z[L[0]];if(I)return I;var H=D[1][1];return H[R[1]]-H[L[1]]}),_=0;_<A.length;_++)f(A[_])}),e.fraction2r=function(b){var x=e.r2l(e.range[0]),_=e.r2l(e.range[1]);return e.l2r(x+b*(_-x))},e.r2fraction=function(b){var x=e.r2l(e.range[0]),_=e.r2l(e.range[1]);return(e.r2l(b)-x)/(_-x)},e.cleanRange=function(b,x){x||(x={}),b||(b="range");var _=Gt.nestedProperty(e,b).get(),T,k;if(e.type==="date"?k=Gt.dfltRange(e.calendar):i==="y"?k=Pf.DFLTRANGEY:e._name==="realaxis"?k=[0,1]:k=x.dfltRange||Pf.DFLTRANGEX,k=k.slice(),(e.rangemode==="tozero"||e.rangemode==="nonnegative")&&(k[0]=0),!_||_.length!==2){Gt.nestedProperty(e,b).set(k);return}for(e.type==="date"&&!e.autorange&&(_[0]=Gt.cleanDate(_[0],ma,e.calendar),_[1]=Gt.cleanDate(_[1],ma,e.calendar)),T=0;T<2;T++)if(e.type==="date"){if(!Gt.isDateTime(_[T],e.calendar)){e[b]=k;break}if(e.r2l(_[0])===e.r2l(_[1])){var S=Gt.constrain(e.r2l(_[0]),Gt.MIN_MS+1e3,Gt.MAX_MS-1e3);_[0]=e.l2r(S-1e3),_[1]=e.l2r(S+1e3);break}}else{if(!Ea(_[T]))if(Ea(_[1-T]))_[T]=_[1-T]*(T?10:.1);else{e[b]=k;break}if(_[T]<-ws?_[T]=-ws:_[T]>ws&&(_[T]=ws),_[0]===_[1]){var M=Math.max(1,Math.abs(_[0]*1e-6));_[0]-=M,_[1]+=M}}},e.setScale=function(b){var x=r._size;if(e.overlaying){var _=As.getFromId({_fullLayout:r},e.overlaying);e.domain=_.domain}var T=b&&e._r?"_r":"range",k=e.calendar;e.cleanRange(T);var S=e.r2l(e[T][0],k),M=e.r2l(e[T][1],k),D=i==="y";if(D?(e._offset=x.t+(1-e.domain[1])*x.h,e._length=x.h*(e.domain[1]-e.domain[0]),e._m=e._length/(S-M),e._b=-e._m*M):(e._offset=x.l+e.domain[0]*x.w,e._length=x.w*(e.domain[1]-e.domain[0]),e._m=e._length/(M-S),e._b=-e._m*S),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks){var A,C;if(e._rangebreaks=e.locateBreaks(Math.min(S,M),Math.max(S,M)),e._rangebreaks.length){for(A=0;A<e._rangebreaks.length;A++)C=e._rangebreaks[A],e._lBreaks+=Math.abs(C.max-C.min);var $=D;S>M&&($=!$),$&&e._rangebreaks.reverse();var N=$?-1:1;for(e._m2=N*e._length/(Math.abs(M-S)-e._lBreaks),e._B.push(-e._m2*(D?M:S)),A=0;A<e._rangebreaks.length;A++)C=e._rangebreaks[A],e._B.push(e._B[e._B.length-1]-N*e._m2*(C.max-C.min));for(A=0;A<e._rangebreaks.length;A++)C=e._rangebreaks[A],C.pmin=y(C.min),C.pmax=y(C.max)}}if(!isFinite(e._m)||!isFinite(e._b)||e._length<0)throw r._replotting=!1,new Error("Something went wrong with axis scaling")},e.maskBreaks=function(b){var x=e.rangebreaks||[],_,T,k,S,M;x._cachedPatterns||(x._cachedPatterns=x.map(function(z){return z.enabled&&z.bounds?Gt.simpleMap(z.bounds,z.pattern?ui:e.d2c):null})),x._cachedValues||(x._cachedValues=x.map(function(z){return z.enabled&&z.values?Gt.simpleMap(z.values,e.d2c).sort(Gt.sorterAsc):null}));for(var D=0;D<x.length;D++){var A=x[D];if(A.enabled){if(A.bounds){var C=A.pattern;switch(_=x._cachedPatterns[D],T=_[0],k=_[1],C){case Ss:M=new Date(b),S=M.getUTCDay(),T>k&&(k+=7,S<T&&(S+=7));break;case Ms:M=new Date(b);var $=M.getUTCHours(),N=M.getUTCMinutes(),E=M.getUTCSeconds(),P=M.getUTCMilliseconds();S=$+(N/60+E/3600+P/36e5),T>k&&(k+=24,S<T&&(S+=24));break;case"":S=b;break}if(S>=T&&S<k)return ma}else for(var R=x._cachedValues[D],L=0;L<R.length;L++)if(T=R[L],k=T+A.dvalue,b>=T&&b<k)return ma}}return b},e.locateBreaks=function(b,x){var _,T,k,S,M=[];if(!e.rangebreaks)return M;var D=e.rangebreaks.slice().sort(function(H,V){return H.pattern===Ss&&V.pattern===Ms?-1:V.pattern===Ss&&H.pattern===Ms?1:0}),A=function(H,V){if(H=Gt.constrain(H,b,x),V=Gt.constrain(V,b,x),H!==V){for(var O=!0,X=0;X<M.length;X++){var G=M[X];H<G.max&&V>=G.min&&(H<G.min&&(G.min=H),V>G.max&&(G.max=V),O=!1)}O&&M.push({min:H,max:V})}};for(_=0;_<D.length;_++){var C=D[_];if(C.enabled)if(C.bounds){var $=b,N=x;C.pattern&&($=Math.floor($)),T=Gt.simpleMap(C.bounds,C.pattern?ui:e.r2l),k=T[0],S=T[1];var E=new Date($),P,R;switch(C.pattern){case Ss:R=gC,P=((S<k?7:0)+(S-k))*Ts,$+=k*Ts-(E.getUTCDay()*Ts+E.getUTCHours()*ks+E.getUTCMinutes()*my+E.getUTCSeconds()*yy+E.getUTCMilliseconds());break;case Ms:R=Ts,P=((S<k?24:0)+(S-k))*ks,$+=k*ks-(E.getUTCHours()*ks+E.getUTCMinutes()*my+E.getUTCSeconds()*yy+E.getUTCMilliseconds());break;default:$=Math.min(T[0],T[1]),N=Math.max(T[0],T[1]),R=N-$,P=R}for(var L=$;L<N;L+=R)A(L,L+P)}else for(var z=Gt.simpleMap(C.values,e.d2c),I=0;I<z.length;I++)k=z[I],S=k+C.dvalue,A(k,S)}return M.sort(function(H,V){return H.min-V.min}),M},e.makeCalcdata=function(b,x,_){var T,k,S,M,D=e.type,A=D==="date"&&b[x+"calendar"];if(x in b){if(T=b[x],M=b._length||Gt.minRowLength(T),Gt.isTypedArray(T)&&(D==="linear"||D==="log")){if(M===T.length)return T;if(T.subarray)return T.subarray(0,M)}if(D==="multicategory")return c(T,M);for(k=new Array(M),S=0;S<M;S++)k[S]=e.d2c(T[S],0,A,_)}else{var C=x+"0"in b?e.d2c(b[x+"0"],0,A):0,$=b["d"+x]?Number(b["d"+x]):1;for(T=b[{x:"y",y:"x"}[x]],M=b._length||T.length,k=new Array(M),S=0;S<M;S++)k[S]=C+S*$}if(e.rangebreaks)for(S=0;S<M;S++)k[S]=e.maskBreaks(k[S]);return k},e.isValidRange=function(b){return Array.isArray(b)&&b.length===2&&Ea(e.r2l(b[0]))&&Ea(e.r2l(b[1]))},e.isPtWithinRange=function(b,x){var _=e.c2l(b[i],null,x),T=e.r2l(e.range[0]),k=e.r2l(e.range[1]);return T<k?T<=_&&_<=k:k<=_&&_<=T},e._emptyCategories=function(){e._categories=[],e._categoriesMap={}},e.clearCalc=function(){var b=e._matchGroup;if(b){var x=null,_=null;for(var T in b){var k=r[As.id2name(T)];if(k._categories){x=k._categories,_=k._categoriesMap;break}}x&&_?(e._categories=x,e._categoriesMap=_):e._emptyCategories()}else e._emptyCategories();if(e._initialCategories)for(var S=0;S<e._initialCategories.length;S++)f(e._initialCategories[S])},e.sortByInitialCategories=function(){var b=[];if(e._emptyCategories(),e._initialCategories)for(var x=0;x<e._initialCategories.length;x++)f(e._initialCategories[x]);b=b.concat(e._traceIndices);var _=e._matchGroup;for(var T in _)if(a!==T){var k=r[As.id2name(T)];k._categories=e._categories,k._categoriesMap=e._categoriesMap,b=b.concat(k._traceIndices)}return b};var w=r._d3locale;e.type==="date"&&(e._dateFormat=w?w.timeFormat:hC,e._extraFormat=r._extraFormat),e._separators=r.separators,e._numFormat=w?w.numberFormat:pC,delete e._minDtick,delete e._forceTick0},Z_=_t,Bh=de,bC=ir.BADNUM,Ef=Bh.isArrayOrTypedArray,xC=Bh.isDateTime,_C=Bh.cleanNumber,K_=Math.round,Q_=function(e,r,a){var i=e,n=a.noMultiCategory;if(Ef(i)&&!i.length)return"-";if(!n&&MC(i))return"multicategory";if(n&&Array.isArray(i[0])){for(var o=[],l=0;l<i.length;l++)if(Ef(i[l]))for(var s=0;s<i[l].length;s++)o.push(i[l][s]);i=o}if(kC(i,r))return"date";var f=a.autotypenumbers!=="strict";return AC(i,f)?"category":TC(i,f)?"linear":"-"};function wC(t,e){return e?Z_(t):typeof t=="number"}function TC(t,e){for(var r=t.length,a=0;a<r;a++)if(wC(t[a],e))return!0;return!1}function kC(t,e){for(var r=t.length,a=J_(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=K_(l),f=t[s],c=String(f);o[c]||(o[c]=1,xC(f,e)&&i++,Z_(f)&&n++)}return i>n*2}function J_(t){return Math.max(1,(t-1)/1e3)}function AC(t,e){for(var r=t.length,a=J_(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=K_(l),f=t[s],c=String(f);if(!o[c]){o[c]=1;var v=typeof f;v==="boolean"?n++:(e?_C(f)!==bC:v==="number")?i++:v==="string"&&n++}}return n>i*2}function MC(t){return Ef(t[0])&&Ef(t[1])}var SC=yt,ew=_t,nn=de,pf=ir.FP_SAFE,LC=tt,CC=Et,tw=nr,DC=tw.getFromId,$C=tw.isLinked,ts={getAutoRange:pd,makePadFn:md,doAutoRange:EC,findExtremes:RC,concatExtremes:jh};function pd(t,e){var r,a,i=[],n=t._fullLayout,o=md(n,e,0),l=md(n,e,1),s=jh(t,e),f=s.min,c=s.max;if(f.length===0||c.length===0)return nn.simpleMap(e.range,e.r2l);var v=f[0].val,u=c[0].val;for(r=1;r<f.length&&v===u;r++)v=Math.min(v,f[r].val);for(r=1;r<c.length&&v===u;r++)u=Math.max(u,c[r].val);var h=!1;if(e.range){var d=nn.simpleMap(e.range,e.r2l);h=d[1]<d[0]}e.autorange==="reversed"&&(h=!0,e.autorange=!0);var p=e.rangemode,y=p==="tozero",m=p==="nonnegative",g=e._length,w=g/10,b=0,x,_,T,k,S,M;for(r=0;r<f.length;r++)for(x=f[r],a=0;a<c.length;a++)_=c[a],M=_.val-x.val-gy(e,x.val,_.val),M>0&&(S=g-o(x)-l(_),S>w?M/S>b&&(T=x,k=_,b=M/S):M/g>b&&(T={val:x.val,nopad:1},k={val:_.val,nopad:1},b=M/g));function D(E,P){return Math.max(E,l(P))}if(v===u){var A=v-1,C=v+1;if(y)if(v===0)i=[0,1];else{var $=(v>0?c:f).reduce(D,0),N=v/(1-Math.min(.5,$/g));i=v>0?[0,N]:[N,0]}else m?i=[Math.max(0,A),Math.max(1,C)]:i=[A,C]}else y?(T.val>=0&&(T={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):m&&(T.val-b*o(T)<0&&(T={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),b=(k.val-T.val-gy(e,x.val,_.val))/(g-o(T)-l(k)),i=[T.val-b*o(T),k.val+b*l(k)];return h&&i.reverse(),nn.simpleMap(i,e.l2r||Number)}function gy(t,e,r){var a=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),n=0;n<i.length;n++){var o=i[n];a+=o.max-o.min}return a}function md(t,e,r){var a=.05*e._length,i=e._anchorAxis||{};if((e.ticklabelposition||"").indexOf("inside")!==-1||(i.ticklabelposition||"").indexOf("inside")!==-1){var n=e.autorange==="reversed";if(!n){var o=nn.simpleMap(e.range,e.r2l);n=o[1]<o[0]}n&&(r=!r)}var l=0;return $C(t,e._id)||(l=PC(t,e,r)),a=Math.max(l,a),e.constrain==="domain"&&e._inputDomain&&(a*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(f){return f.nopad?0:f.pad+(f.extrapad?a:l)}}var by=3;function PC(t,e,r){var a=0,i=e._id.charAt(0)==="x";for(var n in t._plots){var o=t._plots[n];if(!(e._id!==o.xaxis._id&&e._id!==o.yaxis._id)){var l=(i?o.yaxis:o.xaxis)||{};if((l.ticklabelposition||"").indexOf("inside")!==-1&&(!r&&(l.side==="left"||l.side==="bottom")||r&&(l.side==="top"||l.side==="right"))){if(l._vals){var s=nn.deg2rad(l._tickAngles[l._id+"tick"]||0),f=Math.abs(Math.cos(s)),c=Math.abs(Math.sin(s));if(!l._vals[0].bb){var v=l._id+"tick",u=l._selections[v];u.each(function(g){var w=SC.select(this),b=w.select(".text-math-group");b.empty()&&(g.bb=CC.bBox(w.node()))})}for(var h=0;h<l._vals.length;h++){var d=l._vals[h],p=d.bb;if(p){var y=2*by+p.width,m=2*by+p.height;a=Math.max(a,i?Math.max(y*f,m*c):Math.max(m*f,y*c))}}}l.ticks==="inside"&&l.ticklabelposition==="inside"&&(a+=l.ticklen||0)}}}return a}function jh(t,e,r){var a=e._id,i=t._fullData,n=t._fullLayout,o=[],l=[],s,f,c;function v(y,m){for(s=0;s<m.length;s++){var g=y[m[s]],w=(g._extremes||{})[a];if(g.visible===!0&&w){for(f=0;f<w.min.length;f++)c=w.min[f],yd(o,c.val,c.pad,{extrapad:c.extrapad});for(f=0;f<w.max.length;f++)c=w.max[f],gd(l,c.val,c.pad,{extrapad:c.extrapad})}}}if(v(i,e._traceIndices),v(n.annotations||[],e._annIndices||[]),v(n.shapes||[],e._shapeIndices||[]),e._matchGroup&&!r){for(var u in e._matchGroup)if(u!==e._id){var h=DC(t,u),d=jh(t,h,!0),p=e._length/h._length;for(f=0;f<d.min.length;f++)c=d.min[f],yd(o,c.val,c.pad*p,{extrapad:c.extrapad});for(f=0;f<d.max.length;f++)c=d.max[f],gd(l,c.val,c.pad*p,{extrapad:c.extrapad})}}return{min:o,max:l}}function EC(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():pd(t,e),e._r=e.range.slice(),e._rl=nn.simpleMap(e._r,e.r2l);var a=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,LC.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i),a.range=e.range.slice(),a.autorange=e.autorange}var n=e._anchorAxis;if(n&&n.rangeslider){var o=n.rangeslider[e._name];o&&o.rangemode==="auto"&&(o.range=pd(t,e)),n._input.rangeslider[e._name]=nn.extendFlat({},o)}}function RC(t,e,r){r||(r={}),t._m||t.setScale();var a=[],i=[],n=e.length,o=r.padded||!1,l=r.tozero&&(t.type==="linear"||t.type==="-"),s=t.type==="log",f=!1,c=r.vpadLinearized||!1,v,u,h,d,p,y,m,g,w;function b(A){if(Array.isArray(A))return f=!0,function($){return Math.max(Number(A[$]||0),0)};var C=Math.max(Number(A||0),0);return function(){return C}}var x=b((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),_=b((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),T=b(r.vpadplus||r.vpad),k=b(r.vpadminus||r.vpad);if(!f){if(g=1/0,w=-1/0,s)for(v=0;v<n;v++)u=e[v],u<g&&u>0&&(g=u),u>w&&u<pf&&(w=u);else for(v=0;v<n;v++)u=e[v],u<g&&u>-pf&&(g=u),u>w&&u<pf&&(w=u);e=[g,w],n=2}var S={tozero:l,extrapad:o};function M(A){h=e[A],ew(h)&&(y=x(A),m=_(A),c?(d=t.c2l(h)-k(A),p=t.c2l(h)+T(A)):(g=h-k(A),w=h+T(A),s&&g<w/10&&(g=w/10),d=t.c2l(g),p=t.c2l(w)),l&&(d=Math.min(0,d),p=Math.max(0,p)),xy(d)&&yd(a,d,m,S),xy(p)&&gd(i,p,y,S))}var D=Math.min(6,n);for(v=0;v<D;v++)M(v);for(v=n-1;v>=D;v--)M(v);return{min:a,max:i,opts:r}}function yd(t,e,r,a){rw(t,e,r,a,zC)}function gd(t,e,r,a){rw(t,e,r,a,IC)}function rw(t,e,r,a,i){for(var n=a.tozero,o=a.extrapad,l=!0,s=0;s<t.length&&l;s++){var f=t[s];if(i(f.val,e)&&f.pad>=r&&(f.extrapad||!o)){l=!1;break}else i(e,f.val)&&f.pad<=r&&(o||!f.extrapad)&&(t.splice(s,1),s--)}if(l){var c=n&&e===0;t.push({val:e,pad:c?0:r,extrapad:c?!1:o})}}function xy(t){return ew(t)&&Math.abs(t)<pf}function zC(t,e){return t<=e}function IC(t,e){return t>=e}var sa=yt,ar=_t,so=sr,Ll=tt,mt=de,po=mt.strTranslate,vl=wr,FC=wc,Cl=ut,Qr=Et,NC=ii,_y=xc,Er=ir,HC=Er.ONEMAXYEAR,Rf=Er.ONEAVGYEAR,bd=Er.ONEMINYEAR,OC=Er.ONEMAXQUARTER,xd=Er.ONEAVGQUARTER,_d=Er.ONEMINQUARTER,BC=Er.ONEMAXMONTH,mo=Er.ONEAVGMONTH,wd=Er.ONEMINMONTH,ua=Er.ONEWEEK,Nr=Er.ONEDAY,on=Nr/2,ti=Er.ONEHOUR,zf=Er.ONEMIN,Td=Er.ONESEC,ln=Er.MINUS_SIGN,Tc=Er.BADNUM,kd={K:"zeroline"},Ad={K:"gridline",L:"path"},Md={K:"minor-gridline",L:"path"},aw={K:"tick",L:"path"},wy={K:"tick",L:"text"},Ty={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},kc=Yr,Ls=kc.MID_SHIFT,sn=kc.CAP_SHIFT,If=kc.LINE_SPACING,jC=kc.OPPOSITE_SIDE,Sd=3,Le=g_.exports={};Le.setConvert=Oh;var GC=Q_,ni=nr,UC=ni.idSort,VC=ni.isLinked;Le.id2name=ni.id2name;Le.name2id=ni.name2id;Le.cleanId=ni.cleanId;Le.list=ni.list;Le.listIds=ni.listIds;Le.getFromId=ni.getFromId;Le.getFromTrace=ni.getFromTrace;var iw=ts;Le.getAutoRange=iw.getAutoRange;Le.findExtremes=iw.findExtremes;var WC=1e-4;function Gh(t){var e=(t[1]-t[0])*WC;return[t[0]-e,t[1]+e]}Le.coerceRef=function(t,e,r,a,i,n){var o=a.charAt(a.length-1),l=r._fullLayout._subplots[o+"axis"],s=a+"ref",f={};return i||(i=l[0]||(typeof n=="string"?n:n[0])),n||(n=i),l=l.concat(l.map(function(c){return c+" domain"})),f[s]={valType:"enumerated",values:l.concat(n?typeof n=="string"?[n]:n:[]),dflt:i},mt.coerce(t,e,f,s)};Le.getRefType=function(t){return t===void 0?t:t==="paper"?"paper":t==="pixel"?"pixel":/( domain)$/.test(t)?"domain":"range"};Le.coercePosition=function(t,e,r,a,i,n){var o,l,s=Le.getRefType(a);if(s!=="range")o=mt.ensureNumber,l=r(i,n);else{var f=Le.getFromId(e,a);n=f.fraction2r(n),l=r(i,n),o=f.cleanPos}t[i]=o(l)};Le.cleanPosition=function(t,e,r){var a=r==="paper"||r==="pixel"?mt.ensureNumber:Le.getFromId(e,r).cleanPos;return a(t)};Le.redrawComponents=function(t,e){e=e||Le.listIds(t);var r=t._fullLayout;function a(i,n,o,l){for(var s=Ll.getComponentMethod(i,n),f={},c=0;c<e.length;c++)for(var v=r[Le.id2name(e[c])],u=v[o],h=0;h<u.length;h++){var d=u[h];if(!f[d]&&(s(t,d),f[d]=1,l))return}}a("annotations","drawOne","_annIndices"),a("shapes","drawOne","_shapeIndices"),a("images","draw","_imgIndices",!0),a("selections","drawOne","_selectionIndices")};var XC=Le.getDataConversions=function(t,e,r,a){var i,n=r==="x"||r==="y"||r==="z"?r:a;if(Array.isArray(n)){if(i={type:GC(a,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},Le.setConvert(i),i.type==="category")for(var o=0;o<a.length;o++)i.d2c(a[o])}else i=Le.getFromTrace(t,e,n);return i?{d2c:i.d2c,c2d:i.c2d}:n==="ids"?{d2c:Ay,c2d:Ay}:{d2c:ky,c2d:ky}};function ky(t){return+t}function Ay(t){return String(t)}Le.getDataToCoordFunc=function(t,e,r,a){return XC(t,e,r,a).d2c};Le.counterLetter=function(t){var e=t.charAt(0);if(e==="x")return"y";if(e==="y")return"x"};Le.minDtick=function(t,e,r,a){["log","category","multicategory"].indexOf(t.type)!==-1||!a?t._minDtick=0:t._minDtick===void 0?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0))};Le.saveRangeInitial=function(t,e){for(var r=Le.list(t,"",!0),a=!1,i=0;i<r.length;i++){var n=r[i],o=n._rangeInitial===void 0,l=o||!(n.range[0]===n._rangeInitial[0]&&n.range[1]===n._rangeInitial[1]);(o&&n.autorange===!1||e&&l)&&(n._rangeInitial=n.range.slice(),a=!0)}return a};Le.saveShowSpikeInitial=function(t,e){for(var r=Le.list(t,"",!0),a=!1,i="on",n=0;n<r.length;n++){var o=r[n],l=o._showSpikeInitial===void 0,s=l||o.showspikes!==o._showspikes;(l||e&&s)&&(o._showSpikeInitial=o.showspikes,a=!0),i==="on"&&!o.showspikes&&(i="off")}return t._fullLayout._cartesianSpikesEnabled=i,a};Le.autoBin=function(t,e,r,a,i,n){var o=mt.aggNums(Math.min,null,t),l=mt.aggNums(Math.max,null,t);if(e.type==="category"||e.type==="multicategory")return{start:o-.5,end:l+.5,size:Math.max(1,Math.round(n)||1),_dataSpan:l-o};i||(i=e.calendar);var s;if(e.type==="log"?s={type:"linear",range:[o,l]}:s={type:e.type,range:mt.simpleMap([o,l],e.c2r,0,i),calendar:i},Le.setConvert(s),n=n&&_y.dtick(n,s.type),n)s.dtick=n,s.tick0=_y.tick0(void 0,s.type,i);else{var f;if(r)f=(l-o)/r;else{var c=mt.distinctVals(t),v=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),u=v*mt.roundUp(c.minDiff/v,[.9,1.9,4.9,9.9],!0);f=Math.max(u,2*mt.stdev(t)/Math.pow(t.length,a?.25:.4)),ar(f)||(f=1)}Le.autoTicks(s,f)}var h=s.dtick,d=Le.tickIncrement(Le.tickFirst(s),h,"reverse",i),p,y;if(typeof h=="number")d=YC(d,t,s,o,l),y=1+Math.floor((l-d)/h),p=d+y*h;else for(s.dtick.charAt(0)==="M"&&(d=qC(d,t,h,o,i)),p=d,y=0;p<=l;)p=Le.tickIncrement(p,h,!1,i),y++;return{start:e.c2r(d,0,i),end:e.c2r(p,0,i),size:h,_dataSpan:l-o}};function YC(t,e,r,a,i){var n=0,o=0,l=0,s=0;function f(h){return(1+(h-t)*100/r.dtick)%100<2}for(var c=0;c<e.length;c++)e[c]%1===0?l++:ar(e[c])||s++,f(e[c])&&n++,f(e[c]+r.dtick/2)&&o++;var v=e.length-s;if(l===v&&r.type!=="date")r.dtick<1?t=a-.5*r.dtick:(t-=.5,t+r.dtick<a&&(t+=r.dtick));else if(o<v*.1&&(n>v*.3||f(a)||f(i))){var u=r.dtick/2;t+=t+u<a?u:-u}return t}function qC(t,e,r,a,i){var n=mt.findExactDates(e,i),o=.8;if(n.exactDays>o){var l=Number(r.substr(1));n.exactYears>o&&l%12===0?t=Le.tickIncrement(t,"M6","reverse")+Nr*1.5:n.exactMonths>o?t=Le.tickIncrement(t,"M1","reverse")+Nr*15.5:t-=on;var s=Le.tickIncrement(t,r);if(s<=a)return s}return t}Le.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var a=e.dtick&&ar(e._tmin),i;if(a){var n=Le.tickIncrement(e._tmin,e.dtick,!0);i=[e._tmin,n*.99+e._tmin*.01]}else{var o=mt.simpleMap(e.range,e.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(t.range=mt.simpleMap(i,e.l2r),t._isMinor=!0,Le.prepTicks(t,r),a){var l=ar(e.dtick),s=ar(t.dtick),f=l?e.dtick:+e.dtick.substring(1),c=s?t.dtick:+t.dtick.substring(1);l&&s?_u(f,c)?f===2*ua&&c===2*Nr&&(t.dtick=ua):f===2*ua&&c===3*Nr?t.dtick=ua:f===ua&&!(e._input.minor||{}).nticks?t.dtick=Nr:My(f/c,2.5)?t.dtick=f/2:t.dtick=f:String(e.dtick).charAt(0)==="M"?s?t.dtick="M1":_u(f,c)?f>=12&&c===2&&(t.dtick="M3"):t.dtick=e.dtick:String(t.dtick).charAt(0)==="L"?String(e.dtick).charAt(0)==="L"?_u(f,c)||(t.dtick=My(f/c,2.5)?e.dtick/2:e.dtick):t.dtick="D1":t.dtick==="D2"&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}e.minor._tick0Init===void 0&&(t.tick0=e.tick0)};function _u(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function My(t,e){return Math.abs(t/e-1)<.001}Le.prepTicks=function(t,e){var r=mt.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t.tickmode==="auto"||!t.dtick){var a=t.nticks,i;a||(t.type==="category"||t.type==="multicategory"?(i=t.tickfont?mt.bigFont(t.tickfont.size||12):15,a=t._length/i):(i=t._id.charAt(0)==="y"?40:80,a=mt.constrain(t._length/i,4,9)+1),t._name==="radialaxis"&&(a*=2)),t.minor&&t.minor.tickmode!=="array"||t.tickmode==="array"&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,Le.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<t._minDtick*2&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.ticklabelmode==="period"&&ZC(t),t.tick0||(t.tick0=t.type==="date"?"2000-01-01":0),t.type==="date"&&t.dtick<.1&&(t.dtick=.1),sw(t)};function wu(t){return+t.substring(1)}function ZC(t){var e;function r(){return!(ar(t.dtick)||t.dtick.charAt(0)!=="M")}var a=r(),i=Le.getTickFormat(t);if(i){var n=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(e=ti,n&&!a&&t.dtick<ti&&(t.dtick=ti)):/%p/.test(i)?(e=on,n&&!a&&t.dtick<on&&(t.dtick=on)):/%[Aadejuwx]/.test(i)?(e=Nr,n&&!a&&t.dtick<Nr&&(t.dtick=Nr)):/%[UVW]/.test(i)?(e=ua,n&&!a&&t.dtick<ua&&(t.dtick=ua)):/%[Bbm]/.test(i)?(e=mo,n&&(a?wu(t.dtick)<1:t.dtick<wd)&&(t.dtick="M1")):/%[q]/.test(i)?(e=xd,n&&(a?wu(t.dtick)<3:t.dtick<_d)&&(t.dtick="M3")):/%[Yy]/.test(i)&&(e=Rf,n&&(a?wu(t.dtick)<12:t.dtick<bd)&&(t.dtick="M12")))}a=r(),a&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}function KC(t,e,r){for(var a=0;a<t.length;a++){var i=t[a].value,n=a,o=a+1;a<t.length-1?(n=a,o=a+1):a>0?(n=a-1,o=a):(n=a,o=a);var l=t[n].value,s=t[o].value,f=Math.abs(s-l),c=r||f,v=0;c>=bd?f>=bd&&f<=HC?v=f:v=Rf:r===xd&&c>=_d?f>=_d&&f<=OC?v=f:v=xd:c>=wd?f>=wd&&f<=BC?v=f:v=mo:r===ua&&c>=ua?v=ua:c>=Nr?v=Nr:r===on&&c>=on?v=on:r===ti&&c>=ti&&(v=ti);var u;v>=f&&(v=f,u=!0);var h=i+v;if(e.rangebreaks&&v>0){for(var d=84,p=0,y=0;y<d;y++){var m=(y+.5)/d;e.maskBreaks(i*(1-m)+m*h)!==Tc&&p++}v*=p/d,v||(t[a].drop=!0),u&&f>ua&&(v=f)}(v>0||a===0)&&(t[a].periodX=i+v/2)}}Le.calcTicks=function(e,r){for(var a=e.type,i=e.calendar,n=e.ticklabelstep,o=e.ticklabelmode==="period",l=mt.simpleMap(e.range,e.r2l,void 0,void 0,r),s=l[1]<l[0],f=Math.min(l[0],l[1]),c=Math.max(l[0],l[1]),v=Math.max(1e3,e._length||0),u=[],h=[],d=[],p=[],y=e.minor&&(e.minor.ticks||e.minor.showgrid),m=1;m>=(y?0:1);m--){var g=!m;m?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var w=m?e:mt.extendFlat({},e,e.minor);if(g?Le.prepMinorTicks(w,e,r):Le.prepTicks(w,r),w.tickmode==="array"){m?(d=[],u=Sy(e)):(p=[],h=Sy(e));continue}if(w.tickmode==="sync"){d=[],u=QC(e);continue}var b=Gh(l),x=b[0],_=b[1],T=ar(w.dtick),k=a==="log"&&!(T||w.dtick.charAt(0)==="L"),S=Le.tickFirst(w,r);if(m){if(e._tmin=S,S<x!==s)break;(a==="category"||a==="multicategory")&&(_=s?Math.max(-.5,_):Math.min(e._categories.length-.5,_))}var M=null,D=S,A;if(m){var C;T?C=e.dtick:a==="date"?typeof e.dtick=="string"&&e.dtick.charAt(0)==="M"&&(C=mo*e.dtick.substring(1)):C=e._roughDTick,A=Math.round((e.r2l(D)-e.r2l(e.tick0))/C)-1}var $=w.dtick;for(w.rangebreaks&&w._tick0Init!==w.tick0&&(D=Tu(D,e),s||(D=Le.tickIncrement(D,$,!s,i))),m&&o&&(D=Le.tickIncrement(D,$,!s,i),A--);s?D>=_:D<=_;D=Le.tickIncrement(D,$,s,i)){if(m&&A++,w.rangebreaks&&!s){if(D<x)continue;if(w.maskBreaks(D)===Tc&&Tu(D,w)>=c)break}if(d.length>v||D===M)break;M=D;var N={value:D};m?(k&&D!==(D|0)&&(N.simpleLabel=!0),n>1&&A%n&&(N.skipLabel=!0),d.push(N)):(N.minor=!0,p.push(N))}}if(y){var E=e.minor.ticks==="inside"&&e.ticks==="outside"||e.minor.ticks==="outside"&&e.ticks==="inside";if(!E){for(var P=d.map(function(U){return U.value}),R=[],L=0;L<p.length;L++){var z=p[L],I=z.value;if(P.indexOf(I)===-1){for(var H=!1,V=0;!H&&V<d.length;V++)1e7+d[V].value===1e7+I&&(H=!0);H||R.push(z)}}p=R}}o&&KC(d,e,e._definedDelta);var O;if(e.rangebreaks){var X=e._id.charAt(0)==="y",G=1;e.tickmode==="auto"&&(G=e.tickfont?e.tickfont.size:12);var Y=NaN;for(O=d.length-1;O>-1;O--){if(d[O].drop){d.splice(O,1);continue}d[O].value=Tu(d[O].value,e);var K=e.c2p(d[O].value);(X?Y>K-G:Y<K+G)?d.splice(s?O+1:O,1):Y=K}}Xh(e)&&Math.abs(l[1]-l[0])===360&&d.pop(),e._tmax=(d[d.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var Z,q=function(U){U.text="",e._prevDateHead=Z};d=d.concat(p);var ie,fe;for(O=0;O<d.length;O++){var be=d[O].minor,ne=d[O].value;be?h.push({x:ne,minor:!0}):(Z=e._prevDateHead,ie=Le.tickText(e,ne,!1,d[O].simpleLabel),fe=d[O].periodX,fe!==void 0&&(ie.periodX=fe,(fe>c||fe<f)&&(fe>c&&(ie.periodX=c),fe<f&&(ie.periodX=f),q(ie))),d[O].skipLabel&&q(ie),u.push(ie))}return u=u.concat(h),e._inCalcTicks=!1,o&&u.length&&(u[0].noTick=!0),u};function nw(t,e){return t.rangebreaks&&(e=e.filter(function(r){return t.maskBreaks(r.x)!==Tc})),e}function QC(t){var e=t._mainAxis,r=[];if(e._vals){for(var a=0;a<e._vals.length;a++)if(!e._vals[a].noTick){var i=e.l2p(e._vals[a].x),n=t.p2l(i),o=Le.tickText(t,n);e._vals[a].minor&&(o.minor=!0,o.text=""),r.push(o)}}return r=nw(t,r),r}function Sy(t){var e=mt.simpleMap(t.range,t.r2l),r=Gh(e),a=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),n=t.type==="category"?t.d2l_noadd:t.d2l;t.type==="log"&&String(t.dtick).charAt(0)!=="L"&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var o=[],l=0;l<=1;l++)if(!(l&&!t.minor)){var s=l?t.minor.tickvals:t.tickvals,f=l?[]:t.ticktext;if(s){Array.isArray(f)||(f=[]);for(var c=0;c<s.length;c++){var v=n(s[c]);if(v>a&&v<i){var u=f[c]===void 0?Le.tickText(t,v):Uh(t,v,String(f[c]));l&&(u.minor=!0,u.text=""),o.push(u)}}}}return o=nw(t,o),o}var Cs=[2,5,10],Ly=[1,2,3,6,12],Cy=[1,2,5,10,15,30],JC=[1,2,3,7,14],ow=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],lw=[-.301,0,.301,.699,1],eD=[15,30,45,90,180];function za(t,e,r){return e*mt.roundUp(t/e,r)}Le.autoTicks=function(t,e,r){var a;function i(v){return Math.pow(v,Math.floor(Math.log(e)/Math.LN10))}if(t.type==="date"){t.tick0=mt.dateTick0(t.calendar,0);var n=2*e;if(n>Rf)e/=Rf,a=i(10),t.dtick="M"+12*za(e,a,Cs);else if(n>mo)e/=mo,t.dtick="M"+za(e,1,Ly);else if(n>Nr){if(t.dtick=za(e,Nr,t._hasDayOfWeekBreaks?[1,2,7,14]:JC),!r){var o=Le.getTickFormat(t),l=t.ticklabelmode==="period";l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=mt.dateTick0(t.calendar,2):t.tick0=mt.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}}else n>ti?t.dtick=za(e,ti,Ly):n>zf?t.dtick=za(e,zf,Cy):n>Td?t.dtick=za(e,Td,Cy):(a=i(10),t.dtick=za(e,a,Cs))}else if(t.type==="log"){t.tick0=0;var s=mt.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(s[1]-s[0])<1){var f=1.5*Math.abs((s[1]-s[0])/e);e=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/f,a=i(10),t.dtick="L"+za(e,a,Cs)}else t.dtick=e>.3?"D2":"D1"}else t.type==="category"||t.type==="multicategory"?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):Xh(t)?(t.tick0=0,a=1,t.dtick=za(e,a,eD)):(t.tick0=0,a=i(10),t.dtick=za(e,a,Cs));if(t.dtick===0&&(t.dtick=1),!ar(t.dtick)&&typeof t.dtick!="string"){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}};function sw(t){var e=t.dtick;if(t._tickexponent=0,!ar(e)&&typeof e!="string"&&(e=1),(t.type==="category"||t.type==="multicategory")&&(t._tickround=null),t.type==="date"){var r=t.r2l(t.tick0),a=t.l2r(r).replace(/(^-|i)/g,""),i=a.length;if(String(e).charAt(0)==="M")i>10||a.substr(5)!=="01-01"?t._tickround="d":t._tickround=+e.substr(1)%12===0?"y":"m";else if(e>=Nr&&i<=10||e>=Nr*15)t._tickround="d";else if(e>=zf&&i<=16||e>=ti)t._tickround="M";else if(e>=Td&&i<=19||e>=zf)t._tickround="S";else{var n=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,n)-20,t._tickround<0&&(t._tickround=4)}}else if(ar(e)||e.charAt(0)==="L"){var o=t.range.map(t.r2d||Number);ar(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(o[0]),Math.abs(o[1])),s=Math.floor(Math.log(l)/Math.LN10+.01),f=t.minexponent===void 0?3:t.minexponent;Math.abs(s)>f&&(Ff(t.exponentformat)&&!Vh(s)?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}Le.tickIncrement=function(t,e,r,a){var i=r?-1:1;if(ar(e))return mt.increment(t,i*e);var n=e.charAt(0),o=i*Number(e.substr(1));if(n==="M")return mt.incrementMonth(t,o,a);if(n==="L")return Math.log(Math.pow(10,t)+o)/Math.LN10;if(n==="D"){var l=e==="D2"?lw:ow,s=t+i*.01,f=mt.roundUp(mt.mod(s,1),l,r);return Math.floor(s)+Math.log(sa.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)};Le.tickFirst=function(t,e){var r=t.r2l||Number,a=mt.simpleMap(t.range,r,void 0,void 0,e),i=a[1]<a[0],n=i?Math.floor:Math.ceil,o=Gh(a)[0],l=t.dtick,s=r(t.tick0);if(ar(l)){var f=n((o-s)/l)*l+s;return(t.type==="category"||t.type==="multicategory")&&(f=mt.constrain(f,0,t._categories.length-1)),f}var c=l.charAt(0),v=Number(l.substr(1));if(c==="M"){for(var u=0,h=s,d,p,y;u<10;){if(d=Le.tickIncrement(h,l,i,t.calendar),(d-o)*(h-o)<=0)return i?Math.min(h,d):Math.max(h,d);p=(o-(h+d)/2)/(d-h),y=c+(Math.abs(Math.round(p))||1)*v,h=Le.tickIncrement(h,y,p<0?!i:i,t.calendar),u++}return mt.error("tickFirst did not converge",t),h}else{if(c==="L")return Math.log(n((Math.pow(10,o)-s)/v)*v+s)/Math.LN10;if(c==="D"){var m=l==="D2"?lw:ow,g=mt.roundUp(mt.mod(o,1),m,i);return Math.floor(o)+Math.log(sa.round(Math.pow(10,g),1))/Math.LN10}else throw"unrecognized dtick "+String(l)}};Le.tickText=function(t,e,r,a){var i=Uh(t,e),n=t.tickmode==="array",o=r||n,l=t.type,s=l==="category"?t.d2l_noadd:t.d2l,f;if(n&&Array.isArray(t.ticktext)){var c=mt.simpleMap(t.range,t.r2l),v=(Math.abs(c[1]-c[0])-(t._lBreaks||0))/1e4;for(f=0;f<t.ticktext.length&&!(Math.abs(e-s(t.tickvals[f]))<v);f++);if(f<t.ticktext.length)return i.text=String(t.ticktext[f]),i}function u(p){if(p===void 0)return!0;if(r)return p==="none";var y={first:t._tmin,last:t._tmax}[p];return p!=="all"&&e!==y}var h=r?"never":t.exponentformat!=="none"&&u(t.showexponent)?"hide":"";if(l==="date"?tD(t,i,r,o):l==="log"?rD(t,i,r,o,h):l==="category"?aD(t,i):l==="multicategory"?iD(t,i,r):Xh(t)?oD(t,i,r,o,h):nD(t,i,r,o,h),a||(t.tickprefix&&!u(t.showtickprefix)&&(i.text=t.tickprefix+i.text),t.ticksuffix&&!u(t.showticksuffix)&&(i.text+=t.ticksuffix)),t.tickson==="boundaries"||t.showdividers){var d=function(p){var y=t.l2p(p);return y>=0&&y<=t._length?p:null};i.xbnd=[d(i.x-.5),d(i.x+t.dtick-.5)]}return i};Le.hoverLabelText=function(t,e,r){r&&(t=mt.extendFlat({},t,{hoverformat:r}));var a=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(i!==void 0&&i!==a)return Le.hoverLabelText(t,a,r)+" - "+Le.hoverLabelText(t,i,r);var n=t.type==="log"&&a<=0,o=Le.tickText(t,t.c2l(n?-a:a),"hover").text;return n?a===0?"0":ln+o:o};function Uh(t,e,r){var a=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:a.size,font:a.family,fontColor:a.color}}function tD(t,e,r,a){var i=t._tickround,n=r&&t.hoverformat||Le.getTickFormat(t);a&&(ar(i)?i=4:i={y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o=mt.formatDate(e.x,n,i,t._dateFormat,t.calendar,t._extraFormat),l,s=o.indexOf(`
|
|
4
|
+
`);if(s!==-1&&(l=o.substr(s+1),o=o.substr(0,s)),a&&(o==="00:00:00"||o==="00:00"?(o=l,l=""):o.length===8&&(o=o.replace(/:00$/,""))),l)if(r)i==="d"?o+=", "+l:o=l+(o?", "+o:"");else if(!t._inCalcTicks||t._prevDateHead!==l)t._prevDateHead=l,o+="<br>"+l;else{var f=$l(t),c=t._trueSide||t.side;(!f&&c==="top"||f&&c==="bottom")&&(o+="<br> ")}e.text=o}function rD(t,e,r,a,i){var n=t.dtick,o=e.x,l=t.tickformat,s=typeof n=="string"&&n.charAt(0);if(i==="never"&&(i=""),a&&s!=="L"&&(n="L3",s="L"),l||s==="L")e.text=Dl(Math.pow(10,o),t,i,a);else if(ar(n)||s==="D"&&mt.mod(o+.01,1)<.1){var f=Math.round(o),c=Math.abs(f),v=t.exponentformat;v==="power"||Ff(v)&&Vh(f)?(f===0?e.text=1:f===1?e.text="10":e.text="10<sup>"+(f>1?"":ln)+c+"</sup>",e.fontSize*=1.25):(v==="e"||v==="E")&&c>2?e.text="1"+v+(f>0?"+":ln)+c:(e.text=Dl(Math.pow(10,o),t,"","fakehover"),n==="D1"&&t._id.charAt(0)==="y"&&(e.dy-=e.fontSize/6))}else if(s==="D")e.text=String(Math.round(Math.pow(10,mt.mod(o,1)))),e.fontSize*=.75;else throw"unrecognized dtick "+String(n);if(t.dtick==="D1"){var u=String(e.text).charAt(0);(u==="0"||u==="1")&&(t._id.charAt(0)==="y"?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(o<0?.5:.25)))}}function aD(t,e){var r=t._categories[Math.round(e.x)];r===void 0&&(r=""),e.text=String(r)}function iD(t,e,r){var a=Math.round(e.x),i=t._categories[a]||[],n=i[1]===void 0?"":String(i[1]),o=i[0]===void 0?"":String(i[0]);r?e.text=o+" - "+n:(e.text=n,e.text2=o)}function nD(t,e,r,a,i){i==="never"?i="":t.showexponent==="all"&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=Dl(e.x,t,i,a)}function oD(t,e,r,a,i){if(t.thetaunit==="radians"&&!r){var n=e.x/180;if(n===0)e.text="0";else{var o=lD(n);if(o[1]>=100)e.text=Dl(mt.deg2rad(e.x),t,i,a);else{var l=e.x<0;o[1]===1?o[0]===1?e.text="π":e.text=o[0]+"π":e.text=["<sup>",o[0],"</sup>","⁄","<sub>",o[1],"</sub>","π"].join(""),l&&(e.text=ln+e.text)}}}else e.text=Dl(e.x,t,i,a)}function lD(t){function e(l,s){return Math.abs(l-s)<=1e-6}function r(l,s){return e(s,0)?l:r(s,l%s)}function a(l){for(var s=1;!e(Math.round(l*s)/s,l);)s*=10;return s}var i=a(t),n=t*i,o=Math.abs(r(n,i));return[Math.round(n/o),Math.round(i/o)]}var sD=["f","p","n","μ","m","","k","M","G","T"];function Ff(t){return t==="SI"||t==="B"}function Vh(t){return t>14||t<-15}function Dl(t,e,r,a){var i=t<0,n=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,s=Le.getTickFormat(e),f=e.separatethousands;if(a){var c={exponentformat:o,minexponent:e.minexponent,dtick:e.showexponent==="none"?e.dtick:ar(t)&&Math.abs(t)||1,range:e.showexponent==="none"?e.range.map(e.r2d):[0,t||1]};sw(c),n=(Number(c._tickround)||0)+4,l=c._tickexponent,e.hoverformat&&(s=e.hoverformat)}if(s)return e._numFormat(s)(t).replace(/-/g,ln);var v=Math.pow(10,-n)/2;if(o==="none"&&(l=0),t=Math.abs(t),t<v)t="0",i=!1;else{if(t+=v,l&&(t*=Math.pow(10,-l),n+=l),n===0)t=String(Math.floor(t));else if(n<0){t=String(Math.round(t)),t=t.substr(0,t.length+n);for(var u=n;u<0;u++)t+="0"}else{t=String(t);var h=t.indexOf(".")+1;h&&(t=t.substr(0,h+n).replace(/\.?0+$/,""))}t=mt.numSeparate(t,e._separators,f)}if(l&&o!=="hide"){Ff(o)&&Vh(l)&&(o="power");var d;l<0?d=ln+-l:o!=="power"?d="+"+l:d=String(l),o==="e"||o==="E"?t+=o+d:o==="power"?t+="×10<sup>"+d+"</sup>":o==="B"&&l===9?t+="B":Ff(o)&&(t+=sD[l/3+5])}return i?ln+t:t}Le.getTickFormat=function(t){var e;function r(s){return typeof s!="string"?s:Number(s.replace("M",""))*mo}function a(s,f){var c=["L","D"];if(typeof s==typeof f){if(typeof s=="number")return s-f;var v=c.indexOf(s.charAt(0)),u=c.indexOf(f.charAt(0));return v===u?Number(s.replace(/(L|D)/g,""))-Number(f.replace(/(L|D)/g,"")):v-u}else return typeof s=="number"?1:-1}function i(s,f,c){var v=c||function(d){return d},u=f[0],h=f[1];return(!u&&typeof u!="number"||v(u)<=v(s))&&(!h&&typeof h!="number"||v(h)>=v(s))}function n(s,f){var c=f[0]===null,v=f[1]===null,u=a(s,f[0])>=0,h=a(s,f[1])<=0;return(c||u)&&(v||h)}var o,l;if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":{for(e=0;e<t.tickformatstops.length;e++)if(l=t.tickformatstops[e],l.enabled&&i(t.dtick,l.dtickrange,r)){o=l;break}break}case"log":{for(e=0;e<t.tickformatstops.length;e++)if(l=t.tickformatstops[e],l.enabled&&n(t.dtick,l.dtickrange)){o=l;break}break}}return o?o.value:t.tickformat};Le.getSubplots=function(t,e){var r=t._fullLayout._subplots,a=r.cartesian.concat(r.gl2d||[]),i=e?Le.findSubplotsWithAxis(a,e):a;return i.sort(function(n,o){var l=n.substr(1).split("y"),s=o.substr(1).split("y");return l[0]===s[0]?+l[1]-+s[1]:+l[0]-+s[0]}),i};Le.findSubplotsWithAxis=function(t,e){for(var r=new RegExp(e._id.charAt(0)==="x"?"^"+e._id+"y":e._id+"$"),a=[],i=0;i<t.length;i++){var n=t[i];r.test(n)&&a.push(n)}return a};Le.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r={_offset:0,_length:e.width,_id:""},a={_offset:0,_length:e.height,_id:""},i=Le.list(t,"x",!0),n=Le.list(t,"y",!0),o=[],l,s;for(l=0;l<i.length;l++)for(o.push({x:i[l],y:a}),s=0;s<n.length;s++)l===0&&o.push({x:r,y:n[s]}),o.push({x:i[l],y:n[s]});var f=e._clips.selectAll(".axesclip").data(o,function(c){return c.x._id+c.y._id});f.enter().append("clipPath").classed("axesclip",!0).attr("id",function(c){return"clip"+e._uid+c.x._id+c.y._id}).append("rect"),f.exit().remove(),f.each(function(c){sa.select(this).select("rect").attr({x:c.x._offset||0,y:c.y._offset||0,width:c.x._length||1,height:c.y._length||1})})}};Le.draw=function(t,e,r){var a=t._fullLayout;e==="redraw"&&a._paper.selectAll("g.subplot").each(function(s){var f=s[0],c=a._plots[f];if(c){var v=c.xaxis,u=c.yaxis;c.xaxislayer.selectAll("."+v._id+"tick").remove(),c.yaxislayer.selectAll("."+u._id+"tick").remove(),c.xaxislayer.selectAll("."+v._id+"tick2").remove(),c.yaxislayer.selectAll("."+u._id+"tick2").remove(),c.xaxislayer.selectAll("."+v._id+"divider").remove(),c.yaxislayer.selectAll("."+u._id+"divider").remove(),c.minorGridlayer&&c.minorGridlayer.selectAll("path").remove(),c.gridlayer&&c.gridlayer.selectAll("path").remove(),c.zerolinelayer&&c.zerolinelayer.selectAll("path").remove(),a._infolayer.select(".g-"+v._id+"title").remove(),a._infolayer.select(".g-"+u._id+"title").remove()}});var i=!e||e==="redraw"?Le.listIds(t):e,n=Le.list(t),o=n.filter(function(s){return s.autoshift}).map(function(s){return s.overlaying});i.map(function(s){var f=Le.getFromId(t,s);if(f.tickmode==="sync"&&f.overlaying){var c=i.findIndex(function(v){return v===f.overlaying});c>=0&&i.unshift(i.splice(c,1).shift())}});var l={false:{left:0,right:0}};return mt.syncOrAsync(i.map(function(s){return function(){if(s){var f=Le.getFromId(t,s);r||(r={}),r.axShifts=l,r.overlayingShiftedAx=o;var c=Le.drawOne(t,f,r);return f._shiftPusher&&$d(f,f._fullDepth||0,l,!0),f._r=f.range.slice(),f._rl=mt.simpleMap(f._r,f.r2l),c}}}))};Le.drawOne=function(t,e,r){r=r||{};var a=r.axShifts||{},i=r.overlayingShiftedAx||[],n,o,l;e.setScale();var s=t._fullLayout,f=e._id,c=f.charAt(0),v=Le.counterLetter(f),u=s._plots[e._mainSubplot];if(!u)return;if(e._shiftPusher=e.autoshift||i.indexOf(e._id)!==-1||i.indexOf(e.overlaying)!==-1,e._shiftPusher&e.anchor==="free"){var h=e.linewidth/2||0;e.ticks==="inside"&&(h+=e.ticklen),$d(e,h,a,!0),$d(e,e.shift||0,a,!1)}(r.skipTitle!==!0||e._shift===void 0)&&(e._shift=_D(e,a));var d=u[c+"axislayer"],p=e._mainLinePosition,y=p+=e._shift,m=e._mainMirrorPosition,g=e._vals=Le.calcTicks(e),w=[e.mirror,y,m].join("_");for(n=0;n<g.length;n++)g[n].axInfo=w;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var b={};function x(pe){var ge=f+(pe||"tick");return b[ge]||(b[ge]=vD(e,ge)),b[ge]}if(e.visible){var _=Le.makeTransTickFn(e),T=Le.makeTransTickLabelFn(e),k,S,M=e.ticks==="inside",D=e.ticks==="outside";if(e.tickson==="boundaries"){var A=fD(e,g);S=Le.clipEnds(e,A),k=M?S:A}else S=Le.clipEnds(e,g),k=M&&e.ticklabelmode!=="period"?S:g;var C=e._gridVals=S,$=uD(e,g);if(!s._hasOnlyLargeSploms){var N=e._subplotsWith,E={};for(n=0;n<N.length;n++){o=N[n],l=s._plots[o];var P=l[v+"axis"],R=P._mainAxis._id;if(!E[R]){E[R]=1;var L=c==="x"?"M0,"+P._offset+"v"+P._length:"M"+P._offset+",0h"+P._length;Le.drawGrid(t,e,{vals:C,counterAxis:P,layer:l.gridlayer.select("."+f),minorLayer:l.minorGridlayer.select("."+f),path:L,transFn:_}),Le.drawZeroLine(t,e,{counterAxis:P,layer:l.zerolinelayer,path:L,transFn:_})}}}var z,I=Le.getTickSigns(e),H=Le.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var V=Le.makeTickPath(e,y,I[2]),O=Le.makeTickPath(e,y,H[2],{minor:!0}),X,G,Y,K;if(e._anchorAxis&&e.mirror&&e.mirror!==!0?(X=Le.makeTickPath(e,m,I[3]),G=Le.makeTickPath(e,m,H[3],{minor:!0}),Y=V+X,K=O+G):(X="",G="",Y=V,K=O),e.showdividers&&D&&e.tickson==="boundaries"){var Z={};for(n=0;n<$.length;n++)Z[$[n].x]=1;z=function(pe){return Z[pe.x]?X:Y}}else z=function(pe){return pe.minor?K:Y}}if(Le.drawTicks(t,e,{vals:k,layer:d,path:z,transFn:_}),e.mirror==="allticks"){var q=Object.keys(e._linepositions||{});for(n=0;n<q.length;n++){o=q[n],l=s._plots[o];var ie=e._linepositions[o]||[],fe=ie[0],be=ie[1],ne=ie[2],U=Le.makeTickPath(e,fe,ne?I[0]:H[0],{minor:ne})+Le.makeTickPath(e,be,ne?I[1]:H[1],{minor:ne});Le.drawTicks(t,e,{vals:k,layer:l[c+"axislayer"],path:U,transFn:_})}}var ae=[];if(ae.push(function(){return Le.drawLabels(t,e,{vals:g,layer:d,plotinfo:l,transFn:T,labelFns:Le.makeLabelFns(e,y)})}),e.type==="multicategory"){var ce={x:2,y:10}[c];ae.push(function(){var pe={x:"height",y:"width"}[c],ge=x()[pe]+ce+(e._tickAngles[f+"tick"]?e.tickfont.size*If:0);return Le.drawLabels(t,e,{vals:cD(e,g),layer:d,cls:f+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:_,labelFns:Le.makeLabelFns(e,y+ge*I[4])})}),ae.push(function(){return e._depth=I[4]*(x("tick2")[e.side]-y),hD(t,e,{vals:$,layer:d,path:Le.makeTickPath(e,y,I[4],{len:e._depth}),transFn:_})})}else e.title.hasOwnProperty("standoff")&&ae.push(function(){e._depth=I[4]*(x()[e.side]-y)});var se=Ll.getComponentMethod("rangeslider","isVisible")(e);return!r.skipTitle&&!(se&&e.side==="bottom")&&ae.push(function(){return pD(t,e)}),ae.push(function(){var pe=e.side.charAt(0),ge=jC[e.side].charAt(0),_e=Le.getPxPosition(t,e),le=D?e.ticklen:0,De,Ae,ze,Ve;(e.automargin||se||e._shiftPusher)&&(e.type==="multicategory"?De=x("tick2"):(De=x(),c==="x"&&pe==="b"&&(e._depth=Math.max(De.width>0?De.bottom-_e:0,le))));var oe=0,Ce=0;if(e._shiftPusher&&(oe=Math.max(le,De.height>0?pe==="l"?_e-De.left:De.right-_e:0),e.title.text!==s._dfltTitle[c]&&(Ce=(e._titleStandoff||0)+(e._titleScoot||0),pe==="l"&&(Ce+=Cd(e))),e._fullDepth=Math.max(oe,Ce)),e.automargin){Ae={x:0,y:0,r:0,l:0,t:0,b:0};var re=[0,1],me=typeof e._shift=="number"?e._shift:0;if(c==="x"){if(pe==="b"?Ae[pe]=e._depth:(Ae[pe]=e._depth=Math.max(De.width>0?_e-De.top:0,le),re.reverse()),De.width>0){var ve=De.right-(e._offset+e._length);ve>0&&(Ae.xr=1,Ae.r=ve);var Me=e._offset-De.left;Me>0&&(Ae.xl=0,Ae.l=Me)}}else if(pe==="l"?(e._depth=Math.max(De.height>0?_e-De.left:0,le),Ae[pe]=e._depth-me):(e._depth=Math.max(De.height>0?De.right-_e:0,le),Ae[pe]=e._depth+me,re.reverse()),De.height>0){var Se=De.bottom-(e._offset+e._length);Se>0&&(Ae.yb=0,Ae.b=Se);var $e=e._offset-De.top;$e>0&&(Ae.yt=1,Ae.t=$e)}Ae[v]=e.anchor==="free"?e.position:e._anchorAxis.domain[re[0]],e.title.text!==s._dfltTitle[c]&&(Ae[pe]+=Cd(e)+(e.title.standoff||0)),e.mirror&&e.anchor!=="free"&&(ze={x:0,y:0,r:0,l:0,t:0,b:0},ze[ge]=e.linewidth,e.mirror&&e.mirror!==!0&&(ze[ge]+=le),e.mirror===!0||e.mirror==="ticks"?ze[v]=e._anchorAxis.domain[re[1]]:(e.mirror==="all"||e.mirror==="allticks")&&(ze[v]=[e._counterDomainMin,e._counterDomainMax][re[1]]))}se&&(Ve=Ll.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),typeof e.automargin=="string"&&(Dy(Ae,e.automargin),Dy(ze,e.automargin)),so.autoMargin(t,Wh(e),Ae),so.autoMargin(t,cw(e),ze),so.autoMargin(t,uw(e),Ve)}),mt.syncOrAsync(ae)}};function Dy(t,e){if(t){var r=Object.keys(Ty).reduce(function(a,i){return e.indexOf(i)!==-1&&Ty[i].forEach(function(n){a[n]=1}),a},{});Object.keys(t).forEach(function(a){r[a]||(a.length===1?t[a]=0:delete t[a])})}}function fD(t,e){var r=[],a,i=function(n,o){var l=n.xbnd[o];l!==null&&r.push(mt.extendFlat({},n,{x:l}))};if(e.length){for(a=0;a<e.length;a++)i(e[a],0);i(e[a-1],1)}return r}function cD(t,e){for(var r=[],a={},i=0;i<e.length;i++){var n=e[i];a[n.text2]?a[n.text2].push(n.x):a[n.text2]=[n.x]}for(var o in a)r.push(Uh(t,mt.interp(a[o],.5),o));return r}function uD(t,e){var r=[],a,i,n=e.length&&e[e.length-1].x<e[0].x,o=function(s,f){var c=s.xbnd[f];c!==null&&r.push(mt.extendFlat({},s,{x:c}))};if(t.showdividers&&e.length){for(a=0;a<e.length;a++){var l=e[a];l.text2!==i&&o(l,n?1:0),i=l.text2}o(e[a-1],n?0:1)}return r}function vD(t,e){var r,a,i,n;return t._selections[e].size()?(r=1/0,a=-1/0,i=1/0,n=-1/0,t._selections[e].each(function(){var o=Dd(this),l=Qr.bBox(o.node().parentNode);r=Math.min(r,l.top),a=Math.max(a,l.bottom),i=Math.min(i,l.left),n=Math.max(n,l.right)})):(r=0,a=0,i=0,n=0),{top:r,bottom:a,left:i,right:n,height:a-r,width:n-i}}Le.getTickSigns=function(t,e){var r=t._id.charAt(0),a={x:"top",y:"right"}[r],i=t.side===a?1:-1,n=[-1,1,i,-i],o=e?(t.minor||{}).ticks:t.ticks;return o!=="inside"==(r==="x")&&(n=n.map(function(l){return-l})),t.side&&n.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),n};Le.makeTransTickFn=function(t){return t._id.charAt(0)==="x"?function(e){return po(t._offset+t.l2p(e.x),0)}:function(e){return po(0,t._offset+t.l2p(e.x))}};Le.makeTransTickLabelFn=function(t){var e=dD(t),r=e[0],a=e[1];return t._id.charAt(0)==="x"?function(i){return po(r+t._offset+t.l2p(Ld(i)),a)}:function(i){return po(a,r+t._offset+t.l2p(Ld(i)))}};function Ld(t){return t.periodX!==void 0?t.periodX:t.x}function dD(t){var e=t.ticklabelposition||"",r=function(h){return e.indexOf(h)!==-1},a=r("top"),i=r("left"),n=r("right"),o=r("bottom"),l=r("inside"),s=o||i||a||n;if(!s&&!l)return[0,0];var f=t.side,c=s?(t.tickwidth||0)/2:0,v=Sd,u=t.tickfont?t.tickfont.size:12;return(o||a)&&(c+=u*sn,v+=(t.linewidth||0)/2),(i||n)&&(c+=(t.linewidth||0)/2,v+=Sd),l&&f==="top"&&(v-=u*(1-sn)),(i||a)&&(c=-c),(f==="bottom"||f==="right")&&(v=-v),[s?c:0,l?v:0]}Le.makeTickPath=function(t,e,r,a){a||(a={});var i=a.minor;if(i&&!t.minor)return"";var n=a.len!==void 0?a.len:i?t.minor.ticklen:t.ticklen,o=t._id.charAt(0),l=(t.linewidth||1)/2;return o==="x"?"M0,"+(e+l*r)+"v"+n*r:"M"+(e+l*r)+",0h"+n*r};Le.makeLabelFns=function(t,e,r){var a=t.ticklabelposition||"",i=function(A){return a.indexOf(A)!==-1},n=i("top"),o=i("left"),l=i("right"),s=i("bottom"),f=s||o||n||l,c=i("inside"),v=a==="inside"&&t.ticks==="inside"||!c&&t.ticks==="outside"&&t.tickson!=="boundaries",u=0,h=0,d=v?t.ticklen:0;if(c?d*=-1:f&&(d=0),v&&(u+=d,r)){var p=mt.deg2rad(r);u=d*Math.cos(p)+1,h=d*Math.sin(p)}t.showticklabels&&(v||t.showline)&&(u+=.2*t.tickfont.size),u+=(t.linewidth||1)/2*(c?-1:1);var y={labelStandoff:u,labelShift:h},m,g,w,b,x=0,_=t.side,T=t._id.charAt(0),k=t.tickangle,S;if(T==="x")S=!c&&_==="bottom"||c&&_==="top",b=S?1:-1,c&&(b*=-1),m=h*b,g=e+u*b,w=S?1:-.2,Math.abs(k)===90&&(c?w+=Ls:k===-90&&_==="bottom"?w=sn:k===90&&_==="top"?w=Ls:w=.5,x=Ls/2*(k/90)),y.xFn=function(A){return A.dx+m+x*A.fontSize},y.yFn=function(A){return A.dy+g+A.fontSize*w},y.anchorFn=function(A,C){if(f){if(o)return"end";if(l)return"start"}return!ar(C)||C===0||C===180?"middle":C*b<0!==c?"end":"start"},y.heightFn=function(A,C,$){return C<-60||C>60?-.5*$:t.side==="top"!==c?-$:0};else if(T==="y"){if(S=!c&&_==="left"||c&&_==="right",b=S?1:-1,c&&(b*=-1),m=u,g=h*b,w=0,!c&&Math.abs(k)===90&&(k===-90&&_==="left"||k===90&&_==="right"?w=sn:w=.5),c){var M=ar(k)?+k:0;if(M!==0){var D=mt.deg2rad(M);x=Math.abs(Math.sin(D))*sn*b,w=0}}y.xFn=function(A){return A.dx+e-(m+A.fontSize*w)*b+x*A.fontSize},y.yFn=function(A){return A.dy+g+A.fontSize*Ls},y.anchorFn=function(A,C){return ar(C)&&Math.abs(C)===90?"middle":S?"end":"start"},y.heightFn=function(A,C,$){return t.side==="right"&&(C*=-1),C<-30?-$:C<30?-.5*$:0}}return y};function Ac(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}Le.drawTicks=function(t,e,r){r=r||{};var a=e._id+"tick",i=[].concat(e.minor&&e.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(e.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),n=r.layer.selectAll("path."+a).data(i,Ac);n.exit().remove(),n.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return Cl.stroke(sa.select(this),o.minor?e.minor.tickcolor:e.tickcolor)}).style("stroke-width",function(o){return Qr.crispRound(t,o.minor?e.minor.tickwidth:e.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Mc(e,[aw]),n.attr("transform",r.transFn)};Le.drawGrid=function(t,e,r){if(r=r||{},e.tickmode!=="sync"){var a=e._id+"grid",i=e.minor&&e.minor.showgrid,n=i?r.vals.filter(function(m){return m.minor}):[],o=e.showgrid?r.vals.filter(function(m){return!m.minor}):[],l=r.counterAxis;if(l&&Le.shouldShowZeroLine(t,e,l))for(var s=e.tickmode==="array",f=0;f<o.length;f++){var c=o[f].x;if(s?!c:Math.abs(c)<e.dtick/100)if(o=o.slice(0,f).concat(o.slice(f+1)),s)f--;else break}e._gw=Qr.crispRound(t,e.gridwidth,1);for(var v=i?Qr.crispRound(t,e.minor.gridwidth,1):0,u=r.layer,h=r.minorLayer,d=1;d>=0;d--){var p=d?u:h;if(p){var y=p.selectAll("path."+a).data(d?o:n,Ac);y.exit().remove(),y.enter().append("path").classed(a,1).classed("crisp",r.crisp!==!1),y.attr("transform",r.transFn).attr("d",r.path).each(function(m){return Cl.stroke(sa.select(this),m.minor?e.minor.gridcolor:e.gridcolor||"#ddd")}).style("stroke-dasharray",function(m){return Qr.dashStyle(m.minor?e.minor.griddash:e.griddash,m.minor?e.minor.gridwidth:e.gridwidth)}).style("stroke-width",function(m){return(m.minor?v:e._gw)+"px"}).style("display",null),typeof r.path=="function"&&y.attr("d",r.path)}}Mc(e,[Ad,Md])}};Le.drawZeroLine=function(t,e,r){r=r||r;var a=e._id+"zl",i=Le.shouldShowZeroLine(t,e,r.counterAxis),n=r.layer.selectAll("path."+a).data(i?[{x:0,id:e._id}]:[]);n.exit().remove(),n.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,l){return UC(o.id,l.id)})}),n.attr("transform",r.transFn).attr("d",r.path).call(Cl.stroke,e.zerolinecolor||Cl.defaultLine).style("stroke-width",Qr.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),Mc(e,[kd])};Le.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,i=e._id,n=i.charAt(0),o=r.cls||i+"tick",l=r.vals.filter(function(b){return b.text}),s=r.labelFns,f=r.secondary?0:e.tickangle,c=(e._prevTickAngles||{})[o],v=r.layer.selectAll("g."+o).data(e.showticklabels?l:[],Ac),u=[];v.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(b){var x=sa.select(this),_=t._promises.length;x.call(vl.positionText,s.xFn(b),s.yFn(b)).call(Qr.font,b.font,b.fontSize,b.fontColor).text(b.text).call(vl.convertToTspans,t),t._promises[_]?u.push(t._promises.pop().then(function(){h(x,f)})):h(x,f)}),Mc(e,[wy]),v.exit().remove(),r.repositionOnUpdate&&v.each(function(b){sa.select(this).select("text").call(vl.positionText,s.xFn(b),s.yFn(b))});function h(b,x){b.each(function(_){var T=sa.select(this),k=T.select(".text-math-group"),S=s.anchorFn(_,x),M=r.transFn.call(T.node(),_)+(ar(x)&&+x!=0?" rotate("+x+","+s.xFn(_)+","+(s.yFn(_)-_.fontSize/2)+")":""),D=vl.lineCount(T),A=If*_.fontSize,C=s.heightFn(_,ar(x)?+x:0,(D-1)*A);if(C&&(M+=po(0,C)),k.empty()){var $=T.select("text");$.attr({transform:M,"text-anchor":S}),$.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var N=Qr.bBox(k.node()).width,E=N*{end:-.5,start:.5}[S];k.attr("transform",M+po(E,0))}})}e._adjustTickLabelsOverflow=function(){var b=e.ticklabeloverflow;if(!(!b||b==="allow")){var x=b.indexOf("hide")!==-1,_=e._id.charAt(0)==="x",T=0,k=_?t._fullLayout.width:t._fullLayout.height;if(b.indexOf("domain")!==-1){var S=mt.simpleMap(e.range,e.r2l);T=e.l2p(S[0])+e._offset,k=e.l2p(S[1])+e._offset}var M=Math.min(T,k),D=Math.max(T,k),A=e.side,C=1/0,$=-1/0;v.each(function(R){var L=sa.select(this),z=L.select(".text-math-group");if(z.empty()){var I=Qr.bBox(L.node()),H=0;_?(I.right>D||I.left<M)&&(H=1):(I.bottom>D||I.top+(e.tickangle?0:R.fontSize/4)<M)&&(H=1);var V=L.select("text");H?x&&V.style("opacity",0):(V.style("opacity",1),A==="bottom"||A==="right"?C=Math.min(C,_?I.top:I.left):C=-1/0,A==="top"||A==="left"?$=Math.max($,_?I.bottom:I.right):$=1/0)}});for(var N in a._plots){var E=a._plots[N];if(!(e._id!==E.xaxis._id&&e._id!==E.yaxis._id)){var P=_?E.yaxis:E.xaxis;P&&(P["_visibleLabelMin_"+e._id]=C,P["_visibleLabelMax_"+e._id]=$)}}}},e._hideCounterAxisInsideTickLabels=function(b){var x=e._id.charAt(0)==="x",_=[];for(var T in a._plots){var k=a._plots[T];e._id!==k.xaxis._id&&e._id!==k.yaxis._id||_.push(x?k.yaxis:k.xaxis)}_.forEach(function(S,M){S&&$l(S)&&(b||[kd,Md,Ad,aw,wy]).forEach(function(D){var A=D.K==="tick"&&D.L==="text"&&e.ticklabelmode==="period",C=a._plots[e._mainSubplot],$;D.K===kd.K?$=C.zerolinelayer.selectAll("."+e._id+"zl"):D.K===Md.K?$=C.minorGridlayer.selectAll("."+e._id):D.K===Ad.K?$=C.gridlayer.selectAll("."+e._id):$=C[e._id.charAt(0)+"axislayer"],$.each(function(){var N=sa.select(this);D.L&&(N=N.selectAll(D.L)),N.each(function(E){var P=e.l2p(A?Ld(E):E.x)+e._offset,R=sa.select(this);P<e["_visibleLabelMax_"+S._id]&&P>e["_visibleLabelMin_"+S._id]?R.style("display","none"):D.K==="tick"&&!M&&R.style("display",null)})})})})},h(v,c+1?c:f);function d(){return u.length&&Promise.all(u)}var p=null;function y(){if(h(v,f),l.length&&n==="x"&&!ar(f)&&(e.type!=="log"||String(e.dtick).charAt(0)!=="D")){p=0;var b=0,x=[],_;if(v.each(function(I){b=Math.max(b,I.fontSize);var H=e.l2p(I.x),V=Dd(this),O=Qr.bBox(V.node());x.push({top:0,bottom:10,height:10,left:H-O.width/2,right:H+O.width/2+2,width:O.width+2})}),(e.tickson==="boundaries"||e.showdividers)&&!r.secondary){var T=2;for(e.ticks&&(T+=e.tickwidth/2),_=0;_<x.length;_++){var k=l[_].xbnd,S=x[_];if(k[0]!==null&&S.left-e.l2p(k[0])<T||k[1]!==null&&e.l2p(k[1])-S.right<T){p=90;break}}}else{var M=l.length,D=Math.abs((l[M-1].x-l[0].x)*e._m)/(M-1),A=e.ticklabelposition||"",C=function(I){return A.indexOf(I)!==-1},$=C("top"),N=C("left"),E=C("right"),P=C("bottom"),R=P||N||$||E,L=R?(e.tickwidth||0)+2*Sd:0,z=D<b*2.5||e.type==="multicategory"||e._name==="realaxis";for(_=0;_<x.length-1;_++)if(mt.bBoxIntersect(x[_],x[_+1],L)){p=z?90:30;break}}p&&h(v,p)}}e._selections&&(e._selections[o]=v);var m=[d];e.automargin&&a._redrawFromAutoMarginCount&&c===90?(p=90,m.push(function(){h(v,c)})):m.push(y),e._tickAngles&&m.push(function(){e._tickAngles[o]=p===null?ar(f)?f:0:p});var g=e._anchorAxis;g&&g.autorange&&$l(e)&&!VC(a,e._id)&&(a._insideTickLabelsAutorange||(a._insideTickLabelsAutorange={}),a._insideTickLabelsAutorange[g._name+".autorange"]=g.autorange,m.push(function(){v.each(function(x,_){var T=Dd(this),k=T.select(".text-math-group");k.empty()&&(e._vals[_].bb=Qr.bBox(T.node()))})}));var w=mt.syncOrAsync(m);return w&&w.then&&t._promises.push(w),w};function hD(t,e,r){var a=e._id+"divider",i=r.vals,n=r.layer.selectAll("path."+a).data(i,Ac);n.exit().remove(),n.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(Cl.stroke,e.dividercolor).style("stroke-width",Qr.crispRound(t,e.dividerwidth,1)+"px"),n.attr("transform",r.transFn).attr("d",r.path)}Le.getPxPosition=function(t,e){var r=t._fullLayout._size,a=e._id.charAt(0),i=e.side,n;if(e.anchor!=="free"?n=e._anchorAxis:a==="x"?n={_offset:r.t+(1-(e.position||0))*r.h,_length:0}:a==="y"&&(n={_offset:r.l+(e.position||0)*r.w+e._shift,_length:0}),i==="top"||i==="left")return n._offset;if(i==="bottom"||i==="right")return n._offset+n._length};function Cd(t){var e=t.title.font.size,r=(t.title.text.match(vl.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?r?e*(sn+r*If):e*sn:r?e*(r+1)*If:e}function pD(t,e){var r=t._fullLayout,a=e._id,i=a.charAt(0),n=e.title.font.size,o;if(e.title.hasOwnProperty("standoff"))o=e._depth+e.title.standoff+Cd(e);else{var l=$l(e);if(e.type==="multicategory")o=e._depth;else{var s=1.5*n;l&&(s=.5*n,e.ticks==="outside"&&(s+=e.ticklen)),o=10+s+(e.linewidth?e.linewidth-1:0)}l||(i==="x"?o+=e.side==="top"?n*(e.showticklabels?1:0):n*(e.showticklabels?1.5:.5):o+=e.side==="right"?n*(e.showticklabels?1:.5):n*(e.showticklabels?.5:0))}var f=Le.getPxPosition(t,e),c,v,u;i==="x"?(v=e._offset+e._length/2,u=e.side==="top"?f-o:f+o):(u=e._offset+e._length/2,v=e.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var h;if(e.type!=="multicategory"){var d=e._selections[e._id+"tick"];if(h={selection:d,side:e.side},d&&d.node()&&d.node().parentNode){var p=Qr.getTranslate(d.node().parentNode);h.offsetLeft=p.x,h.offsetTop=p.y}e.title.hasOwnProperty("standoff")&&(h.pad=0)}return e._titleStandoff=o,FC.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:r._dfltTitle[i],avoid:h,transform:c,attributes:{x:v,y:u,"text-anchor":"middle"}})}Le.shouldShowZeroLine=function(t,e,r){var a=mt.simpleMap(e.range,e.r2l);return a[0]*a[1]<=0&&e.zeroline&&(e.type==="linear"||e.type==="-")&&!(e.rangebreaks&&e.maskBreaks(0)===Tc)&&(fw(e,0)||!mD(t,e,r,a)||yD(t,e))};Le.clipEnds=function(t,e){return e.filter(function(r){return fw(t,r.x)})};function fw(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function mD(t,e,r,a){var i=r._mainAxis;if(!i)return;var n=t._fullLayout,o=e._id.charAt(0),l=Le.counterLetter(e._id),s=e._offset+(Math.abs(a[0])<Math.abs(a[1])==(o==="x")?0:e._length);function f(d){if(!d.showline||!d.linewidth)return!1;var p=Math.max((d.linewidth+e.zerolinewidth)/2,1);function y(w){return typeof w=="number"&&Math.abs(w-s)<p}if(y(d._mainLinePosition)||y(d._mainMirrorPosition))return!0;var m=d._linepositions||{};for(var g in m)if(y(m[g][0])||y(m[g][1]))return!0}var c=n._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return f(r);for(var v=Le.list(t,l),u=0;u<v.length;u++){var h=v[u];if(h._mainAxis===i&&f(h))return!0}}function yD(t,e){for(var r=t._fullData,a=e._mainSubplot,i=e._id.charAt(0),n=0;n<r.length;n++){var o=r[n];if(o.visible===!0&&o.xaxis+o.yaxis===a&&(Ll.traceIs(o,"bar-like")&&o.orientation==={x:"h",y:"v"}[i]||o.fill&&o.fill.charAt(o.fill.length-1)===i))return!0}return!1}function Dd(t){var e=sa.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}Le.allowAutoMargin=function(t){for(var e=Le.list(t,"",!0),r=0;r<e.length;r++){var a=e[r];a.automargin&&(so.allowAutoMargin(t,Wh(a)),a.mirror&&so.allowAutoMargin(t,cw(a))),Ll.getComponentMethod("rangeslider","isVisible")(a)&&so.allowAutoMargin(t,uw(a))}};function Wh(t){return t._id+".automargin"}function cw(t){return Wh(t)+".mirror"}function uw(t){return t._id+".rangeslider"}Le.swap=function(t,e){for(var r=gD(t,e),a=0;a<r.length;a++)bD(t,r[a].x,r[a].y)};function gD(t,e){var r=[],a,i;for(a=0;a<e.length;a++){var n=[],o=t._fullData[e[a]].xaxis,l=t._fullData[e[a]].yaxis;if(!(!o||!l)){for(i=0;i<r.length;i++)(r[i].x.indexOf(o)!==-1||r[i].y.indexOf(l)!==-1)&&n.push(i);if(!n.length){r.push({x:[o],y:[l]});continue}var s=r[n[0]],f;if(n.length>1)for(i=1;i<n.length;i++)f=r[n[i]],Ds(s.x,f.x),Ds(s.y,f.y);Ds(s.x,[o]),Ds(s.y,[l])}}return r}function Ds(t,e){for(var r=0;r<e.length;r++)t.indexOf(e[r])===-1&&t.push(e[r])}function bD(t,e,r){var a=[],i=[],n=t.layout,o,l;for(o=0;o<e.length;o++)a.push(Le.getFromId(t,e[o]));for(o=0;o<r.length;o++)i.push(Le.getFromId(t,r[o]));var s=Object.keys(NC),f=["anchor","domain","overlaying","position","side","tickangle","editType"],c=["linear","log"];for(o=0;o<s.length;o++){var v=s[o],u=a[0][v],h=i[0][v],d=!0,p=!1,y=!1;if(!(v.charAt(0)==="_"||typeof u=="function"||f.indexOf(v)!==-1)){for(l=1;l<a.length&&d;l++){var m=a[l][v];v==="type"&&c.indexOf(u)!==-1&&c.indexOf(m)!==-1&&u!==m?p=!0:m!==u&&(d=!1)}for(l=1;l<i.length&&d;l++){var g=i[l][v];v==="type"&&c.indexOf(h)!==-1&&c.indexOf(g)!==-1&&h!==g?y=!0:i[l][v]!==h&&(d=!1)}d&&(p&&(n[a[0]._name].type="linear"),y&&(n[i[0]._name].type="linear"),xD(n,v,a,i,t._fullLayout._dfltTitle))}}for(o=0;o<t._fullLayout.annotations.length;o++){var w=t._fullLayout.annotations[o];e.indexOf(w.xref)!==-1&&r.indexOf(w.yref)!==-1&&mt.swapAttrs(n.annotations[o],["?"])}}function xD(t,e,r,a,i){var n=mt.nestedProperty,o=n(t[r[0]._name],e).get(),l=n(t[a[0]._name],e).get(),s;for(e==="title"&&(o&&o.text===i.x&&(o.text=i.y),l&&l.text===i.y&&(l.text=i.x)),s=0;s<r.length;s++)n(t,r[s]._name+"."+e).set(l);for(s=0;s<a.length;s++)n(t,a[s]._name+"."+e).set(o)}function Xh(t){return t._id==="angularaxis"}function Tu(t,e){for(var r=e._rangebreaks.length,a=0;a<r;a++){var i=e._rangebreaks[a];if(t>=i.min&&t<i.max)return i.max}return t}function $l(t){return(t.ticklabelposition||"").indexOf("inside")!==-1}function Mc(t,e){$l(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}function $d(t,e,r,a){var i=t.anchor!=="free"&&(t.overlaying===void 0||t.overlaying===!1)?t._id:t.overlaying,n;a?n=t.side==="right"?e:-e:n=e,i in r||(r[i]={}),t.side in r[i]||(r[i][t.side]=0),r[i][t.side]+=n}function _D(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}var Ot=g_.exports,ku={},vw={exports:{}},wD=function(e,r,a,i,n){var o=(e-a)/(i-a),l=o+r/(i-a),s=(o+l)/2;return n==="left"||n==="bottom"?o:n==="center"||n==="middle"?s:n==="right"||n==="top"?l:o<2/3-s?o:l>4/3-s?l:s},$y=de,TD=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]],kD=function(e,r,a,i){return a==="left"?e=0:a==="center"?e=1:a==="right"?e=2:e=$y.constrain(Math.floor(e*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=$y.constrain(Math.floor(r*3),0,2),TD[r][e]},dw={exports:{}},AD=Ql,MD=mc,SD=_h.getGraphDiv,LD=fc,Pd=dw.exports={};Pd.wrapped=function(t,e,r){t=SD(t),t._fullLayout&&MD.clear(t._fullLayout._uid+LD.HOVERID),Pd.raw(t,e,r)};Pd.raw=function(e,r){var a=e._fullLayout,i=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&AD.triggerHandler(e,"plotly_beforehover",r)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,r.target&&i&&e.emit("plotly_unhover",{event:r,points:i}))};var CD=dw.exports,DD=EA,Au=v1,$D=d1,PD=de.removeElement,ED=Hr,un=vw.exports={};un.align=wD;un.getCursor=kD;var hw=CD;un.unhover=hw.wrapped;un.unhoverRaw=hw.raw;un.init=function(e){var r=e.gd,a=1,i=r._context.doubleClickDelay,n=e.element,o,l,s,f,c,v,u,h;r._mouseDownTime||(r._mouseDownTime=0),n.style.pointerEvents="all",n.onmousedown=y,$D?(n._ontouchstart&&n.removeEventListener("touchstart",n._ontouchstart),n._ontouchstart=y,n.addEventListener("touchstart",y,{passive:!1})):n.ontouchstart=y;function d(w,b,x){return Math.abs(w)<x&&(w=0),Math.abs(b)<x&&(b=0),[w,b]}var p=e.clampFn||d;function y(w){r._dragged=!1,r._dragging=!0;var b=Mu(w);o=b[0],l=b[1],u=w.target,v=w,h=w.buttons===2||w.ctrlKey,typeof w.clientX>"u"&&typeof w.clientY>"u"&&(w.clientX=o,w.clientY=l),s=new Date().getTime(),s-r._mouseDownTime<i?a+=1:(a=1,r._mouseDownTime=s),e.prepFn&&e.prepFn(w,o,l),Au&&!h?(c=pw(),c.style.cursor=window.getComputedStyle(n).cursor):Au||(c=document,f=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(n).cursor),document.addEventListener("mouseup",g),document.addEventListener("touchend",g),e.dragmode!==!1&&(w.preventDefault(),document.addEventListener("mousemove",m),document.addEventListener("touchmove",m,{passive:!1}))}function m(w){w.preventDefault();var b=Mu(w),x=e.minDrag||ED.MINDRAG,_=p(b[0]-o,b[1]-l,x),T=_[0],k=_[1];(T||k)&&(r._dragged=!0,un.unhover(r,w)),r._dragged&&e.moveFn&&!h&&(r._dragdata={element:n,dx:T,dy:k},e.moveFn(T,k))}function g(w){if(delete r._dragdata,e.dragmode!==!1&&(w.preventDefault(),document.removeEventListener("mousemove",m),document.removeEventListener("touchmove",m)),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g),Au?PD(c):f&&(c.documentElement.style.cursor=f,f=null),!r._dragging){r._dragged=!1;return}if(r._dragging=!1,new Date().getTime()-r._mouseDownTime>i&&(a=Math.max(a-1,1)),r._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(a,v),!h){var b;try{b=new MouseEvent("click",w)}catch{var x=Mu(w);b=document.createEvent("MouseEvents"),b.initMouseEvent("click",w.bubbles,w.cancelable,w.view,w.detail,w.screenX,w.screenY,x[0],x[1],w.ctrlKey,w.altKey,w.shiftKey,w.metaKey,w.button,w.relatedTarget)}u.dispatchEvent(b)}r._dragging=!1,r._dragged=!1}};function pw(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}un.coverSlip=pw;function Mu(t){return DD(t.changedTouches?t.changedTouches[0]:t,document.body)}var Va=vw.exports,Sc={},Pi=function(e,r){(e.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&e.classed(a,!1)}),r&&e.classed("cursor-"+r,!0)},Su=Pi,Vo="data-savedcursor",Py="!!",RD=function(e,r){var a=e.attr(Vo);if(r){if(!a){for(var i=(e.attr("class")||"").split(" "),n=0;n<i.length;n++){var o=i[n];o.indexOf("cursor-")===0&&e.attr(Vo,o.substr(7)).classed(o,!1)}e.attr(Vo)||e.attr(Vo,Py)}Su(e,r)}else a&&(e.attr(Vo,null),a===Py?Su(e):Su(e,a))},Lu=Dr,zD=$r,mw={bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:zD.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:Lu({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:Lu({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},entrywidth:{valType:"number",min:0,editType:"legend",description:["Sets the width (in px or fraction) of the legend.","Use 0 to size the entry based on the text width,","when `entrywidthmode` is set to *pixels*."].join(" ")},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend",description:"Determines what entrywidth means."},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",min:-2,max:3,editType:"legend",description:["Sets the x position (in normalized coordinates) of the legend.","Defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"legend",description:["Sets the y position (in normalized coordinates) of the legend.","Defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:Lu({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"},Eo={};Eo.isGrouped=function(e){return(e.traceorder||"").indexOf("grouped")!==-1};Eo.isVertical=function(e){return e.orientation!=="h"};Eo.isReversed=function(e){return(e.traceorder||"").indexOf("reversed")!==-1};var Cu=tt,ya=de,ID=It,FD=Ba,ND=mw,HD=Kl,Du=Eo,yw=function(e,r,a){var i=e.legend||{},n=ID.newContainer(r,"legend");function o(k,S){return ya.coerce(i,n,ND,k,S)}for(var l,s=function(k,S){var M=l._input,D=l;return ya.coerce(M,D,FD,k,S)},f=r.font||{},c=ya.coerceFont(o,"grouptitlefont",ya.extendFlat({},f,{size:Math.round(f.size*1.1)})),v=0,u=!1,h="normal",d=0;d<a.length;d++)l=a[d],l.visible&&((l.showlegend||l._dfltShowLegend&&!(l._module&&l._module.attributes&&l._module.attributes.showlegend&&l._module.attributes.showlegend.dflt===!1))&&(v++,l.showlegend&&(u=!0,(Cu.traceIs(l,"pie-like")||l._input.showlegend===!0)&&v++),ya.coerceFont(s,"legendgrouptitle.font",c)),(Cu.traceIs(l,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(l.fill)!==-1)&&(h=Du.isGrouped({traceorder:h})?"grouped+reversed":"reversed"),l.legendgroup!==void 0&&l.legendgroup!==""&&(h=Du.isReversed({traceorder:h})?"reversed+grouped":"grouped"));var p=ya.coerce(e,r,HD,"showlegend",u&&v>1);if(p===!1&&(r.legend=void 0),!(p===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),p!==!1)){o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth");var y=ya.coerceFont(o,"font",r.font),m=o("orientation"),g=m==="h",w,b,x;g?(w=0,Cu.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(b=1.1,x="bottom"):(b=-.1,x="top")):(w=1.02,b=1,x="auto"),o("traceorder",h),Du.isGrouped(r.legend)&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("x",w),o("xanchor"),o("y",b),o("yanchor",x),o("valign"),ya.noneOrAll(i,n,["x","y"]);var _=o("title.text");if(_){o("title.side",g?"left":"top");var T=ya.extendFlat({},y,{size:ya.bigFont(y.size)});ya.coerceFont(o,"title.font",T)}}},$u=de,Ni=tt,Pu=!0,OD=function(e,r,a){var i=r._fullLayout;if(r._dragged||r._editing)return;var n=i.legend.itemclick,o=i.legend.itemdoubleclick,l=i.legend.groupclick;a===1&&n==="toggle"&&o==="toggleothers"&&Pu&&r.data&&r._context.showTips&&$u.notifier($u._(r,"Double-click on legend to isolate one trace"),"long"),Pu=!1;var s;if(a===1?s=n:a===2&&(s=o),!s)return;var f=l==="togglegroup",c=i.hiddenlabels?i.hiddenlabels.slice():[],v=e.data()[0][0];if(v.groupTitle&&v.noClick)return;var u=r._fullData,h=v.trace,d=h.legendgroup,p,y,m,g,w,b,x={},_=[],T=[],k=[];function S(O,X,G){var Y=_.indexOf(O),K=x[X];return K||(K=x[X]=[]),_.indexOf(O)===-1&&(_.push(O),Y=_.length-1),K[Y]=G,Y}function M(O,X){if(!(v.groupTitle&&!f)){var G=O._fullInput;if(Ni.hasTransform(G,"groupby")){var Y=T[G.index];if(!Y){var K=Ni.getTransformIndices(G,"groupby"),Z=K[K.length-1];Y=$u.keyedContainer(G,"transforms["+Z+"].styles","target","value.visible"),T[G.index]=Y}var q=Y.get(O._group);q===void 0&&(q=!0),q!==!1&&Y.set(O._group,X),k[G.index]=S(G.index,"visible",G.visible!==!1)}else{var ie=G.visible===!1?!1:X;S(G.index,"visible",ie)}}}if(Ni.traceIs(h,"pie-like")){var D=v.label,A=c.indexOf(D);s==="toggle"?A===-1?c.push(D):c.splice(A,1):s==="toggleothers"&&(c=[],r.calcdata[0].forEach(function(O){D!==O.label&&c.push(O.label)}),r._fullLayout.hiddenlabels&&r._fullLayout.hiddenlabels.length===c.length&&A===-1&&(c=[])),Ni.call("_guiRelayout",r,"hiddenlabels",c)}else{var C=d&&d.length,$=[],N;if(C)for(p=0;p<u.length;p++)N=u[p],N.visible&&N.legendgroup===d&&$.push(p);if(s==="toggle"){var E;switch(h.visible){case!0:E="legendonly";break;case!1:E=!1;break;case"legendonly":E=!0;break}if(C)if(f)for(p=0;p<u.length;p++)u[p].visible!==!1&&u[p].legendgroup===d&&M(u[p],E);else M(h,E);else M(h,E)}else if(s==="toggleothers"){var P,R,L,z,I=!0;for(p=0;p<u.length;p++)if(P=u[p]===h,L=u[p].showlegend!==!0,!(P||L)&&(R=C&&u[p].legendgroup===d,!R&&u[p].visible===!0&&!Ni.traceIs(u[p],"notLegendIsolatable"))){I=!1;break}for(p=0;p<u.length;p++)if(u[p].visible!==!1&&!Ni.traceIs(u[p],"notLegendIsolatable"))switch(h.visible){case"legendonly":M(u[p],!0);break;case!0:z=I?!0:"legendonly",P=u[p]===h,L=u[p].showlegend!==!0&&!u[p].legendgroup,R=P||C&&u[p].legendgroup===d,M(u[p],R||L?!0:z);break}}for(p=0;p<T.length;p++)if(m=T[p],!!m){var H=m.constructUpdate(),V=Object.keys(H);for(y=0;y<V.length;y++)g=V[y],b=x[g]=x[g]||[],b[k[p]]=H[g]}for(w=Object.keys(x),p=0;p<w.length;p++)for(g=w[p],y=0;y<_.length;y++)x[g].hasOwnProperty(y)||(x[g][y]=void 0);Ni.call("_guiRestyle",r,x,_)}},gw={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5},Ey=tt,Eu=Eo,BD=function(e,r){var a=r._inHover,i=Eu.isGrouped(r),n=Eu.isReversed(r),o={},l=[],s=!1,f={},c=0,v=0,u,h;function d(N,E){if(N===""||!Eu.isGrouped(r)){var P="~~i"+c;l.push(P),o[P]=[E],c++}else l.indexOf(N)===-1?(l.push(N),s=!0,o[N]=[E]):o[N].push(E)}for(u=0;u<e.length;u++){var p=e[u],y=p[0],m=y.trace,g=m.legendgroup;if(!(!a&&(!m.visible||!m.showlegend)))if(Ey.traceIs(m,"pie-like"))for(f[g]||(f[g]={}),h=0;h<p.length;h++){var w=p[h].label;f[g][w]||(d(g,{label:w,color:p[h].color,i:p[h].i,trace:m,pts:p[h].pts}),f[g][w]=!0,v=Math.max(v,(w||"").length))}else d(g,y),v=Math.max(v,(m.name||"").length)}if(!l.length)return[];var b=!s||!i,x=[];for(u=0;u<l.length;u++){var _=o[l[u]];b?x.push(_[0]):x.push(_)}for(b&&(x=[x]),u=0;u<x.length;u++){var T=1/0;for(h=0;h<x[u].length;h++){var k=x[u][h].trace.legendrank;T>k&&(T=k)}x[u][0]._groupMinRank=T,x[u][0]._preGroupSort=u}var S=function(N,E){return N[0]._groupMinRank-E[0]._groupMinRank||N[0]._preGroupSort-E[0]._preGroupSort},M=function(N,E){return N.trace.legendrank-E.trace.legendrank||N._preSort-E._preSort};for(x.forEach(function(N,E){N[0]._preGroupSort=E}),x.sort(S),u=0;u<x.length;u++){x[u].forEach(function(N,E){N._preSort=E}),x[u].sort(M);var D=x[u][0].trace,A=null;for(h=0;h<x[u].length;h++){var C=x[u][h].trace.legendgrouptitle;if(C&&C.text){A=C,a&&(C.font=r._groupTitleFont);break}}if(n&&x[u].reverse(),A){var $=!1;for(h=0;h<x[u].length;h++)if(Ey.traceIs(x[u][h].trace,"pie-like")){$=!0;break}x[u].unshift({i:-1,groupTitle:A,noClick:$,trace:{showlegend:D.showlegend,legendgroup:D.legendgroup,visible:r.groupclick==="toggleitem"?!0:D.visible}})}for(h=0;h<x[u].length;h++)x[u][h]=[x[u][h]]}return r._lgroupsLength=x.length,r._maxNameLength=v,x},_n={};(function(t){var e=de;function r(a){return a.indexOf("e")!==-1?a.replace(/[.]?0+e/,"e"):a.indexOf(".")!==-1?a.replace(/[.]?0+$/,""):a}t.formatPiePercent=function(i,n){var o=r((i*100).toPrecision(3));return e.numSeparate(o,n)+"%"},t.formatPieValue=function(i,n){var o=r(i.toPrecision(10));return e.numSeparate(o,n)},t.getFirstFilled=function(i,n){if(Array.isArray(i))for(var o=0;o<n.length;o++){var l=i[n[o]];if(l||l===0||l==="")return l}},t.castOption=function(i,n){if(Array.isArray(i))return t.getFirstFilled(i,n);if(i)return i},t.getRotationAngle=function(a){return(a==="auto"?0:a)*Math.PI/180}})(_n);var Ru=ut,Ry=_n.castOption,Yh=function(e,r,a){var i=a.marker.line,n=Ry(i.color,r.pts)||Ru.defaultLine,o=Ry(i.width,r.pts)||0;e.style("stroke-width",o).call(Ru.fill,r.color).call(Ru.stroke,n)},Mr=yt,zu=tt,kr=de,zy=kr.strTranslate,Fr=Et,ra=ut,Iu=Pa.extractOpts,Nf=Pr,jD=Yh,GD=_n.castOption,UD=gw,Iy=12,Fy=5,Hi=2,VD=10,Cn=5,bw=function(e,r,a){var i=r._fullLayout;a||(a=i.legend);var n=a.itemsizing==="constant",o=a.itemwidth,l=(o+UD.itemGap*2)/2,s=zy(l,0),f=function(T,k,S,M){var D;if(T+1)D=T;else if(k&&k.width>0)D=k.width;else return 0;return n?M:Math.min(D,S)};e.each(function(T){var k=Mr.select(this),S=kr.ensureSingle(k,"g","layers");S.style("opacity",T[0].trace.opacity);var M=a.valign,D=T[0].lineHeight,A=T[0].height;if(M==="middle"||!D||!A)S.attr("transform",null);else{var C={top:1,bottom:-1}[M],$=C*(.5*(D-A+3));S.attr("transform",zy(0,$))}var N=S.selectAll("g.legendfill").data([T]);N.enter().append("g").classed("legendfill",!0);var E=S.selectAll("g.legendlines").data([T]);E.enter().append("g").classed("legendlines",!0);var P=S.selectAll("g.legendsymbols").data([T]);P.enter().append("g").classed("legendsymbols",!0),P.selectAll("g.legendpoints").data([T]).enter().append("g").classed("legendpoints",!0)}).each(_).each(u).each(d).each(h).each(y).each(b).each(w).each(c).each(v).each(m).each(g);function c(T){var k=Ny(T),S=k.showFill,M=k.showLine,D=k.showGradientLine,A=k.showGradientFill,C=k.anyFill,$=k.anyLine,N=T[0],E=N.trace,P,R,L=Iu(E),z=L.colorscale,I=L.reversescale,H=function(Z){if(Z.size())if(S)Fr.fillGroupStyle(Z,r);else{var q="legendfill-"+E.uid;Fr.gradient(Z,r,q,Fu(I),z,"fill")}},V=function(Z){if(Z.size()){var q="legendline-"+E.uid;Fr.lineGroupStyle(Z),Fr.gradient(Z,r,q,Fu(I),z,"stroke")}},O=Nf.hasMarkers(E)||!C?"M5,0":$?"M5,-2":"M5,-3",X=Mr.select(this),G=X.select(".legendfill").selectAll("path").data(S||A?[T]:[]);if(G.enter().append("path").classed("js-fill",!0),G.exit().remove(),G.attr("d",O+"h"+o+"v6h-"+o+"z").call(H),M||D){var Y=f(void 0,E.line,VD,Fy);R=kr.minExtend(E,{line:{width:Y}}),P=[kr.minExtend(N,{trace:R})]}var K=X.select(".legendlines").selectAll("path").data(M||D?[P]:[]);K.enter().append("path").classed("js-line",!0),K.exit().remove(),K.attr("d",O+(D?"l"+o+",0.0001":"h"+o)).call(M?Fr.lineGroupStyle:V)}function v(T){var k=Ny(T),S=k.anyFill,M=k.anyLine,D=k.showLine,A=k.showMarker,C=T[0],$=C.trace,N=!A&&!M&&!S&&Nf.hasText($),E,P;function R(G,Y,K,Z){var q=kr.nestedProperty($,G).get(),ie=kr.isArrayOrTypedArray(q)&&Y?Y(q):q;if(n&&ie&&Z!==void 0&&(ie=Z),K){if(ie<K[0])return K[0];if(ie>K[1])return K[1]}return ie}function L(G){return C._distinct&&C.index&&G[C.index]?G[C.index]:G[0]}if(A||N||D){var z={},I={};if(A){z.mc=R("marker.color",L),z.mx=R("marker.symbol",L),z.mo=R("marker.opacity",kr.mean,[.2,1]),z.mlc=R("marker.line.color",L),z.mlw=R("marker.line.width",kr.mean,[0,5],Hi),I.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var H=R("marker.size",kr.mean,[2,16],Iy);z.ms=H,I.marker.size=H}D&&(I.line={width:R("line.width",L,[0,10],Fy)}),N&&(z.tx="Aa",z.tp=R("textposition",L),z.ts=10,z.tc=R("textfont.color",L),z.tf=R("textfont.family",L)),E=[kr.minExtend(C,z)],P=kr.minExtend($,I),P.selectedpoints=null,P.texttemplate=null}var V=Mr.select(this).select("g.legendpoints"),O=V.selectAll("path.scatterpts").data(A?E:[]);O.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),O.exit().remove(),O.call(Fr.pointStyle,P,r),A&&(E[0].mrc=3);var X=V.selectAll("g.pointtext").data(N?E:[]);X.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),X.exit().remove(),X.selectAll("text").call(Fr.textPointStyle,P,r)}function u(T){var k=T[0].trace,S=k.type==="waterfall";if(T[0]._distinct&&S){var M=T[0].trace[T[0].dir].marker;return T[0].mc=M.color,T[0].mlw=M.line.width,T[0].mlc=M.line.color,p(T,this,"waterfall")}var D=[];k.visible&&S&&(D=T[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var A=Mr.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(D);A.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),A.exit().remove(),A.each(function(C){var $=Mr.select(this),N=k[C[0]].marker,E=f(void 0,N.line,Cn,Hi);$.attr("d",C[1]).style("stroke-width",E+"px").call(ra.fill,N.color),E&&$.call(ra.stroke,N.line.color)})}function h(T){p(T,this)}function d(T){p(T,this,"funnel")}function p(T,k,S){var M=T[0].trace,D=M.marker||{},A=D.line||{},C=S?M.visible&&M.type===S:zu.traceIs(M,"bar"),$=Mr.select(k).select("g.legendpoints").selectAll("path.legend"+S).data(C?[T]:[]);$.enter().append("path").classed("legend"+S,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),$.exit().remove(),$.each(function(N){var E=Mr.select(this),P=N[0],R=f(P.mlw,D.line,Cn,Hi);E.style("stroke-width",R+"px");var L=P.mcc;if(!a._inHover&&"mc"in P){var z=Iu(D),I=z.mid;I===void 0&&(I=(z.max+z.min)/2),L=Fr.tryColorscale(D,"")(I)}var H=L||P.mc||D.color,V=D.pattern,O=V&&Fr.getPatternAttr(V.shape,0,"");if(O){var X=Fr.getPatternAttr(V.bgcolor,0,null),G=Fr.getPatternAttr(V.fgcolor,0,null),Y=V.fgopacity,K=Hy(V.size,8,10),Z=Hy(V.solidity,.5,1),q="legend-"+M.uid;E.call(Fr.pattern,"legend",r,q,O,K,Z,L,V.fillmode,X,G,Y)}else E.call(ra.fill,H);R&&ra.stroke(E,P.mlc||A.color)})}function y(T){var k=T[0].trace,S=Mr.select(this).select("g.legendpoints").selectAll("path.legendbox").data(k.visible&&zu.traceIs(k,"box-violin")?[T]:[]);S.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),S.exit().remove(),S.each(function(){var M=Mr.select(this);if((k.boxpoints==="all"||k.points==="all")&&ra.opacity(k.fillcolor)===0&&ra.opacity((k.line||{}).color)===0){var D=kr.minExtend(k,{marker:{size:n?Iy:kr.constrain(k.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});S.call(Fr.pointStyle,D,r)}else{var A=f(void 0,k.line,Cn,Hi);M.style("stroke-width",A+"px").call(ra.fill,k.fillcolor),A&&ra.stroke(M,k.line.color)}})}function m(T){var k=T[0].trace,S=Mr.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(k.visible&&k.type==="candlestick"?[T,T]:[]);S.enter().append("path").classed("legendcandle",!0).attr("d",function(M,D){return D?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(M,D){var A=Mr.select(this),C=k[D?"increasing":"decreasing"],$=f(void 0,C.line,Cn,Hi);A.style("stroke-width",$+"px").call(ra.fill,C.fillcolor),$&&ra.stroke(A,C.line.color)})}function g(T){var k=T[0].trace,S=Mr.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(k.visible&&k.type==="ohlc"?[T,T]:[]);S.enter().append("path").classed("legendohlc",!0).attr("d",function(M,D){return D?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(M,D){var A=Mr.select(this),C=k[D?"increasing":"decreasing"],$=f(void 0,C.line,Cn,Hi);A.style("fill","none").call(Fr.dashLine,C.line.dash,$),$&&ra.stroke(A,C.line.color)})}function w(T){x(T,this,"pie")}function b(T){x(T,this,"funnelarea")}function x(T,k,S){var M=T[0],D=M.trace,A=S?D.visible&&D.type===S:zu.traceIs(D,S),C=Mr.select(k).select("g.legendpoints").selectAll("path.legend"+S).data(A?[T]:[]);if(C.enter().append("path").classed("legend"+S,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),C.exit().remove(),C.size()){var $=(D.marker||{}).line,N=f(GD($.width,M.pts),$,Cn,Hi),E=kr.minExtend(D,{marker:{line:{width:N}}});E.marker.line.color=$.color;var P=kr.minExtend(M,{trace:E});jD(C,P,E)}}function _(T){var k=T[0].trace,S,M=[];if(k.visible)switch(k.type){case"histogram2d":case"heatmap":M=[["M-15,-2V4H15V-2Z"]],S=!0;break;case"choropleth":case"choroplethmapbox":M=[["M-6,-6V6H6V-6Z"]],S=!0;break;case"densitymapbox":M=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],S="radial";break;case"cone":M=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],S=!1;break;case"streamtube":M=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],S=!1;break;case"surface":M=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],S=!0;break;case"mesh3d":M=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!1;break;case"volume":M=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!0;break;case"isosurface":M=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],S=!1;break}var D=Mr.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(M);D.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(A,C){var $=Mr.select(this),N=Iu(k),E=N.colorscale,P=N.reversescale,R=function(H){if(H.size()){var V="legendfill-"+k.uid;Fr.gradient(H,r,V,Fu(P,S==="radial"),E,"fill")}},L;if(E){if(!S){var I=E.length;L=C===0?E[P?I-1:0][1]:C===1?E[P?0:I-1][1]:E[Math.floor((I-1)/2)][1]}}else{var z=k.vertexcolor||k.facecolor||k.color;L=kr.isArrayOrTypedArray(z)?z[C]||z[0]:z}$.attr("d",A[0]),L?$.call(ra.fill,L):$.call(R)})}};function Fu(t,e){var r=e?"radial":"horizontal";return r+(t?"":"reversed")}function Ny(t){var e=t[0].trace,r=e.contours,a=Nf.hasLines(e),i=Nf.hasMarkers(e),n=e.visible&&e.fill&&e.fill!=="none",o=!1,l=!1;if(r){var s=r.coloring;s==="lines"?o=!0:a=s==="none"||s==="heatmap"||r.showlines,r.type==="constraint"?n=r._operation!=="=":(s==="fill"||s==="heatmap")&&(l=!0)}return{showMarker:i,showLine:a,showFill:n,showGradientLine:o,showGradientFill:l,anyLine:a||o,anyFill:n||l}}function Hy(t,e,r){return t&&kr.isArrayOrTypedArray(t)?e:t>r?r:t}var Kr=yt,tr=de,Ed=sr,Ki=tt,Oy=Ql,Nu=Va,ur=Et,mf=ut,fo=wr,By=OD,_r=gw,qh=Yr,WD=qh.LINE_SPACING,Hf=qh.FROM_TL,jy=qh.FROM_BR,Gy=BD,XD=bw,Uy=Eo,qn=1,xw=function(e,r){return r||(r=e._fullLayout.legend||{}),YD(e,r)};function YD(t,e){var r=t._fullLayout,a="legend"+r._uid,i,n=e._inHover;if(n?(i=e.layer,a+="-hover"):i=r._infolayer,!!i){t._legendMouseDownTime||(t._legendMouseDownTime=0);var o;if(n){if(!e.entries)return;o=Gy(e.entries,e)}else{if(!t.calcdata)return;o=r.showlegend&&Gy(t.calcdata,e)}var l=r.hiddenlabels||[];if(!n&&(!r.showlegend||!o.length))return i.selectAll(".legend").remove(),r._topdefs.select("#"+a).remove(),Ed.autoMargin(t,"legend");var s=tr.ensureSingle(i,"g","legend",function(m){n||m.attr("pointer-events","all")}),f=tr.ensureSingleById(r._topdefs,"clipPath",a,function(m){m.append("rect")}),c=tr.ensureSingle(s,"rect","bg",function(m){m.attr("shape-rendering","crispEdges")});c.call(mf.stroke,e.bordercolor).call(mf.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px");var v=tr.ensureSingle(s,"g","scrollbox"),u=e.title;if(e._titleWidth=0,e._titleHeight=0,u.text){var h=tr.ensureSingle(v,"text","legendtitletext");h.attr("text-anchor","start").call(ur.font,u.font).text(u.text),yf(h,v,t,e,qn)}else v.selectAll(".legendtitletext").remove();var d=tr.ensureSingle(s,"rect","scrollbar",function(m){m.attr(_r.scrollBarEnterAttrs).call(mf.fill,_r.scrollBarColor)}),p=v.selectAll("g.groups").data(o);p.enter().append("g").attr("class","groups"),p.exit().remove();var y=p.selectAll("g.traces").data(tr.identity);y.enter().append("g").attr("class","traces"),y.exit().remove(),y.style("opacity",function(m){var g=m[0].trace;return Ki.traceIs(g,"pie-like")?l.indexOf(m[0].label)!==-1?.5:1:g.visible==="legendonly"?.5:1}).each(function(){Kr.select(this).call(qD,t,e)}).call(XD,t,e).each(function(){n||Kr.select(this).call(ZD,t)}),tr.syncOrAsync([Ed.previousPromises,function(){return JD(t,p,y,e)},function(){var m=r._size,g=e.borderwidth;if(!n){var w=e5(t);if(w)return;var b=m.l+m.w*e.x-Hf[Zh(e)]*e._width,x=m.t+m.h*(1-e.y)-Hf[Kh(e)]*e._effHeight;if(r.margin.autoexpand){var _=b,T=x;b=tr.constrain(b,0,r.width-e._width),x=tr.constrain(x,0,r.height-e._effHeight),b!==_&&tr.log("Constrain legend.x to make legend fit inside graph"),x!==T&&tr.log("Constrain legend.y to make legend fit inside graph")}ur.setTranslate(s,b,x)}if(d.on(".drag",null),s.on("wheel",null),n||e._height<=e._maxHeight||t._context.staticPlot){var k=e._effHeight;n&&(k=e._height),c.attr({width:e._width-g,height:k-g,x:g/2,y:g/2}),ur.setTranslate(v,0,0),f.select("rect").attr({width:e._width-2*g,height:k-2*g,x:g,y:g}),ur.setClipUrl(v,a,t),ur.setRect(d,0,0,0,0),delete e._scrollY}else{var S=Math.max(_r.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),M=e._effHeight-S-2*_r.scrollBarMargin,D=e._height-e._effHeight,A=M/D,C=Math.min(e._scrollY||0,D);c.attr({width:e._width-2*g+_r.scrollBarWidth+_r.scrollBarMargin,height:e._effHeight-g,x:g/2,y:g/2}),f.select("rect").attr({width:e._width-2*g+_r.scrollBarWidth+_r.scrollBarMargin,height:e._effHeight-2*g,x:g,y:g+C}),ur.setClipUrl(v,a,t),I(C,S,A),s.on("wheel",function(){C=tr.constrain(e._scrollY+Kr.event.deltaY/M*D,0,D),I(C,S,A),C!==0&&C!==D&&Kr.event.preventDefault()});var $,N,E,P=function(G,Y,K){var Z=(K-Y)/A+G;return tr.constrain(Z,0,D)},R=function(G,Y,K){var Z=(Y-K)/A+G;return tr.constrain(Z,0,D)},L=Kr.behavior.drag().on("dragstart",function(){var G=Kr.event.sourceEvent;G.type==="touchstart"?$=G.changedTouches[0].clientY:$=G.clientY,E=C}).on("drag",function(){var G=Kr.event.sourceEvent;G.buttons===2||G.ctrlKey||(G.type==="touchmove"?N=G.changedTouches[0].clientY:N=G.clientY,C=P(E,$,N),I(C,S,A))});d.call(L);var z=Kr.behavior.drag().on("dragstart",function(){var G=Kr.event.sourceEvent;G.type==="touchstart"&&($=G.changedTouches[0].clientY,E=C)}).on("drag",function(){var G=Kr.event.sourceEvent;G.type==="touchmove"&&(N=G.changedTouches[0].clientY,C=R(E,$,N),I(C,S,A))});v.call(z)}function I(G,Y,K){e._scrollY=t._fullLayout.legend._scrollY=G,ur.setTranslate(v,0,-G),ur.setRect(d,e._width,_r.scrollBarMargin+G*K,_r.scrollBarWidth,Y),f.select("rect").attr("y",g+G)}if(t._context.edits.legendPosition){var H,V,O,X;s.classed("cursor-move",!0),Nu.init({element:s.node(),gd:t,prepFn:function(){var G=ur.getTranslate(s);O=G.x,X=G.y},moveFn:function(G,Y){var K=O+G,Z=X+Y;ur.setTranslate(s,K,Z),H=Nu.align(K,0,m.l,m.l+m.w,e.xanchor),V=Nu.align(Z,0,m.t+m.h,m.t,e.yanchor)},doneFn:function(){H!==void 0&&V!==void 0&&Ki.call("_guiRelayout",t,{"legend.x":H,"legend.y":V})},clickFn:function(G,Y){var K=i.selectAll("g.traces").filter(function(){var Z=this.getBoundingClientRect();return Y.clientX>=Z.left&&Y.clientX<=Z.right&&Y.clientY>=Z.top&&Y.clientY<=Z.bottom});K.size()>0&&_w(t,s,K,G,Y)}})}}],t)}}function $s(t,e,r){var a=t[0],i=a.width,n=e.entrywidthmode,o=a.trace.legendwidth||e.entrywidth;return n==="fraction"?e._maxWidth*o:r+(o||i)}function _w(t,e,r,a,i){var n=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:n.index,expandedIndex:n._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};n._group&&(o.group=n._group),Ki.traceIs(n,"pie-like")&&(o.label=r.datum()[0].label);var l=Oy.triggerHandler(t,"plotly_legendclick",o);if(l!==!1){if(a===1)e._clickTimeout=setTimeout(function(){t._fullLayout&&By(r,t,a)},t._context.doubleClickDelay);else if(a===2){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0;var s=Oy.triggerHandler(t,"plotly_legenddoubleclick",o);s!==!1&&By(r,t,a)}}}function qD(t,e,r){var a=t.data()[0][0],i=a.trace,n=Ki.traceIs(i,"pie-like"),o=!r._inHover&&e._context.edits.legendText&&!n,l=r._maxNameLength,s,f;a.groupTitle?(s=a.groupTitle.text,f=a.groupTitle.font):(f=r.font,r.entries?s=a.text:(s=n?a.label:i.name,i._meta&&(s=tr.templateString(s,i._meta))));var c=tr.ensureSingle(t,"text","legendtext");c.attr("text-anchor","start").call(ur.font,f).text(o?Vy(s,l):s);var v=r.itemwidth+_r.itemGap*2;fo.positionText(c,v,0),o?c.call(fo.makeEditable,{gd:e,text:s}).call(yf,t,e,r).on("edit",function(u){this.text(Vy(u,l)).call(yf,t,e,r);var h=a.trace._fullInput||{},d={};if(Ki.hasTransform(h,"groupby")){var p=Ki.getTransformIndices(h,"groupby"),y=p[p.length-1],m=tr.keyedContainer(h,"transforms["+y+"].styles","target","value.name");m.set(a.trace._group,u),d=m.constructUpdate()}else d.name=u;return Ki.call("_guiRestyle",e,d,i.index)}):yf(c,t,e,r)}function Vy(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;t=t||"";for(var a=r-t.length;a>0;a--)t+=" ";return t}function ZD(t,e){var r=e._context.doubleClickDelay,a,i=1,n=tr.ensureSingle(t,"rect","legendtoggle",function(o){e._context.staticPlot||o.style("cursor","pointer").attr("pointer-events","all"),o.call(mf.fill,"rgba(0,0,0,0)")});e._context.staticPlot||(n.on("mousedown",function(){a=new Date().getTime(),a-e._legendMouseDownTime<r?i+=1:(i=1,e._legendMouseDownTime=a)}),n.on("mouseup",function(){if(!(e._dragged||e._editing)){var o=e._fullLayout.legend;new Date().getTime()-e._legendMouseDownTime>r&&(i=Math.max(i-1,1)),_w(e,o,t,i,Kr.event)}}))}function yf(t,e,r,a,i){a._inHover&&t.attr("data-notex",!0),fo.convertToTspans(t,r,function(){KD(e,r,a,i)})}function KD(t,e,r,a){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend){t.remove();return}var n=t.select("g[class*=math-group]"),o=n.node();r||(r=e._fullLayout.legend);var l=r.borderwidth,s;a===qn?s=r.title.font:i.groupTitle?s=i.groupTitle.font:s=r.font;var f=s.size*WD,c,v;if(o){var u=ur.bBox(o);c=u.height,v=u.width,a===qn?ur.setTranslate(n,l,l+c*.75):ur.setTranslate(n,0,c*.25)}else{var h=t.select(a===qn?".legendtitletext":".legendtext"),d=fo.lineCount(h),p=h.node();if(c=f*d,v=p?ur.bBox(p).width:0,a===qn)r.title.side==="left"&&(v+=_r.itemGap*2),fo.positionText(h,l+_r.titlePad,l+f);else{var y=_r.itemGap*2+r.itemwidth;i.groupTitle&&(y=_r.itemGap,v-=r.itemwidth),fo.positionText(h,y,-f*((d-1)/2-.3))}}a===qn?(r._titleWidth=v,r._titleHeight=c):(i.lineHeight=f,i.height=Math.max(c,16)+3,i.width=v)}function QD(t){var e=0,r=0,a=t.title.side;return a&&(a.indexOf("left")!==-1&&(e=t._titleWidth),a.indexOf("top")!==-1&&(r=t._titleHeight)),[e,r]}function JD(t,e,r,a){var i=t._fullLayout;a||(a=i.legend);var n=i._size,o=Uy.isVertical(a),l=Uy.isGrouped(a),s=a.entrywidthmode==="fraction",f=a.borderwidth,c=2*f,v=_r.itemGap,u=a.itemwidth+v*2,h=2*(f+v),d=Kh(a),p=a.y<0||a.y===0&&d==="top",y=a.y>1||a.y===1&&d==="bottom",m=a.tracegroupgap,g={};a._maxHeight=Math.max(p||y?i.height/2:n.h,30);var w=0;a._width=0,a._height=0;var b=QD(a);if(o)r.each(function(O){var X=O[0].height;ur.setTranslate(this,f+b[0],f+b[1]+a._height+X/2+v),a._height+=X,a._width=Math.max(a._width,O[0].width)}),w=u+a._width,a._width+=v+u+c,a._height+=h,l&&(e.each(function(O,X){ur.setTranslate(this,0,X*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var x=Zh(a),_=a.x<0||a.x===0&&x==="right",T=a.x>1||a.x===1&&x==="left",k=y||p,S=i.width/2;a._maxWidth=Math.max(_?k&&x==="left"?n.l+n.w:S:T?k&&x==="right"?n.r+n.w:S:n.w,2*u);var M=0,D=0;r.each(function(O){var X=$s(O,a,u);M=Math.max(M,X),D+=X}),w=null;var A=0;if(l){var C=0,$=0,N=0;e.each(function(){var O=0,X=0;Kr.select(this).selectAll("g.traces").each(function(Y){var K=$s(Y,a,u),Z=Y[0].height;ur.setTranslate(this,b[0],b[1]+f+v+Z/2+X),X+=Z,O=Math.max(O,K),g[Y[0].trace.legendgroup]=O});var G=O+v;$>0&&G+f+$>a._maxWidth?(A=Math.max(A,$),$=0,N+=C+m,C=X):C=Math.max(C,X),ur.setTranslate(this,$,N),$+=G}),a._width=Math.max(A,$)+f,a._height=N+C+h}else{var E=r.size(),P=D+c+(E-1)*v<a._maxWidth,R=0,L=0,z=0,I=0;r.each(function(O){var X=O[0].height,G=$s(O,a,u),Y=P?G:M;s||(Y+=v),Y+f+L-v>=a._maxWidth&&(A=Math.max(A,I),L=0,z+=R,a._height+=R,R=0),ur.setTranslate(this,b[0]+f+L,b[1]+f+z+X/2+v),I=L+G+v,L+=Y,R=Math.max(R,X)}),P?(a._width=L+c,a._height=R+h):(a._width=Math.max(A,I)+c,a._height+=R+h)}}a._width=Math.ceil(Math.max(a._width+b[0],a._titleWidth+2*(f+_r.titlePad))),a._height=Math.ceil(Math.max(a._height+b[1],a._titleHeight+2*(f+_r.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var H=t._context.edits,V=H.legendText||H.legendPosition;r.each(function(O){var X=Kr.select(this).select(".legendtoggle"),G=O[0].height,Y=O[0].trace.legendgroup,K=$s(O,a,u);l&&Y!==""&&(K=g[Y]);var Z=V?u:w||K;!o&&!s&&(Z+=v/2),ur.setRect(X,0,-G/2,Z,G)})}function e5(t){var e=t._fullLayout,r=e.legend,a=Zh(r),i=Kh(r);return Ed.autoMargin(t,"legend",{x:r.x,y:r.y,l:r._width*Hf[a],r:r._width*jy[a],b:r._effHeight*jy[i],t:r._effHeight*Hf[i]})}function Zh(t){return tr.isRightAnchor(t)?"right":tr.isCenterAnchor(t)?"center":"left"}function Kh(t){return tr.isBottomAnchor(t)?"bottom":tr.isMiddleAnchor(t)?"middle":"top"}var Qi=yt,Za=_t,Wy=da,rr=de,Hu=rr.strTranslate,t5=rr.strRotate,r5=Ql,ia=wr,a5=RD,Ha=Et,dr=ut,Ps=Va,yi=Ot,yo=tt,xa=ha,vn=fc,i5=yw,n5=xw,ww=vn.YANGLE,Qh=Math.PI*ww/180,o5=1/Math.sin(Qh),l5=Math.cos(Qh),s5=Math.sin(Qh),Ut=vn.HOVERARROWSIZE,At=vn.HOVERTEXTPAD,Xy={box:!0,ohlc:!0,violin:!0,candlestick:!0},f5={scatter:!0,scattergl:!0,splom:!0};Sc.hover=function(e,r,a,i){e=rr.getGraphDiv(e);var n=r.target;rr.throttle(e._fullLayout._uid+vn.HOVERID,vn.HOVERMINTIME,function(){c5(e,r,a,i,n)})};Sc.loneHover=function(e,r){var a=!0;Array.isArray(e)||(a=!1,e=[e]);var i=r.gd,n=Mw(i),o=Sw(i),l=e.map(function(p){var y=p._x0||p.x0||p.x||0,m=p._x1||p.x1||p.x||0,g=p._y0||p.y0||p.y||0,w=p._y1||p.y1||p.y||0,b=p.eventData;if(b){var x=Math.min(y,m),_=Math.max(y,m),T=Math.min(g,w),k=Math.max(g,w),S=p.trace;if(yo.traceIs(S,"gl3d")){var M=i._fullLayout[S.scene]._scene.container,D=M.offsetLeft,A=M.offsetTop;x+=D,_+=D,T+=A,k+=A}b.bbox={x0:x+o,x1:_+o,y0:T+n,y1:k+n},r.inOut_bbox&&r.inOut_bbox.push(b.bbox)}else b=!1;return{color:p.color||dr.defaultLine,x0:p.x0||p.x||0,x1:p.x1||p.x||0,y0:p.y0||p.y||0,y1:p.y1||p.y||0,xLabel:p.xLabel,yLabel:p.yLabel,zLabel:p.zLabel,text:p.text,name:p.name,idealAlign:p.idealAlign,borderColor:p.borderColor,fontFamily:p.fontFamily,fontSize:p.fontSize,fontColor:p.fontColor,nameLength:p.nameLength,textAlign:p.textAlign,trace:p.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:p.hovertemplate||!1,hovertemplateLabels:p.hovertemplateLabels||!1,eventData:b}}),s=!1,f=kw(l,{gd:i,hovermode:"closest",rotateLabels:s,bgColor:r.bgColor||dr.background,container:Qi.select(r.container),outerContainer:r.outerContainer||r.container}),c=5,v=0,u=0;f.sort(function(p,y){return p.y0-y.y0}).each(function(p,y){var m=p.y0-p.by/2;m-c<v?p.offset=v-m+c:p.offset=0,v=m+p.by+p.offset,y===r.anchorIndex&&(u=p.offset)}).each(function(p){p.offset-=u});var h=i._fullLayout._invScaleX,d=i._fullLayout._invScaleY;return Aw(f,s,h,d),a?f:f.node()};function c5(t,e,r,a,i){r||(r="xy");var n=Array.isArray(r)?r:[r],o=t._fullLayout,l=o._plots||[],s=l[r],f=o._has("cartesian");if(s){var c=s.overlays.map(function(J){return J.id});n=n.concat(c)}for(var v=n.length,u=new Array(v),h=new Array(v),d=!1,p=0;p<v;p++){var y=n[p];if(l[y])d=!0,u[p]=l[y].xaxis,h[p]=l[y].yaxis;else if(o[y]&&o[y]._subplot){var m=o[y]._subplot;u[p]=m.xaxis,h[p]=m.yaxis}else{rr.warn("Unrecognized subplot: "+y);return}}var g=e.hovermode||o.hovermode;if(g&&!d&&(g="closest"),["x","y","closest","x unified","y unified"].indexOf(g)===-1||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return Ps.unhoverRaw(t,e);var w=o.hoverdistance;w===-1&&(w=1/0);var b=o.spikedistance;b===-1&&(b=1/0);var x=[],_=[],T,k,S,M,D,A,C,$,N,E,P,R,L,z={hLinePoint:null,vLinePoint:null},I=!1;if(Array.isArray(e))for(g="array",S=0;S<e.length;S++)D=t.calcdata[e[S].curveNumber||0],D&&(A=D[0].trace,D[0].trace.hoverinfo!=="skip"&&(_.push(D),A.orientation==="h"&&(I=!0)));else{for(M=0;M<t.calcdata.length;M++)D=t.calcdata[M],A=D[0].trace,A.hoverinfo!=="skip"&&xa.isTraceInSubplots(A,n)&&(_.push(D),A.orientation==="h"&&(I=!0));var H=!i,V,O;if(H)"xpx"in e?V=e.xpx:V=u[0]._length/2,"ypx"in e?O=e.ypx:O=h[0]._length/2;else{if(r5.triggerHandler(t,"plotly_beforehover",e)===!1)return;var X=i.getBoundingClientRect();V=e.clientX-X.left,O=e.clientY-X.top,o._calcInverseTransform(t);var G=rr.apply3DTransform(o._invTransform)(V,O);if(V=G[0],O=G[1],V<0||V>u[0]._length||O<0||O>h[0]._length)return Ps.unhoverRaw(t,e)}if(e.pointerX=V+u[0]._offset,e.pointerY=O+h[0]._offset,"xval"in e?T=xa.flat(n,e.xval):T=xa.p2c(u,V),"yval"in e?k=xa.flat(n,e.yval):k=xa.p2c(h,O),!Za(T[0])||!Za(k[0]))return rr.warn("Fx.hover failed",e,t),Ps.unhoverRaw(t,e)}var Y=1/0;function K(J,Q){for(M=0;M<_.length;M++)if(D=_[M],!(!D||!D[0]||!D[0].trace)&&(A=D[0].trace,!(A.visible!==!0||A._length===0)&&["carpet","contourcarpet"].indexOf(A._module.name)===-1)){if(A.type==="splom"?($=0,C=n[$]):(C=xa.getSubplot(A),$=n.indexOf(C)),N=g,xa.isUnifiedHover(N)&&(N=N.charAt(0)),R={cd:D,trace:A,xa:u[$],ya:h[$],maxHoverDistance:w,maxSpikeDistance:b,index:!1,distance:Math.min(Y,w),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:dr.defaultLine,name:A.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},o[C]&&(R.subplot=o[C]._subplot),o._splomScenes&&o._splomScenes[A.uid]&&(R.scene=o._splomScenes[A.uid]),L=x.length,N==="array"){var he=e[M];"pointNumber"in he?(R.index=he.pointNumber,N="closest"):(N="","xval"in he&&(E=he.xval,N="x"),"yval"in he&&(P=he.yval,N=N?"closest":"y"))}else J!==void 0&&Q!==void 0?(E=J,P=Q):(E=T[$],P=k[$]);if(w!==0)if(A._module&&A._module.hoverPoints){var Te=A._module.hoverPoints(R,E,P,N,{finiteRange:!0,hoverLayer:o._hoverlayer});if(Te)for(var ue,te=0;te<Te.length;te++)ue=Te[te],Za(ue.x0)&&Za(ue.y0)&&x.push(d5(ue,g))}else rr.log("Unrecognized trace type in hover:",A);if(g==="closest"&&x.length>L&&(x.splice(0,L),Y=x[0].distance),f&&b!==0&&x.length===0){R.distance=b,R.index=!1;var xe=A._module.hoverPoints(R,E,P,"closest",{hoverLayer:o._hoverlayer});if(xe&&(xe=xe.filter(function(Ke){return Ke.spikeDistance<=b})),xe&&xe.length){var we,Be=xe.filter(function(Ke){return Ke.xa.showspikes&&Ke.xa.spikesnap!=="hovered data"});if(Be.length){var ot=Be[0];Za(ot.x0)&&Za(ot.y0)&&(we=q(ot),(!z.vLinePoint||z.vLinePoint.spikeDistance>we.spikeDistance)&&(z.vLinePoint=we))}var vt=xe.filter(function(Ke){return Ke.ya.showspikes&&Ke.ya.spikesnap!=="hovered data"});if(vt.length){var st=vt[0];Za(st.x0)&&Za(st.y0)&&(we=q(st),(!z.hLinePoint||z.hLinePoint.spikeDistance>we.spikeDistance)&&(z.hLinePoint=we))}}}}}K();function Z(J,Q,he){for(var Te=null,ue=1/0,te,xe=0;xe<J.length;xe++)te=J[xe].spikeDistance,he&&xe===0&&(te=-1/0),te<=ue&&te<=Q&&(Te=J[xe],ue=te);return Te}function q(J){return J?{xa:J.xa,ya:J.ya,x:J.xSpike!==void 0?J.xSpike:(J.x0+J.x1)/2,y:J.ySpike!==void 0?J.ySpike:(J.y0+J.y1)/2,distance:J.distance,spikeDistance:J.spikeDistance,curveNumber:J.trace.index,color:J.color,pointNumber:J.index}:null}var ie={fullLayout:o,container:o._hoverlayer,event:e},fe=t._spikepoints,be={vLinePoint:z.vLinePoint,hLinePoint:z.hLinePoint};t._spikepoints=be;var ne=function(){x.sort(function(J,Q){return J.distance-Q.distance}),x=p5(x,g)};ne();var U=g.charAt(0),ae=(U==="x"||U==="y")&&x[0]&&f5[x[0].trace.type];if(f&&b!==0&&x.length!==0){var ce=x.filter(function(J){return J.ya.showspikes}),se=Z(ce,b,ae);z.hLinePoint=q(se);var pe=x.filter(function(J){return J.xa.showspikes}),ge=Z(pe,b,ae);z.vLinePoint=q(ge)}if(x.length===0){var _e=Ps.unhoverRaw(t,e);return f&&(z.hLinePoint!==null||z.vLinePoint!==null)&&Zy(fe)&&qy(t,z,ie),_e}if(f&&Zy(fe)&&qy(t,z,ie),xa.isXYhover(N)&&x[0].length!==0&&x[0].trace.type!=="splom"){var le=x[0];Xy[le.trace.type]?x=x.filter(function(J){return J.trace.index===le.trace.index}):x=[le];var De=x.length,Ae=Qy("x",le,o),ze=Qy("y",le,o);K(Ae,ze);var Ve=[],oe={},Ce=0,re=function(J){var Q=Xy[J.trace.type]?Tw(J):J.trace.index;if(!oe[Q])Ce++,oe[Q]=Ce,Ve.push(J);else{var he=oe[Q]-1,Te=Ve[he];he>0&&Math.abs(J.distance)<Math.abs(Te.distance)&&(Ve[he]=J)}},me;for(me=0;me<De;me++)re(x[me]);for(me=x.length-1;me>De-1;me--)re(x[me]);x=Ve,ne()}var ve=t._hoverdata,Me=[],Se=Mw(t),$e=Sw(t);for(S=0;S<x.length;S++){var ye=x[S],Ne=xa.makeEventData(ye,ye.trace,ye.cd);if(ye.hovertemplate!==!1){var Pe=!1;ye.cd[ye.index]&&ye.cd[ye.index].ht&&(Pe=ye.cd[ye.index].ht),ye.hovertemplate=Pe||ye.trace.hovertemplate||!1}if(ye.xa&&ye.ya){var je=ye.x0+ye.xa._offset,Ie=ye.x1+ye.xa._offset,Ue=ye.y0+ye.ya._offset,ke=ye.y1+ye.ya._offset,We=Math.min(je,Ie),qe=Math.max(je,Ie),Ye=Math.min(Ue,ke),Qe=Math.max(Ue,ke);Ne.bbox={x0:We+$e,x1:qe+$e,y0:Ye+Se,y1:Qe+Se}}ye.eventData=[Ne],Me.push(Ne)}t._hoverdata=Me;var F=g==="y"&&(_.length>1||x.length>1)||g==="closest"&&I&&x.length>1,B=dr.combine(o.plot_bgcolor||dr.background,o.paper_bgcolor),j=kw(x,{gd:t,hovermode:g,rotateLabels:F,bgColor:B,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance});if(xa.isUnifiedHover(g)||(v5(j,F?"xa":"ya",o),Aw(j,F,o._invScaleX,o._invScaleY)),i&&i.tagName){var W=yo.getComponentMethod("annotations","hasClickToShow")(t,Me);a5(Qi.select(i),W?"pointer":"")}!i||a||!h5(t,e,ve)||(ve&&t.emit("plotly_unhover",{event:e,points:ve}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:u,yaxes:h,xvals:T,yvals:k}))}function Tw(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}var u5=/<extra>([\s\S]*)<\/extra>/;function kw(t,e){var r=e.gd,a=r._fullLayout,i=e.hovermode,n=e.rotateLabels,o=e.bgColor,l=e.container,s=e.outerContainer,f=e.commonLabelOpts||{};if(t.length===0)return[[]];var c=e.fontFamily||vn.HOVERFONT,v=e.fontSize||vn.HOVERFONTSIZE,u=t[0],h=u.xa,d=u.ya,p=i.charAt(0),y=p+"Label",m=u[y];if(m===void 0&&h.type==="multicategory")for(var g=0;g<t.length&&(m=t[g][y],m===void 0);g++);var w=Dn(r,s),b=w.top,x=w.width,_=w.height,T=m!==void 0&&u.distance<=e.hoverdistance&&(i==="x"||i==="y");if(T){var k=!0,S,M;for(S=0;S<t.length;S++)if(k&&t[S].zLabel===void 0&&(k=!1),M=t[S].hoverinfo||t[S].trace.hoverinfo,M){var D=Array.isArray(M)?M:M.split("+");if(D.indexOf("all")===-1&&D.indexOf(i)===-1){T=!1;break}}k&&(T=!1)}var A=l.selectAll("g.axistext").data(T?[0]:[]);if(A.enter().append("g").classed("axistext",!0),A.exit().remove(),A.each(function(){var le=Qi.select(this),De=rr.ensureSingle(le,"path","",function(qe){qe.style({"stroke-width":"1px"})}),Ae=rr.ensureSingle(le,"text","",function(qe){qe.attr("data-notex",1)}),ze=f.bgcolor||dr.defaultLine,Ve=f.bordercolor||dr.contrast(ze),oe=dr.contrast(ze),Ce={family:f.font.family||c,size:f.font.size||v,color:f.font.color||oe};De.style({fill:ze,stroke:Ve}),Ae.text(m).call(Ha.font,Ce).call(ia.positionText,0,0).call(ia.convertToTspans,r),le.attr("transform","");var re=Dn(r,Ae.node()),me,ve;if(i==="x"){var Me=h.side==="top"?"-":"";Ae.attr("text-anchor","middle").call(ia.positionText,0,h.side==="top"?b-re.bottom-Ut-At:b-re.top+Ut+At),me=h._offset+(u.x0+u.x1)/2,ve=d._offset+(h.side==="top"?0:d._length);var Se=re.width/2+At;me<Se?(me=Se,De.attr("d","M-"+(Se-Ut)+",0L-"+(Se-Ut*2)+","+Me+Ut+"H"+(At+re.width/2)+"v"+Me+(At*2+re.height)+"H-"+Se+"V"+Me+Ut+"Z")):me>a.width-Se?(me=a.width-Se,De.attr("d","M"+(Se-Ut)+",0L"+Se+","+Me+Ut+"v"+Me+(At*2+re.height)+"H-"+Se+"V"+Me+Ut+"H"+(Se-Ut*2)+"Z")):De.attr("d","M0,0L"+Ut+","+Me+Ut+"H"+(At+re.width/2)+"v"+Me+(At*2+re.height)+"H-"+(At+re.width/2)+"V"+Me+Ut+"H-"+Ut+"Z")}else{var $e,ye,Ne;d.side==="right"?($e="start",ye=1,Ne="",me=h._offset+h._length):($e="end",ye=-1,Ne="-",me=h._offset),ve=d._offset+(u.y0+u.y1)/2,Ae.attr("text-anchor",$e),De.attr("d","M0,0L"+Ne+Ut+","+Ut+"V"+(At+re.height/2)+"h"+Ne+(At*2+re.width)+"V-"+(At+re.height/2)+"H"+Ne+Ut+"V-"+Ut+"Z");var Pe=re.height/2,je=b-re.top-Pe,Ie="clip"+a._uid+"commonlabel"+d._id,Ue;if(me<re.width+2*At+Ut){Ue="M-"+(Ut+At)+"-"+Pe+"h-"+(re.width-At)+"V"+Pe+"h"+(re.width-At)+"Z";var ke=re.width-me+At;ia.positionText(Ae,ke,je),$e==="end"&&Ae.selectAll("tspan").each(function(){var qe=Qi.select(this),Ye=Ha.tester.append("text").text(qe.text()).call(Ha.font,Ce),Qe=Dn(r,Ye.node());Math.round(Qe.width)<Math.round(re.width)&&qe.attr("x",ke-Qe.width),Ye.remove()})}else ia.positionText(Ae,ye*(At+Ut),je),Ue=null;var We=a._topclips.selectAll("#"+Ie).data(Ue?[0]:[]);We.enter().append("clipPath").attr("id",Ie).append("path"),We.exit().remove(),We.select("path").attr("d",Ue),Ha.setClipUrl(Ae,Ue?Ie:null,r)}le.attr("transform",Hu(me,ve))}),xa.isUnifiedHover(i)){l.selectAll("g.hovertext").remove();var C=t.filter(function(le){return le.hoverinfo!=="none"});if(C.length===0)return;var $=a.hoverlabel,N=$.font,E={showlegend:!0,legend:{title:{text:m,font:N},font:N,bgcolor:$.bgcolor,bordercolor:$.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},P={font:N};i5(E,P,r._fullData);var R=P.legend;R.entries=[];for(var L=0;L<C.length;L++){var z=C[L];if(z.hoverinfo!=="none"){var I=Yy(z,!0,i,a,m),H=I[0],V=I[1];z.name=V,V!==""?z.text=V+" : "+H:z.text=H;var O=z.cd[z.index];O&&(O.mc&&(z.mc=O.mc),O.mcc&&(z.mc=O.mcc),O.mlc&&(z.mlc=O.mlc),O.mlcc&&(z.mlc=O.mlcc),O.mlw&&(z.mlw=O.mlw),O.mrc&&(z.mrc=O.mrc),O.dir&&(z.dir=O.dir)),z._distinct=!0,R.entries.push([z])}}R.entries.sort(function(le,De){return le[0].trace.index-De[0].trace.index}),R.layer=l,R._inHover=!0,R._groupTitleFont=$.grouptitlefont,n5(r,R);var X=l.select("g.legend"),G=Dn(r,X.node()),Y=G.width+2*At,K=G.height+2*At,Z=C[0],q=(Z.x0+Z.x1)/2,ie=(Z.y0+Z.y1)/2,fe=!(yo.traceIs(Z.trace,"bar-like")||yo.traceIs(Z.trace,"box-violin")),be,ne;p==="y"?fe?(ne=ie-At,be=ie+At):(ne=Math.min.apply(null,C.map(function(le){return Math.min(le.y0,le.y1)})),be=Math.max.apply(null,C.map(function(le){return Math.max(le.y0,le.y1)}))):ne=be=rr.mean(C.map(function(le){return(le.y0+le.y1)/2}))-K/2;var U,ae;p==="x"?fe?(U=q+At,ae=q-At):(U=Math.max.apply(null,C.map(function(le){return Math.max(le.x0,le.x1)})),ae=Math.min.apply(null,C.map(function(le){return Math.min(le.x0,le.x1)}))):U=ae=rr.mean(C.map(function(le){return(le.x0+le.x1)/2}))-Y/2;var ce=h._offset,se=d._offset;be+=se,U+=ce,ae+=ce-Y,ne+=se-K;var pe,ge;return U+Y<x&&U>=0?pe=U:ae+Y<x&&ae>=0?pe=ae:ce+Y<x?pe=ce:U-q<q-ae+Y?pe=x-Y:pe=0,pe+=At,be+K<_&&be>=0?ge=be:ne+K<_&&ne>=0?ge=ne:se+K<_?ge=se:be-ie<ie-ne+K?ge=_-K:ge=0,ge+=At,X.attr("transform",Hu(pe-1,ge-1)),X}var _e=l.selectAll("g.hovertext").data(t,function(le){return Tw(le)});return _e.enter().append("g").classed("hovertext",!0).each(function(){var le=Qi.select(this);le.append("rect").call(dr.fill,dr.addOpacity(o,.8)),le.append("text").classed("name",!0),le.append("path").style("stroke-width","1px"),le.append("text").classed("nums",!0).call(Ha.font,c,v)}),_e.exit().remove(),_e.each(function(le){var De=Qi.select(this).attr("transform",""),Ae=le.color;Array.isArray(Ae)&&(Ae=Ae[le.eventData[0].pointNumber]);var ze=le.bgcolor||Ae,Ve=dr.combine(dr.opacity(ze)?ze:dr.defaultLine,o),oe=dr.combine(dr.opacity(Ae)?Ae:dr.defaultLine,o),Ce=le.borderColor||dr.contrast(Ve),re=Yy(le,T,i,a,m,De),me=re[0],ve=re[1],Me=De.select("text.nums").call(Ha.font,le.fontFamily||c,le.fontSize||v,le.fontColor||Ce).text(me).attr("data-notex",1).call(ia.positionText,0,0).call(ia.convertToTspans,r),Se=De.select("text.name"),$e=0,ye=0;if(ve&&ve!==me){Se.call(Ha.font,le.fontFamily||c,le.fontSize||v,oe).text(ve).attr("data-notex",1).call(ia.positionText,0,0).call(ia.convertToTspans,r);var Ne=Dn(r,Se.node());$e=Ne.width+2*At,ye=Ne.height+2*At}else Se.remove(),De.select("rect").remove();De.select("path").style({fill:Ve,stroke:Ce});var Pe=le.xa._offset+(le.x0+le.x1)/2,je=le.ya._offset+(le.y0+le.y1)/2,Ie=Math.abs(le.x1-le.x0),Ue=Math.abs(le.y1-le.y0),ke=Dn(r,Me.node()),We=ke.width/a._invScaleX,qe=ke.height/a._invScaleY;le.ty0=(b-ke.top)/a._invScaleY,le.bx=We+2*At,le.by=Math.max(qe+2*At,ye),le.anchor="start",le.txwidth=We,le.tx2width=$e,le.offset=0;var Ye=(We+Ut+At+$e)*a._invScaleX,Qe,F;if(n)le.pos=Pe,Qe=je+Ue/2+Ye<=_,F=je-Ue/2-Ye>=0,(le.idealAlign==="top"||!Qe)&&F?(je-=Ue/2,le.anchor="end"):Qe?(je+=Ue/2,le.anchor="start"):le.anchor="middle";else if(le.pos=je,Qe=Pe+Ie/2+Ye<=x,F=Pe-Ie/2-Ye>=0,(le.idealAlign==="left"||!Qe)&&F)Pe-=Ie/2,le.anchor="end";else if(Qe)Pe+=Ie/2,le.anchor="start";else{le.anchor="middle";var B=Ye/2,j=Pe+B-x,W=Pe-B;j>0&&(Pe-=j),W<0&&(Pe+=-W)}Me.attr("text-anchor",le.anchor),$e&&Se.attr("text-anchor",le.anchor),De.attr("transform",Hu(Pe,je)+(n?t5(ww):""))}),_e}function Yy(t,e,r,a,i,n){var o="",l="";t.nameOverride!==void 0&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=rr.templateString(t.name,t.trace._meta)),o=Ky(t.name,t.nameLength));var s=r.charAt(0),f=s==="x"?"y":"x";t.zLabel!==void 0?(t.xLabel!==void 0&&(l+="x: "+t.xLabel+"<br>"),t.yLabel!==void 0&&(l+="y: "+t.yLabel+"<br>"),t.trace.type!=="choropleth"&&t.trace.type!=="choroplethmapbox"&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[s+"Label"]===i?l=t[f+"Label"]||"":t.xLabel===void 0?t.yLabel!==void 0&&t.trace.type!=="scattercarpet"&&(l=t.yLabel):t.yLabel===void 0?l=t.xLabel:l="("+t.xLabel+", "+t.yLabel+")",(t.text||t.text===0)&&!Array.isArray(t.text)&&(l+=(l?"<br>":"")+t.text),t.extraText!==void 0&&(l+=(l?"<br>":"")+t.extraText),n&&l===""&&!t.hovertemplate&&(o===""&&n.remove(),l=o);var c=t.hovertemplate||!1;if(c){var v=t.hovertemplateLabels||t;t[s+"Label"]!==i&&(v[s+"other"]=v[s+"Val"],v[s+"otherLabel"]=v[s+"Label"]),l=rr.hovertemplateString(c,v,a._d3locale,t.eventData[0]||{},t.trace._meta),l=l.replace(u5,function(u,h){return o=Ky(h,t.nameLength),""})}return[l,o]}function v5(t,e,r){var a=0,i=1,n=t.size(),o=new Array(n),l=0;t.each(function(T){var k=T[e],S=k._id.charAt(0)==="x",M=k.range;l===0&&M&&M[0]>M[1]!==S&&(i=-1),o[l++]=[{datum:T,traceIndex:T.trace.index,dp:0,pos:T.pos,posref:T.posref,size:T.by*(S?o5:1)/2,pmin:0,pmax:S?r.width:r.height}]}),o.sort(function(T,k){return T[0].posref-k[0].posref||i*(k[0].traceIndex-T[0].traceIndex)});var s,f,c,v,u,h,d;function p(T){var k=T[0],S=T[T.length-1];if(f=k.pmin-k.pos-k.dp+k.size,c=S.pos+S.dp+S.size-k.pmax,f>.01){for(u=T.length-1;u>=0;u--)T[u].dp+=f;s=!1}if(!(c<.01)){if(f<-.01){for(u=T.length-1;u>=0;u--)T[u].dp-=c;s=!1}if(s){var M=0;for(v=0;v<T.length;v++)h=T[v],h.pos+h.dp+h.size>k.pmax&&M++;for(v=T.length-1;v>=0&&!(M<=0);v--)h=T[v],h.pos>k.pmax-1&&(h.del=!0,M--);for(v=0;v<T.length&&!(M<=0);v++)if(h=T[v],h.pos<k.pmin+1)for(h.del=!0,M--,c=h.size*2,u=T.length-1;u>=0;u--)T[u].dp-=c;for(v=T.length-1;v>=0&&!(M<=0);v--)h=T[v],h.pos+h.dp+h.size>k.pmax&&(h.del=!0,M--)}}}for(;!s&&a<=n;){for(a++,s=!0,v=0;v<o.length-1;){var y=o[v],m=o[v+1],g=y[y.length-1],w=m[0];if(f=g.pos+g.dp+g.size-w.pos-w.dp+w.size,f>.01&&g.pmin===w.pmin&&g.pmax===w.pmax){for(u=m.length-1;u>=0;u--)m[u].dp+=f;for(y.push.apply(y,m),o.splice(v+1,1),d=0,u=y.length-1;u>=0;u--)d+=y[u].dp;for(c=d/y.length,u=y.length-1;u>=0;u--)y[u].dp-=c;s=!1}else v++}o.forEach(p)}for(v=o.length-1;v>=0;v--){var b=o[v];for(u=b.length-1;u>=0;u--){var x=b[u],_=x.datum;_.offset=x.dp,_.del=x.del}}}function Aw(t,e,r,a){var i=function(o){return o*r},n=function(o){return o*a};t.each(function(o){var l=Qi.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),f=o.anchor,c=f==="end"?-1:1,v={start:1,end:-1,middle:0}[f],u=v*(Ut+At),h=u+v*(o.txwidth+At),d=0,p=o.offset,y=f==="middle";y&&(u-=o.tx2width/2,h+=o.txwidth/2+At),e&&(p*=-s5,d=o.offset*l5),l.select("path").attr("d",y?"M-"+i(o.bx/2+o.tx2width/2)+","+n(p-o.by/2)+"h"+i(o.bx)+"v"+n(o.by)+"h-"+i(o.bx)+"Z":"M0,0L"+i(c*Ut+d)+","+n(Ut+p)+"v"+n(o.by/2-Ut)+"h"+i(c*o.bx)+"v-"+n(o.by)+"H"+i(c*Ut+d)+"V"+n(p-Ut)+"Z");var m=d+u,g=p+o.ty0-o.by/2+At,w=o.textAlign||"auto";w!=="auto"&&(w==="left"&&f!=="start"?(s.attr("text-anchor","start"),m=y?-o.bx/2-o.tx2width/2+At:-o.bx-At):w==="right"&&f!=="end"&&(s.attr("text-anchor","end"),m=y?o.bx/2-o.tx2width/2-At:o.bx+At)),s.call(ia.positionText,i(m),n(g)),o.tx2width&&(l.select("text.name").call(ia.positionText,i(h+v*At+d),n(p+o.ty0-o.by/2+At)),l.select("rect").call(Ha.setRect,i(h+(v-1)*o.tx2width/2+d),n(p-o.by/2-1),i(o.tx2width),n(o.by+2)))})}function d5(t,e){var r=t.index,a=t.trace||{},i=t.cd[0],n=t.cd[r]||{};function o(u){return u||Za(u)&&u===0}var l=Array.isArray(r)?function(u,h){var d=rr.castOption(i,r,u);return o(d)?d:rr.extractOption({},a,"",h)}:function(u,h){return rr.extractOption(n,a,u,h)};function s(u,h,d){var p=l(h,d);o(p)&&(t[u]=p)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),t.posref=e==="y"||e==="closest"&&a.orientation==="h"?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=rr.constrain(t.x0,0,t.xa._length),t.x1=rr.constrain(t.x1,0,t.xa._length),t.y0=rr.constrain(t.y0,0,t.ya._length),t.y1=rr.constrain(t.y1,0,t.ya._length),t.xLabelVal!==void 0&&(t.xLabel="xLabel"in t?t.xLabel:yi.hoverLabelText(t.xa,t.xLabelVal,a.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),t.yLabelVal!==void 0&&(t.yLabel="yLabel"in t?t.yLabel:yi.hoverLabelText(t.ya,t.yLabelVal,a.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),t.zLabelVal!==void 0&&t.zLabel===void 0&&(t.zLabel=String(t.zLabelVal)),!isNaN(t.xerr)&&!(t.xa.type==="log"&&t.xerr<=0)){var f=yi.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;t.xerrneg!==void 0?t.xLabel+=" +"+f+" / -"+yi.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+f,e==="x"&&(t.distance+=1)}if(!isNaN(t.yerr)&&!(t.ya.type==="log"&&t.yerr<=0)){var c=yi.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;t.yerrneg!==void 0?t.yLabel+=" +"+c+" / -"+yi.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+c,e==="y"&&(t.distance+=1)}var v=t.hoverinfo||t.trace.hoverinfo;return v&&v!=="all"&&(v=Array.isArray(v)?v:v.split("+"),v.indexOf("x")===-1&&(t.xLabel=void 0),v.indexOf("y")===-1&&(t.yLabel=void 0),v.indexOf("z")===-1&&(t.zLabel=void 0),v.indexOf("text")===-1&&(t.text=void 0),v.indexOf("name")===-1&&(t.name=void 0)),t}function qy(t,e,r){var a=r.container,i=r.fullLayout,n=i._size,o=r.event,l=!!e.hLinePoint,s=!!e.vLinePoint,f,c;if(a.selectAll(".spikeline").remove(),!!(s||l)){var v=dr.combine(i.plot_bgcolor,i.paper_bgcolor);if(l){var u=e.hLinePoint,h,d;f=u&&u.xa,c=u&&u.ya;var p=c.spikesnap;p==="cursor"?(h=o.pointerX,d=o.pointerY):(h=f._offset+u.x,d=c._offset+u.y);var y=Wy.readability(u.color,v)<1.5?dr.contrast(v):u.color,m=c.spikemode,g=c.spikethickness,w=c.spikecolor||y,b=yi.getPxPosition(t,c),x,_;if(m.indexOf("toaxis")!==-1||m.indexOf("across")!==-1){if(m.indexOf("toaxis")!==-1&&(x=b,_=h),m.indexOf("across")!==-1){var T=c._counterDomainMin,k=c._counterDomainMax;c.anchor==="free"&&(T=Math.min(T,c.position),k=Math.max(k,c.position)),x=n.l+T*n.w,_=n.l+k*n.w}a.insert("line",":first-child").attr({x1:x,x2:_,y1:d,y2:d,"stroke-width":g,stroke:w,"stroke-dasharray":Ha.dashStyle(c.spikedash,g)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:x,x2:_,y1:d,y2:d,"stroke-width":g+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}m.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:b+(c.side!=="right"?g:-g),cy:d,r:g,fill:w}).classed("spikeline",!0)}if(s){var S=e.vLinePoint,M,D;f=S&&S.xa,c=S&&S.ya;var A=f.spikesnap;A==="cursor"?(M=o.pointerX,D=o.pointerY):(M=f._offset+S.x,D=c._offset+S.y);var C=Wy.readability(S.color,v)<1.5?dr.contrast(v):S.color,$=f.spikemode,N=f.spikethickness,E=f.spikecolor||C,P=yi.getPxPosition(t,f),R,L;if($.indexOf("toaxis")!==-1||$.indexOf("across")!==-1){if($.indexOf("toaxis")!==-1&&(R=P,L=D),$.indexOf("across")!==-1){var z=f._counterDomainMin,I=f._counterDomainMax;f.anchor==="free"&&(z=Math.min(z,f.position),I=Math.max(I,f.position)),R=n.t+(1-I)*n.h,L=n.t+(1-z)*n.h}a.insert("line",":first-child").attr({x1:M,x2:M,y1:R,y2:L,"stroke-width":N,stroke:E,"stroke-dasharray":Ha.dashStyle(f.spikedash,N)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:M,x2:M,y1:R,y2:L,"stroke-width":N+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}$.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:M,cy:P-(f.side!=="top"?N:-N),r:N,fill:E}).classed("spikeline",!0)}}}function h5(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var a=r.length-1;a>=0;a--){var i=r[a],n=t._hoverdata[a];if(i.curveNumber!==n.curveNumber||String(i.pointNumber)!==String(n.pointNumber)||String(i.pointNumbers)!==String(n.pointNumbers))return!0}return!1}function Zy(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function Ky(t,e){return ia.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function p5(t,e){for(var r=e.charAt(0),a=[],i=[],n=[],o=0;o<t.length;o++){var l=t[o];yo.traceIs(l.trace,"bar-like")||yo.traceIs(l.trace,"box-violin")?n.push(l):l.trace[r+"period"]?i.push(l):a.push(l)}return a.concat(i).concat(n)}function Qy(t,e,r){var a=e[t+"a"],i=e[t+"Val"],n=e.cd[0];if(a.type==="category"||a.type==="multicategory")i=a._categoriesMap[i];else if(a.type==="date"){var o=e.trace[t+"periodalignment"];if(o){var l=e.cd[e.index],s=l[t+"Start"];s===void 0&&(s=l[t]);var f=l[t+"End"];f===void 0&&(f=l[t]);var c=f-s;o==="end"?i+=c:o==="middle"&&(i+=c/2)}i=a.d2c(i)}return n&&n.t&&n.t.posLetter===a._id&&(r.boxmode==="group"||r.violinmode==="group")&&(i+=n.t.dPos),i}function Mw(t){return t.offsetTop+t.clientTop}function Sw(t){return t.offsetLeft+t.clientLeft}function Dn(t,e){var r=t._fullLayout,a=e.getBoundingClientRect(),i=a.left,n=a.top,o=i+a.width,l=n+a.height,s=rr.apply3DTransform(r._invTransform)(i,n),f=rr.apply3DTransform(r._invTransform)(o,l),c=s[0],v=s[1],u=f[0],h=f[1];return{x:c,y:v,width:u-c,height:h-v,top:Math.min(v,h),left:Math.min(c,u),right:Math.max(c,u),bottom:Math.max(v,h)}}var m5=de,y5=ut,g5=ha.isUnifiedHover,Jh=function(e,r,a,i){i=i||{};var n=r.legend;function o(l){i.font[l]||(i.font[l]=n?r.legend.font[l]:r.font[l])}r&&g5(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),n?(i.bgcolor||(i.bgcolor=y5.combine(r.legend.bgcolor,r.paper_bgcolor)),i.bordercolor||(i.bordercolor=r.legend.bordercolor)):i.bgcolor||(i.bgcolor=r.paper_bgcolor)),a("hoverlabel.bgcolor",i.bgcolor),a("hoverlabel.bordercolor",i.bordercolor),a("hoverlabel.namelength",i.namelength),m5.coerceFont(a,"hoverlabel.font",i.font),a("hoverlabel.align",i.align)},b5=de,x5=Jh,_5=Yl,w5=function(e,r){function a(i,n){return b5.coerce(e,r,_5,i,n)}x5(e,r,a)},Jy=de,T5=cc,k5=Jh,A5=function(e,r,a,i){function n(l,s){return Jy.coerce(e,r,T5,l,s)}var o=Jy.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),k5(e,r,n,o)},M5=de,S5=Yl,Lw=function(e,r){function a(i,n){return r[i]!==void 0?r[i]:M5.coerce(e,r,S5,i,n)}return a("clickmode"),a("hovermode")},eg=de,L5=Yl,C5=Lw,D5=Jh,$5=function(e,r){function a(f,c){return eg.coerce(e,r,L5,f,c)}var i=C5(e,r);i&&(a("hoverdistance"),a("spikedistance"));var n=a("dragmode");n==="select"&&a("selectdirection");var o=r._has("mapbox"),l=r._has("geo"),s=r._basePlotModules.length;r.dragmode==="zoom"&&((o||l)&&s===1||o&&l&&s===2)&&(r.dragmode="pan"),D5(e,r,a),eg.coerceFont(a,"hoverlabel.grouptitlefont",r.hoverlabel.font)},Rd=de,tg=tt,P5=function(e){var r=e.calcdata,a=e._fullLayout;function i(f){return function(c){return Rd.coerceHoverinfo({hoverinfo:c},{_module:f._module},a)}}for(var n=0;n<r.length;n++){var o=r[n],l=o[0].trace;if(!tg.traceIs(l,"pie-like")){var s=tg.traceIs(l,"2dMap")?E5:Rd.fillArray;s(l.hoverinfo,o,"hi",i(l)),l.hovertemplate&&s(l.hovertemplate,o,"ht"),l.hoverlabel&&(s(l.hoverlabel.bgcolor,o,"hbg"),s(l.hoverlabel.bordercolor,o,"hbc"),s(l.hoverlabel.font.size,o,"hts"),s(l.hoverlabel.font.color,o,"htc"),s(l.hoverlabel.font.family,o,"htf"),s(l.hoverlabel.namelength,o,"hnl"),s(l.hoverlabel.align,o,"hta"))}}};function E5(t,e,r,a){a=a||Rd.identity,Array.isArray(t)&&(e[0][r]=a(t))}var R5=tt,z5=Sc.hover,I5=function(e,r,a){var i=R5.getComponentMethod("annotations","onClick")(e,e._hoverdata);a!==void 0&&z5(e,r,a,!0);function n(){e.emit("plotly_click",{points:e._hoverdata,event:r})}e._hoverdata&&r&&r.target&&(i&&i.then?i.then(n):n(),r.stopImmediatePropagation&&r.stopImmediatePropagation())},F5=yt,Of=de,N5=Va,Wo=ha,rg=Yl,ag=Sc,Ca={moduleType:"component",name:"fx",constants:fc,schema:{layout:rg},attributes:cc,layoutAttributes:rg,supplyLayoutGlobalDefaults:w5,supplyDefaults:A5,supplyLayoutDefaults:$5,calc:P5,getDistanceFunction:Wo.getDistanceFunction,getClosest:Wo.getClosest,inbox:Wo.inbox,quadrature:Wo.quadrature,appendArrayPointValue:Wo.appendArrayPointValue,castHoverOption:O5,castHoverinfo:B5,hover:ag.hover,unhover:N5.unhover,loneHover:ag.loneHover,loneUnhover:H5,click:I5};function H5(t){var e=Of.isD3Selection(t)?t:F5.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function O5(t,e,r){return Of.castOption(t,e,"hoverlabel."+r)}function B5(t,e,r){function a(i){return Of.coerceHoverinfo({hoverinfo:i},{_module:t._module},e)}return Of.castOption(t,r,"hoverinfo",a)}var wn={};(function(t){t.selectMode=function(e){return e==="lasso"||e==="select"},t.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},t.openMode=function(e){return e==="drawline"||e==="drawopenpath"},t.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},t.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}})(wn);var ep=function(e){var r=e._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})},Lc={},Cw={exports:{}},tp={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("")}},Tn={},Es=32,rp={CIRCLE_SIDES:Es,i000:0,i090:Es/4,i180:Es/2,i270:Es/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)},j5=de.strTranslate;function Dw(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}function G5(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}}function U5(t){var e=t._id.charAt(0)==="y"?1:0;return function(r){return Dw(t,r[e])}}function V5(t){return j5(t.xaxis._offset,t.yaxis._offset)}var ap={p2r:Dw,r2p:G5,axValue:U5,getTransform:V5};(function(t){var e=u1,r=rp,a=r.CIRCLE_SIDES,i=r.SQRT2,n=ap,o=n.p2r,l=n.r2p,s=[0,3,4,5,6,1,2],f=[0,3,4,1,2];t.writePaths=function(u){var h=u.length;if(!h)return"M0,0Z";for(var d="",p=0;p<h;p++)for(var y=u[p].length,m=0;m<y;m++){var g=u[p][m][0];if(g==="Z")d+="Z";else for(var w=u[p][m].length,b=0;b<w;b++){var x=b;g==="Q"||g==="S"?x=f[b]:g==="C"&&(x=s[b]),d+=u[p][m][x],b>0&&b<w-1&&(d+=",")}}return d},t.readPaths=function(u,h,d,p){var y=e(u),m=[],g=-1,w=function(){g++,m[g]=[]},b,x=0,_=0,T,k,S=function(){T=x,k=_};S();for(var M=0;M<y.length;M++){var D=[],A,C,$,N,E=y[M][0],P=E;switch(E){case"M":w(),x=+y[M][1],_=+y[M][2],D.push([P,x,_]),S();break;case"Q":case"S":A=+y[M][1],$=+y[M][2],x=+y[M][3],_=+y[M][4],D.push([P,x,_,A,$]);break;case"C":A=+y[M][1],$=+y[M][2],C=+y[M][3],N=+y[M][4],x=+y[M][5],_=+y[M][6],D.push([P,x,_,A,$,C,N]);break;case"T":case"L":x=+y[M][1],_=+y[M][2],D.push([P,x,_]);break;case"H":P="L",x=+y[M][1],D.push([P,x,_]);break;case"V":P="L",_=+y[M][1],D.push([P,x,_]);break;case"A":P="L";var R=+y[M][1],L=+y[M][2];+y[M][4]||(R=-R,L=-L);var z=x-R,I=_;for(b=1;b<=a/2;b++){var H=2*Math.PI*b/a;D.push([P,z+R*Math.cos(H),I+L*Math.sin(H)])}break;case"Z":(x!==T||_!==k)&&(x=T,_=k,D.push([P,x,_]));break}for(var V=(d||{}).domain,O=h._fullLayout._size,X=d&&d.xsizemode==="pixel",G=d&&d.ysizemode==="pixel",Y=p===!1,K=0;K<D.length;K++){for(b=0;b+2<7;b+=2){var Z=D[K][b+1],q=D[K][b+2];Z===void 0||q===void 0||(x=Z,_=q,d&&(d.xaxis&&d.xaxis.p2r?(Y&&(Z-=d.xaxis._offset),X?Z=l(d.xaxis,d.xanchor)+Z:Z=o(d.xaxis,Z)):(Y&&(Z-=O.l),V?Z=V.x[0]+Z/O.w:Z=Z/O.w),d.yaxis&&d.yaxis.p2r?(Y&&(q-=d.yaxis._offset),G?q=l(d.yaxis,d.yanchor)-q:q=o(d.yaxis,q)):(Y&&(q-=O.t),V?q=V.y[1]-q/O.h:q=1-q/O.h)),D[K][b+1]=Z,D[K][b+2]=q)}m[g].push(D[K].slice())}}return m};function c(u,h){return Math.abs(u-h)<=1e-6}function v(u,h){var d=h[1]-u[1],p=h[2]-u[2];return Math.sqrt(d*d+p*p)}t.pointsOnRectangle=function(u){var h=u.length;if(h!==5)return!1;for(var d=1;d<3;d++){var p=u[0][d]-u[1][d],y=u[3][d]-u[2][d];if(!c(p,y))return!1;var m=u[0][d]-u[3][d],g=u[1][d]-u[2][d];if(!c(m,g))return!1}return!c(u[0][1],u[1][1])&&!c(u[0][1],u[3][1])?!1:!!(v(u[0],u[1])*v(u[0],u[3]))},t.pointsOnEllipse=function(u){var h=u.length;if(h!==a+1)return!1;h=a;for(var d=0;d<h;d++){var p=(h*2-d)%h,y=(h/2+p)%h,m=(h/2+d)%h;if(!c(v(u[d],u[m]),v(u[p],u[y])))return!1}return!0},t.handleEllipse=function(u,h,d){if(!u)return[h,d];var p=t.ellipseOver({x0:h[0],y0:h[1],x1:d[0],y1:d[1]}),y=(p.x1+p.x0)/2,m=(p.y1+p.y0)/2,g=(p.x1-p.x0)/2,w=(p.y1-p.y0)/2;g||(g=w=w/i),w||(w=g=g/i);for(var b=[],x=0;x<a;x++){var _=x*2*Math.PI/a;b.push([y+g*Math.cos(_),m+w*Math.sin(_)])}return b},t.ellipseOver=function(u){var h=u.x0,d=u.y0,p=u.x1,y=u.y1,m=p-h,g=y-d;h-=m,d-=g;var w=(h+p)/2,b=(d+y)/2,x=i;return m*=x,g*=x,{x0:w-m,y0:b-g,x1:w+m,y1:b+g}},t.fixDatesForPaths=function(u,h,d){var p=h.type==="date",y=d.type==="date";if(!p&&!y)return u;for(var m=0;m<u.length;m++)for(var g=0;g<u[m].length;g++)for(var w=0;w+2<u[m][g].length;w+=2)p&&(u[m][g][w+1]=u[m][g][w+1].replace(" ","_")),y&&(u[m][g][w+2]=u[m][g][w+2].replace(" ","_"));return u}})(Tn);var $w=wn,W5=$w.drawMode,X5=$w.openMode,Ro=rp,ig=Ro.i000,ng=Ro.i090,og=Ro.i180,lg=Ro.i270,Y5=Ro.cos45,q5=Ro.sin45,Pw=ap,Rs=Pw.p2r,vi=Pw.r2p,Z5=gn,K5=Z5.clearOutline,Cc=Tn,Q5=Cc.readPaths,J5=Cc.writePaths,e3=Cc.ellipseOver,t3=Cc.fixDatesForPaths,Ew=function(e,r){if(e.length){var a=e[0][0];if(a){var i=a.getAttribute("d"),n=r.gd,o=n._fullLayout.newshape,l=r.plotinfo,s=l.xaxis,f=l.yaxis,c=!!l.domain||!l.xaxis,v=!!l.domain||!l.yaxis,u=r.isActiveShape,h=r.dragmode,d=(n.layout||{}).shapes||[];if(!W5(h)&&u!==void 0){var p=n._fullLayout._activeShapeIndex;if(p<d.length)switch(n._fullLayout.shapes[p].type){case"rect":h="drawrect";break;case"circle":h="drawcircle";break;case"line":h="drawline";break;case"path":var y=d[p].path||"";y[y.length-1]==="Z"?h="drawclosedpath":h="drawopenpath";break}}var m=X5(h),g=Q5(i,n,l,u),w={editable:!0,xref:c?"paper":s._id,yref:v?"paper":f._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};m||(w.fillcolor=o.fillcolor,w.fillrule=o.fillrule);var b;if(g.length===1&&(b=g[0]),b&&b.length===5&&h==="drawrect")w.type="rect",w.x0=b[0][1],w.y0=b[0][2],w.x1=b[2][1],w.y1=b[2][2];else if(b&&h==="drawline")w.type="line",w.x0=b[0][1],w.y0=b[0][2],w.x1=b[1][1],w.y1=b[1][2];else if(b&&h==="drawcircle"){w.type="circle";var x=b[ig][1],_=b[ng][1],T=b[og][1],k=b[lg][1],S=b[ig][2],M=b[ng][2],D=b[og][2],A=b[lg][2],C=l.xaxis&&(l.xaxis.type==="date"||l.xaxis.type==="log"),$=l.yaxis&&(l.yaxis.type==="date"||l.yaxis.type==="log");C&&(x=vi(l.xaxis,x),_=vi(l.xaxis,_),T=vi(l.xaxis,T),k=vi(l.xaxis,k)),$&&(S=vi(l.yaxis,S),M=vi(l.yaxis,M),D=vi(l.yaxis,D),A=vi(l.yaxis,A));var N=(_+k)/2,E=(S+D)/2,P=(k-_+T-x)/2,R=(A-M+D-S)/2,L=e3({x0:N,y0:E,x1:N+P*Y5,y1:E+R*q5});C&&(L.x0=Rs(l.xaxis,L.x0),L.x1=Rs(l.xaxis,L.x1)),$&&(L.y0=Rs(l.yaxis,L.y0),L.y1=Rs(l.yaxis,L.y1)),w.x0=L.x0,w.y0=L.y0,w.x1=L.x1,w.y1=L.y1}else w.type="path",s&&f&&t3(g,s,f),w.path=J5(g),b=null;K5(n);for(var z=r.editHelpers,I=(z||{}).modifyItem,H=[],V=0;V<d.length;V++){var O=n._fullLayout.shapes[V];if(H[V]=O._input,u!==void 0&&V===n._fullLayout._activeShapeIndex){var X=w;switch(O.type){case"line":case"rect":case"circle":I("x0",X.x0),I("x1",X.x1),I("y0",X.y0),I("y1",X.y1);break;case"path":I("path",X.path);break}}}return u===void 0?(H.push(w),H):z?z.getUpdateObj():{}}}},r3=wn,a3=r3.selectMode,i3=gn,n3=i3.clearOutline,ip=Tn,o3=ip.readPaths,l3=ip.writePaths,s3=ip.fixDatesForPaths,Rw=function(e,r){if(e.length){var a=e[0][0];if(a){var i=a.getAttribute("d"),n=r.gd,o=n._fullLayout.newselection,l=r.plotinfo,s=l.xaxis,f=l.yaxis,c=r.isActiveSelection,v=r.dragmode,u=(n.layout||{}).selections||[];if(!a3(v)&&c!==void 0){var h=n._fullLayout._activeSelectionIndex;if(h<u.length)switch(n._fullLayout.selections[h].type){case"rect":v="select";break;case"path":v="lasso";break}}var d=o3(i,n,l,c),p={xref:s._id,yref:f._id,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}},y;d.length===1&&(y=d[0]),y&&y.length===5&&v==="select"?(p.type="rect",p.x0=y[0][1],p.y0=y[0][2],p.x1=y[2][1],p.y1=y[2][2]):(p.type="path",s&&f&&s3(d,s,f),p.path=l3(d),y=null),n3(n);for(var m=r.editHelpers,g=(m||{}).modifyItem,w=[],b=0;b<u.length;b++){var x=n._fullLayout.selections[b];if(!x){w[b]=x;continue}if(w[b]=x._input,c!==void 0&&b===n._fullLayout._activeSelectionIndex){var _=p;switch(x.type){case"rect":g("x0",_.x0),g("x1",_.x1),g("y0",_.y0),g("y1",_.y1);break;case"path":g("path",_.path);break}}}return c===void 0?(w.push(p),w):m?m.getUpdateObj():{}}}},f3=de,c3=f3.strTranslate,sg=Va,zw=wn,u3=zw.drawMode,Iw=zw.selectMode,Fw=tt,fg=ut,Dc=rp,v3=Dc.i000,d3=Dc.i090,h3=Dc.i180,p3=Dc.i270,m3=gn,Nw=m3.clearOutlineControllers,np=Tn,zs=np.pointsOnRectangle,Ou=np.pointsOnEllipse,y3=np.writePaths,g3=Ew,b3=Rw,op=function t(e,r,a,i){i||(i=0);var n=a.gd;function o(){t(e,r,a,i++),Ou(e[0])&&l({redrawing:!0})}function l(N){var E={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,E=g3(r,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,E=b3(r,a),n._fullLayout._reselect=!0),Object.keys(E).length&&Fw.call((N||{}).redrawing?"relayout":"_guiRelayout",n,E)}var s=n._fullLayout,f=s._zoomlayer,c=a.dragmode,v=u3(c),u=Iw(c);(v||u)&&(n._fullLayout._outlining=!0),Nw(n),r.attr("d",y3(e));var h,d,p,y,m;if(!i&&(a.isActiveShape||a.isActiveSelection)){m=x3([],e);var g=f.append("g").attr("class","outline-controllers");k(g),$()}function w(N){p=+N.srcElement.getAttribute("data-i"),y=+N.srcElement.getAttribute("data-j"),h[p][y].moveFn=b}function b(N,E){if(e.length){var P=m[p][y][1],R=m[p][y][2],L=e[p],z=L.length;if(zs(L)){var I=N,H=E;if(a.isActiveSelection){var V=cg(L,y);V[1]===L[y][1]?H=0:I=0}for(var O=0;O<z;O++)if(O!==y){var X=L[O];X[1]===L[y][1]&&(X[1]=P+I),X[2]===L[y][2]&&(X[2]=R+H)}if(L[y][1]=P+I,L[y][2]=R+H,!zs(L))for(var G=0;G<z;G++)for(var Y=0;Y<L[G].length;Y++)L[G][Y]=m[p][G][Y]}else L[y][1]=P+N,L[y][2]=R+E;o()}}function x(){l()}function _(){if(e.length&&e[p]&&e[p].length){for(var N=[],E=0;E<e[p].length;E++)E!==y&&N.push(e[p][E]);N.length>1&&!(N.length===2&&N[1][0]==="Z")&&(y===0&&(N[0][0]="M"),e[p]=N,o(),l())}}function T(N,E){if(N===2){p=+E.srcElement.getAttribute("data-i"),y=+E.srcElement.getAttribute("data-j");var P=e[p];!zs(P)&&!Ou(P)&&_()}}function k(N){h=[];for(var E=0;E<e.length;E++){var P=e[E],R=zs(P),L=!R&&Ou(P);h[E]=[];for(var z=P.length,I=0;I<z;I++)if(P[I][0]!=="Z"&&!(L&&I!==v3&&I!==d3&&I!==h3&&I!==p3)){var H=R&&a.isActiveSelection,V;H&&(V=cg(P,I));var O=P[I][1],X=P[I][2],G=N.append(H?"rect":"circle").attr("data-i",E).attr("data-j",I).style({fill:fg.background,stroke:fg.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(H){var Y=V[1]-O,K=V[2]-X,Z=K?5:Math.max(Math.min(25,Math.abs(Y)-5),5),q=Y?5:Math.max(Math.min(25,Math.abs(K)-5),5);G.classed(K?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",Z).attr("height",q).attr("x",O-Z/2).attr("y",X-q/2).attr("transform",c3(Y/2,K/2))}else G.classed("cursor-grab",!0).attr("r",5).attr("cx",O).attr("cy",X);h[E][I]={element:G.node(),gd:n,prepFn:w,doneFn:x,clickFn:T},sg.init(h[E][I])}}}function S(N,E){if(e.length)for(var P=0;P<e.length;P++)for(var R=0;R<e[P].length;R++)for(var L=0;L+2<e[P][R].length;L+=2)e[P][R][L+1]=m[P][R][L+1]+N,e[P][R][L+2]=m[P][R][L+2]+E}function M(N,E){S(N,E),o()}function D(N){p=+N.srcElement.getAttribute("data-i"),p||(p=0),d[p].moveFn=M}function A(){l()}function C(N){N===2&&_3(n)}function $(){if(d=[],!!e.length){var N=0;d[N]={element:r[0][0],gd:n,prepFn:D,doneFn:A,clickFn:C},sg.init(d[N])}}};function x3(t,e){for(var r=0;r<e.length;r++){var a=e[r];t[r]=[];for(var i=0;i<a.length;i++){t[r][i]=[];for(var n=0;n<a[i].length;n++)t[r][i][n]=a[i][n]}}return t}function cg(t,e){var r=t[e][1],a=t[e][2],i=t.length,n,o,l;return n=(e+1)%i,o=t[n][1],l=t[n][2],o===r&&l===a&&(n=(e+2)%i,o=t[n][1],l=t[n][2]),[n,o,l]}function _3(t){if(Iw(t._fullLayout.dragmode)){Nw(t);var e=t._fullLayout._activeSelectionIndex,r=(t.layout||{}).selections||[];if(e<r.length){for(var a=[],i=0;i<r.length;i++)i!==e&&a.push(r[i]);delete t._fullLayout._activeSelectionIndex;var n=t._fullLayout.selections[e];t._fullLayout._deselect={xref:n.xref,yref:n.yref},Fw.call("_guiRelayout",t,{selections:a})}}}var $c={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}},kn={};(function(t){var e=$c,r=de,a=Ot;t.rangeToShapePosition=function(n){return n.type==="log"?n.r2d:function(o){return o}},t.shapePositionToRange=function(n){return n.type==="log"?n.d2r:function(o){return o}},t.decodeDate=function(n){return function(o){return o.replace&&(o=o.replace("_"," ")),n(o)}},t.encodeDate=function(n){return function(o){return n(o).replace(" ","_")}},t.extractPathCoords=function(n,o,l){var s=[],f=n.match(e.segmentRE);return f.forEach(function(c){var v=o[c.charAt(0)].drawn;if(v!==void 0){var u=c.substr(1).match(e.paramRE);if(!(!u||u.length<v)){var h=u[v],d=l?h:r.cleanNumber(h);s.push(d)}}}),s},t.getDataToPixel=function(n,o,l,s){var f=n._fullLayout._size,c;if(o)if(s==="domain")c=function(u){return o._length*(l?1-u:u)+o._offset};else{var v=t.shapePositionToRange(o);c=function(u){return o._offset+o.r2p(v(u,!0))},o.type==="date"&&(c=t.decodeDate(c))}else l?c=function(u){return f.t+f.h*(1-u)}:c=function(u){return f.l+f.w*u};return c},t.getPixelToData=function(n,o,l,s){var f=n._fullLayout._size,c;if(o)if(s==="domain")c=function(u){var h=(u-o._offset)/o._length;return l?1-h:h};else{var v=t.rangeToShapePosition(o);c=function(u){return v(o.p2r(u-o._offset))}}else l?c=function(u){return 1-(u-f.t)/f.h}:c=function(u){return(u-f.l)/f.w};return c},t.roundPositionForSharpStrokeRendering=function(n,o){var l=Math.round(o%2)===1,s=Math.round(n);return l?s+.5:s},t.makeShapesOptionsAndPlotinfo=function(n,o){var l=n._fullLayout.shapes[o]||{},s=n._fullLayout._plots[l.xref+l.yref],f=!!s;return f?s._hadPlotinfo=!0:(s={},l.xref&&l.xref!=="paper"&&(s.xaxis=n._fullLayout[l.xref+"axis"]),l.yref&&l.yref!=="paper"&&(s.yaxis=n._fullLayout[l.yref+"axis"])),s.xsizemode=l.xsizemode,s.ysizemode=l.ysizemode,s.xanchor=l.xanchor,s.yanchor=l.yanchor,{options:l,plotinfo:s}},t.makeSelectionsOptionsAndPlotinfo=function(n,o){var l=n._fullLayout.selections[o]||{},s=n._fullLayout._plots[l.xref+l.yref],f=!!s;return f?s._hadPlotinfo=!0:(s={},l.xref&&(s.xaxis=n._fullLayout[l.xref+"axis"]),l.yref&&(s.yaxis=n._fullLayout[l.yref+"axis"])),{options:l,plotinfo:s}},t.getPathString=function(n,o){var l=o.type,s=a.getRefType(o.xref),f=a.getRefType(o.yref),c=a.getFromId(n,o.xref),v=a.getFromId(n,o.yref),u=n._fullLayout._size,h,d,p,y,m,g,w,b;if(c?s==="domain"?d=function($){return c._offset+c._length*$}:(h=t.shapePositionToRange(c),d=function($){return c._offset+c.r2p(h($,!0))}):d=function($){return u.l+u.w*$},v?f==="domain"?y=function($){return v._offset+v._length*(1-$)}:(p=t.shapePositionToRange(v),y=function($){return v._offset+v.r2p(p($,!0))}):y=function($){return u.t+u.h*(1-$)},l==="path")return c&&c.type==="date"&&(d=t.decodeDate(d)),v&&v.type==="date"&&(y=t.decodeDate(y)),i(o,d,y);if(o.xsizemode==="pixel"){var x=d(o.xanchor);m=x+o.x0,g=x+o.x1}else m=d(o.x0),g=d(o.x1);if(o.ysizemode==="pixel"){var _=y(o.yanchor);w=_-o.y0,b=_-o.y1}else w=y(o.y0),b=y(o.y1);if(l==="line")return"M"+m+","+w+"L"+g+","+b;if(l==="rect")return"M"+m+","+w+"H"+g+"V"+b+"H"+m+"Z";var T=(m+g)/2,k=(w+b)/2,S=Math.abs(T-m),M=Math.abs(k-w),D="A"+S+","+M,A=T+S+","+k,C=T+","+(k-M);return"M"+A+D+" 0 1,1 "+C+D+" 0 0,1 "+A+"Z"};function i(n,o,l){var s=n.path,f=n.xsizemode,c=n.ysizemode,v=n.xanchor,u=n.yanchor;return s.replace(e.segmentRE,function(h){var d=0,p=h.charAt(0),y=e.paramIsX[p],m=e.paramIsY[p],g=e.numParams[p],w=h.substr(1).replace(e.paramRE,function(b){return y[d]?f==="pixel"?b=o(v)+Number(b):b=o(b):m[d]&&(c==="pixel"?b=l(u)-Number(b):b=l(b)),d++,d>g&&(b="X"),b});return d>g&&(w=w.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+h)),p+w})}})(kn);var Hw=tt,ug=de,$n=Ot,w3=Tn.readPaths,T3=op,Ow=gn.clearOutlineControllers,Bu=ut,lp=Et,k3=It.arrayEditor,vg=Va,dg=Pi,Zi=$c,Br=kn,zd=Br.getPathString,Bw={draw:sp,drawOne:jw,eraseActiveShape:S3};function sp(t){var e=t._fullLayout;e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove();for(var r in e._plots){var a=e._plots[r].shapelayer;a&&a.selectAll("path").remove()}for(var i=0;i<e.shapes.length;i++)e.shapes[i].visible&&jw(t,i)}function Is(t){return!!t._fullLayout._outlining}function Pc(t){return!t._context.edits.shapePosition}function jw(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=Br.makeShapesOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input||a.visible===!1)return;if(a.layer!=="below")o(t._fullLayout._shapeUpperLayer);else if(a.xref==="paper"||a.yref==="paper")o(t._fullLayout._shapeLowerLayer);else if(i._hadPlotinfo){var n=i.mainplotinfo||i;o(n.shapelayer)}else o(t._fullLayout._shapeLowerLayer);function o(l){var s=zd(t,a),f={"data-index":e,"fill-rule":a.fillrule,d:s},c=a.opacity,v=a.fillcolor,u=a.line.width?a.line.color:"rgba(0,0,0,0)",h=a.line.width,d=a.line.dash;!h&&a.editable===!0&&(h=5,d="solid");var p=s[s.length-1]!=="Z",y=Pc(t)&&a.editable&&t._fullLayout._activeShapeIndex===e;y&&(v=p?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,c=t._fullLayout.activeshape.opacity);var m=l.append("path").attr(f).style("opacity",c).call(Bu.stroke,u).call(Bu.fill,v).call(lp.dashLine,d,h);Gw(m,t,a);var g;if((y||t._context.edits.shapePosition)&&(g=k3(t.layout,"shapes",a)),y){m.style({cursor:"move"});var w={element:m.node(),plotinfo:i,gd:t,editHelpers:g,isActiveShape:!0},b=w3(s,t);T3(b,m,w)}else t._context.edits.shapePosition?A3(t,m,a,e,l,g):a.editable===!0&&m.style("pointer-events",p||Bu.opacity(v)*c<=.5?"stroke":"all");m.node().addEventListener("click",function(){return M3(t,m)})}}function Gw(t,e,r){var a=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");lp.setClipUrl(t,a?"clip"+e._fullLayout._uid+a:null,e)}function A3(t,e,r,a,i,n){var o=10,l=10,s=r.xsizemode==="pixel",f=r.ysizemode==="pixel",c=r.type==="line",v=r.type==="path",u=n.modifyItem,h,d,p,y,m,g,w,b,x,_,T,k,S,M,D,A=$n.getFromId(t,r.xref),C=$n.getRefType(r.xref),$=$n.getFromId(t,r.yref),N=$n.getRefType(r.yref),E=Br.getDataToPixel(t,A,!1,C),P=Br.getDataToPixel(t,$,!0,N),R=Br.getPixelToData(t,A,!1,C),L=Br.getPixelToData(t,$,!0,N),z=V(),I={element:z.node(),gd:t,prepFn:G,doneFn:Y,clickFn:K},H;vg.init(I),z.node().onmousemove=X;function V(){return c?O():e}function O(){var ne=10,U=Math.max(r.line.width,ne),ae=i.append("g").attr("data-index",a);ae.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":U,"stroke-opacity":"0"});var ce={"fill-opacity":"0"},se=Math.max(U/2,ne);return ae.append("circle").attr({"data-line-point":"start-point",cx:s?E(r.xanchor)+r.x0:E(r.x0),cy:f?P(r.yanchor)-r.y0:P(r.y0),r:se}).style(ce).classed("cursor-grab",!0),ae.append("circle").attr({"data-line-point":"end-point",cx:s?E(r.xanchor)+r.x1:E(r.x1),cy:f?P(r.yanchor)-r.y1:P(r.y1),r:se}).style(ce).classed("cursor-grab",!0),ae}function X(ne){if(Is(t)){H=null;return}if(c)ne.target.tagName==="path"?H="move":H=ne.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var U=I.element.getBoundingClientRect(),ae=U.right-U.left,ce=U.bottom-U.top,se=ne.clientX-U.left,pe=ne.clientY-U.top,ge=!v&&ae>o&&ce>l&&!ne.shiftKey?vg.getCursor(se/ae,1-pe/ce):"move";dg(e,ge),H=ge.split("-")[0]}}function G(ne){Is(t)||(s&&(m=E(r.xanchor)),f&&(g=P(r.yanchor)),r.type==="path"?D=r.path:(h=s?r.x0:E(r.x0),d=f?r.y0:P(r.y0),p=s?r.x1:E(r.x1),y=f?r.y1:P(r.y1)),h<p?(x=h,S="x0",_=p,M="x1"):(x=p,S="x1",_=h,M="x0"),!f&&d<y||f&&d>y?(w=d,T="y0",b=y,k="y1"):(w=y,T="y1",b=d,k="y0"),X(ne),ie(i,r),be(e,r,t),I.moveFn=H==="move"?Z:q,I.altKey=ne.altKey)}function Y(){Is(t)||(dg(e),fe(i),Gw(e,t,r),Hw.call("_guiRelayout",t,n.getUpdateObj()))}function K(){Is(t)||fe(i)}function Z(ne,U){if(r.type==="path"){var ae=function(pe){return pe},ce=ae,se=ae;s?u("xanchor",r.xanchor=R(m+ne)):(ce=function(ge){return R(E(ge)+ne)},A&&A.type==="date"&&(ce=Br.encodeDate(ce))),f?u("yanchor",r.yanchor=L(g+U)):(se=function(ge){return L(P(ge)+U)},$&&$.type==="date"&&(se=Br.encodeDate(se))),u("path",r.path=hg(D,ce,se))}else s?u("xanchor",r.xanchor=R(m+ne)):(u("x0",r.x0=R(h+ne)),u("x1",r.x1=R(p+ne))),f?u("yanchor",r.yanchor=L(g+U)):(u("y0",r.y0=L(d+U)),u("y1",r.y1=L(y+U)));e.attr("d",zd(t,r)),ie(i,r)}function q(ne,U){if(v){var ae=function(Me){return Me},ce=ae,se=ae;s?u("xanchor",r.xanchor=R(m+ne)):(ce=function(Se){return R(E(Se)+ne)},A&&A.type==="date"&&(ce=Br.encodeDate(ce))),f?u("yanchor",r.yanchor=L(g+U)):(se=function(Se){return L(P(Se)+U)},$&&$.type==="date"&&(se=Br.encodeDate(se))),u("path",r.path=hg(D,ce,se))}else if(c){if(H==="resize-over-start-point"){var pe=h+ne,ge=f?d-U:d+U;u("x0",r.x0=s?pe:R(pe)),u("y0",r.y0=f?ge:L(ge))}else if(H==="resize-over-end-point"){var _e=p+ne,le=f?y-U:y+U;u("x1",r.x1=s?_e:R(_e)),u("y1",r.y1=f?le:L(le))}}else{var De=function(Me){return H.indexOf(Me)!==-1},Ae=De("n"),ze=De("s"),Ve=De("w"),oe=De("e"),Ce=Ae?w+U:w,re=ze?b+U:b,me=Ve?x+ne:x,ve=oe?_+ne:_;f&&(Ae&&(Ce=w-U),ze&&(re=b-U)),(!f&&re-Ce>l||f&&Ce-re>l)&&(u(T,r[T]=f?Ce:L(Ce)),u(k,r[k]=f?re:L(re))),ve-me>o&&(u(S,r[S]=s?me:R(me)),u(M,r[M]=s?ve:R(ve)))}e.attr("d",zd(t,r)),ie(i,r)}function ie(ne,U){(s||f)&&ae();function ae(){var ce=U.type!=="path",se=ne.selectAll(".visual-cue").data([0]),pe=1;se.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":pe}).classed("visual-cue",!0);var ge=E(s?U.xanchor:ug.midRange(ce?[U.x0,U.x1]:Br.extractPathCoords(U.path,Zi.paramIsX))),_e=P(f?U.yanchor:ug.midRange(ce?[U.y0,U.y1]:Br.extractPathCoords(U.path,Zi.paramIsY)));if(ge=Br.roundPositionForSharpStrokeRendering(ge,pe),_e=Br.roundPositionForSharpStrokeRendering(_e,pe),s&&f){var le="M"+(ge-1-pe)+","+(_e-1-pe)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";se.attr("d",le)}else if(s){var De="M"+(ge-1-pe)+","+(_e-9-pe)+"v18 h2 v-18 Z";se.attr("d",De)}else{var Ae="M"+(ge-9-pe)+","+(_e-1-pe)+"h18 v2 h-18 Z";se.attr("d",Ae)}}}function fe(ne){ne.selectAll(".visual-cue").remove()}function be(ne,U,ae){var ce=U.xref,se=U.yref,pe=$n.getFromId(ae,ce),ge=$n.getFromId(ae,se),_e="";ce!=="paper"&&!pe.autorange&&(_e+=ce),se!=="paper"&&!ge.autorange&&(_e+=se),lp.setClipUrl(ne,_e?"clip"+ae._fullLayout._uid+_e:null,ae)}}function hg(t,e,r){return t.replace(Zi.segmentRE,function(a){var i=0,n=a.charAt(0),o=Zi.paramIsX[n],l=Zi.paramIsY[n],s=Zi.numParams[n],f=a.substr(1).replace(Zi.paramRE,function(c){return i>=s||(o[i]?c=e(c):l[i]&&(c=r(c)),i++),c});return n+f})}function M3(t,e){if(Pc(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeShapeIndex){pg(t);return}t._fullLayout._activeShapeIndex=a,t._fullLayout._deactivateShape=pg,sp(t)}}}function pg(t){if(Pc(t)){var e=t._fullLayout._activeShapeIndex;e>=0&&(Ow(t),delete t._fullLayout._activeShapeIndex,sp(t))}}function S3(t){if(Pc(t)){Ow(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var a=[],i=0;i<r.length;i++)i!==e&&a.push(r[i]);delete t._fullLayout._activeShapeIndex,Hw.call("_guiRelayout",t,{shapes:a})}}}var pa=tt,Uw=sr,Vw=nr,Lt=tp,L3=Bw.eraseActiveShape,Zn=de,Tt=Zn._,Ct=Cw.exports={};Ct.toImage={name:"toImage",title:function(t){var e=t._context.toImageButtonOptions||{},r=e.format||"png";return r==="png"?Tt(t,"Download plot as a png"):Tt(t,"Download plot")},icon:Lt.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};Zn.notifier(Tt(t,"Taking snapshot - this may take a few seconds"),"long"),r.format!=="svg"&&Zn.isIE()&&(Zn.notifier(Tt(t,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach(function(a){a in e&&(r[a]=e[a])}),pa.call("downloadImage",t,r).then(function(a){Zn.notifier(Tt(t,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){Zn.notifier(Tt(t,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Ct.sendDataToCloud={name:"sendDataToCloud",title:function(t){return Tt(t,"Edit in Chart Studio")},icon:Lt.disk,click:function(t){Uw.sendDataToCloud(t)}};Ct.editInChartStudio={name:"editInChartStudio",title:function(t){return Tt(t,"Edit in Chart Studio")},icon:Lt.pencil,click:function(t){Uw.sendDataToCloud(t)}};Ct.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return Tt(t,"Zoom")},attr:"dragmode",val:"zoom",icon:Lt.zoombox,click:Rr};Ct.pan2d={name:"pan2d",_cat:"pan",title:function(t){return Tt(t,"Pan")},attr:"dragmode",val:"pan",icon:Lt.pan,click:Rr};Ct.select2d={name:"select2d",_cat:"select",title:function(t){return Tt(t,"Box Select")},attr:"dragmode",val:"select",icon:Lt.selectbox,click:Rr};Ct.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return Tt(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Lt.lasso,click:Rr};Ct.drawclosedpath={name:"drawclosedpath",title:function(t){return Tt(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Lt.drawclosedpath,click:Rr};Ct.drawopenpath={name:"drawopenpath",title:function(t){return Tt(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Lt.drawopenpath,click:Rr};Ct.drawline={name:"drawline",title:function(t){return Tt(t,"Draw line")},attr:"dragmode",val:"drawline",icon:Lt.drawline,click:Rr};Ct.drawrect={name:"drawrect",title:function(t){return Tt(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Lt.drawrect,click:Rr};Ct.drawcircle={name:"drawcircle",title:function(t){return Tt(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Lt.drawcircle,click:Rr};Ct.eraseshape={name:"eraseshape",title:function(t){return Tt(t,"Erase active shape")},icon:Lt.eraseshape,click:L3};Ct.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return Tt(t,"Zoom in")},attr:"zoom",val:"in",icon:Lt.zoom_plus,click:Rr};Ct.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return Tt(t,"Zoom out")},attr:"zoom",val:"out",icon:Lt.zoom_minus,click:Rr};Ct.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return Tt(t,"Autoscale")},attr:"zoom",val:"auto",icon:Lt.autoscale,click:Rr};Ct.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return Tt(t,"Reset axes")},attr:"zoom",val:"reset",icon:Lt.home,click:Rr};Ct.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return Tt(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Lt.tooltip_basic,gravity:"ne",click:Rr};Ct.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return Tt(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:Lt.tooltip_compare,gravity:"ne",click:Rr};function Rr(t,e){var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o={},l=Vw.list(t,null,!0),s=n._cartesianSpikesEnabled,f,c;if(a==="zoom"){var v=i==="in"?.5:2,u=(1+v)/2,h=(1-v)/2,d;for(c=0;c<l.length;c++)if(f=l[c],!f.fixedrange)if(d=f._name,i==="auto")o[d+".autorange"]=!0;else if(i==="reset"){if(f._rangeInitial===void 0)o[d+".autorange"]=!0;else{var p=f._rangeInitial.slice();o[d+".range[0]"]=p[0],o[d+".range[1]"]=p[1]}f._showSpikeInitial!==void 0&&(o[d+".showspikes"]=f._showSpikeInitial,s==="on"&&!f._showSpikeInitial&&(s="off"))}else{var y=[f.r2l(f.range[0]),f.r2l(f.range[1])],m=[u*y[0]+h*y[1],u*y[1]+h*y[0]];o[d+".range[0]"]=f.l2r(m[0]),o[d+".range[1]"]=f.l2r(m[1])}}else a==="hovermode"&&(i==="x"||i==="y")&&(i=n._isHoriz?"y":"x",r.setAttribute("data-val",i)),o[a]=i;n._cartesianSpikesEnabled=s,pa.call("_guiRelayout",t,o)}Ct.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return Tt(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:Lt.zoombox,click:Ec};Ct.pan3d={name:"pan3d",_cat:"pan",title:function(t){return Tt(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:Lt.pan,click:Ec};Ct.orbitRotation={name:"orbitRotation",title:function(t){return Tt(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:Lt["3d_rotate"],click:Ec};Ct.tableRotation={name:"tableRotation",title:function(t){return Tt(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:Lt["z-axis"],click:Ec};function Ec(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout._subplots.gl3d||[],o={},l=a.split("."),s=0;s<n.length;s++)o[n[s]+"."+l[1]]=i;var f=i==="pan"?i:"zoom";o.dragmode=f,pa.call("_guiRelayout",t,o)}Ct.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return Tt(t,"Reset camera to default")},attr:"resetDefault",icon:Lt.home,click:fp};Ct.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return Tt(t,"Reset camera to last save")},attr:"resetLastSave",icon:Lt.movie,click:fp};function fp(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=a==="resetLastSave",n=a==="resetDefault",o=t._fullLayout,l=o._subplots.gl3d||[],s={},f=0;f<l.length;f++){var c=l[f],v=c+".camera",u=c+".aspectratio",h=c+".aspectmode",d=o[c]._scene,p;i?(s[v+".up"]=d.viewInitial.up,s[v+".eye"]=d.viewInitial.eye,s[v+".center"]=d.viewInitial.center,p=!0):n&&(s[v+".up"]=null,s[v+".eye"]=null,s[v+".center"]=null,p=!0),p&&(s[u+".x"]=d.viewInitial.aspectratio.x,s[u+".y"]=d.viewInitial.aspectratio.y,s[u+".z"]=d.viewInitial.aspectratio.z,s[h]=d.viewInitial.aspectmode)}pa.call("_guiRelayout",t,s)}Ct.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return Tt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Lt.tooltip_basic,gravity:"ne",click:C3};function Ww(t,e){var r=e.currentTarget,a=r._previousVal,i=t._fullLayout,n=i._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],l={},s={};if(a)s=a,r._previousVal=null;else{for(var f=0;f<n.length;f++){var c=n[f],v=i[c],u=c+".hovermode";l[u]=v.hovermode,s[u]=!1;for(var h=0;h<3;h++){var d=o[h],p=c+"."+d+".showspikes";s[p]=!1,l[p]=v[d].showspikes}}r._previousVal=l}return s}function C3(t,e){var r=Ww(t,e);pa.call("_guiRelayout",t,r)}Ct.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return Tt(t,"Zoom in")},attr:"zoom",val:"in",icon:Lt.zoom_plus,click:cp};Ct.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return Tt(t,"Zoom out")},attr:"zoom",val:"out",icon:Lt.zoom_minus,click:cp};Ct.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return Tt(t,"Reset")},attr:"reset",val:null,icon:Lt.autoscale,click:cp};Ct.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return Tt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Lt.tooltip_basic,gravity:"ne",click:up};function cp(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o=n._subplots.geo||[],l=0;l<o.length;l++){var s=o[l],f=n[s];if(a==="zoom"){var c=f.projection.scale,v=i==="in"?2*c:.5*c;pa.call("_guiRelayout",t,s+".projection.scale",v)}}a==="reset"&&Bf(t,"geo")}Ct.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return Tt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Lt.tooltip_basic,gravity:"ne",click:up};Ct.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return Tt(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:Lt.tooltip_basic,gravity:"ne",click:up};function Xw(t){var e=t._fullLayout;return e.hovermode?!1:e._has("cartesian")?e._isHoriz?"y":"x":"closest"}function up(t){var e=Xw(t);pa.call("_guiRelayout",t,"hovermode",e)}Ct.resetViewSankey={name:"resetSankeyGroup",title:function(t){return Tt(t,"Reset view")},icon:Lt.home,click:function(t){for(var e={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<t._fullData.length;r++){var a=t._fullData[r]._viewInitial;e["node.groups"].push(a.node.groups.slice()),e["node.x"].push(a.node.x.slice()),e["node.y"].push(a.node.y.slice())}pa.call("restyle",t,e)}};Ct.toggleHover={name:"toggleHover",title:function(t){return Tt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Lt.tooltip_basic,gravity:"ne",click:function(t,e){var r=Ww(t,e);r.hovermode=Xw(t),pa.call("_guiRelayout",t,r)}};Ct.resetViews={name:"resetViews",title:function(t){return Tt(t,"Reset views")},icon:Lt.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),Rr(t,e),r.setAttribute("data-attr","resetLastSave"),fp(t,e),Bf(t,"geo"),Bf(t,"mapbox")}};Ct.toggleSpikelines={name:"toggleSpikelines",title:function(t){return Tt(t,"Toggle Spike Lines")},icon:Lt.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled=r==="on"?"off":"on",pa.call("_guiRelayout",t,D3(t))}};function D3(t){for(var e=t._fullLayout,r=e._cartesianSpikesEnabled==="on",a=Vw.list(t,null,!0),i={},n=0;n<a.length;n++){var o=a[n];i[o._name+".showspikes"]=r?!0:o._showSpikeInitial}return i}Ct.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return Tt(t,"Reset view")},attr:"reset",icon:Lt.home,click:function(t){Bf(t,"mapbox")}};Ct.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return Tt(t,"Zoom in")},attr:"zoom",val:"in",icon:Lt.zoom_plus,click:Yw};Ct.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return Tt(t,"Zoom out")},attr:"zoom",val:"out",icon:Lt.zoom_minus,click:Yw};function Yw(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-val"),i=t._fullLayout,n=i._subplots.mapbox||[],o=1.05,l={},s=0;s<n.length;s++){var f=n[s],c=i[f].zoom,v=a==="in"?o*c:c/o;l[f+".zoom"]=v}pa.call("_guiRelayout",t,l)}function Bf(t,e){for(var r=t._fullLayout,a=r._subplots[e]||[],i={},n=0;n<a.length;n++)for(var o=a[n],l=r[o]._subplot,s=l.viewInitial,f=Object.keys(s),c=0;c<f.length;c++){var v=f[c];i[o+"."+v]=s[v]}pa.call("_guiRelayout",t,i)}var qw=Cw.exports,Zw=qw,$3=Object.keys(Zw),Kw=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],Qw=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(Kw),ao=[],P3=function(t){if(Qw.indexOf(t._cat||t.name)===-1){var e=t.name,r=(t._cat||t.name).toLowerCase();ao.indexOf(e)===-1&&ao.push(e),ao.indexOf(r)===-1&&ao.push(r)}};$3.forEach(function(t){P3(Zw[t])});ao.sort();var Jw={DRAW_MODES:Kw,backButtons:Qw,foreButtons:ao},mg=Jw,eT={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.","This may include *"+mg.backButtons.join("*, *")+"*."].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.","This may include *"+mg.foreButtons.join("*, *")+"*."].join(" ")}},E3=de,Xo=ut,R3=It,z3=eT,I3=function(e,r){var a=e.modebar||{},i=R3.newContainer(r,"modebar");function n(l,s){return E3.coerce(a,i,z3,l,s)}n("orientation"),n("bgcolor",Xo.addOpacity(r.paper_bgcolor,.5));var o=Xo.contrast(Xo.rgb(r.modebar.bgcolor));n("color",Xo.addOpacity(o,.3)),n("activecolor",Xo.addOpacity(o,.7)),n("uirevision",r.uirevision),n("add"),n("remove")},vp=yt,F3=_t,Ja=de,tT=tp,N3=sc.version,H3=new DOMParser;function rT(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var Wa=rT.prototype;Wa.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,a=this.graphInfo._fullLayout,i="modebar-"+a._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",e=e.reverse());var n=a.modebar,o=r.displayModeBar==="hover"?".js-plotly-plot .plotly:hover ":"";Ja.deleteRelatedStyleRule(i),Ja.addRelatedStyleRule(i,o+"#"+i+" .modebar-group","background-color: "+n.bgcolor),Ja.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+n.color),Ja.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+n.activecolor),Ja.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+n.activecolor);var l=!this.hasButtons(e),s=this.hasLogo!==r.displaylogo,f=this.locale!==r.locale;if(this.locale=r.locale,(l||s||f)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton()};Wa.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var a=e.createGroup();r.forEach(function(i){var n=i.name;if(!n)throw new Error("must provide button 'name' in button config");if(e.buttonsNames.indexOf(n)!==-1)throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var o=e.createButton(i);e.buttonElements.push(o),a.appendChild(o)}),e.element.appendChild(a)})};Wa.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t};Wa.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var a=t.title;a===void 0?a=t.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&r.setAttribute("data-title",a),t.attr!==void 0&&r.setAttribute("data-attr",t.attr);var i=t.val;i!==void 0&&(typeof i=="function"&&(i=i(this.graphInfo)),r.setAttribute("data-val",i));var n=t.click;if(typeof n!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(l){t.click(e.graphInfo,l),e.updateActiveButton(l.currentTarget)}),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&vp.select(r).classed("active",!0);var o=t.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||tT.question)),r.setAttribute("data-gravity",t.gravity||"n"),r};Wa.createIcon=function(t){var e=F3(t.height)?Number(t.height):t.ascent-t.descent,r="http://www.w3.org/2000/svg",a;if(t.path){a=document.createElementNS(r,"svg"),a.setAttribute("viewBox",[0,0,t.width,e].join(" ")),a.setAttribute("class","icon");var i=document.createElementNS(r,"path");i.setAttribute("d",t.path),t.transform?i.setAttribute("transform",t.transform):t.ascent!==void 0&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),a.appendChild(i)}if(t.svg){var n=H3.parseFromString(t.svg,"application/xml");a=n.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};Wa.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=t!==void 0?t.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var i=a.getAttribute("data-val")||!0,n=a.getAttribute("data-attr"),o=a.getAttribute("data-toggle")==="true",l=vp.select(a);if(o)n===r&&l.classed("active",!l.classed("active"));else{var s=n===null?n:Ja.nestedProperty(e,n).get();l.classed("active",s===i)}})};Wa.hasButtons=function(t){var e=this.buttons;if(!e||t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var a=0;a<t[r].length;a++)if(t[r][a].name!==e[r][a].name)return!1}return!0};function O3(t){return t+" (v"+N3+")"}Wa.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",O3(Ja._(this.graphInfo,"Produced with Plotly.js"))),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(tT.newplotlylogo)),t.appendChild(e),t};Wa.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};Wa.destroy=function(){Ja.removeElement(this.container.querySelector(".modebar")),Ja.deleteRelatedStyleRule(this._uid)};function B3(t,e){var r=t._fullLayout,a=new rT({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&vp.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}var j3=B3,G3=nr,yg=Pr,Id=tt,U3=ha.isUnifiedHover,V3=j3,jf=qw,W3=Jw.DRAW_MODES,X3=de.extendDeep,Y3=function(e){var r=e._fullLayout,a=e._context,i=r._modeBar;if(!a.displayModeBar&&!a.watermark){i&&(i.destroy(),delete r._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var n=a.modeBarButtons,o;Array.isArray(n)&&n.length?o=e$(n):!a.displayModeBar&&a.watermark?o=[]:o=q3(e),i?i.update(e,o):r._modeBar=V3(e,o)};function q3(t){var e=t._fullLayout,r=t._fullData,a=t._context;function i(R,L){if(typeof L=="string"){if(L.toLowerCase()===R.toLowerCase())return!0}else{var z=L.name,I=L._cat||L.name;if(z===R||I===R.toLowerCase())return!0}return!1}var n=e.modebar.add;typeof n=="string"&&(n=[n]);var o=e.modebar.remove;typeof o=="string"&&(o=[o]);var l=a.modeBarButtonsToAdd.concat(n.filter(function(R){for(var L=0;L<a.modeBarButtonsToRemove.length;L++)if(i(R,a.modeBarButtonsToRemove[L]))return!1;return!0})),s=a.modeBarButtonsToRemove.concat(o.filter(function(R){for(var L=0;L<a.modeBarButtonsToAdd.length;L++)if(i(R,a.modeBarButtonsToAdd[L]))return!1;return!0})),f=e._has("cartesian"),c=e._has("gl3d"),v=e._has("geo"),u=e._has("pie"),h=e._has("funnelarea"),d=e._has("gl2d"),p=e._has("ternary"),y=e._has("mapbox"),m=e._has("polar"),g=e._has("smith"),w=e._has("sankey"),b=Z3(e),x=U3(e.hovermode),_=[];function T(R){if(R.length){for(var L=[],z=0;z<R.length;z++){for(var I=R[z],H=jf[I],V=H.name.toLowerCase(),O=(H._cat||H.name).toLowerCase(),X=!1,G=0;G<s.length;G++){var Y=s[G].toLowerCase();if(Y===V||Y===O){X=!0;break}}X||L.push(jf[I])}_.push(L)}}var k=["toImage"];a.showEditInChartStudio?k.push("editInChartStudio"):a.showSendToCloud&&k.push("sendDataToCloud"),T(k);var S=[],M=[],D=[],A=[];(f||d||u||h||p)+v+c+y+m+g>1?(M=["toggleHover"],D=["resetViews"]):v?(S=["zoomInGeo","zoomOutGeo"],M=["hoverClosestGeo"],D=["resetGeo"]):c?(M=["hoverClosest3d"],D=["resetCameraDefault3d","resetCameraLastSave3d"]):y?(S=["zoomInMapbox","zoomOutMapbox"],M=["toggleHover"],D=["resetViewMapbox"]):d?M=["hoverClosestGl2d"]:u?M=["hoverClosestPie"]:w?(M=["hoverClosestCartesian","hoverCompareCartesian"],D=["resetViewSankey"]):M=["toggleHover"],f&&(M=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(Q3(r)||x)&&(M=[]),(f||d)&&!b&&(S=["zoomIn2d","zoomOut2d","autoScale2d"],D[0]!=="resetViews"&&(D=["resetScale2d"])),c?A=["zoom3d","pan3d","orbitRotation","tableRotation"]:(f||d)&&!b||p?A=["zoom2d","pan2d"]:y||v?A=["pan2d"]:m&&(A=["zoom2d"]),K3(r)&&A.push("select2d","lasso2d");var C=[],$=function(R){C.indexOf(R)===-1&&M.indexOf(R)!==-1&&C.push(R)};if(Array.isArray(l)){for(var N=[],E=0;E<l.length;E++){var P=l[E];typeof P=="string"?(P=P.toLowerCase(),W3.indexOf(P)!==-1?(e._has("mapbox")||e._has("cartesian"))&&A.push(P):P==="togglespikelines"?$("toggleSpikelines"):P==="togglehover"?$("toggleHover"):P==="hovercompare"?$("hoverCompareCartesian"):P==="hoverclosest"?($("hoverClosestCartesian"),$("hoverClosestGeo"),$("hoverClosest3d"),$("hoverClosestGl2d"),$("hoverClosestPie")):P==="v1hovermode"&&($("toggleHover"),$("hoverClosestCartesian"),$("hoverCompareCartesian"),$("hoverClosestGeo"),$("hoverClosest3d"),$("hoverClosestGl2d"),$("hoverClosestPie"))):N.push(P)}l=N}return T(A),T(S.concat(D)),T(C),J3(_,l)}function Z3(t){for(var e=G3.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}function K3(t){for(var e=!1,r=0;r<t.length&&!e;r++){var a=t[r];!a._module||!a._module.selectPoints||(Id.traceIs(a,"scatter-like")?(yg.hasMarkers(a)||yg.hasText(a))&&(e=!0):Id.traceIs(a,"box-violin")?(a.boxpoints==="all"||a.points==="all")&&(e=!0):e=!0)}return e}function Q3(t){for(var e=0;e<t.length;e++)if(!Id.traceIs(t[e],"noHover"))return!1;return!0}function J3(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}function e$(t){for(var e=X3([],t),r=0;r<e.length;r++)for(var a=e[r],i=0;i<a.length;i++){var n=a[i];if(typeof n=="string")if(jf[n]!==void 0)e[r][i]=jf[n];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return e}var aT={moduleType:"component",name:"modebar",layoutAttributes:eT,supplyLayoutDefaults:I3,manage:Y3},oi={},t$=Yr.FROM_BL,iT=function(e,r,a){a===void 0&&(a=t$[e.constraintoward||"center"]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],n=i[0]+(i[1]-i[0])*a;e.range=e._input.range=[e.l2r(n+(i[0]-n)*r),e.l2r(n+(i[1]-n)*r)],e.setScale()},Xi=de,ju=ts,wa=nr.id2name,r$=ii,gg=iT,a$=Oh,i$=ir.ALMOST_EQUAL,n$=Yr.FROM_BL;oi.handleDefaults=function(t,e,r){var a=r.axIds,i=r.axHasImage,n=e._axisConstraintGroups=[],o=e._axisMatchGroups=[],l,s,f,c,v,u,h,d;for(l=0;l<a.length;l++)c=wa(a[l]),v=t[c],u=e[c],o$(v,u,{axIds:a,layoutOut:e,hasImage:i[c]});function p(k,S){for(l=0;l<k.length;l++){s=k[l];for(f in s)e[wa(f)][S]=s}}for(p(o,"_matchGroup"),l=0;l<n.length;l++){s=n[l];for(f in s)if(u=e[wa(f)],u.fixedrange){for(var y in s){var m=wa(y);(t[m]||{}).fixedrange===!1&&Xi.warn("fixedrange was specified as false for axis "+m+" but was overridden because another axis in its constraint group has fixedrange true"),e[m].fixedrange=!0}break}}for(l=0;l<n.length;){s=n[l];for(f in s){u=e[wa(f)],u._matchGroup&&Object.keys(u._matchGroup).length===Object.keys(s).length&&(n.splice(l,1),l--);break}l++}p(n,"_constraintGroup");var g=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],w=!1,b=!1;function x(){d=u[h],h==="rangebreaks"&&(b=u._hasDayOfWeekBreaks)}for(l=0;l<o.length;l++){s=o[l];for(var _=0;_<g.length;_++){h=g[_],d=null;var T;for(f in s)if(c=wa(f),v=t[c],u=e[c],h in u){if(!u.matches&&(T=u,h in v)){x();break}d===null&&h in v&&x()}if(h==="range"&&d&&(w=!0),h==="autorange"&&d===null&&w&&(d=!1),d===null&&h in T&&(d=T[h]),d!==null)for(f in s)u=e[wa(f)],u[h]=h==="range"?d.slice():d,h==="rangebreaks"&&(u._hasDayOfWeekBreaks=b,a$(u,e))}}};function o$(t,e,r){var a=r.axIds,i=r.layoutOut,n=r.hasImage,o=i._axisConstraintGroups,l=i._axisMatchGroups,s=e._id,f=s.charAt(0),c=((i._splomAxes||{})[f]||{})[s]||{},v=e._id,u=v.charAt(0)==="x";e._matchGroup=null,e._constraintGroup=null;function h(A,C){return Xi.coerce(t,e,r$,A,C)}h("constrain",n?"domain":"range"),Xi.coerce(t,e,{constraintoward:{valType:"enumerated",values:u?["left","center","right"]:["bottom","middle","top"],dflt:u?"center":"middle"}},"constraintoward");var d=e.type,p,y,m=[];for(p=0;p<a.length;p++)if(y=a[p],y!==v){var g=i[wa(y)];g.type===d&&m.push(y)}var w=nT(o,v);if(w){var b=[];for(p=0;p<m.length;p++)y=m[p],w[y]||b.push(y);m=b}var x=m.length,_,T;x&&(t.matches||c.matches)&&(_=Xi.coerce(t,e,{matches:{valType:"enumerated",values:m,dflt:m.indexOf(c.matches)!==-1?c.matches:void 0}},"matches"));var k=n&&!u?e.anchor:void 0;if(x&&!_&&(t.scaleanchor||k)&&(T=Xi.coerce(t,e,{scaleanchor:{valType:"enumerated",values:m}},"scaleanchor",k)),_){e._matchGroup=Gu(l,v,_,1);var S=i[wa(_)],M=bg(i,e)/bg(i,S);u!==(_.charAt(0)==="x")&&(M=(u?"x":"y")+M),Gu(o,v,_,M)}else t.matches&&a.indexOf(t.matches)!==-1&&Xi.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(T){var D=h("scaleratio");D||(D=e.scaleratio=1),Gu(o,v,T,D)}else t.scaleanchor&&a.indexOf(t.scaleanchor)!==-1&&Xi.warn("ignored "+e._name+'.scaleanchor: "'+t.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function bg(t,e){var r=e.domain;return r||(r=t[wa(e.overlaying)].domain),r[1]-r[0]}function nT(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function Gu(t,e,r,a){var i,n,o,l,s,f=nT(t,e);f===null?(f={},f[e]=1,s=t.length,t.push(f)):s=t.indexOf(f);var c=Object.keys(f);for(i=0;i<t.length;i++)if(o=t[i],i!==s&&o[r]){var v=o[r];for(n=0;n<c.length;n++)l=c[n],o[l]=Uu(v,Uu(a,f[l]));t.splice(s,1);return}if(a!==1)for(n=0;n<c.length;n++){var u=c[n];f[u]=Uu(a,f[u])}f[r]=1}function Uu(t,e){var r="",a="",i,n;typeof t=="string"&&(r=t.match(/^[xy]*/)[0],i=r.length,t=+t.substr(i)),typeof e=="string"&&(a=e.match(/^[xy]*/)[0],n=a.length,e=+e.substr(n));var o=t*e;return!i&&!n?o:!i||!n||r.charAt(0)===a.charAt(0)?r+a+t*e:i===n?o:(i>n?r.substr(n):a.substr(i))+o}function l$(t,e){for(var r=e._size,a=r.h/r.w,i={},n=Object.keys(t),o=0;o<n.length;o++){var l=n[o],s=t[l];if(typeof s=="string"){var f=s.match(/^[xy]*/)[0],c=f.length;s=+s.substr(c);for(var v=f.charAt(0)==="y"?a:1/a,u=0;u<c;u++)s*=v}i[l]=s}return i}oi.enforce=function(e){var r=e._fullLayout,a=r._axisConstraintGroups||[],i,n,o,l,s,f,c,v;for(i=0;i<a.length;i++){o=l$(a[i],r);var u=Object.keys(o),h=1/0,d=0,p=1/0,y={},m={},g=!1;for(n=0;n<u.length;n++)l=u[n],m[l]=s=r[wa(l)],s._inputDomain?s.domain=s._inputDomain.slice():s._inputDomain=s.domain.slice(),s._inputRange||(s._inputRange=s.range.slice()),s.setScale(),y[l]=f=Math.abs(s._m)/o[l],h=Math.min(h,f),(s.constrain==="domain"||!s._constraintShrinkable)&&(p=Math.min(p,f)),delete s._constraintShrinkable,d=Math.max(d,f),s.constrain==="domain"&&(g=!0);if(!(h>i$*d&&!g)){for(n=0;n<u.length;n++)if(l=u[n],f=y[l],s=m[l],c=s.constrain,f!==p||c==="domain")if(v=f/p,c==="range")gg(s,v);else{var w=s._inputDomain,b=(s.domain[1]-s.domain[0])/(w[1]-w[0]),x=(s.r2l(s.range[1])-s.r2l(s.range[0]))/(s.r2l(s._inputRange[1])-s.r2l(s._inputRange[0]));if(v/=b,v*x<1){s.domain=s._input.domain=w.slice(),gg(s,v);continue}if(x<1&&(s.range=s._input.range=s._inputRange.slice(),v*=x),s.autorange){var _=s.r2l(s.range[0]),T=s.r2l(s.range[1]),k=(_+T)/2,S=k,M=k,D=Math.abs(T-k),A=k-D*v*1.0001,C=k+D*v*1.0001,$=ju.makePadFn(r,s,0),N=ju.makePadFn(r,s,1);xg(s,v);var E=Math.abs(s._m),P=ju.concatExtremes(e,s),R=P.min,L=P.max,z,I;for(I=0;I<R.length;I++)z=R[I].val-$(R[I])/E,z>A&&z<S&&(S=z);for(I=0;I<L.length;I++)z=L[I].val+N(L[I])/E,z<C&&z>M&&(M=z);var H=(M-S)/(2*D);v/=H,S=s.l2r(S),M=s.l2r(M),s.range=s._input.range=_<T?[S,M]:[M,S]}xg(s,v)}}}};oi.getAxisGroup=function(e,r){for(var a=e._axisMatchGroups,i=0;i<a.length;i++){var n=a[i];if(n[r])return"g"+i}return r};oi.clean=function(e,r){if(r._inputDomain){for(var a=!1,i=r._id,n=e._fullLayout._axisConstraintGroups,o=0;o<n.length;o++)if(n[o][i]){a=!0;break}(!a||r.constrain!=="domain")&&(r._input.domain=r.domain=r._inputDomain,delete r._inputDomain)}};function xg(t,e){var r=t._inputDomain,a=n$[t.constraintoward],i=r[0]+(r[1]-r[0])*a;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e],t.setScale()}(function(t){var e=yt,r=tt,a=sr,i=de,n=ep,o=ut,l=Et,s=wc,f=aT,c=Ot,v=Yr,u=oi,h=u.enforce,d=u.clean,p=ts.doAutoRange,y="start",m="middle",g="end";t.layoutStyles=function(A){return i.syncOrAsync([a.doAutoMargin,b],A)};function w(A,C,$){for(var N=0;N<$.length;N++){var E=$[N][0],P=$[N][1];if(!(E[0]>=A[1]||E[1]<=A[0])&&P[0]<C[1]&&P[1]>C[0])return!0}return!1}function b(A){var C=A._fullLayout,$=C._size,N=$.p,E=c.list(A,"",!0),P,R,L,z,I,H;if(C._paperdiv.style({width:A._context.responsive&&C.autosize&&!A._context._hasZeroWidth&&!A.layout.width?"100%":C.width+"px",height:A._context.responsive&&C.autosize&&!A._context._hasZeroHeight&&!A.layout.height?"100%":C.height+"px"}).selectAll(".main-svg").call(l.setSize,C.width,C.height),A._context.setBackground(A,C.paper_bgcolor),t.drawMainTitle(A),f.manage(A),!C._has("cartesian"))return a.previousPromises(A);function V(Ie,Ue,ke){var We=Ie._lw/2;if(Ie._id.charAt(0)==="x"){if(Ue){if(ke==="top")return Ue._offset-N-We}else return $.t+$.h*(1-(Ie.position||0))+We%1;return Ue._offset+Ue._length+N+We}if(Ue){if(ke==="right")return Ue._offset+Ue._length+N+We}else return $.l+$.w*(Ie.position||0)+We%1;return Ue._offset-N-We}for(P=0;P<E.length;P++){z=E[P];var O=z._anchorAxis;z._linepositions={},z._lw=l.crispRound(A,z.linewidth,1),z._mainLinePosition=V(z,O,z.side),z._mainMirrorPosition=z.mirror&&O?V(z,O,v.OPPOSITE_SIDE[z.side]):null}var X=[],G=[],Y=[],K=o.opacity(C.paper_bgcolor)===1&&o.opacity(C.plot_bgcolor)===1&&C.paper_bgcolor===C.plot_bgcolor;for(R in C._plots)if(L=C._plots[R],L.mainplot)L.bg&&L.bg.remove(),L.bg=void 0;else{var Z=L.xaxis.domain,q=L.yaxis.domain,ie=L.plotgroup;if(w(Z,q,Y)){var fe=ie.node(),be=L.bg=i.ensureSingle(ie,"rect","bg");fe.insertBefore(be.node(),fe.childNodes[0]),G.push(R)}else ie.select("rect.bg").remove(),Y.push([Z,q]),K||(X.push(R),G.push(R))}var ne=C._bgLayer.selectAll(".bg").data(X);for(ne.enter().append("rect").classed("bg",!0),ne.exit().remove(),ne.each(function(Ie){C._plots[Ie].bg=e.select(this)}),P=0;P<G.length;P++)L=C._plots[G[P]],I=L.xaxis,H=L.yaxis,L.bg&&I._offset!==void 0&&H._offset!==void 0&&L.bg.call(l.setRect,I._offset-N,H._offset-N,I._length+2*N,H._length+2*N).call(o.fill,C.plot_bgcolor).style("stroke-width",0);if(!C._hasOnlyLargeSploms)for(R in C._plots){L=C._plots[R],I=L.xaxis,H=L.yaxis;var U=L.clipId="clip"+C._uid+R+"plot",ae=i.ensureSingleById(C._clips,"clipPath",U,function(Ie){Ie.classed("plotclip",!0).append("rect")});L.clipRect=ae.select("rect").attr({width:I._length,height:H._length}),l.setTranslate(L.plot,I._offset,H._offset);var ce,se;L._hasClipOnAxisFalse?(ce=null,se=U):(ce=U,se=null),l.setClipUrl(L.plot,ce,A),L.layerClipId=se}var pe,ge,_e,le,De,Ae,ze,Ve,oe,Ce,re,me,ve;function Me(Ie){return"M"+pe+","+Ie+"H"+ge}function Se(Ie){return"M"+I._offset+","+Ie+"h"+I._length}function $e(Ie){return"M"+Ie+","+Ve+"V"+ze}function ye(Ie){return H._shift!==void 0&&(Ie+=H._shift),"M"+Ie+","+H._offset+"v"+H._length}function Ne(Ie,Ue,ke){if(!Ie.showline||R!==Ie._mainSubplot)return"";if(!Ie._anchorAxis)return ke(Ie._mainLinePosition);var We=Ue(Ie._mainLinePosition);return Ie.mirror&&(We+=Ue(Ie._mainMirrorPosition)),We}for(R in C._plots){L=C._plots[R],I=L.xaxis,H=L.yaxis;var Pe="M0,0";x(I,R)&&(De=T(I,"left",H,E),pe=I._offset-(De?N+De:0),Ae=T(I,"right",H,E),ge=I._offset+I._length+(Ae?N+Ae:0),_e=V(I,H,"bottom"),le=V(I,H,"top"),ve=!I._anchorAxis||R!==I._mainSubplot,ve&&(I.mirror==="allticks"||I.mirror==="all")&&(I._linepositions[R]=[_e,le]),Pe=Ne(I,Me,Se),ve&&I.showline&&(I.mirror==="all"||I.mirror==="allticks")&&(Pe+=Me(_e)+Me(le)),L.xlines.style("stroke-width",I._lw+"px").call(o.stroke,I.showline?I.linecolor:"rgba(0,0,0,0)")),L.xlines.attr("d",Pe);var je="M0,0";x(H,R)&&(re=T(H,"bottom",I,E),ze=H._offset+H._length+(re?N:0),me=T(H,"top",I,E),Ve=H._offset-(me?N:0),oe=V(H,I,"left"),Ce=V(H,I,"right"),ve=!H._anchorAxis||R!==H._mainSubplot,ve&&(H.mirror==="allticks"||H.mirror==="all")&&(H._linepositions[R]=[oe,Ce]),je=Ne(H,$e,ye),ve&&H.showline&&(H.mirror==="all"||H.mirror==="allticks")&&(je+=$e(oe)+$e(Ce)),L.ylines.style("stroke-width",H._lw+"px").call(o.stroke,H.showline?H.linecolor:"rgba(0,0,0,0)")),L.ylines.attr("d",je)}return c.makeClipPaths(A),a.previousPromises(A)}function x(A,C){return(A.ticks||A.showline)&&(C===A._mainSubplot||A.mirror==="all"||A.mirror==="allticks")}function _(A,C,$){if(!$.showline||!$._lw)return!1;if($.mirror==="all"||$.mirror==="allticks")return!0;var N=$._anchorAxis;if(!N)return!1;var E=v.FROM_BL[C];return $.side===C?N.domain[E]===A.domain[E]:$.mirror&&N.domain[1-E]===A.domain[1-E]}function T(A,C,$,N){if(_(A,C,$))return $._lw;for(var E=0;E<N.length;E++){var P=N[E];if(P._mainAxis===$._mainAxis&&_(A,C,P))return P._lw}return 0}t.drawMainTitle=function(A){var C=A._fullLayout,$=M(C),N=D(C);s.draw(A,"gtitle",{propContainer:C,propName:"title.text",placeholder:C._dfltTitle.plot,attributes:{x:k(C,$),y:S(C,N),"text-anchor":$,dy:N}})};function k(A,C){var $=A.title,N=A._size,E=0;switch(C===y?E=$.pad.l:C===g&&(E=-$.pad.r),$.xref){case"paper":return N.l+N.w*$.x+E;case"container":default:return A.width*$.x+E}}function S(A,C){var $=A.title,N=A._size,E=0;if(C==="0em"||!C?E=-$.pad.b:C===v.CAP_SHIFT+"em"&&(E=$.pad.t),$.y==="auto")return N.t/2;switch($.yref){case"paper":return N.t+N.h-N.h*$.y+E;case"container":default:return A.height-A.height*$.y+E}}function M(A){var C=A.title,$=m;return i.isRightAnchor(C)?$=g:i.isLeftAnchor(C)&&($=y),$}function D(A){var C=A.title,$="0em";return i.isTopAnchor(C)?$=v.CAP_SHIFT+"em":i.isMiddleAnchor(C)&&($=v.MID_SHIFT+"em"),$}t.doTraceStyle=function(A){var C=A.calcdata,$=[],N;for(N=0;N<C.length;N++){var E=C[N],P=E[0]||{},R=P.trace||{},L=R._module||{},z=L.arraysToCalcdata;z&&z(E,R);var I=L.editStyle;I&&$.push({fn:I,cd0:P})}if($.length){for(N=0;N<$.length;N++){var H=$[N];H.fn(A,H.cd0)}n(A),t.redrawReglTraces(A)}return a.style(A),r.getComponentMethod("legend","draw")(A),a.previousPromises(A)},t.doColorBars=function(A){return r.getComponentMethod("colorbar","draw")(A),a.previousPromises(A)},t.layoutReplot=function(A){var C=A.layout;return A.layout=void 0,r.call("_doPlot",A,"",C)},t.doLegend=function(A){return r.getComponentMethod("legend","draw")(A),a.previousPromises(A)},t.doTicksRelayout=function(A){return c.draw(A,"redraw"),A._fullLayout._hasOnlyLargeSploms&&(r.subplotsRegistry.splom.updateGrid(A),n(A),t.redrawReglTraces(A)),t.drawMainTitle(A),a.previousPromises(A)},t.doModeBar=function(A){var C=A._fullLayout;f.manage(A);for(var $=0;$<C._basePlotModules.length;$++){var N=C._basePlotModules[$].updateFx;N&&N(A)}return a.previousPromises(A)},t.doCamera=function(A){for(var C=A._fullLayout,$=C._subplots.gl3d,N=0;N<$.length;N++){var E=C[$[N]],P=E._scene;P.setViewport(E)}},t.drawData=function(A){var C=A._fullLayout;n(A);for(var $=C._basePlotModules,N=0;N<$.length;N++)$[N].plot(A);return t.redrawReglTraces(A),a.style(A),r.getComponentMethod("selections","draw")(A),r.getComponentMethod("shapes","draw")(A),r.getComponentMethod("annotations","draw")(A),r.getComponentMethod("images","draw")(A),C._replotting=!1,a.previousPromises(A)},t.redrawReglTraces=function(A){var C=A._fullLayout;if(C._has("regl")){var $=A._fullData,N=[],E=[],P,R;for(C._hasOnlyLargeSploms&&C._splomGrid.draw(),P=0;P<$.length;P++){var L=$[P];L.visible===!0&&L._length!==0&&(L.type==="splom"?C._splomScenes[L.uid].draw():L.type==="scattergl"?i.pushUnique(N,L.xaxis+L.yaxis):L.type==="scatterpolargl"&&i.pushUnique(E,L.subplot))}for(P=0;P<N.length;P++)R=C._plots[N[P]],R._scene&&R._scene.draw();for(P=0;P<E.length;P++)R=C[E[P]]._subplot,R._scene&&R._scene.draw()}},t.doAutoRangeAndConstraints=function(A){for(var C=c.list(A,"",!0),$,N={},E=0;E<C.length;E++)if($=C[E],!N[$._id]){N[$._id]=1,d(A,$),p(A,$);var P=$._matchGroup;if(P)for(var R in P){var L=c.getFromId(A,R);p(A,L,$.range),N[R]=1}}h(A)},t.finalDraw=function(A){r.getComponentMethod("rangeslider","draw")(A),r.getComponentMethod("rangeselector","draw")(A)},t.drawMarginPushers=function(A){r.getComponentMethod("legend","draw")(A),r.getComponentMethod("rangeselector","draw")(A),r.getComponentMethod("sliders","draw")(A),r.getComponentMethod("updatemenus","draw")(A),r.getComponentMethod("colorbar","draw")(A)}})(Lc);var s$=Tn.readPaths,f$=op,oT=gn.clearOutlineControllers,Vu=ut,lT=Et,c$=It.arrayEditor,sT=kn,u$=sT.getPathString,fT={draw:Rc,drawOne:cT,activateLastSelection:h$};function Rc(t){var e=t._fullLayout;oT(t),e._selectionLayer.selectAll("path").remove();for(var r in e._plots){var a=e._plots[r].selectionLayer;a&&a.selectAll("path").remove()}for(var i=0;i<e.selections.length;i++)cT(t,i)}function zc(t){return t._context.editSelection}function cT(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+e+'"]').remove();var r=sT.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input)return;n(t._fullLayout._selectionLayer);function n(o){var l=u$(t,a),s={"data-index":e,"fill-rule":"evenodd",d:l},f=a.opacity,c="rgba(0,0,0,0)",v=a.line.color||Vu.contrast(t._fullLayout.plot_bgcolor),u=a.line.width,h=a.line.dash;u||(u=5,h="solid");var d=zc(t)&&t._fullLayout._activeSelectionIndex===e;d&&(c=t._fullLayout.activeselection.fillcolor,f=t._fullLayout.activeselection.opacity);for(var p=[],y=1;y>=0;y--){var m=o.append("path").attr(s).style("opacity",y?.1:f).call(Vu.stroke,v).call(Vu.fill,c).call(lT.dashLine,y?"solid":h,y?4+u:u);if(v$(m,t,a),d){var g=c$(t.layout,"selections",a);m.style({cursor:"move"});var w={element:m.node(),plotinfo:i,gd:t,editHelpers:g,isActiveSelection:!0},b=s$(l,t);f$(b,m,w)}else m.style("pointer-events",y?"all":"none");p[y]=m}var x=p[0],_=p[1];_.node().addEventListener("click",function(){return d$(t,x)})}}function v$(t,e,r){var a=r.xref+r.yref;lT.setClipUrl(t,"clip"+e._fullLayout._uid+a,e)}function d$(t,e){if(zc(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeSelectionIndex){Fd(t);return}t._fullLayout._activeSelectionIndex=a,t._fullLayout._deactivateSelection=Fd,Rc(t)}}}function h$(t){if(zc(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=Fd,Rc(t)}}function Fd(t){if(zc(t)){var e=t._fullLayout._activeSelectionIndex;e>=0&&(oT(t),delete t._fullLayout._activeSelectionIndex,Rc(t))}}var uT={exports:{}},Wu=dc.dot,Fs=ir.BADNUM,Gf=uT.exports={};Gf.tester=function(e){var r=e.slice(),a=r[0][0],i=a,n=r[0][1],o=n,l;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),l=1;l<r.length;l++)a=Math.min(a,r[l][0]),i=Math.max(i,r[l][0]),n=Math.min(n,r[l][1]),o=Math.max(o,r[l][1]);var s=!1,f;r.length===5&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(s=!0,f=function(d){return d[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(s=!0,f=function(d){return d[1]===r[0][1]}));function c(d,p){var y=d[0],m=d[1];return!(y===Fs||y<a||y>i||m===Fs||m<n||m>o||p&&f(d))}function v(d,p){var y=d[0],m=d[1];if(y===Fs||y<a||y>i||m===Fs||m<n||m>o)return!1;var g=r.length,w=r[0][0],b=r[0][1],x=0,_,T,k,S,M;for(_=1;_<g;_++)if(T=w,k=b,w=r[_][0],b=r[_][1],S=Math.min(T,w),!(y<S||y>Math.max(T,w)||m>Math.max(k,b)))if(m<Math.min(k,b))y!==S&&x++;else{if(w===T?M=m:M=k+(y-T)*(b-k)/(w-T),m===M)return!(_===1&&p);m<=M&&y!==S&&x++}return x%2===1}var u=!0,h=r[0];for(l=1;l<r.length;l++)if(h[0]!==r[l][0]||h[1]!==r[l][1]){u=!1;break}return{xmin:a,xmax:i,ymin:n,ymax:o,pts:r,contains:s?c:v,isRect:s,degenerate:u}};Gf.isSegmentBent=function(e,r,a,i){var n=e[r],o=[e[a][0]-n[0],e[a][1]-n[1]],l=Wu(o,o),s=Math.sqrt(l),f=[-o[1]/s,o[0]/s],c,v,u;for(c=r+1;c<a;c++)if(v=[e[c][0]-n[0],e[c][1]-n[1]],u=Wu(v,o),u<0||u>l||Math.abs(Wu(v,f))>i)return!0;return!1};Gf.filter=function(e,r){var a=[e[0]],i=0,n=0;function o(s){e.push(s);var f=a.length,c=i;a.splice(n+1);for(var v=c+1;v<e.length;v++)(v===e.length-1||Gf.isSegmentBent(e,c,v+1,r))&&(a.push(e[v]),a.length<f-2&&(i=v,n=a.length-1),c=v)}if(e.length>1){var l=e.pop();o(l)}return{addPt:o,raw:e,filtered:a}};var vT=uT.exports,p$={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"},_g=RA,m$=zA,Pl=tt,y$=Et.dashStyle,Yo=ut,g$=Ca,b$=ha.makeEventData,rs=wn,x$=rs.freeMode,_$=rs.rectMode,El=rs.drawMode,dp=rs.openMode,hp=rs.selectMode,wg=kn,Tg=$c,dT=op,hT=gn.clearOutline,pT=Tn,Xu=pT.handleEllipse,w$=pT.readPaths,T$=Ew,k$=Rw,A$=fT.activateLastSelection,gf=de,M$=gf.sorterAsc,mT=vT,qo=mc,fa=nr.getFromId,S$=ep,L$=Lc.redrawReglTraces,bf=p$,Ia=bf.MINSELECT,C$=mT.filter,pp=mT.tester,mp=ap,kg=mp.p2r,D$=mp.axValue,$$=mp.getTransform;function yp(t){return t.subplot!==void 0}function P$(t,e,r,a,i){var n=!yp(a),o=x$(i),l=_$(i),s=dp(i),f=El(i),c=hp(i),v=i==="drawline",u=i==="drawcircle",h=v||u,d=a.gd,p=d._fullLayout,y=c&&p.newselection.mode==="immediate"&&n,m=p._zoomlayer,g=a.element.getBoundingClientRect(),w=a.plotinfo,b=$$(w),x=e-g.left,_=r-g.top;p._calcInverseTransform(d);var T=gf.apply3DTransform(p._invTransform)(x,_);x=T[0],_=T[1];var k=p._invScaleX,S=p._invScaleY,M=x,D=_,A="M"+x+","+_,C=a.xaxes[0],$=a.yaxes[0],N=C._length,E=$._length,P=t.altKey&&!(El(i)&&s),R,L,z,I,H,V,O;gT(t,d,a),o&&(R=C$([[x,_]],bf.BENDPX));var X=m.selectAll("path.select-outline-"+w.id).data([1]),G=f?p.newshape:p.newselection,Y=f&&!s?G.fillcolor:"rgba(0,0,0,0)",K=G.line.color||(n?Yo.contrast(d._fullLayout.plot_bgcolor):"#7f7f7f");X.enter().append("path").attr("class","select-outline select-outline-"+w.id).style({opacity:f?G.opacity/2:1,"stroke-dasharray":y$(G.line.dash,G.line.width),"stroke-width":G.line.width+"px","shape-rendering":"crispEdges"}).call(Yo.stroke,K).call(Yo.fill,Y).attr("fill-rule","evenodd").classed("cursor-move",!!f).attr("transform",b).attr("d",A+"Z");var Z=m.append("path").attr("class","zoombox-corners").style({fill:Yo.background,stroke:Yo.defaultLine,"stroke-width":1}).attr("transform",b).attr("d","M0,0Z"),q=p._uid+bf.SELECTID,ie=[],fe=Ic(d,a.xaxes,a.yaxes,a.subplot);y&&!t.shiftKey&&(a._clearSubplotSelections=function(){if(n){var ne=C._id,U=$._id;TT(d,ne,U,fe);for(var ae=(d.layout||{}).selections||[],ce=[],se=!1,pe=0;pe<ae.length;pe++){var ge=p.selections[pe];ge.xref!==ne||ge.yref!==U?ce.push(ae[pe]):se=!0}se&&(d._fullLayout._noEmitSelectedAtStart=!0,Pl.call("_guiRelayout",d,{selections:ce}))}});var be=W$(a);a.moveFn=function(ne,U){a._clearSubplotSelections&&(a._clearSubplotSelections(),a._clearSubplotSelections=void 0),M=Math.max(0,Math.min(N,k*ne+x)),D=Math.max(0,Math.min(E,S*U+_));var ae=Math.abs(M-x),ce=Math.abs(D-_);if(l){var se,pe,ge;if(c){var _e=p.selectdirection;switch(_e==="any"?ce<Math.min(ae*.6,Ia)?se="h":ae<Math.min(ce*.6,Ia)?se="v":se="d":se=_e,se){case"h":pe=u?E/2:0,ge=E;break;case"v":pe=u?N/2:0,ge=N;break}}if(f)switch(p.newshape.drawdirection){case"vertical":se="h",pe=u?E/2:0,ge=E;break;case"horizontal":se="v",pe=u?N/2:0,ge=N;break;case"ortho":ae<ce?(se="h",pe=_,ge=D):(se="v",pe=x,ge=M);break;default:se="d"}se==="h"?(I=h?Xu(u,[M,pe],[M,ge]):[[x,pe],[x,ge],[M,ge],[M,pe]],I.xmin=h?M:Math.min(x,M),I.xmax=h?M:Math.max(x,M),I.ymin=Math.min(pe,ge),I.ymax=Math.max(pe,ge),Z.attr("d","M"+I.xmin+","+(_-Ia)+"h-4v"+2*Ia+"h4ZM"+(I.xmax-1)+","+(_-Ia)+"h4v"+2*Ia+"h-4Z")):se==="v"?(I=h?Xu(u,[pe,D],[ge,D]):[[pe,_],[pe,D],[ge,D],[ge,_]],I.xmin=Math.min(pe,ge),I.xmax=Math.max(pe,ge),I.ymin=h?D:Math.min(_,D),I.ymax=h?D:Math.max(_,D),Z.attr("d","M"+(x-Ia)+","+I.ymin+"v-4h"+2*Ia+"v4ZM"+(x-Ia)+","+(I.ymax-1)+"v4h"+2*Ia+"v-4Z")):se==="d"&&(I=h?Xu(u,[x,_],[M,D]):[[x,_],[x,D],[M,D],[M,_]],I.xmin=Math.min(x,M),I.xmax=Math.max(x,M),I.ymin=Math.min(_,D),I.ymax=Math.max(_,D),Z.attr("d","M0,0Z"))}else o&&(R.addPt([M,D]),I=R.filtered);if(a.selectionDefs&&a.selectionDefs.length?(z=bT(a.mergedPolygons,I,P),I.subtract=P,L=gp(a.selectionDefs.concat([I]))):(z=[I],L=pp(I)),dT(_T(z,s),X,a),c){var le=Nd(d,!1),De=le.eventData?le.eventData.points.slice():[];le=Nd(d,!1,L,fe,a),L=le.selectionTesters,O=le.eventData;var Ae;R?Ae=R.filtered:Ae=kT(z),qo.throttle(q,bf.SELECTDELAY,function(){ie=wT(L,fe);for(var ze=ie.slice(),Ve=0;Ve<De.length;Ve++){for(var oe=De[Ve],Ce=!1,re=0;re<ze.length;re++)if(ze[re].curveNumber===oe.curveNumber&&ze[re].pointNumber===oe.pointNumber){Ce=!0;break}Ce||ze.push(oe)}ze.length&&(O||(O={}),O.points=ze),be(O,Ae),X$(d,O)})}},a.clickFn=function(ne,U){if(Z.remove(),d._fullLayout._activeShapeIndex>=0){d._fullLayout._deactivateShape(d);return}if(!f){var ae=p.clickmode;qo.done(q).then(function(){if(qo.clear(q),ne===2){for(X.remove(),H=0;H<fe.length;H++)V=fe[H],V._module.selectPoints(V,!1);if(zl(d,fe),Rl(a),xp(d),fe.length){var ce=fe[0].xaxis,se=fe[0].yaxis;if(ce&&se){for(var pe=[],ge=d._fullLayout.selections,_e=0;_e<ge.length;_e++){var le=ge[_e];le&&(le.xref!==ce._id||le.yref!==se._id)&&pe.push(le)}pe.length<ge.length&&(d._fullLayout._noEmitSelectedAtStart=!0,Pl.call("_guiRelayout",d,{selections:pe}))}}}else ae.indexOf("select")>-1&&yT(U,d,a.xaxes,a.yaxes,a.subplot,a,X),ae==="event"&&Il(d,void 0);g$.click(d,U)}).catch(gf.error)}},a.doneFn=function(){Z.remove(),qo.done(q).then(function(){qo.clear(q),!y&&I&&a.selectionDefs&&(I.subtract=P,a.selectionDefs.push(I),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,z)),(y||f)&&Rl(a,y),a.doneFnCompleted&&a.doneFnCompleted(ie),c&&Il(d,O)}).catch(gf.error)}}function yT(t,e,r,a,i,n,o){var l=e._hoverdata,s=e._fullLayout,f=s.clickmode,c=f.indexOf("event")>-1,v=[],u,h,d,p,y,m,g,w,b,x;if(F$(l)){gT(t,e,n),u=Ic(e,r,a,i);var _=N$(l,u),T=_.pointNumbers.length>0;if(T?H$(u,_):O$(u)&&(g=Mg(_))){for(o&&o.remove(),x=0;x<u.length;x++)h=u[x],h._module.selectPoints(h,!1);zl(e,u),Rl(n),c&&xp(e)}else{w=t.shiftKey&&(g!==void 0?g:Mg(_)),d=E$(_.pointNumber,_.searchInfo,w);var k=n.selectionDefs.concat([d]);for(p=gp(k),x=0;x<u.length;x++)if(y=u[x]._module.selectPoints(u[x],p),m=xT(y,u[x]),v.length)for(var S=0;S<m.length;S++)v.push(m[S]);else v=m;if(b={points:v},zl(e,u,b),d&&n&&n.selectionDefs.push(d),o){var M=n.mergedPolygons,D=dp(n.dragmode);dT(_T(M,D),o,n)}c&&Il(e,b)}}}function E$(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}function Yu(t){return"pointNumber"in t&&"searchInfo"in t}function R$(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,a,i){var n=t.searchInfo.cd[0].trace._expandedIndex,o=i.cd[0].trace._expandedIndex;return o===n&&a===t.pointNumber},isRect:!1,degenerate:!1,subtract:!!t.subtract}}function gp(t){if(!t.length)return;for(var e=[],r=Yu(t[0])?0:t[0][0][0],a=r,i=Yu(t[0])?0:t[0][0][1],n=i,o=0;o<t.length;o++)if(Yu(t[o]))e.push(R$(t[o]));else{var l=pp(t[o]);l.subtract=!!t[o].subtract,e.push(l),r=Math.min(r,l.xmin),a=Math.max(a,l.xmax),i=Math.min(i,l.ymin),n=Math.max(n,l.ymax)}function s(f,c,v,u){for(var h=!1,d=0;d<e.length;d++)e[d].contains(f,c,v,u)&&(h=!e[d].subtract);return h}return{xmin:r,xmax:a,ymin:i,ymax:n,pts:[],contains:s,isRect:!1,degenerate:!1}}function gT(t,e,r){var a=e._fullLayout,i=r.plotinfo,n=r.dragmode,o=a._lastSelectedSubplot&&a._lastSelectedSubplot===i.id,l=(t.shiftKey||t.altKey)&&!(El(n)&&dp(n));o&&l&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!l||!i.selection)&&Rl(r),o||(hT(e),a._lastSelectedSubplot=i.id)}function z$(t){return t._fullLayout._activeShapeIndex>=0}function I$(t){return t._fullLayout._activeSelectionIndex>=0}function Rl(t,e){var r=t.dragmode,a=t.plotinfo,i=t.gd;z$(i)&&i._fullLayout._deactivateShape(i),I$(i)&&i._fullLayout._deactivateSelection(i);var n=i._fullLayout,o=n._zoomlayer,l=El(r),s=hp(r);if(l||s){var f=o.selectAll(".select-outline-"+a.id);if(f&&i._fullLayout._outlining){var c;l&&(c=T$(f,t)),c&&Pl.call("_guiRelayout",i,{shapes:c});var v;s&&!yp(t)&&(v=k$(f,t)),v&&(i._fullLayout._noEmitSelectedAtStart=!0,Pl.call("_guiRelayout",i,{selections:v}).then(function(){e&&A$(i)})),i._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=t.selectionDefs=[],a.selection.mergedPolygons=t.mergedPolygons=[]}function Ag(t){return t._id}function Ic(t,e,r,a){if(!t.calcdata)return[];var i=[],n=e.map(Ag),o=r.map(Ag),l,s,f;for(f=0;f<t.calcdata.length;f++)if(l=t.calcdata[f],s=l[0].trace,!(s.visible!==!0||!s._module||!s._module.selectPoints))if(yp({subplot:a})&&(s.subplot===a||s.geo===a))i.push(Ns(s._module,l,e[0],r[0]));else if(s.type==="splom"){if(s._xaxes[n[0]]&&s._yaxes[o[0]]){var c=Ns(s._module,l,e[0],r[0]);c.scene=t._fullLayout._splomScenes[s.uid],i.push(c)}}else if(s.type==="sankey"){var v=Ns(s._module,l,e[0],r[0]);i.push(v)}else{if(n.indexOf(s.xaxis)===-1||o.indexOf(s.yaxis)===-1)continue;i.push(Ns(s._module,l,fa(t,s.xaxis),fa(t,s.yaxis)))}return i}function Ns(t,e,r,a){return{_module:t,cd:e,xaxis:r,yaxis:a}}function F$(t){return t&&Array.isArray(t)&&t[0].hoverOnBox!==!0}function N$(t,e){var r=t[0],a=-1,i=[],n,o;for(o=0;o<e.length;o++)if(n=e[o],r.fullData._expandedIndex===n.cd[0].trace._expandedIndex){if(r.hoverOnBox===!0)break;r.pointNumber!==void 0?a=r.pointNumber:r.binNumber!==void 0&&(a=r.binNumber,i=r.pointNumbers);break}return{pointNumber:a,pointNumbers:i,searchInfo:n}}function Mg(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,a=t.pointNumbers,i=a.length>0,n=i?a[0]:r;return e.selectedpoints?e.selectedpoints.indexOf(n)>-1:!1}function H$(t,e){var r=[],a,i,n,o;for(o=0;o<t.length;o++)a=t[o],a.cd[0].trace.selectedpoints&&a.cd[0].trace.selectedpoints.length>0&&r.push(a);if(r.length===1&&(n=r[0]===e.searchInfo,n&&(i=e.searchInfo.cd[0].trace,i.selectedpoints.length===e.pointNumbers.length))){for(o=0;o<e.pointNumbers.length;o++)if(i.selectedpoints.indexOf(e.pointNumbers[o])<0)return!1;return!0}return!1}function O$(t){var e=0,r,a,i;for(i=0;i<t.length;i++)if(r=t[i],a=r.cd[0].trace,a.selectedpoints&&(a.selectedpoints.length>1||(e+=a.selectedpoints.length,e>1)))return!1;return e===1}function zl(t,e,r){var a;for(a=0;a<e.length;a++){var i=e[a].cd[0].trace._fullInput,n=t._fullLayout._tracePreGUI[i.uid]||{};n.selectedpoints===void 0&&(n.selectedpoints=i._input.selectedpoints||null)}var o;if(r){var l=r.points||[];for(a=0;a<e.length;a++)o=e[a].cd[0].trace,o._input.selectedpoints=o._fullInput.selectedpoints=[],o._fullInput!==o&&(o.selectedpoints=[]);for(var s=0;s<l.length;s++){var f=l[s],c=f.data,v=f.fullData,u=f.pointIndex,h=f.pointIndices;h?([].push.apply(c.selectedpoints,h),o._fullInput!==o&&[].push.apply(v.selectedpoints,h)):(c.selectedpoints.push(u),o._fullInput!==o&&v.selectedpoints.push(u))}}else for(a=0;a<e.length;a++)o=e[a].cd[0].trace,delete o.selectedpoints,delete o._input.selectedpoints,o._fullInput!==o&&delete o._fullInput.selectedpoints;B$(t,e)}function B$(t,e){for(var r=!1,a=0;a<e.length;a++){var i=e[a],n=i.cd;Pl.traceIs(n[0].trace,"regl")&&(r=!0);var o=i._module,l=o.styleOnSelect||o.style;l&&(l(t,n,n[0].node3),n[0].nodeRangePlot3&&l(t,n,n[0].nodeRangePlot3))}r&&(S$(t),L$(t))}function bT(t,e,r){for(var a=r?_g.difference:_g.union,i=a({regions:t},{regions:[e]}),n=i.regions.reverse(),o=0;o<n.length;o++){var l=n[o];l.subtract=bp(l,n.slice(0,o))}return n}function xT(t,e){if(Array.isArray(t))for(var r=e.cd,a=e.cd[0].trace,i=0;i<t.length;i++)t[i]=b$(t[i],a,r);return t}function _T(t,e){for(var r=[],a=0;a<t.length;a++){r[a]=[];for(var i=0;i<t[a].length;i++){r[a][i]=[],r[a][i][0]=i?"L":"M";for(var n=0;n<t[a][i].length;n++)r[a][i].push(t[a][i][n])}e||r[a].push(["Z",r[a][0][1],r[a][0][2]])}return r}function wT(t,e){for(var r=[],a,i,n=0;n<e.length;n++){var o=e[n];i=o._module.selectPoints(o,t),a=xT(i,o),r=r.concat(a)}return r}function Nd(t,e,r,a,i){var n=!!a,o,l,s;i&&(o=i.plotinfo,l=i.xaxes[0]._id,s=i.yaxes[0]._id);var f=[],c=[],v=Sg(t),u=t._fullLayout;if(o){var h=u._zoomlayer,d=u.dragmode,p=El(d),y=hp(d);if(p||y){var m=fa(t,l,"x"),g=fa(t,s,"y");if(m&&g){var w=h.selectAll(".select-outline-"+o.id);if(w&&t._fullLayout._outlining&&w.length){for(var b=w[0][0],x=b.getAttribute("d"),_=w$(x,t,o),T=[],k=0;k<_.length;k++){for(var S=_[k],M=[],D=0;D<S.length;D++)M.push([gi(m,S[D][1]),gi(g,S[D][2])]);M.xref=l,M.yref=s,M.subtract=bp(M,T),T.push(M)}v=v.concat(T)}}}}var A=l&&s?[l+s]:u._subplots.cartesian;j$(t);for(var C={},$=0;$<A.length;$++){var N=A[$],E=N.indexOf("y"),P=N.slice(0,E),R=N.slice(E),L=l&&s?r:void 0;if(L=U$(v,P,R,L),L){var z=a;if(!n){var I=fa(t,P,"x"),H=fa(t,R,"y");z=Ic(t,[I],[H],N);for(var V=0;V<z.length;V++){var O=z[V],X=O.cd[0],G=X.trace;if(O._module.name==="scattergl"&&!X.t.xpx){var Y=G.x,K=G.y,Z=G._length;X.t.xpx=[],X.t.ypx=[];for(var q=0;q<Z;q++)X.t.xpx[q]=I.c2p(Y[q]),X.t.ypx[q]=H.c2p(K[q])}O._module.name==="splom"&&(C[G.uid]||(C[G.uid]=!0))}}var ie=wT(L,z);f=f.concat(ie),c=c.concat(z)}}var fe={points:f};zl(t,c,fe);var be=u.clickmode,ne=be.indexOf("event")>-1&&e;if(!o&&e){var U=Sg(t,!0);if(U.length){var ae=U[0].xref,ce=U[0].yref;if(ae&&ce){var se=kT(U),pe=AT([fa(t,ae,"x"),fa(t,ce,"y")]);pe(fe,se)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:ne&&Il(t,fe),u._reselect=!1}if(!o&&u._deselect){var ge=u._deselect;l=ge.xref,s=ge.yref,G$(l,s,c)||TT(t,l,s,a),ne&&(fe.points.length?Il(t,fe):xp(t)),u._deselect=!1}return{eventData:fe,selectionTesters:r}}function j$(t){var e=t.calcdata;if(e)for(var r=0;r<e.length;r++){var a=e[r][0],i=a.trace,n=t._fullLayout._splomScenes;if(n){var o=n[i.uid];o&&(o.selectBatch=[])}}}function G$(t,e,r){for(var a=0;a<r.length;a++){var i=r[a];if(i.xaxis&&i.xaxis._id===t&&i.yaxis&&i.yaxis._id===e)return!0}return!1}function TT(t,e,r,a){a=Ic(t,[fa(t,e,"x")],[fa(t,r,"y")],e+r);for(var i=0;i<a.length;i++){var n=a[i];n._module.selectPoints(n,!1)}zl(t,a)}function U$(t,e,r,a){for(var i,n=0;n<t.length;n++){var o=t[n];if(!(e!==o.xref||r!==o.yref))if(i){var l=!!o.subtract;i=bT(i,o,l),a=gp(i)}else i=[o],a=pp(o)}return a}function Sg(t,e){for(var r=[],a=t._fullLayout,i=a.selections,n=i.length,o=0;o<n;o++)if(!(e&&o!==a._activeSelectionIndex)){var l=i[o];if(l){var s=l.xref,f=l.yref,c=fa(t,s,"x"),v=fa(t,f,"y"),u,h,d,p,y;if(l.type==="rect"){y=[];var m=gi(c,l.x0),g=gi(c,l.x1),w=gi(v,l.y0),b=gi(v,l.y1);y=[[m,w],[m,b],[g,b],[g,w]],u=Math.min(m,g),h=Math.max(m,g),d=Math.min(w,b),p=Math.max(w,b),y.xmin=u,y.xmax=h,y.ymin=d,y.ymax=p,y.xref=s,y.yref=f,y.subtract=!1,y.isRect=!0,r.push(y)}else if(l.type==="path")for(var x=l.path.split("Z"),_=[],T=0;T<x.length;T++){var k=x[T];if(k){k+="Z";var S=wg.extractPathCoords(k,Tg.paramIsX,"raw"),M=wg.extractPathCoords(k,Tg.paramIsY,"raw");u=1/0,h=-1/0,d=1/0,p=-1/0,y=[];for(var D=0;D<S.length;D++){var A=gi(c,S[D]),C=gi(v,M[D]);y.push([A,C]),u=Math.min(A,u),h=Math.max(A,h),d=Math.min(C,d),p=Math.max(C,p)}y.xmin=u,y.xmax=h,y.ymin=d,y.ymax=p,y.xref=s,y.yref=f,y.subtract=bp(y,_),_.push(y),r.push(y)}}}}return r}function bp(t,e){for(var r=!1,a=0;a<e.length;a++)for(var i=e[a],n=0;n<t.length;n++)if(m$(t[n],i)){r=!r;break}return r}function gi(t,e){return t.type==="date"&&(e=e.replace("_"," ")),t.type==="log"?t.c2p(e):t.r2p(e,null,t.calendar)}function kT(t){for(var e=t.length,r=[],a=0;a<e;a++){var i=t[a];r=r.concat(i),r=r.concat([i[0]])}return V$(r)}function V$(t){return t.isRect=t.length===5&&t[0][0]===t[4][0]&&t[0][1]===t[4][1]&&t[0][0]===t[1][0]&&t[2][0]===t[3][0]&&t[0][1]===t[3][1]&&t[1][1]===t[2][1]||t[0][1]===t[1][1]&&t[2][1]===t[3][1]&&t[0][0]===t[3][0]&&t[1][0]===t[2][0],t.isRect&&(t.xmin=Math.min(t[0][0],t[2][0]),t.xmax=Math.max(t[0][0],t[2][0]),t.ymin=Math.min(t[0][1],t[2][1]),t.ymax=Math.max(t[0][1],t[2][1])),t}function AT(t){return function(e,r){for(var a,i,n=0;n<t.length;n++){var o=t[n],l=o._id,s=l.charAt(0);if(r.isRect){a||(a={});var f=r[s+"min"],c=r[s+"max"];f!==void 0&&c!==void 0&&(a[l]=[kg(o,f),kg(o,c)].sort(M$))}else i||(i={}),i[l]=r.map(D$(o))}a&&(e.range=a),i&&(e.lassoPoints=i)}}function W$(t){var e=t.plotinfo;return e.fillRangeItems||AT(t.xaxes.concat(t.yaxes))}function X$(t,e){t.emit("plotly_selecting",e)}function Il(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function xp(t){t.emit("plotly_deselect",null)}var Y$={reselect:Nd,prepSelect:P$,clearOutline:hT,clearSelectionsCache:Rl,selectOnClick:yT},MT=[{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}],Fc={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}},Lg=MT,Cg=Dr,Hs=Hr,q$=It.templatedArray,Os=Fc;function Dg(t){return["In order for absolute positioning of the arrow to work, *a"+t+"ref* must be exactly the same as *"+t+"ref*, otherwise *a"+t+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+t+"ref* can be set to *pixel*,","in which case the *a"+t+"* value is specified in pixels","relative to *"+t+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function $g(t,e,r){return["Sets the",t,"component of the arrow tail about the arrow head.","If `a"+t+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",e,"("+e,"to",r+").","If `a"+t+"ref` is not `pixel` and is exactly the same as `"+t+"ref`,","this is an absolute value on that axis,","like `"+t+"`, specified in the same coordinates as `"+t+"ref`."].join(" ")}var as=q$("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (<br>), bold (<b></b>), italics (<i></i>),","hyperlinks (<a href='...'></a>). Tags <em>, <sup>, <sub>","<span> are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:Cg({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use <br> to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more <br> HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:Lg.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:Lg.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[$g("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[$g("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",Hs.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",Os.axisRefDescription("x","left","right"),Dg("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Hs.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",Os.axisRefDescription("y","bottom","top"),Dg("y")].join(" ")},xref:{valType:"enumerated",values:["paper",Hs.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",Os.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",Hs.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",Os.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:Cg({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}}),qr={},ST=k_,Z$=ST.FORMAT_LINK,K$=ST.DATE_FORMAT_LINK;function LT(t){var e=t&&t.supportOther;return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,Z$,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,K$,"for details on the date formatting syntax."].join(" ")}function CT(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var a=[],i=0;i<r.length;i++)a[i]="`"+r[i]+"`";e=e+"Finally, the template string has access to ",r.length===1?e="variable "+a[0]:e="variables "+a.slice(0,-1).join(", ")+" and "+a.slice(-1)+"."}return e}qr.hovertemplateAttrs=function(t,e){t=t||{},e=e||{};var r=CT(e),a={valType:"string",dflt:"",editType:t.editType||"none",description:["Template string used for rendering the information that appear on hover box.","Note that this will override `hoverinfo`.",LT({supportOther:!0}),"The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data.","Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r,'Anything contained in tag `<extra>` is displayed in the secondary box, for example "<extra>{fullData.name}</extra>".',"To hide the secondary box completely, use an empty tag `<extra></extra>`."].join(" ")};return t.arrayOk!==!1&&(a.arrayOk=!0),a};qr.texttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=CT(e),a={valType:"string",dflt:"",editType:t.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",LT(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return t.arrayOk!==!1&&(a.arrayOk=!0),a};var Nc={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]},Pg=Po.axisHoverFormat,Q$=qr.texttemplateAttrs,J$=qr.hovertemplateAttrs,Eg=xn,eP=Dr,tP=Da.dash,rP=Da.pattern,aP=Et,Rg=Nc,qu=Kt.extendFlat;function zg(t){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M<n>* on the "+t+" axis.","Special values in the form of *M<n>* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function Ig(t){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+t+" axis.","When `"+t+"period` is round number of weeks,","the `"+t+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function Fg(t){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+t+" axis."].join(" ")}}var Ei={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:zg("x"),yperiod:zg("y"),xperiod0:Ig("x0"),yperiod0:Ig("y0"),xperiodalignment:Fg("x"),yperiodalignment:Fg("y"),xhoverformat:Pg("x"),yhoverformat:Pg("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant in the following cases:","1. when `scattermode` is set to *group*.","2. when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:Q$({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+Rg.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:J$({},{keys:Rg.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:qu({},tP,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot",description:["Sets the line back off from the end point of the nth line segment (in px).","This option is useful e.g. to avoid overlap with arrowhead markers.","With *auto* the lines would trim before markers if `marker.angleref` is set to *previous*."].join(" ")},simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},fillpattern:rP,marker:qu({symbol:{valType:"enumerated",values:aP.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:qu({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},Eg("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},Eg("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:eP({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."})},Ng=as,Hg=Ei.line,iP=Da.dash,Bs=Kt.extendFlat,nP=ai.overrideAll,oP=It.templatedArray,Og=Fc,DT=nP(oP("selection",{type:{valType:"enumerated",values:["rect","path"],description:["Specifies the selection type to be drawn.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`).","If *path*, draw a custom SVG path using `path`."].join(" ")},xref:Bs({},Ng.xref,{description:["Sets the selection's x coordinate axis.",Og.axisRefDescription("x","left","right")].join(" ")}),yref:Bs({},Ng.yref,{description:["Sets the selection's x coordinate axis.",Og.axisRefDescription("y","bottom","top")].join(" ")}),x0:{valType:"any",description:"Sets the selection's starting x position."},x1:{valType:"any",description:"Sets the selection's end x position."},y0:{valType:"any",description:"Sets the selection's starting y position."},y1:{valType:"any",description:"Sets the selection's end y position."},path:{valType:"string",editType:"arraydraw",description:["For `type` *path* - a valid SVG path similar to `shapes.path` in data coordinates.","Allowed segments are: M, L and Z."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw",description:"Sets the opacity of the selection."},line:{color:Hg.color,width:Bs({},Hg.width,{min:1,dflt:1}),dash:Bs({},iP,{dflt:"dot"})}}),"arraydraw","from-root"),Bg=de,js=Ot,lP=Ua,sP=DT,jg=kn,fP=function(e,r){lP(e,r,{name:"selections",handleItemDefaults:cP});for(var a=r.selections,i=0;i<a.length;i++){var n=a[i];n&&n.path===void 0&&(n.x0===void 0||n.x1===void 0||n.y0===void 0||n.y1===void 0)&&(r.selections[i]=null)}};function cP(t,e,r){function a(_,T){return Bg.coerce(t,e,sP,_,T)}var i=a("path"),n=i?"path":"rect",o=a("type",n),l=o!=="path";l&&delete e.path,a("opacity"),a("line.color"),a("line.width"),a("line.dash");for(var s=["x","y"],f=0;f<2;f++){var c=s[f],v={_fullLayout:r},u,h,d,p=js.coerceRef(t,e,v,c);if(u=js.getFromId(v,p),u._selectionIndices.push(e._index),d=jg.rangeToShapePosition(u),h=jg.shapePositionToRange(u),l){var y=c+"0",m=c+"1",g=t[y],w=t[m];t[y]=h(t[y],!0),t[m]=h(t[m],!0),js.coercePosition(e,v,a,p,y),js.coercePosition(e,v,a,p,m);var b=e[y],x=e[m];b!==void 0&&x!==void 0&&(e[y]=d(b),e[m]=d(x),t[y]=g,t[m]=w)}}l&&Bg.noneOrAll(t,e,["x0","x1","y0","y1"])}var uP=function(e,r,a){a("newselection.mode");var i=a("newselection.line.width");i&&(a("newselection.line.color"),a("newselection.line.dash")),a("activeselection.fillcolor"),a("activeselection.opacity")},vP=tt,Gg=de,Ug=nr,Hc=function(e){return function(a,i){var n=a[e];if(Array.isArray(n))for(var o=vP.subplotsRegistry.cartesian,l=o.idRegex,s=i._subplots,f=s.xaxis,c=s.yaxis,v=s.cartesian,u=i._has("cartesian")||i._has("gl2d"),h=0;h<n.length;h++){var d=n[h];if(Gg.isPlainObject(d)){var p=Ug.cleanId(d.xref,"x",!1),y=Ug.cleanId(d.yref,"y",!1),m=l.x.test(p),g=l.y.test(y);if(m||g){u||Gg.pushUnique(i._basePlotModules,o);var w=!1;m&&f.indexOf(p)===-1&&(f.push(p),w=!0),g&&c.indexOf(y)===-1&&(c.push(y),w=!0),w&&m&&g&&v.push(p+y)}}}}},Vg=fT,Zo=Y$,yl={moduleType:"component",name:"selections",layoutAttributes:DT,supplyLayoutDefaults:fP,supplyDrawNewSelectionDefaults:uP,includeBasePlot:Hc("selections"),draw:Vg.draw,drawOne:Vg.drawOne,reselect:Zo.reselect,prepSelect:Zo.prepSelect,clearOutline:Zo.clearOutline,clearSelectionsCache:Zo.clearSelectionsCache,selectOnClick:Zo.selectOnClick},Zu,Wg;function dP(){if(Wg)return Zu;Wg=1;var t=yt,e=de,r=e.numberFormat,a=da,i=d1,n=tt,o=e.strTranslate,l=wr,s=ut,f=Et,c=Ca,v=Ot,u=Pi,h=Va,d=wn,p=d.selectingOrDrawing,y=d.freeMode,m=Yr.FROM_TL,g=ep,w=Lc.redrawReglTraces,b=sr,x=nr.getFromId,_=yl.prepSelect,T=yl.clearOutline,k=yl.selectOnClick,S=iT,M=Hr,D=M.MINDRAG,A=M.MINZOOM,C=!0;function $(U,ae,ce,se,pe,ge,_e,le){var De=U._fullLayout._zoomlayer,Ae=_e+le==="nsew",ze=(_e+le).length===1,Ve,oe,Ce,re,me,ve,Me,Se,$e,ye,Ne,Pe,je,Ie,Ue,ke,We,qe,Ye,Qe,F,B,j;ce+=ae.yaxis._shift;function W(){if(Ve=ae.xaxis,oe=ae.yaxis,$e=Ve._length,ye=oe._length,Me=Ve._offset,Se=oe._offset,Ce={},Ce[Ve._id]=Ve,re={},re[oe._id]=oe,_e&&le)for(var Oe=ae.overlays,Fe=0;Fe<Oe.length;Fe++){var it=Oe[Fe].xaxis;Ce[it._id]=it;var at=Oe[Fe].yaxis;re[at._id]=at}me=ne(Ce),ve=ne(re),je=P(me,le),Ie=P(ve,_e),Ue=!Ie&&!je,Pe=fe(U,U._fullLayout._axisMatchGroups,Ce,re),Ne=fe(U,U._fullLayout._axisConstraintGroups,Ce,re,Pe);var Xe=Ne.isSubplotConstrained||Pe.isSubplotConstrained;ke=le||Xe,We=_e||Xe;var Je=U._fullLayout;qe=Je._has("scattergl"),Ye=Je._has("splom"),Qe=Je._has("svg")}W();var J=H(Ie+je,U._fullLayout.dragmode,Ae),Q=E(ae,_e+le+"drag",J,ce,se,pe,ge);if(Ue&&!Ae)return Q.onmousedown=null,Q.style.pointerEvents="none",Q;var he={element:Q,gd:U,plotinfo:ae};he.prepFn=function(Oe,Fe,it){var at=he.dragmode,Xe=U._fullLayout.dragmode;Xe!==at&&(he.dragmode=Xe),W(),B=U._fullLayout._invScaleX,j=U._fullLayout._invScaleY,Ue||(Ae?Oe.shiftKey?Xe==="pan"?Xe="zoom":p(Xe)||(Xe="pan"):Oe.ctrlKey&&(Xe="pan"):Xe="pan"),y(Xe)?he.minDrag=1:he.minDrag=void 0,p(Xe)?(he.xaxes=me,he.yaxes=ve,_(Oe,Fe,it,he,Xe)):(he.clickFn=ue,p(at)&&Te(),Ue||(Xe==="zoom"?(he.moveFn=kt,he.doneFn=ct,he.minDrag=1,et(Oe,Fe,it)):Xe==="pan"&&(he.moveFn=Ge,he.doneFn=or))),U._fullLayout._redrag=function(){var Je=U._dragdata;if(Je&&Je.element===Q){var pt=U._fullLayout.dragmode;p(pt)||(W(),br([0,0,$e,ye]),he.moveFn(Je.dx,Je.dy))}}};function Te(){he.plotinfo.selection=!1,T(U)}function ue(Oe,Fe){var it=he.gd;if(it._fullLayout._activeShapeIndex>=0){it._fullLayout._deactivateShape(it);return}var at=it._fullLayout.clickmode;if(Y(it),Oe===2&&!ze&&pr(),Ae)at.indexOf("select")>-1&&k(Fe,it,me,ve,ae.id,he),at.indexOf("event")>-1&&c.click(it,Fe,ae.id);else if(Oe===1&&ze){var Xe=_e?oe:Ve,Je=_e==="s"||le==="w"?0:1,pt=Xe._name+".range["+Je+"]",$t=R(Xe,Je),Pt="left",er="middle";if(Xe.fixedrange)return;_e?(er=_e==="n"?"top":"bottom",Xe.side==="right"&&(Pt="right")):le==="e"&&(Pt="right"),it._context.showAxisRangeEntryBoxes&&t.select(Q).call(l.makeEditable,{gd:it,immediate:!0,background:it._fullLayout.paper_bgcolor,text:String($t),fill:Xe.tickfont?Xe.tickfont.color:"#444",horizontalAlign:Pt,verticalAlign:er}).on("edit",function(Bt){var wt=Xe.d2r(Bt);wt!==void 0&&n.call("_guiRelayout",it,pt,wt)})}}h.init(he);var te,xe,we,Be,ot,vt,st,Ke,Mt,ft;function et(Oe,Fe,it){var at=Q.getBoundingClientRect();te=Fe-at.left,xe=it-at.top,U._fullLayout._calcInverseTransform(U);var Xe=e.apply3DTransform(U._fullLayout._invTransform)(te,xe);te=Xe[0],xe=Xe[1],we={l:te,r:te,w:0,t:xe,b:xe,h:0},Be=U._hmpixcount?U._hmlumcount/U._hmpixcount:a(U._fullLayout.plot_bgcolor).getLuminance(),ot="M0,0H"+$e+"V"+ye+"H0V0",vt=!1,st="xy",ft=!1,Ke=V(De,Be,Me,Se,ot),Mt=O(De,Me,Se)}function kt(Oe,Fe){if(U._transitioningWithDuration)return!1;var it=Math.max(0,Math.min($e,B*Oe+te)),at=Math.max(0,Math.min(ye,j*Fe+xe)),Xe=Math.abs(it-te),Je=Math.abs(at-xe);we.l=Math.min(te,it),we.r=Math.max(te,it),we.t=Math.min(xe,at),we.b=Math.max(xe,at);function pt(){st="",we.r=we.l,we.t=we.b,Mt.attr("d","M0,0Z")}if(Ne.isSubplotConstrained)Xe>A||Je>A?(st="xy",Xe/$e>Je/ye?(Je=Xe*ye/$e,xe>at?we.t=xe-Je:we.b=xe+Je):(Xe=Je*$e/ye,te>it?we.l=te-Xe:we.r=te+Xe),Mt.attr("d",ie(we))):pt();else if(Pe.isSubplotConstrained)if(Xe>A||Je>A){st="xy";var $t=Math.min(we.l/$e,(ye-we.b)/ye),Pt=Math.max(we.r/$e,(ye-we.t)/ye);we.l=$t*$e,we.r=Pt*$e,we.b=(1-$t)*ye,we.t=(1-Pt)*ye,Mt.attr("d",ie(we))}else pt();else!Ie||Je<Math.min(Math.max(Xe*.6,D),A)?Xe<D||!je?pt():(we.t=0,we.b=ye,st="x",Mt.attr("d",Z(we,xe))):!je||Xe<Math.min(Je*.6,A)?(we.l=0,we.r=$e,st="y",Mt.attr("d",q(we,te))):(st="xy",Mt.attr("d",ie(we)));we.w=we.r-we.l,we.h=we.b-we.t,st&&(ft=!0),U._dragged=ft,X(Ke,Mt,we,ot,vt,Be),xt(),U.emit("plotly_relayouting",F),vt=!0}function xt(){F={},(st==="xy"||st==="x")&&(L(me,we.l/$e,we.r/$e,F,Ne.xaxes),ht("x",F)),(st==="xy"||st==="y")&&(L(ve,(ye-we.b)/ye,(ye-we.t)/ye,F,Ne.yaxes),ht("y",F))}function ct(){xt(),Y(U),or(),K(U)}var rt=[0,0,$e,ye],Ze=null,nt=M.REDRAWDELAY,bt=ae.mainplot?U._fullLayout._plots[ae.mainplot]:ae;function dt(Oe){if(!U._context._scrollZoom.cartesian&&!U._fullLayout._enablescrollzoom)return;if(Te(),U._transitioningWithDuration){Oe.preventDefault(),Oe.stopPropagation();return}W(),clearTimeout(Ze);var Fe=-Oe.deltaY;if(isFinite(Fe)||(Fe=Oe.wheelDelta/10),!isFinite(Fe)){e.log("Did not find wheel motion attributes: ",Oe);return}var it=Math.exp(-Math.min(Math.max(Fe,-20),20)/200),at=bt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Xe=(Oe.clientX-at.left)/at.width,Je=(at.bottom-Oe.clientY)/at.height,pt;function $t(Pt,er,Bt){if(Pt.fixedrange)return;var wt=e.simpleMap(Pt.range,Pt.r2l),qt=wt[0]+(wt[1]-wt[0])*er;function Ar(Ft){return Pt.l2r(qt+(Ft-qt)*Bt)}Pt.range=wt.map(Ar)}if(ke){for(le||(Xe=.5),pt=0;pt<me.length;pt++)$t(me[pt],Xe,it);ht("x"),rt[2]*=it,rt[0]+=rt[2]*Xe*(1/it-1)}if(We){for(_e||(Je=.5),pt=0;pt<ve.length;pt++)$t(ve[pt],Je,it);ht("y"),rt[3]*=it,rt[1]+=rt[3]*(1-Je)*(1/it-1)}br(rt),Dt(),U.emit("plotly_relayouting",F),Ze=setTimeout(function(){U._fullLayout&&(rt=[0,0,$e,ye],or())},nt),Oe.preventDefault()}_e.length*le.length!==1&&be(Q,dt);function Ge(Oe,Fe){if(Oe=Oe*B,Fe=Fe*j,U._transitioningWithDuration)return;if(U._fullLayout._replotting=!0,je==="ew"||Ie==="ns"){var it=je?-Oe:0,at=Ie?-Fe:0;if(Pe.isSubplotConstrained){if(je&&Ie){var Xe=(Oe/$e-Fe/ye)/2;Oe=Xe*$e,Fe=-Xe*ye,it=-Oe,at=-Fe}Ie?it=-at*$e/ye:at=-it*ye/$e}je&&(z(me,Oe),ht("x")),Ie&&(z(ve,Fe),ht("y")),br([it,at,$e,ye]),Dt(),U.emit("plotly_relayouting",F);return}function Je(Ar,Ft,Nt){for(var mr=1-Ft,Tr,Ii,Io=0;Io<Ar.length;Io++){var ci=Ar[Io];if(!ci.fixedrange){Tr=ci,Ii=ci._rl[mr]+(ci._rl[Ft]-ci._rl[mr])/I(Nt/ci._length);var Qc=ci.l2r(Ii);Qc!==!1&&Qc!==void 0&&(ci.range[Ft]=Qc)}}return Tr._length*(Tr._rl[Ft]-Ii)/(Tr._rl[Ft]-Tr._rl[mr])}var pt=je==="w"==(Ie==="n")?1:-1;if(je&&Ie&&(Ne.isSubplotConstrained||Pe.isSubplotConstrained)){var $t=(Oe/$e+pt*Fe/ye)/2;Oe=$t*$e,Fe=pt*$t*ye}var Pt,er;if(je==="w"?Oe=Je(me,0,Oe):je==="e"?Oe=Je(me,1,-Oe):je||(Oe=0),Ie==="n"?Fe=Je(ve,1,Fe):Ie==="s"?Fe=Je(ve,0,-Fe):Ie||(Fe=0),Pt=je==="w"?Oe:0,er=Ie==="n"?Fe:0,Ne.isSubplotConstrained&&!Pe.isSubplotConstrained||Pe.isSubplotConstrained&&je&&Ie&&pt>0){var Bt;if(Pe.isSubplotConstrained||!je&&Ie.length===1){for(Bt=0;Bt<me.length;Bt++)me[Bt].range=me[Bt]._r.slice(),S(me[Bt],1-Fe/ye);Oe=Fe*$e/ye,Pt=Oe/2}if(Pe.isSubplotConstrained||!Ie&&je.length===1){for(Bt=0;Bt<ve.length;Bt++)ve[Bt].range=ve[Bt]._r.slice(),S(ve[Bt],1-Oe/$e);Fe=Oe*ye/$e,er=Fe/2}}(!Pe.isSubplotConstrained||!Ie)&&ht("x"),(!Pe.isSubplotConstrained||!je)&&ht("y");var wt=$e-Oe,qt=ye-Fe;Pe.isSubplotConstrained&&!(je&&Ie)&&(je?(er=Pt?0:Oe*ye/$e,qt=wt*ye/$e):(Pt=er?0:Fe*$e/ye,wt=qt*$e/ye)),br([Pt,er,wt,qt]),Dt(),U.emit("plotly_relayouting",F)}function ht(Oe,Fe){for(var it=Pe.isSubplotConstrained?{x:ve,y:me}[Oe]:Pe[Oe+"axes"],at=Pe.isSubplotConstrained?{x:me,y:ve}[Oe]:[],Xe=0;Xe<it.length;Xe++){var Je=it[Xe],pt=Je._id,$t=Pe.xLinks[pt]||Pe.yLinks[pt],Pt=at[0]||Ce[$t]||re[$t];Pt&&(Fe?(Fe[Je._name+".range[0]"]=Fe[Pt._name+".range[0]"],Fe[Je._name+".range[1]"]=Fe[Pt._name+".range[1]"]):Je.range=Pt.range.slice())}}function Dt(){var Oe=[],Fe;function it(pt){for(Fe=0;Fe<pt.length;Fe++)pt[Fe].fixedrange||Oe.push(pt[Fe]._id)}function at(pt,$t){for(Fe=0;Fe<pt.length;Fe++){var Pt=pt[Fe],er=Pt[$t];!Pt.fixedrange&&er.tickmode==="sync"&&Oe.push(er._id)}}for(ke&&(it(me),it(Ne.xaxes),it(Pe.xaxes),at(ae.overlays,"xaxis")),We&&(it(ve),it(Ne.yaxes),it(Pe.yaxes),at(ae.overlays,"yaxis")),F={},Fe=0;Fe<Oe.length;Fe++){var Xe=Oe[Fe],Je=x(U,Xe);v.drawOne(U,Je,{skipTitle:!0}),F[Je._name+".range[0]"]=Je.range[0],F[Je._name+".range[1]"]=Je.range[1]}v.redrawComponents(U,Oe)}function pr(){if(!U._transitioningWithDuration){var Oe=U._context.doubleClick,Fe=[];je&&(Fe=Fe.concat(me)),Ie&&(Fe=Fe.concat(ve)),Pe.xaxes&&(Fe=Fe.concat(Pe.xaxes)),Pe.yaxes&&(Fe=Fe.concat(Pe.yaxes));var it={},at,Xe,Je;if(Oe==="reset+autosize"){for(Oe="autosize",Xe=0;Xe<Fe.length;Xe++)if(at=Fe[Xe],at._rangeInitial&&(at.range[0]!==at._rangeInitial[0]||at.range[1]!==at._rangeInitial[1])||!at._rangeInitial&&!at.autorange){Oe="reset";break}}if(Oe==="autosize")for(Xe=0;Xe<Fe.length;Xe++)at=Fe[Xe],at.fixedrange||(it[at._name+".autorange"]=!0);else if(Oe==="reset")for((je||Ne.isSubplotConstrained)&&(Fe=Fe.concat(Ne.xaxes)),Ie&&!Ne.isSubplotConstrained&&(Fe=Fe.concat(Ne.yaxes)),Ne.isSubplotConstrained&&(je?Ie||(Fe=Fe.concat(ve)):Fe=Fe.concat(me)),Xe=0;Xe<Fe.length;Xe++)at=Fe[Xe],at.fixedrange||(at._rangeInitial?(Je=at._rangeInitial,it[at._name+".range[0]"]=Je[0],it[at._name+".range[1]"]=Je[1]):it[at._name+".autorange"]=!0);U.emit("plotly_doubleclick",null),n.call("_guiRelayout",U,it)}}function or(){br([0,0,$e,ye]),e.syncOrAsync([b.previousPromises,function(){U._fullLayout._replotting=!1,n.call("_guiRelayout",U,F)}],U)}function br(Oe){var Fe=U._fullLayout,it=Fe._plots,at=Fe._subplots.cartesian,Xe,Je,pt,$t;if(Ye&&n.subplotsRegistry.splom.drag(U),qe){for(Xe=0;Xe<at.length;Xe++)if(Je=it[at[Xe]],pt=Je.xaxis,$t=Je.yaxis,Je._scene){var Pt=e.simpleMap(pt.range,pt.r2l),er=e.simpleMap($t.range,$t.r2l);Je._scene.update({range:[Pt[0],er[0],Pt[1],er[1]]})}}if((Ye||qe)&&(g(U),w(U)),Qe){var Bt=Oe[2]/Ve._length,wt=Oe[3]/oe._length;for(Xe=0;Xe<at.length;Xe++){Je=it[at[Xe]],pt=Je.xaxis,$t=Je.yaxis;var qt=(ke||Pe.isSubplotConstrained)&&!pt.fixedrange&&Ce[pt._id],Ar=(We||Pe.isSubplotConstrained)&&!$t.fixedrange&&re[$t._id],Ft,Nt,mr,Tr;if(qt?(Ft=Bt,mr=le||Pe.isSubplotConstrained?Oe[0]:Zr(pt,Ft)):Pe.xaHash[pt._id]?(Ft=Bt,mr=Oe[0]*pt._length/Ve._length):Pe.yaHash[pt._id]?(Ft=wt,mr=Ie==="ns"?-Oe[1]*pt._length/oe._length:Zr(pt,Ft,{n:"top",s:"bottom"}[Ie])):(Ft=Ir(pt,Bt,wt),mr=fi(pt,Ft)),Ar?(Nt=wt,Tr=_e||Pe.isSubplotConstrained?Oe[1]:Zr($t,Nt)):Pe.yaHash[$t._id]?(Nt=wt,Tr=Oe[1]*$t._length/oe._length):Pe.xaHash[$t._id]?(Nt=Bt,Tr=je==="ew"?-Oe[0]*$t._length/Ve._length:Zr($t,Nt,{e:"right",w:"left"}[je])):(Nt=Ir($t,Bt,wt),Tr=fi($t,Nt)),!(!Ft&&!Nt)){Ft||(Ft=1),Nt||(Nt=1);var Ii=pt._offset-mr/Ft,Io=$t._offset-Tr/Nt;Je.clipRect.call(f.setTranslate,mr,Tr).call(f.setScale,Ft,Nt),Je.plot.call(f.setTranslate,Ii,Io).call(f.setScale,1/Ft,1/Nt),(Ft!==Je.xScaleFactor||Nt!==Je.yScaleFactor)&&(f.setPointGroupScale(Je.zoomScalePts,Ft,Nt),f.setTextPointsScale(Je.zoomScaleTxt,Ft,Nt)),f.hideOutsideRangePoints(Je.clipOnAxisFalseTraces,Je),Je.xScaleFactor=Ft,Je.yScaleFactor=Nt}}}}function Ir(Oe,Fe,it){return Oe.fixedrange?0:ke&&Ne.xaHash[Oe._id]?Fe:We&&(Ne.isSubplotConstrained?Ne.xaHash:Ne.yaHash)[Oe._id]?it:0}function fi(Oe,Fe){return Fe?(Oe.range=Oe._r.slice(),S(Oe,Fe),Zr(Oe,Fe)):0}function Zr(Oe,Fe,it){return Oe._length*(1-Fe)*m[it||Oe.constraintoward||"middle"]}return Q}function N(U,ae,ce,se){var pe=e.ensureSingle(U.draglayer,ae,ce,function(ge){ge.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",U.id)});return pe.call(u,se),pe.node()}function E(U,ae,ce,se,pe,ge,_e){var le=N(U,"rect",ae,ce);return t.select(le).call(f.setRect,se,pe,ge,_e),le}function P(U,ae){for(var ce=0;ce<U.length;ce++)if(!U[ce].fixedrange)return ae;return""}function R(U,ae){var ce=U.range[ae],se=Math.abs(ce-U.range[1-ae]),pe;return U.type==="date"?ce:U.type==="log"?(pe=Math.ceil(Math.max(0,-Math.log(se)/Math.LN10))+3,r("."+pe+"g")(Math.pow(10,ce))):(pe=Math.floor(Math.log(Math.abs(ce))/Math.LN10)-Math.floor(Math.log(se)/Math.LN10)+4,r("."+String(pe)+"g")(ce))}function L(U,ae,ce,se,pe){for(var ge=0;ge<U.length;ge++){var _e=U[ge];if(!_e.fixedrange)if(_e.rangebreaks){var le=_e._id.charAt(0)==="y",De=le?1-ae:ae,Ae=le?1-ce:ce;se[_e._name+".range[0]"]=_e.l2r(_e.p2l(De*_e._length)),se[_e._name+".range[1]"]=_e.l2r(_e.p2l(Ae*_e._length))}else{var ze=_e._rl[0],Ve=_e._rl[1]-ze;se[_e._name+".range[0]"]=_e.l2r(ze+Ve*ae),se[_e._name+".range[1]"]=_e.l2r(ze+Ve*ce)}}if(pe&&pe.length){var oe=(ae+(1-ce))/2;L(pe,oe,1-oe,se,[])}}function z(U,ae){for(var ce=0;ce<U.length;ce++){var se=U[ce];if(!se.fixedrange)if(se.rangebreaks){var pe=0,ge=se._length,_e=se.p2l(pe+ae)-se.p2l(pe),le=se.p2l(ge+ae)-se.p2l(ge),De=(_e+le)/2;se.range=[se.l2r(se._rl[0]-De),se.l2r(se._rl[1]-De)]}else se.range=[se.l2r(se._rl[0]-ae/se._m),se.l2r(se._rl[1]-ae/se._m)]}}function I(U){return 1-(U>=0?Math.min(U,.9):1/(1/Math.max(U,-.3)+3.222))}function H(U,ae,ce){return U?U==="nsew"?ce?"":ae==="pan"?"move":"crosshair":U.toLowerCase()+"-resize":"pointer"}function V(U,ae,ce,se,pe){return U.append("path").attr("class","zoombox").style({fill:ae>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",o(ce,se)).attr("d",pe+"Z")}function O(U,ae,ce){return U.append("path").attr("class","zoombox-corners").style({fill:s.background,stroke:s.defaultLine,"stroke-width":1,opacity:0}).attr("transform",o(ae,ce)).attr("d","M0,0Z")}function X(U,ae,ce,se,pe,ge){U.attr("d",se+"M"+ce.l+","+ce.t+"v"+ce.h+"h"+ce.w+"v-"+ce.h+"h-"+ce.w+"Z"),G(U,ae,pe,ge)}function G(U,ae,ce,se){ce||(U.transition().style("fill",se>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ae.transition().style("opacity",1).duration(200))}function Y(U){t.select(U).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function K(U){C&&U.data&&U._context.showTips&&(e.notifier(e._(U,"Double-click to zoom back out"),"long"),C=!1)}function Z(U,ae){return"M"+(U.l-.5)+","+(ae-A-.5)+"h-3v"+(2*A+1)+"h3ZM"+(U.r+.5)+","+(ae-A-.5)+"h3v"+(2*A+1)+"h-3Z"}function q(U,ae){return"M"+(ae-A-.5)+","+(U.t-.5)+"v-3h"+(2*A+1)+"v3ZM"+(ae-A-.5)+","+(U.b+.5)+"v3h"+(2*A+1)+"v-3Z"}function ie(U){var ae=Math.floor(Math.min(U.b-U.t,U.r-U.l,A)/2);return"M"+(U.l-3.5)+","+(U.t-.5+ae)+"h3v"+-ae+"h"+ae+"v-3h-"+(ae+3)+"ZM"+(U.r+3.5)+","+(U.t-.5+ae)+"h-3v"+-ae+"h"+-ae+"v-3h"+(ae+3)+"ZM"+(U.r+3.5)+","+(U.b+.5-ae)+"h-3v"+ae+"h"+-ae+"v3h"+(ae+3)+"ZM"+(U.l-3.5)+","+(U.b+.5-ae)+"h3v"+ae+"h"+ae+"v3h-"+(ae+3)+"Z"}function fe(U,ae,ce,se,pe){for(var ge=!1,_e={},le={},De,Ae,ze,Ve,oe=(pe||{}).xaHash,Ce=(pe||{}).yaHash,re=0;re<ae.length;re++){var me=ae[re];for(De in ce)if(me[De]){for(ze in me)!(pe&&(oe[ze]||Ce[ze]))&&!(ze.charAt(0)==="x"?ce:se)[ze]&&(_e[ze]=De);for(Ae in se)!(pe&&(oe[Ae]||Ce[Ae]))&&me[Ae]&&(ge=!0)}for(Ae in se)if(me[Ae])for(Ve in me)!(pe&&(oe[Ve]||Ce[Ve]))&&!(Ve.charAt(0)==="x"?ce:se)[Ve]&&(le[Ve]=Ae)}ge&&(e.extendFlat(_e,le),le={});var ve={},Me=[];for(ze in _e){var Se=x(U,ze);Me.push(Se),ve[Se._id]=Se}var $e={},ye=[];for(Ve in le){var Ne=x(U,Ve);ye.push(Ne),$e[Ne._id]=Ne}return{xaHash:ve,yaHash:$e,xaxes:Me,yaxes:ye,xLinks:_e,yLinks:le,isSubplotConstrained:ge}}function be(U,ae){if(!i)U.onwheel!==void 0?U.onwheel=ae:U.onmousewheel!==void 0?U.onmousewheel=ae:U.isAddedWheelEvent||(U.isAddedWheelEvent=!0,U.addEventListener("wheel",ae,{passive:!1}));else{var ce=U.onwheel!==void 0?"wheel":"mousewheel";U._onwheel&&U.removeEventListener(ce,U._onwheel),U._onwheel=ae,U.addEventListener(ce,ae,{passive:!1})}}function ne(U){var ae=[];for(var ce in U)ae.push(U[ce]);return ae}return Zu={makeDragBox:$,makeDragger:N,makeRectDragger:E,makeZoombox:V,makeCorners:O,updateZoombox:X,xyCorners:ie,transitionZoombox:G,removeZoombox:Y,showDoubleClickNotifier:K,attachWheelEventHandler:be},Zu}var Xg;function $T(){return Xg||(Xg=1,function(t){var e=yt,r=Ca,a=Va,i=Pi,n=dP().makeDragBox,o=Hr.DRAGGERSIZE;t.initInteractions=function(s){var f=s._fullLayout;if(s._context.staticPlot){e.select(s).selectAll(".drag").remove();return}if(!(!f._has("cartesian")&&!f._has("splom"))){var c=Object.keys(f._plots||{}).sort(function(u,h){if((f._plots[u].mainplot&&!0)===(f._plots[h].mainplot&&!0)){var d=u.split("y"),p=h.split("y");return d[0]===p[0]?Number(d[1]||1)-Number(p[1]||1):Number(d[0]||1)-Number(p[0]||1)}return f._plots[u].mainplot?1:-1});c.forEach(function(u){var h=f._plots[u],d=h.xaxis,p=h.yaxis;if(!h.mainplot){var y=n(s,h,d._offset,p._offset,d._length,p._length,"ns","ew");y.onmousemove=function(w){s._fullLayout._rehover=function(){s._fullLayout._hoversubplot===u&&s._fullLayout._plots[u]&&r.hover(s,w,u)},r.hover(s,w,u),s._fullLayout._lasthover=y,s._fullLayout._hoversubplot=u},y.onmouseout=function(w){s._dragging||(s._fullLayout._hoversubplot=null,a.unhover(s,w))},s._context.showAxisDragHandles&&(n(s,h,d._offset-o,p._offset-o,o,o,"n","w"),n(s,h,d._offset+d._length,p._offset-o,o,o,"n","e"),n(s,h,d._offset-o,p._offset+p._length,o,o,"s","w"),n(s,h,d._offset+d._length,p._offset+p._length,o,o,"s","e"))}if(s._context.showAxisDragHandles){if(u===d._mainSubplot){var m=d._mainLinePosition;d.side==="top"&&(m-=o),n(s,h,d._offset+d._length*.1,m,d._length*.8,o,"","ew"),n(s,h,d._offset,m,d._length*.1,o,"","w"),n(s,h,d._offset+d._length*.9,m,d._length*.1,o,"","e")}if(u===p._mainSubplot){var g=p._mainLinePosition;p.side!=="right"&&(g-=o),n(s,h,g,p._offset+p._length*.1,o,p._length*.8,"ns",""),n(s,h,g,p._offset+p._length*.9,o,p._length*.1,"s",""),n(s,h,g,p._offset,o,p._length*.1,"n","")}}});var v=f._hoverlayer.node();v.onmousemove=function(u){u.target=s._fullLayout._lasthover,r.hover(s,u,f._hoversubplot)},v.onclick=function(u){u.target=s._fullLayout._lasthover,r.click(s,u)},v.onmousedown=function(u){s._fullLayout._lasthover.onmousedown(u)},t.updateFx(s)}},t.updateFx=function(l){var s=l._fullLayout,f=s.dragmode==="pan"?"move":"crosshair";i(s._draggers,f)}}(ku)),ku}var is={},Yg=tt,hP=function(e){for(var r=Yg.layoutArrayContainers,a=Yg.layoutArrayRegexes,i=e.split("[")[0],n,o,l=0;l<a.length;l++)if(o=e.match(a[l]),o&&o.index===0){n=o[0];break}if(n||(n=r[r.indexOf(i)]),!n)return!1;var s=e.substr(n.length);return s?(o=s.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),o?{array:n,index:Number(o[1]),property:o[3]||""}:!1):{array:n,index:"",property:""}},pP=Wl,Ku=xh,Ko=Lo,mP=Th.sorterAsc,Qu=tt;is.containerArrayMatch=hP;var yP=is.isAddVal=function(e){return e==="add"||pP(e)},qg=is.isRemoveVal=function(e){return e===null||e==="remove"};is.applyContainerArrayChanges=function(e,r,a,i,n){var o=r.astr,l=Qu.getComponentMethod(o,"supplyLayoutDefaults"),s=Qu.getComponentMethod(o,"draw"),f=Qu.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||l===Ku||s===Ku,v=e.layout,u=e._fullLayout;if(a[""]){Object.keys(a).length>1&&Ko.warn("Full array edits are incompatible with other edits",o);var h=a[""][""];if(qg(h))r.set(null);else if(Array.isArray(h))r.set(h);else return Ko.warn("Unrecognized full array edit value",o,h),!0;return c?!1:(l(v,u),s(e),!0)}var d=Object.keys(a).map(Number).sort(mP),p=r.get(),y=p||[],m=n(u,o).get(),g=[],w=-1,b=y.length,x,_,T,k,S,M,D,A;for(x=0;x<d.length;x++){if(T=d[x],k=a[T],S=Object.keys(k),M=k[""],D=yP(M),T<0||T>y.length-(D?0:1)){Ko.warn("index out of range",o,T);continue}if(M!==void 0)S.length>1&&Ko.warn("Insertion & removal are incompatible with edits to the same index.",o,T),qg(M)?g.push(T):D?(M==="add"&&(M={}),y.splice(T,0,M),m&&m.splice(T,0,{})):Ko.warn("Unrecognized full object edit value",o,T,M),w===-1&&(w=T);else for(_=0;_<S.length;_++)A=o+"["+T+"].",n(y[T],S[_],A).set(k[S[_]])}for(x=g.length-1;x>=0;x--)y.splice(g[x],1),m&&m.splice(g[x],1);if(y.length?p||r.set(y):r.set(null),c)return!1;if(l(v,u),f!==Ku){var C;if(w===-1)C=d;else{for(b=Math.max(y.length,b),C=[],x=0;x<d.length&&(T=d[x],!(T>=w));x++)C.push(T);for(x=w;x<b;x++)C.push(x)}for(x=0;x<C.length;x++)f(e,C[x])}else s(e);return!0};var PT={};(function(t){var e=_t,r=IA,a=tt,i=de,n=sr,o=nr,l=ut,s=o.cleanId,f=o.getFromTrace,c=a.traceIs;t.clearPromiseQueue=function(b){Array.isArray(b._promises)&&b._promises.length>0&&i.log("Clearing previous rejected promises from queue."),b._promises=[]},t.cleanLayout=function(b){var x,_;b||(b={}),b.xaxis1&&(b.xaxis||(b.xaxis=b.xaxis1),delete b.xaxis1),b.yaxis1&&(b.yaxis||(b.yaxis=b.yaxis1),delete b.yaxis1),b.scene1&&(b.scene||(b.scene=b.scene1),delete b.scene1);var T=(n.subplotsRegistry.cartesian||{}).attrRegex,k=(n.subplotsRegistry.polar||{}).attrRegex,S=(n.subplotsRegistry.ternary||{}).attrRegex,M=(n.subplotsRegistry.gl3d||{}).attrRegex,D=Object.keys(b);for(x=0;x<D.length;x++){var A=D[x];if(T&&T.test(A)){var C=b[A];C.anchor&&C.anchor!=="free"&&(C.anchor=s(C.anchor)),C.overlaying&&(C.overlaying=s(C.overlaying)),C.type||(C.isdate?C.type="date":C.islog?C.type="log":C.isdate===!1&&C.islog===!1&&(C.type="linear")),(C.autorange==="withzero"||C.autorange==="tozero")&&(C.autorange=!0,C.rangemode="tozero"),delete C.islog,delete C.isdate,delete C.categories,y(C,"domain")&&delete C.domain,C.autotick!==void 0&&(C.tickmode===void 0&&(C.tickmode=C.autotick?"auto":"linear"),delete C.autotick),u(C)}else if(k&&k.test(A)){var $=b[A];u($.radialaxis)}else if(S&&S.test(A)){var N=b[A];u(N.aaxis),u(N.baxis),u(N.caxis)}else if(M&&M.test(A)){var E=b[A],P=E.cameraposition;if(Array.isArray(P)&&P[0].length===4){var R=P[0],L=P[1],z=P[2],I=r([],R),H=[];for(_=0;_<3;++_)H[_]=L[_]+z*I[2+4*_];E.camera={eye:{x:H[0],y:H[1],z:H[2]},center:{x:L[0],y:L[1],z:L[2]},up:{x:0,y:0,z:1}},delete E.cameraposition}u(E.xaxis),u(E.yaxis),u(E.zaxis)}}var V=Array.isArray(b.annotations)?b.annotations.length:0;for(x=0;x<V;x++){var O=b.annotations[x];i.isPlainObject(O)&&(O.ref&&(O.ref==="paper"?(O.xref="paper",O.yref="paper"):O.ref==="data"&&(O.xref="x",O.yref="y"),delete O.ref),v(O,"xref"),v(O,"yref"))}var X=Array.isArray(b.shapes)?b.shapes.length:0;for(x=0;x<X;x++){var G=b.shapes[x];i.isPlainObject(G)&&(v(G,"xref"),v(G,"yref"))}var Y=Array.isArray(b.images)?b.images.length:0;for(x=0;x<Y;x++){var K=b.images[x];i.isPlainObject(K)&&(v(K,"xref"),v(K,"yref"))}var Z=b.legend;return Z&&(Z.x>3?(Z.x=1.02,Z.xanchor="left"):Z.x<-2&&(Z.x=-.02,Z.xanchor="right"),Z.y>3?(Z.y=1.02,Z.yanchor="bottom"):Z.y<-2&&(Z.y=-.02,Z.yanchor="top")),u(b),b.dragmode==="rotate"&&(b.dragmode="orbit"),l.clean(b),b.template&&b.template.layout&&t.cleanLayout(b.template.layout),b};function v(b,x){var _=b[x],T=x.charAt(0);_&&_!=="paper"&&(b[x]=s(_,T,!0))}function u(b){b&&((typeof b.title=="string"||typeof b.title=="number")&&(b.title={text:b.title}),x("titlefont","font"),x("titleposition","position"),x("titleside","side"),x("titleoffset","offset"));function x(_,T){var k=b[_],S=b.title&&b.title[T];k&&!S&&(b.title||(b.title={}),b.title[T]=b[_],delete b[_])}}t.cleanData=function(b){for(var x=0;x<b.length;x++){var _=b[x],T;if(_.type==="histogramy"&&"xbins"in _&&!("ybins"in _)&&(_.ybins=_.xbins,delete _.xbins),_.error_y&&"opacity"in _.error_y){var k=l.defaults,S=_.error_y.color||(c(_,"bar")?l.defaultLine:k[x%k.length]);_.error_y.color=l.addOpacity(l.rgb(S),l.opacity(S)*_.error_y.opacity),delete _.error_y.opacity}if("bardir"in _&&(_.bardir==="h"&&(c(_,"bar")||_.type.substr(0,9)==="histogram")&&(_.orientation="h",t.swapXYData(_)),delete _.bardir),_.type==="histogramy"&&t.swapXYData(_),(_.type==="histogramx"||_.type==="histogramy")&&(_.type="histogram"),"scl"in _&&!("colorscale"in _)&&(_.colorscale=_.scl,delete _.scl),"reversescl"in _&&!("reversescale"in _)&&(_.reversescale=_.reversescl,delete _.reversescl),_.xaxis&&(_.xaxis=s(_.xaxis,"x")),_.yaxis&&(_.yaxis=s(_.yaxis,"y")),c(_,"gl3d")&&_.scene&&(_.scene=n.subplotsRegistry.gl3d.cleanId(_.scene)),!c(_,"pie-like")&&!c(_,"bar-like"))if(Array.isArray(_.textposition))for(T=0;T<_.textposition.length;T++)_.textposition[T]=p(_.textposition[T]);else _.textposition&&(_.textposition=p(_.textposition));var M=a.getModule(_);if(M&&M.colorbar){var D=M.colorbar.container,A=D?_[D]:_;A&&A.colorscale&&(A.colorscale==="YIGnBu"&&(A.colorscale="YlGnBu"),A.colorscale==="YIOrRd"&&(A.colorscale="YlOrRd"))}if(_.type==="surface"&&i.isPlainObject(_.contours)){var C=["x","y","z"];for(T=0;T<C.length;T++){var $=_.contours[C[T]];i.isPlainObject($)&&($.highlightColor&&($.highlightcolor=$.highlightColor,delete $.highlightColor),$.highlightWidth&&($.highlightwidth=$.highlightWidth,delete $.highlightWidth))}}if(_.type==="candlestick"||_.type==="ohlc"){var N=(_.increasing||{}).showlegend!==!1,E=(_.decreasing||{}).showlegend!==!1,P=h(_.increasing),R=h(_.decreasing);if(P!==!1&&R!==!1){var L=d(P,R,N,E);L&&(_.name=L)}else(P||R)&&!_.name&&(_.name=P||R)}if(Array.isArray(_.transforms)){var z=_.transforms;for(T=0;T<z.length;T++){var I=z[T];if(i.isPlainObject(I))switch(I.type){case"filter":I.filtersrc&&(I.target=I.filtersrc,delete I.filtersrc),I.calendar&&(I.valuecalendar||(I.valuecalendar=I.calendar),delete I.calendar);break;case"groupby":if(I.styles=I.styles||I.style,I.styles&&!Array.isArray(I.styles)){var H=I.styles,V=Object.keys(H);I.styles=[];for(var O=0;O<V.length;O++)I.styles.push({target:V[O],value:H[V[O]]})}break}}}y(_,"line")&&delete _.line,"marker"in _&&(y(_.marker,"line")&&delete _.marker.line,y(_,"marker")&&delete _.marker),l.clean(_),_.autobinx&&(delete _.autobinx,delete _.xbins),_.autobiny&&(delete _.autobiny,delete _.ybins),u(_),_.colorbar&&u(_.colorbar),_.marker&&_.marker.colorbar&&u(_.marker.colorbar),_.line&&_.line.colorbar&&u(_.line.colorbar),_.aaxis&&u(_.aaxis),_.baxis&&u(_.baxis)}};function h(b){if(!i.isPlainObject(b))return!1;var x=b.name;return delete b.name,delete b.showlegend,(typeof x=="string"||typeof x=="number")&&String(x)}function d(b,x,_,T){if(_&&!T)return b;if(T&&!_||!b.trim())return x;if(!x.trim())return b;var k=Math.min(b.length,x.length),S;for(S=0;S<k&&b.charAt(S)===x.charAt(S);S++);var M=b.substr(0,S);return M.trim()}function p(b){var x="middle",_="center";return typeof b=="string"&&(b.indexOf("top")!==-1?x="top":b.indexOf("bottom")!==-1&&(x="bottom"),b.indexOf("left")!==-1?_="left":b.indexOf("right")!==-1&&(_="right")),x+" "+_}function y(b,x){return x in b&&typeof b[x]=="object"&&Object.keys(b[x]).length===0}t.swapXYData=function(b){var x;if(i.swapAttrs(b,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(b.z)&&Array.isArray(b.z[0])&&(b.transpose?delete b.transpose:b.transpose=!0),b.error_x&&b.error_y){var _=b.error_y,T="copy_ystyle"in _?_.copy_ystyle:!(_.color||_.thickness||_.width);i.swapAttrs(b,["error_?.copy_ystyle"]),T&&i.swapAttrs(b,["error_?.color","error_?.thickness","error_?.width"])}if(typeof b.hoverinfo=="string"){var k=b.hoverinfo.split("+");for(x=0;x<k.length;x++)k[x]==="x"?k[x]="y":k[x]==="y"&&(k[x]="x");b.hoverinfo=k.join("+")}},t.coerceTraceIndices=function(b,x){if(e(x))return[x];if(!Array.isArray(x)||!x.length)return b.data.map(function(k,S){return S});if(Array.isArray(x)){for(var _=[],T=0;T<x.length;T++)i.isIndex(x[T],b.data.length)?_.push(x[T]):i.warn("trace index (",x[T],") is not a number or is out of bounds");return _}return x},t.manageArrayContainers=function(b,x,_){var T=b.obj,k=b.parts,S=k.length,M=k[S-1],D=e(M);if(D&&x===null){var A=k.slice(0,S-1).join("."),C=i.nestedProperty(T,A).get();C.splice(M,1)}else D&&b.get()===void 0&&b.get()===void 0&&(_[b.astr]=null),b.set(x)};var m=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function g(b){var x=b.search(m);if(x>0)return b.substr(0,x)}t.hasParent=function(b,x){for(var _=g(x);_;){if(_ in b)return!0;_=g(_)}return!1};var w=["x","y","z"];t.clearAxisTypes=function(b,x,_){for(var T=0;T<x.length;T++)for(var k=b._fullData[T],S=0;S<3;S++){var M=f(b,k,w[S]);if(M&&M.type!=="log"){var D=M._name,A=M._id.substr(1);if(A.substr(0,5)==="scene"){if(_[A]!==void 0)continue;D=A+"."+D}var C=D+".type";_[D]===void 0&&_[C]===void 0&&i.nestedProperty(b.layout,C).set(null)}}}})(PT);(function(t){var e=yt,r=_t,a=v1,i=de,n=i.nestedProperty,o=Ql,l=CS,s=tt,f=$o,c=sr,v=Ot,u=Et,h=ut,d=$T().initInteractions,p=bn,y=yl.clearOutline,m=So.dfltConfig,g=is,w=PT,b=Lc,x=ai,_=Hr.AX_NAME_PATTERN,T=0,k=5;function S(F,B,j,W){var J;if(F=i.getGraphDiv(F),o.init(F),i.isPlainObject(B)){var Q=B;B=Q.data,j=Q.layout,W=Q.config,J=Q.frames}var he=o.triggerHandler(F,"plotly_beforeplot",[B,j,W]);if(he===!1)return Promise.reject();!B&&!j&&!i.isPlotDiv(F)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",F);function Te(){if(J)return t.addFrames(F,J)}$(F,W),j||(j={}),e.select(F).classed("js-plotly-plot",!0),u.makeTester(),Array.isArray(F._promises)||(F._promises=[]);var ue=(F.data||[]).length===0&&Array.isArray(B);Array.isArray(B)&&(w.cleanData(B),ue?F.data=B:F.data.push.apply(F.data,B),F.empty=!1),(!F.layout||ue)&&(F.layout=w.cleanLayout(j)),c.supplyDefaults(F);var te=F._fullLayout,xe=te._has("cartesian");te._replotting=!0,(ue||te._shouldCreateBgLayer)&&(Qe(F),te._shouldCreateBgLayer&&delete te._shouldCreateBgLayer),u.initGradients(F),u.initPatterns(F),ue&&v.saveShowSpikeInitial(F);var we=!F.calcdata||F.calcdata.length!==(F._fullData||[]).length;we&&c.doCalcdata(F);for(var Be=0;Be<F.calcdata.length;Be++)F.calcdata[Be][0].trace=F._fullData[Be];F._context.responsive?F._responsiveChartHandler||(F._responsiveChartHandler=function(){i.isHidden(F)||c.resize(F)},window.addEventListener("resize",F._responsiveChartHandler)):i.clearResponsive(F);var ot=i.extendFlat({},te._size),vt=0;function st(){for(var Ze=te._basePlotModules,nt=0;nt<Ze.length;nt++)Ze[nt].drawFramework&&Ze[nt].drawFramework(F);!te._glcanvas&&te._has("gl")&&(te._glcanvas=te._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(ht){return ht.key}),te._glcanvas.enter().append("canvas").attr("class",function(ht){return"gl-canvas gl-canvas-"+ht.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var bt=F._context.plotGlPixelRatio;if(te._glcanvas){te._glcanvas.attr("width",te.width*bt).attr("height",te.height*bt).style("width",te.width+"px").style("height",te.height+"px");var dt=te._glcanvas.data()[0].regl;if(dt&&(Math.floor(te.width*bt)!==dt._gl.drawingBufferWidth||Math.floor(te.height*bt)!==dt._gl.drawingBufferHeight)){var Ge="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(vt)i.error(Ge);else return i.log(Ge+" Clearing graph and plotting again."),c.cleanPlot([],{},F._fullData,te),c.supplyDefaults(F),te=F._fullLayout,c.doCalcdata(F),vt++,st()}}return te.modebar.orientation==="h"?te._modebardiv.style("height",null).style("width","100%"):te._modebardiv.style("width",null).style("height",te.height+"px"),c.previousPromises(F)}function Ke(){if(c.clearAutoMarginIds(F),b.drawMarginPushers(F),v.allowAutoMargin(F),te._has("pie"))for(var Ze=F._fullData,nt=0;nt<Ze.length;nt++){var bt=Ze[nt];bt.type==="pie"&&bt.automargin&&c.allowAutoMargin(F,"pie."+bt.uid+".automargin")}return c.doAutoMargin(F),c.previousPromises(F)}function Mt(){if(c.didMarginChange(ot,te._size))return i.syncOrAsync([Ke,b.layoutStyles],F)}function ft(){if(!we){et();return}return i.syncOrAsync([s.getComponentMethod("shapes","calcAutorange"),s.getComponentMethod("annotations","calcAutorange"),et],F)}function et(){F._transitioning||(b.doAutoRangeAndConstraints(F),ue&&v.saveRangeInitial(F),s.getComponentMethod("rangeslider","calcAutorange")(F))}function kt(){return v.draw(F,ue?"":"redraw")}var xt=[c.previousPromises,Te,st,Ke,Mt];xe&&xt.push(ft),xt.push(b.layoutStyles),xe&&xt.push(kt,function(nt){nt._fullLayout._insideTickLabelsAutorange&&ce(nt,nt._fullLayout._insideTickLabelsAutorange).then(function(){nt._fullLayout._insideTickLabelsAutorange=void 0})}),xt.push(b.drawData,b.finalDraw,d,c.addLinks,c.rehover,c.redrag,c.reselect,c.doAutoMargin,ct,c.previousPromises);function ct(Ze){Ze._fullLayout._insideTickLabelsAutorange&&ue&&v.saveRangeInitial(Ze,!0)}var rt=i.syncOrAsync(xt,F);return(!rt||!rt.then)&&(rt=Promise.resolve()),rt.then(function(){return M(F),F})}function M(F){var B=F._fullLayout;B._redrawFromAutoMarginCount?B._redrawFromAutoMarginCount--:F.emit("plotly_afterplot")}function D(F){return i.extendFlat(m,F)}function A(F,B){try{F._fullLayout._paper.style("background",B)}catch(j){i.error(j)}}function C(F,B){var j=h.combine(B,"white");A(F,j)}function $(F,B){if(!F._context){F._context=i.extendDeep({},m);var j=e.select("base");F._context._baseUrl=j.size()&&j.attr("href")?window.location.href.split("#")[0]:""}var W=F._context,J,Q,he;if(B){for(Q=Object.keys(B),J=0;J<Q.length;J++)he=Q[J],!(he==="editable"||he==="edits")&&he in W&&(he==="setBackground"&&B[he]==="opaque"?W[he]=C:W[he]=B[he]);B.plot3dPixelRatio&&!W.plotGlPixelRatio&&(W.plotGlPixelRatio=W.plot3dPixelRatio);var Te=B.editable;if(Te!==void 0)for(W.editable=Te,Q=Object.keys(W.edits),J=0;J<Q.length;J++)W.edits[Q[J]]=Te;if(B.edits)for(Q=Object.keys(B.edits),J=0;J<Q.length;J++)he=Q[J],he in W.edits&&(W.edits[he]=B.edits[he]);W._exportedPlot=B._exportedPlot}W.staticPlot&&(W.editable=!1,W.edits={},W.autosizable=!1,W.scrollZoom=!1,W.doubleClick=!1,W.showTips=!1,W.showLink=!1,W.displayModeBar=!1),W.displayModeBar==="hover"&&!a&&(W.displayModeBar=!0),(W.setBackground==="transparent"||typeof W.setBackground!="function")&&(W.setBackground=A),W._hasZeroHeight=W._hasZeroHeight||F.clientHeight===0,W._hasZeroWidth=W._hasZeroWidth||F.clientWidth===0;var ue=W.scrollZoom,te=W._scrollZoom={};if(ue===!0)te.cartesian=1,te.gl3d=1,te.geo=1,te.mapbox=1;else if(typeof ue=="string"){var xe=ue.split("+");for(J=0;J<xe.length;J++)te[xe[J]]=1}else ue!==!1&&(te.gl3d=1,te.geo=1,te.mapbox=1)}function N(F){if(F=i.getGraphDiv(F),!i.isPlotDiv(F))throw new Error("This element is not a Plotly plot: "+F);return w.cleanData(F.data),w.cleanLayout(F.layout),F.calcdata=void 0,t._doPlot(F).then(function(){return F.emit("plotly_redraw"),F})}function E(F,B,j,W){return F=i.getGraphDiv(F),c.cleanPlot([],{},F._fullData||[],F._fullLayout||{}),c.purge(F),t._doPlot(F,B,j,W)}function P(F,B){var j=B+1,W=[],J,Q;for(J=0;J<F.length;J++)Q=F[J],Q<0?W.push(j+Q):W.push(Q);return W}function R(F,B,j){var W,J;for(W=0;W<B.length;W++){if(J=B[W],J!==parseInt(J,10))throw new Error("all values in "+j+" must be integers");if(J>=F.data.length||J<-F.data.length)throw new Error(j+" must be valid indices for gd.data.");if(B.indexOf(J,W+1)>-1||J>=0&&B.indexOf(-F.data.length+J)>-1||J<0&&B.indexOf(F.data.length+J)>-1)throw new Error("each index in "+j+" must be unique.")}}function L(F,B,j){if(!Array.isArray(F.data))throw new Error("gd.data must be an array.");if(typeof B>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(B)||(B=[B]),R(F,B,"currentIndices"),typeof j<"u"&&!Array.isArray(j)&&(j=[j]),typeof j<"u"&&R(F,j,"newIndices"),typeof j<"u"&&B.length!==j.length)throw new Error("current and new indices must be of equal length.")}function z(F,B,j){var W,J;if(!Array.isArray(F.data))throw new Error("gd.data must be an array.");if(typeof B>"u")throw new Error("traces must be defined.");for(Array.isArray(B)||(B=[B]),W=0;W<B.length;W++)if(J=B[W],typeof J!="object"||Array.isArray(J)||J===null)throw new Error("all values in traces array must be non-array objects");if(typeof j<"u"&&!Array.isArray(j)&&(j=[j]),typeof j<"u"&&j.length!==B.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function I(F,B,j,W){var J=i.isPlainObject(W);if(!Array.isArray(F.data))throw new Error("gd.data must be an array");if(!i.isPlainObject(B))throw new Error("update must be a key:value object");if(typeof j>"u")throw new Error("indices must be an integer or array of integers");R(F,j,"indices");for(var Q in B){if(!Array.isArray(B[Q])||B[Q].length!==j.length)throw new Error("attribute "+Q+" must be an array of length equal to indices array length");if(J&&(!(Q in W)||!Array.isArray(W[Q])||W[Q].length!==B[Q].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}function H(F,B,j,W){var J=i.isPlainObject(W),Q=[],he,Te,ue,te,xe;Array.isArray(j)||(j=[j]),j=P(j,F.data.length-1);for(var we in B)for(var Be=0;Be<j.length;Be++){if(he=F.data[j[Be]],ue=n(he,we),Te=ue.get(),te=B[we][Be],!i.isArrayOrTypedArray(te))throw new Error("attribute: "+we+" index: "+Be+" must be an array");if(!i.isArrayOrTypedArray(Te))throw new Error("cannot extend missing or non-array attribute: "+we);if(Te.constructor!==te.constructor)throw new Error("cannot extend array with an array of a different type: "+we);xe=J?W[we][Be]:W,r(xe)||(xe=-1),Q.push({prop:ue,target:Te,insert:te,maxp:Math.floor(xe)})}return Q}function V(F,B,j,W,J){I(F,B,j,W);for(var Q=H(F,B,j,W),he={},Te={},ue=0;ue<Q.length;ue++){var te=Q[ue].prop,xe=Q[ue].maxp,we=J(Q[ue].target,Q[ue].insert,xe);te.set(we[0]),Array.isArray(he[te.astr])||(he[te.astr]=[]),he[te.astr].push(we[1]),Array.isArray(Te[te.astr])||(Te[te.astr]=[]),Te[te.astr].push(Q[ue].target.length)}return{update:he,maxPoints:Te}}function O(F,B){var j=new F.constructor(F.length+B.length);return j.set(F),j.set(B,F.length),j}function X(F,B,j,W){F=i.getGraphDiv(F);function J(ue,te,xe){var we,Be;if(i.isTypedArray(ue))if(xe<0){var ot=new ue.constructor(0),vt=O(ue,te);xe<0?(we=vt,Be=ot):(we=ot,Be=vt)}else if(we=new ue.constructor(xe),Be=new ue.constructor(ue.length+te.length-xe),xe===te.length)we.set(te),Be.set(ue);else if(xe<te.length){var st=te.length-xe;we.set(te.subarray(st)),Be.set(ue),Be.set(te.subarray(0,st),ue.length)}else{var Ke=xe-te.length,Mt=ue.length-Ke;we.set(ue.subarray(Mt)),we.set(te,Ke),Be.set(ue.subarray(0,Mt))}else we=ue.concat(te),Be=xe>=0&&xe<we.length?we.splice(0,we.length-xe):[];return[we,Be]}var Q=V(F,B,j,W,J),he=t.redraw(F),Te=[F,Q.update,j,Q.maxPoints];return l.add(F,t.prependTraces,Te,X,arguments),he}function G(F,B,j,W){F=i.getGraphDiv(F);function J(ue,te,xe){var we,Be;if(i.isTypedArray(ue))if(xe<=0){var ot=new ue.constructor(0),vt=O(te,ue);xe<0?(we=vt,Be=ot):(we=ot,Be=vt)}else if(we=new ue.constructor(xe),Be=new ue.constructor(ue.length+te.length-xe),xe===te.length)we.set(te),Be.set(ue);else if(xe<te.length){var st=te.length-xe;we.set(te.subarray(0,st)),Be.set(te.subarray(st)),Be.set(ue,st)}else{var Ke=xe-te.length;we.set(te),we.set(ue.subarray(0,Ke),te.length),Be.set(ue.subarray(Ke))}else we=te.concat(ue),Be=xe>=0&&xe<we.length?we.splice(xe,we.length):[];return[we,Be]}var Q=V(F,B,j,W,J),he=t.redraw(F),Te=[F,Q.update,j,Q.maxPoints];return l.add(F,t.extendTraces,Te,G,arguments),he}function Y(F,B,j){F=i.getGraphDiv(F);var W=[],J=t.deleteTraces,Q=Y,he=[F,W],Te=[F,B],ue,te;for(z(F,B,j),Array.isArray(B)||(B=[B]),B=B.map(function(xe){return i.extendFlat({},xe)}),w.cleanData(B),ue=0;ue<B.length;ue++)F.data.push(B[ue]);for(ue=0;ue<B.length;ue++)W.push(-B.length+ue);if(typeof j>"u")return te=t.redraw(F),l.add(F,J,he,Q,Te),te;Array.isArray(j)||(j=[j]);try{L(F,W,j)}catch(xe){throw F.data.splice(F.data.length-B.length,B.length),xe}return l.startSequence(F),l.add(F,J,he,Q,Te),te=t.moveTraces(F,W,j),l.stopSequence(F),te}function K(F,B){F=i.getGraphDiv(F);var j=[],W=t.addTraces,J=K,Q=[F,j,B],he=[F,B],Te,ue;if(typeof B>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(B)||(B=[B]),R(F,B,"indices"),B=P(B,F.data.length-1),B.sort(i.sorterDes),Te=0;Te<B.length;Te+=1)ue=F.data.splice(B[Te],1)[0],j.push(ue);var te=t.redraw(F);return l.add(F,W,Q,J,he),te}function Z(F,B,j){F=i.getGraphDiv(F);var W=[],J=[],Q=Z,he=Z,Te=[F,j,B],ue=[F,B,j],te;if(L(F,B,j),B=Array.isArray(B)?B:[B],typeof j>"u")for(j=[],te=0;te<B.length;te++)j.push(-B.length+te);for(j=Array.isArray(j)?j:[j],B=P(B,F.data.length-1),j=P(j,F.data.length-1),te=0;te<F.data.length;te++)B.indexOf(te)===-1&&W.push(F.data[te]);for(te=0;te<B.length;te++)J.push({newIndex:j[te],trace:F.data[B[te]]});for(J.sort(function(we,Be){return we.newIndex-Be.newIndex}),te=0;te<J.length;te+=1)W.splice(J[te].newIndex,0,J[te].trace);F.data=W;var xe=t.redraw(F);return l.add(F,Q,Te,he,ue),xe}function q(F,B,j,W){F=i.getGraphDiv(F),w.clearPromiseQueue(F);var J={};if(typeof B=="string")J[B]=j;else if(i.isPlainObject(B))J=i.extendFlat({},B),W===void 0&&(W=j);else return i.warn("Restyle fail.",B,j,W),Promise.reject();Object.keys(J).length&&(F.changed=!0);var Q=w.coerceTraceIndices(F,W),he=U(F,J,Q),Te=he.flags;Te.calc&&(F.calcdata=void 0),Te.clearAxisTypes&&w.clearAxisTypes(F,Q,{});var ue=[];Te.fullReplot?ue.push(t._doPlot):(ue.push(c.previousPromises),c.supplyDefaults(F),Te.markerSize&&(c.doCalcdata(F),pe(ue)),Te.style&&ue.push(b.doTraceStyle),Te.colorbars&&ue.push(b.doColorBars),ue.push(M)),ue.push(c.rehover,c.redrag,c.reselect),l.add(F,q,[F,he.undoit,he.traces],q,[F,he.redoit,he.traces]);var te=i.syncOrAsync(ue,F);return(!te||!te.then)&&(te=Promise.resolve()),te.then(function(){return F.emit("plotly_restyle",he.eventData),F})}function ie(F){return F===void 0?null:F}function fe(F,B){return B?function(j,W,J){var Q=n(j,W),he=Q.set;return Q.set=function(Te){var ue=(J||"")+W;be(ue,Q.get(),Te,F),he(Te)},Q}:n}function be(F,B,j,W){if(Array.isArray(B)||Array.isArray(j))for(var J=Array.isArray(B)?B:[],Q=Array.isArray(j)?j:[],he=Math.max(J.length,Q.length),Te=0;Te<he;Te++)be(F+"["+Te+"]",J[Te],Q[Te],W);else if(i.isPlainObject(B)||i.isPlainObject(j)){var ue=i.isPlainObject(B)?B:{},te=i.isPlainObject(j)?j:{},xe=i.extendFlat({},ue,te);for(var we in xe)be(F+"."+we,ue[we],te[we],W)}else W[F]===void 0&&(W[F]=ie(B))}function ne(F,B,j){for(var W in j){var J=n(F,W);be(W,J.get(),j[W],B)}}function U(F,B,j){var W=F._fullLayout,J=F._fullData,Q=F.data,he=W._guiEditing,Te=fe(W._preGUI,he),ue=i.extendDeepAll({},B),te;ae(B);var xe=x.traceFlags(),we={},Be={},ot;function vt(){return j.map(function(){})}function st(wt){var qt=v.id2name(wt);ot.indexOf(qt)===-1&&ot.push(qt)}function Ke(wt){return"LAYOUT"+wt+".autorange"}function Mt(wt){return"LAYOUT"+wt+".range"}function ft(wt){for(var qt=wt;qt<J.length;qt++)if(J[qt]._input===Q[wt])return J[qt]}function et(wt,qt,Ar){if(Array.isArray(wt)){wt.forEach(function(Tr){et(Tr,qt,Ar)});return}if(!(wt in B||w.hasParent(B,wt))){var Ft;if(wt.substr(0,6)==="LAYOUT")Ft=Te(F.layout,wt.replace("LAYOUT",""));else{var Nt=j[Ar],mr=W._tracePreGUI[ft(Nt)._fullInput.uid];Ft=fe(mr,he)(Q[Nt],wt)}wt in Be||(Be[wt]=vt()),Be[wt][Ar]===void 0&&(Be[wt][Ar]=ie(Ft.get())),qt!==void 0&&Ft.set(qt)}}function kt(wt){return function(qt){return J[qt][wt]}}function xt(wt){return function(qt,Ar){return qt===!1?J[j[Ar]][wt]:null}}for(var ct in B){if(w.hasParent(B,ct))throw new Error("cannot set "+ct+" and a parent attribute simultaneously");var rt=B[ct],Ze,nt,bt,dt,Ge,ht;if((ct==="autobinx"||ct==="autobiny")&&(ct=ct.charAt(ct.length-1)+"bins",Array.isArray(rt)?rt=rt.map(xt(ct)):rt===!1?rt=j.map(kt(ct)):rt=null),we[ct]=rt,ct.substr(0,6)==="LAYOUT"){bt=Te(F.layout,ct.replace("LAYOUT","")),Be[ct]=[ie(bt.get())],bt.set(Array.isArray(rt)?rt[0]:rt),xe.calc=!0;continue}for(Be[ct]=vt(),te=0;te<j.length;te++){Ze=Q[j[te]],nt=ft(j[te]);var Dt=W._tracePreGUI[nt._fullInput.uid];if(bt=fe(Dt,he)(Ze,ct),dt=bt.get(),Ge=Array.isArray(rt)?rt[te%rt.length]:rt,Ge!==void 0){var pr=bt.parts[bt.parts.length-1],or=ct.substr(0,ct.length-pr.length-1),br=or?or+".":"",Ir=or?n(nt,or).get():nt;if(ht=f.getTraceValObject(nt,bt.parts),ht&&ht.impliedEdits&&Ge!==null)for(var fi in ht.impliedEdits)et(i.relativeAttr(ct,fi),ht.impliedEdits[fi],te);else if((pr==="thicknessmode"||pr==="lenmode")&&dt!==Ge&&(Ge==="fraction"||Ge==="pixels")&&Ir){var Zr=W._size,Oe=Ir.orient,Fe=Oe==="top"||Oe==="bottom";if(pr==="thicknessmode"){var it=Fe?Zr.h:Zr.w;et(br+"thickness",Ir.thickness*(Ge==="fraction"?1/it:it),te)}else{var at=Fe?Zr.w:Zr.h;et(br+"len",Ir.len*(Ge==="fraction"?1/at:at),te)}}else if(ct==="type"&&(Ge==="pie"!=(dt==="pie")||Ge==="funnelarea"!=(dt==="funnelarea"))){var Xe="x",Je="y";(Ge==="bar"||dt==="bar")&&Ze.orientation==="h"&&(Xe="y",Je="x"),i.swapAttrs(Ze,["?","?src"],"labels",Xe),i.swapAttrs(Ze,["d?","?0"],"label",Xe),i.swapAttrs(Ze,["?","?src"],"values",Je),dt==="pie"||dt==="funnelarea"?(n(Ze,"marker.color").set(n(Ze,"marker.colors").get()),W._pielayer.selectAll("g.trace").remove()):s.traceIs(Ze,"cartesian")&&n(Ze,"marker.colors").set(n(Ze,"marker.color").get())}Be[ct][te]=ie(dt);var pt=["swapxy","swapxyaxes","orientation","orientationaxes"];if(pt.indexOf(ct)!==-1){if(ct==="orientation"){bt.set(Ge);var $t=Ze.x&&!Ze.y?"h":"v";if((bt.get()||$t)===nt.orientation)continue}else ct==="orientationaxes"&&(Ze.orientation={v:"h",h:"v"}[nt.orientation]);w.swapXYData(Ze),xe.calc=xe.clearAxisTypes=!0}else c.dataArrayContainers.indexOf(bt.parts[0])!==-1?(w.manageArrayContainers(bt,Ge,Be),xe.calc=!0):(ht?ht.arrayOk&&!s.traceIs(nt,"regl")&&(i.isArrayOrTypedArray(Ge)||i.isArrayOrTypedArray(dt))?xe.calc=!0:x.update(xe,ht):xe.calc=!0,bt.set(Ge))}}if(["swapxyaxes","orientationaxes"].indexOf(ct)!==-1&&v.swap(F,j),ct==="orientationaxes"){var Pt=n(F.layout,"hovermode"),er=Pt.get();er==="x"?Pt.set("y"):er==="y"?Pt.set("x"):er==="x unified"?Pt.set("y unified"):er==="y unified"&&Pt.set("x unified")}if(["orientation","type"].indexOf(ct)!==-1){for(ot=[],te=0;te<j.length;te++){var Bt=Q[j[te]];s.traceIs(Bt,"cartesian")&&(st(Bt.xaxis||"x"),st(Bt.yaxis||"y"))}et(ot.map(Ke),!0,0),et(ot.map(Mt),[0,1],0)}}return(xe.calc||xe.plot)&&(xe.fullReplot=!0),{flags:xe,undoit:Be,redoit:we,traces:j,eventData:i.extendDeepNoArrays([],[ue,j])}}function ae(F){var B=i.counterRegex("axis",".title",!1,!1),j=/colorbar\.title$/,W=Object.keys(F),J,Q,he;for(J=0;J<W.length;J++)Q=W[J],he=F[Q],(Q==="title"||B.test(Q)||j.test(Q))&&(typeof he=="string"||typeof he=="number")?Te(Q,Q.replace("title","title.text")):Q.indexOf("titlefont")>-1&&Q.indexOf("grouptitlefont")===-1?Te(Q,Q.replace("titlefont","title.font")):Q.indexOf("titleposition")>-1?Te(Q,Q.replace("titleposition","title.position")):Q.indexOf("titleside")>-1?Te(Q,Q.replace("titleside","title.side")):Q.indexOf("titleoffset")>-1&&Te(Q,Q.replace("titleoffset","title.offset"));function Te(ue,te){F[te]=F[ue],delete F[ue]}}function ce(F,B,j){F=i.getGraphDiv(F),w.clearPromiseQueue(F);var W={};if(typeof B=="string")W[B]=j;else if(i.isPlainObject(B))W=i.extendFlat({},B);else return i.warn("Relayout fail.",B,j),Promise.reject();Object.keys(W).length&&(F.changed=!0);var J=De(F,W),Q=J.flags;Q.calc&&(F.calcdata=void 0);var he=[c.previousPromises];Q.layoutReplot?he.push(b.layoutReplot):Object.keys(W).length&&(se(F,Q,J)||c.supplyDefaults(F),Q.legend&&he.push(b.doLegend),Q.layoutstyle&&he.push(b.layoutStyles),Q.axrange&&pe(he,J.rangesAltered),Q.ticks&&he.push(b.doTicksRelayout),Q.modebar&&he.push(b.doModeBar),Q.camera&&he.push(b.doCamera),Q.colorbars&&he.push(b.doColorBars),he.push(M)),he.push(c.rehover,c.redrag,c.reselect),l.add(F,ce,[F,J.undoit],ce,[F,J.redoit]);var Te=i.syncOrAsync(he,F);return(!Te||!Te.then)&&(Te=Promise.resolve(F)),Te.then(function(){return F.emit("plotly_relayout",J.eventData),F})}function se(F,B,j){var W=F._fullLayout;if(!B.axrange)return!1;for(var J in B)if(J!=="axrange"&&B[J])return!1;for(var Q in j.rangesAltered){var he=v.id2name(Q),Te=F.layout[he],ue=W[he];if(ue.autorange=Te.autorange,Te.range&&(ue.range=Te.range.slice()),ue.cleanRange(),ue._matchGroup){for(var te in ue._matchGroup)if(te!==Q){var xe=W[v.id2name(te)];xe.autorange=ue.autorange,xe.range=ue.range.slice(),xe._input.range=ue.range.slice()}}}return!0}function pe(F,B){var j=B?function(W){var J=[],Q=!0;for(var he in B){var Te=v.getFromId(W,he);if(J.push(he),(Te.ticklabelposition||"").indexOf("inside")!==-1&&Te._anchorAxis&&J.push(Te._anchorAxis._id),Te._matchGroup)for(var ue in Te._matchGroup)B[ue]||J.push(ue)}return v.draw(W,J,{skipTitle:Q})}:function(W){return v.draw(W,"redraw")};F.push(y,b.doAutoRangeAndConstraints,j,b.drawData,b.finalDraw)}var ge=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,_e=/^[xyz]axis[0-9]*\.autorange$/,le=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function De(F,B){var j=F.layout,W=F._fullLayout,J=W._guiEditing,Q=fe(W._preGUI,J),he=Object.keys(B),Te=v.list(F),ue=i.extendDeepAll({},B),te={},xe,we,Be;for(ae(B),he=Object.keys(B),we=0;we<he.length;we++)if(he[we].indexOf("allaxes")===0){for(Be=0;Be<Te.length;Be++){var ot=Te[Be]._id.substr(1),vt=ot.indexOf("scene")!==-1?ot+".":"",st=he[we].replace("allaxes",vt+Te[Be]._name);B[st]||(B[st]=B[he[we]])}delete B[he[we]]}var Ke=x.layoutFlags(),Mt={},ft={};function et(Nt,mr){if(Array.isArray(Nt)){Nt.forEach(function(Ii){et(Ii,mr)});return}if(!(Nt in B||w.hasParent(B,Nt))){var Tr=Q(j,Nt);Nt in ft||(ft[Nt]=ie(Tr.get())),mr!==void 0&&Tr.set(mr)}}var kt={},xt;function ct(Nt){var mr=v.name2id(Nt.split(".")[0]);return kt[mr]=1,mr}for(var rt in B){if(w.hasParent(B,rt))throw new Error("cannot set "+rt+" and a parent attribute simultaneously");for(var Ze=Q(j,rt),nt=B[rt],bt=Ze.parts.length,dt=bt-1;dt>0&&typeof Ze.parts[dt]!="string";)dt--;var Ge=Ze.parts[dt],ht=Ze.parts[dt-1]+"."+Ge,Dt=Ze.parts.slice(0,dt).join("."),pr=n(F.layout,Dt).get(),or=n(W,Dt).get(),br=Ze.get();if(nt!==void 0){Mt[rt]=nt,ft[rt]=Ge==="reverse"?nt:ie(br);var Ir=f.getLayoutValObject(W,Ze.parts);if(Ir&&Ir.impliedEdits&&nt!==null)for(var fi in Ir.impliedEdits)et(i.relativeAttr(rt,fi),Ir.impliedEdits[fi]);if(["width","height"].indexOf(rt)!==-1)if(nt){et("autosize",null);var Zr=rt==="height"?"width":"height";et(Zr,W[Zr])}else W[rt]=F._initialAutoSize[rt];else if(rt==="autosize")et("width",nt?null:W.width),et("height",nt?null:W.height);else if(ht.match(ge))ct(ht),n(W,Dt+"._inputRange").set(null);else if(ht.match(_e)){ct(ht),n(W,Dt+"._inputRange").set(null);var Oe=n(W,Dt).get();Oe._inputDomain&&(Oe._input.domain=Oe._inputDomain.slice())}else ht.match(le)&&n(W,Dt+"._inputDomain").set(null);if(Ge==="type"){xt=pr;var Fe=or.type==="linear"&&nt==="log",it=or.type==="log"&&nt==="linear";if(Fe||it){if(!xt||!xt.range)et(Dt+".autorange",!0);else if(or.autorange)Fe&&(xt.range=xt.range[1]>xt.range[0]?[1,2]:[2,1]);else{var at=xt.range[0],Xe=xt.range[1];Fe?(at<=0&&Xe<=0&&et(Dt+".autorange",!0),at<=0?at=Xe/1e6:Xe<=0&&(Xe=at/1e6),et(Dt+".range[0]",Math.log(at)/Math.LN10),et(Dt+".range[1]",Math.log(Xe)/Math.LN10)):(et(Dt+".range[0]",Math.pow(10,at)),et(Dt+".range[1]",Math.pow(10,Xe)))}Array.isArray(W._subplots.polar)&&W._subplots.polar.length&&W[Ze.parts[0]]&&Ze.parts[1]==="radialaxis"&&delete W[Ze.parts[0]]._subplot.viewInitial["radialaxis.range"],s.getComponentMethod("annotations","convertCoords")(F,or,nt,et),s.getComponentMethod("images","convertCoords")(F,or,nt,et)}else et(Dt+".autorange",!0),et(Dt+".range",null);n(W,Dt+"._inputRange").set(null)}else if(Ge.match(_)){var Je=n(W,rt).get(),pt=(nt||{}).type;(!pt||pt==="-")&&(pt="linear"),s.getComponentMethod("annotations","convertCoords")(F,Je,pt,et),s.getComponentMethod("images","convertCoords")(F,Je,pt,et)}var $t=g.containerArrayMatch(rt);if($t){xe=$t.array,we=$t.index;var Pt=$t.property,er=Ir||{editType:"calc"};we!==""&&Pt===""&&(g.isAddVal(nt)?ft[rt]=null:g.isRemoveVal(nt)?ft[rt]=(n(j,xe).get()||[])[we]:i.warn("unrecognized full object value",B)),x.update(Ke,er),te[xe]||(te[xe]={});var Bt=te[xe][we];Bt||(Bt=te[xe][we]={}),Bt[Pt]=nt,delete B[rt]}else Ge==="reverse"?(pr.range?pr.range.reverse():(et(Dt+".autorange",!0),pr.range=[1,0]),or.autorange?Ke.calc=!0:Ke.plot=!0):(rt==="dragmode"&&(nt===!1&&br!==!1||nt!==!1&&br===!1)||W._has("scatter-like")&&W._has("regl")&&rt==="dragmode"&&(nt==="lasso"||nt==="select")&&!(br==="lasso"||br==="select")||W._has("gl2d")?Ke.plot=!0:Ir?x.update(Ke,Ir):Ke.calc=!0,Ze.set(nt))}}for(xe in te){var wt=g.applyContainerArrayChanges(F,Q(j,xe),te[xe],Ke,Q);wt||(Ke.plot=!0)}for(var qt in kt){xt=v.getFromId(F,qt);var Ar=xt&&xt._constraintGroup;if(Ar){Ke.calc=!0;for(var Ft in Ar)kt[Ft]||(v.getFromId(F,Ft)._constraintShrinkable=!0)}}return(Ae(F)||B.height||B.width)&&(Ke.plot=!0),(Ke.plot||Ke.calc)&&(Ke.layoutReplot=!0),{flags:Ke,rangesAltered:kt,undoit:ft,redoit:Mt,eventData:ue}}function Ae(F){var B=F._fullLayout,j=B.width,W=B.height;return F.layout.autosize&&c.plotAutoSize(F,F.layout,B),B.width!==j||B.height!==W}function ze(F,B,j,W){F=i.getGraphDiv(F),w.clearPromiseQueue(F),i.isPlainObject(B)||(B={}),i.isPlainObject(j)||(j={}),Object.keys(B).length&&(F.changed=!0),Object.keys(j).length&&(F.changed=!0);var J=w.coerceTraceIndices(F,W),Q=U(F,i.extendFlat({},B),J),he=Q.flags,Te=De(F,i.extendFlat({},j)),ue=Te.flags;(he.calc||ue.calc)&&(F.calcdata=void 0),he.clearAxisTypes&&w.clearAxisTypes(F,J,j);var te=[];ue.layoutReplot?te.push(b.layoutReplot):he.fullReplot?te.push(t._doPlot):(te.push(c.previousPromises),se(F,ue,Te)||c.supplyDefaults(F),he.style&&te.push(b.doTraceStyle),(he.colorbars||ue.colorbars)&&te.push(b.doColorBars),ue.legend&&te.push(b.doLegend),ue.layoutstyle&&te.push(b.layoutStyles),ue.axrange&&pe(te,Te.rangesAltered),ue.ticks&&te.push(b.doTicksRelayout),ue.modebar&&te.push(b.doModeBar),ue.camera&&te.push(b.doCamera),te.push(M)),te.push(c.rehover,c.redrag,c.reselect),l.add(F,ze,[F,Q.undoit,Te.undoit,Q.traces],ze,[F,Q.redoit,Te.redoit,Q.traces]);var xe=i.syncOrAsync(te,F);return(!xe||!xe.then)&&(xe=Promise.resolve(F)),xe.then(function(){return F.emit("plotly_update",{data:Q.eventData,layout:Te.eventData}),F})}function Ve(F){return function(j){j._fullLayout._guiEditing=!0;var W=F.apply(null,arguments);return j._fullLayout._guiEditing=!1,W}}var oe=[{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"}],Ce=[{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 re(F,B){for(var j=0;j<B.length;j++){var W=B[j],J=F.match(W.pattern);if(J){var Q=J[1]||"";return{head:Q,tail:F.substr(Q.length+1),attr:W.attr}}}}function me(F,B){var j=n(B,F).get();if(j!==void 0)return j;var W=F.split(".");for(W.pop();W.length>1;)if(W.pop(),j=n(B,W.join(".")+".uirevision").get(),j!==void 0)return j;return B.uirevision}function ve(F,B){for(var j=0;j<B.length;j++)if(B[j]._fullInput.uid===F)return j;return-1}function Me(F,B,j){for(var W=0;W<B.length;W++)if(B[W].uid===F)return W;return!B[j]||B[j].uid?-1:j}function Se(F,B){var j=i.isPlainObject(F),W=Array.isArray(F);return j||W?(j&&i.isPlainObject(B)||W&&Array.isArray(B))&&JSON.stringify(F)===JSON.stringify(B):F===B}function $e(F,B,j,W){var J=W._preGUI,Q,he,Te,ue,te,xe,we,Be,ot,vt,st=[],Ke={},Mt={};for(Q in J){if(te=re(Q,oe),te){if(ot=te.head,vt=te.tail,he=te.attr||ot+".uirevision",Te=n(W,he).get(),ue=Te&&me(he,B),ue&&ue===Te){if(xe=J[Q],xe===null&&(xe=void 0),we=n(B,Q),Be=we.get(),Se(Be,xe)){Be===void 0&&vt==="autorange"&&st.push(ot),we.set(ie(n(W,Q).get()));continue}else if(vt==="autorange"||vt.substr(0,6)==="range["){var ft=J[ot+".range[0]"],et=J[ot+".range[1]"],kt=J[ot+".autorange"];if(kt||kt===null&&ft===null&&et===null){if(!(ot in Ke)){var xt=n(B,ot).get();Ke[ot]=xt&&(xt.autorange||xt.autorange!==!1&&(!xt.range||xt.range.length!==2))}if(Ke[ot]){we.set(ie(n(W,Q).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+Q);delete J[Q],te&&te.tail.substr(0,6)==="range["&&(Mt[te.head]=1)}for(var ct=0;ct<st.length;ct++){var rt=st[ct];if(Mt[rt]){var Ze=n(B,rt).get();Ze&&delete Ze.autorange}}var nt=W._tracePreGUI;for(var bt in nt){var dt=nt[bt],Ge=null,ht;for(Q in dt){if(!Ge){var Dt=ve(bt,j);if(Dt<0){delete nt[bt];break}var pr=j[Dt];ht=pr._fullInput;var or=Me(bt,F,ht.index);if(or<0){delete nt[bt];break}Ge=F[or]}if(te=re(Q,Ce),te){if(te.attr?(Te=n(W,te.attr).get(),ue=Te&&me(te.attr,B)):(Te=ht.uirevision,ue=Ge.uirevision,ue===void 0&&(ue=B.uirevision)),ue&&ue===Te&&(xe=dt[Q],xe===null&&(xe=void 0),we=n(Ge,Q),Be=we.get(),Se(Be,xe))){we.set(ie(n(ht,Q).get()));continue}}else i.warn("unrecognized GUI edit: "+Q+" in trace uid "+bt);delete dt[Q]}}}function ye(F,B,j,W){var J,Q;function he(){return t.addFrames(F,J)}F=i.getGraphDiv(F),w.clearPromiseQueue(F);var Te=F._fullData,ue=F._fullLayout;if(!i.isPlotDiv(F)||!Te||!ue)Q=t.newPlot(F,B,j,W);else{if(i.isPlainObject(B)){var te=B;B=te.data,j=te.layout,W=te.config,J=te.frames}var xe=!1;if(W){var we=i.extendDeep({},F._context);F._context=void 0,$(F,W),xe=Ie(we,F._context)}F.data=B||[],w.cleanData(F.data),F.layout=j||{},w.cleanLayout(F.layout),$e(F.data,F.layout,Te,ue),c.supplyDefaults(F,{skipUpdateCalc:!0});var Be=F._fullData,ot=F._fullLayout,vt=ot.datarevision===void 0,st=ot.transition,Ke=Pe(F,ue,ot,vt,st),Mt=Ke.newDataRevision,ft=Ne(F,Te,Be,vt,st,Mt);if(Ae(F)&&(Ke.layoutReplot=!0),ft.calc||Ke.calc){F.calcdata=void 0;for(var et=Object.getOwnPropertyNames(ot),kt=0;kt<et.length;kt++){var xt=et[kt],ct=xt.substring(0,5);if(ct==="xaxis"||ct==="yaxis"){var rt=ot[xt]._emptyCategories;rt&&rt()}}}else c.supplyDefaultsUpdateCalc(F.calcdata,Be);var Ze=[];if(J&&(F._transitionData={},c.createTransitionData(F),Ze.push(he)),ot.transition&&!xe&&(ft.anim||Ke.anim))Ke.ticks&&Ze.push(b.doTicksRelayout),c.doCalcdata(F),b.doAutoRangeAndConstraints(F),Ze.push(function(){return c.transitionFromReact(F,ft,Ke,ue)});else if(ft.fullReplot||Ke.layoutReplot||xe)F._fullLayout._skipDefaults=!0,Ze.push(t._doPlot);else{for(var nt in Ke.arrays){var bt=Ke.arrays[nt];if(bt.length){var dt=s.getComponentMethod(nt,"drawOne");if(dt!==i.noop)for(var Ge=0;Ge<bt.length;Ge++)dt(F,bt[Ge]);else{var ht=s.getComponentMethod(nt,"draw");if(ht===i.noop)throw new Error("cannot draw components: "+nt);ht(F)}}}Ze.push(c.previousPromises),ft.style&&Ze.push(b.doTraceStyle),(ft.colorbars||Ke.colorbars)&&Ze.push(b.doColorBars),Ke.legend&&Ze.push(b.doLegend),Ke.layoutstyle&&Ze.push(b.layoutStyles),Ke.axrange&&pe(Ze),Ke.ticks&&Ze.push(b.doTicksRelayout),Ke.modebar&&Ze.push(b.doModeBar),Ke.camera&&Ze.push(b.doCamera),Ze.push(M)}Ze.push(c.rehover,c.redrag,c.reselect),Q=i.syncOrAsync(Ze,F),(!Q||!Q.then)&&(Q=Promise.resolve(F))}return Q.then(function(){return F.emit("plotly_react",{data:B,layout:j}),F})}function Ne(F,B,j,W,J,Q){var he=B.length===j.length;if(!J&&!he)return{fullReplot:!0,calc:!0};var Te=x.traceFlags();Te.arrays={},Te.nChanges=0,Te.nChangesAnim=0;var ue,te;function xe(ot){var vt=f.getTraceValObject(te,ot);return!te._module.animatable&&vt.anim&&(vt.anim=!1),vt}var we={getValObject:xe,flags:Te,immutable:W,transition:J,newDataRevision:Q,gd:F},Be={};for(ue=0;ue<B.length;ue++)if(j[ue]){if(te=j[ue]._fullInput,c.hasMakesDataTransform(te)&&(te=j[ue]),Be[te.uid])continue;Be[te.uid]=1,je(B[ue]._fullInput,te,[],we)}return(Te.calc||Te.plot)&&(Te.fullReplot=!0),J&&Te.nChanges&&Te.nChangesAnim&&(Te.anim=Te.nChanges===Te.nChangesAnim&&he?"all":"some"),Te}function Pe(F,B,j,W,J){var Q=x.layoutFlags();Q.arrays={},Q.rangesAltered={},Q.nChanges=0,Q.nChangesAnim=0;function he(ue){return f.getLayoutValObject(j,ue)}var Te={getValObject:he,flags:Q,immutable:W,transition:J,gd:F};return je(B,j,[],Te),(Q.plot||Q.calc)&&(Q.layoutReplot=!0),J&&Q.nChanges&&Q.nChangesAnim&&(Q.anim=Q.nChanges===Q.nChangesAnim?"all":"some"),Q}function je(F,B,j,W){var J,Q,he,Te=W.getValObject,ue=W.flags,te=W.immutable,xe=W.inArray,we=W.arrayIndex;function Be(){var Dt=J.editType;if(xe&&Dt.indexOf("arraydraw")!==-1){i.pushUnique(ue.arrays[xe],we);return}x.update(ue,J),Dt!=="none"&&ue.nChanges++,W.transition&&J.anim&&ue.nChangesAnim++,(ge.test(he)||_e.test(he))&&(ue.rangesAltered[j[0]]=1),le.test(he)&&n(B,"_inputDomain").set(null),Q==="datarevision"&&(ue.newDataRevision=1)}function ot(Dt){return Dt.valType==="data_array"||Dt.arrayOk}for(Q in F){if(ue.calc&&!W.transition)return;var vt=F[Q],st=B[Q],Ke=j.concat(Q);if(he=Ke.join("."),!(Q.charAt(0)==="_"||typeof vt=="function"||vt===st)){if((Q==="tick0"||Q==="dtick")&&j[0]!=="geo"){var Mt=B.tickmode;if(Mt==="auto"||Mt==="array"||!Mt)continue}if(!(Q==="range"&&B.autorange)&&!((Q==="zmin"||Q==="zmax")&&B.type==="contourcarpet")&&(J=Te(Ke),!!J&&!(J._compareAsJSON&&JSON.stringify(vt)===JSON.stringify(st)))){var ft=J.valType,et,kt=ot(J),xt=Array.isArray(vt),ct=Array.isArray(st);if(xt&&ct){var rt="_input_"+Q,Ze=F[rt],nt=B[rt];if(Array.isArray(Ze)&&Ze===nt)continue}if(st===void 0)kt&&xt?ue.calc=!0:Be();else if(J._isLinkedToArray){var bt=[],dt=!1;xe||(ue.arrays[Q]=bt);var Ge=Math.min(vt.length,st.length),ht=Math.max(vt.length,st.length);if(Ge!==ht)if(J.editType==="arraydraw")dt=!0;else{Be();continue}for(et=0;et<Ge;et++)je(vt[et],st[et],Ke.concat(et),i.extendFlat({inArray:Q,arrayIndex:et},W));if(dt)for(et=Ge;et<ht;et++)bt.push(et)}else!ft&&i.isPlainObject(vt)?je(vt,st,Ke,W):kt?xt&&ct?(te&&(ue.calc=!0),(te||W.newDataRevision)&&Be()):xt!==ct?ue.calc=!0:Be():xt&&ct?(vt.length!==st.length||String(vt)!==String(st))&&Be():Be()}}}for(Q in B)if(!(Q in F||Q.charAt(0)==="_"||typeof B[Q]=="function"))if(J=Te(j.concat(Q)),ot(J)&&Array.isArray(B[Q])){ue.calc=!0;return}else Be()}function Ie(F,B){var j;for(j in F)if(j.charAt(0)!=="_"){var W=F[j],J=B[j];if(W!==J)if(i.isPlainObject(W)&&i.isPlainObject(J)){if(Ie(W,J))return!0}else if(Array.isArray(W)&&Array.isArray(J)){if(W.length!==J.length)return!0;for(var Q=0;Q<W.length;Q++)if(W[Q]!==J[Q])if(i.isPlainObject(W[Q])&&i.isPlainObject(J[Q])){if(Ie(W[Q],J[Q]))return!0}else return!0}else return!0}}function Ue(F,B,j){if(F=i.getGraphDiv(F),!i.isPlotDiv(F))throw new Error("This element is not a Plotly plot: "+F+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var W=F._transitionData;W._frameQueue||(W._frameQueue=[]),j=c.supplyAnimationDefaults(j);var J=j.transition,Q=j.frame;W._frameWaitingCnt===void 0&&(W._frameWaitingCnt=0);function he(te){return Array.isArray(J)?te>=J.length?J[0]:J[te]:J}function Te(te){return Array.isArray(Q)?te>=Q.length?Q[0]:Q[te]:Q}function ue(te,xe){var we=0;return function(){if(te&&++we===xe)return te()}}return new Promise(function(te,xe){function we(){if(W._frameQueue.length!==0){for(;W._frameQueue.length;){var Ge=W._frameQueue.pop();Ge.onInterrupt&&Ge.onInterrupt()}F.emit("plotly_animationinterrupted",[])}}function Be(Ge){if(Ge.length!==0){for(var ht=0;ht<Ge.length;ht++){var Dt;Ge[ht].type==="byname"?Dt=c.computeFrame(F,Ge[ht].name):Dt=Ge[ht].data;var pr=Te(ht),or=he(ht);or.duration=Math.min(or.duration,pr.duration);var br={frame:Dt,name:Ge[ht].name,frameOpts:pr,transitionOpts:or};ht===Ge.length-1&&(br.onComplete=ue(te,2),br.onInterrupt=xe),W._frameQueue.push(br)}j.mode==="immediate"&&(W._lastFrameAt=-1/0),W._animationRaf||st()}}function ot(){F.emit("plotly_animated"),window.cancelAnimationFrame(W._animationRaf),W._animationRaf=null}function vt(){W._currentFrame&&W._currentFrame.onComplete&&W._currentFrame.onComplete();var Ge=W._currentFrame=W._frameQueue.shift();if(Ge){var ht=Ge.name?Ge.name.toString():null;F._fullLayout._currentFrame=ht,W._lastFrameAt=Date.now(),W._timeToNext=Ge.frameOpts.duration,c.transition(F,Ge.frame.data,Ge.frame.layout,w.coerceTraceIndices(F,Ge.frame.traces),Ge.frameOpts,Ge.transitionOpts).then(function(){Ge.onComplete&&Ge.onComplete()}),F.emit("plotly_animatingframe",{name:ht,frame:Ge.frame,animation:{frame:Ge.frameOpts,transition:Ge.transitionOpts}})}else ot()}function st(){F.emit("plotly_animating"),W._lastFrameAt=-1/0,W._timeToNext=0,W._runningTransitions=0,W._currentFrame=null;var Ge=function(){W._animationRaf=window.requestAnimationFrame(Ge),Date.now()-W._lastFrameAt>W._timeToNext&&vt()};Ge()}var Ke=0;function Mt(Ge){return Array.isArray(J)?Ke>=J.length?Ge.transitionOpts=J[Ke]:Ge.transitionOpts=J[0]:Ge.transitionOpts=J,Ke++,Ge}var ft,et,kt=[],xt=B==null,ct=Array.isArray(B),rt=!xt&&!ct&&i.isPlainObject(B);if(rt)kt.push({type:"object",data:Mt(i.extendFlat({},B))});else if(xt||["string","number"].indexOf(typeof B)!==-1)for(ft=0;ft<W._frames.length;ft++)et=W._frames[ft],et&&(xt||String(et.group)===String(B))&&kt.push({type:"byname",name:String(et.name),data:Mt({name:et.name})});else if(ct)for(ft=0;ft<B.length;ft++){var Ze=B[ft];["number","string"].indexOf(typeof Ze)!==-1?(Ze=String(Ze),kt.push({type:"byname",name:Ze,data:Mt({name:Ze})})):i.isPlainObject(Ze)&&kt.push({type:"object",data:Mt(i.extendFlat({},Ze))})}for(ft=0;ft<kt.length;ft++)if(et=kt[ft],et.type==="byname"&&!W._frameHash[et.data.name]){i.warn('animate failure: frame not found: "'+et.data.name+'"'),xe();return}["next","immediate"].indexOf(j.mode)!==-1&&we(),j.direction==="reverse"&&kt.reverse();var nt=F._fullLayout._currentFrame;if(nt&&j.fromcurrent){var bt=-1;for(ft=0;ft<kt.length;ft++)if(et=kt[ft],et.type==="byname"&&et.name===nt){bt=ft;break}if(bt>0&&bt<kt.length-1){var dt=[];for(ft=0;ft<kt.length;ft++)et=kt[ft],(kt[ft].type!=="byname"||ft>bt)&&dt.push(et);kt=dt}}kt.length>0?Be(kt):(F.emit("plotly_animated"),te())})}function ke(F,B,j){if(F=i.getGraphDiv(F),B==null)return Promise.resolve();if(!i.isPlotDiv(F))throw new Error("This element is not a Plotly plot: "+F+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var W,J,Q,he,Te=F._transitionData._frames,ue=F._transitionData._frameHash;if(!Array.isArray(B))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+B);var te=Te.length+B.length*2,xe=[],we={};for(W=B.length-1;W>=0;W--)if(i.isPlainObject(B[W])){var Be=B[W].name,ot=(ue[Be]||we[Be]||{}).name,vt=B[W].name,st=ue[ot]||we[ot];ot&&vt&&typeof vt=="number"&&st&&T<k&&(T++,i.warn('addFrames: overwriting frame "'+(ue[ot]||we[ot]).name+'" with a frame whose name of type "number" also equates to "'+ot+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),T===k&&i.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),we[Be]={name:Be},xe.push({frame:c.supplyFrameDefaults(B[W]),index:j&&j[W]!==void 0&&j[W]!==null?j[W]:te+W})}xe.sort(function(rt,Ze){return rt.index>Ze.index?-1:rt.index<Ze.index?1:0});var Ke=[],Mt=[],ft=Te.length;for(W=xe.length-1;W>=0;W--){if(J=xe[W].frame,typeof J.name=="number"&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!J.name)for(;ue[J.name="frame "+F._transitionData._counter++];);if(ue[J.name]){for(Q=0;Q<Te.length&&(Te[Q]||{}).name!==J.name;Q++);Ke.push({type:"replace",index:Q,value:J}),Mt.unshift({type:"replace",index:Q,value:Te[Q]})}else he=Math.max(0,Math.min(xe[W].index,ft)),Ke.push({type:"insert",index:he,value:J}),Mt.unshift({type:"delete",index:he}),ft++}var et=c.modifyFrames,kt=c.modifyFrames,xt=[F,Mt],ct=[F,Ke];return l&&l.add(F,et,xt,kt,ct),c.modifyFrames(F,Ke)}function We(F,B){if(F=i.getGraphDiv(F),!i.isPlotDiv(F))throw new Error("This element is not a Plotly plot: "+F);var j,W,J=F._transitionData._frames,Q=[],he=[];if(!B)for(B=[],j=0;j<J.length;j++)B.push(j);for(B=B.slice(),B.sort(),j=B.length-1;j>=0;j--)W=B[j],Q.push({type:"delete",index:W}),he.unshift({type:"insert",index:W,value:J[W]});var Te=c.modifyFrames,ue=c.modifyFrames,te=[F,he],xe=[F,Q];return l&&l.add(F,Te,te,ue,xe),c.modifyFrames(F,Q)}function qe(F){F=i.getGraphDiv(F);var B=F._fullLayout||{},j=F._fullData||[];return c.cleanPlot([],{},j,B),c.purge(F),o.purge(F),B._container&&B._container.remove(),delete F._context,F}function Ye(F){var B=F._fullLayout,j=F.getBoundingClientRect();if(!i.equalDomRects(j,B._lastBBox)){var W=B._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(F));B._invScaleX=Math.sqrt(W[0][0]*W[0][0]+W[0][1]*W[0][1]+W[0][2]*W[0][2]),B._invScaleY=Math.sqrt(W[1][0]*W[1][0]+W[1][1]*W[1][1]+W[1][2]*W[1][2]),B._lastBBox=j}}function Qe(F){var B=e.select(F),j=F._fullLayout;if(j._calcInverseTransform=Ye,j._calcInverseTransform(F),j._container=B.selectAll(".plot-container").data([0]),j._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),j._paperdiv=j._container.selectAll(".svg-container").data([0]),j._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),j._glcontainer=j._paperdiv.selectAll(".gl-container").data([{}]),j._glcontainer.enter().append("div").classed("gl-container",!0),j._paperdiv.selectAll(".main-svg").remove(),j._paperdiv.select(".modebar-container").remove(),j._paper=j._paperdiv.insert("svg",":first-child").classed("main-svg",!0),j._toppaper=j._paperdiv.append("svg").classed("main-svg",!0),j._modebardiv=j._paperdiv.append("div"),delete j._modeBar,j._hoverpaper=j._paperdiv.append("svg").classed("main-svg",!0),!j._uid){var W={};e.selectAll("defs").each(function(){this.id&&(W[this.id.split("-")[1]]=1)}),j._uid=i.randstr(W)}j._paperdiv.selectAll(".main-svg").attr(p.svgAttrs),j._defs=j._paper.append("defs").attr("id","defs-"+j._uid),j._clips=j._defs.append("g").classed("clips",!0),j._topdefs=j._toppaper.append("defs").attr("id","topdefs-"+j._uid),j._topclips=j._topdefs.append("g").classed("clips",!0),j._bgLayer=j._paper.append("g").classed("bglayer",!0),j._draggers=j._paper.append("g").classed("draglayer",!0);var J=j._paper.append("g").classed("layer-below",!0);j._imageLowerLayer=J.append("g").classed("imagelayer",!0),j._shapeLowerLayer=J.append("g").classed("shapelayer",!0),j._cartesianlayer=j._paper.append("g").classed("cartesianlayer",!0),j._polarlayer=j._paper.append("g").classed("polarlayer",!0),j._smithlayer=j._paper.append("g").classed("smithlayer",!0),j._ternarylayer=j._paper.append("g").classed("ternarylayer",!0),j._geolayer=j._paper.append("g").classed("geolayer",!0),j._funnelarealayer=j._paper.append("g").classed("funnelarealayer",!0),j._pielayer=j._paper.append("g").classed("pielayer",!0),j._iciclelayer=j._paper.append("g").classed("iciclelayer",!0),j._treemaplayer=j._paper.append("g").classed("treemaplayer",!0),j._sunburstlayer=j._paper.append("g").classed("sunburstlayer",!0),j._indicatorlayer=j._toppaper.append("g").classed("indicatorlayer",!0),j._glimages=j._paper.append("g").classed("glimages",!0);var Q=j._toppaper.append("g").classed("layer-above",!0);j._imageUpperLayer=Q.append("g").classed("imagelayer",!0),j._shapeUpperLayer=Q.append("g").classed("shapelayer",!0),j._selectionLayer=j._toppaper.append("g").classed("selectionlayer",!0),j._infolayer=j._toppaper.append("g").classed("infolayer",!0),j._menulayer=j._toppaper.append("g").classed("menulayer",!0),j._zoomlayer=j._toppaper.append("g").classed("zoomlayer",!0),j._hoverlayer=j._hoverpaper.append("g").classed("hoverlayer",!0),j._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),F.emit("plotly_framework")}t.animate=Ue,t.addFrames=ke,t.deleteFrames=We,t.addTraces=Y,t.deleteTraces=K,t.extendTraces=X,t.moveTraces=Z,t.prependTraces=G,t.newPlot=E,t._doPlot=S,t.purge=qe,t.react=ye,t.redraw=N,t.relayout=ce,t.restyle=q,t.setPlotConfig=D,t.update=ze,t._guiRelayout=Ve(ce),t._guiRestyle=Ve(q),t._guiUpdate=Ve(ze),t._storeDirectGUIEdit=ne})(Ch);var zr={},gP=tt;zr.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0};zr.getRedrawFunc=function(t){return function(){gP.getComponentMethod("colorbar","draw")(t)}};zr.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)};zr.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var ET=window.URL||window.webkitURL;zr.createObjectURL=function(t){return ET.createObjectURL(t)};zr.revokeObjectURL=function(t){return ET.revokeObjectURL(t)};zr.createBlob=function(t,e){if(e==="svg")return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if(e==="full-json")return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=bP(window.atob(t));return new window.Blob([r],{type:"image/"+e})};zr.octetStream=function(t){document.location.href="data:application/octet-stream"+t};function bP(t){for(var e=t.length,r=new ArrayBuffer(e),a=new Uint8Array(r),i=0;i<e;i++)a[i]=t.charCodeAt(i);return r}zr.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/;zr.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.";var Hd=yt,xP=de,_P=Et,wP=ut,Gs=bn,Ju=/"/g,gl="TOBESTRIPPED",TP=new RegExp('("'+gl+")|("+gl+'")',"g");function kP(t){var e=Hd.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":e.html(a).text()});return e.remove(),r}function AP(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}var _p=function(e,r,a){var i=e._fullLayout,n=i._paper,o=i._toppaper,l=i.width,s=i.height,f;n.insert("rect",":first-child").call(_P.setRect,0,0,l,s).call(wP.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(f=0;f<c.length;f++){var v=c[f];v.toSVG&&v.toSVG(e)}if(o){var u=o.node().childNodes,h=Array.prototype.slice.call(u);for(f=0;f<h.length;f++){var d=h[f];d.childNodes.length&&n.node().appendChild(d)}}i._draggers&&i._draggers.remove(),n.node().style.background="",n.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var y=Hd.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){y.remove();return}else y.style({visibility:null,display:null});var m=this.style.fontFamily;m&&m.indexOf('"')!==-1&&y.style("font-family",m.replace(Ju,gl))}),n.selectAll(".gradient_filled,.pattern_filled").each(function(){var y=Hd.select(this),m=this.style.fill;m&&m.indexOf("url(")!==-1&&y.style("fill",m.replace(Ju,gl));var g=this.style.stroke;g&&g.indexOf("url(")!==-1&&y.style("stroke",g.replace(Ju,gl))}),(r==="pdf"||r==="eps")&&n.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),n.node().setAttributeNS(Gs.xmlns,"xmlns",Gs.svg),n.node().setAttributeNS(Gs.xmlns,"xmlns:xlink",Gs.xlink),r==="svg"&&a&&(n.attr("width",a*l),n.attr("height",a*s),n.attr("viewBox","0 0 "+l+" "+s));var p=new window.XMLSerializer().serializeToString(n.node());return p=kP(p),p=AP(p),p=p.replace(TP,"'"),xP.isIE()&&(p=p.replace(/"/gi,"'"),p=p.replace(/(\('#)([^']*)('\))/gi,'("#$2")'),p=p.replace(/(\\')/gi,'"')),p},Zg=de,MP=uh.EventEmitter,Pn=zr;function SP(t){var e=t.emitter||new MP,r=new Promise(function(a,i){var n=window.Image,o=t.svg,l=t.format||"png";if(Zg.isIE()&&l!=="svg"){var s=new Error(Pn.MSG_IE_BAD_FORMAT);return i(s),t.promise?r:e.emit("error",s)}var f=t.canvas,c=t.scale||1,v=t.width||300,u=t.height||150,h=c*v,d=c*u,p=f.getContext("2d",{willReadFrequently:!0}),y=new n,m,g;l==="svg"||Zg.isSafari()?g=Pn.encodeSVG(o):(m=Pn.createBlob(o,"svg"),g=Pn.createObjectURL(m)),f.width=h,f.height=d,y.onload=function(){var w;switch(m=null,Pn.revokeObjectURL(g),l!=="svg"&&p.drawImage(y,0,0,h,d),l){case"jpeg":w=f.toDataURL("image/jpeg");break;case"png":w=f.toDataURL("image/png");break;case"webp":w=f.toDataURL("image/webp");break;case"svg":w=g;break;default:var b="Image format is not jpeg, png, svg or webp.";if(i(new Error(b)),!t.promise)return e.emit("error",b)}a(w),t.promise||e.emit("success",w)},y.onerror=function(w){if(m=null,Pn.revokeObjectURL(g),i(w),!t.promise)return e.emit("error",w)},y.src=g});return t.promise?r:e}var wp=SP,Kg=_t,Qg=Ch,LP=sr,Fa=de,Qo=zr,CP=_p,DP=wp,$P=sc.version,ev={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}};function PP(t,e){e=e||{};var r,a,i,n;Fa.isPlainObject(t)?(r=t.data||[],a=t.layout||{},i=t.config||{},n={}):(t=Fa.getGraphDiv(t),r=Fa.extendDeep([],t.data),a=Fa.extendDeep({},t.layout),i=t._context,n=t._fullLayout||{});function o(_){return!(_ in e)||Fa.validate(e[_],ev[_])}if(!o("width")&&e.width!==null||!o("height")&&e.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+Fa.join2(ev.format.values,", "," or ")+".");var l={};function s(_,T){return Fa.coerce(e,l,ev,_,T)}var f=s("format"),c=s("width"),v=s("height"),u=s("scale"),h=s("setBackground"),d=s("imageDataOnly"),p=document.createElement("div");p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var y=Fa.extendFlat({},a);c?y.width=c:e.width===null&&Kg(n.width)&&(y.width=n.width),v?y.height=v:e.height===null&&Kg(n.height)&&(y.height=n.height);var m=Fa.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:h}),g=Qo.getRedrawFunc(p);function w(){return new Promise(function(_){setTimeout(_,Qo.getDelay(p._fullLayout))})}function b(){return new Promise(function(_,T){var k=CP(p,f,u),S=p._fullLayout.width,M=p._fullLayout.height;function D(){Qg.purge(p),document.body.removeChild(p)}if(f==="full-json"){var A=LP.graphJson(p,!1,"keepdata","object",!0,!0);return A.version=$P,A=JSON.stringify(A),D(),_(d?A:Qo.encodeJSON(A))}if(D(),f==="svg")return _(d?k:Qo.encodeSVG(k));var C=document.createElement("canvas");C.id=Fa.randstr(),DP({format:f,width:S,height:M,scale:u,canvas:C,svg:k,promise:!0}).then(_).catch(T)})}function x(_){return d?_.replace(Qo.IMAGE_URL_PREFIX,""):_}return new Promise(function(_,T){Qg.newPlot(p,r,y,m).then(g).then(w).then(b).then(function(k){_(x(k))}).catch(function(k){T(k)})})}var RT=PP,va=de,EP=sr,RP=$o,zP=So.dfltConfig,na=va.isPlainObject,Ai=Array.isArray,Jg=va.isArrayOrTypedArray,IP=function(e,r){e===void 0&&(e=[]),r===void 0&&(r={});var a=RP.get(),i=[],n={_context:va.extendFlat({},zP)},o,l;Ai(e)?(n.data=va.extendDeep([],e),o=e):(n.data=[],o=[],i.push(lr("array","data"))),na(r)?(n.layout=va.extendDeep({},r),l=r):(n.layout={},l={},arguments.length>1&&i.push(lr("object","layout"))),EP.supplyDefaults(n);for(var s=n._fullData,f=o.length,c=0;c<f;c++){var v=o[c],u=["data",c];if(!na(v)){i.push(lr("object",u));continue}var h=s[c],d=h.type,p=a.traces[d].attributes;p.type={valType:"enumerated",values:[d]},h.visible===!1&&v.visible!==!1&&i.push(lr("invisible",u)),bl(v,h,p,i,u);var y=v.transforms,m=h.transforms;if(y){Ai(y)||i.push(lr("array",u,["transforms"])),u.push("transforms");for(var g=0;g<y.length;g++){var w=["transforms",g],b=y[g].type;if(!na(y[g])){i.push(lr("object",u,w));continue}var x=a.transforms[b]?a.transforms[b].attributes:{};x.type={valType:"enumerated",values:Object.keys(a.transforms)},bl(y[g],m[g],x,i,u,w)}}}var _=n._fullLayout,T=FP(a,s);return bl(l,_,T,i,"layout"),i.length===0?void 0:i};function bl(t,e,r,a,i,n){n=n||[];for(var o=Object.keys(t),l=0;l<o.length;l++){var s=o[l];if(s!=="transforms"){var f=n.slice();f.push(s);var c=t[s],v=e[s],u=OP(r,s),h=(u||{}).valType,d=h==="info_array",p=h==="colorscale",y=(u||{}).items;if(!HP(r,s))a.push(lr("schema",i,f));else if(na(c)&&na(v)&&h!=="any")bl(c,v,u,a,i,f);else if(d&&Ai(c)){c.length>v.length&&a.push(lr("unused",i,f.concat(v.length)));var m=v.length,g=Array.isArray(y);g&&(m=Math.min(m,y.length));var w,b,x,_,T;if(u.dimensions===2)for(b=0;b<m;b++)if(Ai(c[b])){c[b].length>v[b].length&&a.push(lr("unused",i,f.concat(b,v[b].length)));var k=v[b].length;for(w=0;w<(g?Math.min(k,y[b].length):k);w++)x=g?y[b][w]:y,_=c[b][w],T=v[b][w],va.validate(_,x)?T!==_&&T!==+_&&a.push(lr("dynamic",i,f.concat(b,w),_,T)):a.push(lr("value",i,f.concat(b,w),_))}else a.push(lr("array",i,f.concat(b),c[b]));else for(b=0;b<m;b++)x=g?y[b]:y,_=c[b],T=v[b],va.validate(_,x)?T!==_&&T!==+_&&a.push(lr("dynamic",i,f.concat(b),_,T)):a.push(lr("value",i,f.concat(b),_))}else if(u.items&&!d&&Ai(c)){var S=y[Object.keys(y)[0]],M=[],D,A;for(D=0;D<v.length;D++){var C=v[D]._index||D;if(A=f.slice(),A.push(C),na(c[C])&&na(v[D])){M.push(C);var $=c[C],N=v[D];na($)&&$.visible!==!1&&N.visible===!1?a.push(lr("invisible",i,A)):bl($,N,S,a,i,A)}}for(D=0;D<c.length;D++)A=f.slice(),A.push(D),na(c[D])?M.indexOf(D)===-1&&a.push(lr("unused",i,A)):a.push(lr("object",i,A,c[D]))}else!na(c)&&na(v)?a.push(lr("object",i,f,c)):!Jg(c)&&Jg(v)&&!d&&!p?a.push(lr("array",i,f,c)):s in e?va.validate(c,u)?u.valType==="enumerated"&&(u.coerceNumber&&c!==+v||c!==v)&&a.push(lr("dynamic",i,f,c,v)):a.push(lr("value",i,f,c)):a.push(lr("unused",i,f,c))}}return a}function FP(t,e){for(var r=t.layout.layoutAttributes,a=0;a<e.length;a++){var i=e[a],n=t.traces[i.type],o=n.layoutAttributes;o&&(i.subplot?va.extendFlat(r[n.attributes.subplot.dflt],o):va.extendFlat(r,o))}return r}var NP={object:function(t,e){var r;return t==="layout"&&e===""?r="The layout argument":t[0]==="data"&&e===""?r="Trace "+t[1]+" in the data argument":r=Oi(t)+"key "+e,r+" must be linked to an object container"},array:function(t,e){var r;return t==="data"?r="The data argument":r=Oi(t)+"key "+e,r+" must be linked to an array container"},schema:function(t,e){return Oi(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var a=na(r)?"container":"key";return Oi(t)+a+" "+e+" did not get coerced"},dynamic:function(t,e,r,a){return[Oi(t)+"key",e,"(set to '"+r+"')","got reset to","'"+a+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?Oi(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[Oi(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function Oi(t){return Ai(t)?"In data trace "+t[1]+", ":"In "+t+", "}function lr(t,e,r,a,i){r=r||"";var n,o;Ai(e)?(n=e[0],o=e[1]):(n=e,o=null);var l=jP(r),s=NP[t](e,l,a,i);return va.log(s),{code:t,container:n,trace:o,path:r,astr:l,msg:s}}function HP(t,e){var r=zT(e),a=r.keyMinusId,i=r.id;return a in t&&t[a]._isSubplotObj&&i?!0:e in t}function OP(t,e){if(e in t)return t[e];var r=zT(e);return t[r.keyMinusId]}var BP=va.counterRegex("([a-z]+)");function zT(t){var e=t.match(BP);return{keyMinusId:e&&e[1],id:e&&e[2]}}function jP(t){if(!Ai(t))return String(t);for(var e="",r=0;r<t.length;r++){var a=t[r];typeof a=="number"?e=e.substr(0,e.length-1)+"["+a+"]":e+=a,r<t.length-1&&(e+=".")}return e}var e0=de,Jo=zr;function GP(t,e,r){var a=document.createElement("a"),i="download"in a,n=new Promise(function(o,l){var s,f;if(e0.isIE())return s=Jo.createBlob(t,"svg"),window.navigator.msSaveBlob(s,e),s=null,o(e);if(i)return s=Jo.createBlob(t,r),f=Jo.createObjectURL(s),a.href=f,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),Jo.revokeObjectURL(f),s=null,o(e);if(e0.isSafari()){var c=r==="svg"?",":";base64,";return Jo.octetStream(c+encodeURIComponent(t)),o(e)}l(new Error("download error"))});return n}var UP=GP,tv=de,VP=RT,WP=UP,XP=zr;function YP(t,e){var r;return tv.isPlainObject(t)||(r=tv.getGraphDiv(t)),e=e||{},e.format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise(function(a,i){r&&r._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),tv.isIE()&&e.format!=="svg"&&i(new Error(XP.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var n=VP(t,e),o=e.filename||t.fn||"newplot";o+="."+e.format.replace("-","."),n.then(function(l){return r&&(r._snapshotInProgress=!1),WP(l,o,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),i(l)})})}var IT=YP,Tp={},Vr=de,Wr=Vr.isPlainObject,FT=$o,NT=sr,qP=Ba,HT=It,OT=So.dfltConfig;Tp.makeTemplate=function(t){t=Vr.isPlainObject(t)?t:Vr.getGraphDiv(t),t=Vr.extendDeep({_context:OT},{data:t.data,layout:t.layout}),NT.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var a={data:{},layout:{}};e.forEach(function(h){var d={};xl(h,d,KP.bind(null,h));var p=Vr.coerce(h,{},qP,"type"),y=a.data[p];y||(y=a.data[p]=[]),y.push(d)}),xl(r,a.layout,ZP.bind(null,r)),delete a.layout.template;var i=r.template;if(Wr(i)){var n=i.layout,o,l,s,f,c,v;Wr(n)&&Uf(n,a.layout);var u=i.data;if(Wr(u)){for(l in a.data)if(s=u[l],Array.isArray(s)){for(c=a.data[l],v=c.length,f=s.length,o=0;o<v;o++)Uf(s[o%f],c[o]);for(o=v;o<f;o++)c.push(Vr.extendDeep({},s[o]))}for(l in u)l in a.data||(a.data[l]=Vr.extendDeep([],u[l]))}}return a};function Uf(t,e){t=Vr.extendDeep({},t);var r=Object.keys(t).sort(),a,i;function n(c,v,u){if(Wr(v)&&Wr(c))Uf(c,v);else if(Array.isArray(v)&&Array.isArray(c)){var h=HT.arrayTemplater({_template:t},u);for(i=0;i<v.length;i++){var d=v[i],p=h.newItem(d)._template;p&&Uf(p,d)}var y=h.defaultItems();for(i=0;i<y.length;i++)v.push(y[i]._template);for(i=0;i<v.length;i++)delete v[i].templateitemname}}for(a=0;a<r.length;a++){var o=r[a],l=t[o];if(o in e?n(l,e[o],o):e[o]=l,Vf(o)===o)for(var s in e){var f=Vf(s);s!==f&&f===o&&!(s in t)&&n(l,e[s],o)}}}function Vf(t){return t.replace(/[0-9]+$/,"")}function xl(t,e,r,a,i){var n=i&&r(i);for(var o in t){var l=t[o],s=oa(t,o,a),f=oa(t,o,i),c=r(f);if(!c){var v=Vf(o);v!==o&&(f=oa(t,v,i),c=r(f))}if(!(n&&n===c)&&!(!c||c._noTemplating||c.valType==="data_array"||c.arrayOk&&Array.isArray(l)))if(!c.valType&&Wr(l))xl(l,e,r,s,f);else if(c._isLinkedToArray&&Array.isArray(l))for(var u=!1,h=0,d={},p=0;p<l.length;p++){var y=l[p];if(Wr(y)){var m=y.name;if(m)d[m]||(xl(y,e,r,oa(l,h,s),oa(l,h,f)),h++,d[m]=1);else if(!u){var g=HT.arrayDefaultKey(o),w=oa(t,g,a),b=oa(l,h,s);xl(y,e,r,b,oa(l,h,f));var x=Vr.nestedProperty(e,b),_=Vr.nestedProperty(e,w);_.set(x.get()),x.set(null),u=!0}}}else{var T=Vr.nestedProperty(e,s);T.set(l)}}}function ZP(t,e){return FT.getLayoutValObject(t,Vr.nestedProperty({},e).parts)}function KP(t,e){return FT.getTraceValObject(t,Vr.nestedProperty({},e).parts)}function oa(t,e,r){var a;return r?Array.isArray(t)?a=r+"["+e+"]":a=r+"."+e:a=e,a}Tp.validateTemplate=function(t,e){var r=Vr.extendDeep({},{_context:OT,data:t.data,layout:t.layout}),a=r.layout||{};Wr(e)||(e=a.template||{});var i=e.layout,n=e.data,o=[];r.layout=a,r.layout.template=e,NT.supplyDefaults(r);var l=r._fullLayout,s=r._fullData,f={};function c(w,b){for(var x in w)if(x.charAt(0)!=="_"&&Wr(w[x])){var _=Vf(x),T=[],k;for(k=0;k<b.length;k++)T.push(oa(w,x,b[k])),_!==x&&T.push(oa(w,_,b[k]));for(k=0;k<T.length;k++)f[T[k]]=1;c(w[x],T)}}function v(w,b){for(var x in w)if(x.indexOf("defaults")===-1&&Wr(w[x])){var _=oa(w,x,b);f[_]?v(w[x],_):o.push({code:"unused",path:_})}}if(Wr(i)?(c(l,["layout"]),v(i,"layout")):o.push({code:"layout"}),!Wr(n))o.push({code:"data"});else{for(var u={},h,d=0;d<s.length;d++){var p=s[d];h=p.type,u[h]=(u[h]||0)+1,p._fullInput._template||o.push({code:"missing",index:p._fullInput.index,traceType:h})}for(h in n){var y=n[h].length,m=u[h]||0;y>m?o.push({code:"unused",traceType:h,templateCount:y,dataCount:m}):m>y&&o.push({code:"reused",traceType:h,templateCount:y,dataCount:m})}}function g(w,b){for(var x in w)if(x.charAt(0)!=="_"){var _=w[x],T=oa(w,x,b);Wr(_)?(Array.isArray(w)&&_._template===!1&&_.templateitemname&&o.push({code:"missing",path:T,templateitemname:_.templateitemname}),g(_,T)):Array.isArray(_)&&QP(_)&&g(_,T)}}if(g({data:s,layout:l},""),o.length)return o.map(JP)};function QP(t){for(var e=0;e<t.length;e++)if(Wr(t[e]))return!0}function JP(t){var e;switch(t.code){case"data":e="The template has no key data.";break;case"layout":e="The template has no key layout.";break;case"missing":t.path?e="There are no templates for item "+t.path+" with name "+t.templateitemname:e="There are no templates for trace "+t.index+", of type "+t.traceType+".";break;case"unused":t.path?e="The template item at "+t.path+" was not used in constructing the plot.":t.dataCount?e="Some of the templates of type "+t.traceType+" were not used. The template has "+t.templateCount+" traces, the data only has "+t.dataCount+" of this type.":e="The template has "+t.templateCount+" traces of type "+t.traceType+" but there are none in the data.";break;case"reused":e="Some of the templates of type "+t.traceType+" were used more than once. The template has "+t.templateCount+" traces, the data has "+t.dataCount+" of this type.";break}return t.msg=e,t}var vr=Ch;Yt._doPlot=vr._doPlot;Yt.newPlot=vr.newPlot;Yt.restyle=vr.restyle;Yt.relayout=vr.relayout;Yt.redraw=vr.redraw;Yt.update=vr.update;Yt._guiRestyle=vr._guiRestyle;Yt._guiRelayout=vr._guiRelayout;Yt._guiUpdate=vr._guiUpdate;Yt._storeDirectGUIEdit=vr._storeDirectGUIEdit;Yt.react=vr.react;Yt.extendTraces=vr.extendTraces;Yt.prependTraces=vr.prependTraces;Yt.addTraces=vr.addTraces;Yt.deleteTraces=vr.deleteTraces;Yt.moveTraces=vr.moveTraces;Yt.purge=vr.purge;Yt.addFrames=vr.addFrames;Yt.deleteFrames=vr.deleteFrames;Yt.animate=vr.animate;Yt.setPlotConfig=vr.setPlotConfig;Yt.toImage=RT;Yt.validate=IP;Yt.downloadImage=IT;var BT=Tp;Yt.makeTemplate=BT.makeTemplate;Yt.validateTemplate=BT.validateTemplate;var rv=de,eE=tt,kp=function(e,r,a,i){var n=i("x"),o=i("y"),l,s=eE.getComponentMethod("calendars","handleTraceDefaults");if(s(e,r,["x","y"],a),n){var f=rv.minRowLength(n);o?l=Math.min(f,rv.minRowLength(o)):(l=f,i("y0"),i("dy"))}else{if(!o)return 0;l=rv.minRowLength(o),i("x0"),i("dx")}return r._length=l,l},t0=de.dateTick0,tE=ir,rE=tE.ONEWEEK;function r0(t,e){return t%rE===0?t0(e,1):t0(e,0)}var Oc=function(e,r,a,i,n){if(n||(n={x:!0,y:!0}),n.x){var o=i("xperiod");o&&(i("xperiod0",r0(o,r.xcalendar)),i("xperiodalignment"))}if(n.y){var l=i("yperiod");l&&(i("yperiod0",r0(l,r.ycalendar)),i("yperiodalignment"))}},a0=["orientation","groupnorm","stackgaps"],aE=function(e,r,a,i){var n=a._scatterStackOpts,o=i("stackgroup");if(o){var l=r.xaxis+r.yaxis,s=n[l];s||(s=n[l]={});var f=s[o],c=!1;f?f.traces.push(r):(f=s[o]={traceIndices:[],traces:[r]},c=!0);for(var v={orientation:r.x&&!r.y?"h":"v"},u=0;u<a0.length;u++){var h=a0[u],d=h+"Found";if(!f[d]){var p=e[h]!==void 0,y=h==="orientation";if((p||c)&&(f[h]=i(h,v[h]),y&&(f.fillDflt=f[h]==="h"?"tonextx":"tonexty"),p&&(f[d]=!0,!c&&(delete f.traces[0][h],y))))for(var m=0;m<f.traces.length-1;m++){var g=f.traces[m];g._input.fill!==g.fill&&(g.fill=f.fillDflt)}}}return f}},i0=ut,n0=Pa.hasColorscale,o0=es,iE=Pr,jT=function(e,r,a,i,n,o){var l=iE.isBubble(e),s=(e.line||{}).color,f;if(o=o||{},s&&(a=s),n("marker.symbol"),n("marker.opacity",l?.7:1),n("marker.size"),o.noAngle||(n("marker.angle"),o.noAngleRef||n("marker.angleref"),o.noStandOff||n("marker.standoff")),n("marker.color",a),n0(e,"marker")&&o0(e,r,i,n,{prefix:"marker.",cLetter:"c"}),o.noSelect||(n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&r.marker.color!==s?f=s:l?f=i0.background:f=i0.defaultLine,n("marker.line.color",f),n0(e,"marker.line")&&o0(e,r,i,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width",l?1:0)),l&&(n("marker.sizeref"),n("marker.sizemin"),n("marker.sizemode")),o.gradient){var c=n("marker.gradient.type");c!=="none"&&n("marker.gradient.color")}},nE=de.isArrayOrTypedArray,oE=Pa.hasColorscale,lE=es,GT=function(e,r,a,i,n,o){o||(o={});var l=(e.marker||{}).color;if(n("line.color",a),oE(e,"line"))lE(e,r,i,n,{prefix:"line.",cLetter:"c"});else{var s=(nE(l)?!1:l)||a;n("line.color",s)}n("line.width"),o.noDash||n("line.dash"),o.backoff&&n("line.backoff")},sE=function(e,r,a){var i=a("line.shape");i==="spline"&&a("line.smoothing")},fE=de,UT=function(t,e,r,a,i){i=i||{},a("textposition"),fE.coerceFont(a,"textfont",r.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))},cE=ut,l0=de.isArrayOrTypedArray,VT=function(e,r,a,i){var n=!1;if(r.marker){var o=r.marker.color,l=(r.marker.line||{}).color;o&&!l0(o)?n=o:l&&!l0(l)&&(n=l)}i("fillcolor",cE.addOpacity((r.line||{}).color||n||a,.5))},s0=de,uE=tt,vE=Ei,dE=Nc,En=Pr,hE=kp,pE=Oc,mE=aE,yE=jT,gE=GT,f0=sE,bE=UT,xE=VT,_E=de.coercePattern,wE=function(e,r,a,i){function n(h,d){return s0.coerce(e,r,vE,h,d)}var o=hE(e,r,i,n);if(o||(r.visible=!1),!!r.visible){pE(e,r,i,n),n("xhoverformat"),n("yhoverformat");var l=mE(e,r,i,n);i.scattermode==="group"&&r.orientation===void 0&&n("orientation","v");var s=!l&&o<dE.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("mode",s),En.hasLines(r)&&(gE(e,r,a,i,n,{backoff:!0}),f0(e,r,n),n("connectgaps"),n("line.simplify")),En.hasMarkers(r)&&yE(e,r,a,i,n,{gradient:!0}),En.hasText(r)&&(n("texttemplate"),bE(e,r,i,n));var f=[];(En.hasMarkers(r)||En.hasText(r))&&(n("cliponaxis"),n("marker.maxdisplayed"),f.push("points")),n("fill",l?l.fillDflt:"none"),r.fill!=="none"&&(xE(e,r,a,n),En.hasLines(r)||f0(e,r,n),_E(n,"fillpattern",r.fillcolor,!1));var c=(r.line||{}).color,v=(r.marker||{}).color;(r.fill==="tonext"||r.fill==="toself")&&f.push("fills"),n("hoveron",f.join("+")||"points"),r.hoveron!=="fills"&&n("hovertemplate");var u=uE.getComponentMethod("errorbars","supplyDefaults");u(e,r,c||v||a,{axis:"y"}),u(e,r,c||v||a,{axis:"x",inherit:"y"}),s0.coerceSelectionMarkerOpacity(r,n)}},TE=oi.getAxisGroup,Ap=function(e,r,a,i){var n=r.orientation,o=r[{v:"x",h:"y"}[n]+"axis"],l=TE(a,o)+n,s=a._alignmentOpts||{},f=i("alignmentgroup"),c=s[l];c||(c=s[l]={});var v=c[f];v?v.traces.push(r):v=c[f]={traces:[r],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var u=i("offsetgroup"),h=v.offsetGroups,d=h[u];u&&(d||(d=h[u]={offsetIndex:Object.keys(h).length}),r._offsetIndex=d.offsetIndex)},kE=de,AE=Ap,ME=Ei,WT=function(e,r){var a,i,n;function o(v){return kE.coerce(i._input,i,ME,v)}if(r.scattermode==="group")for(n=0;n<e.length;n++)i=e[n],i.type==="scatter"&&(a=i._input,AE(a,i,r,o));for(n=0;n<e.length;n++){var l=e[n];if(l.type==="scatter"){var s=l.fill;if(!(s==="none"||s==="toself")&&(l.opacity=void 0,s==="tonexty"||s==="tonextx"))for(var f=n-1;f>=0;f--){var c=e[f];if(c.type==="scatter"&&c.xaxis===l.xaxis&&c.yaxis===l.yaxis){c.opacity=void 0;break}}}}},SE=de,LE=Dh,CE=function(t,e){function r(i,n){return SE.coerce(t,e,LE,i,n)}var a=e.barmode==="group";e.scattermode==="group"&&r("scattergap",a?e.bargap:.2)},DE=_t,XT=de,$E=XT.dateTime2ms,Us=XT.incrementMonth,PE=ir,EE=PE.ONEAVGMONTH,Bc=function(e,r,a,i){if(r.type!=="date")return{vals:i};var n=e[a+"periodalignment"];if(!n)return{vals:i};var o=e[a+"period"],l;if(DE(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:i}}for(var f=r.calendar,c=n==="start",v=n==="end",u=e[a+"period0"],h=$E(u,f)||0,d=[],p=[],y=[],m=i.length,g=0;g<m;g++){var w=i[g],b,x,_;if(l){for(b=Math.round((w-h)/(l*EE)),_=Us(h,l*b,f);_>w;)_=Us(_,-l,f);for(;_<=w;)_=Us(_,l,f);x=Us(_,-l,f)}else{for(b=Math.round((w-h)/o),_=h+b*o;_>w;)_-=o;for(;_<=w;)_+=o;x=_-o}d[g]=c?x:v?_:(x+_)/2,p[g]=x,y[g]=_}return{vals:d,starts:p,ends:y}},av=Pa.hasColorscale,iv=zh,c0=Pr,YT=function(e,r){c0.hasLines(r)&&av(r,"line")&&iv(e,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),c0.hasMarkers(r)&&(av(r,"marker")&&iv(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),av(r,"marker.line")&&iv(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))},xr=de,qT=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;xr.mergeArray(r.text,e,"tx"),xr.mergeArray(r.texttemplate,e,"txt"),xr.mergeArray(r.hovertext,e,"htx"),xr.mergeArray(r.customdata,e,"data"),xr.mergeArray(r.textposition,e,"tp"),r.textfont&&(xr.mergeArrayCastPositive(r.textfont.size,e,"ts"),xr.mergeArray(r.textfont.color,e,"tc"),xr.mergeArray(r.textfont.family,e,"tf"));var i=r.marker;if(i){xr.mergeArrayCastPositive(i.size,e,"ms"),xr.mergeArrayCastPositive(i.opacity,e,"mo"),xr.mergeArray(i.symbol,e,"mx"),xr.mergeArray(i.angle,e,"ma"),xr.mergeArray(i.standoff,e,"mf"),xr.mergeArray(i.color,e,"mc");var n=i.line;i.line&&(xr.mergeArray(n.color,e,"mlc"),xr.mergeArrayCastPositive(n.width,e,"mlw"));var o=i.gradient;o&&o.type!=="none"&&(xr.mergeArray(o.type,e,"mgt"),xr.mergeArray(o.color,e,"mgc"))}},u0=de,ZT=function(e,r){u0.isArrayOrTypedArray(r.selectedpoints)&&u0.tagSelected(e,r)},v0=_t,Od=de,Fl=Ot,d0=Bc,nv=ir.BADNUM,Bd=Pr,RE=YT,zE=qT,IE=ZT;function FE(t,e){var r=t._fullLayout,a=e._xA=Fl.getFromId(t,e.xaxis||"x","x"),i=e._yA=Fl.getFromId(t,e.yaxis||"y","y"),n=a.makeCalcdata(e,"x"),o=i.makeCalcdata(e,"y"),l=d0(e,a,"x",n),s=d0(e,i,"y",o),f=l.vals,c=s.vals,v=e._length,u=new Array(v),h=e.ids,d=Mp(e,r,a,i),p=!1,y,m,g,w,b,x;JT(r,e);var _="x",T="y",k;if(d)Od.pushUnique(d.traceIndices,e._expandedIndex),y=d.orientation==="v",y?(T="s",k="x"):(_="s",k="y"),b=d.stackgaps==="interpolate";else{var S=QT(e,v);KT(t,e,a,i,f,c,S)}var M=!!e.xperiodalignment,D=!!e.yperiodalignment;for(m=0;m<v;m++){var A=u[m]={},C=v0(f[m]),$=v0(c[m]);C&&$?(A[_]=f[m],A[T]=c[m],M&&(A.orig_x=n[m],A.xEnd=l.ends[m],A.xStart=l.starts[m]),D&&(A.orig_y=o[m],A.yEnd=s.ends[m],A.yStart=s.starts[m])):d&&(y?C:$)?(A[k]=y?f[m]:c[m],A.gap=!0,b?(A.s=nv,p=!0):A.s=0):A[_]=A[T]=nv,h&&(A.id=String(h[m]))}if(zE(u,e),RE(t,e),IE(u,e),d){for(m=0;m<u.length;)u[m][k]===nv?u.splice(m,1):m++;if(Od.sort(u,function(R,L){return R[k]-L[k]||R.i-L.i}),p){for(m=0;m<u.length-1&&u[m].gap;)m++;for(x=u[m].s,x||(x=u[m].s=0),g=0;g<m;g++)u[g].s=x;for(w=u.length-1;w>m&&u[w].gap;)w--;for(x=u[w].s,g=u.length-1;g>w;g--)u[g].s=x;for(;m<w;)if(m++,u[m].gap){for(g=m+1;u[g].gap;)g++;for(var N=u[m-1][k],E=u[m-1].s,P=(u[g].s-E)/(u[g][k]-N);m<g;)u[m].s=E+(u[m][k]-N)*P,m++}}}return u}function KT(t,e,r,a,i,n,o){var l=e._length,s=t._fullLayout,f=r._id,c=a._id,v=s._firstScatter[e2(e)]===e.uid,u=(Mp(e,s,r,a)||{}).orientation,h=e.fill;r._minDtick=0,a._minDtick=0;var d={padded:!0},p={padded:!0};o&&(d.ppad=p.ppad=o);var y=l<2||i[0]!==i[l-1]||n[0]!==n[l-1];y&&(h==="tozerox"||h==="tonextx"&&(v||u==="h"))?d.tozero=!0:!(e.error_y||{}).visible&&(h==="tonexty"||h==="tozeroy"||!Bd.hasMarkers(e)&&!Bd.hasText(e))&&(d.padded=!1,d.ppad=0),y&&(h==="tozeroy"||h==="tonexty"&&(v||u==="v"))?p.tozero=!0:(h==="tonextx"||h==="tozerox")&&(p.padded=!1),f&&(e._extremes[f]=Fl.findExtremes(r,i,d)),c&&(e._extremes[c]=Fl.findExtremes(a,n,p))}function QT(t,e){if(Bd.hasMarkers(t)){var r=t.marker,a=1.6*(t.marker.sizeref||1),i;if(t.marker.sizemode==="area"?i=function(f){return Math.max(Math.sqrt((f||0)/a),3)}:i=function(f){return Math.max((f||0)/a,3)},Od.isArrayOrTypedArray(r.size)){var n={type:"linear"};Fl.setConvert(n);for(var o=n.makeCalcdata(t.marker,"size"),l=new Array(e),s=0;s<e;s++)l[s]=i(o[s]);return l}else return i(r.size)}}function JT(t,e){var r=e2(e),a=t._firstScatter;a[r]||(a[r]=e.uid)}function e2(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function Mp(t,e,r,a){var i=t.stackgroup;if(i){var n=e._scatterStackOpts[r._id+a._id][i],o=n.orientation==="v"?a:r;if(o.type==="linear"||o.type==="log")return n}}var Sp={calc:FE,calcMarkerSize:QT,calcAxisExpansion:KT,setFirstScatter:JT,getStackOpts:Mp},NE=jc,HE=de.distinctVals;function jc(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,a=e.posAxis._id.charAt(0),i=[],n=0;n<t.length;n++){for(var o=t[n],l=0;l<o.length;l++){var s=o[l],f=s.p;f===void 0&&(f=s[a]),f!==void 0&&i.push(f)}o[0]&&o[0].width1&&(r=Math.min(o[0].width1,r))}this.positions=i;var c=HE(i);this.distinctPositions=c.vals,c.vals.length===1&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(c.minDiff,r);var v=(e.posAxis||{}).type;(v==="category"||v==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}jc.prototype.put=function(e,r){var a=this.getLabel(e,r),i=this.bins[a]||0;return this.bins[a]=i+r,i};jc.prototype.get=function(e,r){var a=this.getLabel(e,r);return this.bins[a]||0};jc.prototype.getLabel=function(e,r){var a=r<0&&this.sepNegVal?"v":"^",i=this.overlapNoMerge?e:Math.round(e/this.binWidth);return a+i};var Mi=_t,jd=de.isArrayOrTypedArray,go=ir.BADNUM,OE=tt,Nl=Ot,BE=oi.getAxisGroup,Gc=NE;function jE(t,e){for(var r=e.xaxis,a=e.yaxis,i=t._fullLayout,n=t._fullData,o=t.calcdata,l=[],s=[],f=0;f<n.length;f++){var c=n[f];if(c.visible===!0&&OE.traceIs(c,"bar")&&c.xaxis===r._id&&c.yaxis===a._id&&(c.orientation==="h"?l.push(o[f]):s.push(o[f]),c._computePh))for(var v=t.calcdata[f],u=0;u<v.length;u++)typeof v[u].ph0=="function"&&(v[u].ph0=v[u].ph0()),typeof v[u].ph1=="function"&&(v[u].ph1=v[u].ph1())}var h={xCat:r.type==="category"||r.type==="multicategory",yCat:a.type==="category"||a.type==="multicategory",mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};Gd(t,r,a,s,h),Gd(t,a,r,l,h)}function Gd(t,e,r,a,i){if(a.length){var n,o,l,s,f;switch(GE(r,a),i.mode){case"overlay":ov(e,r,a,i);break;case"group":for(n=[],o=[],l=0;l<a.length;l++)s=a[l],f=s[0].trace,f.offset===void 0?o.push(s):n.push(s);o.length&&UE(t,e,r,o,i),n.length&&ov(e,r,n,i);break;case"stack":case"relative":for(n=[],o=[],l=0;l<a.length;l++)s=a[l],f=s[0].trace,f.base===void 0?o.push(s):n.push(s);o.length&&VE(t,e,r,o,i),n.length&&ov(e,r,n,i);break}qE(a,e)}}function GE(t,e){var r,a;for(r=0;r<e.length;r++){var i=e[r],n=i[0].trace,o=n.type==="funnel"?n._base:n.base,l,s=n.orientation==="h"?n.xcalendar:n.ycalendar,f=t.type==="category"||t.type==="multicategory"?function(){return null}:t.d2c;if(jd(o)){for(a=0;a<Math.min(o.length,i.length);a++)l=f(o[a],0,s),Mi(l)?(i[a].b=+l,i[a].hasB=1):i[a].b=0;for(;a<i.length;a++)i[a].b=0}else{l=f(o,0,s);var c=Mi(l);for(l=c?l:0,a=0;a<i.length;a++)i[a].b=l,c&&(i[a].hasB=1)}}}function ov(t,e,r,a){for(var i=0;i<r.length;i++){var n=r[i],o=new Gc([n],{posAxis:t,sepNegVal:!1,overlapNoMerge:!a.norm});t2(t,o,a),a.norm?(o2(o),Lp(e,o,a)):n2(e,o)}}function UE(t,e,r,a,i){var n=new Gc(a,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});WE(t,e,n,i),YE(n,e),i.norm?(o2(n),Lp(r,n,i)):n2(r,n)}function VE(t,e,r,a,i){var n=new Gc(a,{posAxis:e,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});t2(e,n,i),XE(r,n,i);for(var o=0;o<a.length;o++)for(var l=a[o],s=0;s<l.length;s++){var f=l[s];if(f.s!==go){var c=f.b+f.s===n.get(f.p,f.s);c&&(f._outmost=!0)}}i.norm&&Lp(r,n,i)}function t2(t,e,r){for(var a=e.minDiff,i=e.traces,n=a*(1-r.gap),o=n,l=o*(1-(r.groupgap||0)),s=-l/2,f=0;f<i.length;f++){var c=i[f],v=c[0].t;v.barwidth=l,v.poffset=s,v.bargroupwidth=n,v.bardelta=a}e.binWidth=i[0][0].t.barwidth/100,r2(e),a2(t,e),i2(t,e)}function WE(t,e,r,a){for(var i=t._fullLayout,n=r.positions,o=r.distinctPositions,l=r.minDiff,s=r.traces,f=s.length,c=n.length!==o.length,v=l*(1-a.gap),u=BE(i,e._id)+s[0][0].trace.orientation,h=i._alignmentOpts[u]||{},d=0;d<f;d++){var p=s[d],y=p[0].trace,m=h[y.alignmentgroup]||{},g=Object.keys(m.offsetGroups||{}).length,w;g?w=v/g:w=c?v/f:v;var b=w*(1-(a.groupgap||0)),x;g?x=((2*y._offsetIndex+1-g)*w-b)/2:x=c?((2*d+1-f)*w-b)/2:-b/2;var _=p[0].t;_.barwidth=b,_.poffset=x,_.bargroupwidth=v,_.bardelta=l}r.binWidth=s[0][0].t.barwidth/100,r2(r),a2(e,r),i2(e,r,c)}function r2(t){var e=t.traces,r,a;for(r=0;r<e.length;r++){var i=e[r],n=i[0],o=n.trace,l=n.t,s=o._offset||o.offset,f=l.poffset,c;if(jd(s)){for(c=Array.prototype.slice.call(s,0,i.length),a=0;a<c.length;a++)Mi(c[a])||(c[a]=f);for(a=c.length;a<i.length;a++)c.push(f);l.poffset=c}else s!==void 0&&(l.poffset=s);var v=o._width||o.width,u=l.barwidth;if(jd(v)){var h=Array.prototype.slice.call(v,0,i.length);for(a=0;a<h.length;a++)Mi(h[a])||(h[a]=u);for(a=h.length;a<i.length;a++)h.push(u);if(l.barwidth=h,s===void 0){for(c=[],a=0;a<i.length;a++)c.push(f+(u-h[a])/2);l.poffset=c}}else v!==void 0&&(l.barwidth=v,s===void 0&&(l.poffset=f+(u-v)/2))}}function a2(t,e){for(var r=e.traces,a=ns(t),i=0;i<r.length;i++)for(var n=r[i],o=n[0].t,l=o.poffset,s=Array.isArray(l),f=o.barwidth,c=Array.isArray(f),v=0;v<n.length;v++){var u=n[v],h=u.w=c?f[v]:f;u.p===void 0&&(u.p=u[a],u["orig_"+a]=u[a]);var d=(s?l[v]:l)+h/2;u[a]=u.p+d}}function i2(t,e,r){var a=e.traces,i=e.minDiff,n=i/2;Nl.minDtick(t,e.minDiff,e.distinctPositions[0],r);for(var o=0;o<a.length;o++){var l=a[o],s=l[0],f=s.trace,c=[],v,u,h,d;for(d=0;d<l.length;d++)v=l[d],u=v.p-n,h=v.p+n,c.push(u,h);if(f.width||f.offset){var p=s.t,y=p.poffset,m=p.barwidth,g=Array.isArray(y),w=Array.isArray(m);for(d=0;d<l.length;d++){v=l[d];var b=g?y[d]:y,x=w?m[d]:m;u=v.p+b,h=u+x,c.push(u,h)}}f._extremes[t._id]=Nl.findExtremes(t,c,{padded:!1})}}function n2(t,e){for(var r=e.traces,a=ns(t),i=0;i<r.length;i++){for(var n=r[i],o=n[0].trace,l=o.type==="scatter",s=o.orientation==="v",f=[],c=!1,v=0;v<n.length;v++){var u=n[v],h=l?0:u.b,d=l?s?u.y:u.x:h+u.s;u[a]=d,f.push(d),u.hasB&&f.push(h),(!u.hasB||!u.b)&&(c=!0)}o._extremes[t._id]=Nl.findExtremes(t,f,{tozero:c,padded:!0})}}function XE(t,e,r){var a=ns(t),i=e.traces,n,o,l,s,f,c;for(s=0;s<i.length;s++)if(n=i[s],o=n[0].trace,o.type==="funnel")for(f=0;f<n.length;f++)c=n[f],c.s!==go&&e.put(c.p,-.5*c.s);for(s=0;s<i.length;s++){n=i[s],o=n[0].trace,l=o.type==="funnel";var v=[];for(f=0;f<n.length;f++)if(c=n[f],c.s!==go){var u;l?u=c.s:u=c.s+c.b;var h=e.put(c.p,u),d=h+u;c.b=h,c[a]=d,r.norm||(v.push(d),c.hasB&&v.push(h))}r.norm||(o._extremes[t._id]=Nl.findExtremes(t,v,{tozero:!0,padded:!0}))}}function o2(t){for(var e=t.traces,r=0;r<e.length;r++)for(var a=e[r],i=0;i<a.length;i++){var n=a[i];n.s!==go&&t.put(n.p,n.b+n.s)}}function YE(t,e){for(var r=t.traces,a=0;a<r.length;a++){var i=r[a],n=i[0].trace;if(n.base===void 0)for(var o=new Gc([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<i.length;l++){var s=i[l];if(s.p!==go){var f=o.put(s.p,s.b+s.s);f&&(s.b=f)}}}}function Lp(t,e,r){var a=e.traces,i=ns(t),n=r.norm==="fraction"?1:100,o=n/1e9,l=t.l2c(t.c2l(0)),s=r.mode==="stack"?n:l;function f(x){return Mi(t.c2l(x))&&(x<l-o||x>s+o||!Mi(l))}for(var c=0;c<a.length;c++){for(var v=a[c],u=v[0].trace,h=[],d=!1,p=!1,y=0;y<v.length;y++){var m=v[y];if(m.s!==go){var g=Math.abs(n/e.get(m.p,m.s));m.b*=g,m.s*=g;var w=m.b,b=w+m.s;m[i]=b,h.push(b),p=p||f(b),m.hasB&&(h.push(w),p=p||f(w)),(!m.hasB||!m.b)&&(d=!0)}}u._extremes[t._id]=Nl.findExtremes(t,h,{tozero:d,padded:p})}}function qE(t,e){var r=ns(e),a={},i,n,o,l=1/0,s=-1/0;for(i=0;i<t.length;i++)for(o=t[i],n=0;n<o.length;n++){var f=o[n].p;Mi(f)&&(l=Math.min(l,f),s=Math.max(s,f))}var c=1e4/(s-l),v=a.round=function(g){return String(Math.round(c*(g-l)))};for(i=0;i<t.length;i++){o=t[i],o[0].t.extents=a;var u=o[0].t.poffset,h=Array.isArray(u);for(n=0;n<o.length;n++){var d=o[n],p=d[r]-d.w/2;if(Mi(p)){var y=d[r]+d.w/2,m=v(d.p);a[m]?a[m]=[Math.min(p,a[m][0]),Math.max(y,a[m][1])]:a[m]=[p,y]}d.p0=d.p+(h?u[n]:u),d.p1=d.p0+d.w,d.s0=d.b,d.s1=d.s0+d.s}}}function ns(t){return t._id.charAt(0)}var Cp={crossTraceCalc:jE,setGroupPositions:Gd},h0=Sp,p0=Cp.setGroupPositions;function ZE(t,e){for(var r=e.xaxis,a=e.yaxis,i=t._fullLayout,n=t._fullData,o=t.calcdata,l=[],s=[],f=0;f<n.length;f++){var c=n[f];c.visible===!0&&c.type==="scatter"&&c.xaxis===r._id&&c.yaxis===a._id&&(c.orientation==="h"?l.push(o[f]):c.orientation==="v"&&s.push(o[f]))}var v={mode:i.scattermode,gap:i.scattergap};p0(t,r,a,s,v),p0(t,a,r,l,v)}var KE=function(e,r){e._fullLayout.scattermode==="group"&&ZE(e,r);var a=r.xaxis,i=r.yaxis,n=a._id+i._id,o=e._fullLayout._scatterStackOpts[n];if(o){var l=e.calcdata,s,f,c,v,u,h,d,p,y,m,g,w,b,x,_;for(var T in o){m=o[T];var k=m.traceIndices;if(k.length){for(g=m.stackgaps==="interpolate",w=m.groupnorm,m.orientation==="v"?(b="x",x="y"):(b="y",x="x"),_=new Array(k.length),s=0;s<_.length;s++)_[s]=!1;h=l[k[0]];var S=new Array(h.length);for(s=0;s<h.length;s++)S[s]=h[s][b];for(s=1;s<k.length;s++){for(u=l[k[s]],f=c=0;f<u.length;f++){for(d=u[f][b];d>S[c]&&c<S.length;c++)lv(u,f,S[c],s,_,g,b),f++;if(d!==S[c]){for(v=0;v<s;v++)lv(l[k[v]],c,d,v,_,g,b);S.splice(c,0,d)}c++}for(;c<S.length;c++)lv(u,f,S[c],s,_,g,b),f++}var M=S.length;for(f=0;f<h.length;f++){for(p=h[f][x]=h[f].s,s=1;s<k.length;s++)u=l[k[s]],u[0].trace._rawLength=u[0].trace._length,u[0].trace._length=M,p+=u[f].s,u[f][x]=p;if(w)for(y=(w==="fraction"?p:p/100)||1,s=0;s<k.length;s++){var D=l[k[s]][f];D[x]/=y,D.sNorm=D.s/y}}for(s=0;s<k.length;s++){u=l[k[s]];var A=u[0].trace,C=h0.calcMarkerSize(A,A._rawLength),$=Array.isArray(C);if(C&&_[s]||$){var N=C;for(C=new Array(M),f=0;f<M;f++)C[f]=u[f].gap?0:$?N[u[f].i]:N}var E=new Array(M),P=new Array(M);for(f=0;f<M;f++)E[f]=u[f].x,P[f]=u[f].y;h0.calcAxisExpansion(e,A,a,i,E,P,C),u[0].t.orientation=m.orientation}}}}};function lv(t,e,r,a,i,n,o){i[a]=!0;var l={i:null,gap:!0,s:0};if(l[o]=r,t.splice(e,0,l),e&&r===t[e-1][o]){var s=t[e-1];l.s=s.s,l.i=s.i,l.gap=s.gap}else n&&(l.s=QE(t,e,r,o));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}function QE(t,e,r,a){var i=t[e-1],n=t[e+1];return n?i?i.s+(n.s-i.s)*(r-i[a])/(n[a]-i[a]):n.s:i.s}var JE=Et,l2=ir,el=l2.BADNUM,s2=l2.LOG_CLIP,m0=s2+.5,y0=s2-.5,Wf=de,eR=Wf.segmentsIntersect,g0=Wf.constrain,sv=Nc,tR=function(e,r){var a=r.trace||{},i=r.xaxis,n=r.yaxis,o=i.type==="log",l=n.type==="log",s=i._length,f=n._length,c=r.backoff,v=a.marker,u=r.connectGaps,h=r.baseTolerance,d=r.shape,p=d==="linear",y=a.fill&&a.fill!=="none",m=[],g=sv.minTolerance,w=e.length,b=new Array(w),x=0,_,T,k,S,M,D,A,C,$,N,E,P,R,L,z,I;function H(ke){var We=e[ke];if(!We)return!1;var qe=r.linearized?i.l2p(We.x):i.c2p(We.x),Ye=r.linearized?n.l2p(We.y):n.c2p(We.y);if(qe===el){if(o&&(qe=i.c2p(We.x,!0)),qe===el)return!1;l&&Ye===el&&(qe*=Math.abs(i._m*f*(i._m>0?m0:y0)/(n._m*s*(n._m>0?m0:y0)))),qe*=1e3}if(Ye===el){if(l&&(Ye=n.c2p(We.y,!0)),Ye===el)return!1;Ye*=1e3}return[qe,Ye]}function V(ke,We,qe,Ye){var Qe=qe-ke,F=Ye-We,B=.5-ke,j=.5-We,W=Qe*Qe+F*F,J=Qe*B+F*j;if(J>0&&J<W){var Q=B*F-j*Qe;if(Q*Q<W)return!0}}var O,X;function G(ke,We){var qe=ke[0]/s,Ye=ke[1]/f,Qe=Math.max(0,-qe,qe-1,-Ye,Ye-1);return Qe&&O!==void 0&&V(qe,Ye,O,X)&&(Qe=0),Qe&&We&&V(qe,Ye,We[0]/s,We[1]/f)&&(Qe=0),(1+sv.toleranceGrowth*Qe)*h}function Y(ke,We){var qe=ke[0]-We[0],Ye=ke[1]-We[1];return Math.sqrt(qe*qe+Ye*Ye)}var K=sv.maxScreensAway,Z=-s*K,q=s*(1+K),ie=-f*K,fe=f*(1+K),be=[[Z,ie,q,ie],[q,ie,q,fe],[q,fe,Z,fe],[Z,fe,Z,ie]],ne,U,ae,ce,se,pe;function ge(ke,We){for(var qe=[],Ye=0,Qe=0;Qe<4;Qe++){var F=be[Qe],B=eR(ke[0],ke[1],We[0],We[1],F[0],F[1],F[2],F[3]);B&&(!Ye||Math.abs(B.x-qe[0][0])>1||Math.abs(B.y-qe[0][1])>1)&&(B=[B.x,B.y],Ye&&Y(B,ke)<Y(qe[0],ke)?qe.unshift(B):qe.push(B),Ye++)}return qe}function _e(ke){if(ke[0]<Z||ke[0]>q||ke[1]<ie||ke[1]>fe)return[g0(ke[0],Z,q),g0(ke[1],ie,fe)]}function le(ke,We){if(ke[0]===We[0]&&(ke[0]===Z||ke[0]===q)||ke[1]===We[1]&&(ke[1]===ie||ke[1]===fe))return!0}function De(ke,We){var qe=[],Ye=_e(ke),Qe=_e(We);return Ye&&Qe&&le(Ye,Qe)||(Ye&&qe.push(Ye),Qe&&qe.push(Qe)),qe}function Ae(ke,We,qe){return function(Ye,Qe){var F=_e(Ye),B=_e(Qe),j=[];if(F&&B&&le(F,B))return j;F&&j.push(F),B&&j.push(B);var W=2*Wf.constrain((Ye[ke]+Qe[ke])/2,We,qe)-((F||Ye)[ke]+(B||Qe)[ke]);if(W){var J;F&&B?J=W>0==F[ke]>B[ke]?F:B:J=F||B,J[ke]+=W}return j}}var ze;d==="linear"||d==="spline"?ze=ge:d==="hv"||d==="vh"?ze=De:d==="hvh"?ze=Ae(0,Z,q):d==="vhv"&&(ze=Ae(1,ie,fe));function Ve(ke,We){var qe=We[0]-ke[0],Ye=(We[1]-ke[1])/qe,Qe=(ke[1]*We[0]-We[1]*ke[0])/qe;return Qe>0?[Ye>0?Z:q,fe]:[Ye>0?q:Z,ie]}function oe(ke){var We=ke[0],qe=ke[1],Ye=We===b[x-1][0],Qe=qe===b[x-1][1];if(!(Ye&&Qe))if(x>1){var F=We===b[x-2][0],B=qe===b[x-2][1];Ye&&(We===Z||We===q)&&F?B?x--:b[x-1]=ke:Qe&&(qe===ie||qe===fe)&&B?F?x--:b[x-1]=ke:b[x++]=ke}else b[x++]=ke}function Ce(ke){b[x-1][0]!==ke[0]&&b[x-1][1]!==ke[1]&&oe([ae,ce]),oe(ke),se=null,ae=ce=0}var re=Wf.isArrayOrTypedArray(v);function me(ke){if(ke&&c&&(ke.i=_,ke.d=e,ke.trace=a,ke.marker=re?v[ke.i]:v,ke.backoff=c),O=ke[0]/s,X=ke[1]/f,ne=ke[0]<Z?Z:ke[0]>q?q:0,U=ke[1]<ie?ie:ke[1]>fe?fe:0,ne||U){if(!x)b[x++]=[ne||ke[0],U||ke[1]];else if(se){var We=ze(se,ke);We.length>1&&(Ce(We[0]),b[x++]=We[1])}else pe=ze(b[x-1],ke)[0],b[x++]=pe;var qe=b[x-1];ne&&U&&(qe[0]!==ne||qe[1]!==U)?(se&&(ae!==ne&&ce!==U?oe(ae&&ce?Ve(se,ke):[ae||ne,ce||U]):ae&&ce&&oe([ae,ce])),oe([ne,U])):ae-ne&&ce-U&&oe([ne||ae,U||ce]),se=ke,ae=ne,ce=U}else se&&Ce(ze(se,ke)[0]),b[x++]=ke}for(_=0;_<w;_++)if(T=H(_),!!T){for(x=0,se=null,me(T),_++;_<w;_++){if(S=H(_),!S){if(u)continue;break}if(!p||!r.simplify){me(S);continue}var ve=H(_+1);if(N=Y(S,T),!(!(y&&(x===0||x===w-1))&&N<G(S,ve)*g)){for(C=[(S[0]-T[0])/N,(S[1]-T[1])/N],M=T,E=N,P=L=z=0,A=!1,k=S,_++;_<e.length;_++){if(D=ve,ve=H(_+1),!D){if(u)continue;break}if($=[D[0]-T[0],D[1]-T[1]],I=$[0]*C[1]-$[1]*C[0],L=Math.min(L,I),z=Math.max(z,I),z-L>G(D,ve))break;k=D,R=$[0]*C[0]+$[1]*C[1],R>E?(E=R,S=D,A=!1):R<P&&(P=R,M=D,A=!0)}if(A?(me(S),k!==M&&me(M)):(M!==T&&me(M),k!==S&&me(S)),me(k),_>=e.length||!D)break;me(D),T=D}}se&&oe([ae||se[0],ce||se[1]]),m.push(b.slice(0,x))}var Me=d.slice(d.length-1);if(c&&Me!=="h"&&Me!=="v"){for(var Se=!1,$e=-1,ye=[],Ne=0;Ne<m.length;Ne++)for(var Pe=0;Pe<m[Ne].length-1;Pe++){var je=m[Ne][Pe],Ie=m[Ne][Pe+1],Ue=JE.applyBackoff(Ie,je);(Ue[0]!==Ie[0]||Ue[1]!==Ie[1])&&(Se=!0),ye[$e+1]||($e++,ye[$e]=[je,[Ue[0],Ue[1]]])}return Se?ye:m}return m},b0={tonextx:1,tonexty:1,tonext:1},f2=function(e,r,a){var i,n,o,l,s,f={},c=!1,v=-1,u=0,h=-1;for(n=0;n<a.length;n++)i=a[n][0].trace,o=i.stackgroup||"",o?o in f?s=f[o]:(s=f[o]=u,u++):i.fill in b0&&h>=0?s=h:(s=h=u,u++),s<v&&(c=!0),i._groupIndex=v=s;var d=a.slice();c&&d.sort(function(y,m){var g=y[0].trace,w=m[0].trace;return g._groupIndex-w._groupIndex||g.index-w.index});var p={};for(n=0;n<d.length;n++)i=d[n][0].trace,o=i.stackgroup||"",i.visible===!0?(i._nexttrace=null,i.fill in b0&&(l=p[o],i._prevtrace=l||null,l&&(l._nexttrace=i)),i._ownfill=i.fill&&(i.fill.substr(0,6)==="tozero"||i.fill==="toself"||i.fill.substr(0,2)==="to"&&!i._prevtrace),p[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return d},Ta=yt,rR=tt,Hl=de,io=Hl.ensureSingle,c2=Hl.identity,Qt=Et,no=Pr,aR=tR,iR=f2,nR=vT.tester,oR=function(e,r,a,i,n,o){var l,s,f=!n,c=!!n&&n.duration>0,v=iR(e,r,a);if(l=i.selectAll("g.trace").data(v,function(h){return h[0].trace.uid}),l.enter().append("g").attr("class",function(h){return"trace scatter trace"+h[0].trace.uid}).style("stroke-miterlimit",2),l.order(),lR(e,l,r),c){o&&(s=o());var u=Ta.transition().duration(n.duration).ease(n.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});u.each(function(){i.selectAll("g.trace").each(function(h,d){x0(e,d,r,h,v,this,n)})})}else l.each(function(h,d){x0(e,d,r,h,v,this,n)});f&&l.exit().remove(),i.selectAll("path:not([d])").remove()};function lR(t,e,r){e.each(function(a){var i=io(Ta.select(this),"g","fills");Qt.setClipUrl(i,r.layerClipId,t);var n=a[0].trace,o=[];n._ownfill&&o.push("_ownFill"),n._nexttrace&&o.push("_nextFill");var l=i.selectAll("g").data(o,c2);l.enter().append("g"),l.exit().each(function(s){n[s]=null}).remove(),l.order().each(function(s){n[s]=io(Ta.select(this),"path","js-fill")})})}function x0(t,e,r,a,i,n,o){var l=t._context.staticPlot,s;sR(t,e,r,a,i);var f=!!o&&o.duration>0;function c(ne){return f?ne.transition():ne}var v=r.xaxis,u=r.yaxis,h=a[0].trace,d=h.line,p=Ta.select(n),y=io(p,"g","errorbars"),m=io(p,"g","lines"),g=io(p,"g","points"),w=io(p,"g","text");if(rR.getComponentMethod("errorbars","plot")(t,y,r,o),h.visible!==!0)return;c(p).style("opacity",h.opacity);var b,x,_=h.fill.charAt(h.fill.length-1);_!=="x"&&_!=="y"&&(_=""),a[0][r.isRangePlot?"nodeRangePlot3":"node3"]=p;var T="",k=[],S=h._prevtrace;S&&(T=S._prevRevpath||"",x=S._nextFill,k=S._polygons);var M,D,A="",C="",$,N,E,P,R,L,z,I=[],H=Hl.noop;if(b=h._ownFill,no.hasLines(h)||h.fill!=="none"){for(x&&x.datum(a),["hv","vh","hvh","vhv"].indexOf(d.shape)!==-1?($=Qt.steps(d.shape),N=Qt.steps(d.shape.split("").reverse().join(""))):d.shape==="spline"?$=N=function(ne){var U=ne[ne.length-1];return ne.length>1&&ne[0][0]===U[0]&&ne[0][1]===U[1]?Qt.smoothclosed(ne.slice(1),d.smoothing):Qt.smoothopen(ne,d.smoothing)}:$=N=function(ne){return"M"+ne.join("L")},E=function(ne){return N(ne.reverse())},I=aR(a,{xaxis:v,yaxis:u,trace:h,connectGaps:h.connectgaps,baseTolerance:Math.max(d.width||1,3)/4,shape:d.shape,backoff:d.backoff,simplify:d.simplify,fill:h.fill}),z=h._polygons=new Array(I.length),s=0;s<I.length;s++)h._polygons[s]=nR(I[s]);I.length&&(P=I[0][0],R=I[I.length-1],L=R[R.length-1]),H=function(ne){return function(U){if(M=$(U),D=E(U),A?_?(A+="L"+M.substr(1),C=D+("L"+C.substr(1))):(A+="Z"+M,C=D+"Z"+C):(A=M,C=D),no.hasLines(h)){var ae=Ta.select(this);if(ae.datum(a),ne)c(ae.style("opacity",0).attr("d",M).call(Qt.lineGroupStyle)).style("opacity",1);else{var ce=c(ae);ce.attr("d",M),Qt.singleLineStyle(a,ce)}}}}}var V=m.selectAll(".js-line").data(I);c(V.exit()).style("opacity",0).remove(),V.each(H(!1)),V.enter().append("path").classed("js-line",!0).style("vector-effect",l?"none":"non-scaling-stroke").call(Qt.lineGroupStyle).each(H(!0)),Qt.setClipUrl(V,r.layerClipId,t);function O(ne){c(ne).attr("d","M0,0Z")}I.length?(b?(b.datum(a),P&&L&&(_?(_==="y"?P[1]=L[1]=u.c2p(0,!0):_==="x"&&(P[0]=L[0]=v.c2p(0,!0)),c(b).attr("d","M"+L+"L"+P+"L"+A.substr(1)).call(Qt.singleFillStyle,t)):c(b).attr("d",A+"Z").call(Qt.singleFillStyle,t))):x&&(h.fill.substr(0,6)==="tonext"&&A&&T?(h.fill==="tonext"?c(x).attr("d",A+"Z"+T+"Z").call(Qt.singleFillStyle,t):c(x).attr("d",A+"L"+T.substr(1)+"Z").call(Qt.singleFillStyle,t),h._polygons=h._polygons.concat(k)):(O(x),h._polygons=null)),h._prevRevpath=C,h._prevPolygons=z):(b?O(b):x&&O(x),h._polygons=h._prevRevpath=h._prevPolygons=null);function X(ne){return ne.filter(function(U){return!U.gap&&U.vis})}function G(ne){return ne.filter(function(U){return U.vis})}function Y(ne){return ne.filter(function(U){return!U.gap})}function K(ne){return ne.id}function Z(ne){if(ne.ids)return K}function q(){return!1}function ie(ne,U,ae){var ce,se,pe,ge=ae[0].trace,_e=no.hasMarkers(ge),le=no.hasText(ge),De=Z(ge),Ae=q,ze=q;if(_e||le){var Ve=c2,oe=ge.stackgroup,Ce=oe&&t._fullLayout._scatterStackOpts[v._id+u._id][oe].stackgaps==="infer zero";ge.marker.maxdisplayed||ge._needsCull?Ve=Ce?G:X:oe&&!Ce&&(Ve=Y),_e&&(Ae=Ve),le&&(ze=Ve)}se=ne.selectAll("path.point"),ce=se.data(Ae,De);var re=ce.enter().append("path").classed("point",!0);f&&re.call(Qt.pointStyle,ge,t).call(Qt.translatePoints,v,u).style("opacity",0).transition().style("opacity",1),ce.order();var me;_e&&(me=Qt.makePointStyleFns(ge)),ce.each(function(ve){var Me=Ta.select(this),Se=c(Me);pe=Qt.translatePoint(ve,Se,v,u),pe?(Qt.singlePointStyle(ve,Se,ge,me,t),r.layerClipId&&Qt.hideOutsideRangePoint(ve,Se,v,u,ge.xcalendar,ge.ycalendar),ge.customdata&&Me.classed("plotly-customdata",ve.data!==null&&ve.data!==void 0)):Se.remove()}),f?ce.exit().transition().style("opacity",0).remove():ce.exit().remove(),se=U.selectAll("g"),ce=se.data(ze,De),ce.enter().append("g").classed("textpoint",!0).append("text"),ce.order(),ce.each(function(ve){var Me=Ta.select(this),Se=c(Me.select("text"));pe=Qt.translatePoint(ve,Se,v,u),pe?r.layerClipId&&Qt.hideOutsideRangePoint(ve,Me,v,u,ge.xcalendar,ge.ycalendar):Me.remove()}),ce.selectAll("text").call(Qt.textPointStyle,ge,t).each(function(ve){var Me=v.c2p(ve.x),Se=u.c2p(ve.y);Ta.select(this).selectAll("tspan.line").each(function(){c(Ta.select(this)).attr({x:Me,y:Se})})}),ce.exit().remove()}g.datum(a),w.datum(a),ie(g,w,a);var fe=h.cliponaxis===!1,be=fe?null:r.layerClipId;Qt.setClipUrl(g,be,t),Qt.setClipUrl(w,be,t)}function sR(t,e,r,a,i){var n=r.xaxis,o=r.yaxis,l=Ta.extent(Hl.simpleMap(n.range,n.r2c)),s=Ta.extent(Hl.simpleMap(o.range,o.r2c)),f=a[0].trace;if(no.hasMarkers(f)){var c=f.marker.maxdisplayed;if(c!==0){var v=a.filter(function(p){return p.x>=l[0]&&p.x<=l[1]&&p.y>=s[0]&&p.y<=s[1]}),u=Math.ceil(v.length/c),h=0;i.forEach(function(p,y){var m=p[0].trace;no.hasMarkers(m)&&m.marker.maxdisplayed>0&&y<e&&h++});var d=Math.round(h*u/3+Math.floor(h/3)*u/7.1);a.forEach(function(p){delete p.vis}),v.forEach(function(p,y){Math.round((y+d)%u)===0&&(p.vis=!0)})}}}var os={container:"marker",min:"cmin",max:"cmax"},Vs=Ot,u2=function(e,r,a){var i={},n={_fullLayout:a},o=Vs.getFromTrace(n,r,"x"),l=Vs.getFromTrace(n,r,"y"),s=e.orig_x;s===void 0&&(s=e.x);var f=e.orig_y;return f===void 0&&(f=e.y),i.xLabel=Vs.tickText(o,o.c2l(s),!0).text,i.yLabel=Vs.tickText(l,l.c2l(f),!0).text,i},fv=yt,bo=Et,fR=tt;function cR(t){var e=fv.select(t).selectAll("g.trace.scatter");e.style("opacity",function(r){return r[0].trace.opacity}),e.selectAll("g.points").each(function(r){var a=fv.select(this),i=r.trace||r[0].trace;Dp(a,i,t)}),e.selectAll("g.text").each(function(r){var a=fv.select(this),i=r.trace||r[0].trace;$p(a,i,t)}),e.selectAll("g.trace path.js-line").call(bo.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(bo.fillGroupStyle,t),fR.getComponentMethod("errorbars","style")(e)}function Dp(t,e,r){bo.pointStyle(t.selectAll("path.point"),e,r)}function $p(t,e,r){bo.textPointStyle(t.selectAll("text"),e,r)}function uR(t,e,r){var a=e[0].trace;a.selectedpoints?(bo.selectedPointStyle(r.selectAll("path.point"),a),bo.selectedTextStyle(r.selectAll("text"),a)):(Dp(r,a,t),$p(r,a,t))}var _0={style:cR,stylePoints:Dp,styleText:$p,styleOnSelect:uR},Rn=ut,vR=Pr,v2=function(e,r){var a,i;if(e.mode==="lines")return a=e.line.color,a&&Rn.opacity(a)?a:e.fillcolor;if(e.mode==="none")return e.fill?e.fillcolor:"";var n=r.mcc||(e.marker||{}).color,o=r.mlcc||((e.marker||{}).line||{}).color;return i=n&&Rn.opacity(n)?n:o&&Rn.opacity(o)&&(r.mlw||((e.marker||{}).line||{}).width)?o:"",i?Rn.opacity(i)<.3?Rn.addOpacity(i,.3):i:(a=(e.line||{}).color,a&&Rn.opacity(a)&&vR.hasLines(e)&&e.line.width?a:e.fillcolor)},Ud=de,w0=Ca,dR=tt,hR=v2,cv=ut,pR=Ud.fillText,mR=function(e,r,a,i){var n=e.cd,o=n[0].trace,l=e.xa,s=e.ya,f=l.c2p(r),c=s.c2p(a),v=[f,c],u=o.hoveron||"",h=o.mode.indexOf("markers")!==-1?3:.5,d=!!o.xperiodalignment,p=!!o.yperiodalignment;if(u.indexOf("points")!==-1){var y=function(q){if(d){var ie=l.c2p(q.xStart),fe=l.c2p(q.xEnd);return f>=Math.min(ie,fe)&&f<=Math.max(ie,fe)?0:1/0}var be=Math.max(3,q.mrc||0),ne=1-1/be,U=Math.abs(l.c2p(q.x)-f);return U<be?ne*U/be:U-be+ne},m=function(q){if(p){var ie=s.c2p(q.yStart),fe=s.c2p(q.yEnd);return c>=Math.min(ie,fe)&&c<=Math.max(ie,fe)?0:1/0}var be=Math.max(3,q.mrc||0),ne=1-1/be,U=Math.abs(s.c2p(q.y)-c);return U<be?ne*U/be:U-be+ne},g=function(q){var ie=Math.max(h,q.mrc||0),fe=l.c2p(q.x)-f,be=s.c2p(q.y)-c;return Math.max(Math.sqrt(fe*fe+be*be)-ie,1-h/ie)},w=w0.getDistanceFunction(i,y,m,g);if(w0.getClosest(n,w,e),e.index!==!1){var b=n[e.index],x=l.c2p(b.x,!0),_=s.c2p(b.y,!0),T=b.mrc||1;e.index=b.i;var k=n[0].t.orientation,S=k&&(b.sNorm||b.s),M=k==="h"?S:b.orig_x!==void 0?b.orig_x:b.x,D=k==="v"?S:b.orig_y!==void 0?b.orig_y:b.y;return Ud.extendFlat(e,{color:hR(o,b),x0:x-T,x1:x+T,xLabelVal:M,y0:_-T,y1:_+T,yLabelVal:D,spikeDistance:g(b),hovertemplate:o.hovertemplate}),pR(b,o,e),dR.getComponentMethod("errorbars","hoverInfo")(b,o,e),[e]}}if(u.indexOf("fills")!==-1&&o._polygons){var A=o._polygons,C=[],$=!1,N=1/0,E=-1/0,P=1/0,R=-1/0,L,z,I,H,V,O,X,G,Y;for(L=0;L<A.length;L++)I=A[L],I.contains(v)&&($=!$,C.push(I),P=Math.min(P,I.ymin),R=Math.max(R,I.ymax));if($){P=Math.max(P,0),R=Math.min(R,s._length);var K=(P+R)/2;for(L=0;L<C.length;L++)for(H=C[L].pts,z=1;z<H.length;z++)G=H[z-1][1],Y=H[z][1],G>K!=Y>=K&&(O=H[z-1][0],X=H[z][0],Y-G&&(V=O+(X-O)*(K-G)/(Y-G),N=Math.min(N,V),E=Math.max(E,V)));N=Math.max(N,0),E=Math.min(E,l._length);var Z=cv.defaultLine;return cv.opacity(o.fillcolor)?Z=o.fillcolor:cv.opacity((o.line||{}).color)&&(Z=o.line.color),Ud.extendFlat(e,{distance:e.maxHoverDistance,x0:N,x1:E,y0:K,y1:K,color:Z,hovertemplate:!1}),delete e.index,o.text&&!Array.isArray(o.text)?e.text=String(o.text):e.text=o.name,[e]}}},T0=Pr,yR=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s,f,c,v,u=!T0.hasMarkers(l)&&!T0.hasText(l);if(u)return[];if(r===!1)for(s=0;s<a.length;s++)a[s].selected=0;else for(s=0;s<a.length;s++)f=a[s],c=i.c2p(f.x),v=n.c2p(f.y),f.i!==null&&r.contains([c,v],!1,s,e)?(o.push({pointNumber:f.i,x:i.c2d(f.x),y:n.c2d(f.y)}),f.selected=1):f.selected=0;return o},fr={},uv,k0;function gR(){return k0||(k0=1,uv={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}),uv}var vv,A0;function bR(){if(A0)return vv;A0=1;var t=tt.traceIs,e=Q_;vv=function(l,s,f,c){f("autotypenumbers",c.autotypenumbersDflt);var v=f("type",(c.splomStash||{}).type);v==="-"&&(r(s,c.data),s.type==="-"?s.type="linear":l.type=s.type)};function r(o,l){if(o.type==="-"){var s=o._id,f=s.charAt(0),c;s.indexOf("scene")!==-1&&(s=f);var v=a(l,s,f);if(v){if(v.type==="histogram"&&f==={v:"y",h:"x"}[v.orientation||"v"]){o.type="linear";return}var u=f+"calendar",h=v[u],d={noMultiCategory:!t(v,"cartesian")||t(v,"noMultiCategory")};if(v.type==="box"&&v._hasPreCompStats&&f==={h:"x",v:"y"}[v.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=o.autotypenumbers,n(v,f)){var p=i(v),y=[];for(c=0;c<l.length;c++){var m=l[c];!t(m,"box-violin")||(m[f+"axis"]||f)!==s||(m[p]!==void 0?y.push(m[p][0]):m.name!==void 0?y.push(m.name):y.push("text"),m[u]!==h&&(h=void 0))}o.type=e(y,h,d)}else if(v.type==="splom"){var g=v.dimensions,w=g[v._axesDim[s]];w.visible&&(o.type=e(w.values,h,d))}else o.type=e(v[f]||[v[f+"0"]],h,d)}}}function a(o,l,s){for(var f=0;f<o.length;f++){var c=o[f];if(c.type==="splom"&&c._length>0&&(c["_"+s+"axes"]||{})[l])return c;if((c[s+"axis"]||s)===l){if(n(c,s))return c;if((c[s]||[]).length||c[s+"0"])return c}}}function i(o){return{v:"x",h:"y"}[o.orientation||"v"]}function n(o,l){var s=i(o),f=t(o,"box-violin"),c=t(o._fullInput||{},"candlestick");return f&&!c&&l===s&&o[s]===void 0&&o[s+"0"]===void 0}return vv}function xR(t,e){var r=e.dataAttr||t._id.charAt(0),a={},i,n,o;if(e.axData)i=e.axData;else for(i=[],n=0;n<e.data.length;n++){var l=e.data[n];l[r+"axis"]===t._id&&i.push(l)}for(n=0;n<i.length;n++){var s=i[n][r];for(o=0;o<s.length;o++){var f=s[o];f!=null&&(a[f]=1)}}return Object.keys(a)}var _R=function(e,r,a,i){if(r.type==="category"){var n=e.categoryarray,o=Array.isArray(n)&&n.length>0,l;o&&(l="array");var s=a("categoryorder",l),f;s==="array"&&(f=a("categoryarray")),!o&&s==="array"&&(s=r.categoryorder="trace"),s==="trace"?r._initialCategories=[]:s==="array"?r._initialCategories=f.slice():(f=xR(r,i).sort(),s==="category ascending"?r._initialCategories=f:s==="category descending"&&(r._initialCategories=f.reverse()))}},M0=da.mix,wR=$r,TR=de,kR=function(e,r,a,i){i=i||{};var n=i.dfltColor;function o(T,k){return TR.coerce2(e,r,i.attributes,T,k)}var l=o("linecolor",n),s=o("linewidth"),f=a("showline",i.showLine||!!l||!!s);f||(delete r.linecolor,delete r.linewidth);var c=M0(n,i.bgColor,i.blend||wR.lightFraction).toRgbString(),v=o("gridcolor",c),u=o("gridwidth"),h=o("griddash"),d=a("showgrid",i.showGrid||!!v||!!u||!!h);if(d||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var p=M0(r.gridcolor,i.bgColor,67).toRgbString(),y=o("minor.gridcolor",p),m=o("minor.gridwidth",r.gridwidth||1),g=o("minor.griddash",r.griddash||"solid"),w=a("minor.showgrid",!!y||!!m||!!g);w||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var b=o("zerolinecolor",n),x=o("zerolinewidth"),_=a("zeroline",i.showGrid||!!b||!!x);_||(delete r.zerolinecolor,delete r.zerolinewidth)}},S0=_t,AR=tt,dl=de,MR=It,SR=Ua,Vd=ii,L0=P_,C0=E_,LR=F_,CR=N_,DR=_R,$R=kR,D0=Oh,xf=Hr.WEEKDAY_PATTERN,PR=Hr.HOUR_PATTERN,d2=function(e,r,a,i,n){var o=i.letter,l=i.font||{},s=i.splomStash||{},f=a("visible",!i.visibleDflt),c=r._template||{},v=r.type||c.type||"-",u;if(v==="date"){var h=AR.getComponentMethod("calendars","handleDefaults");h(e,r,"calendar",i.calendar),i.noTicklabelmode||(u=a("ticklabelmode"))}var d="";(!i.noTicklabelposition||v==="multicategory")&&(d=dl.coerce(e,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),i.noTicklabeloverflow||a("ticklabeloverflow",d.indexOf("inside")!==-1?"hide past domain":v==="category"||v==="multicategory"?"allow":"hide past div"),D0(r,n);var p=!r.isValidRange(e.range);p&&i.reverseDflt&&(p="reversed");var y=a("autorange",p);y&&(v==="linear"||v==="-")&&a("rangemode"),a("range"),r.cleanRange(),DR(e,r,a,i),v!=="category"&&!i.noHover&&a("hoverformat");var m=a("color"),g=m!==Vd.color.dflt?m:l.color,w=s.label||n._dfltTitle[o];if(CR(e,r,a,v,i),!f)return r;a("title.text",w),dl.coerceFont(a,"title.font",{family:l.family,size:dl.bigFont(l.size),color:g}),L0(e,r,a,v);var b=i.hasMinor;if(b&&(MR.newContainer(r,"minor"),L0(e,r,a,v,{isMinor:!0})),LR(e,r,a,v,i),C0(e,r,a,i),b){var x=i.isMinor;i.isMinor=!0,C0(e,r,a,i),i.isMinor=x}$R(e,r,a,{dfltColor:m,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:b,attributes:Vd}),b&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&a("mirror");var _=v==="multicategory";if(!i.noTickson&&(v==="category"||_)&&(r.ticks||r.showgrid)){var T;_&&(T="boundaries");var k=a("tickson",T);k==="boundaries"&&delete r.ticklabelposition}if(_){var S=a("showdividers");S&&(a("dividercolor"),a("dividerwidth"))}if(v==="date")if(SR(e,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:ER}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var M=0;M<r.rangebreaks.length;M++)if(r.rangebreaks[M].pattern===xf){r._hasDayOfWeekBreaks=!0;break}if(D0(r,n),n._has("scattergl")||n._has("splom"))for(var D=0;D<i.data.length;D++){var A=i.data[D];(A.type==="scattergl"||A.type==="splom")&&(A.visible=!1,dl.warn(A.type+" traces do not work on axes with rangebreaks. Setting trace "+A.index+" to `visible: false`."))}}return r};function ER(t,e,r){function a(u,h){return dl.coerce(t,e,Vd.rangebreaks,u,h)}var i=a("enabled");if(i){var n=a("bounds");if(n&&n.length>=2){var o="",l,s;if(n.length===2){for(l=0;l<2;l++)if(s=$0(n[l]),s){o=xf;break}}var f=a("pattern",o);if(f===xf)for(l=0;l<2;l++)s=$0(n[l]),s&&(e.bounds[l]=n[l]=s-1);if(f)for(l=0;l<2;l++)switch(s=n[l],f){case xf:if(!S0(s)){e.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){e.enabled=!1;return}e.bounds[l]=n[l]=s;break;case PR:if(!S0(s)){e.enabled=!1;return}if(s=+s,s<0||s>24){e.enabled=!1;return}e.bounds[l]=n[l]=s;break}if(r.autorange===!1){var c=r.range;if(c[0]<c[1]){if(n[0]<c[0]&&n[1]>c[1]){e.enabled=!1;return}}else if(n[0]>c[0]&&n[1]<c[1]){e.enabled=!1;return}}}else{var v=a("values");if(v&&v.length)a("dvalue");else{e.enabled=!1;return}}}}var RR={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function $0(t){if(typeof t=="string")return RR[t.substr(0,3).toLowerCase()]}var zR=_t,Ws=de,h2=function(e,r,a,i){var n=i.counterAxes||[],o=i.overlayableAxes||[],l=i.letter,s=i.grid,f=i.overlayingDomain,c,v,u,h,d,p;s&&(v=s._domains[l][s._axisMap[r._id]],c=s._anchors[r._id],v&&(u=s[l+"side"].split(" ")[0],h=s.domain[l][u==="right"||u==="top"?1:0])),v=v||[0,1],c=c||(zR(e.position)?"free":n[0]||"free"),u=u||(l==="x"?"bottom":"left"),h=h||0,d=0,p=!1;var y=Ws.coerce(e,r,{anchor:{valType:"enumerated",values:["free"].concat(n),dflt:c}},"anchor"),m=Ws.coerce(e,r,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:u}},"side");if(y==="free"){if(l==="y"){var g=a("autoshift");g&&(h=m==="left"?f[0]:f[1],p=r.automargin?r.automargin:!0,d=m==="left"?-3:3),a("shift",d)}a("position",h)}a("automargin",p);var w=!1;if(o.length&&(w=Ws.coerce(e,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!w){var b=a("domain",v);b[0]>b[1]-1/4096&&(r.domain=v),Ws.noneOrAll(e.domain,r.domain,v),r.tickmode==="sync"&&(r.tickmode="auto")}return a("layer"),r},dv,P0;function IR(){if(P0)return dv;P0=1;var t=de,e=ut,r=ha.isUnifiedHover,a=Lw,i=It,n=Kl,o=ii,l=bR(),s=d2,f=oi,c=h2,v=nr,u=v.id2name,h=v.name2id,d=Hr.AX_ID_PATTERN,p=tt,y=p.traceIs,m=p.getComponentMethod;function g(w,b,x){Array.isArray(w[b])?w[b].push(x):w[b]=[x]}return dv=function(b,x,_){var T=x.autotypenumbers,k={},S={},M={},D={},A={},C={},$={},N={},E={},P={},R,L;for(R=0;R<_.length;R++){var z=_[R];if(!(!y(z,"cartesian")&&!y(z,"gl2d"))){var I;if(z.xaxis)I=u(z.xaxis),g(k,I,z);else if(z.xaxes)for(L=0;L<z.xaxes.length;L++)g(k,u(z.xaxes[L]),z);var H;if(z.yaxis)H=u(z.yaxis),g(k,H,z);else if(z.yaxes)for(L=0;L<z.yaxes.length;L++)g(k,u(z.yaxes[L]),z);if(z.type==="funnel"?z.orientation==="h"?(I&&(S[I]=!0),H&&($[H]=!0)):H&&(M[H]=!0):z.type==="image"?(H&&(N[H]=!0),I&&(N[I]=!0)):(H&&(A[H]=!0,C[H]=!0),(!y(z,"carpet")||z.type==="carpet"&&!z._cheater)&&I&&(D[I]=!0)),z.type==="carpet"&&z._cheater&&I&&(S[I]=!0),y(z,"2dMap")&&(E[I]=!0,E[H]=!0),y(z,"oriented")){var V=z.orientation==="h"?H:I;P[V]=!0}}}var O=x._subplots,X=O.xaxis,G=O.yaxis,Y=t.simpleMap(X,u),K=t.simpleMap(G,u),Z=Y.concat(K),q=e.background;X.length&&G.length&&(q=t.coerce(b,x,n,"plot_bgcolor"));var ie=e.combine(q,x.paper_bgcolor),fe,be,ne,U,ae;function ce(){var B=k[fe]||[];ae._traceIndices=B.map(function(j){return j._expandedIndex}),ae._annIndices=[],ae._shapeIndices=[],ae._selectionIndices=[],ae._imgIndices=[],ae._subplotsWith=[],ae._counterAxes=[],ae._name=ae._attr=fe,ae._id=be}function se(B,j){return t.coerce(U,ae,o,B,j)}function pe(B,j){return t.coerce2(U,ae,o,B,j)}function ge(B){return B==="x"?G:X}function _e(B,j){for(var W=B==="x"?Y:K,J=[],Q=0;Q<W.length;Q++){var he=W[Q];he!==j&&!(b[he]||{}).overlaying&&J.push(h(he))}return J}var le={x:ge("x"),y:ge("y")},De=le.x.concat(le.y),Ae={},ze=[];function Ve(){var B=U.matches;d.test(B)&&De.indexOf(B)===-1&&(Ae[B]=U.type,ze=Object.keys(Ae))}var oe=a(b,x),Ce=r(oe);for(R=0;R<Z.length;R++){fe=Z[R],be=h(fe),ne=fe.charAt(0),t.isPlainObject(b[fe])||(b[fe]={}),U=b[fe],ae=i.newContainer(x,fe,ne+"axis"),ce();var re=ne==="x"&&!D[fe]&&S[fe]||ne==="y"&&!A[fe]&&M[fe],me=ne==="y"&&(!C[fe]&&$[fe]||N[fe]),ve={hasMinor:!0,letter:ne,font:x.font,outerTicks:E[fe],showGrid:!P[fe],data:k[fe]||[],bgColor:ie,calendar:x.calendar,automargin:!0,visibleDflt:re,reverseDflt:me,autotypenumbersDflt:T,splomStash:((x._splomAxes||{})[ne]||{})[be]};se("uirevision",x.uirevision),l(U,ae,se,ve),s(U,ae,se,ve,x);var Me=Ce&&ne===oe.charAt(0),Se=pe("spikecolor",Ce?ae.color:void 0),$e=pe("spikethickness",Ce?1.5:void 0),ye=pe("spikedash",Ce?"dot":void 0),Ne=pe("spikemode",Ce?"across":void 0),Pe=pe("spikesnap"),je=se("showspikes",!!Me||!!Se||!!$e||!!ye||!!Ne||!!Pe);je||(delete ae.spikecolor,delete ae.spikethickness,delete ae.spikedash,delete ae.spikemode,delete ae.spikesnap);var Ie=u(U.overlaying),Ue=[0,1];if(x[Ie]!==void 0){var ke=u(x[Ie].anchor);x[ke]!==void 0&&(Ue=x[ke].domain)}c(U,ae,se,{letter:ne,counterAxes:le[ne],overlayableAxes:_e(ne,fe),grid:x.grid,overlayingDomain:Ue}),se("title.standoff"),Ve(),ae._input=U}for(R=0;R<ze.length;){be=ze[R++],fe=u(be),ne=fe.charAt(0),t.isPlainObject(b[fe])||(b[fe]={}),U=b[fe],ae=i.newContainer(x,fe,ne+"axis"),ce();var We={letter:ne,font:x.font,outerTicks:E[fe],showGrid:!P[fe],data:[],bgColor:ie,calendar:x.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((x._splomAxes||{})[ne]||{})[be]};se("uirevision",x.uirevision),ae.type=Ae[be]||"linear",s(U,ae,se,We,x),c(U,ae,se,{letter:ne,counterAxes:le[ne],overlayableAxes:_e(ne,fe),grid:x.grid}),se("fixedrange"),Ve(),ae._input=U}var qe=m("rangeslider","handleDefaults"),Ye=m("rangeselector","handleDefaults");for(R=0;R<Y.length;R++)fe=Y[R],U=b[fe],ae=x[fe],qe(b,x,fe),ae.type==="date"&&Ye(U,ae,x,K,ae.calendar),se("fixedrange");for(R=0;R<K.length;R++){fe=K[R],U=b[fe],ae=x[fe];var Qe=x[u(ae.anchor)],F=m("rangeslider","isVisible")(Qe);se("fixedrange",F)}f.handleDefaults(b,x,{axIds:De.concat(ze).sort(v.idSort),axHasImage:N})},dv}var hv,E0;function FR(){if(E0)return hv;E0=1;var t=yt,e=tt,r=de,a=Et,i=Ot;return hv=function(o,l,s,f){var c=o._fullLayout;if(l.length===0){i.redrawComponents(o);return}function v(x){var _=x.xaxis,T=x.yaxis;c._defs.select("#"+x.clipId+"> rect").call(a.setTranslate,0,0).call(a.setScale,1,1),x.plot.call(a.setTranslate,_._offset,T._offset).call(a.setScale,1,1);var k=x.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(a.setPointGroupScale,1,1),k.selectAll(".textpoint").call(a.setTextPointsScale,1,1),k.call(a.hideOutsideRangePoints,x)}function u(x,_){var T=x.plotinfo,k=T.xaxis,S=T.yaxis,M=k._length,D=S._length,A=!!x.xr1,C=!!x.yr1,$=[];if(A){var N=r.simpleMap(x.xr0,k.r2l),E=r.simpleMap(x.xr1,k.r2l),P=N[1]-N[0],R=E[1]-E[0];$[0]=(N[0]*(1-_)+_*E[0]-N[0])/(N[1]-N[0])*M,$[2]=M*(1-_+_*R/P),k.range[0]=k.l2r(N[0]*(1-_)+_*E[0]),k.range[1]=k.l2r(N[1]*(1-_)+_*E[1])}else $[0]=0,$[2]=M;if(C){var L=r.simpleMap(x.yr0,S.r2l),z=r.simpleMap(x.yr1,S.r2l),I=L[1]-L[0],H=z[1]-z[0];$[1]=(L[1]*(1-_)+_*z[1]-L[1])/(L[0]-L[1])*D,$[3]=D*(1-_+_*H/I),S.range[0]=k.l2r(L[0]*(1-_)+_*z[0]),S.range[1]=S.l2r(L[1]*(1-_)+_*z[1])}else $[1]=0,$[3]=D;i.drawOne(o,k,{skipTitle:!0}),i.drawOne(o,S,{skipTitle:!0}),i.redrawComponents(o,[k._id,S._id]);var V=A?M/$[2]:1,O=C?D/$[3]:1,X=A?$[0]:0,G=C?$[1]:0,Y=A?$[0]/$[2]*M:0,K=C?$[1]/$[3]*D:0,Z=k._offset-Y,q=S._offset-K;T.clipRect.call(a.setTranslate,X,G).call(a.setScale,1/V,1/O),T.plot.call(a.setTranslate,Z,q).call(a.setScale,V,O),a.setPointGroupScale(T.zoomScalePts,1/V,1/O),a.setTextPointsScale(T.zoomScaleTxt,1/V,1/O)}var h;f&&(h=f());function d(){for(var x={},_=0;_<l.length;_++){var T=l[_],k=T.plotinfo.xaxis,S=T.plotinfo.yaxis;T.xr1&&(x[k._name+".range"]=T.xr1.slice()),T.yr1&&(x[S._name+".range"]=T.yr1.slice())}return h&&h(),e.call("relayout",o,x).then(function(){for(var M=0;M<l.length;M++)v(l[M].plotinfo)})}function p(){for(var x={},_=0;_<l.length;_++){var T=l[_],k=T.plotinfo.xaxis,S=T.plotinfo.yaxis;T.xr0&&(x[k._name+".range"]=T.xr0.slice()),T.yr0&&(x[S._name+".range"]=T.yr0.slice())}return e.call("relayout",o,x).then(function(){for(var M=0;M<l.length;M++)v(l[M].plotinfo)})}var y,m,g,w=t.ease(s.easing);o._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(g),g=null,p()});function b(){m=Date.now();for(var x=Math.min(1,(m-y)/s.duration),_=w(x),T=0;T<l.length;T++)u(l[T],_);m-y>s.duration?(d(),g=window.cancelAnimationFrame(b)):g=window.requestAnimationFrame(b)}return y=Date.now(),g=window.requestAnimationFrame(b),Promise.resolve()},hv}var Uc=yt,R0=tt,Xf=de,NR=sr,HR=Et,z0=Jl.getModuleCalcData,Ti=nr,Oa=Hr,OR=bn,zt=Xf.ensureSingle;function Xs(t,e,r){return Xf.ensureSingle(t,e,r,function(a){a.datum(r)})}fr.name="cartesian";fr.attr=["xaxis","yaxis"];fr.idRoot=["x","y"];fr.idRegex=Oa.idRegex;fr.attrRegex=Oa.attrRegex;fr.attributes=gR();fr.layoutAttributes=ii;fr.supplyLayoutDefaults=IR();fr.transitionAxes=FR();fr.finalizeSubplots=function(t,e){var r=e._subplots,a=r.xaxis,i=r.yaxis,n=r.cartesian,o=n.concat(r.gl2d||[]),l={},s={},f,c,v;for(f=0;f<o.length;f++){var u=o[f].split("y");l[u[0]]=1,s["y"+u[1]]=1}for(f=0;f<a.length;f++)c=a[f],l[c]||(v=(t[Ti.id2name(c)]||{}).anchor,Oa.idRegex.y.test(v)||(v="y"),n.push(c+v),o.push(c+v),s[v]||(s[v]=1,Xf.pushUnique(i,v)));for(f=0;f<i.length;f++)v=i[f],s[v]||(c=(t[Ti.id2name(v)]||{}).anchor,Oa.idRegex.x.test(c)||(c="x"),n.push(c+v),o.push(c+v),l[c]||(l[c]=1,Xf.pushUnique(a,c)));if(!o.length){c="",v="";for(var h in t)if(Oa.attrRegex.test(h)){var d=h.charAt(0);d==="x"?(!c||+h.substr(5)<+c.substr(5))&&(c=h):(!v||+h.substr(5)<+v.substr(5))&&(v=h)}c=c?Ti.name2id(c):"x",v=v?Ti.name2id(v):"y",a.push(c),i.push(v),n.push(c+v)}};fr.plot=function(t,e,r,a){var i=t._fullLayout,n=i._subplots.cartesian,o=t.calcdata,l;if(!Array.isArray(e))for(e=[],l=0;l<o.length;l++)e.push(l);for(l=0;l<n.length;l++){for(var s=n[l],f=i._plots[s],c=[],v,u=0;u<o.length;u++){var h=o[u],d=h[0].trace;d.xaxis+d.yaxis===s&&((e.indexOf(d.index)!==-1||d.carpet)&&(v&&v[0].trace.xaxis+v[0].trace.yaxis===s&&["tonextx","tonexty","tonext"].indexOf(d.fill)!==-1&&c.indexOf(v)===-1&&c.push(v),c.push(h)),v=h)}p2(t,f,c,r,a)}};function p2(t,e,r,a,i){for(var n=Oa.traceLayerClasses,o=t._fullLayout,l=o._modules,s,f,c,v=[],u=[],h=0;h<l.length;h++){s=l[h];var d=s.name,p=R0.modules[d].categories;if(p.svg){var y=s.layerName||d+"layer",m=s.plot;f=z0(r,m),c=f[0],r=f[1],c.length&&v.push({i:n.indexOf(y),className:y,plotMethod:m,cdModule:c}),p.zoomScale&&u.push("."+y)}}v.sort(function(b,x){return b.i-x.i});var g=e.plot.selectAll("g.mlayer").data(v,function(b){return b.className});if(g.enter().append("g").attr("class",function(b){return b.className}).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),g.exit().remove(),g.order(),g.each(function(b){var x=Uc.select(this),_=b.className;b.plotMethod(t,e,b.cdModule,x,a,i),Oa.clipOnAxisFalseQuery.indexOf("."+_)===-1&&HR.setClipUrl(x,e.layerClipId,t)}),o._has("scattergl")&&(s=R0.getModule("scattergl"),c=z0(r,s)[0],s.plot(t,e,c)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(Oa.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),u.length)){var w=e.plot.selectAll(u.join(",")).selectAll(".trace");e.zoomScalePts=w.selectAll("path.point"),e.zoomScaleTxt=w.selectAll(".textpoint")}}fr.clean=function(t,e,r,a){var i=a._plots||{},n=e._plots||{},o=a._subplots||{},l,s,f;if(a._hasOnlyLargeSploms&&!e._hasOnlyLargeSploms)for(f in i)l=i[f],l.plotgroup&&l.plotgroup.remove();var c=a._has&&a._has("gl"),v=e._has&&e._has("gl");if(c&&!v)for(f in i)l=i[f],l._scene&&l._scene.destroy();if(o.xaxis&&o.yaxis){var u=Ti.listIds({_fullLayout:a});for(s=0;s<u.length;s++){var h=u[s];e[Ti.id2name(h)]||a._infolayer.selectAll(".g-"+h+"title").remove()}}var d=a._has&&a._has("cartesian"),p=e._has&&e._has("cartesian");if(d&&!p)y2(a._cartesianlayer.selectAll(".subplot"),a),a._defs.selectAll(".axesclip").remove(),delete a._axisConstraintGroups,delete a._axisMatchGroups;else if(o.cartesian)for(s=0;s<o.cartesian.length;s++){var y=o.cartesian[s];if(!n[y]){var m="."+y+",."+y+"-x,."+y+"-y";a._cartesianlayer.selectAll(m).remove(),g2(y,a)}}};fr.drawFramework=function(t){var e=t._fullLayout,r=BR(t),a=e._cartesianlayer.selectAll(".subplot").data(r,String);a.enter().append("g").attr("class",function(i){return"subplot "+i[0]}),a.order(),a.exit().call(y2,e),a.each(function(i){var n=i[0],o=e._plots[n];o.plotgroup=Uc.select(this),m2(t,o),o.draglayer=zt(e._draggers,"g",n)})};fr.rangePlot=function(t,e,r){m2(t,e),p2(t,e,r),NR.style(t)};function BR(t){var e=t._fullLayout,r=e._subplots.cartesian,a=r.length,i,n,o,l,s,f,c=[],v=[];for(i=0;i<a;i++){o=r[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var u=s._mainAxis,h=f._mainAxis,d=u._id+h._id,p=e._plots[d];l.overlays=[],d!==o&&p?(l.mainplot=d,l.mainplotinfo=p,v.push(o)):(l.mainplot=void 0,l.mainplotinfo=void 0,c.push(o))}for(i=0;i<v.length;i++)o=v[i],l=e._plots[o],l.mainplotinfo.overlays.push(l);var y=c.concat(v),m=new Array(a);for(i=0;i<a;i++){o=y[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var g=[o,s.layer,f.layer,s.overlaying||"",f.overlaying||""];for(n=0;n<l.overlays.length;n++)g.push(l.overlays[n].id);m[i]=g}return m}function m2(t,e){var r=e.plotgroup,a=e.id,i=Oa.layerValue2layerClass[e.xaxis.layer],n=Oa.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,f=s.plotgroup,c=a+"-x",v=a+"-y";e.minorGridlayer=s.minorGridlayer,e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,zt(s.overlinesBelow,"path",c),zt(s.overlinesBelow,"path",v),zt(s.overaxesBelow,"g",c),zt(s.overaxesBelow,"g",v),e.plot=zt(s.overplot,"g",a),zt(s.overlinesAbove,"path",c),zt(s.overlinesAbove,"path",v),zt(s.overaxesAbove,"g",c),zt(s.overaxesAbove,"g",v),e.xlines=f.select(".overlines-"+i).select("."+c),e.ylines=f.select(".overlines-"+n).select("."+v),e.xaxislayer=f.select(".overaxes-"+i).select("."+c),e.yaxislayer=f.select(".overaxes-"+n).select("."+v)}else if(o)e.xlines=zt(r,"path","xlines-above"),e.ylines=zt(r,"path","ylines-above"),e.xaxislayer=zt(r,"g","xaxislayer-above"),e.yaxislayer=zt(r,"g","yaxislayer-above");else{var l=zt(r,"g","layer-subplot");e.shapelayer=zt(l,"g","shapelayer"),e.imagelayer=zt(l,"g","imagelayer"),e.minorGridlayer=zt(r,"g","minor-gridlayer"),e.gridlayer=zt(r,"g","gridlayer"),e.zerolinelayer=zt(r,"g","zerolinelayer"),zt(r,"path","xlines-below"),zt(r,"path","ylines-below"),e.overlinesBelow=zt(r,"g","overlines-below"),zt(r,"g","xaxislayer-below"),zt(r,"g","yaxislayer-below"),e.overaxesBelow=zt(r,"g","overaxes-below"),e.plot=zt(r,"g","plot"),e.overplot=zt(r,"g","overplot"),e.xlines=zt(r,"path","xlines-above"),e.ylines=zt(r,"path","ylines-above"),e.overlinesAbove=zt(r,"g","overlines-above"),zt(r,"g","xaxislayer-above"),zt(r,"g","yaxislayer-above"),e.overaxesAbove=zt(r,"g","overaxes-above"),e.xlines=r.select(".xlines-"+i),e.ylines=r.select(".ylines-"+n),e.xaxislayer=r.select(".xaxislayer-"+i),e.yaxislayer=r.select(".yaxislayer-"+n)}o||(Xs(e.minorGridlayer,"g",e.xaxis._id),Xs(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map(function(u){return u[0]}).sort(Ti.idSort),Xs(e.gridlayer,"g",e.xaxis._id),Xs(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map(function(u){return u[0]}).sort(Ti.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0)}function y2(t,e){if(t){var r={};t.each(function(s){var f=s[0],c=Uc.select(this);c.remove(),g2(f,e),r[f]=!0});for(var a in e._plots)for(var i=e._plots[a],n=i.overlays||[],o=0;o<n.length;o++){var l=n[o];r[l.id]&&l.plot.selectAll(".trace").remove()}}}function g2(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}fr.toSVG=function(t){var e=t._fullLayout._glimages,r=Uc.select(t).selectAll(".svg-container"),a=r.filter(function(n,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function i(){var n=this,o=n.toDataURL("image/png"),l=e.append("svg:image");l.attr({xmlns:OR.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}a.each(i)};fr.updateFx=$T().updateFx;var Ys=Pr,jR={hasLines:Ys.hasLines,hasMarkers:Ys.hasMarkers,hasText:Ys.hasText,isBubble:Ys.isBubble,attributes:Ei,layoutAttributes:Dh,supplyDefaults:wE,crossTraceDefaults:WT,supplyLayoutDefaults:CE,calc:Sp.calc,crossTraceCalc:KE,arraysToCalcdata:qT,plot:oR,colorbar:os,formatLabels:u2,style:_0.style,styleOnSelect:_0.styleOnSelect,hoverPoints:mR,selectPoints:yR,animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:fr,categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{description:["The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts.","The data visualized as scatter point or lines is set in `x` and `y`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}},GR={moduleType:"component",name:"legend",layoutAttributes:mw,supplyLayoutDefaults:yw,draw:xw,style:bw},UR=yt,VR=ut,I0=MT,Pp=de,WR=Pp.strScale,XR=Pp.strRotate,YR=Pp.strTranslate,qR=function(e,r,a){var i=e.node(),n=I0[a.arrowhead||0],o=I0[a.startarrowhead||0],l=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),f=r.indexOf("start")>=0,c=r.indexOf("end")>=0,v=n.backoff*l+a.standoff,u=o.backoff*s+a.startstandoff,h,d,p,y;if(i.nodeName==="line"){h={x:+e.attr("x1"),y:+e.attr("y1")},d={x:+e.attr("x2"),y:+e.attr("y2")};var m=h.x-d.x,g=h.y-d.y;if(p=Math.atan2(g,m),y=p+Math.PI,v&&u&&v+u>Math.sqrt(m*m+g*g)){$();return}if(v){if(v*v>m*m+g*g){$();return}var w=v*Math.cos(p),b=v*Math.sin(p);d.x+=w,d.y+=b,e.attr({x2:d.x,y2:d.y})}if(u){if(u*u>m*m+g*g){$();return}var x=u*Math.cos(p),_=u*Math.sin(p);h.x-=x,h.y-=_,e.attr({x1:h.x,y1:h.y})}}else if(i.nodeName==="path"){var T=i.getTotalLength(),k="";if(T<v+u){$();return}var S=i.getPointAtLength(0),M=i.getPointAtLength(.1);p=Math.atan2(S.y-M.y,S.x-M.x),h=i.getPointAtLength(Math.min(u,T)),k="0px,"+u+"px,";var D=i.getPointAtLength(T),A=i.getPointAtLength(T-.1);y=Math.atan2(D.y-A.y,D.x-A.x),d=i.getPointAtLength(Math.max(0,T-v));var C=k?u+v:v;k+=T-C+"px,"+T+"px",e.style("stroke-dasharray",k)}function $(){e.style("stroke-dasharray","0px,100px")}function N(E,P,R,L){E.path&&(E.noRotate&&(R=0),UR.select(i.parentNode).append("path").attr({class:e.attr("class"),d:E.path,transform:YR(P.x,P.y)+XR(R*180/Math.PI)+WR(L)}).style({fill:VR.rgb(a.arrowcolor),"stroke-width":0}))}f&&N(o,h,p,s),c&&N(n,d,y,l)},F0=yt,pv=tt,ZR=sr,pi=de,mv=pi.strTranslate,Ol=Ot,Bi=ut,Xa=Et,N0=Ca,yv=wr,gv=Pi,tl=Va,KR=It.arrayEditor,QR=qR,Ep={draw:JR,drawOne:b2,drawRaw:x2};function JR(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&b2(t,r);return ZR.previousPromises(t)}function b2(t,e){var r=t._fullLayout,a=r.annotations[e]||{},i=Ol.getFromId(t,a.xref),n=Ol.getFromId(t,a.yref);i&&i.setScale(),n&&n.setScale(),x2(t,a,e,!1,i,n)}function di(t,e,r,a,i){var n=i[r],o=i[r+"ref"],l=r.indexOf("y")!==-1,s=Ol.getRefType(o)==="domain",f=l?a.h:a.w;return t?s?n+(l?-e:e)/t._length:t.p2r(t.r2p(n)+e):n+(l?-e:e)/f}function x2(t,e,r,a,i,n){var o=t._fullLayout,l=t._fullLayout._size,s=t._context.edits,f,c;a?(f="annotation-"+a,c=a+".annotations"):(f="annotation",c="annotations");var v=KR(t.layout,c,e),u=v.modifyBase,h=v.modifyItem,d=v.getUpdateObj;o._infolayer.selectAll("."+f+'[data-index="'+r+'"]').remove();var p="clip"+o._uid+"_ann"+r;if(!e._input||e.visible===!1){F0.selectAll("#"+p).remove();return}var y={x:{},y:{}},m=+e.textangle||0,g=o._infolayer.append("g").classed(f,!0).attr("data-index",String(r)).style("opacity",e.opacity),w=g.append("g").classed("annotation-text-g",!0),b=s[e.showarrow?"annotationTail":"annotationPosition"],x=e.captureevents||s.annotationText||b;function _(L){var z={index:r,annotation:e._input,fullAnnotation:e,event:L};return a&&(z.subplotId=a),z}var T=w.append("g").style("pointer-events",x?"all":null).call(gv,"pointer").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",_(F0.event))});e.hovertext&&T.on("mouseover",function(){var L=e.hoverlabel,z=L.font,I=this.getBoundingClientRect(),H=t.getBoundingClientRect();N0.loneHover({x0:I.left-H.left,x1:I.right-H.left,y:(I.top+I.bottom)/2-H.top,text:e.hovertext,color:L.bgcolor,borderColor:L.bordercolor,fontFamily:z.family,fontSize:z.size,fontColor:z.color},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:t})}).on("mouseout",function(){N0.loneUnhover(o._hoverlayer.node())});var k=e.borderwidth,S=e.borderpad,M=k+S,D=T.append("rect").attr("class","bg").style("stroke-width",k+"px").call(Bi.stroke,e.bordercolor).call(Bi.fill,e.bgcolor),A=e.width||e.height,C=o._topclips.selectAll("#"+p).data(A?[0]:[]);C.enter().append("clipPath").classed("annclip",!0).attr("id",p).append("rect"),C.exit().remove();var $=e.font,N=o._meta?pi.templateString(e.text,o._meta):e.text,E=T.append("text").classed("annotation-text",!0).text(N);function P(L){return L.call(Xa.font,$).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),yv.convertToTspans(L,t,R),L}function R(){var L=E.selectAll("a");if(L.size()===1&&L.text()===E.text()){var z=T.insert("a",":first-child").attr({"xlink:xlink:href":L.attr("xlink:href"),"xlink:xlink:show":L.attr("xlink:show")}).style({cursor:"pointer"});z.node().appendChild(D.node())}var I=T.select(".annotation-text-math-group"),H=!I.empty(),V=Xa.bBox((H?I:E).node()),O=V.width,X=V.height,G=e.width||O,Y=e.height||X,K=Math.round(G+2*M),Z=Math.round(Y+2*M);function q(Ye,Qe){return Qe==="auto"&&(Ye<1/3?Qe="left":Ye>2/3?Qe="right":Qe="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Qe]}for(var ie=!1,fe=["x","y"],be=0;be<fe.length;be++){var ne=fe[be],U=e[ne+"ref"]||ne,ae=e["a"+ne+"ref"],ce={x:i,y:n}[ne],se=(m+(ne==="x"?0:-90))*Math.PI/180,pe=K*Math.cos(se),ge=Z*Math.sin(se),_e=Math.abs(pe)+Math.abs(ge),le=e[ne+"anchor"],De=e[ne+"shift"]*(ne==="x"?1:-1),Ae=y[ne],ze,Ve,oe,Ce,re,me=Ol.getRefType(U);if(ce&&me!=="domain"){var ve=ce.r2fraction(e[ne]);(ve<0||ve>1)&&(ae===U?(ve=ce.r2fraction(e["a"+ne]),(ve<0||ve>1)&&(ie=!0)):ie=!0),ze=ce._offset+ce.r2p(e[ne]),Ce=.5}else{var Me=me==="domain";ne==="x"?(oe=e[ne],ze=Me?ce._offset+ce._length*oe:ze=l.l+l.w*oe):(oe=1-e[ne],ze=Me?ce._offset+ce._length*oe:ze=l.t+l.h*oe),Ce=e.showarrow?.5:oe}if(e.showarrow){Ae.head=ze;var Se=e["a"+ne];if(re=pe*q(.5,e.xanchor)-ge*q(.5,e.yanchor),ae===U){var $e=Ol.getRefType(ae);$e==="domain"?(ne==="y"&&(Se=1-Se),Ae.tail=ce._offset+ce._length*Se):$e==="paper"?ne==="y"?(Se=1-Se,Ae.tail=l.t+l.h*Se):Ae.tail=l.l+l.w*Se:Ae.tail=ce._offset+ce.r2p(Se),Ve=re}else Ae.tail=ze+Se,Ve=re+Se;Ae.text=Ae.tail+re;var ye=o[ne==="x"?"width":"height"];if(U==="paper"&&(Ae.head=pi.constrain(Ae.head,1,ye-1)),ae==="pixel"){var Ne=-Math.max(Ae.tail-3,Ae.text),Pe=Math.min(Ae.tail+3,Ae.text)-ye;Ne>0?(Ae.tail+=Ne,Ae.text+=Ne):Pe>0&&(Ae.tail-=Pe,Ae.text-=Pe)}Ae.tail+=De,Ae.head+=De}else re=_e*q(Ce,le),Ve=re,Ae.text=ze+re;Ae.text+=De,re+=De,Ve+=De,e["_"+ne+"padplus"]=_e/2+Ve,e["_"+ne+"padminus"]=_e/2-Ve,e["_"+ne+"size"]=_e,e["_"+ne+"shift"]=re}if(ie){T.remove();return}var je=0,Ie=0;if(e.align!=="left"&&(je=(G-O)*(e.align==="center"?.5:1)),e.valign!=="top"&&(Ie=(Y-X)*(e.valign==="middle"?.5:1)),H)I.select("svg").attr({x:M+je-1,y:M+Ie}).call(Xa.setClipUrl,A?p:null,t);else{var Ue=M+Ie-V.top,ke=M+je-V.left;E.call(yv.positionText,ke,Ue).call(Xa.setClipUrl,A?p:null,t)}C.select("rect").call(Xa.setRect,M,M,G,Y),D.call(Xa.setRect,k/2,k/2,K-k,Z-k),T.call(Xa.setTranslate,Math.round(y.x.text-K/2),Math.round(y.y.text-Z/2)),w.attr({transform:"rotate("+m+","+y.x.text+","+y.y.text+")"});var We=function(Ye,Qe){g.selectAll(".annotation-arrow-g").remove();var F=y.x.head,B=y.y.head,j=y.x.tail+Ye,W=y.y.tail+Qe,J=y.x.text+Ye,Q=y.y.text+Qe,he=pi.rotationXYMatrix(m,J,Q),Te=pi.apply2DTransform(he),ue=pi.apply2DTransform2(he),te=+D.attr("width"),xe=+D.attr("height"),we=J-.5*te,Be=we+te,ot=Q-.5*xe,vt=ot+xe,st=[[we,ot,we,vt],[we,vt,Be,vt],[Be,vt,Be,ot],[Be,ot,we,ot]].map(ue);if(!st.reduce(function(dt,Ge){return dt^!!pi.segmentsIntersect(F,B,F+1e6,B+1e6,Ge[0],Ge[1],Ge[2],Ge[3])},!1)){st.forEach(function(dt){var Ge=pi.segmentsIntersect(j,W,F,B,dt[0],dt[1],dt[2],dt[3]);Ge&&(j=Ge.x,W=Ge.y)});var Ke=e.arrowwidth,Mt=e.arrowcolor,ft=e.arrowside,et=g.append("g").style({opacity:Bi.opacity(Mt)}).classed("annotation-arrow-g",!0),kt=et.append("path").attr("d","M"+j+","+W+"L"+F+","+B).style("stroke-width",Ke+"px").call(Bi.stroke,Bi.rgb(Mt));if(QR(kt,ft,e),s.annotationPosition&&kt.node().parentNode&&!a){var xt=F,ct=B;if(e.standoff){var rt=Math.sqrt(Math.pow(F-j,2)+Math.pow(B-W,2));xt+=e.standoff*(j-F)/rt,ct+=e.standoff*(W-B)/rt}var Ze=et.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(j-xt)+","+(W-ct),transform:mv(xt,ct)}).style("stroke-width",Ke+6+"px").call(Bi.stroke,"rgba(0,0,0,0)").call(Bi.fill,"rgba(0,0,0,0)"),nt,bt;tl.init({element:Ze.node(),gd:t,prepFn:function(){var dt=Xa.getTranslate(T);nt=dt.x,bt=dt.y,i&&i.autorange&&u(i._name+".autorange",!0),n&&n.autorange&&u(n._name+".autorange",!0)},moveFn:function(dt,Ge){var ht=Te(nt,bt),Dt=ht[0]+dt,pr=ht[1]+Ge;T.call(Xa.setTranslate,Dt,pr),h("x",di(i,dt,"x",l,e)),h("y",di(n,Ge,"y",l,e)),e.axref===e.xref&&h("ax",di(i,dt,"ax",l,e)),e.ayref===e.yref&&h("ay",di(n,Ge,"ay",l,e)),et.attr("transform",mv(dt,Ge)),w.attr({transform:"rotate("+m+","+Dt+","+pr+")"})},doneFn:function(){pv.call("_guiRelayout",t,d());var dt=document.querySelector(".js-notes-box-panel");dt&&dt.redraw(dt.selectedObj)}})}}};if(e.showarrow&&We(0,0),b){var qe;tl.init({element:T.node(),gd:t,prepFn:function(){qe=w.attr("transform")},moveFn:function(Ye,Qe){var F="pointer";if(e.showarrow)e.axref===e.xref?h("ax",di(i,Ye,"ax",l,e)):h("ax",e.ax+Ye),e.ayref===e.yref?h("ay",di(n,Qe,"ay",l.w,e)):h("ay",e.ay+Qe),We(Ye,Qe);else{if(a)return;var B,j;if(i)B=di(i,Ye,"x",l,e);else{var W=e._xsize/l.w,J=e.x+(e._xshift-e.xshift)/l.w-W/2;B=tl.align(J+Ye/l.w,W,0,1,e.xanchor)}if(n)j=di(n,Qe,"y",l,e);else{var Q=e._ysize/l.h,he=e.y-(e._yshift+e.yshift)/l.h-Q/2;j=tl.align(he-Qe/l.h,Q,0,1,e.yanchor)}h("x",B),h("y",j),(!i||!n)&&(F=tl.getCursor(i?.5:B,n?.5:j,e.xanchor,e.yanchor))}w.attr({transform:mv(Ye,Qe)+qe}),gv(T,F)},clickFn:function(Ye,Qe){e.captureevents&&t.emit("plotly_clickannotation",_(Qe))},doneFn:function(){gv(T),pv.call("_guiRelayout",t,d());var Ye=document.querySelector(".js-notes-box-panel");Ye&&Ye.redraw(Ye.selectedObj)}})}}s.annotationText?E.call(yv.makeEditable,{delegate:T,gd:t}).call(P).on("edit",function(L){e.text=L,this.call(P),h("text",L),i&&i.autorange&&u(i._name+".autorange",!0),n&&n.autorange&&u(n._name+".autorange",!0),pv.call("_guiRelayout",t,d())}):E.call(P)}var H0=de,ez=tt,O0=It.arrayEditor,tz={hasClickToShow:rz,onClick:az};function rz(t,e){var r=_2(t,e);return r.on.length>0||r.explicitOff.length>0}function az(t,e){var r=_2(t,e),a=r.on,i=r.off.concat(r.explicitOff),n={},o=t._fullLayout.annotations,l,s;if(a.length||i.length){for(l=0;l<a.length;l++)s=O0(t.layout,"annotations",o[a[l]]),s.modifyItem("visible",!0),H0.extendFlat(n,s.getUpdateObj());for(l=0;l<i.length;l++)s=O0(t.layout,"annotations",o[i[l]]),s.modifyItem("visible",!1),H0.extendFlat(n,s.getUpdateObj());return ez.call("update",t,{},n)}}function _2(t,e){var r=t._fullLayout.annotations,a=[],i=[],n=[],o=(e||[]).length,l,s,f,c,v,u,h,d;for(l=0;l<r.length;l++)if(f=r[l],c=f.clicktoshow,c){for(s=0;s<o;s++)if(v=e[s],u=v.xaxis,h=v.yaxis,u._id===f.xref&&h._id===f.yref&&u.d2r(v.x)===B0(f._xclick,u)&&h.d2r(v.y)===B0(f._yclick,h)){f.visible?c==="onout"?d=i:d=n:d=a,d.push(l);break}s===o&&f.visible&&c==="onout"&&i.push(l)}return{on:a,off:i,explicitOff:n}}function B0(t,e){return e.type==="log"?e.l2r(t):e.d2r(t)}var j0=de,zn=ut,w2=function(e,r,a,i){i("opacity");var n=i("bgcolor"),o=i("bordercolor"),l=zn.opacity(o);i("borderpad");var s=i("borderwidth"),f=i("showarrow");i("text",f?" ":a._dfltTitle.annotation),i("textangle"),j0.coerceFont(i,"font",a.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),f){var v=i("arrowside"),u,h;v.indexOf("end")!==-1&&(u=i("arrowhead"),h=i("arrowsize")),v.indexOf("start")!==-1&&(i("startarrowhead",u),i("startarrowsize",h)),i("arrowcolor",l?r.bordercolor:zn.defaultLine),i("arrowwidth",(l&&s||1)*2),i("standoff"),i("startstandoff")}var d=i("hovertext"),p=a.hoverlabel||{};if(d){var y=i("hoverlabel.bgcolor",p.bgcolor||(zn.opacity(n)?zn.rgb(n):zn.defaultLine)),m=i("hoverlabel.bordercolor",p.bordercolor||zn.contrast(y));j0.coerceFont(i,"hoverlabel.font",{family:p.font.family,size:p.font.size,color:p.font.color||m})}i("captureevents",!!d)},bv=de,ji=Ot,iz=Ua,nz=w2,oz=as,lz=function(e,r){iz(e,r,{name:"annotations",handleItemDefaults:sz})};function sz(t,e,r){function a(w,b){return bv.coerce(t,e,oz,w,b)}var i=a("visible"),n=a("clicktoshow");if(i||n){nz(t,e,r,a);for(var o=e.showarrow,l=["x","y"],s=[-10,-30],f={_fullLayout:r},c=0;c<2;c++){var v=l[c],u=ji.coerceRef(t,e,f,v,"","paper");if(u!=="paper"){var h=ji.getFromId(f,u);h._annIndices.push(e._index)}if(ji.coercePosition(e,f,a,u,v,.5),o){var d="a"+v,p=ji.coerceRef(t,e,f,d,"pixel",["pixel","paper"]);p!=="pixel"&&p!==u&&(p=e[d]="pixel");var y=p==="pixel"?s[c]:.4;ji.coercePosition(e,f,a,p,d,y)}a(v+"anchor"),a(v+"shift")}if(bv.noneOrAll(t,e,["x","y"]),o&&bv.noneOrAll(t,e,["ax","ay"]),n){var m=a("xclick"),g=a("yclick");e._xclick=m===void 0?e.x:ji.cleanPosition(m,f,e.xref),e._yclick=g===void 0?e.y:ji.cleanPosition(g,f,e.yref)}}}var Wd=de,Ji=Ot,fz=Ep.draw,cz=function(e){var r=e._fullLayout,a=Wd.filterVisible(r.annotations);if(a.length&&e._fullData.length)return Wd.syncOrAsync([fz,uz],e)};function uz(t){var e=t._fullLayout;Wd.filterVisible(e.annotations).forEach(function(r){var a=Ji.getFromId(t,r.xref),i=Ji.getFromId(t,r.yref),n=Ji.getRefType(r.xref),o=Ji.getRefType(r.yref);r._extremes={},n==="range"&&G0(r,a),o==="range"&&G0(r,i)})}function G0(t,e){var r=e._id,a=r.charAt(0),i=t[a],n=t["a"+a],o=t[a+"ref"],l=t["a"+a+"ref"],s=t["_"+a+"padplus"],f=t["_"+a+"padminus"],c={x:1,y:-1}[a]*t[a+"shift"],v=3*t.arrowsize*t.arrowwidth||0,u=v+c,h=v-c,d=3*t.startarrowsize*t.arrowwidth||0,p=d+c,y=d-c,m;if(l===o){var g=Ji.findExtremes(e,[e.r2c(i)],{ppadplus:u,ppadminus:h}),w=Ji.findExtremes(e,[e.r2c(n)],{ppadplus:Math.max(s,p),ppadminus:Math.max(f,y)});m={min:[g.min[0],w.min[0]],max:[g.max[0],w.max[0]]}}else p=n?p+n:p,y=n?y-n:y,m=Ji.findExtremes(e,[e.r2c(i)],{ppadplus:Math.max(s,u,p),ppadminus:Math.max(f,h,y)});t._extremes[r]=m}var vz=_t,dz=mh,hz=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(!(n||o))return;var l=e._fullLayout.annotations,s=r._id.charAt(0),f,c;function v(h){var d=f[h],p=null;n?p=dz(d,r.range):p=Math.pow(10,d),vz(p)||(p=null),i(c+h,p)}for(var u=0;u<l.length;u++)f=l[u],c="annotations["+u+"].",f[s+"ref"]===r._id&&v(s),f["a"+s+"ref"]===r._id&&v("a"+s)},xv=Ep,U0=tz,pz={moduleType:"component",name:"annotations",layoutAttributes:as,supplyLayoutDefaults:lz,includeBasePlot:Hc("annotations"),calcAutorange:cz,draw:xv.draw,drawOne:xv.drawOne,drawRaw:xv.drawRaw,hasClickToShow:U0.hasClickToShow,onClick:U0.onClick,convertCoords:hz},jt=as,mz=ai.overrideAll,yz=It.templatedArray,Xd=mz(yz("annotation",{visible:jt.visible,x:{valType:"any",description:["Sets the annotation's x position."].join(" ")},y:{valType:"any",description:["Sets the annotation's y position."].join(" ")},z:{valType:"any",description:["Sets the annotation's z position."].join(" ")},ax:{valType:"number",description:["Sets the x component of the arrow tail about the arrow head (in pixels)."].join(" ")},ay:{valType:"number",description:["Sets the y component of the arrow tail about the arrow head (in pixels)."].join(" ")},xanchor:jt.xanchor,xshift:jt.xshift,yanchor:jt.yanchor,yshift:jt.yshift,text:jt.text,textangle:jt.textangle,font:jt.font,width:jt.width,height:jt.height,opacity:jt.opacity,align:jt.align,valign:jt.valign,bgcolor:jt.bgcolor,bordercolor:jt.bordercolor,borderpad:jt.borderpad,borderwidth:jt.borderwidth,showarrow:jt.showarrow,arrowcolor:jt.arrowcolor,arrowhead:jt.arrowhead,startarrowhead:jt.startarrowhead,arrowside:jt.arrowside,arrowsize:jt.arrowsize,startarrowsize:jt.startarrowsize,arrowwidth:jt.arrowwidth,standoff:jt.standoff,startstandoff:jt.startstandoff,hovertext:jt.hovertext,hoverlabel:jt.hoverlabel,captureevents:jt.captureevents}),"calc","from-root"),_v=de,gz=Ot,bz=Ua,xz=w2,_z=Xd,wz=function(e,r,a){bz(e,r,{name:"annotations",handleItemDefaults:Tz,fullLayout:a.fullLayout})};function Tz(t,e,r,a){function i(l,s){return _v.coerce(t,e,_z,l,s)}function n(l){var s=l+"axis",f={_fullLayout:{}};return f._fullLayout[s]=r[s],gz.coercePosition(e,f,i,l,l,.5)}var o=i("visible");o&&(xz(t,e,a.fullLayout,i),n("x"),n("y"),n("z"),_v.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",i("ax",-10),i("ay",-30),_v.noneOrAll(t,e,["ax","ay"])))}var V0=de,W0=Ot,kz=function(e){for(var r=e.fullSceneLayout,a=r.annotations,i=0;i<a.length;i++)Az(a[i],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function Az(t,e){var r=e.fullSceneLayout,a=r.domain,i=e.fullLayout._size,n={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},V0.extendFlat(t._xa,n),W0.setConvert(t._xa),t._xa._offset=i.l+a.x[0]*i.w,t._xa.l2p=function(){return .5*(1+t._pdata[0]/t._pdata[3])*i.w*(a.x[1]-a.x[0])},t._ya={},V0.extendFlat(t._ya,n),W0.setConvert(t._ya),t._ya._offset=i.t+(1-a.y[1])*i.h,t._ya.l2p=function(){return .5*(1-t._pdata[1]/t._pdata[3])*i.h*(a.y[1]-a.y[0])}}function wv(t,e){var r=[0,0,0,0],a,i;for(a=0;a<4;++a)for(i=0;i<4;++i)r[i]+=t[4*a+i]*e[a];return r}function Mz(t,e){var r=wv(t.projection,wv(t.view,wv(t.model,[e[0],e[1],e[2],1])));return r}var Sz=Mz,Lz=Ep.drawRaw,Cz=Sz,Dz=["x","y","z"],$z=function(e){for(var r=e.fullSceneLayout,a=e.dataScale,i=r.annotations,n=0;n<i.length;n++){for(var o=i[n],l=!1,s=0;s<3;s++){var f=Dz[s],c=o[f],v=r[f+"axis"],u=v.r2fraction(c);if(u<0||u>1){l=!0;break}}l?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+n+'"]').remove():(o._pdata=Cz(e.glplot.cameraParams,[r.xaxis.r2l(o.x)*a[0],r.yaxis.r2l(o.y)*a[1],r.zaxis.r2l(o.z)*a[2]]),Lz(e.graphDiv,o,n,e.id,o._xa,o._ya))}},Pz=tt,X0=de,Ez={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Xd}}},layoutAttributes:Xd,handleDefaults:wz,includeBasePlot:Rz,convert:kz,draw:$z};function Rz(t,e){var r=Pz.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,i=Object.keys(t),n=0;n<i.length;n++){var o=i[n];a.test(o)&&(t[o].annotations||[]).length&&(X0.pushUnique(e._basePlotModules,r),X0.pushUnique(e._subplots.gl3d,o))}}var Y0=as,q0=Ei.line,zz=Da.dash,rl=Kt.extendFlat,Iz=It.templatedArray,Z0=Fc,T2=Iz("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this shape is visible."].join(" ")},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:"Specifies whether shapes are drawn below or above traces."},xref:rl({},Y0.xref,{description:["Sets the shape's x coordinate axis.",Z0.axisRefDescription("x","left","right")].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},yref:rl({},Y0.yref,{description:["Sets the shape's y coordinate axis.",Z0.axisRefDescription("y","bottom","top")].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},path:{valType:"string",editType:"calc+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:rl({},q0.color,{editType:"arraydraw"}),width:rl({},q0.width,{editType:"calc+arraydraw"}),dash:rl({},zz,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color filling the shape's interior. Only applies to closed shapes."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw",description:["Determines which regions of complex paths constitute the interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether the shape could be activated for edit or not.","Has no effect when the older editable shapes mode is enabled via","`config.editable` or `config.edits.shapePosition`."].join(" ")},editType:"arraydraw"}),Tv=de,In=Ot,Fz=Ua,Nz=T2,K0=kn,Hz=function(e,r){Fz(e,r,{name:"shapes",handleItemDefaults:Oz})};function Oz(t,e,r){function a($,N){return Tv.coerce(t,e,Nz,$,N)}var i=a("visible");if(i){var n=a("path"),o=n?"path":"rect",l=a("type",o),s=l!=="path";s&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var c=a("xsizemode"),v=a("ysizemode"),u=["x","y"],h=0;h<2;h++){var d=u[h],p=d+"anchor",y=d==="x"?c:v,m={_fullLayout:r},g,w,b,x=In.coerceRef(t,e,m,d,void 0,"paper"),_=In.getRefType(x);if(_==="range"?(g=In.getFromId(m,x),g._shapeIndices.push(e._index),b=K0.rangeToShapePosition(g),w=K0.shapePositionToRange(g)):w=b=Tv.identity,s){var T=.25,k=.75,S=d+"0",M=d+"1",D=t[S],A=t[M];t[S]=w(t[S],!0),t[M]=w(t[M],!0),y==="pixel"?(a(S,0),a(M,10)):(In.coercePosition(e,m,a,x,S,T),In.coercePosition(e,m,a,x,M,k)),e[S]=b(e[S]),e[M]=b(e[M]),t[S]=D,t[M]=A}if(y==="pixel"){var C=t[p];t[p]=w(t[p],!0),In.coercePosition(e,m,a,x,p,.25),e[p]=b(e[p]),t[p]=C}}s&&Tv.noneOrAll(t,e,["x0","x1","y0","y1"])}}var Bz=ut,jz=function(e,r,a){a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var i=a("newshape.line.width");if(i){var n=(e||{}).plot_bgcolor||"#FFF";a("newshape.line.color",Bz.contrast(n)),a("newshape.line.dash")}a("activeshape.fillcolor"),a("activeshape.opacity")},Yd=de,Fn=Ot,xo=$c,k2=kn,Gz=function(e){var r=e._fullLayout,a=Yd.filterVisible(r.shapes);if(!(!a.length||!e._fullData.length))for(var i=0;i<a.length;i++){var n=a[i];n._extremes={};var o,l,s=Fn.getRefType(n.xref),f=Fn.getRefType(n.yref);if(n.xref!=="paper"&&s!=="domain"){var c=n.xsizemode==="pixel"?n.xanchor:n.x0,v=n.xsizemode==="pixel"?n.xanchor:n.x1;o=Fn.getFromId(e,n.xref),l=Q0(o,c,v,n.path,xo.paramIsX),l&&(n._extremes[o._id]=Fn.findExtremes(o,l,Uz(n)))}if(n.yref!=="paper"&&f!=="domain"){var u=n.ysizemode==="pixel"?n.yanchor:n.y0,h=n.ysizemode==="pixel"?n.yanchor:n.y1;o=Fn.getFromId(e,n.yref),l=Q0(o,u,h,n.path,xo.paramIsY),l&&(n._extremes[o._id]=Fn.findExtremes(o,l,Vz(n)))}}};function Uz(t){return A2(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function Vz(t){return A2(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function A2(t,e,r,a,i,n){var o=t/2,l=n;if(e==="pixel"){var s=i?k2.extractPathCoords(i,n?xo.paramIsY:xo.paramIsX):[r,a],f=Yd.aggNums(Math.max,null,s),c=Yd.aggNums(Math.min,null,s),v=c<0?Math.abs(c)+o:o,u=f>0?f+o:o;return{ppad:o,ppadplus:l?v:u,ppadminus:l?u:v}}else return{ppad:o}}function Q0(t,e,r,a,i){var n=t.type==="category"||t.type==="multicategory"?t.r2c:t.d2c;if(e!==void 0)return[n(e),n(r)];if(a){var o=1/0,l=-1/0,s=a.match(xo.segmentRE),f,c,v,u,h;for(t.type==="date"&&(n=k2.decodeDate(n)),f=0;f<s.length;f++)c=s[f],v=i[c.charAt(0)].drawn,v!==void 0&&(u=s[f].substr(1).match(xo.paramRE),!(!u||u.length<v)&&(h=n(u[v]),h<o&&(o=h),h>l&&(l=h)));if(l>=o)return[o,l]}}var J0=Bw,Wz={moduleType:"component",name:"shapes",layoutAttributes:T2,supplyLayoutDefaults:Hz,supplyDrawNewShapeDefaults:jz,includeBasePlot:Hc("shapes"),calcAutorange:Gz,draw:J0.draw,drawOne:J0.drawOne},eb=Hr,Xz=It.templatedArray,tb=Fc,M2=Xz("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width.","When `xref` ends with ` domain`, units are sized relative","to the axis width."].join(" ")},sizey:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height.","When `yref` ends with ` domain`, units are sized relative","to the axis height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",eb.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",tb.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",eb.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",tb.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"}),Yz=de,kv=Ot,qz=Ua,Zz=M2,Kz="images",Qz=function(e,r){var a={name:Kz,handleItemDefaults:Jz};qz(e,r,a)};function Jz(t,e,r){function a(u,h){return Yz.coerce(t,e,Zz,u,h)}var i=a("source"),n=a("visible",!!i);if(!n)return e;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var o={_fullLayout:r},l=["x","y"],s=0;s<2;s++){var f=l[s],c=kv.coerceRef(t,e,o,f,"paper",void 0);if(c!=="paper"){var v=kv.getFromId(o,c);v._imgIndices.push(e._index)}kv.coercePosition(e,o,a,c,f,0)}return e}var rb=yt,eI=Et,Nn=Ot,ab=nr,tI=bn,rI=function(e){var r=e._fullLayout,a=[],i={},n=[],o,l;for(l=0;l<r.images.length;l++){var s=r.images[l];if(s.visible)if(s.layer==="below"&&s.xref!=="paper"&&s.yref!=="paper"){o=ab.ref2id(s.xref)+ab.ref2id(s.yref);var f=r._plots[o];if(!f){n.push(s);continue}f.mainplot&&(o=f.mainplot.id),i[o]||(i[o]=[]),i[o].push(s)}else s.layer==="above"?a.push(s):n.push(s)}var c={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function v(g){var w=rb.select(this);if(this._imgSrc!==g.source)if(w.attr("xmlns",tI.svg),g.source&&g.source.slice(0,5)==="data:")w.attr("xlink:href",g.source),this._imgSrc=g.source;else{var b=new Promise(function(x){var _=new Image;this.img=_,_.setAttribute("crossOrigin","anonymous"),_.onerror=T,_.onload=function(){var k=document.createElement("canvas");k.width=this.width,k.height=this.height;var S=k.getContext("2d",{willReadFrequently:!0});S.drawImage(this,0,0);var M=k.toDataURL("image/png");w.attr("xlink:href",M),x()},w.on("error",T),_.src=g.source,this._imgSrc=g.source;function T(){w.remove(),x()}}.bind(this));e._promises.push(b)}}function u(g){var w=rb.select(this),b=Nn.getFromId(e,g.xref),x=Nn.getFromId(e,g.yref),_=Nn.getRefType(g.xref)==="domain",T=Nn.getRefType(g.yref)==="domain",k=r._size,S,M;b!==void 0?S=typeof g.xref=="string"&&_?b._length*g.sizex:Math.abs(b.l2p(g.sizex)-b.l2p(0)):S=g.sizex*k.w,x!==void 0?M=typeof g.yref=="string"&&T?x._length*g.sizey:Math.abs(x.l2p(g.sizey)-x.l2p(0)):M=g.sizey*k.h;var D=S*c.x[g.xanchor].offset,A=M*c.y[g.yanchor].offset,C=c.x[g.xanchor].sizing+c.y[g.yanchor].sizing,$,N;switch(b!==void 0?$=typeof g.xref=="string"&&_?b._length*g.x+b._offset:b.r2p(g.x)+b._offset:$=g.x*k.w+k.l,$+=D,x!==void 0?N=typeof g.yref=="string"&&T?x._length*(1-g.y)+x._offset:x.r2p(g.y)+x._offset:N=k.h-g.y*k.h+k.t,N+=A,g.sizing){case"fill":C+=" slice";break;case"stretch":C="none";break}w.attr({x:$,y:N,width:S,height:M,preserveAspectRatio:C,opacity:g.opacity});var E=b&&Nn.getRefType(g.xref)!=="domain"?b._id:"",P=x&&Nn.getRefType(g.yref)!=="domain"?x._id:"",R=E+P;eI.setClipUrl(w,R?"clip"+r._uid+R:null,e)}var h=r._imageLowerLayer.selectAll("image").data(n),d=r._imageUpperLayer.selectAll("image").data(a);h.enter().append("image"),d.enter().append("image"),h.exit().remove(),d.exit().remove(),h.each(function(g){v.bind(this)(g),u.bind(this)(g)}),d.each(function(g){v.bind(this)(g),u.bind(this)(g)});var p=Object.keys(r._plots);for(l=0;l<p.length;l++){o=p[l];var y=r._plots[o];if(y.imagelayer){var m=y.imagelayer.selectAll("image").data(i[o]||[]);m.enter().append("image"),m.exit().remove(),m.each(function(g){v.bind(this)(g),u.bind(this)(g)})}}},ib=_t,aI=mh,iI=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(n||o){for(var l=e._fullLayout.images,s=r._id.charAt(0),f,c,v=0;v<l.length;v++)if(f=l[v],c="images["+v+"].",f[s+"ref"]===r._id){var u=f[s],h=f["size"+s],d=null,p=null;if(n){d=aI(u,r.range);var y=h/Math.pow(10,d)/2;p=2*Math.log(y+Math.sqrt(1+y*y))/Math.LN10}else d=Math.pow(10,u),p=d*(Math.pow(10,h/2)-Math.pow(10,-h/2));ib(d)?ib(p)||(p=null):(d=null,p=null),i(c+s,d),i(c+"size"+s,p)}}},nI={moduleType:"component",name:"images",layoutAttributes:M2,supplyLayoutDefaults:Qz,includeBasePlot:Hc("images"),draw:rI,convertCoords:iI},Rp={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:"▼"}},oI=Dr,lI=$r,sI=Kt.extendFlat,fI=ai.overrideAll,cI=wh,S2=It.templatedArray,uI=S2("button",{visible:{valType:"boolean",description:"Determines whether or not this button is visible."},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called on click.","If the `skip` method is used, the API updatemenu will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","updatemenu events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on click."].join(" ")},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets a 2nd set of `args`,","these arguments values are passed to the Plotly","method set in `method` when clicking this button while in the active state.","Use this to create toggle buttons."].join(" ")},label:{valType:"string",dflt:"",description:"Sets the text label to appear on the button."},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_buttonclicked` method and executing the API command manually without losing","the benefit of the updatemenu automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}}),L2=fI(S2("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean",description:["Determines whether or not the update menu is visible."].join(" ")},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown",description:["Determines whether the buttons are accessible via a dropdown menu","or whether the buttons are stacked horizontally or vertically"].join(" ")},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down",description:["Determines the direction in which the buttons are laid out, whether","in a dropdown menu or a row/column of buttons. For `left` and `up`,","the buttons will still appear in left-to-right or top-to-bottom order","respectively."].join(" ")},active:{valType:"integer",min:-1,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},showactive:{valType:"boolean",dflt:!0,description:"Highlights active dropdown item or active button if true."},buttons:uI,x:{valType:"number",min:-2,max:3,dflt:-.05,description:"Sets the x position (in normalized coordinates) of the update menu."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right",description:["Sets the update menu's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,description:"Sets the y position (in normalized coordinates) of the update menu."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the update menu's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},pad:sI(cI({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:oI({description:"Sets the font of the update menu button text."}),bgcolor:{valType:"color",description:"Sets the background color of the update menu buttons."},bordercolor:{valType:"color",dflt:lI.borderLine,description:"Sets the color of the border enclosing the update menu."},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw",description:"Sets the width (in px) of the border enclosing the update menu."}}),"arraydraw","from-root"),_f=de,C2=Ua,D2=L2,vI=Rp,dI=vI.name,hI=D2.buttons,pI=function(e,r){var a={name:dI,handleItemDefaults:mI};C2(e,r,a)};function mI(t,e,r){function a(o,l){return _f.coerce(t,e,D2,o,l)}var i=C2(t,e,{name:"buttons",handleItemDefaults:yI}),n=a("visible",i.length>0);n&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),_f.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),_f.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function yI(t,e){function r(i,n){return _f.coerce(t,e,hI,i,n)}var a=r("visible",t.method==="skip"||Array.isArray(t.args));a&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}var gI=Zt,ka=yt,nb=ut,co=Et,Yf=de;function Zt(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Zt.barWidth=2;Zt.barLength=20;Zt.barRadius=2;Zt.barPad=1;Zt.barColor="#808BA4";Zt.prototype.enable=function(e,r,a){var i=this.gd._fullLayout,n=i.width,o=i.height;this.position=e;var l=this.position.l,s=this.position.w,f=this.position.t,c=this.position.h,v=this.position.direction,u=v==="down",h=v==="left",d=v==="right",p=v==="up",y=s,m=c,g,w,b,x;!u&&!h&&!d&&!p&&(this.position.direction="down",u=!0);var _=u||p;_?(g=l,w=g+y,u?(b=f,x=Math.min(b+m,o),m=x-b):(x=f+m,b=Math.max(x-m,0),m=x-b)):(b=f,x=b+m,h?(w=l+y,g=Math.max(w-y,0),y=w-g):(g=l,w=Math.min(g+y,n),y=w-g)),this._box={l:g,t:b,w:y,h:m};var T=s>y,k=Zt.barLength+2*Zt.barPad,S=Zt.barWidth+2*Zt.barPad,M=l,D=f+c;D+S>o&&(D=o-S);var A=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);A.exit().on(".drag",null).remove(),A.enter().append("rect").classed("scrollbar-horizontal",!0).call(nb.fill,Zt.barColor),T?(this.hbar=A.attr({rx:Zt.barRadius,ry:Zt.barRadius,x:M,y:D,width:k,height:S}),this._hbarXMin=M+k/2,this._hbarTranslateMax=y-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=c>m,$=Zt.barWidth+2*Zt.barPad,N=Zt.barLength+2*Zt.barPad,E=l+s,P=f;E+$>n&&(E=n-$);var R=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(nb.fill,Zt.barColor),C?(this.vbar=R.attr({rx:Zt.barRadius,ry:Zt.barRadius,x:E,y:P,width:$,height:N}),this._vbarYMin=P+N/2,this._vbarTranslateMax=m-N):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var L=this.id,z=g-.5,I=C?w+$+.5:w+.5,H=b-.5,V=T?x+S+.5:x+.5,O=i._topdefs.selectAll("#"+L).data(T||C?[0]:[]);if(O.exit().remove(),O.enter().append("clipPath").attr("id",L).append("rect"),T||C?(this._clipRect=O.select("rect").attr({x:Math.floor(z),y:Math.floor(H),width:Math.ceil(I)-Math.floor(z),height:Math.ceil(V)-Math.floor(H)}),this.container.call(co.setClipUrl,L,this.gd),this.bg.attr({x:l,y:f,width:s,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(co.setClipUrl,null),delete this._clipRect),T||C){var X=ka.behavior.drag().on("dragstart",function(){ka.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(X);var G=ka.behavior.drag().on("dragstart",function(){ka.event.sourceEvent.preventDefault(),ka.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(G),C&&this.vbar.on(".drag",null).call(G)}this.setTranslate(r,a)};Zt.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(co.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)};Zt.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=ka.event.dx),this.vbar&&(r-=ka.event.dy),this.setTranslate(e,r)};Zt.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=ka.event.deltaY),this.vbar&&(r+=ka.event.deltaY),this.setTranslate(e,r)};Zt.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,i=a+this._hbarTranslateMax,n=Yf.constrain(ka.event.x,a,i),o=(n-a)/(i-a),l=this.position.w-this._box.w;e=o*l}if(this.vbar){var s=r+this._vbarYMin,f=s+this._vbarTranslateMax,c=Yf.constrain(ka.event.y,s,f),v=(c-s)/(f-s),u=this.position.h-this._box.h;r=v*u}this.setTranslate(e,r)};Zt.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=Yf.constrain(e||0,0,a),r=Yf.constrain(r||0,0,i),this.translateX=e,this.translateY=r,this.container.call(co.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var n=e/a;this.hbar.call(co.setTranslate,e+n*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(co.setTranslate,e,r+o*this._vbarTranslateMax)}};var _o=yt,Bl=sr,jl=ut,wo=Et,Jr=de,qf=wr,bI=It.arrayEditor,$2=Yr.LINE_SPACING,lt=Rp,xI=gI,_I=function(e){var r=e._fullLayout,a=Jr.filterVisible(r[lt.name]);function i(u){Bl.autoMargin(e,I2(u))}var n=r._menulayer.selectAll("g."+lt.containerClassName).data(a.length>0?[0]:[]);if(n.enter().append("g").classed(lt.containerClassName,!0).style("cursor","pointer"),n.exit().each(function(){_o.select(this).selectAll("g."+lt.headerGroupClassName).each(i)}).remove(),a.length!==0){var o=n.selectAll("g."+lt.headerGroupClassName).data(a,wI);o.enter().append("g").classed(lt.headerGroupClassName,!0);for(var l=Jr.ensureSingle(n,"g",lt.dropdownButtonGroupClassName,function(u){u.style("pointer-events","all")}),s=0;s<a.length;s++){var f=a[s];LI(e,f)}var c="updatemenus"+r._uid,v=new xI(e,l,c);o.enter().size()&&(l.node().parentNode.appendChild(l.node()),l.call(Zd)),o.exit().each(function(u){l.call(Zd),i(u)}).remove(),o.each(function(u){var h=_o.select(this),d=u.type==="dropdown"?l:null;Bl.manageCommandObserver(e,u,u.buttons,function(p){qd(e,u,u.buttons[p.index],h,d,v,p.index,!0)}),u.type==="dropdown"?(E2(e,h,l,v,u),P2(l,u)&&Gl(e,h,l,v,u)):Gl(e,h,null,null,u)})}};function wI(t){return t._index}function TI(t){return+t.attr(lt.menuIndexAttrName)==-1}function P2(t,e){return+t.attr(lt.menuIndexAttrName)===e._index}function qd(t,e,r,a,i,n,o,l){e.active=o,bI(t.layout,lt.name,e).applyUpdate("active",o),e.type==="buttons"?Gl(t,a,null,null,e):e.type==="dropdown"&&(i.attr(lt.menuIndexAttrName,"-1"),E2(t,a,i,n,e),l||Gl(t,a,i,n,e))}function E2(t,e,r,a,i){var n=Jr.ensureSingle(e,"g",lt.headerClassName,function(u){u.style("pointer-events","all")}),o=i._dims,l=i.active,s=i.buttons[l]||lt.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},c={width:o.headerWidth,height:o.headerHeight};n.call(zp,i,s,t).call(F2,i,f,c);var v=Jr.ensureSingle(e,"text",lt.headerArrowClassName,function(u){u.attr("text-anchor","end").call(wo.font,i.font).text(lt.arrowSymbol[i.direction])});v.attr({x:o.headerWidth-lt.arrowOffsetX+i.pad.l,y:o.headerHeight/2+lt.textOffsetY+i.pad.t}),n.on("click",function(){r.call(Zd,String(P2(r,i)?-1:i._index)),Gl(t,e,r,a,i)}),n.on("mouseover",function(){n.call(R2)}),n.on("mouseout",function(){n.call(z2,i)}),wo.setTranslate(e,o.lx,o.ly)}function Gl(t,e,r,a,i){r||(r=e,r.attr("pointer-events","all"));var n=!TI(r)||i.type==="buttons"?i.buttons:[],o=i.type==="dropdown"?lt.dropdownButtonClassName:lt.buttonClassName,l=r.selectAll("g."+o).data(Jr.filterVisible(n)),s=l.enter().append("g").classed(o,!0),f=l.exit();i.type==="dropdown"?(s.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var c=0,v=0,u=i._dims,h=["up","down"].indexOf(i.direction)!==-1;i.type==="dropdown"&&(h?v=u.headerHeight+lt.gapButtonHeader:c=u.headerWidth+lt.gapButtonHeader),i.type==="dropdown"&&i.direction==="up"&&(v=-lt.gapButtonHeader+lt.gapButton-u.openHeight),i.type==="dropdown"&&i.direction==="left"&&(c=-lt.gapButtonHeader+lt.gapButton-u.openWidth);var d={x:u.lx+c+i.pad.l,y:u.ly+v+i.pad.t,yPad:lt.gapButton,xPad:lt.gapButton,index:0},p={l:d.x+i.borderwidth,t:d.y+i.borderwidth};l.each(function(y,m){var g=_o.select(this);g.call(zp,i,y,t).call(F2,i,d),g.on("click",function(){_o.event.defaultPrevented||(y.execute&&(y.args2&&i.active===m?(qd(t,i,y,e,r,a,-1),Bl.executeAPICommand(t,y.method,y.args2)):(qd(t,i,y,e,r,a,m),Bl.executeAPICommand(t,y.method,y.args))),t.emit("plotly_buttonclicked",{menu:i,button:y,active:i.active}))}),g.on("mouseover",function(){g.call(R2)}),g.on("mouseout",function(){g.call(z2,i),l.call(ob,i)})}),l.call(ob,i),h?(p.w=Math.max(u.openWidth,u.headerWidth),p.h=d.y-p.t):(p.w=d.x-p.l,p.h=Math.max(u.openHeight,u.headerHeight)),p.direction=i.direction,a&&(l.size()?kI(t,e,r,a,i,p):AI(a))}function kI(t,e,r,a,i,n){var o=i.direction,l=o==="up"||o==="down",s=i._dims,f=i.active,c,v,u;if(l)for(v=0,u=0;u<f;u++)v+=s.heights[u]+lt.gapButton;else for(c=0,u=0;u<f;u++)c+=s.widths[u]+lt.gapButton;a.enable(n,c,v),a.hbar&&a.hbar.attr("opacity","0").transition().attr("opacity","1"),a.vbar&&a.vbar.attr("opacity","0").transition().attr("opacity","1")}function AI(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr("opacity","0").each("end",function(){e=!1,r||t.disable()}),r&&t.vbar.transition().attr("opacity","0").each("end",function(){r=!1,e||t.disable()})}function zp(t,e,r,a){t.call(MI,e).call(SI,e,r,a)}function MI(t,e){var r=Jr.ensureSingle(t,"rect",lt.itemRectClassName,function(a){a.attr({rx:lt.rx,ry:lt.ry,"shape-rendering":"crispEdges"})});r.call(jl.stroke,e.bordercolor).call(jl.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function SI(t,e,r,a){var i=Jr.ensureSingle(t,"text",lt.itemTextClassName,function(l){l.attr({"text-anchor":"start","data-notex":1})}),n=r.label,o=a._fullLayout._meta;o&&(n=Jr.templateString(n,o)),i.call(wo.font,e.font).text(n).call(qf.convertToTspans,a)}function ob(t,e){var r=e.active;t.each(function(a,i){var n=_o.select(this);i===r&&e.showactive&&n.select("rect."+lt.itemRectClassName).call(jl.fill,lt.activeColor)})}function R2(t){t.select("rect."+lt.itemRectClassName).call(jl.fill,lt.hoverColor)}function z2(t,e){t.select("rect."+lt.itemRectClassName).call(jl.fill,e.bgcolor)}function LI(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=wo.tester.selectAll("g."+lt.dropdownButtonClassName).data(Jr.filterVisible(e.buttons));a.enter().append("g").classed(lt.dropdownButtonClassName,!0);var i=["up","down"].indexOf(e.direction)!==-1;a.each(function(c,v){var u=_o.select(this);u.call(zp,e,c,t);var h=u.select("."+lt.itemTextClassName),d=h.node()&&wo.bBox(h.node()).width,p=Math.max(d+lt.textPadX,lt.minWidth),y=e.font.size*$2,m=qf.lineCount(h),g=Math.max(y*m,lt.minHeight)+lt.textOffsetY;g=Math.ceil(g),p=Math.ceil(p),r.widths[v]=p,r.heights[v]=g,r.height1=Math.max(r.height1,g),r.width1=Math.max(r.width1,p),i?(r.totalWidth=Math.max(r.totalWidth,p),r.openWidth=r.totalWidth,r.totalHeight+=g+lt.gapButton,r.openHeight+=g+lt.gapButton):(r.totalWidth+=p+lt.gapButton,r.openWidth+=p+lt.gapButton,r.totalHeight=Math.max(r.totalHeight,g),r.openHeight=r.totalHeight)}),i?r.totalHeight-=lt.gapButton:r.totalWidth-=lt.gapButton,r.headerWidth=r.width1+lt.arrowPadX,r.headerHeight=r.height1,e.type==="dropdown"&&(i?(r.width1+=lt.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=lt.arrowPadX),a.remove();var n=r.totalWidth+e.pad.l+e.pad.r,o=r.totalHeight+e.pad.t+e.pad.b,l=t._fullLayout._size;r.lx=l.l+l.w*e.x,r.ly=l.t+l.h*(1-e.y);var s="left";Jr.isRightAnchor(e)&&(r.lx-=n,s="right"),Jr.isCenterAnchor(e)&&(r.lx-=n/2,s="center");var f="top";Jr.isBottomAnchor(e)&&(r.ly-=o,f="bottom"),Jr.isMiddleAnchor(e)&&(r.ly-=o/2,f="middle"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),Bl.autoMargin(t,I2(e),{x:e.x,y:e.y,l:n*({right:1,center:.5}[s]||0),r:n*({left:1,center:.5}[s]||0),b:o*({top:1,middle:.5}[f]||0),t:o*({bottom:1,middle:.5}[f]||0)})}function I2(t){return lt.autoMarginIdRoot+t._index}function F2(t,e,r,a){a=a||{};var i=t.select("."+lt.itemRectClassName),n=t.select("."+lt.itemTextClassName),o=e.borderwidth,l=r.index,s=e._dims;wo.setTranslate(t,o+r.x,o+r.y);var f=["up","down"].indexOf(e.direction)!==-1,c=a.height||(f?s.heights[l]:s.height1);i.attr({x:0,y:0,width:a.width||(f?s.width1:s.widths[l]),height:c});var v=e.font.size*$2,u=qf.lineCount(n),h=(u-1)*v/2;qf.positionText(n,lt.textOffsetX,c/2-h+lt.textOffsetY),f?r.y+=s.heights[l]+r.yPad:r.x+=s.widths[l]+r.xPad,r.index++}function Zd(t,e){t.attr(lt.menuIndexAttrName,e||"-1").selectAll("g."+lt.dropdownButtonClassName).remove()}var CI=Rp,DI={moduleType:"component",name:CI.name,layoutAttributes:L2,supplyLayoutDefaults:pI,draw:_I},Vc={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},lb=Dr,$I=wh,PI=Kt.extendDeepAll,EI=ai.overrideAll,RI=hc,N2=It.templatedArray,Gi=Vc,zI=N2("step",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not this step is included in the slider."].join(" ")},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called when the slider value is changed.","If the `skip` method is used, the API slider will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","slider events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on slide."].join(" ")},label:{valType:"string",description:"Sets the text label to appear on the slider"},value:{valType:"string",description:["Sets the value of the slider step, used to refer to the step programatically.","Defaults to the slider label if not provided."].join(" ")},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_sliderchange` method and executing the API command manually without losing","the benefit of the slider automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}}),H2=EI(N2("slider",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not the slider is visible."].join(" ")},active:{valType:"number",min:0,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},steps:zI,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this slider length","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the slider","This measure excludes the padding of both ends.","That is, the slider's length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the x position (in normalized coordinates) of the slider."},pad:PI($I({editType:"arraydraw"}),{description:"Set the padding of the slider component along each side."},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",description:["Sets the slider's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the y position (in normalized coordinates) of the slider."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the slider's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},transition:{duration:{valType:"number",min:0,dflt:150,description:"Sets the duration of the slider transition"},easing:{valType:"enumerated",values:RI.transition.easing.values,dflt:"cubic-in-out",description:"Sets the easing function of the slider transition"}},currentvalue:{visible:{valType:"boolean",dflt:!0,description:["Shows the currently-selected value above the slider."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",description:["The alignment of the value readout relative to the length of the slider."].join(" ")},offset:{valType:"number",dflt:10,description:["The amount of space, in pixels, between the current value label","and the slider."].join(" ")},prefix:{valType:"string",description:"When currentvalue.visible is true, this sets the prefix of the label."},suffix:{valType:"string",description:"When currentvalue.visible is true, this sets the suffix of the label."},font:lb({description:"Sets the font of the current value label text."})},font:lb({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:Gi.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:Gi.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:Gi.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:Gi.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:Gi.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:Gi.tickColor,description:"Sets the color of the border enclosing the slider."},tickwidth:{valType:"number",min:0,dflt:1,description:"Sets the tick width (in px)."},minorticklen:{valType:"number",min:0,dflt:Gi.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root"),Kn=de,O2=Ua,B2=H2,II=Vc,FI=II.name,NI=B2.steps,HI=function(e,r){O2(e,r,{name:FI,handleItemDefaults:OI})};function OI(t,e,r){function a(v,u){return Kn.coerce(t,e,B2,v,u)}for(var i=O2(t,e,{name:"steps",handleItemDefaults:BI}),n=0,o=0;o<i.length;o++)i[o].visible&&n++;var l;if(n<2?l=e.visible=!1:l=a("visible"),!!l){e._stepCount=n;var s=e._visibleSteps=Kn.filterVisible(i),f=a("active");(i[f]||{}).visible||(e.active=s[0]._index),a("x"),a("y"),Kn.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("len"),a("lenmode"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Kn.coerceFont(a,"font",r.font);var c=a("currentvalue.visible");c&&(a("currentvalue.xanchor"),a("currentvalue.prefix"),a("currentvalue.suffix"),a("currentvalue.offset"),Kn.coerceFont(a,"currentvalue.font",e.font)),a("transition.duration"),a("transition.easing"),a("bgcolor"),a("activebgcolor"),a("bordercolor"),a("borderwidth"),a("ticklen"),a("tickwidth"),a("tickcolor"),a("minorticklen")}}function BI(t,e){function r(n,o){return Kn.coerce(t,e,NI,n,o)}var a;if(t.method!=="skip"&&!Array.isArray(t.args)?a=e.visible=!1:a=r("visible"),a){r("method"),r("args");var i=r("label","step-"+e._index);r("value",i),r("execute")}}var Aa=yt,Zf=sr,Si=ut,La=Et,ea=de,jI=ea.strTranslate,_l=wr,GI=It.arrayEditor,gt=Vc,Ip=Yr,j2=Ip.LINE_SPACING,Av=Ip.FROM_TL,Mv=Ip.FROM_BR,UI=function(e){var r=e._context.staticPlot,a=e._fullLayout,i=VI(a,e),n=a._infolayer.selectAll("g."+gt.containerClassName).data(i.length>0?[0]:[]);n.enter().append("g").classed(gt.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),Zf.autoMargin(e,G2(c))}if(n.exit().each(function(){Aa.select(this).selectAll("g."+gt.groupClassName).each(o)}).remove(),i.length!==0){var l=n.selectAll("g."+gt.groupClassName).data(i,WI);l.enter().append("g").classed(gt.groupClassName,!0),l.exit().each(o).remove();for(var s=0;s<i.length;s++){var f=i[s];XI(e,f)}l.each(function(c){var v=Aa.select(this);QI(c),Zf.manageCommandObserver(e,c,c._visibleSteps,function(u){var h=v.data()[0];h.active!==u.index&&(h._dragging||V2(e,v,h,u.index,!1,!0))}),YI(e,Aa.select(this),c)})}};function G2(t){return gt.autoMarginIdRoot+t._index}function VI(t,e){for(var r=t[gt.name],a=[],i=0;i<r.length;i++){var n=r[i];n.visible&&(n._gd=e,a.push(n))}return a}function WI(t){return t._index}function XI(t,e){var r=La.tester.selectAll("g."+gt.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(gt.labelGroupClass,!0);var a=0,i=0;r.each(function(d){var p=Aa.select(this),y=U2(p,{step:d},e),m=y.node();if(m){var g=La.bBox(m);i=Math.max(i,g.height),a=Math.max(a,g.width)}}),r.remove();var n=e._dims={};n.inputAreaWidth=Math.max(gt.railWidth,gt.gripHeight);var o=t._fullLayout._size;n.lx=o.l+o.w*e.x,n.ly=o.t+o.h*(1-e.y),e.lenmode==="fraction"?n.outerLength=Math.round(o.w*e.len):n.outerLength=e.len,n.inputAreaStart=0,n.inputAreaLength=Math.round(n.outerLength-e.pad.l-e.pad.r);var l=n.inputAreaLength-2*gt.stepInset,s=l/(e._stepCount-1),f=a+gt.labelPadding;if(n.labelStride=Math.max(1,Math.ceil(f/s)),n.labelHeight=i,n.currentValueMaxWidth=0,n.currentValueHeight=0,n.currentValueTotalHeight=0,n.currentValueMaxLines=1,e.currentvalue.visible){var c=La.tester.append("g");r.each(function(d){var p=Kf(c,e,d.label),y=p.node()&&La.bBox(p.node())||{width:0,height:0},m=_l.lineCount(p);n.currentValueMaxWidth=Math.max(n.currentValueMaxWidth,Math.ceil(y.width)),n.currentValueHeight=Math.max(n.currentValueHeight,Math.ceil(y.height)),n.currentValueMaxLines=Math.max(n.currentValueMaxLines,m)}),n.currentValueTotalHeight=n.currentValueHeight+e.currentvalue.offset,c.remove()}n.height=n.currentValueTotalHeight+gt.tickOffset+e.ticklen+gt.labelOffset+n.labelHeight+e.pad.t+e.pad.b;var v="left";ea.isRightAnchor(e)&&(n.lx-=n.outerLength,v="right"),ea.isCenterAnchor(e)&&(n.lx-=n.outerLength/2,v="center");var u="top";ea.isBottomAnchor(e)&&(n.ly-=n.height,u="bottom"),ea.isMiddleAnchor(e)&&(n.ly-=n.height/2,u="middle"),n.outerLength=Math.ceil(n.outerLength),n.height=Math.ceil(n.height),n.lx=Math.round(n.lx),n.ly=Math.round(n.ly);var h={y:e.y,b:n.height*Mv[u],t:n.height*Av[u]};e.lenmode==="fraction"?(h.l=0,h.xl=e.x-e.len*Av[v],h.r=0,h.xr=e.x+e.len*Mv[v]):(h.x=e.x,h.l=n.outerLength*Av[v],h.r=n.outerLength*Mv[v]),Zf.autoMargin(t,G2(e),h)}function YI(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(Kf,r).call(eF,r).call(ZI,r).call(KI,r).call(JI,t,r).call(qI,t,r);var a=r._dims;La.setTranslate(e,a.lx+r.pad.l,a.ly+r.pad.t),e.call(X2,r,!1),e.call(Kf,r)}function Kf(t,e,r){if(e.currentvalue.visible){var a=e._dims,i,n;switch(e.currentvalue.xanchor){case"right":i=a.inputAreaLength-gt.currentValueInset-a.currentValueMaxWidth,n="left";break;case"center":i=a.inputAreaLength*.5,n="middle";break;default:i=gt.currentValueInset,n="left"}var o=ea.ensureSingle(t,"text",gt.labelClass,function(u){u.attr({"text-anchor":n,"data-notex":1})}),l=e.currentvalue.prefix?e.currentvalue.prefix:"";if(typeof r=="string")l+=r;else{var s=e.steps[e.active].label,f=e._gd._fullLayout._meta;f&&(s=ea.templateString(s,f)),l+=s}e.currentvalue.suffix&&(l+=e.currentvalue.suffix),o.call(La.font,e.currentvalue.font).text(l).call(_l.convertToTspans,e._gd);var c=_l.lineCount(o),v=(a.currentValueMaxLines+1-c)*e.currentvalue.font.size*j2;return _l.positionText(o,i,v),o}}function qI(t,e,r){var a=ea.ensureSingle(t,"rect",gt.gripRectClass,function(i){i.call(W2,e,t,r).style("pointer-events","all")});a.attr({width:gt.gripWidth,height:gt.gripHeight,rx:gt.gripRadius,ry:gt.gripRadius}).call(Si.stroke,r.bordercolor).call(Si.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function U2(t,e,r){var a=ea.ensureSingle(t,"text",gt.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),i=e.step.label,n=r._gd._fullLayout._meta;return n&&(i=ea.templateString(i,n)),a.call(La.font,r.font).text(i).call(_l.convertToTspans,r._gd),a}function ZI(t,e){var r=ea.ensureSingle(t,"g",gt.labelsClass),a=e._dims,i=r.selectAll("g."+gt.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(gt.labelGroupClass,!0),i.exit().remove(),i.each(function(n){var o=Aa.select(this);o.call(U2,n,e),La.setTranslate(o,Fp(e,n.fraction),gt.tickOffset+e.ticklen+e.font.size*j2+gt.labelOffset+a.currentValueTotalHeight)})}function sb(t,e,r,a,i){var n=Math.round(a*(r._stepCount-1)),o=r._visibleSteps[n]._index;o!==r.active&&V2(t,e,r,o,!0,i)}function V2(t,e,r,a,i,n){var o=r.active;r.active=a,GI(t.layout,gt.name,r).applyUpdate("active",a);var l=r.steps[r.active];e.call(X2,r,n),e.call(Kf,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),l&&l.method&&i&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=i,e._nextMethod.doTransition=n):(e._nextMethod={step:l,doCallback:i,doTransition:n},e._nextMethodRaf=window.requestAnimationFrame(function(){var s=e._nextMethod.step;s.method&&(s.execute&&Zf.executeAPICommand(t,s.method,s.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function W2(t,e,r){if(e._context.staticPlot)return;var a=r.node(),i=Aa.select(e);function n(){return r.data()[0]}function o(){var l=n();e.emit("plotly_sliderstart",{slider:l});var s=r.select("."+gt.gripRectClass);Aa.event.stopPropagation(),Aa.event.preventDefault(),s.call(Si.fill,l.activebgcolor);var f=fb(l,Aa.mouse(a)[0]);sb(e,r,l,f,!0),l._dragging=!0;function c(){var u=n(),h=fb(u,Aa.mouse(a)[0]);sb(e,r,u,h,!1)}i.on("mousemove",c),i.on("touchmove",c);function v(){var u=n();u._dragging=!1,s.call(Si.fill,u.bgcolor),i.on("mouseup",null),i.on("mousemove",null),i.on("touchend",null),i.on("touchmove",null),e.emit("plotly_sliderend",{slider:u,step:u.steps[u.active]})}i.on("mouseup",v),i.on("touchend",v)}t.on("mousedown",o),t.on("touchstart",o)}function KI(t,e){var r=t.selectAll("rect."+gt.tickRectClass).data(e._visibleSteps),a=e._dims;r.enter().append("rect").classed(gt.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(i,n){var o=n%a.labelStride===0,l=Aa.select(this);l.attr({height:o?e.ticklen:e.minorticklen}).call(Si.fill,e.tickcolor),La.setTranslate(l,Fp(e,n/(e._stepCount-1))-.5*e.tickwidth,(o?gt.tickOffset:gt.minorTickOffset)+a.currentValueTotalHeight)})}function QI(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,a=0;a<r;a+=e.labelStride)e.labelSteps.push({fraction:a/(r-1),step:t._visibleSteps[a]})}function X2(t,e,r){for(var a=t.select("rect."+gt.gripRectClass),i=0,n=0;n<e._stepCount;n++)if(e._visibleSteps[n]._index===e.active){i=n;break}var o=Fp(e,i/(e._stepCount-1));if(!e._invokingCommand){var l=a;r&&e.transition.duration>0&&(l=l.transition().duration(e.transition.duration).ease(e.transition.easing)),l.attr("transform",jI(o-gt.gripWidth*.5,e._dims.currentValueTotalHeight))}}function Fp(t,e){var r=t._dims;return r.inputAreaStart+gt.stepInset+(r.inputAreaLength-2*gt.stepInset)*Math.min(1,Math.max(0,e))}function fb(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-gt.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*gt.stepInset-2*r.inputAreaStart)))}function JI(t,e,r){var a=r._dims,i=ea.ensureSingle(t,"rect",gt.railTouchRectClass,function(n){n.call(W2,e,t,r).style("pointer-events","all")});i.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,gt.tickOffset+r.ticklen+a.labelHeight)}).call(Si.fill,r.bgcolor).attr("opacity",0),La.setTranslate(i,0,a.currentValueTotalHeight)}function eF(t,e){var r=e._dims,a=r.inputAreaLength-gt.railInset*2,i=ea.ensureSingle(t,"rect",gt.railRectClass);i.attr({width:a,height:gt.railWidth,rx:gt.railRadius,ry:gt.railRadius,"shape-rendering":"crispEdges"}).call(Si.stroke,e.bordercolor).call(Si.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),La.setTranslate(i,gt.railInset,(r.inputAreaWidth-gt.railWidth)*.5+r.currentValueTotalHeight)}var tF=Vc,rF={moduleType:"component",name:tF.name,layoutAttributes:H2,supplyLayoutDefaults:HI,draw:UI},cb=$r,Np={bgcolor:{valType:"color",dflt:cb.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:cb.defaultLine,editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot",description:"Sets the border width of the range slider."},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"},Y2={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"},Wc={},Hp={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},aF=nr,iF=wr,q2=Hp,nF=Yr.LINE_SPACING,Qf=q2.name;function Z2(t){var e=t&&t[Qf];return e&&e.visible}Wc.isVisible=Z2;Wc.makeData=function(t){var e=aF.list({_fullLayout:t},"x",!0),r=t.margin,a=[];if(!t._has("gl2d"))for(var i=0;i<e.length;i++){var n=e[i];if(Z2(n)){a.push(n);var o=n[Qf];o._id=Qf+n._id,o._height=(t.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}t._rangeSliderData=a};Wc.autoMarginOpts=function(t,e){var r=t._fullLayout,a=e[Qf],i=e._id.charAt(0),n=0,o=0;if(e.side==="bottom"&&(n=e._depth,e.title.text!==r._dfltTitle[i])){o=1.5*e.title.font.size+10+a._offsetShift;var l=(e.title.text.match(iF.BR_TAG_ALL)||[]).length;o+=l*e.title.font.size*nF}return{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:a._height+n+Math.max(r.margin.b,o),pad:q2.extraPad+a._offsetShift*2}};var Sv,ub;function oF(){if(ub)return Sv;ub=1;var t=de,e=It,r=nr,a=Np,i=Y2;return Sv=function(o,l,s){var f=o[s],c=l[s];if(!(f.rangeslider||l._requestRangeslider[c._id]))return;t.isPlainObject(f.rangeslider)||(f.rangeslider={});var v=f.rangeslider,u=e.newContainer(c,"rangeslider");function h(M,D){return t.coerce(v,u,a,M,D)}var d,p;function y(M,D){return t.coerce(d,p,i,M,D)}var m=h("visible");if(m){h("bgcolor",l.plot_bgcolor),h("bordercolor"),h("borderwidth"),h("thickness"),h("autorange",!c.isValidRange(v.range)),h("range");var g=l._subplots;if(g)for(var w=g.cartesian.filter(function(M){return M.substr(0,M.indexOf("y"))===r.name2id(s)}).map(function(M){return M.substr(M.indexOf("y"),M.length)}),b=t.simpleMap(w,r.id2name),x=0;x<b.length;x++){var _=b[x];d=v[_]||{},p=e.newContainer(u,_,"yaxis");var T=l[_],k;d.range&&T.isValidRange(d.range)&&(k="fixed");var S=y("rangemode",k);S!=="match"&&y("range",T.range.slice())}u._input=v}},Sv}var Lv,vb;function lF(){if(vb)return Lv;vb=1;var t=nr.list,e=ts.getAutoRange,r=Hp;return Lv=function(i){for(var n=t(i,"x",!0),o=0;o<n.length;o++){var l=n[o],s=l[r.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=e(i,l))}},Lv}var Cv,db;function sF(){if(db)return Cv;db=1;var t=yt,e=tt,r=sr,a=de,i=a.strTranslate,n=Et,o=ut,l=wc,s=fr,f=nr,c=Va,v=Pi,u=Hp;Cv=function(T){for(var k=T._fullLayout,S=k._rangeSliderData,M=0;M<S.length;M++){var D=S[M][u.name];D._clipId=D._id+"-"+k._uid}function A($){return $._name}var C=k._infolayer.selectAll("g."+u.containerClassName).data(S,A);C.exit().each(function($){var N=$[u.name];k._topdefs.select("#"+N._clipId).remove()}).remove(),S.length!==0&&(C.enter().append("g").classed(u.containerClassName,!0).attr("pointer-events","all"),C.each(function($){var N=t.select(this),E=$[u.name],P=k[f.id2name($.anchor)],R=E[f.id2name($.anchor)];if(E.range){var L=a.simpleMap(E.range,$.r2l),z=a.simpleMap($.range,$.r2l),I;z[0]<z[1]?I=[Math.min(L[0],z[0]),Math.max(L[1],z[1])]:I=[Math.max(L[0],z[0]),Math.min(L[1],z[1])],E.range=E._input.range=a.simpleMap(I,$.l2r)}$.cleanRange("rangeslider.range");var H=k._size,V=$.domain;E._width=H.w*(V[1]-V[0]);var O=Math.round(H.l+H.w*V[0]),X=Math.round(H.t+H.h*(1-$._counterDomainMin)+($.side==="bottom"?$._depth:0)+E._offsetShift+u.extraPad);N.attr("transform",i(O,X)),E._rl=a.simpleMap(E.range,$.r2l);var G=E._rl[0],Y=E._rl[1],K=Y-G;if(E.p2d=function(se){return se/E._width*K+G},E.d2p=function(se){return(se-G)/K*E._width},$.rangebreaks){var Z=$.locateBreaks(G,Y);if(Z.length){var q,ie,fe=0;for(q=0;q<Z.length;q++)ie=Z[q],fe+=ie.max-ie.min;var be=E._width/(Y-G-fe),ne=[-be*G];for(q=0;q<Z.length;q++)ie=Z[q],ne.push(ne[ne.length-1]-be*(ie.max-ie.min));for(E.d2p=function(se){for(var pe=ne[0],ge=0;ge<Z.length;ge++){var _e=Z[ge];if(se>=_e.max)pe=ne[ge+1];else if(se<_e.min)break}return pe+be*se},q=0;q<Z.length;q++)ie=Z[q],ie.pmin=E.d2p(ie.min),ie.pmax=E.d2p(ie.max);E.p2d=function(se){for(var pe=ne[0],ge=0;ge<Z.length;ge++){var _e=Z[ge];if(se>=_e.pmax)pe=ne[ge+1];else if(se<_e.pmin)break}return(se-pe)/be}}}if(R.rangemode!=="match"){var U=P.r2l(R.range[0]),ae=P.r2l(R.range[1]),ce=ae-U;E.d2pOppAxis=function(se){return(se-U)/ce*E._height}}N.call(y,T,$,E).call(m,T,$,E).call(g,T,$,E).call(b,T,$,E,R).call(x,T,$,E).call(_,T,$,E),h(N,T,$,E),p(N,T,$,E,P,R),$.side==="bottom"&&l.draw(T,$._id+"title",{propContainer:$,propName:$._name+".title",placeholder:k._dfltTitle.x,attributes:{x:$._offset+$._length/2,y:X+E._height+E._offsetShift+10+1.5*$.title.font.size,"text-anchor":"middle"}})}))};function h(T,k,S,M){if(k._context.staticPlot)return;var D=T.select("rect."+u.slideBoxClassName).node(),A=T.select("rect."+u.grabAreaMinClassName).node(),C=T.select("rect."+u.grabAreaMaxClassName).node();function $(){var N=t.event,E=N.target,P=N.clientX||N.touches[0].clientX,R=P-T.node().getBoundingClientRect().left,L=M.d2p(S._rl[0]),z=M.d2p(S._rl[1]),I=c.coverSlip();this.addEventListener("touchmove",H),this.addEventListener("touchend",V),I.addEventListener("mousemove",H),I.addEventListener("mouseup",V);function H(O){var X=O.clientX||O.touches[0].clientX,G=+X-P,Y,K,Z;switch(E){case D:Z="ew-resize",Y=L+G,K=z+G;break;case A:Z="col-resize",Y=L+G,K=z;break;case C:Z="col-resize",Y=L,K=z+G;break;default:Z="ew-resize",Y=R,K=R+G;break}if(K<Y){var q=K;K=Y,Y=q}M._pixelMin=Y,M._pixelMax=K,v(t.select(I),Z),d(T,k,S,M)}function V(){I.removeEventListener("mousemove",H),I.removeEventListener("mouseup",V),this.removeEventListener("touchmove",H),this.removeEventListener("touchend",V),a.removeElement(I)}}T.on("mousedown",$),T.on("touchstart",$)}function d(T,k,S,M){function D($){return S.l2r(a.constrain($,M._rl[0],M._rl[1]))}var A=D(M.p2d(M._pixelMin)),C=D(M.p2d(M._pixelMax));window.requestAnimationFrame(function(){e.call("_guiRelayout",k,S._name+".range",[A,C])})}function p(T,k,S,M,D,A){var C=u.handleWidth/2;function $(O){return a.constrain(O,0,M._width)}function N(O){return a.constrain(O,0,M._height)}function E(O){return a.constrain(O,-C,M._width+C)}var P=$(M.d2p(S._rl[0])),R=$(M.d2p(S._rl[1]));if(T.select("rect."+u.slideBoxClassName).attr("x",P).attr("width",R-P),T.select("rect."+u.maskMinClassName).attr("width",P),T.select("rect."+u.maskMaxClassName).attr("x",R).attr("width",M._width-R),A.rangemode!=="match"){var L=M._height-N(M.d2pOppAxis(D._rl[1])),z=M._height-N(M.d2pOppAxis(D._rl[0]));T.select("rect."+u.maskMinOppAxisClassName).attr("x",P).attr("height",L).attr("width",R-P),T.select("rect."+u.maskMaxOppAxisClassName).attr("x",P).attr("y",z).attr("height",M._height-z).attr("width",R-P),T.select("rect."+u.slideBoxClassName).attr("y",L).attr("height",z-L)}var I=.5,H=Math.round(E(P-C))-I,V=Math.round(E(R-C))+I;T.select("g."+u.grabberMinClassName).attr("transform",i(H,I)),T.select("g."+u.grabberMaxClassName).attr("transform",i(V,I))}function y(T,k,S,M){var D=a.ensureSingle(T,"rect",u.bgClassName,function(N){N.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),A=M.borderwidth%2===0?M.borderwidth:M.borderwidth-1,C=-M._offsetShift,$=n.crispRound(k,M.borderwidth);D.attr({width:M._width+A,height:M._height+A,transform:i(C,C),"stroke-width":$}).call(o.stroke,M.bordercolor).call(o.fill,M.bgcolor)}function m(T,k,S,M){var D=k._fullLayout,A=a.ensureSingleById(D._topdefs,"clipPath",M._clipId,function(C){C.append("rect").attr({x:0,y:0})});A.select("rect").attr({width:M._width,height:M._height})}function g(T,k,S,M){var D=k.calcdata,A=T.selectAll("g."+u.rangePlotClassName).data(S._subplotsWith,a.identity);A.enter().append("g").attr("class",function($){return u.rangePlotClassName+" "+$}).call(n.setClipUrl,M._clipId,k),A.order(),A.exit().remove();var C;A.each(function($,N){var E=t.select(this),P=N===0,R=f.getFromId(k,$,"y"),L=R._name,z=M[L],I={data:[],layout:{xaxis:{type:S.type,domain:[0,1],range:M.range.slice(),calendar:S.calendar},width:M._width,height:M._height,margin:{t:0,b:0,l:0,r:0}},_context:k._context};S.rangebreaks&&(I.layout.xaxis.rangebreaks=S.rangebreaks),I.layout[L]={type:R.type,domain:[0,1],range:z.rangemode!=="match"?z.range.slice():R.range.slice(),calendar:R.calendar},R.rangebreaks&&(I.layout[L].rangebreaks=R.rangebreaks),r.supplyDefaults(I);var H=I._fullLayout.xaxis,V=I._fullLayout[L];H.clearCalc(),H.setScale(),V.clearCalc(),V.setScale();var O={id:$,plotgroup:E,xaxis:H,yaxis:V,isRangePlot:!0};P?C=O:(O.mainplot="xy",O.mainplotinfo=C),s.rangePlot(k,O,w(D,$))})}function w(T,k){for(var S=[],M=0;M<T.length;M++){var D=T[M],A=D[0].trace;A.xaxis+A.yaxis===k&&S.push(D)}return S}function b(T,k,S,M,D){var A=a.ensureSingle(T,"rect",u.maskMinClassName,function(E){E.attr({x:0,y:0,"shape-rendering":"crispEdges"})});A.attr("height",M._height).call(o.fill,u.maskColor);var C=a.ensureSingle(T,"rect",u.maskMaxClassName,function(E){E.attr({y:0,"shape-rendering":"crispEdges"})});if(C.attr("height",M._height).call(o.fill,u.maskColor),D.rangemode!=="match"){var $=a.ensureSingle(T,"rect",u.maskMinOppAxisClassName,function(E){E.attr({y:0,"shape-rendering":"crispEdges"})});$.attr("width",M._width).call(o.fill,u.maskOppAxisColor);var N=a.ensureSingle(T,"rect",u.maskMaxOppAxisClassName,function(E){E.attr({y:0,"shape-rendering":"crispEdges"})});N.attr("width",M._width).style("border-top",u.maskOppBorder).call(o.fill,u.maskOppAxisColor)}}function x(T,k,S,M){if(!k._context.staticPlot){var D=a.ensureSingle(T,"rect",u.slideBoxClassName,function(A){A.attr({y:0,cursor:u.slideBoxCursor,"shape-rendering":"crispEdges"})});D.attr({height:M._height,fill:u.slideBoxFill})}}function _(T,k,S,M){var D=a.ensureSingle(T,"g",u.grabberMinClassName),A=a.ensureSingle(T,"g",u.grabberMaxClassName),C={x:0,width:u.handleWidth,rx:u.handleRadius,fill:o.background,stroke:o.defaultLine,"stroke-width":u.handleStrokeWidth,"shape-rendering":"crispEdges"},$={y:Math.round(M._height/4),height:Math.round(M._height/2)},N=a.ensureSingle(D,"rect",u.handleMinClassName,function(z){z.attr(C)});N.attr($);var E=a.ensureSingle(A,"rect",u.handleMaxClassName,function(z){z.attr(C)});E.attr($);var P={width:u.grabAreaWidth,x:0,y:0,fill:u.grabAreaFill,cursor:k._context.staticPlot?void 0:u.grabAreaCursor},R=a.ensureSingle(D,"rect",u.grabAreaMinClassName,function(z){z.attr(P)});R.attr("height",M._height);var L=a.ensureSingle(A,"rect",u.grabAreaMaxClassName,function(z){z.attr(P)});L.attr("height",M._height)}return Cv}var fF=de,cF=Np,uF=Y2,Dv=Wc,vF={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:fF.extendFlat({},cF,{yaxis:uF})}}},layoutAttributes:Np,handleDefaults:oF(),calcAutorange:lF(),draw:sF(),isVisible:Dv.isVisible,makeData:Dv.makeData,autoMarginOpts:Dv.autoMarginOpts},dF=Dr,hb=$r,hF=It.templatedArray,pF=hF("button",{visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Determines whether or not this button is visible."},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot",description:["The unit of measurement that the `count` value will set the range by."].join(" ")},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot",description:["Sets the range update mode.","If *backward*, the range update shifts the start of range","back *count* times *step* milliseconds.","If *todate*, the range update shifts the start of range","back to the first timestamp from *count* times","*step* milliseconds back.","For example, with `step` set to *year* and `count` set to *1*","the range update shifts the start of the range back to","January 01 of the current year.","Month and year *todate* are currently available only","for the built-in (Gregorian) calendar."].join(" ")},count:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the number of steps to take to update the range.","Use with `step` to specify the update interval."].join(" ")},label:{valType:"string",editType:"plot",description:"Sets the text label to appear on the button."},editType:"plot",description:["Sets the specifications for each buttons.","By default, a range selector comes with no buttons."].join(" ")}),Kd={visible:{valType:"boolean",editType:"plot",description:["Determines whether or not this range selector is visible.","Note that range selectors are only available for x axes of","`type` set to or auto-typed to *date*."].join(" ")},buttons:pF,x:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:dF({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:hb.lightLine,editType:"plot",description:"Sets the background color of the range selector buttons."},activecolor:{valType:"color",editType:"plot",description:"Sets the background color of the active range selector button."},bordercolor:{valType:"color",dflt:hb.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the range selector."},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot",description:"Sets the width (in px) of the border enclosing the range selector."},editType:"plot"},K2={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10},wf=de,mF=ut,yF=It,gF=Ua,Q2=Kd,Qd=K2,bF=function(e,r,a,i,n){var o=e.rangeselector||{},l=yF.newContainer(r,"rangeselector");function s(h,d){return wf.coerce(o,l,Q2,h,d)}var f=gF(o,l,{name:"buttons",handleItemDefaults:xF,calendar:n}),c=s("visible",f.length>0);if(c){var v=_F(r,a,i);s("x",v[0]),s("y",v[1]),wf.noneOrAll(e,r,["x","y"]),s("xanchor"),s("yanchor"),wf.coerceFont(s,"font",a.font);var u=s("bgcolor");s("activecolor",mF.contrast(u,Qd.lightAmount,Qd.darkAmount)),s("bordercolor"),s("borderwidth")}};function xF(t,e,r,a){var i=a.calendar;function n(s,f){return wf.coerce(t,e,Q2.buttons,s,f)}var o=n("visible");if(o){var l=n("step");l!=="all"&&(i&&i!=="gregorian"&&(l==="month"||l==="year")?e.stepmode="backward":n("stepmode"),n("count")),n("label")}}function _F(t,e,r){for(var a=r.filter(function(l){return e[l].anchor===t._id}),i=0,n=0;n<a.length;n++){var o=e[a[n]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+Qd.yPad]}var wF=FA,TF=de.titleCase,kF=function(e,r){var a=e._name,i={};if(r.step==="all")i[a+".autorange"]=!0;else{var n=AF(e,r);i[a+".range[0]"]=n[0],i[a+".range[1]"]=n[1]}return i};function AF(t,e){var r=t.range,a=new Date(t.r2l(r[1])),i=e.step,n=wF["utc"+TF(i)],o=e.count,l;switch(e.stepmode){case"backward":l=t.l2r(+n.offset(a,-o));break;case"todate":var s=n.offset(a,-o);l=t.l2r(+n.ceil(s));break}var f=r[1];return[l,f]}var Jf=yt,MF=tt,SF=sr,pb=ut,J2=Et,ei=de,mb=ei.strTranslate,Tf=wr,LF=nr,Op=Yr,yb=Op.LINE_SPACING,gb=Op.FROM_TL,bb=Op.FROM_BR,Jd=K2,CF=kF,DF=function(e){var r=e._fullLayout,a=r._infolayer.selectAll(".rangeselector").data($F(e),PF);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(i){var n=Jf.select(this),o=i,l=o.rangeselector,s=n.selectAll("g.button").data(ei.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(f){var c=Jf.select(this),v=CF(o,f);f._isActive=EF(o,f,v),c.call($v,l,f),c.call(zF,l,f,e),c.on("click",function(){e._dragged||MF.call("_guiRelayout",e,v)}),c.on("mouseover",function(){f._isHovered=!0,c.call($v,l,f)}),c.on("mouseout",function(){f._isHovered=!1,c.call($v,l,f)})}),FF(e,s,l,o._name,n)})};function $F(t){for(var e=LF.list(t,"x",!0),r=[],a=0;a<e.length;a++){var i=e[a];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}function PF(t){return t._id}function EF(t,e,r){if(e.step==="all")return t.autorange===!0;var a=Object.keys(r);return t.range[0]===r[a[0]]&&t.range[1]===r[a[1]]}function $v(t,e,r){var a=ei.ensureSingle(t,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});a.attr({rx:Jd.rx,ry:Jd.ry}),a.call(pb.stroke,e.bordercolor).call(pb.fill,RF(e,r)).style("stroke-width",e.borderwidth+"px")}function RF(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}function zF(t,e,r,a){function i(o){Tf.convertToTspans(o,a)}var n=ei.ensureSingle(t,"text","selector-text",function(o){o.attr("text-anchor","middle")});n.call(J2.font,e.font).text(IF(r,a._fullLayout._meta)).call(i)}function IF(t,e){return t.label?e?ei.templateString(t.label,e):t.label:t.step==="all"?"all":t.count+t.step.charAt(0)}function FF(t,e,r,a,i){var n=0,o=0,l=r.borderwidth;e.each(function(){var h=Jf.select(this),d=h.select(".selector-text"),p=r.font.size*yb,y=Math.max(p*Tf.lineCount(d),16)+3;o=Math.max(o,y)}),e.each(function(){var h=Jf.select(this),d=h.select(".selector-rect"),p=h.select(".selector-text"),y=p.node()&&J2.bBox(p.node()).width,m=r.font.size*yb,g=Tf.lineCount(p),w=Math.max(y+10,Jd.minButtonWidth);h.attr("transform",mb(l+n,l)),d.attr({x:0,y:0,width:w,height:o}),Tf.positionText(p,w/2,o/2-(g-1)*m/2+3),n+=w+5});var s=t._fullLayout._size,f=s.l+s.w*r.x,c=s.t+s.h*(1-r.y),v="left";ei.isRightAnchor(r)&&(f-=n,v="right"),ei.isCenterAnchor(r)&&(f-=n/2,v="center");var u="top";ei.isBottomAnchor(r)&&(c-=o,u="bottom"),ei.isMiddleAnchor(r)&&(c-=o/2,u="middle"),n=Math.ceil(n),o=Math.ceil(o),f=Math.round(f),c=Math.round(c),SF.autoMargin(t,a+"-range-selector",{x:r.x,y:r.y,l:n*gb[v],r:n*bb[v],b:o*bb[u],t:o*gb[u]}),i.attr("transform",mb(f,c))}var NF={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Kd}}},layoutAttributes:Kd,handleDefaults:bF,draw:DF},Ri={},xb=Kt.extendFlat;Ri.attributes=function(t,e){t=t||{},e=e||{};var r={valType:"info_array",editType:t.editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},a=t.name?t.name+" ":"",i=t.trace?"trace ":"subplot ",n=e.description?" "+e.description:"",o={x:xb({},r,{description:["Sets the horizontal domain of this ",a,i,"(in plot fraction).",n].join("")}),y:xb({},r,{description:["Sets the vertical domain of this ",a,i,"(in plot fraction).",n].join("")}),editType:t.editType};return t.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this row in the grid for this ",a,i,".",n].join("")},o.column={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this column in the grid for this ",a,i,".",n].join("")}),o};Ri.defaults=function(t,e,r,a){var i=a&&a.x||[0,1],n=a&&a.y||[0,1],o=e.grid;if(o){var l=r("domain.column");l!==void 0&&(l<o.columns?i=o._domains.x[l]:delete t.domain.column);var s=r("domain.row");s!==void 0&&(s<o.rows?n=o._domains.y[s]:delete t.domain.row)}var f=r("domain.x",i),c=r("domain.y",n);f[0]<f[1]||(t.domain.x=i.slice()),c[0]<c[1]||(t.domain.y=n.slice())};var HF=de,OF=Mo.counter,BF=Ri.attributes,_b=Hr.idRegex,jF=It,eh={rows:{valType:"integer",min:1,editType:"plot",description:["The number of rows in the grid. If you provide a 2D `subplots`","array or a `yaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot",description:["Is the first row the top or the bottom? Note that columns","are always enumerated from left to right."].join(" ")},columns:{valType:"integer",min:1,editType:"plot",description:["The number of columns in the grid. If you provide a 2D `subplots`","array, the length of its longest row is used as the default.","If you give an `xaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[OF("xy").toString(),""],editType:"plot"},editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[_b.x.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[_b.y.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:BF({name:"grid",editType:"plot",noGridCell:!0},{description:["The first and last cells end exactly at the domain","edges, with no grout around the edges."].join(" ")}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot",description:["Sets where the x axis labels and titles go. *bottom* means","the very bottom of the grid. *bottom plot* is the lowest plot","that each x axis is used in. *top* and *top plot* are similar."].join(" ")},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot",description:["Sets where the y axis labels and titles go. *left* means","the very left edge of the grid. *left plot* is the leftmost plot","that each y axis is used in. *right* and *right plot* are similar."].join(" ")},editType:"plot"};function ec(t,e,r){var a=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});if(Array.isArray(a))return a;if(i.length)return i}function GF(t,e){var r=t.grid||{},a=ec(e,r,"x"),i=ec(e,r,"y");if(!t.grid&&!a&&!i)return;var n=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(a),l=Array.isArray(i),s=o&&a!==r.xaxes&&l&&i!==r.yaxes,f,c;n?(f=r.subplots.length,c=r.subplots[0].length):(l&&(f=i.length),o&&(c=a.length));var v=jF.newContainer(e,"grid");function u(_,T){return HF.coerce(r,v,eh,_,T)}var h=u("rows",f),d=u("columns",c);if(!(h*d>1)){delete e.grid;return}if(!n&&!o&&!l){var p=u("pattern")==="independent";p&&(n=!0)}v._hasSubplotGrid=n;var y=u("roworder"),m=y==="top to bottom",g=n?.2:.1,w=n?.3:.1,b,x;s&&e._splomGridDflt&&(b=e._splomGridDflt.xside,x=e._splomGridDflt.yside),v._domains={x:wb("x",u,g,b,d),y:wb("y",u,w,x,h,m)}}function wb(t,e,r,a,i,n){var o=e(t+"gap",r),l=e("domain."+t);e(t+"side",a);for(var s=new Array(i),f=l[0],c=(l[1]-f)/(i-o),v=c*(1-o),u=0;u<i;u++){var h=f+c*u;s[n?i-1-u:u]=[h,h+v]}return s}function UF(t,e){var r=e.grid;if(!(!r||!r._domains)){var a=t.grid||{},i=e._subplots,n=r._hasSubplotGrid,o=r.rows,l=r.columns,s=r.pattern==="independent",f,c,v,u,h,d,p,y=r._axisMap={};if(n){var m=a.subplots||[];d=r.subplots=new Array(o);var g=1;for(f=0;f<o;f++){var w=d[f]=new Array(l),b=m[f]||[];for(c=0;c<l;c++)if(s?(h=g===1?"xy":"x"+g+"y"+g,g++):h=b[c],w[c]="",i.cartesian.indexOf(h)!==-1){if(p=h.indexOf("y"),v=h.slice(0,p),u=h.slice(p),y[v]!==void 0&&y[v]!==c||y[u]!==void 0&&y[u]!==f)continue;w[c]=h,y[v]=c,y[u]=f}}}else{var x=ec(e,a,"x"),_=ec(e,a,"y");r.xaxes=Tb(x,i.xaxis,l,y,"x"),r.yaxes=Tb(_,i.yaxis,o,y,"y")}var T=r._anchors={},k=r.roworder==="top to bottom";for(var S in y){var M=S.charAt(0),D=r[M+"side"],A,C,$;if(D.length<8)T[S]="free";else if(M==="x"){if(D.charAt(0)==="t"===k?(A=0,C=1,$=o):(A=o-1,C=-1,$=-1),n){var N=y[S];for(f=A;f!==$;f+=C)if(h=d[f][N],!!h&&(p=h.indexOf("y"),h.slice(0,p)===S)){T[S]=h.slice(p);break}}else for(f=A;f!==$;f+=C)if(u=r.yaxes[f],i.cartesian.indexOf(S+u)!==-1){T[S]=u;break}}else if(D.charAt(0)==="l"?(A=0,C=1,$=l):(A=l-1,C=-1,$=-1),n){var E=y[S];for(f=A;f!==$;f+=C)if(h=d[E][f],!!h&&(p=h.indexOf("y"),h.slice(p)===S)){T[S]=h.slice(0,p);break}}else for(f=A;f!==$;f+=C)if(v=r.xaxes[f],i.cartesian.indexOf(v+S)!==-1){T[S]=v;break}}}}function Tb(t,e,r,a,i){var n=new Array(r),o;function l(s,f){e.indexOf(f)!==-1&&a[f]===void 0?(n[s]=f,a[f]=s):n[s]=""}if(Array.isArray(t))for(o=0;o<r;o++)l(o,t[o]);else for(l(0,i),o=1;o<r;o++)l(o,i+(o+1));return n}var VF={moduleType:"component",name:"grid",schema:{layout:{grid:eh}},layoutAttributes:eh,sizeDefaults:GF,contentDefaults:UF},ek={visible:{valType:"boolean",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the square of the","underlying data.","If *data*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}},Pv,kb;function WF(){if(kb)return Pv;kb=1;var t=_t,e=tt,r=de,a=It,i=ek;return Pv=function(n,o,l,s){var f="error_"+s.axis,c=a.newContainer(o,f),v=n[f]||{};function u(w,b){return r.coerce(v,c,i,w,b)}var h=v.array!==void 0||v.value!==void 0||v.type==="sqrt",d=u("visible",h);if(d!==!1){var p=u("type","array"in v?"data":"percent"),y=!0;p!=="sqrt"&&(y=u("symmetric",!((p==="data"?"arrayminus":"valueminus")in v))),p==="data"?(u("array"),u("traceref"),y||(u("arrayminus"),u("tracerefminus"))):(p==="percent"||p==="constant")&&(u("value"),y||u("valueminus"));var m="copy_"+s.inherit+"style";if(s.inherit){var g=o["error_"+s.inherit];(g||{}).visible&&u(m,!(v.color||t(v.thickness)||t(v.width)))}(!s.inherit||!c[m])&&(u("color",l),u("thickness"),u("width",e.traceIs(o,"gl3d")?0:4))}},Pv}var Ev,Ab;function tk(){if(Ab)return Ev;Ab=1,Ev=function(r){var a=r.type,i=r.symmetric;if(a==="data"){var n=r.array||[];if(i)return function(c,v){var u=+n[v];return[u,u]};var o=r.arrayminus||[];return function(c,v){var u=+n[v],h=+o[v];return!isNaN(u)||!isNaN(h)?[h||0,u||0]:[NaN,NaN]}}else{var l=t(a,r.value),s=t(a,r.valueminus);return i||r.valueminus===void 0?function(c){var v=l(c);return[v,v]}:function(c){return[s(c),l(c)]}}};function t(e,r){if(e==="percent")return function(a){return Math.abs(a*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(a){return Math.sqrt(Math.abs(a))}}return Ev}var Rv,Mb;function XF(){if(Mb)return Rv;Mb=1;var t=_t,e=tt,r=Ot,a=de,i=tk();Rv=function(l){for(var s=l.calcdata,f=0;f<s.length;f++){var c=s[f],v=c[0].trace;if(v.visible===!0&&e.traceIs(v,"errorBarsOK")){var u=r.getFromId(l,v.xaxis),h=r.getFromId(l,v.yaxis);n(c,v,u,"x"),n(c,v,h,"y")}}};function n(o,l,s,f){var c=l["error_"+f]||{},v=c.visible&&["linear","log"].indexOf(s.type)!==-1,u=[];if(v){for(var h=i(c),d=0;d<o.length;d++){var p=o[d],y=p.i;if(y===void 0)y=d;else if(y===null)continue;var m=p[f];if(t(s.c2l(m))){var g=h(m,y);if(t(g[0])&&t(g[1])){var w=p[f+"s"]=m-g[0],b=p[f+"h"]=m+g[1];u.push(w,b)}}}var x=s._id,_=l._extremes[x],T=r.findExtremes(s,u,a.extendFlat({tozero:_.opts.tozero},{padded:!0}));_.min=_.min.concat(T.min),_.max=_.max.concat(T.max)}}return Rv}var zv,Sb;function YF(){if(Sb)return zv;Sb=1;var t=yt,e=_t,r=Et,a=Pr;zv=function(o,l,s,f){var c,v=s.xaxis,u=s.yaxis,h=f&&f.duration>0,d=o._context.staticPlot;l.each(function(p){var y=p[0].trace,m=y.error_x||{},g=y.error_y||{},w;y.ids&&(w=function(T){return T.id});var b=a.hasMarkers(y)&&y.marker.maxdisplayed>0;!g.visible&&!m.visible&&(p=[]);var x=t.select(this).selectAll("g.errorbar").data(p,w);if(x.exit().remove(),!!p.length){m.visible||x.selectAll("path.xerror").remove(),g.visible||x.selectAll("path.yerror").remove(),x.style("opacity",1);var _=x.enter().append("g").classed("errorbar",!0);h&&_.style("opacity",0).transition().duration(f.duration).style("opacity",1),r.setClipUrl(x,s.layerClipId,o),x.each(function(T){var k=t.select(this),S=i(T,v,u);if(!(b&&!T.vis)){var M,D=k.select("path.yerror");if(g.visible&&e(S.x)&&e(S.yh)&&e(S.ys)){var A=g.width;M="M"+(S.x-A)+","+S.yh+"h"+2*A+"m-"+A+",0V"+S.ys,S.noYS||(M+="m-"+A+",0h"+2*A),c=!D.size(),c?D=k.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("yerror",!0):h&&(D=D.transition().duration(f.duration).ease(f.easing)),D.attr("d",M)}else D.remove();var C=k.select("path.xerror");if(m.visible&&e(S.y)&&e(S.xh)&&e(S.xs)){var $=(m.copy_ystyle?g:m).width;M="M"+S.xh+","+(S.y-$)+"v"+2*$+"m0,-"+$+"H"+S.xs,S.noXS||(M+="m0,-"+$+"v"+2*$),c=!C.size(),c?C=k.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("xerror",!0):h&&(C=C.transition().duration(f.duration).ease(f.easing)),C.attr("d",M)}else C.remove()}})}})};function i(n,o,l){var s={x:o.c2p(n.x),y:l.c2p(n.y)};return n.yh!==void 0&&(s.yh=l.c2p(n.yh),s.ys=l.c2p(n.ys),e(s.ys)||(s.noYS=!0,s.ys=l.c2p(n.ys,!0))),n.xh!==void 0&&(s.xh=o.c2p(n.xh),s.xs=o.c2p(n.xs),e(s.xs)||(s.noXS=!0,s.xs=o.c2p(n.xs,!0))),s}return zv}var Iv,Lb;function qF(){if(Lb)return Iv;Lb=1;var t=yt,e=ut;return Iv=function(a){a.each(function(i){var n=i[0].trace,o=n.error_y||{},l=n.error_x||{},s=t.select(this);s.selectAll("path.yerror").style("stroke-width",o.thickness+"px").call(e.stroke,o.color),l.copy_ystyle&&(l=o),s.selectAll("path.xerror").style("stroke-width",l.thickness+"px").call(e.stroke,l.color)})},Iv}var wl=de,Cb=ai.overrideAll,Tl=ek,en={error_x:wl.extendFlat({},Tl),error_y:wl.extendFlat({},Tl)};delete en.error_x.copy_zstyle;delete en.error_y.copy_zstyle;delete en.error_y.copy_ystyle;var ls={error_x:wl.extendFlat({},Tl),error_y:wl.extendFlat({},Tl),error_z:wl.extendFlat({},Tl)};delete ls.error_x.copy_ystyle;delete ls.error_y.copy_ystyle;delete ls.error_z.copy_ystyle;delete ls.error_z.copy_zstyle;var ZF={moduleType:"component",name:"errorbars",schema:{traces:{scatter:en,bar:en,histogram:en,scatter3d:Cb(ls,"calc","nested"),scattergl:Cb(en,"calc","nested")}},supplyDefaults:WF(),calc:XF(),makeComputeError:tk(),plot:YF(),style:qF(),hoverInfo:KF};function KF(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}var QF={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"}},mi=yt,Fv=da,kf=sr,Db=tt,Ya=Ot,qs=Va,ca=de,_a=ca.strTranslate,rk=Kt.extendFlat,Nv=Pi,ga=Et,Hv=ut,JF=wc,eN=wr,tN=Pa.flipScale,rN=d2,aN=h2,iN=ii,Bp=Yr,$b=Bp.LINE_SPACING,Pb=Bp.FROM_TL,Eb=Bp.FROM_BR,Xt=QF.cn;function nN(t){var e=t._fullLayout,r=e._infolayer.selectAll("g."+Xt.colorbar).data(oN(t),function(a){return a._id});r.enter().append("g").attr("class",function(a){return a._id}).classed(Xt.colorbar,!0),r.each(function(a){var i=mi.select(this);ca.ensureSingle(i,"rect",Xt.cbbg),ca.ensureSingle(i,"g",Xt.cbfills),ca.ensureSingle(i,"g",Xt.cblines),ca.ensureSingle(i,"g",Xt.cbaxis,function(o){o.classed(Xt.crisp,!0)}),ca.ensureSingle(i,"g",Xt.cbtitleunshift,function(o){o.append("g").classed(Xt.cbtitle,!0)}),ca.ensureSingle(i,"rect",Xt.cboutline);var n=lN(i,a,t);n&&n.then&&(t._promises||[]).push(n),t._context.edits.colorbarPosition&&sN(i,a,t)}),r.exit().each(function(a){kf.autoMargin(t,a._id)}).remove(),r.order()}function oN(t){var e=t._fullLayout,r=t.calcdata,a=[],i,n,o,l;function s(w){return rk(w,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function f(){typeof l.calc=="function"?l.calc(t,o,i):(i._fillgradient=n.reversescale?tN(n.colorscale):n.colorscale,i._zrange=[n[l.min],n[l.max]])}for(var c=0;c<r.length;c++){var v=r[c];o=v[0].trace;var u=o._module.colorbar;if(o.visible===!0&&u)for(var h=Array.isArray(u),d=h?u:[u],p=0;p<d.length;p++){l=d[p];var y=l.container;n=y?o[y]:o,n&&n.showscale&&(i=s(n.colorbar),i._id="cb"+o.uid+(h&&y?"-"+y:""),i._traceIndex=o.index,i._propPrefix=(y?y+".":"")+"colorbar.",i._meta=o._meta,f(),a.push(i))}}for(var m in e._colorAxes)if(n=e[m],n.showscale){var g=e._colorAxes[m];i=s(n.colorbar),i._id="cb"+m,i._propPrefix=m+".colorbar.",i._meta=e._meta,l={min:"cmin",max:"cmax"},g[0]!=="heatmap"&&(o=g[1],l.calc=o._module.colorbar.calc),f(),a.push(i)}return a}function lN(t,e,r){var a=e.orientation==="v",i=e.len,n=e.lenmode,o=e.thickness,l=e.thicknessmode,s=e.outlinewidth,f=e.borderwidth,c=e.bgcolor,v=e.xanchor,u=e.yanchor,h=e.xpad,d=e.ypad,p=e.x,y=a?e.y:1-e.y,m=r._fullLayout,g=m._size,w=e._fillcolor,b=e._line,x=e.title,_=x.side,T=e._zrange||mi.extent((typeof w=="function"?w:b.color).domain()),k=typeof b.color=="function"?b.color:function(){return b.color},S=typeof w=="function"?w:function(){return w},M=e._levels,D=fN(r,e,T),A=D.fill,C=D.line,$=Math.round(o*(l==="fraction"?a?g.w:g.h:1)),N=$/(a?g.w:g.h),E=Math.round(i*(n==="fraction"?a?g.h:g.w:1)),P=E/(a?g.h:g.w),R=Math.round(a?p*g.w+h:y*g.h+d),L={center:.5,right:1}[v]||0,z={top:1,middle:.5}[u]||0,I=a?p-L*N:y-z*N,H=a?y-z*P:p-L*P,V=Math.round(a?g.h*(1-H):g.w*H);e._lenFrac=P,e._thickFrac=N,e._uFrac=I,e._vFrac=H;var O=e._axis=cN(r,e,T);O.position=N+(a?p+h/g.w:y+d/g.h);var X=["top","bottom"].indexOf(_)!==-1;if(a&&X&&(O.title.side=_,O.titlex=p+h/g.w,O.titley=H+(x.side==="top"?P-d/g.h:d/g.h)),!a&&!X&&(O.title.side=_,O.titley=y+d/g.h,O.titlex=H+h/g.w),b.color&&e.tickmode==="auto"){O.tickmode="linear",O.tick0=M.start;var G=M.size,Y=ca.constrain(E/50,4,15)+1,K=(T[1]-T[0])/((e.nticks||Y)*G);if(K>1){var Z=Math.pow(10,Math.floor(Math.log(K)/Math.LN10));G*=Z*ca.roundUp(K/Z,[2,5,10]),(Math.abs(M.start)/M.size+1e-6)%1<2e-6&&(O.tick0=0)}O.dtick=G}O.domain=a?[H+d/g.h,H+P-d/g.h]:[H+h/g.w,H+P-h/g.w],O.setScale(),t.attr("transform",_a(Math.round(g.l),Math.round(g.t)));var q=t.select("."+Xt.cbtitleunshift).attr("transform",_a(-Math.round(g.l),-Math.round(g.t))),ie=O.ticklabelposition,fe=O.title.font.size,be=t.select("."+Xt.cbaxis),ne,U=0,ae=0;function ce(le,De){var Ae={propContainer:O,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:m._dfltTitle.colorbar,containerGroup:t.select("."+Xt.cbtitle)},ze=le.charAt(0)==="h"?le.substr(1):"h"+le;t.selectAll("."+ze+",."+ze+"-math-group").remove(),JF.draw(r,le,rk(Ae,De||{}))}function se(){if(a&&X||!a&&!X){var le,De;_==="top"&&(le=h+g.l+g.w*p,De=d+g.t+g.h*(1-H-P)+3+fe*.75),_==="bottom"&&(le=h+g.l+g.w*p,De=d+g.t+g.h*(1-H)-3-fe*.25),_==="right"&&(De=d+g.t+g.h*y+3+fe*.75,le=h+g.l+g.w*H),ce(O._id+"title",{attributes:{x:le,y:De,"text-anchor":a?"start":"middle"}})}}function pe(){if(a&&!X||!a&&X){var le=O.position||0,De=O._offset+O._length/2,Ae,ze;if(_==="right")ze=De,Ae=g.l+g.w*le+10+fe*(O.showticklabels?1:.5);else if(Ae=De,_==="bottom"&&(ze=g.t+g.h*le+10+(ie.indexOf("inside")===-1?O.tickfont.size:0)+(O.ticks!=="intside"&&e.ticklen||0)),_==="top"){var Ve=x.text.split("<br>").length;ze=g.t+g.h*le+10-$-$b*fe*Ve}ce((a?"h":"v")+O._id+"title",{avoid:{selection:mi.select(r).selectAll("g."+O._id+"tick"),side:_,offsetTop:a?0:g.t,offsetLeft:a?g.l:0,maxShift:a?m.width:m.height},attributes:{x:Ae,y:ze,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function ge(){if(!a&&!X||a&&X){var le=t.select("."+Xt.cbtitle),De=le.select("text"),Ae=[-s/2,s/2],ze=le.select(".h"+O._id+"title-math-group").node(),Ve=15.6;De.node()&&(Ve=parseInt(De.node().style.fontSize,10)*$b);var oe;if(ze?(oe=ga.bBox(ze),ae=oe.width,U=oe.height,U>Ve&&(Ae[1]-=(U-Ve)/2)):De.node()&&!De.classed(Xt.jsPlaceholder)&&(oe=ga.bBox(De.node()),ae=oe.width,U=oe.height),a){if(U){if(U+=5,_==="top")O.domain[1]-=U/g.h,Ae[1]*=-1;else{O.domain[0]+=U/g.h;var Ce=eN.lineCount(De);Ae[1]+=(1-Ce)*Ve}le.attr("transform",_a(Ae[0],Ae[1])),O.setScale()}}else ae&&(_==="right"&&(O.domain[0]+=(ae+fe/2)/g.w),le.attr("transform",_a(Ae[0],Ae[1])),O.setScale())}t.selectAll("."+Xt.cbfills+",."+Xt.cblines).attr("transform",a?_a(0,Math.round(g.h*(1-O.domain[1]))):_a(Math.round(g.w*O.domain[0]),0)),be.attr("transform",a?_a(0,Math.round(-g.t)):_a(Math.round(-g.l),0));var re=t.select("."+Xt.cbfills).selectAll("rect."+Xt.cbfill).attr("style","").data(A);re.enter().append("rect").classed(Xt.cbfill,!0).style("stroke","none"),re.exit().remove();var me=T.map(O.c2p).map(Math.round).sort(function(ye,Ne){return ye-Ne});re.each(function(ye,Ne){var Pe=[Ne===0?T[0]:(A[Ne]+A[Ne-1])/2,Ne===A.length-1?T[1]:(A[Ne]+A[Ne+1])/2].map(O.c2p).map(Math.round);a&&(Pe[1]=ca.constrain(Pe[1]+(Pe[1]>Pe[0])?1:-1,me[0],me[1]));var je=mi.select(this).attr(a?"x":"y",R).attr(a?"y":"x",mi.min(Pe)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(mi.max(Pe)-mi.min(Pe),2));if(e._fillgradient)ga.gradient(je,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var Ie=S(ye).replace("e-","");je.attr("fill",Fv(Ie).toHexString())}});var ve=t.select("."+Xt.cblines).selectAll("path."+Xt.cbline).data(b.color&&b.width?C:[]);ve.enter().append("path").classed(Xt.cbline,!0),ve.exit().remove(),ve.each(function(ye){var Ne=R,Pe=Math.round(O.c2p(ye))+b.width/2%1;mi.select(this).attr("d","M"+(a?Ne+","+Pe:Pe+","+Ne)+(a?"h":"v")+$).call(ga.lineGroupStyle,b.width,k(ye),b.dash)}),be.selectAll("g."+O._id+"tick,path").remove();var Me=R+$+(s||0)/2-(e.ticks==="outside"?1:0),Se=Ya.calcTicks(O),$e=Ya.getTickSigns(O)[2];return Ya.drawTicks(r,O,{vals:O.ticks==="inside"?Ya.clipEnds(O,Se):Se,layer:be,path:Ya.makeTickPath(O,Me,$e),transFn:Ya.makeTransTickFn(O)}),Ya.drawLabels(r,O,{vals:Se,layer:be,transFn:Ya.makeTransTickLabelFn(O),labelFns:Ya.makeLabelFns(O,Me)})}function _e(){var le,De=$+s/2;ie.indexOf("inside")===-1&&(le=ga.bBox(be.node()),De+=a?le.width:le.height),ne=q.select("text");var Ae=0,ze=a&&_==="top",Ve=!a&&_==="right",oe=0;if(ne.node()&&!ne.classed(Xt.jsPlaceholder)){var Ce,re=q.select(".h"+O._id+"title-math-group").node();re&&(a&&X||!a&&!X)?(le=ga.bBox(re),Ae=le.width,Ce=le.height):(le=ga.bBox(q.node()),Ae=le.right-g.l-(a?R:V),Ce=le.bottom-g.t-(a?V:R),!a&&_==="top"&&(De+=le.height,oe=le.height)),Ve&&(ne.attr("transform",_a(Ae/2+fe/2,0)),Ae*=2),De=Math.max(De,a?Ae:Ce)}var me=(a?h:d)*2+De+f+s/2,ve=0;!a&&x.text&&u==="bottom"&&y<=0&&(ve=me/2,me+=ve,oe+=ve),m._hColorbarMoveTitle=ve,m._hColorbarMoveCBTitle=oe;var Me=f+s;t.select("."+Xt.cbbg).attr("x",(a?R:V)-Me/2-(a?h:0)).attr("y",(a?V:R)-(a?E:d+oe-ve)).attr(a?"width":"height",Math.max(me-ve,2)).attr(a?"height":"width",Math.max(E+Me,2)).call(Hv.fill,c).call(Hv.stroke,e.bordercolor).style("stroke-width",f);var Se=Ve?Math.max(Ae-10,0):0;if(t.selectAll("."+Xt.cboutline).attr("x",(a?R:V+h)+Se).attr("y",(a?V+d-E:R)+(ze?U:0)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(E-(a?2*d+U:2*h+Se),2)).call(Hv.stroke,e.outlinecolor).style({fill:"none","stroke-width":s}),t.attr("transform",_a(g.l-(a?L*me:0),g.t-(a?0:(1-z)*me-oe))),!a&&(f||Fv(c).getAlpha()&&!Fv.equals(m.paper_bgcolor,c))){var $e=be.selectAll("text"),ye=$e[0].length,Ne=t.select("."+Xt.cbbg).node(),Pe=ga.bBox(Ne),je=ga.getTranslate(t),Ie=2;$e.each(function(F,B){var j=0,W=ye-1;if(B===j||B===W){var J=ga.bBox(this),Q=ga.getTranslate(this),he;if(B===W){var Te=J.right+Q.x,ue=Pe.right+je.x+V-f-Ie+p;he=ue-Te,he>0&&(he=0)}else if(B===j){var te=J.left+Q.x,xe=Pe.left+je.x+V+f+Ie;he=xe-te,he<0&&(he=0)}he&&(ye<3?this.setAttribute("transform","translate("+he+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Ue={},ke=Pb[v],We=Eb[v],qe=Pb[u],Ye=Eb[u],Qe=me-$;a?(n==="pixels"?(Ue.y=y,Ue.t=E*qe,Ue.b=E*Ye):(Ue.t=Ue.b=0,Ue.yt=y+i*qe,Ue.yb=y-i*Ye),l==="pixels"?(Ue.x=p,Ue.l=me*ke,Ue.r=me*We):(Ue.l=Qe*ke,Ue.r=Qe*We,Ue.xl=p-o*ke,Ue.xr=p+o*We)):(n==="pixels"?(Ue.x=p,Ue.l=E*ke,Ue.r=E*We):(Ue.l=Ue.r=0,Ue.xl=p+i*ke,Ue.xr=p-i*We),l==="pixels"?(Ue.y=1-y,Ue.t=me*qe,Ue.b=me*Ye):(Ue.t=Qe*qe,Ue.b=Qe*Ye,Ue.yt=y-o*qe,Ue.yb=y+o*Ye)),kf.autoMargin(r,e._id,Ue)}return ca.syncOrAsync([kf.previousPromises,se,ge,pe,kf.previousPromises,_e],r)}function sN(t,e,r){var a=e.orientation==="v",i=r._fullLayout,n=i._size,o,l,s;qs.init({element:t.node(),gd:r,prepFn:function(){o=t.attr("transform"),Nv(t)},moveFn:function(f,c){t.attr("transform",o+_a(f,c)),l=qs.align((a?e._uFrac:e._vFrac)+f/n.w,a?e._thickFrac:e._lenFrac,0,1,e.xanchor),s=qs.align((a?e._vFrac:1-e._uFrac)-c/n.h,a?e._lenFrac:e._thickFrac,0,1,e.yanchor);var v=qs.getCursor(l,s,e.xanchor,e.yanchor);Nv(t,v)},doneFn:function(){if(Nv(t),l!==void 0&&s!==void 0){var f={};f[e._propPrefix+"x"]=l,f[e._propPrefix+"y"]=s,e._traceIndex!==void 0?Db.call("_guiRestyle",r,f,e._traceIndex):Db.call("_guiRelayout",r,f)}}})}function fN(t,e,r){var a=e._levels,i=[],n=[],o,l,s=a.end+a.size/100,f=a.size,c=1.001*r[0]-.001*r[1],v=1.001*r[1]-.001*r[0];for(l=0;l<1e5&&(o=a.start+l*f,!(f>0?o>=s:o<=s));l++)o>c&&o<v&&i.push(o);if(e._fillgradient)n=[0];else if(typeof e._fillcolor=="function"){var u=e._filllevels;if(u)for(s=u.end+u.size/100,f=u.size,l=0;l<1e5&&(o=u.start+l*f,!(f>0?o>=s:o<=s));l++)o>r[0]&&o<r[1]&&n.push(o);else n=i.map(function(h){return h-a.size/2}),n.push(n[n.length-1]+a.size)}else e._fillcolor&&typeof e._fillcolor=="string"&&(n=[0]);return a.size<0&&(i.reverse(),n.reverse()),{line:i,fill:n}}function cN(t,e,r){var a=t._fullLayout,i=e.orientation==="v",n={type:"linear",range:r,tickmode:e.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:e.ticks,ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,showticklabels:e.showticklabels,ticklabelposition:e.ticklabelposition,ticklabeloverflow:e.ticklabeloverflow,ticklabelstep:e.ticklabelstep,tickfont:e.tickfont,tickangle:e.tickangle,tickformat:e.tickformat,exponentformat:e.exponentformat,minexponent:e.minexponent,separatethousands:e.separatethousands,showexponent:e.showexponent,showtickprefix:e.showtickprefix,tickprefix:e.tickprefix,showticksuffix:e.showticksuffix,ticksuffix:e.ticksuffix,title:e.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},o=i?"y":"x",l={type:"linear",_id:o+e._id},s={letter:o,font:a.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:a.calendar};function f(c,v){return ca.coerce(n,l,iN,c,v)}return rN(n,l,f,s,a),aN(n,l,f,s),l}var uN={draw:nN},vN={moduleType:"component",name:"colorbar",attributes:Rh,supplyDefaults:H_,draw:uN.draw,hasColorbar:D_},dN={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"}},hN={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}},pN=tt,ak=de,Ov=ak.extendFlat,Rb=ak.extendDeep;function zb(t){var e;switch(t){case"themes__thumb":e={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":e={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}function mN(t){var e=["xaxis","yaxis","zaxis"];return e.indexOf(t.slice(0,5))>-1}var ik=function(e,r){var a,i=e.data,n=e.layout,o=Rb([],i),l=Rb({},n,zb(r.tileClass)),s=e._context||{};if(r.width&&(l.width=r.width),r.height&&(l.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){l.annotations=[];var f=Object.keys(l);for(a=0;a<f.length;a++)mN(f[a])&&(l[f[a]].title={text:""});for(a=0;a<o.length;a++){var c=o[a];c.showscale=!1,c.marker&&(c.marker.showscale=!1),pN.traceIs(c,"pie-like")&&(c.textposition="none")}}if(Array.isArray(r.annotations))for(a=0;a<r.annotations.length;a++)l.annotations.push(r.annotations[a]);var v=Object.keys(l).filter(function(y){return y.match(/^scene\d*$/)});if(v.length){var u={};for(r.tileClass==="thumbnail"&&(u={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),a=0;a<v.length;a++){var h=l[v[a]];h.xaxis||(h.xaxis={}),h.yaxis||(h.yaxis={}),h.zaxis||(h.zaxis={}),Ov(h.xaxis,u),Ov(h.yaxis,u),Ov(h.zaxis,u),h._scene=null}}var d=document.createElement("div");r.tileClass&&(d.className=r.tileClass);var p={gd:d,td:d,layout:l,data:o,config:{staticPlot:r.staticPlot===void 0?!0:r.staticPlot,plotGlPixelRatio:r.plotGlPixelRatio===void 0?2:r.plotGlPixelRatio,displaylogo:r.displaylogo||!1,showLink:r.showLink||!1,showTips:r.showTips||!1,mapboxAccessToken:s.mapboxAccessToken}};return r.setBackground!=="transparent"&&(p.config.setBackground=r.setBackground||"opaque"),p.gd.defaultLayout=zb(r.tileClass),p},yN=uh.EventEmitter,gN=tt,bN=de,Ib=zr,xN=ik,_N=_p,wN=wp;function TN(t,e){var r=new yN,a=xN(t,{format:"png"}),i=a.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function n(){var l=Ib.getDelay(i._fullLayout);setTimeout(function(){var s=_N(i),f=document.createElement("canvas");f.id=bN.randstr(),r=wN({format:e.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:f,emitter:r,svg:s}),r.clean=function(){i&&document.body.removeChild(i)}},l)}var o=Ib.getRedrawFunc(i);return gN.call("_doPlot",i,a.data,a.layout,a.config).then(o).then(n).catch(function(l){r.emit("error",l)}),r}var kN=TN,Fb=zr,AN={getDelay:Fb.getDelay,getRedrawFunc:Fb.getRedrawFunc,clone:ik,toSVG:_p,svgToImg:wp,toImage:kN,downloadImage:IT},MN=AN;(function(t){t.version=sc.version;for(var e=tt,r=t.register=e.register,a=Yt,i=Object.keys(a),n=0;n<i.length;n++){var o=i[n];o.charAt(0)!=="_"&&(t[o]=a[o]),r({moduleType:"apiMethod",name:o,fn:a[o]})}r(jR),r([GR,Ca,pz,Ez,yl,Wz,nI,DI,rF,vF,NF,VF,ZF,ho,vN,aT]),r([dN,hN]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(r(window.PlotlyLocales),delete window.PlotlyLocales),t.Icons=tp;var l=Ca,s=sr;t.Plots={resize:s.resize,graphJson:s.graphJson,sendDataToCloud:s.sendDataToCloud},t.Fx={hover:l.hover,unhover:l.unhover,loneHover:l.loneHover,loneUnhover:l.loneUnhover},t.Snapshot=MN,t.PlotSchema=$o})(y1);var SN=y1;const dO=Li(SN);var ss={TEXTPAD:3,eventDataKeys:["value","label"]},Jt=Ei,Nb=Po.axisHoverFormat,LN=qr.hovertemplateAttrs,CN=qr.texttemplateAttrs,nk=xn,DN=Dr,Hb=ss,$N=Da.pattern,tn=Kt.extendFlat,Bv=DN({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),PN=Jt.marker,EN=PN.line,RN=tn({},EN.width,{dflt:0}),zN=tn({width:RN,editType:"calc"},nk("marker.line")),IN=tn({line:zN,editType:"calc"},nk("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:$N}),fs={x:Jt.x,x0:Jt.x0,dx:Jt.dx,y:Jt.y,y0:Jt.y0,dy:Jt.dy,xperiod:Jt.xperiod,yperiod:Jt.yperiod,xperiod0:Jt.xperiod0,yperiod0:Jt.yperiod0,xperiodalignment:Jt.xperiodalignment,yperiodalignment:Jt.yperiodalignment,xhoverformat:Nb("x"),yhoverformat:Nb("y"),text:Jt.text,texttemplate:CN({editType:"plot"},{keys:Hb.eventDataKeys}),hovertext:Jt.hovertext,hovertemplate:LN({},{keys:Hb.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc",description:["Specifies the location of the `text`.","*inside* positions `text` inside, next to the bar end","(rotated and scaled if needed).","*outside* positions `text` outside, next to the bar end","(scaled if needed), unless there is another bar stacked on","this one, then the text gets pushed inside.","*auto* tries to position `text` inside the bar, but if","the bar is too small and no bar is stacked on this one","the text is moved outside.","If *none*, no text appears."].join(" ")},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot",description:["Determines if texts are kept at center or start/end points in `textposition` *inside* mode."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"plot",description:["Sets the angle of the tick labels with respect to the bar.","For example, a `tickangle` of -90 draws the tick labels","vertically. With *auto* the texts may automatically be","rotated to fit with the maximum size in bars."].join(" ")},textfont:tn({},Bv,{description:"Sets the font used for `text`."}),insidetextfont:tn({},Bv,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:tn({},Bv,{description:"Sets the font used for `text` lying outside the bar."}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc",description:["Constrain the size of text inside or outside a bar to be no","larger than the bar itself."].join(" ")},cliponaxis:tn({},Jt.cliponaxis,{description:["Determines whether the text nodes","are clipped about the subplot axes.","To show the text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes",description:["Sets the orientation of the bars.","With *v* (*h*), the value of the each bar spans","along the vertical (horizontal)."].join(" ")},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc",description:["Sets where the bar base is drawn (in position axis units).","In *stack* or *relative* barmode,","traces that set *base* will be excluded","and drawn in *overlay* mode instead."].join(" ")},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc",description:["Shifts the position where the bar is drawn","(in position axis units).","In *group* barmode,","traces that set *offset* will be excluded","and drawn in *overlay* mode instead."].join(" ")},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc",description:["Sets the bar width (in position axis units)."].join(" ")},marker:IN,offsetgroup:Jt.offsetgroup,alignmentgroup:Jt.alignmentgroup,selected:{marker:{opacity:Jt.selected.marker.opacity,color:Jt.selected.marker.color,editType:"style"},textfont:Jt.selected.textfont,editType:"style"},unselected:{marker:{opacity:Jt.unselected.marker.opacity,color:Jt.unselected.marker.color,editType:"style"},textfont:Jt.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"],description:"Renamed to `orientation`."}}},jp={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *relative*, the bars are stacked on top of one another,","with negative values below the axis, positive values above","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Sets the normalization for bar traces on the graph.","With *fraction*, the value of each bar is divided by the sum of all","values at that location coordinate.","*percent* is the same but multiplied by 100 to show percentages."].join(" ")},bargap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")}},FN=ut,Ob=Pa.hasColorscale,Bb=es,NN=de.coercePattern,ok=function(e,r,a,i,n){var o=a("marker.color",i),l=Ob(e,"marker");l&&Bb(e,r,n,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",FN.defaultLine),Ob(e,"marker.line")&&Bb(e,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),NN(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")},To=de,jb=ut,HN=tt,ON=kp,BN=Oc,jN=ok,GN=Ap,lk=fs,Zs=To.coerceFont;function UN(t,e,r,a){function i(f,c){return To.coerce(t,e,lk,f,c)}var n=ON(t,e,a,i);if(!n){e.visible=!1;return}BN(t,e,a,i),i("xhoverformat"),i("yhoverformat"),i("orientation",e.x&&!e.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate");var o=i("textposition");sk(t,e,a,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),jN(t,e,i,r,a);var l=(e.marker.line||{}).color,s=HN.getComponentMethod("errorbars","supplyDefaults");s(t,e,l||jb.defaultLine,{axis:"y"}),s(t,e,l||jb.defaultLine,{axis:"x",inherit:"y"}),To.coerceSelectionMarkerOpacity(e,i)}function VN(t,e){var r,a;function i(o){return To.coerce(a._input,a,lk,o)}if(e.barmode==="group")for(var n=0;n<t.length;n++)a=t[n],a.type==="bar"&&(r=a._input,GN(r,a,e,i))}function sk(t,e,r,a,i,n){n=n||{};var o=n.moduleHasSelected!==!1,l=n.moduleHasUnselected!==!1,s=n.moduleHasConstrain!==!1,f=n.moduleHasCliponaxis!==!1,c=n.moduleHasTextangle!==!1,v=n.moduleHasInsideanchor!==!1,u=!!n.hasPathbar,h=Array.isArray(i)||i==="auto",d=h||i==="inside",p=h||i==="outside";if(d||p){var y=Zs(a,"textfont",r.font),m=To.extendFlat({},y),g=t.textfont&&t.textfont.color,w=!g;if(w&&delete m.color,Zs(a,"insidetextfont",m),u){var b=To.extendFlat({},y);w&&delete b.color,Zs(a,"pathbar.textfont",b)}p&&Zs(a,"outsidetextfont",y),o&&a("selected.textfont.color"),l&&a("unselected.textfont.color"),s&&a("constraintext"),f&&a("cliponaxis"),c&&a("textangle"),a("texttemplate")}d&&v&&a("insidetextanchor")}var Ul={supplyDefaults:UN,crossTraceDefaults:VN,handleText:sk},WN=tt,XN=Ot,YN=de,qN=jp,fk=function(t,e,r){function a(h,d){return YN.coerce(t,e,qN,h,d)}for(var i=!1,n=!1,o=!1,l={},s=a("barmode"),f=0;f<r.length;f++){var c=r[f];if(WN.traceIs(c,"bar")&&c.visible)i=!0;else continue;if(s==="group"){var v=c.xaxis+c.yaxis;l[v]&&(o=!0),l[v]=!0}if(c.visible&&c.type==="histogram"){var u=XN.getFromId({_fullLayout:e},c[c.orientation==="v"?"xaxis":"yaxis"]);u.type!=="category"&&(n=!0)}}if(!i){delete e.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",n&&!o?0:.2),a("bargroupgap")},Hn=de,Gp=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;Hn.mergeArray(r.text,e,"tx"),Hn.mergeArray(r.hovertext,e,"htx");var i=r.marker;if(i){Hn.mergeArray(i.opacity,e,"mo",!0),Hn.mergeArray(i.color,e,"mc");var n=i.line;n&&(Hn.mergeArray(n.color,e,"mlc"),Hn.mergeArrayCastPositive(n.width,e,"mlw"))}},Gb=Ot,Ub=Bc,Vb=Pa.hasColorscale,Wb=zh,ZN=Gp,KN=ZT,QN=function(e,r){var a=Gb.getFromId(e,r.xaxis||"x"),i=Gb.getFromId(e,r.yaxis||"y"),n,o,l,s,f,c,v={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(n=a.makeCalcdata(r,"x",v),l=i.makeCalcdata(r,"y"),s=Ub(r,i,"y",l),f=!!r.yperiodalignment,c="y"):(n=i.makeCalcdata(r,"y",v),l=a.makeCalcdata(r,"x"),s=Ub(r,a,"x",l),f=!!r.xperiodalignment,c="x"),o=s.vals;for(var u=Math.min(o.length,n.length),h=new Array(u),d=0;d<u;d++)h[d]={p:o[d],s:n[d]},f&&(h[d].orig_p=l[d],h[d][c+"End"]=s.ends[d],h[d][c+"Start"]=s.starts[d]),r.ids&&(h[d].id=String(r.ids[d]));return Vb(r,"marker")&&Wb(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),Vb(r,"marker.line")&&Wb(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),ZN(h,r),KN(h,r),h},JN=yt,e4=de;function t4(t,e,r){var a=t._fullLayout,i=a["_"+r+"Text_minsize"];if(i){var n=a.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}e.selectAll(o).each(function(l){var s=l.transform;if(s){s.scale=n&&s.hide?0:i/s.fontSize;var f=JN.select(this).select("text");e4.setTransormAndDisplay(f,s)}})}}function r4(t,e,r){if(r.uniformtext.mode){var a=ck(t),i=r.uniformtext.minsize,n=e.scale*e.fontSize;e.hide=n<i,r[a]=r[a]||1/0,e.hide||(r[a]=Math.min(r[a],Math.max(n,i)))}}function a4(t,e){var r=ck(t);e[r]=void 0}function ck(t){return"_"+t+"Text_minsize"}var li={recordMinTextSize:r4,clearMinTextSize:a4,resizeText:t4},si={},i4=_t,n4=da,o4=de.isArrayOrTypedArray;si.coerceString=function(t,e,r){if(typeof e=="string"){if(e||!t.noBlank)return e}else if((typeof e=="number"||e===!0)&&!t.strict)return String(e);return r!==void 0?r:t.dflt};si.coerceNumber=function(t,e,r){if(i4(e)){e=+e;var a=t.min,i=t.max,n=a!==void 0&&e<a||i!==void 0&&e>i;if(!n)return e}return r!==void 0?r:t.dflt};si.coerceColor=function(t,e,r){return n4(e).isValid()?e:r!==void 0?r:t.dflt};si.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),t.values.indexOf(e)!==-1?e:r!==void 0?r:t.dflt};si.getValue=function(t,e){var r;return Array.isArray(t)?e<t.length&&(r=t[e]):r=t,r};si.getLineWidth=function(t,e){var r=0<e.mlw?e.mlw:o4(t.marker.line.width)?0:t.marker.line.width;return r};var kl=yt,l4=ut,Vl=Et,uk=de,vk=tt,dk=li.resizeText,Up=fs,s4=Up.textfont,f4=Up.insidetextfont,c4=Up.outsidetextfont,On=si;function u4(t){var e=kl.select(t).selectAll("g.barlayer").selectAll("g.trace");dk(t,e,"bar");var r=e.size(),a=t._fullLayout;e.style("opacity",function(i){return i[0].trace.opacity}).each(function(i){(a.barmode==="stack"&&r>1||a.bargap===0&&a.bargroupgap===0&&!i[0].trace.marker.line.width)&&kl.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(i){var n=kl.select(this),o=i[0].trace;hk(n,o,t)}),vk.getComponentMethod("errorbars","style")(e)}function hk(t,e,r){Vl.pointStyle(t.selectAll("path"),e,r),pk(t,e,r)}function pk(t,e,r){t.selectAll("text").each(function(a){var i=kl.select(this),n=uk.ensureUniformFontSize(r,mk(i,a,e,r));Vl.font(i,n)})}function v4(t,e,r){var a=e[0].trace;a.selectedpoints?d4(r,a,t):(hk(r,a,t),vk.getComponentMethod("errorbars","style")(r))}function d4(t,e,r){Vl.selectedPointStyle(t.selectAll("path"),e),h4(t.selectAll("text"),e,r)}function h4(t,e,r){t.each(function(a){var i=kl.select(this),n;if(a.selected){n=uk.ensureUniformFontSize(r,mk(i,a,e,r));var o=e.selected.textfont&&e.selected.textfont.color;o&&(n.color=o),Vl.font(i,n)}else Vl.selectedTextStyle(i,e)})}function mk(t,e,r,a){var i=a._fullLayout.font,n=r.textfont;if(t.classed("bartext-inside")){var o=xk(e,r);n=gk(r,e.i,i,o)}else t.classed("bartext-outside")&&(n=bk(r,e.i,i));return n}function yk(t,e,r){return Vp(s4,t.textfont,e,r)}function gk(t,e,r,a){var i=yk(t,e,r),n=t._input.textfont===void 0||t._input.textfont.color===void 0||Array.isArray(t.textfont.color)&&t.textfont.color[e]===void 0;return n&&(i={color:l4.contrast(a),family:i.family,size:i.size}),Vp(f4,t.insidetextfont,e,i)}function bk(t,e,r){var a=yk(t,e,r);return Vp(c4,t.outsidetextfont,e,a)}function Vp(t,e,r,a){e=e||{};var i=On.getValue(e.family,r),n=On.getValue(e.size,r),o=On.getValue(e.color,r);return{family:On.coerceString(t.family,i,a.family),size:On.coerceNumber(t.size,n,a.size),color:On.coerceColor(t.color,o,a.color)}}function xk(t,e){return e.type==="waterfall"?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}var dn={style:u4,styleTextPoints:pk,styleOnSelect:v4,getInsideTextFont:gk,getOutsideTextFont:bk,getBarColor:xk,resizeText:dk},Ks=yt,Qs=_t,yr=de,p4=wr,m4=ut,_i=Et,y4=tt,tc=Ot.tickText,_k=li,g4=_k.recordMinTextSize,b4=_k.clearMinTextSize,jv=dn,ko=si,x4=ss,wk=fs,_4=wk.text,w4=wk.textposition,T4=ha.appendArrayPointValue,Ma=x4.TEXTPAD;function k4(t){return t.id}function A4(t){if(t.ids)return k4}function ki(t,e){return t<e?1:-1}function M4(t,e,r,a){var i=[],n=[],o=a?e:r,l=a?r:e;return i[0]=o.c2p(t.s0,!0),n[0]=l.c2p(t.p0,!0),i[1]=o.c2p(t.s1,!0),n[1]=l.c2p(t.p1,!0),a?[i,n]:[n,i]}function Tk(t,e,r,a){if(!e.uniformtext.mode&&kk(r)){var i;return a&&(i=a()),t.transition().duration(r.duration).ease(r.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()})}else return t}function kk(t){return t&&t.duration>0}function S4(t,e,r,a,i,n){var o=e.xaxis,l=e.yaxis,s=t._fullLayout,f=t._context.staticPlot;i||(i={mode:s.barmode,norm:s.barmode,gap:s.bargap,groupgap:s.bargroupgap},b4("bar",s));var c=yr.makeTraceGroups(a,r,"trace bars").each(function(v){var u=Ks.select(this),h=v[0].trace,d=h.type==="waterfall",p=h.type==="funnel",y=h.type==="bar",m=y||p,g=0;d&&h.connector.visible&&h.connector.mode==="between"&&(g=h.connector.line.width/2);var w=h.orientation==="h",b=kk(i),x=yr.ensureSingle(u,"g","points"),_=A4(h),T=x.selectAll("g.point").data(yr.identity,_);T.enter().append("g").classed("point",!0),T.exit().remove(),T.each(function(S,M){var D=Ks.select(this),A=M4(S,o,l,w),C=A[0][0],$=A[0][1],N=A[1][0],E=A[1][1],P=(w?$-C:E-N)===0;P&&m&&ko.getLineWidth(h,S)&&(P=!1),P||(P=!Qs(C)||!Qs($)||!Qs(N)||!Qs(E)),S.isBlank=P,P&&(w?$=C:E=N),g&&!P&&(w?(C-=ki(C,$)*g,$+=ki(C,$)*g):(N-=ki(N,E)*g,E+=ki(N,E)*g));var R,L;if(h.type==="waterfall"){if(!P){var z=h[S.dir].marker;R=z.line.width,L=z.color}}else R=ko.getLineWidth(h,S),L=S.mc||h.marker.color;function I(Y){var K=Ks.round(R/2%1,2);return i.gap===0&&i.groupgap===0?Ks.round(Math.round(Y)-K,2):Y}function H(Y,K,Z){return Z&&Y===K?Y:Math.abs(Y-K)>=2?I(Y):Y>K?Math.ceil(Y):Math.floor(Y)}if(!t._context.staticPlot){var V=m4.opacity(L),O=V<1||R>.01?I:H;C=O(C,$,w),$=O($,C,w),N=O(N,E,!w),E=O(E,N,!w)}var X=Tk(yr.ensureSingle(D,"path"),s,i,n);if(X.style("vector-effect",f?"none":"non-scaling-stroke").attr("d",isNaN(($-C)*(E-N))||P&&t._context.staticPlot?"M0,0Z":"M"+C+","+N+"V"+E+"H"+$+"V"+N+"Z").call(_i.setClipUrl,e.layerClipId,t),!s.uniformtext.mode&&b){var G=_i.makePointStyleFns(h);_i.singlePointStyle(S,X,h,G,t)}L4(t,e,D,v,M,C,$,N,E,i,n),e.layerClipId&&_i.hideOutsideRangePoint(S,D.select("text"),o,l,h.xcalendar,h.ycalendar)});var k=h.cliponaxis===!1;_i.setClipUrl(u,k?null:e.layerClipId,t)});y4.getComponentMethod("errorbars","plot")(t,c,e,i)}function L4(t,e,r,a,i,n,o,l,s,f,c){var v=e.xaxis,u=e.yaxis,h=t._fullLayout,d;function p(Y,K,Z){var q=yr.ensureSingle(Y,"text").text(K).attr({class:"bartext bartext-"+d,"text-anchor":"middle","data-notex":1}).call(_i.font,Z).call(p4.convertToTspans,t);return q}var y=a[0].trace,m=y.orientation==="h",g=D4(h,a,i,v,u);d=$4(y,i);var w=f.mode==="stack"||f.mode==="relative",b=a[i],x=!w||b._outmost;if(!g||d==="none"||(b.isBlank||n===o||l===s)&&(d==="auto"||d==="inside")){r.select("text").remove();return}var _=h.font,T=jv.getBarColor(a[i],y),k=jv.getInsideTextFont(y,i,_,T),S=jv.getOutsideTextFont(y,i,_),M=r.datum();m?v.type==="log"&&M.s0<=0&&(v.range[0]<v.range[1]?n=0:n=v._length):u.type==="log"&&M.s0<=0&&(u.range[0]<u.range[1]?l=u._length:l=0);var D=Math.abs(o-n)-2*Ma,A=Math.abs(s-l)-2*Ma,C,$,N,E,P;if(d==="outside"&&!x&&!b.hasB&&(d="inside"),d==="auto")if(x){d="inside",P=yr.ensureUniformFontSize(t,k),C=p(r,g,P),$=_i.bBox(C.node()),N=$.width,E=$.height;var R=N>0&&E>0,L=N<=D&&E<=A,z=N<=A&&E<=D,I=m?D>=N*(A/E):A>=E*(D/N);R&&(L||z||I)?d="inside":(d="outside",C.remove(),C=null)}else d="inside";if(!C){P=yr.ensureUniformFontSize(t,d==="outside"?S:k),C=p(r,g,P);var H=C.attr("transform");if(C.attr("transform",""),$=_i.bBox(C.node()),N=$.width,E=$.height,C.attr("transform",H),N<=0||E<=0){C.remove();return}}var V=y.textangle,O,X;d==="outside"?(X=y.constraintext==="both"||y.constraintext==="outside",O=C4(n,o,l,s,$,{isHorizontal:m,constrained:X,angle:V})):(X=y.constraintext==="both"||y.constraintext==="inside",O=Sk(n,o,l,s,$,{isHorizontal:m,constrained:X,angle:V,anchor:y.insidetextanchor})),O.fontSize=P.size,g4(y.type==="histogram"?"bar":y.type,O,h),b.transform=O;var G=Tk(C,h,f,c);yr.setTransormAndDisplay(G,O)}function Ak(t){return t==="auto"?0:t}function Mk(t,e){var r=Math.PI/180*e,a=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*a,y:t.width*a+t.height*i}}function Sk(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=n.anchor||"end",c=f==="end",v=f==="start",u=n.leftToRight||0,h=(u+1)/2,d=1-h,p=i.width,y=i.height,m=Math.abs(e-t),g=Math.abs(a-r),w=m>2*Ma&&g>2*Ma?Ma:0;m-=2*w,g-=2*w;var b=Ak(s);s==="auto"&&!(p<=m&&y<=g)&&(p>m||y>g)&&(!(p>g||y>m)||p<y!=m<g)&&(b+=90);var x=Mk(i,b),_=1;l&&(_=Math.min(1,m/x.x,g/x.y));var T=i.left*d+i.right*h,k=(i.top+i.bottom)/2,S=(t+Ma)*d+(e-Ma)*h,M=(r+a)/2,D=0,A=0;if(v||c){var C=(o?x.x:x.y)/2,$=o?ki(t,e):ki(r,a);o?v?(S=t+$*w,D=-$*C):(S=e-$*w,D=$*C):v?(M=r+$*w,A=-$*C):(M=a-$*w,A=$*C)}return{textX:T,textY:k,targetX:S,targetY:M,anchorX:D,anchorY:A,scale:_,rotate:b}}function C4(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=i.width,c=i.height,v=Math.abs(e-t),u=Math.abs(a-r),h;o?h=u>2*Ma?Ma:0:h=v>2*Ma?Ma:0;var d=1;l&&(d=o?Math.min(1,u/c):Math.min(1,v/f));var p=Ak(s),y=Mk(i,p),m=(o?y.x:y.y)/2,g=(i.left+i.right)/2,w=(i.top+i.bottom)/2,b=(t+e)/2,x=(r+a)/2,_=0,T=0,k=o?ki(e,t):ki(r,a);return o?(b=e-k*h,_=k*m):(x=a+k*h,T=-k*m),{textX:g,textY:w,targetX:b,targetY:x,anchorX:_,anchorY:T,scale:d,rotate:p}}function D4(t,e,r,a,i){var n=e[0].trace,o=n.texttemplate,l;return o?l=P4(t,e,r,a,i):n.textinfo?l=E4(e,r,a,i):l=ko.getValue(n.text,r),ko.coerceString(_4,l)}function $4(t,e){var r=ko.getValue(t.textposition,e);return ko.coerceEnumerated(w4,r)}function P4(t,e,r,a,i){var n=e[0].trace,o=yr.castOption(n,r,"texttemplate");if(!o)return"";var l=n.type==="histogram",s=n.type==="waterfall",f=n.type==="funnel",c=n.orientation==="h",v,u,h,d;c?(v="y",u=i,h="x",d=a):(v="x",u=a,h="y",d=i);function p(_){return tc(u,u.c2l(_),!0).text}function y(_){return tc(d,d.c2l(_),!0).text}var m=e[r],g={};g.label=m.p,g.labelLabel=g[v+"Label"]=p(m.p);var w=yr.castOption(n,m.i,"text");(w===0||w)&&(g.text=w),g.value=m.s,g.valueLabel=g[h+"Label"]=y(m.s);var b={};T4(b,n,m.i),(l||b.x===void 0)&&(b.x=c?g.value:g.label),(l||b.y===void 0)&&(b.y=c?g.label:g.value),(l||b.xLabel===void 0)&&(b.xLabel=c?g.valueLabel:g.labelLabel),(l||b.yLabel===void 0)&&(b.yLabel=c?g.labelLabel:g.valueLabel),s&&(g.delta=+m.rawS||m.s,g.deltaLabel=y(g.delta),g.final=m.v,g.finalLabel=y(g.final),g.initial=g.final-g.delta,g.initialLabel=y(g.initial)),f&&(g.value=m.s,g.valueLabel=y(g.value),g.percentInitial=m.begR,g.percentInitialLabel=yr.formatPercent(m.begR),g.percentPrevious=m.difR,g.percentPreviousLabel=yr.formatPercent(m.difR),g.percentTotal=m.sumR,g.percenTotalLabel=yr.formatPercent(m.sumR));var x=yr.castOption(n,m.i,"customdata");return x&&(g.customdata=x),yr.texttemplateString(o,g,t._d3locale,b,g,n._meta||{})}function E4(t,e,r,a){var i=t[0].trace,n=i.orientation==="h",o=i.type==="waterfall",l=i.type==="funnel";function s(x){var _=n?a:r;return tc(_,x,!0).text}function f(x){var _=n?r:a;return tc(_,+x,!0).text}var c=i.textinfo,v=t[e],u=c.split("+"),h=[],d,p=function(x){return u.indexOf(x)!==-1};if(p("label")&&h.push(s(t[e].p)),p("text")&&(d=yr.castOption(i,v.i,"text"),(d===0||d)&&h.push(d)),o){var y=+v.rawS||v.s,m=v.v,g=m-y;p("initial")&&h.push(f(g)),p("delta")&&h.push(f(y)),p("final")&&h.push(f(m))}if(l){p("value")&&h.push(f(v.s));var w=0;p("percent initial")&&w++,p("percent previous")&&w++,p("percent total")&&w++;var b=w>1;p("percent initial")&&(d=yr.formatPercent(v.begR),b&&(d+=" of initial"),h.push(d)),p("percent previous")&&(d=yr.formatPercent(v.difR),b&&(d+=" of previous"),h.push(d)),p("percent total")&&(d=yr.formatPercent(v.sumR),b&&(d+=" of total"),h.push(d))}return h.join("<br>")}var Wp={plot:S4,toMoveInsideBar:Sk},al=Ca,R4=tt,Xb=ut,z4=de.fillText,I4=si.getLineWidth,Gv=Ot.hoverLabelText,F4=ir.BADNUM;function N4(t,e,r,a,i){var n=Lk(t,e,r,a,i);if(n){var o=n.cd,l=o[0].trace,s=o[n.index];return n.color=Ck(l,s),R4.getComponentMethod("errorbars","hoverInfo")(s,l,n),[n]}}function Lk(t,e,r,a,i){var n=t.cd,o=n[0].trace,l=n[0].t,s=a==="closest",f=o.type==="waterfall",c=t.maxHoverDistance,v=t.maxSpikeDistance,u,h,d,p,y,m,g;o.orientation==="h"?(u=r,h=e,d="y",p="x",y=N,m=A):(u=e,h=r,d="x",p="y",m=N,y=A);var w=o[d+"period"],b=s||w;function x(G){return T(G,-1)}function _(G){return T(G,1)}function T(G,Y){var K=G.w;return G[d]+Y*K/2}function k(G){return G[d+"End"]-G[d+"Start"]}var S=s?x:w?function(G){return G.p-k(G)/2}:function(G){return Math.min(x(G),G.p-l.bardelta/2)},M=s?_:w?function(G){return G.p+k(G)/2}:function(G){return Math.max(_(G),G.p+l.bardelta/2)};function D(G,Y,K){return i.finiteRange&&(K=0),al.inbox(G-u,Y-u,K+Math.min(1,Math.abs(Y-G)/g)-1)}function A(G){return D(S(G),M(G),c)}function C(G){return D(x(G),_(G),v)}function $(G){var Y=G[p];if(f){var K=Math.abs(G.rawS)||0;h>0?Y+=K:h<0&&(Y-=K)}return Y}function N(G){var Y=h,K=G.b,Z=$(G);return al.inbox(K-Y,Z-Y,c+(Z-Y)/(Z-K)-1)}function E(G){var Y=h,K=G.b,Z=$(G);return al.inbox(K-Y,Z-Y,v+(Z-Y)/(Z-K)-1)}var P=t[d+"a"],R=t[p+"a"];g=Math.abs(P.r2c(P.range[1])-P.r2c(P.range[0]));function L(G){return(y(G)+m(G))/2}var z=al.getDistanceFunction(a,y,m,L);if(al.getClosest(n,z,t),t.index!==!1&&n[t.index].p!==F4){b||(S=function(G){return Math.min(x(G),G.p-l.bargroupwidth/2)},M=function(G){return Math.max(_(G),G.p+l.bargroupwidth/2)});var I=t.index,H=n[I],V=o.base?H.b+H.s:H.s;t[p+"0"]=t[p+"1"]=R.c2p(H[p],!0),t[p+"LabelVal"]=V;var O=l.extents[l.extents.round(H.p)];t[d+"0"]=P.c2p(s?S(H):O[0],!0),t[d+"1"]=P.c2p(s?M(H):O[1],!0);var X=H.orig_p!==void 0;return t[d+"LabelVal"]=X?H.orig_p:H.p,t.labelLabel=Gv(P,t[d+"LabelVal"],o[d+"hoverformat"]),t.valueLabel=Gv(R,t[p+"LabelVal"],o[p+"hoverformat"]),t.baseLabel=Gv(R,H.b,o[p+"hoverformat"]),t.spikeDistance=(E(H)+C(H))/2,t[d+"Spike"]=P.c2p(H.p,!0),z4(H,o,t),t.hovertemplate=o.hovertemplate,t}}function Ck(t,e){var r=e.mcc||t.marker.color,a=e.mlcc||t.marker.line.color,i=I4(t,e);if(Xb.opacity(r))return r;if(Xb.opacity(a)&&i)return a}var Dk={hoverPoints:N4,hoverOnBars:Lk,getTraceColor:Ck},H4=function(e,r,a){return e.x="xVal"in r?r.xVal:r.x,e.y="yVal"in r?r.yVal:r.y,r.xa&&(e.xaxis=r.xa),r.ya&&(e.yaxis=r.ya),a.orientation==="h"?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e},$k=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=a[0].trace,l=o.type==="funnel",s=o.orientation==="h",f=[],c;if(r===!1)for(c=0;c<a.length;c++)a[c].selected=0;else for(c=0;c<a.length;c++){var v=a[c],u="ct"in v?v.ct:O4(v,i,n,s,l);r.contains(u,!1,c,e)?(f.push({pointNumber:c,x:i.c2d(v.x),y:n.c2d(v.y)}),v.selected=1):v.selected=0}return f};function O4(t,e,r,a,i){var n=e.c2p(a?t.s0:t.p0,!0),o=e.c2p(a?t.s1:t.p1,!0),l=r.c2p(a?t.p0:t.s0,!0),s=r.c2p(a?t.p1:t.s1,!0);return i?[(n+o)/2,(l+s)/2]:a?[o,(l+s)/2]:[(n+o)/2,s]}var B4={attributes:fs,layoutAttributes:jp,supplyDefaults:Ul.supplyDefaults,crossTraceDefaults:Ul.crossTraceDefaults,supplyLayoutDefaults:fk,calc:QN,crossTraceCalc:Cp.crossTraceCalc,colorbar:os,arraysToCalcdata:Gp,plot:Wp.plot,style:dn.style,styleOnSelect:dn.styleOnSelect,hoverPoints:Dk.hoverPoints,eventData:H4,selectPoints:$k,moduleType:"trace",name:"bar",basePlotModule:fr,categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{description:["The data visualized by the span of the bars is set in `y`","if `orientation` is set th *v* (the default)","and the labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}},j4=B4;const hO=Li(j4);var G4=function(e,r){return{start:{valType:"any",editType:"calc",description:["Sets the starting value for the",e,"axis bins. Defaults to the minimum data value,","shifted down if necessary to make nice round values","and to remove ambiguous bin edges. For example, if most of the","data is integers we shift the bin edges 0.5 down, so a `size`","of 5 would have a default `start` of -0.5, so it is clear","that 0-4 are in the first bin, 5-9 in the second, but","continuous data gets a start of 0 and bins [0,5), [5,10) etc.","Dates behave similarly, and `start` should be a date string.","For category data, `start` is based on the category serial","numbers, and defaults to -0.5.",r?"If multiple non-overlaying histograms share a subplot, the first explicit `start` is used exactly and all others are shifted down (if necessary) to differ from that one by an integer number of bins.":""].join(" ")},end:{valType:"any",editType:"calc",description:["Sets the end value for the",e,"axis bins. The last bin may not end exactly at this value,","we increment the bin edge by `size` from `start` until we","reach or exceed `end`. Defaults to the maximum data value.","Like `start`, for dates use a date string, and for category","data `end` is based on the category serial numbers."].join(" ")},size:{valType:"any",editType:"calc",description:["Sets the size of each",e,"axis bin.","Default behavior: If `nbins"+e+"` is 0 or omitted,","we choose a nice round bin size such that the number of bins","is about the same as the typical number of samples in each bin.","If `nbins"+e+"` is provided, we choose a nice round","bin size giving no more than that many bins.","For date data, use milliseconds or *M<n>* for months, as in","`axis.dtick`. For category data, the number of categories to","bin together (always defaults to 1).",r?"If multiple non-overlaying histograms share a subplot, the first explicit `size` is used and all others discarded. If no `size` is provided,the sample data from all traces is combined to determine `size` as described above.":""].join(" ")},editType:"calc"}},U4={eventDataKeys:["binNumber"]},Or=fs,Yb=Po.axisHoverFormat,V4=qr.hovertemplateAttrs,W4=qr.texttemplateAttrs,Uv=Dr,qb=G4,X4=U4,Vv=Kt.extendFlat,Pk={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the x axis."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the y axis."].join(" ")},xhoverformat:Yb("x"),yhoverformat:Yb("y"),text:Vv({},Or.text,{description:["Sets hover text elements associated with each bar.","If a single string, the same string appears over all bars.","If an array of string, the items are mapped in order to the","this trace's coordinates."].join(" ")}),hovertext:Vv({},Or.hovertext,{description:"Same as `text`."}),orientation:Or.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc",description:["Specifies the binning function used for this histogram trace.","If *count*, the histogram values are computed by counting the","number of values lying inside each bin.","If *sum*, *avg*, *min*, *max*,","the histogram values are computed using","the sum, the average, the minimum or the maximum","of the values lying inside each bin respectively."].join(" ")},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc",description:["Specifies the type of normalization used for this histogram trace.","If **, the span of each bar corresponds to the number of","occurrences (i.e. the number of data points lying inside the bins).","If *percent* / *probability*, the span of each bar corresponds to","the percentage / fraction of occurrences with respect to the total","number of sample points","(here, the sum of all bin HEIGHTS equals 100% / 1).","If *density*, the span of each bar corresponds to the number of","occurrences in a bin divided by the size of the bin interval","(here, the sum of all bin AREAS equals the","total number of sample points).","If *probability density*, the area of each bar corresponds to the","probability that an event will fall into the corresponding bin","(here, the sum of all bin AREAS equals 1)."].join(" ")},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc",description:["If true, display the cumulative distribution by summing the","binned values. Use the `direction` and `centralbin` attributes","to tune the accumulation method.","Note: in this mode, the *density* `histnorm` settings behave","the same as their equivalents without *density*:","** and *density* both rise to the number of data points, and","*probability* and *probability density* both rise to the","number of sample points."].join(" ")},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc",description:["Only applies if cumulative is enabled.","If *increasing* (default) we sum all prior bins, so the result","increases from left to right. If *decreasing* we sum later bins","so the result decreases from left to right."].join(" ")},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc",description:["Only applies if cumulative is enabled.","Sets whether the current bin is included, excluded, or has half","of its value included in the current cumulative value.","*include* is the default for compatibility with various other","tools, however it introduces a half-bin bias to the results.","*exclude* makes the opposite half-bin bias, and *half* removes","it."].join(" ")},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `xbins.size` is provided."].join(" ")},xbins:qb("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `ybins.size` is provided."].join(" ")},ybins:qb("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobinx` is not needed. However, we accept","`autobinx: true` or `false` and will update `xbins` accordingly","before deleting `autobinx` from the trace."].join(" ")},autobiny:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobiny` is not needed. However, we accept","`autobiny: true` or `false` and will update `ybins` accordingly","before deleting `autobiny` from the trace."].join(" ")},bingroup:{valType:"string",dflt:"",editType:"calc",description:["Set a group of histogram traces which will have compatible bin settings.","Note that traces on the same subplot and with the same *orientation*","under `barmode` *stack*, *relative* and *group* are forced into the same bingroup,","Using `bingroup`, traces under `barmode` *overlay* and on different axes","(of the same axis type) can have compatible bin settings.","Note that histogram and histogram2d* trace can share the same `bingroup`"].join(" ")},hovertemplate:V4({},{keys:X4.eventDataKeys}),texttemplate:W4({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:Vv({},Or.textposition,{arrayOk:!1}),textfont:Uv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:Uv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:Uv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),insidetextanchor:Or.insidetextanchor,textangle:Or.textangle,cliponaxis:Or.cliponaxis,constraintext:Or.constraintext,marker:Or.marker,offsetgroup:Or.offsetgroup,alignmentgroup:Or.alignmentgroup,selected:Or.selected,unselected:Or.unselected,_deprecated:{bardir:Or._deprecated.bardir}},Zb=tt,il=de,Kb=ut,Y4=Ul.handleText,q4=ok,Z4=Pk,K4=function(e,r,a,i){function n(g,w){return il.coerce(e,r,Z4,g,w)}var o=n("x"),l=n("y"),s=n("cumulative.enabled");s&&(n("cumulative.direction"),n("cumulative.currentbin")),n("text");var f=n("textposition");Y4(e,r,i,n,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),n("hovertext"),n("hovertemplate"),n("xhoverformat"),n("yhoverformat");var c=n("orientation",l&&!o?"h":"v"),v=c==="v"?"x":"y",u=c==="v"?"y":"x",h=o&&l?Math.min(il.minRowLength(o)&&il.minRowLength(l)):il.minRowLength(r[v]||[]);if(!h){r.visible=!1;return}r._length=h;var d=Zb.getComponentMethod("calendars","handleTraceDefaults");d(e,r,["x","y"],i);var p=r[u];p&&n("histfunc"),n("histnorm"),n("autobin"+v),q4(e,r,n,a,i),il.coerceSelectionMarkerOpacity(r,n);var y=(r.marker.line||{}).color,m=Zb.getComponentMethod("errorbars","supplyDefaults");m(e,r,y||Kb.defaultLine,{axis:"y"}),m(e,r,y||Kb.defaultLine,{axis:"x",inherit:"y"})},hl=de,Q4=nr,Js=tt.traceIs,J4=Ap,Qb=hl.nestedProperty,Wv=oi.getAxisGroup,Jb=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],e6=["x","y"],t6=function(e,r){var a=r._histogramBinOpts={},i=[],n={},o=[],l,s,f,c,v,u,h;function d($,N){return hl.coerce(l._input,l,l._module.attributes,$,N)}function p($){return $.orientation==="v"?"x":"y"}function y($,N){var E=Q4.getFromTrace({_fullLayout:r},$,N);return E.type}function m($,N,E){var P=$.uid+"__"+E;N||(N=P);var R=y($,E),L=$[E+"calendar"]||"",z=a[N],I=!0;z&&(R===z.axType&&L===z.calendar?(I=!1,z.traces.push($),z.dirs.push(E)):(N=P,R!==z.axType&&hl.warn(["Attempted to group the bins of trace",$.index,"set on a","type:"+R,"axis","with bins on","type:"+z.axType,"axis."].join(" ")),L!==z.calendar&&hl.warn(["Attempted to group the bins of trace",$.index,"set with a",L,"calendar","with bins",z.calendar?"on a "+z.calendar+" calendar":"w/o a set calendar"].join(" ")))),I&&(a[N]={traces:[$],dirs:[E],axType:R,calendar:$[E+"calendar"]||""}),$["_"+E+"bingroup"]=N}for(v=0;v<e.length;v++)l=e[v],Js(l,"histogram")&&(i.push(l),delete l._xautoBinFinished,delete l._yautoBinFinished,Js(l,"2dMap")||J4(l._input,l,r,d));var g=r._alignmentOpts||{};for(v=0;v<i.length;v++){if(l=i[v],f="",!Js(l,"2dMap")){if(c=p(l),r.barmode==="group"&&l.alignmentgroup){var w=l[c+"axis"],b=Wv(r,w)+l.orientation;(g[b]||{})[l.alignmentgroup]&&(f=b)}!f&&r.barmode!=="overlay"&&(f=Wv(r,l.xaxis)+Wv(r,l.yaxis)+p(l))}f?(n[f]||(n[f]=[]),n[f].push(l)):o.push(l)}for(f in n){if(s=n[f],s.length===1){o.push(s[0]);continue}var x=!1;for(s.length&&(l=s[0],x=d("bingroup")),f=x||f,v=0;v<s.length;v++){l=s[v];var _=l._input.bingroup;_&&_!==f&&hl.warn(["Trace",l.index,"must match","within bingroup",f+".","Ignoring its bingroup:",_,"setting."].join(" ")),l.bingroup=f,m(l,f,p(l))}}for(v=0;v<o.length;v++){l=o[v];var T=d("bingroup");if(Js(l,"2dMap"))for(h=0;h<2;h++){c=e6[h];var k=d(c+"bingroup",T?T+"__"+c:null);m(l,k,c)}else m(l,T,p(l))}for(f in a){var S=a[f];for(s=S.traces,u=0;u<Jb.length;u++){var M=Jb[u],D=M.name,A,C;if(!(D==="nbins"&&S.sizeFound)){for(v=0;v<s.length;v++){if(l=s[v],c=S.dirs[v],A=M.aStr[c],Qb(l._input,A).get()!==void 0){S[D]=d(A),S[D+"Found"]=!0;break}C=(l._autoBin||{})[c]||{},C[D]&&Qb(l,A).set(C[D])}if(D==="start"||D==="end")for(;v<s.length;v++)l=s[v],l["_"+c+"bingroup"]&&(C=(l._autoBin||{})[c]||{},d(A,C[D]));D==="nbins"&&!S.sizeFound&&!S.nbinsFound&&(l=s[0],S[D]=d(A))}}}},Bn=_t,r6={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,a){var i=a[e];return Bn(i)?(i=Number(i),r[t]+=i,i):0},avg:function(t,e,r,a,i){var n=a[e];return Bn(n)&&(n=Number(n),r[t]+=n,i[t]++),0},min:function(t,e,r,a){var i=a[e];if(Bn(i))if(i=Number(i),Bn(r[t])){if(r[t]>i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0},max:function(t,e,r,a){var i=a[e];if(Bn(i))if(i=Number(i),Bn(r[t])){if(r[t]<i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0}},a6={percent:function(t,e){for(var r=t.length,a=100/e,i=0;i<r;i++)t[i]*=a},probability:function(t,e){for(var r=t.length,a=0;a<r;a++)t[a]/=e},density:function(t,e,r,a){var i=t.length;a=a||1;for(var n=0;n<i;n++)t[n]*=r[n]*a},"probability density":function(t,e,r,a){var i=t.length;a&&(e/=a);for(var n=0;n<i;n++)t[n]*=r[n]/e}},i6=function(e,r){for(var a=e.length,i=0,n=0;n<a;n++)r[n]?(e[n]/=r[n],i+=e[n]):e[n]=null;return i},zo=ir,fn=zo.ONEAVGYEAR,ex=zo.ONEAVGMONTH,rc=zo.ONEDAY,tx=zo.ONEHOUR,rx=zo.ONEMIN,ax=zo.ONESEC,ix=Ot.tickIncrement,n6=function(e,r,a,i,n){var o=-1.1*r,l=-.1*r,s=e-l,f=a[0],c=a[1],v=Math.min(ef(f+l,f+s,i,n),ef(c+l,c+s,i,n)),u=Math.min(ef(f+o,f+l,i,n),ef(c+o,c+l,i,n)),h,d;if(v>u&&u<Math.abs(c-f)/4e3?(h=v,d=!1):(h=Math.min(v,u),d=!0),i.type==="date"&&h>rc){var p=h===fn?1:6,y=h===fn?"M12":"M1";return function(m,g){var w=i.c2d(m,fn,n),b=w.indexOf("-",p);b>0&&(w=w.substr(0,b));var x=i.d2c(w,0,n);if(x<m){var _=ix(x,y,!1,n);(x+_)/2<m+e&&(x=_)}return g&&d?ix(x,y,!0,n):x}}return function(m,g){var w=h*Math.round(m/h);return w+h/10<m&&w+h*.9<m+e&&(w+=h),g&&d&&(w-=h),w}};function ef(t,e,r,a){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),n=r.type==="date",o=nx(i,n),l=0;l<10;l++){var s=nx(o*80,n);if(o===s)break;if(o6(s,t,e,n,r,a))o=s;else break}return o}function nx(t,e){return e&&t>ax?t>rc?t>fn*1.1?fn:t>ex*1.1?ex:rc:t>tx?tx:t>rx?rx:ax:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function o6(t,e,r,a,i,n){if(a&&t>rc){var o=ox(e,i,n),l=ox(r,i,n),s=t===fn?0:1;return o[s]!==l[s]}return Math.floor(r/t)-Math.floor(e/t)>.1}function ox(t,e,r){var a=e.c2d(t,fn,r).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}var th=_t,Sr=de,lx=tt,la=Ot,l6=Gp,sx=r6,s6=a6,f6=i6,c6=n6;function u6(t,e){var r=[],a=[],i=e.orientation==="h",n=la.getFromId(t,i?e.yaxis:e.xaxis),o=i?"y":"x",l={x:"y",y:"x"}[o],s=e[o+"calendar"],f=e.cumulative,c,v=Xp(t,e,n,o),u=v[0],h=v[1],d=typeof u.size=="string",p=[],y=d?p:u,m=[],g=[],w=[],b=0,x=e.histnorm,_=e.histfunc,T=x.indexOf("density")!==-1,k,S,M;f.enabled&&T&&(x=x.replace(/ ?density$/,""),T=!1);var D=_==="max"||_==="min",A=D?null:0,C=sx.count,$=s6[x],N=!1,E=function(fe){return n.r2c(fe,0,s)},P;for(Sr.isArrayOrTypedArray(e[l])&&_!=="count"&&(P=e[l],N=_==="avg",C=sx[_]),c=E(u.start),S=E(u.end)+(c-la.tickIncrement(c,u.size,!1,s))/1e6;c<S&&r.length<1e6&&(k=la.tickIncrement(c,u.size,!1,s),r.push((c+k)/2),a.push(A),w.push([]),p.push(c),T&&m.push(1/(k-c)),N&&g.push(0),!(k<=c));)c=k;p.push(c),!d&&n.type==="date"&&(y={start:E(y.start),end:E(y.end),size:y.size}),t._fullLayout._roundFnOpts||(t._fullLayout._roundFnOpts={});var R=e["_"+o+"bingroup"],L={leftGap:1/0,rightGap:1/0};R&&(t._fullLayout._roundFnOpts[R]||(t._fullLayout._roundFnOpts[R]=L),L=t._fullLayout._roundFnOpts[R]);var z=a.length,I=!0,H=L.leftGap,V=L.rightGap,O={};for(c=0;c<h.length;c++){var X=h[c];M=Sr.findBin(X,y),M>=0&&M<z&&(b+=C(M,c,a,P,g),I&&w[M].length&&X!==h[w[M][0]]&&(I=!1),w[M].push(c),O[c]=M,H=Math.min(H,X-p[M]),V=Math.min(V,p[M+1]-X))}L.leftGap=H,L.rightGap=V;var G;I||(G=function(fe,be){return function(){var ne=t._fullLayout._roundFnOpts[R];return c6(ne.leftGap,ne.rightGap,p,n,s)(fe,be)}}),N&&(b=f6(a,g)),$&&$(a,b,m),f.enabled&&h6(a,f.direction,f.currentbin);var Y=Math.min(r.length,a.length),K=[],Z=0,q=Y-1;for(c=0;c<Y;c++)if(a[c]){Z=c;break}for(c=Y-1;c>=Z;c--)if(a[c]){q=c;break}for(c=Z;c<=q;c++)if(th(r[c])&&th(a[c])){var ie={p:r[c],s:a[c],b:0};f.enabled||(ie.pts=w[c],I?ie.ph0=ie.ph1=w[c].length?h[w[c][0]]:r[c]:(e._computePh=!0,ie.ph0=G(p[c]),ie.ph1=G(p[c+1],!0))),K.push(ie)}return K.length===1&&(K[0].width1=la.tickIncrement(K[0].p,u.size,!1,s)-K[0].p),l6(K,e),Sr.isArrayOrTypedArray(e.selectedpoints)&&Sr.tagSelected(K,e,O),K}function Xp(t,e,r,a,i){var n=a+"bins",o=t._fullLayout,l=e["_"+a+"bingroup"],s=o._histogramBinOpts[l],f=o.barmode==="overlay",c,v,u,h,d,p,y,m=function(X){return r.r2c(X,0,h)},g=function(X){return r.c2r(X,0,h)},w=r.type==="date"?function(X){return X||X===0?Sr.cleanDate(X,null,h):null}:function(X){return th(X)?Number(X):null};function b(X,G,Y){G[X+"Found"]?(G[X]=w(G[X]),G[X]===null&&(G[X]=Y[X])):(p[X]=G[X]=Y[X],Sr.nestedProperty(v[0],n+"."+X).set(Y[X]))}if(e["_"+a+"autoBinFinished"])delete e["_"+a+"autoBinFinished"];else{v=s.traces;var x=[],_=!0,T=!1,k=!1;for(c=0;c<v.length;c++)if(u=v[c],u.visible){var S=s.dirs[c];d=u["_"+S+"pos0"]=r.makeCalcdata(u,S),x=Sr.concat(x,d),delete u["_"+a+"autoBinFinished"],e.visible===!0&&(_?_=!1:(delete u._autoBin,u["_"+a+"autoBinFinished"]=1),lx.traceIs(u,"2dMap")&&(T=!0),u.type==="histogram2dcontour"&&(k=!0))}h=v[0][a+"calendar"];var M=la.autoBin(x,r,s.nbins,T,h,s.sizeFound&&s.size),D=v[0]._autoBin={};if(p=D[s.dirs[0]]={},k&&(s.size||(M.start=g(la.tickIncrement(m(M.start),M.size,!0,h))),s.end===void 0&&(M.end=g(la.tickIncrement(m(M.end),M.size,!1,h)))),f&&!lx.traceIs(e,"2dMap")&&M._dataSpan===0&&r.type!=="category"&&r.type!=="multicategory"){if(i)return[M,d,!0];M=v6(t,e,r,a,n)}y=u.cumulative||{},y.enabled&&y.currentbin!=="include"&&(y.direction==="decreasing"?M.start=g(la.tickIncrement(m(M.start),M.size,!0,h)):M.end=g(la.tickIncrement(m(M.end),M.size,!1,h))),s.size=M.size,s.sizeFound||(p.size=M.size,Sr.nestedProperty(v[0],n+".size").set(M.size)),b("start",s,M),b("end",s,M)}d=e["_"+a+"pos0"],delete e["_"+a+"pos0"];var A=e._input[n]||{},C=Sr.extendFlat({},s),$=s.start,N=r.r2l(A.start),E=N!==void 0;if((s.startFound||E)&&N!==r.r2l($)){var P=E?N:Sr.aggNums(Math.min,null,d),R={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:s.size,tick0:$,calendar:h,range:[P,la.tickIncrement(P,s.size,!1,h)].map(r.l2r)},L=la.tickFirst(R);L>r.r2l(P)&&(L=la.tickIncrement(L,s.size,!0,h)),C.start=r.l2r(L),E||Sr.nestedProperty(e,n+".start").set(C.start)}var z=s.end,I=r.r2l(A.end),H=I!==void 0;if((s.endFound||H)&&I!==r.r2l(z)){var V=H?I:Sr.aggNums(Math.max,null,d);C.end=r.l2r(V),H||Sr.nestedProperty(e,n+".start").set(C.end)}var O="autobin"+a;return e._input[O]===!1&&(e._input[n]=Sr.extendFlat({},e[n]||{}),delete e._input[O],delete e[O]),[C,d]}function v6(t,e,r,a,i){var n=t._fullLayout,o=d6(t,e),l=!1,s=1/0,f=[e],c,v,u;for(c=0;c<o.length;c++)if(v=o[c],v===e)l=!0;else if(!l)u=n._histogramBinOpts[v["_"+a+"bingroup"]],s=Math.min(s,u.size||v[i].size);else{var h=Xp(t,v,r,a,!0),d=h[0],p=h[2];v["_"+a+"autoBinFinished"]=1,v["_"+a+"pos0"]=h[1],p?f.push(v):s=Math.min(s,d.size)}var y=new Array(f.length);for(c=0;c<f.length;c++)for(var m=f[c]["_"+a+"pos0"],g=0;g<m.length;g++)if(m[g]!==void 0){y[c]=m[g];break}for(isFinite(s)||(s=Sr.distinctVals(y).minDiff),c=0;c<f.length;c++){v=f[c];var w=v[a+"calendar"],b={start:r.c2r(y[c]-s/2,0,w),end:r.c2r(y[c]+s/2,0,w),size:s};v._input[i]=v[i]=b,u=n._histogramBinOpts[v["_"+a+"bingroup"]],u&&Sr.extendFlat(u,b)}return e[i]}function d6(t,e){for(var r=e.xaxis,a=e.yaxis,i=e.orientation,n=[],o=t._fullData,l=0;l<o.length;l++){var s=o[l];s.type==="histogram"&&s.visible===!0&&s.orientation===i&&s.xaxis===r&&s.yaxis===a&&n.push(s)}return n}function h6(t,e,r){var a,i,n;function o(s){n=t[s],t[s]/=2}function l(s){i=t[s],t[s]=n+i/2,n+=i}if(r==="half")if(e==="increasing")for(o(0),a=1;a<t.length;a++)l(a);else for(o(t.length-1),a=t.length-2;a>=0;a--)l(a);else if(e==="increasing"){for(a=1;a<t.length;a++)t[a]+=t[a-1];r==="exclude"&&(t.unshift(0),t.pop())}else{for(a=t.length-2;a>=0;a--)t[a]+=t[a+1];r==="exclude"&&(t.push(0),t.shift())}}var p6={calc:u6,calcAllAutoBins:Xp},m6=Dk.hoverPoints,y6=Ot.hoverLabelText,g6=function(e,r,a,i,n){var o=m6(e,r,a,i,n);if(o){e=o[0];var l=e.cd[e.index],s=e.cd[0].trace;if(!s.cumulative.enabled){var f=s.orientation==="h"?"y":"x";e[f+"Label"]=y6(e[f+"a"],[l.ph0,l.ph1],s[f+"hoverformat"])}return o}},b6=function(e,r,a,i,n){if(e.x="xVal"in r?r.xVal:r.x,e.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(e.z=r.zLabelVal),r.xa&&(e.xaxis=r.xa),r.ya&&(e.yaxis=r.ya),!(a.cumulative||{}).enabled){var o=Array.isArray(n)?i[0].pts[n[0]][n[1]]:i[n].pts;e.pointNumbers=o,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex;var l;if(a._indexToPoints){l=[];for(var s=0;s<o.length;s++)l=l.concat(a._indexToPoints[o[s]])}else l=o;e.pointIndices=l}return e},x6={attributes:Pk,layoutAttributes:jp,supplyDefaults:K4,crossTraceDefaults:t6,supplyLayoutDefaults:fk,calc:p6.calc,crossTraceCalc:Cp.crossTraceCalc,plot:Wp.plot,layerName:"barlayer",style:dn.style,styleOnSelect:dn.styleOnSelect,colorbar:os,hoverPoints:g6,selectPoints:$k,eventData:b6,moduleType:"trace",name:"histogram",basePlotModule:fr,categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{description:["The sample data from which statistics are computed is set in `x`","for vertically spanning histograms and","in `y` for horizontally spanning histograms.","Binning options are set `xbins` and `ybins` respectively","if no aggregation data is provided."].join(" ")}},_6=x6;const pO=Li(_6);var w6=Ba,T6=Ri.attributes,k6=Dr,A6=$r,M6=qr.hovertemplateAttrs,S6=qr.texttemplateAttrs,jn=Kt.extendFlat,nl=k6({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."}),Xc={labels:{valType:"data_array",editType:"calc",description:["Sets the sector labels.","If `labels` entries are duplicated, we sum associated `values`","or simply count occurrences if `values` is not provided.","For other array attributes (including color) we use the first","non-empty entry among all occurrences of the label."].join(" ")},label0:{valType:"number",dflt:0,editType:"calc",description:["Alternate to `labels`.","Builds a numeric set of labels.","Use with `dlabel`","where `label0` is the starting label and `dlabel` the step."].join(" ")},dlabel:{valType:"number",dflt:1,editType:"calc",description:"Sets the label step. See `label0` for more info."},values:{valType:"data_array",editType:"calc",description:["Sets the values of the sectors.","If omitted, we count occurrences of each label."].join(" ")},marker:{colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:{valType:"color",dflt:A6.defaultLine,arrayOk:!0,editType:"style",description:["Sets the color of the line enclosing each sector."].join(" ")},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style",description:["Sets the width (in px) of the line enclosing each sector."].join(" ")},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot",description:["Sets text elements associated with each sector.","If trace `textinfo` contains a *text* flag, these elements will be seen","on the chart.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each sector.","If a single string, the same string appears for","all data points.","If an array of string, the items are mapped in order of","this trace's sectors.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},scalegroup:{valType:"string",dflt:"",editType:"calc",description:["If there are multiple pie charts that should be sized according to","their totals, link them by providing a non-empty group id here","shared by every trace in the same group."].join(" ")},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc",description:["Determines which trace information appear on the graph."].join(" ")},hoverinfo:jn({},w6.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:M6({},{keys:["label","color","value","percent","text"]}),texttemplate:S6({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot",description:["Specifies the location of the `textinfo`."].join(" ")},textfont:jn({},nl,{description:"Sets the font used for `textinfo`."}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot",description:["Controls the orientation of the text inside chart sectors.","When set to *auto*, text may be oriented in any direction in order","to be as big as possible in the middle of a sector.","The *horizontal* option orients text to be parallel with the bottom","of the chart, and may make text smaller in order to achieve that goal.","The *radial* option orients text along the radius of the sector.","The *tangential* option orients text perpendicular to the radius of the sector."].join(" ")},insidetextfont:jn({},nl,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:jn({},nl,{description:"Sets the font used for `textinfo` lying outside the sector."}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether outside text labels can push the margins."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"plot",description:["Sets the title of the chart.","If it is empty, no title is displayed.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:jn({},nl,{description:["Sets the font used for `title`.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot",description:["Specifies the location of the `title`.","Note that the title's position used to be set","by the now deprecated `titleposition` attribute."].join(" ")},editType:"plot"},domain:T6({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the fraction of the radius to cut out of the pie.","Use this to make a donut chart."].join(" ")},sort:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the sectors are reordered","from largest to smallest."].join(" ")},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc",description:["Specifies the direction at which succeeding sectors follow","one another."].join(" ")},rotation:{valType:"angle",dflt:0,editType:"calc",description:["Instead of the first slice starting at 12 o'clock,","rotate to some other angle."].join(" ")},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc",description:["Sets the fraction of larger radius to pull the sectors","out from the center. This can be a constant","to pull all slices apart from each other equally","or an array to highlight one or more slices."].join(" ")},_deprecated:{title:{valType:"string",dflt:"",editType:"calc",description:["Deprecated in favor of `title.text`.","Note that value of `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:jn({},nl,{description:"Deprecated in favor of `title.font`."}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc",description:"Deprecated in favor of `title.position`."}}},L6=_t,rh=de,C6=Xc,D6=Ri.defaults,$6=Ul.handleText;function Ek(t,e){var r=Array.isArray(t),a=rh.isArrayOrTypedArray(e),i=Math.min(r?t.length:1/0,a?e.length:1/0);if(isFinite(i)||(i=0),i&&a){for(var n,o=0;o<i;o++){var l=e[o];if(L6(l)&&l>0){n=!0;break}}n||(i=0)}return{hasLabels:r,hasValues:a,len:i}}function P6(t,e,r,a){function i(w,b){return rh.coerce(t,e,C6,w,b)}var n=i("labels"),o=i("values"),l=Ek(n,o),s=l.len;if(e._hasLabels=l.hasLabels,e._hasValues=l.hasValues,!e._hasLabels&&e._hasValues&&(i("label0"),i("dlabel")),!s){e.visible=!1;return}e._length=s;var f=i("marker.line.width");f&&i("marker.line.color"),i("marker.colors"),i("scalegroup");var c=i("text"),v=i("texttemplate"),u;if(v||(u=i("textinfo",Array.isArray(c)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),v||u&&u!=="none"){var h=i("textposition");$6(t,e,a,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",p=d||h==="outside";p&&i("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&i("insidetextorientation")}D6(e,a,i);var y=i("hole"),m=i("title.text");if(m){var g=i("title.position",y?"middle center":"top center");!y&&g==="middle center"&&(e.title.position="top center"),rh.coerceFont(i,"title.font",a.font)}i("sort"),i("direction"),i("rotation"),i("pull")}var E6={handleLabelsAndValues:Ek,supplyDefaults:P6},Rk={hiddenlabels:{valType:"data_array",editType:"calc",description:["hiddenlabels is the funnelarea & pie chart analog of","visible:'legendonly'","but it can contain many labels, and can simultaneously","hide slices from several pies/funnelarea charts"].join(" ")},piecolorway:{valType:"colorlist",editType:"calc",description:["Sets the default pie slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendpiecolors`."].join(" ")},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the pie slice colors (whether given by `piecolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}},R6=de,z6=Rk,I6=function(e,r){function a(i,n){return R6.coerce(e,r,z6,i,n)}a("hiddenlabels"),a("piecolorway",r.colorway),a("extendpiecolors")},F6=_t,ah=da,N6=ut,H6={};function O6(t,e){var r=[],a=t._fullLayout,i=a.hiddenlabels||[],n=e.labels,o=e.marker.colors||[],l=e.values,s=e._length,f=e._hasValues&&s,c,v;if(e.dlabel)for(n=new Array(s),c=0;c<s;c++)n[c]=String(e.label0+c*e.dlabel);var u={},h=zk(a["_"+e.type+"colormap"]),d=0,p=!1;for(c=0;c<s;c++){var y,m,g;if(f){if(y=l[c],!F6(y))continue;y=+y}else y=1;m=n[c],(m===void 0||m==="")&&(m=c),m=String(m);var w=u[m];w===void 0?(u[m]=r.length,g=i.indexOf(m)!==-1,g||(d+=y),r.push({v:y,label:m,color:h(o[c],m),i:c,pts:[c],hidden:g})):(p=!0,v=r[w],v.v+=y,v.pts.push(c),v.hidden||(d+=y),v.color===!1&&o[c]&&(v.color=h(o[c],m)))}r=r.filter(function(x){return x.v>=0});var b=e.type==="funnelarea"?p:e.sort;return b&&r.sort(function(x,_){return _.v-x.v}),r[0]&&(r[0].vTotal=d),r}function zk(t){return function(r,a){return!r||(r=ah(r),!r.isValid())?!1:(r=N6.addOpacity(r,r.getAlpha()),t[a]||(t[a]=r),r)}}function B6(t,e){var r=(e||{}).type;r||(r="pie");var a=t._fullLayout,i=t.calcdata,n=a[r+"colorway"],o=a["_"+r+"colormap"];a["extend"+r+"colors"]&&(n=Ik(n,H6));for(var l=0,s=0;s<i.length;s++){var f=i[s],c=f[0].trace.type;if(c===r)for(var v=0;v<f.length;v++){var u=f[v];u.color===!1&&(o[u.label]?u.color=o[u.label]:(o[u.label]=u.color=n[l%n.length],l++))}}}function Ik(t,e){var r,a=JSON.stringify(t),i=e[a];if(!i){for(i=t.slice(),r=0;r<t.length;r++)i.push(ah(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)i.push(ah(t[r]).darken(20).toHexString());e[a]=i}return i}var ac={calc:O6,crossTraceCalc:B6,makePullColorFn:zk,generateExtendedColors:Ik},j6=ha.appendArrayMultiPointValues,G6=function(e,r){var a={curveNumber:r.index,pointNumbers:e.pts,data:r._input,fullData:r,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return e.pts.length===1&&(a.pointNumber=a.i=e.pts[0]),j6(a,r,e.pts),r.type==="funnelarea"&&(delete a.v,delete a.i),a},jr=yt,U6=sr,tf=Ca,Fk=ut,Qa=Et,Lr=de,V6=Lr.strScale,fx=Lr.strTranslate,ih=wr,Nk=li,W6=Nk.recordMinTextSize,X6=Nk.clearMinTextSize,Hk=ss.TEXTPAD,Rt=_n,rf=G6,cx=de.isValidTextValue;function Y6(t,e){var r=t._context.staticPlot,a=t._fullLayout,i=a._size;X6("pie",a),jk(e,t),qk(e,i);var n=Lr.makeTraceGroups(a._pielayer,e,"trace").each(function(o){var l=jr.select(this),s=o[0],f=s.trace;a8(o),l.attr("stroke-linejoin","round"),l.each(function(){var c=jr.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var v=[[[],[]],[[],[]]],u=!1;c.each(function(b,x){if(b.hidden){jr.select(this).selectAll("path,g").remove();return}b.pointNumber=b.i,b.curveNumber=f.index,v[b.pxmid[1]<0?0:1][b.pxmid[0]<0?0:1].push(b);var _=s.cx,T=s.cy,k=jr.select(this),S=k.selectAll("path.surface").data([b]);if(S.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),k.call(Ok,t,o),f.pull){var M=+Rt.castOption(f.pull,b.pts)||0;M>0&&(_+=M*b.pxmid[0],T+=M*b.pxmid[1])}b.cxFinal=_,b.cyFinal=T;function D(R,L,z,I){var H=I*(L[0]-R[0]),V=I*(L[1]-R[1]);return"a"+I*s.r+","+I*s.r+" 0 "+b.largeArc+(z?" 1 ":" 0 ")+H+","+V}var A=f.hole;if(b.v===s.vTotal){var C="M"+(_+b.px0[0])+","+(T+b.px0[1])+D(b.px0,b.pxmid,!0,1)+D(b.pxmid,b.px0,!0,1)+"Z";A?S.attr("d","M"+(_+A*b.px0[0])+","+(T+A*b.px0[1])+D(b.px0,b.pxmid,!1,A)+D(b.pxmid,b.px0,!1,A)+"Z"+C):S.attr("d",C)}else{var $=D(b.px0,b.px1,!0,1);if(A){var N=1-A;S.attr("d","M"+(_+A*b.px1[0])+","+(T+A*b.px1[1])+D(b.px1,b.px0,!1,A)+"l"+N*b.px0[0]+","+N*b.px0[1]+$+"Z")}else S.attr("d","M"+_+","+T+"l"+b.px0[0]+","+b.px0[1]+$+"Z")}Zk(t,b,s);var E=Rt.castOption(f.textposition,b.pts),P=k.selectAll("g.slicetext").data(b.text&&E!=="none"?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var R=Lr.ensureSingle(jr.select(this),"text","",function(G){G.attr("data-notex",1)}),L=Lr.ensureUniformFontSize(t,E==="outside"?Z6(f,b,a.font):Bk(f,b,a.font));R.text(b.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Qa.font,L).call(ih.convertToTspans,t);var z=Qa.bBox(R.node()),I;if(E==="outside")I=dx(z,b);else if(I=Gk(z,b,s),E==="auto"&&I.scale<1){var H=Lr.ensureUniformFontSize(t,f.outsidetextfont);R.call(Qa.font,H),z=Qa.bBox(R.node()),I=dx(z,b)}var V=I.textPosAngle,O=V===void 0?b.pxmid:Af(s.r,V);if(I.targetX=_+O[0]*I.rCenter+(I.x||0),I.targetY=T+O[1]*I.rCenter+(I.y||0),Kk(I,z),I.outside){var X=I.targetY;b.yLabelMin=X-z.height/2,b.yLabelMid=X,b.yLabelMax=X+z.height/2,b.labelExtraX=0,b.labelExtraY=0,u=!0}I.fontSize=L.size,W6(f.type,I,a),o[x].transform=I,Lr.setTransormAndDisplay(R,I)})});var h=jr.select(this).selectAll("g.titletext").data(f.title.text?[0]:[]);if(h.enter().append("g").classed("titletext",!0),h.exit().remove(),h.each(function(){var b=Lr.ensureSingle(jr.select(this),"text","",function(T){T.attr("data-notex",1)}),x=f.title.text;f._meta&&(x=Lr.templateString(x,f._meta)),b.text(x).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Qa.font,f.title.font).call(ih.convertToTspans,t);var _;f.title.position==="middle center"?_=J6(s):_=Xk(s,i),b.attr("transform",fx(_.x,_.y)+V6(Math.min(1,_.scale))+fx(_.tx,_.ty))}),u&&t8(v,f),q6(c,f),u&&f.automargin){var d=Qa.bBox(l.node()),p=f.domain,y=i.w*(p.x[1]-p.x[0]),m=i.h*(p.y[1]-p.y[0]),g=(.5*y-s.r)/i.w,w=(.5*m-s.r)/i.h;U6.autoMargin(t,"pie."+f.uid+".automargin",{xl:p.x[0]-g,xr:p.x[1]+g,yb:p.y[0]-w,yt:p.y[1]+w,l:Math.max(s.cx-s.r-d.left,0),r:Math.max(d.right-(s.cx+s.r),0),b:Math.max(d.bottom-(s.cy+s.r),0),t:Math.max(s.cy-s.r-d.top,0),pad:5})}})});setTimeout(function(){n.selectAll("tspan").each(function(){var o=jr.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function q6(t,e){t.each(function(r){var a=jr.select(this);if(!r.labelExtraX&&!r.labelExtraY){a.select("path.textline").remove();return}var i=a.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,Lr.setTransormAndDisplay(i,r.transform);var n=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],l="M"+n+","+o,s=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var f=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(f)>Math.abs(c)?l+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(n+r.labelExtraX+s):l+="l"+r.labelExtraX+","+f+"v"+(c-f)+"h"+s}else l+="V"+(r.yLabelMid+r.labelExtraY)+"h"+s;Lr.ensureSingle(a,"path","textline").call(Fk.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:l,fill:"none"})})}function Ok(t,e,r){var a=r[0],i=a.cx,n=a.cy,o=a.trace,l=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),t.on("mouseover",function(s){var f=e._fullLayout,c=e._fullData[o.index];if(!(e._dragging||f.hovermode===!1)){var v=c.hoverinfo;if(Array.isArray(v)&&(v=tf.castHoverinfo({hoverinfo:[Rt.castOption(v,s.pts)],_module:o._module},f,0)),v==="all"&&(v="label+text+value+percent+name"),c.hovertemplate||v!=="none"&&v!=="skip"&&v){var u=s.rInscribed||0,h=i+s.pxmid[0]*(1-u),d=n+s.pxmid[1]*(1-u),p=f.separators,y=[];if(v&&v.indexOf("label")!==-1&&y.push(s.label),s.text=Rt.castOption(c.hovertext||c.text,s.pts),v&&v.indexOf("text")!==-1){var m=s.text;Lr.isValidTextValue(m)&&y.push(m)}s.value=s.v,s.valueLabel=Rt.formatPieValue(s.v,p),v&&v.indexOf("value")!==-1&&y.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=Rt.formatPiePercent(s.percent,p),v&&v.indexOf("percent")!==-1&&y.push(s.percentLabel);var g=c.hoverlabel,w=g.font,b=[];tf.loneHover({trace:o,x0:h-u*a.r,x1:h+u*a.r,y:d,_x0:l?i+s.TL[0]:h-u*a.r,_x1:l?i+s.TR[0]:h+u*a.r,_y0:l?n+s.TL[1]:d-u*a.r,_y1:l?n+s.BL[1]:d+u*a.r,text:y.join("<br>"),name:c.hovertemplate||v.indexOf("name")!==-1?c.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:Rt.castOption(g.bgcolor,s.pts)||s.color,borderColor:Rt.castOption(g.bordercolor,s.pts),fontFamily:Rt.castOption(w.family,s.pts),fontSize:Rt.castOption(w.size,s.pts),fontColor:Rt.castOption(w.color,s.pts),nameLength:Rt.castOption(g.namelength,s.pts),textAlign:Rt.castOption(g.align,s.pts),hovertemplate:Rt.castOption(c.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[rf(s,c)]},{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:e,inOut_bbox:b}),s.bbox=b[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[rf(s,c)],event:jr.event})}}),t.on("mouseout",function(s){var f=e._fullLayout,c=e._fullData[o.index],v=jr.select(this).datum();o._hasHoverEvent&&(s.originalEvent=jr.event,e.emit("plotly_unhover",{points:[rf(v,c)],event:jr.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(tf.loneUnhover(f._hoverlayer.node()),o._hasHoverLabel=!1)}),t.on("click",function(s){var f=e._fullLayout,c=e._fullData[o.index];e._dragging||f.hovermode===!1||(e._hoverdata=[rf(s,c)],tf.click(e,jr.event))})}function Z6(t,e,r){var a=Rt.castOption(t.outsidetextfont.color,e.pts)||Rt.castOption(t.textfont.color,e.pts)||r.color,i=Rt.castOption(t.outsidetextfont.family,e.pts)||Rt.castOption(t.textfont.family,e.pts)||r.family,n=Rt.castOption(t.outsidetextfont.size,e.pts)||Rt.castOption(t.textfont.size,e.pts)||r.size;return{color:a,family:i,size:n}}function Bk(t,e,r){var a=Rt.castOption(t.insidetextfont.color,e.pts);!a&&t._input.textfont&&(a=Rt.castOption(t._input.textfont.color,e.pts));var i=Rt.castOption(t.insidetextfont.family,e.pts)||Rt.castOption(t.textfont.family,e.pts)||r.family,n=Rt.castOption(t.insidetextfont.size,e.pts)||Rt.castOption(t.textfont.size,e.pts)||r.size;return{color:a||Fk.contrast(e.color),family:i,size:n}}function jk(t,e){for(var r,a,i=0;i<t.length;i++)if(r=t[i][0],a=r.trace,a.title.text){var n=a.title.text;a._meta&&(n=Lr.templateString(n,a._meta));var o=Qa.tester.append("text").attr("data-notex",1).text(n).call(Qa.font,a.title.font).call(ih.convertToTspans,e),l=Qa.bBox(o.node(),!0);r.titleBox={width:l.width,height:l.height},o.remove()}}function Gk(t,e,r){var a=r.r||e.rpx1,i=e.rInscribed,n=e.startangle===e.stopangle;if(n)return{rCenter:1-i,scale:0,rotate:0,textPosAngle:0};var o=e.ring,l=o===1&&Math.abs(e.startangle-e.stopangle)===Math.PI*2,s=e.halfangle,f=e.midangle,c=r.trace.insidetextorientation,v=c==="horizontal",u=c==="tangential",h=c==="radial",d=c==="auto",p=[],y;if(!d){var m=function(k,S){if(K6(e,k)){var M=Math.abs(k-e.startangle),D=Math.abs(k-e.stopangle),A=M<D?M:D;S==="tan"?y=vx(t,a,o,A,0):y=ux(t,a,o,A,Math.PI/2),y.textPosAngle=k,p.push(y)}},g;if(v||u){for(g=4;g>=-4;g-=2)m(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)m(Math.PI*(g+1),"tan")}if(v||h){for(g=4;g>=-4;g-=2)m(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)m(Math.PI*(g+.5),"rad")}}if(l||d||v){var w=Math.sqrt(t.width*t.width+t.height*t.height);if(y={scale:i*a*2/w,rCenter:1-i,rotate:0},y.textPosAngle=(e.startangle+e.stopangle)/2,y.scale>=1)return y;p.push(y)}(d||h)&&(y=ux(t,a,o,s,f),y.textPosAngle=(e.startangle+e.stopangle)/2,p.push(y)),(d||u)&&(y=vx(t,a,o,s,f),y.textPosAngle=(e.startangle+e.stopangle)/2,p.push(y));for(var b=0,x=0,_=0;_<p.length;_++){var T=p[_].scale;if(x<T&&(x=T,b=_),!d&&x>=1)break}return p[b]}function K6(t,e){var r=t.startangle,a=t.stopangle;return r>e&&e>a||r<e&&e<a}function ux(t,e,r,a,i){e=Math.max(0,e-2*Hk);var n=t.width/t.height,o=Wk(n,a,e,r);return{scale:o*2/t.height,rCenter:Uk(n,o/e),rotate:Vk(i)}}function vx(t,e,r,a,i){e=Math.max(0,e-2*Hk);var n=t.height/t.width,o=Wk(n,a,e,r);return{scale:o*2/t.width,rCenter:Uk(n,o/e),rotate:Vk(i+Math.PI/2)}}function Uk(t,e){return Math.cos(e)-t*e}function Vk(t){return(180/Math.PI*t+720)%180-90}function Wk(t,e,r,a){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),a/(Math.sqrt(t*t+a/2)+t))}function Q6(t,e){return t.v===e.vTotal&&!e.trace.hole?1:Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2)}function dx(t,e){var r=e.pxmid[0],a=e.pxmid[1],i=t.width/2,n=t.height/2;return r<0&&(i*=-1),a<0&&(n*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(n)*(i>0?1:-1)/2,y:n/(1+r*r/(a*a)),outside:!0}}function J6(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}}function Xk(t,e){var r=1,a=1,i,n=t.trace,o={x:t.cx,y:t.cy},l={tx:0,ty:0};l.ty+=n.title.font.size,i=Yk(n),n.title.position.indexOf("top")!==-1?(o.y-=(1+i)*t.r,l.ty-=t.titleBox.height):n.title.position.indexOf("bottom")!==-1&&(o.y+=(1+i)*t.r);var s=e8(t.r,t.trace.aspectratio),f=e.w*(n.domain.x[1]-n.domain.x[0])/2;return n.title.position.indexOf("left")!==-1?(f=f+s,o.x-=(1+i)*s,l.tx+=t.titleBox.width/2):n.title.position.indexOf("center")!==-1?f*=2:n.title.position.indexOf("right")!==-1&&(f=f+s,o.x+=(1+i)*s,l.tx-=t.titleBox.width/2),r=f/t.titleBox.width,a=nh(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,a),tx:l.tx,ty:l.ty}}function e8(t,e){return t/(e===void 0?1:e)}function nh(t,e){var r=t.trace,a=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,a/2)}function Yk(t){var e=t.pull;if(!e)return 0;var r;if(Array.isArray(e))for(e=0,r=0;r<t.pull.length;r++)t.pull[r]>e&&(e=t.pull[r]);return e}function t8(t,e){var r,a,i,n,o,l,s,f,c,v,u,h,d;function p(w,b){return w.pxmid[1]-b.pxmid[1]}function y(w,b){return b.pxmid[1]-w.pxmid[1]}function m(w,b){b||(b={});var x=b.labelExtraY+(a?b.yLabelMax:b.yLabelMin),_=a?w.yLabelMin:w.yLabelMax,T=a?w.yLabelMax:w.yLabelMin,k=w.cyFinal+o(w.px0[1],w.px1[1]),S=x-_,M,D,A,C,$,N;if(S*s>0&&(w.labelExtraY=S),!!Array.isArray(e.pull))for(D=0;D<v.length;D++)A=v[D],!(A===w||(Rt.castOption(e.pull,w.pts)||0)>=(Rt.castOption(e.pull,A.pts)||0))&&((w.pxmid[1]-A.pxmid[1])*s>0?(C=A.cyFinal+o(A.px0[1],A.px1[1]),S=C-_-w.labelExtraY,S*s>0&&(w.labelExtraY+=S)):(T+w.labelExtraY-k)*s>0&&(M=3*l*Math.abs(D-v.indexOf(w)),$=A.cxFinal+n(A.px0[0],A.px1[0]),N=$+M-(w.cxFinal+w.pxmid[0])-w.labelExtraX,N*l>0&&(w.labelExtraX+=N)))}for(a=0;a<2;a++)for(i=a?p:y,o=a?Math.max:Math.min,s=a?1:-1,r=0;r<2;r++){for(n=r?Math.max:Math.min,l=r?1:-1,f=t[a][r],f.sort(i),c=t[1-a][r],v=c.concat(f),h=[],u=0;u<f.length;u++)f[u].yLabelMid!==void 0&&h.push(f[u]);for(d=!1,u=0;a&&u<c.length;u++)if(c[u].yLabelMid!==void 0){d=c[u];break}for(u=0;u<h.length;u++){var g=u&&h[u-1];d&&!u&&(g=d),m(h[u],g)}}}function qk(t,e){for(var r=[],a=0;a<t.length;a++){var i=t[a][0],n=i.trace,o=n.domain,l=e.w*(o.x[1]-o.x[0]),s=e.h*(o.y[1]-o.y[0]);n.title.text&&n.title.position!=="middle center"&&(s-=nh(i,e));var f=l/2,c=s/2;n.type==="funnelarea"&&!n.scalegroup&&(c/=n.aspectratio),i.r=Math.min(f,c)/(1+Yk(n)),i.cx=e.l+e.w*(n.domain.x[1]+n.domain.x[0])/2,i.cy=e.t+e.h*(1-n.domain.y[0])-s/2,n.title.text&&n.title.position.indexOf("bottom")!==-1&&(i.cy-=nh(i,e)),n.scalegroup&&r.indexOf(n.scalegroup)===-1&&r.push(n.scalegroup)}r8(t,r)}function r8(t,e){for(var r,a,i,n=0;n<e.length;n++){var o=1/0,l=e[n];for(a=0;a<t.length;a++)if(r=t[a][0],i=r.trace,i.scalegroup===l){var s;if(i.type==="pie")s=r.r*r.r;else if(i.type==="funnelarea"){var f,c;i.aspectratio>1?(f=r.r,c=f/i.aspectratio):(c=r.r,f=c*i.aspectratio),f*=(1+i.baseratio)/2,s=f*c}o=Math.min(o,s/r.vTotal)}for(a=0;a<t.length;a++)if(r=t[a][0],i=r.trace,i.scalegroup===l){var v=o*r.vTotal;i.type==="funnelarea"&&(v/=(1+i.baseratio)/2,v/=i.aspectratio),r.r=Math.sqrt(v)}}}function a8(t){var e=t[0],r=e.r,a=e.trace,i=Rt.getRotationAngle(a.rotation),n=2*Math.PI/e.vTotal,o="px0",l="px1",s,f,c;if(a.direction==="counterclockwise"){for(s=0;s<t.length&&t[s].hidden;s++);if(s===t.length)return;i+=n*t[s].v,n*=-1,o="px1",l="px0"}for(c=Af(r,i),s=0;s<t.length;s++)f=t[s],!f.hidden&&(f[o]=c,f.startangle=i,i+=n*f.v/2,f.pxmid=Af(r,i),f.midangle=i,i+=n*f.v/2,c=Af(r,i),f.stopangle=i,f[l]=c,f.largeArc=f.v>e.vTotal/2?1:0,f.halfangle=Math.PI*Math.min(f.v/e.vTotal,.5),f.ring=1-a.hole,f.rInscribed=Q6(f,e))}function Af(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function Zk(t,e,r){var a=t._fullLayout,i=r.trace,n=i.texttemplate,o=i.textinfo;if(!n&&o&&o!=="none"){var l=o.split("+"),s=function(b){return l.indexOf(b)!==-1},f=s("label"),c=s("text"),v=s("value"),u=s("percent"),h=a.separators,d;if(d=f?[e.label]:[],c){var p=Rt.getFirstFilled(i.text,e.pts);cx(p)&&d.push(p)}v&&d.push(Rt.formatPieValue(e.v,h)),u&&d.push(Rt.formatPiePercent(e.v/r.vTotal,h)),e.text=d.join("<br>")}function y(b){return{label:b.label,value:b.v,valueLabel:Rt.formatPieValue(b.v,a.separators),percent:b.v/r.vTotal,percentLabel:Rt.formatPiePercent(b.v/r.vTotal,a.separators),color:b.color,text:b.text,customdata:Lr.castOption(i,b.i,"customdata")}}if(n){var m=Lr.castOption(i,e.i,"texttemplate");if(!m)e.text="";else{var g=y(e),w=Rt.getFirstFilled(i.text,e.pts);(cx(w)||w==="")&&(g.text=w),e.text=Lr.texttemplateString(m,g,t._fullLayout._d3locale,g,i._meta||{})}}}function Kk(t,e){var r=t.rotate*Math.PI/180,a=Math.cos(r),i=Math.sin(r),n=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=n*a-o*i,t.textY=n*i+o*a,t.noCenter=!0}var Qk={plot:Y6,formatSliceLabel:Zk,transformInsideText:Gk,determineInsideTextFont:Bk,positionTitleOutside:Xk,prerenderTitles:jk,layoutAreas:qk,attachFxHandlers:Ok,computeTransform:Kk},hx=yt,i8=Yh,n8=li.resizeText,o8=function(e){var r=e._fullLayout._pielayer.selectAll(".trace");n8(e,r,"pie"),r.each(function(a){var i=a[0],n=i.trace,o=hx.select(this);o.style({opacity:n.opacity}),o.selectAll("path.surface").each(function(l){hx.select(this).call(i8,l,n)})})},Jk={};(function(t){var e=sr;t.name="pie",t.plot=function(r,a,i,n){e.plotBasePlot(t.name,r,a,i,n)},t.clean=function(r,a,i,n){e.cleanBasePlot(t.name,r,a,i,n)}})(Jk);var l8={attributes:Xc,supplyDefaults:E6.supplyDefaults,supplyLayoutDefaults:I6,layoutAttributes:Rk,calc:ac.calc,crossTraceCalc:ac.crossTraceCalc,plot:Qk.plot,style:o8,styleOne:Yh,moduleType:"trace",name:"pie",basePlotModule:Jk,categories:["pie-like","pie","showLegend"],meta:{description:["A data visualized by the sectors of the pie is set in `values`.","The sector labels are set in `labels`.","The sector colors are set in `marker.colors`"].join(" ")}},s8=l8;const mO=Li(s8);var eA={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}},Mf=de.extendFlat,Sf=Ei,px=Po.axisHoverFormat,oh=Da.dash,f8=cc,tA=eA,c8=tA.INCREASING.COLOR,u8=tA.DECREASING.COLOR,ic=Sf.line;function mx(t){return{line:{color:Mf({},ic.color,{dflt:t}),width:ic.width,dash:oh,editType:"style"},editType:"style"}}var rA={xperiod:Sf.xperiod,xperiod0:Sf.xperiod0,xperiodalignment:Sf.xperiodalignment,xhoverformat:px("x"),yhoverformat:px("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the x coordinates.","If absent, linear coordinate will be generated."].join(" ")},open:{valType:"data_array",editType:"calc",description:"Sets the open values."},high:{valType:"data_array",editType:"calc",description:"Sets the high values."},low:{valType:"data_array",editType:"calc",description:"Sets the low values."},close:{valType:"data_array",editType:"calc",description:"Sets the close values."},line:{width:Mf({},ic.width,{description:[ic.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:Mf({},oh,{description:[oh.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:mx(c8),decreasing:mx(u8),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets hover text elements associated with each sample point.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to","this trace's sample points."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:"Same as `text`."},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc",description:["Sets the width of the open/close tick marks","relative to the *x* minimal interval."].join(" ")},hoverlabel:Mf({},f8.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}})},v8=tt,d8=de,h8=function(e,r,a,i){var n=a("x"),o=a("open"),l=a("high"),s=a("low"),f=a("close");a("hoverlabel.split");var c=v8.getComponentMethod("calendars","handleTraceDefaults");if(c(e,r,["x"],i),!!(o&&l&&s&&f)){var v=Math.min(o.length,l.length,s.length,f.length);return n&&(v=Math.min(v,d8.minRowLength(n))),r._length=v,v}},p8=de,m8=h8,y8=Oc,g8=rA,b8=function(e,r,a,i){function n(l,s){return p8.coerce(e,r,g8,l,s)}var o=m8(e,r,n,i);if(!o){r.visible=!1;return}y8(e,r,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),yx(e,r,n,"increasing"),yx(e,r,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),i._requestRangeslider[r.xaxis]=!0};function yx(t,e,r,a){r(a+".line.color"),r(a+".line.width",e.line.width),r(a+".line.dash",e.line.dash)}var Yc=de,af=Yc._,Lf=Ot,x8=Bc,ol=ir.BADNUM;function _8(t,e){var r=Lf.getFromId(t,e.xaxis),a=Lf.getFromId(t,e.yaxis),i=T8(t,r,e),n=e._minDiff;e._minDiff=null;var o=e._origX;e._origX=null;var l=e._xcalc;e._xcalc=null;var s=aA(t,e,o,l,a,w8);return e._extremes[r._id]=Lf.findExtremes(r,l,{vpad:n/2}),s.length?(Yc.extendFlat(s[0].t,{wHover:n/2,tickLen:i}),s):[{t:{empty:!0}}]}function w8(t,e,r,a){return{o:t,h:e,l:r,c:a}}function aA(t,e,r,a,i,n){for(var o=i.makeCalcdata(e,"open"),l=i.makeCalcdata(e,"high"),s=i.makeCalcdata(e,"low"),f=i.makeCalcdata(e,"close"),c=Array.isArray(e.text),v=Array.isArray(e.hovertext),u=!0,h=null,d=!!e.xperiodalignment,p=[],y=0;y<a.length;y++){var m=a[y],g=o[y],w=l[y],b=s[y],x=f[y];if(m!==ol&&g!==ol&&w!==ol&&b!==ol&&x!==ol){x===g?h!==null&&x!==h&&(u=x>h):u=x>g,h=x;var _=n(g,w,b,x);_.pos=m,_.yc=(g+x)/2,_.i=y,_.dir=u?"increasing":"decreasing",_.x=_.pos,_.y=[b,w],d&&(_.orig_p=r[y]),c&&(_.tx=e.text[y]),v&&(_.htx=e.hovertext[y]),p.push(_)}else p.push({pos:m,empty:!0})}return e._extremes[i._id]=Lf.findExtremes(i,Yc.concat(s,l),{padded:!0}),p.length&&(p[0].t={labels:{open:af(t,"open:")+" ",high:af(t,"high:")+" ",low:af(t,"low:")+" ",close:af(t,"close:")+" "}}),p}function T8(t,e,r){var a=r._minDiff;if(!a){var i=t._fullData,n=[];a=1/0;var o;for(o=0;o<i.length;o++){var l=i[o];if(l.type==="ohlc"&&l.visible===!0&&l.xaxis===e._id){n.push(l);var s=e.makeCalcdata(l,"x");l._origX=s;var f=x8(r,e,"x",s).vals;l._xcalc=f;var c=Yc.distinctVals(f).minDiff;c&&isFinite(c)&&(a=Math.min(a,c))}}for(a===1/0&&(a=1),o=0;o<n.length;o++)n[o]._minDiff=a}return a*r.tickwidth}var k8={calc:_8,calcCommon:aA},A8=yt,gx=de,M8=function(e,r,a,i){var n=r.yaxis,o=r.xaxis,l=!!o.rangebreaks;gx.makeTraceGroups(i,a,"trace ohlc").each(function(s){var f=A8.select(this),c=s[0],v=c.t,u=c.trace;if(u.visible!==!0||v.empty){f.remove();return}var h=v.tickLen,d=f.selectAll("path").data(gx.identity);d.enter().append("path"),d.exit().remove(),d.attr("d",function(p){if(p.empty)return"M0,0Z";var y=o.c2p(p.pos-h,!0),m=o.c2p(p.pos+h,!0),g=l?(y+m)/2:o.c2p(p.pos,!0),w=n.c2p(p.o,!0),b=n.c2p(p.h,!0),x=n.c2p(p.l,!0),_=n.c2p(p.c,!0);return"M"+y+","+w+"H"+g+"M"+g+","+b+"V"+x+"M"+m+","+_+"H"+g})})},Xv=yt,S8=Et,L8=ut,C8=function(e,r,a){var i=a||Xv.select(e).selectAll("g.ohlclayer").selectAll("g.trace");i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var o=n[0].trace;Xv.select(this).selectAll("path").each(function(l){if(!l.empty){var s=o[l.dir].line;Xv.select(this).style("fill","none").call(L8.stroke,s.color).call(S8.dashLine,s.dash,s.width).style("opacity",o.selectedpoints&&!l.selected?.3:1)}})})},lh=Ot,D8=de,nf=Ca,$8=ut,P8=de.fillText,bx=eA,E8={increasing:bx.INCREASING.SYMBOL,decreasing:bx.DECREASING.SYMBOL};function R8(t,e,r,a){var i=t.cd,n=i[0].trace;return n.hoverlabel.split?nA(t,e,r,a):oA(t,e,r,a)}function iA(t,e,r,a){var i=t.cd,n=t.xa,o=i[0].trace,l=i[0].t,s=o.type,f=s==="ohlc"?"l":"min",c=s==="ohlc"?"h":"max",v,u,h=l.bPos||0,d=function(M){return M.pos+h-e},p=l.bdPos||l.tickLen,y=l.wHover,m=Math.min(1,p/Math.abs(n.r2c(n.range[1])-n.r2c(n.range[0])));v=t.maxHoverDistance-m,u=t.maxSpikeDistance-m;function g(M){var D=d(M);return nf.inbox(D-y,D+y,v)}function w(M){var D=M[f],A=M[c];return D===A||nf.inbox(D-r,A-r,v)}function b(M){return(g(M)+w(M))/2}var x=nf.getDistanceFunction(a,g,w,b);if(nf.getClosest(i,x,t),t.index===!1)return null;var _=i[t.index];if(_.empty)return null;var T=_.dir,k=o[T],S=k.line.color;return $8.opacity(S)&&k.line.width?t.color=S:t.color=k.fillcolor,t.x0=n.c2p(_.pos+h-p,!0),t.x1=n.c2p(_.pos+h+p,!0),t.xLabelVal=_.orig_p!==void 0?_.orig_p:_.pos,t.spikeDistance=b(_)*u/v,t.xSpike=n.c2p(_.pos,!0),t}function nA(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=[],f=iA(t,e,r,a);if(!f)return[];var c=f.index,v=i[c],u=v.hi||o.hoverinfo,h=u.split("+"),d=u==="all",p=d||h.indexOf("y")!==-1;if(!p)return[];for(var y=["high","open","close","low"],m={},g=0;g<y.length;g++){var w=y[g],b=o[w][f.index],x=n.c2p(b,!0),_;b in m?(_=m[b],_.yLabel+="<br>"+l.labels[w]+lh.hoverLabelText(n,b,o.yhoverformat)):(_=D8.extendFlat({},f),_.y0=_.y1=x,_.yLabelVal=b,_.yLabel=l.labels[w]+lh.hoverLabelText(n,b,o.yhoverformat),_.name="",s.push(_),m[b]=_)}return s}function oA(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=iA(t,e,r,a);if(!s)return[];var f=s.index,c=i[f],v=s.index=c.i,u=c.dir;function h(b){return l.labels[b]+lh.hoverLabelText(n,o[b][v],o.yhoverformat)}var d=c.hi||o.hoverinfo,p=d.split("+"),y=d==="all",m=y||p.indexOf("y")!==-1,g=y||p.indexOf("text")!==-1,w=m?[h("open"),h("high"),h("low"),h("close")+" "+E8[u]]:[];return g&&P8(c,o,w),s.extraText=w.join("<br>"),s.y0=s.y1=n.c2p(c.yc,!0),[s]}var z8={hoverPoints:R8,hoverSplit:nA,hoverOnPoints:oA},I8=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l,s=a[0].t.bPos||0;if(r===!1)for(l=0;l<a.length;l++)a[l].selected=0;else for(l=0;l<a.length;l++){var f=a[l];r.contains([i.c2p(f.pos+s),n.c2p(f.yc)],null,f.i,e)?(o.push({pointNumber:f.i,x:i.c2d(f.pos),y:n.c2d(f.yc)}),f.selected=1):f.selected=0}return o},F8={moduleType:"trace",name:"ohlc",basePlotModule:fr,categories:["cartesian","svg","showLegend"],meta:{description:["The ohlc (short for Open-High-Low-Close) is a style of financial chart describing","open, high, low and close for a given `x` coordinate (most likely time).","The tip of the lines represent the `low` and `high` values and","the horizontal segments represent the `open` and `close` values.","Sample points where the close value is higher (lower) then the open","value are called increasing (decreasing).","By default, increasing items are drawn in green whereas","decreasing are drawn in red."].join(" ")},attributes:rA,supplyDefaults:b8,calc:k8.calc,plot:M8,style:C8,hoverPoints:z8.hoverPoints,selectPoints:I8},N8=F8;const yO=Li(N8);var H8=tt,ba=de,O8=v2;function B8(t,e,r,a){var i=t.cd,n=i[0].t,o=i[0].trace,l=t.xa,s=t.ya,f=n.x,c=n.y,v=l.c2p(e),u=s.c2p(r),h=t.distance,d;if(n.tree){var p=l.p2c(v-h),y=l.p2c(v+h),m=s.p2c(u-h),g=s.p2c(u+h);a==="x"?d=n.tree.range(Math.min(p,y),Math.min(s._rl[0],s._rl[1]),Math.max(p,y),Math.max(s._rl[0],s._rl[1])):d=n.tree.range(Math.min(p,y),Math.min(m,g),Math.max(p,y),Math.max(m,g))}else d=n.ids;var w,b,x,_,T,k,S,M,D,A=h;if(a==="x"){var C=!!o.xperiodalignment,$=!!o.yperiodalignment;for(T=0;T<d.length;T++){if(w=d[T],x=f[w],k=Math.abs(l.c2p(x)-v),C){var N=l.c2p(o._xStarts[w]),E=l.c2p(o._xEnds[w]);k=v>=Math.min(N,E)&&v<=Math.max(N,E)?0:1/0}if(k<A){if(A=k,_=c[w],S=s.c2p(_)-u,$){var P=s.c2p(o._yStarts[w]),R=s.c2p(o._yEnds[w]);S=u>=Math.min(P,R)&&u<=Math.max(P,R)?0:1/0}D=Math.sqrt(k*k+S*S),b=d[T]}}}else for(T=d.length-1;T>-1;T--)w=d[T],x=f[w],_=c[w],k=l.c2p(x)-v,S=s.c2p(_)-u,M=Math.sqrt(k*k+S*S),M<A&&(A=D=M,b=w);return t.index=b,t.distance=A,t.dxy=D,b===void 0?[t]:[lA(t,f,c,o)]}function lA(t,e,r,a){var i=t.xa,n=t.ya,o=t.distance,l=t.dxy,s=t.index,f={pointNumber:s,x:e[s],y:r[s]};f.tx=Array.isArray(a.text)?a.text[s]:a.text,f.htx=Array.isArray(a.hovertext)?a.hovertext[s]:a.hovertext,f.data=Array.isArray(a.customdata)?a.customdata[s]:a.customdata,f.tp=Array.isArray(a.textposition)?a.textposition[s]:a.textposition;var c=a.textfont;c&&(f.ts=ba.isArrayOrTypedArray(c.size)?c.size[s]:c.size,f.tc=Array.isArray(c.color)?c.color[s]:c.color,f.tf=Array.isArray(c.family)?c.family[s]:c.family);var v=a.marker;v&&(f.ms=ba.isArrayOrTypedArray(v.size)?v.size[s]:v.size,f.mo=ba.isArrayOrTypedArray(v.opacity)?v.opacity[s]:v.opacity,f.mx=ba.isArrayOrTypedArray(v.symbol)?v.symbol[s]:v.symbol,f.ma=ba.isArrayOrTypedArray(v.angle)?v.angle[s]:v.angle,f.mc=ba.isArrayOrTypedArray(v.color)?v.color[s]:v.color);var u=v&&v.line;u&&(f.mlc=Array.isArray(u.color)?u.color[s]:u.color,f.mlw=ba.isArrayOrTypedArray(u.width)?u.width[s]:u.width);var h=v&&v.gradient;h&&h.type!=="none"&&(f.mgt=Array.isArray(h.type)?h.type[s]:h.type,f.mgc=Array.isArray(h.color)?h.color[s]:h.color);var d=i.c2p(f.x,!0),p=n.c2p(f.y,!0),y=f.mrc||1,m=a.hoverlabel;m&&(f.hbg=Array.isArray(m.bgcolor)?m.bgcolor[s]:m.bgcolor,f.hbc=Array.isArray(m.bordercolor)?m.bordercolor[s]:m.bordercolor,f.hts=ba.isArrayOrTypedArray(m.font.size)?m.font.size[s]:m.font.size,f.htc=Array.isArray(m.font.color)?m.font.color[s]:m.font.color,f.htf=Array.isArray(m.font.family)?m.font.family[s]:m.font.family,f.hnl=ba.isArrayOrTypedArray(m.namelength)?m.namelength[s]:m.namelength);var g=a.hoverinfo;g&&(f.hi=Array.isArray(g)?g[s]:g);var w=a.hovertemplate;w&&(f.ht=Array.isArray(w)?w[s]:w);var b={};b[t.index]=f;var x=a._origX,_=a._origY,T=ba.extendFlat({},t,{color:O8(a,f),x0:d-y,x1:d+y,xLabelVal:x?x[s]:f.x,y0:p-y,y1:p+y,yLabelVal:_?_[s]:f.y,cd:b,distance:o,spikeDistance:l,hovertemplate:f.ht});return f.htx?T.text=f.htx:f.tx?T.text=f.tx:a.text&&(T.text=a.text),ba.fillText(f,a,T),H8.getComponentMethod("errorbars","hoverInfo")(f,a,T),T}var j8={hoverPoints:B8,calcHover:lA},sA={exports:{}},xx=20,qc={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:xx,SYMBOL_STROKE:xx/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}},G8=Ba,Wt=Ei,_x=Po.axisHoverFormat,wx=xn,U8=kh,Yv=Kt.extendFlat,V8=ai.overrideAll,W8=qc.DASHES,Tx=Wt.line,Ka=Wt.marker,X8=Ka.line,oo=sA.exports=V8({x:Wt.x,x0:Wt.x0,dx:Wt.dx,y:Wt.y,y0:Wt.y0,dy:Wt.dy,xperiod:Wt.xperiod,yperiod:Wt.yperiod,xperiod0:Wt.xperiod0,yperiod0:Wt.yperiod0,xperiodalignment:Wt.xperiodalignment,yperiodalignment:Wt.yperiodalignment,xhoverformat:_x("x"),yhoverformat:_x("y"),text:Wt.text,hovertext:Wt.hovertext,textposition:Wt.textposition,textfont:Wt.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:Tx.color,width:Tx.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","The values correspond to step-wise line shapes."].join(" ")},dash:{valType:"enumerated",values:U8(W8),dflt:"solid",description:"Sets the style of the lines."}},marker:Yv({},wx("marker"),{symbol:Ka.symbol,angle:Ka.angle,size:Ka.size,sizeref:Ka.sizeref,sizemin:Ka.sizemin,sizemode:Ka.sizemode,opacity:Ka.opacity,colorbar:Ka.colorbar,line:Yv({},wx("marker.line"),{width:X8.width})}),connectgaps:Wt.connectgaps,fill:Yv({},Wt.fill,{dflt:"none"}),fillcolor:Wt.fillcolor,selected:{marker:Wt.selected.marker,textfont:Wt.selected.textfont},unselected:{marker:Wt.unselected.marker,textfont:Wt.unselected.textfont},opacity:G8.opacity},"calc","nested");oo.x.editType=oo.y.editType=oo.x0.editType=oo.y0.editType="calc+clearAxisTypes";oo.hovertemplate=Wt.hovertemplate;oo.texttemplate=Wt.texttemplate;var fA=sA.exports,Zc={},cA=qc;Zc.isOpenSymbol=function(t){return typeof t=="string"?cA.OPEN_RE.test(t):t%200>100};Zc.isDotSymbol=function(t){return typeof t=="string"?cA.DOT_RE.test(t):t>200};var kx=de,Y8=tt,q8=Zc,Z8=fA,K8=Nc,of=Pr,Q8=kp,J8=Oc,eH=jT,tH=GT,rH=VT,aH=UT,iH=function(e,r,a,i){function n(h,d){return kx.coerce(e,r,Z8,h,d)}var o=e.marker?q8.isOpenSymbol(e.marker.symbol):!1,l=of.isBubble(e),s=Q8(e,r,i,n);if(!s){r.visible=!1;return}J8(e,r,i,n),n("xhoverformat"),n("yhoverformat");var f=s<K8.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("hovertemplate"),n("mode",f),of.hasLines(r)&&(n("connectgaps"),tH(e,r,a,i,n),n("line.shape")),of.hasMarkers(r)&&(eH(e,r,a,i,n,{noAngleRef:!0,noStandOff:!0}),n("marker.line.width",o||l?1:0)),of.hasText(r)&&(n("texttemplate"),aH(e,r,i,n));var c=(r.line||{}).color,v=(r.marker||{}).color;n("fill"),r.fill!=="none"&&rH(e,r,a,n);var u=Y8.getComponentMethod("errorbars","supplyDefaults");u(e,r,c||v||a,{axis:"y"}),u(e,r,c||v||a,{axis:"x",inherit:"y"}),kx.coerceSelectionMarkerOpacity(r,n)},nH=u2,oH=function(e,r,a){var i=e.i;return"x"in e||(e.x=r._x[i]),"y"in e||(e.y=r._y[i]),nH(e,r,a)},uA=_t,lH=da,nc=h1,oc=ho,sH=$r.defaultLine,Ax=Xr.isArrayOrTypedArray,sh=nc(sH),vA=1;function Mx(t,e){var r=t;return r[3]*=e,r}function Sx(t){if(uA(t))return sh;var e=nc(t);return e.length?e:sh}function Lx(t){return uA(t)?t:vA}function fH(t,e,r){var a=t.color,i=Ax(a),n=Ax(e),o=oc.extractOpts(t),l=[],s,f,c,v,u;if(o.colorscale!==void 0?s=oc.makeColorScaleFuncFromTrace(t):s=Sx,i?f=function(d,p){return d[p]===void 0?sh:nc(s(d[p]))}:f=Sx,n?c=function(d,p){return d[p]===void 0?vA:Lx(d[p])}:c=Lx,i||n)for(var h=0;h<r;h++)v=f(a,h),u=c(e,h),l[h]=Mx(v,u);else l=Mx(nc(a),e);return l}function cH(t){var e=oc.extractOpts(t),r=e.colorscale;return e.reversescale&&(r=oc.flipScale(e.colorscale)),r.map(function(a){var i=a[0],n=lH(a[1]),o=n.toRgb();return{index:i,rgb:[o.r,o.g,o.b,o.a]}})}var uH={formatColor:fH,parseColorScale:cH},Cf=_t,vH=NA,lf=h1,dH=tt,Ur=de,Qn=Et,Cx=nr,Dx=uH.formatColor,uo=Pr,hH=O_,fh=Zc,cs=qc,pH=Zl.DESELECTDIM,$x={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},mH=ha.appendArrayPointValue;function yH(t,e){var r,a={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=t._context.plotGlPixelRatio;if(e.visible!==!0)return a;if(uo.hasText(e)&&(a.text=dA(t,e),a.textSel=Px(t,e,e.selected),a.textUnsel=Px(t,e,e.unselected)),uo.hasMarkers(e)&&(a.marker=Yp(t,e),a.markerSel=ch(t,e,e.selected),a.markerUnsel=ch(t,e,e.unselected),!e.unselected&&Ur.isArrayOrTypedArray(e.marker.opacity))){var n=e.marker.opacity;for(a.markerUnsel.opacity=new Array(n.length),r=0;r<n.length;r++)a.markerUnsel.opacity[r]=pH*n[r]}if(uo.hasLines(e)){a.line={overlay:!0,thickness:e.line.width*i,color:e.line.color,opacity:e.opacity};var o=(cs.DASHES[e.line.dash]||[1]).slice();for(r=0;r<o.length;++r)o[r]*=e.line.width*i;a.line.dashes=o}return e.error_x&&e.error_x.visible&&(a.errorX=Ex(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(a.errorY=Ex(e,e.error_y,i)),e.fill&&e.fill!=="none"&&(a.fill={closed:!0,fill:e.fillcolor,thickness:0}),a}function dA(t,e){var r=t._fullLayout,a=e._length,i=e.textfont,n=e.textposition,o=Array.isArray(n)?n:[n],l=i.color,s=i.size,f=i.family,c={},v,u=t._context.plotGlPixelRatio,h=e.texttemplate;if(h){c.text=[];var d=r._d3locale,p=Array.isArray(h),y=p?Math.min(h.length,a):a,m=p?function(k){return h[k]}:function(){return h};for(v=0;v<y;v++){var g={i:v},w=e._module.formatLabels(g,e,r),b={};mH(b,e,v);var x=e._meta||{};c.text.push(Ur.texttemplateString(m(v),w,d,b,g,x))}}else Array.isArray(e.text)&&e.text.length<a?c.text=e.text.slice():c.text=e.text;if(Array.isArray(c.text))for(v=c.text.length;v<a;v++)c.text[v]="";for(c.opacity=e.opacity,c.font={},c.align=[],c.baseline=[],v=0;v<o.length;v++){var _=o[v].split(/\s+/);switch(_[1]){case"left":c.align.push("right");break;case"right":c.align.push("left");break;default:c.align.push(_[1])}switch(_[0]){case"top":c.baseline.push("bottom");break;case"bottom":c.baseline.push("top");break;default:c.baseline.push(_[0])}}if(Array.isArray(l))for(c.color=new Array(a),v=0;v<a;v++)c.color[v]=l[v];else c.color=l;if(Ur.isArrayOrTypedArray(s)||Array.isArray(f))for(c.font=new Array(a),v=0;v<a;v++){var T=c.font[v]={};T.size=(Ur.isTypedArray(s)?s[v]:Array.isArray(s)?Cf(s[v])?s[v]:0:s)*u,T.family=Array.isArray(f)?f[v]:f}else c.font={size:s*u,family:f};return c}function Yp(t,e){var r=e._length,a=e.marker,i={},n,o=Ur.isArrayOrTypedArray(a.symbol),l=Ur.isArrayOrTypedArray(a.angle),s=Ur.isArrayOrTypedArray(a.color),f=Ur.isArrayOrTypedArray(a.line.color),c=Ur.isArrayOrTypedArray(a.opacity),v=Ur.isArrayOrTypedArray(a.size),u=Ur.isArrayOrTypedArray(a.line.width),h;if(o||(h=fh.isOpenSymbol(a.symbol)),o||s||f||c||l){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var d=a.symbol,p=a.angle,y=Dx(a,a.opacity,r),m=Dx(a.line,a.opacity,r);if(!Array.isArray(m[0])){var g=m;for(m=Array(r),n=0;n<r;n++)m[n]=g}if(!Array.isArray(y[0])){var w=y;for(y=Array(r),n=0;n<r;n++)y[n]=w}if(!Array.isArray(d)){var b=d;for(d=Array(r),n=0;n<r;n++)d[n]=b}if(!Array.isArray(p)){var x=p;for(p=Array(r),n=0;n<r;n++)p[n]=x}for(i.symbols=d,i.angles=p,i.colors=y,i.borderColors=m,n=0;n<r;n++)o&&(h=fh.isOpenSymbol(a.symbol[n])),h&&(m[n]=y[n].slice(),y[n]=y[n].slice(),y[n][3]=0);for(i.opacity=e.opacity,i.markers=new Array(r),n=0;n<r;n++)i.markers[n]=Ix({mx:i.symbols[n],ma:i.angles[n]},e)}else h?(i.color=lf(a.color,"uint8"),i.color[3]=0,i.borderColor=lf(a.color,"uint8")):(i.color=lf(a.color,"uint8"),i.borderColor=lf(a.line.color,"uint8")),i.opacity=e.opacity*a.opacity,i.marker=Ix({mx:a.symbol,ma:a.angle},e);var _=1,T=hH(e,_),k;if(v||u){var S=i.sizes=new Array(r),M=i.borderSizes=new Array(r),D=0,A;if(v){for(n=0;n<r;n++)S[n]=T(a.size[n]),D+=S[n];A=D/r}else for(k=T(a.size),n=0;n<r;n++)S[n]=k;if(u)for(n=0;n<r;n++)M[n]=a.line.width[n];else for(k=a.line.width,n=0;n<r;n++)M[n]=k;i.sizeAvg=A}else i.size=T(a&&a.size||10),i.borderSizes=T(a.line.width);return i}function ch(t,e,r){var a=e.marker,i={};return r&&(r.marker&&r.marker.symbol?i=Yp(t,Ur.extendFlat({},a,r.marker)):r.marker&&(r.marker.size&&(i.size=r.marker.size),r.marker.color&&(i.colors=r.marker.color),r.marker.opacity!==void 0&&(i.opacity=r.marker.opacity))),i}function Px(t,e,r){var a={};if(!r)return a;if(r.textfont){var i={opacity:1,text:e.text,texttemplate:e.texttemplate,textposition:e.textposition,textfont:Ur.extendFlat({},e.textfont)};r.textfont&&Ur.extendFlat(i.textfont,r.textfont),a=dA(t,i)}return a}function Ex(t,e,r){var a={capSize:e.width*2*r,lineWidth:e.thickness*r,color:e.color};return e.copy_ystyle&&(a=t.error_y),a}var Rx=cs.SYMBOL_SDF_SIZE,Yi=cs.SYMBOL_SIZE,zx=cs.SYMBOL_STROKE,qv={},gH=Qn.symbolFuncs[0](Yi*.05);function Ix(t,e){var r=t.mx;if(r==="circle")return null;var a,i,n=Qn.symbolNumber(r),o=Qn.symbolFuncs[n%100],l=!!Qn.symbolNoDot[n%100],s=!!Qn.symbolNoFill[n%100],f=fh.isDotSymbol(r);if(t.ma&&(r+="_"+t.ma),qv[r])return qv[r];var c=Qn.getMarkerAngle(t,e);return f&&!l?a=o(Yi*1.1,c)+gH:a=o(Yi,c),i=vH(a,{w:Rx,h:Rx,viewBox:[-Yi,-Yi,Yi,Yi],stroke:s?zx:-zx}),qv[r]=i,i||null}function bH(t,e,r){var a=r.length,i=a/2,n,o;if(uo.hasLines(e)&&i)if(e.line.shape==="hv"){for(n=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?n.push(r[o*2+2],r[o*2+1]):n.push(NaN,NaN));n.push(r[a-2],r[a-1])}else if(e.line.shape==="hvh"){for(n=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?n.push(r[o*2],r[o*2+1]):n.push(NaN,NaN),n.push(NaN,NaN);else{var l=(r[o*2]+r[o*2+2])/2;n.push(r[o*2],r[o*2+1],l,r[o*2+1],l,r[o*2+3])}n.push(r[a-2],r[a-1])}else if(e.line.shape==="vhv"){for(n=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?n.push(r[o*2],r[o*2+1]):n.push(NaN,NaN),n.push(NaN,NaN);else{var s=(r[o*2+1]+r[o*2+3])/2;n.push(r[o*2],r[o*2+1],r[o*2],s,r[o*2+2],s)}n.push(r[a-2],r[a-1])}else if(e.line.shape==="vh"){for(n=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?n.push(r[o*2],r[o*2+3]):n.push(NaN,NaN));n.push(r[a-2],r[a-1])}else n=r;var f=!1;for(o=0;o<n.length;o++)if(isNaN(n[o])){f=!0;break}var c=f||n.length>cs.TOO_MANY_POINTS||uo.hasMarkers(e)?"rect":"round";if(f&&e.connectgaps){var v=n[0],u=n[1];for(o=0;o<n.length;o+=2)isNaN(n[o])||isNaN(n[o+1])?(n[o]=v,n[o+1]=u):(v=n[o],u=n[o+1])}return{join:c,positions:n}}function xH(t,e,r,a,i){var n=dH.getComponentMethod("errorbars","makeComputeError"),o=Cx.getFromId(t,e.xaxis,"x"),l=Cx.getFromId(t,e.yaxis,"y"),s=r.length/2,f={};function c(v,u){var h=u._id.charAt(0),d=e["error_"+h];if(d&&d.visible&&(u.type==="linear"||u.type==="log")){for(var p=n(d),y={x:0,y:1}[h],m={x:[0,1,2,3],y:[2,3,0,1]}[h],g=new Float64Array(4*s),w=1/0,b=-1/0,x=0,_=0;x<s;x++,_+=4){var T=v[x];if(Cf(T)){var k=r[x*2+y],S=p(T,x),M=S[0],D=S[1];if(Cf(M)&&Cf(D)){var A=T-M,C=T+D;g[_+m[0]]=k-u.c2l(A),g[_+m[1]]=u.c2l(C)-k,g[_+m[2]]=0,g[_+m[3]]=0,w=Math.min(w,T-M),b=Math.max(b,T+D)}}}f[h]={positions:r,errors:g,_bnds:[w,b]}}}return c(a,o),c(i,l),f}function _H(t,e,r,a){var i=e._length,n={},o;if(uo.hasMarkers(e)){var l=r.font,s=r.align,f=r.baseline;for(n.offset=new Array(i),o=0;o<i;o++){var c=a.sizes?a.sizes[o]:a.size,v=Array.isArray(l)?l[o].size:l.size,u=Array.isArray(s)?s.length>1?s[o]:s[0]:s,h=Array.isArray(f)?f.length>1?f[o]:f[0]:f,d=$x[u],p=$x[h],y=c?c/.8+1:0,m=-p*y-p*.5;n.offset[o]=[d*y/v,m/v]}}return n}var wH={style:yH,markerStyle:Yp,markerSelection:ch,linePositions:bH,errorBarPositions:xH,textPosition:_H},sf=de,TH=function(e,r){var a=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},n={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(a=r._scene={},a.init=function(){sf.extendFlat(a,n,i)},a.init(),a.update=function(l){var s=sf.repeat(l,a.count);if(a.fill2d&&a.fill2d.update(s),a.scatter2d&&a.scatter2d.update(s),a.line2d&&a.line2d.update(s),a.error2d&&a.error2d.update(s.concat(s)),a.select2d&&a.select2d.update(s),a.glText)for(var f=0;f<a.count;f++)a.glText[f].update(l)},a.draw=function(){for(var l=a.count,s=a.fill2d,f=a.error2d,c=a.line2d,v=a.scatter2d,u=a.glText,h=a.select2d,d=a.selectBatch,p=a.unselectBatch,y=0;y<l;y++){if(s&&a.fillOrder[y]&&s.draw(a.fillOrder[y]),c&&a.lineOptions[y]&&c.draw(y),f&&(a.errorXOptions[y]&&f.draw(y),a.errorYOptions[y]&&f.draw(y+l)),v&&a.markerOptions[y])if(p[y].length){var m=sf.repeat([],a.count);m[y]=p[y],v.draw(m)}else d[y].length||v.draw(y);u[y]&&a.textOptions[y]&&u[y].render()}h&&h.draw(d),a.dirty=!1},a.destroy=function(){a.fill2d&&a.fill2d.destroy&&a.fill2d.destroy(),a.scatter2d&&a.scatter2d.destroy&&a.scatter2d.destroy(),a.error2d&&a.error2d.destroy&&a.error2d.destroy(),a.line2d&&a.line2d.destroy&&a.line2d.destroy(),a.select2d&&a.select2d.destroy&&a.select2d.destroy(),a.glText&&a.glText.forEach(function(l){l.destroy&&l.destroy()}),a.lineOptions=null,a.fillOptions=null,a.markerOptions=null,a.markerSelectedOptions=null,a.markerUnselectedOptions=null,a.errorXOptions=null,a.errorYOptions=null,a.textOptions=null,a.textSelectedOptions=null,a.textUnselectedOptions=null,a.selectBatch=null,a.unselectBatch=null,r._scene=null}),a.dirty||sf.extendFlat(a,i),a},kH=HA,Gn=de,Fx=nr,AH=ts.findExtremes,Nx=Bc,qp=Sp,MH=qp.calcMarkerSize,SH=qp.calcAxisExpansion,LH=qp.setFirstScatter,CH=YT,Un=wH,DH=TH,Hx=ir.BADNUM,$H=qc.TOO_MANY_POINTS,PH=function(e,r){var a=e._fullLayout,i=r._xA=Fx.getFromId(e,r.xaxis,"x"),n=r._yA=Fx.getFromId(e,r.yaxis,"y"),o=a._plots[r.xaxis+r.yaxis],l=r._length,s=l>=$H,f=l*2,c={},v,u=i.makeCalcdata(r,"x"),h=n.makeCalcdata(r,"y"),d=Nx(r,i,"x",u),p=Nx(r,n,"y",h),y=d.vals,m=p.vals;r._x=y,r._y=m,r.xperiodalignment&&(r._origX=u,r._xStarts=d.starts,r._xEnds=d.ends),r.yperiodalignment&&(r._origY=h,r._yStarts=p.starts,r._yEnds=p.ends);var g=new Array(f),w=new Array(l);for(v=0;v<l;v++)g[v*2]=y[v]===Hx?NaN:y[v],g[v*2+1]=m[v]===Hx?NaN:m[v],w[v]=v;if(i.type==="log")for(v=0;v<f;v+=2)g[v]=i.c2l(g[v]);if(n.type==="log")for(v=1;v<f;v+=2)g[v]=n.c2l(g[v]);s&&i.type!=="log"&&n.type!=="log"?c.tree=kH(g):c.ids=w,CH(e,r);var b=EH(e,o,r,g,y,m),x=DH(e,o);LH(a,r);var _;return s?b.marker&&(_=b.marker.sizeAvg||Math.max(b.marker.size,3)):_=MH(r,l),SH(e,r,i,n,y,m,_),b.errorX&&Ox(r,i,b.errorX),b.errorY&&Ox(r,n,b.errorY),b.fill&&!x.fill2d&&(x.fill2d=!0),b.marker&&!x.scatter2d&&(x.scatter2d=!0),b.line&&!x.line2d&&(x.line2d=!0),(b.errorX||b.errorY)&&!x.error2d&&(x.error2d=!0),b.text&&!x.glText&&(x.glText=!0),b.marker&&(b.marker.snap=l),x.lineOptions.push(b.line),x.errorXOptions.push(b.errorX),x.errorYOptions.push(b.errorY),x.fillOptions.push(b.fill),x.markerOptions.push(b.marker),x.markerSelectedOptions.push(b.markerSel),x.markerUnselectedOptions.push(b.markerUnsel),x.textOptions.push(b.text),x.textSelectedOptions.push(b.textSel),x.textUnselectedOptions.push(b.textUnsel),x.selectBatch.push([]),x.unselectBatch.push([]),c._scene=x,c.index=x.count,c.x=y,c.y=m,c.positions=g,x.count++,[{x:!1,y:!1,t:c,trace:r}]};function Ox(t,e,r){var a=t._extremes[e._id],i=AH(e,r._bnds,{padded:!0});a.min=a.min.concat(i.min),a.max=a.max.concat(i.max)}function EH(t,e,r,a,i,n){var o=Un.style(t,r);if(o.marker&&(o.marker.positions=a),o.line&&a.length>1&&Gn.extendFlat(o.line,Un.linePositions(t,r,a)),o.errorX||o.errorY){var l=Un.errorBarPositions(t,r,a,i,n);o.errorX&&Gn.extendFlat(o.errorX,l.x),o.errorY&&Gn.extendFlat(o.errorY,l.y)}return o.text&&(Gn.extendFlat(o.text,{positions:a},Un.textPosition(t,r,o.text,o.marker)),Gn.extendFlat(o.textSel,{positions:a},Un.textPosition(t,r,o.text,o.markerSel)),Gn.extendFlat(o.textUnsel,{positions:a},Un.textPosition(t,r,o.text,o.markerUnsel))),o}var RH=de,zH=ut,IH=Zl.DESELECTDIM;function FH(t){var e=t[0],r=e.trace,a=e.t,i=a._scene,n=a.index,o=i.selectBatch[n],l=i.unselectBatch[n],s=i.textOptions[n],f=i.textSelectedOptions[n]||{},c=i.textUnselectedOptions[n]||{},v=RH.extendFlat({},s),u,h;if(o.length||l.length){var d=f.color,p=c.color,y=s.color,m=Array.isArray(y);for(v.color=new Array(r._length),u=0;u<o.length;u++)h=o[u],v.color[h]=d||(m?y[h]:y);for(u=0;u<l.length;u++){h=l[u];var g=m?y[h]:y;v.color[h]=p||(d?g:zH.addOpacity(g,IH))}}i.glText[n].update(v)}var hA={styleTextSelection:FH},Bx=Pr,NH=hA.styleTextSelection,HH=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s=a[0].t,f=l._length,c=s.x,v=s.y,u=s._scene,h=s.index;if(!u)return o;var d=Bx.hasText(l),p=Bx.hasMarkers(l),y=!p&&!d;if(l.visible!==!0||y)return o;var m=[],g=[];if(r!==!1&&!r.degenerate)for(var w=0;w<f;w++)r.contains([s.xpx[w],s.ypx[w]],!1,w,e)?(m.push(w),o.push({pointNumber:w,x:i.c2d(c[w]),y:n.c2d(v[w])})):g.push(w);if(p){var b=u.scatter2d;if(!m.length&&!g.length){var x=new Array(u.count);x[h]=u.markerOptions[h],b.update.apply(b,x)}else if(!u.selectBatch[h].length&&!u.unselectBatch[h].length){var _=new Array(u.count);_[h]=u.markerUnselectedOptions[h],b.update.apply(b,_)}}return u.selectBatch[h]=m,u.unselectBatch[h]=g,d&&NH(a),o},OH=j8,BH={moduleType:"trace",name:"scattergl",basePlotModule:fr,categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:fA,supplyDefaults:iH,crossTraceDefaults:WT,colorbar:os,formatLabels:oH,calc:PH,hoverPoints:OH.hoverPoints,selectPoints:HH,meta:{hrName:"scatter_gl",description:["The data visualized as scatter point or lines is set in `x` and `y`","using the WebGL plotting engine.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to a numerical arrays."].join(" ")}},pA={exports:{}},jx=ut,jH=function(){},GH=function(e){for(var r in e)typeof e[r]=="function"&&(e[r]=jH);e.destroy=function(){e.container.parentNode.removeChild(e.container)};var a=document.createElement("div");a.className="no-webgl",a.style.cursor="pointer",a.style.fontSize="24px",a.style.color=jx.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=jx.lightLine,a.style["z-index"]=30;var i=document.createElement("p");return i.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",i.style.position="relative",i.style.top="50%",i.style.left="50%",i.style.height="30%",i.style.width="50%",i.style.margin="-15% 0 0 -25%",a.appendChild(i),e.container.appendChild(a),e.container.style.background="#FFFFFF",e.container.onclick=function(){window.open("https://get.webgl.org")},!1},UH=GH,VH=OA,WH=function(e,r,a){var i=e._fullLayout,n=!0;return i._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(a);return}if(!(o.pick&&!i._has("parcoords"))){try{o.regl=VH({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||CA.devicePixelRatio,extensions:r||[],cachedCode:a||{}})}catch{n=!1}o.regl||(n=!1),n&&this.addEventListener("webglcontextlost",function(l){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:l,layer:o.key})},!1)}}),n||UH({container:i._glcontainer.node()}),n},Gx=BA,Ux=jA,XH=GA,Vx=UA,Zv=de,YH=wn.selectMode,qH=WH,ZH=Pr,KH=f2,QH=hA.styleTextSelection,mA={};function JH(t,e,r,a){var i=t._size,n=t.width*a,o=t.height*a,l=i.l*a,s=i.b*a,f=i.r*a,c=i.t*a,v=i.w*a,u=i.h*a;return[l+e.domain[0]*v,s+r.domain[0]*u,n-f-(1-e.domain[1])*v,o-c-(1-r.domain[1])*u]}var e7=pA.exports=function(e,r,a){if(a.length){var i=e._fullLayout,n=r._scene,o=r.xaxis,l=r.yaxis,s,f;if(n){var c=qH(e,["ANGLE_instanced_arrays","OES_element_index_uint"],mA);if(!c){n.init();return}var v=n.count,u=i._glcanvas.data()[0].regl;if(KH(e,r,a),n.dirty){if(n.error2d===!0&&(n.error2d=XH(u)),n.line2d===!0&&(n.line2d=Ux(u)),n.scatter2d===!0&&(n.scatter2d=Gx(u)),n.fill2d===!0&&(n.fill2d=Ux(u)),n.glText===!0)for(n.glText=new Array(v),s=0;s<v;s++)n.glText[s]=new Vx(u);if(n.glText){if(v>n.glText.length){var h=v-n.glText.length;for(s=0;s<h;s++)n.glText.push(new Vx(u))}else if(v<n.glText.length){var d=n.glText.length-v,p=n.glText.splice(v,d);p.forEach(function(L){L.destroy()})}for(s=0;s<v;s++)n.glText[s].update(n.textOptions[s])}if(n.line2d&&(n.line2d.update(n.lineOptions),n.lineOptions=n.lineOptions.map(function(L){if(L&&L.positions){for(var z=L.positions,I=0;I<z.length&&(isNaN(z[I])||isNaN(z[I+1]));)I+=2;for(var H=z.length-2;H>I&&(isNaN(z[H])||isNaN(z[H+1]));)H-=2;L.positions=z.slice(I,H+2)}return L}),n.line2d.update(n.lineOptions)),n.error2d){var y=(n.errorXOptions||[]).concat(n.errorYOptions||[]);n.error2d.update(y)}n.scatter2d&&n.scatter2d.update(n.markerOptions),n.fillOrder=Zv.repeat(null,v),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(L,z){var I=a[z];if(!(!L||!I||!I[0]||!I[0].trace)){var H=I[0],V=H.trace,O=H.t,X=n.lineOptions[z],G,Y,K=[];V._ownfill&&K.push(z),V._nexttrace&&K.push(z+1),K.length&&(n.fillOrder[z]=K);var Z=[],q=X&&X.positions||O.positions,ie,fe;if(V.fill==="tozeroy"){for(ie=0;ie<q.length&&isNaN(q[ie+1]);)ie+=2;for(fe=q.length-2;fe>ie&&isNaN(q[fe+1]);)fe-=2;q[ie+1]!==0&&(Z=[q[ie],0]),Z=Z.concat(q.slice(ie,fe+2)),q[fe+1]!==0&&(Z=Z.concat([q[fe],0]))}else if(V.fill==="tozerox"){for(ie=0;ie<q.length&&isNaN(q[ie]);)ie+=2;for(fe=q.length-2;fe>ie&&isNaN(q[fe]);)fe-=2;q[ie]!==0&&(Z=[0,q[ie+1]]),Z=Z.concat(q.slice(ie,fe+2)),q[fe]!==0&&(Z=Z.concat([0,q[fe+1]]))}else if(V.fill==="toself"||V.fill==="tonext"){for(Z=[],G=0,L.splitNull=!0,Y=0;Y<q.length;Y+=2)(isNaN(q[Y])||isNaN(q[Y+1]))&&(Z=Z.concat(q.slice(G,Y)),Z.push(q[G],q[G+1]),Z.push(null,null),G=Y+2);Z=Z.concat(q.slice(G)),G&&Z.push(q[G],q[G+1])}else{var be=V._nexttrace;if(be){var ne=n.lineOptions[z+1];if(ne){var U=ne.positions;if(V.fill==="tonexty"){for(Z=q.slice(),z=Math.floor(U.length/2);z--;){var ae=U[z*2],ce=U[z*2+1];isNaN(ae)||isNaN(ce)||Z.push(ae,ce)}L.fill=be.fillcolor}}}}if(V._prevtrace&&V._prevtrace.fill==="tonext"){var se=n.lineOptions[z-1].positions,pe=Z.length/2;G=pe;var ge=[G];for(Y=0;Y<se.length;Y+=2)(isNaN(se[Y])||isNaN(se[Y+1]))&&(ge.push(Y/2+pe+1),G=Y+2);Z=Z.concat(se),L.hole=ge}return L.fillmode=V.fill,L.opacity=V.opacity,L.positions=Z,L}}),n.fill2d.update(n.fillOptions))}var m=i.dragmode,g=YH(m),w=i.clickmode.indexOf("select")>-1;for(s=0;s<v;s++){var b=a[s][0],x=b.trace,_=b.t,T=_.index,k=x._length,S=_.x,M=_.y;if(x.selectedpoints||g||w){if(g||(g=!0),x.selectedpoints){var D=n.selectBatch[T]=Zv.selIndices2selPoints(x),A={};for(f=0;f<D.length;f++)A[D[f]]=1;var C=[];for(f=0;f<k;f++)A[f]||C.push(f);n.unselectBatch[T]=C}var $=_.xpx=new Array(k),N=_.ypx=new Array(k);for(f=0;f<k;f++)$[f]=o.c2p(S[f]),N[f]=l.c2p(M[f])}else _.xpx=_.ypx=null}if(g){if(n.select2d||(n.select2d=Gx(i._glcanvas.data()[1].regl)),n.scatter2d){var E=new Array(v);for(s=0;s<v;s++)E[s]=n.selectBatch[s].length||n.unselectBatch[s].length?n.markerUnselectedOptions[s]:{};n.scatter2d.update(E)}n.select2d&&(n.select2d.update(n.markerOptions),n.select2d.update(n.markerSelectedOptions)),n.glText&&a.forEach(function(L){var z=((L||[])[0]||{}).trace||{};ZH.hasText(z)&&QH(L)})}else n.scatter2d&&n.scatter2d.update(n.markerOptions);var P={viewport:JH(i,o,l,e._context.plotGlPixelRatio),range:[(o._rl||o.range)[0],(l._rl||l.range)[0],(o._rl||o.range)[1],(l._rl||l.range)[1]]},R=Zv.repeat(P,n.count);n.fill2d&&n.fill2d.update(R),n.line2d&&n.line2d.update(R),n.error2d&&n.error2d.update(R.concat(R)),n.scatter2d&&n.scatter2d.update(R),n.select2d&&n.select2d.update(R),n.glText&&n.glText.forEach(function(L){L.update(P)})}}};e7.reglPrecompiled=mA;var t7=pA.exports,yA=BH;yA.plot=t7;var r7=yA,a7=r7;const gO=Li(a7);var gA={};(function(t){var e=sr;t.name="treemap",t.plot=function(r,a,i,n){e.plotBasePlot(t.name,r,a,i,n)},t.clean=function(r,a,i,n){e.cleanBasePlot(t.name,r,a,i,n)}})(gA);var bA={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]},i7=Ba,n7=qr.hovertemplateAttrs,o7=qr.texttemplateAttrs,l7=xn,s7=Ri.attributes,qa=Xc,Wx=bA,ll=Kt.extendFlat,f7={labels:{valType:"data_array",editType:"calc",description:["Sets the labels of each of the sectors."].join(" ")},parents:{valType:"data_array",editType:"calc",description:["Sets the parent sectors for each of the sectors.","Empty string items '' are understood to reference","the root node in the hierarchy.",'If `ids` is filled, `parents` items are understood to be "ids" themselves.',"When `ids` is not set, plotly attempts to find matching items in `labels`,","but beware they must be unique."].join(" ")},values:{valType:"data_array",editType:"calc",description:["Sets the values associated with each of the sectors.","Use with `branchvalues` to determine how the values are summed."].join(" ")},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc",description:["Determines how the items in `values` are summed.","When set to *total*, items in `values` are taken to be value of all its descendants.","When set to *remainder*, items in `values` corresponding to the root and the branches sectors","are taken to be the extra part not part of the sum of the values at their leaves."].join(" ")},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc",description:["Determines default for `values` when it is not provided,","by inferring a 1 for each of the *leaves* and/or *branches*, otherwise 0."].join(" ")},level:{valType:"any",editType:"plot",anim:!0,description:["Sets the level from which this trace hierarchy is rendered.","Set `level` to `''` to start from the root node in the hierarchy.",'Must be an "id" if `ids` is filled in, otherwise plotly attempts to find a matching',"item in `labels`."].join(" ")},maxdepth:{valType:"integer",editType:"plot",dflt:-1,description:["Sets the number of rendered sectors from any given `level`.","Set `maxdepth` to *-1* to render all the levels in the hierarchy."].join(" ")},marker:ll({colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector of this trace.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:ll({},qa.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:ll({},qa.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},l7("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the leaves. With colorscale","it is defaulted to 1; otherwise it is defaulted to 0.7"].join(" ")},editType:"plot"},text:qa.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot",description:["Determines which trace information appear on the graph."].join(" ")},texttemplate:o7({editType:"plot"},{keys:Wx.eventDataKeys.concat(["label","value"])}),hovertext:qa.hovertext,hoverinfo:ll({},i7.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:n7({},{keys:Wx.eventDataKeys}),textfont:qa.textfont,insidetextorientation:qa.insidetextorientation,insidetextfont:qa.insidetextfont,outsidetextfont:ll({},qa.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented at the center of a sunburst graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),rotation:{valType:"angle",dflt:0,editType:"plot",description:["Rotates the whole diagram counterclockwise by some angle.","By default the first slice starts at 3 o'clock."].join(" ")},sort:qa.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)",description:["sets the color of the root node for a sunburst/treemap/icicle trace.","this has no effect when a colorscale is used to set the markers."].join(" ")},editType:"calc"},domain:s7({name:"sunburst",trace:!0,editType:"calc"})},Kc={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1},c7=qr.hovertemplateAttrs,u7=qr.texttemplateAttrs,v7=xn,d7=Ri.attributes,Ui=Xc,aa=f7,Xx=Kc,Kv=Kt.extendFlat,xA={labels:aa.labels,parents:aa.parents,values:aa.values,branchvalues:aa.branchvalues,count:aa.count,level:aa.level,maxdepth:aa.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot",description:["Determines d3 treemap solver.","For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling"].join(" ")},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot",description:["When using *squarify* `packing` algorithm, according to https://github.com/d3/d3-hierarchy/blob/v3.1.1/README.md#squarify_ratio","this option specifies the desired aspect ratio of the generated rectangles.","The ratio must be specified as a number greater than or equal to one.","Note that the orientation of the generated rectangles (tall or wide)","is not implied by the ratio; for example, a ratio of two will attempt","to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2.","When using *squarify*, unlike d3 which uses the Golden Ratio i.e. 1.618034,","Plotly applies 1 to increase squares in treemap layouts."].join(" ")},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot",description:["Determines if the positions obtained from solver are flipped on each axis."].join(" ")},pad:{valType:"number",min:0,dflt:3,editType:"plot",description:["Sets the inner padding (in px)."].join(" ")},editType:"calc"},marker:Kv({pad:{t:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the top (in px)."].join(" ")},l:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the left (in px)."].join(" ")},r:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the right (in px)."].join(" ")},b:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the bottom (in px)."].join(" ")},editType:"calc"},colors:aa.marker.colors,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style",description:["Determines if the sector colors are faded towards","the background from the leaves up to the headers.","This option is unavailable when a `colorscale` is present,","defaults to false when `marker.colors` is set,","but otherwise defaults to true.","When set to *reversed*, the fading direction is inverted,","that is the top elements within hierarchy are drawn with fully saturated colors","while the leaves are faded towards the background color."].join(" ")},line:aa.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the maximum rounding of corners (in px)."].join(" ")},editType:"calc"},v7("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if the path bar is drawn","i.e. outside the trace `domain` and","with one pixel gap."].join(" ")},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Determines on which side of the the treemap the","`pathbar` should be presented."].join(" ")},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot",description:["Determines which shape is used for edges between `barpath` labels."].join(" ")},thickness:{valType:"number",min:12,editType:"plot",description:["Sets the thickness of `pathbar` (in px). If not specified the `pathbar.textfont.size` is used","with 3 pixles extra padding on each side."].join(" ")},textfont:Kv({},Ui.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},text:Ui.text,textinfo:aa.textinfo,texttemplate:u7({editType:"plot"},{keys:Xx.eventDataKeys.concat(["label","value"])}),hovertext:Ui.hovertext,hoverinfo:aa.hoverinfo,hovertemplate:c7({},{keys:Xx.eventDataKeys}),textfont:Ui.textfont,insidetextfont:Ui.insidetextfont,outsidetextfont:Kv({},Ui.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented on top left corner of a treemap graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot",description:["Sets the positions of the `text` elements."].join(" ")},sort:Ui.sort,root:aa.root,domain:d7({name:"treemap",trace:!0,editType:"calc"})},_A={treemapcolorway:{valType:"colorlist",editType:"calc",description:["Sets the default treemap slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendtreemapcolors`."].join(" ")},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the treemap slice colors (whether given by `treemapcolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}},h7=de,p7=xA,m7=ut,y7=Ri.defaults,g7=Ul.handleText,b7=ss.TEXTPAD,wA=ho,x7=wA.hasColorscale,_7=wA.handleDefaults,w7=function(e,r,a,i){function n(g,w){return h7.coerce(e,r,p7,g,w)}var o=n("labels"),l=n("parents");if(!o||!o.length||!l||!l.length){r.visible=!1;return}var s=n("values");s&&s.length?n("branchvalues"):n("count"),n("level"),n("maxdepth");var f=n("tiling.packing");f==="squarify"&&n("tiling.squarifyratio"),n("tiling.flip"),n("tiling.pad");var c=n("text");n("texttemplate"),r.texttemplate||n("textinfo",Array.isArray(c)?"text+label":"label"),n("hovertext"),n("hovertemplate");var v=n("pathbar.visible"),u="auto";g7(e,r,i,n,u,{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),n("textposition");var h=r.textposition.indexOf("bottom")!==-1,d=n("marker.line.width");d&&n("marker.line.color",i.paper_bgcolor);var p=n("marker.colors"),y=r._hasColorscale=x7(e,"marker","colors")||(e.marker||{}).coloraxis;y?_7(e,r,i,n,{prefix:"marker.",cLetter:"c"}):n("marker.depthfade",!(p||[]).length);var m=r.textfont.size*2;n("marker.pad.t",h?m/4:m),n("marker.pad.l",m/4),n("marker.pad.r",m/4),n("marker.pad.b",h?m:m/4),n("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:m7.contrast(i.paper_bgcolor)}}},v&&(n("pathbar.thickness",r.pathbar.textfont.size+2*b7),n("pathbar.side"),n("pathbar.edgeshape")),n("sort"),n("root.color"),y7(r,i,n),r._length=null},T7=de,k7=_A,A7=function(e,r){function a(i,n){return T7.coerce(e,r,k7,i,n)}a("treemapcolorway",r.colorway),a("extendtreemapcolors")},lc={},TA={};(function(t){var e=vh,r=_t,a=de,i=ho.makeColorScaleFuncFromTrace,n=ac.makePullColorFn,o=ac.generateExtendedColors,l=ho.calc,s=ir.ALMOST_EQUAL,f={},c={},v={};t.calc=function(h,d){var p=h._fullLayout,y=d.ids,m=a.isArrayOrTypedArray(y),g=d.labels,w=d.parents,b=d.values,x=a.isArrayOrTypedArray(b),_=[],T={},k={},S=function(q,ie){T[q]?T[q].push(ie):T[q]=[ie],k[ie]=1},M=function(q){return q||typeof q=="number"},D=function(q){return!x||r(b[q])&&b[q]>=0},A,C,$;m?(A=Math.min(y.length,w.length),C=function(q){return M(y[q])&&D(q)},$=function(q){return String(y[q])}):(A=Math.min(g.length,w.length),C=function(q){return M(g[q])&&D(q)},$=function(q){return String(g[q])}),x&&(A=Math.min(A,b.length));for(var N=0;N<A;N++)if(C(N)){var E=$(N),P=M(w[N])?String(w[N]):"",R={i:N,id:E,pid:P,label:M(g[N])?String(g[N]):""};x&&(R.v=+b[N]),_.push(R),S(P,E)}if(T[""]){if(T[""].length>1){for(var I=a.randstr(),H=0;H<_.length;H++)_[H].pid===""&&(_[H].pid=I);_.unshift({hasMultipleRoots:!0,id:I,pid:"",label:""})}}else{var L=[],z;for(z in T)k[z]||L.push(z);if(L.length===1)z=L[0],_.unshift({hasImpliedRoot:!0,id:z,pid:"",label:z});else return a.warn(["Multiple implied roots, cannot build",d.type,"hierarchy of",d.name+".","These roots include:",L.join(", ")].join(" "))}var V;try{V=e.stratify().id(function(q){return q.id}).parentId(function(q){return q.pid})(_)}catch(q){return a.warn(["Failed to build",d.type,"hierarchy of",d.name+".","Error:",q.message].join(" "))}var O=e.hierarchy(V),X=!1;if(x)switch(d.branchvalues){case"remainder":O.sum(function(q){return q.data.v});break;case"total":O.each(function(q){var ie=q.data.data,fe=ie.v;if(q.children){var be=q.children.reduce(function(ne,U){return ne+U.data.data.v},0);if((ie.hasImpliedRoot||ie.hasMultipleRoots)&&(fe=be),fe<be*s)return X=!0,a.warn(["Total value for node",q.data.data.id,"of",d.name,"is smaller than the sum of its children.",`
|
|
5
|
+
parent value =`,fe,`
|
|
6
|
+
children sum =`,be].join(" "))}q.value=fe});break}else u(O,d,{branches:d.count.indexOf("branches")!==-1,leaves:d.count.indexOf("leaves")!==-1});if(!X){d.sort&&O.sort(function(q,ie){return ie.value-q.value});var G,Y,K=d.marker.colors||[],Z=!!K.length;return d._hasColorscale?(Z||(K=x?d.values:d._values),l(h,d,{vals:K,containerStr:"marker",cLetter:"c"}),Y=i(d.marker)):G=n(p["_"+d.type+"colormap"]),O.each(function(q){var ie=q.data.data;ie.color=d._hasColorscale?Y(K[ie.i]):G(K[ie.i],ie.id)}),_[0].hierarchy=O,_}},t._runCrossTraceCalc=function(h,d){var p=d._fullLayout,y=d.calcdata,m=p[h+"colorway"],g=p["_"+h+"colormap"];p["extend"+h+"colors"]&&(m=o(m,h==="icicle"?v:h==="treemap"?c:f));var w=0,b;function x(S){var M=S.data.data,D=M.id;M.color===!1&&(g[D]?M.color=g[D]:S.parent?S.parent.parent?M.color=S.parent.data.data.color:(g[D]=M.color=m[w%m.length],w++):M.color=b)}for(var _=0;_<y.length;_++){var T=y[_],k=T[0];k.trace.type===h&&k.hierarchy&&(b=k.trace.root.color,k.hierarchy.each(x))}},t.crossTraceCalc=function(h){return t._runCrossTraceCalc("sunburst",h)};function u(h,d,p){var y=0,m=h.children;if(m){for(var g=m.length,w=0;w<g;w++)y+=u(m[w],d,p);p.branches&&y++}else p.leaves&&y++;return h.value=h.data.data.value=y,d._values||(d._values=[]),d._values[h.data.data.i]=y,y}})(TA);var kA=TA;lc.calc=function(t,e){return kA.calc(t,e)};lc.crossTraceCalc=function(t){return kA._runCrossTraceCalc("treemap",t)};var zi={};(function(t){var e=de,r=ut,a=Pi,i=_n;t.findEntryWithLevel=function(s,f){var c;return f&&s.eachAfter(function(v){if(t.getPtId(v)===f)return c=v.copy()}),c||s},t.findEntryWithChild=function(s,f){var c;return s.eachAfter(function(v){for(var u=v.children||[],h=0;h<u.length;h++){var d=u[h];if(t.getPtId(d)===f)return c=v.copy()}}),c||s},t.isEntry=function(s){return!s.parent},t.isLeaf=function(s){return!s.children},t.getPtId=function(s){return s.data.data.id},t.getPtLabel=function(s){return s.data.data.label},t.getValue=function(s){return s.value},t.isHierarchyRoot=function(s){return l(s)===""},t.setSliceCursor=function(s,f,c){var v=c.isTransitioning;if(!v){var u=s.datum();v=c.hideOnRoot&&t.isHierarchyRoot(u)||c.hideOnLeaves&&t.isLeaf(u)}a(s,v?null:"pointer")};function n(s,f,c){return{color:t.getOutsideTextFontKey("color",s,f,c),family:t.getOutsideTextFontKey("family",s,f,c),size:t.getOutsideTextFontKey("size",s,f,c)}}function o(s,f,c,v){var u=(v||{}).onPathbar,h=f.data.data,d=h.i,p=e.castOption(s,d,(u?"pathbar.textfont":"insidetextfont")+".color");return!p&&s._input.textfont&&(p=e.castOption(s._input,d,"textfont.color")),{color:p||r.contrast(h.color),family:t.getInsideTextFontKey("family",s,f,c,v),size:t.getInsideTextFontKey("size",s,f,c,v)}}t.getInsideTextFontKey=function(s,f,c,v,u){var h=(u||{}).onPathbar,d=h?"pathbar.textfont":"insidetextfont",p=c.data.data.i;return e.castOption(f,p,d+"."+s)||e.castOption(f,p,"textfont."+s)||v.size},t.getOutsideTextFontKey=function(s,f,c,v){var u=c.data.data.i;return e.castOption(f,u,"outsidetextfont."+s)||e.castOption(f,u,"textfont."+s)||v.size},t.isOutsideText=function(s,f){return!s._hasColorscale&&t.isHierarchyRoot(f)},t.determineTextFont=function(s,f,c,v){return t.isOutsideText(s,f)?n(s,f,c):o(s,f,c,v)},t.hasTransition=function(s){return!!(s&&s.duration>0)},t.getMaxDepth=function(s){return s.maxdepth>=0?s.maxdepth:1/0},t.isHeader=function(s,f){return!(t.isLeaf(s)||s.depth===f._maxDepth-1)};function l(s){return s.data.data.pid}t.getParent=function(s,f){return t.findEntryWithLevel(s,l(f))},t.listPath=function(s,f){var c=s.parent;if(!c)return[];var v=f?[c.data[f]]:[c];return t.listPath(c,f).concat(v)},t.getPath=function(s){return t.listPath(s,"label").join("/")+"/"},t.formatValue=i.formatPieValue,t.formatPercent=function(s,f){var c=e.formatPercent(s,0);return c==="0%"&&(c=i.formatPiePercent(s,f)),c}})(zi);var M7=function t(e,r,a){var i;a.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),a.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),a.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var n=e.children;if(n)for(var o=0;o<n.length;o++)t(n[o],r,a)},Jn=vh,S7=M7,AA=function(e,r,a){var i=a.flipX,n=a.flipY,o=a.packing==="dice-slice",l=a.pad[n?"bottom":"top"],s=a.pad[i?"right":"left"],f=a.pad[i?"left":"right"],c=a.pad[n?"top":"bottom"],v;o&&(v=s,s=l,l=v,v=f,f=c,c=v);var u=Jn.treemap().tile(L7(a.packing,a.squarifyratio)).paddingInner(a.pad.inner).paddingLeft(s).paddingRight(f).paddingTop(l).paddingBottom(c).size(o?[r[1],r[0]]:r)(e);return(o||i||n)&&S7(u,r,{swapXY:o,flipX:i,flipY:n}),u};function L7(t,e){switch(t){case"squarify":return Jn.treemapSquarify.ratio(e);case"binary":return Jn.treemapBinary;case"dice":return Jn.treemapDice;case"slice":return Jn.treemapSlice;default:return Jn.treemapSliceDice}}var Yx=yt,Vi=ut,qx=de,Qv=zi,C7=li.resizeText;function D7(t){var e=t._fullLayout._treemaplayer.selectAll(".trace");C7(t,e,"treemap"),e.each(function(r){var a=Yx.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){Yx.select(this).call(MA,o,n,{hovered:!1})})})}function MA(t,e,r,a){var i=(a||{}).hovered,n=e.data.data,o=n.i,l,s,f=n.color,c=Qv.isHierarchyRoot(e),v=1;if(i)l=r._hovered.marker.line.color,s=r._hovered.marker.line.width;else if(c&&f===r.root.color)v=100,l="rgba(0,0,0,0)",s=0;else if(l=qx.castOption(r,o,"marker.line.color")||Vi.defaultLine,s=qx.castOption(r,o,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var u=r.marker.depthfade;if(u){var h=Vi.combine(Vi.addOpacity(r._backgroundColor,.75),f),d;if(u===!0){var p=Qv.getMaxDepth(r);isFinite(p)?Qv.isLeaf(e)?d=0:d=r._maxVisibleLayers-(e.data.depth-r._entryDepth):d=e.data.height+1}else d=e.data.depth-r._entryDepth,r._atRootLevel||d++;if(d>0)for(var y=0;y<d;y++){var m=.5*y/d;f=Vi.combine(Vi.addOpacity(h,m),f)}}}t.style("stroke-width",s).call(Vi.fill,f).call(Vi.stroke,l).style("opacity",v)}var Zp={style:D7,styleOne:MA},Vn=yt,Zx=tt,$7=ha.appendArrayPointValue,sl=Ca,Kx=de,P7=Ql,cr=zi,E7=_n,R7=E7.formatPieValue,Kp=function(e,r,a,i,n){var o=i[0],l=o.trace,s=o.hierarchy,f=l.type==="sunburst",c=l.type==="treemap"||l.type==="icicle";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1);var v=function(d){var p=a._fullLayout;if(!(a._dragging||p.hovermode===!1)){var y=a._fullData[l.index],m=d.data.data,g=m.i,w=cr.isHierarchyRoot(d),b=cr.getParent(s,d),x=cr.getValue(d),_=function(V){return Kx.castOption(y,g,V)},T=_("hovertemplate"),k=sl.castHoverinfo(y,p,g),S=p.separators,M;if(T||k&&k!=="none"&&k!=="skip"){var D,A;f&&(D=o.cx+d.pxmid[0]*(1-d.rInscribed),A=o.cy+d.pxmid[1]*(1-d.rInscribed)),c&&(D=d._hoverX,A=d._hoverY);var C={},$=[],N=[],E=function(V){return $.indexOf(V)!==-1};k&&($=k==="all"?y._module.attributes.hoverinfo.flags:k.split("+")),C.label=m.label,E("label")&&C.label&&N.push(C.label),m.hasOwnProperty("v")&&(C.value=m.v,C.valueLabel=R7(C.value,S),E("value")&&N.push(C.valueLabel)),C.currentPath=d.currentPath=cr.getPath(d.data),E("current path")&&!w&&N.push(C.currentPath);var P,R=[],L=function(){R.indexOf(P)===-1&&(N.push(P),R.push(P))};C.percentParent=d.percentParent=x/cr.getValue(b),C.parent=d.parentString=cr.getPtLabel(b),E("percent parent")&&(P=cr.formatPercent(C.percentParent,S)+" of "+C.parent,L()),C.percentEntry=d.percentEntry=x/cr.getValue(r),C.entry=d.entry=cr.getPtLabel(r),E("percent entry")&&!w&&!d.onPathbar&&(P=cr.formatPercent(C.percentEntry,S)+" of "+C.entry,L()),C.percentRoot=d.percentRoot=x/cr.getValue(s),C.root=d.root=cr.getPtLabel(s),E("percent root")&&!w&&(P=cr.formatPercent(C.percentRoot,S)+" of "+C.root,L()),C.text=_("hovertext")||_("text"),E("text")&&(P=C.text,Kx.isValidTextValue(P)&&N.push(P)),M=[fl(d,y,n.eventDataKeys)];var z={trace:y,y:A,_x0:d._x0,_x1:d._x1,_y0:d._y0,_y1:d._y1,text:N.join("<br>"),name:T||E("name")?y.name:void 0,color:_("hoverlabel.bgcolor")||m.color,borderColor:_("hoverlabel.bordercolor"),fontFamily:_("hoverlabel.font.family"),fontSize:_("hoverlabel.font.size"),fontColor:_("hoverlabel.font.color"),nameLength:_("hoverlabel.namelength"),textAlign:_("hoverlabel.align"),hovertemplate:T,hovertemplateLabels:C,eventData:M};f&&(z.x0=D-d.rInscribed*d.rpx1,z.x1=D+d.rInscribed*d.rpx1,z.idealAlign=d.pxmid[0]<0?"left":"right"),c&&(z.x=D,z.idealAlign=D<0?"left":"right");var I=[];sl.loneHover(z,{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:a,inOut_bbox:I}),M[0].bbox=I[0],l._hasHoverLabel=!0}if(c){var H=e.select("path.surface");n.styleOne(H,d,y,{hovered:!0})}l._hasHoverEvent=!0,a.emit("plotly_hover",{points:M||[fl(d,y,n.eventDataKeys)],event:Vn.event})}},u=function(d){var p=a._fullLayout,y=a._fullData[l.index],m=Vn.select(this).datum();if(l._hasHoverEvent&&(d.originalEvent=Vn.event,a.emit("plotly_unhover",{points:[fl(m,y,n.eventDataKeys)],event:Vn.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(sl.loneUnhover(p._hoverlayer.node()),l._hasHoverLabel=!1),c){var g=e.select("path.surface");n.styleOne(g,m,y,{hovered:!1})}},h=function(d){var p=a._fullLayout,y=a._fullData[l.index],m=f&&(cr.isHierarchyRoot(d)||cr.isLeaf(d)),g=cr.getPtId(d),w=cr.isEntry(d)?cr.findEntryWithChild(s,g):cr.findEntryWithLevel(s,g),b=cr.getPtId(w),x={points:[fl(d,y,n.eventDataKeys)],event:Vn.event};m||(x.nextLevel=b);var _=P7.triggerHandler(a,"plotly_"+l.type+"click",x);if(_!==!1&&p.hovermode&&(a._hoverdata=[fl(d,y,n.eventDataKeys)],sl.click(a,Vn.event)),!m&&_!==!1&&!a._dragging&&!a._transitioning){Zx.call("_storeDirectGUIEdit",y,p._tracePreGUI[y.uid],{level:y.level});var T={data:[{level:b}],traces:[l.index]},k={frame:{redraw:!1,duration:n.transitionTime},transition:{duration:n.transitionTime,easing:n.transitionEasing},mode:"immediate",fromcurrent:!0};sl.loneUnhover(p._hoverlayer.node()),Zx.call("animate",a,T,k)}};e.on("mouseover",v),e.on("mouseout",u),e.on("click",h)};function fl(t,e,r){for(var a=t.data.data,i={curveNumber:e.index,pointNumber:a.i,data:e._input,fullData:e},n=0;n<r.length;n++){var o=r[n];o in t&&(i[o]=t[o])}return"parentString"in t&&!cr.isHierarchyRoot(t)&&(i.parent=t.parentString),$7(i,e,a.i),i}var Qx=yt,ff=de,Jx=Et,z7=wr,I7=AA,e1=Zp.styleOne,Jv=Kc,Wn=zi,F7=Kp,ed=!0,N7=function(e,r,a,i,n){var o=n.barDifY,l=n.width,s=n.height,f=n.viewX,c=n.viewY,v=n.pathSlice,u=n.toMoveInsideSlice,h=n.strTransform,d=n.hasTransition,p=n.handleSlicesExit,y=n.makeUpdateSliceInterpolator,m=n.makeUpdateTextInterpolator,g={},w=e._context.staticPlot,b=e._fullLayout,x=r[0],_=x.trace,T=x.hierarchy,k=l/_._entryDepth,S=Wn.listPath(a.data,"id"),M=I7(T.copy(),[l,s],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();M=M.filter(function(A){var C=S.indexOf(A.data.id);return C===-1?!1:(A.x0=k*C,A.x1=k*(C+1),A.y0=o,A.y1=o+s,A.onPathbar=!0,!0)}),M.reverse(),i=i.data(M,Wn.getPtId),i.enter().append("g").classed("pathbar",!0),p(i,ed,g,[l,s],v),i.order();var D=i;d&&(D=D.transition().each("end",function(){var A=Qx.select(this);Wn.setSliceCursor(A,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),D.each(function(A){A._x0=f(A.x0),A._x1=f(A.x1),A._y0=c(A.y0),A._y1=c(A.y1),A._hoverX=f(A.x1-Math.min(l,s)/2),A._hoverY=c(A.y1-s/2);var C=Qx.select(this),$=ff.ensureSingle(C,"path","surface",function(R){R.style("pointer-events",w?"none":"all")});d?$.transition().attrTween("d",function(R){var L=y(R,ed,g,[l,s]);return function(z){return v(L(z))}}):$.attr("d",v),C.call(F7,a,e,r,{styleOne:e1,eventDataKeys:Jv.eventDataKeys,transitionTime:Jv.CLICK_TRANSITION_TIME,transitionEasing:Jv.CLICK_TRANSITION_EASING}).call(Wn.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),$.call(e1,A,_,{hovered:!1}),A._text=(Wn.getPtLabel(A)||"").split("<br>").join(" ")||"";var N=ff.ensureSingle(C,"g","slicetext"),E=ff.ensureSingle(N,"text","",function(R){R.attr("data-notex",1)}),P=ff.ensureUniformFontSize(e,Wn.determineTextFont(_,A,b.font,{onPathbar:!0}));E.text(A._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(Jx.font,P).call(z7.convertToTspans,e),A.textBB=Jx.bBox(E.node()),A.transform=u(A,{fontSize:P.size,onPathbar:!0}),A.transform.fontSize=P.size,d?E.transition().attrTween("transform",function(R){var L=m(R,ed,g,[l,s]);return function(z){return h(L(z))}}):E.attr("transform",h(A))})},t1=yt,td=p1.interpolate,bi=zi,cl=de,r1=ss.TEXTPAD,H7=Wp,O7=H7.toMoveInsideBar,B7=li,rd=B7.recordMinTextSize,j7=Kc,G7=N7;function Wi(t){return bi.isHierarchyRoot(t)?"":bi.getPtId(t)}var U7=function(e,r,a,i,n){var o=e._fullLayout,l=r[0],s=l.trace,f=s.type,c=f==="icicle",v=l.hierarchy,u=bi.findEntryWithLevel(v,s.level),h=t1.select(a),d=h.selectAll("g.pathbar"),p=h.selectAll("g.slice");if(!u){d.remove(),p.remove();return}var y=bi.isHierarchyRoot(u),m=!o.uniformtext.mode&&bi.hasTransition(i),g=bi.getMaxDepth(s),w=function(oe){return oe.data.depth-u.data.depth<g},b=o._size,x=s.domain,_=b.w*(x.x[1]-x.x[0]),T=b.h*(x.y[1]-x.y[0]),k=_,S=s.pathbar.thickness,M=s.marker.line.width+j7.gapWithPathbar,D=s.pathbar.visible?s.pathbar.side.indexOf("bottom")>-1?T+M:-(S+M):0,A={x0:k,x1:k,y0:D,y1:D+S},C=function(oe,Ce,re){var me=s.tiling.pad,ve=function(ye){return ye-me<=Ce.x0},Me=function(ye){return ye+me>=Ce.x1},Se=function(ye){return ye-me<=Ce.y0},$e=function(ye){return ye+me>=Ce.y1};return oe.x0===Ce.x0&&oe.x1===Ce.x1&&oe.y0===Ce.y0&&oe.y1===Ce.y1?{x0:oe.x0,x1:oe.x1,y0:oe.y0,y1:oe.y1}:{x0:ve(oe.x0-me)?0:Me(oe.x0-me)?re[0]:oe.x0,x1:ve(oe.x1+me)?0:Me(oe.x1+me)?re[0]:oe.x1,y0:Se(oe.y0-me)?0:$e(oe.y0-me)?re[1]:oe.y0,y1:Se(oe.y1+me)?0:$e(oe.y1+me)?re[1]:oe.y1}},$=null,N={},E={},P=null,R=function(oe,Ce){return Ce?N[Wi(oe)]:E[Wi(oe)]},L=function(oe,Ce,re,me){if(Ce)return N[Wi(v)]||A;var ve=E[s.level]||re;return w(oe)?C(oe,ve,me):{}};l.hasMultipleRoots&&y&&g++,s._maxDepth=g,s._backgroundColor=o.paper_bgcolor,s._entryDepth=u.data.depth,s._atRootLevel=y;var z=-_/2+b.l+b.w*(x.x[1]+x.x[0])/2,I=-T/2+b.t+b.h*(1-(x.y[1]+x.y[0])/2),H=function(oe){return z+oe},V=function(oe){return I+oe},O=V(0),X=H(0),G=function(oe){return X+oe},Y=function(oe){return O+oe};function K(oe,Ce){return oe+","+Ce}var Z=G(0),q=function(oe){oe.x=Math.max(Z,oe.x)},ie=s.pathbar.edgeshape,fe=function(oe){var Ce=G(Math.max(Math.min(oe.x0,oe.x0),0)),re=G(Math.min(Math.max(oe.x1,oe.x1),k)),me=Y(oe.y0),ve=Y(oe.y1),Me=S/2,Se={},$e={};Se.x=Ce,$e.x=re,Se.y=$e.y=(me+ve)/2;var ye={x:Ce,y:me},Ne={x:re,y:me},Pe={x:re,y:ve},je={x:Ce,y:ve};return ie===">"?(ye.x-=Me,Ne.x-=Me,Pe.x-=Me,je.x-=Me):ie==="/"?(Pe.x-=Me,je.x-=Me,Se.x-=Me/2,$e.x-=Me/2):ie==="\\"?(ye.x-=Me,Ne.x-=Me,Se.x-=Me/2,$e.x-=Me/2):ie==="<"&&(Se.x-=Me,$e.x-=Me),q(ye),q(je),q(Se),q(Ne),q(Pe),q($e),"M"+K(ye.x,ye.y)+"L"+K(Ne.x,Ne.y)+"L"+K($e.x,$e.y)+"L"+K(Pe.x,Pe.y)+"L"+K(je.x,je.y)+"L"+K(Se.x,Se.y)+"Z"},be=s[c?"tiling":"marker"].pad,ne=function(oe){return s.textposition.indexOf(oe)!==-1},U=ne("top"),ae=ne("left"),ce=ne("right"),se=ne("bottom"),pe=function(oe){var Ce=H(oe.x0),re=H(oe.x1),me=V(oe.y0),ve=V(oe.y1),Me=re-Ce,Se=ve-me;if(!Me||!Se)return"";var $e=s.marker.cornerradius||0,ye=Math.min($e,Me/2,Se/2);ye&&oe.data&&oe.data.data&&oe.data.data.label&&(U&&(ye=Math.min(ye,be.t)),ae&&(ye=Math.min(ye,be.l)),ce&&(ye=Math.min(ye,be.r)),se&&(ye=Math.min(ye,be.b)));var Ne=function(Pe,je){return ye?"a"+K(ye,ye)+" 0 0 1 "+K(Pe,je):""};return"M"+K(Ce,me+ye)+Ne(ye,-ye)+"L"+K(re-ye,me)+Ne(ye,ye)+"L"+K(re,ve-ye)+Ne(-ye,ye)+"L"+K(Ce+ye,ve)+Ne(-ye,-ye)+"Z"},ge=function(oe,Ce){var re=oe.x0,me=oe.x1,ve=oe.y0,Me=oe.y1,Se=oe.textBB,$e=U||Ce.isHeader&&!se,ye=$e?"start":se?"end":"middle",Ne=ne("right"),Pe=ne("left")||Ce.onPathbar,je=Pe?-1:Ne?1:0;if(Ce.isHeader){if(re+=(c?be:be.l)-r1,me-=(c?be:be.r)-r1,re>=me){var Ie=(re+me)/2;re=Ie,me=Ie}var Ue;se?(Ue=Me-(c?be:be.b),ve<Ue&&Ue<Me&&(ve=Ue)):(Ue=ve+(c?be:be.t),ve<Ue&&Ue<Me&&(Me=Ue))}var ke=O7(re,me,ve,Me,Se,{isHorizontal:!1,constrained:!0,angle:0,anchor:ye,leftToRight:je});return ke.fontSize=Ce.fontSize,ke.targetX=H(ke.targetX),ke.targetY=V(ke.targetY),isNaN(ke.targetX)||isNaN(ke.targetY)?{}:(re!==me&&ve!==Me&&rd(s.type,ke,o),{scale:ke.scale,rotate:ke.rotate,textX:ke.textX,textY:ke.textY,anchorX:ke.anchorX,anchorY:ke.anchorY,targetX:ke.targetX,targetY:ke.targetY})},_e=function(oe,Ce){for(var re,me=0,ve=oe;!re&&me<g;)me++,ve=ve.parent,ve?re=R(ve,Ce):me=g;return re||{}},le=function(oe,Ce,re,me){var ve=R(oe,Ce),Me;if(Ce)Me=A;else{var Se=R(u,Ce);Se?Me=C(oe,Se,me):Me={}}return td(ve,Me)},De=function(oe,Ce,re,me,ve){var Me=R(oe,Ce),Se;if(Me)Se=Me;else if(Ce)Se=A;else if($)if(oe.parent){var $e=P||re;$e&&!Ce?Se=C(oe,$e,me):(Se={},cl.extendFlat(Se,_e(oe,Ce)))}else Se=cl.extendFlat({},oe),c&&(ve.orientation==="h"?ve.flipX?Se.x0=oe.x1:Se.x1=0:ve.flipY?Se.y0=oe.y1:Se.y1=0);else Se={};return td(Se,{x0:oe.x0,x1:oe.x1,y0:oe.y0,y1:oe.y1})},Ae=function(oe,Ce,re,me){var ve=R(oe,Ce),Me={},Se=L(oe,Ce,re,me);cl.extendFlat(Me,{transform:ge({x0:Se.x0,x1:Se.x1,y0:Se.y0,y1:Se.y1,textBB:oe.textBB,_text:oe._text},{isHeader:bi.isHeader(oe,s)})}),ve?Me=ve:oe.parent&&cl.extendFlat(Me,_e(oe,Ce));var $e=oe.transform;return oe.x0!==oe.x1&&oe.y0!==oe.y1&&rd(s.type,$e,o),td(Me,{transform:{scale:$e.scale,rotate:$e.rotate,textX:$e.textX,textY:$e.textY,anchorX:$e.anchorX,anchorY:$e.anchorY,targetX:$e.targetX,targetY:$e.targetY}})},ze=function(oe,Ce,re,me,ve){var Me=me[0],Se=me[1];m?oe.exit().transition().each(function(){var $e=t1.select(this),ye=$e.select("path.surface");ye.transition().attrTween("d",function(Pe){var je=le(Pe,Ce,re,[Me,Se]);return function(Ie){return ve(je(Ie))}});var Ne=$e.select("g.slicetext");Ne.attr("opacity",0)}).remove():oe.exit().remove()},Ve=function(oe){var Ce=oe.transform;return oe.x0!==oe.x1&&oe.y0!==oe.y1&&rd(s.type,Ce,o),cl.getTextTransform({textX:Ce.textX,textY:Ce.textY,anchorX:Ce.anchorX,anchorY:Ce.anchorY,targetX:Ce.targetX,targetY:Ce.targetY,scale:Ce.scale,rotate:Ce.rotate})};m&&(d.each(function(oe){N[Wi(oe)]={x0:oe.x0,x1:oe.x1,y0:oe.y0,y1:oe.y1},oe.transform&&(N[Wi(oe)].transform={textX:oe.transform.textX,textY:oe.transform.textY,anchorX:oe.transform.anchorX,anchorY:oe.transform.anchorY,targetX:oe.transform.targetX,targetY:oe.transform.targetY,scale:oe.transform.scale,rotate:oe.transform.rotate})}),p.each(function(oe){E[Wi(oe)]={x0:oe.x0,x1:oe.x1,y0:oe.y0,y1:oe.y1},oe.transform&&(E[Wi(oe)].transform={textX:oe.transform.textX,textY:oe.transform.textY,anchorX:oe.transform.anchorX,anchorY:oe.transform.anchorY,targetX:oe.transform.targetX,targetY:oe.transform.targetY,scale:oe.transform.scale,rotate:oe.transform.rotate}),!$&&bi.isEntry(oe)&&($=oe)})),P=n(e,r,u,p,{width:_,height:T,viewX:H,viewY:V,pathSlice:pe,toMoveInsideSlice:ge,prevEntry:$,makeUpdateSliceInterpolator:De,makeUpdateTextInterpolator:Ae,handleSlicesExit:ze,hasTransition:m,strTransform:Ve}),s.pathbar.visible?G7(e,r,u,d,{barDifY:D,width:k,height:S,viewX:G,viewY:Y,pathSlice:fe,toMoveInsideSlice:ge,makeUpdateSliceInterpolator:De,makeUpdateTextInterpolator:Ae,handleSlicesExit:ze,hasTransition:m,strTransform:Ve}):d.remove()},V7=yt,W7=zi,X7=li,Y7=X7.clearMinTextSize,q7=dn.resizeText,a1=U7,Z7=function(e,r,a,i,n){var o=n.type,l=n.drawDescendants,s=e._fullLayout,f=s["_"+o+"layer"],c,v,u=!a;if(Y7(o,s),c=f.selectAll("g.trace."+o).data(r,function(d){return d[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!s.uniformtext.mode&&W7.hasTransition(a)){i&&(v=i());var h=V7.transition().duration(a.duration).ease(a.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()});h.each(function(){f.selectAll("g.trace").each(function(d){a1(e,d,this,a,l)})})}else c.each(function(d){a1(e,d,this,a,l)}),s.uniformtext.mode&&q7(e,f.selectAll(".trace"),o);u&&c.exit().remove()},SA={},i1=yt,ad=ut,n1=de,K7=li.resizeText;function Q7(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");K7(t,e,"sunburst"),e.each(function(r){var a=i1.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){i1.select(this).call(LA,o,n)})})}function LA(t,e,r){var a=e.data.data,i=!e.children,n=a.i,o=n1.castOption(r,n,"marker.line.color")||ad.defaultLine,l=n1.castOption(r,n,"marker.line.width")||0;t.style("stroke-width",l).call(ad.fill,a.color).call(ad.stroke,o).style("opacity",i?r.leaf.opacity:null)}var J7={style:Q7,styleOne:LA};(function(t){var e=yt,r=vh,a=p1.interpolate,i=Et,n=de,o=wr,l=li,s=l.recordMinTextSize,f=l.clearMinTextSize,c=Qk,v=_n.getRotationAngle,u=c.computeTransform,h=c.transformInsideText,d=J7.styleOne,p=dn.resizeText,y=Kp,m=bA,g=zi;t.plot=function(k,S,M,D){var A=k._fullLayout,C=A._sunburstlayer,$,N,E=!M,P=!A.uniformtext.mode&&g.hasTransition(M);if(f("sunburst",A),$=C.selectAll("g.trace.sunburst").data(S,function(L){return L[0].trace.uid}),$.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),$.order(),P){D&&(N=D());var R=e.transition().duration(M.duration).ease(M.easing).each("end",function(){N&&N()}).each("interrupt",function(){N&&N()});R.each(function(){C.selectAll("g.trace").each(function(L){w(k,L,this,M)})})}else $.each(function(L){w(k,L,this,M)}),A.uniformtext.mode&&p(k,A._sunburstlayer.selectAll(".trace"),"sunburst");E&&$.exit().remove()};function w(k,S,M,D){var A=k._context.staticPlot,C=k._fullLayout,$=!C.uniformtext.mode&&g.hasTransition(D),N=e.select(M),E=N.selectAll("g.slice"),P=S[0],R=P.trace,L=P.hierarchy,z=g.findEntryWithLevel(L,R.level),I=g.getMaxDepth(R),H=C._size,V=R.domain,O=H.w*(V.x[1]-V.x[0]),X=H.h*(V.y[1]-V.y[0]),G=.5*Math.min(O,X),Y=P.cx=H.l+H.w*(V.x[1]+V.x[0])/2,K=P.cy=H.t+H.h*(1-V.y[0])-X/2;if(!z)return E.remove();var Z=null,q={};$&&E.each(function(re){q[g.getPtId(re)]={rpx0:re.rpx0,rpx1:re.rpx1,x0:re.x0,x1:re.x1,transform:re.transform},!Z&&g.isEntry(re)&&(Z=re)});var ie=b(z).descendants(),fe=z.height+1,be=0,ne=I;P.hasMultipleRoots&&g.isHierarchyRoot(z)&&(ie=ie.slice(1),fe-=1,be=1,ne+=1),ie=ie.filter(function(re){return re.y1<=ne});var U=v(R.rotation);U&&ie.forEach(function(re){re.x0+=U,re.x1+=U});var ae=Math.min(fe,I),ce=function(re){return(re-be)/ae*G},se=function(re,me){return[re*Math.cos(me),-re*Math.sin(me)]},pe=function(re){return n.pathAnnulus(re.rpx0,re.rpx1,re.x0,re.x1,Y,K)},ge=function(re){return Y+_(re)[0]*(re.transform.rCenter||0)+(re.transform.x||0)},_e=function(re){return K+_(re)[1]*(re.transform.rCenter||0)+(re.transform.y||0)};E=E.data(ie,g.getPtId),E.enter().append("g").classed("slice",!0),$?E.exit().transition().each(function(){var re=e.select(this),me=re.select("path.surface");me.transition().attrTween("d",function(Me){var Se=ze(Me);return function($e){return pe(Se($e))}});var ve=re.select("g.slicetext");ve.attr("opacity",0)}).remove():E.exit().remove(),E.order();var le=null;if($&&Z){var De=g.getPtId(Z);E.each(function(re){le===null&&g.getPtId(re)===De&&(le=re.x1)})}var Ae=E;$&&(Ae=Ae.transition().each("end",function(){var re=e.select(this);g.setSliceCursor(re,k,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),Ae.each(function(re){var me=e.select(this),ve=n.ensureSingle(me,"path","surface",function(Pe){Pe.style("pointer-events",A?"none":"all")});re.rpx0=ce(re.y0),re.rpx1=ce(re.y1),re.xmid=(re.x0+re.x1)/2,re.pxmid=se(re.rpx1,re.xmid),re.midangle=-(re.xmid-Math.PI/2),re.startangle=-(re.x0-Math.PI/2),re.stopangle=-(re.x1-Math.PI/2),re.halfangle=.5*Math.min(n.angleDelta(re.x0,re.x1)||Math.PI,Math.PI),re.ring=1-re.rpx0/re.rpx1,re.rInscribed=x(re),$?ve.transition().attrTween("d",function(Pe){var je=Ve(Pe);return function(Ie){return pe(je(Ie))}}):ve.attr("d",pe),me.call(y,z,k,S,{eventDataKeys:m.eventDataKeys,transitionTime:m.CLICK_TRANSITION_TIME,transitionEasing:m.CLICK_TRANSITION_EASING}).call(g.setSliceCursor,k,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:k._transitioning}),ve.call(d,re,R);var Me=n.ensureSingle(me,"g","slicetext"),Se=n.ensureSingle(Me,"text","",function(Pe){Pe.attr("data-notex",1)}),$e=n.ensureUniformFontSize(k,g.determineTextFont(R,re,C.font));Se.text(t.formatSliceLabel(re,z,R,S,C)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,$e).call(o.convertToTspans,k);var ye=i.bBox(Se.node());re.transform=h(ye,re,P),re.transform.targetX=ge(re),re.transform.targetY=_e(re);var Ne=function(Pe,je){var Ie=Pe.transform;return u(Ie,je),Ie.fontSize=$e.size,s(R.type,Ie,C),n.getTextTransform(Ie)};$?Se.transition().attrTween("transform",function(Pe){var je=oe(Pe);return function(Ie){return Ne(je(Ie),ye)}}):Se.attr("transform",Ne(re,ye))});function ze(re){var me=g.getPtId(re),ve=q[me],Me=q[g.getPtId(z)],Se;if(Me){var $e=(re.x1>Me.x1?2*Math.PI:0)+U;Se=re.rpx1<Me.rpx1?{x0:re.x0,x1:re.x1,rpx0:0,rpx1:0}:{x0:$e,x1:$e,rpx0:re.rpx0,rpx1:re.rpx1}}else{var ye,Ne=g.getPtId(re.parent);E.each(function(ke){if(g.getPtId(ke)===Ne)return ye=ke});var Pe=ye.children,je;Pe.forEach(function(ke,We){if(g.getPtId(ke)===me)return je=We});var Ie=Pe.length,Ue=a(ye.x0,ye.x1);Se={rpx0:G,rpx1:G,x0:Ue(je/Ie),x1:Ue((je+1)/Ie)}}return a(ve,Se)}function Ve(re){var me=q[g.getPtId(re)],ve,Me={x0:re.x0,x1:re.x1,rpx0:re.rpx0,rpx1:re.rpx1};if(me)ve=me;else if(Z)if(re.parent)if(le){var Se=(re.x1>le?2*Math.PI:0)+U;ve={x0:Se,x1:Se}}else ve={rpx0:G,rpx1:G},n.extendFlat(ve,Ce(re));else ve={rpx0:0,rpx1:0};else ve={x0:U,x1:U};return a(ve,Me)}function oe(re){var me=q[g.getPtId(re)],ve,Me=re.transform;if(me)ve=me;else if(ve={rpx1:re.rpx1,transform:{textPosAngle:Me.textPosAngle,scale:0,rotate:Me.rotate,rCenter:Me.rCenter,x:Me.x,y:Me.y}},Z)if(re.parent)if(le){var Se=re.x1>le?2*Math.PI:0;ve.x0=ve.x1=Se}else n.extendFlat(ve,Ce(re));else ve.x0=ve.x1=U;else ve.x0=ve.x1=U;var $e=a(ve.transform.textPosAngle,re.transform.textPosAngle),ye=a(ve.rpx1,re.rpx1),Ne=a(ve.x0,re.x0),Pe=a(ve.x1,re.x1),je=a(ve.transform.scale,Me.scale),Ie=a(ve.transform.rotate,Me.rotate),Ue=Me.rCenter===0?3:ve.transform.rCenter===0?1/3:1,ke=a(ve.transform.rCenter,Me.rCenter),We=function(qe){return ke(Math.pow(qe,Ue))};return function(qe){var Ye=ye(qe),Qe=Ne(qe),F=Pe(qe),B=We(qe),j=se(Ye,(Qe+F)/2),W=$e(qe),J={pxmid:j,rpx1:Ye,transform:{textPosAngle:W,rCenter:B,x:Me.x,y:Me.y}};return s(R.type,Me,C),{transform:{targetX:ge(J),targetY:_e(J),scale:je(qe),rotate:Ie(qe),rCenter:B}}}}function Ce(re){var me=re.parent,ve=q[g.getPtId(me)],Me={};if(ve){var Se=me.children,$e=Se.indexOf(re),ye=Se.length,Ne=a(ve.x0,ve.x1);Me.x0=Ne($e/ye),Me.x1=Ne($e/ye)}else Me.x0=Me.x1=0;return Me}}function b(k){return r.partition().size([2*Math.PI,k.height+1])(k)}t.formatSliceLabel=function(k,S,M,D,A){var C=M.texttemplate,$=M.textinfo;if(!C&&(!$||$==="none"))return"";var N=A.separators,E=D[0],P=k.data.data,R=E.hierarchy,L=g.isHierarchyRoot(k),z=g.getParent(R,k),I=g.getValue(k);if(!C){var H=$.split("+"),V=function(be){return H.indexOf(be)!==-1},O=[],X;if(V("label")&&P.label&&O.push(P.label),P.hasOwnProperty("v")&&V("value")&&O.push(g.formatValue(P.v,N)),!L){V("current path")&&O.push(g.getPath(k.data));var G=0;V("percent parent")&&G++,V("percent entry")&&G++,V("percent root")&&G++;var Y=G>1;if(G){var K,Z=function(be){X=g.formatPercent(K,N),Y&&(X+=" of "+be),O.push(X)};V("percent parent")&&!L&&(K=I/g.getValue(z),Z("parent")),V("percent entry")&&(K=I/g.getValue(S),Z("entry")),V("percent root")&&(K=I/g.getValue(R),Z("root"))}}return V("text")&&(X=n.castOption(M,P.i,"text"),n.isValidTextValue(X)&&O.push(X)),O.join("<br>")}var q=n.castOption(M,P.i,"texttemplate");if(!q)return"";var ie={};P.label&&(ie.label=P.label),P.hasOwnProperty("v")&&(ie.value=P.v,ie.valueLabel=g.formatValue(P.v,N)),ie.currentPath=g.getPath(k.data),L||(ie.percentParent=I/g.getValue(z),ie.percentParentLabel=g.formatPercent(ie.percentParent,N),ie.parent=g.getPtLabel(z)),ie.percentEntry=I/g.getValue(S),ie.percentEntryLabel=g.formatPercent(ie.percentEntry,N),ie.entry=g.getPtLabel(S),ie.percentRoot=I/g.getValue(R),ie.percentRootLabel=g.formatPercent(ie.percentRoot,N),ie.root=g.getPtLabel(R),P.hasOwnProperty("color")&&(ie.color=P.color);var fe=n.castOption(M,P.i,"text");return(n.isValidTextValue(fe)||fe==="")&&(ie.text=fe),ie.customdata=n.castOption(M,P.i,"customdata"),n.texttemplateString(q,ie,A._d3locale,ie,M._meta||{})};function x(k){return k.rpx0===0&&n.isFullCircle([k.x0,k.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(k.halfangle)),k.ring/2))}function _(k){return T(k.rpx1,k.transform.textPosAngle)}function T(k,S){return[k*Math.sin(S),-k*Math.cos(S)]}})(SA);var o1=yt,cf=de,l1=Et,eO=wr,tO=AA,s1=Zp.styleOne,id=Kc,hi=zi,rO=Kp,aO=SA.formatSliceLabel,nd=!1,iO=function(e,r,a,i,n){var o=n.width,l=n.height,s=n.viewX,f=n.viewY,c=n.pathSlice,v=n.toMoveInsideSlice,u=n.strTransform,h=n.hasTransition,d=n.handleSlicesExit,p=n.makeUpdateSliceInterpolator,y=n.makeUpdateTextInterpolator,m=n.prevEntry,g={},w=e._context.staticPlot,b=e._fullLayout,x=r[0],_=x.trace,T=_.textposition.indexOf("left")!==-1,k=_.textposition.indexOf("right")!==-1,S=_.textposition.indexOf("bottom")!==-1,M=!S&&!_.marker.pad.t||S&&!_.marker.pad.b,D=tO(a,[o,l],{packing:_.tiling.packing,squarifyratio:_.tiling.squarifyratio,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,pad:{inner:_.tiling.pad,top:_.marker.pad.t,left:_.marker.pad.l,right:_.marker.pad.r,bottom:_.marker.pad.b}}),A=D.descendants(),C=1/0,$=-1/0;A.forEach(function(L){var z=L.depth;z>=_._maxDepth?(L.x0=L.x1=(L.x0+L.x1)/2,L.y0=L.y1=(L.y0+L.y1)/2):(C=Math.min(C,z),$=Math.max($,z))}),i=i.data(A,hi.getPtId),_._maxVisibleLayers=isFinite($)?$-C+1:0,i.enter().append("g").classed("slice",!0),d(i,nd,g,[o,l],c),i.order();var N=null;if(h&&m){var E=hi.getPtId(m);i.each(function(L){N===null&&hi.getPtId(L)===E&&(N={x0:L.x0,x1:L.x1,y0:L.y0,y1:L.y1})})}var P=function(){return N||{x0:0,x1:o,y0:0,y1:l}},R=i;return h&&(R=R.transition().each("end",function(){var L=o1.select(this);hi.setSliceCursor(L,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),R.each(function(L){var z=hi.isHeader(L,_);L._x0=s(L.x0),L._x1=s(L.x1),L._y0=f(L.y0),L._y1=f(L.y1),L._hoverX=s(L.x1-_.marker.pad.r),L._hoverY=f(S?L.y1-_.marker.pad.b/2:L.y0+_.marker.pad.t/2);var I=o1.select(this),H=cf.ensureSingle(I,"path","surface",function(G){G.style("pointer-events",w?"none":"all")});h?H.transition().attrTween("d",function(G){var Y=p(G,nd,P(),[o,l]);return function(K){return c(Y(K))}}):H.attr("d",c),I.call(rO,a,e,r,{styleOne:s1,eventDataKeys:id.eventDataKeys,transitionTime:id.CLICK_TRANSITION_TIME,transitionEasing:id.CLICK_TRANSITION_EASING}).call(hi.setSliceCursor,e,{isTransitioning:e._transitioning}),H.call(s1,L,_,{hovered:!1}),L.x0===L.x1||L.y0===L.y1?L._text="":z?L._text=M?"":hi.getPtLabel(L)||"":L._text=aO(L,a,_,r,b)||"";var V=cf.ensureSingle(I,"g","slicetext"),O=cf.ensureSingle(V,"text","",function(G){G.attr("data-notex",1)}),X=cf.ensureUniformFontSize(e,hi.determineTextFont(_,L,b.font));O.text(L._text||" ").classed("slicetext",!0).attr("text-anchor",k?"end":T||z?"start":"middle").call(l1.font,X).call(eO.convertToTspans,e),L.textBB=l1.bBox(O.node()),L.transform=v(L,{fontSize:X.size,isHeader:z}),L.transform.fontSize=X.size,h?O.transition().attrTween("transform",function(G){var Y=y(G,nd,P(),[o,l]);return function(K){return u(Y(K))}}):O.attr("transform",u(L))}),N},nO=Z7,oO=iO,lO=function(e,r,a,i){return nO(e,r,a,i,{type:"treemap",drawDescendants:oO})},sO={moduleType:"trace",name:"treemap",basePlotModule:gA,categories:[],animatable:!0,attributes:xA,layoutAttributes:_A,supplyDefaults:w7,supplyLayoutDefaults:A7,calc:lc.calc,crossTraceCalc:lc.crossTraceCalc,plot:lO,style:Zp.style,colorbar:os,meta:{description:["Visualize hierarchal data from leaves (and/or outer branches) towards root","with rectangles. The treemap sectors are determined by the entries in","*labels* or *ids* and in *parents*."].join(" ")}},fO=sO;const bO=Li(fO);export{dO as P,hO as b,vO as c,pO as h,yO as o,mO as p,gO as s,bO as t};
|
|
7
|
+
//# sourceMappingURL=plotly-071d96ca.js.map
|