@deephaven/embed-widget 1.15.1 → 1.16.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/{App-CypmLgmL.js → App-Ca5Ruy2E.js} +2 -2
- package/build/assets/{App-CypmLgmL.js.map → App-Ca5Ruy2E.js.map} +1 -1
- package/build/assets/{Chart-BsXISs8I.js → Chart-BTkEZV67.js} +2 -2
- package/build/assets/{Chart-BsXISs8I.js.map → Chart-BTkEZV67.js.map} +1 -1
- package/build/assets/{IrisGrid-CjstqkdZ.js → IrisGrid-B4lUy4sd.js} +5 -5
- package/build/assets/{IrisGrid-CjstqkdZ.js.map → IrisGrid-B4lUy4sd.js.map} +1 -1
- package/build/assets/IrisGridThemeProvider-ZZ-85ME3.js +12 -0
- package/build/assets/IrisGridThemeProvider-ZZ-85ME3.js.map +1 -0
- package/build/assets/LocalWorkspaceStorage-CAcGwSuV.js +2 -0
- package/build/assets/LocalWorkspaceStorage-CAcGwSuV.js.map +1 -0
- package/build/assets/{LogPanel-dUVSBPpo.js → LogPanel-CpZTGwJv.js} +4 -4
- package/build/assets/{LogPanel-dUVSBPpo.js.map → LogPanel-CpZTGwJv.js.map} +1 -1
- package/build/assets/{MarkdownEditor-D53YrMF9.js → MarkdownEditor-BOGDnkaM.js} +2 -2
- package/build/assets/{MarkdownEditor-D53YrMF9.js.map → MarkdownEditor-BOGDnkaM.js.map} +1 -1
- package/build/assets/{MarkdownNotebook-BkTy95vu.js → MarkdownNotebook-Dsw8M9b9.js} +2 -2
- package/build/assets/{MarkdownNotebook-BkTy95vu.js.map → MarkdownNotebook-Dsw8M9b9.js.map} +1 -1
- package/build/assets/Plot-Xv-druQg.js +2 -0
- package/build/assets/{Plot-BmYKhm84.js.map → Plot-Xv-druQg.js.map} +1 -1
- package/build/assets/{Plotly-BTLqRIq-.js → Plotly-CJhuCDFM.js} +2 -2
- package/build/assets/{Plotly-BTLqRIq-.js.map → Plotly-CJhuCDFM.js.map} +1 -1
- package/build/assets/{index-B6BgIG1u.js → index-CaeBLWf2.js} +3 -3
- package/build/assets/{index-B6BgIG1u.js.map → index-CaeBLWf2.js.map} +1 -1
- package/build/assets/{index-DG2tw4ib.js → index-Dy719bYK.js} +4 -4
- package/build/assets/{index-DG2tw4ib.js.map → index-Dy719bYK.js.map} +1 -1
- package/build/assets/{index-DsTg7BZt.js → index-xys9qLny.js} +4 -4
- package/build/assets/{index-DsTg7BZt.js.map → index-xys9qLny.js.map} +1 -1
- package/build/assets/plotly-BJo_M7Cs.js +7 -0
- package/build/assets/{plotly-ODN7AY4u.js.map → plotly-BJo_M7Cs.js.map} +1 -1
- package/build/index.html +2 -2
- package/package.json +11 -11
- package/build/assets/IrisGridThemeProvider-Bm5JMU4l.js +0 -12
- package/build/assets/IrisGridThemeProvider-Bm5JMU4l.js.map +0 -1
- package/build/assets/LocalWorkspaceStorage-CtMRGP9F.js +0 -2
- package/build/assets/LocalWorkspaceStorage-CtMRGP9F.js.map +0 -1
- package/build/assets/Plot-BmYKhm84.js +0 -2
- package/build/assets/plotly-ODN7AY4u.js +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{g as $i,c as uM}from"./helpers-BosuxZz1.js";import{r as vM,p as dM,a as j1,f as kt,t as $a,d as bt,g as B1,b as Vl,i as hM,c as G1,e as Eh,h as U1,j as V1,k as W1,m as pM,l as mM,n as yM,o as gM,q as X1,s as bM,u as xM,v as _M,w as wM,x as TM,y as kM,z as AM,A as zh,B as Y1}from"./vendor-CU9m3C3n.js";var q1={};(function(t){function e(x){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},e(x)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r=o(vM),a=i(dM);function i(x){return x&&x.__esModule?x:{default:x}}function n(x){if(typeof WeakMap!="function")return null;var w=new WeakMap,T=new WeakMap;return(n=function(M){return M?T:w})(x)}function o(x,w){if(x&&x.__esModule)return x;if(x===null||e(x)!=="object"&&typeof x!="function")return{default:x};var T=n(w);if(T&&T.has(x))return T.get(x);var A={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in x)if(S!=="default"&&Object.prototype.hasOwnProperty.call(x,S)){var L=M?Object.getOwnPropertyDescriptor(x,S):null;L&&(L.get||L.set)?Object.defineProperty(A,S,L):A[S]=x[S]}return A.default=x,T&&T.set(x,A),A}function l(x,w){if(!(x instanceof w))throw new TypeError("Cannot call a class as a function")}function s(x,w){for(var T=0;T<w.length;T++){var A=w[T];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}function f(x,w,T){return w&&s(x.prototype,w),Object.defineProperty(x,"prototype",{writable:!1}),x}function c(x,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(w&&w.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),Object.defineProperty(x,"prototype",{writable:!1}),w&&u(x,w)}function u(x,w){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,M){return A.__proto__=M,A},u(x,w)}function v(x){var w=p();return function(){var A=m(x),M;if(w){var S=m(this).constructor;M=Reflect.construct(A,arguments,S)}else M=A.apply(this,arguments);return h(this,M)}}function h(x,w){if(w&&(e(w)==="object"||typeof w=="function"))return w;if(w!==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 m(x){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},m(x)}var y=["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"],b=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],_=typeof window<"u";function g(x){var w=function(T){c(M,T);var A=v(M);function M(S){var L;return l(this,M),L=A.call(this,S),L.p=Promise.resolve(),L.resizeHandler=null,L.handlers={},L.syncWindowResize=L.syncWindowResize.bind(d(L)),L.syncEventHandlers=L.syncEventHandlers.bind(d(L)),L.attachUpdateEvents=L.attachUpdateEvents.bind(d(L)),L.getRef=L.getRef.bind(d(L)),L.handleUpdate=L.handleUpdate.bind(d(L)),L.figureCallback=L.figureCallback.bind(d(L)),L.updatePlotly=L.updatePlotly.bind(d(L)),L}return f(M,[{key:"updatePlotly",value:function(L,z,N){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(L),$.syncEventHandlers(),$.figureCallback(z),N&&$.attachUpdateEvents())}).catch(function(R){$.props.onError&&$.props.onError(R)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(L){this.unmounting=!1;var z=L.frames&&L.frames.length?L.frames.length:0,N=this.props.frames&&this.props.frames.length?this.props.frames.length:0,$=!(L.layout===this.props.layout&&L.data===this.props.data&&L.config===this.props.config&&N===z),R=L.revision!==void 0,H=L.revision!==this.props.revision;!$&&(!R||R&&!H)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&_&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),x.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var L=this;!this.el||!this.el.removeListener||b.forEach(function(z){L.el.on(z,L.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var L=this;!this.el||!this.el.removeListener||b.forEach(function(z){L.el.removeListener(z,L.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(L){if(typeof L=="function"){var z=this.el,N=z.data,$=z.layout,R=this.el._transitionData?this.el._transitionData._frames:null,H={data:N,layout:$,frames:R};L(H,this.el)}}},{key:"syncWindowResize",value:function(L){var z=this;_&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return x.Plots.resize(z.el)},window.addEventListener("resize",this.resizeHandler),L&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(L){this.el=L,this.props.debug&&_&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var L=this;y.forEach(function(z){var N=L.props["on"+z],$=L.handlers[z],R=!!$;N&&!R?L.addEventHandler(z,N):!N&&R?L.removeEventHandler(z):N&&R&&N!==$&&(L.removeEventHandler(z),L.addEventHandler(z,N))})}},{key:"addEventHandler",value:function(L,z){this.handlers[L]=z,this.el.on(this.getPlotlyEventName(L),this.handlers[L])}},{key:"removeEventHandler",value:function(L){this.el.removeListener(this.getPlotlyEventName(L),this.handlers[L]),delete this.handlers[L]}},{key:"getPlotlyEventName",value:function(L){return"plotly_"+L.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})}}]),M}(r.Component);return w.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},y.forEach(function(T){w.propTypes["on"+T]=a.default.func}),w.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},w}})(q1);const wB=$i(q1);var Z1={},Rc={};Rc.version="3.1.0";var K1={exports:{}},cr={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,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"},fr={},Dn=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")},MM=j1.decode,SM=Dn,Rh=Array.isArray,LM=ArrayBuffer,CM=DataView;function Q1(t){return LM.isView(t)&&!(t instanceof CM)}fr.isTypedArray=Q1;function Jf(t){return Rh(t)||Q1(t)}fr.isArrayOrTypedArray=Jf;function DM(t){return!Jf(t[0])}fr.isArray1D=DM;fr.ensureArray=function(t,e){return Rh(t)||(t=[]),t.length=e,t};var Ar={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};Ar.uint8c=Ar.u1c;Ar.uint8=Ar.u1;Ar.int8=Ar.i1;Ar.uint16=Ar.u2;Ar.int16=Ar.i2;Ar.uint32=Ar.u4;Ar.int32=Ar.i4;Ar.float32=Ar.f4;Ar.float64=Ar.f8;function Ih(t){return t.constructor===ArrayBuffer}fr.isArrayBuffer=Ih;fr.decodeTypedArraySpec=function(t){var e=[],r=PM(t),a=r.dtype,i=Ar[a];if(!i)throw new Error('Error in dtype: "'+a+'"');var n=i.BYTES_PER_ELEMENT,o=r.bdata;Ih(o)||(o=MM(o));var l=r.shape===void 0?[o.byteLength/n]:(""+r.shape).split(",");l.reverse();var s=l.length,f,c,u=+l[0],v=n*u,h=0;if(s===1)e=new i(o);else if(s===2)for(f=+l[1],c=0;c<f;c++)e[c]=new i(o,h,u),h+=v;else if(s===3){f=+l[1];for(var d=+l[2],p=0;p<d;p++)for(e[p]=[],c=0;c<f;c++)e[p][c]=new i(o,h,u),h+=v}else throw new Error("ndim: "+s+'is not supported with the shape:"'+r.shape+'"');return e.bdata=r.bdata,e.dtype=r.dtype,e.shape=l.reverse().join(","),t._inputArray=e,e};fr.isTypedArraySpec=function(t){return SM(t)&&t.hasOwnProperty("dtype")&&typeof t.dtype=="string"&&t.hasOwnProperty("bdata")&&(typeof t.bdata=="string"||Ih(t.bdata))&&(t.shape===void 0||t.hasOwnProperty("shape")&&(typeof t.shape=="string"||typeof t.shape=="number"))};function PM(t){return{bdata:t.bdata,dtype:t.dtype,shape:t.shape}}fr.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),Rh(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};fr.maxRowLength=function(t){return J1(t,Math.max,0)};fr.minRowLength=function(t){return J1(t,Math.min,1/0)};function J1(t,e,r){if(Jf(t))if(Jf(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 e_=kt,Fh=fr.isArrayOrTypedArray,Nh=function(e,r){if(e_(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";var a=r.split("."),i,n,o,l;for(l=0;l<a.length;l++)if(String(a[l]).slice(0,2)==="__")throw"bad property string";for(l=0;l<a.length;){if(i=String(a[l]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),i){if(i[1])a[l]=i[1];else if(l===0)a.splice(0,1);else throw"bad property string";for(n=i[2].substr(1,i[2].length-2).split("]["),o=0;o<n.length;o++)l++,a.splice(l,0,Number(n[o]))}l++}return typeof e!="object"?IM(e,r,a):{set:r_(e,a,r),get:t_(e,a),astr:r,parts:a,obj:e}};function t_(t,e){return function(r){var a=t,i,n,o,l,s;for(l=0;l<e.length-1;l++){if(i=e[l],i===-1){for(n=!0,o=[],s=0;s<a.length;s++)o[s]=t_(a[s],e.slice(l+1))(r),o[s]!==o[0]&&(n=!1);return n?o[0]:o}if(typeof i=="number"&&!Fh(a)||(a=a[i],typeof a!="object"||a===null))return}if(!(typeof a!="object"||a===null)&&(o=a[e[l]],!(!r&&o===null)))return o}}var EM=/(^|\.)args\[/;function Pd(t,e){return t===void 0||t===null&&!e.match(EM)}function r_(t,e,r){return function(a){var i=t,n="",o=Pd(a,r),l,s;for(s=0;s<e.length-1;s++){if(l=e[s],typeof l=="number"&&!Fh(i))throw"array index but container is not an array";if(l===-1){if(o=!RM(i,e.slice(s+1),a,r),o)break;return}if(!a_(i,l,e[s+1],o))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";n=zM(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 zM(t,e){var r=e;return e_(e)?r="["+e+"]":t&&(r="."+e),t+r}function RM(t,e,r,a){var i=Fh(r),n=!0,o=r,l=a.replace("-1",0),s=i?!1:Pd(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=Pd(o,l)),s&&(n=!1),a_(t,c,f,s)&&r_(t[c],e,a.replace("-1",c))(o);return n}function a_(t,e,r,a){if(t[e]===void 0){if(a)return!1;typeof r=="number"?t[e]=[]:t[e]={}}return!0}function IM(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var $n=Nh,FM=/^\w*$/,NM=0,ym=1,Ds=2,gm=3,Yi=4,$M=function(e,r,a,i){a=a||"name",i=i||"value";var n,o,l,s={};r&&r.length?(l=$n(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=FM.test(i),u={set:function(v,h){var d=h===null?Yi:NM;if(!o){if(!l||d===Yi)return;o=[],l.set(o)}var p=f[v];if(p===void 0){if(d===Yi)return;d=d|gm,p=o.length,f[v]=p}else h!==(c?o[p][i]:$n(o[p],i).get())&&(d=d|Ds);var m=o[p]=o[p]||{};return m[a]=v,c?m[i]=h:$n(m,i).set(h),h!==null&&(d=d&~Yi),s[p]=s[p]|d,u},get:function(v){if(o){var h=f[v];if(h!==void 0)return c?o[h][i]:$n(o[h],i).get()}},rename:function(v,h){var d=f[v];return d===void 0||(s[d]=s[d]|ym,f[h]=d,delete f[v],o[d][a]=h),u},remove:function(v){var h=f[v];if(h===void 0)return u;var d=o[h];if(Object.keys(d).length>2)return s[h]=s[h]|Ds,u.set(v,null);if(c){for(n=h;n<o.length;n++)s[n]=s[n]|gm;for(n=h;n<o.length;n++)f[o[n][a]]--;o.splice(h,1),delete f[v]}else $n(d,i).set(null),s[h]=s[h]|Ds|Yi;return u},constructUpdate:function(){for(var v,h,d={},p=Object.keys(s),m=0;m<p.length;m++)h=p[m],v=r+"["+h+"]",o[h]?(s[h]&ym&&(d[v+"."+a]=o[h][a]),s[h]&Ds&&(c?d[v+"."+i]=s[h]&Yi?null:o[h][i]:d[v+"."+i]=s[h]&Yi?null:$n(o[h],i).get())):d[v]=null;return d}};return u},HM=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,OM=/^[^\.\[\]]+$/,jM=function(t,e){for(;e;){var r=t.match(HM);if(r)t=r[1];else if(t.match(OM))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},BM=kt,$h=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 BM(a)||(a=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),a},bm=fr.isArrayOrTypedArray,el=Dn,GM=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(bm(i)&&bm(n)&&el(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]&&el(i[l])&&el(n[l])&&t(n[l],i[l])}else el(i)&&el(n)&&(t(n,i),Object.keys(n).length||delete e[a])}};function UM(t,e){var r=t%e;return r<0?r+e:r}function VM(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}var ds={mod:UM,modHalf:VM},i_={},Yt={},xm=Dn,tl=Array.isArray;function WM(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}Yt.extendFlat=function(){return hs(arguments,!1,!1,!1)};Yt.extendDeep=function(){return hs(arguments,!0,!1,!1)};Yt.extendDeepAll=function(){return hs(arguments,!0,!0,!1)};Yt.extendDeepNoArrays=function(){return hs(arguments,!0,!1,!0)};function hs(t,e,r,a){var i=t[0],n=t.length,o,l,s,f,c,u,v;if(n===2&&tl(i)&&tl(t[1])&&i.length===0){if(v=WM(t[1],i),v)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&&tl(f)?i[l]=f:e&&f&&(xm(f)||(c=tl(f)))?(c?(c=!1,u=s&&tl(s)?s:[]):u=s&&xm(s)?s:{},i[l]=hs([u,f],e,r,a)):(typeof f<"u"||r)&&(i[l]=f)}return i}var Mr=function(t){var e=t.variantValues,r=t.editType,a=t.colorEditType;a===void 0&&(a=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal",description:["Sets the weight (or boldness) of the font."].join(" ")};t.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var n={family:{valType:"string",noBlank:!0,strict:!0,editType:r,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser can only apply a font if it is available on the system where","it runs. Provide multiple font families, separated by commas, to indicate","the order in which to apply fonts if they aren't available."].join(" ")},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:a},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal",description:["Sets whether a font should be styled with a normal or italic face from its family."].join(" ")},variant:t.noFontVariant?void 0:{editType:r,valType:"enumerated",values:e||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal",description:["Sets the variant of the font."].join(" ")},textcase:t.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal",description:["Sets capitalization of text.","It can be used to make text appear in all-uppercase or all-lowercase,","or with each word capitalized."].join(" ")},lineposition:t.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none",description:["Sets the kind of decoration line(s) with text,","such as an *under*, *over* or *through*","as well as combinations e.g. *under+over*, etc."].join(" ")},shadow:t.noFontShadow?void 0:{editType:r,valType:"string",dflt:t.autoShadowDflt?"auto":"none",description:["Sets the shape and color of the shadow behind text.","*auto* places minimal shadow and applies contrast text font color.","See https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow for additional options."].join(" ")},editType:r,description:""+(t.description||"")};return t.autoSize&&(n.size.dflt="auto"),t.autoColor&&(n.color.dflt="auto"),t.arrayOk&&(n.family.arrayOk=!0,n.weight.arrayOk=!0,n.style.arrayOk=!0,t.noFontVariant||(n.variant.arrayOk=!0),t.noFontTextcase||(n.textcase.arrayOk=!0),t.noFontLineposition||(n.lineposition.arrayOk=!0),t.noFontShadow||(n.shadow.arrayOk=!0),n.size.arrayOk=!0,n.color.arrayOk=!0),n},Ic={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"},n_=Ic,o_=Mr,Hh=o_({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});Hh.family.dflt=n_.HOVERFONT;Hh.size.dflt=n_.HOVERFONTSIZE;var ps={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(" ")},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none",description:["Determines expansion of hover effects to other subplots","If *single* just the axis pair of the primary point is included without overlaying subplots.","If *overlaying* all subplots using the main axis and occupying the same space are included.","If *axis*, also include stacked subplots using the same axis","when `hovermode` is set to *x*, *x unified*, *y* or *y unified*."].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:Hh,grouptitlefont:o_({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(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"none",description:["Sets whether or not to show the hover label arrow/triangle","pointing to the data point."].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"}},XM=Mr,rl=ps.hoverlabel,al=Yt.extendFlat,Fc={hoverlabel:{bgcolor:al({},rl.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:al({},rl.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:XM({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:al({},rl.align,{arrayOk:!0}),namelength:al({},rl.namelength,{arrayOk:!0}),showarrow:al({},rl.showarrow),editType:"none"}},YM=Mr,qM=Fc,_a={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(" ")},legend:{valType:"subplotid",dflt:"legend",editType:"style",description:["Sets the reference to a legend to show this trace in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces and shapes 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:YM({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.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].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 appears 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:qM.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"},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(" ")}},ZM=$a,Nc={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)"]]},l_=Nc.RdBu;function KM(t,e){if(e||(e=l_),!t)return e;function r(){try{t=Nc[t]||JSON.parse(t)}catch{t=e}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),s_(t)?t:e}function s_(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||!ZM(a[1]).isValid())return!1;e=+a[0]}return!0}function QM(t){return Nc[t]!==void 0?!0:s_(t)}var jo={scales:Nc,defaultScale:l_,get:KM,isValid:QM},f_={exports:{}},Or={};Or.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Or.defaultLine="#444";Or.lightLine="#eee";Or.background="#fff";Or.borderLine="#BEC8D9";Or.lightFraction=100*10/11;var ea=$a,JM=kt,eS=fr.isTypedArray,_r=f_.exports={},$c=Or;_r.defaults=$c.defaults;var tS=_r.defaultLine=$c.defaultLine;_r.lightLine=$c.lightLine;var Ed=_r.background=$c.background;_r.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"};_r.rgb=function(t){return _r.tinyRGB(ea(t))};_r.opacity=function(t){return t?ea(t).getAlpha():0};_r.addOpacity=function(t,e){var r=ea(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"};_r.combine=function(t,e){var r=ea(t).toRgb();if(r.a===1)return ea(t).toRgbString();var a=ea(e||Ed).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 ea(n).toRgbString()};_r.interpolate=function(t,e,r){var a=ea(t).toRgb(),i=ea(e).toRgb(),n={r:r*a.r+(1-r)*i.r,g:r*a.g+(1-r)*i.g,b:r*a.b+(1-r)*i.b};return ea(n).toRgbString()};_r.contrast=function(t,e,r){var a=ea(t);a.getAlpha()!==1&&(a=ea(_r.combine(t,Ed)));var i=a.isDark()?e?a.lighten(e):Ed:r?a.darken(r):tS;return i.toString()};_r.stroke=function(t,e){var r=ea(e);t.style({stroke:_r.tinyRGB(r),"stroke-opacity":r.getAlpha()})};_r.fill=function(t,e){var r=ea(e);t.style({fill:_r.tinyRGB(r),"fill-opacity":r.getAlpha()})};_r.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]=Cu(n[a]);else t[i]=Cu(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]=Cu(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++)_r.clean(n[a])}else n&&typeof n=="object"&&!eS(n)&&_r.clean(n)}};function Cu(t){if(JM(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 yt=f_.exports,ms={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2},Bo={};Bo.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=kt,r=$a,a=Yt.extendFlat,i=_a,n=jo,o=yt,l=ms.DESELECTDIM,s=Nh,f=Bo.counter,c=ds.modHalf,u=fr.isArrayOrTypedArray,v=fr.isTypedArraySpec,h=fr.decodeTypedArraySpec;t.valObjectMeta={data_array:{description:["An {array} of data.","The value must represent an {array} or it will be ignored,","but this array can be provided in several forms:","(1) a regular {array} object","(2) a typed array (e.g. Float32Array)","(3) an object with keys dtype, bdata, and optionally shape.","In this 3rd form, dtype is one of","*f8*, *f4*.","*i4*, *u4*,","*i2*, *u2*,","*i1*, *u1* or *u1c* for Uint8ClampedArray.","In addition to shorthand `dtype` above one could also use the following forms:","*float64*, *float32*,","*int32*, *uint32*,","*int16*, *uint16*,","*int8*, *uint8* or *uint8c* for Uint8ClampedArray.","`bdata` is either a base64-encoded string or the ArrayBuffer of","an integer or float typed array.","For either multi-dimensional arrays you must also","provide its dimensions separated by comma via `shape`.","For example using `dtype`: *f4* and `shape`: *5,100* you can","declare a 2-D array that has 5 rows and 100 columns","containing float32 values i.e. 4 bits per value.","`shape` is optional for one dimensional arrays."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(p,m,y){m.set(u(p)?p:v(p)?h(p):y)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(p,m,y,b){b.coerceNumber&&(p=+p),b.values.indexOf(p)===-1?m.set(y):m.set(p)},validateFunction:function(p,m){m.coerceNumber&&(p=+p);for(var y=m.values,b=0;b<y.length;b++){var _=String(y[b]);if(_.charAt(0)==="/"&&_.charAt(_.length-1)==="/"){var g=new RegExp(_.substr(1,_.length-2));if(g.test(p))return!0}else if(p===y[b])return!0}return!1}},boolean:{description:"A boolean (true/false) value.",requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(p,m,y){p===!0||p===!1?m.set(p):m.set(y)}},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(p,m,y,b){v(p)&&(p=h(p)),!e(p)||b.min!==void 0&&p<b.min||b.max!==void 0&&p>b.max?m.set(y):m.set(+p)}},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","extras"],coerceFunction:function(p,m,y,b){if((b.extras||[]).indexOf(p)!==-1){m.set(p);return}v(p)&&(p=h(p)),p%1||!e(p)||b.min!==void 0&&p<b.min||b.max!==void 0&&p>b.max?m.set(y):m.set(+p)}},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(p,m,y,b){if(typeof p!="string"){var _=typeof p=="number";b.strict===!0||!_?m.set(y):m.set(String(p))}else b.noBlank&&!p?m.set(y):m.set(p)}},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(p,m,y){v(p)&&(p=h(p)),r(p).isValid()?m.set(p):m.set(y)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(p,m,y){function b(_){return r(_).isValid()}!Array.isArray(p)||!p.length?m.set(y):p.every(b)?m.set(p):m.set(y)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(n.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(p,m,y){m.set(n.get(p,y))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(p,m,y){v(p)&&(p=h(p)),p==="auto"?m.set("auto"):e(p)?m.set(c(+p,360)):m.set(y)}},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(p,m,y,b){var _=b.regex||f(y);if(typeof p=="string"&&_.test(p)){m.set(p);return}m.set(y)},validateFunction:function(p,m){var y=m.dflt;return p===y?!0:typeof p!="string"?!1:!!f(y).test(p)}},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(p,m,y,b){if((b.extras||[]).indexOf(p)!==-1){m.set(p);return}if(typeof p!="string"){m.set(y);return}for(var _=p.split("+"),g=0;g<_.length;){var x=_[g];b.flags.indexOf(x)===-1||_.indexOf(x)<g?_.splice(g,1):g++}_.length?m.set(_.join("+")):m.set(y)}},any:{description:"Any type.",requiredOpts:[],otherOpts:["dflt","values","arrayOk"],coerceFunction:function(p,m,y){p===void 0?m.set(y):m.set(v(p)?h(p):p)}},info_array:{description:["An {array} of plot information."].join(" "),requiredOpts:["items"],otherOpts:["dflt","freeLength","dimensions"],coerceFunction:function(p,m,y,b){function _(D,P,k){var C,E={set:function(I){C=I}};return k===void 0&&(k=P.dflt),t.valObjectMeta[P.valType].coerceFunction(D,E,k,P),C}if(v(p)&&(p=h(p)),!u(p)){m.set(y);return}var g=b.dimensions===2||b.dimensions==="1-2"&&Array.isArray(p)&&u(p[0]),x=b.items,w=[],T=Array.isArray(x),A=T&&g&&u(x[0]),M=g&&T&&!A,S=T&&!M?x.length:p.length,L,z,N,$,R,H;if(y=Array.isArray(y)?y:[],g)for(L=0;L<S;L++)for(w[L]=[],N=u(p[L])?p[L]:[],M?R=x.length:T?R=x[L].length:R=N.length,z=0;z<R;z++)M?$=x[z]:T?$=x[L][z]:$=x,H=_(N[z],$,(y[L]||[])[z]),H!==void 0&&(w[L][z]=H);else for(L=0;L<S;L++)H=_(p[L],T?x[L]:x,y[L]),H!==void 0&&(w[L]=H);m.set(w)},validateFunction:function(p,m){if(!u(p))return!1;var y=m.items,b=Array.isArray(y),_=m.dimensions===2;if(!m.freeLength&&p.length!==y.length)return!1;for(var g=0;g<p.length;g++)if(_){if(!u(p[g])||!m.freeLength&&p[g].length!==y[g].length)return!1;for(var x=0;x<p[g].length;x++)if(!d(p[g][x],b?y[g][x]:y))return!1}else if(!d(p[g],b?y[g]:y))return!1;return!0}}},t.coerce=function(p,m,y,b,_){var g=s(y,b).get(),x=s(p,b),w=s(m,b),T=x.get(),A=m._template;if(T===void 0&&A&&(T=s(A,b).get(),A=0),_===void 0&&(_=g.dflt),g.arrayOk){if(u(T))return w.set(T),T;if(v(T))return T=h(T),w.set(T),T}var M=t.valObjectMeta[g.valType].coerceFunction;M(T,w,_,g);var S=w.get();return A&&S===_&&!d(T,g)&&(T=s(A,b).get(),M(T,w,_,g),S=w.get()),S},t.coerce2=function(p,m,y,b,_){var g=s(p,b),x=t.coerce(p,m,y,b,_),w=g.get();return w!=null?x:!1},t.coerceFont=function(p,m,y,b){b||(b={}),y=a({},y),y=a(y,b.overrideDflt||{});var _={family:p(m+".family",y.family),size:p(m+".size",y.size),color:p(m+".color",y.color),weight:p(m+".weight",y.weight),style:p(m+".style",y.style)};if(b.noFontVariant||(_.variant=p(m+".variant",y.variant)),b.noFontLineposition||(_.lineposition=p(m+".lineposition",y.lineposition)),b.noFontTextcase||(_.textcase=p(m+".textcase",y.textcase)),!b.noFontShadow){var g=y.shadow;g==="none"&&b.autoShadowDflt&&(g="auto"),_.shadow=p(m+".shadow",g)}return _},t.coercePattern=function(p,m,y,b){var _=p(m+".shape"),g;if(_||(g=p(m+".path")),_||g){_&&p(m+".solidity"),p(m+".size");var x=p(m+".fillmode"),w=x==="overlay";if(!b){var T=p(m+".bgcolor",w?y:void 0);p(m+".fgcolor",w?o.contrast(T):y)}p(m+".fgopacity",w?.5:1)}},t.coerceHoverinfo=function(p,m,y){var b=m._module.attributes,_=b.hoverinfo?b:i,g=_.hoverinfo,x;if(y._dataLength===1){var w=g.dflt==="all"?g.flags.slice():g.dflt.split("+");w.splice(w.indexOf("name"),1),x=w.join("+")}return t.coerce(p,m,_,"hoverinfo",x)},t.coerceSelectionMarkerOpacity=function(p,m){if(p.marker){var y=p.marker.opacity;if(y!==void 0){var b,_;!u(y)&&!p.selected&&!p.unselected&&(b=y,_=l*y),m("selected.marker.opacity",b),m("unselected.marker.opacity",_)}}};function d(p,m){var y=t.valObjectMeta[m.valType];if(m.arrayOk&&u(p))return!0;if(y.validateFunction)return y.validateFunction(p,m);var b={},_=b,g={set:function(x){_=x}};return y.coerceFunction(p,g,b,m),_!==b}t.validate=d})(i_);var c_={},u_={exports:{}},v_={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","map"],extras:[!0,!1],dflt:"gl3d+geo+map",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo, mapbox and map 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, mapbox and map) 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."].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/un/",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."},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(" ")}},d_={};function h_(t,e){for(var r in t){var a=t[r];a.valType?e[r]=a.dflt:(e[r]||(e[r]={}),h_(a,e[r]))}}h_(v_,d_);var Go={configAttributes:v_,dfltConfig:d_},Du=bt,rS=kt,il=[],p_=function(t,e){if(il.indexOf(t)!==-1)return;il.push(t);var r=1e3;rS(e)?r=e:e==="long"&&(r=3e3);var a=Du.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(il);function n(o){o.duration(700).style("opacity",0).each("end",function(l){var s=il.indexOf(l);s!==-1&&il.splice(s,1),Du.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=Du.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)})},Lo=Go.dfltConfig,Oh=p_,jh=u_.exports={};jh.log=function(){var t;if(Lo.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Lo.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Oh(r.join("<br>"),"long")}};jh.warn=function(){var t;if(Lo.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Lo.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Oh(r.join("<br>"),"stick")}};jh.error=function(){var t;if(Lo.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(Lo.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Oh(r.join("<br>"),"stick")}};var Uo=u_.exports,ot={},Bh=function(){},m_=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},Hc={};(function(t){var e=B1;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]]]}})(Hc);var aS=bt,_m=Uo,iS=Hc,nS=B1;function oS(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 lS(t){var e=aS.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")}function y_(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function sS(t,e){g_("global",t,e)}function g_(t,e,r){var a="plotly.js-style-"+t,i=document.getElementById(a);if(!(i&&i.matches(".no-inline-styles"))){i||(i=document.createElement("style"),i.setAttribute("id",a),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var n=i.sheet;n?n.insertRule?n.insertRule(e+"{"+r+"}",0):n.addRule?n.addRule(e,r,0):_m.warn("addStyleRule failed"):_m.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function fS(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&y_(r)}function cS(t,e,r,a,i,n){var o=a.split(":"),l=i.split(":"),s="data-btn-style-event-added";n||(n=document),n.querySelectorAll(t).forEach(function(f){f.getAttribute(s)||(f.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),f.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(e&&this.matches(e)?c.style[o[0]]=o[1]:c.style[l[0]]=l[1])}),f.setAttribute(s,!0))})}function uS(t){var e=x_(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=b_(a);if(i){var n=iS.convertCssMatrix(i);r=nS.multiply(r,r,n)}}),r}function b_(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 x_(t){for(var e=[];vS(t);)e.push(t),t=t.parentNode,typeof ShadowRoot=="function"&&t instanceof ShadowRoot&&(t=t.host);return e}function vS(t){return t&&(t instanceof Element||t instanceof HTMLElement)}function dS(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}var Oc={getGraphDiv:oS,isPlotDiv:lS,removeElement:y_,addStyleRule:sS,addRelatedStyleRule:g_,deleteRelatedStyleRule:fS,setStyleOnHover:cS,getFullTransformMatrix:uS,getElementTransformMatrix:b_,getElementAndAncestors:x_,equalDomRects:dS},jc={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(" ")}}},__=Yt.extendFlat,hS=Dn,w_={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(" ")},T_={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(" ")},pS=w_.flags.slice().concat(["fullReplot"]),mS=T_.flags.slice().concat("layoutReplot"),Ja={traces:w_,layout:T_,traceFlags:function(){return wm(pS)},layoutFlags:function(){return wm(mS)},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:k_};function wm(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function k_(t,e,r){var a=__({},t);for(var i in a){var n=a[i];hS(n)&&(a[i]=A_(n,e,r,i))}return r==="from-root"&&(a.editType=e),a}function A_(t,e,r,a){if(t.valType){var i=__({},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]=A_(t.items[n],e)}return i}else return k_(t,e,a.charAt(0)==="_"?"nested":"from-root")}var ta={};ta.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(" ")};ta.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(" ")},path:{valType:"string",arrayOk:!0,editType:"style",description:["Sets a custom path for pattern fill.","Use with no `shape` or `solidity`, provide an SVG path string for","the regions of the square from (0,0) to (`size`,`size`) to color."].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 Sr={},M_={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"},S_=M_,L_=S_.FORMAT_LINK,C_=S_.DATE_FORMAT_LINK;function Gh(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}".`,L_,"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}".`,C_,"for details on the date formatting syntax."].join(" ")}Sr.templateFormatStringDescription=Gh;function yS(){return["Variables are inserted using %{variable},",'for example "x0: %{x0}".',`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{x0:$.2f}". See`,L_,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{x0|%m %b %Y}". See`,C_,"for details on the date formatting syntax.","A single multiplication or division operation may be applied to numeric variables, and combined with",'d3 number formatting, for example "Length in cm: %{x0*2.54}", "%{slope*60:.1f} meters per second."',"For log axes, variable values are given in log units.","For date axes, x/y coordinate variables and center variables use datetimes, while all other variable values use values in ms."].join(" ")}function Uh(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=e+"variable "+a[0]:e=e+"variables "+a.slice(0,-1).join(", ")+" and "+a.slice(-1)+"."}return e}Sr.hovertemplateAttrs=function(t,e){t=t||{},e=e||{};var r=Uh(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`.",Gh({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};Sr.texttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=Uh(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`.",Gh(),"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};Sr.shapeTexttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=t.newshape?"new ":"",a=Uh(e),i={valType:"string",dflt:"",editType:t.editType||"arraydraw",description:["Template string used for rendering the "+r+"shape's label.","Note that this will override `text`.",yS(),a].join(" ")};return i};function Ii(t,e){return e?e.d2l(t):t}function D_(t,e){return e?e.l2d(t):t}function gS(t){return t.x0}function bS(t){return t.x1}function xS(t){return t.y0}function _S(t){return t.y1}function P_(t){return t.x0shift||0}function E_(t){return t.x1shift||0}function z_(t){return t.y0shift||0}function R_(t){return t.y1shift||0}function Bc(t,e){return Ii(t.x1,e)+E_(t)-Ii(t.x0,e)-P_(t)}function Gc(t,e,r){return Ii(t.y1,r)+R_(t)-Ii(t.y0,r)-z_(t)}function wS(t,e){return Math.abs(Bc(t,e))}function TS(t,e,r){return Math.abs(Gc(t,e,r))}function kS(t,e,r){return t.type!=="line"?void 0:Math.sqrt(Math.pow(Bc(t,e),2)+Math.pow(Gc(t,e,r),2))}function AS(t,e){return D_((Ii(t.x1,e)+E_(t)+Ii(t.x0,e)+P_(t))/2,e)}function MS(t,e,r){return D_((Ii(t.y1,r)+R_(t)+Ii(t.y0,r)+z_(t))/2,r)}function SS(t,e,r){return t.type!=="line"?void 0:Gc(t,e,r)/Bc(t,e)}var Vh={x0:gS,x1:bS,y0:xS,y1:_S,slope:SS,dx:Bc,dy:Gc,width:wS,height:TS,length:kS,xcenter:AS,ycenter:MS},LS=Ja.overrideAll,qi=_a,Tm=Mr,CS=ta.dash,bi=Yt.extendFlat,DS=Sr.shapeTexttemplateAttrs,PS=Vh,ES=LS({newshape:{visible:bi({},qi.visible,{description:["Determines whether or not new shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,description:["Determines whether or not new","shape is shown in the legend."].join(" ")},legend:bi({},qi.legend,{description:["Sets the reference to a legend to show new shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:bi({},qi.legendgroup,{description:["Sets the legend group for new shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:bi({},qi.legendgrouptitle.text,{}),font:Tm({description:["Sets this legend group's title font."].join(" ")})},legendrank:bi({},qi.legendrank,{description:["Sets the legend rank for new shape.","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:bi({},qi.legendwidth,{description:"Sets the width (in px or fraction) of the legend for new shape."}),line:{color:{valType:"color",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,description:"Sets the line width (in px)."},dash:bi({},CS,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",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",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,description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",description:["Specifies whether new shapes are drawn below gridlines (*below*),","between gridlines and traces (*between*) or above traces (*above*)."].join(" ")},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",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(" ")},name:bi({},qi.name,{description:["Sets new shape name.","The name appears as the legend item."].join(" ")}),label:{text:{valType:"string",dflt:"",description:["Sets the text to display with the new shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:DS({newshape:!0},{keys:Object.keys(PS)}),font:Tm({description:"Sets the new shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],description:["Sets the position of the label text relative to the new shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","new shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","new shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,description:"Sets padding (in px) between edge of label and edge of new shape."}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,description:"Sets the opacity of the active shape."}}},"none","from-root"),zS=ta.dash,RS=Yt.extendFlat,IS={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:RS({},zS,{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}},zd=Mr,FS=jc,Ef=Or,km=ES,Am=IS,NS=Wh,Mm=Yt.extendFlat,Uc=zd({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});Uc.family.dflt='"Open Sans", verdana, arial, sans-serif';Uc.size.dflt=12;Uc.color.dflt=Ef.defaultLine;var ys={font:Uc,title:{text:{valType:"string",editType:"layoutstyle",description:"Sets the plot's title."},font:zd({editType:"layoutstyle",description:"Sets the title font."}),subtitle:{text:{valType:"string",editType:"layoutstyle",description:"Sets the plot's subtitle."},font:zd({editType:"layoutstyle",description:"Sets the subtitle font."}),editType:"layoutstyle"},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:Mm(NS({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(" ")}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether the title can automatically push the figure margins.","If `yref='paper'` then the margin will expand to ensure that the title doesn’t","overlap with the edges of the container. If `yref='container'` then the margins","will ensure that the title doesn’t overlap with the plot area, tick labels,","and axis titles. If `automargin=true` and the margins need to be expanded,","then y will be set to a default 1 and yanchor will be set to an appropriate","default to ensure that minimal margin space is needed. Note that when `yref='paper'`,","only 1 or 0 are allowed y values. Invalid values will be reset to the default 1."].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:Ef.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:Ef.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:Ef.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:km.newshape,activeshape:km.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:Mm({},FS.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"})};(function(t){var e=Uo,r=Bh,a=m_,i=Dn,n=Oc.addStyleRule,o=Yt,l=_a,s=ys,f=o.extendFlat,c=o.extendDeepAll;t.modules={},t.allCategories={},t.allTypes=[],t.subplotsRegistry={},t.componentsRegistry={},t.layoutArrayContainers=[],t.layoutArrayRegexes=[],t.traceLayoutAttributes={},t.localeRegistry={},t.apiMethodRegistry={},t.collectableSubplotTypes=null,t.register=function(x){if(t.collectableSubplotTypes=null,x)x&&!Array.isArray(x)&&(x=[x]);else throw new Error("No argument passed to Plotly.register.");for(var w=0;w<x.length;w++){var T=x[w];if(!T)throw new Error("Invalid module was attempted to be registered!");switch(T.moduleType){case"trace":u(T);break;case"transform":d(T);break;case"component":h(T);break;case"locale":p(T);break;case"apiMethod":var A=T.name;t.apiMethodRegistry[A]=T.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},t.getModule=function(g){var x=t.modules[_(g)];return x?x._module:!1},t.traceIs=function(g,x){if(g=_(g),g==="various")return!1;var w=t.modules[g];return w||(g&&e.log("Unrecognized trace type "+g+"."),w=t.modules[l.type.dflt]),!!w.categories[x]},t.getComponentMethod=function(g,x){var w=t.componentsRegistry[g];return w&&w[x]||r},t.call=function(){var g=arguments[0],x=[].slice.call(arguments,1);return t.apiMethodRegistry[g].apply(null,x)};function u(g){var x=g.name,w=g.categories,T=g.meta;if(t.modules[x]){e.log("Type "+x+" already registered");return}t.subplotsRegistry[g.basePlotModule.name]||v(g.basePlotModule);for(var A={},M=0;M<w.length;M++)A[w[M]]=!0,t.allCategories[w[M]]=!0;t.modules[x]={_module:g,categories:A},T&&Object.keys(T).length&&(t.modules[x].meta=T),t.allTypes.push(x);for(var S in t.componentsRegistry)y(S,x);g.layoutAttributes&&f(t.traceLayoutAttributes,g.layoutAttributes);var L=g.basePlotModule,z=L.name;if(z==="mapbox"){var N=L.constants.styleRules;for(var $ in N)n(".js-plotly-plot .plotly .mapboxgl-"+$,N[$])}(z==="geo"||z==="mapbox"||z==="map")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function v(g){var x=g.name;if(t.subplotsRegistry[x]){e.log("Plot type "+x+" already registered.");return}m(g),t.subplotsRegistry[x]=g;for(var w in t.componentsRegistry)b(w,g.name)}function h(g){if(typeof g.name!="string")throw new Error("Component module *name* must be a string.");var x=g.name;t.componentsRegistry[x]=g,g.layoutAttributes&&(g.layoutAttributes._isLinkedToArray&&a(t.layoutArrayContainers,x),m(g));for(var w in t.modules)y(x,w);for(var T in t.subplotsRegistry)b(x,T);g.schema&&g.schema.layout&&c(s,g.schema.layout)}function d(g){if(typeof g.name!="string")throw new Error("Transform module *name* must be a string.");var x="Transform module "+g.name,w=typeof g.transform=="function",T=typeof g.calcTransform=="function";if(!w&&!T)throw new Error(x+" is missing a *transform* or *calcTransform* method.");w&&T&&e.log([x+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),i(g.attributes)||e.log(x+" registered without an *attributes* object."),typeof g.supplyDefaults!="function"&&e.log(x+" registered without a *supplyDefaults* method.")}function p(g){var x=g.name,w=x.split("-")[0],T=g.dictionary,A=g.format,M=T&&Object.keys(T).length,S=A&&Object.keys(A).length,L=t.localeRegistry,z=L[x];if(z||(L[x]=z={}),w!==x){var N=L[w];N||(L[w]=N={}),M&&N.dictionary===z.dictionary&&(N.dictionary=T),S&&N.format===z.format&&(N.format=A)}M&&(z.dictionary=T),S&&(z.format=A)}function m(g){if(g.layoutAttributes){var x=g.layoutAttributes._arrayAttrRegexps;if(x)for(var w=0;w<x.length;w++)a(t.layoutArrayRegexes,x[w])}}function y(g,x){var w=t.componentsRegistry[g].schema;if(!(!w||!w.traces)){var T=w.traces[x];T&&c(t.modules[x]._module.attributes,T)}}function b(g,x){var w=t.componentsRegistry[g].schema;if(!(!w||!w.subplots)){var T=t.subplotsRegistry[x],A=T.layoutAttributes,M=T.attr==="subplot"?T.name:T.attr;Array.isArray(M)&&(M=M[0]);var S=w.subplots[M];A&&S&&c(A,S)}}function _(g){return typeof g=="object"&&(g=g.type),g}})(ot);(function(t){var e=Vl.timeFormat,r=kt,a=Uo,i=ds.mod,n=cr,o=n.BADNUM,l=n.ONEDAY,s=n.ONEHOUR,f=n.ONEMIN,c=n.ONESEC,u=n.EPOCHJD,v=ot,h=Vl.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,m=new Date().getFullYear()-70;function y(D){return D&&v.componentsRegistry.calendars&&typeof D=="string"&&D!=="gregorian"}t.dateTick0=function(D,P){var k=b(D,!!P);if(P<2)return k;var C=t.dateTime2ms(k,D);return C+=l*(P-1),t.ms2DateTime(C,0,D)};function b(D,P){return y(D)?P?v.getComponentMethod("calendars","CANONICAL_SUNDAY")[D]:v.getComponentMethod("calendars","CANONICAL_TICK")[D]:P?"2000-01-02":"2000-01-01"}t.dfltRange=function(D){return y(D)?v.getComponentMethod("calendars","DFLTRANGE")[D]:["2000-01-01","2001-01-01"]},t.isJSDate=function(D){return typeof D=="object"&&D!==null&&typeof D.getTime=="function"};var _,g;t.dateTime2ms=function(D,P){if(t.isJSDate(D)){var k=D.getTimezoneOffset()*f,C=(D.getUTCMinutes()-D.getMinutes())*f+(D.getUTCSeconds()-D.getSeconds())*c+(D.getUTCMilliseconds()-D.getMilliseconds());if(C){var E=3*f;k=k-E/2+i(C-k+E/2,E)}return D=Number(D)-k,D>=_&&D<=g?D:o}if(typeof D!="string"&&typeof D!="number")return o;D=String(D);var I=y(P),j=D.charAt(0);I&&(j==="G"||j==="g")&&(D=D.substr(1),P="");var G=I&&P.substr(0,7)==="chinese",X=D.match(G?p:d);if(!X)return o;var O=X[1],Z=X[3]||"1",V=Number(X[5]||1),q=Number(X[7]||0),B=Number(X[9]||0),J=Number(X[11]||0);if(I){if(O.length===2)return o;O=Number(O);var ie;try{var de=v.getComponentMethod("calendars","getCal")(P);if(G){var oe=Z.charAt(Z.length-1)==="i";Z=parseInt(Z,10),ie=de.newDate(O,de.toMonthIndex(O,Z,oe),V)}else ie=de.newDate(O,Number(Z),V)}catch{return o}return ie?(ie.toJD()-u)*l+q*s+B*f+J*c:o}O.length===2?O=(Number(O)+2e3-m)%100+m:O=Number(O),Z-=1;var Y=new Date(Date.UTC(2e3,Z,V,q,B));return Y.setUTCFullYear(O),Y.getUTCMonth()!==Z||Y.getUTCDate()!==V?o:Y.getTime()+J*c},_=t.MIN_MS=t.dateTime2ms("-9999"),g=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(D,P){return t.dateTime2ms(D,P)!==o};function x(D,P){return String(D+Math.pow(10,P)).substr(1)}var w=90*l,T=3*s,A=5*f;t.ms2DateTime=function(D,P,k){if(typeof D!="number"||!(D>=_&&D<=g))return o;P||(P=0);var C=Math.floor(i(D+.05,1)*10),E=Math.round(D-C/10),I,j,G,X,O,Z;if(y(k)){var V=Math.floor(E/l)+u,q=Math.floor(i(D,l));try{I=v.getComponentMethod("calendars","getCal")(k).fromJD(V).formatDate("yyyy-mm-dd")}catch{I=h("G%Y-%m-%d")(new Date(E))}if(I.charAt(0)==="-")for(;I.length<11;)I="-0"+I.substr(1);else for(;I.length<10;)I="0"+I;j=P<w?Math.floor(q/s):0,G=P<w?Math.floor(q%s/f):0,X=P<T?Math.floor(q%f/c):0,O=P<A?q%c*10+C:0}else Z=new Date(E),I=h("%Y-%m-%d")(Z),j=P<w?Z.getUTCHours():0,G=P<w?Z.getUTCMinutes():0,X=P<T?Z.getUTCSeconds():0,O=P<A?Z.getUTCMilliseconds()*10+C:0;return M(I,j,G,X,O)},t.ms2DateTimeLocal=function(D){if(!(D>=_+l&&D<=g-l))return o;var P=Math.floor(i(D+.05,1)*10),k=new Date(Math.round(D-P/10)),C=e("%Y-%m-%d")(k),E=k.getHours(),I=k.getMinutes(),j=k.getSeconds(),G=k.getUTCMilliseconds()*10+P;return M(C,E,I,j,G)};function M(D,P,k,C,E){if((P||k||C||E)&&(D+=" "+x(P,2)+":"+x(k,2),(C||E)&&(D+=":"+x(C,2),E))){for(var I=4;E%10===0;)I-=1,E/=10;D+="."+x(E,I)}return D}t.cleanDate=function(D,P,k){if(D===o)return P;if(t.isJSDate(D)||typeof D=="number"&&isFinite(D)){if(y(k))return a.error("JS Dates and milliseconds are incompatible with world calendars",D),P;if(D=t.ms2DateTimeLocal(+D),!D&&P!==void 0)return P}else if(!t.isDateTime(D,k))return a.error("unrecognized date",D),P;return D};var S=/%\d?f/g,L=/%h/g,z={1:"1",2:"1",3:"2",4:"2"};function N(D,P,k,C){D=D.replace(S,function(I){var j=Math.min(+I.charAt(1)||6,6),G=(P/1e3%1+2).toFixed(j).substr(2).replace(/0+$/,"")||"0";return G});var E=new Date(Math.floor(P+.05));if(D=D.replace(L,function(){return z[k("%q")(E)]}),y(C))try{D=v.getComponentMethod("calendars","worldCalFmt")(D,P,C)}catch{return"Invalid"}return k(D)(E)}var $=[59,59.9,59.99,59.999,59.9999];function R(D,P){var k=i(D+.05,l),C=x(Math.floor(k/s),2)+":"+x(i(Math.floor(k/f),60),2);if(P!=="M"){r(P)||(P=0);var E=Math.min(i(D/c,60),$[P]),I=(100+E).toFixed(P).substr(1);P>0&&(I=I.replace(/0+$/,"").replace(/[\.]$/,"")),C+=":"+I}return C}t.formatDate=function(D,P,k,C,E,I){if(E=y(E)&&E,!P)if(k==="y")P=I.year;else if(k==="m")P=I.month;else if(k==="d")P=I.dayMonth+`
|
|
2
|
-
`+I.year;else return R(D,k)+`
|
|
3
|
-
`+N(I.dayMonthYear,D,C,E);return N(P,D,C,E)};var H=3*l;t.incrementMonth=function(D,P,k){k=y(k)&&k;var C=i(D,l);if(D=Math.round(D-C),k)try{var E=Math.round(D/l)+u,I=v.getComponentMethod("calendars","getCal")(k),j=I.fromJD(E);return P%12?I.add(j,P,"m"):I.add(j,P/12,"y"),(j.toJD()-u)*l+C}catch{a.error("invalid ms "+D+" in calendar "+k)}var G=new Date(D+H);return G.setUTCMonth(G.getUTCMonth()+P)+C-H},t.findExactDates=function(D,P){for(var k=0,C=0,E=0,I=0,j,G,X=y(P)&&v.getComponentMethod("calendars","getCal")(P),O=0;O<D.length;O++){if(G=D[O],!r(G)){I++;continue}if(!(G%l))if(X)try{j=X.fromJD(G/l+u),j.day()===1?j.month()===1?k++:C++:E++}catch{}else j=new Date(G),j.getUTCDate()===1?j.getUTCMonth()===0?k++:C++:E++}C+=k,E+=C;var Z=D.length-I;return{exactYears:k/Z,exactMonths:C/Z,exactDays:E/Z}}})(c_);var Xh={},I_=function(e){return e};(function(t){var e=kt,r=Uo,a=I_,i=cr.BADNUM,n=1e-9;t.findBin=function(c,u,v){if(e(u.start))return v?Math.ceil((c-u.start)/u.size-n)-1:Math.floor((c-u.start)/u.size+n);var h=0,d=u.length,p=0,m=d>1?(u[d-1]-u[0])/(d-1):1,y,b;for(m>=0?b=v?o:l:b=v?f:s,c+=m*n*(v?-1:1)*(m>=0?1:-1);h<d&&p++<100;)y=Math.floor((h+d)/2),b(u[y],c)?h=y+1:d=y;return p>90&&r.log("Long binary search..."),h-1};function o(c,u){return c<u}function l(c,u){return c<=u}function s(c,u){return c>u}function f(c,u){return c>=u}t.sorterAsc=function(c,u){return c-u},t.sorterDes=function(c,u){return u-c},t.distinctVals=function(c){var u=c.slice();u.sort(t.sorterAsc);var v;for(v=u.length-1;v>-1&&u[v]===i;v--);for(var h=u[v]-u[0]||1,d=h/(v||1)/1e4,p=[],m,y=0;y<=v;y++){var b=u[y],_=b-m;m===void 0?(p.push(b),m=b):_>d&&(h=Math.min(h,_),p.push(b),m=b)}return{vals:p,minDiff:h}},t.roundUp=function(c,u,v){for(var h=0,d=u.length-1,p,m=0,y=v?0:1,b=v?1:0,_=v?Math.ceil:Math.floor;h<d&&m++<100;)p=_((h+d)/2),u[p]<=c?h=p+y:d=p-b;return u[h]},t.sort=function(c,u){for(var v=0,h=0,d=1;d<c.length;d++){var p=u(c[d],c[d-1]);if(p<0?v=1:p>0&&(h=1),v&&h)return c.sort(u)}return h?c:c.reverse()},t.findIndexOfMin=function(c,u){u=u||a;for(var v=1/0,h,d=0;d<c.length;d++){var p=u(c[d]);p<v&&(v=p,h=d)}return h}})(Xh);var Yh=function(e){return Object.keys(e).sort()},F_={};(function(t){var e=kt,r=fr.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.geometricMean=function(a,i){return i||(i=t.len(a)),Math.pow(t.aggNums(function(n,o){return n*o},1,a),1/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)]}})(F_);var N_=ds,Pu=N_.mod,$S=N_.modHalf,Wl=Math.PI,Ci=2*Wl;function HS(t){return t/180*Wl}function OS(t){return t/Wl*180}function qh(t){return Math.abs(t[1]-t[0])>Ci-1e-14}function $_(t,e){return $S(e-t,Ci)}function jS(t,e){return Math.abs($_(t,e))}function H_(t,e){if(qh(e))return!0;var r,a;e[0]<e[1]?(r=e[0],a=e[1]):(r=e[1],a=e[0]),r=Pu(r,Ci),a=Pu(a,Ci),r>a&&(a+=Ci);var i=Pu(t,Ci),n=i+Ci;return i>=r&&i<=a||n>=r&&n<=a}function BS(t,e,r,a){if(!H_(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 Zh(t,e,r,a,i,n,o){i=i||0,n=n||0;var l=qh([r,a]),s,f,c,u,v;l?(s=0,f=Wl,c=Ci):r<a?(s=r,c=a):(s=a,c=r),t<e?(u=t,v=e):(u=e,v=t);function h(y,b){return[y*Math.cos(b)+i,n-y*Math.sin(b)]}var d=Math.abs(c-s)<=Wl?0:1;function p(y,b,_){return"A"+[y,y]+" "+[0,d,_]+" "+h(y,b)}var m;return l?u===null?m="M"+h(v,s)+p(v,f,0)+p(v,c,0)+"Z":m="M"+h(u,s)+p(u,f,0)+p(u,c,0)+"ZM"+h(v,s)+p(v,f,1)+p(v,c,1)+"Z":u===null?(m="M"+h(v,s)+p(v,c,0),o&&(m+="L0,0Z")):m="M"+h(u,s)+"L"+h(v,s)+p(v,c,0)+"L"+h(u,c)+p(u,s,1)+"Z",m}function GS(t,e,r,a,i){return Zh(null,t,e,r,a,i,0)}function US(t,e,r,a,i){return Zh(null,t,e,r,a,i,1)}function VS(t,e,r,a,i,n){return Zh(t,e,r,a,i,n,1)}var WS={deg2rad:HS,rad2deg:OS,angleDelta:$_,angleDist:jS,isFullCircle:qh,isAngleInsideSector:H_,isPtInsideSector:BS,pathArc:GS,pathSector:US,pathAnnulus:VS},Pn={};Pn.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=1/3};Pn.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>1/3&&e.x<2/3};Pn.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=2/3};Pn.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=2/3};Pn.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>1/3&&e.y<2/3};Pn.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=1/3};var En={},Eu=ds.mod;En.segmentsIntersect=O_;function O_(t,e,r,a,i,n,o,l){var s=r-t,f=i-t,c=o-i,u=a-e,v=n-e,h=l-n,d=s*h-c*u;if(d===0)return null;var p=(f*h-c*v)/d,m=(f*u-s*v)/d;return m<0||m>1||p<0||p>1?null:{x:t+s*p,y:e+u*p}}En.segmentDistance=function(e,r,a,i,n,o,l,s){if(O_(e,r,a,i,n,o,l,s))return 0;var f=a-e,c=i-r,u=l-n,v=s-o,h=f*f+c*c,d=u*u+v*v,p=Math.min(Ps(f,c,h,n-e,o-r),Ps(f,c,h,l-e,s-r),Ps(u,v,d,e-n,r-o),Ps(u,v,d,a-n,i-o));return Math.sqrt(p)};function Ps(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 Es,Rd,Sm;En.getTextLocation=function(e,r,a,i){if((e!==Rd||i!==Sm)&&(Es={},Rd=e,Sm=i),Es[a])return Es[a];var n=e.getPointAtLength(Eu(a-i/2,r)),o=e.getPointAtLength(Eu(a+i/2,r)),l=Math.atan((o.y-n.y)/(o.x-n.x)),s=e.getPointAtLength(Eu(a,r)),f=(s.x*4+n.x+o.x)/6,c=(s.y*4+n.y+o.y)/6,u={x:f,y:c,theta:l};return Es[a]=u,u};En.clearLocationCache=function(){Rd=null};En.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,u,v;function h(p){var m=e.getPointAtLength(p);p===0?u=m:p===f&&(v=m);var y=m.x<i?i-m.x:m.x>n?m.x-n:0,b=m.y<o?o-m.y:m.y>l?m.y-l:0;return Math.sqrt(y*y+b*b)}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(u.x-v.x)<.1&&Math.abs(u.y-v.y)<.1}};En.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,u=n,v,h,d;f<l;){if(v=(c+u)/2,h=e.getPointAtLength(v),d=h[a]-r,Math.abs(d)<o)return h;s*d>0?u=v:c=v,f++}return h};var Vc={};(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)}})(Vc);var XS=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)},YS=kt,qS=hM,ZS=function(e){var r;if(e&&e.hasOwnProperty("userAgent")?r=e.userAgent:r=KS(),typeof r!="string")return!0;var a=qS({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(YS(f)&&(f=+f),f>=13)return!0}}}return a};function KS(){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 QS=bt,JS=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]=QS.select(this)}),i},eL=ot,tL=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=eL.localeRegistry}var f=a.split("-")[0];if(f===a)break;a=f}return r},rL=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},aL=function(e){for(var r=oL(e)?nL:iL,a=[],i=0;i<e.length;i++){var n=e[i];r(n)&&a.push(n)}return a};function iL(t){return t.visible===!0}function nL(t){var e=t[0].trace;return e.visible===!0&&e._length!==0}function oL(t){return Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace}var lL=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},sL=kt,fL=cr.BADNUM,cL=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,uL=function(e){return typeof e=="string"&&(e=e.replace(cL,"")),sL(e)?Number(e):fL},Dl=bt,vL=Vl.utcFormat,dL=G1.format,j_=kt,B_=cr,G_=B_.FP_SAFE,hL=-G_,Lm=B_.BADNUM,re=K1.exports={};re.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 Cm={};re.warnBadFormat=function(t){var e=String(t);Cm[e]||(Cm[e]=1,re.warn('encountered bad format: "'+e+'"'))};re.noFormat=function(t){return String(t)};re.numberFormat=function(t){var e;try{e=dL(re.adjustFormat(t))}catch{return re.warnBadFormat(t),re.noFormat}return e};re.nestedProperty=Nh;re.keyedContainer=$M;re.relativeAttr=jM;re.isPlainObject=Dn;re.toLogRange=$h;re.relinkPrivateKeys=GM;var Hi=fr;re.isArrayBuffer=Hi.isArrayBuffer;re.isTypedArray=Hi.isTypedArray;re.isArrayOrTypedArray=Hi.isArrayOrTypedArray;re.isArray1D=Hi.isArray1D;re.ensureArray=Hi.ensureArray;re.concat=Hi.concat;re.maxRowLength=Hi.maxRowLength;re.minRowLength=Hi.minRowLength;var U_=ds;re.mod=U_.mod;re.modHalf=U_.modHalf;var Oi=i_;re.valObjectMeta=Oi.valObjectMeta;re.coerce=Oi.coerce;re.coerce2=Oi.coerce2;re.coerceFont=Oi.coerceFont;re.coercePattern=Oi.coercePattern;re.coerceHoverinfo=Oi.coerceHoverinfo;re.coerceSelectionMarkerOpacity=Oi.coerceSelectionMarkerOpacity;re.validate=Oi.validate;var ca=c_;re.dateTime2ms=ca.dateTime2ms;re.isDateTime=ca.isDateTime;re.ms2DateTime=ca.ms2DateTime;re.ms2DateTimeLocal=ca.ms2DateTimeLocal;re.cleanDate=ca.cleanDate;re.isJSDate=ca.isJSDate;re.formatDate=ca.formatDate;re.incrementMonth=ca.incrementMonth;re.dateTick0=ca.dateTick0;re.dfltRange=ca.dfltRange;re.findExactDates=ca.findExactDates;re.MIN_MS=ca.MIN_MS;re.MAX_MS=ca.MAX_MS;var zn=Xh;re.findBin=zn.findBin;re.sorterAsc=zn.sorterAsc;re.sorterDes=zn.sorterDes;re.distinctVals=zn.distinctVals;re.roundUp=zn.roundUp;re.sort=zn.sort;re.findIndexOfMin=zn.findIndexOfMin;re.sortObjectKeys=Yh;var di=F_;re.aggNums=di.aggNums;re.len=di.len;re.mean=di.mean;re.geometricMean=di.geometricMean;re.median=di.median;re.midRange=di.midRange;re.variance=di.variance;re.stdev=di.stdev;re.interp=di.interp;var Ha=Hc;re.init2dArray=Ha.init2dArray;re.transposeRagged=Ha.transposeRagged;re.dot=Ha.dot;re.translationMatrix=Ha.translationMatrix;re.rotationMatrix=Ha.rotationMatrix;re.rotationXYMatrix=Ha.rotationXYMatrix;re.apply3DTransform=Ha.apply3DTransform;re.apply2DTransform=Ha.apply2DTransform;re.apply2DTransform2=Ha.apply2DTransform2;re.convertCssMatrix=Ha.convertCssMatrix;re.inverseTransformMatrix=Ha.inverseTransformMatrix;var ei=WS;re.deg2rad=ei.deg2rad;re.rad2deg=ei.rad2deg;re.angleDelta=ei.angleDelta;re.angleDist=ei.angleDist;re.isFullCircle=ei.isFullCircle;re.isAngleInsideSector=ei.isAngleInsideSector;re.isPtInsideSector=ei.isPtInsideSector;re.pathArc=ei.pathArc;re.pathSector=ei.pathSector;re.pathAnnulus=ei.pathAnnulus;var Vo=Pn;re.isLeftAnchor=Vo.isLeftAnchor;re.isCenterAnchor=Vo.isCenterAnchor;re.isRightAnchor=Vo.isRightAnchor;re.isTopAnchor=Vo.isTopAnchor;re.isMiddleAnchor=Vo.isMiddleAnchor;re.isBottomAnchor=Vo.isBottomAnchor;var Wo=En;re.segmentsIntersect=Wo.segmentsIntersect;re.segmentDistance=Wo.segmentDistance;re.getTextLocation=Wo.getTextLocation;re.clearLocationCache=Wo.clearLocationCache;re.getVisibleSegment=Wo.getVisibleSegment;re.findPointOnPath=Wo.findPointOnPath;var Wc=Yt;re.extendFlat=Wc.extendFlat;re.extendDeep=Wc.extendDeep;re.extendDeepAll=Wc.extendDeepAll;re.extendDeepNoArrays=Wc.extendDeepNoArrays;var Kh=Uo;re.log=Kh.log;re.warn=Kh.warn;re.error=Kh.error;var pL=Bo;re.counterRegex=pL.counter;var Qh=Vc;re.throttle=Qh.throttle;re.throttleDone=Qh.done;re.clearThrottle=Qh.clear;var Oa=Oc;re.getGraphDiv=Oa.getGraphDiv;re.isPlotDiv=Oa.isPlotDiv;re.removeElement=Oa.removeElement;re.addStyleRule=Oa.addStyleRule;re.addRelatedStyleRule=Oa.addRelatedStyleRule;re.deleteRelatedStyleRule=Oa.deleteRelatedStyleRule;re.setStyleOnHover=Oa.setStyleOnHover;re.getFullTransformMatrix=Oa.getFullTransformMatrix;re.getElementTransformMatrix=Oa.getElementTransformMatrix;re.getElementAndAncestors=Oa.getElementAndAncestors;re.equalDomRects=Oa.equalDomRects;re.clearResponsive=XS;re.preserveDrawingBuffer=ZS;re.makeTraceGroups=JS;re._=tL;re.notifier=p_;re.filterUnique=rL;re.filterVisible=aL;re.pushUnique=m_;re.increment=lL;re.cleanNumber=uL;re.ensureNumber=function(e){return j_(e)?(e=Number(e),e>G_||e<hL?Lm:e):Lm};re.isIndex=function(t,e){return e!==void 0&&t>=e?!1:j_(t)&&t>=0&&t%1===0};re.noop=Bh;re.identity=I_;re.repeat=function(t,e){for(var r=new Array(e),a=0;a<e;a++)r[a]=t;return r};re.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=re.nestedProperty(t,n.replace("?",r)),l=re.nestedProperty(t,n.replace("?",a)),s=o.get();o.set(l.get()),l.set(s)}};re.raiseToTop=function(e){e.parentNode.appendChild(e)};re.cancelTransition=function(t){return t.transition().duration(0)};re.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))};re.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};re.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};re.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 u=parseInt(o,a);return e&&e[o]||u!==1/0&&u>=Math.pow(2,r)?i>10?(re.warn("randstr failed uniqueness"),o):t(e,r,a,(i||0)+1):o};re.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};re.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};re.syncOrAsync=function(t,e,r){var a,i;function n(){return re.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)};re.stripTrailingSlash=function(t){return t.substr(-1)==="/"?t.substr(0,t.length-1):t};re.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]]}};re.mergeArray=function(t,e,r,a){var i=typeof a=="function";if(re.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}};re.mergeArrayCastPositive=function(t,e,r){return re.mergeArray(t,e,r,function(a){var i=+a;return isFinite(i)&&i>0?i:0})};re.fillArray=function(t,e,r,a){if(a=a||re.identity,re.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=a(t[i])};re.castOption=function(t,e,r,a){a=a||re.identity;var i=re.nestedProperty(t,r).get();return re.isArrayOrTypedArray(i)?Array.isArray(e)&&re.isArrayOrTypedArray(i[e[0]])?a(i[e[0]][e[1]]):a(i[e]):i};re.extractOption=function(t,e,r,a){if(r in t)return t[r];var i=re.nestedProperty(e,a).get();if(!Array.isArray(i))return i};function V_(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}re.tagSelected=function(t,e,r){var a=e.selectedpoints,i=e._indexToPoints,n;i&&(n=V_(i));function o(u){return u!==void 0&&u<t.length}for(var l=0;l<a.length;l++){var s=a[l];if(re.isIndex(s)||re.isArrayOrTypedArray(s)&&re.isIndex(s[0])&&re.isIndex(s[1])){var f=n?n[s]:s,c=r?r[f]:f;o(c)&&(t[c].selected=1)}}};re.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var a=V_(r),i=[],n=0;n<e.length;n++){var o=e[n];if(re.isIndex(o)){var l=a[o];re.isIndex(l)&&i.push(l)}}return i}else return e};re.getTargetArray=function(t,e){var r=e.target;if(typeof r=="string"&&r){var a=re.nestedProperty(t,r).get();return re.isArrayOrTypedArray(a)?a:!1}else if(re.isArrayOrTypedArray(r))return r;return!1};function W_(t,e,r){var a={};typeof e!="object"&&(e={});var i=r==="pieLike"?-1:3,n=Object.keys(t),o,l,s;for(o=0;o<n.length;o++)l=n[o],s=t[l],!(l.charAt(0)==="_"||typeof s=="function")&&(l==="module"?a[l]=s:Array.isArray(s)?l==="colorscale"||i===-1?a[l]=s.slice():a[l]=s.slice(0,i):re.isTypedArray(s)?i===-1?a[l]=s.subarray():a[l]=s.subarray(0,i):s&&typeof s=="object"?a[l]=W_(t[l],e[l],r):a[l]=s);for(n=Object.keys(e),o=0;o<n.length;o++)l=n[o],s=e[l],(typeof s!="object"||!(l in a)||typeof a[l]!="object")&&(a[l]=s);return a}re.minExtend=W_;re.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)};re.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(t.indexOf(e[r])!==-1)return!0;return!1};var mL=/Version\/[\d\.]+.*Safari/;re.isSafari=function(){return mL.test(window.navigator.userAgent)};var yL=/iPad|iPhone|iPod/;re.isIOS=function(){return yL.test(window.navigator.userAgent)};const gL=/Macintosh.+AppleWebKit.+Gecko\)$/;re.isMacWKWebView=()=>gL.test(window.navigator.userAgent);var bL=/Firefox\/(\d+)\.\d+/;re.getFirefoxVersion=function(){var t=bL.exec(window.navigator.userAgent);if(t&&t.length===2){var e=parseInt(t[1]);if(!isNaN(e))return e}return null};re.isD3Selection=function(t){return t instanceof Dl.selection};re.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};re.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};re.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 xL=/^([^\[\.]+)\.(.+)?/,_L=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function zs(t){return t.slice(0,2)==="__"}re.expandObjectPaths=function(t){var e,r,a,i,n,o,l;if(typeof t=="object"&&!Array.isArray(t)){for(r in t)if(t.hasOwnProperty(r))if(e=r.match(xL)){if(i=t[r],a=e[1],zs(a))continue;delete t[r],t[a]=re.extendDeepNoArrays(t[a]||{},re.objectFromPath(r,re.expandObjectPaths(i))[a])}else if(e=r.match(_L)){if(i=t[r],a=e[1],zs(a))continue;if(n=parseInt(e[2]),delete t[r],t[a]=t[a]||[],e[3]===".")l=e[4],o=t[a][n]=t[a][n]||{},re.extendDeepNoArrays(o,re.objectFromPath(l,re.expandObjectPaths(i)));else{if(zs(a))continue;t[a][n]=re.expandObjectPaths(i)}}else{if(zs(r))continue;t[r]=re.expandObjectPaths(t[r])}}return t};re.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};re.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var X_=/^\w*$/;re.templateString=function(t,e){var r={};return t.replace(re.TEMPLATE_STRING_REGEX,function(a,i){var n;return X_.test(i)?n=e[i]:(r[i]=r[i]||re.nestedProperty(e,i).get,n=r[i](!0)),n!==void 0?n:""})};var wL={max:10,count:0,name:"hovertemplate"};re.hovertemplateString=function(){return Jh.apply(wL,arguments)};var TL={max:10,count:0,name:"texttemplate"};re.texttemplateString=function(){return Jh.apply(TL,arguments)};var kL=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function AL(t){var e=t.match(kL);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}var ML={max:10,count:0,name:"texttemplate",parseMultDiv:!0};re.texttemplateStringForShapes=function(){return Jh.apply(ML,arguments)};var Dm=/^[:|\|]/;function Jh(t,e,r){var a=this,i=arguments;return e||(e={}),t.replace(re.TEMPLATE_STRING_REGEX,function(n,o,l){var s=o==="xother"||o==="yother",f=o==="_xother"||o==="_yother",c=o==="_xother_"||o==="_yother_",u=o==="xother_"||o==="yother_",v=s||f||u||c,h=o;(f||c)&&(h=h.substring(1)),(u||c)&&(h=h.substring(0,h.length-1));var d=null,p=null;if(a.parseMultDiv){var m=AL(h);h=m.key,d=m.op,p=m.number}var y;if(v){if(y=e[h],y===void 0)return""}else{var b,_;for(_=3;_<i.length;_++)if(b=i[_],!!b){if(b.hasOwnProperty(h)){y=b[h];break}if(X_.test(h)||(y=re.nestedProperty(b,h).get(!0)),y!==void 0)break}}if(y!==void 0&&(d==="*"&&(y*=p),d==="/"&&(y/=p)),y===void 0&&a)return a.count<a.max&&(re.warn("Variable '"+h+"' in "+a.name+" could not be found!"),y=n),a.count===a.max&&re.warn("Too many "+a.name+" warnings - additional warnings will be suppressed"),a.count++,n;if(l){var g;if(l[0]===":"&&(g=r?r.numberFormat:re.numberFormat,y!==""&&(y=g(l.replace(Dm,""))(y))),l[0]==="|"){g=r?r.timeFormat:vL;var x=re.dateTime2ms(y);y=re.formatDate(x,l.replace(Dm,""),!1,g)}}else{var w=h+"Label";e.hasOwnProperty(w)&&(y=e[w])}return v&&(y="("+y+")",(f||c)&&(y=" "+y),(u||c)&&(y=y+" ")),y})}var Rs=48,Pm=57;re.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>=Rs&&o<=Pm,f=l>=Rs&&l<=Pm;if(s&&(a=10*a+o-Rs),f&&(i=10*i+l-Rs),!s||!f){if(a!==i)return a-i;if(o!==l)return o-l}}return i-a};var lo=2e9;re.seedPseudoRandom=function(){lo=2e9};re.pseudoRandom=function(){var t=lo;return lo=(69069*lo+1)%4294967296,Math.abs(lo-t)<429496729?re.pseudoRandom():lo/4294967296};re.fillText=function(t,e,r){var a=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=re.extractOption(t,e,"htx","hovertext");if(re.isValidTextValue(i))return a(i);var n=re.extractOption(t,e,"tx","text");if(re.isValidTextValue(n))return a(n)};re.isValidTextValue=function(t){return t||t===0};re.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};re.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||e==="none"};re.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""};re.strRotate=function(t){return t?"rotate("+t+")":""};re.strScale=function(t){return t!==1?"scale("+t+")":""};re.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,re.strTranslate(i-f*(r+o),n-f*(a+l))+re.strScale(f)+(s?"rotate("+s+(e?"":" "+r+" "+a)+")":"")};re.setTransormAndDisplay=function(t,e){t.attr("transform",re.getTextTransform(e)),t.style("display",e.scale?null:"none")};re.ensureUniformFontSize=function(t,e){var r=re.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r};re.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)};re.bigFont=function(t){return Math.round(1.2*t)};var Em=re.getFirefoxVersion(),SL=Em!==null&&Em<86;re.getPositionFromD3Event=function(){return SL?[Dl.event.layerX,Dl.event.layerY]:[Dl.event.offsetX,Dl.event.offsetY]};var ke=K1.exports,LL=ke,zm={"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 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:focus-within .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-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","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 Rm in zm){var CL=Rm.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");LL.addStyleRule(CL,zm[Rm])}var qt={},ep={},zu=Eh.EventEmitter,DL={init:function(t){if(t._ev instanceof zu)return t;var e=new zu,r=new zu;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){e.emit(a,i),r.emit(a,i)},typeof t.addEventListener=="function"&&t.addEventListener("wheel",()=>{}),t},triggerHandler:function(t,e,r){var a,i=t._ev;if(!i)return;var n=i._events[e];if(!n)return;function o(s){if(s.listener){if(i.removeListener(e,s.listener),!s.fired)return s.fired=!0,s.listener.apply(i,[r])}else return s.apply(i,[r])}n=Array.isArray(n)?n:[n];var l;for(l=0;l<n.length-1;l++)o(n[l]);return a=o(n[l]),a},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}},gs=DL,Im=ke,PL=Go.dfltConfig;function EL(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)?Im.extendDeep([],a):Im.extendDeepAll({},a):r[i]=a;return r}var vi={};vi.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>PL.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)};vi.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0};vi.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1};vi.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++)vi.plotDo(e,r.undo.calls[a],r.undo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1}};vi.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++)vi.plotDo(e,r.redo.calls[a],r.redo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}};vi.plotDo=function(t,e,r){t.autoplay=!0,r=EL(t,r),e.apply(null,r)};var zL=vi,Xo={},Y_={_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(" ")}};(function(t){var e=ot,r=ke,a=_a,i=ys,n=Y_,o=jc,l=Go.configAttributes,s=Ja,f=r.extendDeepAll,c=r.isPlainObject,u=r.isArrayOrTypedArray,v=r.nestedProperty,h=r.valObjectMeta,d="_isSubplotObj",p="_isLinkedToArray",m="_arrayAttrRegexps",y="_deprecated",b=[d,p,m,y];t.IS_SUBPLOT_OBJ=d,t.IS_LINKED_TO_ARRAY=p,t.DEPRECATED=y,t.UNDERSCORE_ATTRS=b,t.get=function(){var R={};return e.allTypes.forEach(function(H){R[H]=w(H)}),{defs:{valObjects:h,metaKeys:b.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:R,layout:T(),frames:A(),animation:M(o),config:M(l)}},t.crawl=function(R,H,D,P){var k=D||0;P=P||"",Object.keys(R).forEach(function(C){var E=R[C];if(b.indexOf(C)===-1){var I=(P?P+".":"")+C;H(E,C,R,k,I),!t.isValObject(E)&&c(E)&&C!=="impliedEdits"&&t.crawl(E,H,k+1,I)}})},t.isValObject=function(R){return R&&R.valType!==void 0},t.findArrayAttributes=function(R){var H=[],D=[],P=[],k,C;function E(j,G,X,O){D=D.slice(0,O).concat([G]),P=P.slice(0,O).concat([j&&j._isLinkedToArray]);var Z=j&&(j.valType==="data_array"||j.arrayOk===!0)&&!(D[O-1]==="colorbar"&&(G==="ticktext"||G==="tickvals"));Z&&I(k,0,"")}function I(j,G,X){var O=j[D[G]],Z=X+D[G];if(G===D.length-1)u(O)&&H.push(C+Z);else if(P[G]){if(Array.isArray(O))for(var V=0;V<O.length;V++)c(O[V])&&I(O[V],G+1,Z+"["+V+"].")}else c(O)&&I(O,G+1,Z+".")}return k=R,C="",t.crawl(a,E),R._module&&R._module.attributes&&t.crawl(R._module.attributes,E),H},t.getTraceValObject=function(R,H){var D=H[0],P=1,k,C,E=R._module;if(E||(E=(e.modules[R.type||a.type.dflt]||{})._module),!E)return!1;if(k=E.attributes,C=k&&k[D],!C){var I=E.basePlotModule;I&&I.attributes&&(C=I.attributes[D])}return C||(C=a[D]),g(C,H,P)},t.getLayoutValObject=function(R,H){var D=_(R,H[0]);return g(D,H,1)};function _(R,H){var D,P,k,C,E=R._basePlotModules;if(E){var I;for(D=0;D<E.length;D++){if(k=E[D],k.attrRegex&&k.attrRegex.test(H)){if(k.layoutAttrOverrides)return k.layoutAttrOverrides;!I&&k.layoutAttributes&&(I=k.layoutAttributes)}var j=k.baseLayoutAttrOverrides;if(j&&H in j)return j[H]}if(I)return I}var G=R._modules;if(G){for(D=0;D<G.length;D++)if(C=G[D].layoutAttributes,C&&H in C)return C[H]}for(P in e.componentsRegistry){if(k=e.componentsRegistry[P],k.name==="colorscale"&&H.indexOf("coloraxis")===0)return k.layoutAttributes[H];if(!k.schema&&H===k.name)return k.layoutAttributes}return H in i?i[H]:!1}function g(R,H,D){if(!R)return!1;if(R._isLinkedToArray){if(x(H[D]))D++;else if(D<H.length)return!1}for(;D<H.length;D++){var P=R[H[D]];if(c(P))R=P;else break;if(D===H.length-1)break;if(R._isLinkedToArray){if(D++,!x(H[D]))return!1}else if(R.valType==="info_array"){D++;var k=H[D];if(!x(k))return!1;var C=R.items;if(Array.isArray(C)){if(k>=C.length)return!1;if(R.dimensions===2){if(D++,H.length===D)return R;var E=H[D];if(!x(E))return!1;R=C[k][E]}else R=C[k]}else R=C}}return R}function x(R){return R===Math.round(R)&&R>=0}function w(R){var H,D;H=e.modules[R]._module,D=H.basePlotModule;var P={};P.type=null;var k=f({},a),C=f({},H.attributes);t.crawl(C,function(j,G,X,O,Z){v(k,Z).set(void 0),j===void 0&&v(C,Z).set(void 0)}),f(P,k),e.traceIs(R,"noOpacity")&&delete P.opacity,e.traceIs(R,"showLegend")||(delete P.showlegend,delete P.legendgroup),e.traceIs(R,"noHover")&&(delete P.hoverinfo,delete P.hoverlabel),H.selectPoints||delete P.selectedpoints,f(P,C),D.attributes&&f(P,D.attributes),P.type=R;var E={meta:H.meta||{},categories:H.categories||{},animatable:!!H.animatable,type:R,attributes:M(P)};if(H.layoutAttributes){var I={};f(I,H.layoutAttributes),E.layoutAttributes=M(I)}return H.animatable||t.crawl(E,function(j){t.isValObject(j)&&"anim"in j&&delete j.anim}),E}function T(){var R={},H,D;f(R,i);for(H in e.subplotsRegistry)if(D=e.subplotsRegistry[H],!!D.layoutAttributes)if(Array.isArray(D.attr))for(var P=0;P<D.attr.length;P++)N(R,D,D.attr[P]);else{var k=D.attr==="subplot"?D.name:D.attr;N(R,D,k)}for(H in e.componentsRegistry){D=e.componentsRegistry[H];var C=D.schema;if(C&&(C.subplots||C.layout)){var E=C.subplots;if(E&&E.xaxis&&!E.yaxis)for(var I in E.xaxis)delete R.yaxis[I];delete R.xaxis.shift,delete R.xaxis.autoshift}else D.name==="colorscale"?f(R,D.layoutAttributes):D.layoutAttributes&&$(R,D.layoutAttributes,D.name)}return{layoutAttributes:M(R)}}function A(){var R={frames:f({},n)};return M(R),R.frames}function M(R){return S(R),L(R),z(R),R}function S(R){function H(P){return{valType:"string",description:"Sets the source reference on Chart Studio Cloud for `"+P+"`.",editType:"none"}}function D(P,k,C){t.isValObject(P)?(P.arrayOk===!0||P.valType==="data_array")&&(C[k+"src"]=H(k)):c(P)&&(P.role="object")}t.crawl(R,D)}function L(R){function H(D,P,k){if(D){var C=D[p];C&&(delete D[p],k[P]={items:{}},k[P].items[C]=D,k[P].role="object")}}t.crawl(R,H)}function z(R){function H(D){for(var P in D)if(c(D[P]))H(D[P]);else if(Array.isArray(D[P]))for(var k=0;k<D[P].length;k++)H(D[P][k]);else D[P]instanceof RegExp&&(D[P]=D[P].toString())}H(R)}function N(R,H,D){var P=v(R,D),k=f({},H.layoutAttributes);k[d]=!0,P.set(k)}function $(R,H,D){var P=v(R,D);P.set(f(P.get()||{},H))}})(Xo);var q_={exports:{}},Ht={},_o=ke,RL=_a,Pi="templateitemname",Id={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(" ")}};Id[Pi]={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(" ")};Ht.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=Id.name,e[Pi]=Id[Pi],e};Ht.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=_o.coerce(n,{},RL,"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}};Ht.newContainer=function(t,e,r){var a=t._template,i=a&&(a[e]||r&&a[r]);_o.isPlainObject(i)||(i=null);var n=t[e]={_template:i};return n};Ht.arrayTemplater=function(t,e,r){var a=t._template,i=a&&a[Z_(e)],n=a&&a[e];(!Array.isArray(n)||!n.length)&&(n=[]);var o={};function l(f){var c={name:f.name,_input:f},u=c[Pi]=f[Pi];if(!Fm(u))return c._template=i,c;for(var v=0;v<n.length;v++){var h=n[v];if(h.name===u)return o[u]=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 u=n[c],v=u.name;if(Fm(v)&&!o[v]){var h={_template:u,name:v,_input:{_templateitemname:v}};h[Pi]=u[Pi],f.push(h),o[v]=1}}return f}return{newItem:l,defaultItems:s}};function Fm(t){return t&&typeof t=="string"}function Z_(t){var e=t.length-1;return t.charAt(e)!=="s"&&_o.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}Ht.arrayDefaultKey=Z_;Ht.arrayEditor=function(t,e,r){var a=(_o.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][Pi]=n)}s();function f(h,d){l[h]=d}function c(h,d){n?_o.nestedProperty(l[o],h).set(d):l[o+"."+h]=d}function u(){var h=l;return s(),h}function v(h,d){h&&c(h,d);var p=u();for(var m in p)_o.nestedProperty(t,m).set(p[m])}return{modifyBase:f,modifyItem:c,getUpdateObj:u,applyUpdate:v}};var lr={},nl=Bo.counter,Ir={idRegex:{x:nl("x","( domain)?"),y:nl("y","( domain)?")},attrRegex:nl("[xy]axis"),xAxisMatch:nl("xaxis"),yAxisMatch:nl("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"},zindexSeparator:"z"};(function(t){var e=ot,r=Ir;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 u=s[c];f[c]=l[u.charAt(0)+"axis"+u.substr(1)]}if(!o){var v=l._subplots.gl3d||[];for(c=0;c<v.length;c++){var h=l[v[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)}})(lr);function IL(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()}function FL(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}var Rn={clearOutlineControllers:IL,clearOutline:FL},tp={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(" ")}},bs={},ec=ot;Ir.SUBPLOT_PATTERN;bs.getSubplotCalcData=function(t,e,r){var a=ec.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};bs.getModuleCalcData=function(t,e,r){var a=[],i=[],n;if(typeof e=="string"?n=ec.getModule(e).plot:typeof e=="function"?n=e:n=e.plot,!n)return[a,t];for(var o=r,l=0;l<t.length;l++){var s=t[l],f=s[0].trace,c=f.zorder!==void 0;f.visible!==!0||f._length===0||(f._module&&f._module.plot===n&&(!c||f.zorder===o)?a.push(s):i.push(s))}return[a,i]};bs.getSubplotData=function(e,r,a){if(!ec.subplotsRegistry[r])return[];for(var i=ec.subplotsRegistry[r].attr,n=[],o,l=0;l<e.length;l++)o=e[l],o[i]===a&&n.push(o);return n};var Ru={},Nm;function NL(){return Nm||(Nm=1,function(t){var e=ot,r=ke;t.manageCommandObserver=function(s,f,c,u){var v={},h=!0;f&&f._commandObserver&&(v=f._commandObserver),v.cache||(v.cache={}),v.lookupTable={};var d=t.hasSimpleAPICommandBindings(s,c,v.lookupTable);if(f&&f._commandObserver){if(d)return v;if(f._commandObserver.remove)return f._commandObserver.remove(),f._commandObserver=null,v}if(d){a(s,d,v.cache),v.check=function(){if(h){var b=a(s,d,v.cache);return b.changed&&u&&v.lookupTable[b.value]!==void 0&&(v.disable(),Promise.resolve(u({value:b.value,type:d.type,prop:d.prop,traces:d.traces,index:v.lookupTable[b.value]})).then(v.enable,v.enable)),b.changed}};for(var p=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],m=0;m<p.length;m++)s._internalOn(p[m],v.check);v.remove=function(){for(var y=0;y<p.length;y++)s._removeInternalListener(p[y],v.check)}}else r.log("Unable to automatically bind plot updates to API command"),v.lookupTable={},v.remove=function(){};return v.disable=function(){h=!1},v.enable=function(){h=!0},f&&(f._commandObserver=v),v},t.hasSimpleAPICommandBindings=function(s,f,c){var u,v=f.length,h;for(u=0;u<v;u++){var d,p=f[u],m=p.method,y=p.args;if(Array.isArray(y)||(y=[]),!m)return!1;var b=t.computeAPICommandBindings(s,m,y);if(b.length!==1)return!1;if(!h)h=b[0],Array.isArray(h.traces)&&h.traces.sort();else{if(d=b[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 _=0;_<h.traces.length;_++)if(h.traces[_]!==d.traces[_])return!1}else return!1;else if(d.prop!==h.prop)return!1}d=b[0];var g=d.value;if(Array.isArray(g))if(g.length===1)g=g[0];else return!1;c&&(c[g]=u)}return h};function a(s,f,c){var u,v,h,d=!1;if(f.type==="data")u=s._fullData[f.traces!==null?f.traces[0]:0];else if(f.type==="layout")u=s._fullLayout;else return!1;return v=r.nestedProperty(u,f.prop).get(),h=c[f.type]=c[f.type]||{},h.hasOwnProperty(f.prop)&&h[f.prop]!==v&&(d=!0),h[f.prop]=v,{changed:d,value:v}}t.executeAPICommand=function(s,f,c){if(f==="skip")return Promise.resolve();var u=e.apiMethodRegistry[f],v=[s];Array.isArray(c)||(c=[]);for(var h=0;h<c.length;h++)v.push(c[h]);return u.apply(null,v).catch(function(d){return r.warn("API call to Plotly."+f+" rejected.",d),Promise.reject(d)})},t.computeAPICommandBindings=function(s,f,c){var u;switch(Array.isArray(c)||(c=[]),f){case"restyle":u=o(s,c);break;case"relayout":u=n(s,c);break;case"update":u=o(s,[c[0],c[2]]).concat(n(s,[c[1]]));break;case"animate":u=i(s,c);break;default:u=[]}return u};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=[],u=f[0],v={};if(typeof u=="string")v[u]=f[1];else if(r.isPlainObject(u))v=u;else return c;return l(v,function(h,d,p){c.push({type:"layout",prop:h,value:p})},"",0),c}function o(s,f){var c,u,v,h,d=[];if(u=f[0],v=f[1],c=f[2],h={},typeof u=="string")h[u]=v;else if(r.isPlainObject(u))h=u,c===void 0&&(c=v);else return d;return c===void 0&&(c=null),l(h,function(p,m,y){var b,_;if(Array.isArray(y)){_=y.slice();var g=Math.min(_.length,s.data.length);c&&(g=Math.min(g,c.length)),b=[];for(var x=0;x<g;x++)b[x]=c?c[x]:x}else _=y,b=c?c.slice():null;if(b===null)Array.isArray(_)&&(_=_[0]);else if(Array.isArray(b)){if(!Array.isArray(_)){var w=_;_=[];for(var T=0;T<b.length;T++)_[T]=w}_.length=Math.min(b.length,_.length)}d.push({type:"data",prop:p,traces:b,value:_})},"",0),d}function l(s,f,c,u){Object.keys(s).forEach(function(v){var h=s[v];if(v[0]!=="_"){var d=c+(u>0?".":"")+v;r.isPlainObject(h)?l(h,f,d,u+1):f(d,v,h)}})}}(Ru)),Ru}var K_=bt,$L=Vl.timeFormatLocale,HL=G1.formatLocale,Il=kt,OL=j1,Et=ot,Q_=Xo,jL=Ht,qe=ke,J_=yt,$m=cr.BADNUM,Kr=lr,BL=Rn.clearOutline,GL=tp,rp=jc,UL=Y_,VL=bs.getModuleCalcData,Hm=qe.relinkPrivateKeys,Zi=qe._,$e=q_.exports={};qe.extendFlat($e,Et);$e.attributes=_a;$e.attributes.type.values=$e.allTypes;$e.fontAttrs=Mr;$e.layoutAttributes=ys;var Xc=NL();$e.executeAPICommand=Xc.executeAPICommand;$e.computeAPICommandBindings=Xc.computeAPICommandBindings;$e.manageCommandObserver=Xc.manageCommandObserver;$e.hasSimpleAPICommandBindings=Xc.hasSimpleAPICommandBindings;$e.redrawText=function(t){return t=qe.getGraphDiv(t),new Promise(function(e){setTimeout(function(){t._fullLayout&&(Et.getComponentMethod("annotations","draw")(t),Et.getComponentMethod("legend","draw")(t),Et.getComponentMethod("colorbar","draw")(t),e($e.previousPromises(t)))},300)})};$e.resize=function(t){t=qe.getGraphDiv(t);var e,r=new Promise(function(a,i){(!t||qe.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||qe.isHidden(t)){a(t);return}delete t.layout.width,delete t.layout.height;var n=t.changed;t.autoplay=!0,Et.call("relayout",t,{autosize:!0}).then(function(){t.changed=n,t._resolveResize===a&&(delete t._resolveResize,a(t))})},100)});return e&&e(r),r};$e.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})};$e.addLinks=function(t){if(!(!t._context.showLink&&!t._context.showSources)){var e=t._fullLayout,r=qe.ensureSingle(e._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:J_.defaultLine,"pointer-events":"all"}).each(function(){var f=K_.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&&WL(t,n),o.text(n.text()&&l.text()?" - ":"")}};function WL(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+" »");if(t._context.sendData)r.on("click",function(){$e.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})}}$e.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=K_.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=$e.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var XL=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],YL=["year","month","dayMonth","dayMonthYear"];$e.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||{},u;t._transitionData||$e.createTransitionData(t),i._dfltTitle={plot:Zi(t,"Click to enter Plot title"),subtitle:Zi(t,"Click to enter Plot subtitle"),x:Zi(t,"Click to enter X axis title"),y:Zi(t,"Click to enter Y axis title"),colorbar:Zi(t,"Click to enter Colorscale title"),annotation:Zi(t,"new text")},i._traceWord=Zi(t,"trace");var v=Om(t,XL);if(i._mapboxAccessToken=c.mapboxAccessToken,a._initialAutoSizeIsDone){var h=a.width,d=a.height;$e.supplyLayoutGlobalDefaults(n,i,v),n.width||(i.width=h),n.height||(i.height=d),$e.sanitizeMargins(i)}else{$e.supplyLayoutGlobalDefaults(n,i,v);var p=!n.width||!n.height,m=i.autosize,y=c.autosizable,b=p&&(m||y);b?$e.plotAutoSize(t,n,i):p&&$e.sanitizeMargins(i),!m&&p&&(n.width=i.width,n.height=i.height)}i._d3locale=KL(v,i.separators),i._extraFormat=Om(t,YL),i._initialAutoSizeIsDone=!0,i._dataLength=s.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var _=i._subplots=ZL(),g=i._splomAxes={x:{},y:{}},x=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=qL(o,s),$e.supplyDataDefaults(s,l,n,i);var w=Object.keys(g.x),T=Object.keys(g.y);if(w.length>1&&T.length>1){for(Et.getComponentMethod("grid","sizeDefaults")(n,i),u=0;u<w.length;u++)qe.pushUnique(_.xaxis,w[u]);for(u=0;u<T.length;u++)qe.pushUnique(_.yaxis,T[u]);for(var A in x)qe.pushUnique(_.cartesian,A)}if(i._has=$e._hasPlotType.bind(i),o.length===l.length)for(u=0;u<l.length;u++)Hm(l[u],o[u]);$e.supplyLayoutModuleDefaults(n,i,l,t._transitionData);var M=i._visibleModules,S=[];for(u=0;u<M.length;u++){var L=M[u].crossTraceDefaults;L&&qe.pushUnique(S,L)}for(u=0;u<S.length;u++)S[u](l,i);i._hasOnlyLargeSploms=i._basePlotModules.length===1&&i._basePlotModules[0].name==="splom"&&w.length>15&&T.length>15&&i.shapes.length===0&&i.images.length===0,$e.linkSubplots(l,i,o,a),$e.cleanPlot(l,i,o,a);var z=!!(a._has&&a._has("cartesian")),N=!!(i._has&&i._has("cartesian")),$=z,R=N;$&&!R?a._bgLayer.remove():R&&!$&&(i._shouldCreateBgLayer=!0),a._zoomlayer&&!t._dragging&&BL({_fullLayout:a}),QL(l,i),Hm(i,a),Et.getComponentMethod("colorscale","crossTraceDefaults")(l,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var H=i._tracePreGUI,D={},P;for(P in H)D[P]="old";for(u=0;u<l.length;u++)P=l[u]._fullInput.uid,D[P]||(H[P]={}),D[P]="new";for(P in D)D[P]==="old"&&delete H[P];ew(i),Et.getComponentMethod("rangeslider","makeData")(i),!r&&f.length===l.length&&$e.supplyDefaultsUpdateCalc(f,l)};$e.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=qe.nestedProperty(n,s).get().slice(),qe.nestedProperty(a,s).set(f)}i.trace=a}}};function qL(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 u(h,d){if(h&&typeof h=="string"&&!f[h])return c(h,d),!0}for(i=0;i<r;i++){var v=e[i].uid;typeof v=="number"&&(v=String(v)),!u(v,i)&&(i<l&&u(a[i].uid,i)||c(qe.randstr(f),i))}return s}function ZL(){var t=Et.collectableSubplotTypes,e={},r,a;if(!t){t=[];var i=Et.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++)qe.pushUnique(t,l[a])}}for(r=0;r<t.length;r++)e[t[r]]=[];return e}function Om(t,e){var r=t._context.locale;r||(r="en-US");var a=!1,i={};function n(u){for(var v=!0,h=0;h<e.length;h++){var d=e[h];i[d]||(u[d]?i[d]=u[d]:v=!1)}v&&(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=Et.localeRegistry}var c=r.split("-")[0];if(a||c===r)break;r=c}return a||n(Et.localeRegistry.en.format),i}function KL(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(r){try{r=HL(t).format(qe.adjustFormat(r))}catch{return qe.warnBadFormat(r),qe.noFormat}return r},timeFormat:$L(t).utcFormat}}function QL(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)}$e.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=[])};$e._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=Et.modules[i];if(n&&n.categories[t])return!0}return!1};$e.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 u=r[i],v=u.uid;for(n=0;n<t.length;n++){var h=t[n];if(v===h.uid)continue e}c&&a._infolayer.select(".cb"+v).remove()}};$e.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||[];for(i=0;i<c.length;i++){var u=c[i],v=o[u],h=Kr.getFromId(f,u,"x"),d=Kr.getFromId(f,u,"y"),p;for(v?p=l[u]=v:(p=l[u]={},p.id=u),h._counterAxes.push(d._id),d._counterAxes.push(h._id),h._subplotsWith.push(u),d._subplotsWith.push(u),p.xaxis=h,p.yaxis=d,p._hasClipOnAxisFalse=!1,n=0;n<t.length;n++){var m=t[n];if(m.xaxis===p.xaxis._id&&m.yaxis===p.yaxis._id&&m.cliponaxis===!1){p._hasClipOnAxisFalse=!0;break}}}var y=Kr.list(f,null,!0),b;for(i=0;i<y.length;i++){b=y[i];var _=null;b.overlaying&&(_=Kr.getFromId(f,b.overlaying),_&&_.overlaying&&(b.overlaying=!1,_=null)),b._mainAxis=_||b,_&&(b.domain=_.domain.slice()),b._anchorAxis=b.anchor==="free"?null:Kr.getFromId(f,b.anchor)}for(i=0;i<y.length;i++)if(b=y[i],b._counterAxes.sort(Kr.idSort),b._subplotsWith.sort(qe.subplotSort),b._mainSubplot=JL(b,e),b._counterAxes.length&&(b.spikemode&&b.spikemode.indexOf("across")!==-1||b.automargin&&b.mirror&&b.anchor!=="free"||Et.getComponentMethod("rangeslider","isVisible")(b))){var g=1,x=0;for(n=0;n<b._counterAxes.length;n++){var w=Kr.getFromId(f,b._counterAxes[n]);g=Math.min(g,w.domain[0]),x=Math.max(x,w.domain[1])}g<x&&(b._counterDomainMin=g,b._counterDomainMax=x)}};function JL(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],u=a?t._id+c:c+t._id;o||(o=u);var v=Kr.getFromId(r,c);if(l&&v.overlaying===l){n=u;break}}}return n||o}$e.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=[],Q_.crawl(t._module.attributes,i)),a=0;a<e.length;a++){var n=qe.nestedProperty(t,"_input."+e[a]);n.get()||qe.nestedProperty(t,e[a]).set(null)}};$e.supplyDataDefaults=function(t,e,r,a){var i=a._modules,n=a._visibleModules,o=a._basePlotModules,l=0,s,f,c;a._transformModules=[];function u(y){e.push(y);var b=y._module;b&&(qe.pushUnique(i,b),y.visible===!0&&qe.pushUnique(n,b),qe.pushUnique(o,y._module.basePlotModule),y._input.visible!==!1&&l++)}var v={},h=[],d=(r.template||{}).data||{},p=jL.traceTemplater(d);for(s=0;s<t.length;s++)c=t[s],f=p.newTrace(c),f.uid=a._traceUids[s],$e.supplyTraceDefaults(c,f,l,a,s),f.index=s,f._input=c,f._fullInput=f,u(f),Et.traceIs(f,"carpetAxis")&&(v[f.carpet]=f),Et.traceIs(f,"carpetDependent")&&h.push(s);for(s=0;s<h.length;s++)if(f=e[h[s]],!!f.visible){var m=v[f.carpet];if(f._carpet=m,!m||!m.visible){f.visible=!1;continue}f.xaxis=m.xaxis,f.yaxis=m.yaxis}};$e.supplyAnimationDefaults=function(t){t=t||{};var e,r={};function a(i,n){return qe.coerce(t||{},r,rp,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]=$e.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=$e.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=$e.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=$e.supplyAnimationTransitionDefaults(t.transition||{});return r};$e.supplyAnimationFrameDefaults=function(t){var e={};function r(a,i){return qe.coerce(t||{},e,rp.frame,a,i)}return r("duration"),r("redraw"),e};$e.supplyAnimationTransitionDefaults=function(t){var e={};function r(a,i){return qe.coerce(t||{},e,rp.transition,a,i)}return r("duration"),r("easing"),e};$e.supplyFrameDefaults=function(t){var e={};function r(a,i){return qe.coerce(t,e,UL,a,i)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e};$e.supplyTraceDefaults=function(t,e,r,a,i){var n=a.colorway||J_.defaults,o=n[r%n.length],l;function s(_,g){return qe.coerce(t,e,$e.attributes,_,g)}var f=s("visible");s("type"),s("name",a._traceWord+" "+i),s("uirevision",a.uirevision);var c=$e.getModule(e);if(e._module=c,c){var u=c.basePlotModule,v=u.attr,h=u.attributes;if(v&&h){var d=a._subplots,p="";if(Array.isArray(v))for(l=0;l<v.length;l++){var m=v[l],y=qe.coerce(t,e,h,m);d[m]&&qe.pushUnique(d[m],y),p+=y}else p=qe.coerce(t,e,h,v);d[u.name]&&qe.pushUnique(d[u.name],p)}}if(f&&(s("customdata"),s("ids"),s("meta"),Et.traceIs(e,"showLegend")?(qe.coerce(t,e,c.attributes.showlegend?c.attributes:$e.attributes,"showlegend"),s("legend"),s("legendwidth"),s("legendgroup"),s("legendgrouptitle.text"),s("legendrank"),e._dfltShowLegend=!0):e._dfltShowLegend=!1,c&&c.supplyDefaults(t,e,o,a),Et.traceIs(e,"noOpacity")||s("opacity"),Et.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),Et.traceIs(e,"noHover")||(e.hovertemplate||qe.coerceHoverinfo(t,e,a),e.type!=="parcats"&&Et.getComponentMethod("fx","supplyDefaults")(t,e,o,a)),c&&c.selectPoints)){var b=s("selectedpoints");qe.isTypedArray(b)&&(e.selectedpoints=Array.from(b))}return e};$e.supplyLayoutGlobalDefaults=function(t,e,r){function a(u,v){return qe.coerce(t,e,$e.layoutAttributes,u,v)}var i=t.template;qe.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),a("autotypenumbers");var n=qe.coerceFont(a,"font"),o=n.size;qe.coerceFont(a,"title.font",n,{overrideDflt:{size:Math.round(o*1.4)}}),a("title.text",e._dfltTitle.plot),a("title.xref");var l=a("title.yref");a("title.pad.t"),a("title.pad.r"),a("title.pad.b"),a("title.pad.l");var s=a("title.automargin");a("title.x"),a("title.xanchor"),a("title.y"),a("title.yanchor"),a("title.subtitle.text",e._dfltTitle.subtitle),qe.coerceFont(a,"title.subtitle.font",n,{overrideDflt:{size:Math.round(e.title.font.size*.7)}}),s&&(l==="paper"&&(e.title.y!==0&&(e.title.y=1),e.title.yanchor==="auto"&&(e.title.yanchor=e.title.y===0?"top":"bottom")),l==="container"&&(e.title.y==="auto"&&(e.title.y=1),e.title.yanchor==="auto"&&(e.title.yanchor=e.title.y<.5?"bottom":"top")));var f=a("uniformtext.mode");f&&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&&$e.sanitizeMargins(e),Et.getComponentMethod("grid","sizeDefaults")(t,e),a("paper_bgcolor"),a("separators",r.decimal+r.thousands),a("hidesources"),a("colorway"),a("datarevision");var c=a("uirevision");a("editrevision",c),a("selectionrevision",c),Et.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),Et.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,a),Et.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(t,e,a),a("meta"),qe.isPlainObject(t.transition)&&(a("transition.duration"),a("transition.easing"),a("transition.ordering")),Et.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),Et.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,a),qe.coerce(t,e,GL,"scattermode")};function Is(t){return typeof t=="string"&&t.substr(t.length-2)==="px"&&parseFloat(t)}$e.plotAutoSize=function(e,r,a){var i=e._context||{},n=i.frameMargins,o,l,s=qe.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=Is(f.width)||Is(f.maxWidth)||a.width,l=Is(f.height)||Is(f.maxHeight)||a.height,Il(n)&&n>0){var c=1-2*n;o=Math.round(c*o),l=Math.round(c*l)}}var u=$e.layoutAttributes.width.min,v=$e.layoutAttributes.height.min;o<u&&(o=u),l<v&&(l=v);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}),$e.sanitizeMargins(a)};$e.supplyLayoutModuleDefaults=function(t,e,r,a){var i=Et.componentsRegistry,n=e._basePlotModules,o,l,s,f=Et.subplotsRegistry.cartesian;for(o in i)s=i[o],s.includeBasePlot&&s.includeBasePlot(t,e);n.length||n.push(f),e._has("cartesian")&&(Et.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e));for(var c in e._subplots)e._subplots[c].sort(qe.subplotSort);for(l=0;l<n.length;l++)s=n[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var u=e._modules;for(l=0;l<u.length;l++)s=u[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var v=e._transformModules;for(l=0;l<v.length;l++)s=v[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r,a);for(o in i)s=i[o],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r)};$e.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)),qe.clearThrottle(),qe.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()};$e.style=function(t){var e=t._fullLayout._visibleModules,r=[],a;for(a=0;a<e.length;a++){var i=e[a];i.style&&qe.pushUnique(r,i.style)}for(a=0;a<r.length;a++)r[a](t)};$e.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))}};$e.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}};$e.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1};function ew(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={}),t._reservedMargin||(t._reservedMargin={})}var tw=2,rw=2;$e.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=qe.constrain(i-o.l-o.r,tw,l),c=qe.constrain(n-o.t-o.b,rw,s),u=Math.max(0,i-f),v=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)),u){var m=(r.l+r.r)/u;m>1&&(r.l/=m,r.r/=m)}if(v){var y=(r.t+r.b)/v;y>1&&(r.t/=y,r.b/=y)}var b=r.xl!==void 0?r.xl:r.x,_=r.xr!==void 0?r.xr:r.x,g=r.yt!==void 0?r.yt:r.y,x=r.yb!==void 0?r.yb:r.y;h[e]={l:{val:b,size:r.l+p},r:{val:_,size:r.r+p},b:{val:x,size:r.b+p},t:{val:g,size:r.t+p}},d[e]=1}if(!a._replotting)return $e.doAutoMargin(t)}};function eC(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=Kr.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}$e.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,a=e.height;e._size||(e._size={}),ew(e);var i=e._size,n=e.margin,o={t:0,b:0,l:0,r:0},l=qe.extendFlat({},i),s=n.l,f=n.r,c=n.t,u=n.b,v=e._pushmargin,h=e._pushmarginIds,d=e.minreducedwidth,p=e.minreducedheight;if(n.autoexpand!==!1){for(var m in v)h[m]||delete v[m];var y=t._fullLayout._reservedMargin;for(var b in y)for(var _ in y[b]){var g=y[b][_];o[_]=Math.max(o[_],g)}v.base={l:{val:0,size:s},r:{val:1,size:f},t:{val:1,size:c},b:{val:0,size:u}};for(var x in o){var w=0;for(var T in v)T!=="base"&&Il(v[T][x].size)&&(w=v[T][x].size>w?v[T][x].size:w);var A=Math.max(0,n[x]-w);o[x]=Math.max(0,o[x]-A)}for(var M in v){var S=v[M].l||{},L=v[M].b||{},z=S.val,N=S.size,$=L.val,R=L.size,H=r-o.r-o.l,D=a-o.t-o.b;for(var P in v){if(Il(N)&&v[P].r){var k=v[P].r.val,C=v[P].r.size;if(k>z){var E=(N*k+(C-H)*z)/(k-z),I=(C*(1-z)+(N-H)*(1-k))/(k-z);E+I>s+f&&(s=E,f=I)}}if(Il(R)&&v[P].t){var j=v[P].t.val,G=v[P].t.size;if(j>$){var X=(R*j+(G-D)*$)/(j-$),O=(G*(1-$)+(R-D)*(1-j))/(j-$);X+O>u+c&&(u=X,c=O)}}}}}var Z=qe.constrain(r-n.l-n.r,tw,d),V=qe.constrain(a-n.t-n.b,rw,p),q=Math.max(0,r-Z),B=Math.max(0,a-V);if(q){var J=(s+f)/q;J>1&&(s/=J,f/=J)}if(B){var ie=(u+c)/B;ie>1&&(u/=ie,c/=ie)}if(i.l=Math.round(s)+o.l,i.r=Math.round(f)+o.r,i.t=Math.round(c)+o.t,i.b=Math.round(u)+o.b,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&&($e.didMarginChange(l,i)||eC(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var de=3*(1+Object.keys(h).length);if(e._redrawFromAutoMarginCount<de)return Et.call("_doPlot",t);e._size=l,qe.warn("Too many auto-margin redraws.")}tC(t)};function tC(t){var e=Kr.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var a=0;a<e.length;a++){var i=e[a][r];i&&i()}})}var jm=["l","r","t","b","p","w","h"];$e.didMarginChange=function(t,e){for(var r=0;r<jm.length;r++){var a=jm[r],i=t[a],n=e[a];if(!Il(i)||Math.abs(n-i)>1)return!0}return!1};$e.graphJson=function(t,e,r,a,i,n){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&$e.supplyDefaults(t);var o=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function f(v,h){if(typeof v=="function")return h?"_function_":null;if(qe.isPlainObject(v)){var d={},p;return Object.keys(v).sort().forEach(function(_){if(["_","["].indexOf(_.charAt(0))===-1){if(typeof v[_]=="function"){h&&(d[_]="_function");return}if(r==="keepdata"){if(_.substr(_.length-3)==="src")return}else if(r==="keepstream"){if(p=v[_+"src"],typeof p=="string"&&p.indexOf(":")>0&&!qe.isPlainObject(v.stream))return}else if(r!=="keepall"&&(p=v[_+"src"],typeof p=="string"&&p.indexOf(":")>0))return;d[_]=f(v[_],h)}}),d}var m=Array.isArray(v),y=qe.isTypedArray(v);if((m||y)&&v.dtype&&v.shape){var b=v.bdata;return f({dtype:v.dtype,shape:v.shape,bdata:qe.isArrayBuffer(b)?OL.encode(b):b},h)}return m?v.map(function(_){return f(_,h)}):y?qe.simpleMap(v,qe.identity):qe.isJSDate(v)?qe.ms2DateTimeLocal(+v):v}var c={data:(o||[]).map(function(v){var h=f(v);return e&&delete h.fit,h})};if(!e&&(c.layout=f(l),i)){var u=l._size;c.layout.computed={margin:{b:u.b,l:u.l,r:u.r,t:u.t}}}return s&&(c.frames=f(s)),n&&(c.config=f(t._context,!0)),a==="object"?c:JSON.stringify(c)};$e.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()};$e.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=$e.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]=$e.extendTrace(c.data[o],l.data[a]))}return c};$e.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)}};$e.extendObjectWithContainers=function(t,e,r){var a,i,n,o,l,s,f,c,u=qe.extendDeepNoArrays({},e||{}),v=qe.expandObjectPaths(u),h={};if(r&&r.length)for(n=0;n<r.length;n++)a=qe.nestedProperty(v,r[n]),i=a.get(),i===void 0?qe.nestedProperty(h,r[n]).set(null):(a.set(null),qe.nestedProperty(h,r[n]).set(i));if(t=qe.extendDeepNoArrays(t||{},v),r&&r.length){for(n=0;n<r.length;n++)if(l=qe.nestedProperty(h,r[n]),f=l.get(),!!f){for(s=qe.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]=$e.extendObjectWithContainers(c[o],d)}s.set(c)}}return t};$e.dataArrayContainers=["transforms","dimensions"];$e.layoutArrayContainers=Et.layoutArrayContainers;$e.extendTrace=function(t,e){return $e.extendObjectWithContainers(t,e,$e.dataArrayContainers)};$e.extendLayout=function(t,e){return $e.extendObjectWithContainers(t,e,$e.layoutArrayContainers)};$e.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),u=0;u<c.length;u++){var v=c[u],h=t._fullData[v],d=h._module;if(d){if(d.animatable){var p=d.basePlotModule.name;l[p]||(l[p]=[]),l[p].push(v)}t.data[c[u]]=$e.extendTrace(t.data[c[u]],e[u])}}var m=qe.expandObjectPaths(qe.extendDeepNoArrays({},r)),y=/^[xy]axis[0-9]*$/;for(var b in m)y.test(b)&&delete m[b].range;$e.extendLayout(t.layout,m),delete t.calcdata,$e.supplyDefaults(t),$e.doCalcdata(t);var _=qe.expandObjectPaths(r);if(_){var g=t._fullLayout._plots;for(var x in g){var w=g[x],T=w.xaxis,A=w.yaxis,M=T.range.slice(),S=A.range.slice(),L=null,z=null,N=null,$=null;Array.isArray(_[T._name+".range"])?L=_[T._name+".range"].slice():Array.isArray((_[T._name]||{}).range)&&(L=_[T._name].range.slice()),Array.isArray(_[A._name+".range"])?z=_[A._name+".range"].slice():Array.isArray((_[A._name]||{}).range)&&(z=_[A._name].range.slice()),M&&L&&(T.r2l(M[0])!==T.r2l(L[0])||T.r2l(M[1])!==T.r2l(L[1]))&&(N={xr0:M,xr1:L}),S&&z&&(A.r2l(S[0])!==A.r2l(z[0])||A.r2l(S[1])!==A.r2l(z[1]))&&($={yr0:S,yr1:z}),(N||$)&&s.push(qe.extendFlat({plotinfo:w},N,$))}}return Promise.resolve()},o.runFn=function(f){var c,u=t._fullLayout._basePlotModules,v=s.length,h;if(r)for(h=0;h<u.length;h++)u[h].transitionAxes&&u[h].transitionAxes(t,s,n,f);v?(c=qe.extendFlat({},n),c.duration=0,delete l.cartesian):c=n;for(var d in l){var p=l[d],m=t._fullData[p[0]]._module;m.basePlotModule.plot(t,p,c,f)}},aw(t,n,o)};$e.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],u=c.xaxis,v=c.yaxis,h=a[u._name].range.slice(),d=a[v._name].range.slice(),p=u.range.slice(),m=v.range.slice();u.setScale(),v.setScale();var y=null,b=null;(u.r2l(h[0])!==u.r2l(p[0])||u.r2l(h[1])!==u.r2l(p[1]))&&(y={xr0:h,xr1:p}),(v.r2l(d[0])!==v.r2l(m[0])||v.r2l(d[1])!==v.r2l(m[1]))&&(b={yr0:d,yr1:m}),(y||b)&&l.push(qe.extendFlat({plotinfo:c},y,b))}return Promise.resolve()},o.runFn=function(s){for(var f=t._fullData,c=t._fullLayout,u=c._basePlotModules,v,h,d,p=[],m=0;m<f.length;m++)p.push(m);function y(){if(t._fullLayout)for(var _=0;_<u.length;_++)u[_].transitionAxes&&u[_].transitionAxes(t,l,v,s)}function b(){if(t._fullLayout)for(var _=0;_<u.length;_++)u[_].plot(t,d,h,s)}l.length&&e.anim?n.ordering==="traces first"?(v=qe.extendFlat({},n,{duration:0}),d=p,h=n,setTimeout(y,n.duration),b()):(v=n,d=null,h=qe.extendFlat({},n,{duration:0}),setTimeout(b,v.duration),y()):l.length?(v=n,y()):e.anim&&(d=p,h=n,b())},aw(t,n,o)};function aw(t,e,r){var a=!1;function i(u){var v=Promise.resolve();if(!u)return v;for(;u.length;)v=v.then(u.shift());return v}function n(u){if(u)for(;u.length;)u.shift()}function o(){return t.emit("plotly_transitioning",[]),new Promise(function(u){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){a=!0}),r.redraw&&t._transitionData._interruptCallbacks.push(function(){return Et.call("redraw",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var v=0,h=0;function d(){return v++,function(){h++,!a&&h===v&&l(u)}}r.runFn(d),setTimeout(d())})}function l(u){if(t._transitionData)return n(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Et.call("redraw",t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])}).then(u)}function s(){if(t._transitionData)return t._transitioning=!1,i(t._transitionData._interruptCallbacks)}var f=[$e.previousPromises,s,r.prepareFn,$e.rehover,$e.reselect,o],c=qe.syncOrAsync(f,t);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return t})}$e.doCalcdata=function(t,e){var r=Kr.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=Q_.findArrayAttributes(n),n._extremes={};var u=i._subplots.polar||[];for(l=0;l<u.length;l++)r.push(i[u[l]].radialaxis,i[u[l]].angularaxis);for(var v in i._colorAxes){var h=i[v];h.cauto!==!1&&(delete h.cmin,delete h.cmax)}var d=!1;function p(b){if(n=a[b],o=n._module,n.visible===!0&&n.transforms){if(o&&o.calc){var _=o.calc(t,n);_[0]&&_[0].t&&_[0].t._scene&&delete _[0].t._scene.dirty}for(s=0;s<n.transforms.length;s++){var g=n.transforms[s];o=transformsRegistry[g.type],o&&o.calcTransform&&(n._hasCalcTransform=!0,d=!0,o.calcTransform(t,n,g))}}}function m(b,_){if(n=a[b],o=n._module,!!o.isContainer===_){var g=[];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&&(g=o.calc(t,n))}(!Array.isArray(g)||!g[0])&&(g=[{x:$m,y:$m}]),g[0].t||(g[0].t={}),g[0].trace=n,f[b]=g}}for(Bm(r,a,i),l=0;l<a.length;l++)m(l,!0);for(l=0;l<a.length;l++)p(l);for(d&&Bm(r,a,i),l=0;l<a.length;l++)m(l,!0);for(l=0;l<a.length;l++)m(l,!1);Gm(t);var y=aC(r,t);if(y.length){for(i._numBoxes=0,i._numViolins=0,l=0;l<y.length;l++)m(y[l],!0);for(l=0;l<y.length;l++)m(y[l],!1);Gm(t)}Et.getComponentMethod("fx","calc")(t),Et.getComponentMethod("errorbars","calc")(t)};var rC=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function aC(t,e){var r=[],a,i,n,o,l;function s(P,k,C){var E=k._id.charAt(0);if(P==="histogram2dcontour"){var I=k._counterAxes[0],j=Kr.getFromId(e,I),G=E==="x"||I==="x"&&j.type==="category",X=E==="y"||I==="y"&&j.type==="category";return function(O,Z){return O===0||Z===0||G&&O===C[Z].length-1||X&&Z===C.length-1?-1:(E==="y"?Z:O)-1}}else return function(O,Z){return E==="y"?Z:O}}var f={min:function(P){return qe.aggNums(Math.min,null,P)},max:function(P){return qe.aggNums(Math.max,null,P)},sum:function(P){return qe.aggNums(function(k,C){return k+C},null,P)},total:function(P){return qe.aggNums(function(k,C){return k+C},null,P)},mean:function(P){return qe.mean(P)},"geometric mean":function(P){return qe.geometricMean(P)},median:function(P){return qe.median(P)}};function c(P,k){return P[1]-k[1]}function u(P,k){return k[1]-P[1]}for(a=0;a<t.length;a++){var v=t[a];if(v.type==="category"){var h=v.categoryorder.match(rC);if(h){var d=h[1],p=h[2],m=v._id.charAt(0),y=m==="x",b=[];for(i=0;i<v._categories.length;i++)b.push([v._categories[i],[]]);for(i=0;i<v._traceIndices.length;i++){var _=v._traceIndices[i],g=e._fullData[_];if(g.visible===!0){var x=g.type;Et.traceIs(g,"histogram")&&(delete g._xautoBinFinished,delete g._yautoBinFinished);var w=x==="splom",T=x==="scattergl",A=e.calcdata[_];for(n=0;n<A.length;n++){var M=A[n],S,L;if(w){var z=g._axesDim[v._id];if(!y){var N=g._diag[z][0];N&&(v=e._fullLayout[Kr.id2name(N)])}var $=M.trace.dimensions[z].values;for(o=0;o<$.length;o++)for(S=v._categoriesMap[$[o]],l=0;l<M.trace.dimensions.length;l++)if(l!==z){var R=M.trace.dimensions[l];b[S][1].push(R.values[o])}}else if(T){for(o=0;o<M.t.x.length;o++)y?(S=M.t.x[o],L=M.t.y[o]):(S=M.t.y[o],L=M.t.x[o]),b[S][1].push(L);M.t&&M.t._scene&&delete M.t._scene.dirty}else if(M.hasOwnProperty("z")){L=M.z;var H=s(g.type,v,L);for(o=0;o<L.length;o++)for(l=0;l<L[o].length;l++)S=H(l,o),S+1&&b[S][1].push(L[o][l])}else for(S=M.p,S===void 0&&(S=M[m]),L=M.s,L===void 0&&(L=M.v),L===void 0&&(L=y?M.y:M.x),Array.isArray(L)||(L===void 0?L=[]:L=[L]),o=0;o<L.length;o++)b[S][1].push(L[o])}}}v._categoriesValue=b;var D=[];for(i=0;i<b.length;i++)D.push([b[i][0],f[d](b[i][1])]);D.sort(p==="descending"?u:c),v._categoriesAggregatedValue=D,v._initialCategories=D.map(function(P){return P[0]}),r=r.concat(v.sortByInitialCategories())}}}return r}function Bm(t,e,r){var a={};function i(s){s.clearCalc(),s.type==="multicategory"&&s.setupMultiCategory(e),a[s._id]=1}qe.simpleMap(t,i);for(var n=r._axisMatchGroups||[],o=0;o<n.length;o++)for(var l in n[o])a[l]||i(r[Kr.id2name(l)])}function Gm(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]?qe.pushUnique(a[f],s):a[f]=[s]}}for(o in a){var c=a[o],u=e._subplots[o];if(Array.isArray(u))for(i=0;i<u.length;i++){var v=u[i],h=o==="cartesian"?e._plots[v]:e[v];for(n=0;n<c.length;n++)c[n](t,h,v)}else for(n=0;n<c.length;n++)c[n](t)}}$e.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()};$e.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()};$e.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);Et.getComponentMethod("selections","reselect")(t,i)};$e.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],u=c[0].trace;u.visible=!1,n[f]=[c]}for(var v in n){var h=n[v],d=h[0][0].trace._module;d.plot(t,e,qe.filterVisible(h),a)}e.traceHash=n};$e.plotBasePlot=function(t,e,r,a,i){var n=Et.getModule(t),o=VL(e.calcdata,n)[0];n.plot(e,o,a,i)};$e.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 hr=q_.exports,iw={exports:{}},Tr={},Yo={};(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}})(Yo);var Vr={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=bt,r=ke,a=r.strTranslate,i=Yo,n=Vr.LINE_SPACING,o=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(k,C,E){var I=k.text(),j=!k.attr("data-notex")&&C&&C._context.typesetMath&&typeof MathJax<"u"&&I.match(o),G=e.select(k.node().parentNode);if(G.empty())return;var X=k.attr("class")?k.attr("class").split(" ")[0]:"text";X+="-math",G.selectAll("svg."+X).remove(),G.selectAll("g."+X+"-group").remove(),k.style("display",null).attr({"data-unformatted":I,"data-math":"N"});function O(){G.empty()||(X=k.attr("class")+"-math",G.select("svg."+X).remove()),k.text("").style("white-space","pre");var Z=R(k.node(),I);Z&&k.style("pointer-events","all"),t.positionText(k),E&&E.call(k)}return j?(C&&C._promises||[]).push(new Promise(function(Z){k.style("display","none");var V=parseInt(k.node().style.fontSize,10),q={fontSize:V};u(j[2],q,function(B,J,ie){G.selectAll("svg."+X).remove(),G.selectAll("g."+X+"-group").remove();var de=B&&B.select("svg");if(!de||!de.node()){O(),Z();return}var oe=G.append("g").classed(X+"-group",!0).attr({"pointer-events":"none","data-unformatted":I,"data-math":"Y"});oe.node().appendChild(de.node()),J&&J.node()&&de.node().insertBefore(J.node().cloneNode(!0),de.node().firstChild);var Y=ie.width,ee=ie.height;de.attr({class:X,height:ee,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var le=k.node().style.fill||"black",ue=de.select("g");ue.attr({fill:le,stroke:le});var me=ue.node().getBoundingClientRect(),pe=me.width,se=me.height;(pe>Y||se>ee)&&(de.style("overflow","hidden"),me=de.node().getBoundingClientRect(),pe=me.width,se=me.height);var be=+k.attr("x"),Le=+k.attr("y"),ve=V||k.node().getBoundingClientRect().height,Te=-ve/4;if(X[0]==="y")oe.attr({transform:"rotate("+[-90,be,Le]+")"+a(-pe/2,Te-se/2)});else if(X[0]==="l")Le=Te-se/2;else if(X[0]==="a"&&X.indexOf("atitle")!==0)be=0,Le=Te;else{var we=k.attr("text-anchor");be=be-pe*(we==="middle"?.5:we==="end"?1:0),Le=Le+Te-se/2}de.attr({x:be,y:Le}),E&&E.call(k,oe),Z(oe)})})):O(),k};var l=/(<|<|<)/g,s=/(>|>|>)/g;function f(k){return k.replace(l,"\\lt ").replace(s,"\\gt ")}var c=[["$","$"],["\\(","\\)"]];function u(k,C,E){var I=parseInt((MathJax.version||"").split(".")[0]);if(I!==2&&I!==3){r.warn("No MathJax version:",MathJax.version);return}var j,G,X,O,Z=function(){return G=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"})},V=function(){G=r.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=c},q=function(){if(j=MathJax.Hub.config.menuSettings.renderer,j!=="SVG")return MathJax.Hub.setRenderer("SVG")},B=function(){j=MathJax.config.startup.output,j!=="svg"&&(MathJax.config.startup.output="svg")},J=function(){var le="math-output-"+r.randstr({},64);O=e.select("body").append("div").attr({id:le}).style({visibility:"hidden",position:"absolute","font-size":C.fontSize+"px"}).text(f(k));var ue=O.node();return I===2?MathJax.Hub.Typeset(ue):MathJax.typeset([ue])},ie=function(){var le=O.select(I===2?".MathJax_SVG":".MathJax"),ue=!le.empty()&&O.select("svg").node();if(!ue)r.log("There was an error in the tex syntax.",k),E();else{var me=ue.getBoundingClientRect(),pe;I===2?pe=e.select("body").select("#MathJax_SVG_glyphs"):pe=le.select("defs"),E(le,pe,me)}O.remove()},de=function(){if(j!=="SVG")return MathJax.Hub.setRenderer(j)},oe=function(){j!=="svg"&&(MathJax.config.startup.output=j)},Y=function(){return X!==void 0&&(MathJax.Hub.processSectionDelay=X),MathJax.Hub.Config(G)},ee=function(){MathJax.config=G};I===2?MathJax.Hub.Queue(Z,q,J,ie,de,Y):I===3&&(V(),B(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){J(),ie(),oe(),ee()}))}var v={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",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="",m=["http:","https:","mailto:","",void 0,":"],y=t.NEWLINES=/(\r\n?|\n)/g,b=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,g=/<br(\s+.*)?>/i;t.BR_TAG_ALL=/<br(\s+.*)?>/gi;var x=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function M(k,C){if(!k)return null;var E=k.match(C),I=E&&(E[3]||E[4]);return I&&N(I)}var S=/(^|;)\s*color:/;t.plainText=function(k,C){C=C||{};for(var E=C.len!==void 0&&C.len!==-1?C.len:1/0,I=C.allowedTags!==void 0?C.allowedTags:["br"],j="...",G=j.length,X=k.split(b),O=[],Z="",V=0,q=0;q<X.length;q++){var B=X[q],J=B.match(_),ie=J&&J[2].toLowerCase();if(ie)I.indexOf(ie)!==-1&&(O.push(B),Z=ie);else{var de=B.length;if(V+de<E)O.push(B),V+=de;else if(V<E){var oe=E-V;Z&&(Z!=="br"||oe<=G||de<=G)&&O.pop(),E>G?O.push(B.substr(0,oe-G)+j):O.push(B.substr(0,oe));break}Z=""}}return O.join("")};var L={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},z=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function N(k){return k.replace(z,function(C,E){var I;return E.charAt(0)==="#"?I=$(E.charAt(1)==="x"?parseInt(E.substr(2),16):parseInt(E.substr(1),10)):I=L[E],I||C})}t.convertEntities=N;function $(k){if(!(k>1114111)){var C=String.fromCodePoint;if(C)return C(k);var E=String.fromCharCode;return k<=65535?E(k):E((k>>10)+55232,k%1024+56320)}}function R(k,C){C=C.replace(y," ");var E=!1,I=[],j,G=-1;function X(){G++;var se=document.createElementNS(i.svg,"tspan");e.select(se).attr({class:"line",dy:G*n+"em"}),k.appendChild(se),j=se;var be=I;if(I=[{node:se}],be.length>1)for(var Le=1;Le<be.length;Le++)O(be[Le])}function O(se){var be=se.type,Le={},ve;if(be==="a"){ve="a";var Te=se.target,we=se.href,Q=se.popup;we&&(Le={"xlink:xlink:show":Te==="_blank"||Te.charAt(0)!=="_"?"new":"replace",target:Te,"xlink:xlink:href":we},Q&&(Le.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+Q+'");return false;'))}else ve="tspan";se.style&&(Le.style=se.style);var xe=document.createElementNS(i.svg,ve);if(be==="sup"||be==="sub"){Z(j,p),j.appendChild(xe);var ae=document.createElementNS(i.svg,"tspan");Z(ae,p),e.select(ae).attr("dy",d[be]),Le.dy=h[be],j.appendChild(xe),j.appendChild(ae)}else j.appendChild(xe);e.select(xe).attr(Le),j=se.node=xe,I.push(se)}function Z(se,be){se.appendChild(document.createTextNode(be))}function V(se){if(I.length===1){r.log("Ignoring unexpected end tag </"+se+">.",C);return}var be=I.pop();se!==be.type&&r.log("Start tag <"+be.type+"> doesnt match end tag <"+se+">. Pretending it did match.",C),j=I[I.length-1].node}var q=g.test(C);q?X():(j=k,I=[{node:k}]);for(var B=C.split(b),J=0;J<B.length;J++){var ie=B[J],de=ie.match(_),oe=de&&de[2].toLowerCase(),Y=v[oe];if(oe==="br")X();else if(Y===void 0)Z(j,N(ie));else if(de[1])V(oe);else{var ee=de[4],le={type:oe},ue=M(ee,x);if(ue?(ue=ue.replace(S,"$1 fill:"),Y&&(ue+=";"+Y)):Y&&(ue=Y),ue&&(le.style=ue),oe==="a"){E=!0;var me=M(ee,w);if(me){var pe=H(me);pe&&(le.href=pe,le.target=M(ee,T)||"_blank",le.popup=M(ee,A))}}O(le)}}return E}function H(k){var C=encodeURI(decodeURI(k)),E=document.createElement("a"),I=document.createElement("a");E.href=k,I.href=C;var j=E.protocol,G=I.protocol;return m.indexOf(j)!==-1&&m.indexOf(G)!==-1?C:""}t.sanitizeHTML=function(C){C=C.replace(y," ");for(var E=document.createElement("p"),I=E,j=[],G=C.split(b),X=0;X<G.length;X++){var O=G[X],Z=O.match(_),V=Z&&Z[2].toLowerCase();if(V in v)if(Z[1])j.length&&(I=j.pop());else{var q=Z[4],B=M(q,x),J=B?{style:B}:{};if(V==="a"){var ie=M(q,w);if(ie){var de=H(ie);if(de){J.href=de;var oe=M(q,T);oe&&(J.target=oe)}}}var Y=document.createElement(V);I.appendChild(Y),e.select(Y).attr(J),I=Y,j.push(Y)}else I.appendChild(document.createTextNode(N(O)))}var ee="innerHTML";return E[ee]},t.lineCount=function(C){return C.selectAll("tspan.line").size()||1},t.positionText=function(C,E,I){return C.each(function(){var j=e.select(this);function G(Z,V){return V===void 0?(V=j.attr(Z),V===null&&(j.attr(Z,0),V=0)):j.attr(Z,V),V}var X=G("x",E),O=G("y",I);this.nodeName==="text"&&j.selectAll("tspan.line").attr({x:X,y:O})})};function D(k,C,E){var I=E.horizontalAlign,j=E.verticalAlign||"top",G=k.node().getBoundingClientRect(),X=C.node().getBoundingClientRect(),O,Z,V;return j==="bottom"?Z=function(){return G.bottom-O.height}:j==="middle"?Z=function(){return G.top+(G.height-O.height)/2}:Z=function(){return G.top},I==="right"?V=function(){return G.right-O.width}:I==="center"?V=function(){return G.left+(G.width-O.width)/2}:V=function(){return G.left},function(){O=this.node().getBoundingClientRect();var q=V()-X.left,B=Z()-X.top,J=E.gd||{};if(E.gd){J._fullLayout._calcInverseTransform(J);var ie=r.apply3DTransform(J._fullLayout._invTransform)(q,B);q=ie[0],B=ie[1]}return this.style({top:B+"px",left:q+"px","z-index":1e3}),this}}var P="1px ";t.makeTextShadow=function(k){var C=P,E=P,I=P;return C+E+I+k+", -"+C+"-"+E+I+k+", "+C+"-"+E+I+k+", -"+C+E+I+k},t.makeEditable=function(k,C){var E=C.gd,I=C.delegate,j=e.dispatch("edit","input","cancel"),G=I||k;if(k.style({"pointer-events":I?"none":"all"}),k.size()!==1)throw new Error("boo");function X(){Z(),k.style({opacity:0});var V=G.attr("class"),q;V?q="."+V.split(" ")[0]+"-math-group":q="[class*=-math-group]",q&&e.select(k.node().parentNode).select(q).style({opacity:0})}function O(V){var q=V.node(),B=document.createRange();B.selectNodeContents(q);var J=window.getSelection();J.removeAllRanges(),J.addRange(B),q.focus()}function Z(){var V=e.select(E),q=V.select(".svg-container"),B=q.append("div"),J=k.node().style,ie=parseFloat(J.fontSize||12),de=C.text;de===void 0&&(de=k.attr("data-unformatted")),B.classed("plugin-editable editable",!0).style({position:"absolute","font-family":J.fontFamily||"Arial","font-size":ie,color:C.fill||J.fill||"black",opacity:1,"background-color":C.background||"transparent",outline:"#ffffff33 1px solid",margin:[-ie/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(de).call(D(k,q,C)).on("blur",function(){E._editing=!1,k.text(this.textContent).style({opacity:1});var oe=e.select(this).attr("class"),Y;oe?Y="."+oe.split(" ")[0]+"-math-group":Y="[class*=-math-group]",Y&&e.select(k.node().parentNode).select(Y).style({opacity:0});var ee=this.textContent;e.select(this).transition().duration(0).remove(),e.select(document).on("mouseup",null),j.edit.call(k,ee)}).on("focus",function(){var oe=this;E._editing=!0,e.select(document).on("mouseup",function(){if(e.event.target===oe)return!1;document.activeElement===B.node()&&B.node().blur()})}).on("keyup",function(){e.event.which===27?(E._editing=!1,k.style({opacity:1}),e.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),j.cancel.call(k,this.textContent)):(j.input.call(k,this.textContent),e.select(this).call(D(k,q,C)))}).on("keydown",function(){e.event.which===13&&this.blur()}).call(O)}return C.immediate?X():G.on("click",X),e.rebind(k,j,"on")}})(Tr);var nw={exports:{}},iC=bt,zf=$a,Fl=kt,Fs=ke,Um=yt,nC=jo.isValid;function oC(t,e,r){var a=e?Fs.nestedProperty(t,e).get()||{}:t,i=a[r||"color"];i&&i._inputArray&&(i=i._inputArray);var n=!1;if(Fs.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(Fl(i[o])){n=!0;break}}return Fs.isPlainObject(a)&&(n||a.showscale===!0||Fl(a.cmin)&&Fl(a.cmax)||nC(a.colorscale)||Fs.isPlainObject(a.colorbar))}var Vm=["showscale","autocolorscale","colorscale","reversescale","colorbar"],ol=["min","max","mid","auto"];function ow(t){var e=t._colorAx,r=e||t,a={},i,n,o;for(n=0;n<Vm.length;n++)o=Vm[n],a[o]=r[o];if(e)for(i="c",n=0;n<ol.length;n++)o=ol[n],a[o]=r["c"+o];else{var l;for(n=0;n<ol.length;n++){if(o=ol[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=ol.indexOf(s)!==-1?i+s:s;r[c]=r["_"+c]=f},a}function lw(t){for(var e=ow(t),r=e.min,a=e.max,i=e.reversescale?sw(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 sw(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 fw(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=zf(a[o]).toRgb();n[o]=[l.r,l.g,l.b,l.a]}var s=iC.scale.linear().domain(r).range(n).clamp(!0),f=e.noNumericCheck,c=e.returnArray,u;return f&&c?u=s:f?u=function(v){return Wm(s(v))}:c?u=function(v){return Fl(v)?s(v):zf(v).isValid()?v:Um.defaultLine}:u=function(v){return Fl(v)?Wm(s(v)):zf(v).isValid()?v:Um.defaultLine},u.domain=s.domain,u.range=function(){return a},u}function lC(t,e){return fw(lw(t),e)}function Wm(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return zf(e).toRgbString()}var ja={hasColorscale:oC,extractOpts:ow,extractScale:lw,flipScale:sw,makeColorScaleFunc:fw,makeColorScaleFuncFromTrace:lC},cw=M_,sC=cw.FORMAT_LINK,fC=cw.DATE_FORMAT_LINK;function cC(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?uw:vw)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}}function uw(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: "+sC+"."].join(" ")}function vw(t,e){return uw(t,e)+[" And for dates see: "+fC+".","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 qo={axisHoverFormat:cC,descriptionWithDates:vw},Xm=Mr,vo=Or,dw=ta.dash,ap=Yt.extendFlat,Ym=Ht.templatedArray,uC=Sr.templateFormatStringDescription,qm=qo.descriptionWithDates,vC=cr.ONEDAY,Ya=Ir,Iu=Ya.HOUR_PATTERN,Fu=Ya.WEEKDAY_PATTERN,Rf={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(" ")},dC=ap({},Rf,{values:Rf.values.slice().concat(["sync"]),description:[Rf.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function Zm(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 Km={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(" ")},Qm={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(" ")},Jm={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(" ")},ey={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 ty(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return t||(e.dflt=5),e}function ry(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return t||(e.dflt=1),e}var ay={valType:"color",dflt:vo.defaultLine,editType:"ticks",description:"Sets the tick color."},iy={valType:"color",dflt:vo.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function ny(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 oy=ap({},dw,{editType:"ticks"}),ly={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(" ")},ti={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:vo.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."},font:Xm({editType:"ticks",description:"Sets this axis' title font."}),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","min reversed","max reversed","min","max"],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 and it has a value for both the","lower and upper bound, `autorange` is set to *false*.","Using *min* applies autorange only to set the minimum.","Using *max* applies autorange only to set the maximum.","Using *min reversed* applies autorange only to set the minimum on a reversed axis.","Using *max reversed* applies autorange only to set the maximum on a reversed axis.","Using *reversed* applies autorange on both ends and reverses the axis direction."].join(" ")},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange minimum."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange maximum."].join(" ")},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange minimum if it goes beyond this value.","Has no effect when `autorangeoptions.minallowed` is provided."].join(" ")},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange maximum if it goes beyond this value.","Has no effect when `autorangeoptions.maxallowed` is provided."].join(" ")},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Ensure this value is included in autorange."].join(" ")},editType:"plot"},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.","Leaving either or both elements `null` impacts the default `autorange`."].join(" ")},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the minimum range of this axis."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the maximum range of this axis."].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(" ")},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar",description:["Disables certain modebar buttons for this axis.","*autoscale* disables the autoscale buttons, *zoominout*","disables the zoom-in and zoom-out buttons."].join(" ")},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Could be used to set the desired inside range of this axis","(excluding the labels) when `ticklabelposition` of","the anchored axis has *inside*.","Not implemented for axes with `type` *log*.","This would be ignored when `range` is provided."].join(" ")},scaleanchor:{valType:"enumerated",values:[Ya.idRegex.x.toString(),Ya.idRegex.y.toString(),!1],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.","Setting `false` allows to remove a default constraint (occasionally,","you may need to prevent a default `scaleanchor` constraint from",'being applied, eg. when having an image trace `yaxis: {scaleanchor: "x"}`',"is set automatically in order for pixels to be rendered as squares,","setting `yaxis: {scaleanchor: false}` allows to remove the constraint)."].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:[Ya.idRegex.x.toString(),Ya.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:Ym("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:[Fu,Iu,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+Fu+"* - 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 *"+Iu+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+Fu+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+Iu+"', 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:vC,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:dC,nticks:Zm(),tick0:Km,dtick:Qm,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:Jm,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:ey,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*","or when `tickson` is set to *boundaries*. Similarly,","left or right has no effect on y axes or when `ticklabelmode` is set to *period*","or when `tickson` is set to *boundaries*.","Has no effect on *multicategory* axes.","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(" ")},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks",description:["Shifts the tick labels by the specified number of pixels in parallel to the axis.","Positive values move the labels in the positive direction of the axis."].join(" ")},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis tick labels and their default position.","A positive `ticklabelstandoff` moves the labels farther away from the plot area","if `ticklabelposition` is *outside*, and deeper into the plot area if","`ticklabelposition` is *inside*. A negative `ticklabelstandoff` works in the opposite","direction, moving outside ticks towards the plot area and inside ticks towards","the outside. If the negative value is large enough, inside ticks can even end up","outside and vice versa."].join(" ")},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc",description:["Only for axes with `type` *date* or *linear*.","Instead of drawing the major tick label, draw the label for the minor tick","that is n positions away from the major tick. E.g. to always draw the label for the","minor tick before each major tick, choose `ticklabelindex` -1. This is useful for date","axes with `ticklabelmode` *period* if you want to label the period that ends with each","major tick instead of the period that begins there."].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:ty(),tickwidth:ry(),tickcolor:ay,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},labelalias:{valType:"any",dflt:!1,editType:"ticks",description:["Replacement text for specific tick or hover labels.","For example using {US: 'USA', CA: 'Canada'} changes US to USA","and CA to Canada. The labels we would have shown must match","the keys exactly, after adding any tickprefix or ticksuffix.","For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash.","That means you need to use −1 instead of -1.","labelalias can be used with any axis type, and both keys (if needed)","and values (if desired) can include html-like tags or MathJax."].join(" ")},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:ap({},dw,{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:Xm({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(" ")},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks",description:["When `tickangle` is set to *auto*, it will be set to the first","angle in this array that is large enough to prevent label","overlap."].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:qm("tick label")},tickformatstops:Ym("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:qm("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none",description:["Template string used for rendering the title that appear on x or y unified hover box.",uC()].join(" ")},editType:"none"},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:vo.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:ly,gridcolor:iy,gridwidth:ny(),griddash:oy,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:vo.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot",description:["Sets the layer on which this zeroline is displayed.","If *above traces*, this zeroline is displayed above all the subplot's traces","If *below traces*, this zeroline is displayed below all the subplot's traces,","but above the grid lines. Limitation: *zerolinelayer* currently has no effect","if the *zorder* property is set on any trace."].join(" ")},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:vo.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",Ya.idRegex.x.toString(),Ya.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",Ya.idRegex.x.toString(),Ya.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:Rf,nticks:Zm("minor"),tick0:Km,dtick:Qm,tickvals:Jm,ticks:ey,ticklen:ty("minor"),tickwidth:ry("minor"),tickcolor:ay,gridcolor:iy,gridwidth:ny("minor"),griddash:oy,showgrid:ly,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc",description:["Determines how minor log labels are displayed.","If *small digits*, small digits i.e. 2 or 5 are displayed.","If *complete*, complete digits are displayed.","If *none*, no labels are displayed."].join(" ")},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","geometric mean ascending","geometric 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, geometric 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"},Wt=ti,sy=Mr,fy=Yt.extendFlat,hC=Ja.overrideAll,ip=hC({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",description:["Sets the x position with respect to `xref` of the color bar (in plot fraction).","When `xref` is *paper*, defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*.","When `xref` is *container*, defaults to *1* when `orientation` is *v* and","0.5 when `orientation` is *h*.","Must be between *0* and *1* if `xref` is *container*","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",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(" ")},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",description:["Sets the y position with respect to `yref` of the color bar (in plot fraction).","When `yref` is *paper*, defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*.","When `yref` is *container*, defaults to 0.5 when `orientation` is *v* and","1 when `orientation` is *h*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",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(" ")},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:Wt.linecolor,outlinewidth:Wt.linewidth,bordercolor:Wt.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:Wt.minor.tickmode,nticks:Wt.nticks,tick0:Wt.tick0,dtick:Wt.dtick,tickvals:Wt.tickvals,ticktext:Wt.ticktext,ticks:fy({},Wt.ticks,{dflt:""}),ticklabeloverflow:fy({},Wt.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:Wt.ticklen,tickwidth:Wt.tickwidth,tickcolor:Wt.tickcolor,ticklabelstep:Wt.ticklabelstep,showticklabels:Wt.showticklabels,labelalias:Wt.labelalias,tickfont:sy({description:"Sets the color bar's tick label font"}),tickangle:Wt.tickangle,tickformat:Wt.tickformat,tickformatstops:Wt.tickformatstops,tickprefix:Wt.tickprefix,showtickprefix:Wt.showtickprefix,ticksuffix:Wt.ticksuffix,showticksuffix:Wt.showticksuffix,separatethousands:Wt.separatethousands,exponentformat:Wt.exponentformat,minexponent:Wt.minexponent,showexponent:Wt.showexponent,title:{text:{valType:"string",description:"Sets the title of the color bar."},font:sy({description:"Sets this color bar's title font."}),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*."].join(" ")}}},"colorbars","from-root"),pC=ip,mC=Bo.counter,yC=Yh,hw=jo.scales,gC=yC(hw);function ll(t){return"`"+t+"`"}var In=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"?hw[r.colorscaleDflt]:null,s=r.editTypeOverride||"",f=e?e+".":"",c,u;"colorAttr"in r?(c=r.colorAttr,u=r.colorAttr):(c={z:"z",c:"color"}[a],u="in "+ll(f+c));var v=i?" Has an effect only if "+u+" is set to a numerical array.":"",h=a+"auto",d=a+"min",p=a+"max",m=a+"mid",y=ll(f+h),b=ll(f+d),_=ll(f+p),g=b+" and "+_,x={};x[d]=x[p]=void 0;var w={};w[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",g,"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 "+u+") or the bounds set in",g+v,"Defaults to `false` when",g,"are set by the user."].join(" ")},T[d]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:w,description:["Sets the lower bound of the color domain."+v,"Value should have the same units as",u,"and if set,",_,"must be set as well."].join(" ")},T[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:w,description:["Sets the upper bound of the color domain."+v,"Value should have the same units as",u,"and if set,",b,"must be set as well."].join(" ")},T[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:x,description:["Sets the mid-point of the color domain by scaling",b,"and/or",_,"to be equidistant to this point."+v,"Value should have the same units as",u+".","Has no effect when",y,"is `false`."].join(" ")},T.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+v,"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",g+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+gC+"."].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",ll(f+"colorscale")+"."+v,"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."+v,"If true,",b,"will correspond to the last color","in the array and",_,"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."+v].join(" ")},T.colorbar=pC),r.noColorAxis||(T.coloraxis={valType:"subplotid",regex:mC("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},bC=Yt.extendFlat,xC=In,Nu=jo.scales,$u="Note that `autocolorscale` must be true for this attribute to work.",pw={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Nu.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",$u].join(" ")},sequentialminus:{valType:"colorscale",dflt:Nu.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",$u].join(" ")},diverging:{valType:"colorscale",dflt:Nu.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",$u].join(" ")}},coloraxis:bC({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},xC("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))},_C=ke,mw=function(e){return _C.isPlainObject(e.colorbar)},Yc={},Fd=kt,cy=ke,yw=cr,wC=yw.ONEDAY,TC=yw.ONEWEEK;Yc.dtick=function(t,e){var r=e==="log",a=e==="date",i=e==="category",n=a?wC:1;if(!t)return n;if(Fd(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=Fd(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};Yc.tick0=function(t,e,r,a){if(e==="date")return cy.cleanDate(t,cy.dateTick0(r,a%TC===0?1:0));if(!(a==="D1"||a==="D2"))return Fd(t)?Number(t):0};var uy=Yc,kC=ke.isArrayOrTypedArray,AC=fr.isTypedArraySpec,MC=fr.decodeTypedArraySpec,gw=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(b){var _=l[b];return AC(_)&&(_=MC(_)),_!==void 0?_:(s._template||{})[b]}var u=c("tick0"),v=c("dtick"),h=c("tickvals"),d=kC(h)?"array":v?"linear":"auto",p=a(f+"tickmode",d);if(p==="auto"||p==="sync")a(f+"nticks");else if(p==="linear"){var m=s.dtick=uy.dtick(v,i);s.tick0=uy.tick0(u,i,r.calendar,m)}else if(i!=="multicategory"){var y=a(f+"tickvals");y===void 0?s.tickmode="auto":o||a("ticktext")}},Hu=ke,vy=ti,bw=function(e,r,a,i){var n=i.isMinor,o=n?e.minor||{}:e,l=n?r.minor:r,s=n?vy.minor:vy,f=n?"minor.":"",c=Hu.coerce2(o,l,s,"ticklen",n?(r.ticklen||5)*.6:void 0),u=Hu.coerce2(o,l,s,"tickwidth",n?r.tickwidth||1:void 0),v=Hu.coerce2(o,l,s,"tickcolor",(n?r.tickcolor:void 0)||l.color),h=a(f+"ticks",!n&&i.outerTicks||c||u||v?"outside":"");h||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)},xw=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]]},Ns=ke,SC=Ht,ri=function(e,r,a){var i=a.name,n=a.inclusionAttr||"visible",o=r[i],l=Ns.isArrayOrTypedArray(e[i])?e[i]:[],s=r[i]=[],f=SC.arrayTemplater(r,i,n),c,u;for(c=0;c<l.length;c++){var v=l[c];Ns.isPlainObject(v)?u=f.newItem(v):(u=f.newItem({}),u[n]=!1),u._index=c,u[n]!==!1&&a.handleItemDefaults(v,u,r,a),s.push(u)}var h=f.defaultItems();for(c=0;c<h.length;c++)u=h[c],u._index=s.length,a.handleItemDefaults({},u,r,a,{}),s.push(u);if(Ns.isArrayOrTypedArray(o)){var d=Math.min(o.length,s.length);for(c=0;c<d;c++)Ns.relinkPrivateKeys(s[c],o[c])}return s},Nd=ke,LC=yt.contrast,_w=ti,CC=xw,DC=ri,ww=function(e,r,a,i,n){n||(n={});var o=a("labelalias");Nd.isPlainObject(o)||delete r.labelalias;var l=CC(e),s=a("showticklabels");if(s){n.noTicklabelshift||a("ticklabelshift"),n.noTicklabelstandoff||a("ticklabelstandoff");var f=n.font||{},c=r.color,u=r.ticklabelposition||"",v=u.indexOf("inside")!==-1?LC(n.bgColor):c&&c!==_w.color.dflt?c:f.color;if(Nd.coerceFont(a,"tickfont",f,{overrideDflt:{color:v}}),!n.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&a("ticklabelstep"),!n.noAng){var h=a("tickangle");!n.noAutotickangles&&h==="auto"&&a("autotickangles")}if(i!=="category"){var d=a("tickformat");DC(e,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:PC}),r.tickformatstops.length||delete r.tickformatstops,!n.noExp&&!d&&i!=="date"&&(a("showexponent",l),a("exponentformat"),a("minexponent"),a("separatethousands"))}!n.noMinorloglabels&&i==="log"&&a("minorloglabels")}};function PC(t,e){function r(i,n){return Nd.coerce(t,e,_w.tickformatstops,i,n)}var a=r("enabled");a&&(r("dtickrange"),r("value"))}var EC=xw,Tw=function(e,r,a,i,n){n||(n={});var o=n.tickSuffixDflt,l=EC(e),s=a("tickprefix");s&&a("showtickprefix",l);var f=a("ticksuffix",o);f&&a("showticksuffix",l)},xi=ke,zC=Ht,RC=gw,IC=bw,FC=ww,NC=Tw,$C=ip,kw=function(e,r,a){var i=zC.newContainer(r,"colorbar"),n=e.colorbar||{};function o(L,z){return xi.coerce(n,i,$C,L,z)}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"),u=c==="v",v=o("thicknessmode");o("thickness",v==="fraction"?30/(u?s:f):30);var h=o("lenmode");o("len",h==="fraction"?1:u?f:s);var d=o("yref"),p=o("xref"),m=d==="paper",y=p==="paper",b,_,g,x="left";u?(g="middle",x=y?"left":"right",b=y?1.02:1,_=.5):(g=m?"bottom":"top",x="center",b=.5,_=m?1.02:1),xi.coerce(n,i,{x:{valType:"number",min:y?-2:0,max:y?3:1,dflt:b}},"x"),xi.coerce(n,i,{y:{valType:"number",min:m?-2:0,max:m?3:1,dflt:_}},"y"),o("xanchor",x),o("xpad"),o("yanchor",g),o("ypad"),xi.noneOrAll(n,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var w=xi.coerce(n,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",w.indexOf("inside")!==-1?"hide past domain":"hide past div"),RC(n,i,o,"linear");var T=a.font,A={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,font:T};w.indexOf("inside")!==-1&&(A.bgColor="black"),NC(n,i,o,"linear",A),FC(n,i,o,"linear",A),IC(n,i,o,"linear"),o("title.text",a._dfltTitle.colorbar);var M=i.showticklabels?i.tickfont:T,S=xi.extendFlat({},T,{family:M.family,size:xi.bigFont(M.size)});xi.coerceFont(o,"title.font",S),o("title.side",u?"top":"right")},dy=kt,$d=ke,HC=mw,OC=kw,hy=jo.isValid,jC=ot.traceIs;function Ou(t,e){var r=e.slice(0,e.length-1);return e?$d.nestedProperty(t,r).get()||{}:t}var xs=function t(e,r,a,i,n){var o=n.prefix,l=n.cLetter,s="_module"in r,f=Ou(e,o),c=Ou(r,o),u=Ou(r._template||{},o)||{},v=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=jC(r,"contour")&&$d.nestedProperty(r,"contours.coloring").get()||"heatmap",m=h[d];m?(m[2].push(v),m[0]!==p&&(m[0]=!1,$d.warn(["Ignoring coloraxis:",d,"setting","as it is linked to incompatible colorscales."].join(" ")))):h[d]=[p,r,[v]];return}}var y=f[l+"min"],b=f[l+"max"],_=dy(y)&&dy(b)&&y<b,g=i(o+l+"auto",!_);g?i(o+l+"mid"):(i(o+l+"min"),i(o+l+"max"));var x=f.colorscale,w=u.colorscale,T;if(x!==void 0&&(T=!hy(x)),w!==void 0&&(T=!hy(w)),i(o+"autocolorscale",T),i(o+"colorscale"),i(o+"reversescale"),o!=="marker.line."){var A;o&&s&&(A=HC(f));var M=i(o+"showscale",A);M&&(o&&u&&(c._template=u),OC(f,c,a))}},py=ke,BC=Ht,my=pw,GC=xs,UC=function(e,r){function a(u,v){return py.coerce(e,r,my,u,v)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var i=r._colorAxes,n,o;function l(u,v){return py.coerce(n,o,my.coloraxis,u,v)}for(var s in i){var f=i[s];if(f[0])n=e[s]||{},o=BC.newContainer(r,s,"coloraxis"),o._name=s,GC(n,o,r,l,{prefix:"",cLetter:"c"});else{for(var c=0;c<f[2].length;c++)f[2][c]();delete r._colorAxes[s]}}},VC=ke,WC=ja.hasColorscale,XC=ja.extractOpts,YC=function(e,r){function a(c,u){var v=c["_"+u];v!==void 0&&(c[u]=v)}function i(c,u){var v=u.container?VC.nestedProperty(c,u.container).get():c;if(v)if(v.coloraxis)v._colorAx=r[v.coloraxis];else{var h=XC(v),d=h.auto;(d||h.min===void 0)&&a(v,u.min),(d||h.max===void 0)&&a(v,u.max),h.autocolorscale&&a(v,"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);WC(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"})},yy=kt,ju=ke,qC=ja.extractOpts,np=function(e,r,a){var i=e._fullLayout,n=a.vals,o=a.containerStr,l=o?ju.nestedProperty(r,o).get():r,s=qC(l),f=s.auto!==!1,c=s.min,u=s.max,v=s.mid,h=function(){return ju.aggNums(Math.min,null,n)},d=function(){return ju.aggNums(Math.max,null,n)};if(c===void 0?c=h():f&&(l._colorAx&&yy(c)?c=Math.min(c,h()):c=h()),u===void 0?u=d():f&&(l._colorAx&&yy(u)?u=Math.max(u,d()):u=d()),f&&v!==void 0&&(u-v>v-c?c=v-(u-v):u-v<v-c&&(u=v+(v-c))),c===u&&(c-=.5,u+=.5),s._sync("min",c),s._sync("max",u),s.autocolorscale){var p;c*u<0?p=i.colorscale.diverging:c>=0?p=i.colorscale.sequential:p=i.colorscale.sequentialminus,s._sync("colorscale",p)}},$s=jo,Hn=ja,Co={moduleType:"component",name:"colorscale",attributes:In,layoutAttributes:pw,supplyLayoutDefaults:UC,handleDefaults:xs,crossTraceDefaults:YC,calc:np,scales:$s.scales,defaultScale:$s.defaultScale,getScale:$s.get,isValidScale:$s.isValid,hasColorscale:Hn.hasColorscale,extractOpts:Hn.extractOpts,extractScale:Hn.extractScale,flipScale:Hn.flipScale,makeColorScaleFunc:Hn.makeColorScaleFunc,makeColorScaleFuncFromTrace:Hn.makeColorScaleFuncFromTrace},gy=ke,ZC=fr.isTypedArraySpec,jr={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){var e=t.marker;return gy.isPlainObject(e)&&(gy.isArrayOrTypedArray(e.size)||ZC(e.size))}},KC=kt,Aw=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 KC(s)&&s>0?Math.max(s,n):0}},wa={};(function(t){var e=ke;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||[],u=0;u<f.length;u++)for(var v=0;v<c.length;v++)if(s.indexOf(f[u]+c[v])!==-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=1/0,u=l.length,v=0;v<u;v++)c=s(l[v]),c<=f.distance&&(f.index=v,f.distance=c);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),u=s(f);return Math.sqrt(c*c+u*u)}},t.makeEventData=function(l,s,f){var c="index"in l?l.index:l.pointNumber,u={data:s._input,fullData:s,curveNumber:s.index,pointNumber:c};if(s._indexToPoints){var v=s._indexToPoints[c];v.length===1?u.pointIndex=v[0]:u.pointIndices=v}else u.pointIndex=c;return s._module.eventData?u=s._module.eventData(u,l,s,f,c):("xVal"in l?u.x=l.xVal:"x"in l&&(u.x=l.x),"yVal"in l?u.y=l.yVal:"y"in l&&(u.y=l.y),l.xa&&(u.xaxis=l.xa),l.ya&&(u.yaxis=l.ya),l.zLabelVal!==void 0&&(u.z=l.zLabelVal)),t.appendArrayPointValue(u,s,c),u},t.appendArrayPointValue=function(l,s,f){var c=s._arrayAttrs;if(c)for(var u=0;u<c.length;u++){var v=c[u],h=a(v);if(l[h]===void 0){var d=e.nestedProperty(s,v).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 u=0;u<c.length;u++){var v=c[u],h=a(v);if(l[h]===void 0){for(var d=e.nestedProperty(s,v).get(),p=new Array(f.length),m=0;m<f.length;m++)p[m]=i(d,f[m]);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]}})(wa);var Bu,by;function QC(){if(by)return Bu;by=1;var t=U1,e=function(d,p){return p?Math.round(d*(p=Math.pow(10,p)))/p:Math.round(d)},r="M0,0Z",a=Math.sqrt(2),i=Math.sqrt(3),n=Math.PI,o=Math.cos,l=Math.sin;Bu={circle:{n:0,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b="M"+y+",0A"+y+","+y+" 0 1,1 0,-"+y+"A"+y+","+y+" 0 0,1 "+y+",0Z";return m?h(p,m,b):b}},square:{n:1,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"H-"+y+"V-"+y+"H"+y+"Z")}},diamond:{n:2,f:function(d,p,m){if(s(p))return r;var y=e(d*1.3,2);return h(p,m,"M"+y+",0L0,"+y+"L-"+y+",0L0,-"+y+"Z")}},cross:{n:3,f:function(d,p,m){if(s(p))return r;var y=e(d*.4,2),b=e(d*1.2,2);return h(p,m,"M"+b+","+y+"H"+y+"V"+b+"H-"+y+"V"+y+"H-"+b+"V-"+y+"H-"+y+"V-"+b+"H"+y+"V-"+y+"H"+b+"Z")}},x:{n:4,f:function(d,p,m){if(s(p))return r;var y=e(d*.8/a,2),b="l"+y+","+y,_="l"+y+",-"+y,g="l-"+y+",-"+y,x="l-"+y+","+y;return h(p,m,"M0,"+y+b+_+g+_+g+x+g+x+b+x+b+"Z")}},"triangle-up":{n:5,f:function(d,p,m){if(s(p))return r;var y=e(d*2/i,2),b=e(d/2,2),_=e(d,2);return h(p,m,"M-"+y+","+b+"H"+y+"L0,-"+_+"Z")}},"triangle-down":{n:6,f:function(d,p,m){if(s(p))return r;var y=e(d*2/i,2),b=e(d/2,2),_=e(d,2);return h(p,m,"M-"+y+",-"+b+"H"+y+"L0,"+_+"Z")}},"triangle-left":{n:7,f:function(d,p,m){if(s(p))return r;var y=e(d*2/i,2),b=e(d/2,2),_=e(d,2);return h(p,m,"M"+b+",-"+y+"V"+y+"L-"+_+",0Z")}},"triangle-right":{n:8,f:function(d,p,m){if(s(p))return r;var y=e(d*2/i,2),b=e(d/2,2),_=e(d,2);return h(p,m,"M-"+b+",-"+y+"V"+y+"L"+_+",0Z")}},"triangle-ne":{n:9,f:function(d,p,m){if(s(p))return r;var y=e(d*.6,2),b=e(d*1.2,2);return h(p,m,"M-"+b+",-"+y+"H"+y+"V"+b+"Z")}},"triangle-se":{n:10,f:function(d,p,m){if(s(p))return r;var y=e(d*.6,2),b=e(d*1.2,2);return h(p,m,"M"+y+",-"+b+"V"+y+"H-"+b+"Z")}},"triangle-sw":{n:11,f:function(d,p,m){if(s(p))return r;var y=e(d*.6,2),b=e(d*1.2,2);return h(p,m,"M"+b+","+y+"H-"+y+"V-"+b+"Z")}},"triangle-nw":{n:12,f:function(d,p,m){if(s(p))return r;var y=e(d*.6,2),b=e(d*1.2,2);return h(p,m,"M-"+y+","+b+"V-"+y+"H"+b+"Z")}},pentagon:{n:13,f:function(d,p,m){if(s(p))return r;var y=e(d*.951,2),b=e(d*.588,2),_=e(-d,2),g=e(d*-.309,2),x=e(d*.809,2);return h(p,m,"M"+y+","+g+"L"+b+","+x+"H-"+b+"L-"+y+","+g+"L0,"+_+"Z")}},hexagon:{n:14,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d/2,2),_=e(d*i/2,2);return h(p,m,"M"+_+",-"+b+"V"+b+"L0,"+y+"L-"+_+","+b+"V-"+b+"L0,-"+y+"Z")}},hexagon2:{n:15,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d/2,2),_=e(d*i/2,2);return h(p,m,"M-"+b+","+_+"H"+b+"L"+y+",0L"+b+",-"+_+"H-"+b+"L-"+y+",0Z")}},octagon:{n:16,f:function(d,p,m){if(s(p))return r;var y=e(d*.924,2),b=e(d*.383,2);return h(p,m,"M-"+b+",-"+y+"H"+b+"L"+y+",-"+b+"V"+b+"L"+b+","+y+"H-"+b+"L-"+y+","+b+"V-"+b+"Z")}},star:{n:17,f:function(d,p,m){if(s(p))return r;var y=d*1.4,b=e(y*.225,2),_=e(y*.951,2),g=e(y*.363,2),x=e(y*.588,2),w=e(-y,2),T=e(y*-.309,2),A=e(y*.118,2),M=e(y*.809,2),S=e(y*.382,2);return h(p,m,"M"+b+","+T+"H"+_+"L"+g+","+A+"L"+x+","+M+"L0,"+S+"L-"+x+","+M+"L-"+g+","+A+"L-"+_+","+T+"H-"+b+"L0,"+w+"Z")}},hexagram:{n:18,f:function(d,p,m){if(s(p))return r;var y=e(d*.66,2),b=e(d*.38,2),_=e(d*.76,2);return h(p,m,"M-"+_+",0l-"+b+",-"+y+"h"+_+"l"+b+",-"+y+"l"+b+","+y+"h"+_+"l-"+b+","+y+"l"+b+","+y+"h-"+_+"l-"+b+","+y+"l-"+b+",-"+y+"h-"+_+"Z")}},"star-triangle-up":{n:19,f:function(d,p,m){if(s(p))return r;var y=e(d*i*.8,2),b=e(d*.8,2),_=e(d*1.6,2),g=e(d*4,2),x="A "+g+","+g+" 0 0 1 ";return h(p,m,"M-"+y+","+b+x+y+","+b+x+"0,-"+_+x+"-"+y+","+b+"Z")}},"star-triangle-down":{n:20,f:function(d,p,m){if(s(p))return r;var y=e(d*i*.8,2),b=e(d*.8,2),_=e(d*1.6,2),g=e(d*4,2),x="A "+g+","+g+" 0 0 1 ";return h(p,m,"M"+y+",-"+b+x+"-"+y+",-"+b+x+"0,"+_+x+y+",-"+b+"Z")}},"star-square":{n:21,f:function(d,p,m){if(s(p))return r;var y=e(d*1.1,2),b=e(d*2,2),_="A "+b+","+b+" 0 0 1 ";return h(p,m,"M-"+y+",-"+y+_+"-"+y+","+y+_+y+","+y+_+y+",-"+y+_+"-"+y+",-"+y+"Z")}},"star-diamond":{n:22,f:function(d,p,m){if(s(p))return r;var y=e(d*1.4,2),b=e(d*1.9,2),_="A "+b+","+b+" 0 0 1 ";return h(p,m,"M-"+y+",0"+_+"0,"+y+_+y+",0"+_+"0,-"+y+_+"-"+y+",0Z")}},"diamond-tall":{n:23,f:function(d,p,m){if(s(p))return r;var y=e(d*.7,2),b=e(d*1.4,2);return h(p,m,"M0,"+b+"L"+y+",0L0,-"+b+"L-"+y+",0Z")}},"diamond-wide":{n:24,f:function(d,p,m){if(s(p))return r;var y=e(d*1.4,2),b=e(d*.7,2);return h(p,m,"M0,"+b+"L"+y+",0L0,-"+b+"L-"+y+",0Z")}},hourglass:{n:25,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"H-"+y+"L"+y+",-"+y+"H-"+y+"Z")},noDot:!0},bowtie:{n:26,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"V-"+y+"L-"+y+","+y+"V-"+y+"Z")},noDot:!0},"circle-cross":{n:27,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M0,"+y+"V-"+y+"M"+y+",0H-"+y+"M"+y+",0A"+y+","+y+" 0 1,1 0,-"+y+"A"+y+","+y+" 0 0,1 "+y+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d/a,2);return h(p,m,"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b+"M"+y+",0A"+y+","+y+" 0 1,1 0,-"+y+"A"+y+","+y+" 0 0,1 "+y+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M0,"+y+"V-"+y+"M"+y+",0H-"+y+"M"+y+","+y+"H-"+y+"V-"+y+"H"+y+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"L-"+y+",-"+y+"M"+y+",-"+y+"L-"+y+","+y+"M"+y+","+y+"H-"+y+"V-"+y+"H"+y+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(d,p,m){if(s(p))return r;var y=e(d*1.3,2);return h(p,m,"M"+y+",0L0,"+y+"L-"+y+",0L0,-"+y+"ZM0,-"+y+"V"+y+"M-"+y+",0H"+y)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(d,p,m){if(s(p))return r;var y=e(d*1.3,2),b=e(d*.65,2);return h(p,m,"M"+y+",0L0,"+y+"L-"+y+",0L0,-"+y+"ZM-"+b+",-"+b+"L"+b+","+b+"M-"+b+","+b+"L"+b+",-"+b)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(d,p,m){if(s(p))return r;var y=e(d*1.4,2);return h(p,m,"M0,"+y+"V-"+y+"M"+y+",0H-"+y)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"L-"+y+",-"+y+"M"+y+",-"+y+"L-"+y+","+y)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(d,p,m){if(s(p))return r;var y=e(d*1.2,2),b=e(d*.85,2);return h(p,m,"M0,"+y+"V-"+y+"M"+y+",0H-"+y+"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(d,p,m){if(s(p))return r;var y=e(d/2,2),b=e(d,2);return h(p,m,"M"+y+","+b+"V-"+b+"M"+(y-b)+",-"+b+"V"+b+"M"+b+","+y+"H-"+b+"M-"+b+","+(y-b)+"H"+b)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(d,p,m){if(s(p))return r;var y=e(d*1.2,2),b=e(d*1.6,2),_=e(d*.8,2);return h(p,m,"M-"+y+","+_+"L0,0M"+y+","+_+"L0,0M0,-"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(d,p,m){if(s(p))return r;var y=e(d*1.2,2),b=e(d*1.6,2),_=e(d*.8,2);return h(p,m,"M-"+y+",-"+_+"L0,0M"+y+",-"+_+"L0,0M0,"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(d,p,m){if(s(p))return r;var y=e(d*1.2,2),b=e(d*1.6,2),_=e(d*.8,2);return h(p,m,"M"+_+","+y+"L0,0M"+_+",-"+y+"L0,0M-"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(d,p,m){if(s(p))return r;var y=e(d*1.2,2),b=e(d*1.6,2),_=e(d*.8,2);return h(p,m,"M-"+_+","+y+"L0,0M-"+_+",-"+y+"L0,0M"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(d,p,m){if(s(p))return r;var y=e(d*1.4,2);return h(p,m,"M"+y+",0H-"+y)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(d,p,m){if(s(p))return r;var y=e(d*1.4,2);return h(p,m,"M0,"+y+"V-"+y)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+",-"+y+"L-"+y+","+y)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"L-"+y+",-"+y)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d*2,2);return h(p,m,"M0,0L-"+y+","+b+"H"+y+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d*2,2);return h(p,m,"M0,0L-"+y+",-"+b+"H"+y+"Z")},noDot:!0},"arrow-left":{n:47,f:function(d,p,m){if(s(p))return r;var y=e(d*2,2),b=e(d,2);return h(p,m,"M0,0L"+y+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-right":{n:48,f:function(d,p,m){if(s(p))return r;var y=e(d*2,2),b=e(d,2);return h(p,m,"M0,0L-"+y+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d*2,2);return h(p,m,"M-"+y+",0H"+y+"M0,0L-"+y+","+b+"H"+y+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d*2,2);return h(p,m,"M-"+y+",0H"+y+"M0,0L-"+y+",-"+b+"H"+y+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(d,p,m){if(s(p))return r;var y=e(d*2,2),b=e(d,2);return h(p,m,"M0,-"+b+"V"+b+"M0,0L"+y+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(d,p,m){if(s(p))return r;var y=e(d*2,2),b=e(d,2);return h(p,m,"M0,-"+b+"V"+b+"M0,0L-"+y+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(d,p,m){if(s(p))return r;var y=n/2.5,b=2*d*o(y),_=2*d*l(y);return h(p,m,"M0,0L"+-b+","+_+"L"+b+","+_+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(d,p,m){if(s(p))return r;var y=n/4,b=2*d*o(y),_=2*d*l(y);return h(p,m,"M0,0L"+-b+","+_+"A "+2*d+","+2*d+" 0 0 1 "+b+","+_+"Z")},backoff:.4,noDot:!0}};function s(d){return d===null}var f,c,u,v;function h(d,p,m){if((!d||d%360===0)&&!p)return m;if(u===d&&v===p&&f===m)return c;u=d,v=p,f=m;function y($,R){var H=o($),D=l($),P=R[0],k=R[1]+(p||0);return[P*H-k*D,P*D+k*H]}for(var b=d/180*n,_=0,g=0,x=t(m),w="",T=0;T<x.length;T++){var A=x[T],M=A[0],S=_,L=g;if(M==="M"||M==="L")_=+A[1],g=+A[2];else if(M==="m"||M==="l")_+=+A[1],g+=+A[2];else if(M==="H")_=+A[1];else if(M==="h")_+=+A[1];else if(M==="V")g=+A[1];else if(M==="v")g+=+A[1];else if(M==="A"){_=+A[1],g=+A[2];var z=y(b,[+A[6],+A[7]]);A[6]=z[0],A[7]=z[1],A[3]=+A[3]+d}(M==="H"||M==="V")&&(M="L"),(M==="h"||M==="v")&&(M="l"),(M==="m"||M==="l")&&(_-=S,g-=L);var N=y(b,[_,g]);(M==="H"||M==="V")&&(M="L"),(M==="M"||M==="L"||M==="m"||M==="l")&&(A[1]=N[0],A[2]=N[1]),A[0]=M,w+=A[0]+A.slice(1).join(",")}return c=w,w}return Bu}var wr=bt,$t=ke,JC=$t.numberFormat,Tn=kt,Hd=$a,qc=ot,Pr=yt,eD=Co,Xl=$t.strTranslate,Zc=Tr,tD=Yo,rD=Vr,aD=rD.LINE_SPACING,Mw=ms.DESELECTDIM,iD=jr,nD=Aw,oD=wa.appendArrayPointValue,Be=nw.exports={};Be.font=function(t,e){var r=e.variant,a=e.style,i=e.weight,n=e.color,o=e.size,l=e.family,s=e.shadow,f=e.lineposition,c=e.textcase;l&&t.style("font-family",l),o+1&&t.style("font-size",o+"px"),n&&t.call(Pr.fill,n),i&&t.style("font-weight",i),a&&t.style("font-style",a),r&&t.style("font-variant",r),c&&t.style("text-transform",Gu(sD(c))),s&&t.style("text-shadow",s==="auto"?Zc.makeTextShadow(Pr.contrast(n)):Gu(s)),f&&t.style("text-decoration-line",Gu(fD(f)))};function Gu(t){return t==="none"?void 0:t}var lD={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function sD(t){return lD[t]}function fD(t){return t.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Be.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)};Be.setSize=function(t,e,r){t.attr("width",e).attr("height",r)};Be.setRect=function(t,e,r,a,i){t.call(Be.setPosition,e,r).call(Be.setSize,a,i)};Be.translatePoint=function(t,e,r,a){var i=r.c2p(t.x),n=a.c2p(t.y);if(Tn(i)&&Tn(n)&&e.node())e.node().nodeName==="text"?e.attr("x",i).attr("y",n):e.attr("transform",Xl(i,n));else return!1;return!0};Be.translatePoints=function(t,e,r){t.each(function(a){var i=wr.select(this);Be.translatePoint(a,i,e,r)})};Be.hideOutsideRangePoint=function(t,e,r,a,i,n){e.attr("display",r.isPtWithinRange(t,i)&&a.isPtWithinRange(t,n)?null:"none")};Be.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=qc.traceIs(n,"bar-like")?".bartext":".point,.textpoint";t.selectAll(s).each(function(f){Be.hideOutsideRangePoint(f,wr.select(this),r,a,o,l)})})}};Be.crispRound=function(t,e,r){return!e||!Tn(e)?r||0:t._context.staticPlot?e:e<1?1:Math.round(e)};Be.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||"";Pr.stroke(e,a||n.color),Be.dashLine(e,l,o)};Be.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||"";wr.select(this).call(Pr.stroke,r||n.color).call(Be.dashLine,l,o)})};Be.dashLine=function(t,e,r){r=+r||0,e=Be.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})};Be.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 Sw(t,e,r,a){var i=e.fillpattern,n=e.fillgradient,o=Be.getPatternAttr,l=i&&(o(i.shape,0,"")||o(i.path,0,""));if(l){var s=o(i.bgcolor,0,null),f=o(i.fgcolor,0,null),c=i.fgopacity,u=o(i.size,0,8),v=o(i.solidity,0,.3),h=e.uid;Be.pattern(t,"point",r,h,l,u,v,void 0,i.fillmode,s,f,c)}else if(n&&n.type!=="none"){var d=n.type,p="scatterfill-"+e.uid;if(a&&(p="legendfill-"+e.uid),!a&&(n.start!==void 0||n.stop!==void 0)){var m,y;d==="horizontal"?(m={x:n.start,y:0},y={x:n.stop,y:0}):d==="vertical"&&(m={x:0,y:n.start},y={x:0,y:n.stop}),m.x=e._xA.c2p(m.x===void 0?e._extremes.x.min[0].val:m.x,!0),m.y=e._yA.c2p(m.y===void 0?e._extremes.y.min[0].val:m.y,!0),y.x=e._xA.c2p(y.x===void 0?e._extremes.x.max[0].val:y.x,!0),y.y=e._yA.c2p(y.y===void 0?e._extremes.y.max[0].val:y.y,!0),t.call(Dw,r,p,"linear",n.colorscale,"fill",m,y,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),t.call(Be.gradient,r,p,d,n.colorscale,"fill")}else e.fillcolor&&t.call(Pr.fill,e.fillcolor)}Be.singleFillStyle=function(t,e){var r=wr.select(t.node()),a=r.data(),i=((a[0]||[])[0]||{}).trace||{};Sw(t,i,e,!1)};Be.fillGroupStyle=function(t,e,r){t.style("stroke-width",0).each(function(a){var i=wr.select(this);a[0].trace&&Sw(i,a[0].trace,e,r)})};var xy=QC();Be.symbolNames=[];Be.symbolFuncs=[];Be.symbolBackOffs=[];Be.symbolNeedLines={};Be.symbolNoDot={};Be.symbolNoFill={};Be.symbolList=[];Object.keys(xy).forEach(function(t){var e=xy[t],r=e.n;Be.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),Be.symbolNames[r]=t,Be.symbolFuncs[r]=e.f,Be.symbolBackOffs[r]=e.backoff||0,e.needLine&&(Be.symbolNeedLines[r]=!0),e.noDot?Be.symbolNoDot[r]=!0:Be.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(Be.symbolNoFill[r]=!0)});var cD=Be.symbolNames.length,uD="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Be.symbolNumber=function(t){if(Tn(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=Be.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=cD||t>=400?0:Math.floor(Math.max(t,0))};function Lw(t,e,r,a){var i=t%100;return Be.symbolFuncs[i](e,r,a)+(t>=200?uD:"")}var _y=JC("~f"),Cw={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};Be.gradient=function(t,e,r,a,i,n){var o=Cw[a];return Dw(t,e,r,o.type,i,n,o.start,o.stop,!1,o.reversed)};function Dw(t,e,r,a,i,n,o,l,s,f){var c=i.length,u;a==="linear"?u={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:l.x,y2:l.y,gradientUnits:s?"userSpaceOnUse":"objectBoundingBox"},reversed:f}:a==="radial"&&(u={node:"radialGradient",reversed:f});for(var v=new Array(c),h=0;h<c;h++)u.reversed?v[c-1-h]=[_y((1-i[h][0])*100),i[h][1]]:v[h]=[_y(i[h][0]*100),i[h][1]];var d=e._fullLayout,p="g"+d._uid+"-"+r,m=d._defs.select(".gradients").selectAll("#"+p).data([a+v.join(";")],$t.identity);m.exit().remove(),m.enter().append(u.node).each(function(){var y=wr.select(this);u.attrs&&y.attr(u.attrs),y.attr("id",p);var b=y.selectAll("stop").data(v);b.exit().remove(),b.enter().append("stop"),b.each(function(_){var g=Hd(_[1]);wr.select(this).attr({offset:_[0]+"%","stop-color":Pr.tinyRGB(g),"stop-opacity":g.getAlpha()})})}),t.style(n,op(p,e)).style(n+"-opacity",null),t.classed("gradient_filled",!0)}Be.pattern=function(t,e,r,a,i,n,o,l,s,f,c,u){var v=e==="legend";l&&(s==="overlay"?(f=l,c=Pr.contrast(f)):(f=void 0,c=l));var h=r._fullLayout,d="p"+h._uid+"-"+a,p,m,y=function(N,$,R,H,D){return H+(D-H)*(N-$)/(R-$)},b,_,g,x,w={},T=Hd(c),A=Pr.tinyRGB(T),M=T.getAlpha(),S=u*M;switch(i){case"/":p=n*Math.sqrt(2),m=n*Math.sqrt(2),b="M-"+p/4+","+m/4+"l"+p/2+",-"+m/2+"M0,"+m+"L"+p+",0M"+p/4*3+","+m/4*5+"l"+p/2+",-"+m/2,_=o*n,x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case"\\":p=n*Math.sqrt(2),m=n*Math.sqrt(2),b="M"+p/4*3+",-"+m/4+"l"+p/2+","+m/2+"M0,0L"+p+","+m+"M-"+p/4+","+m/4*3+"l"+p/2+","+m/2,_=o*n,x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case"x":p=n*Math.sqrt(2),m=n*Math.sqrt(2),b="M-"+p/4+","+m/4+"l"+p/2+",-"+m/2+"M0,"+m+"L"+p+",0M"+p/4*3+","+m/4*5+"l"+p/2+",-"+m/2+"M"+p/4*3+",-"+m/4+"l"+p/2+","+m/2+"M0,0L"+p+","+m+"M-"+p/4+","+m/4*3+"l"+p/2+","+m/2,_=n-n*Math.sqrt(1-o),x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case"|":p=n,m=n,x="path",b="M"+p/2+",0L"+p/2+","+m,_=o*n,x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case"-":p=n,m=n,x="path",b="M0,"+m/2+"L"+p+","+m/2,_=o*n,x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case"+":p=n,m=n,x="path",b="M"+p/2+",0L"+p/2+","+m+"M0,"+m/2+"L"+p+","+m/2,_=n-n*Math.sqrt(1-o),x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case".":p=n,m=n,o<Math.PI/4?g=Math.sqrt(o*n*n/Math.PI):g=y(o,Math.PI/4,1,n/2,n/Math.sqrt(2)),x="circle",w={cx:p/2,cy:m/2,r:g,opacity:S,fill:A};break;default:p=n,m=n,x="path",w={d:i,opacity:S,fill:A};break}var L=[i||"noSh",f||"noBg",c||"noFg",n,o].join(";"),z=h._defs.select(".patterns").selectAll("#"+d).data([L],$t.identity);z.exit().remove(),z.enter().append("pattern").each(function(){var N=wr.select(this);if(N.attr({id:d,width:p+"px",height:m+"px",patternUnits:"userSpaceOnUse",patternTransform:v?"scale(0.8)":""}),f){var $=Hd(f),R=Pr.tinyRGB($),H=$.getAlpha(),D=N.selectAll("rect").data([0]);D.exit().remove(),D.enter().append("rect").attr({width:p+"px",height:m+"px",fill:R,"fill-opacity":H})}var P=N.selectAll(x).data([0]);P.exit().remove(),P.enter().append(x).attr(w)}),t.style("fill",op(d,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)};Be.initGradients=function(t){var e=t._fullLayout,r=$t.ensureSingle(e._defs,"g","gradients");r.selectAll("linearGradient,radialGradient").remove(),wr.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)};Be.initPatterns=function(t){var e=t._fullLayout,r=$t.ensureSingle(e._defs,"g","patterns");r.selectAll("pattern").remove(),wr.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)};Be.getPatternAttr=function(t,e,r){return t&&$t.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t};Be.pointStyle=function(t,e,r,a){if(t.size()){var i=Be.makePointStyleFns(e);t.each(function(n){Be.singlePointStyle(n,wr.select(this),e,i,r,a)})}};Be.singlePointStyle=function(t,e,r,a,i,n){var o=r.marker,l=o.line;if(n&&n.i>=0&&t.i===void 0&&(t.i=n.i),e.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(t):t.mo===void 0?o.opacity:t.mo),a.ms2mrc){var s;t.ms==="various"||o.size==="various"?s=3:s=a.ms2mrc(t.ms),t.mrc=s,a.selectedSizeFn&&(s=t.mrc=a.selectedSizeFn(t));var f=Be.symbolNumber(t.mx||o.symbol)||0;t.om=f%200>=100;var c=sp(t,r),u=lp(t,r);e.attr("d",Lw(f,s,c,u))}var v=!1,h,d,p;if(t.so)p=l.outlierwidth,d=l.outliercolor,h=o.outliercolor;else{var m=(l||{}).width;p=(t.mlw+1||m+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in t?d=t.mlcc=a.lineScale(t.mlc):$t.isArrayOrTypedArray(l.color)?d=Pr.defaultLine:d=l.color,$t.isArrayOrTypedArray(o.color)&&(h=Pr.defaultLine,v=!0),"mc"in t?h=t.mcc=a.markerScale(t.mc):h=o.color||o.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(h=a.selectedColorFn(t))}if(t.om)e.call(Pr.stroke,h).style({"stroke-width":(p||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:p)+"px");var y=o.gradient,b=t.mgt;b?v=!0:b=y&&y.type,$t.isArrayOrTypedArray(b)&&(b=b[0],Cw[b]||(b=0));var _=o.pattern,g=Be.getPatternAttr,x=_&&(g(_.shape,t.i,"")||g(_.path,t.i,""));if(b&&b!=="none"){var w=t.mgc;w?v=!0:w=y.color;var T=r.uid;v&&(T+="-"+t.i),Be.gradient(e,i,T,b,[[0,w],[1,h]],"fill")}else if(x){var A=!1,M=_.fgcolor;!M&&n&&n.color&&(M=n.color,A=!0);var S=g(M,t.i,n&&n.color||null),L=g(_.bgcolor,t.i,null),z=_.fgopacity,N=g(_.size,t.i,8),$=g(_.solidity,t.i,.3);A=A||t.mcc||$t.isArrayOrTypedArray(_.shape)||$t.isArrayOrTypedArray(_.path)||$t.isArrayOrTypedArray(_.bgcolor)||$t.isArrayOrTypedArray(_.fgcolor)||$t.isArrayOrTypedArray(_.size)||$t.isArrayOrTypedArray(_.solidity);var R=r.uid;A&&(R+="-"+t.i),Be.pattern(e,"point",i,R,x,N,$,t.mcc,_.fillmode,L,S,z)}else $t.isArrayOrTypedArray(h)?Pr.fill(e,h[t.i]):Pr.fill(e,h);p&&Pr.stroke(e,d)}};Be.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=Be.tryColorscale(r,""),e.lineScale=Be.tryColorscale(r,"line"),qc.traceIs(t,"symbols")&&(e.ms2mrc=iD.isBubble(t)?nD(t):function(){return(r.size||6)/2}),t.selectedpoints&&$t.extendFlat(e,Be.makeSelectedPointStyleFns(t)),e};Be.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,u=f!==void 0;($t.isArrayOrTypedArray(l)||c||u)&&(e.selectedOpacityFn=function(g){var x=g.mo===void 0?i.opacity:g.mo;return g.selected?c?s:x:u?f:Mw*x});var v=i.color,h=n.color,d=o.color;(h||d)&&(e.selectedColorFn=function(g){var x=g.mcc||v;return g.selected?h||x:d||x});var p=i.size,m=n.size,y=o.size,b=m!==void 0,_=y!==void 0;return qc.traceIs(t,"symbols")&&(b||_)&&(e.selectedSizeFn=function(g){var x=g.mrc||p/2;return g.selected?b?m/2:x:_?y/2:x}),e};Be.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 u=c.tc||l;return c.selected?s||u:f||(s?u:Pr.addOpacity(u,Mw))},e};Be.selectedPointStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Be.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){Pr.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",Lw(Be.symbolNumber(l),s,sp(o,e),lp(o,e))),o.mrc2=s}),i.length&&t.each(function(n){for(var o=wr.select(this),l=0;l<i.length;l++)i[l](o,n)})}};Be.tryColorscale=function(t,e){var r=e?$t.nestedProperty(t,e).get():t;if(r){var a=r.color;if((r.colorscale||r._colorAx)&&$t.isArrayOrTypedArray(a))return eD.makeColorScaleFuncFromTrace(r)}return $t.identity};var Uu={start:1,end:-1,middle:0,bottom:1,top:-1};function Pw(t,e,r,a,i){var n=wr.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=(Zc.lineCount(t)-1)*aD+1,c=Uu[l]*s,u=r*.75+Uu[o]*s+(Uu[o]-1)*f*r/2;t.attr("text-anchor",l),i||n.attr("transform",Xl(c,u))}function Ew(t,e){var r=t.ts||e.textfont.size;return Tn(r)&&r>0?r:0}Be.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var i=Be.makeSelectedTextStyleFns(e);a=i.selectedTextColorFn}var n=e.texttemplate,o=r._fullLayout;t.each(function(l){var s=wr.select(this),f=n?$t.extractOption(l,e,"txt","texttemplate"):$t.extractOption(l,e,"tx","text");if(!f&&f!==0){s.remove();return}if(n){var c=e._module.formatLabels,u=c?c(l,e,o):{},v={};oD(v,e,l.i);var h=e._meta||{};f=$t.texttemplateString(f,u,o._d3locale,v,l,h)}var d=l.tp||e.textposition,p=Ew(l,e),m=a?a(l):l.tc||e.textfont.color;s.call(Be.font,{family:l.tf||e.textfont.family,weight:l.tw||e.textfont.weight,style:l.ty||e.textfont.style,variant:l.tv||e.textfont.variant,textcase:l.tC||e.textfont.textcase,lineposition:l.tE||e.textfont.lineposition,shadow:l.tS||e.textfont.shadow,size:p,color:m}).text(f).call(Zc.convertToTspans,r).call(Pw,d,p,l.mrc)})}};Be.selectedTextStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Be.makeSelectedTextStyleFns(e);t.each(function(a){var i=wr.select(this),n=r.selectedTextColorFn(a),o=a.tp||e.textposition,l=Ew(a,e);Pr.fill(i,n);var s=qc.traceIs(e,"bar-like");Pw(i,o,l,a.mrc2||a.mrc,s)})}};var wy=.5;Be.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(If(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};Be.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r="M"+t[0],a=t.length-1,i=[If(t[a],t[0],t[1],e)],n;for(n=1;n<a;n++)i.push(If(t[n-1],t[n],t[n+1],e));for(i.push(If(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 zw,Rw;function ho(t,e,r){return r&&(t=Iw(t)),e?yn(t[1]):mn(t[0])}function mn(t){var e=wr.round(t,2);return zw=e,e}function yn(t){var e=wr.round(t,2);return Rw=e,e}function If(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,wy/2),f=Math.pow(o*o+l*l,wy/2),c=(f*f*i-s*s*o)*a,u=(f*f*n-s*s*l)*a,v=3*f*(s+f),h=3*s*(s+f);return[[mn(e[0]+(v&&c/v)),yn(e[1]+(v&&u/v))],[mn(e[0]-(h&&c/h)),yn(e[1]-(h&&u/h))]]}var vD={hv:function(t,e,r){return"H"+mn(e[0])+"V"+ho(e,1,r)},vh:function(t,e,r){return"V"+yn(e[1])+"H"+ho(e,0,r)},hvh:function(t,e,r){return"H"+mn((t[0]+e[0])/2)+"V"+yn(e[1])+"H"+ho(e,0,r)},vhv:function(t,e,r){return"V"+yn((t[1]+e[1])/2)+"H"+mn(e[0])+"V"+ho(e,1,r)}},dD=function(t,e,r){return"L"+ho(e,0,r)+","+ho(e,1,r)};Be.steps=function(t){var e=vD[t]||dD;return function(r){for(var a="M"+mn(r[0][0])+","+yn(r[0][1]),i=r.length,n=1;n<i;n++)a+=e(r[n-1],r[n],n===i-1);return a}};function Iw(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=$t.isArrayOrTypedArray(r),l=t,s=e?e[0]:zw||0,f=e?e[1]:Rw||0,c=l[0],u=l[1],v=c-s,h=u-f,d=Math.atan2(h,v),p=o?r[n]:r;if(p==="auto"){var m=l.i;a.type==="scatter"&&m--;var y=l.marker,b=y.symbol;$t.isArrayOrTypedArray(b)&&(b=b[m]);var _=y.size;$t.isArrayOrTypedArray(_)&&(_=_[m]),p=y?Be.symbolBackOffs[Be.symbolNumber(b)]*_:0,p+=Be.getMarkerStandoff(i[m],a)||0}var g=c-p*Math.cos(d),x=u-p*Math.sin(d);(g<=c&&g>=s||g>=c&&g<=s)&&(x<=u&&x>=f||x>=u&&x<=f)&&(t=[g,x])}return t}Be.applyBackoff=Iw;Be.makeTester=function(){var t=$t.ensureSingleById(wr.select("body"),"svg","js-plotly-tester",function(r){r.attr(tD.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),e=$t.ensureSingle(t,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Be.tester=t,Be.testref=e};Be.savedBBoxes={};var Vu=0,hD=1e4;Be.bBox=function(t,e,r){r||(r=Ty(t));var a;if(r){if(a=Be.savedBBoxes[r],a)return $t.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=Be.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=Be.savedBBoxes[r],a)return $t.extendFlat({},a)}}var f,c;e?f=t:(c=Be.tester.node(),f=t.cloneNode(!0),c.appendChild(f)),wr.select(f).attr("transform",null).call(Zc.positionText,0,0);var u=f.getBoundingClientRect(),v=Be.testref.node().getBoundingClientRect();e||c.removeChild(f);var h={height:u.height,width:u.width,left:u.left-v.left,top:u.top-v.top,right:u.right-v.left,bottom:u.bottom-v.top};return Vu>=hD&&(Be.savedBBoxes={},Vu=0),r&&(Be.savedBBoxes[r]=h),Vu++,$t.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")}Be.setClipUrl=function(t,e,r){t.attr("clip-path",op(e,r))};function op(t,e){if(!t)return null;var r=e._context,a=r._exportedPlot?"":r._baseUrl||"";return a?"url('"+a+"#"+t+"')":"url(#"+t+")"}Be.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}};Be.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+=Xl(e,r),o=o.trim(),t[n]("transform",o),o};Be.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}};Be.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 pD=/\s*sc.*/;Be.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(pD,"");i+=a,i=i.trim(),this.setAttribute("transform",i)})}};var mD=/translate\([^)]*\)\s*$/;Be.setTextPointsScale=function(t,e,r){t&&t.each(function(){var a,i=wr.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(mD);e===1&&r===1?a=[]:a=[Xl(o,l),"scale("+e+","+r+")",Xl(-o,-l)],s&&a.push(s),i.attr("transform",a.join(""))}})};function lp(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}Be.getMarkerStandoff=lp;var sl=Math.atan2,fn=Math.cos,po=Math.sin;function ky(t,e){var r=e[0],a=e[1];return[r*fn(t)-a*po(t),r*po(t)+a*fn(t)]}var Ay,My,Sy,Ly,Wu,Xu;function sp(t,e){var r=t.ma;r===void 0&&(r=e.marker.angle,(!r||$t.isArrayOrTypedArray(r))&&(r=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],u=e._geo.project([f,c+1e-5]),v=e._geo.project([f+1e-5,c]),h=sl(v[1]-i,v[0]-a),d=sl(u[1]-i,u[0]-a),p;if(n==="north")p=r/180*Math.PI;else if(n==="previous"){var m=f/180*Math.PI,y=c/180*Math.PI,b=Ay/180*Math.PI,_=My/180*Math.PI,g=b-m,x=fn(_)*po(g),w=po(_)*fn(y)-fn(_)*po(y)*fn(g);p=-sl(x,w)-Math.PI,Ay=f,My=c}var T=ky(h,[fn(p),0]),A=ky(d,[po(p),0]);r=sl(T[1]+A[1],T[0]+A[0])/Math.PI*180,n==="previous"&&!(Xu===e.uid&&t.i===Wu+1)&&(r=null)}if(n==="previous"&&!e._geo)if(Xu===e.uid&&t.i===Wu+1&&Tn(a)&&Tn(i)){var M=a-Sy,S=i-Ly,L=e.line&&e.line.shape||"",z=L.slice(L.length-1);z==="h"&&(S=0),z==="v"&&(M=0),r+=sl(S,M)/Math.PI*180+90}else r=null}return Sy=a,Ly=i,Wu=t.i,Xu=e.uid,r}Be.getMarkerAngle=sp;var zt=nw.exports,On=bt,yD=kt,gD=hr,Yu=ot,on=ke,Cy=on.strTranslate,Hs=zt,Os=yt,jn=Tr,Dy=ms,bD=Vr.OPPOSITE_SIDE,Py=/ [XY][0-9]* /,Od=1.6,jd=1.6;function xD(t,e,r){var a=t._fullLayout,i=r.propContainer,n=r.propName,o=r.placeholder,l=r.traceIndex,s=r.avoid||{},f=r.attributes,c=r.transform,u=r.containerGroup,v=1,h=i.title,d=(h&&h.text?h.text:"").trim(),p=!1,m=h&&h.font?h.font:{},y=m.family,b=m.size,_=m.color,g=m.weight,x=m.style,w=m.variant,T=m.textcase,A=m.lineposition,M=m.shadow,S=r.subtitlePropName,L=!!S,z=r.subtitlePlaceholder,N=(i.title||{}).subtitle||{text:"",font:{}},$=N.text.trim(),R=!1,H=1,D=N.font,P=D.family,k=D.size,C=D.color,E=D.weight,I=D.style,j=D.variant,G=D.textcase,X=D.lineposition,O=D.shadow,Z;n==="title.text"?Z="titleText":n.indexOf("axis")!==-1?Z="axisTitleText":n.indexOf("colorbar")!==-1&&(Z="colorbarTitleText");var V=t._context.edits[Z];function q(be,Le){return be===void 0||Le===void 0?!1:be.replace(Py," % ")===Le.replace(Py," % ")}d===""?v=0:q(d,o)&&(V||(d=""),v=.2,p=!0),L&&($===""?H=0:q($,z)&&(V||($=""),H=.2,R=!0)),r._meta?d=on.templateString(d,r._meta):a._meta&&(d=on.templateString(d,a._meta));var B=d||$||V,J;u||(u=on.ensureSingle(a._infolayer,"g","g-"+e),J=a._hColorbarMoveTitle);var ie=u.selectAll("text."+e).data(B?[0]:[]);ie.enter().append("text"),ie.text(d).attr("class",e),ie.exit().remove();var de=null,oe=e+"-subtitle",Y=$||V;if(L&&Y&&(de=u.selectAll("text."+oe).data(Y?[0]:[]),de.enter().append("text"),de.text($).attr("class",oe),de.exit().remove()),!B)return u;function ee(be,Le){on.syncOrAsync([le,ue],{title:be,subtitle:Le})}function le(be){var Le=be.title,ve=be.subtitle,Te;!c&&J&&(c={}),c?(Te="",c.rotate&&(Te+="rotate("+[c.rotate,f.x,f.y]+")"),(c.offset||J)&&(Te+=Cy(0,(c.offset||0)-(J||0)))):Te=null,Le.attr("transform",Te);function we(ce){if(ce){var De=On.select(ce.node().parentNode).select("."+oe);if(!De.empty()){var Se=ce.node().getBBox();if(Se.height){var Me=Se.y+Se.height+Od*k;De.attr("y",Me)}}}}if(Le.style("opacity",v*Os.opacity(_)).call(Hs.font,{color:Os.rgb(_),size:On.round(b,2),family:y,weight:g,style:x,variant:w,textcase:T,shadow:M,lineposition:A}).attr(f).call(jn.convertToTspans,t,we),ve){var Q=u.select("."+e+"-math-group"),xe=Le.node().getBBox(),ae=Q.node()?Q.node().getBBox():void 0,ge=ae?ae.y+ae.height+Od*k:xe.y+xe.height+jd*k,Ae=on.extendFlat({},f,{y:ge});ve.attr("transform",Te),ve.style("opacity",H*Os.opacity(C)).call(Hs.font,{color:Os.rgb(C),size:On.round(k,2),family:P,weight:E,style:I,variant:j,textcase:G,shadow:O,lineposition:X}).attr(Ae).call(jn.convertToTspans,t)}return gD.previousPromises(t)}function ue(be){var Le=be.title,ve=On.select(Le.node().parentNode);if(s&&s.selection&&s.side&&d){ve.attr("transform",null);var Te=bD[s.side],we=s.side==="left"||s.side==="top"?-1:1,Q=yD(s.pad)?s.pad:2,xe=Hs.bBox(ve.node()),ae={t:0,b:0,l:0,r:0},ge=t._fullLayout._reservedMargin;for(var Ae in ge)for(var ce in ge[Ae]){var De=ge[Ae][ce];ae[ce]=Math.max(ae[ce],De)}var Se={left:ae.l,top:ae.t,right:a.width-ae.r,bottom:a.height-ae.b},Me=s.maxShift||we*(Se[s.side]-xe[s.side]),He=0;if(Me<0)He=Me;else{var Fe=s.offsetLeft||0,Oe=s.offsetTop||0;xe.left-=Fe,xe.right-=Fe,xe.top-=Oe,xe.bottom-=Oe,s.selection.each(function(){var Ze=Hs.bBox(this);on.bBoxIntersect(xe,Ze,Q)&&(He=Math.max(He,we*(Ze[s.side]-xe[Te])+Q))}),He=Math.min(Me,He),i._titleScoot=Math.abs(He)}if(He>0||Me<0){var Ge={left:[-He,0],right:[He,0],top:[0,-He],bottom:[0,He]}[s.side];ve.attr("transform",Cy(Ge[0],Ge[1]))}}}ie.call(ee,de);function me(be,Le){be.text(Le).on("mouseover.opacity",function(){On.select(this).transition().duration(Dy.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){On.select(this).transition().duration(Dy.HIDE_PLACEHOLDER).style("opacity",0)})}if(V&&(d?ie.on(".opacity",null):(me(ie,o),p=!0),ie.call(jn.makeEditable,{gd:t}).on("edit",function(be){l!==void 0?Yu.call("_guiRestyle",t,n,be,l):Yu.call("_guiRelayout",t,n,be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ee)}).on("input",function(be){this.text(be||" ").call(jn.positionText,f.x,f.y)}),L)){if(L&&!d){var pe=ie.node().getBBox(),se=pe.y+pe.height+jd*k;de.attr("y",se)}$?de.on(".opacity",null):(me(de,z),R=!0),de.call(jn.makeEditable,{gd:t}).on("edit",function(be){Yu.call("_guiRelayout",t,"title.subtitle.text",be)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ee)}).on("input",function(be){this.text(be||" ").call(jn.positionText,de.attr("x"),de.attr("y"))})}return ie.classed("js-placeholder",p),de&&de.classed("js-placeholder",R),u}var Kc={draw:xD,SUBTITLE_PADDING_EM:jd,SUBTITLE_PADDING_MATHJAX_EM:Od},_D=bt,wD=Vl.utcFormat,jt=ke,TD=jt.numberFormat,Ga=kt,_i=jt.cleanNumber,kD=jt.ms2DateTime,Ey=jt.dateTime2ms,Ua=jt.ensureNumber,zy=jt.isArrayOrTypedArray,ji=cr,js=ji.FP_SAFE,Aa=ji.BADNUM,AD=ji.LOG_CLIP,MD=ji.ONEWEEK,Bs=ji.ONEDAY,Gs=ji.ONEHOUR,Ry=ji.ONEMIN,Iy=ji.ONESEC,Us=lr,tc=Ir,Vs=tc.HOUR_PATTERN,Ws=tc.WEEKDAY_PATTERN;function fl(t){return Math.pow(10,t)}function qu(t){return t!=null}var fp=function(e,r){r=r||{};var a=e._id||"x",i=a.charAt(0);function n(g,x){if(g>0)return Math.log(g)/Math.LN10;if(g<=0&&x&&e.range&&e.range.length===2){var w=e.range[0],T=e.range[1];return .5*(w+T-2*AD*Math.abs(w-T))}else return Aa}function o(g,x,w,T){if((T||{}).msUTC&&Ga(g))return+g;var A=Ey(g,w||e.calendar);if(A===Aa)if(Ga(g)){g=+g;var M=Math.floor(jt.mod(g+.05,1)*10),S=Math.round(g-M/10);A=Ey(new Date(S))+M/10}else return Aa;return A}function l(g,x,w){return kD(g,x,w||e.calendar)}function s(g){return e._categories[Math.round(g)]}function f(g){if(qu(g)){if(e._categoriesMap===void 0&&(e._categoriesMap={}),e._categoriesMap[g]!==void 0)return e._categoriesMap[g];e._categories.push(typeof g=="number"?String(g):g);var x=e._categories.length-1;return e._categoriesMap[g]=x,x}return Aa}function c(g,x){for(var w=new Array(x),T=0;T<x;T++){var A=(g[0]||[])[T],M=(g[1]||[])[T];w[T]=u([A,M])}return w}function u(g){if(e._categoriesMap)return e._categoriesMap[g]}function v(g){var x=u(g);if(x!==void 0)return x;if(Ga(g))return+g}function h(g){return Ga(g)?+g:u(g)}function d(g,x,w){return _D.round(w+x*g,2)}function p(g,x,w){return(g-w)/x}var m=function(x){return Ga(x)?d(x,e._m,e._b):Aa},y=function(g){return p(g,e._m,e._b)};if(e.rangebreaks){var b=i==="y";m=function(g){if(!Ga(g))return Aa;var x=e._rangebreaks.length;if(!x)return d(g,e._m,e._b);var w=b;e.range[0]>e.range[1]&&(w=!w);for(var T=w?-1:1,A=T*g,M=0,S=0;S<x;S++){var L=T*e._rangebreaks[S].min,z=T*e._rangebreaks[S].max;if(A<L)break;if(A>z)M=S+1;else{M=A<(L+z)/2?S:S+1;break}}var N=e._B[M]||0;return isFinite(N)?d(g,e._m2,N):0},y=function(g){var x=e._rangebreaks.length;if(!x)return p(g,e._m,e._b);for(var w=0,T=0;T<x&&!(g<e._rangebreaks[T].pmin);T++)g>e._rangebreaks[T].pmax&&(w=T+1);return p(g,e._m2,e._B[w])}}e.c2l=e.type==="log"?n:Ua,e.l2c=e.type==="log"?fl:Ua,e.l2p=m,e.p2l=y,e.c2p=e.type==="log"?function(g,x){return m(n(g,x))}:m,e.p2c=e.type==="log"?function(g){return fl(y(g))}:y,["linear","-"].indexOf(e.type)!==-1?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=_i,e.c2d=e.c2r=e.l2d=e.l2r=Ua,e.d2p=e.r2p=function(g){return e.l2p(_i(g))},e.p2d=e.p2r=y,e.cleanPos=Ua):e.type==="log"?(e.d2r=e.d2l=function(g,x){return n(_i(g),x)},e.r2d=e.r2c=function(g){return fl(_i(g))},e.d2c=e.r2l=_i,e.c2d=e.l2r=Ua,e.c2r=n,e.l2d=fl,e.d2p=function(g,x){return e.l2p(e.d2r(g,x))},e.p2d=function(g){return fl(y(g))},e.r2p=function(g){return e.l2p(_i(g))},e.p2r=y,e.cleanPos=Ua):e.type==="date"?(e.d2r=e.r2d=jt.identity,e.d2c=e.r2c=e.d2l=e.r2l=o,e.c2d=e.c2r=e.l2d=e.l2r=l,e.d2p=e.r2p=function(g,x,w){return e.l2p(o(g,0,w))},e.p2d=e.p2r=function(g,x,w){return l(y(g),x,w)},e.cleanPos=function(g){return jt.cleanDate(g,Aa,e.calendar)}):e.type==="category"?(e.d2c=e.d2l=f,e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=v,e.r2c=function(g){var x=h(g);return x!==void 0?x:e.fraction2r(.5)},e.l2r=e.c2r=Ua,e.r2l=h,e.d2p=function(g){return e.l2p(e.r2c(g))},e.p2d=function(g){return s(y(g))},e.r2p=e.d2p,e.p2r=y,e.cleanPos=function(g){return typeof g=="string"&&g!==""?g:Ua(g)}):e.type==="multicategory"&&(e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=v,e.r2c=function(g){var x=v(g);return x!==void 0?x:e.fraction2r(.5)},e.r2c_just_indices=u,e.l2r=e.c2r=Ua,e.r2l=v,e.d2p=function(g){return e.l2p(e.r2c(g))},e.p2d=function(g){return s(y(g))},e.r2p=e.d2p,e.p2r=y,e.cleanPos=function(g){return Array.isArray(g)||typeof g=="string"&&g!==""?g:Ua(g)},e.setupMultiCategory=function(g){var x=e._traceIndices,w,T,A=e._matchGroup;if(A&&e._categories.length===0){for(var M in A)if(M!==a){var S=r[Us.id2name(M)];x=x.concat(S._traceIndices)}}var L=[[0,{}],[0,{}]],z=[];for(w=0;w<x.length;w++){var N=g[x[w]];if(i in N){var $=N[i],R=N._length||jt.minRowLength($);if(zy($[0])&&zy($[1]))for(T=0;T<R;T++){var H=$[0][T],D=$[1][T];qu(H)&&qu(D)&&(z.push([H,D]),H in L[0][1]||(L[0][1][H]=L[0][0]++),D in L[1][1]||(L[1][1][D]=L[1][0]++))}}}for(z.sort(function(P,k){var C=L[0][1],E=C[P[0]]-C[k[0]];if(E)return E;var I=L[1][1];return I[P[1]]-I[k[1]]}),w=0;w<z.length;w++)f(z[w])}),e.fraction2r=function(g){var x=e.r2l(e.range[0]),w=e.r2l(e.range[1]);return e.l2r(x+g*(w-x))},e.r2fraction=function(g){var x=e.r2l(e.range[0]),w=e.r2l(e.range[1]);return(e.r2l(g)-x)/(w-x)},e.limitRange=function(g){var x=e.minallowed,w=e.maxallowed;if(!(x===void 0&&w===void 0)){g||(g="range");var T=jt.nestedProperty(e,g).get(),A=jt.simpleMap(T,e.r2l),M=A[1]<A[0];M&&A.reverse();var S=jt.simpleMap([x,w],e.r2l);if(x!==void 0&&A[0]<S[0]&&(T[M?1:0]=x),w!==void 0&&A[1]>S[1]&&(T[M?0:1]=w),T[0]===T[1]){var L=e.l2r(x),z=e.l2r(w);if(x!==void 0){var N=L+1;w!==void 0&&(N=Math.min(N,z)),T[M?1:0]=N}if(w!==void 0){var $=z+1;x!==void 0&&($=Math.max($,L)),T[M?0:1]=$}}}},e.cleanRange=function(g,x){e._cleanRange(g,x),e.limitRange(g)},e._cleanRange=function(g,x){x||(x={}),g||(g="range");var w=jt.nestedProperty(e,g).get(),T,A;if(e.type==="date"?A=jt.dfltRange(e.calendar):i==="y"?A=tc.DFLTRANGEY:e._name==="realaxis"?A=[0,1]:A=x.dfltRange||tc.DFLTRANGEX,A=A.slice(),(e.rangemode==="tozero"||e.rangemode==="nonnegative")&&(A[0]=0),!w||w.length!==2){jt.nestedProperty(e,g).set(A);return}var M=w[0]===null,S=w[1]===null;for(e.type==="date"&&!e.autorange&&(w[0]=jt.cleanDate(w[0],Aa,e.calendar),w[1]=jt.cleanDate(w[1],Aa,e.calendar)),T=0;T<2;T++)if(e.type==="date"){if(!jt.isDateTime(w[T],e.calendar)){e[g]=A;break}if(e.r2l(w[0])===e.r2l(w[1])){var L=jt.constrain(e.r2l(w[0]),jt.MIN_MS+1e3,jt.MAX_MS-1e3);w[0]=e.l2r(L-1e3),w[1]=e.l2r(L+1e3);break}}else{if(!Ga(w[T]))if(!(M||S)&&Ga(w[1-T]))w[T]=w[1-T]*(T?10:.1);else{e[g]=A;break}if(w[T]<-js?w[T]=-js:w[T]>js&&(w[T]=js),w[0]===w[1]){var z=Math.max(1,Math.abs(w[0]*1e-6));w[0]-=z,w[1]+=z}}},e.setScale=function(g){var x=r._size;if(e.overlaying){var w=Us.getFromId({_fullLayout:r},e.overlaying);e.domain=w.domain}var T=g&&e._r?"_r":"range",A=e.calendar;e.cleanRange(T);var M=e.r2l(e[T][0],A),S=e.r2l(e[T][1],A),L=i==="y";if(L?(e._offset=x.t+(1-e.domain[1])*x.h,e._length=x.h*(e.domain[1]-e.domain[0]),e._m=e._length/(M-S),e._b=-e._m*S):(e._offset=x.l+e.domain[0]*x.w,e._length=x.w*(e.domain[1]-e.domain[0]),e._m=e._length/(S-M),e._b=-e._m*M),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks){var z,N;if(e._rangebreaks=e.locateBreaks(Math.min(M,S),Math.max(M,S)),e._rangebreaks.length){for(z=0;z<e._rangebreaks.length;z++)N=e._rangebreaks[z],e._lBreaks+=Math.abs(N.max-N.min);var $=L;M>S&&($=!$),$&&e._rangebreaks.reverse();var R=$?-1:1;for(e._m2=R*e._length/(Math.abs(S-M)-e._lBreaks),e._B.push(-e._m2*(L?S:M)),z=0;z<e._rangebreaks.length;z++)N=e._rangebreaks[z],e._B.push(e._B[e._B.length-1]-R*e._m2*(N.max-N.min));for(z=0;z<e._rangebreaks.length;z++)N=e._rangebreaks[z],N.pmin=m(N.min),N.pmax=m(N.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(g){var x=e.rangebreaks||[],w,T,A,M,S;x._cachedPatterns||(x._cachedPatterns=x.map(function(C){return C.enabled&&C.bounds?jt.simpleMap(C.bounds,C.pattern?_i:e.d2c):null})),x._cachedValues||(x._cachedValues=x.map(function(C){return C.enabled&&C.values?jt.simpleMap(C.values,e.d2c).sort(jt.sorterAsc):null}));for(var L=0;L<x.length;L++){var z=x[L];if(z.enabled){if(z.bounds){var N=z.pattern;switch(w=x._cachedPatterns[L],T=w[0],A=w[1],N){case Ws:S=new Date(g),M=S.getUTCDay(),T>A&&(A+=7,M<T&&(M+=7));break;case Vs:S=new Date(g);var $=S.getUTCHours(),R=S.getUTCMinutes(),H=S.getUTCSeconds(),D=S.getUTCMilliseconds();M=$+(R/60+H/3600+D/36e5),T>A&&(A+=24,M<T&&(M+=24));break;case"":M=g;break}if(M>=T&&M<A)return Aa}else for(var P=x._cachedValues[L],k=0;k<P.length;k++)if(T=P[k],A=T+z.dvalue,g>=T&&g<A)return Aa}}return g},e.locateBreaks=function(g,x){var w,T,A,M,S=[];if(!e.rangebreaks)return S;var L=e.rangebreaks.slice().sort(function(I,j){return I.pattern===Ws&&j.pattern===Vs?-1:j.pattern===Ws&&I.pattern===Vs?1:0}),z=function(I,j){if(I=jt.constrain(I,g,x),j=jt.constrain(j,g,x),I!==j){for(var G=!0,X=0;X<S.length;X++){var O=S[X];I<O.max&&j>=O.min&&(I<O.min&&(O.min=I),j>O.max&&(O.max=j),G=!1)}G&&S.push({min:I,max:j})}};for(w=0;w<L.length;w++){var N=L[w];if(N.enabled)if(N.bounds){var $=g,R=x;N.pattern&&($=Math.floor($)),T=jt.simpleMap(N.bounds,N.pattern?_i:e.r2l),A=T[0],M=T[1];var H=new Date($),D,P;switch(N.pattern){case Ws:P=MD,D=((M<A?7:0)+(M-A))*Bs,$+=A*Bs-(H.getUTCDay()*Bs+H.getUTCHours()*Gs+H.getUTCMinutes()*Ry+H.getUTCSeconds()*Iy+H.getUTCMilliseconds());break;case Vs:P=Bs,D=((M<A?24:0)+(M-A))*Gs,$+=A*Gs-(H.getUTCHours()*Gs+H.getUTCMinutes()*Ry+H.getUTCSeconds()*Iy+H.getUTCMilliseconds());break;default:$=Math.min(T[0],T[1]),R=Math.max(T[0],T[1]),P=R-$,D=P}for(var k=$;k<R;k+=P)z(k,k+D)}else for(var C=jt.simpleMap(N.values,e.d2c),E=0;E<C.length;E++)A=C[E],M=A+N.dvalue,z(A,M)}return S.sort(function(I,j){return I.min-j.min}),S},e.makeCalcdata=function(g,x,w){var T,A,M,S,L=e.type,z=L==="date"&&g[x+"calendar"];if(x in g){if(T=g[x],S=g._length||jt.minRowLength(T),jt.isTypedArray(T)&&(L==="linear"||L==="log")){if(S===T.length)return T;if(T.subarray)return T.subarray(0,S)}if(L==="multicategory")return c(T,S);for(A=new Array(S),M=0;M<S;M++)A[M]=e.d2c(T[M],0,z,w)}else{var N=x+"0"in g?e.d2c(g[x+"0"],0,z):0,$=g["d"+x]?Number(g["d"+x]):1;for(T=g[{x:"y",y:"x"}[x]],S=g._length||T.length,A=new Array(S),M=0;M<S;M++)A[M]=N+M*$}if(e.rangebreaks)for(M=0;M<S;M++)A[M]=e.maskBreaks(A[M]);return A},e.isValidRange=function(g,x){return Array.isArray(g)&&g.length===2&&(x&&g[0]===null||Ga(e.r2l(g[0])))&&(x&&g[1]===null||Ga(e.r2l(g[1])))},e.getAutorangeDflt=function(g,x){var w=!e.isValidRange(g,"nullOk");return w&&x&&x.reverseDflt?w="reversed":g&&(g[0]===null&&g[1]===null?w=!0:g[0]===null&&g[1]!==null?w="min":g[0]!==null&&g[1]===null&&(w="max")),w},e.isReversed=function(){var g=e.autorange;return g==="reversed"||g==="min reversed"||g==="max reversed"},e.isPtWithinRange=function(g,x){var w=e.c2l(g[i],null,x),T=e.r2l(e.range[0]),A=e.r2l(e.range[1]);return T<A?T<=w&&w<=A:A<=w&&w<=T},e._emptyCategories=function(){e._categories=[],e._categoriesMap={}},e.clearCalc=function(){var g=e._matchGroup;if(g){var x=null,w=null;for(var T in g){var A=r[Us.id2name(T)];if(A._categories){x=A._categories,w=A._categoriesMap;break}}x&&w?(e._categories=x,e._categoriesMap=w):e._emptyCategories()}else e._emptyCategories();if(e._initialCategories)for(var M=0;M<e._initialCategories.length;M++)f(e._initialCategories[M])},e.sortByInitialCategories=function(){var g=[];if(e._emptyCategories(),e._initialCategories)for(var x=0;x<e._initialCategories.length;x++)f(e._initialCategories[x]);g=g.concat(e._traceIndices);var w=e._matchGroup;for(var T in w)if(a!==T){var A=r[Us.id2name(T)];A._categories=e._categories,A._categoriesMap=e._categoriesMap,g=g.concat(A._traceIndices)}return g};var _=r._d3locale;e.type==="date"&&(e._dateFormat=_?_.timeFormat:wD,e._extraFormat=r._extraFormat),e._separators=r.separators,e._numFormat=_?_.numberFormat:TD,delete e._minDtick,delete e._forceTick0},Fw=kt,cp=ke,SD=cr.BADNUM,rc=cp.isArrayOrTypedArray,LD=cp.isDateTime,CD=cp.cleanNumber,Nw=Math.round,$w=function(e,r,a){var i=e,n=a.noMultiCategory;if(rc(i)&&!i.length)return"-";if(!n&&RD(i))return"multicategory";if(n&&Array.isArray(i[0])){for(var o=[],l=0;l<i.length;l++)if(rc(i[l]))for(var s=0;s<i[l].length;s++)o.push(i[l][s]);i=o}if(ED(i,r))return"date";var f=a.autotypenumbers!=="strict";return zD(i,f)?"category":PD(i,f)?"linear":"-"};function DD(t,e){return e?Fw(t):typeof t=="number"}function PD(t,e){for(var r=t.length,a=0;a<r;a++)if(DD(t[a],e))return!0;return!1}function ED(t,e){for(var r=t.length,a=Hw(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=Nw(l),f=t[s],c=String(f);o[c]||(o[c]=1,LD(f,e)&&i++,Fw(f)&&n++)}return i>n*2}function Hw(t){return Math.max(1,(t-1)/1e3)}function zD(t,e){for(var r=t.length,a=Hw(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=Nw(l),f=t[s],c=String(f);if(!o[c]){o[c]=1;var u=typeof f;u==="boolean"?n++:(e?CD(f)!==SD:u==="number")?i++:u==="string"&&n++}}return n>i*2}function RD(t){return rc(t[0])&&rc(t[1])}var ID=bt,Ow=kt,zi=ke,Ff=cr.FP_SAFE,FD=ot,ND=zt,jw=lr,$D=jw.getFromId,HD=jw.isLinked,_s={applyAutorangeOptions:Gw,getAutoRange:Bd,makePadFn:Gd,doAutoRange:jD,findExtremes:BD,concatExtremes:up};function Bd(t,e){var r,a,i=[],n=t._fullLayout,o=Gd(n,e,0),l=Gd(n,e,1),s=up(t,e),f=s.min,c=s.max;if(f.length===0||c.length===0)return zi.simpleMap(e.range,e.r2l);var u=f[0].val,v=c[0].val;for(r=1;r<f.length&&u===v;r++)u=Math.min(u,f[r].val);for(r=1;r<c.length&&u===v;r++)v=Math.max(v,c[r].val);var h=e.autorange,d=h==="reversed"||h==="min reversed"||h==="max reversed";if(!d&&e.range){var p=zi.simpleMap(e.range,e.r2l);d=p[1]<p[0]}e.autorange==="reversed"&&(e.autorange=!0);var m=e.rangemode,y=m==="tozero",b=m==="nonnegative",_=e._length,g=_/10,x=0,w,T,A,M,S,L;for(r=0;r<f.length;r++)for(w=f[r],a=0;a<c.length;a++)T=c[a],L=T.val-w.val-Fy(e,w.val,T.val),L>0&&(S=_-o(w)-l(T),S>g?L/S>x&&(A=w,M=T,x=L/S):L/_>x&&(A={val:w.val,nopad:1},M={val:T.val,nopad:1},x=L/_));function z(D,P){return Math.max(D,l(P))}if(u===v){var N=u-1,$=u+1;if(y)if(u===0)i=[0,1];else{var R=(u>0?c:f).reduce(z,0),H=u/(1-Math.min(.5,R/_));i=u>0?[0,H]:[H,0]}else b?i=[Math.max(0,N),Math.max(1,$)]:i=[N,$]}else y?(A.val>=0&&(A={val:0,nopad:1}),M.val<=0&&(M={val:0,nopad:1})):b&&(A.val-x*o(A)<0&&(A={val:0,nopad:1}),M.val<=0&&(M={val:1,nopad:1})),x=(M.val-A.val-Fy(e,w.val,T.val))/(_-o(A)-l(M)),i=[A.val-x*o(A),M.val+x*l(M)];return i=Gw(i,e),e.limitRange&&e.limitRange(),d&&i.reverse(),zi.simpleMap(i,e.l2r||Number)}function Fy(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 Gd(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.isReversed();if(!n){var o=zi.simpleMap(e.range,e.r2l);n=o[1]<o[0]}n&&(r=!r)}var l=0;return HD(t,e._id)||(l=OD(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 Ny=3;function OD(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=zi.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 u=l._id+"tick",v=l._selections[u];v.each(function(b){var _=ID.select(this),g=_.select(".text-math-group");g.empty()&&(b.bb=ND.bBox(_.node()))})}for(var h=0;h<l._vals.length;h++){var d=l._vals[h],p=d.bb;if(p){var m=2*Ny+p.width,y=2*Ny+p.height;a=Math.max(a,i?Math.max(m*f,y*c):Math.max(y*f,m*c))}}}l.ticks==="inside"&&l.ticklabelposition==="inside"&&(a+=l.ticklen||0)}}}return a}function up(t,e,r){var a=e._id,i=t._fullData,n=t._fullLayout,o=[],l=[],s,f,c;function u(m,y){for(s=0;s<y.length;s++){var b=m[y[s]],_=(b._extremes||{})[a];if(b.visible===!0&&_){for(f=0;f<_.min.length;f++)c=_.min[f],Ud(o,c.val,c.pad,{extrapad:c.extrapad});for(f=0;f<_.max.length;f++)c=_.max[f],Vd(l,c.val,c.pad,{extrapad:c.extrapad})}}}if(u(i,e._traceIndices),u(n.annotations||[],e._annIndices||[]),u(n.shapes||[],e._shapeIndices||[]),e._matchGroup&&!r){for(var v in e._matchGroup)if(v!==e._id){var h=$D(t,v),d=up(t,h,!0),p=e._length/h._length;for(f=0;f<d.min.length;f++)c=d.min[f],Ud(o,c.val,c.pad*p,{extrapad:c.extrapad});for(f=0;f<d.max.length;f++)c=d.max[f],Vd(l,c.val,c.pad*p,{extrapad:c.extrapad})}}return{min:o,max:l}}function jD(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():Bd(t,e),e._r=e.range.slice(),e._rl=zi.simpleMap(e._r,e.r2l);var a=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,FD.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=Bd(t,e)),n._input.rangeslider[e._name]=zi.extendFlat({},o)}}function BD(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,u,v,h,d,p,m,y,b,_;function g(z){if(Array.isArray(z))return f=!0,function($){return Math.max(Number(z[$]||0),0)};var N=Math.max(Number(z||0),0);return function(){return N}}var x=g((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),w=g((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),T=g(r.vpadplus||r.vpad),A=g(r.vpadminus||r.vpad);if(!f){if(b=1/0,_=-1/0,s)for(u=0;u<n;u++)v=e[u],v<b&&v>0&&(b=v),v>_&&v<Ff&&(_=v);else for(u=0;u<n;u++)v=e[u],v<b&&v>-Ff&&(b=v),v>_&&v<Ff&&(_=v);e=[b,_],n=2}var M={tozero:l,extrapad:o};function S(z){h=e[z],Ow(h)&&(m=x(z),y=w(z),c?(d=t.c2l(h)-A(z),p=t.c2l(h)+T(z)):(b=h-A(z),_=h+T(z),s&&b<_/10&&(b=_/10),d=t.c2l(b),p=t.c2l(_)),l&&(d=Math.min(0,d),p=Math.max(0,p)),$y(d)&&Ud(a,d,y,M),$y(p)&&Vd(i,p,m,M))}var L=Math.min(6,n);for(u=0;u<L;u++)S(u);for(u=n-1;u>=L;u--)S(u);return{min:a,max:i,opts:r}}function Ud(t,e,r,a){Bw(t,e,r,a,GD)}function Vd(t,e,r,a){Bw(t,e,r,a,UD)}function Bw(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 $y(t){return Ow(t)&&Math.abs(t)<Ff}function GD(t,e){return t<=e}function UD(t,e){return t>=e}function VD(t,e){var r=e.autorangeoptions;return r&&r.minallowed!==void 0&&ac(e,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&ac(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}function WD(t,e){var r=e.autorangeoptions;return r&&r.maxallowed!==void 0&&ac(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&ac(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}function ac(t,e,r){return e!==void 0&&r!==void 0?(e=t.d2l(e),r=t.d2l(r),e<r):!0}function Gw(t,e){if(!e||!e.autorangeoptions)return t;var r=t[0],a=t[1],i=e.autorangeoptions.include;if(i!==void 0){var n=e.d2l(r),o=e.d2l(a);zi.isArrayOrTypedArray(i)||(i=[i]);for(var l=0;l<i.length;l++){var s=e.d2l(i[l]);n>=s&&(n=s,r=s),o<=s&&(o=s,a=s)}}return r=VD(r,e),a=WD(a,e),[r,a]}var ma=bt,dr=kt,wo=hr,Yl=ot,dt=ke,Do=dt.strTranslate,cn=Tr,XD=Kc,ql=yt,oa=zt,YD=ti,Hy=Yc,Er=cr,qD=Er.ONEMAXYEAR,ic=Er.ONEAVGYEAR,nc=Er.ONEMINYEAR,ZD=Er.ONEMAXQUARTER,Wd=Er.ONEAVGQUARTER,oc=Er.ONEMINQUARTER,KD=Er.ONEMAXMONTH,Po=Er.ONEAVGMONTH,lc=Er.ONEMINMONTH,la=Er.ONEWEEK,Hr=Er.ONEDAY,Ri=Hr/2,Qa=Er.ONEHOUR,Zl=Er.ONEMIN,sc=Er.ONESEC,QD=Er.ONEMILLI,JD=Er.ONEMICROSEC,gn=Er.MINUS_SIGN,Qc=Er.BADNUM,Xd={K:"zeroline"},Yd={K:"gridline",L:"path"},qd={K:"minor-gridline",L:"path"},Uw={K:"tick",L:"path"},Oy={K:"tick",L:"text"},jy={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Jc=Vr,Pl=Jc.MID_SHIFT,bn=Jc.CAP_SHIFT,Kl=Jc.LINE_SPACING,e5=Jc.OPPOSITE_SIDE,fc=3,Pe=iw.exports={};Pe.setConvert=fp;var t5=$w,hi=lr,r5=hi.idSort,a5=hi.isLinked;Pe.id2name=hi.id2name;Pe.name2id=hi.name2id;Pe.cleanId=hi.cleanId;Pe.list=hi.list;Pe.listIds=hi.listIds;Pe.getFromId=hi.getFromId;Pe.getFromTrace=hi.getFromTrace;var Vw=_s;Pe.getAutoRange=Vw.getAutoRange;Pe.findExtremes=Vw.findExtremes;var i5=1e-4;function vp(t){var e=(t[1]-t[0])*i5;return[t[0]-e,t[1]+e]}Pe.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},dt.coerce(t,e,f,s)};Pe.getRefType=function(t){return t===void 0?t:t==="paper"?"paper":t==="pixel"?"pixel":/( domain)$/.test(t)?"domain":"range"};Pe.coercePosition=function(t,e,r,a,i,n){var o,l,s=Pe.getRefType(a);if(s!=="range")o=dt.ensureNumber,l=r(i,n);else{var f=Pe.getFromId(e,a);n=f.fraction2r(n),l=r(i,n),o=f.cleanPos}t[i]=o(l)};Pe.cleanPosition=function(t,e,r){var a=r==="paper"||r==="pixel"?dt.ensureNumber:Pe.getFromId(e,r).cleanPos;return a(t)};Pe.redrawComponents=function(t,e){e=e||Pe.listIds(t);var r=t._fullLayout;function a(i,n,o,l){for(var s=Yl.getComponentMethod(i,n),f={},c=0;c<e.length;c++)for(var u=r[Pe.id2name(e[c])],v=u[o],h=0;h<v.length;h++){var d=v[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 n5=Pe.getDataConversions=function(t,e,r,a){var i,n=r==="x"||r==="y"||r==="z"?r:a;if(dt.isArrayOrTypedArray(n)){if(i={type:t5(a,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},Pe.setConvert(i),i.type==="category")for(var o=0;o<a.length;o++)i.d2c(a[o])}else i=Pe.getFromTrace(t,e,n);return i?{d2c:i.d2c,c2d:i.c2d}:n==="ids"?{d2c:Gy,c2d:Gy}:{d2c:By,c2d:By}};function By(t){return+t}function Gy(t){return String(t)}Pe.getDataToCoordFunc=function(t,e,r,a){return n5(t,e,r,a).d2c};Pe.counterLetter=function(t){var e=t.charAt(0);if(e==="x")return"y";if(e==="y")return"x"};Pe.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))};Pe.saveRangeInitial=function(t,e){for(var r=Pe.list(t,"",!0),a=!1,i=0;i<r.length;i++){var n=r[i],o=n._rangeInitial0===void 0&&n._rangeInitial1===void 0,l=o||n.range[0]!==n._rangeInitial0||n.range[1]!==n._rangeInitial1,s=n.autorange;(o&&s!==!0||e&&l)&&(n._rangeInitial0=s==="min"||s==="max reversed"?void 0:n.range[0],n._rangeInitial1=s==="max"||s==="min reversed"?void 0:n.range[1],n._autorangeInitial=s,a=!0)}return a};Pe.saveShowSpikeInitial=function(t,e){for(var r=Pe.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};Pe.autoBin=function(t,e,r,a,i,n){var o=dt.aggNums(Math.min,null,t),l=dt.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:dt.simpleMap([o,l],e.c2r,0,i),calendar:i},Pe.setConvert(s),n=n&&Hy.dtick(n,s.type),n)s.dtick=n,s.tick0=Hy.tick0(void 0,s.type,i);else{var f;if(r)f=(l-o)/r;else{var c=dt.distinctVals(t),u=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),v=u*dt.roundUp(c.minDiff/u,[.9,1.9,4.9,9.9],!0);f=Math.max(v,2*dt.stdev(t)/Math.pow(t.length,a?.25:.4)),dr(f)||(f=1)}Pe.autoTicks(s,f)}var h=s.dtick,d=Pe.tickIncrement(Pe.tickFirst(s),h,"reverse",i),p,m;if(typeof h=="number")d=o5(d,t,s,o,l),m=1+Math.floor((l-d)/h),p=d+m*h;else for(s.dtick.charAt(0)==="M"&&(d=l5(d,t,h,o,i)),p=d,m=0;p<=l;)p=Pe.tickIncrement(p,h,!1,i),m++;return{start:e.c2r(d,0,i),end:e.c2r(p,0,i),size:h,_dataSpan:l-o}};function o5(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++:dr(e[c])||s++,f(e[c])&&n++,f(e[c]+r.dtick/2)&&o++;var u=e.length-s;if(l===u&&r.type!=="date")r.dtick<1?t=a-.5*r.dtick:(t-=.5,t+r.dtick<a&&(t+=r.dtick));else if(o<u*.1&&(n>u*.3||f(a)||f(i))){var v=r.dtick/2;t+=t+v<a?v:-v}return t}function l5(t,e,r,a,i){var n=dt.findExactDates(e,i),o=.8;if(n.exactDays>o){var l=Number(r.substr(1));n.exactYears>o&&l%12===0?t=Pe.tickIncrement(t,"M6","reverse")+Hr*1.5:n.exactMonths>o?t=Pe.tickIncrement(t,"M1","reverse")+Hr*15.5:t-=Ri;var s=Pe.tickIncrement(t,r);if(s<=a)return s}return t}Pe.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var a=e.dtick&&dr(e._tmin),i;if(a){var n=Pe.tickIncrement(e._tmin,e.dtick,!0);i=[e._tmin,n*.99+e._tmin*.01]}else{var o=dt.simpleMap(e.range,e.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(t.range=dt.simpleMap(i,e.l2r),t._isMinor=!0,Pe.prepTicks(t,r),a){var l=dr(e.dtick),s=dr(t.dtick),f=l?e.dtick:+e.dtick.substring(1),c=s?t.dtick:+t.dtick.substring(1);l&&s?Zu(f,c)?f===2*la&&c===2*Hr&&(t.dtick=la):f===2*la&&c===3*Hr?t.dtick=la:f===la&&!(e._input.minor||{}).nticks?t.dtick=Hr:Uy(f/c,2.5)?t.dtick=f/2:t.dtick=f:String(e.dtick).charAt(0)==="M"?s?t.dtick="M1":Zu(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"?Zu(f,c)||(t.dtick=Uy(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 Zu(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function Uy(t,e){return Math.abs(t/e-1)<.001}Pe.prepTicks=function(t,e){var r=dt.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?dt.bigFont(t.tickfont.size||12):15,a=t._length/i):(i=t._id.charAt(0)==="y"?40:80,a=dt.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,Pe.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"&&s5(t),t.tick0||(t.tick0=t.type==="date"?"2000-01-01":0),t.type==="date"&&t.dtick<.1&&(t.dtick=.1),qw(t)};function Ku(t){return+t.substring(1)}function s5(t){var e;function r(){return!(dr(t.dtick)||t.dtick.charAt(0)!=="M")}var a=r(),i=Pe.getTickFormat(t);if(i){var n=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(e=Qa,n&&!a&&t.dtick<Qa&&(t.dtick=Qa)):/%p/.test(i)?(e=Ri,n&&!a&&t.dtick<Ri&&(t.dtick=Ri)):/%[Aadejuwx]/.test(i)?(e=Hr,n&&!a&&t.dtick<Hr&&(t.dtick=Hr)):/%[UVW]/.test(i)?(e=la,n&&!a&&t.dtick<la&&(t.dtick=la)):/%[Bbm]/.test(i)?(e=Po,n&&(a?Ku(t.dtick)<1:t.dtick<lc)&&(t.dtick="M1")):/%[q]/.test(i)?(e=Wd,n&&(a?Ku(t.dtick)<3:t.dtick<oc)&&(t.dtick="M3")):/%[Yy]/.test(i)&&(e=ic,n&&(a?Ku(t.dtick)<12:t.dtick<nc)&&(t.dtick="M12")))}a=r(),a&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}function f5(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,u=0;c>=nc?f>=nc&&f<=qD?u=f:u=ic:r===Wd&&c>=oc?f>=oc&&f<=ZD?u=f:u=Wd:c>=lc?f>=lc&&f<=KD?u=f:u=Po:r===la&&c>=la?u=la:c>=Hr?u=Hr:r===Ri&&c>=Ri?u=Ri:r===Qa&&c>=Qa&&(u=Qa);var v;u>=f&&(u=f,v=!0);var h=i+u;if(e.rangebreaks&&u>0){for(var d=84,p=0,m=0;m<d;m++){var y=(m+.5)/d;e.maskBreaks(i*(1-y)+y*h)!==Qc&&p++}u*=p/d,u||(t[a].drop=!0),v&&f>la&&(u=f)}(u>0||a===0)&&(t[a].periodX=i+u/2)}}Pe.calcTicks=function(e,r){for(var a=e.type,i=e.calendar,n=e.ticklabelstep,o=e.ticklabelmode==="period",l=e.range[0]>e.range[1],s=!e.ticklabelindex||dt.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],f=dt.simpleMap(e.range,e.r2l,void 0,void 0,r),c=f[1]<f[0],u=Math.min(f[0],f[1]),v=Math.max(f[0],f[1]),h=Math.max(1e3,e._length||0),d=[],p=[],m=[],y=[],b=[],_=e.minor&&(e.minor.ticks||e.minor.showgrid),g=1;g>=(_?0:1);g--){var x=!g;g?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var w=g?e:dt.extendFlat({},e,e.minor);if(x?Pe.prepMinorTicks(w,e,r):Pe.prepTicks(w,r),w.tickmode==="array"){g?(m=[],d=Vy(e,!x)):(y=[],p=Vy(e,!x));continue}if(w.tickmode==="sync"){m=[],d=c5(e);continue}var T=vp(f),A=T[0],M=T[1],S=dr(w.dtick),L=a==="log"&&!(S||w.dtick.charAt(0)==="L"),z=Pe.tickFirst(w,r);if(g){if(e._tmin=z,z<A!==c)break;(a==="category"||a==="multicategory")&&(M=c?Math.max(-.5,M):Math.min(e._categories.length-.5,M))}var N=null,$=z,R;if(g){var H;S?H=e.dtick:a==="date"?typeof e.dtick=="string"&&e.dtick.charAt(0)==="M"&&(H=Po*e.dtick.substring(1)):H=e._roughDTick,R=Math.round((e.r2l($)-e.r2l(e.tick0))/H)-1}var D=w.dtick;for(w.rangebreaks&&w._tick0Init!==w.tick0&&($=Qu($,e),c||($=Pe.tickIncrement($,D,!c,i))),g&&o&&($=Pe.tickIncrement($,D,!c,i),R--);c?$>=M:$<=M;$=Pe.tickIncrement($,D,c,i)){if(g&&R++,w.rangebreaks&&!c){if($<A)continue;if(w.maskBreaks($)===Qc&&Qu($,w)>=v)break}if(m.length>h||$===N)break;N=$;var P={value:$};g?(L&&$!==($|0)&&(P.simpleLabel=!0),n>1&&R%n&&(P.skipLabel=!0),m.push(P)):(P.minor=!0,y.push(P))}}if(!y||y.length<2)s=!1;else{var k=(y[1].value-y[0].value)*(l?-1:1);R5(k,e.tickformat)||(s=!1)}if(!s)b=m;else{var C=m.concat(y);o&&m.length&&(C=C.slice(1)),C=C.sort(function(se,be){return se.value-be.value}).filter(function(se,be,Le){return be===0||se.value!==Le[be-1].value});var E=C.map(function(se,be){return se.minor===void 0&&!se.skipLabel?be:null}).filter(function(se){return se!==null});E.forEach(function(se){s.map(function(be){var Le=se+be;Le>=0&&Le<C.length&&dt.pushUnique(b,C[Le])})})}if(_){var I=e.minor.ticks==="inside"&&e.ticks==="outside"||e.minor.ticks==="outside"&&e.ticks==="inside";if(!I){for(var j=m.map(function(se){return se.value}),G=[],X=0;X<y.length;X++){var O=y[X],Z=O.value;if(j.indexOf(Z)===-1){for(var V=!1,q=0;!V&&q<m.length;q++)1e7+m[q].value===1e7+Z&&(V=!0);V||G.push(O)}}y=G}}o&&f5(b,e,e._definedDelta);var B;if(e.rangebreaks){var J=e._id.charAt(0)==="y",ie=1;e.tickmode==="auto"&&(ie=e.tickfont?e.tickfont.size:12);var de=NaN;for(B=m.length-1;B>-1;B--){if(m[B].drop){m.splice(B,1);continue}m[B].value=Qu(m[B].value,e);var oe=e.c2p(m[B].value);(J?de>oe-ie:de<oe+ie)?m.splice(c?B+1:B,1):de=oe}}pp(e)&&Math.abs(f[1]-f[0])===360&&m.pop(),e._tmax=(m[m.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var Y,ee=function(se){se.text="",e._prevDateHead=Y};m=m.concat(y);function le(se,be){var Le=Pe.tickText(se,be.value,!1,be.simpleLabel),ve=be.periodX;return ve!==void 0&&(Le.periodX=ve,(ve>v||ve<u)&&(ve>v&&(Le.periodX=v),ve<u&&(Le.periodX=u),ee(Le))),Le}var ue;for(B=0;B<m.length;B++){var me=m[B].minor,pe=m[B].value;me?(s&&b.indexOf(m[B])!==-1?ue=le(e,m[B]):ue={x:pe},ue.minor=!0,p.push(ue)):(Y=e._prevDateHead,ue=le(e,m[B]),(m[B].skipLabel||s&&b.indexOf(m[B])===-1)&&ee(ue),d.push(ue))}return d=d.concat(p),e._inCalcTicks=!1,o&&d.length&&(d[0].noTick=!0),d};function Ww(t,e){return t.rangebreaks&&(e=e.filter(function(r){return t.maskBreaks(r.x)!==Qc})),e}function c5(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=Pe.tickText(t,n);e._vals[a].minor&&(o.minor=!0,o.text=""),r.push(o)}}return r=Ww(t,r),r}function Vy(t,e){var r=dt.simpleMap(t.range,t.r2l),a=vp(r),i=Math.min(a[0],a[1]),n=Math.max(a[0],a[1]),o=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 l=[],s=0;s<=1;s++)if(!(e!==void 0&&(e&&s||e===!1&&!s))&&!(s&&!t.minor)){var f=s?t.minor.tickvals:t.tickvals,c=s?[]:t.ticktext;if(f){dt.isArrayOrTypedArray(c)||(c=[]);for(var u=0;u<f.length;u++){var v=o(f[u]);if(v>i&&v<n){var h=Pe.tickText(t,v,!1,String(c[u]));s&&(h.minor=!0,h.text=""),l.push(h)}}}}return l=Ww(t,l),l}var Xs=[2,5,10],Wy=[1,2,3,6,12],Xy=[1,2,5,10,15,30],u5=[1,2,3,7,14],Xw=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Yw=[-.301,0,.301,.699,1],v5=[15,30,45,90,180];function Va(t,e,r){return e*dt.roundUp(t/e,r)}Pe.autoTicks=function(t,e,r){var a;function i(u){return Math.pow(u,Math.floor(Math.log(e)/Math.LN10))}if(t.type==="date"){t.tick0=dt.dateTick0(t.calendar,0);var n=2*e;if(n>ic)e/=ic,a=i(10),t.dtick="M"+12*Va(e,a,Xs);else if(n>Po)e/=Po,t.dtick="M"+Va(e,1,Wy);else if(n>Hr){if(t.dtick=Va(e,Hr,t._hasDayOfWeekBreaks?[1,2,7,14]:u5),!r){var o=Pe.getTickFormat(t),l=t.ticklabelmode==="period";l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=dt.dateTick0(t.calendar,2):t.tick0=dt.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}}else n>Qa?t.dtick=Va(e,Qa,Wy):n>Zl?t.dtick=Va(e,Zl,Xy):n>sc?t.dtick=Va(e,sc,Xy):(a=i(10),t.dtick=Va(e,a,Xs))}else if(t.type==="log"){t.tick0=0;var s=dt.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"+Va(e,a,Xs)}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))):pp(t)?(t.tick0=0,a=1,t.dtick=Va(e,a,v5)):(t.tick0=0,a=i(10),t.dtick=Va(e,a,Xs));if(t.dtick===0&&(t.dtick=1),!dr(t.dtick)&&typeof t.dtick!="string"){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}};function qw(t){var e=t.dtick;if(t._tickexponent=0,!dr(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>=Hr&&i<=10||e>=Hr*15)t._tickround="d";else if(e>=Zl&&i<=16||e>=Qa)t._tickround="M";else if(e>=sc&&i<=19||e>=Zl)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(dr(e)||e.charAt(0)==="L"){var o=t.range.map(t.r2d||Number);dr(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&&(cc(t.exponentformat)&&!dp(s)?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}Pe.tickIncrement=function(t,e,r,a){var i=r?-1:1;if(dr(e))return dt.increment(t,i*e);var n=e.charAt(0),o=i*Number(e.substr(1));if(n==="M")return dt.incrementMonth(t,o,a);if(n==="L")return Math.log(Math.pow(10,t)+o)/Math.LN10;if(n==="D"){var l=e==="D2"?Yw:Xw,s=t+i*.01,f=dt.roundUp(dt.mod(s,1),l,r);return Math.floor(s)+Math.log(ma.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)};Pe.tickFirst=function(t,e){var r=t.r2l||Number,a=dt.simpleMap(t.range,r,void 0,void 0,e),i=a[1]<a[0],n=i?Math.floor:Math.ceil,o=vp(a)[0],l=t.dtick,s=r(t.tick0);if(dr(l)){var f=n((o-s)/l)*l+s;return(t.type==="category"||t.type==="multicategory")&&(f=dt.constrain(f,0,t._categories.length-1)),f}var c=l.charAt(0),u=Number(l.substr(1));if(c==="M"){for(var v=0,h=s,d,p,m;v<10;){if(d=Pe.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),m=c+(Math.abs(Math.round(p))||1)*u,h=Pe.tickIncrement(h,m,p<0?!i:i,t.calendar),v++}return dt.error("tickFirst did not converge",t),h}else{if(c==="L")return Math.log(n((Math.pow(10,o)-s)/u)*u+s)/Math.LN10;if(c==="D"){var y=l==="D2"?Yw:Xw,b=dt.roundUp(dt.mod(o,1),y,i);return Math.floor(o)+Math.log(ma.round(Math.pow(10,b),1))/Math.LN10}else throw"unrecognized dtick "+String(l)}};Pe.tickText=function(t,e,r,a){var i=Zw(t,e),n=t.tickmode==="array",o=r||n,l=t.type,s=l==="category"?t.d2l_noadd:t.d2l,f,c=function(m){var y=t.l2p(m);return y>=0&&y<=t._length?m:null};if(n&&dt.isArrayOrTypedArray(t.ticktext)){var u=dt.simpleMap(t.range,t.r2l),v=(Math.abs(u[1]-u[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.xbnd=[c(i.x-.5),c(i.x+t.dtick-.5)],i}function h(m){if(m===void 0)return!0;if(r)return m==="none";var y={first:t._tmin,last:t._tmax}[m];return m!=="all"&&e!==y}var d=r?"never":t.exponentformat!=="none"&&h(t.showexponent)?"hide":"";if(l==="date"?d5(t,i,r,o):l==="log"?h5(t,i,r,o,d):l==="category"?p5(t,i):l==="multicategory"?m5(t,i,r):pp(t)?g5(t,i,r,o,d):y5(t,i,r,o,d),a||(t.tickprefix&&!h(t.showtickprefix)&&(i.text=t.tickprefix+i.text),t.ticksuffix&&!h(t.showticksuffix)&&(i.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(i.text)){var p=t.labelalias[i.text];typeof p=="string"&&(i.text=p)}return(t.tickson==="boundaries"||t.showdividers)&&(i.xbnd=[c(i.x-.5),c(i.x+t.dtick-.5)]),i};Pe.hoverLabelText=function(t,e,r){r&&(t=dt.extendFlat({},t,{hoverformat:r}));var a=dt.isArrayOrTypedArray(e)?e[0]:e,i=dt.isArrayOrTypedArray(e)?e[1]:void 0;if(i!==void 0&&i!==a)return Pe.hoverLabelText(t,a,r)+" - "+Pe.hoverLabelText(t,i,r);var n=t.type==="log"&&a<=0,o=Pe.tickText(t,t.c2l(n?-a:a),"hover").text;return n?a===0?"0":gn+o:o};function Zw(t,e,r){var a=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:a.size,font:a.family,fontWeight:a.weight,fontStyle:a.style,fontVariant:a.variant,fontTextcase:a.textcase,fontLineposition:a.lineposition,fontShadow:a.shadow,fontColor:a.color}}function d5(t,e,r,a){var i=t._tickround,n=r&&t.hoverformat||Pe.getTickFormat(t);a=!n&&a,a&&(dr(i)?i=4:i={y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o=dt.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&&(l!==void 0&&(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=Jl(t),c=t._trueSide||t.side;(!f&&c==="top"||f&&c==="bottom")&&(o+="<br> ")}e.text=o}function h5(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=Ql(Math.pow(10,o),t,i,a);else if(dr(n)||s==="D"&&(t.minorloglabels==="complete"||dt.mod(o+.01,1)<.1)){t.minorloglabels==="complete"&&!(dt.mod(o+.01,1)<.1)&&(e.fontSize*=.75);var f=Math.pow(10,o).toExponential(0),c=f.split("e"),u=+c[1],v=Math.abs(u),h=t.exponentformat;h==="power"||cc(h)&&dp(u)?(e.text=c[0],v>0&&(e.text+="x10"),e.text==="1x10"&&(e.text="10"),u!==0&&u!==1&&(e.text+="<sup>"+(u>0?"":gn)+v+"</sup>"),e.fontSize*=1.25):(h==="e"||h==="E")&&v>2?e.text=c[0]+h+(u>0?"+":gn)+v:(e.text=Ql(Math.pow(10,o),t,"","fakehover"),n==="D1"&&t._id.charAt(0)==="y"&&(e.dy-=e.fontSize/6))}else if(s==="D")e.text=t.minorloglabels==="none"?"":String(Math.round(Math.pow(10,dt.mod(o,1)))),e.fontSize*=.75;else throw"unrecognized dtick "+String(n);if(t.dtick==="D1"){var d=String(e.text).charAt(0);(d==="0"||d==="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 p5(t,e){var r=t._categories[Math.round(e.x)];r===void 0&&(r=""),e.text=String(r)}function m5(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 y5(t,e,r,a,i){i==="never"?i="":t.showexponent==="all"&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=Ql(e.x,t,i,a)}function g5(t,e,r,a,i){if(t.thetaunit==="radians"&&!r){var n=e.x/180;if(n===0)e.text="0";else{var o=b5(n);if(o[1]>=100)e.text=Ql(dt.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=gn+e.text)}}}else e.text=Ql(e.x,t,i,a)}function b5(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 x5=["f","p","n","μ","m","","k","M","G","T"];function cc(t){return t==="SI"||t==="B"}function dp(t){return t>14||t<-15}function Ql(t,e,r,a){var i=t<0,n=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,s=Pe.getTickFormat(e),f=e.separatethousands;if(a){var c={exponentformat:o,minexponent:e.minexponent,dtick:e.showexponent==="none"?e.dtick:dr(t)&&Math.abs(t)||1,range:e.showexponent==="none"?e.range.map(e.r2d):[0,t||1]};qw(c),n=(Number(c._tickround)||0)+4,l=c._tickexponent,e.hoverformat&&(s=e.hoverformat)}if(s)return e._numFormat(s)(t).replace(/-/g,gn);var u=Math.pow(10,-n)/2;if(o==="none"&&(l=0),t=Math.abs(t),t<u)t="0",i=!1;else{if(t+=u,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 v=n;v<0;v++)t+="0"}else{t=String(t);var h=t.indexOf(".")+1;h&&(t=t.substr(0,h+n).replace(/\.?0+$/,""))}t=dt.numSeparate(t,e._separators,f)}if(l&&o!=="hide"){cc(o)&&dp(l)&&(o="power");var d;l<0?d=gn+-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":cc(o)&&(t+=x5[l/3+5])}return i?gn+t:t}Pe.getTickFormat=function(t){var e;function r(s){return typeof s!="string"?s:Number(s.replace("M",""))*Po}function a(s,f){var c=["L","D"];if(typeof s==typeof f){if(typeof s=="number")return s-f;var u=c.indexOf(s.charAt(0)),v=c.indexOf(f.charAt(0));return u===v?Number(s.replace(/(L|D)/g,""))-Number(f.replace(/(L|D)/g,"")):u-v}else return typeof s=="number"?1:-1}function i(s,f,c){var u=c||function(d){return d},v=f[0],h=f[1];return(!v&&typeof v!="number"||u(v)<=u(s))&&(!h&&typeof h!="number"||u(h)>=u(s))}function n(s,f){var c=f[0]===null,u=f[1]===null,v=a(s,f[0])>=0,h=a(s,f[1])<=0;return(c||v)&&(u||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};Pe.getSubplots=function(t,e){var r=t._fullLayout._subplots,a=r.cartesian.concat(r.gl2d||[]),i=e?Pe.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};Pe.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};Pe.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=Pe.list(t,"x",!0),n=Pe.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){ma.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})})}};Pe.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 u=c.xaxis,v=c.yaxis;c.xaxislayer.selectAll("."+u._id+"tick").remove(),c.yaxislayer.selectAll("."+v._id+"tick").remove(),c.xaxislayer.selectAll("."+u._id+"tick2").remove(),c.yaxislayer.selectAll("."+v._id+"tick2").remove(),c.xaxislayer.selectAll("."+u._id+"divider").remove(),c.yaxislayer.selectAll("."+v._id+"divider").remove(),c.minorGridlayer&&c.minorGridlayer.selectAll("path").remove(),c.gridlayer&&c.gridlayer.selectAll("path").remove(),c.zerolinelayer&&c.zerolinelayer.selectAll("path").remove(),c.zerolinelayerAbove&&c.zerolinelayerAbove.selectAll("path").remove(),a._infolayer.select(".g-"+u._id+"title").remove(),a._infolayer.select(".g-"+v._id+"title").remove()}});var i=!e||e==="redraw"?Pe.listIds(t):e,n=Pe.list(t),o=n.filter(function(s){return s.autoshift}).map(function(s){return s.overlaying});i.map(function(s){var f=Pe.getFromId(t,s);if(f.tickmode==="sync"&&f.overlaying){var c=i.findIndex(function(u){return u===f.overlaying});c>=0&&i.unshift(i.splice(c,1).shift())}});var l={false:{left:0,right:0}};return dt.syncOrAsync(i.map(function(s){return function(){if(s){var f=Pe.getFromId(t,s);r||(r={}),r.axShifts=l,r.overlayingShiftedAx=o;var c=Pe.drawOne(t,f,r);return f._shiftPusher&&Qd(f,f._fullDepth||0,l,!0),f._r=f.range.slice(),f._rl=dt.simpleMap(f._r,f.r2l),c}}}))};Pe.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),u=Pe.counterLetter(f),v=s._plots[e._mainSubplot],h=e.zerolinelayer==="above traces";if(!v)return;if(e._shiftPusher=e.autoshift||i.indexOf(e._id)!==-1||i.indexOf(e.overlaying)!==-1,e._shiftPusher&e.anchor==="free"){var d=e.linewidth/2||0;e.ticks==="inside"&&(d+=e.ticklen),Qd(e,d,a,!0),Qd(e,e.shift||0,a,!1)}(r.skipTitle!==!0||e._shift===void 0)&&(e._shift=z5(e,a));var p=v[c+"axislayer"],m=e._mainLinePosition,y=m+=e._shift,b=e._mainMirrorPosition,_=e._vals=Pe.calcTicks(e),g=[e.mirror,y,b].join("_");for(n=0;n<_.length;n++)_[n].axInfo=g;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var x={};function w(pe){var se=f+(pe||"tick");return x[se]||(x[se]=k5(e,se,y)),x[se]}if(e.visible){var T=Pe.makeTransTickFn(e),A=Pe.makeTransTickLabelFn(e),M,S,L=e.ticks==="inside",z=e.ticks==="outside";if(e.tickson==="boundaries"){var N=_5(e,_);S=Pe.clipEnds(e,N),M=L?S:N}else S=Pe.clipEnds(e,_),M=L&&e.ticklabelmode!=="period"?S:_;var $=e._gridVals=S,R=T5(e,_);if(!s._hasOnlyLargeSploms){var H=e._subplotsWith,D={};for(n=0;n<H.length;n++){o=H[n],l=s._plots[o];var P=l[u+"axis"],k=P._mainAxis._id;if(!D[k]){D[k]=1;var C=c==="x"?"M0,"+P._offset+"v"+P._length:"M"+P._offset+",0h"+P._length;Pe.drawGrid(t,e,{vals:$,counterAxis:P,layer:l.gridlayer.select("."+f),minorLayer:l.minorGridlayer.select("."+f),path:C,transFn:T}),Pe.drawZeroLine(t,e,{counterAxis:P,layer:h?l.zerolinelayerAbove:l.zerolinelayer,path:C,transFn:T})}}}var E,I=Pe.getTickSigns(e),j=Pe.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var G=Pe.makeTickPath(e,y,I[2]),X=Pe.makeTickPath(e,y,j[2],{minor:!0}),O,Z,V,q;if(e._anchorAxis&&e.mirror&&e.mirror!==!0?(O=Pe.makeTickPath(e,b,I[3]),Z=Pe.makeTickPath(e,b,j[3],{minor:!0}),V=G+O,q=X+Z):(O="",Z="",V=G,q=X),e.showdividers&&z&&e.tickson==="boundaries"){var B={};for(n=0;n<R.length;n++)B[R[n].x]=1;E=function(pe){return B[pe.x]?O:V}}else E=function(pe){return pe.minor?q:V}}if(Pe.drawTicks(t,e,{vals:M,layer:p,path:E,transFn:T}),e.mirror==="allticks"){var J=Object.keys(e._linepositions||{});for(n=0;n<J.length;n++){o=J[n],l=s._plots[o];var ie=e._linepositions[o]||[],de=ie[0],oe=ie[1],Y=ie[2],ee=Pe.makeTickPath(e,de,Y?I[0]:j[0],{minor:Y})+Pe.makeTickPath(e,oe,Y?I[1]:j[1],{minor:Y});Pe.drawTicks(t,e,{vals:M,layer:l[c+"axislayer"],path:ee,transFn:T})}}var le=[];if(le.push(function(){return Pe.drawLabels(t,e,{vals:_,layer:p,plotinfo:l,transFn:A,labelFns:Pe.makeLabelFns(e,y)})}),e.type==="multicategory"){var ue={x:2,y:10}[c];le.push(function(){var pe={x:"height",y:"width"}[c],se=w()[pe]+ue+(e._tickAngles[f+"tick"]?e.tickfont.size*Kl:0);return Pe.drawLabels(t,e,{vals:w5(e,_),layer:p,cls:f+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:T,labelFns:Pe.makeLabelFns(e,y+se*I[4])})}),le.push(function(){return e._depth=I[4]*(w("tick2")[e.side]-y),M5(t,e,{vals:R,layer:p,path:Pe.makeTickPath(e,y,I[4],{len:e._depth}),transFn:T})})}else e.title.hasOwnProperty("standoff")&&le.push(function(){e._depth=I[4]*(w()[e.side]-y)});var me=Yl.getComponentMethod("rangeslider","isVisible")(e);return!r.skipTitle&&!(me&&e.side==="bottom")&&le.push(function(){return S5(t,e)}),le.push(function(){var pe=e.side.charAt(0),se=e5[e.side].charAt(0),be=Pe.getPxPosition(t,e),Le=z?e.ticklen:0,ve,Te,we,Q;(e.automargin||me||e._shiftPusher)&&(e.type==="multicategory"?ve=w("tick2"):(ve=w(),c==="x"&&pe==="b"&&(e._depth=Math.max(ve.width>0?ve.bottom-be:0,Le))));var xe=0,ae=0;if(e._shiftPusher&&(xe=Math.max(Le,ve.height>0?pe==="l"?be-ve.left:ve.right-be:0),e.title.text!==s._dfltTitle[c]&&(ae=(e._titleStandoff||0)+(e._titleScoot||0),pe==="l"&&(ae+=qy(e))),e._fullDepth=Math.max(xe,ae)),e.automargin){Te={x:0,y:0,r:0,l:0,t:0,b:0};var ge=[0,1],Ae=typeof e._shift=="number"?e._shift:0;if(c==="x"){if(pe==="b"?Te[pe]=e._depth:(Te[pe]=e._depth=Math.max(ve.width>0?be-ve.top:0,Le),ge.reverse()),ve.width>0){var ce=ve.right-(e._offset+e._length);ce>0&&(Te.xr=1,Te.r=ce);var De=e._offset-ve.left;De>0&&(Te.xl=0,Te.l=De)}}else if(pe==="l"?(e._depth=Math.max(ve.height>0?be-ve.left:0,Le),Te[pe]=e._depth-Ae):(e._depth=Math.max(ve.height>0?ve.right-be:0,Le),Te[pe]=e._depth+Ae,ge.reverse()),ve.height>0){var Se=ve.bottom-(e._offset+e._length);Se>0&&(Te.yb=0,Te.b=Se);var Me=e._offset-ve.top;Me>0&&(Te.yt=1,Te.t=Me)}Te[u]=e.anchor==="free"?e.position:e._anchorAxis.domain[ge[0]],e.title.text!==s._dfltTitle[c]&&(Te[pe]+=qy(e)+(e.title.standoff||0)),e.mirror&&e.anchor!=="free"&&(we={x:0,y:0,r:0,l:0,t:0,b:0},we[se]=e.linewidth,e.mirror&&e.mirror!==!0&&(we[se]+=Le),e.mirror===!0||e.mirror==="ticks"?we[u]=e._anchorAxis.domain[ge[1]]:(e.mirror==="all"||e.mirror==="allticks")&&(we[u]=[e._counterDomainMin,e._counterDomainMax][ge[1]]))}me&&(Q=Yl.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),typeof e.automargin=="string"&&(Yy(Te,e.automargin),Yy(we,e.automargin)),wo.autoMargin(t,hp(e),Te),wo.autoMargin(t,Qw(e),we),wo.autoMargin(t,Jw(e),Q)}),dt.syncOrAsync(le)}};function Yy(t,e){if(t){var r=Object.keys(jy).reduce(function(a,i){return e.indexOf(i)!==-1&&jy[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 _5(t,e){var r=[],a,i=function(n,o){var l=n.xbnd[o];l!==null&&r.push(dt.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 w5(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(Zw(t,dt.interp(a[o],.5),o));return r}function T5(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(dt.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 k5(t,e,r){var a,i,n,o;if(t._selections[e].size())a=1/0,i=-1/0,n=1/0,o=-1/0,t._selections[e].each(function(){var s=Kd(this);if(s.node().style.display!=="none"){var f=oa.bBox(s.node().parentNode);a=Math.min(a,f.top),i=Math.max(i,f.bottom),n=Math.min(n,f.left),o=Math.max(o,f.right)}});else{var l=Pe.makeLabelFns(t,r);a=i=l.yFn({dx:0,dy:0,fontSize:0}),n=o=l.xFn({dx:0,dy:0,fontSize:0})}return{top:a,bottom:i,left:n,right:o,height:i-a,width:o-n}}Pe.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};Pe.makeTransTickFn=function(t){return t._id.charAt(0)==="x"?function(e){return Do(t._offset+t.l2p(e.x),0)}:function(e){return Do(0,t._offset+t.l2p(e.x))}};Pe.makeTransTickLabelFn=function(t){var e=A5(t),r=t.ticklabelshift||0,a=t.ticklabelstandoff||0,i=e[0],n=e[1],o=t.range[0]>t.range[1],l=t.ticklabelposition&&t.ticklabelposition.indexOf("inside")!==-1,s=!l;if(r){var f=o?-1:1;r=r*f}if(a){var c=t.side,u=l&&(c==="top"||c==="left")||s&&(c==="bottom"||c==="right")?1:-1;a=a*u}return t._id.charAt(0)==="x"?function(v){return Do(i+t._offset+t.l2p(Zd(v))+r,n+a)}:function(v){return Do(n+a,i+t._offset+t.l2p(Zd(v))+r)}};function Zd(t){return t.periodX!==void 0?t.periodX:t.x}function A5(t){var e=t.ticklabelposition||"",r=t.tickson||"",a=function(d){return e.indexOf(d)!==-1},i=a("top"),n=a("left"),o=a("right"),l=a("bottom"),s=a("inside"),f=r!=="boundaries"&&(l||n||i||o);if(!f&&!s)return[0,0];var c=t.side,u=f?(t.tickwidth||0)/2:0,v=fc,h=t.tickfont?t.tickfont.size:12;return(l||i)&&(u+=h*bn,v+=(t.linewidth||0)/2),(n||o)&&(u+=(t.linewidth||0)/2,v+=fc),s&&c==="top"&&(v-=h*(1-bn)),(n||i)&&(u=-u),(c==="bottom"||c==="right")&&(v=-v),[f?u:0,s?v:0]}Pe.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};Pe.makeLabelFns=function(t,e,r){var a=t.ticklabelposition||"",i=t.tickson||"",n=function(N){return a.indexOf(N)!==-1},o=n("top"),l=n("left"),s=n("right"),f=n("bottom"),c=i!=="boundaries"&&(f||l||o||s),u=n("inside"),v=a==="inside"&&t.ticks==="inside"||!u&&t.ticks==="outside"&&i!=="boundaries",h=0,d=0,p=v?t.ticklen:0;if(u?p*=-1:c&&(p=0),v&&(h+=p,r)){var m=dt.deg2rad(r);h=p*Math.cos(m)+1,d=p*Math.sin(m)}t.showticklabels&&(v||t.showline)&&(h+=.2*t.tickfont.size),h+=(t.linewidth||1)/2*(u?-1:1);var y={labelStandoff:h,labelShift:d},b,_,g,x,w=0,T=t.side,A=t._id.charAt(0),M=t.tickangle,S;if(A==="x")S=!u&&T==="bottom"||u&&T==="top",x=S?1:-1,u&&(x*=-1),b=d*x,_=e+h*x,g=S?1:-.2,Math.abs(M)===90&&(u?g+=Pl:M===-90&&T==="bottom"?g=bn:M===90&&T==="top"?g=Pl:g=.5,w=Pl/2*(M/90)),y.xFn=function(N){return N.dx+b+w*N.fontSize},y.yFn=function(N){return N.dy+_+N.fontSize*g},y.anchorFn=function(N,$){if(c){if(l)return"end";if(s)return"start"}return!dr($)||$===0||$===180?"middle":$*x<0!==u?"end":"start"},y.heightFn=function(N,$,R){return $<-60||$>60?-.5*R:t.side==="top"!==u?-R:0};else if(A==="y"){if(S=!u&&T==="left"||u&&T==="right",x=S?1:-1,u&&(x*=-1),b=h,_=d*x,g=0,!u&&Math.abs(M)===90&&(M===-90&&T==="left"||M===90&&T==="right"?g=bn:g=.5),u){var L=dr(M)?+M:0;if(L!==0){var z=dt.deg2rad(L);w=Math.abs(Math.sin(z))*bn*x,g=0}}y.xFn=function(N){return N.dx+e-(b+N.fontSize*g)*x+w*N.fontSize},y.yFn=function(N){return N.dy+_+N.fontSize*Pl},y.anchorFn=function(N,$){return dr($)&&Math.abs($)===90?"middle":S?"end":"start"},y.heightFn=function(N,$,R){return t.side==="right"&&($*=-1),$<-30?-R:$<30?-.5*R:0}}return y};function eu(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}Pe.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,eu);n.exit().remove(),n.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return ql.stroke(ma.select(this),o.minor?e.minor.tickcolor:e.tickcolor)}).style("stroke-width",function(o){return oa.crispRound(t,o.minor?e.minor.tickwidth:e.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),tu(e,[Uw]),n.attr("transform",r.transFn)};Pe.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(y){return y.minor}):[],o=e.showgrid?r.vals.filter(function(y){return!y.minor}):[],l=r.counterAxis;if(l&&Pe.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=oa.crispRound(t,e.gridwidth,1);for(var u=i?oa.crispRound(t,e.minor.gridwidth,1):0,v=r.layer,h=r.minorLayer,d=1;d>=0;d--){var p=d?v:h;if(p){var m=p.selectAll("path."+a).data(d?o:n,eu);m.exit().remove(),m.enter().append("path").classed(a,1).classed("crisp",r.crisp!==!1),m.attr("transform",r.transFn).attr("d",r.path).each(function(y){return ql.stroke(ma.select(this),y.minor?e.minor.gridcolor:e.gridcolor||"#ddd")}).style("stroke-dasharray",function(y){return oa.dashStyle(y.minor?e.minor.griddash:e.griddash,y.minor?e.minor.gridwidth:e.gridwidth)}).style("stroke-width",function(y){return(y.minor?u:e._gw)+"px"}).style("display",null),typeof r.path=="function"&&m.attr("d",r.path)}}tu(e,[Yd,qd])}};Pe.drawZeroLine=function(t,e,r){r=r||r;var a=e._id+"zl",i=Pe.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 r5(o.id,l.id)})}),n.attr("transform",r.transFn).attr("d",r.path).call(ql.stroke,e.zerolinecolor||ql.defaultLine).style("stroke-width",oa.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),tu(e,[Xd])};Pe.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,i=e._id,n=e.zerolinelayer==="above traces",o=r.cls||i+"tick",l=r.vals.filter(function(k){return k.text}),s=r.labelFns,f=r.secondary?0:e.tickangle,c=(e._prevTickAngles||{})[o],u=r.layer.selectAll("g."+o).data(e.showticklabels?l:[],eu),v=[];u.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(k){var C=ma.select(this),E=t._promises.length;C.call(cn.positionText,s.xFn(k),s.yFn(k)).call(oa.font,{family:k.font,size:k.fontSize,color:k.fontColor,weight:k.fontWeight,style:k.fontStyle,variant:k.fontVariant,textcase:k.fontTextcase,lineposition:k.fontLineposition,shadow:k.fontShadow}).text(k.text).call(cn.convertToTspans,t),t._promises[E]?v.push(t._promises.pop().then(function(){h(C,f)})):h(C,f)}),tu(e,[Oy]),u.exit().remove(),r.repositionOnUpdate&&u.each(function(k){ma.select(this).select("text").call(cn.positionText,s.xFn(k),s.yFn(k))});function h(k,C){k.each(function(E){var I=ma.select(this),j=I.select(".text-math-group"),G=s.anchorFn(E,C),X=r.transFn.call(I.node(),E)+(dr(C)&&+C!=0?" rotate("+C+","+s.xFn(E)+","+(s.yFn(E)-E.fontSize/2)+")":""),O=cn.lineCount(I),Z=Kl*E.fontSize,V=s.heightFn(E,dr(C)?+C:0,(O-1)*Z);if(V&&(X+=Do(0,V)),j.empty()){var q=I.select("text");q.attr({transform:X,"text-anchor":G}),q.style("display",null),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var B=oa.bBox(j.node()).width,J=B*{end:-.5,start:.5}[G];j.attr("transform",X+Do(J,0))}})}e._adjustTickLabelsOverflow=function(){var k=e.ticklabeloverflow;if(!(!k||k==="allow")){var C=k.indexOf("hide")!==-1,E=e._id.charAt(0)==="x",I=0,j=E?t._fullLayout.width:t._fullLayout.height;if(k.indexOf("domain")!==-1){var G=dt.simpleMap(e.range,e.r2l);I=e.l2p(G[0])+e._offset,j=e.l2p(G[1])+e._offset}var X=Math.min(I,j),O=Math.max(I,j),Z=e.side,V=1/0,q=-1/0;u.each(function(de){var oe=ma.select(this),Y=oe.select(".text-math-group");if(Y.empty()){var ee=oa.bBox(oe.node()),le=0;E?(ee.right>O||ee.left<X)&&(le=1):(ee.bottom>O||ee.top+(e.tickangle?0:de.fontSize/4)<X)&&(le=1);var ue=oe.select("text");le?C&&ue.style("display","none"):ue.node().style.display!=="none"&&(ue.style("display",null),Z==="bottom"||Z==="right"?V=Math.min(V,E?ee.top:ee.left):V=-1/0,Z==="top"||Z==="left"?q=Math.max(q,E?ee.bottom:ee.right):q=1/0)}});for(var B in a._plots){var J=a._plots[B];if(!(e._id!==J.xaxis._id&&e._id!==J.yaxis._id)){var ie=E?J.yaxis:J.xaxis;ie&&(ie["_visibleLabelMin_"+e._id]=V,ie["_visibleLabelMax_"+e._id]=q)}}}},e._hideCounterAxisInsideTickLabels=function(k){var C=e._id.charAt(0)==="x",E=[];for(var I in a._plots){var j=a._plots[I];e._id!==j.xaxis._id&&e._id!==j.yaxis._id||E.push(C?j.yaxis:j.xaxis)}E.forEach(function(G,X){G&&Jl(G)&&(k||[Xd,qd,Yd,Uw,Oy]).forEach(function(O){var Z=O.K==="tick"&&O.L==="text"&&e.ticklabelmode==="period",V=a._plots[e._mainSubplot],q;if(O.K===Xd.K){var B=n?V.zerolinelayerAbove:V.zerolinelayer;q=B.selectAll("."+e._id+"zl")}else O.K===qd.K?q=V.minorGridlayer.selectAll("."+e._id):O.K===Yd.K?q=V.gridlayer.selectAll("."+e._id):q=V[e._id.charAt(0)+"axislayer"];q.each(function(){var J=ma.select(this);O.L&&(J=J.selectAll(O.L)),J.each(function(ie){var de=e.l2p(Z?Zd(ie):ie.x)+e._offset,oe=ma.select(this);de<e["_visibleLabelMax_"+G._id]&&de>e["_visibleLabelMin_"+G._id]?oe.style("display","none"):O.K==="tick"&&!X&&oe.node().style.display!=="none"&&oe.style("display",null)})})})})},h(u,c+1?c:f);function d(){return v.length&&Promise.all(v)}var p=null;function m(){if(h(u,f),l.length&&e.autotickangles&&(e.type!=="log"||String(e.dtick).charAt(0)!=="D")){p=e.autotickangles[0];var k=0,C=[],E,I=1;u.each(function(Te){k=Math.max(k,Te.fontSize);var we=e.l2p(Te.x),Q=Kd(this),xe=oa.bBox(Q.node());I=Math.max(I,cn.lineCount(Q)),C.push({top:0,bottom:10,height:10,left:we-xe.width/2,right:we+xe.width/2+2,width:xe.width+2})});var j=(e.tickson==="boundaries"||e.showdividers)&&!r.secondary,G=l.length,X=Math.abs((l[G-1].x-l[0].x)*e._m)/(G-1),O=j?X/2:X,Z=j?e.ticklen:k*1.25*I,V=Math.sqrt(Math.pow(O,2)+Math.pow(Z,2)),q=O/V,B=e.autotickangles.map(function(Te){return Te*Math.PI/180}),J=B.find(function(Te){return Math.abs(Math.cos(Te))<=q});J===void 0&&(J=B.reduce(function(Te,we){return Math.abs(Math.cos(Te))<Math.abs(Math.cos(we))?Te:we},B[0]));var ie=J*(180/Math.PI);if(j){var de=2;for(e.ticks&&(de+=e.tickwidth/2),E=0;E<C.length;E++){var oe=l[E].xbnd,Y=C[E];if(oe[0]!==null&&Y.left-e.l2p(oe[0])<de||oe[1]!==null&&e.l2p(oe[1])-Y.right<de){p=ie;break}}}else{var ee=e.ticklabelposition||"",le=e.tickson||"",ue=function(Te){return ee.indexOf(Te)!==-1},me=ue("top"),pe=ue("left"),se=ue("right"),be=ue("bottom"),Le=le!=="boundaries"&&(be||pe||me||se),ve=Le?(e.tickwidth||0)+2*fc:0;for(E=0;E<C.length-1;E++)if(dt.bBoxIntersect(C[E],C[E+1],ve)){p=ie;break}}p&&h(u,p)}}e._selections&&(e._selections[o]=u);var y=[d];e.automargin&&a._redrawFromAutoMarginCount&&c===90?(p=c,y.push(function(){h(u,c)})):y.push(m),e._tickAngles&&y.push(function(){e._tickAngles[o]=p===null?dr(f)?f:0:p});var b=function(){var k=0,C=0;return u.each(function(E,I){var j=Kd(this),G=j.select(".text-math-group");if(G.empty()){var X;e._vals[I]&&(X=e._vals[I].bb||oa.bBox(j.node()),e._vals[I].bb=X),k=Math.max(k,X.width),C=Math.max(C,X.height)}}),{labelsMaxW:k,labelsMaxH:C}},_=e._anchorAxis;if(_&&(_.autorange||_.insiderange)&&Jl(e)&&!a5(a,e._id)&&(a._insideTickLabelsUpdaterange||(a._insideTickLabelsUpdaterange={}),_.autorange&&(a._insideTickLabelsUpdaterange[_._name+".autorange"]=_.autorange,y.push(b)),_.insiderange)){var g=b(),x=e._id.charAt(0)==="y"?g.labelsMaxW:g.labelsMaxH;x+=2*fc,e.ticklabelposition==="inside"&&(x+=e.ticklen||0);var w=e.side==="right"||e.side==="top"?1:-1,T=w===1?1:0,A=w===1?0:1,M=[];M[A]=_.range[A];var S=_.range,L=_.r2p(S[T]),z=_.r2p(S[A]),N=a._insideTickLabelsUpdaterange[_._name+".range"];if(N){var $=_.r2p(N[T]),R=_.r2p(N[A]),H=w*(e._id.charAt(0)==="y"?1:-1);H*L<H*$&&(L=$,M[T]=S[T]=N[T]),H*z>H*R&&(z=R,M[A]=S[A]=N[A])}var D=Math.abs(z-L);D-x>0?(D-=x,x*=1+x/D):x=0,e._id.charAt(0)!=="y"&&(x=-x),M[T]=_.p2r(_.r2p(S[T])+w*x),_.autorange==="min"||_.autorange==="max reversed"?(M[0]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0):(_.autorange==="max"||_.autorange==="min reversed")&&(M[1]=null,_._rangeInitial0=void 0,_._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[_._name+".range"]=M}var P=dt.syncOrAsync(y);return P&&P.then&&t._promises.push(P),P};function M5(t,e,r){var a=e._id+"divider",i=r.vals,n=r.layer.selectAll("path."+a).data(i,eu);n.exit().remove(),n.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(ql.stroke,e.dividercolor).style("stroke-width",oa.crispRound(t,e.dividerwidth,1)+"px"),n.attr("transform",r.transFn).attr("d",r.path)}Pe.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 qy(t){var e=t.title.font.size,r=(t.title.text.match(cn.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?e*(bn+r*Kl):r?e*(r+1)*Kl:e}function S5(t,e){var r=t._fullLayout,a=e._id,i=a.charAt(0),n=e.title.font.size,o,l=(e.title.text.match(cn.BR_TAG_ALL)||[]).length;if(e.title.hasOwnProperty("standoff"))e.side==="bottom"||e.side==="right"?o=e._depth+e.title.standoff+n*bn:(e.side==="top"||e.side==="left")&&(o=e._depth+e.title.standoff+n*(Pl+l*Kl));else{var s=Jl(e);if(e.type==="multicategory")o=e._depth;else{var f=1.5*n;s&&(f=.5*n,e.ticks==="outside"&&(f+=e.ticklen)),o=10+f+(e.linewidth?e.linewidth-1:0)}s||(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 c=Pe.getPxPosition(t,e),u,v,h;i==="x"?(v=e._offset+e._length/2,h=e.side==="top"?c-o:c+o):(h=e._offset+e._length/2,v=e.side==="right"?c+o:c-o,u={rotate:"-90",offset:0});var d;if(e.type!=="multicategory"){var p=e._selections[e._id+"tick"];if(d={selection:p,side:e.side},p&&p.node()&&p.node().parentNode){var m=oa.getTranslate(p.node().parentNode);d.offsetLeft=m.x,d.offsetTop=m.y}e.title.hasOwnProperty("standoff")&&(d.pad=0)}return e._titleStandoff=o,XD.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:r._dfltTitle[i],avoid:d,transform:u,attributes:{x:v,y:h,"text-anchor":"middle"}})}Pe.shouldShowZeroLine=function(t,e,r){var a=dt.simpleMap(e.range,e.r2l);return a[0]*a[1]<=0&&e.zeroline&&(e.type==="linear"||e.type==="-")&&!(e.rangebreaks&&e.maskBreaks(0)===Qc)&&(Kw(e,0)||!L5(t,e,r,a)||C5(t,e))};Pe.clipEnds=function(t,e){return e.filter(function(r){return Kw(t,r.x)})};function Kw(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function L5(t,e,r,a){var i=r._mainAxis;if(!i)return;var n=t._fullLayout,o=e._id.charAt(0),l=Pe.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 m(_){return typeof _=="number"&&Math.abs(_-s)<p}if(m(d._mainLinePosition)||m(d._mainMirrorPosition))return!0;var y=d._linepositions||{};for(var b in y)if(m(y[b][0])||m(y[b][1]))return!0}var c=n._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return f(r);for(var u=Pe.list(t,l),v=0;v<u.length;v++){var h=u[v];if(h._mainAxis===i&&f(h))return!0}}function C5(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&&(Yl.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 Kd(t){var e=ma.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}Pe.allowAutoMargin=function(t){for(var e=Pe.list(t,"",!0),r=0;r<e.length;r++){var a=e[r];a.automargin&&(wo.allowAutoMargin(t,hp(a)),a.mirror&&wo.allowAutoMargin(t,Qw(a))),Yl.getComponentMethod("rangeslider","isVisible")(a)&&wo.allowAutoMargin(t,Jw(a))}};function hp(t){return t._id+".automargin"}function Qw(t){return hp(t)+".mirror"}function Jw(t){return t._id+".rangeslider"}Pe.swap=function(t,e){for(var r=D5(t,e),a=0;a<r.length;a++)P5(t,r[a].x,r[a].y)};function D5(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]],Ys(s.x,f.x),Ys(s.y,f.y);Ys(s.x,[o]),Ys(s.y,[l])}}return r}function Ys(t,e){for(var r=0;r<e.length;r++)t.indexOf(e[r])===-1&&t.push(e[r])}function P5(t,e,r){var a=[],i=[],n=t.layout,o,l;for(o=0;o<e.length;o++)a.push(Pe.getFromId(t,e[o]));for(o=0;o<r.length;o++)i.push(Pe.getFromId(t,r[o]));var s=Object.keys(YD),f=["anchor","domain","overlaying","position","side","tickangle","editType"],c=["linear","log"];for(o=0;o<s.length;o++){var u=s[o],v=a[0][u],h=i[0][u],d=!0,p=!1,m=!1;if(!(u.charAt(0)==="_"||typeof v=="function"||f.indexOf(u)!==-1)){for(l=1;l<a.length&&d;l++){var y=a[l][u];u==="type"&&c.indexOf(v)!==-1&&c.indexOf(y)!==-1&&v!==y?p=!0:y!==v&&(d=!1)}for(l=1;l<i.length&&d;l++){var b=i[l][u];u==="type"&&c.indexOf(h)!==-1&&c.indexOf(b)!==-1&&h!==b?m=!0:i[l][u]!==h&&(d=!1)}d&&(p&&(n[a[0]._name].type="linear"),m&&(n[i[0]._name].type="linear"),E5(n,u,a,i,t._fullLayout._dfltTitle))}}for(o=0;o<t._fullLayout.annotations.length;o++){var _=t._fullLayout.annotations[o];e.indexOf(_.xref)!==-1&&r.indexOf(_.yref)!==-1&&dt.swapAttrs(n.annotations[o],["?"])}}function E5(t,e,r,a,i){var n=dt.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 pp(t){return t._id==="angularaxis"}function Qu(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 Jl(t){return(t.ticklabelposition||"").indexOf("inside")!==-1}function tu(t,e){Jl(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}function Qd(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 z5(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}function R5(t,e){return/%f/.test(e)?t>=JD:/%L/.test(e)?t>=QD:/%[SX]/.test(e)?t>=sc:/%M/.test(e)?t>=Zl:/%[HI]/.test(e)?t>=Qa:/%p/.test(e)?t>=Ri:/%[Aadejuwx]/.test(e)?t>=Hr:/%[UVW]/.test(e)?t>=la:/%[Bbm]/.test(e)?t>=lc:/%[q]/.test(e)?t>=oc:/%[Yy]/.test(e)?t>=nc:!0}var Ot=iw.exports,I5=function(e,r,a){var i,n;if(a){var o=r==="reversed"||r==="min reversed"||r==="max reversed";i=a[o?1:0],n=a[o?0:1]}var l=e("autorangeoptions.minallowed",n===null?i:void 0),s=e("autorangeoptions.maxallowed",i===null?n:void 0);l===void 0&&e("autorangeoptions.clipmin"),s===void 0&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")},F5=I5,eT=function(e,r,a,i){var n=r._template||{},o=r.type||n.type||"-";a("minallowed"),a("maxallowed");var l=a("range");if(!l){var s;!i.noInsiderange&&o!=="log"&&(s=a("insiderange"),s&&(s[0]===null||s[1]===null)&&(r.insiderange=!1,s=void 0),s&&(l=a("range",s)))}var f=r.getAutorangeDflt(l,i),c=a("autorange",f),u;l&&(l[0]===null&&l[1]===null||(l[0]===null||l[1]===null)&&(c==="reversed"||c===!0)||l[0]!==null&&(c==="min"||c==="max reversed")||l[1]!==null&&(c==="max"||c==="min reversed"))&&(l=void 0,delete r.range,r.autorange=!0,u=!0),u||(f=r.getAutorangeDflt(l,i),c=a("autorange",f)),c&&(F5(a,c,l),(o==="linear"||o==="-")&&a("rangemode")),r.cleanRange()},Ju={},tT={exports:{}},N5=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},Zy=ke,$5=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]],H5=function(e,r,a,i){return a==="left"?e=0:a==="center"?e=1:a==="right"?e=2:e=Zy.constrain(Math.floor(e*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Zy.constrain(Math.floor(r*3),0,2),$5[r][e]},rT={exports:{}},O5=gs,j5=Vc,B5=Oc.getGraphDiv,G5=Ic,Jd=rT.exports={};Jd.wrapped=function(t,e,r){t=B5(t),t._fullLayout&&j5.clear(t._fullLayout._uid+G5.HOVERID),Jd.raw(t,e,r)};Jd.raw=function(e,r){var a=e._fullLayout,i=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&O5.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 U5=rT.exports,V5=pM,ev=W1,W5=V1,X5=ke.removeElement,Y5=Ir,kn=tT.exports={};kn.align=N5;kn.getCursor=H5;var aT=U5;kn.unhover=aT.wrapped;kn.unhoverRaw=aT.raw;kn.init=function(e){var r=e.gd,a=1,i=r._context.doubleClickDelay,n=e.element,o,l,s,f,c,u,v,h;r._mouseDownTime||(r._mouseDownTime=0),n.style.pointerEvents="all",n.onmousedown=m,W5?(n._ontouchstart&&n.removeEventListener("touchstart",n._ontouchstart),n._ontouchstart=m,n.addEventListener("touchstart",m,{passive:!1})):n.ontouchstart=m;function d(_,g,x){return Math.abs(_)<x&&(_=0),Math.abs(g)<x&&(g=0),[_,g]}var p=e.clampFn||d;function m(_){r._dragged=!1,r._dragging=!0;var g=Ky(_);o=g[0],l=g[1],v=_.target,u=_,h=_.buttons===2||_.ctrlKey,typeof _.clientX>"u"&&typeof _.clientY>"u"&&(_.clientX=o,_.clientY=l),s=new Date().getTime(),s-r._mouseDownTime<i?a+=1:(a=1,r._mouseDownTime=s),e.prepFn&&e.prepFn(_,o,l),ev&&!h?(c=iT(),c.style.cursor=window.getComputedStyle(n).cursor):ev||(c=document,f=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(n).cursor),document.addEventListener("mouseup",b),document.addEventListener("touchend",b),e.dragmode!==!1&&(_.preventDefault(),document.addEventListener("mousemove",y),document.addEventListener("touchmove",y,{passive:!1}))}function y(_){_.preventDefault();var g=Ky(_),x=e.minDrag||Y5.MINDRAG,w=p(g[0]-o,g[1]-l,x),T=w[0],A=w[1];(T||A)&&(r._dragged=!0,kn.unhover(r,_)),r._dragged&&e.moveFn&&!h&&(r._dragdata={element:n,dx:T,dy:A},e.moveFn(T,A))}function b(_){if(delete r._dragdata,e.dragmode!==!1&&(_.preventDefault(),document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",y)),document.removeEventListener("mouseup",b),document.removeEventListener("touchend",b),ev?X5(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{var g;u.target===v?g=u:(g={target:v,srcElement:v,toElement:v},Object.keys(u).concat(Object.keys(u.__proto__)).forEach(x=>{var w=u[x];!g[x]&&typeof w!="function"&&(g[x]=w)})),e.clickFn&&e.clickFn(a,g),h||v.dispatchEvent(new MouseEvent("click",_))}r._dragging=!1,r._dragged=!1}};function iT(){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}kn.coverSlip=iT;function Ky(t){return V5(t.changedTouches?t.changedTouches[0]:t,document.body)}var ai=tT.exports,ru={},Bi=function(e,r){(e.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&e.classed(a,!1)}),r&&e.classed("cursor-"+r,!0)},tv=Bi,cl="data-savedcursor",Qy="!!",q5=function(e,r){var a=e.attr(cl);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(cl,o.substr(7)).classed(o,!1)}e.attr(cl)||e.attr(cl,Qy)}tv(e,r)}else a&&(e.attr(cl,null),a===Qy?tv(e):tv(e,a))},rv=Mr,Z5=Or,nT={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend",description:["Determines whether or not this legend is visible."].join(" ")},bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:Z5.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},maxheight:{valType:"number",min:0,editType:"legend",description:["Sets the max height (in px) of the legend, or max height ratio (reference height * ratio) if less than or equal to 1.","Default value is: 0.5 for horizontal legends; 1 for vertical legends. The minimum allowed height is 30px.","For a ratio of 0.5, the legend will take up to 50% of the reference height before displaying a scrollbar.","The reference height is the full layout height with the following exception: vertically oriented legends with",'a `yref` of `"paper", located to the side of the plot. In this case, the reference height is the plot height.'].join(" ")},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:rv({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:rv({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."},indentation:{valType:"number",min:-15,dflt:0,editType:"legend",description:"Sets the indentation (in px) of the legend entries."},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",editType:"legend",description:["Sets the x position with respect to `xref` (in normalized coordinates) of the legend.","When `xref` is *paper*, defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends.","When `xref` is *container*, defaults to *1* for vertical legends and","defaults to *0* for horizontal legends.","Must be between *0* and *1* if `xref` is *container*.","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",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(" ")},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",editType:"legend",description:["Sets the y position with respect to `yref` (in normalized coordinates) of the legend.","When `yref` is *paper*, 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.","When `yref` is *container*, defaults to *1*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",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(" ")},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:rv({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","top center","top right"],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","top center and top right are for horizontal alignment","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"},Zo={};Zo.isGrouped=function(e){return(e.traceorder||"").indexOf("grouped")!==-1};Zo.isVertical=function(e){return e.orientation!=="h"};Zo.isReversed=function(e){return(e.traceorder||"").indexOf("reversed")!==-1};var av=ot,na=ke,K5=Ht,Q5=_a,J5=nT,e3=ys,iv=Zo;function t3(t,e,r,a){var i=e[t]||{},n=K5.newContainer(r,t);function o(D,P){return na.coerce(i,n,J5,D,P)}var l=na.coerceFont(o,"font",r.font);o("bgcolor",r.paper_bgcolor),o("bordercolor");var s=o("visible");if(s){for(var f,c=function(D,P){var k=f._input,C=f;return na.coerce(k,C,Q5,D,P)},u=r.font||{},v=na.coerceFont(o,"grouptitlefont",u,{overrideDflt:{size:Math.round(u.size*1.1)}}),h=0,d=!1,p="normal",m=(r.shapes||[]).filter(function(D){return D.showlegend}),y=a.concat(m).filter(function(D){return t===(D.legend||"legend")}),b=0;b<y.length;b++)if(f=y[b],!!f.visible){var _=f._isShape;(f.showlegend||f._dfltShowLegend&&!(f._module&&f._module.attributes&&f._module.attributes.showlegend&&f._module.attributes.showlegend.dflt===!1))&&(h++,f.showlegend&&(d=!0,(!_&&av.traceIs(f,"pie-like")||f._input.showlegend===!0)&&h++),na.coerceFont(c,"legendgrouptitle.font",v)),(!_&&av.traceIs(f,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(f.fill)!==-1)&&(p=iv.isGrouped({traceorder:p})?"grouped+reversed":"reversed"),f.legendgroup!==void 0&&f.legendgroup!==""&&(p=iv.isReversed({traceorder:p})?"reversed+grouped":"grouped")}var g=na.coerce(e,r,e3,"showlegend",d&&h>(t==="legend"?1:0));if(g===!1&&(r[t]=void 0),!(g===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),g!==!1)){o("borderwidth");var x=o("orientation"),w=o("yref"),T=o("xref"),A=x==="h",M=w==="paper",S=T==="paper",L,z,N,$="left";A?(L=0,av.getComponentMethod("rangeslider","isVisible")(e.xaxis)?M?(z=1.1,N="bottom"):(z=1,N="top"):M?(z=-.1,N="top"):(z=0,N="bottom")):(z=1,N="auto",S?L=1.02:(L=1,$="right")),na.coerce(i,n,{x:{valType:"number",editType:"legend",min:S?-2:0,max:S?3:1,dflt:L}},"x"),na.coerce(i,n,{y:{valType:"number",editType:"legend",min:M?-2:0,max:M?3:1,dflt:z}},"y"),o("traceorder",p),iv.isGrouped(r[t])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",$),o("yanchor",N),o("maxheight"),o("valign"),na.noneOrAll(i,n,["x","y"]);var R=o("title.text");if(R){o("title.side",A?"left":"top");var H=na.extendFlat({},l,{size:na.bigFont(l.size)});na.coerceFont(o,"title.font",H)}}}}var oT=function(e,r,a){var i,n=a.slice(),o=r.shapes;if(o)for(i=0;i<o.length;i++){var l=o[i];if(l.showlegend){var s={_input:l._input,visible:l.visible,showlegend:l.showlegend,legend:l.legend};n.push(s)}}var f=["legend"];for(i=0;i<n.length;i++)na.pushUnique(f,n[i].legend);for(r._legends=[],i=0;i<f.length;i++){var c=f[i];t3(c,e,r,n),r[c]&&r[c].visible&&(r[c]._id=c),r._legends.push(c)}},Bn=ot,eh=ke,r3=eh.pushUnique,nv=!0,a3=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"&&nv&&r.data&&r._context.showTips&&eh.notifier(eh._(r,"Double-click on legend to isolate one trace"),"long"),nv=!1;var s;if(a===1?s=n:a===2&&(s=o),!s)return;var f=l==="togglegroup",c=i.hiddenlabels?i.hiddenlabels.slice():[],u=e.data()[0][0];if(u.groupTitle&&u.noClick)return;var v=r._fullData,h=(i.shapes||[]).filter(function(se){return se.showlegend}),d=v.concat(h),p=u.trace;p._isShape&&(p=p._fullInput);var m=p.legendgroup,y,b,_,g,x,w,T={},A=[],M=[],S=[];function L(se,be){var Le=A.indexOf(se),ve=T.visible;return ve||(ve=T.visible=[]),A.indexOf(se)===-1&&(A.push(se),Le=A.length-1),ve[Le]=be,Le}var z=(i.shapes||[]).map(function(se){return se._input}),N=!1;function $(se,be){z[se].visible=be,N=!0}function R(se,be){if(!(u.groupTitle&&!f)){var Le=se._fullInput||se,ve=Le._isShape,Te=Le.index;Te===void 0&&(Te=Le._index);var we=Le.visible===!1?!1:be;ve?$(Te,we):L(Te,we)}}var H=p.legend,D=p._fullInput,P=D&&D._isShape;if(!P&&Bn.traceIs(p,"pie-like")){var k=u.label,C=c.indexOf(k);if(s==="toggle")C===-1?c.push(k):c.splice(C,1);else if(s==="toggleothers"){var E=C!==-1,I=[];for(y=0;y<r.calcdata.length;y++){var j=r.calcdata[y];for(b=0;b<j.length;b++){var G=j[b],X=G.label;H===j[0].trace.legend&&k!==X&&(c.indexOf(X)===-1&&(E=!0),r3(c,X),I.push(X))}}if(!E)for(var O=0;O<I.length;O++){var Z=c.indexOf(I[O]);Z!==-1&&c.splice(Z,1)}}Bn.call("_guiRelayout",r,"hiddenlabels",c)}else{var V=m&&m.length,q=[],B;if(V)for(y=0;y<d.length;y++)B=d[y],B.visible&&B.legendgroup===m&&q.push(y);if(s==="toggle"){var J;switch(p.visible){case!0:J="legendonly";break;case!1:J=!1;break;case"legendonly":J=!0;break}if(V)if(f)for(y=0;y<d.length;y++){var ie=d[y];ie.visible!==!1&&ie.legendgroup===m&&R(ie,J)}else R(p,J);else R(p,J)}else if(s==="toggleothers"){var de,oe,Y,ee,le,ue=!0;for(y=0;y<d.length;y++)if(le=d[y],de=le===p,Y=le.showlegend!==!0,!(de||Y)&&(oe=V&&le.legendgroup===m,!oe&&le.legend===H&&le.visible===!0&&!Bn.traceIs(le,"notLegendIsolatable"))){ue=!1;break}for(y=0;y<d.length;y++)if(le=d[y],!(le.visible===!1||le.legend!==H)&&!Bn.traceIs(le,"notLegendIsolatable"))switch(p.visible){case"legendonly":R(le,!0);break;case!0:ee=ue?!0:"legendonly",de=le===p,Y=le.showlegend!==!0&&!le.legendgroup,oe=de||V&&le.legendgroup===m,R(le,oe||Y?!0:ee);break}}for(y=0;y<M.length;y++)if(_=M[y],!!_){var me=_.constructUpdate(),pe=Object.keys(me);for(b=0;b<pe.length;b++)g=pe[b],w=T[g]=T[g]||[],w[S[y]]=me[g]}for(x=Object.keys(T),y=0;y<x.length;y++)for(g=x[y],b=0;b<A.length;b++)T[g].hasOwnProperty(b)||(T[g][b]=void 0);N?Bn.call("_guiUpdate",r,T,{shapes:z},A):Bn.call("_guiRestyle",r,T,A)}},lT={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5},Jy=ot,ov=Zo,i3=function(e,r,a){var i=r._inHover,n=ov.isGrouped(r),o=ov.isReversed(r),l={},s=[],f=!1,c={},u=0,v=0,h,d;function p(D,P,k){if(r.visible!==!1&&!(a&&D!==r._id))if(P===""||!ov.isGrouped(r)){var C="~~i"+u;s.push(C),l[C]=[k],u++}else s.indexOf(P)===-1?(s.push(P),f=!0,l[P]=[k]):l[P].push(k)}for(h=0;h<e.length;h++){var m=e[h],y=m[0],b=y.trace,_=b.legend,g=b.legendgroup;if(!(!i&&(!b.visible||!b.showlegend)))if(Jy.traceIs(b,"pie-like"))for(c[g]||(c[g]={}),d=0;d<m.length;d++){var x=m[d].label;c[g][x]||(p(_,g,{label:x,color:m[d].color,i:m[d].i,trace:b,pts:m[d].pts}),c[g][x]=!0,v=Math.max(v,(x||"").length))}else p(_,g,y),v=Math.max(v,(b.name||"").length)}if(!s.length)return[];var w=!f||!n,T=[];for(h=0;h<s.length;h++){var A=l[s[h]];w?T.push(A[0]):T.push(A)}for(w&&(T=[T]),h=0;h<T.length;h++){var M=1/0;for(d=0;d<T[h].length;d++){var S=T[h][d].trace.legendrank;M>S&&(M=S)}T[h][0]._groupMinRank=M,T[h][0]._preGroupSort=h}var L=function(D,P){return D[0]._groupMinRank-P[0]._groupMinRank||D[0]._preGroupSort-P[0]._preGroupSort},z=function(D,P){return D.trace.legendrank-P.trace.legendrank||D._preSort-P._preSort};for(T.forEach(function(D,P){D[0]._preGroupSort=P}),T.sort(L),h=0;h<T.length;h++){T[h].forEach(function(D,P){D._preSort=P}),T[h].sort(z);var N=T[h][0].trace,$=null;for(d=0;d<T[h].length;d++){var R=T[h][d].trace.legendgrouptitle;if(R&&R.text){$=R,i&&(R.font=r._groupTitleFont);break}}if(o&&T[h].reverse(),$){var H=!1;for(d=0;d<T[h].length;d++)if(Jy.traceIs(T[h][d].trace,"pie-like")){H=!0;break}T[h].unshift({i:-1,groupTitle:$,noClick:H,trace:{showlegend:N.showlegend,legendgroup:N.legendgroup,visible:r.groupclick==="toggleitem"?!0:N.visible}})}for(d=0;d<T[h].length;d++)T[h][d]=[T[h][d]]}return r._lgroupsLength=T.length,r._maxNameLength=v,T},Fn={};(function(t){var e=ke;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(e.isArrayOrTypedArray(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(e.isArrayOrTypedArray(i))return t.getFirstFilled(i,n);if(i)return i},t.getRotationAngle=function(a){return(a==="auto"?0:a)*Math.PI/180}})(Fn);var n3=zt,o3=yt,l3=function(e,r,a,i){var n=a.marker.pattern;n&&n.shape?n3.pointStyle(e,a,i,r):o3.fill(e,r.color)},eg=yt,tg=Fn.castOption,s3=l3,mp=function(e,r,a,i){var n=a.marker.line,o=tg(n.color,r.pts)||eg.defaultLine,l=tg(n.width,r.pts)||0;e.call(s3,r,a,i).style("stroke-width",l).call(eg.stroke,o)},Fr=bt,lv=ot,Rr=ke,rg=Rr.strTranslate,aa=zt,ua=yt,sv=ja.extractOpts,uc=jr,f3=mp,c3=Fn.castOption,u3=lT,ag=12,ig=5,Ki=2,v3=10,Gn=5,sT=function(e,r,a){var i=r._fullLayout;a||(a=i.legend);var n=a.itemsizing==="constant",o=a.itemwidth,l=(o+u3.itemGap*2)/2,s=rg(l,0),f=function(T,A,M,S){var L;if(T+1)L=T;else if(A&&A.width>0)L=A.width;else return 0;return n?S:Math.min(L,M)};e.each(function(T){var A=Fr.select(this),M=Rr.ensureSingle(A,"g","layers");M.style("opacity",T[0].trace.opacity);var S=a.indentation,L=a.valign,z=T[0].lineHeight,N=T[0].height;if(L==="middle"&&S===0||!z||!N)M.attr("transform",null);else{var $={top:1,bottom:-1}[L],R=$*(.5*(z-N+3))||0,H=a.indentation;M.attr("transform",rg(H,R))}var D=M.selectAll("g.legendfill").data([T]);D.enter().append("g").classed("legendfill",!0);var P=M.selectAll("g.legendlines").data([T]);P.enter().append("g").classed("legendlines",!0);var k=M.selectAll("g.legendsymbols").data([T]);k.enter().append("g").classed("legendsymbols",!0),k.selectAll("g.legendpoints").data([T]).enter().append("g").classed("legendpoints",!0)}).each(w).each(v).each(d).each(h).each(m).each(g).each(_).each(c).each(u).each(y).each(b);function c(T){var A=ng(T),M=A.showFill,S=A.showLine,L=A.showGradientLine,z=A.showGradientFill,N=A.anyFill,$=A.anyLine,R=T[0],H=R.trace,D,P,k=sv(H),C=k.colorscale,E=k.reversescale,I=function(q){if(q.size())if(M)aa.fillGroupStyle(q,r,!0);else{var B="legendfill-"+H.uid;aa.gradient(q,r,B,fv(E),C,"fill")}},j=function(q){if(q.size()){var B="legendline-"+H.uid;aa.lineGroupStyle(q),aa.gradient(q,r,B,fv(E),C,"stroke")}},G=uc.hasMarkers(H)||!N?"M5,0":$?"M5,-2":"M5,-3",X=Fr.select(this),O=X.select(".legendfill").selectAll("path").data(M||z?[T]:[]);if(O.enter().append("path").classed("js-fill",!0),O.exit().remove(),O.attr("d",G+"h"+o+"v6h-"+o+"z").call(I),S||L){var Z=f(void 0,H.line,v3,ig);P=Rr.minExtend(H,{line:{width:Z}}),D=[Rr.minExtend(R,{trace:P})]}var V=X.select(".legendlines").selectAll("path").data(S||L?[D]:[]);V.enter().append("path").classed("js-line",!0),V.exit().remove(),V.attr("d",G+(L?"l"+o+",0.0001":"h"+o)).call(S?aa.lineGroupStyle:j)}function u(T){var A=ng(T),M=A.anyFill,S=A.anyLine,L=A.showLine,z=A.showMarker,N=T[0],$=N.trace,R=!z&&!S&&!M&&uc.hasText($),H,D;function P(O,Z,V,q){var B=Rr.nestedProperty($,O).get(),J=Rr.isArrayOrTypedArray(B)&&Z?Z(B):B;if(n&&J&&q!==void 0&&(J=q),V){if(J<V[0])return V[0];if(J>V[1])return V[1]}return J}function k(O){return N._distinct&&N.index&&O[N.index]?O[N.index]:O[0]}if(z||R||L){var C={},E={};if(z){C.mc=P("marker.color",k),C.mx=P("marker.symbol",k),C.mo=P("marker.opacity",Rr.mean,[.2,1]),C.mlc=P("marker.line.color",k),C.mlw=P("marker.line.width",Rr.mean,[0,5],Ki),E.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var I=P("marker.size",Rr.mean,[2,16],ag);C.ms=I,E.marker.size=I}L&&(E.line={width:P("line.width",k,[0,10],ig)}),R&&(C.tx="Aa",C.tp=P("textposition",k),C.ts=10,C.tc=P("textfont.color",k),C.tf=P("textfont.family",k),C.tw=P("textfont.weight",k),C.ty=P("textfont.style",k),C.tv=P("textfont.variant",k),C.tC=P("textfont.textcase",k),C.tE=P("textfont.lineposition",k),C.tS=P("textfont.shadow",k)),H=[Rr.minExtend(N,C)],D=Rr.minExtend($,E),D.selectedpoints=null,D.texttemplate=null}var j=Fr.select(this).select("g.legendpoints"),G=j.selectAll("path.scatterpts").data(z?H:[]);G.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),G.exit().remove(),G.call(aa.pointStyle,D,r),z&&(H[0].mrc=3);var X=j.selectAll("g.pointtext").data(R?H:[]);X.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),X.exit().remove(),X.selectAll("text").call(aa.textPointStyle,D,r)}function v(T){var A=T[0].trace,M=A.type==="waterfall";if(T[0]._distinct&&M){var S=T[0].trace[T[0].dir].marker;return T[0].mc=S.color,T[0].mlw=S.line.width,T[0].mlc=S.line.color,p(T,this,"waterfall")}var L=[];A.visible&&M&&(L=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 z=Fr.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(L);z.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(N){var $=Fr.select(this),R=A[N[0]].marker,H=f(void 0,R.line,Gn,Ki);$.attr("d",N[1]).style("stroke-width",H+"px").call(ua.fill,R.color),H&&$.call(ua.stroke,R.line.color)})}function h(T){p(T,this)}function d(T){p(T,this,"funnel")}function p(T,A,M){var S=T[0].trace,L=S.marker||{},z=L.line||{},N=L.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",$=M?S.visible&&S.type===M:lv.traceIs(S,"bar"),R=Fr.select(A).select("g.legendpoints").selectAll("path.legend"+M).data($?[T]:[]);R.enter().append("path").classed("legend"+M,!0).attr("d",N).attr("transform",s),R.exit().remove(),R.each(function(H){var D=Fr.select(this),P=H[0],k=f(P.mlw,L.line,Gn,Ki);D.style("stroke-width",k+"px");var C=P.mcc;if(!a._inHover&&"mc"in P){var E=sv(L),I=E.mid;I===void 0&&(I=(E.max+E.min)/2),C=aa.tryColorscale(L,"")(I)}var j=C||P.mc||L.color,G=L.pattern,X=aa.getPatternAttr,O=G&&(X(G.shape,0,"")||X(G.path,0,""));if(O){var Z=X(G.bgcolor,0,null),V=X(G.fgcolor,0,null),q=G.fgopacity,B=og(G.size,8,10),J=og(G.solidity,.5,1),ie="legend-"+S.uid;D.call(aa.pattern,"legend",r,ie,O,B,J,C,G.fillmode,Z,V,q)}else D.call(ua.fill,j);k&&ua.stroke(D,P.mlc||z.color)})}function m(T){var A=T[0].trace,M=Fr.select(this).select("g.legendpoints").selectAll("path.legendbox").data(A.visible&&lv.traceIs(A,"box-violin")?[T]:[]);M.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),M.exit().remove(),M.each(function(){var S=Fr.select(this);if((A.boxpoints==="all"||A.points==="all")&&ua.opacity(A.fillcolor)===0&&ua.opacity((A.line||{}).color)===0){var L=Rr.minExtend(A,{marker:{size:n?ag:Rr.constrain(A.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});M.call(aa.pointStyle,L,r)}else{var z=f(void 0,A.line,Gn,Ki);S.style("stroke-width",z+"px").call(ua.fill,A.fillcolor),z&&ua.stroke(S,A.line.color)}})}function y(T){var A=T[0].trace,M=Fr.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(A.visible&&A.type==="candlestick"?[T,T]:[]);M.enter().append("path").classed("legendcandle",!0).attr("d",function(S,L){return L?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),M.exit().remove(),M.each(function(S,L){var z=Fr.select(this),N=A[L?"increasing":"decreasing"],$=f(void 0,N.line,Gn,Ki);z.style("stroke-width",$+"px").call(ua.fill,N.fillcolor),$&&ua.stroke(z,N.line.color)})}function b(T){var A=T[0].trace,M=Fr.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(A.visible&&A.type==="ohlc"?[T,T]:[]);M.enter().append("path").classed("legendohlc",!0).attr("d",function(S,L){return L?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),M.exit().remove(),M.each(function(S,L){var z=Fr.select(this),N=A[L?"increasing":"decreasing"],$=f(void 0,N.line,Gn,Ki);z.style("fill","none").call(aa.dashLine,N.line.dash,$),$&&ua.stroke(z,N.line.color)})}function _(T){x(T,this,"pie")}function g(T){x(T,this,"funnelarea")}function x(T,A,M){var S=T[0],L=S.trace,z=M?L.visible&&L.type===M:lv.traceIs(L,M),N=Fr.select(A).select("g.legendpoints").selectAll("path.legend"+M).data(z?[T]:[]);if(N.enter().append("path").classed("legend"+M,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),N.exit().remove(),N.size()){var $=L.marker||{},R=f(c3($.line.width,S.pts),$.line,Gn,Ki),H="pieLike",D=Rr.minExtend(L,{marker:{line:{width:R}}},H),P=Rr.minExtend(S,{trace:D},H);f3(N,P,D,r)}}function w(T){var A=T[0].trace,M,S=[];if(A.visible)switch(A.type){case"histogram2d":case"heatmap":S=[["M-15,-2V4H15V-2Z"]],M=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":S=[["M-6,-6V6H6V-6Z"]],M=!0;break;case"densitymapbox":case"densitymap":S=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],M="radial";break;case"cone":S=[["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"]],M=!1;break;case"streamtube":S=[["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"]],M=!1;break;case"surface":S=[["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"]],M=!0;break;case"mesh3d":S=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],M=!1;break;case"volume":S=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],M=!0;break;case"isosurface":S=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],M=!1;break}var L=Fr.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(S);L.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(z,N){var $=Fr.select(this),R=sv(A),H=R.colorscale,D=R.reversescale,P=function(I){if(I.size()){var j="legendfill-"+A.uid;aa.gradient(I,r,j,fv(D,M==="radial"),H,"fill")}},k;if(H){if(!M){var E=H.length;k=N===0?H[D?E-1:0][1]:N===1?H[D?0:E-1][1]:H[Math.floor((E-1)/2)][1]}}else{var C=A.vertexcolor||A.facecolor||A.color;k=Rr.isArrayOrTypedArray(C)?C[N]||C[0]:C}$.attr("d",z[0]),k?$.call(ua.fill,k):$.call(P)})}};function fv(t,e){var r=e?"radial":"horizontal";return r+(t?"":"reversed")}function ng(t){var e=t[0].trace,r=e.contours,a=uc.hasLines(e),i=uc.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 og(t,e,r){return t&&Rr.isArrayOrTypedArray(t)?e:t>r?r:t}var qr=bt,ur=ke,th=hr,To=ot,lg=gs,cv=ai,vr=zt,Nf=yt,xn=Tr,sg=a3,yr=lT,yp=Vr,fT=yp.LINE_SPACING,mo=yp.FROM_TL,fg=yp.FROM_BR,cg=i3,d3=sT,ug=Zo,so=1,h3=/^legend[0-9]*$/,cT=function(e,r){if(r)vg(e,r);else{var a=e._fullLayout,i=a._legends,n=a._infolayer.selectAll('[class^="legend"]');n.each(function(){var f=qr.select(this),c=f.attr("class"),u=c.split(" ")[0];u.match(h3)&&i.indexOf(u)===-1&&f.remove()});for(var o=0;o<i.length;o++){var l=i[o],s=e._fullLayout[l];vg(e,s)}}};function p3(t,e,r){if(!(e.title.side!=="top center"&&e.title.side!=="top right")){var a=e.title.font,i=a.size*fT,n=0,o=t.node(),l=vr.bBox(o).width;e.title.side==="top center"?n=.5*(e._width-2*r-2*yr.titlePad-l):e.title.side==="top right"&&(n=e._width-2*r-2*yr.titlePad-l),xn.positionText(t,r+yr.titlePad+n,r+i)}}function vg(t,e){var r=e||{},a=t._fullLayout,i=au(r),n,o,l=r._inHover;if(l?(o=r.layer,n="hover"):(o=a._infolayer,n=i),!!o){n+=a._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0);var s;if(l){if(!r.entries)return;s=cg(r.entries,r)}else{for(var f=(t.calcdata||[]).slice(),c=a.shapes,u=0;u<c.length;u++){var v=c[u];if(v.showlegend){var h={_isShape:!0,_fullInput:v,index:v._index,name:v.name||v.label.text||"shape "+v._index,legend:v.legend,legendgroup:v.legendgroup,legendgrouptitle:v.legendgrouptitle,legendrank:v.legendrank,legendwidth:v.legendwidth,showlegend:v.showlegend,visible:v.visible,opacity:v.opacity,mode:v.type==="line"?"lines":"markers",line:v.line,marker:{line:v.line,color:v.fillcolor,size:12,symbol:v.type==="rect"?"square":v.type==="circle"?"circle":"hexagon2"}};f.push([{trace:h}])}}s=a.showlegend&&cg(f,r,a._legends.length>1)}var d=a.hiddenlabels||[];if(!l&&(!a.showlegend||!s.length))return o.selectAll("."+i).remove(),a._topdefs.select("#"+n).remove(),th.autoMargin(t,i);var p=ur.ensureSingle(o,"g",i,function(A){l||A.attr("pointer-events","all")}),m=ur.ensureSingleById(a._topdefs,"clipPath",n,function(A){A.append("rect")}),y=ur.ensureSingle(p,"rect","bg",function(A){A.attr("shape-rendering","crispEdges")});y.call(Nf.stroke,r.bordercolor).call(Nf.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var b=ur.ensureSingle(p,"g","scrollbox"),_=r.title;r._titleWidth=0,r._titleHeight=0;var g;_.text?(g=ur.ensureSingle(b,"text",i+"titletext"),g.attr("text-anchor","start").call(vr.font,_.font).text(_.text),$f(g,b,t,r,so)):b.selectAll("."+i+"titletext").remove();var x=ur.ensureSingle(p,"rect","scrollbar",function(A){A.attr(yr.scrollBarEnterAttrs).call(Nf.fill,yr.scrollBarColor)}),w=b.selectAll("g.groups").data(s);w.enter().append("g").attr("class","groups"),w.exit().remove();var T=w.selectAll("g.traces").data(ur.identity);T.enter().append("g").attr("class","traces"),T.exit().remove(),T.style("opacity",function(A){var M=A[0].trace;return To.traceIs(M,"pie-like")?d.indexOf(A[0].label)!==-1?.5:1:M.visible==="legendonly"?.5:1}).each(function(){qr.select(this).call(m3,t,r)}).call(d3,t,r).each(function(){l||qr.select(this).call(y3,t,i)}),ur.syncOrAsync([th.previousPromises,function(){return x3(t,w,T,r)},function(){var A=a._size,M=r.borderwidth,S=r.xref==="paper",L=r.yref==="paper";if(_.text&&p3(g,r,M),!l){var z,N;S?z=A.l+A.w*r.x-mo[vc(r)]*r._width:z=a.width*r.x-mo[vc(r)]*r._width,L?N=A.t+A.h*(1-r.y)-mo[dc(r)]*r._effHeight:N=a.height*(1-r.y)-mo[dc(r)]*r._effHeight;var $=_3(t,i,z,N);if($)return;if(a.margin.autoexpand){var R=z,H=N;z=S?ur.constrain(z,0,a.width-r._width):R,N=L?ur.constrain(N,0,a.height-r._effHeight):H,z!==R&&ur.log("Constrain "+i+".x to make legend fit inside graph"),N!==H&&ur.log("Constrain "+i+".y to make legend fit inside graph")}vr.setTranslate(p,z,N)}if(x.on(".drag",null),p.on("wheel",null),l||r._height<=r._maxHeight||t._context.staticPlot){var D=r._effHeight;l&&(D=r._height),y.attr({width:r._width-M,height:D-M,x:M/2,y:M/2}),vr.setTranslate(b,0,0),m.select("rect").attr({width:r._width-2*M,height:D-2*M,x:M,y:M}),vr.setClipUrl(b,n,t),vr.setRect(x,0,0,0,0),delete r._scrollY}else{var P=Math.max(yr.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),k=r._effHeight-P-2*yr.scrollBarMargin,C=r._height-r._effHeight,E=k/C,I=Math.min(r._scrollY||0,C);y.attr({width:r._width-2*M+yr.scrollBarWidth+yr.scrollBarMargin,height:r._effHeight-M,x:M/2,y:M/2}),m.select("rect").attr({width:r._width-2*M+yr.scrollBarWidth+yr.scrollBarMargin,height:r._effHeight-2*M,x:M,y:M+I}),vr.setClipUrl(b,n,t),B(I,P,E),p.on("wheel",function(){I=ur.constrain(r._scrollY+qr.event.deltaY/k*C,0,C),B(I,P,E),I!==0&&I!==C&&qr.event.preventDefault()});var j,G,X,O=function(Y,ee,le){var ue=(le-ee)/E+Y;return ur.constrain(ue,0,C)},Z=function(Y,ee,le){var ue=(ee-le)/E+Y;return ur.constrain(ue,0,C)},V=qr.behavior.drag().on("dragstart",function(){var Y=qr.event.sourceEvent;Y.type==="touchstart"?j=Y.changedTouches[0].clientY:j=Y.clientY,X=I}).on("drag",function(){var Y=qr.event.sourceEvent;Y.buttons===2||Y.ctrlKey||(Y.type==="touchmove"?G=Y.changedTouches[0].clientY:G=Y.clientY,I=O(X,j,G),B(I,P,E))});x.call(V);var q=qr.behavior.drag().on("dragstart",function(){var Y=qr.event.sourceEvent;Y.type==="touchstart"&&(j=Y.changedTouches[0].clientY,X=I)}).on("drag",function(){var Y=qr.event.sourceEvent;Y.type==="touchmove"&&(G=Y.changedTouches[0].clientY,I=Z(X,j,G),B(I,P,E))});b.call(q)}function B(Y,ee,le){r._scrollY=t._fullLayout[i]._scrollY=Y,vr.setTranslate(b,0,-Y),vr.setRect(x,r._width,yr.scrollBarMargin+Y*le,yr.scrollBarWidth,ee),m.select("rect").attr("y",M+Y)}if(t._context.edits.legendPosition){var J,ie,de,oe;p.classed("cursor-move",!0),cv.init({element:p.node(),gd:t,prepFn:function(Y){if(Y.target!==x.node()){var ee=vr.getTranslate(p);de=ee.x,oe=ee.y}},moveFn:function(Y,ee){if(de!==void 0&&oe!==void 0){var le=de+Y,ue=oe+ee;vr.setTranslate(p,le,ue),J=cv.align(le,r._width,A.l,A.l+A.w,r.xanchor),ie=cv.align(ue+r._height,-r._height,A.t+A.h,A.t,r.yanchor)}},doneFn:function(){if(J!==void 0&&ie!==void 0){var Y={};Y[i+".x"]=J,Y[i+".y"]=ie,To.call("_guiRelayout",t,Y)}},clickFn:function(Y,ee){var le=o.selectAll("g.traces").filter(function(){var ue=this.getBoundingClientRect();return ee.clientX>=ue.left&&ee.clientX<=ue.right&&ee.clientY>=ue.top&&ee.clientY<=ue.bottom});le.size()>0&&uT(t,p,le,Y,ee)}})}}],t)}}function qs(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 uT(t,e,r,a,i){var n=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:n.index,expandedIndex:n.index,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),To.traceIs(n,"pie-like")&&(o.label=r.datum()[0].label);var l=lg.triggerHandler(t,"plotly_legendclick",o);if(a===1){if(l===!1)return;e._clickTimeout=setTimeout(function(){t._fullLayout&&sg(r,t,a)},t._context.doubleClickDelay)}else if(a===2){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0;var s=lg.triggerHandler(t,"plotly_legenddoubleclick",o);s!==!1&&l!==!1&&sg(r,t,a)}}function m3(t,e,r){var a=au(r),i=t.data()[0][0],n=i.trace,o=To.traceIs(n,"pie-like"),l=!r._inHover&&e._context.edits.legendText&&!o,s=r._maxNameLength,f,c;i.groupTitle?(f=i.groupTitle.text,c=i.groupTitle.font):(c=r.font,r.entries?f=i.text:(f=o?i.label:n.name,n._meta&&(f=ur.templateString(f,n._meta))));var u=ur.ensureSingle(t,"text",a+"text");u.attr("text-anchor","start").call(vr.font,c).text(l?dg(f,s):f);var v=r.indentation+r.itemwidth+yr.itemGap*2;xn.positionText(u,v,0),l?u.call(xn.makeEditable,{gd:e,text:f}).call($f,t,e,r).on("edit",function(h){this.text(dg(h,s)).call($f,t,e,r);var d=i.trace._fullInput||{},p={};return p.name=h,d._isShape?To.call("_guiRelayout",e,"shapes["+n.index+"].name",p.name):To.call("_guiRestyle",e,p,n.index)}):$f(u,t,e,r)}function dg(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 y3(t,e,r){var a=e._context.doubleClickDelay,i,n=1,o=ur.ensureSingle(t,"rect",r+"toggle",function(l){e._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call(Nf.fill,"rgba(0,0,0,0)")});e._context.staticPlot||(o.on("mousedown",function(){i=new Date().getTime(),i-e._legendMouseDownTime<a?n+=1:(n=1,e._legendMouseDownTime=i)}),o.on("mouseup",function(){if(!(e._dragged||e._editing)){var l=e._fullLayout[r];new Date().getTime()-e._legendMouseDownTime>a&&(n=Math.max(n-1,1)),uT(e,l,t,n,qr.event)}}))}function $f(t,e,r,a,i){a._inHover&&t.attr("data-notex",!0),xn.convertToTspans(t,r,function(){g3(e,r,a,i)})}function g3(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(),l=au(r);r||(r=e._fullLayout[l]);var s=r.borderwidth,f;a===so?f=r.title.font:i.groupTitle?f=i.groupTitle.font:f=r.font;var c=f.size*fT,u,v;if(o){var h=vr.bBox(o);u=h.height,v=h.width,a===so?vr.setTranslate(n,s,s+u*.75):vr.setTranslate(n,0,u*.25)}else{var d="."+l+(a===so?"title":"")+"text",p=t.select(d),m=xn.lineCount(p),y=p.node();if(u=c*m,v=y?vr.bBox(y).width:0,a===so)r.title.side==="left"&&(v+=yr.itemGap*2),xn.positionText(p,s+yr.titlePad,s+c);else{var b=yr.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(b=yr.itemGap,v-=r.indentation+r.itemwidth),xn.positionText(p,b,-c*((m-1)/2-.3))}}a===so?(r._titleWidth=v,r._titleHeight=u):(i.lineHeight=c,i.height=Math.max(u,16)+3,i.width=v)}function b3(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 x3(t,e,r,a){var i=t._fullLayout,n=au(a);a||(a=i[n]);var o=i._size,l=ug.isVertical(a),s=ug.isGrouped(a),f=a.entrywidthmode==="fraction",c=a.borderwidth,u=2*c,v=yr.itemGap,h=a.indentation+a.itemwidth+v*2,d=2*(c+v),p=dc(a),m=a.y<0||a.y===0&&p==="top",y=a.y>1||a.y===1&&p==="bottom",b=a.tracegroupgap,_={};const{orientation:g,yref:x}=a;let{maxheight:w}=a;const T=m||y||g!=="v"||x!=="paper";w||(w=T?.5:1);const A=T?i.height:o.h;a._maxHeight=Math.max(w>1?w:w*A,30);var M=0;a._width=0,a._height=0;var S=b3(a);if(l)r.each(function(B){var J=B[0].height;vr.setTranslate(this,c+S[0],c+S[1]+a._height+J/2+v),a._height+=J,a._width=Math.max(a._width,B[0].width)}),M=h+a._width,a._width+=v+h+u,a._height+=d,s&&(e.each(function(B,J){vr.setTranslate(this,0,J*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var L=vc(a),z=a.x<0||a.x===0&&L==="right",N=a.x>1||a.x===1&&L==="left",$=y||m,R=i.width/2;a._maxWidth=Math.max(z?$&&L==="left"?o.l+o.w:R:N?$&&L==="right"?o.r+o.w:R:o.w,2*h);var H=0,D=0;r.each(function(B){var J=qs(B,a,h);H=Math.max(H,J),D+=J}),M=null;var P=0;if(s){var k=0,C=0,E=0;e.each(function(){var B=0,J=0;qr.select(this).selectAll("g.traces").each(function(de){var oe=qs(de,a,h),Y=de[0].height;vr.setTranslate(this,S[0],S[1]+c+v+Y/2+J),J+=Y,B=Math.max(B,oe),_[de[0].trace.legendgroup]=B});var ie=B+v;C>0&&ie+c+C>a._maxWidth?(P=Math.max(P,C),C=0,E+=k+b,k=J):k=Math.max(k,J),vr.setTranslate(this,C,E),C+=ie}),a._width=Math.max(P,C)+c,a._height=E+k+d}else{var I=r.size(),j=D+u+(I-1)*v<a._maxWidth,G=0,X=0,O=0,Z=0;r.each(function(B){var J=B[0].height,ie=qs(B,a,h),de=j?ie:H;f||(de+=v),de+c+X-v>=a._maxWidth&&(P=Math.max(P,Z),X=0,O+=G,a._height+=G,G=0),vr.setTranslate(this,S[0]+c+X,S[1]+c+O+J/2+v),Z=X+ie+v,X+=de,G=Math.max(G,J)}),j?(a._width=X+u,a._height=G+d):(a._width=Math.max(P,Z)+u,a._height+=G+d)}}a._width=Math.ceil(Math.max(a._width+S[0],a._titleWidth+2*(c+yr.titlePad))),a._height=Math.ceil(Math.max(a._height+S[1],a._titleHeight+2*(c+yr.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var V=t._context.edits,q=V.legendText||V.legendPosition;r.each(function(B){var J=qr.select(this).select("."+n+"toggle"),ie=B[0].height,de=B[0].trace.legendgroup,oe=qs(B,a,h);s&&de!==""&&(oe=_[de]);var Y=q?h:M||oe;!l&&!f&&(Y+=v/2),vr.setRect(J,0,-ie/2,Y,ie)})}function _3(t,e,r,a){var i=t._fullLayout,n=i[e],o=vc(n),l=dc(n),s=n.xref==="paper",f=n.yref==="paper";t._fullLayout._reservedMargin[e]={};var c=n.y<.5?"b":"t",u=n.x<.5?"l":"r",v={r:i.width-r,l:r+n._width,b:i.height-a,t:a+n._effHeight};if(s&&f)return th.autoMargin(t,e,{x:n.x,y:n.y,l:n._width*mo[o],r:n._width*fg[o],b:n._effHeight*fg[l],t:n._effHeight*mo[l]});s?t._fullLayout._reservedMargin[e][c]=v[c]:f||n.orientation==="v"?t._fullLayout._reservedMargin[e][u]=v[u]:t._fullLayout._reservedMargin[e][c]=v[c]}function vc(t){return ur.isRightAnchor(t)?"right":ur.isCenterAnchor(t)?"center":"left"}function dc(t){return ur.isBottomAnchor(t)?"bottom":ur.isMiddleAnchor(t)?"middle":"top"}function au(t){return t._id||"legend"}var vn=bt,si=kt,hg=$a,rr=ke,w3=rr.pushUnique,uv=rr.strTranslate,T3=rr.strRotate,k3=gs,da=Tr,A3=q5,qa=zt,xr=yt,Zs=ai,Za=Ot,M3=Ir.zindexSeparator,Eo=ot,La=wa,An=Ic,S3=oT,L3=cT,vT=An.YANGLE,gp=Math.PI*vT/180,C3=1/Math.sin(gp),D3=Math.cos(gp),P3=Math.sin(gp),Xt=An.HOVERARROWSIZE,St=An.HOVERTEXTPAD,pg={box:!0,ohlc:!0,violin:!0,candlestick:!0},E3={scatter:!0,scattergl:!0,splom:!0};function mg(t,e){return t.distance-e.distance}ru.hover=function(e,r,a,i){e=rr.getGraphDiv(e);var n=r.target;rr.throttle(e._fullLayout._uid+An.HOVERID,An.HOVERMINTIME,function(){z3(e,r,a,i,n)})};ru.loneHover=function(e,r){var a=!0;Array.isArray(e)||(a=!1,e=[e]);var i=r.gd,n=yT(i),o=gT(i),l=e.map(function(m){var y=m._x0||m.x0||m.x||0,b=m._x1||m.x1||m.x||0,_=m._y0||m.y0||m.y||0,g=m._y1||m.y1||m.y||0,x=m.eventData;if(x){var w=Math.min(y,b),T=Math.max(y,b),A=Math.min(_,g),M=Math.max(_,g),S=m.trace;if(Eo.traceIs(S,"gl3d")){var L=i._fullLayout[S.scene]._scene.container,z=L.offsetLeft,N=L.offsetTop;w+=z,T+=z,A+=N,M+=N}x.bbox={x0:w+o,x1:T+o,y0:A+n,y1:M+n},r.inOut_bbox&&r.inOut_bbox.push(x.bbox)}else x=!1;return{color:m.color||xr.defaultLine,x0:m.x0||m.x||0,x1:m.x1||m.x||0,y0:m.y0||m.y||0,y1:m.y1||m.y||0,xLabel:m.xLabel,yLabel:m.yLabel,zLabel:m.zLabel,text:m.text,name:m.name,idealAlign:m.idealAlign,borderColor:m.borderColor,fontFamily:m.fontFamily,fontSize:m.fontSize,fontColor:m.fontColor,fontWeight:m.fontWeight,fontStyle:m.fontStyle,fontVariant:m.fontVariant,nameLength:m.nameLength,textAlign:m.textAlign,trace:m.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:m.hovertemplate||!1,hovertemplateLabels:m.hovertemplateLabels||!1,eventData:x}}),s=!1,f=hT(l,{gd:i,hovermode:"closest",rotateLabels:s,bgColor:r.bgColor||xr.background,container:vn.select(r.container),outerContainer:r.outerContainer||r.container}),c=f.hoverLabels,u=5,v=0,h=0;c.sort(function(m,y){return m.y0-y.y0}).each(function(m,y){var b=m.y0-m.by/2;b-u<v?m.offset=v-b+u:m.offset=0,v=b+m.by+m.offset,y===r.anchorIndex&&(h=m.offset)}).each(function(m){m.offset-=h});var d=i._fullLayout._invScaleX,p=i._fullLayout._invScaleY;return mT(c,s,d,p),a?c:c.node()};function z3(t,e,r,a,i){r||(r="xy"),typeof r=="string"&&(r=r.split(M3)[0]);var n=Array.isArray(r)?r:[r],o,l=t._fullLayout,s=l.hoversubplots,f=l._plots||[],c=f[r],u=l._has("cartesian"),v=e.hovermode||l.hovermode,h=(v||"").charAt(0)==="x",d=(v||"").charAt(0)==="y",p,m;if(u&&(h||d)&&s==="axis"){for(var y=n.length,b=0;b<y;b++)if(o=n[b],f[o]){p=Za.getFromId(t,o,"x"),m=Za.getFromId(t,o,"y");var _=(h?p:m)._subplotsWith;if(_&&_.length)for(var g=0;g<_.length;g++)w3(n,_[g])}}if(c&&s!=="single"){var x=c.overlays.map(function(Re){return Re.id});n=n.concat(x)}for(var w=n.length,T=new Array(w),A=new Array(w),M=!1,S=0;S<w;S++)if(o=n[S],f[o])M=!0,T[S]=f[o].xaxis,A[S]=f[o].yaxis;else if(l[o]&&l[o]._subplot){var L=l[o]._subplot;T[S]=L.xaxis,A[S]=L.yaxis}else{rr.warn("Unrecognized subplot: "+o);return}if(v&&!M&&(v="closest"),["x","y","closest","x unified","y unified"].indexOf(v)===-1||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return Zs.unhoverRaw(t,e);var z=l.hoverdistance;z===-1&&(z=1/0);var N=l.spikedistance;N===-1&&(N=1/0);var $=[],R=[],H,D,P,k,C,E,I,j,G,X,O,Z,V,q={hLinePoint:null,vLinePoint:null},B=!1;if(Array.isArray(e))for(v="array",P=0;P<e.length;P++)C=t.calcdata[e[P].curveNumber||0],C&&(E=C[0].trace,C[0].trace.hoverinfo!=="skip"&&(R.push(C),E.orientation==="h"&&(B=!0)));else{var J=t.calcdata.slice();for(J.sort(function(Re,rt){var st=Re[0].trace.zorder||0,Ue=rt[0].trace.zorder||0;return st-Ue}),k=0;k<J.length;k++)C=J[k],E=C[0].trace,E.hoverinfo!=="skip"&&La.isTraceInSubplots(E,n)&&(R.push(C),E.orientation==="h"&&(B=!0));var ie=!i,de,oe;if(ie)"xpx"in e?de=e.xpx:de=T[0]._length/2,"ypx"in e?oe=e.ypx:oe=A[0]._length/2;else{if(k3.triggerHandler(t,"plotly_beforehover",e)===!1)return;var Y=i.getBoundingClientRect();de=e.clientX-Y.left,oe=e.clientY-Y.top,l._calcInverseTransform(t);var ee=rr.apply3DTransform(l._invTransform)(de,oe);if(de=ee[0],oe=ee[1],de<0||de>T[0]._length||oe<0||oe>A[0]._length)return Zs.unhoverRaw(t,e)}if(e.pointerX=de+T[0]._offset,e.pointerY=oe+A[0]._offset,"xval"in e?H=La.flat(n,e.xval):H=La.p2c(T,de),"yval"in e?D=La.flat(n,e.yval):D=La.p2c(A,oe),!si(H[0])||!si(D[0]))return rr.warn("Fx.hover failed",e,t),Zs.unhoverRaw(t,e)}var le=1/0;function ue(Re,rt){for(k=0;k<R.length;k++)if(C=R[k],!(!C||!C[0]||!C[0].trace)&&(E=C[0].trace,!(E.visible!==!0||E._length===0)&&["carpet","contourcarpet"].indexOf(E._module.name)===-1)){if(G=v,La.isUnifiedHover(G)&&(G=G.charAt(0)),E.type==="splom"?(j=0,I=n[j]):(I=La.getSubplot(E),j=n.indexOf(I)),Z={cd:C,trace:E,xa:T[j],ya:A[j],maxHoverDistance:z,maxSpikeDistance:N,index:!1,distance:Math.min(le,z),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:xr.defaultLine,name:E.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},l[I]&&(Z.subplot=l[I]._subplot),l._splomScenes&&l._splomScenes[E.uid]&&(Z.scene=l._splomScenes[E.uid]),G==="array"){var st=e[k];"pointNumber"in st?(Z.index=st.pointNumber,G="closest"):(G="","xval"in st&&(X=st.xval,G="x"),"yval"in st&&(O=st.yval,G=G?"closest":"y"))}else Re!==void 0&&rt!==void 0?(X=Re,O=rt):(X=H[j],O=D[j]);if(V=$.length,z!==0)if(E._module&&E._module.hoverPoints){var Ue=E._module.hoverPoints(Z,X,O,G,{finiteRange:!0,hoverLayer:l._hoverlayer,hoversubplots:s,gd:t});if(Ue)for(var Lt,ft=0;ft<Ue.length;ft++)Lt=Ue[ft],si(Lt.x0)&&si(Lt.y0)&&$.push(N3(Lt,v))}else rr.log("Unrecognized trace type in hover:",E);if(v==="closest"&&$.length>V&&($.splice(0,V),le=$[0].distance),u&&N!==0&&$.length===0){Z.distance=N,Z.index=!1;var Ke=E._module.hoverPoints(Z,X,O,"closest",{hoverLayer:l._hoverlayer});if(Ke&&(Ke=Ke.filter(function(it){return it.spikeDistance<=N})),Ke&&Ke.length){var gt,wt=Ke.filter(function(it){return it.xa.showspikes&&it.xa.spikesnap!=="hovered data"});if(wt.length){var lt=wt[0];si(lt.x0)&&si(lt.y0)&&(gt=pe(lt),(!q.vLinePoint||q.vLinePoint.spikeDistance>gt.spikeDistance)&&(q.vLinePoint=gt))}var ct=Ke.filter(function(it){return it.ya.showspikes&&it.ya.spikesnap!=="hovered data"});if(ct.length){var Qe=ct[0];si(Qe.x0)&&si(Qe.y0)&&(gt=pe(Qe),(!q.hLinePoint||q.hLinePoint.spikeDistance>gt.spikeDistance)&&(q.hLinePoint=gt))}}}}}ue();function me(Re,rt,st){for(var Ue=null,Lt=1/0,ft,Ke=0;Ke<Re.length;Ke++)p&&p._id!==Re[Ke].xa._id||m&&m._id!==Re[Ke].ya._id||(ft=Re[Ke].spikeDistance,st&&Ke===0&&(ft=-1/0),ft<=Lt&&ft<=rt&&(Ue=Re[Ke],Lt=ft));return Ue}function pe(Re){return Re?{xa:Re.xa,ya:Re.ya,x:Re.xSpike!==void 0?Re.xSpike:(Re.x0+Re.x1)/2,y:Re.ySpike!==void 0?Re.ySpike:(Re.y0+Re.y1)/2,distance:Re.distance,spikeDistance:Re.spikeDistance,curveNumber:Re.trace.index,color:Re.color,pointNumber:Re.index}:null}var se={fullLayout:l,container:l._hoverlayer,event:e};t._spikepoints;var be={vLinePoint:q.vLinePoint,hLinePoint:q.hLinePoint};t._spikepoints=be;var Le=function(){var Re=$.filter(function(st){return p&&p._id===st.xa._id&&m&&m._id===st.ya._id}),rt=$.filter(function(st){return!(p&&p._id===st.xa._id&&m&&m._id===st.ya._id)});Re.sort(mg),rt.sort(mg),$=Re.concat(rt),$=H3($,v)};Le();var ve=v.charAt(0),Te=(ve==="x"||ve==="y")&&$[0]&&E3[$[0].trace.type];if(u&&N!==0&&$.length!==0){var we=$.filter(function(Re){return Re.ya.showspikes}),Q=me(we,N,Te);q.hLinePoint=pe(Q);var xe=$.filter(function(Re){return Re.xa.showspikes}),ae=me(xe,N,Te);q.vLinePoint=pe(ae)}if($.length===0){var ge=Zs.unhoverRaw(t,e);return u&&(q.hLinePoint!==null||q.vLinePoint!==null)&&bg()&&gg(t,q,se),ge}if(u&&bg()&&gg(t,q,se),La.isXYhover(G)&&$[0].length!==0&&$[0].trace.type!=="splom"){var Ae=$[0];pg[Ae.trace.type]?$=$.filter(function(Re){return Re.trace.index===Ae.trace.index}):$=[Ae];var ce=$.length,De=_g("x",Ae,l),Se=_g("y",Ae,l);ue(De,Se);var Me=[],He={},Fe=0,Oe=function(Re){var rt=pg[Re.trace.type]?dT(Re):Re.trace.index;if(!He[rt])Fe++,He[rt]=Fe,Me.push(Re);else{var st=He[rt]-1,Ue=Me[st];st>0&&Math.abs(Re.distance)<Math.abs(Ue.distance)&&(Me[st]=Re)}},Ge;for(Ge=0;Ge<ce;Ge++)Oe($[Ge]);for(Ge=$.length-1;Ge>ce-1;Ge--)Oe($[Ge]);$=Me,Le()}var Ze=t._hoverdata,ye=[],Ve=yT(t),Xe=gT(t);for(P=0;P<$.length;P++){var Ie=$[P],tt=La.makeEventData(Ie,Ie.trace,Ie.cd);if(Ie.hovertemplate!==!1){var We=!1;Ie.cd[Ie.index]&&Ie.cd[Ie.index].ht&&(We=Ie.cd[Ie.index].ht),Ie.hovertemplate=We||Ie.trace.hovertemplate||!1}if(Ie.xa&&Ie.ya){var F=Ie.x0+Ie.xa._offset,U=Ie.x1+Ie.xa._offset,W=Ie.y0+Ie.ya._offset,K=Ie.y1+Ie.ya._offset,fe=Math.min(F,U),te=Math.max(F,U),Ee=Math.min(W,K),Ce=Math.max(W,K);tt.bbox={x0:fe+Xe,x1:te+Xe,y0:Ee+Ve,y1:Ce+Ve}}Ie.eventData=[tt],ye.push(tt)}t._hoverdata=ye;var he=v==="y"&&(R.length>1||$.length>1)||v==="closest"&&B&&$.length>1,ne=xr.combine(l.plot_bgcolor||xr.background,l.paper_bgcolor),_e=hT($,{gd:t,hovermode:v,rotateLabels:he,bgColor:ne,container:l._hoverlayer,outerContainer:l._paper.node(),commonLabelOpts:l.hoverlabel,hoverdistance:l.hoverdistance}),ze=_e.hoverLabels;if(La.isUnifiedHover(v)||(I3(ze,he,l,_e.commonLabelBoundingBox),mT(ze,he,l._invScaleX,l._invScaleY)),i&&i.tagName){var je=Eo.getComponentMethod("annotations","hasClickToShow")(t,ye);A3(vn.select(i),je?"pointer":"")}!i||a||!$3(t,e,Ze)||(Ze&&t.emit("plotly_unhover",{event:e,points:Ze}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:T,yaxes:A,xvals:H,yvals:D}))}function dT(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 R3=/<extra>([\s\S]*)<\/extra>/;function hT(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||An.HOVERFONT,u=e.fontSize||An.HOVERFONTSIZE,v=e.fontWeight||a.font.weight,h=e.fontStyle||a.font.style,d=e.fontVariant||a.font.variant,p=e.fontTextcase||a.font.textcase,m=e.fontLineposition||a.font.lineposition,y=e.fontShadow||a.font.shadow,b=t[0],_=b.xa,g=b.ya,x=i.charAt(0),w=x+"Label",T=b[w];if(T===void 0&&_.type==="multicategory")for(var A=0;A<t.length&&(T=t[A][w],T===void 0);A++);var M=Un(r,s),S=M.top,L=M.width,z=M.height,N=T!==void 0&&b.distance<=e.hoverdistance&&(i==="x"||i==="y");if(N){var $=!0,R,H;for(R=0;R<t.length;R++)if($&&t[R].zLabel===void 0&&($=!1),H=t[R].hoverinfo||t[R].trace.hoverinfo,H){var D=Array.isArray(H)?H:H.split("+");if(D.indexOf("all")===-1&&D.indexOf(i)===-1){N=!1;break}}$&&(N=!1)}var P=l.selectAll("g.axistext").data(N?[0]:[]);P.enter().append("g").classed("axistext",!0),P.exit().remove();var k={minX:0,maxX:0,minY:0,maxY:0};if(P.each(function(){var ce=vn.select(this),De=rr.ensureSingle(ce,"path","",function(he){he.style({"stroke-width":"1px"})}),Se=rr.ensureSingle(ce,"text","",function(he){he.attr("data-notex",1)}),Me=f.bgcolor||xr.defaultLine,He=f.bordercolor||xr.contrast(Me),Fe=xr.contrast(Me),Oe=f.font,Ge={weight:Oe.weight||v,style:Oe.style||h,variant:Oe.variant||d,textcase:Oe.textcase||p,lineposition:Oe.lineposition||m,shadow:Oe.shadow||y,family:Oe.family||c,size:Oe.size||u,color:Oe.color||Fe};De.style({fill:Me,stroke:He}),Se.text(T).call(qa.font,Ge).call(da.positionText,0,0).call(da.convertToTspans,r),ce.attr("transform","");var Ze=Un(r,Se.node()),ye,Ve;if(i==="x"){var Xe=_.side==="top"?"-":"";Se.attr("text-anchor","middle").call(da.positionText,0,_.side==="top"?S-Ze.bottom-Xt-St:S-Ze.top+Xt+St),ye=_._offset+(b.x0+b.x1)/2,Ve=g._offset+(_.side==="top"?0:g._length);var Ie=Ze.width/2+St,tt=ye;ye<Ie?tt=Ie:ye>a.width-Ie&&(tt=a.width-Ie),De.attr("d","M"+(ye-tt)+",0L"+(ye-tt+Xt)+","+Xe+Xt+"H"+Ie+"v"+Xe+(St*2+Ze.height)+"H"+-Ie+"V"+Xe+Xt+"H"+(ye-tt-Xt)+"Z"),ye=tt,k.minX=ye-Ie,k.maxX=ye+Ie,_.side==="top"?(k.minY=Ve-(St*2+Ze.height),k.maxY=Ve-St):(k.minY=Ve+St,k.maxY=Ve+(St*2+Ze.height))}else{var We,F,U;g.side==="right"?(We="start",F=1,U="",ye=_._offset+_._length):(We="end",F=-1,U="-",ye=_._offset),Ve=g._offset+(b.y0+b.y1)/2,Se.attr("text-anchor",We),De.attr("d","M0,0L"+U+Xt+","+Xt+"V"+(St+Ze.height/2)+"h"+U+(St*2+Ze.width)+"V-"+(St+Ze.height/2)+"H"+U+Xt+"V-"+Xt+"Z"),k.minY=Ve-(St+Ze.height/2),k.maxY=Ve+(St+Ze.height/2),g.side==="right"?(k.minX=ye+Xt,k.maxX=ye+Xt+(St*2+Ze.width)):(k.minX=ye-Xt-(St*2+Ze.width),k.maxX=ye-Xt);var W=Ze.height/2,K=S-Ze.top-W,fe="clip"+a._uid+"commonlabel"+g._id,te;if(ye<Ze.width+2*St+Xt){te="M-"+(Xt+St)+"-"+W+"h-"+(Ze.width-St)+"V"+W+"h"+(Ze.width-St)+"Z";var Ee=Ze.width-ye+St;da.positionText(Se,Ee,K),We==="end"&&Se.selectAll("tspan").each(function(){var he=vn.select(this),ne=qa.tester.append("text").text(he.text()).call(qa.font,Ge),_e=Un(r,ne.node());Math.round(_e.width)<Math.round(Ze.width)&&he.attr("x",Ee-_e.width),ne.remove()})}else da.positionText(Se,F*(St+Xt),K),te=null;var Ce=a._topclips.selectAll("#"+fe).data(te?[0]:[]);Ce.enter().append("clipPath").attr("id",fe).append("path"),Ce.exit().remove(),Ce.select("path").attr("d",te),qa.setClipUrl(Se,te?fe:null,r)}ce.attr("transform",uv(ye,Ve))}),La.isUnifiedHover(i)){l.selectAll("g.hovertext").remove();var C=t.filter(function(ce){return ce.hoverinfo!=="none"});if(C.length===0)return[];var E=a.hoverlabel,I=E.font,j=C[0],G=((i==="x unified"?j.xa:j.ya).unifiedhovertitle||{}).text,X=G?rr.hovertemplateString(G,{},a._d3locale,i==="x unified"?{xa:j.xa,x:j.xVal}:{ya:j.ya,y:j.yVal}):T,O={showlegend:!0,legend:{title:{text:X,font:I},font:I,bgcolor:E.bgcolor,bordercolor:E.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},Z={font:I};S3(O,Z,r._fullData);var V=Z.legend;V.entries=[];for(var q=0;q<C.length;q++){var B=C[q];if(B.hoverinfo!=="none"){var J=yg(B,!0,i,a,T),ie=J[0],de=J[1];B.name=de,de!==""?B.text=de+" : "+ie:B.text=ie;var oe=B.cd[B.index];oe&&(oe.mc&&(B.mc=oe.mc),oe.mcc&&(B.mc=oe.mcc),oe.mlc&&(B.mlc=oe.mlc),oe.mlcc&&(B.mlc=oe.mlcc),oe.mlw&&(B.mlw=oe.mlw),oe.mrc&&(B.mrc=oe.mrc),oe.dir&&(B.dir=oe.dir)),B._distinct=!0,V.entries.push([B])}}V.entries.sort(function(ce,De){return ce[0].trace.index-De[0].trace.index}),V.layer=l,V._inHover=!0,V._groupTitleFont=E.grouptitlefont,L3(r,V);var Y=l.select("g.legend"),ee=Un(r,Y.node()),le=ee.width+2*St,ue=ee.height+2*St,me=C[0],pe=(me.x0+me.x1)/2,se=(me.y0+me.y1)/2,be=!(Eo.traceIs(me.trace,"bar-like")||Eo.traceIs(me.trace,"box-violin")),Le,ve;x==="y"?be?(ve=se-St,Le=se+St):(ve=Math.min.apply(null,C.map(function(ce){return Math.min(ce.y0,ce.y1)})),Le=Math.max.apply(null,C.map(function(ce){return Math.max(ce.y0,ce.y1)}))):ve=Le=rr.mean(C.map(function(ce){return(ce.y0+ce.y1)/2}))-ue/2;var Te,we;x==="x"?be?(Te=pe+St,we=pe-St):(Te=Math.max.apply(null,C.map(function(ce){return Math.max(ce.x0,ce.x1)})),we=Math.min.apply(null,C.map(function(ce){return Math.min(ce.x0,ce.x1)}))):Te=we=rr.mean(C.map(function(ce){return(ce.x0+ce.x1)/2}))-le/2;var Q=_._offset,xe=g._offset;Le+=xe,Te+=Q,we+=Q-le,ve+=xe-ue;var ae,ge;return Te+le<L&&Te>=0?ae=Te:we+le<L&&we>=0?ae=we:Q+le<L?ae=Q:Te-pe<pe-we+le?ae=L-le:ae=0,ae+=St,Le+ue<z&&Le>=0?ge=Le:ve+ue<z&&ve>=0?ge=ve:xe+ue<z?ge=xe:Le-se<se-ve+ue?ge=z-ue:ge=0,ge+=St,Y.attr("transform",uv(ae-1,ge-1)),Y}var Ae=l.selectAll("g.hovertext").data(t,function(ce){return dT(ce)});return Ae.enter().append("g").classed("hovertext",!0).each(function(){var ce=vn.select(this);ce.append("rect").call(xr.fill,xr.addOpacity(o,.8)),ce.append("text").classed("name",!0),ce.append("path").style("stroke-width","1px"),ce.append("text").classed("nums",!0).call(qa.font,{weight:v,style:h,variant:d,textcase:p,lineposition:m,shadow:y,family:c,size:u})}),Ae.exit().remove(),Ae.each(function(ce){var De=vn.select(this).attr("transform",""),Se=ce.color;Array.isArray(Se)&&(Se=Se[ce.eventData[0].pointNumber]);var Me=ce.bgcolor||Se,He=xr.combine(xr.opacity(Me)?Me:xr.defaultLine,o),Fe=xr.combine(xr.opacity(Se)?Se:xr.defaultLine,o),Oe=ce.borderColor||xr.contrast(He),Ge=yg(ce,N,i,a,T,De),Ze=Ge[0],ye=Ge[1],Ve=De.select("text.nums").call(qa.font,{family:ce.fontFamily||c,size:ce.fontSize||u,color:ce.fontColor||Oe,weight:ce.fontWeight||v,style:ce.fontStyle||h,variant:ce.fontVariant||d,textcase:ce.fontTextcase||p,lineposition:ce.fontLineposition||m,shadow:ce.fontShadow||y}).text(Ze).attr("data-notex",1).call(da.positionText,0,0).call(da.convertToTspans,r),Xe=De.select("text.name"),Ie=0,tt=0;if(ye&&ye!==Ze){Xe.call(qa.font,{family:ce.fontFamily||c,size:ce.fontSize||u,color:Fe,weight:ce.fontWeight||v,style:ce.fontStyle||h,variant:ce.fontVariant||d,textcase:ce.fontTextcase||p,lineposition:ce.fontLineposition||m,shadow:ce.fontShadow||y}).text(ye).attr("data-notex",1).call(da.positionText,0,0).call(da.convertToTspans,r);var We=Un(r,Xe.node());Ie=We.width+2*St,tt=We.height+2*St}else Xe.remove(),De.select("rect").remove();De.select("path").style({fill:He,stroke:Oe});var F=ce.xa._offset+(ce.x0+ce.x1)/2,U=ce.ya._offset+(ce.y0+ce.y1)/2,W=Math.abs(ce.x1-ce.x0),K=Math.abs(ce.y1-ce.y0),fe=Un(r,Ve.node()),te=fe.width/a._invScaleX,Ee=fe.height/a._invScaleY;ce.ty0=(S-fe.top)/a._invScaleY,ce.bx=te+2*St,ce.by=Math.max(Ee+2*St,tt),ce.anchor="start",ce.txwidth=te,ce.tx2width=Ie,ce.offset=0;var Ce=(te+Xt+St+Ie)*a._invScaleX,he,ne;if(n)ce.pos=F,he=U+K/2+Ce<=z,ne=U-K/2-Ce>=0,(ce.idealAlign==="top"||!he)&&ne?(U-=K/2,ce.anchor="end"):he?(U+=K/2,ce.anchor="start"):ce.anchor="middle",ce.crossPos=U;else{if(ce.pos=U,he=F+W/2+Ce<=L,ne=F-W/2-Ce>=0,(ce.idealAlign==="left"||!he)&&ne)F-=W/2,ce.anchor="end";else if(he)F+=W/2,ce.anchor="start";else{ce.anchor="middle";var _e=Ce/2,ze=F+_e-L,je=F-_e;ze>0&&(F-=ze),je<0&&(F+=-je)}ce.crossPos=F}Ve.attr("text-anchor",ce.anchor),Ie&&Xe.attr("text-anchor",ce.anchor),De.attr("transform",uv(F,U)+(n?T3(vT):""))}),{hoverLabels:Ae,commonLabelBoundingBox:k}}function yg(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=xg(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"&&t.trace.type!=="choroplethmap"&&(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 u=t.hovertemplateLabels||t;t[s+"Label"]!==i&&(u[s+"other"]=u[s+"Val"],u[s+"otherLabel"]=u[s+"Label"]),l=rr.hovertemplateString(c,u,a._d3locale,t.eventData[0]||{},t.trace._meta),l=l.replace(R3,function(v,h){return o=xg(h,t.nameLength),""})}return[l,o]}function I3(t,e,r,a){var i=e?"xa":"ya",n=e?"ya":"xa",o=0,l=1,s=t.size(),f=new Array(s),c=0,u=a.minX,v=a.maxX,h=a.minY,d=a.maxY,p=function(H){return H*r._invScaleX},m=function(H){return H*r._invScaleY};t.each(function(H){var D=H[i],P=H[n],k=D._id.charAt(0)==="x",C=D.range;c===0&&C&&C[0]>C[1]!==k&&(l=-1);var E=0,I=k?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var j=pT(H,e),G=H.anchor,X=G==="end"?-1:1,O,Z;if(G==="middle")O=H.crossPos+(k?m(j.y-H.by/2):p(H.bx/2+H.tx2width/2)),Z=O+(k?m(H.by):p(H.bx));else if(k)O=H.crossPos+m(Xt+j.y)-m(H.by/2-Xt),Z=O+m(H.by);else{var V=p(X*Xt+j.x),q=V+p(X*H.bx);O=H.crossPos+Math.min(V,q),Z=H.crossPos+Math.max(V,q)}k?h!==void 0&&d!==void 0&&Math.min(Z,d)-Math.max(O,h)>1&&(P.side==="left"?(E=P._mainLinePosition,I=r.width):I=P._mainLinePosition):u!==void 0&&v!==void 0&&Math.min(Z,v)-Math.max(O,u)>1&&(P.side==="top"?(E=P._mainLinePosition,I=r.height):I=P._mainLinePosition)}f[c++]=[{datum:H,traceIndex:H.trace.index,dp:0,pos:H.pos,posref:H.posref,size:H.by*(k?C3:1)/2,pmin:E,pmax:I}]}),f.sort(function(H,D){return H[0].posref-D[0].posref||l*(D[0].traceIndex-H[0].traceIndex)});var y,b,_,g,x,w,T;function A(H){var D=H[0],P=H[H.length-1];if(b=D.pmin-D.pos-D.dp+D.size,_=P.pos+P.dp+P.size-D.pmax,b>.01){for(x=H.length-1;x>=0;x--)H[x].dp+=b;y=!1}if(!(_<.01)){if(b<-.01){for(x=H.length-1;x>=0;x--)H[x].dp-=_;y=!1}if(y){var k=0;for(g=0;g<H.length;g++)w=H[g],w.pos+w.dp+w.size>D.pmax&&k++;for(g=H.length-1;g>=0&&!(k<=0);g--)w=H[g],w.pos>D.pmax-1&&(w.del=!0,k--);for(g=0;g<H.length&&!(k<=0);g++)if(w=H[g],w.pos<D.pmin+1)for(w.del=!0,k--,_=w.size*2,x=H.length-1;x>=0;x--)H[x].dp-=_;for(g=H.length-1;g>=0&&!(k<=0);g--)w=H[g],w.pos+w.dp+w.size>D.pmax&&(w.del=!0,k--)}}}for(;!y&&o<=s;){for(o++,y=!0,g=0;g<f.length-1;){var M=f[g],S=f[g+1],L=M[M.length-1],z=S[0];if(b=L.pos+L.dp+L.size-z.pos-z.dp+z.size,b>.01){for(x=S.length-1;x>=0;x--)S[x].dp+=b;for(M.push.apply(M,S),f.splice(g+1,1),T=0,x=M.length-1;x>=0;x--)T+=M[x].dp;for(_=T/M.length,x=M.length-1;x>=0;x--)M[x].dp-=_;y=!1}else g++}f.forEach(A)}for(g=f.length-1;g>=0;g--){var N=f[g];for(x=N.length-1;x>=0;x--){var $=N[x],R=$.datum;R.offset=$.dp,R.del=$.del}}}function pT(t,e){var r=0,a=t.offset;return e&&(a*=-P3,r=t.offset*D3),{x:r,y:a}}function F3(t){var e={start:1,end:-1,middle:0}[t.anchor],r=e*(Xt+St),a=r+e*(t.txwidth+St),i=t.anchor==="middle";return i&&(r-=t.tx2width/2,a+=t.txwidth/2+St),{alignShift:e,textShiftX:r,text2ShiftX:a}}function mT(t,e,r,a){var i=function(o){return o*r},n=function(o){return o*a};t.each(function(o){var l=vn.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),f=o.anchor,c=f==="end"?-1:1,u=F3(o),v=pT(o,e),h=v.x,d=v.y,p=f==="middle",m="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,y;p?y="M-"+i(o.bx/2+o.tx2width/2)+","+n(d-o.by/2)+"h"+i(o.bx)+"v"+n(o.by)+"h-"+i(o.bx)+"Z":m?y="M0,0L"+i(c*Xt+h)+","+n(Xt+d)+"v"+n(o.by/2-Xt)+"h"+i(c*o.bx)+"v-"+n(o.by)+"H"+i(c*Xt+h)+"V"+n(d-Xt)+"Z":y="M"+i(c*Xt+h)+","+n(d-o.by/2)+"h"+i(c*o.bx)+"v"+n(o.by)+"h"+i(-c*o.bx)+"Z",l.select("path").attr("d",y);var b=h+u.textShiftX,_=d+o.ty0-o.by/2+St,g=o.textAlign||"auto";g!=="auto"&&(g==="left"&&f!=="start"?(s.attr("text-anchor","start"),b=p?-o.bx/2-o.tx2width/2+St:-o.bx-St):g==="right"&&f!=="end"&&(s.attr("text-anchor","end"),b=p?o.bx/2-o.tx2width/2-St:o.bx+St)),s.call(da.positionText,i(b),n(_)),o.tx2width&&(l.select("text.name").call(da.positionText,i(u.text2ShiftX+u.alignShift*St+h),n(d+o.ty0-o.by/2+St)),l.select("rect").call(qa.setRect,i(u.text2ShiftX+(u.alignShift-1)*o.tx2width/2+h),n(d-o.by/2-1),i(o.tx2width),n(o.by+2)))})}function N3(t,e){var r=t.index,a=t.trace||{},i=t.cd[0],n=t.cd[r]||{};function o(v){return v||si(v)&&v===0}var l=Array.isArray(r)?function(v,h){var d=rr.castOption(i,r,v);return o(d)?d:rr.extractOption({},a,"",h)}:function(v,h){return rr.extractOption(n,a,v,h)};function s(v,h,d){var p=l(h,d);o(p)&&(t[v]=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("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),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:Za.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:Za.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=Za.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;t.xerrneg!==void 0?t.xLabel+=" +"+f+" / -"+Za.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=Za.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;t.yerrneg!==void 0?t.yLabel+=" +"+c+" / -"+Za.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+c,e==="y"&&(t.distance+=1)}var u=t.hoverinfo||t.trace.hoverinfo;return u&&u!=="all"&&(u=Array.isArray(u)?u:u.split("+"),u.indexOf("x")===-1&&(t.xLabel=void 0),u.indexOf("y")===-1&&(t.yLabel=void 0),u.indexOf("z")===-1&&(t.zLabel=void 0),u.indexOf("text")===-1&&(t.text=void 0),u.indexOf("name")===-1&&(t.name=void 0)),t}function gg(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 u=xr.combine(i.plot_bgcolor,i.paper_bgcolor);if(l){var v=e.hLinePoint,h,d;f=v&&v.xa,c=v&&v.ya;var p=c.spikesnap;p==="cursor"?(h=o.pointerX,d=o.pointerY):(h=f._offset+v.x,d=c._offset+v.y);var m=hg.readability(v.color,u)<1.5?xr.contrast(u):v.color,y=c.spikemode,b=c.spikethickness,_=c.spikecolor||m,g=Za.getPxPosition(t,c),x,w;if(y.indexOf("toaxis")!==-1||y.indexOf("across")!==-1){if(y.indexOf("toaxis")!==-1&&(x=g,w=h),y.indexOf("across")!==-1){var T=c._counterDomainMin,A=c._counterDomainMax;c.anchor==="free"&&(T=Math.min(T,c.position),A=Math.max(A,c.position)),x=n.l+T*n.w,w=n.l+A*n.w}a.insert("line",":first-child").attr({x1:x,x2:w,y1:d,y2:d,"stroke-width":b,stroke:_,"stroke-dasharray":qa.dashStyle(c.spikedash,b)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:x,x2:w,y1:d,y2:d,"stroke-width":b+2,stroke:u}).classed("spikeline",!0).classed("crisp",!0)}y.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:g+(c.side!=="right"?b:-b),cy:d,r:b,fill:_}).classed("spikeline",!0)}if(s){var M=e.vLinePoint,S,L;f=M&&M.xa,c=M&&M.ya;var z=f.spikesnap;z==="cursor"?(S=o.pointerX,L=o.pointerY):(S=f._offset+M.x,L=c._offset+M.y);var N=hg.readability(M.color,u)<1.5?xr.contrast(u):M.color,$=f.spikemode,R=f.spikethickness,H=f.spikecolor||N,D=Za.getPxPosition(t,f),P,k;if($.indexOf("toaxis")!==-1||$.indexOf("across")!==-1){if($.indexOf("toaxis")!==-1&&(P=D,k=L),$.indexOf("across")!==-1){var C=f._counterDomainMin,E=f._counterDomainMax;f.anchor==="free"&&(C=Math.min(C,f.position),E=Math.max(E,f.position)),P=n.t+(1-E)*n.h,k=n.t+(1-C)*n.h}a.insert("line",":first-child").attr({x1:S,x2:S,y1:P,y2:k,"stroke-width":R,stroke:H,"stroke-dasharray":qa.dashStyle(f.spikedash,R)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:S,x2:S,y1:P,y2:k,"stroke-width":R+2,stroke:u}).classed("spikeline",!0).classed("crisp",!0)}$.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:S,cy:D-(f.side!=="top"?R:-R),r:R,fill:H}).classed("spikeline",!0)}}}function $3(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)||i.binNumber!==n.binNumber)return!0}return!1}function bg(t,e){return!0}function xg(t,e){return da.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function H3(t,e){for(var r=e.charAt(0),a=[],i=[],n=[],o=0;o<t.length;o++){var l=t[o];Eo.traceIs(l.trace,"bar-like")||Eo.traceIs(l.trace,"box-violin")?n.push(l):l.trace[r+"period"]?i.push(l):a.push(l)}return a.concat(i).concat(n)}function _g(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 yT(t){return t.offsetTop+t.clientTop}function gT(t){return t.offsetLeft+t.clientLeft}function Un(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],u=s[1],v=f[0],h=f[1];return{x:c,y:u,width:v-c,height:h-u,top:Math.min(u,h),left:Math.min(c,v),right:Math.max(c,v),bottom:Math.max(u,h)}}var O3=ke,j3=yt,B3=wa.isUnifiedHover,bp=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&&B3(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),n?(i.bgcolor||(i.bgcolor=j3.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),a("hoverlabel.showarrow",i.showarrow),O3.coerceFont(a,"hoverlabel.font",i.font),a("hoverlabel.align",i.align)},G3=ke,U3=bp,V3=ps,W3=function(e,r){function a(i,n){return G3.coerce(e,r,V3,i,n)}U3(e,r,a)},wg=ke,X3=Fc,Y3=bp,q3=function(e,r,a,i){function n(l,s){return wg.coerce(e,r,X3,l,s)}var o=wg.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Y3(e,r,n,o)},Z3=ke,K3=ps,bT=function(e,r){function a(i,n){return r[i]!==void 0?r[i]:Z3.coerce(e,r,K3,i,n)}return a("clickmode"),a("hoversubplots"),a("hovermode")},Tg=ke,Q3=ps,J3=bT,eP=bp,tP=function(e,r){function a(c,u){return Tg.coerce(e,r,Q3,c,u)}var i=J3(e,r);i&&(a("hoverdistance"),a("spikedistance"));var n=a("dragmode");n==="select"&&a("selectdirection");var o=r._has("mapbox"),l=r._has("map"),s=r._has("geo"),f=r._basePlotModules.length;r.dragmode==="zoom"&&((o||l||s)&&f===1||(o||l)&&s&&f===2)&&(r.dragmode="pan"),eP(e,r,a),Tg.coerceFont(a,"hoverlabel.grouptitlefont",r.hoverlabel.font)},rh=ke,kg=ot,rP=function(e){var r=e.calcdata,a=e._fullLayout;function i(f){return function(c){return rh.coerceHoverinfo({hoverinfo:c},{_module:f._module},a)}}for(var n=0;n<r.length;n++){var o=r[n],l=o[0].trace;if(!kg.traceIs(l,"pie-like")){var s=kg.traceIs(l,"2dMap")?aP:rh.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.font.weight,o,"htw"),s(l.hoverlabel.font.style,o,"hty"),s(l.hoverlabel.font.variant,o,"htv"),s(l.hoverlabel.namelength,o,"hnl"),s(l.hoverlabel.align,o,"hta"),s(l.hoverlabel.showarrow,o,"htsa"))}}};function aP(t,e,r,a){a=a||rh.identity,Array.isArray(t)&&(e[0][r]=a(t))}var iP=ot,nP=ru.hover,oP=function(e,r,a){var i=iP.getComponentMethod("annotations","onClick")(e,e._hoverdata);a!==void 0&&nP(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())},lP=bt,hc=ke,sP=ai,ul=wa,Ag=ps,Mg=ru,Na={moduleType:"component",name:"fx",constants:Ic,schema:{layout:Ag},attributes:Fc,layoutAttributes:Ag,supplyLayoutGlobalDefaults:W3,supplyDefaults:q3,supplyLayoutDefaults:tP,calc:rP,getDistanceFunction:ul.getDistanceFunction,getClosest:ul.getClosest,inbox:ul.inbox,quadrature:ul.quadrature,appendArrayPointValue:ul.appendArrayPointValue,castHoverOption:cP,castHoverinfo:uP,hover:Mg.hover,unhover:sP.unhover,loneHover:Mg.loneHover,loneUnhover:fP,click:oP};function fP(t){var e=hc.isD3Selection(t)?t:lP.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function cP(t,e,r){return hc.castOption(t,e,"hoverlabel."+r)}function uP(t,e,r){function a(i){return hc.coerceHoverinfo({hoverinfo:i},{_module:t._module},e)}return hc.castOption(t,r,"hoverinfo",a)}var Nn={};(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)}})(Nn);var xp=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})})},iu={},xT={exports:{}},_p={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'>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect fill='#000' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle fill='#9EF' cx='102' cy='30' r='6'/>"," <circle fill='#BAC' cx='78' cy='30' r='6'/>"," <circle fill='#BAC' cx='78' cy='54' r='6'/>"," <circle fill='#D69' cx='54' cy='30' r='6'/>"," <circle fill='#F26' cx='30' cy='30' r='6'/>"," <circle fill='#F26' cx='30' cy='54' r='6'/>"," <path fill='#FFF' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path fill='#FFF' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path fill='#FFF' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path fill='#FFF' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}},Gi={},Ks=32,wp={CIRCLE_SIDES:Ks,i000:0,i090:Ks/4,i180:Ks/2,i270:Ks/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)},vP=ke.strTranslate;function _T(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 dP(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 hP(t){var e=t._id.charAt(0)==="y"?1:0;return function(r){return _T(t,r[e])}}function pP(t){return vP(t.xaxis._offset,t.yaxis._offset)}var Tp={p2r:_T,r2p:dP,axValue:hP,getTransform:pP};(function(t){var e=U1,r=wp,a=r.CIRCLE_SIDES,i=r.SQRT2,n=Tp,o=n.p2r,l=n.r2p,s=[0,3,4,5,6,1,2],f=[0,3,4,1,2];t.writePaths=function(v){var h=v.length;if(!h)return"M0,0Z";for(var d="",p=0;p<h;p++)for(var m=v[p].length,y=0;y<m;y++){var b=v[p][y][0];if(b==="Z")d+="Z";else for(var _=v[p][y].length,g=0;g<_;g++){var x=g;b==="Q"||b==="S"?x=f[g]:b==="C"&&(x=s[g]),d+=v[p][y][x],g>0&&g<_-1&&(d+=",")}}return d},t.readPaths=function(v,h,d,p){var m=e(v),y=[],b=-1,_=function(){b++,y[b]=[]},g,x=0,w=0,T,A,M=function(){T=x,A=w};M();for(var S=0;S<m.length;S++){var L=[],z,N,$,R,H=m[S][0],D=H;switch(H){case"M":_(),x=+m[S][1],w=+m[S][2],L.push([D,x,w]),M();break;case"Q":case"S":z=+m[S][1],$=+m[S][2],x=+m[S][3],w=+m[S][4],L.push([D,x,w,z,$]);break;case"C":z=+m[S][1],$=+m[S][2],N=+m[S][3],R=+m[S][4],x=+m[S][5],w=+m[S][6],L.push([D,x,w,z,$,N,R]);break;case"T":case"L":x=+m[S][1],w=+m[S][2],L.push([D,x,w]);break;case"H":D="L",x=+m[S][1],L.push([D,x,w]);break;case"V":D="L",w=+m[S][1],L.push([D,x,w]);break;case"A":D="L";var P=+m[S][1],k=+m[S][2];+m[S][4]||(P=-P,k=-k);var C=x-P,E=w;for(g=1;g<=a/2;g++){var I=2*Math.PI*g/a;L.push([D,C+P*Math.cos(I),E+k*Math.sin(I)])}break;case"Z":(x!==T||w!==A)&&(x=T,w=A,L.push([D,x,w]));break}for(var j=(d||{}).domain,G=h._fullLayout._size,X=d&&d.xsizemode==="pixel",O=d&&d.ysizemode==="pixel",Z=p===!1,V=0;V<L.length;V++){for(g=0;g+2<7;g+=2){var q=L[V][g+1],B=L[V][g+2];q===void 0||B===void 0||(x=q,w=B,d&&(d.xaxis&&d.xaxis.p2r?(Z&&(q-=d.xaxis._offset),X?q=l(d.xaxis,d.xanchor)+q:q=o(d.xaxis,q)):(Z&&(q-=G.l),j?q=j.x[0]+q/G.w:q=q/G.w),d.yaxis&&d.yaxis.p2r?(Z&&(B-=d.yaxis._offset),O?B=l(d.yaxis,d.yanchor)-B:B=o(d.yaxis,B)):(Z&&(B-=G.t),j?B=j.y[1]-B/G.h:B=1-B/G.h)),L[V][g+1]=q,L[V][g+2]=B)}y[b].push(L[V].slice())}}return y};function c(v,h){return Math.abs(v-h)<=1e-6}function u(v,h){var d=h[1]-v[1],p=h[2]-v[2];return Math.sqrt(d*d+p*p)}t.pointsOnRectangle=function(v){var h=v.length;if(h!==5)return!1;for(var d=1;d<3;d++){var p=v[0][d]-v[1][d],m=v[3][d]-v[2][d];if(!c(p,m))return!1;var y=v[0][d]-v[3][d],b=v[1][d]-v[2][d];if(!c(y,b))return!1}return!c(v[0][1],v[1][1])&&!c(v[0][1],v[3][1])?!1:!!(u(v[0],v[1])*u(v[0],v[3]))},t.pointsOnEllipse=function(v){var h=v.length;if(h!==a+1)return!1;h=a;for(var d=0;d<h;d++){var p=(h*2-d)%h,m=(h/2+p)%h,y=(h/2+d)%h;if(!c(u(v[d],v[y]),u(v[p],v[m])))return!1}return!0},t.handleEllipse=function(v,h,d){if(!v)return[h,d];var p=t.ellipseOver({x0:h[0],y0:h[1],x1:d[0],y1:d[1]}),m=(p.x1+p.x0)/2,y=(p.y1+p.y0)/2,b=(p.x1-p.x0)/2,_=(p.y1-p.y0)/2;b||(b=_=_/i),_||(_=b=b/i);for(var g=[],x=0;x<a;x++){var w=x*2*Math.PI/a;g.push([m+b*Math.cos(w),y+_*Math.sin(w)])}return g},t.ellipseOver=function(v){var h=v.x0,d=v.y0,p=v.x1,m=v.y1,y=p-h,b=m-d;h-=y,d-=b;var _=(h+p)/2,g=(d+m)/2,x=i;return y*=x,b*=x,{x0:_-y,y0:g-b,x1:_+y,y1:g+b}},t.fixDatesForPaths=function(v,h,d){var p=h.type==="date",m=d.type==="date";if(!p&&!m)return v;for(var y=0;y<v.length;y++)for(var b=0;b<v[y].length;b++)for(var _=0;_+2<v[y][b].length;_+=2)p&&(v[y][b][_+1]=v[y][b][_+1].replace(" ","_")),m&&(v[y][b][_+2]=v[y][b][_+2].replace(" ","_"));return v}})(Gi);var Sg=lr,wT=Nn,mP=wT.drawMode,yP=wT.openMode,Ko=wp,Lg=Ko.i000,Cg=Ko.i090,Dg=Ko.i180,Pg=Ko.i270,gP=Ko.cos45,bP=Ko.sin45,TT=Tp,Qs=TT.p2r,wi=TT.r2p,xP=Rn,_P=xP.clearOutline,nu=Gi,wP=nu.readPaths,TP=nu.writePaths,kP=nu.ellipseOver,AP=nu.fixDatesForPaths;function MP(t,e){if(t.length){var r=t[0][0];if(r){var a=e.gd,i=e.isActiveShape,n=e.dragmode,o=(a.layout||{}).shapes||[];if(!mP(n)&&i!==void 0){var l=a._fullLayout._activeShapeIndex;if(l<o.length)switch(a._fullLayout.shapes[l].type){case"rect":n="drawrect";break;case"circle":n="drawcircle";break;case"line":n="drawline";break;case"path":var s=o[l].path||"";s[s.length-1]==="Z"?n="drawclosedpath":n="drawopenpath";break}}var f=kT(t,e,n);_P(a);for(var c=e.editHelpers,u=(c||{}).modifyItem,v=[],h=0;h<o.length;h++){var d=a._fullLayout.shapes[h];if(v[h]=d._input,i!==void 0&&h===a._fullLayout._activeShapeIndex){var p=f;switch(d.type){case"line":case"rect":case"circle":var m=Sg.getFromId(a,d.xref);d.xref.charAt(0)==="x"&&m.type.includes("category")?(u("x0",p.x0-(d.x0shift||0)),u("x1",p.x1-(d.x1shift||0))):(u("x0",p.x0),u("x1",p.x1));var y=Sg.getFromId(a,d.yref);d.yref.charAt(0)==="y"&&y.type.includes("category")?(u("y0",p.y0-(d.y0shift||0)),u("y1",p.y1-(d.y1shift||0))):(u("y0",p.y0),u("y1",p.y1));break;case"path":u("path",p.path);break}}}return i===void 0?(v.push(f),v):c?c.getUpdateObj():{}}}}function kT(t,e,r){var a=t[0][0],i=e.gd,n=a.getAttribute("d"),o=i._fullLayout.newshape,l=e.plotinfo,s=e.isActiveShape,f=l.xaxis,c=l.yaxis,u=!!l.domain||!l.xaxis,v=!!l.domain||!l.yaxis,h=yP(r),d=wP(n,i,l,s),p={editable:!0,visible:o.visible,name:o.name,showlegend:o.showlegend,legend:o.legend,legendwidth:o.legendwidth,legendgroup:o.legendgroup,legendgrouptitle:{text:o.legendgrouptitle.text,font:o.legendgrouptitle.font},legendrank:o.legendrank,label:o.label,xref:u?"paper":f._id,yref:v?"paper":c._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};h||(p.fillcolor=o.fillcolor,p.fillrule=o.fillrule);var m;if(d.length===1&&(m=d[0]),m&&m.length===5&&r==="drawrect")p.type="rect",p.x0=m[0][1],p.y0=m[0][2],p.x1=m[2][1],p.y1=m[2][2];else if(m&&r==="drawline")p.type="line",p.x0=m[0][1],p.y0=m[0][2],p.x1=m[1][1],p.y1=m[1][2];else if(m&&r==="drawcircle"){p.type="circle";var y=m[Lg][1],b=m[Cg][1],_=m[Dg][1],g=m[Pg][1],x=m[Lg][2],w=m[Cg][2],T=m[Dg][2],A=m[Pg][2],M=l.xaxis&&(l.xaxis.type==="date"||l.xaxis.type==="log"),S=l.yaxis&&(l.yaxis.type==="date"||l.yaxis.type==="log");M&&(y=wi(l.xaxis,y),b=wi(l.xaxis,b),_=wi(l.xaxis,_),g=wi(l.xaxis,g)),S&&(x=wi(l.yaxis,x),w=wi(l.yaxis,w),T=wi(l.yaxis,T),A=wi(l.yaxis,A));var L=(b+g)/2,z=(x+T)/2,N=(g-b+_-y)/2,$=(A-w+T-x)/2,R=kP({x0:L,y0:z,x1:L+N*gP,y1:z+$*bP});M&&(R.x0=Qs(l.xaxis,R.x0),R.x1=Qs(l.xaxis,R.x1)),S&&(R.y0=Qs(l.yaxis,R.y0),R.y1=Qs(l.yaxis,R.y1)),p.x0=R.x0,p.y0=R.y0,p.x1=R.x1,p.y1=R.y1}else p.type="path",f&&c&&AP(d,f,c),p.path=TP(d),m=null;return p}var kp={newShapes:MP,createShapeObj:kT},SP=Nn,LP=SP.selectMode,CP=Rn,DP=CP.clearOutline,Ap=Gi,PP=Ap.readPaths,EP=Ap.writePaths,zP=Ap.fixDatesForPaths,AT=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,u=r.dragmode,v=(n.layout||{}).selections||[];if(!LP(u)&&c!==void 0){var h=n._fullLayout._activeSelectionIndex;if(h<v.length)switch(n._fullLayout.selections[h].type){case"rect":u="select";break;case"path":u="lasso";break}}var d=PP(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}},m;d.length===1&&(m=d[0]),m&&m.length===5&&u==="select"?(p.type="rect",p.x0=m[0][1],p.y0=m[0][2],p.x1=m[2][1],p.y1=m[2][2]):(p.type="path",s&&f&&zP(d,s,f),p.path=EP(d),m=null),DP(n);for(var y=r.editHelpers,b=(y||{}).modifyItem,_=[],g=0;g<v.length;g++){var x=n._fullLayout.selections[g];if(!x){_[g]=x;continue}if(_[g]=x._input,c!==void 0&&g===n._fullLayout._activeSelectionIndex){var w=p;switch(x.type){case"rect":b("x0",w.x0),b("x1",w.x1),b("y0",w.y0),b("y1",w.y1);break;case"path":b("path",w.path);break}}}return c===void 0?(_.push(p),_):y?y.getUpdateObj():{}}}},Ui={},ou={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}};(function(t){var e=ou,r=ke,a=Ot;t.rangeToShapePosition=function(o){return o.type==="log"?o.r2d:function(l){return l}},t.shapePositionToRange=function(o){return o.type==="log"?o.d2r:function(l){return l}},t.decodeDate=function(o){return function(l){return l.replace&&(l=l.replace("_"," ")),o(l)}},t.encodeDate=function(o){return function(l){return o(l).replace(" ","_")}},t.extractPathCoords=function(o,l,s){var f=[],c=o.match(e.segmentRE);return c.forEach(function(u){var v=l[u.charAt(0)].drawn;if(v!==void 0){var h=u.substr(1).match(e.paramRE);if(!(!h||h.length<v)){var d=h[v],p=s?d:r.cleanNumber(d);f.push(p)}}}),f},t.getDataToPixel=function(o,l,s,f,c){var u=o._fullLayout._size,v;if(l)if(c==="domain")v=function(d){return l._length*(f?1-d:d)+l._offset};else{var h=t.shapePositionToRange(l);v=function(d){var p=n(l,s);return l._offset+l.r2p(h(d,!0))+p},l.type==="date"&&(v=t.decodeDate(v))}else f?v=function(d){return u.t+u.h*(1-d)}:v=function(d){return u.l+u.w*d};return v},t.getPixelToData=function(o,l,s,f){var c=o._fullLayout._size,u;if(l)if(f==="domain")u=function(h){var d=(h-l._offset)/l._length;return s?1-d:d};else{var v=t.rangeToShapePosition(l);u=function(h){return v(l.p2r(h-l._offset))}}else s?u=function(h){return 1-(h-c.t)/c.h}:u=function(h){return(h-c.l)/c.w};return u},t.roundPositionForSharpStrokeRendering=function(o,l){var s=Math.round(l%2)===1,f=Math.round(o);return s?f+.5:f},t.makeShapesOptionsAndPlotinfo=function(o,l){var s=o._fullLayout.shapes[l]||{},f=o._fullLayout._plots[s.xref+s.yref],c=!!f;return c?f._hadPlotinfo=!0:(f={},s.xref&&s.xref!=="paper"&&(f.xaxis=o._fullLayout[s.xref+"axis"]),s.yref&&s.yref!=="paper"&&(f.yaxis=o._fullLayout[s.yref+"axis"])),f.xsizemode=s.xsizemode,f.ysizemode=s.ysizemode,f.xanchor=s.xanchor,f.yanchor=s.yanchor,{options:s,plotinfo:f}},t.makeSelectionsOptionsAndPlotinfo=function(o,l){var s=o._fullLayout.selections[l]||{},f=o._fullLayout._plots[s.xref+s.yref],c=!!f;return c?f._hadPlotinfo=!0:(f={},s.xref&&(f.xaxis=o._fullLayout[s.xref+"axis"]),s.yref&&(f.yaxis=o._fullLayout[s.yref+"axis"])),{options:s,plotinfo:f}},t.getPathString=function(o,l){var s=l.type,f=a.getRefType(l.xref),c=a.getRefType(l.yref),u=a.getFromId(o,l.xref),v=a.getFromId(o,l.yref),h=o._fullLayout._size,d,p,m,y,b=n(u,l.x0shift),_=n(u,l.x1shift),g=n(v,l.y0shift),x=n(v,l.y1shift),w,T,A,M;if(u?f==="domain"?p=function(k){return u._offset+u._length*k}:(d=t.shapePositionToRange(u),p=function(k){return u._offset+u.r2p(d(k,!0))}):p=function(k){return h.l+h.w*k},v?c==="domain"?y=function(k){return v._offset+v._length*(1-k)}:(m=t.shapePositionToRange(v),y=function(k){return v._offset+v.r2p(m(k,!0))}):y=function(k){return h.t+h.h*(1-k)},s==="path")return u&&u.type==="date"&&(p=t.decodeDate(p)),v&&v.type==="date"&&(y=t.decodeDate(y)),i(l,p,y);if(l.xsizemode==="pixel"){var S=p(l.xanchor);w=S+l.x0+b,T=S+l.x1+_}else w=p(l.x0)+b,T=p(l.x1)+_;if(l.ysizemode==="pixel"){var L=y(l.yanchor);A=L-l.y0+g,M=L-l.y1+x}else A=y(l.y0)+g,M=y(l.y1)+x;if(s==="line")return"M"+w+","+A+"L"+T+","+M;if(s==="rect")return"M"+w+","+A+"H"+T+"V"+M+"H"+w+"Z";var z=(w+T)/2,N=(A+M)/2,$=Math.abs(z-w),R=Math.abs(N-A),H="A"+$+","+R,D=z+$+","+N,P=z+","+(N-R);return"M"+D+H+" 0 1,1 "+P+H+" 0 0,1 "+D+"Z"};function i(o,l,s){var f=o.path,c=o.xsizemode,u=o.ysizemode,v=o.xanchor,h=o.yanchor;return f.replace(e.segmentRE,function(d){var p=0,m=d.charAt(0),y=e.paramIsX[m],b=e.paramIsY[m],_=e.numParams[m],g=d.substr(1).replace(e.paramRE,function(x){return y[p]?c==="pixel"?x=l(v)+Number(x):x=l(x):b[p]&&(u==="pixel"?x=s(h)-Number(x):x=s(x)),p++,p>_&&(x="X"),x});return p>_&&(g=g.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+d)),m+g})}function n(o,l){l=l||0;var s=0;return l&&o&&(o.type==="category"||o.type==="multicategory")&&(s=(o.r2p(1)-o.r2p(0))*l),s}})(Ui);var RP=ke,Vn=Ot,Eg=Tr,zg=zt,IP=Gi.readPaths,ah=Ui,FP=ah.getPathString,Rg=Vh,NP=Vr.FROM_TL,MT=function(e,r,a,i){if(i.selectAll(".shape-label").remove(),!!(a.label.text||a.label.texttemplate)){var n;if(a.label.texttemplate){var o={};if(a.type!=="path"){var l=Vn.getFromId(e,a.xref),s=Vn.getFromId(e,a.yref);for(var f in Rg){var c=Rg[f](a,l,s);c!==void 0&&(o[f]=c)}}n=RP.texttemplateStringForShapes(a.label.texttemplate,{},e._fullLayout._d3locale,o)}else n=a.label.text;var u={"data-index":r},v=a.label.font,h={"data-notex":1},d=i.append("g").attr(u).classed("shape-label",!0),p=d.append("text").attr(h).classed("shape-label-text",!0).text(n),m,y,b,_;if(a.path){var g=FP(e,a),x=IP(g,e);m=1/0,b=1/0,y=-1/0,_=-1/0;for(var w=0;w<x.length;w++)for(var T=0;T<x[w].length;T++)for(var A=x[w][T],M=1;M<A.length;M+=2){var S=A[M],L=A[M+1];m=Math.min(m,S),y=Math.max(y,S),b=Math.min(b,L),_=Math.max(_,L)}}else{var z=Vn.getFromId(e,a.xref),N=a.x0shift,$=a.x1shift,R=Vn.getRefType(a.xref),H=Vn.getFromId(e,a.yref),D=a.y0shift,P=a.y1shift,k=Vn.getRefType(a.yref),C=function(V,q){var B=ah.getDataToPixel(e,z,q,!1,R);return B(V)},E=function(V,q){var B=ah.getDataToPixel(e,H,q,!0,k);return B(V)};m=C(a.x0,N),y=C(a.x1,$),b=E(a.y0,D),_=E(a.y1,P)}var I=a.label.textangle;I==="auto"&&(a.type==="line"?I=$P(m,b,y,_):I=0),p.call(function(V){return V.call(zg.font,v).attr({}),Eg.convertToTspans(V,e),V});var j=zg.bBox(p.node()),G=HP(m,b,y,_,a,I,j),X=G.textx,O=G.texty,Z=G.xanchor;p.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[Z],y:O,x:X,transform:"rotate("+I+","+X+","+O+")"}).call(Eg.positionText,X,O)}};function $P(t,e,r,a){var i,n;return n=Math.abs(r-t),r>=t?i=e-a:i=a-e,-180/Math.PI*Math.atan2(i,n)}function HP(t,e,r,a,i,n,o){var l=i.label.textposition,s=i.label.textangle,f=i.label.padding,c=i.type,u=Math.PI/180*n,v=Math.sin(u),h=Math.cos(u),d=i.label.xanchor,p=i.label.yanchor,m,y,b,_;if(c==="line"){l==="start"?(m=t,y=e):l==="end"?(m=r,y=a):(m=(t+r)/2,y=(e+a)/2),d==="auto"&&(l==="start"?s==="auto"?r>t?d="left":r<t?d="right":d="center":r>t?d="right":r<t?d="left":d="center":l==="end"?s==="auto"?r>t?d="right":r<t?d="left":d="center":r>t?d="left":r<t?d="right":d="center":d="center");var g={left:1,center:0,right:-1},x={bottom:-1,middle:0,top:1};if(s==="auto"){var w=x[p];b=-f*v*w,_=f*h*w}else{var T=g[d],A=x[p];b=f*T,_=f*A}m=m+b,y=y+_}else b=f+3,l.indexOf("right")!==-1?(m=Math.max(t,r)-b,d==="auto"&&(d="right")):l.indexOf("left")!==-1?(m=Math.min(t,r)+b,d==="auto"&&(d="left")):(m=(t+r)/2,d==="auto"&&(d="center")),l.indexOf("top")!==-1?y=Math.min(e,a):l.indexOf("bottom")!==-1?y=Math.max(e,a):y=(e+a)/2,_=f,p==="bottom"?y=y-_:p==="top"&&(y=y+_);var M=NP[p],S=i.label.font.size,L=o.height,z=(L*M-S)*v,N=-(L*M-S)*h;return{textx:m+z,texty:y+N,xanchor:d}}var OP=ke,jP=OP.strTranslate,Ig=ai,ST=Nn,BP=ST.drawMode,LT=ST.selectMode,CT=ot,Fg=yt,lu=wp,GP=lu.i000,UP=lu.i090,VP=lu.i180,WP=lu.i270,XP=Rn,DT=XP.clearOutlineControllers,Mp=Gi,Js=Mp.pointsOnRectangle,vv=Mp.pointsOnEllipse,YP=Mp.writePaths,qP=kp.newShapes,ZP=kp.createShapeObj,KP=AT,QP=MT,Sp=function t(e,r,a,i){i||(i=0);var n=a.gd;function o(){t(e,r,a,i++),(vv(e[0])||a.hasText)&&l({redrawing:!0})}function l(D){var P={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,P=qP(r,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,P=KP(r,a),n._fullLayout._reselect=!0),Object.keys(P).length&&CT.call((D||{}).redrawing?"relayout":"_guiRelayout",n,P)}var s=n._fullLayout,f=s._zoomlayer,c=a.dragmode,u=BP(c),v=LT(c);(u||v)&&(n._fullLayout._outlining=!0),DT(n),r.attr("d",YP(e));var h,d,p,m,y;if(!i&&(a.isActiveShape||a.isActiveSelection)){y=JP([],e);var b=f.append("g").attr("class","outline-controllers");S(b),H()}if(u&&a.hasText){var _=f.select(".label-temp"),g=ZP(r,a,a.dragmode);QP(n,"label-temp",g,_)}function x(D){p=+D.srcElement.getAttribute("data-i"),m=+D.srcElement.getAttribute("data-j"),h[p][m].moveFn=w}function w(D,P){if(e.length){var k=y[p][m][1],C=y[p][m][2],E=e[p],I=E.length;if(Js(E)){var j=D,G=P;if(a.isActiveSelection){var X=Ng(E,m);X[1]===E[m][1]?G=0:j=0}for(var O=0;O<I;O++)if(O!==m){var Z=E[O];Z[1]===E[m][1]&&(Z[1]=k+j),Z[2]===E[m][2]&&(Z[2]=C+G)}if(E[m][1]=k+j,E[m][2]=C+G,!Js(E))for(var V=0;V<I;V++)for(var q=0;q<E[V].length;q++)E[V][q]=y[p][V][q]}else E[m][1]=k+D,E[m][2]=C+P;o()}}function T(){l()}function A(){if(e.length&&e[p]&&e[p].length){for(var D=[],P=0;P<e[p].length;P++)P!==m&&D.push(e[p][P]);D.length>1&&!(D.length===2&&D[1][0]==="Z")&&(m===0&&(D[0][0]="M"),e[p]=D,o(),l())}}function M(D,P){if(D===2){p=+P.srcElement.getAttribute("data-i"),m=+P.srcElement.getAttribute("data-j");var k=e[p];!Js(k)&&!vv(k)&&A()}}function S(D){h=[];for(var P=0;P<e.length;P++){var k=e[P],C=Js(k),E=!C&&vv(k);h[P]=[];for(var I=k.length,j=0;j<I;j++)if(k[j][0]!=="Z"&&!(E&&j!==GP&&j!==UP&&j!==VP&&j!==WP)){var G=C&&a.isActiveSelection,X;G&&(X=Ng(k,j));var O=k[j][1],Z=k[j][2],V=D.append(G?"rect":"circle").attr("data-i",P).attr("data-j",j).style({fill:Fg.background,stroke:Fg.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(G){var q=X[1]-O,B=X[2]-Z,J=B?5:Math.max(Math.min(25,Math.abs(q)-5),5),ie=q?5:Math.max(Math.min(25,Math.abs(B)-5),5);V.classed(B?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",J).attr("height",ie).attr("x",O-J/2).attr("y",Z-ie/2).attr("transform",jP(q/2,B/2))}else V.classed("cursor-grab",!0).attr("r",5).attr("cx",O).attr("cy",Z);h[P][j]={element:V.node(),gd:n,prepFn:x,doneFn:T,clickFn:M},Ig.init(h[P][j])}}}function L(D,P){if(e.length)for(var k=0;k<e.length;k++)for(var C=0;C<e[k].length;C++)for(var E=0;E+2<e[k][C].length;E+=2)e[k][C][E+1]=y[k][C][E+1]+D,e[k][C][E+2]=y[k][C][E+2]+P}function z(D,P){L(D,P),o()}function N(D){p=+D.srcElement.getAttribute("data-i"),p||(p=0),d[p].moveFn=z}function $(){l()}function R(D){D===2&&eE(n)}function H(){if(d=[],!!e.length){var D=0;d[D]={element:r[0][0],gd:n,prepFn:N,doneFn:$,clickFn:R},Ig.init(d[D])}}};function JP(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 Ng(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 eE(t){if(LT(t._fullLayout.dragmode)){DT(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},CT.call("_guiRelayout",t,{selections:a})}}}var tE=bt,PT=ot,$g=ke,Wn=Ot,rE=Gi.readPaths,aE=Sp,ih=MT,ET=Rn.clearOutlineControllers,dv=yt,Lp=zt,iE=Ht.arrayEditor,Hg=ai,Og=Bi,un=ou,Yr=Ui,nh=Yr.getPathString,Cp={draw:Dp,drawOne:zT,eraseActiveShape:lE};function Dp(t){var e=t._fullLayout;e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._shapeUpperLayer.selectAll("text").remove(),e._shapeLowerLayer.selectAll("text").remove();for(var r in e._plots){var a=e._plots[r].shapelayer;a&&(a.selectAll("path").remove(),a.selectAll("text").remove())}for(var i=0;i<e.shapes.length;i++)e.shapes[i].visible===!0&&zT(t,i)}function ef(t){return!!t._fullLayout._outlining}function su(t){return!t._context.edits.shapePosition}function zT(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=Yr.makeShapesOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input||a.visible!==!0)return;if(a.layer==="above")o(t._fullLayout._shapeUpperLayer);else if(a.xref==="paper"||a.yref==="paper")o(t._fullLayout._shapeLowerLayer);else if(a.layer==="between")o(i.shapelayerBetween);else if(i._hadPlotinfo){var n=i.mainplotinfo||i;o(n.shapelayer)}else o(t._fullLayout._shapeLowerLayer);function o(l){var s=nh(t,a),f={"data-index":e,"fill-rule":a.fillrule,d:s},c=a.opacity,u=a.fillcolor,v=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",m=su(t)&&a.editable&&t._fullLayout._activeShapeIndex===e;m&&(u=p?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,c=t._fullLayout.activeshape.opacity);var y=l.append("g").classed("shape-group",!0).attr({"data-index":e}),b=y.append("path").attr(f).style("opacity",c).call(dv.stroke,v).call(dv.fill,u).call(Lp.dashLine,d,h);RT(y,t,a),ih(t,e,a,y);var _;if((m||t._context.edits.shapePosition)&&(_=iE(t.layout,"shapes",a)),m){b.style({cursor:"move"});var g={element:b.node(),plotinfo:i,gd:t,editHelpers:_,hasText:a.label.text||a.label.texttemplate,isActiveShape:!0},x=rE(s,t);aE(x,b,g)}else t._context.edits.shapePosition?nE(t,b,a,e,l,_):a.editable===!0&&b.style("pointer-events",p||dv.opacity(u)*c<=.5?"stroke":"all");b.node().addEventListener("click",function(){return oE(t,b)})}}function RT(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 nE(t,e,r,a,i,n){var o=10,l=10,s=r.xsizemode==="pixel",f=r.ysizemode==="pixel",c=r.type==="line",u=r.type==="path",v=n.modifyItem,h,d,p,m,y,b,_,g,x,w,T,A,M,S,L,z=tE.select(e.node().parentNode),N=Wn.getFromId(t,r.xref),$=Wn.getRefType(r.xref),R=Wn.getFromId(t,r.yref),H=Wn.getRefType(r.yref),D=r.x0shift,P=r.x1shift,k=r.y0shift,C=r.y1shift,E=function(me,pe){var se=Yr.getDataToPixel(t,N,pe,!1,$);return se(me)},I=function(me,pe){var se=Yr.getDataToPixel(t,R,pe,!0,H);return se(me)},j=Yr.getPixelToData(t,N,!1,$),G=Yr.getPixelToData(t,R,!0,H),X=V(),O={element:X.node(),gd:t,prepFn:J,doneFn:ie,clickFn:de},Z;Hg.init(O),X.node().onmousemove=B;function V(){return c?q():e}function q(){var me=10,pe=Math.max(r.line.width,me),se=i.append("g").attr("data-index",a).attr("drag-helper",!0);se.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":pe,"stroke-opacity":"0"});var be={"fill-opacity":"0"},Le=Math.max(pe/2,me);return se.append("circle").attr({"data-line-point":"start-point",cx:s?E(r.xanchor)+r.x0:E(r.x0,D),cy:f?I(r.yanchor)-r.y0:I(r.y0,k),r:Le}).style(be).classed("cursor-grab",!0),se.append("circle").attr({"data-line-point":"end-point",cx:s?E(r.xanchor)+r.x1:E(r.x1,P),cy:f?I(r.yanchor)-r.y1:I(r.y1,C),r:Le}).style(be).classed("cursor-grab",!0),se}function B(me){if(ef(t)){Z=null;return}if(c)me.target.tagName==="path"?Z="move":Z=me.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var pe=O.element.getBoundingClientRect(),se=pe.right-pe.left,be=pe.bottom-pe.top,Le=me.clientX-pe.left,ve=me.clientY-pe.top,Te=!u&&se>o&&be>l&&!me.shiftKey?Hg.getCursor(Le/se,1-ve/be):"move";Og(e,Te),Z=Te.split("-")[0]}}function J(me){ef(t)||(s&&(y=E(r.xanchor)),f&&(b=I(r.yanchor)),r.type==="path"?L=r.path:(h=s?r.x0:E(r.x0),d=f?r.y0:I(r.y0),p=s?r.x1:E(r.x1),m=f?r.y1:I(r.y1)),h<p?(x=h,M="x0",w=p,S="x1"):(x=p,M="x1",w=h,S="x0"),!f&&d<m||f&&d>m?(_=d,T="y0",g=m,A="y1"):(_=m,T="y1",g=d,A="y0"),B(me),ee(i,r),ue(e,r,t),O.moveFn=Z==="move"?oe:Y,O.altKey=me.altKey)}function ie(){ef(t)||(Og(e),le(i),RT(e,t,r),PT.call("_guiRelayout",t,n.getUpdateObj()))}function de(){ef(t)||le(i)}function oe(me,pe){if(r.type==="path"){var se=function(ve){return ve},be=se,Le=se;s?v("xanchor",r.xanchor=j(y+me)):(be=function(Te){return j(E(Te)+me)},N&&N.type==="date"&&(be=Yr.encodeDate(be))),f?v("yanchor",r.yanchor=G(b+pe)):(Le=function(Te){return G(I(Te)+pe)},R&&R.type==="date"&&(Le=Yr.encodeDate(Le))),v("path",r.path=jg(L,be,Le))}else s?v("xanchor",r.xanchor=j(y+me)):(v("x0",r.x0=j(h+me)),v("x1",r.x1=j(p+me))),f?v("yanchor",r.yanchor=G(b+pe)):(v("y0",r.y0=G(d+pe)),v("y1",r.y1=G(m+pe)));e.attr("d",nh(t,r)),ee(i,r),ih(t,a,r,z)}function Y(me,pe){if(u){var se=function(Fe){return Fe},be=se,Le=se;s?v("xanchor",r.xanchor=j(y+me)):(be=function(Oe){return j(E(Oe)+me)},N&&N.type==="date"&&(be=Yr.encodeDate(be))),f?v("yanchor",r.yanchor=G(b+pe)):(Le=function(Oe){return G(I(Oe)+pe)},R&&R.type==="date"&&(Le=Yr.encodeDate(Le))),v("path",r.path=jg(L,be,Le))}else if(c){if(Z==="resize-over-start-point"){var ve=h+me,Te=f?d-pe:d+pe;v("x0",r.x0=s?ve:j(ve)),v("y0",r.y0=f?Te:G(Te))}else if(Z==="resize-over-end-point"){var we=p+me,Q=f?m-pe:m+pe;v("x1",r.x1=s?we:j(we)),v("y1",r.y1=f?Q:G(Q))}}else{var xe=function(Fe){return Z.indexOf(Fe)!==-1},ae=xe("n"),ge=xe("s"),Ae=xe("w"),ce=xe("e"),De=ae?_+pe:_,Se=ge?g+pe:g,Me=Ae?x+me:x,He=ce?w+me:w;f&&(ae&&(De=_-pe),ge&&(Se=g-pe)),(!f&&Se-De>l||f&&De-Se>l)&&(v(T,r[T]=f?De:G(De)),v(A,r[A]=f?Se:G(Se))),He-Me>o&&(v(M,r[M]=s?Me:j(Me)),v(S,r[S]=s?He:j(He)))}e.attr("d",nh(t,r)),ee(i,r),ih(t,a,r,z)}function ee(me,pe){(s||f)&&se();function se(){var be=pe.type!=="path",Le=me.selectAll(".visual-cue").data([0]),ve=1;Le.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ve}).classed("visual-cue",!0);var Te=E(s?pe.xanchor:$g.midRange(be?[pe.x0,pe.x1]:Yr.extractPathCoords(pe.path,un.paramIsX))),we=I(f?pe.yanchor:$g.midRange(be?[pe.y0,pe.y1]:Yr.extractPathCoords(pe.path,un.paramIsY)));if(Te=Yr.roundPositionForSharpStrokeRendering(Te,ve),we=Yr.roundPositionForSharpStrokeRendering(we,ve),s&&f){var Q="M"+(Te-1-ve)+","+(we-1-ve)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Le.attr("d",Q)}else if(s){var xe="M"+(Te-1-ve)+","+(we-9-ve)+"v18 h2 v-18 Z";Le.attr("d",xe)}else{var ae="M"+(Te-9-ve)+","+(we-1-ve)+"h18 v2 h-18 Z";Le.attr("d",ae)}}}function le(me){me.selectAll(".visual-cue").remove()}function ue(me,pe,se){var be=pe.xref,Le=pe.yref,ve=Wn.getFromId(se,be),Te=Wn.getFromId(se,Le),we="";be!=="paper"&&!ve.autorange&&(we+=be),Le!=="paper"&&!Te.autorange&&(we+=Le),Lp.setClipUrl(me,we?"clip"+se._fullLayout._uid+we:null,se)}}function jg(t,e,r){return t.replace(un.segmentRE,function(a){var i=0,n=a.charAt(0),o=un.paramIsX[n],l=un.paramIsY[n],s=un.numParams[n],f=a.substr(1).replace(un.paramRE,function(c){return i>=s||(o[i]?c=e(c):l[i]&&(c=r(c)),i++),c});return n+f})}function oE(t,e){if(su(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeShapeIndex){Bg(t);return}t._fullLayout._activeShapeIndex=a,t._fullLayout._deactivateShape=Bg,Dp(t)}}}function Bg(t){if(su(t)){var e=t._fullLayout._activeShapeIndex;e>=0&&(ET(t),delete t._fullLayout._activeShapeIndex,Dp(t))}}function lE(t){if(su(t)){ET(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]);return delete t._fullLayout._activeShapeIndex,PT.call("_guiRelayout",t,{shapes:a})}}}var Ta=ot,IT=hr,FT=lr,Dt=_p,sE=Cp.eraseActiveShape,Hf=ke,Mt=Hf._,Pt=xT.exports={};Pt.toImage={name:"toImage",title:function(t){var e=t._context.toImageButtonOptions||{},r=e.format||"png";return r==="png"?Mt(t,"Download plot as a PNG"):Mt(t,"Download plot")},icon:Dt.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};Hf.notifier(Mt(t,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(a){a in e&&(r[a]=e[a])}),Ta.call("downloadImage",t,r).then(function(a){Hf.notifier(Mt(t,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){Hf.notifier(Mt(t,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Pt.sendDataToCloud={name:"sendDataToCloud",title:function(t){return Mt(t,"Edit in Chart Studio")},icon:Dt.disk,click:function(t){IT.sendDataToCloud(t)}};Pt.editInChartStudio={name:"editInChartStudio",title:function(t){return Mt(t,"Edit in Chart Studio")},icon:Dt.pencil,click:function(t){IT.sendDataToCloud(t)}};Pt.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return Mt(t,"Zoom")},attr:"dragmode",val:"zoom",icon:Dt.zoombox,click:Br};Pt.pan2d={name:"pan2d",_cat:"pan",title:function(t){return Mt(t,"Pan")},attr:"dragmode",val:"pan",icon:Dt.pan,click:Br};Pt.select2d={name:"select2d",_cat:"select",title:function(t){return Mt(t,"Box Select")},attr:"dragmode",val:"select",icon:Dt.selectbox,click:Br};Pt.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return Mt(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Dt.lasso,click:Br};Pt.drawclosedpath={name:"drawclosedpath",title:function(t){return Mt(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Dt.drawclosedpath,click:Br};Pt.drawopenpath={name:"drawopenpath",title:function(t){return Mt(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Dt.drawopenpath,click:Br};Pt.drawline={name:"drawline",title:function(t){return Mt(t,"Draw line")},attr:"dragmode",val:"drawline",icon:Dt.drawline,click:Br};Pt.drawrect={name:"drawrect",title:function(t){return Mt(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Dt.drawrect,click:Br};Pt.drawcircle={name:"drawcircle",title:function(t){return Mt(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Dt.drawcircle,click:Br};Pt.eraseshape={name:"eraseshape",title:function(t){return Mt(t,"Erase active shape")},icon:Dt.eraseshape,click:sE};Pt.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return Mt(t,"Zoom in")},attr:"zoom",val:"in",icon:Dt.zoom_plus,click:Br};Pt.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return Mt(t,"Zoom out")},attr:"zoom",val:"out",icon:Dt.zoom_minus,click:Br};Pt.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return Mt(t,"Autoscale")},attr:"zoom",val:"auto",icon:Dt.autoscale,click:Br};Pt.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return Mt(t,"Reset axes")},attr:"zoom",val:"reset",icon:Dt.home,click:Br};Pt.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return Mt(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Dt.tooltip_basic,gravity:"ne",click:Br};Pt.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return Mt(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:Dt.tooltip_compare,gravity:"ne",click:Br};function Br(t,e){var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o={},l=FT.list(t,null,!0),s=n._cartesianSpikesEnabled,f,c;if(a==="zoom"){var u=i==="in"?.5:2,v=(1+u)/2,h=(1-u)/2,d,p;for(c=0;c<l.length;c++)if(f=l[c],p=f.modebardisable==="none"||f.modebardisable.indexOf(i==="auto"||i==="reset"?"autoscale":"zoominout")===-1,p&&!f.fixedrange)if(d=f._name,i==="auto")o[d+".autorange"]=!0;else if(i==="reset")f._rangeInitial0===void 0&&f._rangeInitial1===void 0?o[d+".autorange"]=!0:f._rangeInitial0===void 0?(o[d+".autorange"]=f._autorangeInitial,o[d+".range"]=[null,f._rangeInitial1]):f._rangeInitial1===void 0?(o[d+".range"]=[f._rangeInitial0,null],o[d+".autorange"]=f._autorangeInitial):o[d+".range"]=[f._rangeInitial0,f._rangeInitial1],f._showSpikeInitial!==void 0&&(o[d+".showspikes"]=f._showSpikeInitial,s==="on"&&!f._showSpikeInitial&&(s="off"));else{var m=[f.r2l(f.range[0]),f.r2l(f.range[1])],y=[v*m[0]+h*m[1],v*m[1]+h*m[0]];o[d+".range[0]"]=f.l2r(y[0]),o[d+".range[1]"]=f.l2r(y[1])}}else a==="hovermode"&&(i==="x"||i==="y")&&(i=n._isHoriz?"y":"x",r.setAttribute("data-val",i)),o[a]=i;n._cartesianSpikesEnabled=s,Ta.call("_guiRelayout",t,o)}Pt.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return Mt(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:Dt.zoombox,click:fu};Pt.pan3d={name:"pan3d",_cat:"pan",title:function(t){return Mt(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:Dt.pan,click:fu};Pt.orbitRotation={name:"orbitRotation",title:function(t){return Mt(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:Dt["3d_rotate"],click:fu};Pt.tableRotation={name:"tableRotation",title:function(t){return Mt(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:Dt["z-axis"],click:fu};function fu(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,Ta.call("_guiRelayout",t,o)}Pt.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return Mt(t,"Reset camera to default")},attr:"resetDefault",icon:Dt.home,click:Pp};Pt.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return Mt(t,"Reset camera to last save")},attr:"resetLastSave",icon:Dt.movie,click:Pp};function Pp(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],u=c+".camera",v=c+".aspectratio",h=c+".aspectmode",d=o[c]._scene,p;i?(s[u+".up"]=d.viewInitial.up,s[u+".eye"]=d.viewInitial.eye,s[u+".center"]=d.viewInitial.center,p=!0):n&&(s[u+".up"]=null,s[u+".eye"]=null,s[u+".center"]=null,p=!0),p&&(s[v+".x"]=d.viewInitial.aspectratio.x,s[v+".y"]=d.viewInitial.aspectratio.y,s[v+".z"]=d.viewInitial.aspectratio.z,s[h]=d.viewInitial.aspectmode)}Ta.call("_guiRelayout",t,s)}Pt.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return Mt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Dt.tooltip_basic,gravity:"ne",click:fE};function NT(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],u=i[c],v=c+".hovermode";l[v]=u.hovermode,s[v]=!1;for(var h=0;h<3;h++){var d=o[h],p=c+"."+d+".showspikes";s[p]=!1,l[p]=u[d].showspikes}}r._previousVal=l}return s}function fE(t,e){var r=NT(t,e);Ta.call("_guiRelayout",t,r)}Pt.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return Mt(t,"Zoom in")},attr:"zoom",val:"in",icon:Dt.zoom_plus,click:Ep};Pt.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return Mt(t,"Zoom out")},attr:"zoom",val:"out",icon:Dt.zoom_minus,click:Ep};Pt.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return Mt(t,"Reset")},attr:"reset",val:null,icon:Dt.autoscale,click:Ep};Pt.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return Mt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Dt.tooltip_basic,gravity:"ne",click:HT};function Ep(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,u=i==="in"?2*c:.5*c;Ta.call("_guiRelayout",t,s+".projection.scale",u)}}a==="reset"&&ko(t,"geo")}Pt.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return Mt(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:Dt.tooltip_basic,gravity:"ne",click:HT};function $T(t){var e=t._fullLayout;return e.hovermode?!1:e._has("cartesian")?e._isHoriz?"y":"x":"closest"}function HT(t){var e=$T(t);Ta.call("_guiRelayout",t,"hovermode",e)}Pt.resetViewSankey={name:"resetSankeyGroup",title:function(t){return Mt(t,"Reset view")},icon:Dt.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())}Ta.call("restyle",t,e)}};Pt.toggleHover={name:"toggleHover",title:function(t){return Mt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Dt.tooltip_basic,gravity:"ne",click:function(t,e){var r=NT(t,e);r.hovermode=$T(t),Ta.call("_guiRelayout",t,r)}};Pt.resetViews={name:"resetViews",title:function(t){return Mt(t,"Reset views")},icon:Dt.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),Br(t,e),r.setAttribute("data-attr","resetLastSave"),Pp(t,e),ko(t,"geo"),ko(t,"mapbox"),ko(t,"map")}};Pt.toggleSpikelines={name:"toggleSpikelines",title:function(t){return Mt(t,"Toggle Spike Lines")},icon:Dt.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled=r==="on"?"off":"on",Ta.call("_guiRelayout",t,cE(t))}};function cE(t){for(var e=t._fullLayout,r=e._cartesianSpikesEnabled==="on",a=FT.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}Pt.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return Mt(t,"Reset view")},attr:"reset",icon:Dt.home,click:function(t){ko(t,"mapbox")}};Pt.resetViewMap={name:"resetViewMap",_cat:"resetView",title:function(t){return Mt(t,"Reset view")},attr:"reset",icon:Dt.home,click:function(t){ko(t,"map")}};Pt.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return Mt(t,"Zoom in")},attr:"zoom",val:"in",icon:Dt.zoom_plus,click:OT};Pt.zoomInMap={name:"zoomInMap",_cat:"zoomin",title:function(t){return Mt(t,"Zoom in")},attr:"zoom",val:"in",icon:Dt.zoom_plus,click:jT};Pt.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return Mt(t,"Zoom out")},attr:"zoom",val:"out",icon:Dt.zoom_minus,click:OT};Pt.zoomOutMap={name:"zoomOutMap",_cat:"zoomout",title:function(t){return Mt(t,"Zoom out")},attr:"zoom",val:"out",icon:Dt.zoom_minus,click:jT};function OT(t,e){BT(t,e,"mapbox")}function jT(t,e){BT(t,e,"map")}function BT(t,e,r){for(var a=e.currentTarget,i=a.getAttribute("data-val"),n=t._fullLayout,o=n._subplots[r]||[],l=1.05,s={},f=0;f<o.length;f++){var c=o[f],u=n[c].zoom,v=i==="in"?l*u:u/l;s[c+".zoom"]=v}Ta.call("_guiRelayout",t,s)}function ko(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 u=f[c];i[o+"."+u]=s[u]}Ta.call("_guiRelayout",t,i)}var GT=xT.exports,UT=GT,uE=Object.keys(UT),VT=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],WT=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(VT),yo=[],vE=function(t){if(WT.indexOf(t._cat||t.name)===-1){var e=t.name,r=(t._cat||t.name).toLowerCase();yo.indexOf(e)===-1&&yo.push(e),yo.indexOf(r)===-1&&yo.push(r)}};uE.forEach(function(t){vE(UT[t])});yo.sort();var XT={DRAW_MODES:VT,backButtons:WT,foreButtons:yo},Gg=XT,YT={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 *"+Gg.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 *"+Gg.foreButtons.join("*, *")+"*."].join(" ")}},dE=ke,vl=yt,hE=Ht,pE=YT,mE=function(e,r){var a=e.modebar||{},i=hE.newContainer(r,"modebar");function n(l,s){return dE.coerce(a,i,pE,l,s)}n("orientation"),n("bgcolor",vl.addOpacity(r.paper_bgcolor,.5));var o=vl.contrast(vl.rgb(r.modebar.bgcolor));n("color",vl.addOpacity(o,.3)),n("activecolor",vl.addOpacity(o,.7)),n("uirevision",r.uirevision),n("add"),n("remove")},zp=bt,yE=kt,cu=ke,qT=_p,gE=Rc.version,bE=new DOMParser;function ZT(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var ii=ZT.prototype;ii.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.element.setAttribute("role","toolbar"),this._uid=i,this.element.className="modebar modebar--custom",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="#"+i+" .modebar-group";document.querySelectorAll(o).forEach(function(u){u.style.backgroundColor=n.bgcolor});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(),cu.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+n.activecolor,"fill: "+n.color,this.element)};ii.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)})};ii.createGroup=function(){var t=document.createElement("div");t.className="modebar-group";var e=this.graphInfo._fullLayout.modebar;return t.style.backgroundColor=e.bgcolor,t};ii.createButton=function(t){var e=this,r=document.createElement("button");r.setAttribute("type","button"),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),r.setAttribute("aria-label",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&&zp.select(r).classed("active",!0);var o=t.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||qT.question)),r.setAttribute("data-gravity",t.gravity||"n"),r};ii.createIcon=function(t){var e=yE(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=bE.parseFromString(t.svg,"application/xml");a=n.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};ii.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=zp.select(a),s=function(u,v){var h=e.modebar,d=u.querySelector(".icon path");d&&(v||u.matches(":hover")?d.style.fill=h.activecolor:d.style.fill=h.color)};if(o){if(n===r){var f=!l.classed("active");l.classed("active",f),s(a,f)}}else{var c=n===null?n:cu.nestedProperty(e,n).get();l.classed("active",c===i),s(a,c===i)}})};ii.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 xE(t){return t+" (v"+gE+")"}ii.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",xE(cu._(this.graphInfo,"Produced with Plotly.js"))),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(qT.newplotlylogo)),t.appendChild(e),t};ii.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};ii.destroy=function(){cu.removeElement(this.container.querySelector(".modebar"))};function _E(t,e){var r=t._fullLayout,a=new ZT({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&zp.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}var wE=_E,TE=lr,Ug=jr,oh=ot,kE=wa.isUnifiedHover,AE=wE,pc=GT,ME=XT.DRAW_MODES,SE=ke.extendDeep,LE=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=RE(n):!a.displayModeBar&&a.watermark?o=[]:o=CE(e),i?i.update(e,o):r._modeBar=AE(e,o)};function CE(t){var e=t._fullLayout,r=t._fullData,a=t._context;function i(P,k){if(typeof k=="string"){if(k.toLowerCase()===P.toLowerCase())return!0}else{var C=k.name,E=k._cat||k.name;if(C===P||E===P.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(P){for(var k=0;k<a.modeBarButtonsToRemove.length;k++)if(i(P,a.modeBarButtonsToRemove[k]))return!1;return!0})),s=a.modeBarButtonsToRemove.concat(o.filter(function(P){for(var k=0;k<a.modeBarButtonsToAdd.length;k++)if(i(P,a.modeBarButtonsToAdd[k]))return!1;return!0})),f=e._has("cartesian"),c=e._has("gl3d"),u=e._has("geo"),v=e._has("pie"),h=e._has("funnelarea"),d=e._has("ternary"),p=e._has("mapbox"),m=e._has("map"),y=e._has("polar"),b=e._has("smith"),_=e._has("sankey"),g=DE(e),x=kE(e.hovermode),w=[];function T(P){if(P.length){for(var k=[],C=0;C<P.length;C++){for(var E=P[C],I=pc[E],j=I.name.toLowerCase(),G=(I._cat||I.name).toLowerCase(),X=!1,O=0;O<s.length;O++){var Z=s[O].toLowerCase();if(Z===j||Z===G){X=!0;break}}X||k.push(pc[E])}w.push(k)}}var A=["toImage"];a.showEditInChartStudio?A.push("editInChartStudio"):a.showSendToCloud&&A.push("sendDataToCloud"),T(A);var M=[],S=[],L=[],z=[];(f||v||h||d)+u+c+p+m+y+b>1?(S=["toggleHover"],L=["resetViews"]):u?(M=["zoomInGeo","zoomOutGeo"],S=["hoverClosestGeo"],L=["resetGeo"]):c?(S=["hoverClosest3d"],L=["resetCameraDefault3d","resetCameraLastSave3d"]):p?(M=["zoomInMapbox","zoomOutMapbox"],S=["toggleHover"],L=["resetViewMapbox"]):m?(M=["zoomInMap","zoomOutMap"],S=["toggleHover"],L=["resetViewMap"]):v?S=["hoverClosestPie"]:_?(S=["hoverClosestCartesian","hoverCompareCartesian"],L=["resetViewSankey"]):S=["toggleHover"],f&&S.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(EE(r)||x)&&(S=[]),f&&!g&&(M=["zoomIn2d","zoomOut2d","autoScale2d"],L[0]!=="resetViews"&&(L=["resetScale2d"])),c?z=["zoom3d","pan3d","orbitRotation","tableRotation"]:f&&!g||d?z=["zoom2d","pan2d"]:p||m||u?z=["pan2d"]:y&&(z=["zoom2d"]),PE(r)&&z.push("select2d","lasso2d");var N=[],$=function(P){N.indexOf(P)===-1&&S.indexOf(P)!==-1&&N.push(P)};if(Array.isArray(l)){for(var R=[],H=0;H<l.length;H++){var D=l[H];typeof D=="string"?(D=D.toLowerCase(),ME.indexOf(D)!==-1?(e._has("mapbox")||e._has("map")||e._has("cartesian"))&&z.push(D):D==="togglespikelines"?$("toggleSpikelines"):D==="togglehover"?$("toggleHover"):D==="hovercompare"?$("hoverCompareCartesian"):D==="hoverclosest"?($("hoverClosestCartesian"),$("hoverClosestGeo"),$("hoverClosest3d"),$("hoverClosestPie")):D==="v1hovermode"&&($("hoverClosestCartesian"),$("hoverCompareCartesian"),$("hoverClosestGeo"),$("hoverClosest3d"),$("hoverClosestPie"))):R.push(D)}l=R}return T(z),T(M.concat(L)),T(N),zE(w,l)}function DE(t){for(var e=TE.list({_fullLayout:t},null,!0),r=0;r<e.length;r++){var a=e[r].modebardisable;if(!e[r].fixedrange&&a!=="autoscale+zoominout"&&a!=="zoominout+autoscale")return!1}return!0}function PE(t){for(var e=!1,r=0;r<t.length&&!e;r++){var a=t[r];!a._module||!a._module.selectPoints||(oh.traceIs(a,"scatter-like")?(Ug.hasMarkers(a)||Ug.hasText(a))&&(e=!0):oh.traceIs(a,"box-violin")?(a.boxpoints==="all"||a.points==="all")&&(e=!0):e=!0)}return e}function EE(t){for(var e=0;e<t.length;e++)if(!oh.traceIs(t[e],"noHover"))return!1;return!0}function zE(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 RE(t){for(var e=SE([],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(pc[n]!==void 0)e[r][i]=pc[n];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return e}var KT={moduleType:"component",name:"modebar",layoutAttributes:YT,supplyLayoutDefaults:mE,manage:LE},pi={},IE=Vr.FROM_BL,QT=function(e,r,a){a===void 0&&(a=IE[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()},ln=ke,hv=_s,Pa=lr.id2name,FE=ti,Vg=QT,NE=fp,$E=cr.ALMOST_EQUAL,HE=Vr.FROM_BL;pi.handleDefaults=function(t,e,r){var a=r.axIds,i=r.axHasImage,n=e._axisConstraintGroups=[],o=e._axisMatchGroups=[],l,s,f,c,u,v,h,d;for(l=0;l<a.length;l++)c=Pa(a[l]),u=t[c],v=e[c],OE(u,v,{axIds:a,layoutOut:e,hasImage:i[c]});function p(A,M){for(l=0;l<A.length;l++){s=A[l];for(f in s)e[Pa(f)][M]=s}}for(p(o,"_matchGroup"),l=0;l<n.length;l++){s=n[l];for(f in s)if(v=e[Pa(f)],v.fixedrange){for(var m in s){var y=Pa(m);(t[y]||{}).fixedrange===!1&&ln.warn("fixedrange was specified as false for axis "+y+" but was overridden because another axis in its constraint group has fixedrange true"),e[y].fixedrange=!0}break}}for(l=0;l<n.length;){s=n[l];for(f in s){v=e[Pa(f)],v._matchGroup&&Object.keys(v._matchGroup).length===Object.keys(s).length&&(n.splice(l,1),l--);break}l++}p(n,"_constraintGroup");var b=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],_=!1,g=!1;function x(){d=v[h],h==="rangebreaks"&&(g=v._hasDayOfWeekBreaks)}for(l=0;l<o.length;l++){s=o[l];for(var w=0;w<b.length;w++){h=b[w],d=null;var T;for(f in s)if(c=Pa(f),u=t[c],v=e[c],h in v){if(!v.matches&&(T=v,h in u)){x();break}d===null&&h in u&&x()}if(h==="range"&&d&&u.range&&u.range.length===2&&u.range[0]!==null&&u.range[1]!==null&&(_=!0),h==="autorange"&&d===null&&_&&(d=!1),d===null&&h in T&&(d=T[h]),d!==null)for(f in s)v=e[Pa(f)],v[h]=h==="range"?d.slice():d,h==="rangebreaks"&&(v._hasDayOfWeekBreaks=g,NE(v,e))}}};function OE(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]||{},u=e._id,v=u.charAt(0)==="x";e._matchGroup=null,e._constraintGroup=null;function h(z,N){return ln.coerce(t,e,FE,z,N)}h("constrain",n?"domain":"range"),ln.coerce(t,e,{constraintoward:{valType:"enumerated",values:v?["left","center","right"]:["bottom","middle","top"],dflt:v?"center":"middle"}},"constraintoward");var d=e.type,p,m,y=[];for(p=0;p<a.length;p++)if(m=a[p],m!==u){var b=i[Pa(m)];b.type===d&&y.push(m)}var _=JT(o,u);if(_){var g=[];for(p=0;p<y.length;p++)m=y[p],_[m]||g.push(m);y=g}var x=y.length,w,T;x&&(t.matches||c.matches)&&(w=ln.coerce(t,e,{matches:{valType:"enumerated",values:y,dflt:y.indexOf(c.matches)!==-1?c.matches:void 0}},"matches"));var A=n&&!v?e.anchor:void 0;if(x&&!w&&(t.scaleanchor||A)&&(T=ln.coerce(t,e,{scaleanchor:{valType:"enumerated",values:y.concat([!1])}},"scaleanchor",A)),w){e._matchGroup=pv(l,u,w,1);var M=i[Pa(w)],S=Wg(i,e)/Wg(i,M);v!==(w.charAt(0)==="x")&&(S=(v?"x":"y")+S),pv(o,u,w,S)}else t.matches&&a.indexOf(t.matches)!==-1&&ln.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(T){var L=h("scaleratio");L||(L=e.scaleratio=1),pv(o,u,T,L)}else t.scaleanchor&&a.indexOf(t.scaleanchor)!==-1&&ln.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 Wg(t,e){var r=e.domain;return r||(r=t[Pa(e.overlaying)].domain),r[1]-r[0]}function JT(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function pv(t,e,r,a){var i,n,o,l,s,f=JT(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 u=o[r];for(n=0;n<c.length;n++)l=c[n],o[l]=mv(u,mv(a,f[l]));t.splice(s,1);return}if(a!==1)for(n=0;n<c.length;n++){var v=c[n];f[v]=mv(a,f[v])}f[r]=1}function mv(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 jE(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 u=f.charAt(0)==="y"?a:1/a,v=0;v<c;v++)s*=u}i[l]=s}return i}pi.enforce=function(e){var r=e._fullLayout,a=r._axisConstraintGroups||[],i,n,o,l,s,f,c,u;for(i=0;i<a.length;i++){o=jE(a[i],r);var v=Object.keys(o),h=1/0,d=0,p=1/0,m={},y={},b=!1;for(n=0;n<v.length;n++)l=v[n],y[l]=s=r[Pa(l)],s._inputDomain?s.domain=s._inputDomain.slice():s._inputDomain=s.domain.slice(),s._inputRange||(s._inputRange=s.range.slice()),s.setScale(),m[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"&&(b=!0);if(!(h>$E*d&&!b)){for(n=0;n<v.length;n++)if(l=v[n],f=m[l],s=y[l],c=s.constrain,f!==p||c==="domain")if(u=f/p,c==="range")Vg(s,u);else{var _=s._inputDomain,g=(s.domain[1]-s.domain[0])/(_[1]-_[0]),x=(s.r2l(s.range[1])-s.r2l(s.range[0]))/(s.r2l(s._inputRange[1])-s.r2l(s._inputRange[0]));if(u/=g,u*x<1){s.domain=s._input.domain=_.slice(),Vg(s,u);continue}if(x<1&&(s.range=s._input.range=s._inputRange.slice(),u*=x),s.autorange){var w=s.r2l(s.range[0]),T=s.r2l(s.range[1]),A=(w+T)/2,M=A,S=A,L=Math.abs(T-A),z=A-L*u*1.0001,N=A+L*u*1.0001,$=hv.makePadFn(r,s,0),R=hv.makePadFn(r,s,1);Xg(s,u);var H=Math.abs(s._m),D=hv.concatExtremes(e,s),P=D.min,k=D.max,C,E;for(E=0;E<P.length;E++)C=P[E].val-$(P[E])/H,C>z&&C<M&&(M=C);for(E=0;E<k.length;E++)C=k[E].val+R(k[E])/H,C<N&&C>S&&(S=C);var I=(S-M)/(2*L);u/=I,M=s.l2r(M),S=s.l2r(S),s.range=s._input.range=w<T?[M,S]:[S,M]}Xg(s,u)}}}};pi.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};pi.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=HE[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=bt,r=ot,a=hr,i=ke,n=Tr,o=xp,l=yt,s=zt,f=Kc,c=KT,u=Ot,v=Vr,h=pi,d=h.enforce,p=h.clean,m=_s.doAutoRange,y="start",b="middle",_="end",g=Ir.zindexSeparator;t.layoutStyles=function(k){return i.syncOrAsync([a.doAutoMargin,w],k)};function x(k,C,E){for(var I=0;I<E.length;I++){var j=E[I][0],G=E[I][1];if(!(j[0]>=k[1]||j[1]<=k[0])&&G[0]<C[1]&&G[1]>C[0])return!0}return!1}function w(k){var C=k._fullLayout,E=C._size,I=E.p,j=u.list(k,"",!0),G,X,O,Z,V,q;if(C._paperdiv.style({width:k._context.responsive&&C.autosize&&!k._context._hasZeroWidth&&!k.layout.width?"100%":C.width+"px",height:k._context.responsive&&C.autosize&&!k._context._hasZeroHeight&&!k.layout.height?"100%":C.height+"px"}).selectAll(".main-svg").call(s.setSize,C.width,C.height),k._context.setBackground(k,C.paper_bgcolor),t.drawMainTitle(k),c.manage(k),!C._has("cartesian"))return a.previousPromises(k);function B(We,F,U){var W=We._lw/2;if(We._id.charAt(0)==="x"){if(F){if(U==="top")return F._offset-I-W}else return E.t+E.h*(1-(We.position||0))+W%1;return F._offset+F._length+I+W}if(F){if(U==="right")return F._offset+F._length+I+W}else return E.l+E.w*(We.position||0)+W%1;return F._offset-I-W}for(G=0;G<j.length;G++){Z=j[G];var J=Z._anchorAxis;Z._linepositions={},Z._lw=s.crispRound(k,Z.linewidth,1),Z._mainLinePosition=B(Z,J,Z.side),Z._mainMirrorPosition=Z.mirror&&J?B(Z,J,v.OPPOSITE_SIDE[Z.side]):null}var ie=[],de=[],oe=[],Y=l.opacity(C.paper_bgcolor)===1&&l.opacity(C.plot_bgcolor)===1&&C.paper_bgcolor===C.plot_bgcolor;for(X in C._plots)if(O=C._plots[X],O.mainplot)O.bg&&O.bg.remove(),O.bg=void 0;else{var ee=O.xaxis.domain,le=O.yaxis.domain,ue=O.plotgroup;if(x(ee,le,oe)&&X.indexOf(g)===-1){var me=ue.node(),pe=O.bg=i.ensureSingle(ue,"rect","bg");me.insertBefore(pe.node(),me.childNodes[0]),de.push(X)}else ue.select("rect.bg").remove(),oe.push([ee,le]),Y||(ie.push(X),de.push(X))}var se=C._bgLayer.selectAll(".bg").data(ie);for(se.enter().append("rect").classed("bg",!0),se.exit().remove(),se.each(function(We){C._plots[We].bg=e.select(this)}),G=0;G<de.length;G++)O=C._plots[de[G]],V=O.xaxis,q=O.yaxis,O.bg&&V._offset!==void 0&&q._offset!==void 0&&O.bg.call(s.setRect,V._offset-I,q._offset-I,V._length+2*I,q._length+2*I).call(l.fill,C.plot_bgcolor).style("stroke-width",0);if(!C._hasOnlyLargeSploms)for(X in C._plots){O=C._plots[X],V=O.xaxis,q=O.yaxis;var be=O.clipId="clip"+C._uid+X+"plot",Le=i.ensureSingleById(C._clips,"clipPath",be,function(We){We.classed("plotclip",!0).append("rect")});O.clipRect=Le.select("rect").attr({width:V._length,height:q._length}),s.setTranslate(O.plot,V._offset,q._offset);var ve,Te;O._hasClipOnAxisFalse?(ve=null,Te=be):(ve=be,Te=null),s.setClipUrl(O.plot,ve,k),O.layerClipId=Te}var we,Q,xe,ae,ge,Ae,ce,De,Se,Me,He,Fe,Oe;function Ge(We){return"M"+we+","+We+"H"+Q}function Ze(We){return"M"+V._offset+","+We+"h"+V._length}function ye(We){return"M"+We+","+De+"V"+ce}function Ve(We){return q._shift!==void 0&&(We+=q._shift),"M"+We+","+q._offset+"v"+q._length}function Xe(We,F,U){if(!We.showline||X!==We._mainSubplot)return"";if(!We._anchorAxis)return U(We._mainLinePosition);var W=F(We._mainLinePosition);return We.mirror&&(W+=F(We._mainMirrorPosition)),W}for(X in C._plots){O=C._plots[X],V=O.xaxis,q=O.yaxis;var Ie="M0,0";T(V,X)&&(ge=M(V,"left",q,j),we=V._offset-(ge?I+ge:0),Ae=M(V,"right",q,j),Q=V._offset+V._length+(Ae?I+Ae:0),xe=B(V,q,"bottom"),ae=B(V,q,"top"),Oe=!V._anchorAxis||X!==V._mainSubplot,Oe&&(V.mirror==="allticks"||V.mirror==="all")&&(V._linepositions[X]=[xe,ae]),Ie=Xe(V,Ge,Ze),Oe&&V.showline&&(V.mirror==="all"||V.mirror==="allticks")&&(Ie+=Ge(xe)+Ge(ae)),O.xlines.style("stroke-width",V._lw+"px").call(l.stroke,V.showline?V.linecolor:"rgba(0,0,0,0)")),O.xlines.attr("d",Ie);var tt="M0,0";T(q,X)&&(He=M(q,"bottom",V,j),ce=q._offset+q._length+(He?I:0),Fe=M(q,"top",V,j),De=q._offset-(Fe?I:0),Se=B(q,V,"left"),Me=B(q,V,"right"),Oe=!q._anchorAxis||X!==q._mainSubplot,Oe&&(q.mirror==="allticks"||q.mirror==="all")&&(q._linepositions[X]=[Se,Me]),tt=Xe(q,ye,Ve),Oe&&q.showline&&(q.mirror==="all"||q.mirror==="allticks")&&(tt+=ye(Se)+ye(Me)),O.ylines.style("stroke-width",q._lw+"px").call(l.stroke,q.showline?q.linecolor:"rgba(0,0,0,0)")),O.ylines.attr("d",tt)}return u.makeClipPaths(k),a.previousPromises(k)}function T(k,C){return(k.ticks||k.showline)&&(C===k._mainSubplot||k.mirror==="all"||k.mirror==="allticks")}function A(k,C,E){if(!E.showline||!E._lw)return!1;if(E.mirror==="all"||E.mirror==="allticks")return!0;var I=E._anchorAxis;if(!I)return!1;var j=v.FROM_BL[C];return E.side===C?I.domain[j]===k.domain[j]:E.mirror&&I.domain[1-j]===k.domain[1-j]}function M(k,C,E,I){if(A(k,C,E))return E._lw;for(var j=0;j<I.length;j++){var G=I[j];if(G._mainAxis===E._mainAxis&&A(k,C,G))return G._lw}return 0}t.drawMainTitle=function(k){var C=k._fullLayout.title,E=k._fullLayout,I=D(E),j=P(E),G=R(E,j),X=$(E,I);if(f.draw(k,"gtitle",{propContainer:E,propName:"title.text",subtitlePropName:"title.subtitle.text",placeholder:E._dfltTitle.plot,subtitlePlaceholder:E._dfltTitle.subtitle,attributes:{x:X,y:G,"text-anchor":I,dy:j}}),C.text&&C.automargin){var O=e.selectAll(".gtitle"),Z=s.bBox(e.selectAll(".g-gtitle").node()).height,V=z(k,C,Z);if(V>0){N(k,G,V,Z),O.attr({x:X,y:G,"text-anchor":I,dy:H(C.yanchor)}).call(n.positionText,X,G);var q=(C.text.match(n.BR_TAG_ALL)||[]).length;if(q){var B=v.LINE_SPACING*q+v.MID_SHIFT;C.y===0&&(B=-B),O.selectAll(".line").each(function(){var Y=+this.getAttribute("dy").slice(0,-2)-B+"em";this.setAttribute("dy",Y)})}var J=e.selectAll(".gtitle-subtitle");if(J.node()){var ie=O.node().getBBox(),de=ie.y+ie.height,oe=de+f.SUBTITLE_PADDING_EM*C.subtitle.font.size;J.attr({x:X,y:oe,"text-anchor":I,dy:H(C.yanchor)}).call(n.positionText,X,oe)}}}};function S(k,C,E,I,j){var G=C.yref==="paper"?k._fullLayout._size.h:k._fullLayout.height,X=i.isTopAnchor(C)?I:I-j,O=E==="b"?G-X:X;return i.isTopAnchor(C)&&E==="t"||i.isBottomAnchor(C)&&E==="b"?!1:O<j}function L(k,C,E,I,j){var G=0;return E==="middle"&&(G+=j/2),k==="t"?(E==="top"&&(G+=j),G+=I-C*I):(E==="bottom"&&(G+=j),G+=C*I),G}function z(k,C,E){var I=C.y,j=C.yanchor,G=I>.5?"t":"b",X=k._fullLayout.margin[G],O=0;return C.yref==="paper"?O=E+C.pad.t+C.pad.b:C.yref==="container"&&(O=L(G,I,j,k._fullLayout.height,E)+C.pad.t+C.pad.b),O>X?O:0}function N(k,C,E,I){var j="title.automargin",G=k._fullLayout.title,X=G.y>.5?"t":"b",O={x:G.x,y:G.y,t:0,b:0},Z={};G.yref==="paper"&&S(k,G,X,C,I)?O[X]=E:G.yref==="container"&&(Z[X]=E,k._fullLayout._reservedMargin[j]=Z),a.allowAutoMargin(k,j),a.autoMargin(k,j,O)}function $(k,C){var E=k.title,I=k._size,j=0;switch(C===y?j=E.pad.l:C===_&&(j=-E.pad.r),E.xref){case"paper":return I.l+I.w*E.x+j;case"container":default:return k.width*E.x+j}}function R(k,C){var E=k.title,I=k._size,j=0;if(C==="0em"||!C?j=-E.pad.b:C===v.CAP_SHIFT+"em"&&(j=E.pad.t),E.y==="auto")return I.t/2;switch(E.yref){case"paper":return I.t+I.h-I.h*E.y+j;case"container":default:return k.height-k.height*E.y+j}}function H(k){return k==="top"?v.CAP_SHIFT+.3+"em":k==="bottom"?"-0.3em":v.MID_SHIFT+"em"}function D(k){var C=k.title,E=b;return i.isRightAnchor(C)?E=_:i.isLeftAnchor(C)&&(E=y),E}function P(k){var C=k.title,E="0em";return i.isTopAnchor(C)?E=v.CAP_SHIFT+"em":i.isMiddleAnchor(C)&&(E=v.MID_SHIFT+"em"),E}t.doTraceStyle=function(k){var C=k.calcdata,E=[],I;for(I=0;I<C.length;I++){var j=C[I],G=j[0]||{},X=G.trace||{},O=X._module||{},Z=O.arraysToCalcdata;Z&&Z(j,X);var V=O.editStyle;V&&E.push({fn:V,cd0:G})}if(E.length){for(I=0;I<E.length;I++){var q=E[I];q.fn(k,q.cd0)}o(k),t.redrawReglTraces(k)}return a.style(k),r.getComponentMethod("legend","draw")(k),a.previousPromises(k)},t.doColorBars=function(k){return r.getComponentMethod("colorbar","draw")(k),a.previousPromises(k)},t.layoutReplot=function(k){var C=k.layout;return k.layout=void 0,r.call("_doPlot",k,"",C)},t.doLegend=function(k){return r.getComponentMethod("legend","draw")(k),a.previousPromises(k)},t.doTicksRelayout=function(k){return u.draw(k,"redraw"),k._fullLayout._hasOnlyLargeSploms&&(r.subplotsRegistry.splom.updateGrid(k),o(k),t.redrawReglTraces(k)),t.drawMainTitle(k),a.previousPromises(k)},t.doModeBar=function(k){var C=k._fullLayout;c.manage(k);for(var E=0;E<C._basePlotModules.length;E++){var I=C._basePlotModules[E].updateFx;I&&I(k)}return a.previousPromises(k)},t.doCamera=function(k){for(var C=k._fullLayout,E=C._subplots.gl3d,I=0;I<E.length;I++){var j=C[E[I]],G=j._scene;G.setViewport(j)}},t.drawData=function(k){var C=k._fullLayout;o(k);for(var E=C._basePlotModules,I=0;I<E.length;I++)E[I].plot(k);return t.redrawReglTraces(k),a.style(k),r.getComponentMethod("selections","draw")(k),r.getComponentMethod("shapes","draw")(k),r.getComponentMethod("annotations","draw")(k),r.getComponentMethod("images","draw")(k),C._replotting=!1,a.previousPromises(k)},t.redrawReglTraces=function(k){var C=k._fullLayout;if(C._has("regl")){var E=k._fullData,I=[],j=[],G,X;for(C._hasOnlyLargeSploms&&C._splomGrid.draw(),G=0;G<E.length;G++){var O=E[G];O.visible===!0&&O._length!==0&&(O.type==="splom"?C._splomScenes[O.uid].draw():O.type==="scattergl"?i.pushUnique(I,O.xaxis+O.yaxis):O.type==="scatterpolargl"&&i.pushUnique(j,O.subplot))}for(G=0;G<I.length;G++)X=C._plots[I[G]],X._scene&&X._scene.draw();for(G=0;G<j.length;G++)X=C[j[G]]._subplot,X._scene&&X._scene.draw()}},t.doAutoRangeAndConstraints=function(k){for(var C=u.list(k,"",!0),E,I={},j=0;j<C.length;j++)if(E=C[j],!I[E._id]){I[E._id]=1,p(k,E),m(k,E);var G=E._matchGroup;if(G)for(var X in G){var O=u.getFromId(k,X);m(k,O,E.range),I[X]=1}}d(k)},t.finalDraw=function(k){r.getComponentMethod("rangeslider","draw")(k),r.getComponentMethod("rangeselector","draw")(k)},t.drawMarginPushers=function(k){r.getComponentMethod("legend","draw")(k),r.getComponentMethod("rangeselector","draw")(k),r.getComponentMethod("sliders","draw")(k),r.getComponentMethod("updatemenus","draw")(k),r.getComponentMethod("colorbar","draw")(k)}})(iu);var BE=Gi.readPaths,GE=Sp,e2=Rn.clearOutlineControllers,yv=yt,t2=zt,UE=Ht.arrayEditor,r2=Ui,VE=r2.getPathString,a2={draw:uu,drawOne:i2,activateLastSelection:YE};function uu(t){var e=t._fullLayout;e2(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++)i2(t,i)}function vu(t){return t._context.editSelection}function i2(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+e+'"]').remove();var r=r2.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input)return;n(t._fullLayout._selectionLayer);function n(o){var l=VE(t,a),s={"data-index":e,"fill-rule":"evenodd",d:l},f=a.opacity,c="rgba(0,0,0,0)",u=a.line.color||yv.contrast(t._fullLayout.plot_bgcolor),v=a.line.width,h=a.line.dash;v||(v=5,h="solid");var d=vu(t)&&t._fullLayout._activeSelectionIndex===e;d&&(c=t._fullLayout.activeselection.fillcolor,f=t._fullLayout.activeselection.opacity);for(var p=[],m=1;m>=0;m--){var y=o.append("path").attr(s).style("opacity",m?.1:f).call(yv.stroke,u).call(yv.fill,c).call(t2.dashLine,m?"solid":h,m?4+v:v);if(WE(y,t,a),d){var b=UE(t.layout,"selections",a);y.style({cursor:"move"});var _={element:y.node(),plotinfo:i,gd:t,editHelpers:b,isActiveSelection:!0},g=BE(l,t);GE(g,y,_)}else y.style("pointer-events",m?"all":"none");p[m]=y}var x=p[0],w=p[1];w.node().addEventListener("click",function(){return XE(t,x)})}}function WE(t,e,r){var a=r.xref+r.yref;t2.setClipUrl(t,"clip"+e._fullLayout._uid+a,e)}function XE(t,e){if(vu(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeSelectionIndex){lh(t);return}t._fullLayout._activeSelectionIndex=a,t._fullLayout._deactivateSelection=lh,uu(t)}}}function YE(t){if(vu(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=lh,uu(t)}}function lh(t){if(vu(t)){var e=t._fullLayout._activeSelectionIndex;e>=0&&(e2(t),delete t._fullLayout._activeSelectionIndex,uu(t))}}var n2={exports:{}},gv=Hc.dot,tf=cr.BADNUM,mc=n2.exports={};mc.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 m=d[0],y=d[1];return!(m===tf||m<a||m>i||y===tf||y<n||y>o||p&&f(d))}function u(d,p){var m=d[0],y=d[1];if(m===tf||m<a||m>i||y===tf||y<n||y>o)return!1;var b=r.length,_=r[0][0],g=r[0][1],x=0,w,T,A,M,S;for(w=1;w<b;w++)if(T=_,A=g,_=r[w][0],g=r[w][1],M=Math.min(T,_),!(m<M||m>Math.max(T,_)||y>Math.max(A,g)))if(y<Math.min(A,g))m!==M&&x++;else{if(_===T?S=y:S=A+(m-T)*(g-A)/(_-T),y===S)return!(w===1&&p);y<=S&&m!==M&&x++}return x%2===1}var v=!0,h=r[0];for(l=1;l<r.length;l++)if(h[0]!==r[l][0]||h[1]!==r[l][1]){v=!1;break}return{xmin:a,xmax:i,ymin:n,ymax:o,pts:r,contains:s?c:u,isRect:s,degenerate:v}};mc.isSegmentBent=function(e,r,a,i){var n=e[r],o=[e[a][0]-n[0],e[a][1]-n[1]],l=gv(o,o),s=Math.sqrt(l),f=[-o[1]/s,o[0]/s],c,u,v;for(c=r+1;c<a;c++)if(u=[e[c][0]-n[0],e[c][1]-n[1]],v=gv(u,o),v<0||v>l||Math.abs(gv(u,f))>i)return!0;return!1};mc.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 u=c+1;u<e.length;u++)(u===e.length-1||mc.isSegmentBent(e,c,u+1,r))&&(a.push(e[u]),a.length<f-2&&(i=u,n=a.length-1),c=u)}if(e.length>1){var l=e.pop();o(l)}return{addPt:o,raw:e,filtered:a}};var o2=n2.exports,qE={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"},Yg=mM,ZE=yM,es=ot,KE=zt.dashStyle,dl=yt,QE=Na,JE=wa.makeEventData,ws=Nn,ez=ws.freeMode,tz=ws.rectMode,ts=ws.drawMode,Rp=ws.openMode,Ip=ws.selectMode,qg=Ui,Zg=ou,l2=Sp,s2=Rn.clearOutline,f2=Gi,bv=f2.handleEllipse,rz=f2.readPaths,az=kp.newShapes,iz=AT,nz=a2.activateLastSelection,Of=ke,oz=Of.sorterAsc,c2=o2,hl=Vc,ya=lr.getFromId,lz=xp,sz=iu.redrawReglTraces,jf=qE,Wa=jf.MINSELECT,fz=c2.filter,Fp=c2.tester,Np=Tp,Kg=Np.p2r,cz=Np.axValue,uz=Np.getTransform;function $p(t){return t.subplot!==void 0}function vz(t,e,r,a,i){var n=!$p(a),o=ez(i),l=tz(i),s=Rp(i),f=ts(i),c=Ip(i),u=i==="drawline",v=i==="drawcircle",h=u||v,d=a.gd,p=d._fullLayout,m=c&&p.newselection.mode==="immediate"&&n,y=p._zoomlayer,b=a.element.getBoundingClientRect(),_=a.plotinfo,g=uz(_),x=e-b.left,w=r-b.top;p._calcInverseTransform(d);var T=Of.apply3DTransform(p._invTransform)(x,w);x=T[0],w=T[1];var A=p._invScaleX,M=p._invScaleY,S=x,L=w,z="M"+x+","+w,N=a.xaxes[0],$=a.yaxes[0],R=N._length,H=$._length,D=t.altKey&&!(ts(i)&&s),P,k,C,E,I,j,G;v2(t,d,a),o&&(P=fz([[x,w]],jf.BENDPX));var X=y.selectAll("path.select-outline-"+_.id).data([1]),O=f?p.newshape:p.newselection;f&&(a.hasText=O.label.text||O.label.texttemplate);var Z=f&&!s?O.fillcolor:"rgba(0,0,0,0)",V=O.line.color||(n?dl.contrast(d._fullLayout.plot_bgcolor):"#7f7f7f");X.enter().append("path").attr("class","select-outline select-outline-"+_.id).style({opacity:f?O.opacity/2:1,"stroke-dasharray":KE(O.line.dash,O.line.width),"stroke-width":O.line.width+"px","shape-rendering":"crispEdges"}).call(dl.stroke,V).call(dl.fill,Z).attr("fill-rule","evenodd").classed("cursor-move",!!f).attr("transform",g).attr("d",z+"Z");var q=y.append("path").attr("class","zoombox-corners").style({fill:dl.background,stroke:dl.defaultLine,"stroke-width":1}).attr("transform",g).attr("d","M0,0Z");if(f&&a.hasText){var B=y.select(".label-temp");B.empty()&&(B=y.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var J=p._uid+jf.SELECTID,ie=[],de=du(d,a.xaxes,a.yaxes,a.subplot);m&&!t.shiftKey&&(a._clearSubplotSelections=function(){if(n){var Y=N._id,ee=$._id;y2(d,Y,ee,de);for(var le=(d.layout||{}).selections||[],ue=[],me=!1,pe=0;pe<le.length;pe++){var se=p.selections[pe];!se||se.xref!==Y||se.yref!==ee?ue.push(le[pe]):me=!0}me&&(d._fullLayout._noEmitSelectedAtStart=!0,es.call("_guiRelayout",d,{selections:ue}))}});var oe=Mz(a);a.moveFn=function(Y,ee){a._clearSubplotSelections&&(a._clearSubplotSelections(),a._clearSubplotSelections=void 0),S=Math.max(0,Math.min(R,A*Y+x)),L=Math.max(0,Math.min(H,M*ee+w));var le=Math.abs(S-x),ue=Math.abs(L-w);if(l){var me,pe,se;if(c){var be=p.selectdirection;switch(be==="any"?ue<Math.min(le*.6,Wa)?me="h":le<Math.min(ue*.6,Wa)?me="v":me="d":me=be,me){case"h":pe=v?H/2:0,se=H;break;case"v":pe=v?R/2:0,se=R;break}}if(f)switch(p.newshape.drawdirection){case"vertical":me="h",pe=v?H/2:0,se=H;break;case"horizontal":me="v",pe=v?R/2:0,se=R;break;case"ortho":le<ue?(me="h",pe=w,se=L):(me="v",pe=x,se=S);break;default:me="d"}me==="h"?(E=h?bv(v,[S,pe],[S,se]):[[x,pe],[x,se],[S,se],[S,pe]],E.xmin=h?S:Math.min(x,S),E.xmax=h?S:Math.max(x,S),E.ymin=Math.min(pe,se),E.ymax=Math.max(pe,se),q.attr("d","M"+E.xmin+","+(w-Wa)+"h-4v"+2*Wa+"h4ZM"+(E.xmax-1)+","+(w-Wa)+"h4v"+2*Wa+"h-4Z")):me==="v"?(E=h?bv(v,[pe,L],[se,L]):[[pe,w],[pe,L],[se,L],[se,w]],E.xmin=Math.min(pe,se),E.xmax=Math.max(pe,se),E.ymin=h?L:Math.min(w,L),E.ymax=h?L:Math.max(w,L),q.attr("d","M"+(x-Wa)+","+E.ymin+"v-4h"+2*Wa+"v4ZM"+(x-Wa)+","+(E.ymax-1)+"v4h"+2*Wa+"v-4Z")):me==="d"&&(E=h?bv(v,[x,w],[S,L]):[[x,w],[x,L],[S,L],[S,w]],E.xmin=Math.min(x,S),E.xmax=Math.max(x,S),E.ymin=Math.min(w,L),E.ymax=Math.max(w,L),q.attr("d","M0,0Z"))}else o&&(P.addPt([S,L]),E=P.filtered);if(a.selectionDefs&&a.selectionDefs.length?(C=d2(a.mergedPolygons,E,D),E.subtract=D,k=Hp(a.selectionDefs.concat([E]))):(C=[E],k=Fp(E)),l2(p2(C,s),X,a),c){var Le=sh(d,!1),ve=Le.eventData?Le.eventData.points.slice():[];Le=sh(d,!1,k,de,a),k=Le.selectionTesters,G=Le.eventData;var Te;P?Te=P.filtered:Te=g2(C),hl.throttle(J,jf.SELECTDELAY,function(){ie=m2(k,de);for(var we=ie.slice(),Q=0;Q<ve.length;Q++){for(var xe=ve[Q],ae=!1,ge=0;ge<we.length;ge++)if(we[ge].curveNumber===xe.curveNumber&&we[ge].pointNumber===xe.pointNumber){ae=!0;break}ae||we.push(xe)}we.length&&(G||(G={}),G.points=we),oe(G,Te),Sz(d,G)})}},a.clickFn=function(Y,ee){if(q.remove(),d._fullLayout._activeShapeIndex>=0){d._fullLayout._deactivateShape(d);return}if(!f){var le=p.clickmode;hl.done(J).then(function(){if(hl.clear(J),Y===2){for(X.remove(),I=0;I<de.length;I++)j=de[I],j._module.selectPoints(j,!1);if(as(d,de),rs(a),jp(d),de.length){var ue=de[0].xaxis,me=de[0].yaxis;if(ue&&me){for(var pe=[],se=d._fullLayout.selections,be=0;be<se.length;be++){var Le=se[be];Le&&(Le.xref!==ue._id||Le.yref!==me._id)&&pe.push(Le)}pe.length<se.length&&(d._fullLayout._noEmitSelectedAtStart=!0,es.call("_guiRelayout",d,{selections:pe}))}}}else le.indexOf("select")>-1&&u2(ee,d,a.xaxes,a.yaxes,a.subplot,a,X),le==="event"&&is(d,void 0);QE.click(d,ee,_.id)}).catch(Of.error)}},a.doneFn=function(){q.remove(),hl.done(J).then(function(){hl.clear(J),!m&&E&&a.selectionDefs&&(E.subtract=D,a.selectionDefs.push(E),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,C)),(m||f)&&rs(a,m),a.doneFnCompleted&&a.doneFnCompleted(ie),c&&is(d,G)}).catch(Of.error)}}function u2(t,e,r,a,i,n,o){var l=e._hoverdata,s=e._fullLayout,f=s.clickmode,c=f.indexOf("event")>-1,u=[],v,h,d,p,m,y,b,_,g,x;if(yz(l)){v2(t,e,n),v=du(e,r,a,i);var w=gz(l,v),T=w.pointNumbers.length>0;if(T?bz(v,w):xz(v)&&(b=Jg(w))){for(o&&o.remove(),x=0;x<v.length;x++)h=v[x],h._module.selectPoints(h,!1);as(e,v),rs(n),c&&jp(e)}else{_=t.shiftKey&&(b!==void 0?b:Jg(w)),d=dz(w.pointNumber,w.searchInfo,_);var A=n.selectionDefs.concat([d]);for(p=Hp(A),x=0;x<v.length;x++)if(m=v[x]._module.selectPoints(v[x],p),y=h2(m,v[x]),u.length)for(var M=0;M<y.length;M++)u.push(y[M]);else u=y;if(g={points:u},as(e,v,g),d&&n&&n.selectionDefs.push(d),o){var S=n.mergedPolygons,L=Rp(n.dragmode);l2(p2(S,L),o,n)}c&&is(e,g)}}}function dz(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}function xv(t){return"pointNumber"in t&&"searchInfo"in t}function hz(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,a,i){var n=t.searchInfo.cd[0].trace.index,o=i.cd[0].trace.index;return o===n&&a===t.pointNumber},isRect:!1,degenerate:!1,subtract:!!t.subtract}}function Hp(t){if(!t.length)return;for(var e=[],r=xv(t[0])?0:t[0][0][0],a=r,i=xv(t[0])?0:t[0][0][1],n=i,o=0;o<t.length;o++)if(xv(t[o]))e.push(hz(t[o]));else{var l=Fp(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,u,v){for(var h=!1,d=0;d<e.length;d++)e[d].contains(f,c,u,v)&&(h=!e[d].subtract);return h}return{xmin:r,xmax:a,ymin:i,ymax:n,pts:[],contains:s,isRect:!1,degenerate:!1}}function v2(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)&&!(ts(n)&&Rp(n));o&&l&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!l||!i.selection)&&rs(r),o||(s2(e),a._lastSelectedSubplot=i.id)}function pz(t){return t._fullLayout._activeShapeIndex>=0}function mz(t){return t._fullLayout._activeSelectionIndex>=0}function rs(t,e){var r=t.dragmode,a=t.plotinfo,i=t.gd;pz(i)&&i._fullLayout._deactivateShape(i),mz(i)&&i._fullLayout._deactivateSelection(i);var n=i._fullLayout,o=n._zoomlayer,l=ts(r),s=Ip(r);if(l||s){var f=o.selectAll(".select-outline-"+a.id);if(f&&i._fullLayout._outlining){var c;l&&(c=az(f,t)),c&&es.call("_guiRelayout",i,{shapes:c});var u;s&&!$p(t)&&(u=iz(f,t)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,es.call("_guiRelayout",i,{selections:u}).then(function(){e&&nz(i)})),i._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=t.selectionDefs=[],a.selection.mergedPolygons=t.mergedPolygons=[]}function Qg(t){return t._id}function du(t,e,r,a){if(!t.calcdata)return[];var i=[],n=e.map(Qg),o=r.map(Qg),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($p({subplot:a})&&(s.subplot===a||s.geo===a))i.push(rf(s._module,l,e[0],r[0]));else if(s.type==="splom"){if(s._xaxes[n[0]]&&s._yaxes[o[0]]){var c=rf(s._module,l,e[0],r[0]);c.scene=t._fullLayout._splomScenes[s.uid],i.push(c)}}else if(s.type==="sankey"){var u=rf(s._module,l,e[0],r[0]);i.push(u)}else{if(n.indexOf(s.xaxis)===-1&&(!s._xA||!s._xA.overlaying)||o.indexOf(s.yaxis)===-1&&(!s._yA||!s._yA.overlaying))continue;i.push(rf(s._module,l,ya(t,s.xaxis),ya(t,s.yaxis)))}return i}function rf(t,e,r,a){return{_module:t,cd:e,xaxis:r,yaxis:a}}function yz(t){return t&&Array.isArray(t)&&t[0].hoverOnBox!==!0}function gz(t,e){var r=t[0],a=-1,i=[],n,o;for(o=0;o<e.length;o++)if(n=e[o],r.fullData.index===n.cd[0].trace.index){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 Jg(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 bz(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 xz(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 as(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,u=f.fullData,v=f.pointIndex,h=f.pointIndices;h?([].push.apply(c.selectedpoints,h),o._fullInput!==o&&[].push.apply(u.selectedpoints,h)):(c.selectedpoints.push(v),o._fullInput!==o&&u.selectedpoints.push(v))}}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;_z(t,e)}function _z(t,e){for(var r=!1,a=0;a<e.length;a++){var i=e[a],n=i.cd;es.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&&(lz(t),sz(t))}function d2(t,e,r){for(var a=r?Yg.difference:Yg.union,i=a({regions:t},{regions:[e]}),n=i.regions.reverse(),o=0;o<n.length;o++){var l=n[o];l.subtract=Op(l,n.slice(0,o))}return n}function h2(t,e){if(Array.isArray(t))for(var r=e.cd,a=e.cd[0].trace,i=0;i<t.length;i++)t[i]=JE(t[i],a,r);return t}function p2(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 m2(t,e){for(var r=[],a,i,n=0;n<e.length;n++){var o=e[n];i=o._module.selectPoints(o,t),a=h2(i,o),r=r.concat(a)}return r}function sh(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=[],u=e0(t),v=t._fullLayout;if(o){var h=v._zoomlayer,d=v.dragmode,p=ts(d),m=Ip(d);if(p||m){var y=ya(t,l,"x"),b=ya(t,s,"y");if(y&&b){var _=h.selectAll(".select-outline-"+o.id);if(_&&t._fullLayout._outlining&&_.length){for(var g=_[0][0],x=g.getAttribute("d"),w=rz(x,t,o),T=[],A=0;A<w.length;A++){for(var M=w[A],S=[],L=0;L<M.length;L++)S.push([Si(y,M[L][1]),Si(b,M[L][2])]);S.xref=l,S.yref=s,S.subtract=Op(S,T),T.push(S)}u=u.concat(T)}}}}var z=l&&s?[l+s]:v._subplots.cartesian;wz(t);for(var N={},$=0;$<z.length;$++){var R=z[$],H=R.indexOf("y"),D=R.slice(0,H),P=R.slice(H),k=l&&s?r:void 0;if(k=kz(u,D,P,k),k){var C=a;if(!n){var E=ya(t,D,"x"),I=ya(t,P,"y");C=du(t,[E],[I],R);for(var j=0;j<C.length;j++){var G=C[j],X=G.cd[0],O=X.trace;if(G._module.name==="scattergl"&&!X.t.xpx){var Z=O.x,V=O.y,q=O._length;X.t.xpx=[],X.t.ypx=[];for(var B=0;B<q;B++)X.t.xpx[B]=E.c2p(Z[B]),X.t.ypx[B]=I.c2p(V[B])}G._module.name==="splom"&&(N[O.uid]||(N[O.uid]=!0))}}var J=m2(k,C);f=f.concat(J),c=c.concat(C)}}var ie={points:f};as(t,c,ie);var de=v.clickmode,oe=de.indexOf("event")>-1&&e;if(!o&&e){var Y=e0(t,!0);if(Y.length){var ee=Y[0].xref,le=Y[0].yref;if(ee&&le){var ue=g2(Y),me=b2([ya(t,ee,"x"),ya(t,le,"y")]);me(ie,ue)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:oe&&is(t,ie),v._reselect=!1}if(!o&&v._deselect){var pe=v._deselect;l=pe.xref,s=pe.yref,Tz(l,s,c)||y2(t,l,s,a),oe&&(ie.points.length?is(t,ie):jp(t)),v._deselect=!1}return{eventData:ie,selectionTesters:r}}function wz(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 Tz(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 y2(t,e,r,a){a=du(t,[ya(t,e,"x")],[ya(t,r,"y")],e+r);for(var i=0;i<a.length;i++){var n=a[i];n._module.selectPoints(n,!1)}as(t,a)}function kz(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=d2(i,o,l),a=Hp(i)}else i=[o],a=Fp(o)}return a}function e0(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=ya(t,s,"x"),u=ya(t,f,"y"),v,h,d,p,m;if(l.type==="rect"){m=[];var y=Si(c,l.x0),b=Si(c,l.x1),_=Si(u,l.y0),g=Si(u,l.y1);m=[[y,_],[y,g],[b,g],[b,_]],v=Math.min(y,b),h=Math.max(y,b),d=Math.min(_,g),p=Math.max(_,g),m.xmin=v,m.xmax=h,m.ymin=d,m.ymax=p,m.xref=s,m.yref=f,m.subtract=!1,m.isRect=!0,r.push(m)}else if(l.type==="path")for(var x=l.path.split("Z"),w=[],T=0;T<x.length;T++){var A=x[T];if(A){A+="Z";var M=qg.extractPathCoords(A,Zg.paramIsX,"raw"),S=qg.extractPathCoords(A,Zg.paramIsY,"raw");v=1/0,h=-1/0,d=1/0,p=-1/0,m=[];for(var L=0;L<M.length;L++){var z=Si(c,M[L]),N=Si(u,S[L]);m.push([z,N]),v=Math.min(z,v),h=Math.max(z,h),d=Math.min(N,d),p=Math.max(N,p)}m.xmin=v,m.xmax=h,m.ymin=d,m.ymax=p,m.xref=s,m.yref=f,m.subtract=Op(m,w),w.push(m),r.push(m)}}}}return r}function Op(t,e){for(var r=!1,a=0;a<e.length;a++)for(var i=e[a],n=0;n<t.length;n++)if(ZE(t[n],i)){r=!r;break}return r}function Si(t,e){return t.type==="date"&&(e=e.replace("_"," ")),t.type==="log"?t.c2p(e):t.r2p(e,null,t.calendar)}function g2(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 Az(r)}function Az(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 b2(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(oz))}else i||(i={}),i[l]=r.map(cz(o))}a&&(e.range=a),i&&(e.lassoPoints=i)}}function Mz(t){var e=t.plotinfo;return e.fillRangeItems||b2(t.xaxes.concat(t.yaxes))}function Sz(t,e){t.emit("plotly_selecting",e)}function is(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function jp(t){t.emit("plotly_deselect",null)}var Lz={reselect:sh,prepSelect:vz,clearOutline:s2,clearSelectionsCache:rs,selectOnClick:u2},x2=[{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}],hu={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(" ")}},t0=x2,r0=Mr,af=Ir,Cz=Ht.templatedArray,nf=hu;function a0(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 i0(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 Ts=Cz("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>`, `<s>`, `<u>`, and `<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:r0({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:t0.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:t0.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:[i0("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[i0("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",af.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",nf.axisRefDescription("x","left","right"),a0("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",af.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",nf.axisRefDescription("y","bottom","top"),a0("y")].join(" ")},xref:{valType:"enumerated",values:["paper",af.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",nf.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",af.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",nf.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:r0({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"}),pu={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]},_2=function(e){return{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."+(e?" If fillgradient is specified, fillcolor is ignored except for setting the background color of the hover label, if any.":"")].join(" ")}},n0=qo.axisHoverFormat,Dz=Sr.texttemplateAttrs,Pz=Sr.hovertemplateAttrs,o0=In,Ez=Mr,zz=ta.dash,Rz=ta.pattern,Iz=zt,l0=pu,of=Yt.extendFlat,Fz=_2;function s0(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 f0(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 c0(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 Vi={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:s0("x"),yperiod:s0("y"),xperiod0:f0("x0"),yperiod0:f0("y0"),xperiodalignment:c0("x"),yperiodalignment:c0("y"),xhoverformat:n0("x"),yhoverformat:n0("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:Dz({},{}),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 "+l0.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:Pz({},{keys:l0.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:of({},zz,{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:Fz(!0),fillgradient:of({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc",description:["Sets the type/orientation of the color gradient for the fill.","Defaults to *none*."].join(" ")},start:{valType:"number",editType:"calc",description:["Sets the gradient start value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and start from the x-position","given by start. If omitted, the gradient starts at the lowest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},stop:{valType:"number",editType:"calc",description:["Sets the gradient end value.","It is given as the absolute position on the axis determined by","the orientiation. E.g., if orientation is *horizontal*, the","gradient will be horizontal and end at the x-position","given by end. If omitted, the gradient ends at the highest","value of the trace along the respective axis.","Ignored if orientation is *radial*."].join(" ")},colorscale:{valType:"colorscale",editType:"style",description:["Sets the fill gradient colors as a color scale.","The color scale is interpreted as a gradient","applied in the direction specified by *orientation*,","from the lowest to the highest value of the scatter","plot along that axis, or from the center to the most","distant point from it, if orientation is *radial*."].join(" ")},editType:"calc",description:["Sets a fill gradient.","If not specified, the fillcolor is used instead."].join(" ")}),fillpattern:Rz,marker:of({symbol:{valType:"enumerated",values:Iz.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:of({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"},o0("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"},o0("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:Ez({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."}),zorder:{valType:"integer",dflt:0,editType:"plot",description:["Sets the layer on which this trace is displayed, relative to","other SVG traces on the same subplot. SVG traces with higher `zorder`","appear in front of those with lower `zorder`."].join(" ")}},u0=Ts,v0=Vi.line,Nz=ta.dash,lf=Yt.extendFlat,$z=Ja.overrideAll,Hz=Ht.templatedArray,d0=hu,w2=$z(Hz("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:lf({},u0.xref,{description:["Sets the selection's x coordinate axis.",d0.axisRefDescription("x","left","right")].join(" ")}),yref:lf({},u0.yref,{description:["Sets the selection's x coordinate axis.",d0.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:v0.color,width:lf({},v0.width,{min:1,dflt:1}),dash:lf({},Nz,{dflt:"dot"})}}),"arraydraw","from-root"),h0=ke,sf=Ot,Oz=ri,jz=w2,p0=Ui,Bz=function(e,r){Oz(e,r,{name:"selections",handleItemDefaults:Gz});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 Gz(t,e,r){function a(w,T){return h0.coerce(t,e,jz,w,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],u={_fullLayout:r},v,h,d,p=sf.coerceRef(t,e,u,c);if(v=sf.getFromId(u,p),v._selectionIndices.push(e._index),d=p0.rangeToShapePosition(v),h=p0.shapePositionToRange(v),l){var m=c+"0",y=c+"1",b=t[m],_=t[y];t[m]=h(t[m],!0),t[y]=h(t[y],!0),sf.coercePosition(e,u,a,p,m),sf.coercePosition(e,u,a,p,y);var g=e[m],x=e[y];g!==void 0&&x!==void 0&&(e[m]=d(g),e[y]=d(x),t[m]=b,t[y]=_)}}l&&h0.noneOrAll(t,e,["x0","x1","y0","y1"])}var Uz=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")},Vz=ot,m0=ke,y0=lr,mu=function(e){return function(a,i){var n=a[e];if(Array.isArray(n))for(var o=Vz.subplotsRegistry.cartesian,l=o.idRegex,s=i._subplots,f=s.xaxis,c=s.yaxis,u=s.cartesian,v=i._has("cartesian"),h=0;h<n.length;h++){var d=n[h];if(m0.isPlainObject(d)){var p=y0.cleanId(d.xref,"x",!1),m=y0.cleanId(d.yref,"y",!1),y=l.x.test(p),b=l.y.test(m);if(y||b){v||m0.pushUnique(i._basePlotModules,o);var _=!1;y&&f.indexOf(p)===-1&&(f.push(p),_=!0),b&&c.indexOf(m)===-1&&(c.push(m),_=!0),_&&y&&b&&u.push(p+m)}}}}},g0=a2,pl=Lz,Nl={moduleType:"component",name:"selections",layoutAttributes:w2,supplyLayoutDefaults:Bz,supplyDrawNewSelectionDefaults:Uz,includeBasePlot:mu("selections"),draw:g0.draw,drawOne:g0.drawOne,reselect:pl.reselect,prepSelect:pl.prepSelect,clearOutline:pl.clearOutline,clearSelectionsCache:pl.clearSelectionsCache,selectOnClick:pl.selectOnClick},_v,b0;function Wz(){if(b0)return _v;b0=1;var t=bt,e=ke,r=e.numberFormat,a=$a,i=V1,n=ot,o=e.strTranslate,l=Tr,s=yt,f=zt,c=Na,u=Ot,v=Bi,h=ai,d=Nn,p=d.selectingOrDrawing,m=d.freeMode,y=Vr.FROM_TL,b=xp,_=iu.redrawReglTraces,g=hr,x=lr.getFromId,w=Nl.prepSelect,T=Nl.clearOutline,A=Nl.selectOnClick,M=QT,S=Ir,L=S.MINDRAG,z=S.MINZOOM,N=!0;function $(Y,ee,le,ue,me,pe,se,be){var Le=Y._fullLayout._zoomlayer,ve=se+be==="nsew",Te=(se+be).length===1,we,Q,xe,ae,ge,Ae,ce,De,Se,Me,He,Fe,Oe,Ge,Ze,ye,Ve,Xe,Ie,tt,We,F,U;le+=ee.yaxis._shift;function W(){if(we=ee.xaxis,Q=ee.yaxis,Se=we._length,Me=Q._length,ce=we._offset,De=Q._offset,xe={},xe[we._id]=we,ae={},ae[Q._id]=Q,se&&be)for(var Ye=ee.overlays,Ne=0;Ne<Ye.length;Ne++){var nt=Ye[Ne].xaxis;xe[nt._id]=nt;var vt=Ye[Ne].yaxis;ae[vt._id]=vt}ge=oe(xe),Ae=oe(ae),Oe=D(ge,be),Ge=D(Ae,se),Ze=!Ge&&!Oe,Fe=ie(Y,Y._fullLayout._axisMatchGroups,xe,ae),He=ie(Y,Y._fullLayout._axisConstraintGroups,xe,ae,Fe);var et=He.isSubplotConstrained||Fe.isSubplotConstrained;ye=be||et,Ve=se||et;var at=Y._fullLayout;Xe=at._has("scattergl"),Ie=at._has("splom"),tt=at._has("svg")}W();var K=I(Ge+Oe,Y._fullLayout.dragmode,ve),fe=H(ee,se+be+"drag",K,le,ue,me,pe);if(Ze&&!ve)return fe.onmousedown=null,fe.style.pointerEvents="none",fe;var te={element:fe,gd:Y,plotinfo:ee};te.prepFn=function(Ye,Ne,nt){var vt=te.dragmode,et=Y._fullLayout.dragmode;et!==vt&&(te.dragmode=et),W(),F=Y._fullLayout._invScaleX,U=Y._fullLayout._invScaleY,Ze||(ve?Ye.shiftKey?et==="pan"?et="zoom":p(et)||(et="pan"):Ye.ctrlKey&&(et="pan"):et="pan"),m(et)?te.minDrag=1:te.minDrag=void 0,p(et)?(te.xaxes=ge,te.yaxes=Ae,w(Ye,Ne,nt,te,et)):(te.clickFn=Ce,p(vt)&&Ee(),Ze||(et==="zoom"?(te.moveFn=Ke,te.doneFn=wt,te.minDrag=1,ft(Ye,Ne,nt)):et==="pan"&&(te.moveFn=Tt,te.doneFn=Lr))),Y._fullLayout._redrag=function(){var at=Y._dragdata;if(at&&at.element===fe){var ut=Y._fullLayout.dragmode;p(ut)||(W(),ar([0,0,Se,Me]),te.moveFn(at.dx,at.dy))}}};function Ee(){te.plotinfo.selection=!1,T(Y)}function Ce(Ye,Ne){var nt=te.gd;if(nt._fullLayout._activeShapeIndex>=0){nt._fullLayout._deactivateShape(nt);return}var vt=nt._fullLayout.clickmode;if(Z(nt),Ye===2&&!Te&&Ft(),ve)vt.indexOf("select")>-1&&A(Ne,nt,ge,Ae,ee.id,te),vt.indexOf("event")>-1&&c.click(nt,Ne,ee.id);else if(Ye===1&&Te){var et=se?Q:we,at=se==="s"||be==="w"?0:1,ut=et._name+".range["+at+"]",xt=P(et,at),Ct="left",Vt="middle";if(et.fixedrange)return;se?(Vt=se==="n"?"top":"bottom",et.side==="right"&&(Ct="right")):be==="e"&&(Ct="right"),nt._context.showAxisRangeEntryBoxes&&t.select(fe).call(l.makeEditable,{gd:nt,immediate:!0,background:nt._fullLayout.paper_bgcolor,text:String(xt),fill:et.tickfont?et.tickfont.color:"#444",horizontalAlign:Ct,verticalAlign:Vt}).on("edit",function(Gt){var Qt=et.d2r(Gt);Qt!==void 0&&n.call("_guiRelayout",nt,ut,Qt)})}}h.init(te);var he,ne,_e,ze,je,Re,rt,st,Ue,Lt;function ft(Ye,Ne,nt){var vt=fe.getBoundingClientRect();he=Ne-vt.left,ne=nt-vt.top,Y._fullLayout._calcInverseTransform(Y);var et=e.apply3DTransform(Y._fullLayout._invTransform)(he,ne);he=et[0],ne=et[1],_e={l:he,r:he,w:0,t:ne,b:ne,h:0},ze=Y._hmpixcount?Y._hmlumcount/Y._hmpixcount:a(Y._fullLayout.plot_bgcolor).getLuminance(),je="M0,0H"+Se+"V"+Me+"H0V0",Re=!1,rt="xy",Lt=!1,st=j(Le,ze,ce,De,je),Ue=G(Le,ce,De)}function Ke(Ye,Ne){if(Y._transitioningWithDuration)return!1;var nt=Math.max(0,Math.min(Se,F*Ye+he)),vt=Math.max(0,Math.min(Me,U*Ne+ne)),et=Math.abs(nt-he),at=Math.abs(vt-ne);_e.l=Math.min(he,nt),_e.r=Math.max(he,nt),_e.t=Math.min(ne,vt),_e.b=Math.max(ne,vt);function ut(){rt="",_e.r=_e.l,_e.t=_e.b,Ue.attr("d","M0,0Z")}if(He.isSubplotConstrained)et>z||at>z?(rt="xy",et/Se>at/Me?(at=et*Me/Se,ne>vt?_e.t=ne-at:_e.b=ne+at):(et=at*Se/Me,he>nt?_e.l=he-et:_e.r=he+et),Ue.attr("d",J(_e))):ut();else if(Fe.isSubplotConstrained)if(et>z||at>z){rt="xy";var xt=Math.min(_e.l/Se,(Me-_e.b)/Me),Ct=Math.max(_e.r/Se,(Me-_e.t)/Me);_e.l=xt*Se,_e.r=Ct*Se,_e.b=(1-xt)*Me,_e.t=(1-Ct)*Me,Ue.attr("d",J(_e))}else ut();else!Ge||at<Math.min(Math.max(et*.6,L),z)?et<L||!Oe?ut():(_e.t=0,_e.b=Me,rt="x",Ue.attr("d",q(_e,ne))):!Oe||et<Math.min(at*.6,z)?(_e.l=0,_e.r=Se,rt="y",Ue.attr("d",B(_e,he))):(rt="xy",Ue.attr("d",J(_e)));_e.w=_e.r-_e.l,_e.h=_e.b-_e.t,rt&&(Lt=!0),Y._dragged=Lt,X(st,Ue,_e,je,Re,ze),gt(),Y.emit("plotly_relayouting",We),Re=!0}function gt(){We={},(rt==="xy"||rt==="x")&&(k(ge,_e.l/Se,_e.r/Se,We,He.xaxes),Je("x",We)),(rt==="xy"||rt==="y")&&(k(Ae,(Me-_e.b)/Me,(Me-_e.t)/Me,We,He.yaxes),Je("y",We))}function wt(){gt(),Z(Y),Lr(),V(Y)}var lt=[0,0,Se,Me],ct=null,Qe=S.REDRAWDELAY,it=ee.mainplot?Y._fullLayout._plots[ee.mainplot]:ee;function pt(Ye){if(!Y._context._scrollZoom.cartesian&&!Y._fullLayout._enablescrollzoom)return;if(Ee(),Y._transitioningWithDuration){Ye.preventDefault(),Ye.stopPropagation();return}W(),clearTimeout(ct);var Ne=-Ye.deltaY;if(isFinite(Ne)||(Ne=Ye.wheelDelta/10),!isFinite(Ne)){e.log("Did not find wheel motion attributes: ",Ye);return}var nt=Math.exp(-Math.min(Math.max(Ne,-20),20)/200),vt=it.draglayer.select(".nsewdrag").node().getBoundingClientRect(),et=(Ye.clientX-vt.left)/vt.width,at=(vt.bottom-Ye.clientY)/vt.height,ut;function xt(Ct,Vt,Gt){if(Ct.fixedrange)return;var Qt=e.simpleMap(Ct.range,Ct.r2l),Nt=Qt[0]+(Qt[1]-Qt[0])*Vt;function ir(It){return Ct.l2r(Nt+(It-Nt)*Gt)}Ct.range=Qt.map(ir)}if(ye){for(be||(et=.5),ut=0;ut<ge.length;ut++)xt(ge[ut],et,nt);Je("x"),lt[2]*=nt,lt[0]+=lt[2]*et*(1/nt-1)}if(Ve){for(se||(at=.5),ut=0;ut<Ae.length;ut++)xt(Ae[ut],at,nt);Je("y"),lt[3]*=nt,lt[1]+=lt[3]*(1-at)*(1/nt-1)}ar(lt),At(),Y.emit("plotly_relayouting",We),ct=setTimeout(function(){Y._fullLayout&&(lt=[0,0,Se,Me],Lr())},Qe),Ye.preventDefault()}se.length*be.length!==1&&de(fe,pt);function Tt(Ye,Ne){if(Ye=Ye*F,Ne=Ne*U,Y._transitioningWithDuration)return;if(Y._fullLayout._replotting=!0,Oe==="ew"||Ge==="ns"){var nt=Oe?-Ye:0,vt=Ge?-Ne:0;if(Fe.isSubplotConstrained){if(Oe&&Ge){var et=(Ye/Se-Ne/Me)/2;Ye=et*Se,Ne=-et*Me,nt=-Ye,vt=-Ne}Ge?nt=-vt*Se/Me:vt=-nt*Me/Se}Oe&&(C(ge,Ye),Je("x")),Ge&&(C(Ae,Ne),Je("y")),ar([nt,vt,Se,Me]),At(),Y.emit("plotly_relayouting",We);return}function at(ir,It,Ut){for(var zr=1-It,Jt,Wr,gi=0;gi<ir.length;gi++){var Ba=ir[gi];if(!Ba.fixedrange){Jt=Ba,Wr=Ba._rl[zr]+(Ba._rl[It]-Ba._rl[zr])/E(Ut/Ba._length);var Lu=Ba.l2r(Wr);Lu!==!1&&Lu!==void 0&&(Ba.range[It]=Lu)}}return Jt._length*(Jt._rl[It]-Wr)/(Jt._rl[It]-Jt._rl[zr])}var ut=Oe==="w"==(Ge==="n")?1:-1;if(Oe&&Ge&&(He.isSubplotConstrained||Fe.isSubplotConstrained)){var xt=(Ye/Se+ut*Ne/Me)/2;Ye=xt*Se,Ne=ut*xt*Me}var Ct,Vt;if(Oe==="w"?Ye=at(ge,0,Ye):Oe==="e"?Ye=at(ge,1,-Ye):Oe||(Ye=0),Ge==="n"?Ne=at(Ae,1,Ne):Ge==="s"?Ne=at(Ae,0,-Ne):Ge||(Ne=0),Ct=Oe==="w"?Ye:0,Vt=Ge==="n"?Ne:0,He.isSubplotConstrained&&!Fe.isSubplotConstrained||Fe.isSubplotConstrained&&Oe&&Ge&&ut>0){var Gt;if(Fe.isSubplotConstrained||!Oe&&Ge.length===1){for(Gt=0;Gt<ge.length;Gt++)ge[Gt].range=ge[Gt]._r.slice(),M(ge[Gt],1-Ne/Me);Ye=Ne*Se/Me,Ct=Ye/2}if(Fe.isSubplotConstrained||!Ge&&Oe.length===1){for(Gt=0;Gt<Ae.length;Gt++)Ae[Gt].range=Ae[Gt]._r.slice(),M(Ae[Gt],1-Ye/Se);Ne=Ye*Me/Se,Vt=Ne/2}}(!Fe.isSubplotConstrained||!Ge)&&Je("x"),(!Fe.isSubplotConstrained||!Oe)&&Je("y");var Qt=Se-Ye,Nt=Me-Ne;Fe.isSubplotConstrained&&!(Oe&&Ge)&&(Oe?(Vt=Ct?0:Ye*Me/Se,Nt=Qt*Me/Se):(Ct=Vt?0:Ne*Se/Me,Qt=Nt*Se/Me)),ar([Ct,Vt,Qt,Nt]),At(),Y.emit("plotly_relayouting",We)}function Je(Ye,Ne){for(var nt=Fe.isSubplotConstrained?{x:Ae,y:ge}[Ye]:Fe[Ye+"axes"],vt=Fe.isSubplotConstrained?{x:ge,y:Ae}[Ye]:[],et=0;et<nt.length;et++){var at=nt[et],ut=at._id,xt=Fe.xLinks[ut]||Fe.yLinks[ut],Ct=vt[0]||xe[xt]||ae[xt];Ct&&(Ne?(Ne[at._name+".range[0]"]=Ne[Ct._name+".range[0]"],Ne[at._name+".range[1]"]=Ne[Ct._name+".range[1]"]):at.range=Ct.range.slice())}}function At(){var Ye=[],Ne;function nt(ut){for(Ne=0;Ne<ut.length;Ne++)ut[Ne].fixedrange||Ye.push(ut[Ne]._id)}function vt(ut,xt){for(Ne=0;Ne<ut.length;Ne++){var Ct=ut[Ne],Vt=Ct[xt];!Ct.fixedrange&&Vt.tickmode==="sync"&&Ye.push(Vt._id)}}for(ye&&(nt(ge),nt(He.xaxes),nt(Fe.xaxes),vt(ee.overlays,"xaxis")),Ve&&(nt(Ae),nt(He.yaxes),nt(Fe.yaxes),vt(ee.overlays,"yaxis")),We={},Ne=0;Ne<Ye.length;Ne++){var et=Ye[Ne],at=x(Y,et);u.drawOne(Y,at,{skipTitle:!0}),We[at._name+".range[0]"]=at.range[0],We[at._name+".range[1]"]=at.range[1]}u.redrawComponents(Y,Ye)}function Ft(){if(!Y._transitioningWithDuration){var Ye=Y._context.doubleClick,Ne=[];Oe&&(Ne=Ne.concat(ge)),Ge&&(Ne=Ne.concat(Ae)),Fe.xaxes&&(Ne=Ne.concat(Fe.xaxes)),Fe.yaxes&&(Ne=Ne.concat(Fe.yaxes));var nt={},vt,et;if(Ye==="reset+autosize")for(Ye="autosize",et=0;et<Ne.length;et++){vt=Ne[et];var at=vt._rangeInitial0,ut=vt._rangeInitial1,xt=at!==void 0||ut!==void 0;if(xt&&(at!==void 0&&at!==vt.range[0]||ut!==void 0&&ut!==vt.range[1])||!xt&&vt.autorange!==!0){Ye="reset";break}}if(Ye==="autosize")for(et=0;et<Ne.length;et++)vt=Ne[et],vt.fixedrange||(nt[vt._name+".autorange"]=!0);else if(Ye==="reset"){for((Oe||He.isSubplotConstrained)&&(Ne=Ne.concat(He.xaxes)),Ge&&!He.isSubplotConstrained&&(Ne=Ne.concat(He.yaxes)),He.isSubplotConstrained&&(Oe?Ge||(Ne=Ne.concat(Ae)):Ne=Ne.concat(ge)),et=0;et<Ne.length;et++)if(vt=Ne[et],!vt.fixedrange){var Ct=vt._name,Vt=vt._autorangeInitial;vt._rangeInitial0===void 0&&vt._rangeInitial1===void 0?nt[Ct+".autorange"]=!0:vt._rangeInitial0===void 0?(nt[Ct+".autorange"]=Vt,nt[Ct+".range"]=[null,vt._rangeInitial1]):vt._rangeInitial1===void 0?(nt[Ct+".range"]=[vt._rangeInitial0,null],nt[Ct+".autorange"]=Vt):nt[Ct+".range"]=[vt._rangeInitial0,vt._rangeInitial1]}}Y.emit("plotly_doubleclick",null),n.call("_guiRelayout",Y,nt)}}function Lr(){ar([0,0,Se,Me]),e.syncOrAsync([g.previousPromises,function(){Y._fullLayout._replotting=!1,n.call("_guiRelayout",Y,We)}],Y)}function ar(Ye){var Ne=Y._fullLayout,nt=Ne._plots,vt=Ne._subplots.cartesian,et,at,ut,xt;if(Ie&&n.subplotsRegistry.splom.drag(Y),Xe){for(et=0;et<vt.length;et++)if(at=nt[vt[et]],ut=at.xaxis,xt=at.yaxis,at._scene){ut.limitRange&&ut.limitRange(),xt.limitRange&&xt.limitRange();var Ct=e.simpleMap(ut.range,ut.r2l),Vt=e.simpleMap(xt.range,xt.r2l);at._scene.update({range:[Ct[0],Vt[0],Ct[1],Vt[1]]})}}if((Ie||Xe)&&(b(Y),_(Y)),tt){var Gt=Ye[2]/we._length,Qt=Ye[3]/Q._length;for(et=0;et<vt.length;et++){at=nt[vt[et]],ut=at.xaxis,xt=at.yaxis;var Nt=(ye||Fe.isSubplotConstrained)&&!ut.fixedrange&&xe[ut._id],ir=(Ve||Fe.isSubplotConstrained)&&!xt.fixedrange&&ae[xt._id],It,Ut,zr,Jt;if(Nt?(It=Gt,zr=be||Fe.isSubplotConstrained?Ye[0]:ka(ut,It)):Fe.xaHash[ut._id]?(It=Gt,zr=Ye[0]*ut._length/we._length):Fe.yaHash[ut._id]?(It=Qt,zr=Ge==="ns"?-Ye[1]*ut._length/Q._length:ka(ut,It,{n:"top",s:"bottom"}[Ge])):(It=Gr(ut,Gt,Qt),zr=Ur(ut,It)),It>1&&(ut.maxallowed!==void 0&&ye===(ut.range[0]<ut.range[1]?"e":"w")||ut.minallowed!==void 0&&ye===(ut.range[0]<ut.range[1]?"w":"e"))&&(It=1,zr=0),ir?(Ut=Qt,Jt=se||Fe.isSubplotConstrained?Ye[1]:ka(xt,Ut)):Fe.yaHash[xt._id]?(Ut=Qt,Jt=Ye[1]*xt._length/Q._length):Fe.xaHash[xt._id]?(Ut=Gt,Jt=Oe==="ew"?-Ye[0]*xt._length/we._length:ka(xt,Ut,{e:"right",w:"left"}[Oe])):(Ut=Gr(xt,Gt,Qt),Jt=Ur(xt,Ut)),Ut>1&&(xt.maxallowed!==void 0&&Ve===(xt.range[0]<xt.range[1]?"n":"s")||xt.minallowed!==void 0&&Ve===(xt.range[0]<xt.range[1]?"s":"n"))&&(Ut=1,Jt=0),!(!It&&!Ut)){It||(It=1),Ut||(Ut=1);var Wr=ut._offset-zr/It,gi=xt._offset-Jt/Ut;at.clipRect.call(f.setTranslate,zr,Jt).call(f.setScale,It,Ut),at.plot.call(f.setTranslate,Wr,gi).call(f.setScale,1/It,1/Ut),(It!==at.xScaleFactor||Ut!==at.yScaleFactor)&&(f.setPointGroupScale(at.zoomScalePts,It,Ut),f.setTextPointsScale(at.zoomScaleTxt,It,Ut)),f.hideOutsideRangePoints(at.clipOnAxisFalseTraces,at),at.xScaleFactor=It,at.yScaleFactor=Ut}}}}function Gr(Ye,Ne,nt){return Ye.fixedrange?0:ye&&He.xaHash[Ye._id]?Ne:Ve&&(He.isSubplotConstrained?He.xaHash:He.yaHash)[Ye._id]?nt:0}function Ur(Ye,Ne){return Ne?(Ye.range=Ye._r.slice(),M(Ye,Ne),ka(Ye,Ne)):0}function ka(Ye,Ne,nt){return Ye._length*(1-Ne)*y[nt||Ye.constraintoward||"middle"]}return fe}function R(Y,ee,le,ue){var me=e.ensureSingle(Y.draglayer,ee,le,function(pe){pe.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",Y.id)});return me.call(v,ue),me.node()}function H(Y,ee,le,ue,me,pe,se){var be=R(Y,"rect",ee,le);return t.select(be).call(f.setRect,ue,me,pe,se),be}function D(Y,ee){for(var le=0;le<Y.length;le++)if(!Y[le].fixedrange)return ee;return""}function P(Y,ee){var le=Y.range[ee],ue=Math.abs(le-Y.range[1-ee]),me;return Y.type==="date"?le:Y.type==="log"?(me=Math.ceil(Math.max(0,-Math.log(ue)/Math.LN10))+3,r("."+me+"g")(Math.pow(10,le))):(me=Math.floor(Math.log(Math.abs(le))/Math.LN10)-Math.floor(Math.log(ue)/Math.LN10)+4,r("."+String(me)+"g")(le))}function k(Y,ee,le,ue,me){for(var pe=0;pe<Y.length;pe++){var se=Y[pe];if(!se.fixedrange)if(se.rangebreaks){var be=se._id.charAt(0)==="y",Le=be?1-ee:ee,ve=be?1-le:le;ue[se._name+".range[0]"]=se.l2r(se.p2l(Le*se._length)),ue[se._name+".range[1]"]=se.l2r(se.p2l(ve*se._length))}else{var Te=se._rl[0],we=se._rl[1]-Te;ue[se._name+".range[0]"]=se.l2r(Te+we*ee),ue[se._name+".range[1]"]=se.l2r(Te+we*le)}}if(me&&me.length){var Q=(ee+(1-le))/2;k(me,Q,1-Q,ue,[])}}function C(Y,ee){for(var le=0;le<Y.length;le++){var ue=Y[le];if(!ue.fixedrange){if(ue.rangebreaks){var me=0,pe=ue._length,se=ue.p2l(me+ee)-ue.p2l(me),be=ue.p2l(pe+ee)-ue.p2l(pe),Le=(se+be)/2;ue.range=[ue.l2r(ue._rl[0]-Le),ue.l2r(ue._rl[1]-Le)]}else ue.range=[ue.l2r(ue._rl[0]-ee/ue._m),ue.l2r(ue._rl[1]-ee/ue._m)];ue.limitRange&&ue.limitRange()}}}function E(Y){return 1-(Y>=0?Math.min(Y,.9):1/(1/Math.max(Y,-.3)+3.222))}function I(Y,ee,le){return Y?Y==="nsew"?le?"":ee==="pan"?"move":"crosshair":Y.toLowerCase()+"-resize":"pointer"}function j(Y,ee,le,ue,me){return Y.append("path").attr("class","zoombox").style({fill:ee>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",o(le,ue)).attr("d",me+"Z")}function G(Y,ee,le){return Y.append("path").attr("class","zoombox-corners").style({fill:s.background,stroke:s.defaultLine,"stroke-width":1,opacity:0}).attr("transform",o(ee,le)).attr("d","M0,0Z")}function X(Y,ee,le,ue,me,pe){Y.attr("d",ue+"M"+le.l+","+le.t+"v"+le.h+"h"+le.w+"v-"+le.h+"h-"+le.w+"Z"),O(Y,ee,me,pe)}function O(Y,ee,le,ue){le||(Y.transition().style("fill",ue>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ee.transition().style("opacity",1).duration(200))}function Z(Y){t.select(Y).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function V(Y){N&&Y.data&&Y._context.showTips&&(e.notifier(e._(Y,"Double-click to zoom back out"),"long"),N=!1)}function q(Y,ee){return"M"+(Y.l-.5)+","+(ee-z-.5)+"h-3v"+(2*z+1)+"h3ZM"+(Y.r+.5)+","+(ee-z-.5)+"h3v"+(2*z+1)+"h-3Z"}function B(Y,ee){return"M"+(ee-z-.5)+","+(Y.t-.5)+"v-3h"+(2*z+1)+"v3ZM"+(ee-z-.5)+","+(Y.b+.5)+"v3h"+(2*z+1)+"v-3Z"}function J(Y){var ee=Math.floor(Math.min(Y.b-Y.t,Y.r-Y.l,z)/2);return"M"+(Y.l-3.5)+","+(Y.t-.5+ee)+"h3v"+-ee+"h"+ee+"v-3h-"+(ee+3)+"ZM"+(Y.r+3.5)+","+(Y.t-.5+ee)+"h-3v"+-ee+"h"+-ee+"v-3h"+(ee+3)+"ZM"+(Y.r+3.5)+","+(Y.b+.5-ee)+"h-3v"+ee+"h"+-ee+"v3h"+(ee+3)+"ZM"+(Y.l-3.5)+","+(Y.b+.5-ee)+"h3v"+ee+"h"+ee+"v3h-"+(ee+3)+"Z"}function ie(Y,ee,le,ue,me){for(var pe=!1,se={},be={},Le,ve,Te,we,Q=(me||{}).xaHash,xe=(me||{}).yaHash,ae=0;ae<ee.length;ae++){var ge=ee[ae];for(Le in le)if(ge[Le]){for(Te in ge)!(me&&(Q[Te]||xe[Te]))&&!(Te.charAt(0)==="x"?le:ue)[Te]&&(se[Te]=Le);for(ve in ue)!(me&&(Q[ve]||xe[ve]))&&ge[ve]&&(pe=!0)}for(ve in ue)if(ge[ve])for(we in ge)!(me&&(Q[we]||xe[we]))&&!(we.charAt(0)==="x"?le:ue)[we]&&(be[we]=ve)}pe&&(e.extendFlat(se,be),be={});var Ae={},ce=[];for(Te in se){var De=x(Y,Te);ce.push(De),Ae[De._id]=De}var Se={},Me=[];for(we in be){var He=x(Y,we);Me.push(He),Se[He._id]=He}return{xaHash:Ae,yaHash:Se,xaxes:ce,yaxes:Me,xLinks:se,yLinks:be,isSubplotConstrained:pe}}function de(Y,ee){if(!i)Y.onwheel!==void 0?Y.onwheel=ee:Y.onmousewheel!==void 0?Y.onmousewheel=ee:Y.isAddedWheelEvent||(Y.isAddedWheelEvent=!0,Y.addEventListener("wheel",ee,{passive:!1}));else{var le=Y.onwheel!==void 0?"wheel":"mousewheel";Y._onwheel&&Y.removeEventListener(le,Y._onwheel),Y._onwheel=ee,Y.addEventListener(le,ee,{passive:!1})}}function oe(Y){var ee=[];for(var le in Y)ee.push(Y[le]);return ee}return _v={makeDragBox:$,makeDragger:R,makeRectDragger:H,makeZoombox:j,makeCorners:G,updateZoombox:X,xyCorners:J,transitionZoombox:O,removeZoombox:Z,showDoubleClickNotifier:V,attachWheelEventHandler:de},_v}var x0;function T2(){return x0||(x0=1,function(t){var e=bt,r=Na,a=ai,i=Bi,n=Wz().makeDragBox,o=Ir.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(v,h){if((f._plots[v].mainplot&&!0)===(f._plots[h].mainplot&&!0)){var d=v.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[v].mainplot?1:-1});c.forEach(function(v){var h=f._plots[v],d=h.xaxis,p=h.yaxis;if(!h.mainplot){var m=n(s,h,d._offset,p._offset,d._length,p._length,"ns","ew");m.onmousemove=function(_){s._fullLayout._rehover=function(){s._fullLayout._hoversubplot===v&&s._fullLayout._plots[v]&&r.hover(s,_,v)},r.hover(s,_,v),s._fullLayout._lasthover=m,s._fullLayout._hoversubplot=v},m.onmouseout=function(_){s._dragging||(s._fullLayout._hoversubplot=null,a.unhover(s,_))},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(v===d._mainSubplot){var y=d._mainLinePosition;d.side==="top"&&(y-=o),n(s,h,d._offset+d._length*.1,y,d._length*.8,o,"","ew"),n(s,h,d._offset,y,d._length*.1,o,"","w"),n(s,h,d._offset+d._length*.9,y,d._length*.1,o,"","e")}if(v===p._mainSubplot){var b=p._mainLinePosition;p.side!=="right"&&(b-=o),n(s,h,b,p._offset+p._length*.1,o,p._length*.8,"ns",""),n(s,h,b,p._offset+p._length*.9,o,p._length*.1,"s",""),n(s,h,b,p._offset,o,p._length*.1,"n","")}}});var u=f._hoverlayer.node();u.onmousemove=function(v){v.target=s._fullLayout._lasthover,r.hover(s,v,f._hoversubplot)},u.onclick=function(v){v.target=s._fullLayout._lasthover,r.click(s,v)},u.onmousedown=function(v){s._fullLayout._lasthover.onmousedown(v)},t.updateFx(s)}},t.updateFx=function(l){var s=l._fullLayout,f=s.dragmode==="pan"?"move":"crosshair";i(s._draggers,f)}}(Ju)),Ju}var ks={},_0=ot,Xz=function(e){for(var r=_0.layoutArrayContainers,a=_0.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:""}},Yz=Dn,wv=Bh,ml=Uo,qz=Xh.sorterAsc,Tv=ot;ks.containerArrayMatch=Xz;var Zz=ks.isAddVal=function(e){return e==="add"||Yz(e)},w0=ks.isRemoveVal=function(e){return e===null||e==="remove"};ks.applyContainerArrayChanges=function(e,r,a,i,n){var o=r.astr,l=Tv.getComponentMethod(o,"supplyLayoutDefaults"),s=Tv.getComponentMethod(o,"draw"),f=Tv.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||l===wv||s===wv,u=e.layout,v=e._fullLayout;if(a[""]){Object.keys(a).length>1&&ml.warn("Full array edits are incompatible with other edits",o);var h=a[""][""];if(w0(h))r.set(null);else if(Array.isArray(h))r.set(h);else return ml.warn("Unrecognized full array edit value",o,h),!0;return c?!1:(l(u,v),s(e),!0)}var d=Object.keys(a).map(Number).sort(qz),p=r.get(),m=p||[],y=n(v,o).get(),b=[],_=-1,g=m.length,x,w,T,A,M,S,L,z;for(x=0;x<d.length;x++){if(T=d[x],A=a[T],M=Object.keys(A),S=A[""],L=Zz(S),T<0||T>m.length-(L?0:1)){ml.warn("index out of range",o,T);continue}if(S!==void 0)M.length>1&&ml.warn("Insertion & removal are incompatible with edits to the same index.",o,T),w0(S)?b.push(T):L?(S==="add"&&(S={}),m.splice(T,0,S),y&&y.splice(T,0,{})):ml.warn("Unrecognized full object edit value",o,T,S),_===-1&&(_=T);else for(w=0;w<M.length;w++)z=o+"["+T+"].",n(m[T],M[w],z).set(A[M[w]])}for(x=b.length-1;x>=0;x--)m.splice(b[x],1),y&&y.splice(b[x],1);if(m.length?p||r.set(m):r.set(null),c)return!1;if(l(u,v),f!==wv){var N;if(_===-1)N=d;else{for(g=Math.max(m.length,g),N=[],x=0;x<d.length&&(T=d[x],!(T>=_));x++)N.push(T);for(x=_;x<g;x++)N.push(x)}for(x=0;x<N.length;x++)f(e,N[x])}else s(e);return!0};var k2={};(function(t){var e=kt,r=ot,a=ke,i=hr,n=lr,o=yt,l=n.cleanId,s=n.getFromTrace,f=r.traceIs;t.clearPromiseQueue=function(b){Array.isArray(b._promises)&&b._promises.length>0&&a.log("Clearing previous rejected promises from queue."),b._promises=[]},t.cleanLayout=function(b){var _;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 g=(i.subplotsRegistry.cartesian||{}).attrRegex;(i.subplotsRegistry.polar||{}).attrRegex,(i.subplotsRegistry.ternary||{}).attrRegex,(i.subplotsRegistry.gl3d||{}).attrRegex;var x=Object.keys(b);for(_=0;_<x.length;_++){var w=x[_];if(g&&g.test(w)){var T=b[w];T.anchor&&T.anchor!=="free"&&(T.anchor=l(T.anchor)),T.overlaying&&(T.overlaying=l(T.overlaying)),T.type||(T.isdate?T.type="date":T.islog?T.type="log":T.isdate===!1&&T.islog===!1&&(T.type="linear")),(T.autorange==="withzero"||T.autorange==="tozero")&&(T.autorange=!0,T.rangemode="tozero"),T.insiderange&&delete T.range,delete T.islog,delete T.isdate,delete T.categories,d(T,"domain")&&delete T.domain}}var A=Array.isArray(b.annotations)?b.annotations.length:0;for(_=0;_<A;_++){var M=b.annotations[_];a.isPlainObject(M)&&(c(M,"xref"),c(M,"yref"))}var S=Array.isArray(b.shapes)?b.shapes.length:0;for(_=0;_<S;_++){var L=b.shapes[_];a.isPlainObject(L)&&(c(L,"xref"),c(L,"yref"))}var z=Array.isArray(b.images)?b.images.length:0;for(_=0;_<z;_++){var N=b.images[_];a.isPlainObject(N)&&(c(N,"xref"),c(N,"yref"))}var $=b.legend;return $&&($.x>3?($.x=1.02,$.xanchor="left"):$.x<-2&&($.x=-.02,$.xanchor="right"),$.y>3?($.y=1.02,$.yanchor="bottom"):$.y<-2&&($.y=-.02,$.yanchor="top")),b.dragmode==="rotate"&&(b.dragmode="orbit"),o.clean(b),b.template&&b.template.layout&&t.cleanLayout(b.template.layout),b};function c(b,_){var g=b[_],x=_.charAt(0);g&&g!=="paper"&&(b[_]=l(g,x,!0))}t.cleanData=function(b){for(var _=0;_<b.length;_++){var g=b[_],x;if(g.type==="histogramy"&&"xbins"in g&&!("ybins"in g)&&(g.ybins=g.xbins,delete g.xbins),g.type==="histogramy"&&t.swapXYData(g),(g.type==="histogramx"||g.type==="histogramy")&&(g.type="histogram"),"scl"in g&&!("colorscale"in g)&&(g.colorscale=g.scl,delete g.scl),"reversescl"in g&&!("reversescale"in g)&&(g.reversescale=g.reversescl,delete g.reversescl),g.xaxis&&(g.xaxis=l(g.xaxis,"x")),g.yaxis&&(g.yaxis=l(g.yaxis,"y")),f(g,"gl3d")&&g.scene&&(g.scene=i.subplotsRegistry.gl3d.cleanId(g.scene)),!f(g,"pie-like")&&!f(g,"bar-like"))if(Array.isArray(g.textposition))for(x=0;x<g.textposition.length;x++)g.textposition[x]=h(g.textposition[x]);else g.textposition&&(g.textposition=h(g.textposition));var w=r.getModule(g);if(w&&w.colorbar){var T=w.colorbar.container,A=T?g[T]:g;A&&A.colorscale&&(A.colorscale==="YIGnBu"&&(A.colorscale="YlGnBu"),A.colorscale==="YIOrRd"&&(A.colorscale="YlOrRd"))}if(g.type==="surface"&&a.isPlainObject(g.contours)){var M=["x","y","z"];for(x=0;x<M.length;x++){var S=g.contours[M[x]];a.isPlainObject(S)&&(S.highlightColor&&(S.highlightcolor=S.highlightColor,delete S.highlightColor),S.highlightWidth&&(S.highlightwidth=S.highlightWidth,delete S.highlightWidth))}}if(g.type==="candlestick"||g.type==="ohlc"){var L=(g.increasing||{}).showlegend!==!1,z=(g.decreasing||{}).showlegend!==!1,N=u(g.increasing),$=u(g.decreasing);if(N!==!1&&$!==!1){var R=v(N,$,L,z);R&&(g.name=R)}else(N||$)&&!g.name&&(g.name=N||$)}d(g,"line")&&delete g.line,"marker"in g&&(d(g.marker,"line")&&delete g.marker.line,d(g,"marker")&&delete g.marker),o.clean(g),g.autobinx&&(delete g.autobinx,delete g.xbins),g.autobiny&&(delete g.autobiny,delete g.ybins)}};function u(b){if(!a.isPlainObject(b))return!1;var _=b.name;return delete b.name,delete b.showlegend,(typeof _=="string"||typeof _=="number")&&String(_)}function v(b,_,g,x){if(g&&!x)return b;if(x&&!g||!b.trim())return _;if(!_.trim())return b;var w=Math.min(b.length,_.length),T;for(T=0;T<w&&b.charAt(T)===_.charAt(T);T++);var A=b.substr(0,T);return A.trim()}function h(b){var _="middle",g="center";return typeof b=="string"&&(b.indexOf("top")!==-1?_="top":b.indexOf("bottom")!==-1&&(_="bottom"),b.indexOf("left")!==-1?g="left":b.indexOf("right")!==-1&&(g="right")),_+" "+g}function d(b,_){return _ in b&&typeof b[_]=="object"&&Object.keys(b[_]).length===0}t.swapXYData=function(b){var _;if(a.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 g=b.error_y,x="copy_ystyle"in g?g.copy_ystyle:!(g.color||g.thickness||g.width);a.swapAttrs(b,["error_?.copy_ystyle"]),x&&a.swapAttrs(b,["error_?.color","error_?.thickness","error_?.width"])}if(typeof b.hoverinfo=="string"){var w=b.hoverinfo.split("+");for(_=0;_<w.length;_++)w[_]==="x"?w[_]="y":w[_]==="y"&&(w[_]="x");b.hoverinfo=w.join("+")}},t.coerceTraceIndices=function(b,_){if(e(_))return[_];if(!Array.isArray(_)||!_.length)return b.data.map(function(w,T){return T});if(Array.isArray(_)){for(var g=[],x=0;x<_.length;x++)a.isIndex(_[x],b.data.length)?g.push(_[x]):a.warn("trace index (",_[x],") is not a number or is out of bounds");return g}return _},t.manageArrayContainers=function(b,_,g){var x=b.obj,w=b.parts,T=w.length,A=w[T-1],M=e(A);if(M&&_===null){var S=w.slice(0,T-1).join("."),L=a.nestedProperty(x,S).get();L.splice(A,1)}else M&&b.get()===void 0&&b.get()===void 0&&(g[b.astr]=null),b.set(_)};var p=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function m(b){var _=b.search(p);if(_>0)return b.substr(0,_)}t.hasParent=function(b,_){for(var g=m(_);g;){if(g in b)return!0;g=m(g)}return!1};var y=["x","y","z"];t.clearAxisTypes=function(b,_,g){for(var x=0;x<_.length;x++)for(var w=b._fullData[x],T=0;T<3;T++){var A=s(b,w,y[T]);if(A&&A.type!=="log"){var M=A._name,S=A._id.substr(1);if(S.substr(0,5)==="scene"){if(g[S]!==void 0)continue;M=S+"."+M}var L=M+".type";g[M]===void 0&&g[L]===void 0&&a.nestedProperty(b.layout,L).set(null)}}}})(k2);(function(t){var e=bt,r=kt,a=W1,i=ke,n=i.nestedProperty,o=gs,l=zL,s=ot,f=Xo,c=hr,u=Ot,v=eT,h=ti,d=zt,p=yt,m=T2().initInteractions,y=Yo,b=Nl.clearOutline,_=Go.dfltConfig,g=ks,x=k2,w=iu,T=Ja,A=Ir.AX_NAME_PATTERN,M=0,S=5;function L(F,U,W,K){var fe;if(F=i.getGraphDiv(F),o.init(F),i.isPlainObject(U)){var te=U;U=te.data,W=te.layout,K=te.config,fe=te.frames}var Ee=o.triggerHandler(F,"plotly_beforeplot",[U,W,K]);if(Ee===!1)return Promise.reject();!U&&!W&&!i.isPlotDiv(F)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",F);function Ce(){if(fe)return t.addFrames(F,fe)}H(F,K),W||(W={}),e.select(F).classed("js-plotly-plot",!0),d.makeTester(),Array.isArray(F._promises)||(F._promises=[]);var he=(F.data||[]).length===0&&Array.isArray(U);Array.isArray(U)&&(x.cleanData(U),he?F.data=U:F.data.push.apply(F.data,U),F.empty=!1),(!F.layout||he)&&(F.layout=x.cleanLayout(W)),c.supplyDefaults(F);var ne=F._fullLayout,_e=ne._has("cartesian");ne._replotting=!0,(he||ne._shouldCreateBgLayer)&&(We(F),ne._shouldCreateBgLayer&&delete ne._shouldCreateBgLayer),d.initGradients(F),d.initPatterns(F),he&&u.saveShowSpikeInitial(F);var ze=!F.calcdata||F.calcdata.length!==(F._fullData||[]).length;ze&&c.doCalcdata(F);for(var je=0;je<F.calcdata.length;je++)F.calcdata[je][0].trace=F._fullData[je];F._context.responsive?F._responsiveChartHandler||(F._responsiveChartHandler=function(){i.isHidden(F)||c.resize(F)},window.addEventListener("resize",F._responsiveChartHandler)):i.clearResponsive(F);var Re=i.extendFlat({},ne._size),rt=0;function st(){for(var ct=ne._basePlotModules,Qe=0;Qe<ct.length;Qe++)ct[Qe].drawFramework&&ct[Qe].drawFramework(F);!ne._glcanvas&&ne._has("gl")&&(ne._glcanvas=ne._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(Je){return Je.key}),ne._glcanvas.enter().append("canvas").attr("class",function(Je){return"gl-canvas gl-canvas-"+Je.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var it=F._context.plotGlPixelRatio;if(ne._glcanvas){ne._glcanvas.attr("width",ne.width*it).attr("height",ne.height*it).style("width",ne.width+"px").style("height",ne.height+"px");var pt=ne._glcanvas.data()[0].regl;if(pt&&(Math.floor(ne.width*it)!==pt._gl.drawingBufferWidth||Math.floor(ne.height*it)!==pt._gl.drawingBufferHeight)){var Tt="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(rt)i.error(Tt);else return i.log(Tt+" Clearing graph and plotting again."),c.cleanPlot([],{},F._fullData,ne),c.supplyDefaults(F),ne=F._fullLayout,c.doCalcdata(F),rt++,st()}}return ne.modebar.orientation==="h"?ne._modebardiv.style("height",null).style("width","100%"):ne._modebardiv.style("width",null).style("height",ne.height+"px"),c.previousPromises(F)}function Ue(){if(c.clearAutoMarginIds(F),w.drawMarginPushers(F),u.allowAutoMargin(F),F._fullLayout.title.text&&F._fullLayout.title.automargin&&c.allowAutoMargin(F,"title.automargin"),ne._has("pie"))for(var ct=F._fullData,Qe=0;Qe<ct.length;Qe++){var it=ct[Qe];it.type==="pie"&&it.automargin&&c.allowAutoMargin(F,"pie."+it.uid+".automargin")}return c.doAutoMargin(F),c.previousPromises(F)}function Lt(){if(c.didMarginChange(Re,ne._size))return i.syncOrAsync([Ue,w.layoutStyles],F)}function ft(){if(!ze){Ke();return}return i.syncOrAsync([s.getComponentMethod("shapes","calcAutorange"),s.getComponentMethod("annotations","calcAutorange"),Ke],F)}function Ke(){F._transitioning||(w.doAutoRangeAndConstraints(F),he&&u.saveRangeInitial(F),s.getComponentMethod("rangeslider","calcAutorange")(F))}function gt(){return u.draw(F,he?"":"redraw")}var wt=[c.previousPromises,Ce,st,Ue,Lt];_e&&wt.push(ft),wt.push(w.layoutStyles),_e&&wt.push(gt,function(Qe){var it=Qe._fullLayout._insideTickLabelsUpdaterange;if(it)return Qe._fullLayout._insideTickLabelsUpdaterange=void 0,ue(Qe,it).then(function(){u.saveRangeInitial(Qe,!0)})}),wt.push(w.drawData,w.finalDraw,m,c.addLinks,c.rehover,c.redrag,c.reselect,c.doAutoMargin,c.previousPromises);var lt=i.syncOrAsync(wt,F);return(!lt||!lt.then)&&(lt=Promise.resolve()),lt.then(function(){return z(F),F})}function z(F){var U=F._fullLayout;U._redrawFromAutoMarginCount?U._redrawFromAutoMarginCount--:F.emit("plotly_afterplot")}function N(F){return i.extendFlat(_,F)}function $(F,U){try{F._fullLayout._paper.style("background",U)}catch(W){i.error(W)}}function R(F,U){var W=p.combine(U,"white");$(F,W)}function H(F,U){if(!F._context){F._context=i.extendDeep({},_);var W=e.select("base");F._context._baseUrl=W.size()&&W.attr("href")?window.location.href.split("#")[0]:""}var K=F._context,fe,te,Ee;if(U){for(te=Object.keys(U),fe=0;fe<te.length;fe++)Ee=te[fe],!(Ee==="editable"||Ee==="edits")&&Ee in K&&(Ee==="setBackground"&&U[Ee]==="opaque"?K[Ee]=R:K[Ee]=U[Ee]);var Ce=U.editable;if(Ce!==void 0)for(K.editable=Ce,te=Object.keys(K.edits),fe=0;fe<te.length;fe++)K.edits[te[fe]]=Ce;if(U.edits)for(te=Object.keys(U.edits),fe=0;fe<te.length;fe++)Ee=te[fe],Ee in K.edits&&(K.edits[Ee]=U.edits[Ee]);K._exportedPlot=U._exportedPlot}K.staticPlot&&(K.editable=!1,K.edits={},K.autosizable=!1,K.scrollZoom=!1,K.doubleClick=!1,K.showTips=!1,K.showLink=!1,K.displayModeBar=!1),K.displayModeBar==="hover"&&!a&&(K.displayModeBar=!0),(K.setBackground==="transparent"||typeof K.setBackground!="function")&&(K.setBackground=$),K._hasZeroHeight=K._hasZeroHeight||F.clientHeight===0,K._hasZeroWidth=K._hasZeroWidth||F.clientWidth===0;var he=K.scrollZoom,ne=K._scrollZoom={};if(he===!0)ne.cartesian=1,ne.gl3d=1,ne.geo=1,ne.mapbox=1,ne.map=1;else if(typeof he=="string"){var _e=he.split("+");for(fe=0;fe<_e.length;fe++)ne[_e[fe]]=1}else he!==!1&&(ne.gl3d=1,ne.geo=1,ne.mapbox=1,ne.map=1)}function D(F){if(F=i.getGraphDiv(F),!i.isPlotDiv(F))throw new Error("This element is not a Plotly plot: "+F);return x.cleanData(F.data),x.cleanLayout(F.layout),F.calcdata=void 0,t._doPlot(F).then(function(){return F.emit("plotly_redraw"),F})}function P(F,U,W,K){return F=i.getGraphDiv(F),c.cleanPlot([],{},F._fullData||[],F._fullLayout||{}),c.purge(F),t._doPlot(F,U,W,K)}function k(F,U){var W=U+1,K=[],fe,te;for(fe=0;fe<F.length;fe++)te=F[fe],te<0?K.push(W+te):K.push(te);return K}function C(F,U,W){var K,fe;for(K=0;K<U.length;K++){if(fe=U[K],fe!==parseInt(fe,10))throw new Error("all values in "+W+" must be integers");if(fe>=F.data.length||fe<-F.data.length)throw new Error(W+" must be valid indices for gd.data.");if(U.indexOf(fe,K+1)>-1||fe>=0&&U.indexOf(-F.data.length+fe)>-1||fe<0&&U.indexOf(F.data.length+fe)>-1)throw new Error("each index in "+W+" must be unique.")}}function E(F,U,W){if(!Array.isArray(F.data))throw new Error("gd.data must be an array.");if(typeof U>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(U)||(U=[U]),C(F,U,"currentIndices"),typeof W<"u"&&!Array.isArray(W)&&(W=[W]),typeof W<"u"&&C(F,W,"newIndices"),typeof W<"u"&&U.length!==W.length)throw new Error("current and new indices must be of equal length.")}function I(F,U,W){var K,fe;if(!Array.isArray(F.data))throw new Error("gd.data must be an array.");if(typeof U>"u")throw new Error("traces must be defined.");for(Array.isArray(U)||(U=[U]),K=0;K<U.length;K++)if(fe=U[K],typeof fe!="object"||Array.isArray(fe)||fe===null)throw new Error("all values in traces array must be non-array objects");if(typeof W<"u"&&!Array.isArray(W)&&(W=[W]),typeof W<"u"&&W.length!==U.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function j(F,U,W,K){var fe=i.isPlainObject(K);if(!Array.isArray(F.data))throw new Error("gd.data must be an array");if(!i.isPlainObject(U))throw new Error("update must be a key:value object");if(typeof W>"u")throw new Error("indices must be an integer or array of integers");C(F,W,"indices");for(var te in U){if(!Array.isArray(U[te])||U[te].length!==W.length)throw new Error("attribute "+te+" must be an array of length equal to indices array length");if(fe&&(!(te in K)||!Array.isArray(K[te])||K[te].length!==U[te].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 G(F,U,W,K){var fe=i.isPlainObject(K),te=[],Ee,Ce,he,ne,_e;Array.isArray(W)||(W=[W]),W=k(W,F.data.length-1);for(var ze in U)for(var je=0;je<W.length;je++){if(Ee=F.data[W[je]],he=n(Ee,ze),Ce=he.get(),ne=U[ze][je],!i.isArrayOrTypedArray(ne))throw new Error("attribute: "+ze+" index: "+je+" must be an array");if(!i.isArrayOrTypedArray(Ce))throw new Error("cannot extend missing or non-array attribute: "+ze);if(Ce.constructor!==ne.constructor)throw new Error("cannot extend array with an array of a different type: "+ze);_e=fe?K[ze][je]:K,r(_e)||(_e=-1),te.push({prop:he,target:Ce,insert:ne,maxp:Math.floor(_e)})}return te}function X(F,U,W,K,fe){j(F,U,W,K);for(var te=G(F,U,W,K),Ee={},Ce={},he=0;he<te.length;he++){var ne=te[he].prop,_e=te[he].maxp,ze=fe(te[he].target,te[he].insert,_e);ne.set(ze[0]),Array.isArray(Ee[ne.astr])||(Ee[ne.astr]=[]),Ee[ne.astr].push(ze[1]),Array.isArray(Ce[ne.astr])||(Ce[ne.astr]=[]),Ce[ne.astr].push(te[he].target.length)}return{update:Ee,maxPoints:Ce}}function O(F,U){var W=new F.constructor(F.length+U.length);return W.set(F),W.set(U,F.length),W}function Z(F,U,W,K){F=i.getGraphDiv(F);function fe(he,ne,_e){var ze,je;if(i.isTypedArray(he))if(_e<0){var Re=new he.constructor(0),rt=O(he,ne);_e<0?(ze=rt,je=Re):(ze=Re,je=rt)}else if(ze=new he.constructor(_e),je=new he.constructor(he.length+ne.length-_e),_e===ne.length)ze.set(ne),je.set(he);else if(_e<ne.length){var st=ne.length-_e;ze.set(ne.subarray(st)),je.set(he),je.set(ne.subarray(0,st),he.length)}else{var Ue=_e-ne.length,Lt=he.length-Ue;ze.set(he.subarray(Lt)),ze.set(ne,Ue),je.set(he.subarray(0,Lt))}else ze=he.concat(ne),je=_e>=0&&_e<ze.length?ze.splice(0,ze.length-_e):[];return[ze,je]}var te=X(F,U,W,K,fe),Ee=t.redraw(F),Ce=[F,te.update,W,te.maxPoints];return l.add(F,t.prependTraces,Ce,Z,arguments),Ee}function V(F,U,W,K){F=i.getGraphDiv(F);function fe(he,ne,_e){var ze,je;if(i.isTypedArray(he))if(_e<=0){var Re=new he.constructor(0),rt=O(ne,he);_e<0?(ze=rt,je=Re):(ze=Re,je=rt)}else if(ze=new he.constructor(_e),je=new he.constructor(he.length+ne.length-_e),_e===ne.length)ze.set(ne),je.set(he);else if(_e<ne.length){var st=ne.length-_e;ze.set(ne.subarray(0,st)),je.set(ne.subarray(st)),je.set(he,st)}else{var Ue=_e-ne.length;ze.set(ne),ze.set(he.subarray(0,Ue),ne.length),je.set(he.subarray(Ue))}else ze=ne.concat(he),je=_e>=0&&_e<ze.length?ze.splice(_e,ze.length):[];return[ze,je]}var te=X(F,U,W,K,fe),Ee=t.redraw(F),Ce=[F,te.update,W,te.maxPoints];return l.add(F,t.extendTraces,Ce,V,arguments),Ee}function q(F,U,W){F=i.getGraphDiv(F);var K=[],fe=t.deleteTraces,te=q,Ee=[F,K],Ce=[F,U],he,ne;for(I(F,U,W),Array.isArray(U)||(U=[U]),U=U.map(function(_e){return i.extendFlat({},_e)}),x.cleanData(U),he=0;he<U.length;he++)F.data.push(U[he]);for(he=0;he<U.length;he++)K.push(-U.length+he);if(typeof W>"u")return ne=t.redraw(F),l.add(F,fe,Ee,te,Ce),ne;Array.isArray(W)||(W=[W]);try{E(F,K,W)}catch(_e){throw F.data.splice(F.data.length-U.length,U.length),_e}return l.startSequence(F),l.add(F,fe,Ee,te,Ce),ne=t.moveTraces(F,K,W),l.stopSequence(F),ne}function B(F,U){F=i.getGraphDiv(F);var W=[],K=t.addTraces,fe=B,te=[F,W,U],Ee=[F,U],Ce,he;if(typeof U>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(U)||(U=[U]),C(F,U,"indices"),U=k(U,F.data.length-1),U.sort(i.sorterDes),Ce=0;Ce<U.length;Ce+=1)he=F.data.splice(U[Ce],1)[0],W.push(he);var ne=t.redraw(F);return l.add(F,K,te,fe,Ee),ne}function J(F,U,W){F=i.getGraphDiv(F);var K=[],fe=[],te=J,Ee=J,Ce=[F,W,U],he=[F,U,W],ne;if(E(F,U,W),U=Array.isArray(U)?U:[U],typeof W>"u")for(W=[],ne=0;ne<U.length;ne++)W.push(-U.length+ne);for(W=Array.isArray(W)?W:[W],U=k(U,F.data.length-1),W=k(W,F.data.length-1),ne=0;ne<F.data.length;ne++)U.indexOf(ne)===-1&&K.push(F.data[ne]);for(ne=0;ne<U.length;ne++)fe.push({newIndex:W[ne],trace:F.data[U[ne]]});for(fe.sort(function(ze,je){return ze.newIndex-je.newIndex}),ne=0;ne<fe.length;ne+=1)K.splice(fe[ne].newIndex,0,fe[ne].trace);F.data=K;var _e=t.redraw(F);return l.add(F,te,Ce,Ee,he),_e}function ie(F,U,W,K){F=i.getGraphDiv(F),x.clearPromiseQueue(F);var fe={};if(typeof U=="string")fe[U]=W;else if(i.isPlainObject(U))fe=i.extendFlat({},U),K===void 0&&(K=W);else return i.warn("Restyle fail.",U,W,K),Promise.reject();Object.keys(fe).length&&(F.changed=!0);var te=x.coerceTraceIndices(F,K),Ee=le(F,fe,te),Ce=Ee.flags;Ce.calc&&(F.calcdata=void 0),Ce.clearAxisTypes&&x.clearAxisTypes(F,te,{});var he=[];Ce.fullReplot?he.push(t._doPlot):(he.push(c.previousPromises),c.supplyDefaults(F),Ce.markerSize&&(c.doCalcdata(F),pe(he)),Ce.style&&he.push(w.doTraceStyle),Ce.colorbars&&he.push(w.doColorBars),he.push(z)),he.push(c.rehover,c.redrag,c.reselect),l.add(F,ie,[F,Ee.undoit,Ee.traces],ie,[F,Ee.redoit,Ee.traces]);var ne=i.syncOrAsync(he,F);return(!ne||!ne.then)&&(ne=Promise.resolve()),ne.then(function(){return F.emit("plotly_restyle",Ee.eventData),F})}function de(F){return F===void 0?null:F}function oe(F,U){return U?function(W,K,fe){var te=n(W,K),Ee=te.set;return te.set=function(Ce){var he=(fe||"")+K;Y(he,te.get(),Ce,F),Ee(Ce)},te}:n}function Y(F,U,W,K){if(Array.isArray(U)||Array.isArray(W))for(var fe=Array.isArray(U)?U:[],te=Array.isArray(W)?W:[],Ee=Math.max(fe.length,te.length),Ce=0;Ce<Ee;Ce++)Y(F+"["+Ce+"]",fe[Ce],te[Ce],K);else if(i.isPlainObject(U)||i.isPlainObject(W)){var he=i.isPlainObject(U)?U:{},ne=i.isPlainObject(W)?W:{},_e=i.extendFlat({},he,ne);for(var ze in _e)Y(F+"."+ze,he[ze],ne[ze],K)}else K[F]===void 0&&(K[F]=de(U))}function ee(F,U,W){for(var K in W){var fe=n(F,K);Y(K,fe.get(),W[K],U)}}function le(F,U,W){var K=F._fullLayout,fe=F._fullData,te=F.data,Ee=K._guiEditing,Ce=oe(K._preGUI,Ee),he=i.extendDeepAll({},U),ne,_e=T.traceFlags(),ze={},je={},Re;function rt(){return W.map(function(){})}function st(Nt){var ir=u.id2name(Nt);Re.indexOf(ir)===-1&&Re.push(ir)}function Ue(Nt){return"LAYOUT"+Nt+".autorange"}function Lt(Nt){return"LAYOUT"+Nt+".range"}function ft(Nt){for(var ir=Nt;ir<fe.length;ir++)if(fe[ir]._input===te[Nt])return fe[ir]}function Ke(Nt,ir,It){if(Array.isArray(Nt)){Nt.forEach(function(Wr){Ke(Wr,ir,It)});return}if(!(Nt in U||x.hasParent(U,Nt))){var Ut;if(Nt.substr(0,6)==="LAYOUT")Ut=Ce(F.layout,Nt.replace("LAYOUT",""));else{var zr=W[It],Jt=K._tracePreGUI[ft(zr)._fullInput.uid];Ut=oe(Jt,Ee)(te[zr],Nt)}Nt in je||(je[Nt]=rt()),je[Nt][It]===void 0&&(je[Nt][It]=de(Ut.get())),ir!==void 0&&Ut.set(ir)}}function gt(Nt){return function(ir){return fe[ir][Nt]}}function wt(Nt){return function(ir,It){return ir===!1?fe[W[It]][Nt]:null}}for(var lt in U){if(x.hasParent(U,lt))throw new Error("cannot set "+lt+" and a parent attribute simultaneously");var ct=U[lt],Qe,it,pt,Tt,Je,At;if((lt==="autobinx"||lt==="autobiny")&&(lt=lt.charAt(lt.length-1)+"bins",Array.isArray(ct)?ct=ct.map(wt(lt)):ct===!1?ct=W.map(gt(lt)):ct=null),ze[lt]=ct,lt.substr(0,6)==="LAYOUT"){pt=Ce(F.layout,lt.replace("LAYOUT","")),je[lt]=[de(pt.get())],pt.set(Array.isArray(ct)?ct[0]:ct),_e.calc=!0;continue}for(je[lt]=rt(),ne=0;ne<W.length;ne++){Qe=te[W[ne]],it=ft(W[ne]);var Ft=K._tracePreGUI[it._fullInput.uid];if(pt=oe(Ft,Ee)(Qe,lt),Tt=pt.get(),Je=Array.isArray(ct)?ct[ne%ct.length]:ct,Je!==void 0){var Lr=pt.parts[pt.parts.length-1],ar=lt.substr(0,lt.length-Lr.length-1),Gr=ar?ar+".":"",Ur=ar?n(it,ar).get():it;if(At=f.getTraceValObject(it,pt.parts),At&&At.impliedEdits&&Je!==null)for(var ka in At.impliedEdits)Ke(i.relativeAttr(lt,ka),At.impliedEdits[ka],ne);else if((Lr==="thicknessmode"||Lr==="lenmode")&&Tt!==Je&&(Je==="fraction"||Je==="pixels")&&Ur){var Ye=K._size,Ne=Ur.orient,nt=Ne==="top"||Ne==="bottom";if(Lr==="thicknessmode"){var vt=nt?Ye.h:Ye.w;Ke(Gr+"thickness",Ur.thickness*(Je==="fraction"?1/vt:vt),ne)}else{var et=nt?Ye.w:Ye.h;Ke(Gr+"len",Ur.len*(Je==="fraction"?1/et:et),ne)}}else if(lt==="type"&&(Je==="pie"!=(Tt==="pie")||Je==="funnelarea"!=(Tt==="funnelarea"))){var at="x",ut="y";(Je==="bar"||Tt==="bar")&&Qe.orientation==="h"&&(at="y",ut="x"),i.swapAttrs(Qe,["?","?src"],"labels",at),i.swapAttrs(Qe,["d?","?0"],"label",at),i.swapAttrs(Qe,["?","?src"],"values",ut),Tt==="pie"||Tt==="funnelarea"?(n(Qe,"marker.color").set(n(Qe,"marker.colors").get()),K._pielayer.selectAll("g.trace").remove()):s.traceIs(Qe,"cartesian")&&n(Qe,"marker.colors").set(n(Qe,"marker.color").get())}je[lt][ne]=de(Tt);var xt=["swapxy","swapxyaxes","orientation","orientationaxes"];if(xt.indexOf(lt)!==-1){if(lt==="orientation"){pt.set(Je);var Ct=Qe.x&&!Qe.y?"h":"v";if((pt.get()||Ct)===it.orientation)continue}else lt==="orientationaxes"&&(Qe.orientation={v:"h",h:"v"}[it.orientation]);x.swapXYData(Qe),_e.calc=_e.clearAxisTypes=!0}else c.dataArrayContainers.indexOf(pt.parts[0])!==-1?(x.manageArrayContainers(pt,Je,je),_e.calc=!0):(At?At.arrayOk&&!s.traceIs(it,"regl")&&(i.isArrayOrTypedArray(Je)||i.isArrayOrTypedArray(Tt))?_e.calc=!0:T.update(_e,At):_e.calc=!0,pt.set(Je))}}if(["swapxyaxes","orientationaxes"].indexOf(lt)!==-1&&u.swap(F,W),lt==="orientationaxes"){var Vt=n(F.layout,"hovermode"),Gt=Vt.get();Gt==="x"?Vt.set("y"):Gt==="y"?Vt.set("x"):Gt==="x unified"?Vt.set("y unified"):Gt==="y unified"&&Vt.set("x unified")}if(["orientation","type"].indexOf(lt)!==-1){for(Re=[],ne=0;ne<W.length;ne++){var Qt=te[W[ne]];s.traceIs(Qt,"cartesian")&&(st(Qt.xaxis||"x"),st(Qt.yaxis||"y"))}Ke(Re.map(Ue),!0,0),Ke(Re.map(Lt),[0,1],0)}}return(_e.calc||_e.plot)&&(_e.fullReplot=!0),{flags:_e,undoit:je,redoit:ze,traces:W,eventData:i.extendDeepNoArrays([],[he,W])}}function ue(F,U,W){F=i.getGraphDiv(F),x.clearPromiseQueue(F);var K={};if(typeof U=="string")K[U]=W;else if(i.isPlainObject(U))K=i.extendFlat({},U);else return i.warn("Relayout fail.",U,W),Promise.reject();Object.keys(K).length&&(F.changed=!0);var fe=ve(F,K),te=fe.flags;te.calc&&(F.calcdata=void 0);var Ee=[c.previousPromises];te.layoutReplot?Ee.push(w.layoutReplot):Object.keys(K).length&&(me(F,te,fe)||c.supplyDefaults(F),te.legend&&Ee.push(w.doLegend),te.layoutstyle&&Ee.push(w.layoutStyles),te.axrange&&pe(Ee,fe.rangesAltered),te.ticks&&Ee.push(w.doTicksRelayout),te.modebar&&Ee.push(w.doModeBar),te.camera&&Ee.push(w.doCamera),te.colorbars&&Ee.push(w.doColorBars),Ee.push(z)),Ee.push(c.rehover,c.redrag,c.reselect),l.add(F,ue,[F,fe.undoit],ue,[F,fe.redoit]);var Ce=i.syncOrAsync(Ee,F);return(!Ce||!Ce.then)&&(Ce=Promise.resolve(F)),Ce.then(function(){return F.emit("plotly_relayout",fe.eventData),F})}function me(F,U,W){var K=F._fullLayout;if(!U.axrange)return!1;for(var fe in U)if(fe!=="axrange"&&U[fe])return!1;var te,Ee,Ce=function(Re,rt){return i.coerce(te,Ee,h,Re,rt)},he={};for(var ne in W.rangesAltered){var _e=u.id2name(ne);if(te=F.layout[_e],Ee=K[_e],v(te,Ee,Ce,he),Ee._matchGroup){for(var ze in Ee._matchGroup)if(ze!==ne){var je=K[u.id2name(ze)];je.autorange=Ee.autorange,je.range=Ee.range.slice(),je._input.range=Ee.range.slice()}}}return!0}function pe(F,U){var W=U?function(K){var fe=[],te=!0;for(var Ee in U){var Ce=u.getFromId(K,Ee);if(fe.push(Ee),(Ce.ticklabelposition||"").indexOf("inside")!==-1&&Ce._anchorAxis&&fe.push(Ce._anchorAxis._id),Ce._matchGroup)for(var he in Ce._matchGroup)U[he]||fe.push(he)}return u.draw(K,fe,{skipTitle:te})}:function(K){return u.draw(K,"redraw")};F.push(b,w.doAutoRangeAndConstraints,W,w.drawData,w.finalDraw)}var se=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,be=/^[xyz]axis[0-9]*\.autorange$/,Le=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function ve(F,U){var W=F.layout,K=F._fullLayout,fe=K._guiEditing,te=oe(K._preGUI,fe),Ee=Object.keys(U),Ce=u.list(F),he=i.extendDeepAll({},U),ne={},_e,ze,je;for(Ee=Object.keys(U),ze=0;ze<Ee.length;ze++)if(Ee[ze].indexOf("allaxes")===0){for(je=0;je<Ce.length;je++){var Re=Ce[je]._id.substr(1),rt=Re.indexOf("scene")!==-1?Re+".":"",st=Ee[ze].replace("allaxes",rt+Ce[je]._name);U[st]||(U[st]=U[Ee[ze]])}delete U[Ee[ze]]}var Ue=T.layoutFlags(),Lt={},ft={};function Ke(Jt,Wr){if(Array.isArray(Jt)){Jt.forEach(function(Ba){Ke(Ba,Wr)});return}if(!(Jt in U||x.hasParent(U,Jt))){var gi=te(W,Jt);Jt in ft||(ft[Jt]=de(gi.get())),Wr!==void 0&&gi.set(Wr)}}var gt={},wt;function lt(Jt){var Wr=u.name2id(Jt.split(".")[0]);return gt[Wr]=1,Wr}for(var ct in U){if(x.hasParent(U,ct))throw new Error("cannot set "+ct+" and a parent attribute simultaneously");for(var Qe=te(W,ct),it=U[ct],pt=Qe.parts.length,Tt=pt-1;Tt>0&&typeof Qe.parts[Tt]!="string";)Tt--;var Je=Qe.parts[Tt],At=Qe.parts[Tt-1]+"."+Je,Ft=Qe.parts.slice(0,Tt).join("."),Lr=n(F.layout,Ft).get(),ar=n(K,Ft).get(),Gr=Qe.get();if(it!==void 0){Lt[ct]=it,ft[ct]=Je==="reverse"?it:de(Gr);var Ur=f.getLayoutValObject(K,Qe.parts);if(Ur&&Ur.impliedEdits&&it!==null)for(var ka in Ur.impliedEdits)Ke(i.relativeAttr(ct,ka),Ur.impliedEdits[ka]);if(["width","height"].indexOf(ct)!==-1)if(it){Ke("autosize",null);var Ye=ct==="height"?"width":"height";Ke(Ye,K[Ye])}else K[ct]=F._initialAutoSize[ct];else if(ct==="autosize")Ke("width",it?null:K.width),Ke("height",it?null:K.height);else if(At.match(se))lt(At),n(K,Ft+"._inputRange").set(null);else if(At.match(be)){lt(At),n(K,Ft+"._inputRange").set(null);var Ne=n(K,Ft).get();Ne._inputDomain&&(Ne._input.domain=Ne._inputDomain.slice())}else At.match(Le)&&n(K,Ft+"._inputDomain").set(null);if(Je==="type"){wt=Lr;var nt=ar.type==="linear"&&it==="log",vt=ar.type==="log"&&it==="linear";if(nt||vt){if(!wt||!wt.range)Ke(Ft+".autorange",!0);else if(ar.autorange)nt&&(wt.range=wt.range[1]>wt.range[0]?[1,2]:[2,1]);else{var et=wt.range[0],at=wt.range[1];nt?(et<=0&&at<=0&&Ke(Ft+".autorange",!0),et<=0?et=at/1e6:at<=0&&(at=et/1e6),Ke(Ft+".range[0]",Math.log(et)/Math.LN10),Ke(Ft+".range[1]",Math.log(at)/Math.LN10)):(Ke(Ft+".range[0]",Math.pow(10,et)),Ke(Ft+".range[1]",Math.pow(10,at)))}Array.isArray(K._subplots.polar)&&K._subplots.polar.length&&K[Qe.parts[0]]&&Qe.parts[1]==="radialaxis"&&delete K[Qe.parts[0]]._subplot.viewInitial["radialaxis.range"],s.getComponentMethod("annotations","convertCoords")(F,ar,it,Ke),s.getComponentMethod("images","convertCoords")(F,ar,it,Ke)}else Ke(Ft+".autorange",!0),Ke(Ft+".range",null);n(K,Ft+"._inputRange").set(null)}else if(Je.match(A)){var ut=n(K,ct).get(),xt=(it||{}).type;(!xt||xt==="-")&&(xt="linear"),s.getComponentMethod("annotations","convertCoords")(F,ut,xt,Ke),s.getComponentMethod("images","convertCoords")(F,ut,xt,Ke)}var Ct=g.containerArrayMatch(ct);if(Ct){_e=Ct.array,ze=Ct.index;var Vt=Ct.property,Gt=Ur||{editType:"calc"};ze!==""&&Vt===""&&(g.isAddVal(it)?ft[ct]=null:g.isRemoveVal(it)?ft[ct]=(n(W,_e).get()||[])[ze]:i.warn("unrecognized full object value",U)),T.update(Ue,Gt),ne[_e]||(ne[_e]={});var Qt=ne[_e][ze];Qt||(Qt=ne[_e][ze]={}),Qt[Vt]=it,delete U[ct]}else Je==="reverse"?(Lr.range?Lr.range.reverse():(Ke(Ft+".autorange",!0),Lr.range=[1,0]),ar.autorange?Ue.calc=!0:Ue.plot=!0):(ct==="dragmode"&&(it===!1&&Gr!==!1||it!==!1&&Gr===!1)||K._has("scatter-like")&&K._has("regl")&&ct==="dragmode"&&(it==="lasso"||it==="select")&&!(Gr==="lasso"||Gr==="select")?Ue.plot=!0:Ur?T.update(Ue,Ur):Ue.calc=!0,Qe.set(it))}}for(_e in ne){var Nt=g.applyContainerArrayChanges(F,te(W,_e),ne[_e],Ue,te);Nt||(Ue.plot=!0)}for(var ir in gt){wt=u.getFromId(F,ir);var It=wt&&wt._constraintGroup;if(It){Ue.calc=!0;for(var Ut in It)gt[Ut]||(u.getFromId(F,Ut)._constraintShrinkable=!0)}}(Te(F)||U.height||U.width)&&(Ue.plot=!0);var zr=K.shapes;for(ze=0;ze<zr.length;ze++)if(zr[ze].showlegend){Ue.calc=!0;break}return(Ue.plot||Ue.calc)&&(Ue.layoutReplot=!0),{flags:Ue,rangesAltered:gt,undoit:ft,redoit:Lt,eventData:he}}function Te(F){var U=F._fullLayout,W=U.width,K=U.height;return F.layout.autosize&&c.plotAutoSize(F,F.layout,U),U.width!==W||U.height!==K}function we(F,U,W,K){F=i.getGraphDiv(F),x.clearPromiseQueue(F),i.isPlainObject(U)||(U={}),i.isPlainObject(W)||(W={}),Object.keys(U).length&&(F.changed=!0),Object.keys(W).length&&(F.changed=!0);var fe=x.coerceTraceIndices(F,K),te=le(F,i.extendFlat({},U),fe),Ee=te.flags,Ce=ve(F,i.extendFlat({},W)),he=Ce.flags;(Ee.calc||he.calc)&&(F.calcdata=void 0),Ee.clearAxisTypes&&x.clearAxisTypes(F,fe,W);var ne=[];he.layoutReplot?ne.push(w.layoutReplot):Ee.fullReplot?ne.push(t._doPlot):(ne.push(c.previousPromises),me(F,he,Ce)||c.supplyDefaults(F),Ee.style&&ne.push(w.doTraceStyle),(Ee.colorbars||he.colorbars)&&ne.push(w.doColorBars),he.legend&&ne.push(w.doLegend),he.layoutstyle&&ne.push(w.layoutStyles),he.axrange&&pe(ne,Ce.rangesAltered),he.ticks&&ne.push(w.doTicksRelayout),he.modebar&&ne.push(w.doModeBar),he.camera&&ne.push(w.doCamera),ne.push(z)),ne.push(c.rehover,c.redrag,c.reselect),l.add(F,we,[F,te.undoit,Ce.undoit,te.traces],we,[F,te.redoit,Ce.redoit,te.traces]);var _e=i.syncOrAsync(ne,F);return(!_e||!_e.then)&&(_e=Promise.resolve(F)),_e.then(function(){return F.emit("plotly_update",{data:te.eventData,layout:Ce.eventData}),F})}function Q(F){return function(W){W._fullLayout._guiEditing=!0;var K=F.apply(null,arguments);return W._fullLayout._guiEditing=!1,K}}var xe=[{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:/^(map\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],ae=[{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 ge(F,U){for(var W=0;W<U.length;W++){var K=U[W],fe=F.match(K.pattern);if(fe){var te=fe[1]||"";return{head:te,tail:F.substr(te.length+1),attr:K.attr}}}}function Ae(F,U){var W=n(U,F).get();if(W!==void 0)return W;var K=F.split(".");for(K.pop();K.length>1;)if(K.pop(),W=n(U,K.join(".")+".uirevision").get(),W!==void 0)return W;return U.uirevision}function ce(F,U){for(var W=0;W<U.length;W++)if(U[W]._fullInput.uid===F)return W;return-1}function De(F,U,W){for(var K=0;K<U.length;K++)if(U[K].uid===F)return K;return!U[W]||U[W].uid?-1:W}function Se(F,U){var W=i.isPlainObject(F),K=Array.isArray(F);return W||K?(W&&i.isPlainObject(U)||K&&Array.isArray(U))&&JSON.stringify(F)===JSON.stringify(U):F===U}function Me(F,U,W,K){var fe=K._preGUI,te,Ee,Ce,he,ne,_e,ze,je,Re,rt,st=[],Ue={},Lt={};for(te in fe){if(ne=ge(te,xe),ne){if(Re=ne.head,rt=ne.tail,Ee=ne.attr||Re+".uirevision",Ce=n(K,Ee).get(),he=Ce&&Ae(Ee,U),he&&he===Ce){if(_e=fe[te],_e===null&&(_e=void 0),ze=n(U,te),je=ze.get(),Se(je,_e)){je===void 0&&rt==="autorange"&&st.push(Re),ze.set(de(n(K,te).get()));continue}else if(rt==="autorange"||rt.substr(0,6)==="range["){var ft=fe[Re+".range[0]"],Ke=fe[Re+".range[1]"],gt=fe[Re+".autorange"];if(gt||gt===null&&ft===null&&Ke===null){if(!(Re in Ue)){var wt=n(U,Re).get();Ue[Re]=wt&&(wt.autorange||wt.autorange!==!1&&(!wt.range||wt.range.length!==2))}if(Ue[Re]){ze.set(de(n(K,te).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+te);delete fe[te],ne&&ne.tail.substr(0,6)==="range["&&(Lt[ne.head]=1)}for(var lt=0;lt<st.length;lt++){var ct=st[lt];if(Lt[ct]){var Qe=n(U,ct).get();Qe&&delete Qe.autorange}}var it=K._tracePreGUI;for(var pt in it){var Tt=it[pt],Je=null,At;for(te in Tt){if(!Je){var Ft=ce(pt,W);if(Ft<0){delete it[pt];break}var Lr=W[Ft];At=Lr._fullInput;var ar=De(pt,F,At.index);if(ar<0){delete it[pt];break}Je=F[ar]}if(ne=ge(te,ae),ne){if(ne.attr?(Ce=n(K,ne.attr).get(),he=Ce&&Ae(ne.attr,U)):(Ce=At.uirevision,he=Je.uirevision,he===void 0&&(he=U.uirevision)),he&&he===Ce&&(_e=Tt[te],_e===null&&(_e=void 0),ze=n(Je,te),je=ze.get(),Se(je,_e))){ze.set(de(n(At,te).get()));continue}}else i.warn("unrecognized GUI edit: "+te+" in trace uid "+pt);delete Tt[te]}}}function He(F,U,W,K){var fe,te;function Ee(){return t.addFrames(F,fe)}F=i.getGraphDiv(F),x.clearPromiseQueue(F);var Ce=F._fullData,he=F._fullLayout;if(!i.isPlotDiv(F)||!Ce||!he)te=t.newPlot(F,U,W,K);else{if(i.isPlainObject(U)){var ne=U;U=ne.data,W=ne.layout,K=ne.config,fe=ne.frames}var _e=!1;if(K){var ze=i.extendDeep({},F._context);F._context=void 0,H(F,K),_e=Ze(ze,F._context)}F.data=U||[],x.cleanData(F.data),F.layout=W||{},x.cleanLayout(F.layout),Me(F.data,F.layout,Ce,he),c.supplyDefaults(F,{skipUpdateCalc:!0});var je=F._fullData,Re=F._fullLayout,rt=Re.datarevision===void 0,st=Re.transition,Ue=Oe(F,he,Re,rt,st),Lt=Ue.newDataRevision,ft=Fe(F,Ce,je,rt,st,Lt);if(Te(F)&&(Ue.layoutReplot=!0),ft.calc||Ue.calc){F.calcdata=void 0;for(var Ke=Object.getOwnPropertyNames(Re),gt=0;gt<Ke.length;gt++){var wt=Ke[gt],lt=wt.substring(0,5);if(lt==="xaxis"||lt==="yaxis"){var ct=Re[wt]._emptyCategories;ct&&ct()}}}else c.supplyDefaultsUpdateCalc(F.calcdata,je);var Qe=[];if(fe&&(F._transitionData={},c.createTransitionData(F),Qe.push(Ee)),Re.transition&&!_e&&(ft.anim||Ue.anim))Ue.ticks&&Qe.push(w.doTicksRelayout),c.doCalcdata(F),w.doAutoRangeAndConstraints(F),Qe.push(function(){return c.transitionFromReact(F,ft,Ue,he)});else if(ft.fullReplot||Ue.layoutReplot||_e)F._fullLayout._skipDefaults=!0,Qe.push(t._doPlot);else{for(var it in Ue.arrays){var pt=Ue.arrays[it];if(pt.length){var Tt=s.getComponentMethod(it,"drawOne");if(Tt!==i.noop)for(var Je=0;Je<pt.length;Je++)Tt(F,pt[Je]);else{var At=s.getComponentMethod(it,"draw");if(At===i.noop)throw new Error("cannot draw components: "+it);At(F)}}}Qe.push(c.previousPromises),ft.style&&Qe.push(w.doTraceStyle),(ft.colorbars||Ue.colorbars)&&Qe.push(w.doColorBars),Ue.legend&&Qe.push(w.doLegend),Ue.layoutstyle&&Qe.push(w.layoutStyles),Ue.axrange&&pe(Qe),Ue.ticks&&Qe.push(w.doTicksRelayout),Ue.modebar&&Qe.push(w.doModeBar),Ue.camera&&Qe.push(w.doCamera),Qe.push(z)}Qe.push(c.rehover,c.redrag,c.reselect),te=i.syncOrAsync(Qe,F),(!te||!te.then)&&(te=Promise.resolve(F))}return te.then(function(){return F.emit("plotly_react",{data:U,layout:W}),F})}function Fe(F,U,W,K,fe,te){var Ee=U.length===W.length;if(!fe&&!Ee)return{fullReplot:!0,calc:!0};var Ce=T.traceFlags();Ce.arrays={},Ce.nChanges=0,Ce.nChangesAnim=0;var he,ne;function _e(Re){var rt=f.getTraceValObject(ne,Re);return!ne._module.animatable&&rt.anim&&(rt.anim=!1),rt}var ze={getValObject:_e,flags:Ce,immutable:K,transition:fe,newDataRevision:te,gd:F},je={};for(he=0;he<U.length;he++)if(W[he]){if(ne=W[he]._fullInput,je[ne.uid])continue;je[ne.uid]=1,Ge(U[he]._fullInput,ne,[],ze)}return(Ce.calc||Ce.plot)&&(Ce.fullReplot=!0),fe&&Ce.nChanges&&Ce.nChangesAnim&&(Ce.anim=Ce.nChanges===Ce.nChangesAnim&&Ee?"all":"some"),Ce}function Oe(F,U,W,K,fe){var te=T.layoutFlags();te.arrays={},te.rangesAltered={},te.nChanges=0,te.nChangesAnim=0;function Ee(je){return f.getLayoutValObject(W,je)}for(var Ce in W)if(!(!Ce.startsWith("xaxis")&&!Ce.startsWith("yaxis"))&&U[Ce]){var he=W[Ce].domain,ne=U[Ce].domain,_e=U[Ce]._inputDomain;U[Ce]._inputDomain&&(he[0]===_e[0]&&he[1]===_e[1]?W[Ce].domain=U[Ce].domain:(he[0]!==ne[0]||he[1]!==ne[1])&&(W[Ce]._inputDomain=null))}var ze={getValObject:Ee,flags:te,immutable:K,transition:fe,gd:F};return Ge(U,W,[],ze),(te.plot||te.calc)&&(te.layoutReplot=!0),fe&&te.nChanges&&te.nChangesAnim&&(te.anim=te.nChanges===te.nChangesAnim?"all":"some"),te}function Ge(F,U,W,K){var fe,te,Ee,Ce=K.getValObject,he=K.flags,ne=K.immutable,_e=K.inArray,ze=K.arrayIndex;function je(){var Ft=fe.editType;if(_e&&Ft.indexOf("arraydraw")!==-1){i.pushUnique(he.arrays[_e],ze);return}T.update(he,fe),Ft!=="none"&&he.nChanges++,K.transition&&fe.anim&&he.nChangesAnim++,(se.test(Ee)||be.test(Ee))&&(he.rangesAltered[W[0]]=1),te==="datarevision"&&(he.newDataRevision=1)}function Re(Ft){return Ft.valType==="data_array"||Ft.arrayOk}for(te in F){if(he.calc&&!K.transition)return;var rt=F[te],st=U[te],Ue=W.concat(te);if(Ee=Ue.join("."),!(te.charAt(0)==="_"||typeof rt=="function"||rt===st)){if((te==="tick0"||te==="dtick")&&W[0]!=="geo"){var Lt=U.tickmode;if(Lt==="auto"||Lt==="array"||!Lt)continue}if(!(te==="range"&&U.autorange)&&!((te==="zmin"||te==="zmax")&&U.type==="contourcarpet")&&(fe=Ce(Ue),!!fe&&!(fe._compareAsJSON&&JSON.stringify(rt)===JSON.stringify(st)))){var ft=fe.valType,Ke,gt=Re(fe),wt=Array.isArray(rt),lt=Array.isArray(st);if(wt&<){var ct="_input_"+te,Qe=F[ct],it=U[ct];if(Array.isArray(Qe)&&Qe===it)continue}if(st===void 0)gt&&wt?he.calc=!0:je();else if(fe._isLinkedToArray){var pt=[],Tt=!1;_e||(he.arrays[te]=pt);var Je=Math.min(rt.length,st.length),At=Math.max(rt.length,st.length);if(Je!==At)if(fe.editType==="arraydraw")Tt=!0;else{je();continue}for(Ke=0;Ke<Je;Ke++)Ge(rt[Ke],st[Ke],Ue.concat(Ke),i.extendFlat({inArray:te,arrayIndex:Ke},K));if(Tt)for(Ke=Je;Ke<At;Ke++)pt.push(Ke)}else!ft&&i.isPlainObject(rt)?Ge(rt,st,Ue,K):gt?wt&<?(ne&&(he.calc=!0),(ne||K.newDataRevision)&&je()):wt!==lt?he.calc=!0:je():wt&<?(rt.length!==st.length||String(rt)!==String(st))&&je():je()}}}for(te in U)if(!(te in F||te.charAt(0)==="_"||typeof U[te]=="function"))if(fe=Ce(W.concat(te)),Re(fe)&&Array.isArray(U[te])){he.calc=!0;return}else je()}function Ze(F,U){var W;for(W in F)if(W.charAt(0)!=="_"){var K=F[W],fe=U[W];if(K!==fe)if(i.isPlainObject(K)&&i.isPlainObject(fe)){if(Ze(K,fe))return!0}else if(Array.isArray(K)&&Array.isArray(fe)){if(K.length!==fe.length)return!0;for(var te=0;te<K.length;te++)if(K[te]!==fe[te])if(i.isPlainObject(K[te])&&i.isPlainObject(fe[te])){if(Ze(K[te],fe[te]))return!0}else return!0}else return!0}}function ye(F,U,W){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 K=F._transitionData;K._frameQueue||(K._frameQueue=[]),W=c.supplyAnimationDefaults(W);var fe=W.transition,te=W.frame;K._frameWaitingCnt===void 0&&(K._frameWaitingCnt=0);function Ee(ne){return Array.isArray(fe)?ne>=fe.length?fe[0]:fe[ne]:fe}function Ce(ne){return Array.isArray(te)?ne>=te.length?te[0]:te[ne]:te}function he(ne,_e){var ze=0;return function(){if(ne&&++ze===_e)return ne()}}return new Promise(function(ne,_e){function ze(){if(K._frameQueue.length!==0){for(;K._frameQueue.length;){var Je=K._frameQueue.pop();Je.onInterrupt&&Je.onInterrupt()}F.emit("plotly_animationinterrupted",[])}}function je(Je){if(Je.length!==0){for(var At=0;At<Je.length;At++){var Ft;Je[At].type==="byname"?Ft=c.computeFrame(F,Je[At].name):Ft=Je[At].data;var Lr=Ce(At),ar=Ee(At);ar.duration=Math.min(ar.duration,Lr.duration);var Gr={frame:Ft,name:Je[At].name,frameOpts:Lr,transitionOpts:ar};At===Je.length-1&&(Gr.onComplete=he(ne,2),Gr.onInterrupt=_e),K._frameQueue.push(Gr)}W.mode==="immediate"&&(K._lastFrameAt=-1/0),K._animationRaf||st()}}function Re(){F.emit("plotly_animated"),window.cancelAnimationFrame(K._animationRaf),K._animationRaf=null}function rt(){K._currentFrame&&K._currentFrame.onComplete&&K._currentFrame.onComplete();var Je=K._currentFrame=K._frameQueue.shift();if(Je){var At=Je.name?Je.name.toString():null;F._fullLayout._currentFrame=At,K._lastFrameAt=Date.now(),K._timeToNext=Je.frameOpts.duration,c.transition(F,Je.frame.data,Je.frame.layout,x.coerceTraceIndices(F,Je.frame.traces),Je.frameOpts,Je.transitionOpts).then(function(){Je.onComplete&&Je.onComplete()}),F.emit("plotly_animatingframe",{name:At,frame:Je.frame,animation:{frame:Je.frameOpts,transition:Je.transitionOpts}})}else Re()}function st(){F.emit("plotly_animating"),K._lastFrameAt=-1/0,K._timeToNext=0,K._runningTransitions=0,K._currentFrame=null;var Je=function(){K._animationRaf=window.requestAnimationFrame(Je),Date.now()-K._lastFrameAt>K._timeToNext&&rt()};Je()}var Ue=0;function Lt(Je){return Array.isArray(fe)?Ue>=fe.length?Je.transitionOpts=fe[Ue]:Je.transitionOpts=fe[0]:Je.transitionOpts=fe,Ue++,Je}var ft,Ke,gt=[],wt=U==null,lt=Array.isArray(U),ct=!wt&&!lt&&i.isPlainObject(U);if(ct)gt.push({type:"object",data:Lt(i.extendFlat({},U))});else if(wt||["string","number"].indexOf(typeof U)!==-1)for(ft=0;ft<K._frames.length;ft++)Ke=K._frames[ft],Ke&&(wt||String(Ke.group)===String(U))&>.push({type:"byname",name:String(Ke.name),data:Lt({name:Ke.name})});else if(lt)for(ft=0;ft<U.length;ft++){var Qe=U[ft];["number","string"].indexOf(typeof Qe)!==-1?(Qe=String(Qe),gt.push({type:"byname",name:Qe,data:Lt({name:Qe})})):i.isPlainObject(Qe)&>.push({type:"object",data:Lt(i.extendFlat({},Qe))})}for(ft=0;ft<gt.length;ft++)if(Ke=gt[ft],Ke.type==="byname"&&!K._frameHash[Ke.data.name]){i.warn('animate failure: frame not found: "'+Ke.data.name+'"'),_e();return}["next","immediate"].indexOf(W.mode)!==-1&&ze(),W.direction==="reverse"&>.reverse();var it=F._fullLayout._currentFrame;if(it&&W.fromcurrent){var pt=-1;for(ft=0;ft<gt.length;ft++)if(Ke=gt[ft],Ke.type==="byname"&&Ke.name===it){pt=ft;break}if(pt>0&&pt<gt.length-1){var Tt=[];for(ft=0;ft<gt.length;ft++)Ke=gt[ft],(gt[ft].type!=="byname"||ft>pt)&&Tt.push(Ke);gt=Tt}}gt.length>0?je(gt):(F.emit("plotly_animated"),ne())})}function Ve(F,U,W){if(F=i.getGraphDiv(F),U==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 K,fe,te,Ee,Ce=F._transitionData._frames,he=F._transitionData._frameHash;if(!Array.isArray(U))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+U);var ne=Ce.length+U.length*2,_e=[],ze={};for(K=U.length-1;K>=0;K--)if(i.isPlainObject(U[K])){var je=U[K].name,Re=(he[je]||ze[je]||{}).name,rt=U[K].name,st=he[Re]||ze[Re];Re&&rt&&typeof rt=="number"&&st&&M<S&&(M++,i.warn('addFrames: overwriting frame "'+(he[Re]||ze[Re]).name+'" with a frame whose name of type "number" also equates to "'+Re+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),M===S&&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.")),ze[je]={name:je},_e.push({frame:c.supplyFrameDefaults(U[K]),index:W&&W[K]!==void 0&&W[K]!==null?W[K]:ne+K})}_e.sort(function(ct,Qe){return ct.index>Qe.index?-1:ct.index<Qe.index?1:0});var Ue=[],Lt=[],ft=Ce.length;for(K=_e.length-1;K>=0;K--){if(fe=_e[K].frame,typeof fe.name=="number"&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!fe.name)for(;he[fe.name="frame "+F._transitionData._counter++];);if(he[fe.name]){for(te=0;te<Ce.length&&(Ce[te]||{}).name!==fe.name;te++);Ue.push({type:"replace",index:te,value:fe}),Lt.unshift({type:"replace",index:te,value:Ce[te]})}else Ee=Math.max(0,Math.min(_e[K].index,ft)),Ue.push({type:"insert",index:Ee,value:fe}),Lt.unshift({type:"delete",index:Ee}),ft++}var Ke=c.modifyFrames,gt=c.modifyFrames,wt=[F,Lt],lt=[F,Ue];return l&&l.add(F,Ke,wt,gt,lt),c.modifyFrames(F,Ue)}function Xe(F,U){if(F=i.getGraphDiv(F),!i.isPlotDiv(F))throw new Error("This element is not a Plotly plot: "+F);var W,K,fe=F._transitionData._frames,te=[],Ee=[];if(!U)for(U=[],W=0;W<fe.length;W++)U.push(W);for(U=U.slice(),U.sort(),W=U.length-1;W>=0;W--)K=U[W],te.push({type:"delete",index:K}),Ee.unshift({type:"insert",index:K,value:fe[K]});var Ce=c.modifyFrames,he=c.modifyFrames,ne=[F,Ee],_e=[F,te];return l&&l.add(F,Ce,ne,he,_e),c.modifyFrames(F,te)}function Ie(F){F=i.getGraphDiv(F);var U=F._fullLayout||{},W=F._fullData||[];return c.cleanPlot([],{},W,U),c.purge(F),o.purge(F),U._container&&U._container.remove(),delete F._context,F}function tt(F){var U=F._fullLayout,W=F.getBoundingClientRect();if(!i.equalDomRects(W,U._lastBBox)){var K=U._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(F));U._invScaleX=Math.sqrt(K[0][0]*K[0][0]+K[0][1]*K[0][1]+K[0][2]*K[0][2]),U._invScaleY=Math.sqrt(K[1][0]*K[1][0]+K[1][1]*K[1][1]+K[1][2]*K[1][2]),U._lastBBox=W}}function We(F){var U=e.select(F),W=F._fullLayout;if(W._calcInverseTransform=tt,W._calcInverseTransform(F),W._container=U.selectAll(".plot-container").data([0]),W._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),W._paperdiv=W._container.selectAll(".svg-container").data([0]),W._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),W._glcontainer=W._paperdiv.selectAll(".gl-container").data([{}]),W._glcontainer.enter().append("div").classed("gl-container",!0),W._paperdiv.selectAll(".main-svg").remove(),W._paperdiv.select(".modebar-container").remove(),W._paper=W._paperdiv.insert("svg",":first-child").classed("main-svg",!0),W._toppaper=W._paperdiv.append("svg").classed("main-svg",!0),W._modebardiv=W._paperdiv.append("div"),delete W._modeBar,W._hoverpaper=W._paperdiv.append("svg").classed("main-svg",!0),!W._uid){var K={};e.selectAll("defs").each(function(){this.id&&(K[this.id.split("-")[1]]=1)}),W._uid=i.randstr(K)}W._paperdiv.selectAll(".main-svg").attr(y.svgAttrs),W._defs=W._paper.append("defs").attr("id","defs-"+W._uid),W._clips=W._defs.append("g").classed("clips",!0),W._topdefs=W._toppaper.append("defs").attr("id","topdefs-"+W._uid),W._topclips=W._topdefs.append("g").classed("clips",!0),W._bgLayer=W._paper.append("g").classed("bglayer",!0),W._draggers=W._paper.append("g").classed("draglayer",!0);var fe=W._paper.append("g").classed("layer-below",!0);W._imageLowerLayer=fe.append("g").classed("imagelayer",!0),W._shapeLowerLayer=fe.append("g").classed("shapelayer",!0),W._cartesianlayer=W._paper.append("g").classed("cartesianlayer",!0),W._polarlayer=W._paper.append("g").classed("polarlayer",!0),W._smithlayer=W._paper.append("g").classed("smithlayer",!0),W._ternarylayer=W._paper.append("g").classed("ternarylayer",!0),W._geolayer=W._paper.append("g").classed("geolayer",!0),W._funnelarealayer=W._paper.append("g").classed("funnelarealayer",!0),W._pielayer=W._paper.append("g").classed("pielayer",!0),W._iciclelayer=W._paper.append("g").classed("iciclelayer",!0),W._treemaplayer=W._paper.append("g").classed("treemaplayer",!0),W._sunburstlayer=W._paper.append("g").classed("sunburstlayer",!0),W._indicatorlayer=W._toppaper.append("g").classed("indicatorlayer",!0),W._glimages=W._paper.append("g").classed("glimages",!0);var te=W._toppaper.append("g").classed("layer-above",!0);W._imageUpperLayer=te.append("g").classed("imagelayer",!0),W._shapeUpperLayer=te.append("g").classed("shapelayer",!0),W._selectionLayer=W._toppaper.append("g").classed("selectionlayer",!0),W._infolayer=W._toppaper.append("g").classed("infolayer",!0),W._menulayer=W._toppaper.append("g").classed("menulayer",!0),W._zoomlayer=W._toppaper.append("g").classed("zoomlayer",!0),W._hoverlayer=W._hoverpaper.append("g").classed("hoverlayer",!0),W._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),F.emit("plotly_framework")}t.animate=ye,t.addFrames=Ve,t.deleteFrames=Xe,t.addTraces=q,t.deleteTraces=B,t.extendTraces=Z,t.moveTraces=J,t.prependTraces=V,t.newPlot=P,t._doPlot=L,t.purge=Ie,t.react=He,t.redraw=D,t.relayout=ue,t.restyle=ie,t.setPlotConfig=N,t.update=we,t._guiRelayout=Q(ue),t._guiRestyle=Q(ie),t._guiUpdate=Q(we),t._storeDirectGUIEdit=ee})(ep);var ra={},Kz=ot;ra.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("mapbox")||t._has("map"))?500:0};ra.getRedrawFunc=function(t){return function(){Kz.getComponentMethod("colorbar","draw")(t)}};ra.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)};ra.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var A2=window.URL||window.webkitURL;ra.createObjectURL=function(t){return A2.createObjectURL(t)};ra.revokeObjectURL=function(t){return A2.revokeObjectURL(t)};ra.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=Qz(window.atob(t));return new window.Blob([r],{type:"image/"+e})};ra.octetStream=function(t){document.location.href="data:application/octet-stream"+t};function Qz(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}ra.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/;var fh=bt,Jz=zt,eR=yt,kv=/"/g,$l="TOBESTRIPPED",tR=new RegExp('("'+$l+")|("+$l+'")',"g");function rR(t){var e=fh.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 aR(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}var Bp=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(Jz.setRect,0,0,l,s).call(eR.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(f=0;f<c.length;f++){var u=c[f];u.toSVG&&u.toSVG(e)}if(o){var v=o.node().childNodes,h=Array.prototype.slice.call(v);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 m=fh.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){m.remove();return}else m.style({visibility:null,display:null});var y=this.style.fontFamily;y&&y.indexOf('"')!==-1&&m.style("font-family",y.replace(kv,$l));var b=this.style.fontWeight;b&&(b==="normal"||b==="400")&&m.style("font-weight",void 0);var _=this.style.fontStyle;_&&_==="normal"&&m.style("font-style",void 0);var g=this.style.fontVariant;g&&g==="normal"&&m.style("font-variant",void 0)}),n.selectAll(".gradient_filled,.pattern_filled").each(function(){var m=fh.select(this),y=this.style.fill;y&&y.indexOf("url(")!==-1&&m.style("fill",y.replace(kv,$l));var b=this.style.stroke;b&&b.indexOf("url(")!==-1&&m.style("stroke",b.replace(kv,$l))}),(r==="pdf"||r==="eps")&&n.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),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=rR(p),p=aR(p),p=p.replace(tR,"'"),p},iR=ke,nR=Eh.EventEmitter,yl=ra;function oR(t){var e=t.emitter||new nR,r=new Promise(function(a,i){var n=window.Image,o=t.svg,l=t.format||"png",s=t.canvas,f=t.scale||1,c=t.width||300,u=t.height||150,v=f*c,h=f*u,d=s.getContext("2d",{willReadFrequently:!0}),p=new n,m,y;l==="svg"||iR.isSafari()?y=yl.encodeSVG(o):(m=yl.createBlob(o,"svg"),y=yl.createObjectURL(m)),s.width=v,s.height=h,p.onload=function(){var b;switch(m=null,yl.revokeObjectURL(y),l!=="svg"&&d.drawImage(p,0,0,v,h),l){case"jpeg":b=s.toDataURL("image/jpeg");break;case"png":b=s.toDataURL("image/png");break;case"webp":b=s.toDataURL("image/webp");break;case"svg":b=y;break;default:var _="Image format is not jpeg, png, svg or webp.";if(i(new Error(_)),!t.promise)return e.emit("error",_)}a(b),t.promise||e.emit("success",b)},p.onerror=function(b){if(m=null,yl.revokeObjectURL(y),i(b),!t.promise)return e.emit("error",b)},p.src=y});return t.promise?r:e}var Gp=oR,T0=kt,k0=ep,lR=hr,Xa=ke,gl=ra,sR=Bp,fR=Gp,cR=Rc.version,Av={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 uR(t,e){e=e||{};var r,a,i,n;Xa.isPlainObject(t)?(r=t.data||[],a=t.layout||{},i=t.config||{},n={}):(t=Xa.getGraphDiv(t),r=Xa.extendDeep([],t.data),a=Xa.extendDeep({},t.layout),i=t._context,n=t._fullLayout||{});function o(w){return!(w in e)||Xa.validate(e[w],Av[w])}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 "+Xa.join2(Av.format.values,", "," or ")+".");var l={};function s(w,T){return Xa.coerce(e,l,Av,w,T)}var f=s("format"),c=s("width"),u=s("height"),v=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 m=Xa.extendFlat({},a);c?m.width=c:e.width===null&&T0(n.width)&&(m.width=n.width),u?m.height=u:e.height===null&&T0(n.height)&&(m.height=n.height);var y=Xa.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:h}),b=gl.getRedrawFunc(p);function _(){return new Promise(function(w){setTimeout(w,gl.getDelay(p._fullLayout))})}function g(){return new Promise(function(w,T){var A=sR(p,f,v),M=p._fullLayout.width,S=p._fullLayout.height;function L(){k0.purge(p),document.body.removeChild(p)}if(f==="full-json"){var z=lR.graphJson(p,!1,"keepdata","object",!0,!0);return z.version=cR,z=JSON.stringify(z),L(),w(d?z:gl.encodeJSON(z))}if(L(),f==="svg")return w(d?A:gl.encodeSVG(A));var N=document.createElement("canvas");N.id=Xa.randstr(),fR({format:f,width:M,height:S,scale:v,canvas:N,svg:A,promise:!0}).then(w).catch(T)})}function x(w){return d?w.replace(gl.IMAGE_URL_PREFIX,""):w}return new Promise(function(w,T){k0.newPlot(p,r,m,y).then(b).then(_).then(g).then(function(A){w(x(A))}).catch(function(A){T(A)})})}var M2=uR,ba=ke,vR=hr,dR=Xo,hR=Go.dfltConfig,Da=ba.isPlainObject,_n=Array.isArray,Mv=ba.isArrayOrTypedArray,pR=function(e,r){e===void 0&&(e=[]),r===void 0&&(r={});var a=dR.get(),i=[],n={_context:ba.extendFlat({},hR)},o,l;_n(e)?(n.data=ba.extendDeep([],e),o=e):(n.data=[],o=[],i.push(br("array","data"))),Da(r)?(n.layout=ba.extendDeep({},r),l=r):(n.layout={},l={},arguments.length>1&&i.push(br("object","layout"))),vR.supplyDefaults(n);for(var s=n._fullData,f=o.length,c=0;c<f;c++){var u=o[c],v=["data",c];if(!Da(u)){i.push(br("object",v));continue}var h=s[c],d=h.type,p=a.traces[d].attributes;p.type={valType:"enumerated",values:[d]},h.visible===!1&&u.visible!==!1&&i.push(br("invisible",v)),yc(u,h,p,i,v)}var m=n._fullLayout,y=mR(a,s);return yc(l,m,y,i,"layout"),i.length===0?void 0:i};function yc(t,e,r,a,i,n){n=n||[];for(var o=Object.keys(t),l=0;l<o.length;l++){var s=o[l],f=n.slice();f.push(s);var c=t[s],u=e[s],v=bR(r,s),h=(v||{}).valType,d=h==="info_array",p=h==="colorscale",m=(v||{}).items;if(!gR(r,s))a.push(br("schema",i,f));else if(Da(c)&&Da(u)&&h!=="any")yc(c,u,v,a,i,f);else if(d&&_n(c)){c.length>u.length&&a.push(br("unused",i,f.concat(u.length)));var y=u.length,b=Array.isArray(m);b&&(y=Math.min(y,m.length));var _,g,x,w,T;if(v.dimensions===2)for(g=0;g<y;g++)if(_n(c[g])){c[g].length>u[g].length&&a.push(br("unused",i,f.concat(g,u[g].length)));var A=u[g].length;for(_=0;_<(b?Math.min(A,m[g].length):A);_++)x=b?m[g][_]:m,w=c[g][_],T=u[g][_],ba.validate(w,x)?T!==w&&T!==+w&&a.push(br("dynamic",i,f.concat(g,_),w,T)):a.push(br("value",i,f.concat(g,_),w))}else a.push(br("array",i,f.concat(g),c[g]));else for(g=0;g<y;g++)x=b?m[g]:m,w=c[g],T=u[g],ba.validate(w,x)?T!==w&&T!==+w&&a.push(br("dynamic",i,f.concat(g),w,T)):a.push(br("value",i,f.concat(g),w))}else if(v.items&&!d&&_n(c)){var M=m[Object.keys(m)[0]],S=[],L,z;for(L=0;L<u.length;L++){var N=u[L]._index||L;if(z=f.slice(),z.push(N),Da(c[N])&&Da(u[L])){S.push(N);var $=c[N],R=u[L];Da($)&&$.visible!==!1&&R.visible===!1?a.push(br("invisible",i,z)):yc($,R,M,a,i,z)}}for(L=0;L<c.length;L++)z=f.slice(),z.push(L),Da(c[L])?S.indexOf(L)===-1&&a.push(br("unused",i,z)):a.push(br("object",i,z,c[L]))}else!Da(c)&&Da(u)?a.push(br("object",i,f,c)):!Mv(c)&&Mv(u)&&!d&&!p?a.push(br("array",i,f,c)):s in e?ba.validate(c,v)?v.valType==="enumerated"&&(v.coerceNumber&&c!==+u||!Mv(c)&&c!==u||String(c)!==String(u))&&a.push(br("dynamic",i,f,c,u)):a.push(br("value",i,f,c)):a.push(br("unused",i,f,c))}return a}function mR(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?ba.extendFlat(r[n.attributes.subplot.dflt],o):ba.extendFlat(r,o))}return r}var yR={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=Qi(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=Qi(t)+"key "+e,r+" must be linked to an array container"},schema:function(t,e){return Qi(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var a=Da(r)?"container":"key";return Qi(t)+a+" "+e+" did not get coerced"},dynamic:function(t,e,r,a){return[Qi(t)+"key",e,"(set to '"+r+"')","got reset to","'"+a+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?Qi(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[Qi(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function Qi(t){return _n(t)?"In data trace "+t[1]+", ":"In "+t+", "}function br(t,e,r,a,i){r=r||"";var n,o;_n(e)?(n=e[0],o=e[1]):(n=e,o=null);var l=_R(r),s=yR[t](e,l,a,i);return ba.log(s),{code:t,container:n,trace:o,path:r,astr:l,msg:s}}function gR(t,e){var r=S2(e),a=r.keyMinusId,i=r.id;return a in t&&t[a]._isSubplotObj&&i?!0:e in t}function bR(t,e){if(e in t)return t[e];var r=S2(e);return t[r.keyMinusId]}var xR=ba.counterRegex("([a-z]+)");function S2(t){var e=t.match(xR);return{keyMinusId:e&&e[1],id:e&&e[2]}}function _R(t){if(!_n(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 wR=ke,ff=ra;function TR(t,e,r){var a=document.createElement("a"),i="download"in a,n=new Promise(function(o,l){var s,f;if(i)return s=ff.createBlob(t,r),f=ff.createObjectURL(s),a.href=f,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),ff.revokeObjectURL(f),s=null,o(e);if(wR.isSafari()){var c=r==="svg"?",":";base64,";return ff.octetStream(c+encodeURIComponent(t)),o(e)}l(new Error("download error"))});return n}var kR=TR,A0=ke,AR=M2,MR=kR;function SR(t,e){var r;return A0.isPlainObject(t)||(r=A0.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.")),r&&(r._snapshotInProgress=!0);var n=AR(t,e),o=e.filename||t.fn||"newplot";o+="."+e.format.replace("-","."),n.then(function(l){return r&&(r._snapshotInProgress=!1),MR(l,o,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),i(l)})})}var L2=SR,Up={},Qr=ke,Jr=Qr.isPlainObject,C2=Xo,D2=hr,LR=_a,P2=Ht,E2=Go.dfltConfig;Up.makeTemplate=function(t){t=Qr.isPlainObject(t)?t:Qr.getGraphDiv(t),t=Qr.extendDeep({_context:E2},{data:t.data,layout:t.layout}),D2.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={};Hl(h,d,DR.bind(null,h));var p=Qr.coerce(h,{},LR,"type"),m=a.data[p];m||(m=a.data[p]=[]),m.push(d)}),Hl(r,a.layout,CR.bind(null,r)),delete a.layout.template;var i=r.template;if(Jr(i)){var n=i.layout,o,l,s,f,c,u;Jr(n)&&gc(n,a.layout);var v=i.data;if(Jr(v)){for(l in a.data)if(s=v[l],Array.isArray(s)){for(c=a.data[l],u=c.length,f=s.length,o=0;o<u;o++)gc(s[o%f],c[o]);for(o=u;o<f;o++)c.push(Qr.extendDeep({},s[o]))}for(l in v)l in a.data||(a.data[l]=Qr.extendDeep([],v[l]))}}return a};function gc(t,e){t=Qr.extendDeep({},t);var r=Object.keys(t).sort(),a,i;function n(c,u,v){if(Jr(u)&&Jr(c))gc(c,u);else if(Array.isArray(u)&&Array.isArray(c)){var h=P2.arrayTemplater({_template:t},v);for(i=0;i<u.length;i++){var d=u[i],p=h.newItem(d)._template;p&&gc(p,d)}var m=h.defaultItems();for(i=0;i<m.length;i++)u.push(m[i]._template);for(i=0;i<u.length;i++)delete u[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,bc(o)===o)for(var s in e){var f=bc(s);s!==f&&f===o&&!(s in t)&&n(l,e[s],o)}}}function bc(t){return t.replace(/[0-9]+$/,"")}function Hl(t,e,r,a,i){var n=i&&r(i);for(var o in t){var l=t[o],s=ha(t,o,a),f=ha(t,o,i),c=r(f);if(!c){var u=bc(o);u!==o&&(f=ha(t,u,i),c=r(f))}if(!(n&&n===c)&&!(!c||c._noTemplating||c.valType==="data_array"||c.arrayOk&&Array.isArray(l)))if(!c.valType&&Jr(l))Hl(l,e,r,s,f);else if(c._isLinkedToArray&&Array.isArray(l))for(var v=!1,h=0,d={},p=0;p<l.length;p++){var m=l[p];if(Jr(m)){var y=m.name;if(y)d[y]||(Hl(m,e,r,ha(l,h,s),ha(l,h,f)),h++,d[y]=1);else if(!v){var b=P2.arrayDefaultKey(o),_=ha(t,b,a),g=ha(l,h,s);Hl(m,e,r,g,ha(l,h,f));var x=Qr.nestedProperty(e,g),w=Qr.nestedProperty(e,_);w.set(x.get()),x.set(null),v=!0}}}else{var T=Qr.nestedProperty(e,s);T.set(l)}}}function CR(t,e){return C2.getLayoutValObject(t,Qr.nestedProperty({},e).parts)}function DR(t,e){return C2.getTraceValObject(t,Qr.nestedProperty({},e).parts)}function ha(t,e,r){var a;return r?Array.isArray(t)?a=r+"["+e+"]":a=r+"."+e:a=e,a}Up.validateTemplate=function(t,e){var r=Qr.extendDeep({},{_context:E2,data:t.data,layout:t.layout}),a=r.layout||{};Jr(e)||(e=a.template||{});var i=e.layout,n=e.data,o=[];r.layout=a,r.layout.template=e,D2.supplyDefaults(r);var l=r._fullLayout,s=r._fullData,f={};function c(_,g){for(var x in _)if(x.charAt(0)!=="_"&&Jr(_[x])){var w=bc(x),T=[],A;for(A=0;A<g.length;A++)T.push(ha(_,x,g[A])),w!==x&&T.push(ha(_,w,g[A]));for(A=0;A<T.length;A++)f[T[A]]=1;c(_[x],T)}}function u(_,g){for(var x in _)if(x.indexOf("defaults")===-1&&Jr(_[x])){var w=ha(_,x,g);f[w]?u(_[x],w):o.push({code:"unused",path:w})}}if(Jr(i)?(c(l,["layout"]),u(i,"layout")):o.push({code:"layout"}),!Jr(n))o.push({code:"data"});else{for(var v={},h,d=0;d<s.length;d++){var p=s[d];h=p.type,v[h]=(v[h]||0)+1,p._fullInput._template||o.push({code:"missing",index:p.index,traceType:h})}for(h in n){var m=n[h].length,y=v[h]||0;m>y?o.push({code:"unused",traceType:h,templateCount:m,dataCount:y}):y>m&&o.push({code:"reused",traceType:h,templateCount:m,dataCount:y})}}function b(_,g){for(var x in _)if(x.charAt(0)!=="_"){var w=_[x],T=ha(_,x,g);Jr(w)?(Array.isArray(_)&&w._template===!1&&w.templateitemname&&o.push({code:"missing",path:T,templateitemname:w.templateitemname}),b(w,T)):Array.isArray(w)&&PR(w)&&b(w,T)}}if(b({data:s,layout:l},""),o.length)return o.map(ER)};function PR(t){for(var e=0;e<t.length;e++)if(Jr(t[e]))return!0}function ER(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 gr=ep;qt._doPlot=gr._doPlot;qt.newPlot=gr.newPlot;qt.restyle=gr.restyle;qt.relayout=gr.relayout;qt.redraw=gr.redraw;qt.update=gr.update;qt._guiRestyle=gr._guiRestyle;qt._guiRelayout=gr._guiRelayout;qt._guiUpdate=gr._guiUpdate;qt._storeDirectGUIEdit=gr._storeDirectGUIEdit;qt.react=gr.react;qt.extendTraces=gr.extendTraces;qt.prependTraces=gr.prependTraces;qt.addTraces=gr.addTraces;qt.deleteTraces=gr.deleteTraces;qt.moveTraces=gr.moveTraces;qt.purge=gr.purge;qt.addFrames=gr.addFrames;qt.deleteFrames=gr.deleteFrames;qt.animate=gr.animate;qt.setPlotConfig=gr.setPlotConfig;var zR=Oc.getGraphDiv,RR=Cp.eraseActiveShape;qt.deleteActiveShape=function(t){return RR(zR(t))};qt.toImage=M2;qt.validate=pR;qt.downloadImage=L2;var z2=Up;qt.makeTemplate=z2.makeTemplate;qt.validateTemplate=z2.validateTemplate;var Sv=ke,IR=ot,Vp=function(e,r,a,i){var n=i("x"),o=i("y"),l,s=IR.getComponentMethod("calendars","handleTraceDefaults");if(s(e,r,["x","y"],a),n){var f=Sv.minRowLength(n);o?l=Math.min(f,Sv.minRowLength(o)):(l=f,i("y0"),i("dy"))}else{if(!o)return 0;l=Sv.minRowLength(o),i("x0"),i("dx")}return r._length=l,l},M0=ke.dateTick0,FR=cr,NR=FR.ONEWEEK;function S0(t,e){return t%NR===0?M0(e,1):M0(e,0)}var yu=function(e,r,a,i,n){if(n||(n={x:!0,y:!0}),n.x){var o=i("xperiod");o&&(i("xperiod0",S0(o,r.xcalendar)),i("xperiodalignment"))}if(n.y){var l=i("yperiod");l&&(i("yperiod0",S0(l,r.ycalendar)),i("yperiodalignment"))}},L0=["orientation","groupnorm","stackgaps"],$R=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 u={orientation:r.x&&!r.y?"h":"v"},v=0;v<L0.length;v++){var h=L0[v],d=h+"Found";if(!f[d]){var p=e[h]!==void 0,m=h==="orientation";if((p||c)&&(f[h]=i(h,u[h]),m&&(f.fillDflt=f[h]==="h"?"tonextx":"tonexty"),p&&(f[d]=!0,!c&&(delete f.traces[0][h],m))))for(var y=0;y<f.traces.length-1;y++){var b=f.traces[y];b._input.fill!==b.fill&&(b.fill=f.fillDflt)}}}return f}},C0=yt,D0=ja.hasColorscale,P0=xs,HR=jr,R2=function(e,r,a,i,n,o){var l=HR.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),D0(e,"marker")&&P0(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=C0.background:f=C0.defaultLine,n("marker.line.color",f),D0(e,"marker.line")&&P0(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")}},OR=ke.isArrayOrTypedArray,jR=ja.hasColorscale,BR=xs,I2=function(e,r,a,i,n,o){o||(o={});var l=(e.marker||{}).color;if(l&&l._inputArray&&(l=l._inputArray),n("line.color",a),jR(e,"line"))BR(e,r,i,n,{prefix:"line.",cLetter:"c"});else{var s=(OR(l)?!1:l)||a;n("line.color",s)}n("line.width"),o.noDash||n("line.dash"),o.backoff&&n("line.backoff")},GR=function(e,r,a){var i=a("line.shape");i==="spline"&&a("line.smoothing")},UR=ke,F2=function(t,e,r,a,i){i=i||{},a("textposition"),UR.coerceFont(a,"textfont",i.font||r.font,i),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))},Bf=yt,E0=ke.isArrayOrTypedArray;function VR(t){for(var e=Bf.interpolate(t[0][1],t[1][1],.5),r=2;r<t.length;r++){var a=Bf.interpolate(t[r-1][1],t[r][1],.5);e=Bf.interpolate(e,a,t[r-1][0]/t[r][0])}return e}var N2=function(e,r,a,i,n){n||(n={});var o=!1;if(r.marker){var l=r.marker.color,s=(r.marker.line||{}).color;l&&!E0(l)?o=l:s&&!E0(s)&&(o=s)}var f;if(n.moduleHasFillgradient){var c=i("fillgradient.type");if(c!=="none"){i("fillgradient.start"),i("fillgradient.stop");var u=i("fillgradient.colorscale");u&&(f=VR(u))}}i("fillcolor",Bf.addOpacity((r.line||{}).color||o||f||a,.5))},z0=ke,WR=ot,XR=Vi,YR=pu,Xn=jr,qR=Vp,ZR=yu,KR=$R,QR=R2,JR=I2,R0=GR,eI=F2,tI=N2,rI=ke.coercePattern,aI=function(e,r,a,i){function n(h,d){return z0.coerce(e,r,XR,h,d)}var o=qR(e,r,i,n);if(o||(r.visible=!1),!!r.visible){ZR(e,r,i,n),n("xhoverformat"),n("yhoverformat"),n("zorder");var l=KR(e,r,i,n);i.scattermode==="group"&&r.orientation===void 0&&n("orientation","v");var s=!l&&o<YR.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("mode",s),Xn.hasMarkers(r)&&QR(e,r,a,i,n,{gradient:!0}),Xn.hasLines(r)&&(JR(e,r,a,i,n,{backoff:!0}),R0(e,r,n),n("connectgaps"),n("line.simplify")),Xn.hasText(r)&&(n("texttemplate"),eI(e,r,i,n));var f=[];(Xn.hasMarkers(r)||Xn.hasText(r))&&(n("cliponaxis"),n("marker.maxdisplayed"),f.push("points")),n("fill",l?l.fillDflt:"none"),r.fill!=="none"&&(tI(e,r,a,n,{moduleHasFillgradient:!0}),Xn.hasLines(r)||R0(e,r,n),rI(n,"fillpattern",r.fillcolor,!1));var c=(r.line||{}).color,u=(r.marker||{}).color;(r.fill==="tonext"||r.fill==="toself")&&f.push("fills"),n("hoveron",f.join("+")||"points"),r.hoveron!=="fills"&&n("hovertemplate");var v=WR.getComponentMethod("errorbars","supplyDefaults");v(e,r,c||u||a,{axis:"y"}),v(e,r,c||u||a,{axis:"x",inherit:"y"}),z0.coerceSelectionMarkerOpacity(r,n)}},iI=pi.getAxisGroup,Wp=function(e,r,a,i,n){var o=r.orientation,l=r[{v:"x",h:"y"}[o]+"axis"],s=iI(a,l)+o,f=a._alignmentOpts||{},c=i("alignmentgroup"),u=f[s];u||(u=f[s]={});var v=u[c];v?v.traces.push(r):v=u[c]={traces:[r],alignmentIndex:Object.keys(u).length,offsetGroups:{}};var h=i("offsetgroup")||"",d=v.offsetGroups,p=d[h];r._offsetIndex=0,(n!=="group"||h)&&(p||(p=d[h]={offsetIndex:Object.keys(d).length}),r._offsetIndex=p.offsetIndex)},nI=ke,oI=Wp,lI=Vi,$2=function(e,r){var a,i,n,o=r.scattermode;function l(v){return nI.coerce(i._input,i,lI,v)}if(r.scattermode==="group")for(n=0;n<e.length;n++)i=e[n],i.type==="scatter"&&(a=i._input,oI(a,i,r,l,o));for(n=0;n<e.length;n++){var s=e[n];if(s.type==="scatter"){var f=s.fill;if(!(f==="none"||f==="toself")&&(s.opacity=void 0,f==="tonexty"||f==="tonextx"))for(var c=n-1;c>=0;c--){var u=e[c];if(u.type==="scatter"&&u.xaxis===s.xaxis&&u.yaxis===s.yaxis){u.opacity=void 0;break}}}}},sI=ke,fI=tp,cI=function(t,e){function r(i,n){return sI.coerce(t,e,fI,i,n)}var a=e.barmode==="group";e.scattermode==="group"&&r("scattergap",a?e.bargap:.2)},uI=kt,H2=ke,vI=H2.dateTime2ms,cf=H2.incrementMonth,dI=cr,hI=dI.ONEAVGMONTH,gu=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(uI(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",u=n==="end",v=e[a+"period0"],h=vI(v,f)||0,d=[],p=[],m=[],y=i.length,b=0;b<y;b++){var _=i[b],g,x,w;if(l){for(g=Math.round((_-h)/(l*hI)),w=cf(h,l*g,f);w>_;)w=cf(w,-l,f);for(;w<=_;)w=cf(w,l,f);x=cf(w,-l,f)}else{for(g=Math.round((_-h)/o),w=h+g*o;w>_;)w-=o;for(;w<=_;)w+=o;x=w-o}d[b]=c?x:u?w:(x+w)/2,p[b]=x,m[b]=w}return{vals:d,starts:p,ends:m}},Lv=ja.hasColorscale,Cv=np,I0=jr,O2=function(e,r){I0.hasLines(r)&&Lv(r,"line")&&Cv(e,r,{vals:r.line.color,containerStr:"line"}),I0.hasMarkers(r)&&(Lv(r,"marker")&&Cv(e,r,{vals:r.marker.color,containerStr:"marker"}),Lv(r,"marker.line")&&Cv(e,r,{vals:r.marker.line.color,containerStr:"marker.line"}))},nr=ke,j2=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;nr.mergeArray(r.text,e,"tx"),nr.mergeArray(r.texttemplate,e,"txt"),nr.mergeArray(r.hovertext,e,"htx"),nr.mergeArray(r.customdata,e,"data"),nr.mergeArray(r.textposition,e,"tp"),r.textfont&&(nr.mergeArrayCastPositive(r.textfont.size,e,"ts"),nr.mergeArray(r.textfont.color,e,"tc"),nr.mergeArray(r.textfont.family,e,"tf"),nr.mergeArray(r.textfont.weight,e,"tw"),nr.mergeArray(r.textfont.style,e,"ty"),nr.mergeArray(r.textfont.variant,e,"tv"),nr.mergeArray(r.textfont.textcase,e,"tC"),nr.mergeArray(r.textfont.lineposition,e,"tE"),nr.mergeArray(r.textfont.shadow,e,"tS"));var i=r.marker;if(i){nr.mergeArrayCastPositive(i.size,e,"ms"),nr.mergeArrayCastPositive(i.opacity,e,"mo"),nr.mergeArray(i.symbol,e,"mx"),nr.mergeArray(i.angle,e,"ma"),nr.mergeArray(i.standoff,e,"mf"),nr.mergeArray(i.color,e,"mc");var n=i.line;i.line&&(nr.mergeArray(n.color,e,"mlc"),nr.mergeArrayCastPositive(n.width,e,"mlw"));var o=i.gradient;o&&o.type!=="none"&&(nr.mergeArray(o.type,e,"mgt"),nr.mergeArray(o.color,e,"mgc"))}},F0=ke,B2=function(e,r){F0.isArrayOrTypedArray(r.selectedpoints)&&F0.tagSelected(e,r)},N0=kt,ch=ke,ns=Ot,$0=gu,Dv=cr.BADNUM,uh=jr,pI=O2,mI=j2,yI=B2;function gI(t,e){var r=t._fullLayout,a=e._xA=ns.getFromId(t,e.xaxis||"x","x"),i=e._yA=ns.getFromId(t,e.yaxis||"y","y"),n=a.makeCalcdata(e,"x"),o=i.makeCalcdata(e,"y"),l=$0(e,a,"x",n),s=$0(e,i,"y",o),f=l.vals,c=s.vals,u=e._length,v=new Array(u),h=e.ids,d=Xp(e,r,a,i),p=!1,m,y,b,_,g,x;V2(r,e);var w="x",T="y",A;if(d)ch.pushUnique(d.traceIndices,e.index),m=d.orientation==="v",m?(T="s",A="x"):(w="s",A="y"),g=d.stackgaps==="interpolate";else{var M=U2(e,u);G2(t,e,a,i,f,c,M)}var S=!!e.xperiodalignment,L=!!e.yperiodalignment;for(y=0;y<u;y++){var z=v[y]={},N=N0(f[y]),$=N0(c[y]);N&&$?(z[w]=f[y],z[T]=c[y],S&&(z.orig_x=n[y],z.xEnd=l.ends[y],z.xStart=l.starts[y]),L&&(z.orig_y=o[y],z.yEnd=s.ends[y],z.yStart=s.starts[y])):d&&(m?N:$)?(z[A]=m?f[y]:c[y],z.gap=!0,g?(z.s=Dv,p=!0):z.s=0):z[w]=z[T]=Dv,h&&(z.id=String(h[y]))}if(mI(v,e),pI(t,e),yI(v,e),d){for(y=0;y<v.length;)v[y][A]===Dv?v.splice(y,1):y++;if(ch.sort(v,function(P,k){return P[A]-k[A]||P.i-k.i}),p){for(y=0;y<v.length-1&&v[y].gap;)y++;for(x=v[y].s,x||(x=v[y].s=0),b=0;b<y;b++)v[b].s=x;for(_=v.length-1;_>y&&v[_].gap;)_--;for(x=v[_].s,b=v.length-1;b>_;b--)v[b].s=x;for(;y<_;)if(y++,v[y].gap){for(b=y+1;v[b].gap;)b++;for(var R=v[y-1][A],H=v[y-1].s,D=(v[b].s-H)/(v[b][A]-R);y<b;)v[y].s=H+(v[y][A]-R)*D,y++}}}return v}function G2(t,e,r,a,i,n,o){var l=e._length,s=t._fullLayout,f=r._id,c=a._id,u=s._firstScatter[W2(e)]===e.uid,v=(Xp(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 m=l<2||i[0]!==i[l-1]||n[0]!==n[l-1];m&&(h==="tozerox"||h==="tonextx"&&(u||v==="h"))?d.tozero=!0:!(e.error_y||{}).visible&&(h==="tonexty"||h==="tozeroy"||!uh.hasMarkers(e)&&!uh.hasText(e))&&(d.padded=!1,d.ppad=0),m&&(h==="tozeroy"||h==="tonexty"&&(u||v==="v"))?p.tozero=!0:(h==="tonextx"||h==="tozerox")&&(p.padded=!1),f&&(e._extremes[f]=ns.findExtremes(r,i,d)),c&&(e._extremes[c]=ns.findExtremes(a,n,p))}function U2(t,e){if(uh.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)},ch.isArrayOrTypedArray(r.size)){var n={type:"linear"};ns.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 V2(t,e){var r=W2(e),a=t._firstScatter;a[r]||(a[r]=e.uid)}function W2(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function Xp(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 Yp={calc:gI,calcMarkerSize:U2,calcAxisExpansion:G2,setFirstScatter:V2,getStackOpts:Xp},bI=bu,xI=ke.distinctVals;function bu(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=xI(i);this.distinctPositions=c.vals,c.vals.length===1&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(c.minDiff,r);var u=(e.posAxis||{}).type;(u==="category"||u==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}bu.prototype.put=function(e,r,a){var i=this.getLabel(e,r,a),n=this.bins[i]||0;return this.bins[i]=n+a,n};bu.prototype.get=function(e,r,a){var i=this.getLabel(e,r,a);return this.bins[i]||0};bu.prototype.getLabel=function(e,r,a){var i=a<0&&this.sepNegVal?"v":"^",n=this.overlapNoMerge?e:Math.round(e/this.binWidth);return i+n+"g"+r};var xa=kt,Fi=ke.isArrayOrTypedArray,zo=cr.BADNUM,_I=ot,os=Ot,wI=pi.getAxisGroup,xu=bI;function TI(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&&_I.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 u=t.calcdata[f],v=0;v<u.length;v++)typeof u[v].ph0=="function"&&(u[v].ph0=u[v].ph0()),typeof u[v].ph1=="function"&&(u[v].ph1=u[v].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};vh(t,r,a,s,h),vh(t,a,r,l,h)}function vh(t,e,r,a,i){if(a.length){var n,o,l,s,f;switch(MI(r,a),i.mode){case"overlay":Pv(t,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&&SI(t,e,r,o,i),n.length&&Pv(t,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);AI(o),o.length&&LI(t,e,r,o,i),n.length&&Pv(t,e,r,n,i);break}kI(a),RI(a,e)}}function kI(t){var e,r,a,i,n,o,l;for(e=0;e<t.length;e++)r=t[e],a=r[0].trace,i=r[0].t,i.cornerradiusvalue===void 0&&(n=a.marker?a.marker.cornerradius:void 0,n!==void 0&&(o=xa(n)?+n:+n.slice(0,-1),l=xa(n)?"px":"%",i.cornerradiusvalue=o,i.cornerradiusform=l))}function AI(t){if(!(t.length<2)){var e,r,a,i,n,o,l;for(e=0;e<t.length&&(r=t[e],a=r[0].trace,n=a.marker?a.marker.cornerradius:void 0,n===void 0);e++);if(n!==void 0)for(o=xa(n)?+n:+n.slice(0,-1),l=xa(n)?"px":"%",e=0;e<t.length;e++)r=t[e],i=r[0].t,i.cornerradiusvalue=o,i.cornerradiusform=l}}function MI(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(Fi(o)){for(a=0;a<Math.min(o.length,i.length);a++)l=f(o[a],0,s),xa(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=xa(l);for(l=c?l:0,a=0;a<i.length;a++)i[a].b=l,c&&(i[a].hasB=1)}}}function Pv(t,e,r,a,i){for(var n=0;n<a.length;n++){var o=a[n],l=new xu([o],{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});qp(t,e,l,i),i.norm?(Y2(l),Zp(r,l,i)):X2(r,l)}}function SI(t,e,r,a,i){var n=new xu(a,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});qp(t,e,n,i),EI(n,e),i.norm?(Y2(n),Zp(r,n,i)):X2(r,n)}function LI(t,e,r,a,i){var n=new xu(a,{posAxis:e,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});qp(t,e,n,i),PI(r,n,i);for(var o=0;o<a.length;o++)for(var l=a[o],s=l[0].t.offsetindex,f=0;f<l.length;f++){var c=l[f];if(c.s!==zo){var u=c.b+c.s===n.get(c.p,s,c.s);u&&(c._outmost=!0)}}i.norm&&Zp(r,n,i)}function qp(t,e,r,a){var i=t._fullLayout,n=r.positions,o=r.distinctPositions,l=r.minDiff,s=r.traces,f=s.length,c=n.length!==o.length,u=l*(1-a.gap),v,h,d,p;if(e._id==="angularaxis")v=u,h=v*(1-(a.groupgap||0)),d=-h/2;else{var m=wI(i,e._id)+s[0][0].trace.orientation;p=i._alignmentOpts[m]||{}}for(var y=0;y<f;y++){var b=s[y],_=b[0].trace;if(e._id!=="angularaxis"){var g=p[_.alignmentgroup]||{},x=Object.keys(g.offsetGroups||{}).length;x?v=u/x:v=c?u/f:u,h=v*(1-(a.groupgap||0)),x?d=((2*_._offsetIndex+1-x)*v-h)/2:d=c?((2*y+1-f)*v-h)/2:-h/2}var w=b[0].t;w.barwidth=h,w.offsetindex=_._offsetIndex||0,w.poffset=d,w.bargroupwidth=u,w.bardelta=l}r.binWidth=s[0][0].t.barwidth/100,CI(r),DI(e,r),e._id==="angularaxis"?H0(e,r):H0(e,r,c)}function CI(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(Fi(s)){for(c=Array.prototype.slice.call(s,0,i.length),a=0;a<c.length;a++)xa(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 u=o._width||o.width,v=l.barwidth;if(Fi(u)){var h=Array.prototype.slice.call(u,0,i.length);for(a=0;a<h.length;a++)xa(h[a])||(h[a]=v);for(a=h.length;a<i.length;a++)h.push(v);if(l.barwidth=h,s===void 0){for(c=[],a=0;a<i.length;a++)c.push(f+(v-h[a])/2);l.poffset=c}}else u!==void 0&&(l.barwidth=u,s===void 0&&(l.poffset=f+(v-u)/2))}}function DI(t,e){for(var r=e.traces,a=Qo(t),i=0;i<r.length;i++)for(var n=r[i],o=n[0].t,l=o.poffset,s=Fi(l),f=o.barwidth,c=Fi(f),u=0;u<n.length;u++){var v=n[u],h=v.w=c?f[u]:f;v.p===void 0&&(v.p=v[a],v["orig_"+a]=v[a]);var d=(s?l[u]:l)+h/2;v[a]=v.p+d}}function H0(t,e,r){var a=e.traces,i=e.minDiff,n=i/2;os.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=[],u,v,h,d;for(d=0;d<l.length;d++)u=l[d],v=u.p-n,h=u.p+n,c.push(v,h);if(f.width||f.offset){var p=s.t,m=p.poffset,y=p.barwidth,b=Fi(m),_=Fi(y);for(d=0;d<l.length;d++){u=l[d];var g=b?m[d]:m,x=_?y[d]:y;v=u.p+g,h=v+x,c.push(v,h)}}f._extremes[t._id]=os.findExtremes(t,c,{padded:!1})}}function X2(t,e){for(var r=e.traces,a=Qo(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,u=0;u<n.length;u++){var v=n[u],h=l?0:v.b,d=l?s?v.y:v.x:h+v.s;v[a]=d,f.push(d),v.hasB&&f.push(h),(!v.hasB||!v.b)&&(c=!0)}o._extremes[t._id]=os.findExtremes(t,f,{tozero:c,padded:!0})}}function PI(t,e,r){var a=Qo(t),i=e.traces,n,o,l,s,f,c,u;for(s=0;s<i.length;s++)if(n=i[s],o=n[0].trace,o.type==="funnel")for(u=n[0].t.offsetindex,f=0;f<n.length;f++)c=n[f],c.s!==zo&&e.put(c.p,u,-.5*c.s);for(s=0;s<i.length;s++){n=i[s],o=n[0].trace,l=o.type==="funnel",u=o.type==="barpolar"?0:n[0].t.offsetindex;var v=[];for(f=0;f<n.length;f++)if(c=n[f],c.s!==zo){var h;l?h=c.s:h=c.s+c.b;var d=e.put(c.p,u,h),p=d+h;c.b=d,c[a]=p,r.norm||(v.push(p),c.hasB&&v.push(d))}r.norm||(o._extremes[t._id]=os.findExtremes(t,v,{tozero:!0,padded:!0}))}}function Y2(t){for(var e=t.traces,r=0;r<e.length;r++)for(var a=e[r],i=a[0].t.offsetindex,n=0;n<a.length;n++){var o=a[n];o.s!==zo&&t.put(o.p,i,o.b+o.s)}}function EI(t,e){for(var r=t.traces,a=0;a<r.length;a++){var i=r[a],n=i[0].trace,o=i[0].t.offsetindex;if(n.base===void 0)for(var l=new xu([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),s=0;s<i.length;s++){var f=i[s];if(f.p!==zo){var c=l.put(f.p,o,f.b+f.s);c&&(f.b=c)}}}}function Zp(t,e,r){var a=e.traces,i=Qo(t),n=r.norm==="fraction"?1:100,o=n/1e9,l=t.l2c(t.c2l(0)),s=r.mode==="stack"?n:l;function f(w){return xa(t.c2l(w))&&(w<l-o||w>s+o||!xa(l))}for(var c=0;c<a.length;c++){for(var u=a[c],v=u[0].t.offsetindex,h=u[0].trace,d=[],p=!1,m=!1,y=0;y<u.length;y++){var b=u[y];if(b.s!==zo){var _=Math.abs(n/e.get(b.p,v,b.s));b.b*=_,b.s*=_;var g=b.b,x=g+b.s;b[i]=x,d.push(x),m=m||f(x),b.hasB&&(d.push(g),m=m||f(g)),(!b.hasB||!b.b)&&(p=!0)}}h._extremes[t._id]=os.findExtremes(t,d,{tozero:p,padded:m})}}function zI(t,e,r,a){for(var i=Qo(a),n=0;n<t.length;n++)for(var o=t[n],l=0;l<o.length;l++){var s=o[l],f=s[i];s._sMin=e[f],s._sMax=r[f]}}function RI(t,e){var r=Qo(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;xa(f)&&(l=Math.min(l,f),s=Math.max(s,f))}var c=1e4/(s-l),u=a.round=function(A){return String(Math.round(c*(A-l)))},v={},h={},d=t.some(function(A){var M=A[0].trace;return"marker"in M&&M.marker.cornerradius});for(i=0;i<t.length;i++){o=t[i],o[0].t.extents=a;var p=o[0].t.poffset,m=Fi(p);for(n=0;n<o.length;n++){var y=o[n],b=y[r]-y.w/2;if(xa(b)){var _=y[r]+y.w/2,g=u(y.p);a[g]?a[g]=[Math.min(b,a[g][0]),Math.max(_,a[g][1])]:a[g]=[b,_]}if(y.p0=y.p+(m?p[n]:p),y.p1=y.p0+y.w,y.s0=y.b,y.s1=y.s0+y.s,d){var x=Math.min(y.s0,y.s1)||0,w=Math.max(y.s0,y.s1)||0,T=y[r];v[T]=T in v?Math.min(v[T],x):x,h[T]=T in h?Math.max(h[T],w):w}}}d&&zI(t,v,h,e)}function Qo(t){return t._id.charAt(0)}var Kp={crossTraceCalc:TI,setGroupPositions:vh},O0=Yp,j0=Kp.setGroupPositions;function II(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 u={mode:i.scattermode,gap:i.scattergap};j0(t,r,a,s,u),j0(t,a,r,l,u)}var FI=function(e,r){e._fullLayout.scattermode==="group"&&II(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,u,v,h,d,p,m,y,b,_,g,x,w;for(var T in o){y=o[T];var A=y.traceIndices;if(A.length){for(b=y.stackgaps==="interpolate",_=y.groupnorm,y.orientation==="v"?(g="x",x="y"):(g="y",x="x"),w=new Array(A.length),s=0;s<w.length;s++)w[s]=!1;h=l[A[0]];var M=new Array(h.length);for(s=0;s<h.length;s++)M[s]=h[s][g];for(s=1;s<A.length;s++){for(v=l[A[s]],f=c=0;f<v.length;f++){for(d=v[f][g];d>M[c]&&c<M.length;c++)Ev(v,f,M[c],s,w,b,g),f++;if(d!==M[c]){for(u=0;u<s;u++)Ev(l[A[u]],c,d,u,w,b,g);M.splice(c,0,d)}c++}for(;c<M.length;c++)Ev(v,f,M[c],s,w,b,g),f++}var S=M.length;for(f=0;f<h.length;f++){for(p=h[f][x]=h[f].s,s=1;s<A.length;s++)v=l[A[s]],v[0].trace._rawLength=v[0].trace._length,v[0].trace._length=S,p+=v[f].s,v[f][x]=p;if(_)for(m=(_==="fraction"?p:p/100)||1,s=0;s<A.length;s++){var L=l[A[s]][f];L[x]/=m,L.sNorm=L.s/m}}for(s=0;s<A.length;s++){v=l[A[s]];var z=v[0].trace,N=O0.calcMarkerSize(z,z._rawLength),$=Array.isArray(N);if(N&&w[s]||$){var R=N;for(N=new Array(S),f=0;f<S;f++)N[f]=v[f].gap?0:$?R[v[f].i]:R}var H=new Array(S),D=new Array(S);for(f=0;f<S;f++)H[f]=v[f].x,D[f]=v[f].y;O0.calcAxisExpansion(e,z,a,i,H,D,N),v[0].t.orientation=y.orientation}}}}};function Ev(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=NI(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 NI(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 $I=zt,q2=cr,bl=q2.BADNUM,Z2=q2.LOG_CLIP,B0=Z2+.5,G0=Z2-.5,xc=ke,HI=xc.segmentsIntersect,U0=xc.constrain,zv=pu,OI=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,u=a.marker,v=r.connectGaps,h=r.baseTolerance,d=r.shape,p=d==="linear",m=a.fill&&a.fill!=="none",y=[],b=zv.minTolerance,_=e.length,g=new Array(_),x=0,w,T,A,M,S,L,z,N,$,R,H,D,P,k,C,E;function I(ye){var Ve=e[ye];if(!Ve)return!1;var Xe=r.linearized?i.l2p(Ve.x):i.c2p(Ve.x),Ie=r.linearized?n.l2p(Ve.y):n.c2p(Ve.y);if(Xe===bl){if(o&&(Xe=i.c2p(Ve.x,!0)),Xe===bl)return!1;l&&Ie===bl&&(Xe*=Math.abs(i._m*f*(i._m>0?B0:G0)/(n._m*s*(n._m>0?B0:G0)))),Xe*=1e3}if(Ie===bl){if(l&&(Ie=n.c2p(Ve.y,!0)),Ie===bl)return!1;Ie*=1e3}return[Xe,Ie]}function j(ye,Ve,Xe,Ie){var tt=Xe-ye,We=Ie-Ve,F=.5-ye,U=.5-Ve,W=tt*tt+We*We,K=tt*F+We*U;if(K>0&&K<W){var fe=F*We-U*tt;if(fe*fe<W)return!0}}var G,X;function O(ye,Ve){var Xe=ye[0]/s,Ie=ye[1]/f,tt=Math.max(0,-Xe,Xe-1,-Ie,Ie-1);return tt&&G!==void 0&&j(Xe,Ie,G,X)&&(tt=0),tt&&Ve&&j(Xe,Ie,Ve[0]/s,Ve[1]/f)&&(tt=0),(1+zv.toleranceGrowth*tt)*h}function Z(ye,Ve){var Xe=ye[0]-Ve[0],Ie=ye[1]-Ve[1];return Math.sqrt(Xe*Xe+Ie*Ie)}var V=zv.maxScreensAway,q=-s*V,B=s*(1+V),J=-f*V,ie=f*(1+V),de=[[q,J,B,J],[B,J,B,ie],[B,ie,q,ie],[q,ie,q,J]],oe,Y,ee,le,ue,me;function pe(ye,Ve){for(var Xe=[],Ie=0,tt=0;tt<4;tt++){var We=de[tt],F=HI(ye[0],ye[1],Ve[0],Ve[1],We[0],We[1],We[2],We[3]);F&&(!Ie||Math.abs(F.x-Xe[0][0])>1||Math.abs(F.y-Xe[0][1])>1)&&(F=[F.x,F.y],Ie&&Z(F,ye)<Z(Xe[0],ye)?Xe.unshift(F):Xe.push(F),Ie++)}return Xe}function se(ye){if(ye[0]<q||ye[0]>B||ye[1]<J||ye[1]>ie)return[U0(ye[0],q,B),U0(ye[1],J,ie)]}function be(ye,Ve){if(ye[0]===Ve[0]&&(ye[0]===q||ye[0]===B)||ye[1]===Ve[1]&&(ye[1]===J||ye[1]===ie))return!0}function Le(ye,Ve){var Xe=[],Ie=se(ye),tt=se(Ve);return Ie&&tt&&be(Ie,tt)||(Ie&&Xe.push(Ie),tt&&Xe.push(tt)),Xe}function ve(ye,Ve,Xe){return function(Ie,tt){var We=se(Ie),F=se(tt),U=[];if(We&&F&&be(We,F))return U;We&&U.push(We),F&&U.push(F);var W=2*xc.constrain((Ie[ye]+tt[ye])/2,Ve,Xe)-((We||Ie)[ye]+(F||tt)[ye]);if(W){var K;We&&F?K=W>0==We[ye]>F[ye]?We:F:K=We||F,K[ye]+=W}return U}}var Te;d==="linear"||d==="spline"?Te=pe:d==="hv"||d==="vh"?Te=Le:d==="hvh"?Te=ve(0,q,B):d==="vhv"&&(Te=ve(1,J,ie));function we(ye,Ve){var Xe=Ve[0]-ye[0],Ie=(Ve[1]-ye[1])/Xe,tt=(ye[1]*Ve[0]-Ve[1]*ye[0])/Xe;return tt>0?[Ie>0?q:B,ie]:[Ie>0?B:q,J]}function Q(ye){var Ve=ye[0],Xe=ye[1],Ie=Ve===g[x-1][0],tt=Xe===g[x-1][1];if(!(Ie&&tt))if(x>1){var We=Ve===g[x-2][0],F=Xe===g[x-2][1];Ie&&(Ve===q||Ve===B)&&We?F?x--:g[x-1]=ye:tt&&(Xe===J||Xe===ie)&&F?We?x--:g[x-1]=ye:g[x++]=ye}else g[x++]=ye}function xe(ye){g[x-1][0]!==ye[0]&&g[x-1][1]!==ye[1]&&Q([ee,le]),Q(ye),ue=null,ee=le=0}var ae=xc.isArrayOrTypedArray(u);function ge(ye){if(ye&&c&&(ye.i=w,ye.d=e,ye.trace=a,ye.marker=ae?u[ye.i]:u,ye.backoff=c),G=ye[0]/s,X=ye[1]/f,oe=ye[0]<q?q:ye[0]>B?B:0,Y=ye[1]<J?J:ye[1]>ie?ie:0,oe||Y){if(!x)g[x++]=[oe||ye[0],Y||ye[1]];else if(ue){var Ve=Te(ue,ye);Ve.length>1&&(xe(Ve[0]),g[x++]=Ve[1])}else me=Te(g[x-1],ye)[0],g[x++]=me;var Xe=g[x-1];oe&&Y&&(Xe[0]!==oe||Xe[1]!==Y)?(ue&&(ee!==oe&&le!==Y?Q(ee&&le?we(ue,ye):[ee||oe,le||Y]):ee&&le&&Q([ee,le])),Q([oe,Y])):ee-oe&&le-Y&&Q([oe||ee,Y||le]),ue=ye,ee=oe,le=Y}else ue&&xe(Te(ue,ye)[0]),g[x++]=ye}for(w=0;w<_;w++)if(T=I(w),!!T){for(x=0,ue=null,ge(T),w++;w<_;w++){if(M=I(w),!M){if(v)continue;break}if(!p||!r.simplify){ge(M);continue}var Ae=I(w+1);if(R=Z(M,T),!(!(m&&(x===0||x===_-1))&&R<O(M,Ae)*b)){for(N=[(M[0]-T[0])/R,(M[1]-T[1])/R],S=T,H=R,D=k=C=0,z=!1,A=M,w++;w<e.length;w++){if(L=Ae,Ae=I(w+1),!L){if(v)continue;break}if($=[L[0]-T[0],L[1]-T[1]],E=$[0]*N[1]-$[1]*N[0],k=Math.min(k,E),C=Math.max(C,E),C-k>O(L,Ae))break;A=L,P=$[0]*N[0]+$[1]*N[1],P>H?(H=P,M=L,z=!1):P<D&&(D=P,S=L,z=!0)}if(z?(ge(M),A!==S&&ge(S)):(S!==T&&ge(S),A!==M&&ge(M)),ge(A),w>=e.length||!L)break;ge(L),T=L}}ue&&Q([ee||ue[0],le||ue[1]]),y.push(g.slice(0,x))}var ce=d.slice(d.length-1);if(c&&ce!=="h"&&ce!=="v"){for(var De=!1,Se=-1,Me=[],He=0;He<y.length;He++)for(var Fe=0;Fe<y[He].length-1;Fe++){var Oe=y[He][Fe],Ge=y[He][Fe+1],Ze=$I.applyBackoff(Ge,Oe);(Ze[0]!==Ge[0]||Ze[1]!==Ge[1])&&(De=!0),Me[Se+1]||(Se++,Me[Se]=[Oe,[Ze[0],Ze[1]]])}return De?Me:y}return y},V0={tonextx:1,tonexty:1,tonext:1},K2=function(e,r,a){var i,n,o,l,s,f={},c=!1,u=-1,v=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]=v,v++):i.fill in V0&&h>=0?s=h:(s=h=v,v++),s<u&&(c=!0),i._groupIndex=u=s;var d=a.slice();c&&d.sort(function(m,y){var b=m[0].trace,_=y[0].trace;return b._groupIndex-_._groupIndex||b.index-_.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 V0&&(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},Ea=bt,jI=ot,ls=ke,go=ls.ensureSingle,Q2=ls.identity,or=zt,bo=jr,BI=OI,GI=K2,uf=o2.tester,UI=function(e,r,a,i,n,o){var l,s,f=!n,c=!!n&&n.duration>0,u=GI(e,r,a);if(l=i.selectAll("g.trace").data(u,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(),VI(e,l,r),c){o&&(s=o());var v=Ea.transition().duration(n.duration).ease(n.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});v.each(function(){i.selectAll("g.trace").each(function(h,d){W0(e,d,r,h,u,this,n)})})}else l.each(function(h,d){W0(e,d,r,h,u,this,n)});f&&l.exit().remove(),i.selectAll("path:not([d])").remove()};function VI(t,e,r){e.each(function(a){var i=go(Ea.select(this),"g","fills");or.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,Q2);l.enter().append("g"),l.exit().each(function(s){n[s]=null}).remove(),l.order().each(function(s){n[s]=go(Ea.select(this),"path","js-fill")})})}function W0(t,e,r,a,i,n,o){var l=t._context.staticPlot,s;WI(t,e,r,a,i);var f=!!o&&o.duration>0;function c(ve){return f?ve.transition():ve}var u=r.xaxis,v=r.yaxis,h=a[0].trace,d=h.line,p=Ea.select(n),m=go(p,"g","errorbars"),y=go(p,"g","lines"),b=go(p,"g","points"),_=go(p,"g","text");if(jI.getComponentMethod("errorbars","plot")(t,m,r,o),h.visible!==!0)return;c(p).style("opacity",h.opacity);var g,x,w=h.fill.charAt(h.fill.length-1);w!=="x"&&w!=="y"&&(w="");var T,A;w==="y"?(T=1,A=v.c2p(0,!0)):w==="x"&&(T=0,A=u.c2p(0,!0)),a[0][r.isRangePlot?"nodeRangePlot3":"node3"]=p;var M="",S=[],L=h._prevtrace,z=null,N=null;L&&(M=L._prevRevpath||"",x=L._nextFill,S=L._ownPolygons,z=L._fillsegments,N=L._fillElement);var $,R,H="",D="",P,k,C,E,I,j,G=[];h._polygons=[];var X=[],O=[],Z=ls.noop;if(g=h._ownFill,bo.hasLines(h)||h.fill!=="none"){x&&x.datum(a),["hv","vh","hvh","vhv"].indexOf(d.shape)!==-1?(P=or.steps(d.shape),k=or.steps(d.shape.split("").reverse().join(""))):d.shape==="spline"?P=k=function(ve){var Te=ve[ve.length-1];return ve.length>1&&ve[0][0]===Te[0]&&ve[0][1]===Te[1]?or.smoothclosed(ve.slice(1),d.smoothing):or.smoothopen(ve,d.smoothing)}:P=k=function(ve){return"M"+ve.join("L")},C=function(ve){return k(ve.reverse())},O=BI(a,{xaxis:u,yaxis:v,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}),X=new Array(O.length);var V=0;for(s=0;s<O.length;s++){var q,B=O[s];!q||!w?(q=B.slice(),X[V]=q,V++):q.push.apply(q,B)}h._fillElement=null,h._fillExclusionElement=N,h._fillsegments=X.slice(0,V),X=h._fillsegments,O.length&&(E=O[0][0].slice(),I=O[O.length-1],j=I[I.length-1].slice()),Z=function(ve){return function(Te){if($=P(Te),R=C(Te),H?w?(H+="L"+$.substr(1),D=R+("L"+D.substr(1))):(H+="Z"+$,D=R+"Z"+D):(H=$,D=R),bo.hasLines(h)){var we=Ea.select(this);if(we.datum(a),ve)c(we.style("opacity",0).attr("d",$).call(or.lineGroupStyle)).style("opacity",1);else{var Q=c(we);Q.attr("d",$),or.singleLineStyle(a,Q)}}}}}var J=y.selectAll(".js-line").data(O);c(J.exit()).style("opacity",0).remove(),J.each(Z(!1)),J.enter().append("path").classed("js-line",!0).style("vector-effect",l?"none":"non-scaling-stroke").call(or.lineGroupStyle).each(Z(!0)),or.setClipUrl(J,r.layerClipId,t);function ie(ve){c(ve).attr("d","M0,0Z")}var de=function(){var ve=new Array(X.length);for(s=0;s<X.length;s++)ve[s]=uf(X[s]);return ve},oe=function(ve){var Te,we;if(!ve||ve.length===0)for(Te=new Array(X.length),we=0;we<X.length;we++){var Q=X[we][0].slice(),xe=X[we][X[we].length-1].slice();Q[T]=xe[T]=A;var ae=[xe,Q],ge=ae.concat(X[we]);Te[we]=uf(ge)}else{for(Te=new Array(ve.length-1+X.length),we=0;we<ve.length-1;we++)Te[we]=uf(ve[we]);var Ae=ve[ve.length-1].slice();for(Ae.reverse(),we=0;we<X.length;we++)Te[ve.length-1+we]=uf(X[we].concat(Ae))}return Te};O.length?(g?(g.datum(a),E&&j&&(w?(E[T]=j[T]=A,c(g).attr("d","M"+j+"L"+E+"L"+H.substr(1)).call(or.singleFillStyle,t),G=oe(null)):(c(g).attr("d",H+"Z").call(or.singleFillStyle,t),G=de())),h._polygons=G,h._fillElement=g):x&&(h.fill.substr(0,6)==="tonext"&&H&&M?(h.fill==="tonext"?(c(x).attr("d",H+"Z"+M+"Z").call(or.singleFillStyle,t),G=de(),h._polygons=G.concat(S)):(c(x).attr("d",H+"L"+M.substr(1)+"Z").call(or.singleFillStyle,t),G=oe(z),h._polygons=G),h._fillElement=x):ie(x)),h._prevRevpath=D):(g?ie(g):x&&ie(x),h._prevRevpath=null),h._ownPolygons=G;function Y(ve){return ve.filter(function(Te){return!Te.gap&&Te.vis})}function ee(ve){return ve.filter(function(Te){return Te.vis})}function le(ve){return ve.filter(function(Te){return!Te.gap})}function ue(ve){return ve.id}function me(ve){if(ve.ids)return ue}function pe(){return!1}function se(ve,Te,we){var Q,xe,ae,ge=we[0].trace,Ae=bo.hasMarkers(ge),ce=bo.hasText(ge),De=me(ge),Se=pe,Me=pe;if(Ae||ce){var He=Q2,Fe=ge.stackgroup,Oe=Fe&&t._fullLayout._scatterStackOpts[u._id+v._id][Fe].stackgaps==="infer zero";ge.marker.maxdisplayed||ge._needsCull?He=Oe?ee:Y:Fe&&!Oe&&(He=le),Ae&&(Se=He),ce&&(Me=He)}xe=ve.selectAll("path.point"),Q=xe.data(Se,De);var Ge=Q.enter().append("path").classed("point",!0);f&&Ge.call(or.pointStyle,ge,t).call(or.translatePoints,u,v).style("opacity",0).transition().style("opacity",1),Q.order();var Ze;Ae&&(Ze=or.makePointStyleFns(ge)),Q.each(function(ye){var Ve=Ea.select(this),Xe=c(Ve);ae=or.translatePoint(ye,Xe,u,v),ae?(or.singlePointStyle(ye,Xe,ge,Ze,t),r.layerClipId&&or.hideOutsideRangePoint(ye,Xe,u,v,ge.xcalendar,ge.ycalendar),ge.customdata&&Ve.classed("plotly-customdata",ye.data!==null&&ye.data!==void 0)):Xe.remove()}),f?Q.exit().transition().style("opacity",0).remove():Q.exit().remove(),xe=Te.selectAll("g"),Q=xe.data(Me,De),Q.enter().append("g").classed("textpoint",!0).append("text"),Q.order(),Q.each(function(ye){var Ve=Ea.select(this),Xe=c(Ve.select("text"));ae=or.translatePoint(ye,Xe,u,v),ae?r.layerClipId&&or.hideOutsideRangePoint(ye,Ve,u,v,ge.xcalendar,ge.ycalendar):Ve.remove()}),Q.selectAll("text").call(or.textPointStyle,ge,t).each(function(ye){var Ve=u.c2p(ye.x),Xe=v.c2p(ye.y);Ea.select(this).selectAll("tspan.line").each(function(){c(Ea.select(this)).attr({x:Ve,y:Xe})})}),Q.exit().remove()}b.datum(a),_.datum(a),se(b,_,a);var be=h.cliponaxis===!1,Le=be?null:r.layerClipId;or.setClipUrl(b,Le,t),or.setClipUrl(_,Le,t)}function WI(t,e,r,a,i){var n=r.xaxis,o=r.yaxis,l=Ea.extent(ls.simpleMap(n.range,n.r2c)),s=Ea.extent(ls.simpleMap(o.range,o.r2c)),f=a[0].trace;if(bo.hasMarkers(f)){var c=f.marker.maxdisplayed;if(c!==0){var u=a.filter(function(p){return p.x>=l[0]&&p.x<=l[1]&&p.y>=s[0]&&p.y<=s[1]}),v=Math.ceil(u.length/c),h=0;i.forEach(function(p,m){var y=p[0].trace;bo.hasMarkers(y)&&y.marker.maxdisplayed>0&&m<e&&h++});var d=Math.round(h*v/3+Math.floor(h/3)*v/7.1);a.forEach(function(p){delete p.vis}),u.forEach(function(p,m){Math.round((m+d)%v)===0&&(p.vis=!0)})}}}var As={container:"marker",min:"cmin",max:"cmax"},vf=Ot,J2=function(e,r,a){var i={},n={_fullLayout:a},o=vf.getFromTrace(n,r,"x"),l=vf.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=vf.tickText(o,o.c2l(s),!0).text,i.yLabel=vf.tickText(l,l.c2l(f),!0).text,i},Rv=bt,Ro=zt,XI=ot;function YI(t){var e=Rv.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=Rv.select(this),i=r.trace||r[0].trace;ek(a,i,t)}),e.selectAll("g.text").each(function(r){var a=Rv.select(this),i=r.trace||r[0].trace;tk(a,i,t)}),e.selectAll("g.trace path.js-line").call(Ro.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(Ro.fillGroupStyle,t,!1),XI.getComponentMethod("errorbars","style")(e)}function ek(t,e,r){Ro.pointStyle(t.selectAll("path.point"),e,r)}function tk(t,e,r){Ro.textPointStyle(t.selectAll("text"),e,r)}function qI(t,e,r){var a=e[0].trace;a.selectedpoints?(Ro.selectedPointStyle(r.selectAll("path.point"),a),Ro.selectedTextStyle(r.selectAll("text"),a)):(ek(r,a,t),tk(r,a,t))}var X0={style:YI,styleOnSelect:qI},Yn=yt,ZI=jr,rk=function(e,r){var a,i;if(e.mode==="lines")return a=e.line.color,a&&Yn.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&&Yn.opacity(n)?n:o&&Yn.opacity(o)&&(r.mlw||((e.marker||{}).line||{}).width)?o:"",i?Yn.opacity(i)<.3?Yn.addOpacity(i,.3):i:(a=(e.line||{}).color,a&&Yn.opacity(a)&&ZI.hasLines(e)&&e.line.width?a:e.fillcolor)},Gf=ke,Y0=Na,KI=ot,QI=rk,Iv=yt,JI=Gf.fillText,eF=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),u=[f,c],v=o.hoveron||"",h=o.mode.indexOf("markers")!==-1?3:.5,d=!!o.xperiodalignment,p=!!o.yperiodalignment;if(v.indexOf("points")!==-1){var m=function(D){if(d){var P=l.c2p(D.xStart),k=l.c2p(D.xEnd);return f>=Math.min(P,k)&&f<=Math.max(P,k)?0:1/0}var C=Math.max(3,D.mrc||0),E=1-1/C,I=Math.abs(l.c2p(D.x)-f);return I<C?E*I/C:I-C+E},y=function(D){if(p){var P=s.c2p(D.yStart),k=s.c2p(D.yEnd);return c>=Math.min(P,k)&&c<=Math.max(P,k)?0:1/0}var C=Math.max(3,D.mrc||0),E=1-1/C,I=Math.abs(s.c2p(D.y)-c);return I<C?E*I/C:I-C+E},b=function(D){var P=Math.max(h,D.mrc||0),k=l.c2p(D.x)-f,C=s.c2p(D.y)-c;return Math.max(Math.sqrt(k*k+C*C)-P,1-h/P)},_=Y0.getDistanceFunction(i,m,y,b);if(Y0.getClosest(n,_,e),e.index!==!1){var g=n[e.index],x=l.c2p(g.x,!0),w=s.c2p(g.y,!0),T=g.mrc||1;e.index=g.i;var A=n[0].t.orientation,M=A&&(g.sNorm||g.s),S=A==="h"?M:g.orig_x!==void 0?g.orig_x:g.x,L=A==="v"?M:g.orig_y!==void 0?g.orig_y:g.y;return Gf.extendFlat(e,{color:QI(o,g),x0:x-T,x1:x+T,xLabelVal:S,y0:w-T,y1:w+T,yLabelVal:L,spikeDistance:b(g),hovertemplate:o.hovertemplate}),JI(g,o,e),KI.getComponentMethod("errorbars","hoverInfo")(g,o,e),[e]}}function z(D){if(!D)return!1;var P=D.node();try{var k=new DOMPoint(u[0],u[1]);return P.isPointInFill(k)}catch{var C=P.ownerSVGElement.createSVGPoint();return C.x=u[0],C.y=u[1],P.isPointInFill(C)}}function N(D){var P,k=[],C=1/0,E=-1/0,I=1/0,j=-1/0,G;for(P=0;P<D.length;P++){var X=D[P];X.contains(u)&&(k.push(X),I=Math.min(I,X.ymin),j=Math.max(j,X.ymax))}if(k.length===0)return null;I=Math.max(I,0),j=Math.min(j,s._length),G=(I+j)/2;var O,Z,V,q,B,J,ie;for(P=0;P<k.length;P++)for(Z=k[P].pts,O=1;O<Z.length;O++)J=Z[O-1][1],ie=Z[O][1],J>G!=ie>=G&&(q=Z[O-1][0],B=Z[O][0],ie-J&&(V=q+(B-q)*(G-J)/(ie-J),C=Math.min(C,V),E=Math.max(E,V)));return C=Math.max(C,0),E=Math.min(E,l._length),{x0:C,x1:E,y0:G,y1:G}}if(v.indexOf("fills")!==-1&&o._fillElement){var $=z(o._fillElement)&&!z(o._fillExclusionElement);if($){var R=N(o._polygons);R===null&&(R={x0:u[0],x1:u[0],y0:u[1],y1:u[1]});var H=Iv.defaultLine;return Iv.opacity(o.fillcolor)?H=o.fillcolor:Iv.opacity((o.line||{}).color)&&(H=o.line.color),Gf.extendFlat(e,{distance:e.maxHoverDistance,x0:R.x0,x1:R.x1,y0:R.y0,y1:R.y1,color:H,hovertemplate:!1}),delete e.index,o.text&&!Gf.isArrayOrTypedArray(o.text)?e.text=String(o.text):e.text=o.name,[e]}}},q0=jr,tF=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s,f,c,u,v=!q0.hasMarkers(l)&&!q0.hasText(l);if(v)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),u=n.c2p(f.y),f.i!==null&&r.contains([c,u],!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},pr={},Fv,Z0;function rF(){return Z0||(Z0=1,Fv={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(" ")}}),Fv}var Nv,K0;function aF(){if(K0)return Nv;K0=1;var t=ot.traceIs,e=$w;Nv=function(l,s,f,c){f("autotypenumbers",c.autotypenumbersDflt);var u=f("type",(c.splomStash||{}).type);u==="-"&&(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 u=a(l,s,f);if(u){if(u.type==="histogram"&&f==={v:"y",h:"x"}[u.orientation||"v"]){o.type="linear";return}var v=f+"calendar",h=u[v],d={noMultiCategory:!t(u,"cartesian")||t(u,"noMultiCategory")};if(u.type==="box"&&u._hasPreCompStats&&f==={h:"x",v:"y"}[u.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=o.autotypenumbers,n(u,f)){var p=i(u),m=[];for(c=0;c<l.length;c++){var y=l[c];!t(y,"box-violin")||(y[f+"axis"]||f)!==s||(y[p]!==void 0?m.push(y[p][0]):y.name!==void 0?m.push(y.name):m.push("text"),y[v]!==h&&(h=void 0))}o.type=e(m,h,d)}else if(u.type==="splom"){var b=u.dimensions,_=b[u._axesDim[s]];_.visible&&(o.type=e(_.values,h,d))}else o.type=e(u[f]||[u[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 Nv}var iF=fr.isTypedArraySpec;function nF(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 oF=function(e,r,a,i){if(r.type==="category"){var n=e.categoryarray,o=Array.isArray(n)&&n.length>0||iF(n),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=nF(r,i).sort(),s==="category ascending"?r._initialCategories=f:s==="category descending"&&(r._initialCategories=f.reverse()))}},Q0=$a.mix,lF=Or,sF=ke,fF=function(e,r,a,i){i=i||{};var n=i.dfltColor;function o(T,A){return sF.coerce2(e,r,i.attributes,T,A)}var l=o("linecolor",n),s=o("linewidth"),f=a("showline",i.showLine||!!l||!!s);f||(delete r.linecolor,delete r.linewidth);var c=Q0(n,i.bgColor,i.blend||lF.lightFraction).toRgbString(),u=o("gridcolor",c),v=o("gridwidth"),h=o("griddash"),d=a("showgrid",i.showGrid||!!u||!!v||!!h);if(d||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var p=Q0(r.gridcolor,i.bgColor,67).toRgbString(),m=o("minor.gridcolor",p),y=o("minor.gridwidth",r.gridwidth||1),b=o("minor.griddash",r.griddash||"solid"),_=a("minor.showgrid",!!m||!!y||!!b);_||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){o("zerolinelayer");var g=o("zerolinecolor",n),x=o("zerolinewidth"),w=a("zeroline",i.showGrid||!!g||!!x);w||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}},J0=kt,cF=ot,El=ke,uF=Ht,vF=ri,dh=ti,eb=gw,tb=bw,dF=ww,hF=Tw,pF=oF,mF=fF,yF=eT,rb=fp,Uf=Ir.WEEKDAY_PATTERN,gF=Ir.HOUR_PATTERN,ak=function(e,r,a,i,n){var o=i.letter,l=i.font||{},s=i.splomStash||{},f=a("visible",!i.visibleDflt),c=r._template||{},u=r.type||c.type||"-",v;if(u==="date"){var h=cF.getComponentMethod("calendars","handleDefaults");h(e,r,"calendar",i.calendar),i.noTicklabelmode||(v=a("ticklabelmode"))}!i.noTicklabelindex&&(u==="date"||u==="linear")&&a("ticklabelindex");var d="";(!i.noTicklabelposition||u==="multicategory")&&(d=El.coerce(e,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v==="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":u==="category"||u==="multicategory"?"allow":"hide past div"),rb(r,n),yF(e,r,a,i),pF(e,r,a,i),i.noHover||(u!=="category"&&a("hoverformat"),i.noUnifiedhovertitle||a("unifiedhovertitle.text"));var p=a("color"),m=p!==dh.color.dflt?p:l.color,y=s.label||n._dfltTitle[o];if(hF(e,r,a,u,i),!f)return r;a("title.text",y),El.coerceFont(a,"title.font",l,{overrideDflt:{size:El.bigFont(l.size),color:m}}),eb(e,r,a,u);var b=i.hasMinor;if(b&&(uF.newContainer(r,"minor"),eb(e,r,a,u,{isMinor:!0})),dF(e,r,a,u,i),tb(e,r,a,i),b){var _=i.isMinor;i.isMinor=!0,tb(e,r,a,i),i.isMinor=_}mF(e,r,a,{dfltColor:p,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:b,attributes:dh}),b&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&a("mirror");var g=u==="multicategory";if(!i.noTickson&&(u==="category"||g)&&(r.ticks||r.showgrid)&&(g?(a("tickson","boundaries"),delete r.ticklabelposition):a("tickson")),g){var x=a("showdividers");x&&(a("dividercolor"),a("dividerwidth"))}if(u==="date")if(vF(e,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:bF}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var w=0;w<r.rangebreaks.length;w++)if(r.rangebreaks[w].pattern===Uf){r._hasDayOfWeekBreaks=!0;break}if(rb(r,n),n._has("scattergl")||n._has("splom"))for(var T=0;T<i.data.length;T++){var A=i.data[T];(A.type==="scattergl"||A.type==="splom")&&(A.visible=!1,El.warn(A.type+" traces do not work on axes with rangebreaks. Setting trace "+A.index+" to `visible: false`."))}}return r};function bF(t,e,r){function a(v,h){return El.coerce(t,e,dh.rangebreaks,v,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=ab(n[l]),s){o=Uf;break}}var f=a("pattern",o);if(f===Uf)for(l=0;l<2;l++)s=ab(n[l]),s&&(e.bounds[l]=n[l]=s-1);if(f)for(l=0;l<2;l++)switch(s=n[l],f){case Uf:if(!J0(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 gF:if(!J0(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 u=a("values");if(u&&u.length)a("dvalue");else{e.enabled=!1;return}}}}var xF={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function ab(t){if(typeof t=="string")return xF[t.substr(0,3).toLowerCase()]}var _F=kt,df=ke,ik=function(e,r,a,i){var n=i.counterAxes||[],o=i.overlayableAxes||[],l=i.letter,s=i.grid,f=i.overlayingDomain,c,u,v,h,d,p;s&&(u=s._domains[l][s._axisMap[r._id]],c=s._anchors[r._id],u&&(v=s[l+"side"].split(" ")[0],h=s.domain[l][v==="right"||v==="top"?1:0])),u=u||[0,1],c=c||(_F(e.position)?"free":n[0]||"free"),v=v||(l==="x"?"bottom":"left"),h=h||0,d=0,p=!1;var m=df.coerce(e,r,{anchor:{valType:"enumerated",values:["free"].concat(n),dflt:c}},"anchor"),y=df.coerce(e,r,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");if(m==="free"){if(l==="y"){var b=a("autoshift");b&&(h=y==="left"?f[0]:f[1],p=r.automargin?r.automargin:!0,d=y==="left"?-3:3),a("shift",d)}a("position",h)}a("automargin",p);var _=!1;if(o.length&&(_=df.coerce(e,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!_){var g=a("domain",u);g[0]>g[1]-1/4096&&(r.domain=u),df.noneOrAll(e.domain,r.domain,u),r.tickmode==="sync"&&(r.tickmode="auto")}return a("layer"),r},$v,ib;function wF(){if(ib)return $v;ib=1;var t=ke,e=yt,r=wa.isUnifiedHover,a=bT,i=Ht,n=ys,o=ti,l=aF(),s=ak,f=pi,c=ik,u=lr,v=u.id2name,h=u.name2id,d=Ir.AX_ID_PATTERN,p=ot,m=p.traceIs,y=p.getComponentMethod;function b(_,g,x){Array.isArray(_[g])?_[g].push(x):_[g]=[x]}return $v=function(g,x,w){var T=x.autotypenumbers,A={},M={},S={},L={},z={},N={},$={},R={},H={},D={},P,k;for(P=0;P<w.length;P++){var C=w[P];if(m(C,"cartesian")){var E;if(C.xaxis)E=v(C.xaxis),b(A,E,C);else if(C.xaxes)for(k=0;k<C.xaxes.length;k++)b(A,v(C.xaxes[k]),C);var I;if(C.yaxis)I=v(C.yaxis),b(A,I,C);else if(C.yaxes)for(k=0;k<C.yaxes.length;k++)b(A,v(C.yaxes[k]),C);if(C.type==="funnel"?C.orientation==="h"?(E&&(M[E]=!0),I&&($[I]=!0)):I&&(S[I]=!0):C.type==="image"?(I&&(R[I]=!0),E&&(R[E]=!0)):(I&&(z[I]=!0,N[I]=!0),(!m(C,"carpet")||C.type==="carpet"&&!C._cheater)&&E&&(L[E]=!0)),C.type==="carpet"&&C._cheater&&E&&(M[E]=!0),m(C,"2dMap")&&(H[E]=!0,H[I]=!0),m(C,"oriented")){var j=C.orientation==="h"?I:E;D[j]=!0}}}var G=x._subplots,X=G.xaxis,O=G.yaxis,Z=t.simpleMap(X,v),V=t.simpleMap(O,v),q=Z.concat(V),B=e.background;X.length&&O.length&&(B=t.coerce(g,x,n,"plot_bgcolor"));var J=e.combine(B,x.paper_bgcolor),ie,de,oe,Y,ee;function le(){var F=A[ie]||[];ee._traceIndices=F.map(function(U){return U.index}),ee._annIndices=[],ee._shapeIndices=[],ee._selectionIndices=[],ee._imgIndices=[],ee._subplotsWith=[],ee._counterAxes=[],ee._name=ee._attr=ie,ee._id=de}function ue(F,U){return t.coerce(Y,ee,o,F,U)}function me(F,U){return t.coerce2(Y,ee,o,F,U)}function pe(F){return F==="x"?O:X}function se(F,U){for(var W=F==="x"?Z:V,K=[],fe=0;fe<W.length;fe++){var te=W[fe];te!==U&&!(g[te]||{}).overlaying&&K.push(h(te))}return K}var be={x:pe("x"),y:pe("y")},Le=be.x.concat(be.y),ve={},Te=[];function we(){var F=Y.matches;d.test(F)&&Le.indexOf(F)===-1&&(ve[F]=Y.type,Te=Object.keys(ve))}var Q=a(g,x),xe=r(Q);for(P=0;P<q.length;P++){ie=q[P],de=h(ie),oe=ie.charAt(0),t.isPlainObject(g[ie])||(g[ie]={}),Y=g[ie],ee=i.newContainer(x,ie,oe+"axis"),le();var ae=oe==="x"&&!L[ie]&&M[ie]||oe==="y"&&!z[ie]&&S[ie],ge=oe==="y"&&(!N[ie]&&$[ie]||R[ie]),Ae={hasMinor:!0,letter:oe,font:x.font,outerTicks:H[ie],showGrid:!D[ie],data:A[ie]||[],bgColor:J,calendar:x.calendar,automargin:!0,visibleDflt:ae,reverseDflt:ge,autotypenumbersDflt:T,splomStash:((x._splomAxes||{})[oe]||{})[de],noAutotickangles:oe==="y"};ue("uirevision",x.uirevision),l(Y,ee,ue,Ae),s(Y,ee,ue,Ae,x);var ce=xe&&oe===Q.charAt(0),De=me("spikecolor",xe?ee.color:void 0),Se=me("spikethickness",xe?1.5:void 0),Me=me("spikedash",xe?"dot":void 0),He=me("spikemode",xe?"across":void 0),Fe=me("spikesnap"),Oe=ue("showspikes",!!ce||!!De||!!Se||!!Me||!!He||!!Fe);Oe||(delete ee.spikecolor,delete ee.spikethickness,delete ee.spikedash,delete ee.spikemode,delete ee.spikesnap);var Ge=v(Y.overlaying),Ze=[0,1];if(x[Ge]!==void 0){var ye=v(x[Ge].anchor);x[ye]!==void 0&&(Ze=x[ye].domain)}c(Y,ee,ue,{letter:oe,counterAxes:be[oe],overlayableAxes:se(oe,ie),grid:x.grid,overlayingDomain:Ze}),ue("title.standoff"),we(),ee._input=Y}for(P=0;P<Te.length;){de=Te[P++],ie=v(de),oe=ie.charAt(0),t.isPlainObject(g[ie])||(g[ie]={}),Y=g[ie],ee=i.newContainer(x,ie,oe+"axis"),le();var Ve={letter:oe,font:x.font,outerTicks:H[ie],showGrid:!D[ie],data:[],bgColor:J,calendar:x.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((x._splomAxes||{})[oe]||{})[de]};ue("uirevision",x.uirevision),ee.type=ve[de]||"linear",s(Y,ee,ue,Ve,x),c(Y,ee,ue,{letter:oe,counterAxes:be[oe],overlayableAxes:se(oe,ie),grid:x.grid}),ue("fixedrange"),ue("modebardisable"),we(),ee._input=Y}var Xe=y("rangeslider","handleDefaults"),Ie=y("rangeselector","handleDefaults");for(P=0;P<Z.length;P++)ie=Z[P],Y=g[ie],ee=x[ie],Xe(g,x,ie),ee.type==="date"&&Ie(Y,ee,x,V,ee.calendar),ue("fixedrange"),ue("modebardisable");for(P=0;P<V.length;P++){ie=V[P],Y=g[ie],ee=x[ie];var tt=x[v(ee.anchor)],We=y("rangeslider","isVisible")(tt);ue("fixedrange",We),ue("modebardisable")}f.handleDefaults(g,x,{axIds:Le.concat(Te).sort(u.idSort),axHasImage:R})},$v}var Hv,nb;function TF(){if(nb)return Hv;nb=1;var t=bt,e=ot,r=ke,a=zt,i=Ot;return Hv=function(o,l,s,f){var c=o._fullLayout;if(l.length===0){i.redrawComponents(o);return}function u(x){var w=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,w._offset,T._offset).call(a.setScale,1,1);var A=x.plot.selectAll(".scatterlayer .trace");A.selectAll(".point").call(a.setPointGroupScale,1,1),A.selectAll(".textpoint").call(a.setTextPointsScale,1,1),A.call(a.hideOutsideRangePoints,x)}function v(x,w){var T=x.plotinfo,A=T.xaxis,M=T.yaxis,S=A._length,L=M._length,z=!!x.xr1,N=!!x.yr1,$=[];if(z){var R=r.simpleMap(x.xr0,A.r2l),H=r.simpleMap(x.xr1,A.r2l),D=R[1]-R[0],P=H[1]-H[0];$[0]=(R[0]*(1-w)+w*H[0]-R[0])/(R[1]-R[0])*S,$[2]=S*(1-w+w*P/D),A.range[0]=A.l2r(R[0]*(1-w)+w*H[0]),A.range[1]=A.l2r(R[1]*(1-w)+w*H[1])}else $[0]=0,$[2]=S;if(N){var k=r.simpleMap(x.yr0,M.r2l),C=r.simpleMap(x.yr1,M.r2l),E=k[1]-k[0],I=C[1]-C[0];$[1]=(k[1]*(1-w)+w*C[1]-k[1])/(k[0]-k[1])*L,$[3]=L*(1-w+w*I/E),M.range[0]=A.l2r(k[0]*(1-w)+w*C[0]),M.range[1]=M.l2r(k[1]*(1-w)+w*C[1])}else $[1]=0,$[3]=L;i.drawOne(o,A,{skipTitle:!0}),i.drawOne(o,M,{skipTitle:!0}),i.redrawComponents(o,[A._id,M._id]);var j=z?S/$[2]:1,G=N?L/$[3]:1,X=z?$[0]:0,O=N?$[1]:0,Z=z?$[0]/$[2]*S:0,V=N?$[1]/$[3]*L:0,q=A._offset-Z,B=M._offset-V;T.clipRect.call(a.setTranslate,X,O).call(a.setScale,1/j,1/G),T.plot.call(a.setTranslate,q,B).call(a.setScale,j,G),a.setPointGroupScale(T.zoomScalePts,1/j,1/G),a.setTextPointsScale(T.zoomScaleTxt,1/j,1/G)}var h;f&&(h=f());function d(){for(var x={},w=0;w<l.length;w++){var T=l[w],A=T.plotinfo.xaxis,M=T.plotinfo.yaxis;T.xr1&&(x[A._name+".range"]=T.xr1.slice()),T.yr1&&(x[M._name+".range"]=T.yr1.slice())}return h&&h(),e.call("relayout",o,x).then(function(){for(var S=0;S<l.length;S++)u(l[S].plotinfo)})}function p(){for(var x={},w=0;w<l.length;w++){var T=l[w],A=T.plotinfo.xaxis,M=T.plotinfo.yaxis;T.xr0&&(x[A._name+".range"]=T.xr0.slice()),T.yr0&&(x[M._name+".range"]=T.yr0.slice())}return e.call("relayout",o,x).then(function(){for(var S=0;S<l.length;S++)u(l[S].plotinfo)})}var m,y,b,_=t.ease(s.easing);o._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(b),b=null,p()});function g(){y=Date.now();for(var x=Math.min(1,(y-m)/s.duration),w=_(x),T=0;T<l.length;T++)v(l[T],w);y-m>s.duration?(d(),b=window.cancelAnimationFrame(g)):b=window.requestAnimationFrame(g)}return m=Date.now(),b=window.requestAnimationFrame(g),Promise.resolve()},Hv}var _u=bt,ob=ot,Mn=ke,kF=hr,AF=zt,lb=bs.getModuleCalcData,Ei=lr,Fa=Ir,MF=Yo,Rt=Mn.ensureSingle;function hf(t,e,r){return Mn.ensureSingle(t,e,r,function(a){a.datum(r)})}var Sn=Fa.zindexSeparator;pr.name="cartesian";pr.attr=["xaxis","yaxis"];pr.idRoot=["x","y"];pr.idRegex=Fa.idRegex;pr.attrRegex=Fa.attrRegex;pr.attributes=rF();pr.layoutAttributes=ti;pr.supplyLayoutDefaults=wF();pr.transitionAxes=TF();pr.finalizeSubplots=function(t,e){var r=e._subplots,a=r.xaxis,i=r.yaxis,n=r.cartesian,o=n,l={},s={},f,c,u;for(f=0;f<o.length;f++){var v=o[f].split("y");l[v[0]]=1,s["y"+v[1]]=1}for(f=0;f<a.length;f++)c=a[f],l[c]||(u=(t[Ei.id2name(c)]||{}).anchor,Fa.idRegex.y.test(u)||(u="y"),n.push(c+u),o.push(c+u),s[u]||(s[u]=1,Mn.pushUnique(i,u)));for(f=0;f<i.length;f++)u=i[f],s[u]||(c=(t[Ei.id2name(u)]||{}).anchor,Fa.idRegex.x.test(c)||(c="x"),n.push(c+u),o.push(c+u),l[c]||(l[c]=1,Mn.pushUnique(a,c)));if(!o.length){c="",u="";for(var h in t)if(Fa.attrRegex.test(h)){var d=h.charAt(0);d==="x"?(!c||+h.substr(5)<+c.substr(5))&&(c=h):(!u||+h.substr(5)<+u.substr(5))&&(u=h)}c=c?Ei.name2id(c):"x",u=u?Ei.name2id(u):"y",a.push(c),i.push(u),n.push(c+u)}};pr.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(var s=i._zindices,f=0;f<s.length;f++){var c=s[f];for(l=0;l<n.length;l++){var u=n[l],v=i._plots[u];if(f>0){var h=v.id;if(h.indexOf(Sn)!==-1)continue;h+=Sn+(f+1),v=Mn.extendFlat({},v,{id:h,plot:i._cartesianlayer.selectAll(".subplot").select("."+h)})}for(var d=[],p,m=0;m<o.length;m++){var y=o[m],b=y[0].trace;c===(b.zorder||0)&&b.xaxis+b.yaxis===u&&((e.indexOf(b.index)!==-1||b.carpet)&&(p&&p[0].trace.xaxis+p[0].trace.yaxis===u&&["tonextx","tonexty","tonext"].indexOf(b.fill)!==-1&&d.indexOf(p)===-1&&d.push(p),d.push(y)),p=y)}nk(t,v,d,r,a)}}};function nk(t,e,r,a,i){for(var n=Fa.traceLayerClasses,o=t._fullLayout,l=o._zindices,s=o._modules,f,c,u,v=[],h=[],d=0;d<l.length;d++)for(var p=l[d],m=0;m<s.length;m++){f=s[m];var y=f.name,b=ob.modules[y].categories;if(b.svg){var _=f.layerName||y+"layer",g=_+(d?Number(d)+1:""),x=f.plot;c=lb(r,x,p),u=c[0],r=c[1],u.length&&v.push({i:n.indexOf(_),zindex:d,className:g,plotMethod:x,cdModule:u}),b.zoomScale&&h.push("."+g)}}v.sort(function(A,M){return(A.zindex||0)-(M.zindex||0)||A.i-M.i});var w=e.plot.selectAll("g.mlayer").data(v,function(A){return A.className});if(w.enter().append("g").attr("class",function(A){return A.className}).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),w.exit().remove(),w.order(),w.each(function(A){var M=_u.select(this),S=A.className;A.plotMethod(t,e,A.cdModule,M,a,i),Fa.clipOnAxisFalseQuery.indexOf("."+S)===-1&&AF.setClipUrl(M,e.layerClipId,t)}),o._has("scattergl")&&(f=ob.getModule("scattergl"),u=lb(r,f)[0],f.plot(t,e,u)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(Fa.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),h.length)){var T=e.plot.selectAll(h.join(",")).selectAll(".trace");e.zoomScalePts=T.selectAll("path.point"),e.zoomScaleTxt=T.selectAll(".textpoint")}}pr.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"),u=e._has&&e._has("gl");if(c&&!u)for(f in i)l=i[f],l._scene&&l._scene.destroy();if(o.xaxis&&o.yaxis){var v=Ei.listIds({_fullLayout:a});for(s=0;s<v.length;s++){var h=v[s];e[Ei.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)lk(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 m=o.cartesian[s];if(m.indexOf(Sn)===-1&&!n[m]){var y="."+m+",."+m+"-x,."+m+"-y";a._cartesianlayer.selectAll(y).remove(),sk(m,a)}}};pr.drawFramework=function(t){var e=t._fullLayout,r=t.calcdata,a,i={};for(a=0;a<r.length;a++){var n=r[a][0],o=n.trace,l=o.zorder||0;i[l]||(i[l]=[]),i[l].push(n)}var s=Object.keys(i).map(Number).sort(Mn.sorterAsc);s.length||(s=[0]),e._zindices=s;var f=SF(t),c=f.length,u=[];for(a=0;a<c;a++)u[a]=f[a].slice();for(var v=1;v<s.length;v++){var h=[];for(a=0;a<c;a++)h[a]=f[a].slice(),h[a][0]+=Sn+(v+1);u=u.concat(h)}var d=e._cartesianlayer.selectAll(".subplot").data(u,String);d.enter().append("g").attr("class",function(p){return"subplot "+p[0]}),d.order(),d.exit().call(lk,e),d.each(function(p){var m=p[0],y=m.indexOf(Sn),b=y!==-1,_=b?m.slice(0,y):m,g=e._plots[m];g||(g=Mn.extendFlat({},e._plots[_]),g&&(g.id=m,e._plots[m]=g,e._subplots.cartesian.push(m))),g&&(g.plotgroup=_u.select(this),ok(t,g),b||(g.draglayer=Rt(e._draggers,"g",m)))})};pr.rangePlot=function(t,e,r){ok(t,e),nk(t,e,r),kF.style(t)};function SF(t){var e=t._fullLayout,r=e._zindices.length,a=e._subplots.cartesian,i=a.length,n,o,l,s,f,c,u=[],v=[];for(n=0;n<i;n++){l=a[n],s=e._plots[l],f=s.xaxis,c=s.yaxis;var h=f._mainAxis,d=c._mainAxis,p=h._id+d._id,m=e._plots[p];s.overlays=[],p!==l&&m?(s.mainplot=p,s.mainplotinfo=m,v.push(l)):(s.mainplot=void 0,s.mainplotinfo=void 0,u.push(l))}for(n=0;n<v.length;n++)l=v[n],s=e._plots[l],s.mainplotinfo.overlays.push(s);var y=u.concat(v),b=[];for(n=0;n<i;n++){l=y[n],s=e._plots[l],f=s.xaxis,c=s.yaxis;for(var _=[],g=1;g<=r;g++){var x="";for(g>1&&(x+=Sn+g),_.push(l+x),o=0;o<s.overlays.length;o++)_.push(s.overlays[o].id+x)}_=_.concat([f.layer,c.layer,f.overlaying||"",c.overlaying||""]),b.push(_)}return b}function ok(t,e){var r=t._fullLayout,a=e.plotgroup,i=e.id,n=i.indexOf(Sn),o=n!==-1,l=Fa.layerValue2layerClass[e.xaxis.layer],s=Fa.layerValue2layerClass[e.yaxis.layer],f=r._hasOnlyLargeSploms,c=r._zindices.length>1,u=e.mainplotinfo;if(!e.mainplot||c)if(f)e.xlines=Rt(a,"path","xlines-above"),e.ylines=Rt(a,"path","ylines-above"),e.xaxislayer=Rt(a,"g","xaxislayer-above"),e.yaxislayer=Rt(a,"g","yaxislayer-above");else{if(!o){var v=Rt(a,"g","layer-subplot");e.shapelayer=Rt(v,"g","shapelayer"),e.imagelayer=Rt(v,"g","imagelayer"),u&&c?(e.minorGridlayer=u.minorGridlayer,e.gridlayer=u.gridlayer,e.zerolinelayer=u.zerolinelayer):(e.minorGridlayer=Rt(a,"g","minor-gridlayer"),e.gridlayer=Rt(a,"g","gridlayer"),e.zerolinelayer=Rt(a,"g","zerolinelayer"));var h=Rt(a,"g","layer-between");e.shapelayerBetween=Rt(h,"g","shapelayer"),e.imagelayerBetween=Rt(h,"g","imagelayer"),Rt(a,"path","xlines-below"),Rt(a,"path","ylines-below"),e.overlinesBelow=Rt(a,"g","overlines-below"),Rt(a,"g","xaxislayer-below"),Rt(a,"g","yaxislayer-below"),e.overaxesBelow=Rt(a,"g","overaxes-below")}e.overplot=Rt(a,"g","overplot"),e.plot=Rt(e.overplot,"g",i),u&&c?e.zerolinelayerAbove=u.zerolinelayerAbove:e.zerolinelayerAbove=Rt(a,"g","zerolinelayer-above"),o||(e.xlines=Rt(a,"path","xlines-above"),e.ylines=Rt(a,"path","ylines-above"),e.overlinesAbove=Rt(a,"g","overlines-above"),Rt(a,"g","xaxislayer-above"),Rt(a,"g","yaxislayer-above"),e.overaxesAbove=Rt(a,"g","overaxes-above"),e.xlines=a.select(".xlines-"+l),e.ylines=a.select(".ylines-"+s),e.xaxislayer=a.select(".xaxislayer-"+l),e.yaxislayer=a.select(".yaxislayer-"+s))}else{var d=u.plotgroup,p=i+"-x",m=i+"-y";e.minorGridlayer=u.minorGridlayer,e.gridlayer=u.gridlayer,e.zerolinelayer=u.zerolinelayer,e.zerolinelayerAbove=u.zerolinelayerAbove,Rt(u.overlinesBelow,"path",p),Rt(u.overlinesBelow,"path",m),Rt(u.overaxesBelow,"g",p),Rt(u.overaxesBelow,"g",m),e.plot=Rt(u.overplot,"g",i),Rt(u.overlinesAbove,"path",p),Rt(u.overlinesAbove,"path",m),Rt(u.overaxesAbove,"g",p),Rt(u.overaxesAbove,"g",m),e.xlines=d.select(".overlines-"+l).select("."+p),e.ylines=d.select(".overlines-"+s).select("."+m),e.xaxislayer=d.select(".overaxes-"+l).select("."+p),e.yaxislayer=d.select(".overaxes-"+s).select("."+m)}o||(f||(hf(e.minorGridlayer,"g",e.xaxis._id),hf(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map(function(y){return y[0]}).sort(Ei.idSort),hf(e.gridlayer,"g",e.xaxis._id),hf(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map(function(y){return y[0]}).sort(Ei.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0))}function lk(t,e){if(t){var r={};t.each(function(s){var f=s[0],c=_u.select(this);c.remove(),sk(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 sk(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}pr.toSVG=function(t){var e=t._fullLayout._glimages,r=_u.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:MF.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}a.each(i)};pr.updateFx=T2().updateFx;var pf=jr,LF={hasLines:pf.hasLines,hasMarkers:pf.hasMarkers,hasText:pf.hasText,isBubble:pf.isBubble,attributes:Vi,layoutAttributes:tp,supplyDefaults:aI,crossTraceDefaults:$2,supplyLayoutDefaults:cI,calc:Yp.calc,crossTraceCalc:FI,arraysToCalcdata:j2,plot:UI,colorbar:As,formatLabels:J2,style:X0.style,styleOnSelect:X0.styleOnSelect,hoverPoints:eF,selectPoints:tF,animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:pr,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(" ")}},CF=bt,DF=yt,sb=x2,Qp=ke,PF=Qp.strScale,EF=Qp.strRotate,zF=Qp.strTranslate,RF=function(e,r,a){var i=e.node(),n=sb[a.arrowhead||0],o=sb[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,u=n.backoff*l+a.standoff,v=o.backoff*s+a.startstandoff,h,d,p,m;if(i.nodeName==="line"){h={x:+e.attr("x1"),y:+e.attr("y1")},d={x:+e.attr("x2"),y:+e.attr("y2")};var y=h.x-d.x,b=h.y-d.y;if(p=Math.atan2(b,y),m=p+Math.PI,u&&v&&u+v>Math.sqrt(y*y+b*b)){$();return}if(u){if(u*u>y*y+b*b){$();return}var _=u*Math.cos(p),g=u*Math.sin(p);d.x+=_,d.y+=g,e.attr({x2:d.x,y2:d.y})}if(v){if(v*v>y*y+b*b){$();return}var x=v*Math.cos(p),w=v*Math.sin(p);h.x-=x,h.y-=w,e.attr({x1:h.x,y1:h.y})}}else if(i.nodeName==="path"){var T=i.getTotalLength(),A="";if(T<u+v){$();return}var M=i.getPointAtLength(0),S=i.getPointAtLength(.1);p=Math.atan2(M.y-S.y,M.x-S.x),h=i.getPointAtLength(Math.min(v,T)),A="0px,"+v+"px,";var L=i.getPointAtLength(T),z=i.getPointAtLength(T-.1);m=Math.atan2(L.y-z.y,L.x-z.x),d=i.getPointAtLength(Math.max(0,T-u));var N=A?v+u:u;A+=T-N+"px,"+T+"px",e.style("stroke-dasharray",A)}function $(){e.style("stroke-dasharray","0px,100px")}function R(H,D,P,k){H.path&&(H.noRotate&&(P=0),CF.select(i.parentNode).append("path").attr({class:e.attr("class"),d:H.path,transform:zF(D.x,D.y)+EF(P*180/Math.PI)+PF(k)}).style({fill:DF.rgb(a.arrowcolor),"stroke-width":0}))}f&&R(o,h,p,s),c&&R(n,d,m,l)},fb=bt,Ov=ot,IF=hr,Ai=ke,jv=Ai.strTranslate,ss=Ot,Ji=yt,ni=zt,cb=Na,Bv=Tr,Gv=Bi,xl=ai,FF=Ht.arrayEditor,NF=RF,Jp={draw:$F,drawOne:fk,drawRaw:ck};function $F(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&fk(t,r);return IF.previousPromises(t)}function fk(t,e){var r=t._fullLayout,a=r.annotations[e]||{},i=ss.getFromId(t,a.xref),n=ss.getFromId(t,a.yref);i&&i.setScale(),n&&n.setScale(),ck(t,a,e,!1,i,n)}function Ti(t,e,r,a,i){var n=i[r],o=i[r+"ref"],l=r.indexOf("y")!==-1,s=ss.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 ck(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 u=FF(t.layout,c,e),v=u.modifyBase,h=u.modifyItem,d=u.getUpdateObj;o._infolayer.selectAll("."+f+'[data-index="'+r+'"]').remove();var p="clip"+o._uid+"_ann"+r;if(!e._input||e.visible===!1){fb.selectAll("#"+p).remove();return}var m={x:{},y:{}},y=+e.textangle||0,b=o._infolayer.append("g").classed(f,!0).attr("data-index",String(r)).style("opacity",e.opacity),_=b.append("g").classed("annotation-text-g",!0),g=s[e.showarrow?"annotationTail":"annotationPosition"],x=e.captureevents||s.annotationText||g;function w(k){var C={index:r,annotation:e._input,fullAnnotation:e,event:k};return a&&(C.subplotId=a),C}var T=_.append("g").style("pointer-events",x?"all":null).call(Gv,"pointer").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",w(fb.event))});e.hovertext&&T.on("mouseover",function(){var k=e.hoverlabel,C=k.font,E=this.getBoundingClientRect(),I=t.getBoundingClientRect();cb.loneHover({x0:E.left-I.left,x1:E.right-I.left,y:(E.top+E.bottom)/2-I.top,text:e.hovertext,color:k.bgcolor,borderColor:k.bordercolor,fontFamily:C.family,fontSize:C.size,fontColor:C.color,fontWeight:C.weight,fontStyle:C.style,fontVariant:C.variant,fontShadow:C.fontShadow,fontLineposition:C.fontLineposition,fontTextcase:C.fontTextcase},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:t})}).on("mouseout",function(){cb.loneUnhover(o._hoverlayer.node())});var A=e.borderwidth,M=e.borderpad,S=A+M,L=T.append("rect").attr("class","bg").style("stroke-width",A+"px").call(Ji.stroke,e.bordercolor).call(Ji.fill,e.bgcolor),z=e.width||e.height,N=o._topclips.selectAll("#"+p).data(z?[0]:[]);N.enter().append("clipPath").classed("annclip",!0).attr("id",p).append("rect"),N.exit().remove();var $=e.font,R=o._meta?Ai.templateString(e.text,o._meta):e.text,H=T.append("text").classed("annotation-text",!0).text(R);function D(k){return k.call(ni.font,$).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),Bv.convertToTspans(k,t,P),k}function P(){var k=H.selectAll("a");if(k.size()===1&&k.text()===H.text()){var C=T.insert("a",":first-child").attr({"xlink:xlink:href":k.attr("xlink:href"),"xlink:xlink:show":k.attr("xlink:show")}).style({cursor:"pointer"});C.node().appendChild(L.node())}var E=T.select(".annotation-text-math-group"),I=!E.empty(),j=ni.bBox((I?E:H).node()),G=j.width,X=j.height,O=e.width||G,Z=e.height||X,V=Math.round(O+2*S),q=Math.round(Z+2*S);function B(Ie,tt){return tt==="auto"&&(Ie<1/3?tt="left":Ie>2/3?tt="right":tt="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[tt]}for(var J=!1,ie=["x","y"],de=0;de<ie.length;de++){var oe=ie[de],Y=e[oe+"ref"]||oe,ee=e["a"+oe+"ref"],le={x:i,y:n}[oe],ue=(y+(oe==="x"?0:-90))*Math.PI/180,me=V*Math.cos(ue),pe=q*Math.sin(ue),se=Math.abs(me)+Math.abs(pe),be=e[oe+"anchor"],Le=e[oe+"shift"]*(oe==="x"?1:-1),ve=m[oe],Te,we,Q,xe,ae,ge=ss.getRefType(Y);if(le&&ge!=="domain"){var Ae=le.r2fraction(e[oe]);(Ae<0||Ae>1)&&(ee===Y?(Ae=le.r2fraction(e["a"+oe]),(Ae<0||Ae>1)&&(J=!0)):J=!0),Te=le._offset+le.r2p(e[oe]),xe=.5}else{var ce=ge==="domain";oe==="x"?(Q=e[oe],Te=ce?le._offset+le._length*Q:Te=l.l+l.w*Q):(Q=1-e[oe],Te=ce?le._offset+le._length*Q:Te=l.t+l.h*Q),xe=e.showarrow?.5:Q}if(e.showarrow){ve.head=Te;var De=e["a"+oe];if(ae=me*B(.5,e.xanchor)-pe*B(.5,e.yanchor),ee===Y){var Se=ss.getRefType(ee);Se==="domain"?(oe==="y"&&(De=1-De),ve.tail=le._offset+le._length*De):Se==="paper"?oe==="y"?(De=1-De,ve.tail=l.t+l.h*De):ve.tail=l.l+l.w*De:ve.tail=le._offset+le.r2p(De),we=ae}else ve.tail=Te+De,we=ae+De;ve.text=ve.tail+ae;var Me=o[oe==="x"?"width":"height"];if(Y==="paper"&&(ve.head=Ai.constrain(ve.head,1,Me-1)),ee==="pixel"){var He=-Math.max(ve.tail-3,ve.text),Fe=Math.min(ve.tail+3,ve.text)-Me;He>0?(ve.tail+=He,ve.text+=He):Fe>0&&(ve.tail-=Fe,ve.text-=Fe)}ve.tail+=Le,ve.head+=Le}else ae=se*B(xe,be),we=ae,ve.text=Te+ae;ve.text+=Le,ae+=Le,we+=Le,e["_"+oe+"padplus"]=se/2+we,e["_"+oe+"padminus"]=se/2-we,e["_"+oe+"size"]=se,e["_"+oe+"shift"]=ae}if(J){T.remove();return}var Oe=0,Ge=0;if(e.align!=="left"&&(Oe=(O-G)*(e.align==="center"?.5:1)),e.valign!=="top"&&(Ge=(Z-X)*(e.valign==="middle"?.5:1)),I)E.select("svg").attr({x:S+Oe-1,y:S+Ge}).call(ni.setClipUrl,z?p:null,t);else{var Ze=S+Ge-j.top,ye=S+Oe-j.left;H.call(Bv.positionText,ye,Ze).call(ni.setClipUrl,z?p:null,t)}N.select("rect").call(ni.setRect,S,S,O,Z),L.call(ni.setRect,A/2,A/2,V-A,q-A),T.call(ni.setTranslate,Math.round(m.x.text-V/2),Math.round(m.y.text-q/2)),_.attr({transform:"rotate("+y+","+m.x.text+","+m.y.text+")"});var Ve=function(Ie,tt){b.selectAll(".annotation-arrow-g").remove();var We=m.x.head,F=m.y.head,U=m.x.tail+Ie,W=m.y.tail+tt,K=m.x.text+Ie,fe=m.y.text+tt,te=Ai.rotationXYMatrix(y,K,fe),Ee=Ai.apply2DTransform(te),Ce=Ai.apply2DTransform2(te),he=+L.attr("width"),ne=+L.attr("height"),_e=K-.5*he,ze=_e+he,je=fe-.5*ne,Re=je+ne,rt=[[_e,je,_e,Re],[_e,Re,ze,Re],[ze,Re,ze,je],[ze,je,_e,je]].map(Ce);if(!rt.reduce(function(pt,Tt){return pt^!!Ai.segmentsIntersect(We,F,We+1e6,F+1e6,Tt[0],Tt[1],Tt[2],Tt[3])},!1)){rt.forEach(function(pt){var Tt=Ai.segmentsIntersect(U,W,We,F,pt[0],pt[1],pt[2],pt[3]);Tt&&(U=Tt.x,W=Tt.y)});var st=e.arrowwidth,Ue=e.arrowcolor,Lt=e.arrowside,ft=b.append("g").style({opacity:Ji.opacity(Ue)}).classed("annotation-arrow-g",!0),Ke=ft.append("path").attr("d","M"+U+","+W+"L"+We+","+F).style("stroke-width",st+"px").call(Ji.stroke,Ji.rgb(Ue));if(NF(Ke,Lt,e),s.annotationPosition&&Ke.node().parentNode&&!a){var gt=We,wt=F;if(e.standoff){var lt=Math.sqrt(Math.pow(We-U,2)+Math.pow(F-W,2));gt+=e.standoff*(U-We)/lt,wt+=e.standoff*(W-F)/lt}var ct=ft.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(U-gt)+","+(W-wt),transform:jv(gt,wt)}).style("stroke-width",st+6+"px").call(Ji.stroke,"rgba(0,0,0,0)").call(Ji.fill,"rgba(0,0,0,0)"),Qe,it;xl.init({element:ct.node(),gd:t,prepFn:function(){var pt=ni.getTranslate(T);Qe=pt.x,it=pt.y,i&&i.autorange&&v(i._name+".autorange",!0),n&&n.autorange&&v(n._name+".autorange",!0)},moveFn:function(pt,Tt){var Je=Ee(Qe,it),At=Je[0]+pt,Ft=Je[1]+Tt;T.call(ni.setTranslate,At,Ft),h("x",Ti(i,pt,"x",l,e)),h("y",Ti(n,Tt,"y",l,e)),e.axref===e.xref&&h("ax",Ti(i,pt,"ax",l,e)),e.ayref===e.yref&&h("ay",Ti(n,Tt,"ay",l,e)),ft.attr("transform",jv(pt,Tt)),_.attr({transform:"rotate("+y+","+At+","+Ft+")"})},doneFn:function(){Ov.call("_guiRelayout",t,d());var pt=document.querySelector(".js-notes-box-panel");pt&&pt.redraw(pt.selectedObj)}})}}};if(e.showarrow&&Ve(0,0),g){var Xe;xl.init({element:T.node(),gd:t,prepFn:function(){Xe=_.attr("transform")},moveFn:function(Ie,tt){var We="pointer";if(e.showarrow)e.axref===e.xref?h("ax",Ti(i,Ie,"ax",l,e)):h("ax",e.ax+Ie),e.ayref===e.yref?h("ay",Ti(n,tt,"ay",l.w,e)):h("ay",e.ay+tt),Ve(Ie,tt);else{if(a)return;var F,U;if(i)F=Ti(i,Ie,"x",l,e);else{var W=e._xsize/l.w,K=e.x+(e._xshift-e.xshift)/l.w-W/2;F=xl.align(K+Ie/l.w,W,0,1,e.xanchor)}if(n)U=Ti(n,tt,"y",l,e);else{var fe=e._ysize/l.h,te=e.y-(e._yshift+e.yshift)/l.h-fe/2;U=xl.align(te-tt/l.h,fe,0,1,e.yanchor)}h("x",F),h("y",U),(!i||!n)&&(We=xl.getCursor(i?.5:F,n?.5:U,e.xanchor,e.yanchor))}_.attr({transform:jv(Ie,tt)+Xe}),Gv(T,We)},clickFn:function(Ie,tt){e.captureevents&&t.emit("plotly_clickannotation",w(tt))},doneFn:function(){Gv(T),Ov.call("_guiRelayout",t,d());var Ie=document.querySelector(".js-notes-box-panel");Ie&&Ie.redraw(Ie.selectedObj)}})}}s.annotationText?H.call(Bv.makeEditable,{delegate:T,gd:t}).call(D).on("edit",function(k){e.text=k,this.call(D),h("text",k),i&&i.autorange&&v(i._name+".autorange",!0),n&&n.autorange&&v(n._name+".autorange",!0),Ov.call("_guiRelayout",t,d())}):H.call(D)}var ub=ke,HF=ot,vb=Ht.arrayEditor,OF={hasClickToShow:jF,onClick:BF};function jF(t,e){var r=uk(t,e);return r.on.length>0||r.explicitOff.length>0}function BF(t,e){var r=uk(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=vb(t.layout,"annotations",o[a[l]]),s.modifyItem("visible",!0),ub.extendFlat(n,s.getUpdateObj());for(l=0;l<i.length;l++)s=vb(t.layout,"annotations",o[i[l]]),s.modifyItem("visible",!1),ub.extendFlat(n,s.getUpdateObj());return HF.call("update",t,{},n)}}function uk(t,e){var r=t._fullLayout.annotations,a=[],i=[],n=[],o=(e||[]).length,l,s,f,c,u,v,h,d;for(l=0;l<r.length;l++)if(f=r[l],c=f.clicktoshow,c){for(s=0;s<o;s++)if(u=e[s],v=u.xaxis,h=u.yaxis,v._id===f.xref&&h._id===f.yref&&v.d2r(u.x)===db(f._xclick,v)&&h.d2r(u.y)===db(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 db(t,e){return e.type==="log"?e.l2r(t):e.d2r(t)}var Uv=ke,qn=yt,vk=function(e,r,a,i){i("opacity");var n=i("bgcolor"),o=i("bordercolor"),l=qn.opacity(o);i("borderpad");var s=i("borderwidth"),f=i("showarrow");i("text",f?" ":a._dfltTitle.annotation),i("textangle"),Uv.coerceFont(i,"font",a.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),f){var u=i("arrowside"),v,h;u.indexOf("end")!==-1&&(v=i("arrowhead"),h=i("arrowsize")),u.indexOf("start")!==-1&&(i("startarrowhead",v),i("startarrowsize",h)),i("arrowcolor",l?r.bordercolor:qn.defaultLine),i("arrowwidth",(l&&s||1)*2),i("standoff"),i("startstandoff")}var d=i("hovertext"),p=a.hoverlabel||{};if(d){var m=i("hoverlabel.bgcolor",p.bgcolor||(qn.opacity(n)?qn.rgb(n):qn.defaultLine)),y=i("hoverlabel.bordercolor",p.bordercolor||qn.contrast(m)),b=Uv.extendFlat({},p.font);b.color||(b.color=y),Uv.coerceFont(i,"hoverlabel.font",b)}i("captureevents",!!d)},Vv=ke,en=Ot,GF=ri,UF=vk,VF=Ts,WF=function(e,r){GF(e,r,{name:"annotations",handleItemDefaults:XF})};function XF(t,e,r){function a(_,g){return Vv.coerce(t,e,VF,_,g)}var i=a("visible"),n=a("clicktoshow");if(i||n){UF(t,e,r,a);for(var o=e.showarrow,l=["x","y"],s=[-10,-30],f={_fullLayout:r},c=0;c<2;c++){var u=l[c],v=en.coerceRef(t,e,f,u,"","paper");if(v!=="paper"){var h=en.getFromId(f,v);h._annIndices.push(e._index)}if(en.coercePosition(e,f,a,v,u,.5),o){var d="a"+u,p=en.coerceRef(t,e,f,d,"pixel",["pixel","paper"]);p!=="pixel"&&p!==v&&(p=e[d]="pixel");var m=p==="pixel"?s[c]:.4;en.coercePosition(e,f,a,p,d,m)}a(u+"anchor"),a(u+"shift")}if(Vv.noneOrAll(t,e,["x","y"]),o&&Vv.noneOrAll(t,e,["ax","ay"]),n){var y=a("xclick"),b=a("yclick");e._xclick=y===void 0?e.x:en.cleanPosition(y,f,e.xref),e._yclick=b===void 0?e.y:en.cleanPosition(b,f,e.yref)}}}var hh=ke,dn=Ot,YF=Jp.draw,qF=function(e){var r=e._fullLayout,a=hh.filterVisible(r.annotations);if(a.length&&e._fullData.length)return hh.syncOrAsync([YF,ZF],e)};function ZF(t){var e=t._fullLayout;hh.filterVisible(e.annotations).forEach(function(r){var a=dn.getFromId(t,r.xref),i=dn.getFromId(t,r.yref),n=dn.getRefType(r.xref),o=dn.getRefType(r.yref);r._extremes={},n==="range"&&hb(r,a),o==="range"&&hb(r,i)})}function hb(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"],u=3*t.arrowsize*t.arrowwidth||0,v=u+c,h=u-c,d=3*t.startarrowsize*t.arrowwidth||0,p=d+c,m=d-c,y;if(l===o){var b=dn.findExtremes(e,[e.r2c(i)],{ppadplus:v,ppadminus:h}),_=dn.findExtremes(e,[e.r2c(n)],{ppadplus:Math.max(s,p),ppadminus:Math.max(f,m)});y={min:[b.min[0],_.min[0]],max:[b.max[0],_.max[0]]}}else p=n?p+n:p,m=n?m-n:m,y=dn.findExtremes(e,[e.r2c(i)],{ppadplus:Math.max(s,v,p),ppadminus:Math.max(f,h,m)});t._extremes[r]=y}var KF=kt,QF=$h,JF=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 u(h){var d=f[h],p=null;n?p=QF(d,r.range):p=Math.pow(10,d),KF(p)||(p=null),i(c+h,p)}for(var v=0;v<l.length;v++)f=l[v],c="annotations["+v+"].",f[s+"ref"]===r._id&&u(s),f["a"+s+"ref"]===r._id&&u("a"+s)},Wv=Jp,pb=OF,eN={moduleType:"component",name:"annotations",layoutAttributes:Ts,supplyLayoutDefaults:WF,includeBasePlot:mu("annotations"),calcAutorange:qF,draw:Wv.draw,drawOne:Wv.drawOne,drawRaw:Wv.drawRaw,hasClickToShow:pb.hasClickToShow,onClick:pb.onClick,convertCoords:JF},Bt=Ts,tN=Ja.overrideAll,rN=Ht.templatedArray,ph=tN(rN("annotation",{visible:Bt.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:Bt.xanchor,xshift:Bt.xshift,yanchor:Bt.yanchor,yshift:Bt.yshift,text:Bt.text,textangle:Bt.textangle,font:Bt.font,width:Bt.width,height:Bt.height,opacity:Bt.opacity,align:Bt.align,valign:Bt.valign,bgcolor:Bt.bgcolor,bordercolor:Bt.bordercolor,borderpad:Bt.borderpad,borderwidth:Bt.borderwidth,showarrow:Bt.showarrow,arrowcolor:Bt.arrowcolor,arrowhead:Bt.arrowhead,startarrowhead:Bt.startarrowhead,arrowside:Bt.arrowside,arrowsize:Bt.arrowsize,startarrowsize:Bt.startarrowsize,arrowwidth:Bt.arrowwidth,standoff:Bt.standoff,startstandoff:Bt.startstandoff,hovertext:Bt.hovertext,hoverlabel:Bt.hoverlabel,captureevents:Bt.captureevents}),"calc","from-root"),Xv=ke,aN=Ot,iN=ri,nN=vk,oN=ph,lN=function(e,r,a){iN(e,r,{name:"annotations",handleItemDefaults:sN,fullLayout:a.fullLayout})};function sN(t,e,r,a){function i(l,s){return Xv.coerce(t,e,oN,l,s)}function n(l){var s=l+"axis",f={_fullLayout:{}};return f._fullLayout[s]=r[s],aN.coercePosition(e,f,i,l,l,.5)}var o=i("visible");o&&(nN(t,e,a.fullLayout,i),n("x"),n("y"),n("z"),Xv.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),Xv.noneOrAll(t,e,["ax","ay"])))}var mb=ke,yb=Ot,fN=function(e){for(var r=e.fullSceneLayout,a=r.annotations,i=0;i<a.length;i++)cN(a[i],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function cN(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={},mb.extendFlat(t._xa,n),yb.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={},mb.extendFlat(t._ya,n),yb.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 Yv(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 uN(t,e){var r=Yv(t.projection,Yv(t.view,Yv(t.model,[e[0],e[1],e[2],1])));return r}var vN=uN,dN=Jp.drawRaw,hN=vN,pN=["x","y","z"],mN=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=pN[s],c=o[f],u=r[f+"axis"],v=u.r2fraction(c);if(v<0||v>1){l=!0;break}}l?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+n+'"]').remove():(o._pdata=hN(e.glplot.cameraParams,[r.xaxis.r2l(o.x)*a[0],r.yaxis.r2l(o.y)*a[1],r.zaxis.r2l(o.z)*a[2]]),dN(e.graphDiv,o,n,e.id,o._xa,o._ya))}},yN=ot,gb=ke,gN={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:ph}}},layoutAttributes:ph,handleDefaults:lN,includeBasePlot:bN,convert:fN,draw:mN};function bN(t,e){var r=yN.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&&(gb.pushUnique(e._basePlotModules,r),gb.pushUnique(e._subplots.gl3d,o))}}var bb=Ts,xb=Mr,_b=Vi.line,xN=ta.dash,Ma=Yt.extendFlat,_N=Ht.templatedArray,wb=hu,Zn=_a,wN=Sr.shapeTexttemplateAttrs,TN=Vh,dk=_N("shape",{visible:Ma({},Zn.visible,{editType:"calc+arraydraw",description:["Determines whether or not this shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether or not this","shape is shown in the legend."].join(" ")},legend:Ma({},Zn.legend,{editType:"calc+arraydraw",description:["Sets the reference to a legend to show this shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:Ma({},Zn.legendgroup,{editType:"calc+arraydraw",description:["Sets the legend group for this shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:Ma({},Zn.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:xb({editType:"calc+arraydraw",description:["Sets this legend group's title font."].join(" ")}),editType:"calc+arraydraw"},legendrank:Ma({},Zn.legendrank,{editType:"calc+arraydraw",description:["Sets the legend rank for this shape.","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.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")}),legendwidth:Ma({},Zn.legendwidth,{editType:"calc+arraydraw",description:"Sets the width (in px or fraction) of the legend for this shape."}),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","between"],dflt:"above",editType:"arraydraw",description:["Specifies whether shapes are drawn below gridlines (*below*),","between gridlines and traces (*between*) or above traces (*above*)."].join(" ")},xref:Ma({},bb.xref,{description:["Sets the shape's x coordinate axis.",wb.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(" ")},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `x0` away from the center of the category when `xref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].join(" ")},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `x1` away from the center of the category when `xref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].join(" ")},yref:Ma({},bb.yref,{description:["Sets the shape's y coordinate axis.",wb.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(" ")},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `y0` away from the center of the category when `yref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].join(" ")},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc",description:["Shifts `y1` away from the center of the category when `yref` is a *category* or","*multicategory* axis. -0.5 corresponds to the start of the category and 0.5","corresponds to the end of the category."].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:Ma({},_b.color,{editType:"arraydraw"}),width:Ma({},_b.width,{editType:"calc+arraydraw"}),dash:Ma({},xN,{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(" ")},label:{text:{valType:"string",dflt:"",editType:"arraydraw",description:["Sets the text to display with shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:wN({},{keys:Object.keys(TN)}),font:xb({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw",description:["Sets the position of the label text relative to the shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw",description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw",description:"Sets padding (in px) between edge of label and edge of shape."},editType:"arraydraw"},editType:"arraydraw"}),_l=ke,Kn=Ot,kN=ri,AN=dk,Tb=Ui,MN=function(e,r){kN(e,r,{name:"shapes",handleItemDefaults:LN})};function SN(t,e){return t?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}function LN(t,e,r){function a(k,C){return _l.coerce(t,e,AN,k,C)}e._isShape=!0;var i=a("visible");if(i){var n=a("showlegend");n&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),_l.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var o=a("path"),l=o?"path":"rect",s=a("type",l),f=s!=="path";f&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var c=a("line.width");c&&(a("line.color"),a("line.dash"));for(var u=a("xsizemode"),v=a("ysizemode"),h=["x","y"],d=0;d<2;d++){var p=h[d],m=p+"anchor",y=p==="x"?u:v,b={_fullLayout:r},_,g,x,w=Kn.coerceRef(t,e,b,p,void 0,"paper"),T=Kn.getRefType(w);if(T==="range"?(_=Kn.getFromId(b,w),_._shapeIndices.push(e._index),x=Tb.rangeToShapePosition(_),g=Tb.shapePositionToRange(_),(_.type==="category"||_.type==="multicategory")&&(a(p+"0shift"),a(p+"1shift"))):g=x=_l.identity,f){var A=.25,M=.75,S=p+"0",L=p+"1",z=t[S],N=t[L];t[S]=g(t[S],!0),t[L]=g(t[L],!0),y==="pixel"?(a(S,0),a(L,10)):(Kn.coercePosition(e,b,a,w,S,A),Kn.coercePosition(e,b,a,w,L,M)),e[S]=x(e[S]),e[L]=x(e[L]),t[S]=z,t[L]=N}if(y==="pixel"){var $=t[m];t[m]=g(t[m],!0),Kn.coercePosition(e,b,a,w,m,.25),e[m]=x(e[m]),t[m]=$}}f&&_l.noneOrAll(t,e,["x0","x1","y0","y1"]);var R=s==="line",H,D;if(f&&(H=a("label.texttemplate")),H||(D=a("label.text")),D||H){a("label.textangle");var P=a("label.textposition",R?"middle":"middle center");a("label.xanchor"),a("label.yanchor",SN(R,P)),a("label.padding"),_l.coerceFont(a,"label.font",r.font)}}}var CN=yt,kb=ke;function DN(t,e){return t?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}var PN=function(e,r,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),kb.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),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",CN.contrast(n)),a("newshape.line.dash")}var o=e.dragmode==="drawline",l=a("newshape.label.text"),s=a("newshape.label.texttemplate");if(l||s){a("newshape.label.textangle");var f=a("newshape.label.textposition",o?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",DN(o,f)),a("newshape.label.padding"),kb.coerceFont(a,"newshape.label.font",r.font)}a("activeshape.fillcolor"),a("activeshape.opacity")},mh=ke,Qn=Ot,Io=ou,hk=Ui,EN=function(e){var r=e._fullLayout,a=mh.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=Qn.getRefType(n.xref),f=Qn.getRefType(n.yref);n.xref!=="paper"&&s!=="domain"&&(o=Qn.getFromId(e,n.xref),l=Ab(o,n,Io.paramIsX),l&&(n._extremes[o._id]=Qn.findExtremes(o,l,zN(n)))),n.yref!=="paper"&&f!=="domain"&&(o=Qn.getFromId(e,n.yref),l=Ab(o,n,Io.paramIsY),l&&(n._extremes[o._id]=Qn.findExtremes(o,l,RN(n))))}};function zN(t){return pk(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function RN(t){return pk(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function pk(t,e,r,a,i,n){var o=t/2,l=n;if(e==="pixel"){var s=i?hk.extractPathCoords(i,n?Io.paramIsY:Io.paramIsX):[r,a],f=mh.aggNums(Math.max,null,s),c=mh.aggNums(Math.min,null,s),u=c<0?Math.abs(c)+o:o,v=f>0?f+o:o;return{ppad:o,ppadplus:l?u:v,ppadminus:l?v:u}}else return{ppad:o}}function Ab(t,e,r){var a=t._id.charAt(0)==="x"?"x":"y",i=t.type==="category"||t.type==="multicategory",n,o,l=0,s=0,f=i?t.r2c:t.d2c,c=e[a+"sizemode"]==="scaled";if(c?(n=e[a+"0"],o=e[a+"1"],i&&(l=e[a+"0shift"],s=e[a+"1shift"])):(n=e[a+"anchor"],o=e[a+"anchor"]),n!==void 0)return[f(n)+l,f(o)+s];if(e.path){var u=1/0,v=-1/0,h=e.path.match(Io.segmentRE),d,p,m,y,b;for(t.type==="date"&&(f=hk.decodeDate(f)),d=0;d<h.length;d++)p=h[d],m=r[p.charAt(0)].drawn,m!==void 0&&(y=h[d].substr(1).match(Io.paramRE),!(!y||y.length<m)&&(b=f(y[m]),b<u&&(u=b),b>v&&(v=b)));if(v>=u)return[u,v]}}var Mb=Cp,IN={moduleType:"component",name:"shapes",layoutAttributes:dk,supplyLayoutDefaults:MN,supplyDrawNewShapeDefaults:PN,includeBasePlot:mu("shapes"),calcAutorange:EN,draw:Mb.draw,drawOne:Mb.drawOne},Sb=Ir,FN=Ht.templatedArray,Lb=hu,mk=FN("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",Sb.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",Lb.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",Sb.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",Lb.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"}),NN=ke,qv=Ot,$N=ri,HN=mk,ON="images",jN=function(e,r){var a={name:ON,handleItemDefaults:BN};$N(e,r,a)};function BN(t,e,r){function a(v,h){return NN.coerce(t,e,HN,v,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=qv.coerceRef(t,e,o,f,"paper",void 0);if(c!=="paper"){var u=qv.getFromId(o,c);u._imgIndices.push(e._index)}qv.coercePosition(e,o,a,c,f,0)}return e}var Cb=bt,GN=zt,Jn=Ot,Db=lr,UN=Yo,VN=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=Db.ref2id(s.xref)+Db.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 u(g){var x=Cb.select(this);if(this._imgSrc!==g.source)if(x.attr("xmlns",UN.svg),!e._context.staticPlot||g.source&&g.source.slice(0,5)==="data:")x.attr("xlink:href",g.source),this._imgSrc=g.source;else{var w=new Promise((function(T){var A=new Image;this.img=A,A.setAttribute("crossOrigin","anonymous"),A.onerror=M,A.onload=function(){var S=document.createElement("canvas");S.width=this.width,S.height=this.height;var L=S.getContext("2d",{willReadFrequently:!0});L.drawImage(this,0,0);var z=S.toDataURL("image/png");x.attr("xlink:href",z),T()},x.on("error",M),A.src=g.source,this._imgSrc=g.source;function M(){x.remove(),T()}}).bind(this));e._promises.push(w)}}function v(g){var x=Cb.select(this),w=Jn.getFromId(e,g.xref),T=Jn.getFromId(e,g.yref),A=Jn.getRefType(g.xref)==="domain",M=Jn.getRefType(g.yref)==="domain",S=r._size,L,z;w!==void 0?L=typeof g.xref=="string"&&A?w._length*g.sizex:Math.abs(w.l2p(g.sizex)-w.l2p(0)):L=g.sizex*S.w,T!==void 0?z=typeof g.yref=="string"&&M?T._length*g.sizey:Math.abs(T.l2p(g.sizey)-T.l2p(0)):z=g.sizey*S.h;var N=L*c.x[g.xanchor].offset,$=z*c.y[g.yanchor].offset,R=c.x[g.xanchor].sizing+c.y[g.yanchor].sizing,H,D;switch(w!==void 0?H=typeof g.xref=="string"&&A?w._length*g.x+w._offset:w.r2p(g.x)+w._offset:H=g.x*S.w+S.l,H+=N,T!==void 0?D=typeof g.yref=="string"&&M?T._length*(1-g.y)+T._offset:T.r2p(g.y)+T._offset:D=S.h-g.y*S.h+S.t,D+=$,g.sizing){case"fill":R+=" slice";break;case"stretch":R="none";break}x.attr({x:H,y:D,width:L,height:z,preserveAspectRatio:R,opacity:g.opacity});var P=w&&Jn.getRefType(g.xref)!=="domain"?w._id:"",k=T&&Jn.getRefType(g.yref)!=="domain"?T._id:"",C=P+k;GN.setClipUrl(x,C?"clip"+r._uid+C:null,e)}function h(g){return[g.xref,g.x,g.sizex,g.yref,g.y,g.sizey].join("_")}function d(g,x){return g._index-x._index}var p=r._imageLowerLayer.selectAll("image").data(n,h),m=r._imageUpperLayer.selectAll("image").data(a,h);p.enter().append("image"),m.enter().append("image"),p.exit().remove(),m.exit().remove(),p.each(function(g){u.bind(this)(g),v.bind(this)(g)}),m.each(function(g){u.bind(this)(g),v.bind(this)(g)}),p.sort(d),m.sort(d);var y=Object.keys(r._plots);for(l=0;l<y.length;l++){o=y[l];var b=r._plots[o];if(b.imagelayer){var _=b.imagelayer.selectAll("image").data(i[o]||[],h);_.enter().append("image"),_.exit().remove(),_.each(function(g){u.bind(this)(g),v.bind(this)(g)}),_.sort(d)}}},Pb=kt,WN=$h,XN=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,u=0;u<l.length;u++)if(f=l[u],c="images["+u+"].",f[s+"ref"]===r._id){var v=f[s],h=f["size"+s],d=null,p=null;if(n){d=WN(v,r.range);var m=h/Math.pow(10,d)/2;p=2*Math.log(m+Math.sqrt(1+m*m))/Math.LN10}else d=Math.pow(10,v),p=d*(Math.pow(10,h/2)-Math.pow(10,-h/2));Pb(d)?Pb(p)||(p=null):(d=null,p=null),i(c+s,d),i(c+"size"+s,p)}}},YN={moduleType:"component",name:"images",layoutAttributes:mk,supplyLayoutDefaults:jN,includeBasePlot:mu("images"),draw:VN,convertCoords:XN},em={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:"▼"}},qN=Mr,ZN=Or,KN=Yt.extendFlat,QN=Ja.overrideAll,JN=Wh,yk=Ht.templatedArray,e$=yk("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(" ")}}),gk=QN(yk("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:e$,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:KN(JN({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:qN({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:ZN.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"),Vf=ke,bk=ri,xk=gk,t$=em,r$=t$.name,a$=xk.buttons,i$=function(e,r){var a={name:r$,handleItemDefaults:n$};bk(e,r,a)};function n$(t,e,r){function a(o,l){return Vf.coerce(t,e,xk,o,l)}var i=bk(t,e,{name:"buttons",handleItemDefaults:o$}),n=a("visible",i.length>0);n&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Vf.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Vf.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function o$(t,e){function r(i,n){return Vf.coerce(t,e,a$,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 l$=Kt,za=bt,Eb=yt,Ao=zt,_c=ke;function Kt(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})}Kt.barWidth=2;Kt.barLength=20;Kt.barRadius=2;Kt.barPad=1;Kt.barColor="#808BA4";Kt.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,u=this.position.direction,v=u==="down",h=u==="left",d=u==="right",p=u==="up",m=s,y=c,b,_,g,x;!v&&!h&&!d&&!p&&(this.position.direction="down",v=!0);var w=v||p;w?(b=l,_=b+m,v?(g=f,x=Math.min(g+y,o),y=x-g):(x=f+y,g=Math.max(x-y,0),y=x-g)):(g=f,x=g+y,h?(_=l+m,b=Math.max(_-m,0),m=_-b):(b=l,_=Math.min(b+m,n),m=_-b)),this._box={l:b,t:g,w:m,h:y};var T=s>m,A=Kt.barLength+2*Kt.barPad,M=Kt.barWidth+2*Kt.barPad,S=l,L=f+c;L+M>o&&(L=o-M);var z=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(Eb.fill,Kt.barColor),T?(this.hbar=z.attr({rx:Kt.barRadius,ry:Kt.barRadius,x:S,y:L,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=m-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var N=c>y,$=Kt.barWidth+2*Kt.barPad,R=Kt.barLength+2*Kt.barPad,H=l+s,D=f;H+$>n&&(H=n-$);var P=this.container.selectAll("rect.scrollbar-vertical").data(N?[0]:[]);P.exit().on(".drag",null).remove(),P.enter().append("rect").classed("scrollbar-vertical",!0).call(Eb.fill,Kt.barColor),N?(this.vbar=P.attr({rx:Kt.barRadius,ry:Kt.barRadius,x:H,y:D,width:$,height:R}),this._vbarYMin=D+R/2,this._vbarTranslateMax=y-R):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var k=this.id,C=b-.5,E=N?_+$+.5:_+.5,I=g-.5,j=T?x+M+.5:x+.5,G=i._topdefs.selectAll("#"+k).data(T||N?[0]:[]);if(G.exit().remove(),G.enter().append("clipPath").attr("id",k).append("rect"),T||N?(this._clipRect=G.select("rect").attr({x:Math.floor(C),y:Math.floor(I),width:Math.ceil(E)-Math.floor(C),height:Math.ceil(j)-Math.floor(I)}),this.container.call(Ao.setClipUrl,k,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(Ao.setClipUrl,null),delete this._clipRect),T||N){var X=za.behavior.drag().on("dragstart",function(){za.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(X);var O=za.behavior.drag().on("dragstart",function(){za.event.sourceEvent.preventDefault(),za.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(O),N&&this.vbar.on(".drag",null).call(O)}this.setTranslate(r,a)};Kt.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Ao.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)};Kt.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=za.event.dx),this.vbar&&(r-=za.event.dy),this.setTranslate(e,r)};Kt.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=za.event.deltaY),this.vbar&&(r+=za.event.deltaY),this.setTranslate(e,r)};Kt.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,i=a+this._hbarTranslateMax,n=_c.constrain(za.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=_c.constrain(za.event.y,s,f),u=(c-s)/(f-s),v=this.position.h-this._box.h;r=u*v}this.setTranslate(e,r)};Kt.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=_c.constrain(e||0,0,a),r=_c.constrain(r||0,0,i),this.translateX=e,this.translateY=r,this.container.call(Ao.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(Ao.setTranslate,e+n*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(Ao.setTranslate,e,r+o*this._vbarTranslateMax)}};var Fo=bt,fs=hr,cs=yt,No=zt,sa=ke,wc=Tr,s$=Ht.arrayEditor,_k=Vr.LINE_SPACING,ht=em,f$=l$,c$=function(e){var r=e._fullLayout,a=sa.filterVisible(r[ht.name]);function i(v){fs.autoMargin(e,Mk(v))}var n=r._menulayer.selectAll("g."+ht.containerClassName).data(a.length>0?[0]:[]);if(n.enter().append("g").classed(ht.containerClassName,!0).style("cursor","pointer"),n.exit().each(function(){Fo.select(this).selectAll("g."+ht.headerGroupClassName).each(i)}).remove(),a.length!==0){var o=n.selectAll("g."+ht.headerGroupClassName).data(a,u$);o.enter().append("g").classed(ht.headerGroupClassName,!0);for(var l=sa.ensureSingle(n,"g",ht.dropdownButtonGroupClassName,function(v){v.style("pointer-events","all")}),s=0;s<a.length;s++){var f=a[s];y$(e,f)}var c="updatemenus"+r._uid,u=new f$(e,l,c);o.enter().size()&&(l.node().parentNode.appendChild(l.node()),l.call(gh)),o.exit().each(function(v){l.call(gh),i(v)}).remove(),o.each(function(v){var h=Fo.select(this),d=v.type==="dropdown"?l:null;fs.manageCommandObserver(e,v,v.buttons,function(p){yh(e,v,v.buttons[p.index],h,d,u,p.index,!0)}),v.type==="dropdown"?(Tk(e,h,l,u,v),wk(l,v)&&us(e,h,l,u,v)):us(e,h,null,null,v)})}};function u$(t){return t._index}function v$(t){return+t.attr(ht.menuIndexAttrName)==-1}function wk(t,e){return+t.attr(ht.menuIndexAttrName)===e._index}function yh(t,e,r,a,i,n,o,l){e.active=o,s$(t.layout,ht.name,e).applyUpdate("active",o),e.type==="buttons"?us(t,a,null,null,e):e.type==="dropdown"&&(i.attr(ht.menuIndexAttrName,"-1"),Tk(t,a,i,n,e),l||us(t,a,i,n,e))}function Tk(t,e,r,a,i){var n=sa.ensureSingle(e,"g",ht.headerClassName,function(v){v.style("pointer-events","all")}),o=i._dims,l=i.active,s=i.buttons[l]||ht.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(tm,i,s,t).call(Sk,i,f,c);var u=sa.ensureSingle(e,"text",ht.headerArrowClassName,function(v){v.attr("text-anchor","end").call(No.font,i.font).text(ht.arrowSymbol[i.direction])});u.attr({x:o.headerWidth-ht.arrowOffsetX+i.pad.l,y:o.headerHeight/2+ht.textOffsetY+i.pad.t}),n.on("click",function(){r.call(gh,String(wk(r,i)?-1:i._index)),us(t,e,r,a,i)}),n.on("mouseover",function(){n.call(kk)}),n.on("mouseout",function(){n.call(Ak,i)}),No.setTranslate(e,o.lx,o.ly)}function us(t,e,r,a,i){r||(r=e,r.attr("pointer-events","all"));var n=!v$(r)||i.type==="buttons"?i.buttons:[],o=i.type==="dropdown"?ht.dropdownButtonClassName:ht.buttonClassName,l=r.selectAll("g."+o).data(sa.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,u=0,v=i._dims,h=["up","down"].indexOf(i.direction)!==-1;i.type==="dropdown"&&(h?u=v.headerHeight+ht.gapButtonHeader:c=v.headerWidth+ht.gapButtonHeader),i.type==="dropdown"&&i.direction==="up"&&(u=-ht.gapButtonHeader+ht.gapButton-v.openHeight),i.type==="dropdown"&&i.direction==="left"&&(c=-ht.gapButtonHeader+ht.gapButton-v.openWidth);var d={x:v.lx+c+i.pad.l,y:v.ly+u+i.pad.t,yPad:ht.gapButton,xPad:ht.gapButton,index:0},p={l:d.x+i.borderwidth,t:d.y+i.borderwidth};l.each(function(m,y){var b=Fo.select(this);b.call(tm,i,m,t).call(Sk,i,d),b.on("click",function(){Fo.event.defaultPrevented||(m.execute&&(m.args2&&i.active===y?(yh(t,i,m,e,r,a,-1),fs.executeAPICommand(t,m.method,m.args2)):(yh(t,i,m,e,r,a,y),fs.executeAPICommand(t,m.method,m.args))),t.emit("plotly_buttonclicked",{menu:i,button:m,active:i.active}))}),b.on("mouseover",function(){b.call(kk)}),b.on("mouseout",function(){b.call(Ak,i),l.call(zb,i)})}),l.call(zb,i),h?(p.w=Math.max(v.openWidth,v.headerWidth),p.h=d.y-p.t):(p.w=d.x-p.l,p.h=Math.max(v.openHeight,v.headerHeight)),p.direction=i.direction,a&&(l.size()?d$(t,e,r,a,i,p):h$(a))}function d$(t,e,r,a,i,n){var o=i.direction,l=o==="up"||o==="down",s=i._dims,f=i.active,c,u,v;if(l)for(u=0,v=0;v<f;v++)u+=s.heights[v]+ht.gapButton;else for(c=0,v=0;v<f;v++)c+=s.widths[v]+ht.gapButton;a.enable(n,c,u),a.hbar&&a.hbar.attr("opacity","0").transition().attr("opacity","1"),a.vbar&&a.vbar.attr("opacity","0").transition().attr("opacity","1")}function h$(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 tm(t,e,r,a){t.call(p$,e).call(m$,e,r,a)}function p$(t,e){var r=sa.ensureSingle(t,"rect",ht.itemRectClassName,function(a){a.attr({rx:ht.rx,ry:ht.ry,"shape-rendering":"crispEdges"})});r.call(cs.stroke,e.bordercolor).call(cs.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function m$(t,e,r,a){var i=sa.ensureSingle(t,"text",ht.itemTextClassName,function(l){l.attr({"text-anchor":"start","data-notex":1})}),n=r.label,o=a._fullLayout._meta;o&&(n=sa.templateString(n,o)),i.call(No.font,e.font).text(n).call(wc.convertToTspans,a)}function zb(t,e){var r=e.active;t.each(function(a,i){var n=Fo.select(this);i===r&&e.showactive&&n.select("rect."+ht.itemRectClassName).call(cs.fill,ht.activeColor)})}function kk(t){t.select("rect."+ht.itemRectClassName).call(cs.fill,ht.hoverColor)}function Ak(t,e){t.select("rect."+ht.itemRectClassName).call(cs.fill,e.bgcolor)}function y$(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=No.tester.selectAll("g."+ht.dropdownButtonClassName).data(sa.filterVisible(e.buttons));a.enter().append("g").classed(ht.dropdownButtonClassName,!0);var i=["up","down"].indexOf(e.direction)!==-1;a.each(function(c,u){var v=Fo.select(this);v.call(tm,e,c,t);var h=v.select("."+ht.itemTextClassName),d=h.node()&&No.bBox(h.node()).width,p=Math.max(d+ht.textPadX,ht.minWidth),m=e.font.size*_k,y=wc.lineCount(h),b=Math.max(m*y,ht.minHeight)+ht.textOffsetY;b=Math.ceil(b),p=Math.ceil(p),r.widths[u]=p,r.heights[u]=b,r.height1=Math.max(r.height1,b),r.width1=Math.max(r.width1,p),i?(r.totalWidth=Math.max(r.totalWidth,p),r.openWidth=r.totalWidth,r.totalHeight+=b+ht.gapButton,r.openHeight+=b+ht.gapButton):(r.totalWidth+=p+ht.gapButton,r.openWidth+=p+ht.gapButton,r.totalHeight=Math.max(r.totalHeight,b),r.openHeight=r.totalHeight)}),i?r.totalHeight-=ht.gapButton:r.totalWidth-=ht.gapButton,r.headerWidth=r.width1+ht.arrowPadX,r.headerHeight=r.height1,e.type==="dropdown"&&(i?(r.width1+=ht.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=ht.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";sa.isRightAnchor(e)&&(r.lx-=n,s="right"),sa.isCenterAnchor(e)&&(r.lx-=n/2,s="center");var f="top";sa.isBottomAnchor(e)&&(r.ly-=o,f="bottom"),sa.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),fs.autoMargin(t,Mk(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 Mk(t){return ht.autoMarginIdRoot+t._index}function Sk(t,e,r,a){a=a||{};var i=t.select("."+ht.itemRectClassName),n=t.select("."+ht.itemTextClassName),o=e.borderwidth,l=r.index,s=e._dims;No.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 u=e.font.size*_k,v=wc.lineCount(n),h=(v-1)*u/2;wc.positionText(n,ht.textOffsetX,c/2-h+ht.textOffsetY),f?r.y+=s.heights[l]+r.yPad:r.x+=s.widths[l]+r.xPad,r.index++}function gh(t,e){t.attr(ht.menuIndexAttrName,e||"-1").selectAll("g."+ht.dropdownButtonClassName).remove()}var g$=em,b$={moduleType:"component",name:g$.name,layoutAttributes:gk,supplyLayoutDefaults:i$,draw:c$},wu={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",autoMarginIdRoot:"slider-",railRadius:2,railWidth:5,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickLength:4,currentValueInset:0},Rb=Mr,x$=Wh,_$=Yt.extendDeepAll,w$=Ja.overrideAll,T$=jc,Lk=Ht.templatedArray,tn=wu,k$=Lk("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(" ")}}),Ck=w$(Lk("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:k$,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:_$(x$({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:T$.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:Rb({description:"Sets the font of the current value label text."})},font:Rb({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:tn.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:tn.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:tn.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:tn.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:tn.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:tn.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:tn.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root"),fo=ke,Dk=ri,Pk=Ck,A$=wu,M$=A$.name,S$=Pk.steps,L$=function(e,r){Dk(e,r,{name:M$,handleItemDefaults:C$})};function C$(t,e,r){function a(u,v){return fo.coerce(t,e,Pk,u,v)}for(var i=Dk(t,e,{name:"steps",handleItemDefaults:D$}),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=fo.filterVisible(i),f=a("active");(i[f]||{}).visible||(e.active=s[0]._index),a("x"),a("y"),fo.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"),fo.coerceFont(a,"font",r.font);var c=a("currentvalue.visible");c&&(a("currentvalue.xanchor"),a("currentvalue.prefix"),a("currentvalue.suffix"),a("currentvalue.offset"),fo.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 D$(t,e){function r(n,o){return fo.coerce(t,e,S$,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 Ra=bt,Tc=hr,Ni=yt,Ia=zt,fa=ke,P$=fa.strTranslate,Ol=Tr,E$=Ht.arrayEditor,_t=wu,rm=Vr,Ek=rm.LINE_SPACING,Zv=rm.FROM_TL,Kv=rm.FROM_BR,z$=function(e){var r=e._context.staticPlot,a=e._fullLayout,i=R$(a,e),n=a._infolayer.selectAll("g."+_t.containerClassName).data(i.length>0?[0]:[]);n.enter().append("g").classed(_t.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),Tc.autoMargin(e,zk(c))}if(n.exit().each(function(){Ra.select(this).selectAll("g."+_t.groupClassName).each(o)}).remove(),i.length!==0){var l=n.selectAll("g."+_t.groupClassName).data(i,I$);l.enter().append("g").classed(_t.groupClassName,!0),l.exit().each(o).remove();for(var s=0;s<i.length;s++){var f=i[s];F$(e,f)}l.each(function(c){var u=Ra.select(this);j$(c),Tc.manageCommandObserver(e,c,c._visibleSteps,function(v){var h=u.data()[0];h.active!==v.index&&(h._dragging||Ik(e,u,h,v.index,!1,!0))}),N$(e,Ra.select(this),c)})}};function zk(t){return _t.autoMarginIdRoot+t._index}function R$(t,e){for(var r=t[_t.name],a=[],i=0;i<r.length;i++){var n=r[i];n.visible&&(n._gd=e,a.push(n))}return a}function I$(t){return t._index}function F$(t,e){var r=Ia.tester.selectAll("g."+_t.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(_t.labelGroupClass,!0);var a=0,i=0;r.each(function(d){var p=Ra.select(this),m=Rk(p,{step:d},e),y=m.node();if(y){var b=Ia.bBox(y);i=Math.max(i,b.height),a=Math.max(a,b.width)}}),r.remove();var n=e._dims={};n.inputAreaWidth=Math.max(_t.railWidth,_t.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*_t.stepInset,s=l/(e._stepCount-1),f=a+_t.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=Ia.tester.append("g");r.each(function(d){var p=kc(c,e,d.label),m=p.node()&&Ia.bBox(p.node())||{width:0,height:0},y=Ol.lineCount(p);n.currentValueMaxWidth=Math.max(n.currentValueMaxWidth,Math.ceil(m.width)),n.currentValueHeight=Math.max(n.currentValueHeight,Math.ceil(m.height)),n.currentValueMaxLines=Math.max(n.currentValueMaxLines,y)}),n.currentValueTotalHeight=n.currentValueHeight+e.currentvalue.offset,c.remove()}n.height=n.currentValueTotalHeight+_t.tickOffset+e.ticklen+_t.labelOffset+n.labelHeight+e.pad.t+e.pad.b;var u="left";fa.isRightAnchor(e)&&(n.lx-=n.outerLength,u="right"),fa.isCenterAnchor(e)&&(n.lx-=n.outerLength/2,u="center");var v="top";fa.isBottomAnchor(e)&&(n.ly-=n.height,v="bottom"),fa.isMiddleAnchor(e)&&(n.ly-=n.height/2,v="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*Kv[v],t:n.height*Zv[v]};e.lenmode==="fraction"?(h.l=0,h.xl=e.x-e.len*Zv[u],h.r=0,h.xr=e.x+e.len*Kv[u]):(h.x=e.x,h.l=n.outerLength*Zv[u],h.r=n.outerLength*Kv[u]),Tc.autoMargin(t,zk(e),h)}function N$(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(kc,r).call(G$,r).call(H$,r).call(O$,r).call(B$,t,r).call($$,t,r);var a=r._dims;Ia.setTranslate(e,a.lx+r.pad.l,a.ly+r.pad.t),e.call(Nk,r,!1),e.call(kc,r)}function kc(t,e,r){if(e.currentvalue.visible){var a=e._dims,i,n;switch(e.currentvalue.xanchor){case"right":i=a.inputAreaLength-_t.currentValueInset-a.currentValueMaxWidth,n="left";break;case"center":i=a.inputAreaLength*.5,n="middle";break;default:i=_t.currentValueInset,n="left"}var o=fa.ensureSingle(t,"text",_t.labelClass,function(v){v.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=fa.templateString(s,f)),l+=s}e.currentvalue.suffix&&(l+=e.currentvalue.suffix),o.call(Ia.font,e.currentvalue.font).text(l).call(Ol.convertToTspans,e._gd);var c=Ol.lineCount(o),u=(a.currentValueMaxLines+1-c)*e.currentvalue.font.size*Ek;return Ol.positionText(o,i,u),o}}function $$(t,e,r){var a=fa.ensureSingle(t,"rect",_t.gripRectClass,function(i){i.call(Fk,e,t,r).style("pointer-events","all")});a.attr({width:_t.gripWidth,height:_t.gripHeight,rx:_t.gripRadius,ry:_t.gripRadius}).call(Ni.stroke,r.bordercolor).call(Ni.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function Rk(t,e,r){var a=fa.ensureSingle(t,"text",_t.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),i=e.step.label,n=r._gd._fullLayout._meta;return n&&(i=fa.templateString(i,n)),a.call(Ia.font,r.font).text(i).call(Ol.convertToTspans,r._gd),a}function H$(t,e){var r=fa.ensureSingle(t,"g",_t.labelsClass),a=e._dims,i=r.selectAll("g."+_t.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(_t.labelGroupClass,!0),i.exit().remove(),i.each(function(n){var o=Ra.select(this);o.call(Rk,n,e),Ia.setTranslate(o,am(e,n.fraction),_t.tickOffset+e.ticklen+e.font.size*Ek+_t.labelOffset+a.currentValueTotalHeight)})}function Ib(t,e,r,a,i){var n=Math.round(a*(r._stepCount-1)),o=r._visibleSteps[n]._index;o!==r.active&&Ik(t,e,r,o,!0,i)}function Ik(t,e,r,a,i,n){var o=r.active;r.active=a,E$(t.layout,_t.name,r).applyUpdate("active",a);var l=r.steps[r.active];e.call(Nk,r,n),e.call(kc,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&&Tc.executeAPICommand(t,s.method,s.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function Fk(t,e,r){if(e._context.staticPlot)return;var a=r.node(),i=Ra.select(e);function n(){return r.data()[0]}function o(){var l=n();e.emit("plotly_sliderstart",{slider:l});var s=r.select("."+_t.gripRectClass);Ra.event.stopPropagation(),Ra.event.preventDefault(),s.call(Ni.fill,l.activebgcolor);var f=Fb(l,Ra.mouse(a)[0]);Ib(e,r,l,f,!0),l._dragging=!0;function c(){var v=n(),h=Fb(v,Ra.mouse(a)[0]);Ib(e,r,v,h,!1)}i.on("mousemove",c),i.on("touchmove",c);function u(){var v=n();v._dragging=!1,s.call(Ni.fill,v.bgcolor),i.on("mouseup",null),i.on("mousemove",null),i.on("touchend",null),i.on("touchmove",null),e.emit("plotly_sliderend",{slider:v,step:v.steps[v.active]})}i.on("mouseup",u),i.on("touchend",u)}t.on("mousedown",o),t.on("touchstart",o)}function O$(t,e){var r=t.selectAll("rect."+_t.tickRectClass).data(e._visibleSteps),a=e._dims;r.enter().append("rect").classed(_t.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=Ra.select(this);l.attr({height:o?e.ticklen:e.minorticklen}).call(Ni.fill,e.tickcolor),Ia.setTranslate(l,am(e,n/(e._stepCount-1))-.5*e.tickwidth,(o?_t.tickOffset:_t.minorTickOffset)+a.currentValueTotalHeight)})}function j$(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 Nk(t,e,r){for(var a=t.select("rect."+_t.gripRectClass),i=0,n=0;n<e._stepCount;n++)if(e._visibleSteps[n]._index===e.active){i=n;break}var o=am(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",P$(o-_t.gripWidth*.5,e._dims.currentValueTotalHeight))}}function am(t,e){var r=t._dims;return r.inputAreaStart+_t.stepInset+(r.inputAreaLength-2*_t.stepInset)*Math.min(1,Math.max(0,e))}function Fb(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-_t.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*_t.stepInset-2*r.inputAreaStart)))}function B$(t,e,r){var a=r._dims,i=fa.ensureSingle(t,"rect",_t.railTouchRectClass,function(n){n.call(Fk,e,t,r).style("pointer-events","all")});i.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,_t.tickOffset+r.ticklen+a.labelHeight)}).call(Ni.fill,r.bgcolor).attr("opacity",0),Ia.setTranslate(i,0,a.currentValueTotalHeight)}function G$(t,e){var r=e._dims,a=r.inputAreaLength-_t.railInset*2,i=fa.ensureSingle(t,"rect",_t.railRectClass);i.attr({width:a,height:_t.railWidth,rx:_t.railRadius,ry:_t.railRadius,"shape-rendering":"crispEdges"}).call(Ni.stroke,e.bordercolor).call(Ni.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),Ia.setTranslate(i,_t.railInset,(r.inputAreaWidth-_t.railWidth)*.5+r.currentValueTotalHeight)}var U$=wu,V$={moduleType:"component",name:U$.name,layoutAttributes:Ck,supplyLayoutDefaults:L$,draw:z$},Nb=Or,im={bgcolor:{valType:"color",dflt:Nb.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:Nb.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"},$k={_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"},Tu={},nm={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},W$=lr,X$=Tr,Hk=nm,Y$=Vr.LINE_SPACING,Ac=Hk.name;function Ok(t){var e=t&&t[Ac];return e&&e.visible}Tu.isVisible=Ok;Tu.makeData=function(t){for(var e=W$.list({_fullLayout:t},"x",!0),r=t.margin,a=[],i=0;i<e.length;i++){var n=e[i];if(Ok(n)){a.push(n);var o=n[Ac];o._id=Ac+n._id,o._height=(t.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}t._rangeSliderData=a};Tu.autoMarginOpts=function(t,e){var r=t._fullLayout,a=e[Ac],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(X$.BR_TAG_ALL)||[]).length;o+=l*e.title.font.size*Y$}return{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:a._height+n+Math.max(r.margin.b,o),pad:Hk.extraPad+a._offsetShift*2}};var Qv,$b;function q$(){if($b)return Qv;$b=1;var t=ke,e=Ht,r=lr,a=im,i=$k;return Qv=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 u=f.rangeslider,v=e.newContainer(c,"rangeslider");function h(S,L){return t.coerce(u,v,a,S,L)}var d,p;function m(S,L){return t.coerce(d,p,i,S,L)}var y=h("visible");if(y){h("bgcolor",l.plot_bgcolor),h("bordercolor"),h("borderwidth"),h("thickness"),h("autorange",!c.isValidRange(u.range)),h("range");var b=l._subplots;if(b)for(var _=b.cartesian.filter(function(S){return S.substr(0,S.indexOf("y"))===r.name2id(s)}).map(function(S){return S.substr(S.indexOf("y"),S.length)}),g=t.simpleMap(_,r.id2name),x=0;x<g.length;x++){var w=g[x];d=u[w]||{},p=e.newContainer(v,w,"yaxis");var T=l[w],A;d.range&&T.isValidRange(d.range)&&(A="fixed");var M=m("rangemode",A);M!=="match"&&m("range",T.range.slice())}v._input=u}},Qv}var Jv,Hb;function Z$(){if(Hb)return Jv;Hb=1;var t=lr.list,e=_s.getAutoRange,r=nm;return Jv=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))}},Jv}var ed,Ob;function K$(){if(Ob)return ed;Ob=1;var t=bt,e=ot,r=hr,a=ke,i=a.strTranslate,n=zt,o=yt,l=Kc,s=pr,f=lr,c=ai,u=Bi,v=nm;ed=function(A){for(var M=A._fullLayout,S=M._rangeSliderData,L=0;L<S.length;L++){var z=S[L][v.name];z._clipId=z._id+"-"+M._uid}function N(R){return R._name}var $=M._infolayer.selectAll("g."+v.containerClassName).data(S,N);$.exit().each(function(R){var H=R[v.name];M._topdefs.select("#"+H._clipId).remove()}).remove(),S.length!==0&&($.enter().append("g").classed(v.containerClassName,!0).attr("pointer-events","all"),$.each(function(R){var H=t.select(this),D=R[v.name],P=M[f.id2name(R.anchor)],k=D[f.id2name(R.anchor)];if(D.range){var C=a.simpleMap(D.range,R.r2l),E=a.simpleMap(R.range,R.r2l),I;E[0]<E[1]?I=[Math.min(C[0],E[0]),Math.max(C[1],E[1])]:I=[Math.max(C[0],E[0]),Math.min(C[1],E[1])],D.range=D._input.range=a.simpleMap(I,R.l2r)}R.cleanRange("rangeslider.range");var j=M._size,G=R.domain;D._width=j.w*(G[1]-G[0]);var X=Math.round(j.l+j.w*G[0]),O=Math.round(j.t+j.h*(1-R._counterDomainMin)+(R.side==="bottom"?R._depth:0)+D._offsetShift+v.extraPad);H.attr("transform",i(X,O)),D._rl=a.simpleMap(D.range,R.r2l);var Z=D._rl[0],V=D._rl[1],q=V-Z;if(D.p2d=function(me){return me/D._width*q+Z},D.d2p=function(me){return(me-Z)/q*D._width},R.rangebreaks){var B=R.locateBreaks(Z,V);if(B.length){var J,ie,de=0;for(J=0;J<B.length;J++)ie=B[J],de+=ie.max-ie.min;var oe=D._width/(V-Z-de),Y=[-oe*Z];for(J=0;J<B.length;J++)ie=B[J],Y.push(Y[Y.length-1]-oe*(ie.max-ie.min));for(D.d2p=function(me){for(var pe=Y[0],se=0;se<B.length;se++){var be=B[se];if(me>=be.max)pe=Y[se+1];else if(me<be.min)break}return pe+oe*me},J=0;J<B.length;J++)ie=B[J],ie.pmin=D.d2p(ie.min),ie.pmax=D.d2p(ie.max);D.p2d=function(me){for(var pe=Y[0],se=0;se<B.length;se++){var be=B[se];if(me>=be.pmax)pe=Y[se+1];else if(me<be.pmin)break}return(me-pe)/oe}}}if(k.rangemode!=="match"){var ee=P.r2l(k.range[0]),le=P.r2l(k.range[1]),ue=le-ee;D.d2pOppAxis=function(me){return(me-ee)/ue*D._height}}H.call(y,A,R,D).call(b,A,R,D).call(_,A,R,D).call(x,A,R,D,k).call(w,A,R,D).call(T,A,R,D),d(H,A,R,D),m(H,A,R,D,P,k),R.side==="bottom"&&l.draw(A,R._id+"title",{propContainer:R,propName:R._name+".title",placeholder:M._dfltTitle.x,attributes:{x:R._offset+R._length/2,y:O+D._height+D._offsetShift+10+1.5*R.title.font.size,"text-anchor":"middle"}})}))};function h(A){return typeof A.clientX=="number"?A.clientX:A.touches&&A.touches.length>0?A.touches[0].clientX:0}function d(A,M,S,L){if(M._context.staticPlot)return;var z=A.select("rect."+v.slideBoxClassName).node(),N=A.select("rect."+v.grabAreaMinClassName).node(),$=A.select("rect."+v.grabAreaMaxClassName).node();function R(){var H=t.event,D=H.target,P=h(H),k=P-A.node().getBoundingClientRect().left,C=L.d2p(S._rl[0]),E=L.d2p(S._rl[1]),I=c.coverSlip();this.addEventListener("touchmove",j),this.addEventListener("touchend",G),I.addEventListener("mousemove",j),I.addEventListener("mouseup",G);function j(X){var O=h(X),Z=+O-P,V,q,B;switch(D){case z:if(B="ew-resize",C+Z>S._length||E+Z<0)return;V=C+Z,q=E+Z;break;case N:if(B="col-resize",C+Z>S._length)return;V=C+Z,q=E;break;case $:if(B="col-resize",E+Z<0)return;V=C,q=E+Z;break;default:B="ew-resize",V=k,q=k+Z;break}if(q<V){var J=q;q=V,V=J}L._pixelMin=V,L._pixelMax=q,u(t.select(I),B),p(A,M,S,L)}function G(){I.removeEventListener("mousemove",j),I.removeEventListener("mouseup",G),this.removeEventListener("touchmove",j),this.removeEventListener("touchend",G),a.removeElement(I)}}A.on("mousedown",R),A.on("touchstart",R)}function p(A,M,S,L){function z(R){return S.l2r(a.constrain(R,L._rl[0],L._rl[1]))}var N=z(L.p2d(L._pixelMin)),$=z(L.p2d(L._pixelMax));window.requestAnimationFrame(function(){e.call("_guiRelayout",M,S._name+".range",[N,$])})}function m(A,M,S,L,z,N){var $=v.handleWidth/2;function R(X){return a.constrain(X,0,L._width)}function H(X){return a.constrain(X,0,L._height)}function D(X){return a.constrain(X,-$,L._width+$)}var P=R(L.d2p(S._rl[0])),k=R(L.d2p(S._rl[1]));if(A.select("rect."+v.slideBoxClassName).attr("x",P).attr("width",k-P),A.select("rect."+v.maskMinClassName).attr("width",P),A.select("rect."+v.maskMaxClassName).attr("x",k).attr("width",L._width-k),N.rangemode!=="match"){var C=L._height-H(L.d2pOppAxis(z._rl[1])),E=L._height-H(L.d2pOppAxis(z._rl[0]));A.select("rect."+v.maskMinOppAxisClassName).attr("x",P).attr("height",C).attr("width",k-P),A.select("rect."+v.maskMaxOppAxisClassName).attr("x",P).attr("y",E).attr("height",L._height-E).attr("width",k-P),A.select("rect."+v.slideBoxClassName).attr("y",C).attr("height",E-C)}var I=.5,j=Math.round(D(P-$))-I,G=Math.round(D(k-$))+I;A.select("g."+v.grabberMinClassName).attr("transform",i(j,I)),A.select("g."+v.grabberMaxClassName).attr("transform",i(G,I))}function y(A,M,S,L){var z=a.ensureSingle(A,"rect",v.bgClassName,function(H){H.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),N=L.borderwidth%2===0?L.borderwidth:L.borderwidth-1,$=-L._offsetShift,R=n.crispRound(M,L.borderwidth);z.attr({width:L._width+N,height:L._height+N,transform:i($,$),"stroke-width":R}).call(o.stroke,L.bordercolor).call(o.fill,L.bgcolor)}function b(A,M,S,L){var z=M._fullLayout,N=a.ensureSingleById(z._topdefs,"clipPath",L._clipId,function($){$.append("rect").attr({x:0,y:0})});N.select("rect").attr({width:L._width,height:L._height})}function _(A,M,S,L){var z=M.calcdata,N=A.selectAll("g."+v.rangePlotClassName).data(S._subplotsWith,a.identity);N.enter().append("g").attr("class",function(R){return v.rangePlotClassName+" "+R}).call(n.setClipUrl,L._clipId,M),N.order(),N.exit().remove();var $;N.each(function(R,H){var D=t.select(this),P=H===0,k=f.getFromId(M,R,"y"),C=k._name,E=L[C],I={data:[],layout:{xaxis:{type:S.type,domain:[0,1],range:L.range.slice(),calendar:S.calendar},width:L._width,height:L._height,margin:{t:0,b:0,l:0,r:0}},_context:M._context};S.rangebreaks&&(I.layout.xaxis.rangebreaks=S.rangebreaks),I.layout[C]={type:k.type,domain:[0,1],range:E.rangemode!=="match"?E.range.slice():k.range.slice(),calendar:k.calendar},k.rangebreaks&&(I.layout[C].rangebreaks=k.rangebreaks),r.supplyDefaults(I);var j=I._fullLayout.xaxis,G=I._fullLayout[C];j.clearCalc(),j.setScale(),G.clearCalc(),G.setScale();var X={id:R,plotgroup:D,xaxis:j,yaxis:G,isRangePlot:!0};P?$=X:(X.mainplot="xy",X.mainplotinfo=$),s.rangePlot(M,X,g(z,R))})}function g(A,M){for(var S=[],L=0;L<A.length;L++){var z=A[L],N=z[0].trace;N.xaxis+N.yaxis===M&&S.push(z)}return S}function x(A,M,S,L,z){var N=a.ensureSingle(A,"rect",v.maskMinClassName,function(D){D.attr({x:0,y:0,"shape-rendering":"crispEdges"})});N.attr("height",L._height).call(o.fill,v.maskColor);var $=a.ensureSingle(A,"rect",v.maskMaxClassName,function(D){D.attr({y:0,"shape-rendering":"crispEdges"})});if($.attr("height",L._height).call(o.fill,v.maskColor),z.rangemode!=="match"){var R=a.ensureSingle(A,"rect",v.maskMinOppAxisClassName,function(D){D.attr({y:0,"shape-rendering":"crispEdges"})});R.attr("width",L._width).call(o.fill,v.maskOppAxisColor);var H=a.ensureSingle(A,"rect",v.maskMaxOppAxisClassName,function(D){D.attr({y:0,"shape-rendering":"crispEdges"})});H.attr("width",L._width).style("border-top",v.maskOppBorder).call(o.fill,v.maskOppAxisColor)}}function w(A,M,S,L){if(!M._context.staticPlot){var z=a.ensureSingle(A,"rect",v.slideBoxClassName,function(N){N.attr({y:0,cursor:v.slideBoxCursor,"shape-rendering":"crispEdges"})});z.attr({height:L._height,fill:v.slideBoxFill})}}function T(A,M,S,L){var z=a.ensureSingle(A,"g",v.grabberMinClassName),N=a.ensureSingle(A,"g",v.grabberMaxClassName),$={x:0,width:v.handleWidth,rx:v.handleRadius,fill:o.background,stroke:o.defaultLine,"stroke-width":v.handleStrokeWidth,"shape-rendering":"crispEdges"},R={y:Math.round(L._height/4),height:Math.round(L._height/2)},H=a.ensureSingle(z,"rect",v.handleMinClassName,function(E){E.attr($)});H.attr(R);var D=a.ensureSingle(N,"rect",v.handleMaxClassName,function(E){E.attr($)});D.attr(R);var P={width:v.grabAreaWidth,x:0,y:0,fill:v.grabAreaFill,cursor:M._context.staticPlot?void 0:v.grabAreaCursor},k=a.ensureSingle(z,"rect",v.grabAreaMinClassName,function(E){E.attr(P)});k.attr("height",L._height);var C=a.ensureSingle(N,"rect",v.grabAreaMaxClassName,function(E){E.attr(P)});C.attr("height",L._height)}return ed}var Q$=ke,J$=im,e4=$k,td=Tu,t4={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:Q$.extendFlat({},J$,{yaxis:e4})}}},layoutAttributes:im,handleDefaults:q$(),calcAutorange:Z$(),draw:K$(),isVisible:td.isVisible,makeData:td.makeData,autoMarginOpts:td.autoMarginOpts},r4=Mr,jb=Or,a4=Ht.templatedArray,i4=a4("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(" ")}),bh={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:i4,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:r4({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:jb.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:jb.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"},jk={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10},Wf=ke,n4=yt,o4=Ht,l4=ri,Bk=bh,xh=jk,s4=function(e,r,a,i,n){var o=e.rangeselector||{},l=o4.newContainer(r,"rangeselector");function s(h,d){return Wf.coerce(o,l,Bk,h,d)}var f=l4(o,l,{name:"buttons",handleItemDefaults:f4,calendar:n}),c=s("visible",f.length>0);if(c){var u=c4(r,a,i);s("x",u[0]),s("y",u[1]),Wf.noneOrAll(e,r,["x","y"]),s("xanchor"),s("yanchor"),Wf.coerceFont(s,"font",a.font);var v=s("bgcolor");s("activecolor",n4.contrast(v,xh.lightAmount,xh.darkAmount)),s("bordercolor"),s("borderwidth")}};function f4(t,e,r,a){var i=a.calendar;function n(s,f){return Wf.coerce(t,e,Bk.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 c4(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+xh.yPad]}var u4=gM,v4=ke.titleCase,d4=function(e,r){var a=e._name,i={};if(r.step==="all")i[a+".autorange"]=!0;else{var n=h4(e,r);i[a+".range[0]"]=n[0],i[a+".range[1]"]=n[1]}return i};function h4(t,e){var r=t.range,a=new Date(t.r2l(r[1])),i=e.step,n=u4["utc"+v4(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 Mc=bt,p4=ot,m4=hr,Bb=yt,Gk=zt,ui=ke,Gb=ui.strTranslate,Xf=Tr,y4=lr,om=Vr,Ub=om.LINE_SPACING,Vb=om.FROM_TL,Wb=om.FROM_BR,_h=jk,g4=d4,b4=function(e){var r=e._fullLayout,a=r._infolayer.selectAll(".rangeselector").data(x4(e),_4);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(i){var n=Mc.select(this),o=i,l=o.rangeselector,s=n.selectAll("g.button").data(ui.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(f){var c=Mc.select(this),u=g4(o,f);f._isActive=w4(o,f,u),c.call(rd,l,f),c.call(k4,l,f,e),c.on("click",function(){e._dragged||p4.call("_guiRelayout",e,u)}),c.on("mouseover",function(){f._isHovered=!0,c.call(rd,l,f)}),c.on("mouseout",function(){f._isHovered=!1,c.call(rd,l,f)})}),M4(e,s,l,o._name,n)})};function x4(t){for(var e=y4.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 _4(t){return t._id}function w4(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 rd(t,e,r){var a=ui.ensureSingle(t,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});a.attr({rx:_h.rx,ry:_h.ry}),a.call(Bb.stroke,e.bordercolor).call(Bb.fill,T4(e,r)).style("stroke-width",e.borderwidth+"px")}function T4(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}function k4(t,e,r,a){function i(o){Xf.convertToTspans(o,a)}var n=ui.ensureSingle(t,"text","selector-text",function(o){o.attr("text-anchor","middle")});n.call(Gk.font,e.font).text(A4(r,a._fullLayout._meta)).call(i)}function A4(t,e){return t.label?e?ui.templateString(t.label,e):t.label:t.step==="all"?"all":t.count+t.step.charAt(0)}function M4(t,e,r,a,i){var n=0,o=0,l=r.borderwidth;e.each(function(){var h=Mc.select(this),d=h.select(".selector-text"),p=r.font.size*Ub,m=Math.max(p*Xf.lineCount(d),16)+3;o=Math.max(o,m)}),e.each(function(){var h=Mc.select(this),d=h.select(".selector-rect"),p=h.select(".selector-text"),m=p.node()&&Gk.bBox(p.node()).width,y=r.font.size*Ub,b=Xf.lineCount(p),_=Math.max(m+10,_h.minButtonWidth);h.attr("transform",Gb(l+n,l)),d.attr({x:0,y:0,width:_,height:o}),Xf.positionText(p,_/2,o/2-(b-1)*y/2+3),n+=_+5});var s=t._fullLayout._size,f=s.l+s.w*r.x,c=s.t+s.h*(1-r.y),u="left";ui.isRightAnchor(r)&&(f-=n,u="right"),ui.isCenterAnchor(r)&&(f-=n/2,u="center");var v="top";ui.isBottomAnchor(r)&&(c-=o,v="bottom"),ui.isMiddleAnchor(r)&&(c-=o/2,v="middle"),n=Math.ceil(n),o=Math.ceil(o),f=Math.round(f),c=Math.round(c),m4.autoMargin(t,a+"-range-selector",{x:r.x,y:r.y,l:n*Vb[u],r:n*Wb[u],b:o*Wb[v],t:o*Vb[v]}),i.attr("transform",Gb(f,c))}var S4={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:bh}}},layoutAttributes:bh,handleDefaults:s4,draw:b4},Wi={},Xb=Yt.extendFlat;Wi.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};Wi.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 L4=ke,C4=Bo.counter,D4=Wi.attributes,Yb=Ir.idRegex,P4=Ht,wh={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:[C4("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:[Yb.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:[Yb.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:D4({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 Sc(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 E4(t,e){var r=t.grid||{},a=Sc(e,r,"x"),i=Sc(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 u=P4.newContainer(e,"grid");function v(w,T){return L4.coerce(r,u,wh,w,T)}var h=v("rows",f),d=v("columns",c);if(!(h*d>1)){delete e.grid;return}if(!n&&!o&&!l){var p=v("pattern")==="independent";p&&(n=!0)}u._hasSubplotGrid=n;var m=v("roworder"),y=m==="top to bottom",b=n?.2:.1,_=n?.3:.1,g,x;s&&e._splomGridDflt&&(g=e._splomGridDflt.xside,x=e._splomGridDflt.yside),u._domains={x:qb("x",v,b,g,d),y:qb("y",v,_,x,h,y)}}function qb(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),u=c*(1-o),v=0;v<i;v++){var h=f+c*v;s[n?i-1-v:v]=[h,h+u]}return s}function z4(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,u,v,h,d,p,m=r._axisMap={};if(n){var y=a.subplots||[];d=r.subplots=new Array(o);var b=1;for(f=0;f<o;f++){var _=d[f]=new Array(l),g=y[f]||[];for(c=0;c<l;c++)if(s?(h=b===1?"xy":"x"+b+"y"+b,b++):h=g[c],_[c]="",i.cartesian.indexOf(h)!==-1){if(p=h.indexOf("y"),u=h.slice(0,p),v=h.slice(p),m[u]!==void 0&&m[u]!==c||m[v]!==void 0&&m[v]!==f)continue;_[c]=h,m[u]=c,m[v]=f}}}else{var x=Sc(e,a,"x"),w=Sc(e,a,"y");r.xaxes=Zb(x,i.xaxis,l,m,"x"),r.yaxes=Zb(w,i.yaxis,o,m,"y")}var T=r._anchors={},A=r.roworder==="top to bottom";for(var M in m){var S=M.charAt(0),L=r[S+"side"],z,N,$;if(L.length<8)T[M]="free";else if(S==="x"){if(L.charAt(0)==="t"===A?(z=0,N=1,$=o):(z=o-1,N=-1,$=-1),n){var R=m[M];for(f=z;f!==$;f+=N)if(h=d[f][R],!!h&&(p=h.indexOf("y"),h.slice(0,p)===M)){T[M]=h.slice(p);break}}else for(f=z;f!==$;f+=N)if(v=r.yaxes[f],i.cartesian.indexOf(M+v)!==-1){T[M]=v;break}}else if(L.charAt(0)==="l"?(z=0,N=1,$=l):(z=l-1,N=-1,$=-1),n){var H=m[M];for(f=z;f!==$;f+=N)if(h=d[H][f],!!h&&(p=h.indexOf("y"),h.slice(p)===M)){T[M]=h.slice(0,p);break}}else for(f=z;f!==$;f+=N)if(u=r.xaxes[f],i.cartesian.indexOf(u+M)!==-1){T[M]=u;break}}}}function Zb(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 R4={moduleType:"component",name:"grid",schema:{layout:{grid:wh}},layoutAttributes:wh,sizeDefaults:E4,contentDefaults:z4},Uk={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 stroke 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"},ad,Kb;function I4(){if(Kb)return ad;Kb=1;var t=kt,e=ot,r=ke,a=Ht,i=Uk;return ad=function(n,o,l,s){var f="error_"+s.axis,c=a.newContainer(o,f),u=n[f]||{};function v(_,g){return r.coerce(u,c,i,_,g)}var h=u.array!==void 0||u.value!==void 0||u.type==="sqrt",d=v("visible",h);if(d!==!1){var p=v("type","array"in u?"data":"percent"),m=!0;p!=="sqrt"&&(m=v("symmetric",!((p==="data"?"arrayminus":"valueminus")in u))),p==="data"?(v("array"),v("traceref"),m||(v("arrayminus"),v("tracerefminus"))):(p==="percent"||p==="constant")&&(v("value"),m||v("valueminus"));var y="copy_"+s.inherit+"style";if(s.inherit){var b=o["error_"+s.inherit];(b||{}).visible&&v(y,!(u.color||t(u.thickness)||t(u.width)))}(!s.inherit||!c[y])&&(v("color",l),v("thickness"),v("width",e.traceIs(o,"gl3d")?0:4))}},ad}var id,Qb;function Vk(){if(Qb)return id;Qb=1,id=function(r){var a=r.type,i=r.symmetric;if(a==="data"){var n=r.array||[];if(i)return function(c,u){var v=+n[u];return[v,v]};var o=r.arrayminus||[];return function(c,u){var v=+n[u],h=+o[u];return!isNaN(v)||!isNaN(h)?[h||0,v||0]:[NaN,NaN]}}else{var l=t(a,r.value),s=t(a,r.valueminus);return i||r.valueminus===void 0?function(c){var u=l(c);return[u,u]}: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 id}var nd,Jb;function F4(){if(Jb)return nd;Jb=1;var t=kt,e=ot,r=Ot,a=ke,i=Vk();nd=function(l){for(var s=l.calcdata,f=0;f<s.length;f++){var c=s[f],u=c[0].trace;if(u.visible===!0&&e.traceIs(u,"errorBarsOK")){var v=r.getFromId(l,u.xaxis),h=r.getFromId(l,u.yaxis);n(c,u,v,"x"),n(c,u,h,"y")}}};function n(o,l,s,f){var c=l["error_"+f]||{},u=c.visible&&["linear","log"].indexOf(s.type)!==-1,v=[];if(u){for(var h=i(c),d=0;d<o.length;d++){var p=o[d],m=p.i;if(m===void 0)m=d;else if(m===null)continue;var y=p[f];if(t(s.c2l(y))){var b=h(y,m);if(t(b[0])&&t(b[1])){var _=p[f+"s"]=y-b[0],g=p[f+"h"]=y+b[1];v.push(_,g)}}}var x=s._id,w=l._extremes[x],T=r.findExtremes(s,v,a.extendFlat({tozero:w.opts.tozero},{padded:!0}));w.min=w.min.concat(T.min),w.max=w.max.concat(T.max)}}return nd}var od,ex;function N4(){if(ex)return od;ex=1;var t=bt,e=kt,r=zt,a=jr;od=function(o,l,s,f){var c,u=s.xaxis,v=s.yaxis,h=f&&f.duration>0,d=o._context.staticPlot;l.each(function(p){var m=p[0].trace,y=m.error_x||{},b=m.error_y||{},_;m.ids&&(_=function(T){return T.id});var g=a.hasMarkers(m)&&m.marker.maxdisplayed>0;!b.visible&&!y.visible&&(p=[]);var x=t.select(this).selectAll("g.errorbar").data(p,_);if(x.exit().remove(),!!p.length){y.visible||x.selectAll("path.xerror").remove(),b.visible||x.selectAll("path.yerror").remove(),x.style("opacity",1);var w=x.enter().append("g").classed("errorbar",!0);h&&w.style("opacity",0).transition().duration(f.duration).style("opacity",1),r.setClipUrl(x,s.layerClipId,o),x.each(function(T){var A=t.select(this),M=i(T,u,v);if(!(g&&!T.vis)){var S,L=A.select("path.yerror");if(b.visible&&e(M.x)&&e(M.yh)&&e(M.ys)){var z=b.width;S="M"+(M.x-z)+","+M.yh+"h"+2*z+"m-"+z+",0V"+M.ys,M.noYS||(S+="m-"+z+",0h"+2*z),c=!L.size(),c?L=A.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("yerror",!0):h&&(L=L.transition().duration(f.duration).ease(f.easing)),L.attr("d",S)}else L.remove();var N=A.select("path.xerror");if(y.visible&&e(M.y)&&e(M.xh)&&e(M.xs)){var $=(y.copy_ystyle?b:y).width;S="M"+M.xh+","+(M.y-$)+"v"+2*$+"m0,-"+$+"H"+M.xs,M.noXS||(S+="m0,-"+$+"v"+2*$),c=!N.size(),c?N=A.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("xerror",!0):h&&(N=N.transition().duration(f.duration).ease(f.easing)),N.attr("d",S)}else N.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 od}var ld,tx;function $4(){if(tx)return ld;tx=1;var t=bt,e=yt;return ld=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)})},ld}var jl=ke,rx=Ja.overrideAll,Bl=Uk,hn={error_x:jl.extendFlat({},Bl),error_y:jl.extendFlat({},Bl)};delete hn.error_x.copy_zstyle;delete hn.error_y.copy_zstyle;delete hn.error_y.copy_ystyle;var Ms={error_x:jl.extendFlat({},Bl),error_y:jl.extendFlat({},Bl),error_z:jl.extendFlat({},Bl)};delete Ms.error_x.copy_ystyle;delete Ms.error_y.copy_ystyle;delete Ms.error_z.copy_ystyle;delete Ms.error_z.copy_zstyle;var H4={moduleType:"component",name:"errorbars",schema:{traces:{scatter:hn,bar:hn,histogram:hn,scatter3d:rx(Ms,"calc","nested"),scattergl:rx(hn,"calc","nested")}},supplyDefaults:I4(),calc:F4(),makeComputeError:Vk(),plot:N4(),style:$4(),hoverInfo:O4};function O4(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 j4={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=bt,sd=$a,Yf=hr,ax=ot,oi=Ot,mf=ai,ga=ke,Ca=ga.strTranslate,Wk=Yt.extendFlat,fd=Bi,Sa=zt,cd=yt,B4=Kc,G4=Tr,U4=ja.flipScale,V4=ak,W4=ik,X4=ti,lm=Vr,ix=lm.LINE_SPACING,nx=lm.FROM_TL,ox=lm.FROM_BR,Zt=j4.cn;function Y4(t){var e=t._fullLayout,r=e._infolayer.selectAll("g."+Zt.colorbar).data(q4(t),function(a){return a._id});r.enter().append("g").attr("class",function(a){return a._id}).classed(Zt.colorbar,!0),r.each(function(a){var i=Mi.select(this);ga.ensureSingle(i,"rect",Zt.cbbg),ga.ensureSingle(i,"g",Zt.cbfills),ga.ensureSingle(i,"g",Zt.cblines),ga.ensureSingle(i,"g",Zt.cbaxis,function(o){o.classed(Zt.crisp,!0)}),ga.ensureSingle(i,"g",Zt.cbtitleunshift,function(o){o.append("g").classed(Zt.cbtitle,!0)}),ga.ensureSingle(i,"rect",Zt.cboutline);var n=Z4(i,a,t);n&&n.then&&(t._promises||[]).push(n),t._context.edits.colorbarPosition&&K4(i,a,t)}),r.exit().each(function(a){Yf.autoMargin(t,a._id)}).remove(),r.order()}function q4(t){var e=t._fullLayout,r=t.calcdata,a=[],i,n,o,l;function s(_){return Wk(_,{_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?U4(n.colorscale):n.colorscale,i._zrange=[n[l.min],n[l.max]])}for(var c=0;c<r.length;c++){var u=r[c];if(o=u[0].trace,!!o._module){var v=o._module.colorbar;if(o.visible===!0&&v)for(var h=Array.isArray(v),d=h?v:[v],p=0;p<d.length;p++){l=d[p];var m=l.container;n=m?o[m]:o,n&&n.showscale&&(i=s(n.colorbar),i._id="cb"+o.uid+(h&&m?"-"+m:""),i._traceIndex=o.index,i._propPrefix=(m?m+".":"")+"colorbar.",i._meta=o._meta,f(),a.push(i))}}}for(var y in e._colorAxes)if(n=e[y],n.showscale){var b=e._colorAxes[y];i=s(n.colorbar),i._id="cb"+y,i._propPrefix=y+".colorbar.",i._meta=e._meta,l={min:"cmin",max:"cmax"},b[0]!=="heatmap"&&(o=b[1],l.calc=o._module.colorbar.calc),f(),a.push(i)}return a}function Z4(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,u=e.xanchor,v=e.yanchor,h=e.xpad,d=e.ypad,p=e.x,m=a?e.y:1-e.y,y=e.yref==="paper",b=e.xref==="paper",_=r._fullLayout,g=_._size,x=e._fillcolor,w=e._line,T=e.title,A=T.side,M=e._zrange||Mi.extent((typeof x=="function"?x:w.color).domain()),S=typeof w.color=="function"?w.color:function(){return w.color},L=typeof x=="function"?x:function(){return x},z=e._levels,N=Q4(r,e,M),$=N.fill,R=N.line,H=Math.round(o*(l==="fraction"?a?g.w:g.h:1)),D=H/(a?g.w:g.h),P=Math.round(i*(n==="fraction"?a?g.h:g.w:1)),k=P/(a?g.h:g.w),C=b?g.w:r._fullLayout.width,E=y?g.h:r._fullLayout.height,I=Math.round(a?p*C+h:m*E+d),j={center:.5,right:1}[u]||0,G={top:1,middle:.5}[v]||0,X=a?p-j*D:m-G*D,O=a?m-G*k:p-j*k,Z=Math.round(a?E*(1-O):C*O);e._lenFrac=k,e._thickFrac=D,e._uFrac=X,e._vFrac=O;var V=e._axis=J4(r,e,M);V.position=D+(a?p+h/g.w:m+d/g.h);var q=["top","bottom"].indexOf(A)!==-1;if(a&&q&&(V.title.side=A,V.titlex=p+h/g.w,V.titley=O+(T.side==="top"?k-d/g.h:d/g.h)),!a&&!q&&(V.title.side=A,V.titley=m+d/g.h,V.titlex=O+h/g.w),w.color&&e.tickmode==="auto"){V.tickmode="linear",V.tick0=z.start;var B=z.size,J=ga.constrain(P/50,4,15)+1,ie=(M[1]-M[0])/((e.nticks||J)*B);if(ie>1){var de=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10));B*=de*ga.roundUp(ie/de,[2,5,10]),(Math.abs(z.start)/z.size+1e-6)%1<2e-6&&(V.tick0=0)}V.dtick=B}V.domain=a?[O+d/g.h,O+k-d/g.h]:[O+h/g.w,O+k-h/g.w],V.setScale(),t.attr("transform",Ca(Math.round(g.l),Math.round(g.t)));var oe=t.select("."+Zt.cbtitleunshift).attr("transform",Ca(-Math.round(g.l),-Math.round(g.t))),Y=V.ticklabelposition,ee=V.title.font.size,le=t.select("."+Zt.cbaxis),ue,me=0,pe=0;function se(we,Q){var xe={propContainer:V,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:_._dfltTitle.colorbar,containerGroup:t.select("."+Zt.cbtitle)},ae=we.charAt(0)==="h"?we.substr(1):"h"+we;t.selectAll("."+ae+",."+ae+"-math-group").remove(),B4.draw(r,we,Wk(xe,Q||{}))}function be(){if(a&&q||!a&&!q){var we,Q;A==="top"&&(we=h+g.l+C*p,Q=d+g.t+E*(1-O-k)+3+ee*.75),A==="bottom"&&(we=h+g.l+C*p,Q=d+g.t+E*(1-O)-3-ee*.25),A==="right"&&(Q=d+g.t+E*m+3+ee*.75,we=h+g.l+C*O),se(V._id+"title",{attributes:{x:we,y:Q,"text-anchor":a?"start":"middle"}})}}function Le(){if(a&&!q||!a&&q){var we=V.position||0,Q=V._offset+V._length/2,xe,ae;if(A==="right")ae=Q,xe=g.l+C*we+10+ee*(V.showticklabels?1:.5);else if(xe=Q,A==="bottom"&&(ae=g.t+E*we+10+(Y.indexOf("inside")===-1?V.tickfont.size:0)+(V.ticks!=="intside"&&e.ticklen||0)),A==="top"){var ge=T.text.split("<br>").length;ae=g.t+E*we+10-H-ix*ee*ge}se((a?"h":"v")+V._id+"title",{avoid:{selection:Mi.select(r).selectAll("g."+V._id+"tick"),side:A,offsetTop:a?0:g.t,offsetLeft:a?g.l:0,maxShift:a?_.width:_.height},attributes:{x:xe,y:ae,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function ve(){if(!a&&!q||a&&q){var we=t.select("."+Zt.cbtitle),Q=we.select("text"),xe=[-s/2,s/2],ae=we.select(".h"+V._id+"title-math-group").node(),ge=15.6;Q.node()&&(ge=parseInt(Q.node().style.fontSize,10)*ix);var Ae;if(ae?(Ae=Sa.bBox(ae),pe=Ae.width,me=Ae.height,me>ge&&(xe[1]-=(me-ge)/2)):Q.node()&&!Q.classed(Zt.jsPlaceholder)&&(Ae=Sa.bBox(Q.node()),pe=Ae.width,me=Ae.height),a){if(me){if(me+=5,A==="top")V.domain[1]-=me/g.h,xe[1]*=-1;else{V.domain[0]+=me/g.h;var ce=G4.lineCount(Q);xe[1]+=(1-ce)*ge}we.attr("transform",Ca(xe[0],xe[1])),V.setScale()}}else pe&&(A==="right"&&(V.domain[0]+=(pe+ee/2)/g.w),we.attr("transform",Ca(xe[0],xe[1])),V.setScale())}t.selectAll("."+Zt.cbfills+",."+Zt.cblines).attr("transform",a?Ca(0,Math.round(g.h*(1-V.domain[1]))):Ca(Math.round(g.w*V.domain[0]),0)),le.attr("transform",a?Ca(0,Math.round(-g.t)):Ca(Math.round(-g.l),0));var De=t.select("."+Zt.cbfills).selectAll("rect."+Zt.cbfill).attr("style","").data($);De.enter().append("rect").classed(Zt.cbfill,!0).attr("style",""),De.exit().remove();var Se=M.map(V.c2p).map(Math.round).sort(function(Ge,Ze){return Ge-Ze});De.each(function(Ge,Ze){var ye=[Ze===0?M[0]:($[Ze]+$[Ze-1])/2,Ze===$.length-1?M[1]:($[Ze]+$[Ze+1])/2].map(V.c2p).map(Math.round);a&&(ye[1]=ga.constrain(ye[1]+(ye[1]>ye[0])?1:-1,Se[0],Se[1]));var Ve=Mi.select(this).attr(a?"x":"y",I).attr(a?"y":"x",Mi.min(ye)).attr(a?"width":"height",Math.max(H,2)).attr(a?"height":"width",Math.max(Mi.max(ye)-Mi.min(ye),2));if(e._fillgradient)Sa.gradient(Ve,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var Xe=L(Ge).replace("e-","");Ve.attr("fill",sd(Xe).toHexString())}});var Me=t.select("."+Zt.cblines).selectAll("path."+Zt.cbline).data(w.color&&w.width?R:[]);Me.enter().append("path").classed(Zt.cbline,!0),Me.exit().remove(),Me.each(function(Ge){var Ze=I,ye=Math.round(V.c2p(Ge))+w.width/2%1;Mi.select(this).attr("d","M"+(a?Ze+","+ye:ye+","+Ze)+(a?"h":"v")+H).call(Sa.lineGroupStyle,w.width,S(Ge),w.dash)}),le.selectAll("g."+V._id+"tick,path").remove();var He=I+H+(s||0)/2-(e.ticks==="outside"?1:0),Fe=oi.calcTicks(V),Oe=oi.getTickSigns(V)[2];return oi.drawTicks(r,V,{vals:V.ticks==="inside"?oi.clipEnds(V,Fe):Fe,layer:le,path:oi.makeTickPath(V,He,Oe),transFn:oi.makeTransTickFn(V)}),oi.drawLabels(r,V,{vals:Fe,layer:le,transFn:oi.makeTransTickLabelFn(V),labelFns:oi.makeLabelFns(V,He)})}function Te(){var we,Q=H+s/2;Y.indexOf("inside")===-1&&(we=Sa.bBox(le.node()),Q+=a?we.width:we.height),ue=oe.select("text");var xe=0,ae=a&&A==="top",ge=!a&&A==="right",Ae=0;if(ue.node()&&!ue.classed(Zt.jsPlaceholder)){var ce,De=oe.select(".h"+V._id+"title-math-group").node();De&&(a&&q||!a&&!q)?(we=Sa.bBox(De),xe=we.width,ce=we.height):(we=Sa.bBox(oe.node()),xe=we.right-g.l-(a?I:Z),ce=we.bottom-g.t-(a?Z:I),!a&&A==="top"&&(Q+=we.height,Ae=we.height)),ge&&(ue.attr("transform",Ca(xe/2+ee/2,0)),xe*=2),Q=Math.max(Q,a?xe:ce)}var Se=(a?h:d)*2+Q+f+s/2,Me=0;!a&&T.text&&v==="bottom"&&m<=0&&(Me=Se/2,Se+=Me,Ae+=Me),_._hColorbarMoveTitle=Me,_._hColorbarMoveCBTitle=Ae;var He=f+s,Fe=(a?I:Z)-He/2-(a?h:0),Oe=(a?Z:I)-(a?P:d+Ae-Me);t.select("."+Zt.cbbg).attr("x",Fe).attr("y",Oe).attr(a?"width":"height",Math.max(Se-Me,2)).attr(a?"height":"width",Math.max(P+He,2)).call(cd.fill,c).call(cd.stroke,e.bordercolor).style("stroke-width",f);var Ge=ge?Math.max(xe-10,0):0;t.selectAll("."+Zt.cboutline).attr("x",(a?I:Z+h)+Ge).attr("y",(a?Z+d-P:I)+(ae?me:0)).attr(a?"width":"height",Math.max(H,2)).attr(a?"height":"width",Math.max(P-(a?2*d+me:2*h+Ge),2)).call(cd.stroke,e.outlinecolor).style({fill:"none","stroke-width":s});var Ze=a?j*Se:0,ye=a?0:(1-G)*Se-Ae;if(Ze=b?g.l-Ze:-Ze,ye=y?g.t-ye:-ye,t.attr("transform",Ca(Ze,ye)),!a&&(f||sd(c).getAlpha()&&!sd.equals(_.paper_bgcolor,c))){var Ve=le.selectAll("text"),Xe=Ve[0].length,Ie=t.select("."+Zt.cbbg).node(),tt=Sa.bBox(Ie),We=Sa.getTranslate(t),F=2;Ve.each(function(_e,ze){var je=0,Re=Xe-1;if(ze===je||ze===Re){var rt=Sa.bBox(this),st=Sa.getTranslate(this),Ue;if(ze===Re){var Lt=rt.right+st.x,ft=tt.right+We.x+Z-f-F+p;Ue=ft-Lt,Ue>0&&(Ue=0)}else if(ze===je){var Ke=rt.left+st.x,gt=tt.left+We.x+Z+f+F;Ue=gt-Ke,Ue<0&&(Ue=0)}Ue&&(Xe<3?this.setAttribute("transform","translate("+Ue+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var U={},W=nx[u],K=ox[u],fe=nx[v],te=ox[v],Ee=Se-H;a?(n==="pixels"?(U.y=m,U.t=P*fe,U.b=P*te):(U.t=U.b=0,U.yt=m+i*fe,U.yb=m-i*te),l==="pixels"?(U.x=p,U.l=Se*W,U.r=Se*K):(U.l=Ee*W,U.r=Ee*K,U.xl=p-o*W,U.xr=p+o*K)):(n==="pixels"?(U.x=p,U.l=P*W,U.r=P*K):(U.l=U.r=0,U.xl=p+i*W,U.xr=p-i*K),l==="pixels"?(U.y=1-m,U.t=Se*fe,U.b=Se*te):(U.t=Ee*fe,U.b=Ee*te,U.yt=m-o*fe,U.yb=m+o*te));var Ce=e.y<.5?"b":"t",he=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var ne={r:_.width-Fe-Ze,l:Fe+U.r,b:_.height-Oe-ye,t:Oe+U.b};b&&y?Yf.autoMargin(r,e._id,U):b?r._fullLayout._reservedMargin[e._id][Ce]=ne[Ce]:y||a?r._fullLayout._reservedMargin[e._id][he]=ne[he]:r._fullLayout._reservedMargin[e._id][Ce]=ne[Ce]}return ga.syncOrAsync([Yf.previousPromises,be,ve,Le,Yf.previousPromises,Te],r)}function K4(t,e,r){var a=e.orientation==="v",i=r._fullLayout,n=i._size,o,l,s;mf.init({element:t.node(),gd:r,prepFn:function(){o=t.attr("transform"),fd(t)},moveFn:function(f,c){t.attr("transform",o+Ca(f,c)),l=mf.align((a?e._uFrac:e._vFrac)+f/n.w,a?e._thickFrac:e._lenFrac,0,1,e.xanchor),s=mf.align((a?e._vFrac:1-e._uFrac)-c/n.h,a?e._lenFrac:e._thickFrac,0,1,e.yanchor);var u=mf.getCursor(l,s,e.xanchor,e.yanchor);fd(t,u)},doneFn:function(){if(fd(t),l!==void 0&&s!==void 0){var f={};f[e._propPrefix+"x"]=l,f[e._propPrefix+"y"]=s,e._traceIndex!==void 0?ax.call("_guiRestyle",r,f,e._traceIndex):ax.call("_guiRelayout",r,f)}}})}function Q4(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],u=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<u&&i.push(o);if(e._fillgradient)n=[0];else if(typeof e._fillcolor=="function"){var v=e._filllevels;if(v)for(s=v.end+v.size/100,f=v.size,l=0;l<1e5&&(o=v.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 J4(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,labelalias:e.labelalias,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,noAutotickangles:o==="y",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:a.calendar};function f(c,u){return ga.coerce(n,l,X4,c,u)}return V4(n,l,f,s,a),W4(n,l,f,s),l}var e6={draw:Y4},t6={moduleType:"component",name:"colorbar",attributes:ip,supplyDefaults:kw,draw:e6.draw,hasColorbar:mw},r6={moduleType:"component",name:"legend",layoutAttributes:nT,supplyLayoutDefaults:oT,draw:cT,style:sT},a6={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"}},i6={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}},n6=ot,Xk=ke,ud=Xk.extendFlat,lx=Xk.extendDeep;function sx(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 o6(t){var e=["xaxis","yaxis","zaxis"];return e.indexOf(t.slice(0,5))>-1}var Yk=function(e,r){var a,i=e.data,n=e.layout,o=lx([],i),l=lx({},n,sx(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++)o6(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),n6.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 u=Object.keys(l).filter(function(m){return m.match(/^scene\d*$/)});if(u.length){var v={};for(r.tileClass==="thumbnail"&&(v={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),a=0;a<u.length;a++){var h=l[u[a]];h.xaxis||(h.xaxis={}),h.yaxis||(h.yaxis={}),h.zaxis||(h.zaxis={}),ud(h.xaxis,v),ud(h.yaxis,v),ud(h.zaxis,v),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=sx(r.tileClass),p},l6=Eh.EventEmitter,s6=ot,f6=ke,fx=ra,c6=Yk,u6=Bp,v6=Gp;function d6(t,e){var r=new l6,a=c6(t,{}),i=a.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function n(){var l=fx.getDelay(i._fullLayout);setTimeout(function(){var s=u6(i),f=document.createElement("canvas");f.id=f6.randstr(),r=v6({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=fx.getRedrawFunc(i);return s6.call("_doPlot",i,a.data,a.layout,a.config).then(o).then(n).catch(function(l){r.emit("error",l)}),r}var h6=d6,cx=ra,p6={getDelay:cx.getDelay,getRedrawFunc:cx.getRedrawFunc,clone:Yk,toSVG:Bp,svgToImg:Gp,toImage:h6,downloadImage:L2},m6=p6;(function(t){t.version=Rc.version;for(var e=ot,r=t.register=e.register,a=qt,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(LF),r([eN,gN,Nl,IN,YN,b$,V$,t4,S4,R4,H4,Co,t6,r6,Na,KT]),r([a6,i6]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(r(window.PlotlyLocales),delete window.PlotlyLocales),t.Icons=_p;var l=Na,s=hr;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=m6,t.PlotSchema=Xo})(Z1);var y6=Z1;const TB=$i(y6);var Ss={TEXTPAD:3,eventDataKeys:["value","label"]},er=Vi,ux=qo.axisHoverFormat,g6=Sr.hovertemplateAttrs,b6=Sr.texttemplateAttrs,qk=In,x6=Mr,vx=Ss,_6=ta.pattern,pn=Yt.extendFlat,vd=x6({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),w6=er.marker,T6=w6.line,k6=pn({},T6.width,{dflt:0}),A6=pn({width:k6,editType:"calc"},qk("marker.line")),M6=pn({line:A6,editType:"calc"},qk("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:_6,cornerradius:{valType:"any",editType:"calc",description:["Sets the rounding of corners. May be an integer number of pixels,","or a percentage of bar width (as a string ending in %). Defaults to `layout.barcornerradius`.","In stack or relative barmode, the first trace to set cornerradius is used for the whole stack."].join(" ")}}),Ls={x:er.x,x0:er.x0,dx:er.dx,y:er.y,y0:er.y0,dy:er.dy,xperiod:er.xperiod,yperiod:er.yperiod,xperiod0:er.xperiod0,yperiod0:er.yperiod0,xperiodalignment:er.xperiodalignment,yperiodalignment:er.yperiodalignment,xhoverformat:ux("x"),yhoverformat:ux("y"),text:er.text,texttemplate:b6({editType:"plot"},{keys:vx.eventDataKeys}),hovertext:er.hovertext,hovertemplate:g6({},{keys:vx.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:pn({},vd,{description:"Sets the font used for `text`."}),insidetextfont:pn({},vd,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:pn({},vd,{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:pn({},er.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:M6,offsetgroup:er.offsetgroup,alignmentgroup:er.alignmentgroup,selected:{marker:{opacity:er.selected.marker.opacity,color:er.selected.marker.color,editType:"style"},textfont:er.selected.textfont,editType:"style"},unselected:{marker:{opacity:er.unselected.marker.opacity,color:er.unselected.marker.color,editType:"style"},textfont:er.unselected.textfont,editType:"style"},zorder:er.zorder},sm={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(" ")},barcornerradius:{valType:"any",editType:"calc",description:["Sets the rounding of bar corners. May be an integer number of pixels,","or a percentage of bar width (as a string ending in %)."].join(" ")}},S6=yt,dx=ja.hasColorscale,hx=xs,L6=ke.coercePattern,Zk=function(e,r,a,i,n){var o=a("marker.color",i),l=dx(e,"marker");l&&hx(e,r,n,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",S6.defaultLine),dx(e,"marker.line")&&hx(e,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),L6(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")},px=kt,$o=ke,mx=yt,C6=ot,D6=Vp,P6=yu,E6=Zk,z6=Wp,Kk=Ls,yf=$o.coerceFont;function R6(t,e,r,a){function i(f,c){return $o.coerce(t,e,Kk,f,c)}var n=D6(t,e,a,i);if(!n){e.visible=!1;return}P6(t,e,a,i),i("xhoverformat"),i("yhoverformat"),i("zorder"),i("orientation",e.x&&!e.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate");var o=i("textposition");Jk(t,e,a,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),E6(t,e,i,r,a);var l=(e.marker.line||{}).color,s=C6.getComponentMethod("errorbars","supplyDefaults");s(t,e,l||mx.defaultLine,{axis:"y"}),s(t,e,l||mx.defaultLine,{axis:"x",inherit:"y"}),$o.coerceSelectionMarkerOpacity(e,i)}function I6(t,e){var r,a;function i(l,s){return $o.coerce(a._input,a,Kk,l,s)}for(var n=0;n<t.length;n++)if(a=t[n],a.type==="bar"){r=a._input;var o=i("marker.cornerradius",e.barcornerradius);a.marker&&(a.marker.cornerradius=Qk(o)),z6(r,a,e,i,e.barmode)}}function Qk(t){if(px(t)){if(t=+t,t>=0)return t}else if(typeof t=="string"&&(t=t.trim(),t.slice(-1)==="%"&&px(t.slice(0,-1))&&(t=+t.slice(0,-1),t>=0)))return t+"%"}function Jk(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,u=n.moduleHasInsideanchor!==!1,v=!!n.hasPathbar,h=Array.isArray(i)||i==="auto",d=h||i==="inside",p=h||i==="outside";if(d||p){var m=yf(a,"textfont",r.font),y=$o.extendFlat({},m),b=t.textfont&&t.textfont.color,_=!b;if(_&&delete y.color,yf(a,"insidetextfont",y),v){var g=$o.extendFlat({},m);_&&delete g.color,yf(a,"pathbar.textfont",g)}p&&yf(a,"outsidetextfont",m),o&&a("selected.textfont.color"),l&&a("unselected.textfont.color"),s&&a("constraintext"),f&&a("cliponaxis"),c&&a("textangle"),a("texttemplate")}d&&u&&a("insidetextanchor")}var Ln={supplyDefaults:R6,crossTraceDefaults:I6,handleText:Jk,validateCornerradius:Qk},F6=ot,N6=Ot,$6=ke,H6=sm,O6=Ln.validateCornerradius,eA=function(t,e,r){function a(p,m){return $6.coerce(t,e,H6,p,m)}for(var i=!1,n=!1,o=!1,l={},s=a("barmode"),f=s==="group",c=0;c<r.length;c++){var u=r[c];if(F6.traceIs(u,"bar")&&u.visible)i=!0;else continue;var v=u.xaxis+u.yaxis;if(f?(l[v]&&(o=!0),l[v]=!0):(v+=u._input.offsetgroup,l.length>0&&!l[v]&&(o=!0),l[v]=!0),u.visible&&u.type==="histogram"){var h=N6.getFromId({_fullLayout:e},u[u.orientation==="v"?"xaxis":"yaxis"]);h.type!=="category"&&(n=!0)}}if(!i){delete e.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",n&&!o?0:.2),a("bargroupgap");var d=a("barcornerradius");e.barcornerradius=O6(d)},eo=ke,fm=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;eo.mergeArray(r.text,e,"tx"),eo.mergeArray(r.hovertext,e,"htx");var i=r.marker;if(i){eo.mergeArray(i.opacity,e,"mo",!0),eo.mergeArray(i.color,e,"mc");var n=i.line;n&&(eo.mergeArray(n.color,e,"mlc"),eo.mergeArrayCastPositive(n.width,e,"mlw"))}},yx=Ot,gx=gu,bx=ja.hasColorscale,xx=np,j6=fm,B6=B2,G6=function(e,r){var a=yx.getFromId(e,r.xaxis||"x"),i=yx.getFromId(e,r.yaxis||"y"),n,o,l,s,f,c,u={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(n=a.makeCalcdata(r,"x",u),l=i.makeCalcdata(r,"y"),s=gx(r,i,"y",l),f=!!r.yperiodalignment,c="y"):(n=i.makeCalcdata(r,"y",u),l=a.makeCalcdata(r,"x"),s=gx(r,a,"x",l),f=!!r.xperiodalignment,c="x"),o=s.vals;for(var v=Math.min(o.length,n.length),h=new Array(v),d=0;d<v;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 bx(r,"marker")&&xx(e,r,{vals:r.marker.color,containerStr:"marker"}),bx(r,"marker.line")&&xx(e,r,{vals:r.marker.line.color,containerStr:"marker.line"}),j6(h,r),B6(h,r),h},U6=bt,V6=ke;function W6(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=U6.select(this).select("text");V6.setTransormAndDisplay(f,s)}})}}function X6(t,e,r){if(r.uniformtext.mode){var a=tA(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 Y6(t,e){var r=tA(t);e[r]=void 0}function tA(t){return"_"+t+"Text_minsize"}var mi={recordMinTextSize:X6,clearMinTextSize:Y6,resizeText:W6},yi={},q6=kt,Z6=$a,rA=ke.isArrayOrTypedArray;yi.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};yi.coerceNumber=function(t,e,r){if(q6(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};yi.coerceColor=function(t,e,r){return Z6(e).isValid()?e:r!==void 0?r:t.dflt};yi.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),t.values.indexOf(e)!==-1?e:r!==void 0?r:t.dflt};yi.getValue=function(t,e){var r;return rA(t)?e<t.length&&(r=t[e]):r=t,r};yi.getLineWidth=function(t,e){var r=0<e.mlw?e.mlw:rA(t.marker.line.width)?0:t.marker.line.width;return r};var Gl=bt,K6=yt,vs=zt,aA=ke,iA=ot,nA=mi.resizeText,cm=Ls,Q6=cm.textfont,J6=cm.insidetextfont,e8=cm.outsidetextfont,Cr=yi;function t8(t){var e=Gl.select(t).selectAll('g[class^="barlayer"]').selectAll("g.trace");nA(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)&&Gl.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(i){var n=Gl.select(this),o=i[0].trace;oA(n,o,t)}),iA.getComponentMethod("errorbars","style")(e)}function oA(t,e,r){vs.pointStyle(t.selectAll("path"),e,r),lA(t,e,r)}function lA(t,e,r){t.selectAll("text").each(function(a){var i=Gl.select(this),n=aA.ensureUniformFontSize(r,sA(i,a,e,r));vs.font(i,n)})}function r8(t,e,r){var a=e[0].trace;a.selectedpoints?a8(r,a,t):(oA(r,a,t),iA.getComponentMethod("errorbars","style")(r))}function a8(t,e,r){vs.selectedPointStyle(t.selectAll("path"),e),i8(t.selectAll("text"),e,r)}function i8(t,e,r){t.each(function(a){var i=Gl.select(this),n;if(a.selected){n=aA.ensureUniformFontSize(r,sA(i,a,e,r));var o=e.selected.textfont&&e.selected.textfont.color;o&&(n.color=o),vs.font(i,n)}else vs.selectedTextStyle(i,e)})}function sA(t,e,r,a){var i=a._fullLayout.font,n=r.textfont;if(t.classed("bartext-inside")){var o=vA(e,r);n=cA(r,e.i,i,o)}else t.classed("bartext-outside")&&(n=uA(r,e.i,i));return n}function fA(t,e,r){return um(Q6,t.textfont,e,r)}function cA(t,e,r,a){var i=fA(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:K6.contrast(a),family:i.family,size:i.size,weight:i.weight,style:i.style,variant:i.variant,textcase:i.textcase,lineposition:i.lineposition,shadow:i.shadow}),um(J6,t.insidetextfont,e,i)}function uA(t,e,r){var a=fA(t,e,r);return um(e8,t.outsidetextfont,e,a)}function um(t,e,r,a){e=e||{};var i=Cr.getValue(e.family,r),n=Cr.getValue(e.size,r),o=Cr.getValue(e.color,r),l=Cr.getValue(e.weight,r),s=Cr.getValue(e.style,r),f=Cr.getValue(e.variant,r),c=Cr.getValue(e.textcase,r),u=Cr.getValue(e.lineposition,r),v=Cr.getValue(e.shadow,r);return{family:Cr.coerceString(t.family,i,a.family),size:Cr.coerceNumber(t.size,n,a.size),color:Cr.coerceColor(t.color,o,a.color),weight:Cr.coerceString(t.weight,l,a.weight),style:Cr.coerceString(t.style,s,a.style),variant:Cr.coerceString(t.variant,f,a.variant),textcase:Cr.coerceString(t.variant,c,a.textcase),lineposition:Cr.coerceString(t.variant,u,a.lineposition),shadow:Cr.coerceString(t.variant,v,a.shadow)}}function vA(t,e){return e.type==="waterfall"?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}var Cn={style:t8,styleTextPoints:lA,styleOnSelect:r8,getInsideTextFont:cA,getOutsideTextFont:uA,getBarColor:vA,resizeText:nA},gf=bt,bf=kt,kr=ke,n8=Tr,o8=yt,Di=zt,l8=ot,Lc=Ot.tickText,dA=mi,s8=dA.recordMinTextSize,f8=dA.clearMinTextSize,dd=Cn,Ho=yi,c8=Ss,hA=Ls,u8=hA.text,v8=hA.textposition,d8=wa.appendArrayPointValue,$r=c8.TEXTPAD;function h8(t){return t.id}function p8(t){if(t.ids)return h8}function hd(t){return(t>0)-(t<0)}function Ka(t,e){return t<e?1:-1}function m8(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 pA(t,e,r,a){if(!e.uniformtext.mode&&mA(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 mA(t){return t&&t.duration>0}function y8(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},f8("bar",s));var c=kr.makeTraceGroups(a,r,"trace bars").each(function(u){var v=gf.select(this),h=u[0].trace,d=u[0].t,p=h.type==="waterfall",m=h.type==="funnel",y=h.type==="histogram",b=h.type==="bar",_=b||m,g=0;p&&h.connector.visible&&h.connector.mode==="between"&&(g=h.connector.line.width/2);var x=h.orientation==="h",w=mA(i),T=kr.ensureSingle(v,"g","points"),A=p8(h),M=T.selectAll("g.point").data(kr.identity,A);M.enter().append("g").classed("point",!0),M.exit().remove(),M.each(function(L,z){var N=gf.select(this),$=m8(L,o,l,x),R=$[0][0],H=$[0][1],D=$[1][0],P=$[1][1],k=(x?H-R:P-D)===0;k&&_&&Ho.getLineWidth(h,L)&&(k=!1),k||(k=!bf(R)||!bf(H)||!bf(D)||!bf(P)),L.isBlank=k,k&&(x?H=R:P=D),g&&!k&&(x?(R-=Ka(R,H)*g,H+=Ka(R,H)*g):(D-=Ka(D,P)*g,P+=Ka(D,P)*g));var C,E;if(h.type==="waterfall"){if(!k){var I=h[L.dir].marker;C=I.line.width,E=I.color}}else C=Ho.getLineWidth(h,L),E=L.mc||h.marker.color;function j(Q){var xe=gf.round(C/2%1,2);return i.gap===0&&i.groupgap===0?gf.round(Math.round(Q)-xe,2):Q}function G(Q,xe,ae){return ae&&Q===xe?Q:Math.abs(Q-xe)>=2?j(Q):Q>xe?Math.ceil(Q):Math.floor(Q)}var X=o8.opacity(E),O=X<1||C>.01?j:G;t._context.staticPlot||(R=O(R,H,x),H=O(H,R,x),D=O(D,P,!x),P=O(P,D,!x));var Z=x?o.c2p:l.c2p,V;L.s0>0?V=L._sMax:L.s0<0?V=L._sMin:V=L.s1>0?L._sMax:L._sMin;function q(Q,xe){if(!Q)return 0;var ae=Math.abs(x?P-D:H-R),ge=Math.abs(x?H-R:P-D),Ae=O(Math.abs(Z(V,!0)-Z(0,!0))),ce=L.hasB?Math.min(ae/2,ge/2):Math.min(ae/2,Ae),De;if(xe==="%"){var Se=Math.min(50,Q);De=ae*(Se/100)}else De=Q;return O(Math.max(Math.min(De,ce),0))}var B=b||y?q(d.cornerradiusvalue,d.cornerradiusform):0,J,ie,de="M"+R+","+D+"V"+P+"H"+H+"V"+D+"Z",oe=0;if(B&&L.s){var Y=hd(L.s0)===0||hd(L.s)===hd(L.s0)?L.s1:L.s0;if(oe=O(L.hasB?0:Math.abs(Z(V,!0)-Z(Y,!0))),oe<B){var ee=Ka(R,H),le=Ka(D,P),ue=ee===-le?1:0;if(x)if(L.hasB)J="M"+(R+B*ee)+","+D+"A "+B+","+B+" 0 0 "+ue+" "+R+","+(D+B*le)+"V"+(P-B*le)+"A "+B+","+B+" 0 0 "+ue+" "+(R+B*ee)+","+P+"H"+(H-B*ee)+"A "+B+","+B+" 0 0 "+ue+" "+H+","+(P-B*le)+"V"+(D+B*le)+"A "+B+","+B+" 0 0 "+ue+" "+(H-B*ee)+","+D+"Z";else{ie=Math.abs(H-R)+oe;var me=ie<B?B-Math.sqrt(ie*(2*B-ie)):0,pe=oe>0?Math.sqrt(oe*(2*B-oe)):0,se=ee>0?Math.max:Math.min;J="M"+R+","+D+"V"+(P-me*le)+"H"+se(H-(B-oe)*ee,R)+"A "+B+","+B+" 0 0 "+ue+" "+H+","+(P-B*le-pe)+"V"+(D+B*le+pe)+"A "+B+","+B+" 0 0 "+ue+" "+se(H-(B-oe)*ee,R)+","+(D+me*le)+"Z"}else if(L.hasB)J="M"+(R+B*ee)+","+D+"A "+B+","+B+" 0 0 "+ue+" "+R+","+(D+B*le)+"V"+(P-B*le)+"A "+B+","+B+" 0 0 "+ue+" "+(R+B*ee)+","+P+"H"+(H-B*ee)+"A "+B+","+B+" 0 0 "+ue+" "+H+","+(P-B*le)+"V"+(D+B*le)+"A "+B+","+B+" 0 0 "+ue+" "+(H-B*ee)+","+D+"Z";else{ie=Math.abs(P-D)+oe;var be=ie<B?B-Math.sqrt(ie*(2*B-ie)):0,Le=oe>0?Math.sqrt(oe*(2*B-oe)):0,ve=le>0?Math.max:Math.min;J="M"+(R+be*ee)+","+D+"V"+ve(P-(B-oe)*le,D)+"A "+B+","+B+" 0 0 "+ue+" "+(R+B*ee-Le)+","+P+"H"+(H-B*ee+Le)+"A "+B+","+B+" 0 0 "+ue+" "+(H-be*ee)+","+ve(P-(B-oe)*le,D)+"V"+D+"Z"}}else J=de}else J=de;var Te=pA(kr.ensureSingle(N,"path"),s,i,n);if(Te.style("vector-effect",f?"none":"non-scaling-stroke").attr("d",isNaN((H-R)*(P-D))||k&&t._context.staticPlot?"M0,0Z":J).call(Di.setClipUrl,e.layerClipId,t),!s.uniformtext.mode&&w){var we=Di.makePointStyleFns(h);Di.singlePointStyle(L,Te,h,we,t)}g8(t,e,N,u,z,R,H,D,P,B,oe,i,n),e.layerClipId&&Di.hideOutsideRangePoint(L,N.select("text"),o,l,h.xcalendar,h.ycalendar)});var S=h.cliponaxis===!1;Di.setClipUrl(v,S?null:e.layerClipId,t)});l8.getComponentMethod("errorbars","plot")(t,c,e,i)}function g8(t,e,r,a,i,n,o,l,s,f,c,u,v){var h=e.xaxis,d=e.yaxis,p=t._fullLayout,m;function y(ie,de,oe){var Y=kr.ensureSingle(ie,"text").text(de).attr({class:"bartext bartext-"+m,"text-anchor":"middle","data-notex":1}).call(Di.font,oe).call(n8.convertToTspans,t);return Y}var b=a[0].trace,_=b.orientation==="h",g=_8(p,a,i,h,d);m=w8(b,i);var x=u.mode==="stack"||u.mode==="relative",w=a[i],T=!x||w._outmost,A=w.hasB,M=f&&f-c>$r;if(!g||m==="none"||(w.isBlank||n===o||l===s)&&(m==="auto"||m==="inside")){r.select("text").remove();return}var S=p.font,L=dd.getBarColor(a[i],b),z=dd.getInsideTextFont(b,i,S,L),N=dd.getOutsideTextFont(b,i,S),$=b.insidetextanchor||"end",R=r.datum();_?h.type==="log"&&R.s0<=0&&(h.range[0]<h.range[1]?n=0:n=h._length):d.type==="log"&&R.s0<=0&&(d.range[0]<d.range[1]?l=d._length:l=0);var H=Math.abs(o-n),D=Math.abs(s-l),P=H-2*$r,k=D-2*$r,C,E,I,j,G;if(m==="outside"&&!T&&!w.hasB&&(m="inside"),m==="auto")if(T){m="inside",G=kr.ensureUniformFontSize(t,z),C=y(r,g,G),E=Di.bBox(C.node()),I=E.width,j=E.height;var X=I>0&&j>0,O;M?A?O=rn(P-2*f,k,I,j,_)||rn(P,k-2*f,I,j,_):_?O=rn(P-(f-c),k,I,j,_)||rn(P,k-2*(f-c),I,j,_):O=rn(P,k-(f-c),I,j,_)||rn(P-2*(f-c),k,I,j,_):O=rn(P,k,I,j,_),X&&O?m="inside":(m="outside",C.remove(),C=null)}else m="inside";if(!C){G=kr.ensureUniformFontSize(t,m==="outside"?N:z),C=y(r,g,G);var Z=C.attr("transform");if(C.attr("transform",""),E=Di.bBox(C.node()),I=E.width,j=E.height,C.attr("transform",Z),I<=0||j<=0){C.remove();return}}var V=b.textangle,q,B;m==="outside"?(B=b.constraintext==="both"||b.constraintext==="outside",q=x8(n,o,l,s,E,{isHorizontal:_,constrained:B,angle:V})):(B=b.constraintext==="both"||b.constraintext==="inside",q=bA(n,o,l,s,E,{isHorizontal:_,constrained:B,angle:V,anchor:$,hasB:A,r:f,overhead:c})),q.fontSize=G.size,s8(b.type==="histogram"?"bar":b.type,q,p),w.transform=q;var J=pA(C,p,u,v);kr.setTransormAndDisplay(J,q)}function rn(t,e,r,a,i){if(t<0||e<0)return!1;var n=r<=t&&a<=e,o=r<=e&&a<=t,l=i?t>=r*(e/a):e>=a*(t/r);return n||o||l}function yA(t){return t==="auto"?0:t}function gA(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 bA(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=n.anchor,c=f==="end",u=f==="start",v=n.leftToRight||0,h=(v+1)/2,d=1-h,p=n.hasB,m=n.r,y=n.overhead,b=i.width,_=i.height,g=Math.abs(e-t),x=Math.abs(a-r),w=g>2*$r&&x>2*$r?$r:0;g-=2*w,x-=2*w;var T=yA(s);s==="auto"&&!(b<=g&&_<=x)&&(b>g||_>x)&&(!(b>x||_>g)||b<_!=g<x)&&(T+=90);var A=gA(i,T),M,S;if(m&&m-y>$r){var L=b8(t,e,r,a,A,m,y,o,p);M=L.scale,S=L.pad}else M=1,l&&(M=Math.min(1,g/A.x,x/A.y)),S=0;var z=i.left*d+i.right*h,N=(i.top+i.bottom)/2,$=(t+$r)*d+(e-$r)*h,R=(r+a)/2,H=0,D=0;if(u||c){var P=(o?A.x:A.y)/2;m&&(c||p)&&(w+=S);var k=o?Ka(t,e):Ka(r,a);o?u?($=t+k*w,H=-k*P):($=e-k*w,H=k*P):u?(R=r+k*w,D=-k*P):(R=a-k*w,D=k*P)}return{textX:z,textY:N,targetX:$,targetY:R,anchorX:H,anchorY:D,scale:M,rotate:T}}function b8(t,e,r,a,i,n,o,l,s){var f=Math.max(0,Math.abs(e-t)-2*$r),c=Math.max(0,Math.abs(a-r)-2*$r),u=n-$r,v=o?u-Math.sqrt(u*u-(u-o)*(u-o)):u,h=s?u*2:l?u-o:2*v,d=s?u*2:l?2*v:u-o,p,m,y,b,_;return i.y/i.x>=c/(f-h)?b=c/i.y:i.y/i.x<=(c-d)/f?b=f/i.x:!s&&l?(p=i.x*i.x+i.y*i.y/4,m=-2*i.x*(f-u)-i.y*(c/2-u),y=(f-u)*(f-u)+(c/2-u)*(c/2-u)-u*u,b=(-m+Math.sqrt(m*m-4*p*y))/(2*p)):s?(p=(i.x*i.x+i.y*i.y)/4,m=-i.x*(f/2-u)-i.y*(c/2-u),y=(f/2-u)*(f/2-u)+(c/2-u)*(c/2-u)-u*u,b=(-m+Math.sqrt(m*m-4*p*y))/(2*p)):(p=i.x*i.x/4+i.y*i.y,m=-i.x*(f/2-u)-2*i.y*(c-u),y=(f/2-u)*(f/2-u)+(c-u)*(c-u)-u*u,b=(-m+Math.sqrt(m*m-4*p*y))/(2*p)),b=Math.min(1,b),l?_=Math.max(0,u-Math.sqrt(Math.max(0,u*u-(u-(c-i.y*b)/2)*(u-(c-i.y*b)/2)))-o):_=Math.max(0,u-Math.sqrt(Math.max(0,u*u-(u-(f-i.x*b)/2)*(u-(f-i.x*b)/2)))-o),{scale:b,pad:_}}function x8(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=i.width,c=i.height,u=Math.abs(e-t),v=Math.abs(a-r),h;o?h=v>2*$r?$r:0:h=u>2*$r?$r:0;var d=1;l&&(d=o?Math.min(1,v/c):Math.min(1,u/f));var p=yA(s),m=gA(i,p),y=(o?m.x:m.y)/2,b=(i.left+i.right)/2,_=(i.top+i.bottom)/2,g=(t+e)/2,x=(r+a)/2,w=0,T=0,A=o?Ka(e,t):Ka(r,a);return o?(g=e-A*h,w=A*y):(x=a+A*h,T=-A*y),{textX:b,textY:_,targetX:g,targetY:x,anchorX:w,anchorY:T,scale:d,rotate:p}}function _8(t,e,r,a,i){var n=e[0].trace,o=n.texttemplate,l;return o?l=T8(t,e,r,a,i):n.textinfo?l=k8(e,r,a,i):l=Ho.getValue(n.text,r),Ho.coerceString(u8,l)}function w8(t,e){var r=Ho.getValue(t.textposition,e);return Ho.coerceEnumerated(v8,r)}function T8(t,e,r,a,i){var n=e[0].trace,o=kr.castOption(n,r,"texttemplate");if(!o)return"";var l=n.type==="histogram",s=n.type==="waterfall",f=n.type==="funnel",c=n.orientation==="h",u,v,h,d;c?(u="y",v=i,h="x",d=a):(u="x",v=a,h="y",d=i);function p(w){return Lc(v,v.c2l(w),!0).text}function m(w){return Lc(d,d.c2l(w),!0).text}var y=e[r],b={};b.label=y.p,b.labelLabel=b[u+"Label"]=p(y.p);var _=kr.castOption(n,y.i,"text");(_===0||_)&&(b.text=_),b.value=y.s,b.valueLabel=b[h+"Label"]=m(y.s);var g={};d8(g,n,y.i),(l||g.x===void 0)&&(g.x=c?b.value:b.label),(l||g.y===void 0)&&(g.y=c?b.label:b.value),(l||g.xLabel===void 0)&&(g.xLabel=c?b.valueLabel:b.labelLabel),(l||g.yLabel===void 0)&&(g.yLabel=c?b.labelLabel:b.valueLabel),s&&(b.delta=+y.rawS||y.s,b.deltaLabel=m(b.delta),b.final=y.v,b.finalLabel=m(b.final),b.initial=b.final-b.delta,b.initialLabel=m(b.initial)),f&&(b.value=y.s,b.valueLabel=m(b.value),b.percentInitial=y.begR,b.percentInitialLabel=kr.formatPercent(y.begR),b.percentPrevious=y.difR,b.percentPreviousLabel=kr.formatPercent(y.difR),b.percentTotal=y.sumR,b.percenTotalLabel=kr.formatPercent(y.sumR));var x=kr.castOption(n,y.i,"customdata");return x&&(b.customdata=x),kr.texttemplateString(o,b,t._d3locale,g,b,n._meta||{})}function k8(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 w=n?a:r;return Lc(w,x,!0).text}function f(x){var w=n?r:a;return Lc(w,+x,!0).text}var c=i.textinfo,u=t[e],v=c.split("+"),h=[],d,p=function(x){return v.indexOf(x)!==-1};if(p("label")&&h.push(s(t[e].p)),p("text")&&(d=kr.castOption(i,u.i,"text"),(d===0||d)&&h.push(d)),o){var m=+u.rawS||u.s,y=u.v,b=y-m;p("initial")&&h.push(f(b)),p("delta")&&h.push(f(m)),p("final")&&h.push(f(y))}if(l){p("value")&&h.push(f(u.s));var _=0;p("percent initial")&&_++,p("percent previous")&&_++,p("percent total")&&_++;var g=_>1;p("percent initial")&&(d=kr.formatPercent(u.begR),g&&(d+=" of initial"),h.push(d)),p("percent previous")&&(d=kr.formatPercent(u.difR),g&&(d+=" of previous"),h.push(d)),p("percent total")&&(d=kr.formatPercent(u.sumR),g&&(d+=" of total"),h.push(d))}return h.join("<br>")}var vm={plot:y8,toMoveInsideBar:bA},wl=Na,A8=ot,_x=yt,M8=ke.fillText,S8=yi.getLineWidth,pd=Ot.hoverLabelText,L8=cr.BADNUM;function C8(t,e,r,a,i){var n=D8(t,e,r,a,i);if(n){var o=n.cd,l=o[0].trace,s=o[n.index];return n.color=P8(l,s),A8.getComponentMethod("errorbars","hoverInfo")(s,l,n),[n]}}function D8(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,u=t.maxSpikeDistance,v,h,d,p,m,y,b;o.orientation==="h"?(v=r,h=e,d="y",p="x",m=R,y=z):(v=e,h=r,d="x",p="y",y=R,m=z);var _=o[d+"period"],g=s||_;function x(O){return T(O,-1)}function w(O){return T(O,1)}function T(O,Z){var V=O.w;return O[d]+Z*V/2}function A(O){return O[d+"End"]-O[d+"Start"]}var M=s?x:_?function(O){return O.p-A(O)/2}:function(O){return Math.min(x(O),O.p-l.bardelta/2)},S=s?w:_?function(O){return O.p+A(O)/2}:function(O){return Math.max(w(O),O.p+l.bardelta/2)};function L(O,Z,V){return i.finiteRange&&(V=0),wl.inbox(O-v,Z-v,V+Math.min(1,Math.abs(Z-O)/b)-1)}function z(O){return L(M(O),S(O),c)}function N(O){return L(x(O),w(O),u)}function $(O){var Z=O[p];if(f){var V=Math.abs(O.rawS)||0;h>0?Z+=V:h<0&&(Z-=V)}return Z}function R(O){var Z=h,V=O.b,q=$(O);return wl.inbox(V-Z,q-Z,c+(q-Z)/(q-V)-1)}function H(O){var Z=h,V=O.b,q=$(O);return wl.inbox(V-Z,q-Z,u+(q-Z)/(q-V)-1)}var D=t[d+"a"],P=t[p+"a"];b=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));function k(O){return(m(O)+y(O))/2}var C=wl.getDistanceFunction(a,m,y,k);if(wl.getClosest(n,C,t),t.index!==!1&&n[t.index].p!==L8){g||(M=function(O){return Math.min(x(O),O.p-l.bargroupwidth/2)},S=function(O){return Math.max(w(O),O.p+l.bargroupwidth/2)});var E=t.index,I=n[E],j=o.base?I.b+I.s:I.s;t[p+"0"]=t[p+"1"]=P.c2p(I[p],!0),t[p+"LabelVal"]=j;var G=l.extents[l.extents.round(I.p)];t[d+"0"]=D.c2p(s?M(I):G[0],!0),t[d+"1"]=D.c2p(s?S(I):G[1],!0);var X=I.orig_p!==void 0;return t[d+"LabelVal"]=X?I.orig_p:I.p,t.labelLabel=pd(D,t[d+"LabelVal"],o[d+"hoverformat"]),t.valueLabel=pd(P,t[p+"LabelVal"],o[p+"hoverformat"]),t.baseLabel=pd(P,I.b,o[p+"hoverformat"]),t.spikeDistance=(H(I)+N(I))/2,t[d+"Spike"]=D.c2p(I.p,!0),M8(I,o,t),t.hovertemplate=o.hovertemplate,t}}function P8(t,e){var r=e.mcc||t.marker.color,a=e.mlcc||t.marker.line.color,i=S8(t,e);if(_x.opacity(r))return r;if(_x.opacity(a)&&i)return a}var xA={hoverPoints:C8},E8=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},_A=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 u=a[c],v="ct"in u?u.ct:z8(u,i,n,s,l);r.contains(v,!1,c,e)?(f.push({pointNumber:c,x:i.c2d(u.x),y:n.c2d(u.y)}),u.selected=1):u.selected=0}return f};function z8(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 R8={attributes:Ls,layoutAttributes:sm,supplyDefaults:Ln.supplyDefaults,crossTraceDefaults:Ln.crossTraceDefaults,supplyLayoutDefaults:eA,calc:G6,crossTraceCalc:Kp.crossTraceCalc,colorbar:As,arraysToCalcdata:fm,plot:vm.plot,style:Cn.style,styleOnSelect:Cn.styleOnSelect,hoverPoints:xA.hoverPoints,eventData:E8,selectPoints:_A,moduleType:"trace",name:"bar",basePlotModule:pr,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 to *v* (the default)","and the labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}},I8=R8;const kB=$i(I8);var F8=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"}},N8={eventDataKeys:["binNumber"]},Xr=Ls,wx=qo.axisHoverFormat,$8=Sr.hovertemplateAttrs,H8=Sr.texttemplateAttrs,md=Mr,Tx=F8,O8=N8,yd=Yt.extendFlat,wA={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:wx("x"),yhoverformat:wx("y"),text:yd({},Xr.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:yd({},Xr.hovertext,{description:"Same as `text`."}),orientation:Xr.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:Tx("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:Tx("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:$8({},{keys:O8.eventDataKeys}),texttemplate:H8({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:yd({},Xr.textposition,{arrayOk:!1}),textfont:md({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:md({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:md({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),insidetextanchor:Xr.insidetextanchor,textangle:Xr.textangle,cliponaxis:Xr.cliponaxis,constraintext:Xr.constraintext,marker:Xr.marker,offsetgroup:Xr.offsetgroup,alignmentgroup:Xr.alignmentgroup,selected:Xr.selected,unselected:Xr.unselected,zorder:Xr.zorder},kx=ot,Tl=ke,Ax=yt,j8=Ln.handleText,B8=Zk,G8=wA,U8=function(e,r,a,i){function n(b,_){return Tl.coerce(e,r,G8,b,_)}var o=n("x"),l=n("y"),s=n("cumulative.enabled");s&&(n("cumulative.direction"),n("cumulative.currentbin")),n("text");var f=n("textposition");j8(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"),u=c==="v"?"x":"y",v=c==="v"?"y":"x",h=o&&l?Math.min(Tl.minRowLength(o)&&Tl.minRowLength(l)):Tl.minRowLength(r[u]||[]);if(!h){r.visible=!1;return}r._length=h;var d=kx.getComponentMethod("calendars","handleTraceDefaults");d(e,r,["x","y"],i);var p=r[v];p&&n("histfunc"),n("histnorm"),n("autobin"+u),B8(e,r,n,a,i),Tl.coerceSelectionMarkerOpacity(r,n);var m=(r.marker.line||{}).color,y=kx.getComponentMethod("errorbars","supplyDefaults");y(e,r,m||Ax.defaultLine,{axis:"y"}),y(e,r,m||Ax.defaultLine,{axis:"x",inherit:"y"}),n("zorder")},zl=ke,V8=lr,xf=ot.traceIs,W8=Wp,X8=Ln.validateCornerradius,Mx=zl.nestedProperty,gd=pi.getAxisGroup,Sx=[{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"}],Y8=["x","y"],q8=function(e,r){var a=r._histogramBinOpts={},i=[],n={},o=[],l,s,f,c,u,v,h;function d(R,H){return zl.coerce(l._input,l,l._module.attributes,R,H)}function p(R){return R.orientation==="v"?"x":"y"}function m(R,H){var D=V8.getFromTrace({_fullLayout:r},R,H);return D.type}function y(R,H,D){var P=R.uid+"__"+D;H||(H=P);var k=m(R,D),C=R[D+"calendar"]||"",E=a[H],I=!0;E&&(k===E.axType&&C===E.calendar?(I=!1,E.traces.push(R),E.dirs.push(D)):(H=P,k!==E.axType&&zl.warn(["Attempted to group the bins of trace",R.index,"set on a","type:"+k,"axis","with bins on","type:"+E.axType,"axis."].join(" ")),C!==E.calendar&&zl.warn(["Attempted to group the bins of trace",R.index,"set with a",C,"calendar","with bins",E.calendar?"on a "+E.calendar+" calendar":"w/o a set calendar"].join(" ")))),I&&(a[H]={traces:[R],dirs:[D],axType:k,calendar:R[D+"calendar"]||""}),R["_"+D+"bingroup"]=H}for(u=0;u<e.length;u++)if(l=e[u],xf(l,"histogram")){if(i.push(l),delete l._xautoBinFinished,delete l._yautoBinFinished,l.type==="histogram"){var b=d("marker.cornerradius",r.barcornerradius);l.marker&&(l.marker.cornerradius=X8(b))}xf(l,"2dMap")||W8(l._input,l,r,d,r.barmode)}var _=r._alignmentOpts||{};for(u=0;u<i.length;u++){if(l=i[u],f="",!xf(l,"2dMap")){if(c=p(l),r.barmode==="group"&&l.alignmentgroup){var g=l[c+"axis"],x=gd(r,g)+l.orientation;(_[x]||{})[l.alignmentgroup]&&(f=x)}!f&&r.barmode!=="overlay"&&(f=gd(r,l.xaxis)+gd(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 w=!1;for(s.length&&(l=s[0],w=d("bingroup")),f=w||f,u=0;u<s.length;u++){l=s[u];var T=l._input.bingroup;T&&T!==f&&zl.warn(["Trace",l.index,"must match","within bingroup",f+".","Ignoring its bingroup:",T,"setting."].join(" ")),l.bingroup=f,y(l,f,p(l))}}for(u=0;u<o.length;u++){l=o[u];var A=d("bingroup");if(xf(l,"2dMap"))for(h=0;h<2;h++){c=Y8[h];var M=d(c+"bingroup",A?A+"__"+c:null);y(l,M,c)}else y(l,A,p(l))}for(f in a){var S=a[f];for(s=S.traces,v=0;v<Sx.length;v++){var L=Sx[v],z=L.name,N,$;if(!(z==="nbins"&&S.sizeFound)){for(u=0;u<s.length;u++){if(l=s[u],c=S.dirs[u],N=L.aStr[c],Mx(l._input,N).get()!==void 0){S[z]=d(N),S[z+"Found"]=!0;break}$=(l._autoBin||{})[c]||{},$[z]&&Mx(l,N).set($[z])}if(z==="start"||z==="end")for(;u<s.length;u++)l=s[u],l["_"+c+"bingroup"]&&($=(l._autoBin||{})[c]||{},d(N,$[z]));z==="nbins"&&!S.sizeFound&&!S.nbinsFound&&(l=s[0],S[z]=d(N))}}}},to=kt,Z8={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,a){var i=a[e];return to(i)?(i=Number(i),r[t]+=i,i):0},avg:function(t,e,r,a,i){var n=a[e];return to(n)&&(n=Number(n),r[t]+=n,i[t]++),0},min:function(t,e,r,a){var i=a[e];if(to(i))if(i=Number(i),to(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(to(i))if(i=Number(i),to(r[t])){if(r[t]<i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0}},K8={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}},Q8=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},Jo=cr,wn=Jo.ONEAVGYEAR,Lx=Jo.ONEAVGMONTH,Cc=Jo.ONEDAY,Cx=Jo.ONEHOUR,Dx=Jo.ONEMIN,Px=Jo.ONESEC,Ex=Ot.tickIncrement,J8=function(e,r,a,i,n){var o=-1.1*r,l=-.1*r,s=e-l,f=a[0],c=a[1],u=Math.min(_f(f+l,f+s,i,n),_f(c+l,c+s,i,n)),v=Math.min(_f(f+o,f+l,i,n),_f(c+o,c+l,i,n)),h,d;if(u>v&&v<Math.abs(c-f)/4e3?(h=u,d=!1):(h=Math.min(u,v),d=!0),i.type==="date"&&h>Cc){var p=h===wn?1:6,m=h===wn?"M12":"M1";return function(y,b){var _=i.c2d(y,wn,n),g=_.indexOf("-",p);g>0&&(_=_.substr(0,g));var x=i.d2c(_,0,n);if(x<y){var w=Ex(x,m,!1,n);(x+w)/2<y+e&&(x=w)}return b&&d?Ex(x,m,!0,n):x}}return function(y,b){var _=h*Math.round(y/h);return _+h/10<y&&_+h*.9<y+e&&(_+=h),b&&d&&(_-=h),_}};function _f(t,e,r,a){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),n=r.type==="date",o=zx(i,n),l=0;l<10;l++){var s=zx(o*80,n);if(o===s)break;if(eH(s,t,e,n,r,a))o=s;else break}return o}function zx(t,e){return e&&t>Px?t>Cc?t>wn*1.1?wn:t>Lx*1.1?Lx:Cc:t>Cx?Cx:t>Dx?Dx:Px:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function eH(t,e,r,a,i,n){if(a&&t>Cc){var o=Rx(e,i,n),l=Rx(r,i,n),s=t===wn?0:1;return o[s]!==l[s]}return Math.floor(r/t)-Math.floor(e/t)>.1}function Rx(t,e,r){var a=e.c2d(t,wn,r).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}var Th=kt,Nr=ke,Ix=ot,pa=Ot,tH=fm,Fx=Z8,rH=K8,aH=Q8,iH=J8;function nH(t,e){var r=[],a=[],i=e.orientation==="h",n=pa.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,u=TA(t,e,n,o),v=u[0],h=u[1],d=typeof v.size=="string",p=[],m=d?p:v,y=[],b=[],_=[],g=0,x=e.histnorm,w=e.histfunc,T=x.indexOf("density")!==-1,A,M,S;f.enabled&&T&&(x=x.replace(/ ?density$/,""),T=!1);var L=w==="max"||w==="min",z=L?null:0,N=Fx.count,$=rH[x],R=!1,H=function(ie){return n.r2c(ie,0,s)},D;for(Nr.isArrayOrTypedArray(e[l])&&w!=="count"&&(D=e[l],R=w==="avg",N=Fx[w]),c=H(v.start),M=H(v.end)+(c-pa.tickIncrement(c,v.size,!1,s))/1e6;c<M&&r.length<1e6&&(A=pa.tickIncrement(c,v.size,!1,s),r.push((c+A)/2),a.push(z),_.push([]),p.push(c),T&&y.push(1/(A-c)),R&&b.push(0),!(A<=c));)c=A;p.push(c),!d&&n.type==="date"&&(m={start:H(m.start),end:H(m.end),size:m.size}),t._fullLayout._roundFnOpts||(t._fullLayout._roundFnOpts={});var P=e["_"+o+"bingroup"],k={leftGap:1/0,rightGap:1/0};P&&(t._fullLayout._roundFnOpts[P]||(t._fullLayout._roundFnOpts[P]=k),k=t._fullLayout._roundFnOpts[P]);var C=a.length,E=!0,I=k.leftGap,j=k.rightGap,G={};for(c=0;c<h.length;c++){var X=h[c];S=Nr.findBin(X,m),S>=0&&S<C&&(g+=N(S,c,a,D,b),E&&_[S].length&&X!==h[_[S][0]]&&(E=!1),_[S].push(c),G[c]=S,I=Math.min(I,X-p[S]),j=Math.min(j,p[S+1]-X))}k.leftGap=I,k.rightGap=j;var O;E||(O=function(ie,de){return function(){var oe=t._fullLayout._roundFnOpts[P];return iH(oe.leftGap,oe.rightGap,p,n,s)(ie,de)}}),R&&(g=aH(a,b)),$&&$(a,g,y),f.enabled&&sH(a,f.direction,f.currentbin);var Z=Math.min(r.length,a.length),V=[],q=0,B=Z-1;for(c=0;c<Z;c++)if(a[c]){q=c;break}for(c=Z-1;c>=q;c--)if(a[c]){B=c;break}for(c=q;c<=B;c++)if(Th(r[c])&&Th(a[c])){var J={p:r[c],s:a[c],b:0};f.enabled||(J.pts=_[c],E?J.ph0=J.ph1=_[c].length?h[_[c][0]]:r[c]:(e._computePh=!0,J.ph0=O(p[c]),J.ph1=O(p[c+1],!0))),V.push(J)}return V.length===1&&(V[0].width1=pa.tickIncrement(V[0].p,v.size,!1,s)-V[0].p),tH(V,e),Nr.isArrayOrTypedArray(e.selectedpoints)&&Nr.tagSelected(V,e,G),V}function TA(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,u,v,h,d,p,m,y=function(X){return r.r2c(X,0,h)},b=function(X){return r.c2r(X,0,h)},_=r.type==="date"?function(X){return X||X===0?Nr.cleanDate(X,null,h):null}:function(X){return Th(X)?Number(X):null};function g(X,O,Z){O[X+"Found"]?(O[X]=_(O[X]),O[X]===null&&(O[X]=Z[X])):(p[X]=O[X]=Z[X],Nr.nestedProperty(u[0],n+"."+X).set(Z[X]))}if(e["_"+a+"autoBinFinished"])delete e["_"+a+"autoBinFinished"];else{u=s.traces;var x=[],w=!0,T=!1,A=!1;for(c=0;c<u.length;c++)if(v=u[c],v.visible){var M=s.dirs[c];d=v["_"+M+"pos0"]=r.makeCalcdata(v,M),x=Nr.concat(x,d),delete v["_"+a+"autoBinFinished"],e.visible===!0&&(w?w=!1:(delete v._autoBin,v["_"+a+"autoBinFinished"]=1),Ix.traceIs(v,"2dMap")&&(T=!0),v.type==="histogram2dcontour"&&(A=!0))}h=u[0][a+"calendar"];var S=pa.autoBin(x,r,s.nbins,T,h,s.sizeFound&&s.size),L=u[0]._autoBin={};if(p=L[s.dirs[0]]={},A&&(s.size||(S.start=b(pa.tickIncrement(y(S.start),S.size,!0,h))),s.end===void 0&&(S.end=b(pa.tickIncrement(y(S.end),S.size,!1,h)))),f&&!Ix.traceIs(e,"2dMap")&&S._dataSpan===0&&r.type!=="category"&&r.type!=="multicategory"&&e.bingroup===""&&typeof e.xbins>"u"){if(i)return[S,d,!0];S=oH(t,e,r,a,n)}m=v.cumulative||{},m.enabled&&m.currentbin!=="include"&&(m.direction==="decreasing"?S.start=b(pa.tickIncrement(y(S.start),S.size,!0,h)):S.end=b(pa.tickIncrement(y(S.end),S.size,!1,h))),s.size=S.size,s.sizeFound||(p.size=S.size,Nr.nestedProperty(u[0],n+".size").set(S.size)),g("start",s,S),g("end",s,S)}d=e["_"+a+"pos0"],delete e["_"+a+"pos0"];var z=e._input[n]||{},N=Nr.extendFlat({},s),$=s.start,R=r.r2l(z.start),H=R!==void 0;if((s.startFound||H)&&R!==r.r2l($)){var D=H?R:Nr.aggNums(Math.min,null,d),P={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:s.size,tick0:$,calendar:h,range:[D,pa.tickIncrement(D,s.size,!1,h)].map(r.l2r)},k=pa.tickFirst(P);k>r.r2l(D)&&(k=pa.tickIncrement(k,s.size,!0,h)),N.start=r.l2r(k),H||Nr.nestedProperty(e,n+".start").set(N.start)}var C=s.end,E=r.r2l(z.end),I=E!==void 0;if((s.endFound||I)&&E!==r.r2l(C)){var j=I?E:Nr.aggNums(Math.max,null,d);N.end=r.l2r(j),I||Nr.nestedProperty(e,n+".start").set(N.end)}var G="autobin"+a;return e._input[G]===!1&&(e._input[n]=Nr.extendFlat({},e[n]||{}),delete e._input[G],delete e[G]),[N,d]}function oH(t,e,r,a,i){var n=t._fullLayout,o=lH(t,e),l=!1,s=1/0,f=[e],c,u,v;for(c=0;c<o.length;c++)if(u=o[c],u===e)l=!0;else if(!l)v=n._histogramBinOpts[u["_"+a+"bingroup"]],s=Math.min(s,v.size||u[i].size);else{var h=TA(t,u,r,a,!0),d=h[0],p=h[2];u["_"+a+"autoBinFinished"]=1,u["_"+a+"pos0"]=h[1],p?f.push(u):s=Math.min(s,d.size)}var m=new Array(f.length);for(c=0;c<f.length;c++)for(var y=f[c]["_"+a+"pos0"],b=0;b<y.length;b++)if(y[b]!==void 0){m[c]=y[b];break}for(isFinite(s)||(s=Nr.distinctVals(m).minDiff),c=0;c<f.length;c++){u=f[c];var _=u[a+"calendar"],g={start:r.c2r(m[c]-s/2,0,_),end:r.c2r(m[c]+s/2,0,_),size:s};u._input[i]=u[i]=g,v=n._histogramBinOpts[u["_"+a+"bingroup"]],v&&Nr.extendFlat(v,g)}return e[i]}function lH(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 sH(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 fH={calc:nH},cH=xA.hoverPoints,uH=Ot.hoverLabelText,vH=function(e,r,a,i,n){var o=cH(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"]=uH(e[f+"a"],[l.ph0,l.ph1],s[f+"hoverformat"])}return o}},dH=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},hH={attributes:wA,layoutAttributes:sm,supplyDefaults:U8,crossTraceDefaults:q8,supplyLayoutDefaults:eA,calc:fH.calc,crossTraceCalc:Kp.crossTraceCalc,plot:vm.plot,layerName:"barlayer",style:Cn.style,styleOnSelect:Cn.styleOnSelect,colorbar:As,hoverPoints:vH,selectPoints:_A,eventData:dH,moduleType:"trace",name:"histogram",basePlotModule:pr,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(" ")}},pH=hH;const AB=$i(pH);var mH=_a,yH=Wi.attributes,gH=Mr,bH=Or,xH=Sr.hovertemplateAttrs,_H=Sr.texttemplateAttrs,kl=Yt.extendFlat,wH=ta.pattern,wf=gH({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."}),ku={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:bH.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"},pattern:wH,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:kl({},mH.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:xH({},{keys:["label","color","value","percent","text"]}),texttemplate:_H({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:kl({},wf,{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:kl({},wf,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:kl({},wf,{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."].join(" ")},font:kl({},wf,{description:"Sets the font used for `title`."}),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`."].join(" ")},editType:"plot"},domain:yH({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(" ")}},TH=kt,Ul=ke,kH=ku,AH=Wi.defaults,MH=Ln.handleText,SH=ke.coercePattern;function LH(t,e){var r=Ul.isArrayOrTypedArray(t),a=Ul.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(TH(l)&&l>0){n=!0;break}}n||(i=0)}return{hasLabels:r,hasValues:a,len:i}}function kA(t,e,r,a,i){var n=a("marker.line.width");n&&a("marker.line.color",i?void 0:r.paper_bgcolor);var o=a("marker.colors");SH(a,"marker.pattern",o),t.marker&&!e.marker.pattern.fgcolor&&(e.marker.pattern.fgcolor=t.marker.colors),e.marker.pattern.bgcolor||(e.marker.pattern.bgcolor=r.paper_bgcolor)}function CH(t,e,r,a){function i(b,_){return Ul.coerce(t,e,kH,b,_)}var n=i("labels"),o=i("values"),l=LH(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,kA(t,e,a,i,!0),i("scalegroup");var f=i("text"),c=i("texttemplate"),u;if(c||(u=i("textinfo",Ul.isArrayOrTypedArray(f)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),c||u&&u!=="none"){var v=i("textposition");MH(t,e,a,i,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var h=Array.isArray(v)||v==="auto",d=h||v==="outside";d&&i("automargin"),(v==="inside"||v==="auto"||Array.isArray(v))&&i("insidetextorientation")}else u==="none"&&i("textposition","none");AH(e,a,i);var p=i("hole"),m=i("title.text");if(m){var y=i("title.position",p?"middle center":"top center");!p&&y==="middle center"&&(e.title.position="top center"),Ul.coerceFont(i,"title.font",a.font)}i("sort"),i("direction"),i("rotation"),i("pull")}var AA={handleMarkerDefaults:kA,supplyDefaults:CH},MA={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(" ")}},DH=ke,PH=MA,EH=function(e,r){function a(i,n){return DH.coerce(e,r,PH,i,n)}a("hiddenlabels"),a("piecolorway",r.colorway),a("extendpiecolors")},zH=kt,kh=$a,RH=yt,IH={};function FH(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,u;if(e.dlabel)for(n=new Array(s),c=0;c<s;c++)n[c]=String(e.label0+c*e.dlabel);var v={},h=SA(a["_"+e.type+"colormap"]),d=0,p=!1;for(c=0;c<s;c++){var m,y,b;if(f){if(m=l[c],!zH(m))continue;m=+m}else m=1;y=n[c],(y===void 0||y==="")&&(y=c),y=String(y);var _=v[y];_===void 0?(v[y]=r.length,b=i.indexOf(y)!==-1,b||(d+=m),r.push({v:m,label:y,color:h(o[c],y),i:c,pts:[c],hidden:b})):(p=!0,u=r[_],u.v+=m,u.pts.push(c),u.hidden||(d+=m),u.color===!1&&o[c]&&(u.color=h(o[c],y)))}r=r.filter(function(x){return x.v>=0});var g=e.type==="funnelarea"?p:e.sort;return g&&r.sort(function(x,w){return w.v-x.v}),r[0]&&(r[0].vTotal=d),r}function SA(t){return function(r,a){return!r||(r=kh(r),!r.isValid())?!1:(r=RH.addOpacity(r,r.getAlpha()),t[a]||(t[a]=r),r)}}function NH(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=LA(n,IH));for(var l=0,s=0;s<i.length;s++){var f=i[s],c=f[0].trace.type;if(c===r)for(var u=0;u<f.length;u++){var v=f[u];v.color===!1&&(o[v.label]?v.color=o[v.label]:(o[v.label]=v.color=n[l%n.length],l++))}}}function LA(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(kh(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)i.push(kh(t[r]).darken(20).toHexString());e[a]=i}return i}var Dc={calc:FH,crossTraceCalc:NH,makePullColorFn:SA,generateExtendedColors:LA},$H=wa.appendArrayMultiPointValues,HH=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]),$H(a,r,e.pts),r.type==="funnelarea"&&(delete a.v,delete a.i),a},Zr=bt,OH=hr,Tf=Na,CA=yt,ci=zt,Dr=ke,jH=Dr.strScale,Nx=Dr.strTranslate,Ah=Tr,DA=mi,BH=DA.recordMinTextSize,GH=DA.clearMinTextSize,PA=Ss.TEXTPAD,mt=Fn,kf=HH,$x=ke.isValidTextValue;function UH(t,e){var r=t._context.staticPlot,a=t._fullLayout,i=a._size;GH("pie",a),qH(e,t),rO(e,i);var n=Dr.makeTraceGroups(a._pielayer,e,"trace").each(function(o){var l=Zr.select(this),s=o[0],f=s.trace;iO(o),l.attr("stroke-linejoin","round"),l.each(function(){var c=Zr.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var u=[[[],[]],[[],[]]],v=!1;c.each(function(g,x){if(g.hidden){Zr.select(this).selectAll("path,g").remove();return}g.pointNumber=g.i,g.curveNumber=f.index,u[g.pxmid[1]<0?0:1][g.pxmid[0]<0?0:1].push(g);var w=s.cx,T=s.cy,A=Zr.select(this),M=A.selectAll("path.surface").data([g]);if(M.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),A.call(WH,t,o),f.pull){var S=+mt.castOption(f.pull,g.pts)||0;S>0&&(w+=S*g.pxmid[0],T+=S*g.pxmid[1])}g.cxFinal=w,g.cyFinal=T;function L(P,k,C,E){var I=E*(k[0]-P[0]),j=E*(k[1]-P[1]);return"a"+E*s.r+","+E*s.r+" 0 "+g.largeArc+(C?" 1 ":" 0 ")+I+","+j}var z=f.hole;if(g.v===s.vTotal){var N="M"+(w+g.px0[0])+","+(T+g.px0[1])+L(g.px0,g.pxmid,!0,1)+L(g.pxmid,g.px0,!0,1)+"Z";z?M.attr("d","M"+(w+z*g.px0[0])+","+(T+z*g.px0[1])+L(g.px0,g.pxmid,!1,z)+L(g.pxmid,g.px0,!1,z)+"Z"+N):M.attr("d",N)}else{var $=L(g.px0,g.px1,!0,1);if(z){var R=1-z;M.attr("d","M"+(w+z*g.px1[0])+","+(T+z*g.px1[1])+L(g.px1,g.px0,!1,z)+"l"+R*g.px0[0]+","+R*g.px0[1]+$+"Z")}else M.attr("d","M"+w+","+T+"l"+g.px0[0]+","+g.px0[1]+$+"Z")}nO(t,g,s);var H=mt.castOption(f.textposition,g.pts),D=A.selectAll("g.slicetext").data(g.text&&H!=="none"?[0]:[]);D.enter().append("g").classed("slicetext",!0),D.exit().remove(),D.each(function(){var P=Dr.ensureSingle(Zr.select(this),"text","",function(O){O.attr("data-notex",1)}),k=Dr.ensureUniformFontSize(t,H==="outside"?XH(f,g,a.font):YH(f,g,a.font));P.text(g.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(ci.font,k).call(Ah.convertToTspans,t);var C=ci.bBox(P.node()),E;if(H==="outside")E=jx(C,g);else if(E=EA(C,g,s),H==="auto"&&E.scale<1){var I=Dr.ensureUniformFontSize(t,f.outsidetextfont);P.call(ci.font,I),C=ci.bBox(P.node()),E=jx(C,g)}var j=E.textPosAngle,G=j===void 0?g.pxmid:qf(s.r,j);if(E.targetX=w+G[0]*E.rCenter+(E.x||0),E.targetY=T+G[1]*E.rCenter+(E.y||0),NA(E,C),E.outside){var X=E.targetY;g.yLabelMin=X-C.height/2,g.yLabelMid=X,g.yLabelMax=X+C.height/2,g.labelExtraX=0,g.labelExtraY=0,v=!0}E.fontSize=k.size,BH(f.type,E,a),o[x].transform=E,Dr.setTransormAndDisplay(P,E)})});var h=Zr.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 g=Dr.ensureSingle(Zr.select(this),"text","",function(T){T.attr("data-notex",1)}),x=f.title.text;f._meta&&(x=Dr.templateString(x,f._meta)),g.text(x).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(ci.font,f.title.font).call(Ah.convertToTspans,t);var w;f.title.position==="middle center"?w=QH(s):w=JH(s,i),g.attr("transform",Nx(w.x,w.y)+jH(Math.min(1,w.scale))+Nx(w.tx,w.ty))}),v&&tO(u,f),VH(c,f),v&&f.automargin){var d=ci.bBox(l.node()),p=f.domain,m=i.w*(p.x[1]-p.x[0]),y=i.h*(p.y[1]-p.y[0]),b=(.5*m-s.r)/i.w,_=(.5*y-s.r)/i.h;OH.autoMargin(t,"pie."+f.uid+".automargin",{xl:p.x[0]-b,xr:p.x[1]+b,yb:p.y[0]-_,yt:p.y[1]+_,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=Zr.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function VH(t,e){t.each(function(r){var a=Zr.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,Dr.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;Dr.ensureSingle(a,"path","textline").call(CA.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:l,fill:"none"})})}function WH(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 u=c.hoverinfo;if(Array.isArray(u)&&(u=Tf.castHoverinfo({hoverinfo:[mt.castOption(u,s.pts)],_module:o._module},f,0)),u==="all"&&(u="label+text+value+percent+name"),c.hovertemplate||u!=="none"&&u!=="skip"&&u){var v=s.rInscribed||0,h=i+s.pxmid[0]*(1-v),d=n+s.pxmid[1]*(1-v),p=f.separators,m=[];if(u&&u.indexOf("label")!==-1&&m.push(s.label),s.text=mt.castOption(c.hovertext||c.text,s.pts),u&&u.indexOf("text")!==-1){var y=s.text;Dr.isValidTextValue(y)&&m.push(y)}s.value=s.v,s.valueLabel=mt.formatPieValue(s.v,p),u&&u.indexOf("value")!==-1&&m.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=mt.formatPiePercent(s.percent,p),u&&u.indexOf("percent")!==-1&&m.push(s.percentLabel);var b=c.hoverlabel,_=b.font,g=[];Tf.loneHover({trace:o,x0:h-v*a.r,x1:h+v*a.r,y:d,_x0:l?i+s.TL[0]:h-v*a.r,_x1:l?i+s.TR[0]:h+v*a.r,_y0:l?n+s.TL[1]:d-v*a.r,_y1:l?n+s.BL[1]:d+v*a.r,text:m.join("<br>"),name:c.hovertemplate||u.indexOf("name")!==-1?c.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:mt.castOption(b.bgcolor,s.pts)||s.color,borderColor:mt.castOption(b.bordercolor,s.pts),fontFamily:mt.castOption(_.family,s.pts),fontSize:mt.castOption(_.size,s.pts),fontColor:mt.castOption(_.color,s.pts),nameLength:mt.castOption(b.namelength,s.pts),textAlign:mt.castOption(b.align,s.pts),hovertemplate:mt.castOption(c.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[kf(s,c)]},{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:e,inOut_bbox:g}),s.bbox=g[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[kf(s,c)],event:Zr.event})}}),t.on("mouseout",function(s){var f=e._fullLayout,c=e._fullData[o.index],u=Zr.select(this).datum();o._hasHoverEvent&&(s.originalEvent=Zr.event,e.emit("plotly_unhover",{points:[kf(u,c)],event:Zr.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=[kf(s,c)],Tf.click(e,Zr.event))})}function XH(t,e,r){var a=mt.castOption(t.outsidetextfont.color,e.pts)||mt.castOption(t.textfont.color,e.pts)||r.color,i=mt.castOption(t.outsidetextfont.family,e.pts)||mt.castOption(t.textfont.family,e.pts)||r.family,n=mt.castOption(t.outsidetextfont.size,e.pts)||mt.castOption(t.textfont.size,e.pts)||r.size,o=mt.castOption(t.outsidetextfont.weight,e.pts)||mt.castOption(t.textfont.weight,e.pts)||r.weight,l=mt.castOption(t.outsidetextfont.style,e.pts)||mt.castOption(t.textfont.style,e.pts)||r.style,s=mt.castOption(t.outsidetextfont.variant,e.pts)||mt.castOption(t.textfont.variant,e.pts)||r.variant,f=mt.castOption(t.outsidetextfont.textcase,e.pts)||mt.castOption(t.textfont.textcase,e.pts)||r.textcase,c=mt.castOption(t.outsidetextfont.lineposition,e.pts)||mt.castOption(t.textfont.lineposition,e.pts)||r.lineposition,u=mt.castOption(t.outsidetextfont.shadow,e.pts)||mt.castOption(t.textfont.shadow,e.pts)||r.shadow;return{color:a,family:i,size:n,weight:o,style:l,variant:s,textcase:f,lineposition:c,shadow:u}}function YH(t,e,r){var a=mt.castOption(t.insidetextfont.color,e.pts);!a&&t._input.textfont&&(a=mt.castOption(t._input.textfont.color,e.pts));var i=mt.castOption(t.insidetextfont.family,e.pts)||mt.castOption(t.textfont.family,e.pts)||r.family,n=mt.castOption(t.insidetextfont.size,e.pts)||mt.castOption(t.textfont.size,e.pts)||r.size,o=mt.castOption(t.insidetextfont.weight,e.pts)||mt.castOption(t.textfont.weight,e.pts)||r.weight,l=mt.castOption(t.insidetextfont.style,e.pts)||mt.castOption(t.textfont.style,e.pts)||r.style,s=mt.castOption(t.insidetextfont.variant,e.pts)||mt.castOption(t.textfont.variant,e.pts)||r.variant,f=mt.castOption(t.insidetextfont.textcase,e.pts)||mt.castOption(t.textfont.textcase,e.pts)||r.textcase,c=mt.castOption(t.insidetextfont.lineposition,e.pts)||mt.castOption(t.textfont.lineposition,e.pts)||r.lineposition,u=mt.castOption(t.insidetextfont.shadow,e.pts)||mt.castOption(t.textfont.shadow,e.pts)||r.shadow;return{color:a||CA.contrast(e.color),family:i,size:n,weight:o,style:l,variant:s,textcase:f,lineposition:c,shadow:u}}function qH(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=Dr.templateString(n,a._meta));var o=ci.tester.append("text").attr("data-notex",1).text(n).call(ci.font,a.title.font).call(Ah.convertToTspans,e),l=ci.bBox(o.node(),!0);r.titleBox={width:l.width,height:l.height},o.remove()}}function EA(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,u=c==="horizontal",v=c==="tangential",h=c==="radial",d=c==="auto",p=[],m;if(!d){var y=function(A,M){if(ZH(e,A)){var S=Math.abs(A-e.startangle),L=Math.abs(A-e.stopangle),z=S<L?S:L;M==="tan"?m=Ox(t,a,o,z,0):m=Hx(t,a,o,z,Math.PI/2),m.textPosAngle=A,p.push(m)}},b;if(u||v){for(b=4;b>=-4;b-=2)y(Math.PI*b,"tan");for(b=4;b>=-4;b-=2)y(Math.PI*(b+1),"tan")}if(u||h){for(b=4;b>=-4;b-=2)y(Math.PI*(b+1.5),"rad");for(b=4;b>=-4;b-=2)y(Math.PI*(b+.5),"rad")}}if(l||d||u){var _=Math.sqrt(t.width*t.width+t.height*t.height);if(m={scale:i*a*2/_,rCenter:1-i,rotate:0},m.textPosAngle=(e.startangle+e.stopangle)/2,m.scale>=1)return m;p.push(m)}(d||h)&&(m=Hx(t,a,o,s,f),m.textPosAngle=(e.startangle+e.stopangle)/2,p.push(m)),(d||v)&&(m=Ox(t,a,o,s,f),m.textPosAngle=(e.startangle+e.stopangle)/2,p.push(m));for(var g=0,x=0,w=0;w<p.length;w++){var T=p[w].scale;if(x<T&&(x=T,g=w),!d&&x>=1)break}return p[g]}function ZH(t,e){var r=t.startangle,a=t.stopangle;return r>e&&e>a||r<e&&e<a}function Hx(t,e,r,a,i){e=Math.max(0,e-2*PA);var n=t.width/t.height,o=IA(n,a,e,r);return{scale:o*2/t.height,rCenter:zA(n,o/e),rotate:RA(i)}}function Ox(t,e,r,a,i){e=Math.max(0,e-2*PA);var n=t.height/t.width,o=IA(n,a,e,r);return{scale:o*2/t.width,rCenter:zA(n,o/e),rotate:RA(i+Math.PI/2)}}function zA(t,e){return Math.cos(e)-t*e}function RA(t){return(180/Math.PI*t+720)%180-90}function IA(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 KH(t,e){return t.v===e.vTotal&&!e.trace.hole?1:Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2)}function jx(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 QH(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 JH(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=FA(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=eO(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=Mh(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,a),tx:l.tx,ty:l.ty}}function eO(t,e){return t/(e===void 0?1:e)}function Mh(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 FA(t){var e=t.pull;if(!e)return 0;var r;if(Dr.isArrayOrTypedArray(e))for(e=0,r=0;r<t.pull.length;r++)t.pull[r]>e&&(e=t.pull[r]);return e}function tO(t,e){var r,a,i,n,o,l,s,f,c,u,v,h,d;function p(_,g){return _.pxmid[1]-g.pxmid[1]}function m(_,g){return g.pxmid[1]-_.pxmid[1]}function y(_,g){g||(g={});var x=g.labelExtraY+(a?g.yLabelMax:g.yLabelMin),w=a?_.yLabelMin:_.yLabelMax,T=a?_.yLabelMax:_.yLabelMin,A=_.cyFinal+o(_.px0[1],_.px1[1]),M=x-w,S,L,z,N,$,R;if(M*s>0&&(_.labelExtraY=M),!!Dr.isArrayOrTypedArray(e.pull))for(L=0;L<u.length;L++)z=u[L],!(z===_||(mt.castOption(e.pull,_.pts)||0)>=(mt.castOption(e.pull,z.pts)||0))&&((_.pxmid[1]-z.pxmid[1])*s>0?(N=z.cyFinal+o(z.px0[1],z.px1[1]),M=N-w-_.labelExtraY,M*s>0&&(_.labelExtraY+=M)):(T+_.labelExtraY-A)*s>0&&(S=3*l*Math.abs(L-u.indexOf(_)),$=z.cxFinal+n(z.px0[0],z.px1[0]),R=$+S-(_.cxFinal+_.pxmid[0])-_.labelExtraX,R*l>0&&(_.labelExtraX+=R)))}for(a=0;a<2;a++)for(i=a?p:m,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],u=c.concat(f),h=[],v=0;v<f.length;v++)f[v].yLabelMid!==void 0&&h.push(f[v]);for(d=!1,v=0;a&&v<c.length;v++)if(c[v].yLabelMid!==void 0){d=c[v];break}for(v=0;v<h.length;v++){var b=v&&h[v-1];d&&!v&&(b=d),y(h[v],b)}}}function rO(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-=Mh(i,e));var f=l/2,c=s/2;n.type==="funnelarea"&&!n.scalegroup&&(c/=n.aspectratio),i.r=Math.min(f,c)/(1+FA(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-=Mh(i,e)),n.scalegroup&&r.indexOf(n.scalegroup)===-1&&r.push(n.scalegroup)}aO(t,r)}function aO(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 u=o*r.vTotal;i.type==="funnelarea"&&(u/=(1+i.baseratio)/2,u/=i.aspectratio),r.r=Math.sqrt(u)}}}function iO(t){var e=t[0],r=e.r,a=e.trace,i=mt.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=qf(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=qf(r,i),f.midangle=i,i+=n*f.v/2,c=qf(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=KH(f,e))}function qf(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function nO(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(g){return l.indexOf(g)!==-1},f=s("label"),c=s("text"),u=s("value"),v=s("percent"),h=a.separators,d;if(d=f?[e.label]:[],c){var p=mt.getFirstFilled(i.text,e.pts);$x(p)&&d.push(p)}u&&d.push(mt.formatPieValue(e.v,h)),v&&d.push(mt.formatPiePercent(e.v/r.vTotal,h)),e.text=d.join("<br>")}function m(g){return{label:g.label,value:g.v,valueLabel:mt.formatPieValue(g.v,a.separators),percent:g.v/r.vTotal,percentLabel:mt.formatPiePercent(g.v/r.vTotal,a.separators),color:g.color,text:g.text,customdata:Dr.castOption(i,g.i,"customdata")}}if(n){var y=Dr.castOption(i,e.i,"texttemplate");if(!y)e.text="";else{var b=m(e),_=mt.getFirstFilled(i.text,e.pts);($x(_)||_==="")&&(b.text=_),e.text=Dr.texttemplateString(y,b,t._fullLayout._d3locale,b,i._meta||{})}}}function NA(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 $A={plot:UH,transformInsideText:EA,computeTransform:NA},Bx=bt,oO=mp,lO=mi.resizeText,sO=function(e){var r=e._fullLayout._pielayer.selectAll(".trace");lO(e,r,"pie"),r.each(function(a){var i=a[0],n=i.trace,o=Bx.select(this);o.style({opacity:n.opacity}),o.selectAll("path.surface").each(function(l){Bx.select(this).call(oO,l,n,e)})})},HA={};(function(t){var e=hr;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)}})(HA);var fO={attributes:ku,supplyDefaults:AA.supplyDefaults,supplyLayoutDefaults:EH,layoutAttributes:MA,calc:Dc.calc,crossTraceCalc:Dc.crossTraceCalc,plot:$A.plot,style:sO,styleOne:mp,moduleType:"trace",name:"pie",basePlotModule:HA,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(" ")}},cO=fO;const MB=$i(cO);var OA={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}},Zf=ke.extendFlat,Rl=Vi,Gx=qo.axisHoverFormat,Sh=ta.dash,uO=Fc,jA=OA,vO=jA.INCREASING.COLOR,dO=jA.DECREASING.COLOR,Pc=Rl.line;function Ux(t){return{line:{color:Zf({},Pc.color,{dflt:t}),width:Pc.width,dash:Sh,editType:"style"},editType:"style"}}var BA={xperiod:Rl.xperiod,xperiod0:Rl.xperiod0,xperiodalignment:Rl.xperiodalignment,xhoverformat:Gx("x"),yhoverformat:Gx("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:Zf({},Pc.width,{description:[Pc.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:Zf({},Sh,{description:[Sh.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:Ux(vO),decreasing:Ux(dO),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:Zf({},uO.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}}),zorder:Rl.zorder},hO=ot,pO=ke,mO=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=hO.getComponentMethod("calendars","handleTraceDefaults");if(c(e,r,["x"],i),!!(o&&l&&s&&f)){var u=Math.min(o.length,l.length,s.length,f.length);return n&&(u=Math.min(u,pO.minRowLength(n))),r._length=u,u}},yO=ke,gO=mO,bO=yu,xO=BA,_O=function(e,r,a,i){function n(l,s){return yO.coerce(e,r,xO,l,s)}var o=gO(e,r,n,i);if(!o){r.visible=!1;return}bO(e,r,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),Vx(e,r,n,"increasing"),Vx(e,r,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),i._requestRangeslider[r.xaxis]=!0,n("zorder")};function Vx(t,e,r,a){r(a+".line.color"),r(a+".line.width",e.line.width),r(a+".line.dash",e.line.dash)}var Mo=ke,Af=Mo._,Kf=Ot,wO=gu,Al=cr.BADNUM;function TO(t,e){var r=Kf.getFromId(t,e.xaxis),a=Kf.getFromId(t,e.yaxis),i=MO(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=AO(t,e,o,l,a,kO);return e._extremes[r._id]=Kf.findExtremes(r,l,{vpad:n/2}),s.length?(Mo.extendFlat(s[0].t,{wHover:n/2,tickLen:i}),s):[{t:{empty:!0}}]}function kO(t,e,r,a){return{o:t,h:e,l:r,c:a}}function AO(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=Mo.isArrayOrTypedArray(e.text),u=Mo.isArrayOrTypedArray(e.hovertext),v=!0,h=null,d=!!e.xperiodalignment,p=[],m=0;m<a.length;m++){var y=a[m],b=o[m],_=l[m],g=s[m],x=f[m];if(y!==Al&&b!==Al&&_!==Al&&g!==Al&&x!==Al){x===b?h!==null&&x!==h&&(v=x>h):v=x>b,h=x;var w=n(b,_,g,x);w.pos=y,w.yc=(b+x)/2,w.i=m,w.dir=v?"increasing":"decreasing",w.x=w.pos,w.y=[g,_],d&&(w.orig_p=r[m]),c&&(w.tx=e.text[m]),u&&(w.htx=e.hovertext[m]),p.push(w)}else p.push({pos:y,empty:!0})}return e._extremes[i._id]=Kf.findExtremes(i,Mo.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 MO(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=wO(r,e,"x",s).vals;l._xcalc=f;var c=Mo.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 SO={calc:TO},LO=bt,Wx=ke,CO=function(e,r,a,i){var n=r.yaxis,o=r.xaxis,l=!!o.rangebreaks;Wx.makeTraceGroups(i,a,"trace ohlc").each(function(s){var f=LO.select(this),c=s[0],u=c.t,v=c.trace;if(v.visible!==!0||u.empty){f.remove();return}var h=u.tickLen,d=f.selectAll("path").data(Wx.identity);d.enter().append("path"),d.exit().remove(),d.attr("d",function(p){if(p.empty)return"M0,0Z";var m=o.c2p(p.pos-h,!0),y=o.c2p(p.pos+h,!0),b=l?(m+y)/2:o.c2p(p.pos,!0),_=n.c2p(p.o,!0),g=n.c2p(p.h,!0),x=n.c2p(p.l,!0),w=n.c2p(p.c,!0);return"M"+m+","+_+"H"+b+"M"+b+","+g+"V"+x+"M"+y+","+w+"H"+b})})},bd=bt,DO=zt,PO=yt,EO=function(e,r,a){var i=a||bd.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;bd.select(this).selectAll("path").each(function(l){if(!l.empty){var s=o[l.dir].line;bd.select(this).style("fill","none").call(PO.stroke,s.color).call(DO.dashLine,s.dash,s.width).style("opacity",o.selectedpoints&&!l.selected?.3:1)}})})},Lh=Ot,zO=ke,Mf=Na,RO=yt,IO=ke.fillText,Xx=OA,FO={increasing:Xx.INCREASING.SYMBOL,decreasing:Xx.DECREASING.SYMBOL};function NO(t,e,r,a){var i=t.cd,n=i[0].trace;return n.hoverlabel.split?$O(t,e,r,a):HO(t,e,r,a)}function GA(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",u,v,h=l.bPos||0,d=function(S){return S.pos+h-e},p=l.bdPos||l.tickLen,m=l.wHover,y=Math.min(1,p/Math.abs(n.r2c(n.range[1])-n.r2c(n.range[0])));u=t.maxHoverDistance-y,v=t.maxSpikeDistance-y;function b(S){var L=d(S);return Mf.inbox(L-m,L+m,u)}function _(S){var L=S[f],z=S[c];return L===z||Mf.inbox(L-r,z-r,u)}function g(S){return(b(S)+_(S))/2}var x=Mf.getDistanceFunction(a,b,_,g);if(Mf.getClosest(i,x,t),t.index===!1)return null;var w=i[t.index];if(w.empty)return null;var T=w.dir,A=o[T],M=A.line.color;return RO.opacity(M)&&A.line.width?t.color=M:t.color=A.fillcolor,t.x0=n.c2p(w.pos+h-p,!0),t.x1=n.c2p(w.pos+h+p,!0),t.xLabelVal=w.orig_p!==void 0?w.orig_p:w.pos,t.spikeDistance=g(w)*v/u,t.xSpike=n.c2p(w.pos,!0),t}function $O(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=[],f=GA(t,e,r,a);if(!f)return[];var c=f.index,u=i[c],v=u.hi||o.hoverinfo,h=v.split("+"),d=v==="all",p=d||h.indexOf("y")!==-1;if(!p)return[];for(var m=["high","open","close","low"],y={},b=0;b<m.length;b++){var _=m[b],g=o[_][f.index],x=n.c2p(g,!0),w;g in y?(w=y[g],w.yLabel+="<br>"+l.labels[_]+Lh.hoverLabelText(n,g,o.yhoverformat)):(w=zO.extendFlat({},f),w.y0=w.y1=x,w.yLabelVal=g,w.yLabel=l.labels[_]+Lh.hoverLabelText(n,g,o.yhoverformat),w.name="",s.push(w),y[g]=w)}return s}function HO(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=GA(t,e,r,a);if(!s)return[];var f=s.index,c=i[f],u=s.index=c.i,v=c.dir;function h(g){return l.labels[g]+Lh.hoverLabelText(n,o[g][u],o.yhoverformat)}var d=c.hi||o.hoverinfo,p=d.split("+"),m=d==="all",y=m||p.indexOf("y")!==-1,b=m||p.indexOf("text")!==-1,_=y?[h("open"),h("high"),h("low"),h("close")+" "+FO[v]]:[];return b&&IO(c,o,_),s.extraText=_.join("<br>"),s.y0=s.y1=n.c2p(c.yc,!0),[s]}var OO={hoverPoints:NO},jO=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},BO={moduleType:"trace",name:"ohlc",basePlotModule:pr,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:BA,supplyDefaults:_O,calc:SO.calc,plot:CO,style:EO,hoverPoints:OO.hoverPoints,selectPoints:jO},GO=BO;const SB=$i(GO);var UO=ot,ia=ke,VO=rk;function WO(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,u=l.c2p(e),v=s.c2p(r),h=t.distance,d;if(n.tree){var p=l.p2c(u-h),m=l.p2c(u+h),y=s.p2c(v-h),b=s.p2c(v+h);a==="x"?d=n.tree.range(Math.min(p,m),Math.min(s._rl[0],s._rl[1]),Math.max(p,m),Math.max(s._rl[0],s._rl[1])):d=n.tree.range(Math.min(p,m),Math.min(y,b),Math.max(p,m),Math.max(y,b))}else d=n.ids;var _,g,x,w,T,A,M,S,L,z=h;if(a==="x"){var N=!!o.xperiodalignment,$=!!o.yperiodalignment;for(T=0;T<d.length;T++){if(_=d[T],x=f[_],A=Math.abs(l.c2p(x)-u),N){var R=l.c2p(o._xStarts[_]),H=l.c2p(o._xEnds[_]);A=u>=Math.min(R,H)&&u<=Math.max(R,H)?0:1/0}if(A<z){if(z=A,w=c[_],M=s.c2p(w)-v,$){var D=s.c2p(o._yStarts[_]),P=s.c2p(o._yEnds[_]);M=v>=Math.min(D,P)&&v<=Math.max(D,P)?0:1/0}L=Math.sqrt(A*A+M*M),g=d[T]}}}else for(T=d.length-1;T>-1;T--)_=d[T],x=f[_],w=c[_],A=l.c2p(x)-u,M=s.c2p(w)-v,S=Math.sqrt(A*A+M*M),S<z&&(z=L=S,g=_);return t.index=g,t.distance=z,t.dxy=L,g===void 0?[t]:[XO(t,f,c,o)]}function XO(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=ia.isArrayOrTypedArray(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=ia.isArrayOrTypedArray(c.size)?c.size[s]:c.size,f.tc=ia.isArrayOrTypedArray(c.color)?c.color[s]:c.color,f.tf=Array.isArray(c.family)?c.family[s]:c.family,f.tw=Array.isArray(c.weight)?c.weight[s]:c.weight,f.ty=Array.isArray(c.style)?c.style[s]:c.style,f.tv=Array.isArray(c.variant)?c.variant[s]:c.variant);var u=a.marker;u&&(f.ms=ia.isArrayOrTypedArray(u.size)?u.size[s]:u.size,f.mo=ia.isArrayOrTypedArray(u.opacity)?u.opacity[s]:u.opacity,f.mx=ia.isArrayOrTypedArray(u.symbol)?u.symbol[s]:u.symbol,f.ma=ia.isArrayOrTypedArray(u.angle)?u.angle[s]:u.angle,f.mc=ia.isArrayOrTypedArray(u.color)?u.color[s]:u.color);var v=u&&u.line;v&&(f.mlc=Array.isArray(v.color)?v.color[s]:v.color,f.mlw=ia.isArrayOrTypedArray(v.width)?v.width[s]:v.width);var h=u&&u.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),m=f.mrc||1,y=a.hoverlabel;y&&(f.hbg=Array.isArray(y.bgcolor)?y.bgcolor[s]:y.bgcolor,f.hbc=Array.isArray(y.bordercolor)?y.bordercolor[s]:y.bordercolor,f.hts=ia.isArrayOrTypedArray(y.font.size)?y.font.size[s]:y.font.size,f.htc=Array.isArray(y.font.color)?y.font.color[s]:y.font.color,f.htf=Array.isArray(y.font.family)?y.font.family[s]:y.font.family,f.hnl=ia.isArrayOrTypedArray(y.namelength)?y.namelength[s]:y.namelength);var b=a.hoverinfo;b&&(f.hi=Array.isArray(b)?b[s]:b);var _=a.hovertemplate;_&&(f.ht=Array.isArray(_)?_[s]:_);var g={};g[t.index]=f;var x=a._origX,w=a._origY,T=ia.extendFlat({},t,{color:VO(a,f),x0:d-m,x1:d+m,xLabelVal:x?x[s]:f.x,y0:p-m,y1:p+m,yLabelVal:w?w[s]:f.y,cd:g,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),ia.fillText(f,a,T),UO.getComponentMethod("errorbars","hoverInfo")(f,a,T),T}var YO={hoverPoints:WO},UA={exports:{}},Yx=20,Au={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:Yx,SYMBOL_STROKE:Yx/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]}},qO=_a,ZO=Mr,KO=_2,tr=Vi,qx=qo.axisHoverFormat,Zx=In,QO=Yh,xd=Yt.extendFlat,JO=Ja.overrideAll,e7=Au.DASHES,Kx=tr.line,fi=tr.marker,t7=fi.line,xo=UA.exports=JO({x:tr.x,x0:tr.x0,dx:tr.dx,y:tr.y,y0:tr.y0,dy:tr.dy,xperiod:tr.xperiod,yperiod:tr.yperiod,xperiod0:tr.xperiod0,yperiod0:tr.yperiod0,xperiodalignment:tr.xperiodalignment,yperiodalignment:tr.yperiodalignment,xhoverformat:qx("x"),yhoverformat:qx("y"),text:tr.text,hovertext:tr.hovertext,textposition:tr.textposition,textfont:ZO({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"],description:"Sets the text font."}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:Kx.color,width:Kx.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:QO(e7),dflt:"solid",description:"Sets the style of the lines."}},marker:xd({},Zx("marker"),{symbol:fi.symbol,angle:fi.angle,size:fi.size,sizeref:fi.sizeref,sizemin:fi.sizemin,sizemode:fi.sizemode,opacity:fi.opacity,colorbar:fi.colorbar,line:xd({},Zx("marker.line"),{width:t7.width})}),connectgaps:tr.connectgaps,fill:xd({},tr.fill,{dflt:"none"}),fillcolor:KO(),selected:{marker:tr.selected.marker,textfont:tr.selected.textfont},unselected:{marker:tr.unselected.marker,textfont:tr.unselected.textfont},opacity:qO.opacity},"calc","nested");xo.x.editType=xo.y.editType=xo.x0.editType=xo.y0.editType="calc+clearAxisTypes";xo.hovertemplate=tr.hovertemplate;xo.texttemplate=tr.texttemplate;var VA=UA.exports,Mu={},WA=Au;Mu.isOpenSymbol=function(t){return typeof t=="string"?WA.OPEN_RE.test(t):t%200>100};Mu.isDotSymbol=function(t){return typeof t=="string"?WA.DOT_RE.test(t):t>200};var Qx=ke,r7=ot,a7=Mu,i7=VA,n7=pu,Sf=jr,o7=Vp,l7=yu,s7=R2,f7=I2,c7=N2,u7=F2,v7=function(e,r,a,i){function n(h,d){return Qx.coerce(e,r,i7,h,d)}var o=e.marker?a7.isOpenSymbol(e.marker.symbol):!1,l=Sf.isBubble(e),s=o7(e,r,i,n);if(!s){r.visible=!1;return}l7(e,r,i,n),n("xhoverformat"),n("yhoverformat");var f=s<n7.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("hovertemplate"),n("mode",f),Sf.hasMarkers(r)&&(s7(e,r,a,i,n,{noAngleRef:!0,noStandOff:!0}),n("marker.line.width",o||l?1:0)),Sf.hasLines(r)&&(n("connectgaps"),f7(e,r,a,i,n),n("line.shape")),Sf.hasText(r)&&(n("texttemplate"),u7(e,r,i,n,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(r.line||{}).color,u=(r.marker||{}).color;n("fill"),r.fill!=="none"&&c7(e,r,a,n);var v=r7.getComponentMethod("errorbars","supplyDefaults");v(e,r,c||u||a,{axis:"y"}),v(e,r,c||u||a,{axis:"x",inherit:"y"}),Qx.coerceSelectionMarkerOpacity(r,n)},d7=J2,h7=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]),d7(e,r,a)},XA=kt,Ec=X1,Jx=Co,p7=Or.defaultLine,e1=fr.isArrayOrTypedArray,Ch=Ec(p7),YA=1;function t1(t,e){var r=t;return r[3]*=e,r}function r1(t){if(XA(t))return Ch;var e=Ec(t);return e.length?e:Ch}function a1(t){return XA(t)?t:YA}function m7(t,e,r){var a=t.color;a&&a._inputArray&&(a=a._inputArray);var i=e1(a),n=e1(e),o=Jx.extractOpts(t),l=[],s,f,c,u,v;if(o.colorscale!==void 0?s=Jx.makeColorScaleFuncFromTrace(t):s=r1,i?f=function(d,p){return d[p]===void 0?Ch:Ec(s(d[p]))}:f=r1,n?c=function(d,p){return d[p]===void 0?YA:a1(d[p])}:c=a1,i||n)for(var h=0;h<r;h++)u=f(a,h),v=c(e,h),l[h]=t1(u,v);else l=t1(Ec(a),e);return l}var y7={formatColor:m7},Qf=kt,g7=bM,Lf=X1,b7=ot,Oo=ke,sr=Oo.isArrayOrTypedArray,co=zt,i1=lr,n1=y7.formatColor,So=jr,x7=Aw,Dh=Mu,Cs=Au,_7=ms.DESELECTDIM,o1={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},w7=wa.appendArrayPointValue;function T7(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(So.hasText(e)&&(a.text=qA(t,e),a.textSel=s1(t,e,e.selected),a.textUnsel=s1(t,e,e.unselected)),So.hasMarkers(e)&&(a.marker=dm(t,e),a.markerSel=Ph(t,e,e.selected),a.markerUnsel=Ph(t,e,e.unselected),!e.unselected&&sr(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]=_7*n[r]}if(So.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=f1(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(a.errorY=f1(e,e.error_y,i)),e.fill&&e.fill!=="none"&&(a.fill={closed:!0,fill:e.fillcolor,thickness:0}),a}function qA(t,e){var r=t._fullLayout,a=e._length,i=e.textfont,n=e.textposition,o=sr(n)?n:[n],l=i.color,s=i.size,f=i.family,c=i.weight,u=i.style,v=i.variant,h={},d,p=t._context.plotGlPixelRatio,m=e.texttemplate;if(m){h.text=[];var y=r._d3locale,b=Array.isArray(m),_=b?Math.min(m.length,a):a,g=b?function(L){return m[L]}:function(){return m};for(d=0;d<_;d++){var x={i:d},w=e._module.formatLabels(x,e,r),T={};w7(T,e,d);var A=e._meta||{};h.text.push(Oo.texttemplateString(g(d),w,y,T,x,A))}}else sr(e.text)&&e.text.length<a?h.text=e.text.slice():h.text=e.text;if(sr(h.text))for(d=h.text.length;d<a;d++)h.text[d]="";for(h.opacity=e.opacity,h.font={},h.align=[],h.baseline=[],d=0;d<o.length;d++){var M=o[d].split(/\s+/);switch(M[1]){case"left":h.align.push("right");break;case"right":h.align.push("left");break;default:h.align.push(M[1])}switch(M[0]){case"top":h.baseline.push("bottom");break;case"bottom":h.baseline.push("top");break;default:h.baseline.push(M[0])}}if(sr(l))for(h.color=new Array(a),d=0;d<a;d++)h.color[d]=l[d];else h.color=l;if(sr(s)||Array.isArray(f)||sr(c)||Array.isArray(u)||Array.isArray(v))for(h.font=new Array(a),d=0;d<a;d++){var S=h.font[d]={};S.size=(Oo.isTypedArray(s)?s[d]:sr(s)?Qf(s[d])?s[d]:0:s)*p,S.family=Array.isArray(f)?f[d]:f,S.weight=l1(sr(c)?c[d]:c),S.style=Array.isArray(u)?u[d]:u,S.variant=Array.isArray(v)?v[d]:v}else h.font={size:s*p,family:f,weight:l1(c),style:u,variant:v};return h}function l1(t){return t<=1e3?t>500?"bold":"normal":t}function dm(t,e){var r=e._length,a=e.marker,i={},n,o=sr(a.symbol),l=sr(a.angle),s=sr(a.color),f=sr(a.line.color),c=sr(a.opacity),u=sr(a.size),v=sr(a.line.width),h;if(o||(h=Dh.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,m=n1(a,a.opacity,r),y=n1(a.line,a.opacity,r);if(!sr(y[0])){var b=y;for(y=Array(r),n=0;n<r;n++)y[n]=b}if(!sr(m[0])){var _=m;for(m=Array(r),n=0;n<r;n++)m[n]=_}if(!sr(d)){var g=d;for(d=Array(r),n=0;n<r;n++)d[n]=g}if(!sr(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=m,i.borderColors=y,n=0;n<r;n++)o&&(h=Dh.isOpenSymbol(a.symbol[n])),h&&(y[n]=m[n].slice(),m[n]=m[n].slice(),m[n][3]=0);for(i.opacity=e.opacity,i.markers=new Array(r),n=0;n<r;n++)i.markers[n]=v1({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=v1({mx:a.symbol,ma:a.angle},e);var w=1,T=x7(e,w),A;if(u||v){var M=i.sizes=new Array(r),S=i.borderSizes=new Array(r),L=0,z;if(u){for(n=0;n<r;n++)M[n]=T(a.size[n]),L+=M[n];z=L/r}else for(A=T(a.size),n=0;n<r;n++)M[n]=A;if(v)for(n=0;n<r;n++)S[n]=a.line.width[n];else for(A=a.line.width,n=0;n<r;n++)S[n]=A;i.sizeAvg=z}else i.size=T(a&&a.size||10),i.borderSizes=T(a.line.width);return i}function Ph(t,e,r){var a=e.marker,i={};return r&&(r.marker&&r.marker.symbol?i=dm(t,Oo.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 s1(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:Oo.extendFlat({},e.textfont)};r.textfont&&Oo.extendFlat(i.textfont,r.textfont),a=qA(t,i)}return a}function f1(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 c1=Cs.SYMBOL_SDF_SIZE,sn=Cs.SYMBOL_SIZE,u1=Cs.SYMBOL_STROKE,_d={},k7=co.symbolFuncs[0](sn*.05);function v1(t,e){var r=t.mx;if(r==="circle")return null;var a,i,n=co.symbolNumber(r),o=co.symbolFuncs[n%100],l=!!co.symbolNoDot[n%100],s=!!co.symbolNoFill[n%100],f=Dh.isDotSymbol(r);if(t.ma&&(r+="_"+t.ma),_d[r])return _d[r];var c=co.getMarkerAngle(t,e);return f&&!l?a=o(sn*1.1,c)+k7:a=o(sn,c),i=g7(a,{w:c1,h:c1,viewBox:[-sn,-sn,sn,sn],stroke:s?u1:-u1}),_d[r]=i,i||null}function A7(t,e,r){var a=r.length,i=a/2,n,o;if(So.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||So.hasMarkers(e)?"rect":"round";if(f&&e.connectgaps){var u=n[0],v=n[1];for(o=0;o<n.length;o+=2)isNaN(n[o])||isNaN(n[o+1])?(n[o]=u,n[o+1]=v):(u=n[o],v=n[o+1])}return{join:c,positions:n}}function M7(t,e,r,a,i){var n=b7.getComponentMethod("errorbars","makeComputeError"),o=i1.getFromId(t,e.xaxis,"x"),l=i1.getFromId(t,e.yaxis,"y"),s=r.length/2,f={};function c(u,v){var h=v._id.charAt(0),d=e["error_"+h];if(d&&d.visible&&(v.type==="linear"||v.type==="log")){for(var p=n(d),m={x:0,y:1}[h],y={x:[0,1,2,3],y:[2,3,0,1]}[h],b=new Float64Array(4*s),_=1/0,g=-1/0,x=0,w=0;x<s;x++,w+=4){var T=u[x];if(Qf(T)){var A=r[x*2+m],M=p(T,x),S=M[0],L=M[1];if(Qf(S)&&Qf(L)){var z=T-S,N=T+L;b[w+y[0]]=A-v.c2l(z),b[w+y[1]]=v.c2l(N)-A,b[w+y[2]]=0,b[w+y[3]]=0,_=Math.min(_,T-S),g=Math.max(g,T+L)}}}f[h]={positions:r,errors:b,_bnds:[_,g]}}}return c(a,o),c(i,l),f}function S7(t,e,r,a){var i=e._length,n={},o;if(So.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,u=sr(l)?l[o].size:l.size,v=sr(s)?s.length>1?s[o]:s[0]:s,h=sr(f)?f.length>1?f[o]:f[0]:f,d=o1[v],p=o1[h],m=c?c/.8+1:0,y=-p*m-p*.5;n.offset[o]=[d*m/u,y/u]}}return n}var L7={style:T7,markerStyle:dm,markerSelection:Ph,linePositions:A7,errorBarPositions:M7,textPosition:S7},Cf=ke,C7=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(){Cf.extendFlat(a,n,i)},a.init(),a.update=function(l){var s=Cf.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,u=a.scatter2d,v=a.glText,h=a.select2d,d=a.selectBatch,p=a.unselectBatch,m=0;m<l;m++){if(s&&a.fillOrder[m]&&s.draw(a.fillOrder[m]),c&&a.lineOptions[m]&&c.draw(m),f&&(a.errorXOptions[m]&&f.draw(m),a.errorYOptions[m]&&f.draw(m+l)),u&&a.markerOptions[m])if(p[m].length){var y=Cf.repeat([],a.count);y[m]=p[m],u.draw(y)}else d[m].length||u.draw(m);v[m]&&a.textOptions[m]&&v[m].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||Cf.extendFlat(a,i),a},D7=xM,ro=ke,d1=lr,P7=_s.findExtremes,h1=gu,hm=Yp,E7=hm.calcMarkerSize,z7=hm.calcAxisExpansion,R7=hm.setFirstScatter,I7=O2,ao=L7,F7=C7,p1=cr.BADNUM,N7=Au.TOO_MANY_POINTS,$7=function(e,r){var a=e._fullLayout,i=r._xA=d1.getFromId(e,r.xaxis,"x"),n=r._yA=d1.getFromId(e,r.yaxis,"y"),o=a._plots[r.xaxis+r.yaxis],l=r._length,s=l>=N7,f=l*2,c={},u,v=i.makeCalcdata(r,"x"),h=n.makeCalcdata(r,"y"),d=h1(r,i,"x",v),p=h1(r,n,"y",h),m=d.vals,y=p.vals;r._x=m,r._y=y,r.xperiodalignment&&(r._origX=v,r._xStarts=d.starts,r._xEnds=d.ends),r.yperiodalignment&&(r._origY=h,r._yStarts=p.starts,r._yEnds=p.ends);var b=new Array(f),_=new Array(l);for(u=0;u<l;u++)b[u*2]=m[u]===p1?NaN:m[u],b[u*2+1]=y[u]===p1?NaN:y[u],_[u]=u;if(i.type==="log")for(u=0;u<f;u+=2)b[u]=i.c2l(b[u]);if(n.type==="log")for(u=1;u<f;u+=2)b[u]=n.c2l(b[u]);s&&i.type!=="log"&&n.type!=="log"?c.tree=D7(b):c.ids=_,I7(e,r);var g=H7(e,o,r,b,m,y),x=F7(e,o);R7(a,r);var w;return s?g.marker&&(w=g.marker.sizeAvg||Math.max(g.marker.size,3)):w=E7(r,l),z7(e,r,i,n,m,y,w),g.errorX&&m1(r,i,g.errorX),g.errorY&&m1(r,n,g.errorY),g.fill&&!x.fill2d&&(x.fill2d=!0),g.marker&&!x.scatter2d&&(x.scatter2d=!0),g.line&&!x.line2d&&(x.line2d=!0),(g.errorX||g.errorY)&&!x.error2d&&(x.error2d=!0),g.text&&!x.glText&&(x.glText=!0),g.marker&&(g.marker.snap=l),x.lineOptions.push(g.line),x.errorXOptions.push(g.errorX),x.errorYOptions.push(g.errorY),x.fillOptions.push(g.fill),x.markerOptions.push(g.marker),x.markerSelectedOptions.push(g.markerSel),x.markerUnselectedOptions.push(g.markerUnsel),x.textOptions.push(g.text),x.textSelectedOptions.push(g.textSel),x.textUnselectedOptions.push(g.textUnsel),x.selectBatch.push([]),x.unselectBatch.push([]),c._scene=x,c.index=x.count,c.x=m,c.y=y,c.positions=b,x.count++,[{x:!1,y:!1,t:c,trace:r}]};function m1(t,e,r){var a=t._extremes[e._id],i=P7(e,r._bnds,{padded:!0});a.min=a.min.concat(i.min),a.max=a.max.concat(i.max)}function H7(t,e,r,a,i,n){var o=ao.style(t,r);if(o.marker&&(o.marker.positions=a),o.line&&a.length>1&&ro.extendFlat(o.line,ao.linePositions(t,r,a)),o.errorX||o.errorY){var l=ao.errorBarPositions(t,r,a,i,n);o.errorX&&ro.extendFlat(o.errorX,l.x),o.errorY&&ro.extendFlat(o.errorY,l.y)}return o.text&&(ro.extendFlat(o.text,{positions:a},ao.textPosition(t,r,o.text,o.marker)),ro.extendFlat(o.textSel,{positions:a},ao.textPosition(t,r,o.text,o.markerSel)),ro.extendFlat(o.textUnsel,{positions:a},ao.textPosition(t,r,o.text,o.markerUnsel))),o}var y1=ke,O7=yt,j7=ms.DESELECTDIM;function B7(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]||{},u=y1.extendFlat({},s),v,h;if(o.length||l.length){var d=f.color,p=c.color,m=s.color,y=y1.isArrayOrTypedArray(m);for(u.color=new Array(r._length),v=0;v<o.length;v++)h=o[v],u.color[h]=d||(y?m[h]:m);for(v=0;v<l.length;v++){h=l[v];var b=y?m[h]:m;u.color[h]=p||(d?b:O7.addOpacity(b,j7))}}i.glText[n].update(u)}var ZA={styleTextSelection:B7},g1=jr,G7=ZA.styleTextSelection,U7=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,u=s.y,v=s._scene,h=s.index;if(!v)return o;var d=g1.hasText(l),p=g1.hasMarkers(l),m=!p&&!d;if(l.visible!==!0||m)return o;var y=[],b=[];if(r!==!1&&!r.degenerate)for(var _=0;_<f;_++)r.contains([s.xpx[_],s.ypx[_]],!1,_,e)?(y.push(_),o.push({pointNumber:_,x:i.c2d(c[_]),y:n.c2d(u[_])})):b.push(_);if(p){var g=v.scatter2d;if(!y.length&&!b.length){var x=new Array(v.count);x[h]=v.markerOptions[h],g.update.apply(g,x)}else if(!v.selectBatch[h].length&&!v.unselectBatch[h].length){var w=new Array(v.count);w[h]=v.markerUnselectedOptions[h],g.update.apply(g,w)}}return v.selectBatch[h]=y,v.unselectBatch[h]=b,d&&G7(a),o},V7=YO,W7={moduleType:"trace",name:"scattergl",basePlotModule:pr,categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:VA,supplyDefaults:v7,crossTraceDefaults:$2,colorbar:As,formatLabels:h7,calc:$7,hoverPoints:V7.hoverPoints,selectPoints:U7,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(" ")}},KA={exports:{}},b1=yt,X7=function(){},Y7=function(e){for(var r in e)typeof e[r]=="function"&&(e[r]=X7);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=b1.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=b1.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},q7=Y7,Z7=_M,K7=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=Z7({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||uM.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||q7({container:i._glcontainer.node()}),n},x1=AM,_1=kM,Q7=TM,w1=wM,wd=ke,J7=Nn.selectMode,ej=K7,tj=jr,rj=K2,aj=ZA.styleTextSelection,QA={};function ij(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,u=i.w*a,v=i.h*a;return[l+e.domain[0]*u,s+r.domain[0]*v,n-f-(1-e.domain[1])*u,o-c-(1-r.domain[1])*v]}var nj=KA.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=ej(e,["ANGLE_instanced_arrays","OES_element_index_uint"],QA);if(!c){n.init();return}var u=n.count,v=i._glcanvas.data()[0].regl;if(rj(e,r,a),n.dirty){if((n.line2d||n.error2d)&&!(n.scatter2d||n.fill2d||n.glText)&&v.clear({color:!0,depth:!0}),n.error2d===!0&&(n.error2d=Q7(v)),n.line2d===!0&&(n.line2d=_1(v)),n.scatter2d===!0&&(n.scatter2d=x1(v)),n.fill2d===!0&&(n.fill2d=_1(v)),n.glText===!0)for(n.glText=new Array(u),s=0;s<u;s++)n.glText[s]=new w1(v);if(n.glText){if(u>n.glText.length){var h=u-n.glText.length;for(s=0;s<h;s++)n.glText.push(new w1(v))}else if(u<n.glText.length){var d=n.glText.length-u,p=n.glText.splice(u,d);p.forEach(function(k){k.destroy()})}for(s=0;s<u;s++)n.glText[s].update(n.textOptions[s])}if(n.line2d&&(n.line2d.update(n.lineOptions),n.lineOptions=n.lineOptions.map(function(k){if(k&&k.positions){for(var C=k.positions,E=0;E<C.length&&(isNaN(C[E])||isNaN(C[E+1]));)E+=2;for(var I=C.length-2;I>E&&(isNaN(C[I])||isNaN(C[I+1]));)I-=2;k.positions=C.slice(E,I+2)}return k}),n.line2d.update(n.lineOptions)),n.error2d){var m=(n.errorXOptions||[]).concat(n.errorYOptions||[]);n.error2d.update(m)}n.scatter2d&&n.scatter2d.update(n.markerOptions),n.fillOrder=wd.repeat(null,u),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(k,C){var E=a[C];if(!(!k||!E||!E[0]||!E[0].trace)){var I=E[0],j=I.trace,G=I.t,X=n.lineOptions[C],O,Z,V=[];j._ownfill&&V.push(C),j._nexttrace&&V.push(C+1),V.length&&(n.fillOrder[C]=V);var q=[],B=X&&X.positions||G.positions,J,ie;if(j.fill==="tozeroy"){for(J=0;J<B.length&&isNaN(B[J+1]);)J+=2;for(ie=B.length-2;ie>J&&isNaN(B[ie+1]);)ie-=2;B[J+1]!==0&&(q=[B[J],0]),q=q.concat(B.slice(J,ie+2)),B[ie+1]!==0&&(q=q.concat([B[ie],0]))}else if(j.fill==="tozerox"){for(J=0;J<B.length&&isNaN(B[J]);)J+=2;for(ie=B.length-2;ie>J&&isNaN(B[ie]);)ie-=2;B[J]!==0&&(q=[0,B[J+1]]),q=q.concat(B.slice(J,ie+2)),B[ie]!==0&&(q=q.concat([0,B[ie+1]]))}else if(j.fill==="toself"||j.fill==="tonext"){for(q=[],O=0,k.splitNull=!0,Z=0;Z<B.length;Z+=2)(isNaN(B[Z])||isNaN(B[Z+1]))&&(q=q.concat(B.slice(O,Z)),q.push(B[O],B[O+1]),q.push(null,null),O=Z+2);q=q.concat(B.slice(O)),O&&q.push(B[O],B[O+1])}else{var de=j._nexttrace;if(de){var oe=n.lineOptions[C+1];if(oe){var Y=oe.positions;if(j.fill==="tonexty"){for(q=B.slice(),C=Math.floor(Y.length/2);C--;){var ee=Y[C*2],le=Y[C*2+1];isNaN(ee)||isNaN(le)||q.push(ee,le)}k.fill=de.fillcolor}}}}if(j._prevtrace&&j._prevtrace.fill==="tonext"){var ue=n.lineOptions[C-1].positions,me=q.length/2;O=me;var pe=[O];for(Z=0;Z<ue.length;Z+=2)(isNaN(ue[Z])||isNaN(ue[Z+1]))&&(pe.push(Z/2+me+1),O=Z+2);q=q.concat(ue),k.hole=pe}return k.fillmode=j.fill,k.opacity=j.opacity,k.positions=q,k}}),n.fill2d.update(n.fillOptions))}var y=i.dragmode,b=J7(y),_=i.clickmode.indexOf("select")>-1;for(s=0;s<u;s++){var g=a[s][0],x=g.trace,w=g.t,T=w.index,A=x._length,M=w.x,S=w.y;if(x.selectedpoints||b||_){if(b||(b=!0),x.selectedpoints){var L=n.selectBatch[T]=wd.selIndices2selPoints(x),z={};for(f=0;f<L.length;f++)z[L[f]]=1;var N=[];for(f=0;f<A;f++)z[f]||N.push(f);n.unselectBatch[T]=N}var $=w.xpx=new Array(A),R=w.ypx=new Array(A);for(f=0;f<A;f++)$[f]=o.c2p(M[f]),R[f]=l.c2p(S[f])}else w.xpx=w.ypx=null}if(b){if(n.select2d||(n.select2d=x1(i._glcanvas.data()[1].regl)),n.scatter2d){var H=new Array(u);for(s=0;s<u;s++)H[s]=n.selectBatch[s].length||n.unselectBatch[s].length?n.markerUnselectedOptions[s]:{};n.scatter2d.update(H)}n.select2d&&(n.select2d.update(n.markerOptions),n.select2d.update(n.markerSelectedOptions)),n.glText&&a.forEach(function(k){var C=((k||[])[0]||{}).trace||{};tj.hasText(C)&&aj(k)})}else n.scatter2d&&n.scatter2d.update(n.markerOptions);var D={viewport:ij(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]]},P=wd.repeat(D,n.count);n.fill2d&&n.fill2d.update(P),n.line2d&&n.line2d.update(P),n.error2d&&n.error2d.update(P.concat(P)),n.scatter2d&&n.scatter2d.update(P),n.select2d&&n.select2d.update(P),n.glText&&n.glText.forEach(function(k){k.update(D)})}}};nj.reglPrecompiled=QA;var oj=KA.exports,JA=W7;JA.plot=oj;var lj=JA,sj=lj;const LB=$i(sj);var eM={};(function(t){var e=hr;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)}})(eM);var tM={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]},fj=_a,cj=Sr.hovertemplateAttrs,uj=Sr.texttemplateAttrs,vj=In,dj=Wi.attributes,li=ku,T1=tM,Ml=Yt.extendFlat,hj=ta.pattern,pj={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:Ml({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:Ml({},li.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:Ml({},li.marker.line.width,{dflt:1}),editType:"calc"},pattern:hj,editType:"calc"},vj("marker",{colorAttr:"colors",anim:!1})),text:li.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:uj({editType:"plot"},{keys:T1.eventDataKeys.concat(["label","value"])}),hovertext:li.hovertext,hoverinfo:Ml({},fj.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:cj({},{keys:T1.eventDataKeys}),textfont:li.textfont,insidetextorientation:li.insidetextorientation,insidetextfont:li.insidetextfont,outsidetextfont:Ml({},li.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(" ")}),sort:li.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:dj({name:"sunburst",trace:!0,editType:"calc"})},Su={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1},mj=Sr.hovertemplateAttrs,yj=Sr.texttemplateAttrs,gj=In,bj=Wi.attributes,an=ku,va=pj,k1=Su,Td=Yt.extendFlat,xj=ta.pattern,rM={labels:va.labels,parents:va.parents,values:va.values,branchvalues:va.branchvalues,count:va.count,level:va.level,maxdepth:va.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:Td({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:va.marker.colors,pattern:xj,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:va.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the maximum rounding of corners (in px)."].join(" ")},editType:"calc"},gj("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:Td({},an.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},text:an.text,textinfo:va.textinfo,texttemplate:yj({editType:"plot"},{keys:k1.eventDataKeys.concat(["label","value"])}),hovertext:an.hovertext,hoverinfo:va.hoverinfo,hovertemplate:mj({},{keys:k1.eventDataKeys}),textfont:an.textfont,insidetextfont:an.insidetextfont,outsidetextfont:Td({},an.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:an.sort,root:va.root,domain:bj({name:"treemap",trace:!0,editType:"calc"})},aM={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(" ")}},A1=ke,_j=rM,wj=yt,Tj=Wi.defaults,kj=Ln.handleText,Aj=Ss.TEXTPAD,Mj=AA.handleMarkerDefaults,iM=Co,Sj=iM.hasColorscale,Lj=iM.handleDefaults,Cj=function(e,r,a,i){function n(m,y){return A1.coerce(e,r,_j,m,y)}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",A1.isArrayOrTypedArray(c)?"text+label":"label"),n("hovertext"),n("hovertemplate");var u=n("pathbar.visible"),v="auto";kj(e,r,i,n,v,{hasPathbar:u,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),n("textposition");var h=r.textposition.indexOf("bottom")!==-1;Mj(e,r,i,n);var d=r._hasColorscale=Sj(e,"marker","colors")||(e.marker||{}).coloraxis;d?Lj(e,r,i,n,{prefix:"marker.",cLetter:"c"}):n("marker.depthfade",!(r.marker.colors||[]).length);var p=r.textfont.size*2;n("marker.pad.t",h?p/4:p),n("marker.pad.l",p/4),n("marker.pad.r",p/4),n("marker.pad.b",h?p:p/4),n("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:wj.contrast(i.paper_bgcolor)}}},u&&(n("pathbar.thickness",r.pathbar.textfont.size+2*Aj),n("pathbar.side"),n("pathbar.edgeshape")),n("sort"),n("root.color"),Tj(r,i,n),r._length=null},Dj=ke,Pj=aM,Ej=function(e,r){function a(i,n){return Dj.coerce(e,r,Pj,i,n)}a("treemapcolorway",r.colorway),a("extendtreemapcolors")},zc={},nM={};(function(t){var e=zh,r=kt,a=ke,i=Co.makeColorScaleFuncFromTrace,n=Dc.makePullColorFn,o=Dc.generateExtendedColors,l=Co.calc,s=cr.ALMOST_EQUAL,f={},c={},u={};t.calc=function(h,d){var p=h._fullLayout,m=d.ids,y=a.isArrayOrTypedArray(m),b=d.labels,_=d.parents,g=d.values,x=a.isArrayOrTypedArray(g),w=[],T={},A={},M=function(B,J){T[B]?T[B].push(J):T[B]=[J],A[J]=1},S=function(B){return B||typeof B=="number"},L=function(B){return!x||r(g[B])&&g[B]>=0},z,N,$;y?(z=Math.min(m.length,_.length),N=function(B){return S(m[B])&&L(B)},$=function(B){return String(m[B])}):(z=Math.min(b.length,_.length),N=function(B){return S(b[B])&&L(B)},$=function(B){return String(b[B])}),x&&(z=Math.min(z,g.length));for(var R=0;R<z;R++)if(N(R)){var H=$(R),D=S(_[R])?String(_[R]):"",P={i:R,id:H,pid:D,label:S(b[R])?String(b[R]):""};x&&(P.v=+g[R]),w.push(P),M(D,H)}if(T[""]){if(T[""].length>1){for(var E=a.randstr(),I=0;I<w.length;I++)w[I].pid===""&&(w[I].pid=E);w.unshift({hasMultipleRoots:!0,id:E,pid:"",label:""})}}else{var k=[],C;for(C in T)A[C]||k.push(C);if(k.length===1)C=k[0],w.unshift({hasImpliedRoot:!0,id:C,pid:"",label:C});else return a.warn(["Multiple implied roots, cannot build",d.type,"hierarchy of",d.name+".","These roots include:",k.join(", ")].join(" "))}var j;try{j=e.stratify().id(function(B){return B.id}).parentId(function(B){return B.pid})(w)}catch(B){return a.warn(["Failed to build",d.type,"hierarchy of",d.name+".","Error:",B.message].join(" "))}var G=e.hierarchy(j),X=!1;if(x)switch(d.branchvalues){case"remainder":G.sum(function(B){return B.data.v});break;case"total":G.each(function(B){var J=B.data.data,ie=J.v;if(B.children){var de=B.children.reduce(function(oe,Y){return oe+Y.data.data.v},0);if((J.hasImpliedRoot||J.hasMultipleRoots)&&(ie=de),ie<de*s)return X=!0,a.warn(["Total value for node",B.data.data.id,"of",d.name,"is smaller than the sum of its children.",`
|
|
5
|
-
parent value =`,ie,`
|
|
6
|
-
children sum =`,de].join(" "))}B.value=ie});break}else v(G,d,{branches:d.count.indexOf("branches")!==-1,leaves:d.count.indexOf("leaves")!==-1});if(!X){d.sort&&G.sort(function(B,J){return J.value-B.value});var O,Z,V=d.marker.colors||[],q=!!V.length;return d._hasColorscale?(q||(V=x?d.values:d._values),l(h,d,{vals:V,containerStr:"marker",cLetter:"c"}),Z=i(d.marker)):O=n(p["_"+d.type+"colormap"]),G.each(function(B){var J=B.data.data;J.color=d._hasColorscale?Z(V[J.i]):O(V[J.i],J.id)}),w[0].hierarchy=G,w}},t._runCrossTraceCalc=function(h,d){var p=d._fullLayout,m=d.calcdata,y=p[h+"colorway"],b=p["_"+h+"colormap"];p["extend"+h+"colors"]&&(y=o(y,h==="icicle"?u:h==="treemap"?c:f));var _=0,g;function x(M){var S=M.data.data,L=S.id;S.color===!1&&(b[L]?S.color=b[L]:M.parent?M.parent.parent?S.color=M.parent.data.data.color:(b[L]=S.color=y[_%y.length],_++):S.color=g)}for(var w=0;w<m.length;w++){var T=m[w],A=T[0];A.trace.type===h&&A.hierarchy&&(g=A.trace.root.color,A.hierarchy.each(x))}},t.crossTraceCalc=function(h){return t._runCrossTraceCalc("sunburst",h)};function v(h,d,p){var m=0,y=h.children;if(y){for(var b=y.length,_=0;_<b;_++)m+=v(y[_],d,p);p.branches&&m++}else p.leaves&&m++;return h.value=h.data.data.value=m,d._values||(d._values=[]),d._values[h.data.data.i]=m,m}})(nM);var oM=nM;zc.calc=function(t,e){return oM.calc(t,e)};zc.crossTraceCalc=function(t){return oM._runCrossTraceCalc("treemap",t)};var Xi={};(function(t){var e=ke,r=yt,a=Bi,i=Fn;t.findEntryWithLevel=function(s,f){var c;return f&&s.eachAfter(function(u){if(t.getPtId(u)===f)return c=u.copy()}),c||s},t.findEntryWithChild=function(s,f){var c;return s.eachAfter(function(u){for(var v=u.children||[],h=0;h<v.length;h++){var d=v[h];if(t.getPtId(d)===f)return c=u.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 u=c.isTransitioning;if(!u){var v=s.datum();u=c.hideOnRoot&&t.isHierarchyRoot(v)||c.hideOnLeaves&&t.isLeaf(v)}a(s,u?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),weight:t.getOutsideTextFontKey("weight",s,f,c),style:t.getOutsideTextFontKey("style",s,f,c),variant:t.getOutsideTextFontKey("variant",s,f,c),textcase:t.getOutsideTextFontKey("textcase",s,f,c),lineposition:t.getOutsideTextFontKey("lineposition",s,f,c),shadow:t.getOutsideTextFontKey("shadow",s,f,c)}}function o(s,f,c,u){var v=(u||{}).onPathbar,h=f.data.data,d=h.i,p=e.castOption(s,d,(v?"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,u),size:t.getInsideTextFontKey("size",s,f,c,u),weight:t.getInsideTextFontKey("weight",s,f,c,u),style:t.getInsideTextFontKey("style",s,f,c,u),variant:t.getInsideTextFontKey("variant",s,f,c,u),textcase:t.getInsideTextFontKey("textcase",s,f,c,u),lineposition:t.getInsideTextFontKey("lineposition",s,f,c,u),shadow:t.getInsideTextFontKey("shadow",s,f,c,u)}}t.getInsideTextFontKey=function(s,f,c,u,v){var h=(v||{}).onPathbar,d=h?"pathbar.textfont":"insidetextfont",p=c.data.data.i;return e.castOption(f,p,d+"."+s)||e.castOption(f,p,"textfont."+s)||u.size},t.getOutsideTextFontKey=function(s,f,c,u){var v=c.data.data.i;return e.castOption(f,v,"outsidetextfont."+s)||e.castOption(f,v,"textfont."+s)||u.size},t.isOutsideText=function(s,f){return!s._hasColorscale&&t.isHierarchyRoot(f)},t.determineTextFont=function(s,f,c,u){return t.isOutsideText(s,f)?n(s,f,c):o(s,f,c,u)},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 u=f?[c.data[f]]:[c];return t.listPath(c,f).concat(u)},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}})(Xi);var zj=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)},uo=zh,Rj=zj,lM=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"],u;o&&(u=s,s=l,l=u,u=f,f=c,c=u);var v=uo.treemap().tile(Ij(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)&&Rj(v,r,{swapXY:o,flipX:i,flipY:n}),v};function Ij(t,e){switch(t){case"squarify":return uo.treemapSquarify.ratio(e);case"binary":return uo.treemapBinary;case"dice":return uo.treemapDice;case"slice":return uo.treemapSlice;default:return uo.treemapSliceDice}}var Fj=zt,Nj=yt,sM=function(e,r,a,i,n){var o=r.data.data,l=o.i,s=n||o.color;if(l>=0){r.i=o.i;var f=a.marker;f.pattern?(!f.colors||!f.pattern.shape)&&(f.color=s,r.color=s):(f.color=s,r.color=s),Fj.pointStyle(e,a,i,r)}else Nj.fill(e,s)},M1=bt,io=yt,S1=ke,kd=Xi,$j=mi.resizeText,Hj=sM;function Oj(t){var e=t._fullLayout._treemaplayer.selectAll(".trace");$j(t,e,"treemap"),e.each(function(r){var a=M1.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){M1.select(this).call(fM,o,n,t,{hovered:!1})})})}function fM(t,e,r,a,i){var n=(i||{}).hovered,o=e.data.data,l=o.i,s,f,c=o.color,u=kd.isHierarchyRoot(e),v=1;if(n)s=r._hovered.marker.line.color,f=r._hovered.marker.line.width;else if(u&&c===r.root.color)v=100,s="rgba(0,0,0,0)",f=0;else if(s=S1.castOption(r,l,"marker.line.color")||io.defaultLine,f=S1.castOption(r,l,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var h=r.marker.depthfade;if(h){var d=io.combine(io.addOpacity(r._backgroundColor,.75),c),p;if(h===!0){var m=kd.getMaxDepth(r);isFinite(m)?kd.isLeaf(e)?p=0:p=r._maxVisibleLayers-(e.data.depth-r._entryDepth):p=e.data.height+1}else p=e.data.depth-r._entryDepth,r._atRootLevel||p++;if(p>0)for(var y=0;y<p;y++){var b=.5*y/p;c=io.combine(io.addOpacity(d,b),c)}}}t.call(Hj,e,r,a,c).style("stroke-width",f).call(io.stroke,s).style("opacity",v)}var pm={style:Oj,styleOne:fM},no=bt,L1=ot,jj=wa.appendArrayPointValue,Sl=Na,C1=ke,Bj=gs,mr=Xi,Gj=Fn,Uj=Gj.formatPieValue,mm=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 u=function(d){var p=a._fullLayout;if(!(a._dragging||p.hovermode===!1)){var m=a._fullData[l.index],y=d.data.data,b=y.i,_=mr.isHierarchyRoot(d),g=mr.getParent(s,d),x=mr.getValue(d),w=function(j){return C1.castOption(m,b,j)},T=w("hovertemplate"),A=Sl.castHoverinfo(m,p,b),M=p.separators,S;if(T||A&&A!=="none"&&A!=="skip"){var L,z;f&&(L=o.cx+d.pxmid[0]*(1-d.rInscribed),z=o.cy+d.pxmid[1]*(1-d.rInscribed)),c&&(L=d._hoverX,z=d._hoverY);var N={},$=[],R=[],H=function(j){return $.indexOf(j)!==-1};A&&($=A==="all"?m._module.attributes.hoverinfo.flags:A.split("+")),N.label=y.label,H("label")&&N.label&&R.push(N.label),y.hasOwnProperty("v")&&(N.value=y.v,N.valueLabel=Uj(N.value,M),H("value")&&R.push(N.valueLabel)),N.currentPath=d.currentPath=mr.getPath(d.data),H("current path")&&!_&&R.push(N.currentPath);var D,P=[],k=function(){P.indexOf(D)===-1&&(R.push(D),P.push(D))};N.percentParent=d.percentParent=x/mr.getValue(g),N.parent=d.parentString=mr.getPtLabel(g),H("percent parent")&&(D=mr.formatPercent(N.percentParent,M)+" of "+N.parent,k()),N.percentEntry=d.percentEntry=x/mr.getValue(r),N.entry=d.entry=mr.getPtLabel(r),H("percent entry")&&!_&&!d.onPathbar&&(D=mr.formatPercent(N.percentEntry,M)+" of "+N.entry,k()),N.percentRoot=d.percentRoot=x/mr.getValue(s),N.root=d.root=mr.getPtLabel(s),H("percent root")&&!_&&(D=mr.formatPercent(N.percentRoot,M)+" of "+N.root,k()),N.text=w("hovertext")||w("text"),H("text")&&(D=N.text,C1.isValidTextValue(D)&&R.push(D)),S=[Ll(d,m,n.eventDataKeys)];var C={trace:m,y:z,_x0:d._x0,_x1:d._x1,_y0:d._y0,_y1:d._y1,text:R.join("<br>"),name:T||H("name")?m.name:void 0,color:w("hoverlabel.bgcolor")||y.color,borderColor:w("hoverlabel.bordercolor"),fontFamily:w("hoverlabel.font.family"),fontSize:w("hoverlabel.font.size"),fontColor:w("hoverlabel.font.color"),fontWeight:w("hoverlabel.font.weight"),fontStyle:w("hoverlabel.font.style"),fontVariant:w("hoverlabel.font.variant"),nameLength:w("hoverlabel.namelength"),textAlign:w("hoverlabel.align"),hovertemplate:T,hovertemplateLabels:N,eventData:S};f&&(C.x0=L-d.rInscribed*d.rpx1,C.x1=L+d.rInscribed*d.rpx1,C.idealAlign=d.pxmid[0]<0?"left":"right"),c&&(C.x=L,C.idealAlign=L<0?"left":"right");var E=[];Sl.loneHover(C,{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:a,inOut_bbox:E}),S[0].bbox=E[0],l._hasHoverLabel=!0}if(c){var I=e.select("path.surface");n.styleOne(I,d,m,a,{hovered:!0})}l._hasHoverEvent=!0,a.emit("plotly_hover",{points:S||[Ll(d,m,n.eventDataKeys)],event:no.event})}},v=function(d){var p=a._fullLayout,m=a._fullData[l.index],y=no.select(this).datum();if(l._hasHoverEvent&&(d.originalEvent=no.event,a.emit("plotly_unhover",{points:[Ll(y,m,n.eventDataKeys)],event:no.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(Sl.loneUnhover(p._hoverlayer.node()),l._hasHoverLabel=!1),c){var b=e.select("path.surface");n.styleOne(b,y,m,a,{hovered:!1})}},h=function(d){var p=a._fullLayout,m=a._fullData[l.index],y=f&&(mr.isHierarchyRoot(d)||mr.isLeaf(d)),b=mr.getPtId(d),_=mr.isEntry(d)?mr.findEntryWithChild(s,b):mr.findEntryWithLevel(s,b),g=mr.getPtId(_),x={points:[Ll(d,m,n.eventDataKeys)],event:no.event};y||(x.nextLevel=g);var w=Bj.triggerHandler(a,"plotly_"+l.type+"click",x);if(w!==!1&&p.hovermode&&(a._hoverdata=[Ll(d,m,n.eventDataKeys)],Sl.click(a,no.event)),!y&&w!==!1&&!a._dragging&&!a._transitioning){L1.call("_storeDirectGUIEdit",m,p._tracePreGUI[m.uid],{level:m.level});var T={data:[{level:g}],traces:[l.index]},A={frame:{redraw:!1,duration:n.transitionTime},transition:{duration:n.transitionTime,easing:n.transitionEasing},mode:"immediate",fromcurrent:!0};Sl.loneUnhover(p._hoverlayer.node()),L1.call("animate",a,T,A)}};e.on("mouseover",u),e.on("mouseout",v),e.on("click",h)};function Ll(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&&!mr.isHierarchyRoot(t)&&(i.parent=t.parentString),jj(i,e,a.i),i}var D1=bt,Df=ke,P1=zt,Vj=Tr,Wj=lM,E1=pm.styleOne,Ad=Su,oo=Xi,Xj=mm,Md=!0,Yj=function(e,r,a,i,n){var o=n.barDifY,l=n.width,s=n.height,f=n.viewX,c=n.viewY,u=n.pathSlice,v=n.toMoveInsideSlice,h=n.strTransform,d=n.hasTransition,p=n.handleSlicesExit,m=n.makeUpdateSliceInterpolator,y=n.makeUpdateTextInterpolator,b={},_=e._context.staticPlot,g=e._fullLayout,x=r[0],w=x.trace,T=x.hierarchy,A=l/w._entryDepth,M=oo.listPath(a.data,"id"),S=Wj(T.copy(),[l,s],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();S=S.filter(function(z){var N=M.indexOf(z.data.id);return N===-1?!1:(z.x0=A*N,z.x1=A*(N+1),z.y0=o,z.y1=o+s,z.onPathbar=!0,!0)}),S.reverse(),i=i.data(S,oo.getPtId),i.enter().append("g").classed("pathbar",!0),p(i,Md,b,[l,s],u),i.order();var L=i;d&&(L=L.transition().each("end",function(){var z=D1.select(this);oo.setSliceCursor(z,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),L.each(function(z){z._x0=f(z.x0),z._x1=f(z.x1),z._y0=c(z.y0),z._y1=c(z.y1),z._hoverX=f(z.x1-Math.min(l,s)/2),z._hoverY=c(z.y1-s/2);var N=D1.select(this),$=Df.ensureSingle(N,"path","surface",function(P){P.style("pointer-events",_?"none":"all")});d?$.transition().attrTween("d",function(P){var k=m(P,Md,b,[l,s]);return function(C){return u(k(C))}}):$.attr("d",u),N.call(Xj,a,e,r,{styleOne:E1,eventDataKeys:Ad.eventDataKeys,transitionTime:Ad.CLICK_TRANSITION_TIME,transitionEasing:Ad.CLICK_TRANSITION_EASING}).call(oo.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),$.call(E1,z,w,e,{hovered:!1}),z._text=(oo.getPtLabel(z)||"").split("<br>").join(" ")||"";var R=Df.ensureSingle(N,"g","slicetext"),H=Df.ensureSingle(R,"text","",function(P){P.attr("data-notex",1)}),D=Df.ensureUniformFontSize(e,oo.determineTextFont(w,z,g.font,{onPathbar:!0}));H.text(z._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(P1.font,D).call(Vj.convertToTspans,e),z.textBB=P1.bBox(H.node()),z.transform=v(z,{fontSize:D.size,onPathbar:!0}),z.transform.fontSize=D.size,d?H.transition().attrTween("transform",function(P){var k=y(P,Md,b,[l,s]);return function(C){return h(k(C))}}):H.attr("transform",h(z))})},z1=bt,Sd=Y1.interpolate,Li=Xi,Cl=ke,R1=Ss.TEXTPAD,qj=vm,Zj=qj.toMoveInsideBar,Kj=mi,Ld=Kj.recordMinTextSize,Qj=Su,Jj=Yj;function nn(t){return Li.isHierarchyRoot(t)?"":Li.getPtId(t)}var eB=function(e,r,a,i,n){var o=e._fullLayout,l=r[0],s=l.trace,f=s.type,c=f==="icicle",u=l.hierarchy,v=Li.findEntryWithLevel(u,s.level),h=z1.select(a),d=h.selectAll("g.pathbar"),p=h.selectAll("g.slice");if(!v){d.remove(),p.remove();return}var m=Li.isHierarchyRoot(v),y=!o.uniformtext.mode&&Li.hasTransition(i),b=Li.getMaxDepth(s),_=function(Q){return Q.data.depth-v.data.depth<b},g=o._size,x=s.domain,w=g.w*(x.x[1]-x.x[0]),T=g.h*(x.y[1]-x.y[0]),A=w,M=s.pathbar.thickness,S=s.marker.line.width+Qj.gapWithPathbar,L=s.pathbar.visible?s.pathbar.side.indexOf("bottom")>-1?T+S:-(M+S):0,z={x0:A,x1:A,y0:L,y1:L+M},N=function(Q,xe,ae){var ge=s.tiling.pad,Ae=function(Me){return Me-ge<=xe.x0},ce=function(Me){return Me+ge>=xe.x1},De=function(Me){return Me-ge<=xe.y0},Se=function(Me){return Me+ge>=xe.y1};return Q.x0===xe.x0&&Q.x1===xe.x1&&Q.y0===xe.y0&&Q.y1===xe.y1?{x0:Q.x0,x1:Q.x1,y0:Q.y0,y1:Q.y1}:{x0:Ae(Q.x0-ge)?0:ce(Q.x0-ge)?ae[0]:Q.x0,x1:Ae(Q.x1+ge)?0:ce(Q.x1+ge)?ae[0]:Q.x1,y0:De(Q.y0-ge)?0:Se(Q.y0-ge)?ae[1]:Q.y0,y1:De(Q.y1+ge)?0:Se(Q.y1+ge)?ae[1]:Q.y1}},$=null,R={},H={},D=null,P=function(Q,xe){return xe?R[nn(Q)]:H[nn(Q)]},k=function(Q,xe,ae,ge){if(xe)return R[nn(u)]||z;var Ae=H[s.level]||ae;return _(Q)?N(Q,Ae,ge):{}};l.hasMultipleRoots&&m&&b++,s._maxDepth=b,s._backgroundColor=o.paper_bgcolor,s._entryDepth=v.data.depth,s._atRootLevel=m;var C=-w/2+g.l+g.w*(x.x[1]+x.x[0])/2,E=-T/2+g.t+g.h*(1-(x.y[1]+x.y[0])/2),I=function(Q){return C+Q},j=function(Q){return E+Q},G=j(0),X=I(0),O=function(Q){return X+Q},Z=function(Q){return G+Q};function V(Q,xe){return Q+","+xe}var q=O(0),B=function(Q){Q.x=Math.max(q,Q.x)},J=s.pathbar.edgeshape,ie=function(Q){var xe=O(Math.max(Math.min(Q.x0,Q.x0),0)),ae=O(Math.min(Math.max(Q.x1,Q.x1),A)),ge=Z(Q.y0),Ae=Z(Q.y1),ce=M/2,De={},Se={};De.x=xe,Se.x=ae,De.y=Se.y=(ge+Ae)/2;var Me={x:xe,y:ge},He={x:ae,y:ge},Fe={x:ae,y:Ae},Oe={x:xe,y:Ae};return J===">"?(Me.x-=ce,He.x-=ce,Fe.x-=ce,Oe.x-=ce):J==="/"?(Fe.x-=ce,Oe.x-=ce,De.x-=ce/2,Se.x-=ce/2):J==="\\"?(Me.x-=ce,He.x-=ce,De.x-=ce/2,Se.x-=ce/2):J==="<"&&(De.x-=ce,Se.x-=ce),B(Me),B(Oe),B(De),B(He),B(Fe),B(Se),"M"+V(Me.x,Me.y)+"L"+V(He.x,He.y)+"L"+V(Se.x,Se.y)+"L"+V(Fe.x,Fe.y)+"L"+V(Oe.x,Oe.y)+"L"+V(De.x,De.y)+"Z"},de=s[c?"tiling":"marker"].pad,oe=function(Q){return s.textposition.indexOf(Q)!==-1},Y=oe("top"),ee=oe("left"),le=oe("right"),ue=oe("bottom"),me=function(Q){var xe=I(Q.x0),ae=I(Q.x1),ge=j(Q.y0),Ae=j(Q.y1),ce=ae-xe,De=Ae-ge;if(!ce||!De)return"";var Se=s.marker.cornerradius||0,Me=Math.min(Se,ce/2,De/2);Me&&Q.data&&Q.data.data&&Q.data.data.label&&(Y&&(Me=Math.min(Me,de.t)),ee&&(Me=Math.min(Me,de.l)),le&&(Me=Math.min(Me,de.r)),ue&&(Me=Math.min(Me,de.b)));var He=function(Fe,Oe){return Me?"a"+V(Me,Me)+" 0 0 1 "+V(Fe,Oe):""};return"M"+V(xe,ge+Me)+He(Me,-Me)+"L"+V(ae-Me,ge)+He(Me,Me)+"L"+V(ae,Ae-Me)+He(-Me,Me)+"L"+V(xe+Me,Ae)+He(-Me,-Me)+"Z"},pe=function(Q,xe){var ae=Q.x0,ge=Q.x1,Ae=Q.y0,ce=Q.y1,De=Q.textBB,Se=Y||xe.isHeader&&!ue,Me=Se?"start":ue?"end":"middle",He=oe("right"),Fe=oe("left")||xe.onPathbar,Oe=Fe?-1:He?1:0;if(xe.isHeader){if(ae+=(c?de:de.l)-R1,ge-=(c?de:de.r)-R1,ae>=ge){var Ge=(ae+ge)/2;ae=Ge,ge=Ge}var Ze;ue?(Ze=ce-(c?de:de.b),Ae<Ze&&Ze<ce&&(Ae=Ze)):(Ze=Ae+(c?de:de.t),Ae<Ze&&Ze<ce&&(ce=Ze))}var ye=Zj(ae,ge,Ae,ce,De,{isHorizontal:!1,constrained:!0,angle:0,anchor:Me,leftToRight:Oe});return ye.fontSize=xe.fontSize,ye.targetX=I(ye.targetX),ye.targetY=j(ye.targetY),isNaN(ye.targetX)||isNaN(ye.targetY)?{}:(ae!==ge&&Ae!==ce&&Ld(s.type,ye,o),{scale:ye.scale,rotate:ye.rotate,textX:ye.textX,textY:ye.textY,anchorX:ye.anchorX,anchorY:ye.anchorY,targetX:ye.targetX,targetY:ye.targetY})},se=function(Q,xe){for(var ae,ge=0,Ae=Q;!ae&&ge<b;)ge++,Ae=Ae.parent,Ae?ae=P(Ae,xe):ge=b;return ae||{}},be=function(Q,xe,ae,ge){var Ae=P(Q,xe),ce;if(xe)ce=z;else{var De=P(v,xe);De?ce=N(Q,De,ge):ce={}}return Sd(Ae,ce)},Le=function(Q,xe,ae,ge,Ae){var ce=P(Q,xe),De;if(ce)De=ce;else if(xe)De=z;else if($)if(Q.parent){var Se=D||ae;Se&&!xe?De=N(Q,Se,ge):(De={},Cl.extendFlat(De,se(Q,xe)))}else De=Cl.extendFlat({},Q),c&&(Ae.orientation==="h"?Ae.flipX?De.x0=Q.x1:De.x1=0:Ae.flipY?De.y0=Q.y1:De.y1=0);else De={};return Sd(De,{x0:Q.x0,x1:Q.x1,y0:Q.y0,y1:Q.y1})},ve=function(Q,xe,ae,ge){var Ae=P(Q,xe),ce={},De=k(Q,xe,ae,ge);Cl.extendFlat(ce,{transform:pe({x0:De.x0,x1:De.x1,y0:De.y0,y1:De.y1,textBB:Q.textBB,_text:Q._text},{isHeader:Li.isHeader(Q,s)})}),Ae?ce=Ae:Q.parent&&Cl.extendFlat(ce,se(Q,xe));var Se=Q.transform;return Q.x0!==Q.x1&&Q.y0!==Q.y1&&Ld(s.type,Se,o),Sd(ce,{transform:{scale:Se.scale,rotate:Se.rotate,textX:Se.textX,textY:Se.textY,anchorX:Se.anchorX,anchorY:Se.anchorY,targetX:Se.targetX,targetY:Se.targetY}})},Te=function(Q,xe,ae,ge,Ae){var ce=ge[0],De=ge[1];y?Q.exit().transition().each(function(){var Se=z1.select(this),Me=Se.select("path.surface");Me.transition().attrTween("d",function(Fe){var Oe=be(Fe,xe,ae,[ce,De]);return function(Ge){return Ae(Oe(Ge))}});var He=Se.select("g.slicetext");He.attr("opacity",0)}).remove():Q.exit().remove()},we=function(Q){var xe=Q.transform;return Q.x0!==Q.x1&&Q.y0!==Q.y1&&Ld(s.type,xe,o),Cl.getTextTransform({textX:xe.textX,textY:xe.textY,anchorX:xe.anchorX,anchorY:xe.anchorY,targetX:xe.targetX,targetY:xe.targetY,scale:xe.scale,rotate:xe.rotate})};y&&(d.each(function(Q){R[nn(Q)]={x0:Q.x0,x1:Q.x1,y0:Q.y0,y1:Q.y1},Q.transform&&(R[nn(Q)].transform={textX:Q.transform.textX,textY:Q.transform.textY,anchorX:Q.transform.anchorX,anchorY:Q.transform.anchorY,targetX:Q.transform.targetX,targetY:Q.transform.targetY,scale:Q.transform.scale,rotate:Q.transform.rotate})}),p.each(function(Q){H[nn(Q)]={x0:Q.x0,x1:Q.x1,y0:Q.y0,y1:Q.y1},Q.transform&&(H[nn(Q)].transform={textX:Q.transform.textX,textY:Q.transform.textY,anchorX:Q.transform.anchorX,anchorY:Q.transform.anchorY,targetX:Q.transform.targetX,targetY:Q.transform.targetY,scale:Q.transform.scale,rotate:Q.transform.rotate}),!$&&Li.isEntry(Q)&&($=Q)})),D=n(e,r,v,p,{width:w,height:T,viewX:I,viewY:j,pathSlice:me,toMoveInsideSlice:pe,prevEntry:$,makeUpdateSliceInterpolator:Le,makeUpdateTextInterpolator:ve,handleSlicesExit:Te,hasTransition:y,strTransform:we}),s.pathbar.visible?Jj(e,r,v,d,{barDifY:L,width:A,height:M,viewX:O,viewY:Z,pathSlice:ie,toMoveInsideSlice:pe,makeUpdateSliceInterpolator:Le,makeUpdateTextInterpolator:ve,handleSlicesExit:Te,hasTransition:y,strTransform:we}):d.remove()},tB=bt,rB=Xi,aB=mi,iB=aB.clearMinTextSize,nB=Cn.resizeText,I1=eB,oB=function(e,r,a,i,n){var o=n.type,l=n.drawDescendants,s=e._fullLayout,f=s["_"+o+"layer"],c,u,v=!a;if(iB(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&&rB.hasTransition(a)){i&&(u=i());var h=tB.transition().duration(a.duration).ease(a.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});h.each(function(){f.selectAll("g.trace").each(function(d){I1(e,d,this,a,l)})})}else c.each(function(d){I1(e,d,this,a,l)}),s.uniformtext.mode&&nB(e,f.selectAll(".trace"),o);v&&c.exit().remove()},cM={},F1=yt,N1=ke;mi.resizeText;var lB=sM;function sB(t,e,r,a){var i=e.data.data,n=!e.children,o=i.i,l=N1.castOption(r,o,"marker.line.color")||F1.defaultLine,s=N1.castOption(r,o,"marker.line.width")||0;t.call(lB,e,r,a).style("stroke-width",s).call(F1.stroke,l).style("opacity",n?r.leaf.opacity:null)}var fB={styleOne:sB};(function(t){var e=bt,r=zh,a=Y1.interpolate,i=zt,n=ke,o=Tr,l=mi,s=l.recordMinTextSize,f=l.clearMinTextSize,c=$A,u=Fn.getRotationAngle,v=c.computeTransform,h=c.transformInsideText,d=fB.styleOne,p=Cn.resizeText,m=mm,y=tM,b=Xi;t.plot=function(A,M,S,L){var z=A._fullLayout,N=z._sunburstlayer,$,R,H=!S,D=!z.uniformtext.mode&&b.hasTransition(S);if(f("sunburst",z),$=N.selectAll("g.trace.sunburst").data(M,function(k){return k[0].trace.uid}),$.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),$.order(),D){L&&(R=L());var P=e.transition().duration(S.duration).ease(S.easing).each("end",function(){R&&R()}).each("interrupt",function(){R&&R()});P.each(function(){N.selectAll("g.trace").each(function(k){_(A,k,this,S)})})}else $.each(function(k){_(A,k,this,S)}),z.uniformtext.mode&&p(A,z._sunburstlayer.selectAll(".trace"),"sunburst");H&&$.exit().remove()};function _(A,M,S,L){var z=A._context.staticPlot,N=A._fullLayout,$=!N.uniformtext.mode&&b.hasTransition(L),R=e.select(S),H=R.selectAll("g.slice"),D=M[0],P=D.trace,k=D.hierarchy,C=b.findEntryWithLevel(k,P.level),E=b.getMaxDepth(P),I=N._size,j=P.domain,G=I.w*(j.x[1]-j.x[0]),X=I.h*(j.y[1]-j.y[0]),O=.5*Math.min(G,X),Z=D.cx=I.l+I.w*(j.x[1]+j.x[0])/2,V=D.cy=I.t+I.h*(1-j.y[0])-X/2;if(!C)return H.remove();var q=null,B={};$&&H.each(function(ae){B[b.getPtId(ae)]={rpx0:ae.rpx0,rpx1:ae.rpx1,x0:ae.x0,x1:ae.x1,transform:ae.transform},!q&&b.isEntry(ae)&&(q=ae)});var J=g(C).descendants(),ie=C.height+1,de=0,oe=E;D.hasMultipleRoots&&b.isHierarchyRoot(C)&&(J=J.slice(1),ie-=1,de=1,oe+=1),J=J.filter(function(ae){return ae.y1<=oe});var Y=u(P.rotation);Y&&J.forEach(function(ae){ae.x0+=Y,ae.x1+=Y});var ee=Math.min(ie,E),le=function(ae){return(ae-de)/ee*O},ue=function(ae,ge){return[ae*Math.cos(ge),-ae*Math.sin(ge)]},me=function(ae){return n.pathAnnulus(ae.rpx0,ae.rpx1,ae.x0,ae.x1,Z,V)},pe=function(ae){return Z+w(ae)[0]*(ae.transform.rCenter||0)+(ae.transform.x||0)},se=function(ae){return V+w(ae)[1]*(ae.transform.rCenter||0)+(ae.transform.y||0)};H=H.data(J,b.getPtId),H.enter().append("g").classed("slice",!0),$?H.exit().transition().each(function(){var ae=e.select(this),ge=ae.select("path.surface");ge.transition().attrTween("d",function(ce){var De=Te(ce);return function(Se){return me(De(Se))}});var Ae=ae.select("g.slicetext");Ae.attr("opacity",0)}).remove():H.exit().remove(),H.order();var be=null;if($&&q){var Le=b.getPtId(q);H.each(function(ae){be===null&&b.getPtId(ae)===Le&&(be=ae.x1)})}var ve=H;$&&(ve=ve.transition().each("end",function(){var ae=e.select(this);b.setSliceCursor(ae,A,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),ve.each(function(ae){var ge=e.select(this),Ae=n.ensureSingle(ge,"path","surface",function(Fe){Fe.style("pointer-events",z?"none":"all")});ae.rpx0=le(ae.y0),ae.rpx1=le(ae.y1),ae.xmid=(ae.x0+ae.x1)/2,ae.pxmid=ue(ae.rpx1,ae.xmid),ae.midangle=-(ae.xmid-Math.PI/2),ae.startangle=-(ae.x0-Math.PI/2),ae.stopangle=-(ae.x1-Math.PI/2),ae.halfangle=.5*Math.min(n.angleDelta(ae.x0,ae.x1)||Math.PI,Math.PI),ae.ring=1-ae.rpx0/ae.rpx1,ae.rInscribed=x(ae),$?Ae.transition().attrTween("d",function(Fe){var Oe=we(Fe);return function(Ge){return me(Oe(Ge))}}):Ae.attr("d",me),ge.call(m,C,A,M,{eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,A,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:A._transitioning}),Ae.call(d,ae,P,A);var ce=n.ensureSingle(ge,"g","slicetext"),De=n.ensureSingle(ce,"text","",function(Fe){Fe.attr("data-notex",1)}),Se=n.ensureUniformFontSize(A,b.determineTextFont(P,ae,N.font));De.text(t.formatSliceLabel(ae,C,P,M,N)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,Se).call(o.convertToTspans,A);var Me=i.bBox(De.node());ae.transform=h(Me,ae,D),ae.transform.targetX=pe(ae),ae.transform.targetY=se(ae);var He=function(Fe,Oe){var Ge=Fe.transform;return v(Ge,Oe),Ge.fontSize=Se.size,s(P.type,Ge,N),n.getTextTransform(Ge)};$?De.transition().attrTween("transform",function(Fe){var Oe=Q(Fe);return function(Ge){return He(Oe(Ge),Me)}}):De.attr("transform",He(ae,Me))});function Te(ae){var ge=b.getPtId(ae),Ae=B[ge],ce=B[b.getPtId(C)],De;if(ce){var Se=(ae.x1>ce.x1?2*Math.PI:0)+Y;De=ae.rpx1<ce.rpx1?{x0:ae.x0,x1:ae.x1,rpx0:0,rpx1:0}:{x0:Se,x1:Se,rpx0:ae.rpx0,rpx1:ae.rpx1}}else{var Me,He=b.getPtId(ae.parent);H.each(function(ye){if(b.getPtId(ye)===He)return Me=ye});var Fe=Me.children,Oe;Fe.forEach(function(ye,Ve){if(b.getPtId(ye)===ge)return Oe=Ve});var Ge=Fe.length,Ze=a(Me.x0,Me.x1);De={rpx0:O,rpx1:O,x0:Ze(Oe/Ge),x1:Ze((Oe+1)/Ge)}}return a(Ae,De)}function we(ae){var ge=B[b.getPtId(ae)],Ae,ce={x0:ae.x0,x1:ae.x1,rpx0:ae.rpx0,rpx1:ae.rpx1};if(ge)Ae=ge;else if(q)if(ae.parent)if(be){var De=(ae.x1>be?2*Math.PI:0)+Y;Ae={x0:De,x1:De}}else Ae={rpx0:O,rpx1:O},n.extendFlat(Ae,xe(ae));else Ae={rpx0:0,rpx1:0};else Ae={x0:Y,x1:Y};return a(Ae,ce)}function Q(ae){var ge=B[b.getPtId(ae)],Ae,ce=ae.transform;if(ge)Ae=ge;else if(Ae={rpx1:ae.rpx1,transform:{textPosAngle:ce.textPosAngle,scale:0,rotate:ce.rotate,rCenter:ce.rCenter,x:ce.x,y:ce.y}},q)if(ae.parent)if(be){var De=ae.x1>be?2*Math.PI:0;Ae.x0=Ae.x1=De}else n.extendFlat(Ae,xe(ae));else Ae.x0=Ae.x1=Y;else Ae.x0=Ae.x1=Y;var Se=a(Ae.transform.textPosAngle,ae.transform.textPosAngle),Me=a(Ae.rpx1,ae.rpx1),He=a(Ae.x0,ae.x0),Fe=a(Ae.x1,ae.x1),Oe=a(Ae.transform.scale,ce.scale),Ge=a(Ae.transform.rotate,ce.rotate),Ze=ce.rCenter===0?3:Ae.transform.rCenter===0?1/3:1,ye=a(Ae.transform.rCenter,ce.rCenter),Ve=function(Xe){return ye(Math.pow(Xe,Ze))};return function(Xe){var Ie=Me(Xe);He(Xe),Fe(Xe);var tt=Ve(Xe),We=Se(Xe),F={rpx1:Ie,transform:{textPosAngle:We,rCenter:tt,x:ce.x,y:ce.y}};return s(P.type,ce,N),{transform:{targetX:pe(F),targetY:se(F),scale:Oe(Xe),rotate:Ge(Xe),rCenter:tt}}}}function xe(ae){var ge=ae.parent,Ae=B[b.getPtId(ge)],ce={};if(Ae){var De=ge.children,Se=De.indexOf(ae),Me=De.length,He=a(Ae.x0,Ae.x1);ce.x0=He(Se/Me),ce.x1=He(Se/Me)}else ce.x0=ce.x1=0;return ce}}function g(A){return r.partition().size([2*Math.PI,A.height+1])(A)}t.formatSliceLabel=function(A,M,S,L,z){var N=S.texttemplate,$=S.textinfo;if(!N&&(!$||$==="none"))return"";var R=z.separators,H=L[0],D=A.data.data,P=H.hierarchy,k=b.isHierarchyRoot(A),C=b.getParent(P,A),E=b.getValue(A);if(!N){var I=$.split("+"),j=function(de){return I.indexOf(de)!==-1},G=[],X;if(j("label")&&D.label&&G.push(D.label),D.hasOwnProperty("v")&&j("value")&&G.push(b.formatValue(D.v,R)),!k){j("current path")&&G.push(b.getPath(A.data));var O=0;j("percent parent")&&O++,j("percent entry")&&O++,j("percent root")&&O++;var Z=O>1;if(O){var V,q=function(de){X=b.formatPercent(V,R),Z&&(X+=" of "+de),G.push(X)};j("percent parent")&&!k&&(V=E/b.getValue(C),q("parent")),j("percent entry")&&(V=E/b.getValue(M),q("entry")),j("percent root")&&(V=E/b.getValue(P),q("root"))}}return j("text")&&(X=n.castOption(S,D.i,"text"),n.isValidTextValue(X)&&G.push(X)),G.join("<br>")}var B=n.castOption(S,D.i,"texttemplate");if(!B)return"";var J={};D.label&&(J.label=D.label),D.hasOwnProperty("v")&&(J.value=D.v,J.valueLabel=b.formatValue(D.v,R)),J.currentPath=b.getPath(A.data),k||(J.percentParent=E/b.getValue(C),J.percentParentLabel=b.formatPercent(J.percentParent,R),J.parent=b.getPtLabel(C)),J.percentEntry=E/b.getValue(M),J.percentEntryLabel=b.formatPercent(J.percentEntry,R),J.entry=b.getPtLabel(M),J.percentRoot=E/b.getValue(P),J.percentRootLabel=b.formatPercent(J.percentRoot,R),J.root=b.getPtLabel(P),D.hasOwnProperty("color")&&(J.color=D.color);var ie=n.castOption(S,D.i,"text");return(n.isValidTextValue(ie)||ie==="")&&(J.text=ie),J.customdata=n.castOption(S,D.i,"customdata"),n.texttemplateString(B,J,z._d3locale,J,S._meta||{})};function x(A){return A.rpx0===0&&n.isFullCircle([A.x0,A.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(A.halfangle)),A.ring/2))}function w(A){return T(A.rpx1,A.transform.textPosAngle)}function T(A,M){return[A*Math.sin(M),-A*Math.cos(M)]}})(cM);var $1=bt,Pf=ke,H1=zt,cB=Tr,uB=lM,O1=pm.styleOne,Cd=Su,ki=Xi,vB=mm,dB=cM.formatSliceLabel,Dd=!1,hB=function(e,r,a,i,n){var o=n.width,l=n.height,s=n.viewX,f=n.viewY,c=n.pathSlice,u=n.toMoveInsideSlice,v=n.strTransform,h=n.hasTransition,d=n.handleSlicesExit,p=n.makeUpdateSliceInterpolator,m=n.makeUpdateTextInterpolator,y=n.prevEntry,b={},_=e._context.staticPlot,g=e._fullLayout,x=r[0],w=x.trace,T=w.textposition.indexOf("left")!==-1,A=w.textposition.indexOf("right")!==-1,M=w.textposition.indexOf("bottom")!==-1,S=!M&&!w.marker.pad.t||M&&!w.marker.pad.b,L=uB(a,[o,l],{packing:w.tiling.packing,squarifyratio:w.tiling.squarifyratio,flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1,pad:{inner:w.tiling.pad,top:w.marker.pad.t,left:w.marker.pad.l,right:w.marker.pad.r,bottom:w.marker.pad.b}}),z=L.descendants(),N=1/0,$=-1/0;z.forEach(function(k){var C=k.depth;C>=w._maxDepth?(k.x0=k.x1=(k.x0+k.x1)/2,k.y0=k.y1=(k.y0+k.y1)/2):(N=Math.min(N,C),$=Math.max($,C))}),i=i.data(z,ki.getPtId),w._maxVisibleLayers=isFinite($)?$-N+1:0,i.enter().append("g").classed("slice",!0),d(i,Dd,b,[o,l],c),i.order();var R=null;if(h&&y){var H=ki.getPtId(y);i.each(function(k){R===null&&ki.getPtId(k)===H&&(R={x0:k.x0,x1:k.x1,y0:k.y0,y1:k.y1})})}var D=function(){return R||{x0:0,x1:o,y0:0,y1:l}},P=i;return h&&(P=P.transition().each("end",function(){var k=$1.select(this);ki.setSliceCursor(k,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),P.each(function(k){var C=ki.isHeader(k,w);k._x0=s(k.x0),k._x1=s(k.x1),k._y0=f(k.y0),k._y1=f(k.y1),k._hoverX=s(k.x1-w.marker.pad.r),k._hoverY=f(M?k.y1-w.marker.pad.b/2:k.y0+w.marker.pad.t/2);var E=$1.select(this),I=Pf.ensureSingle(E,"path","surface",function(V){V.style("pointer-events",_?"none":"all")});h?I.transition().attrTween("d",function(V){var q=p(V,Dd,D(),[o,l]);return function(B){return c(q(B))}}):I.attr("d",c),E.call(vB,a,e,r,{styleOne:O1,eventDataKeys:Cd.eventDataKeys,transitionTime:Cd.CLICK_TRANSITION_TIME,transitionEasing:Cd.CLICK_TRANSITION_EASING}).call(ki.setSliceCursor,e,{isTransitioning:e._transitioning}),I.call(O1,k,w,e,{hovered:!1}),k.x0===k.x1||k.y0===k.y1?k._text="":C?k._text=S?"":ki.getPtLabel(k)||"":k._text=dB(k,a,w,r,g)||"";var j=Pf.ensureSingle(E,"g","slicetext"),G=Pf.ensureSingle(j,"text","",function(V){V.attr("data-notex",1)}),X=Pf.ensureUniformFontSize(e,ki.determineTextFont(w,k,g.font)),O=k._text||" ",Z=C&&O.indexOf("<br>")===-1;G.text(O).classed("slicetext",!0).attr("text-anchor",A?"end":T||Z?"start":"middle").call(H1.font,X).call(cB.convertToTspans,e),k.textBB=H1.bBox(G.node()),k.transform=u(k,{fontSize:X.size,isHeader:C}),k.transform.fontSize=X.size,h?G.transition().attrTween("transform",function(V){var q=m(V,Dd,D(),[o,l]);return function(B){return v(q(B))}}):G.attr("transform",v(k))}),R},pB=oB,mB=hB,yB=function(e,r,a,i){return pB(e,r,a,i,{type:"treemap",drawDescendants:mB})},gB={moduleType:"trace",name:"treemap",basePlotModule:eM,categories:[],animatable:!0,attributes:rM,layoutAttributes:aM,supplyDefaults:Cj,supplyLayoutDefaults:Ej,calc:zc.calc,crossTraceCalc:zc.crossTraceCalc,plot:yB,style:pm.style,colorbar:As,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(" ")}},bB=gB;const CB=$i(bB);export{TB as P,kB as b,wB as c,AB as h,SB as o,MB as p,LB as s,CB as t};
|
|
7
|
-
//# sourceMappingURL=plotly-ODN7AY4u.js.map
|