@deephaven/code-studio 1.15.1 → 1.15.2-alpha-fetch-variable-def.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.
Files changed (53) hide show
  1. package/build/assets/{AppRoot-yoU6xO7o.js → AppRoot-DwJuOWo6.js} +4 -4
  2. package/build/assets/{AppRoot-yoU6xO7o.js.map → AppRoot-DwJuOWo6.js.map} +1 -1
  3. package/build/assets/{Chart-B-lgYFRk.js → Chart-C1i1ho1y.js} +2 -2
  4. package/build/assets/{Chart-B-lgYFRk.js.map → Chart-C1i1ho1y.js.map} +1 -1
  5. package/build/assets/{ControlType-BXDfYonb.js → ControlType-BEonYtyB.js} +4 -4
  6. package/build/assets/{ControlType-BXDfYonb.js.map → ControlType-BEonYtyB.js.map} +1 -1
  7. package/build/assets/{FormatterUtils-VvugcpnR.js → FormatterUtils-Bg2N5U7m.js} +2 -2
  8. package/build/assets/{FormatterUtils-VvugcpnR.js.map → FormatterUtils-Bg2N5U7m.js.map} +1 -1
  9. package/build/assets/{Grid-BhSfx_MV.js → Grid-Hz5UYdT_.js} +2 -2
  10. package/build/assets/{Grid-BhSfx_MV.js.map → Grid-Hz5UYdT_.js.map} +1 -1
  11. package/build/assets/GridTokenMouseHandler-DHkBdrVc.js +2 -0
  12. package/build/assets/GridTokenMouseHandler-DHkBdrVc.js.map +1 -0
  13. package/build/assets/{IrisGrid-CxxjDqw5.js → IrisGrid-DkGF7p3K.js} +3 -3
  14. package/build/assets/{IrisGrid-CxxjDqw5.js.map → IrisGrid-DkGF7p3K.js.map} +1 -1
  15. package/build/assets/{IrisGridModel-DSlx1u3X.js → IrisGridModel-DoD8cIz5.js} +3 -3
  16. package/build/assets/{IrisGridModel-DSlx1u3X.js.map → IrisGridModel-DoD8cIz5.js.map} +1 -1
  17. package/build/assets/{IrisGridShortcuts-RA3wXust.js → IrisGridShortcuts-DBc8G-3x.js} +2 -2
  18. package/build/assets/{IrisGridShortcuts-RA3wXust.js.map → IrisGridShortcuts-DBc8G-3x.js.map} +1 -1
  19. package/build/assets/{IrisGridThemeProvider-6it02n4x.js → IrisGridThemeProvider-BJrYi5zT.js} +6 -6
  20. package/build/assets/IrisGridThemeProvider-BJrYi5zT.js.map +1 -0
  21. package/build/assets/{LocalWorkspaceStorage-BZKRnSF8.js → LocalWorkspaceStorage-Ddl67eNC.js} +2 -2
  22. package/build/assets/{LocalWorkspaceStorage-BZKRnSF8.js.map → LocalWorkspaceStorage-Ddl67eNC.js.map} +1 -1
  23. package/build/assets/{MarkdownEditor-C2AAm9ih.js → MarkdownEditor-BcHfeFVY.js} +2 -2
  24. package/build/assets/{MarkdownEditor-C2AAm9ih.js.map → MarkdownEditor-BcHfeFVY.js.map} +1 -1
  25. package/build/assets/{MarkdownNotebook-DBOYivNl.js → MarkdownNotebook-Du5g1GaK.js} +2 -2
  26. package/build/assets/{MarkdownNotebook-DBOYivNl.js.map → MarkdownNotebook-Du5g1GaK.js.map} +1 -1
  27. package/build/assets/{MissingPartitionError-uL8lR3Hy.js → MissingPartitionError-Cjrlbi18.js} +2 -2
  28. package/build/assets/{MissingPartitionError-uL8lR3Hy.js.map → MissingPartitionError-Cjrlbi18.js.map} +1 -1
  29. package/build/assets/{MockChartModel-DTdba9NN.js → MockChartModel-B9nKAkLg.js} +2 -2
  30. package/build/assets/{MockChartModel-DTdba9NN.js.map → MockChartModel-B9nKAkLg.js.map} +1 -1
  31. package/build/assets/Plot-D75AfC4O.js +2 -0
  32. package/build/assets/{Plot-Cachc_IP.js.map → Plot-D75AfC4O.js.map} +1 -1
  33. package/build/assets/{Plotly-CqwB2UoY.js → Plotly-CAcUhtAR.js} +2 -2
  34. package/build/assets/{Plotly-CqwB2UoY.js.map → Plotly-CAcUhtAR.js.map} +1 -1
  35. package/build/assets/{StyleGuideRoot-DTTYIKzl.js → StyleGuideRoot-WshrSVsS.js} +2 -2
  36. package/build/assets/{StyleGuideRoot-DTTYIKzl.js.map → StyleGuideRoot-WshrSVsS.js.map} +1 -1
  37. package/build/assets/{index-Pb0fT4BS.js → index-CAjC8rry.js} +4 -4
  38. package/build/assets/{index-Pb0fT4BS.js.map → index-CAjC8rry.js.map} +1 -1
  39. package/build/assets/{index-SLNddBo_.js → index-Nhi6EDbw.js} +3 -3
  40. package/build/assets/{index-SLNddBo_.js.map → index-Nhi6EDbw.js.map} +1 -1
  41. package/build/assets/index-ODecto2-.js +2 -0
  42. package/build/assets/index-ODecto2-.js.map +1 -0
  43. package/build/assets/plotly-Cm_x6xfs.js +7 -0
  44. package/build/assets/{plotly-CJ0h1Bb8.js.map → plotly-Cm_x6xfs.js.map} +1 -1
  45. package/build/index.html +1 -1
  46. package/package.json +31 -31
  47. package/build/assets/GridTokenMouseHandler-Dem4pZ7B.js +0 -2
  48. package/build/assets/GridTokenMouseHandler-Dem4pZ7B.js.map +0 -1
  49. package/build/assets/IrisGridThemeProvider-6it02n4x.js.map +0 -1
  50. package/build/assets/Plot-Cachc_IP.js +0 -2
  51. package/build/assets/index-DZpheLqH.js +0 -2
  52. package/build/assets/index-DZpheLqH.js.map +0 -1
  53. package/build/assets/plotly-CJ0h1Bb8.js +0 -7
@@ -1,7 +0,0 @@
1
- import{g as Si,c as CM}from"./helpers-BosuxZz1.js";import{r as DM,p as PM,a as a_,f as ht,t as Ta,d as ut,g as i_,b as Ul,i as EM,c as n_,e as Fh,h as o_,j as l_,k as s_,m as zM,l as RM,n as IM,o as FM,q as f_,s as $M,u as NM,v as HM,w as OM,x as jM,y as BM,z as GM,A as $h,B as c_}from"./vendor-DJYze3uU.js";var u_={};(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(DM),a=i(PM);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=h();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 p(this,M)}}function p(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 h(){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,$){var N=this;this.p=this.p.then(function(){if(!N.unmounting){if(!N.el)throw new Error("Missing element reference");return x.react(N.el,{data:N.props.data,layout:N.props.layout,config:N.props.config,frames:N.props.frames})}}).then(function(){N.unmounting||(N.syncWindowResize(L),N.syncEventHandlers(),N.figureCallback(z),$&&N.attachUpdateEvents())}).catch(function(I){N.props.onError&&N.props.onError(I)})}},{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,$=this.props.frames&&this.props.frames.length?this.props.frames.length:0,N=!(L.layout===this.props.layout&&L.data===this.props.data&&L.config===this.props.config&&$===z),I=L.revision!==void 0,H=L.revision!==this.props.revision;!N&&(!I||I&&!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,$=z.data,N=z.layout,I=this.el._transitionData?this.el._transitionData._frames:null,H={data:$,layout:N,frames:I};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 $=L.props["on"+z],N=L.handlers[z],I=!!N;$&&!I?L.addEventHandler(z,$):!$&&I?L.removeEventHandler(z):$&&I&&$!==N&&(L.removeEventHandler(z),L.addEventHandler(z,$))})}},{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}})(u_);const h9=Si(u_);var v_={},$c={};$c.version="3.1.0";var d_={exports:{}},Xt={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:"−"},Wt={},Tn=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")},UM=a_.decode,VM=Tn,Nh=Array.isArray,WM=ArrayBuffer,XM=DataView;function h_(t){return WM.isView(t)&&!(t instanceof XM)}Wt.isTypedArray=h_;function rc(t){return Nh(t)||h_(t)}Wt.isArrayOrTypedArray=rc;function YM(t){return!rc(t[0])}Wt.isArray1D=YM;Wt.ensureArray=function(t,e){return Nh(t)||(t=[]),t.length=e,t};var sr={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};sr.uint8c=sr.u1c;sr.uint8=sr.u1;sr.int8=sr.i1;sr.uint16=sr.u2;sr.int16=sr.i2;sr.uint32=sr.u4;sr.int32=sr.i4;sr.float32=sr.f4;sr.float64=sr.f8;function Hh(t){return t.constructor===ArrayBuffer}Wt.isArrayBuffer=Hh;Wt.decodeTypedArraySpec=function(t){var e=[],r=qM(t),a=r.dtype,i=sr[a];if(!i)throw new Error('Error in dtype: "'+a+'"');var n=i.BYTES_PER_ELEMENT,o=r.bdata;Hh(o)||(o=UM(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,p=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,p,u),p+=v;else if(s===3){f=+l[1];for(var d=+l[2],h=0;h<d;h++)for(e[h]=[],c=0;c<f;c++)e[h][c]=new i(o,p,u),p+=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};Wt.isTypedArraySpec=function(t){return VM(t)&&t.hasOwnProperty("dtype")&&typeof t.dtype=="string"&&t.hasOwnProperty("bdata")&&(typeof t.bdata=="string"||Hh(t.bdata))&&(t.shape===void 0||t.hasOwnProperty("shape")&&(typeof t.shape=="string"||typeof t.shape=="number"))};function qM(t){return{bdata:t.bdata,dtype:t.dtype,shape:t.shape}}Wt.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),Nh(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};Wt.maxRowLength=function(t){return p_(t,Math.max,0)};Wt.minRowLength=function(t){return p_(t,Math.min,1/0)};function p_(t,e,r){if(rc(t))if(rc(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 m_=ht,Oh=Wt.isArrayOrTypedArray,jh=function(e,r){if(m_(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"?JM(e,r,a):{set:g_(e,a,r),get:y_(e,a),astr:r,parts:a,obj:e}};function y_(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]=y_(a[s],e.slice(l+1))(r),o[s]!==o[0]&&(n=!1);return n?o[0]:o}if(typeof i=="number"&&!Oh(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 ZM=/(^|\.)args\[/;function zd(t,e){return t===void 0||t===null&&!e.match(ZM)}function g_(t,e,r){return function(a){var i=t,n="",o=zd(a,r),l,s;for(s=0;s<e.length-1;s++){if(l=e[s],typeof l=="number"&&!Oh(i))throw"array index but container is not an array";if(l===-1){if(o=!QM(i,e.slice(s+1),a,r),o)break;return}if(!b_(i,l,e[s+1],o))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";n=KM(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 KM(t,e){var r=e;return m_(e)?r="["+e+"]":t&&(r="."+e),t+r}function QM(t,e,r,a){var i=Oh(r),n=!0,o=r,l=a.replace("-1",0),s=i?!1:zd(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=zd(o,l)),s&&(n=!1),b_(t,c,f,s)&&g_(t[c],e,a.replace("-1",c))(o);return n}function b_(t,e,r,a){if(t[e]===void 0){if(a)return!1;typeof r=="number"?t[e]=[]:t[e]={}}return!0}function JM(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var In=jh,eS=/^\w*$/,tS=0,Am=1,Ps=2,Mm=3,ji=4,rS=function(e,r,a,i){a=a||"name",i=i||"value";var n,o,l,s={};r&&r.length?(l=In(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=eS.test(i),u={set:function(v,p){var d=p===null?ji:tS;if(!o){if(!l||d===ji)return;o=[],l.set(o)}var h=f[v];if(h===void 0){if(d===ji)return;d=d|Mm,h=o.length,f[v]=h}else p!==(c?o[h][i]:In(o[h],i).get())&&(d=d|Ps);var m=o[h]=o[h]||{};return m[a]=v,c?m[i]=p:In(m,i).set(p),p!==null&&(d=d&~ji),s[h]=s[h]|d,u},get:function(v){if(o){var p=f[v];if(p!==void 0)return c?o[p][i]:In(o[p],i).get()}},rename:function(v,p){var d=f[v];return d===void 0||(s[d]=s[d]|Am,f[p]=d,delete f[v],o[d][a]=p),u},remove:function(v){var p=f[v];if(p===void 0)return u;var d=o[p];if(Object.keys(d).length>2)return s[p]=s[p]|Ps,u.set(v,null);if(c){for(n=p;n<o.length;n++)s[n]=s[n]|Mm;for(n=p;n<o.length;n++)f[o[n][a]]--;o.splice(p,1),delete f[v]}else In(d,i).set(null),s[p]=s[p]|Ps|ji;return u},constructUpdate:function(){for(var v,p,d={},h=Object.keys(s),m=0;m<h.length;m++)p=h[m],v=r+"["+p+"]",o[p]?(s[p]&Am&&(d[v+"."+a]=o[p][a]),s[p]&Ps&&(c?d[v+"."+i]=s[p]&ji?null:o[p][i]:d[v+"."+i]=s[p]&ji?null:In(o[p],i).get())):d[v]=null;return d}};return u},aS=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,iS=/^[^\.\[\]]+$/,nS=function(t,e){for(;e;){var r=t.match(aS);if(r)t=r[1];else if(t.match(iS))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},oS=ht,Bh=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 oS(a)||(a=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),a},Sm=Wt.isArrayOrTypedArray,el=Tn,lS=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(Sm(i)&&Sm(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 sS(t,e){var r=t%e;return r<0?r+e:r}function fS(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}var vs={mod:sS,modHalf:fS},x_={},Rt={},Lm=Tn,tl=Array.isArray;function cS(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}Rt.extendFlat=function(){return ds(arguments,!1,!1,!1)};Rt.extendDeep=function(){return ds(arguments,!0,!1,!1)};Rt.extendDeepAll=function(){return ds(arguments,!0,!0,!1)};Rt.extendDeepNoArrays=function(){return ds(arguments,!0,!1,!0)};function ds(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=cS(t[1],i),v)return i;i.splice(0,i.length)}for(var p=1;p<n;p++){o=t[p];for(l in o)s=i[l],f=o[l],a&&tl(f)?i[l]=f:e&&f&&(Lm(f)||(c=tl(f)))?(c?(c=!1,u=s&&tl(s)?s:[]):u=s&&Lm(s)?s:{},i[l]=ds([u,f],e,r,a)):(typeof f<"u"||r)&&(i[l]=f)}return i}var fr=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},Nc={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"},__=Nc,w_=fr,Gh=w_({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});Gh.family.dflt=__.HOVERFONT;Gh.size.dflt=__.HOVERFONTSIZE;var hs={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:Gh,grouptitlefont:w_({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"}},uS=fr,rl=hs.hoverlabel,al=Rt.extendFlat,Hc={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:uS({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"}},vS=fr,dS=Hc,oa={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:vS({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:dS.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(" ")}},hS=Ta,Oc={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)"]]},T_=Oc.RdBu;function pS(t,e){if(e||(e=T_),!t)return e;function r(){try{t=Oc[t]||JSON.parse(t)}catch{t=e}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),k_(t)?t:e}function k_(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||!hS(a[1]).isValid())return!1;e=+a[0]}return!0}function mS(t){return Oc[t]!==void 0?!0:k_(t)}var No={scales:Oc,defaultScale:T_,get:pS,isValid:mS},A_={exports:{}},Tr={};Tr.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Tr.defaultLine="#444";Tr.lightLine="#eee";Tr.background="#fff";Tr.borderLine="#BEC8D9";Tr.lightFraction=100*10/11;var Fr=Ta,yS=ht,gS=Wt.isTypedArray,ir=A_.exports={},jc=Tr;ir.defaults=jc.defaults;var bS=ir.defaultLine=jc.defaultLine;ir.lightLine=jc.lightLine;var Rd=ir.background=jc.background;ir.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"};ir.rgb=function(t){return ir.tinyRGB(Fr(t))};ir.opacity=function(t){return t?Fr(t).getAlpha():0};ir.addOpacity=function(t,e){var r=Fr(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"};ir.combine=function(t,e){var r=Fr(t).toRgb();if(r.a===1)return Fr(t).toRgbString();var a=Fr(e||Rd).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 Fr(n).toRgbString()};ir.interpolate=function(t,e,r){var a=Fr(t).toRgb(),i=Fr(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 Fr(n).toRgbString()};ir.contrast=function(t,e,r){var a=Fr(t);a.getAlpha()!==1&&(a=Fr(ir.combine(t,Rd)));var i=a.isDark()?e?a.lighten(e):Rd:r?a.darken(r):bS;return i.toString()};ir.stroke=function(t,e){var r=Fr(e);t.style({stroke:ir.tinyRGB(r),"stroke-opacity":r.getAlpha()})};ir.fill=function(t,e){var r=Fr(e);t.style({fill:ir.tinyRGB(r),"fill-opacity":r.getAlpha()})};ir.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]=Pu(n[a]);else t[i]=Pu(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]=Pu(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++)ir.clean(n[a])}else n&&typeof n=="object"&&!gS(n)&&ir.clean(n)}};function Pu(t){if(yS(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 ct=A_.exports,ps={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2},Ho={};Ho.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=ht,r=Ta,a=Rt.extendFlat,i=oa,n=No,o=ct,l=ps.DESELECTDIM,s=jh,f=Ho.counter,c=vs.modHalf,u=Wt.isArrayOrTypedArray,v=Wt.isTypedArraySpec,p=Wt.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(h,m,y){m.set(u(h)?h:v(h)?p(h):y)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(h,m,y,b){b.coerceNumber&&(h=+h),b.values.indexOf(h)===-1?m.set(y):m.set(h)},validateFunction:function(h,m){m.coerceNumber&&(h=+h);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(h))return!0}else if(h===y[b])return!0}return!1}},boolean:{description:"A boolean (true/false) value.",requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(h,m,y){h===!0||h===!1?m.set(h):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(h,m,y,b){v(h)&&(h=p(h)),!e(h)||b.min!==void 0&&h<b.min||b.max!==void 0&&h>b.max?m.set(y):m.set(+h)}},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(h,m,y,b){if((b.extras||[]).indexOf(h)!==-1){m.set(h);return}v(h)&&(h=p(h)),h%1||!e(h)||b.min!==void 0&&h<b.min||b.max!==void 0&&h>b.max?m.set(y):m.set(+h)}},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(h,m,y,b){if(typeof h!="string"){var _=typeof h=="number";b.strict===!0||!_?m.set(y):m.set(String(h))}else b.noBlank&&!h?m.set(y):m.set(h)}},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(h,m,y){v(h)&&(h=p(h)),r(h).isValid()?m.set(h):m.set(y)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(h,m,y){function b(_){return r(_).isValid()}!Array.isArray(h)||!h.length?m.set(y):h.every(b)?m.set(h):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(h,m,y){m.set(n.get(h,y))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(h,m,y){v(h)&&(h=p(h)),h==="auto"?m.set("auto"):e(h)?m.set(c(+h,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(h,m,y,b){var _=b.regex||f(y);if(typeof h=="string"&&_.test(h)){m.set(h);return}m.set(y)},validateFunction:function(h,m){var y=m.dflt;return h===y?!0:typeof h!="string"?!1:!!f(y).test(h)}},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(h,m,y,b){if((b.extras||[]).indexOf(h)!==-1){m.set(h);return}if(typeof h!="string"){m.set(y);return}for(var _=h.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(h,m,y){h===void 0?m.set(y):m.set(v(h)?p(h):h)}},info_array:{description:["An {array} of plot information."].join(" "),requiredOpts:["items"],otherOpts:["dflt","freeLength","dimensions"],coerceFunction:function(h,m,y,b){function _(D,E,k){var C,P={set:function(F){C=F}};return k===void 0&&(k=E.dflt),t.valObjectMeta[E.valType].coerceFunction(D,P,k,E),C}if(v(h)&&(h=p(h)),!u(h)){m.set(y);return}var g=b.dimensions===2||b.dimensions==="1-2"&&Array.isArray(h)&&u(h[0]),x=b.items,w=[],T=Array.isArray(x),A=T&&g&&u(x[0]),M=g&&T&&!A,S=T&&!M?x.length:h.length,L,z,$,N,I,H;if(y=Array.isArray(y)?y:[],g)for(L=0;L<S;L++)for(w[L]=[],$=u(h[L])?h[L]:[],M?I=x.length:T?I=x[L].length:I=$.length,z=0;z<I;z++)M?N=x[z]:T?N=x[L][z]:N=x,H=_($[z],N,(y[L]||[])[z]),H!==void 0&&(w[L][z]=H);else for(L=0;L<S;L++)H=_(h[L],T?x[L]:x,y[L]),H!==void 0&&(w[L]=H);m.set(w)},validateFunction:function(h,m){if(!u(h))return!1;var y=m.items,b=Array.isArray(y),_=m.dimensions===2;if(!m.freeLength&&h.length!==y.length)return!1;for(var g=0;g<h.length;g++)if(_){if(!u(h[g])||!m.freeLength&&h[g].length!==y[g].length)return!1;for(var x=0;x<h[g].length;x++)if(!d(h[g][x],b?y[g][x]:y))return!1}else if(!d(h[g],b?y[g]:y))return!1;return!0}}},t.coerce=function(h,m,y,b,_){var g=s(y,b).get(),x=s(h,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=p(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(h,m,y,b,_){var g=s(h,b),x=t.coerce(h,m,y,b,_),w=g.get();return w!=null?x:!1},t.coerceFont=function(h,m,y,b){b||(b={}),y=a({},y),y=a(y,b.overrideDflt||{});var _={family:h(m+".family",y.family),size:h(m+".size",y.size),color:h(m+".color",y.color),weight:h(m+".weight",y.weight),style:h(m+".style",y.style)};if(b.noFontVariant||(_.variant=h(m+".variant",y.variant)),b.noFontLineposition||(_.lineposition=h(m+".lineposition",y.lineposition)),b.noFontTextcase||(_.textcase=h(m+".textcase",y.textcase)),!b.noFontShadow){var g=y.shadow;g==="none"&&b.autoShadowDflt&&(g="auto"),_.shadow=h(m+".shadow",g)}return _},t.coercePattern=function(h,m,y,b){var _=h(m+".shape"),g;if(_||(g=h(m+".path")),_||g){_&&h(m+".solidity"),h(m+".size");var x=h(m+".fillmode"),w=x==="overlay";if(!b){var T=h(m+".bgcolor",w?y:void 0);h(m+".fgcolor",w?o.contrast(T):y)}h(m+".fgopacity",w?.5:1)}},t.coerceHoverinfo=function(h,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(h,m,_,"hoverinfo",x)},t.coerceSelectionMarkerOpacity=function(h,m){if(h.marker){var y=h.marker.opacity;if(y!==void 0){var b,_;!u(y)&&!h.selected&&!h.unselected&&(b=y,_=l*y),m("selected.marker.opacity",b),m("unselected.marker.opacity",_)}}};function d(h,m){var y=t.valObjectMeta[m.valType];if(m.arrayOk&&u(h))return!0;if(y.validateFunction)return y.validateFunction(h,m);var b={},_=b,g={set:function(x){_=x}};return y.coerceFunction(h,g,b,m),_!==b}t.validate=d})(x_);var M_={},S_={exports:{}},L_={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(" ")}},C_={};function D_(t,e){for(var r in t){var a=t[r];a.valType?e[r]=a.dflt:(e[r]||(e[r]={}),D_(a,e[r]))}}D_(L_,C_);var Oo={configAttributes:L_,dfltConfig:C_},Eu=ut,xS=ht,il=[],P_=function(t,e){if(il.indexOf(t)!==-1)return;il.push(t);var r=1e3;xS(e)?r=e:e==="long"&&(r=3e3);var a=Eu.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(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),Eu.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=Eu.select(this);l.append("button").classed("notifier-close",!0).html("&times;").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)})},Ao=Oo.dfltConfig,Uh=P_,Vh=S_.exports={};Vh.log=function(){var t;if(Ao.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Ao.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Uh(r.join("<br>"),"long")}};Vh.warn=function(){var t;if(Ao.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Ao.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Uh(r.join("<br>"),"stick")}};Vh.error=function(){var t;if(Ao.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(Ao.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Uh(r.join("<br>"),"stick")}};var jo=S_.exports,Je={},Wh=function(){},E_=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},Bc={};(function(t){var e=i_;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]]]}})(Bc);var _S=ut,Cm=jo,wS=Bc,TS=i_;function kS(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 AS(t){var e=_S.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")}function z_(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function MS(t,e){R_("global",t,e)}function R_(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):Cm.warn("addStyleRule failed"):Cm.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function SS(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&z_(r)}function LS(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 CS(t){var e=F_(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=I_(a);if(i){var n=wS.convertCssMatrix(i);r=TS.multiply(r,r,n)}}),r}function I_(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 F_(t){for(var e=[];DS(t);)e.push(t),t=t.parentNode,typeof ShadowRoot=="function"&&t instanceof ShadowRoot&&(t=t.host);return e}function DS(t){return t&&(t instanceof Element||t instanceof HTMLElement)}function PS(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}var Gc={getGraphDiv:kS,isPlotDiv:AS,removeElement:z_,addStyleRule:MS,addRelatedStyleRule:R_,deleteRelatedStyleRule:SS,setStyleOnHover:LS,getFullTransformMatrix:CS,getElementTransformMatrix:I_,getElementAndAncestors:F_,equalDomRects:PS},Uc={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(" ")}}},$_=Rt.extendFlat,ES=Tn,N_={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(" ")},H_={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(" ")},zS=N_.flags.slice().concat(["fullReplot"]),RS=H_.flags.slice().concat("layoutReplot"),Na={traces:N_,layout:H_,traceFlags:function(){return Dm(zS)},layoutFlags:function(){return Dm(RS)},update:function(t,e){var r=e.editType;if(r&&r!=="none")for(var a=r.split("+"),i=0;i<a.length;i++)t[a[i]]=!0},overrideAll:O_};function Dm(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function O_(t,e,r){var a=$_({},t);for(var i in a){var n=a[i];ES(n)&&(a[i]=j_(n,e,r,i))}return r==="from-root"&&(a.editType=e),a}function j_(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]=j_(t.items[n],e)}return i}else return O_(t,e,a.charAt(0)==="_"?"nested":"from-root")}var $r={};$r.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(" ")};$r.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 cr={},B_={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"},G_=B_,U_=G_.FORMAT_LINK,V_=G_.DATE_FORMAT_LINK;function Xh(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}".`,U_,"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}".`,V_,"for details on the date formatting syntax."].join(" ")}cr.templateFormatStringDescription=Xh;function IS(){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`,U_,"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`,V_,"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 Yh(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}cr.hovertemplateAttrs=function(t,e){t=t||{},e=e||{};var r=Yh(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`.",Xh({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};cr.texttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=Yh(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`.",Xh(),"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};cr.shapeTexttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=t.newshape?"new ":"",a=Yh(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`.",IS(),a].join(" ")};return i};function ki(t,e){return e?e.d2l(t):t}function W_(t,e){return e?e.l2d(t):t}function FS(t){return t.x0}function $S(t){return t.x1}function NS(t){return t.y0}function HS(t){return t.y1}function X_(t){return t.x0shift||0}function Y_(t){return t.x1shift||0}function q_(t){return t.y0shift||0}function Z_(t){return t.y1shift||0}function Vc(t,e){return ki(t.x1,e)+Y_(t)-ki(t.x0,e)-X_(t)}function Wc(t,e,r){return ki(t.y1,r)+Z_(t)-ki(t.y0,r)-q_(t)}function OS(t,e){return Math.abs(Vc(t,e))}function jS(t,e,r){return Math.abs(Wc(t,e,r))}function BS(t,e,r){return t.type!=="line"?void 0:Math.sqrt(Math.pow(Vc(t,e),2)+Math.pow(Wc(t,e,r),2))}function GS(t,e){return W_((ki(t.x1,e)+Y_(t)+ki(t.x0,e)+X_(t))/2,e)}function US(t,e,r){return W_((ki(t.y1,r)+Z_(t)+ki(t.y0,r)+q_(t))/2,r)}function VS(t,e,r){return t.type!=="line"?void 0:Wc(t,e,r)/Vc(t,e)}var qh={x0:FS,x1:$S,y0:NS,y1:HS,slope:VS,dx:Vc,dy:Wc,width:OS,height:jS,length:BS,xcenter:GS,ycenter:US},WS=Na.overrideAll,Bi=oa,Pm=fr,XS=$r.dash,li=Rt.extendFlat,YS=cr.shapeTexttemplateAttrs,qS=qh,ZS=WS({newshape:{visible:li({},Bi.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:li({},Bi.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:li({},Bi.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:li({},Bi.legendgrouptitle.text,{}),font:Pm({description:["Sets this legend group's title font."].join(" ")})},legendrank:li({},Bi.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:li({},Bi.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:li({},XS,{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:li({},Bi.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:YS({newshape:!0},{keys:Object.keys(qS)}),font:Pm({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"),KS=$r.dash,QS=Rt.extendFlat,JS={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:QS({},KS,{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"}},Zh=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}},Id=fr,eL=Uc,If=Tr,Em=ZS,zm=JS,tL=Zh,Rm=Rt.extendFlat,Xc=Id({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});Xc.family.dflt='"Open Sans", verdana, arial, sans-serif';Xc.size.dflt=12;Xc.color.dflt=If.defaultLine;var ms={font:Xc,title:{text:{valType:"string",editType:"layoutstyle",description:"Sets the plot's title."},font:Id({editType:"layoutstyle",description:"Sets the title font."}),subtitle:{text:{valType:"string",editType:"layoutstyle",description:"Sets the plot's subtitle."},font:Id({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:Rm(tL({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:If.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:If.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:If.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:Em.newshape,activeshape:Em.activeshape,newselection:zm.newselection,activeselection:zm.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:Rm({},eL.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"})};(function(t){var e=jo,r=Wh,a=E_,i=Tn,n=Gc.addStyleRule,o=Rt,l=oa,s=ms,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":p(T);break;case"locale":h(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 $=L.constants.styleRules;for(var N in $)n(".js-plotly-plot .plotly .mapboxgl-"+N,$[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 p(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 h(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 $=L[w];$||(L[w]=$={}),M&&$.dictionary===z.dictionary&&($.dictionary=T),S&&$.format===z.format&&($.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}})(Je);(function(t){var e=Ul.timeFormat,r=ht,a=jo,i=vs.mod,n=Xt,o=n.BADNUM,l=n.ONEDAY,s=n.ONEHOUR,f=n.ONEMIN,c=n.ONESEC,u=n.EPOCHJD,v=Je,p=Ul.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,h=/^\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,E){var k=b(D,!!E);if(E<2)return k;var C=t.dateTime2ms(k,D);return C+=l*(E-1),t.ms2DateTime(C,0,D)};function b(D,E){return y(D)?E?v.getComponentMethod("calendars","CANONICAL_SUNDAY")[D]:v.getComponentMethod("calendars","CANONICAL_TICK")[D]:E?"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,E){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 P=3*f;k=k-P/2+i(C-k+P/2,P)}return D=Number(D)-k,D>=_&&D<=g?D:o}if(typeof D!="string"&&typeof D!="number")return o;D=String(D);var F=y(E),j=D.charAt(0);F&&(j==="G"||j==="g")&&(D=D.substr(1),E="");var G=F&&E.substr(0,7)==="chinese",X=D.match(G?h:d);if(!X)return o;var O=X[1],Z=X[3]||"1",W=Number(X[5]||1),Y=Number(X[7]||0),B=Number(X[9]||0),Q=Number(X[11]||0);if(F){if(O.length===2)return o;O=Number(O);var ee;try{var se=v.getComponentMethod("calendars","getCal")(E);if(G){var oe=Z.charAt(Z.length-1)==="i";Z=parseInt(Z,10),ee=se.newDate(O,se.toMonthIndex(O,Z,oe),W)}else ee=se.newDate(O,Number(Z),W)}catch{return o}return ee?(ee.toJD()-u)*l+Y*s+B*f+Q*c:o}O.length===2?O=(Number(O)+2e3-m)%100+m:O=Number(O),Z-=1;var fe=new Date(Date.UTC(2e3,Z,W,Y,B));return fe.setUTCFullYear(O),fe.getUTCMonth()!==Z||fe.getUTCDate()!==W?o:fe.getTime()+Q*c},_=t.MIN_MS=t.dateTime2ms("-9999"),g=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(D,E){return t.dateTime2ms(D,E)!==o};function x(D,E){return String(D+Math.pow(10,E)).substr(1)}var w=90*l,T=3*s,A=5*f;t.ms2DateTime=function(D,E,k){if(typeof D!="number"||!(D>=_&&D<=g))return o;E||(E=0);var C=Math.floor(i(D+.05,1)*10),P=Math.round(D-C/10),F,j,G,X,O,Z;if(y(k)){var W=Math.floor(P/l)+u,Y=Math.floor(i(D,l));try{F=v.getComponentMethod("calendars","getCal")(k).fromJD(W).formatDate("yyyy-mm-dd")}catch{F=p("G%Y-%m-%d")(new Date(P))}if(F.charAt(0)==="-")for(;F.length<11;)F="-0"+F.substr(1);else for(;F.length<10;)F="0"+F;j=E<w?Math.floor(Y/s):0,G=E<w?Math.floor(Y%s/f):0,X=E<T?Math.floor(Y%f/c):0,O=E<A?Y%c*10+C:0}else Z=new Date(P),F=p("%Y-%m-%d")(Z),j=E<w?Z.getUTCHours():0,G=E<w?Z.getUTCMinutes():0,X=E<T?Z.getUTCSeconds():0,O=E<A?Z.getUTCMilliseconds()*10+C:0;return M(F,j,G,X,O)},t.ms2DateTimeLocal=function(D){if(!(D>=_+l&&D<=g-l))return o;var E=Math.floor(i(D+.05,1)*10),k=new Date(Math.round(D-E/10)),C=e("%Y-%m-%d")(k),P=k.getHours(),F=k.getMinutes(),j=k.getSeconds(),G=k.getUTCMilliseconds()*10+E;return M(C,P,F,j,G)};function M(D,E,k,C,P){if((E||k||C||P)&&(D+=" "+x(E,2)+":"+x(k,2),(C||P)&&(D+=":"+x(C,2),P))){for(var F=4;P%10===0;)F-=1,P/=10;D+="."+x(P,F)}return D}t.cleanDate=function(D,E,k){if(D===o)return E;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),E;if(D=t.ms2DateTimeLocal(+D),!D&&E!==void 0)return E}else if(!t.isDateTime(D,k))return a.error("unrecognized date",D),E;return D};var S=/%\d?f/g,L=/%h/g,z={1:"1",2:"1",3:"2",4:"2"};function $(D,E,k,C){D=D.replace(S,function(F){var j=Math.min(+F.charAt(1)||6,6),G=(E/1e3%1+2).toFixed(j).substr(2).replace(/0+$/,"")||"0";return G});var P=new Date(Math.floor(E+.05));if(D=D.replace(L,function(){return z[k("%q")(P)]}),y(C))try{D=v.getComponentMethod("calendars","worldCalFmt")(D,E,C)}catch{return"Invalid"}return k(D)(P)}var N=[59,59.9,59.99,59.999,59.9999];function I(D,E){var k=i(D+.05,l),C=x(Math.floor(k/s),2)+":"+x(i(Math.floor(k/f),60),2);if(E!=="M"){r(E)||(E=0);var P=Math.min(i(D/c,60),N[E]),F=(100+P).toFixed(E).substr(1);E>0&&(F=F.replace(/0+$/,"").replace(/[\.]$/,"")),C+=":"+F}return C}t.formatDate=function(D,E,k,C,P,F){if(P=y(P)&&P,!E)if(k==="y")E=F.year;else if(k==="m")E=F.month;else if(k==="d")E=F.dayMonth+`
2
- `+F.year;else return I(D,k)+`
3
- `+$(F.dayMonthYear,D,C,P);return $(E,D,C,P)};var H=3*l;t.incrementMonth=function(D,E,k){k=y(k)&&k;var C=i(D,l);if(D=Math.round(D-C),k)try{var P=Math.round(D/l)+u,F=v.getComponentMethod("calendars","getCal")(k),j=F.fromJD(P);return E%12?F.add(j,E,"m"):F.add(j,E/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()+E)+C-H},t.findExactDates=function(D,E){for(var k=0,C=0,P=0,F=0,j,G,X=y(E)&&v.getComponentMethod("calendars","getCal")(E),O=0;O<D.length;O++){if(G=D[O],!r(G)){F++;continue}if(!(G%l))if(X)try{j=X.fromJD(G/l+u),j.day()===1?j.month()===1?k++:C++:P++}catch{}else j=new Date(G),j.getUTCDate()===1?j.getUTCMonth()===0?k++:C++:P++}C+=k,P+=C;var Z=D.length-F;return{exactYears:k/Z,exactMonths:C/Z,exactDays:P/Z}}})(M_);var Kh={},K_=function(e){return e};(function(t){var e=ht,r=jo,a=K_,i=Xt.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 p=0,d=u.length,h=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);p<d&&h++<100;)y=Math.floor((p+d)/2),b(u[y],c)?p=y+1:d=y;return h>90&&r.log("Long binary search..."),p-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 p=u[v]-u[0]||1,d=p/(v||1)/1e4,h=[],m,y=0;y<=v;y++){var b=u[y],_=b-m;m===void 0?(h.push(b),m=b):_>d&&(p=Math.min(p,_),h.push(b),m=b)}return{vals:h,minDiff:p}},t.roundUp=function(c,u,v){for(var p=0,d=u.length-1,h,m=0,y=v?0:1,b=v?1:0,_=v?Math.ceil:Math.floor;p<d&&m++<100;)h=_((p+d)/2),u[h]<=c?p=h+y:d=h-b;return u[p]},t.sort=function(c,u){for(var v=0,p=0,d=1;d<c.length;d++){var h=u(c[d],c[d-1]);if(h<0?v=1:h>0&&(p=1),v&&p)return c.sort(u)}return p?c:c.reverse()},t.findIndexOfMin=function(c,u){u=u||a;for(var v=1/0,p,d=0;d<c.length;d++){var h=u(c[d]);h<v&&(v=h,p=d)}return p}})(Kh);var Qh=function(e){return Object.keys(e).sort()},Q_={};(function(t){var e=ht,r=Wt.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)]}})(Q_);var J_=vs,zu=J_.mod,rL=J_.modHalf,Vl=Math.PI,gi=2*Vl;function aL(t){return t/180*Vl}function iL(t){return t/Vl*180}function Jh(t){return Math.abs(t[1]-t[0])>gi-1e-14}function ew(t,e){return rL(e-t,gi)}function nL(t,e){return Math.abs(ew(t,e))}function tw(t,e){if(Jh(e))return!0;var r,a;e[0]<e[1]?(r=e[0],a=e[1]):(r=e[1],a=e[0]),r=zu(r,gi),a=zu(a,gi),r>a&&(a+=gi);var i=zu(t,gi),n=i+gi;return i>=r&&i<=a||n>=r&&n<=a}function oL(t,e,r,a){if(!tw(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 ep(t,e,r,a,i,n,o){i=i||0,n=n||0;var l=Jh([r,a]),s,f,c,u,v;l?(s=0,f=Vl,c=gi):r<a?(s=r,c=a):(s=a,c=r),t<e?(u=t,v=e):(u=e,v=t);function p(y,b){return[y*Math.cos(b)+i,n-y*Math.sin(b)]}var d=Math.abs(c-s)<=Vl?0:1;function h(y,b,_){return"A"+[y,y]+" "+[0,d,_]+" "+p(y,b)}var m;return l?u===null?m="M"+p(v,s)+h(v,f,0)+h(v,c,0)+"Z":m="M"+p(u,s)+h(u,f,0)+h(u,c,0)+"ZM"+p(v,s)+h(v,f,1)+h(v,c,1)+"Z":u===null?(m="M"+p(v,s)+h(v,c,0),o&&(m+="L0,0Z")):m="M"+p(u,s)+"L"+p(v,s)+h(v,c,0)+"L"+p(u,c)+h(u,s,1)+"Z",m}function lL(t,e,r,a,i){return ep(null,t,e,r,a,i,0)}function sL(t,e,r,a,i){return ep(null,t,e,r,a,i,1)}function fL(t,e,r,a,i,n){return ep(t,e,r,a,i,n,1)}var cL={deg2rad:aL,rad2deg:iL,angleDelta:ew,angleDist:nL,isFullCircle:Jh,isAngleInsideSector:tw,isPtInsideSector:oL,pathArc:lL,pathSector:sL,pathAnnulus:fL},kn={};kn.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=1/3};kn.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>1/3&&e.x<2/3};kn.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=2/3};kn.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=2/3};kn.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>1/3&&e.y<2/3};kn.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=1/3};var An={},Ru=vs.mod;An.segmentsIntersect=rw;function rw(t,e,r,a,i,n,o,l){var s=r-t,f=i-t,c=o-i,u=a-e,v=n-e,p=l-n,d=s*p-c*u;if(d===0)return null;var h=(f*p-c*v)/d,m=(f*u-s*v)/d;return m<0||m>1||h<0||h>1?null:{x:t+s*h,y:e+u*h}}An.segmentDistance=function(e,r,a,i,n,o,l,s){if(rw(e,r,a,i,n,o,l,s))return 0;var f=a-e,c=i-r,u=l-n,v=s-o,p=f*f+c*c,d=u*u+v*v,h=Math.min(Es(f,c,p,n-e,o-r),Es(f,c,p,l-e,s-r),Es(u,v,d,e-n,r-o),Es(u,v,d,a-n,i-o));return Math.sqrt(h)};function Es(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 zs,Fd,Im;An.getTextLocation=function(e,r,a,i){if((e!==Fd||i!==Im)&&(zs={},Fd=e,Im=i),zs[a])return zs[a];var n=e.getPointAtLength(Ru(a-i/2,r)),o=e.getPointAtLength(Ru(a+i/2,r)),l=Math.atan((o.y-n.y)/(o.x-n.x)),s=e.getPointAtLength(Ru(a,r)),f=(s.x*4+n.x+o.x)/6,c=(s.y*4+n.y+o.y)/6,u={x:f,y:c,theta:l};return zs[a]=u,u};An.clearLocationCache=function(){Fd=null};An.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 p(h){var m=e.getPointAtLength(h);h===0?u=m:h===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=p(s);d;){if(s+=d+a,s>c)return;d=p(s)}for(d=p(c);d;){if(c-=d+a,s>c)return;d=p(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}};An.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,p,d;f<l;){if(v=(c+u)/2,p=e.getPointAtLength(v),d=p[a]-r,Math.abs(d)<o)return p;s*d>0?u=v:c=v,f++}return p};var Yc={};(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)}})(Yc);var uL=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)},vL=ht,dL=EM,hL=function(e){var r;if(e&&e.hasOwnProperty("userAgent")?r=e.userAgent:r=pL(),typeof r!="string")return!0;var a=dL({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(vL(f)&&(f=+f),f>=13)return!0}}}return a};function pL(){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 mL=ut,yL=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]=mL.select(this)}),i},gL=Je,bL=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=gL.localeRegistry}var f=a.split("-")[0];if(f===a)break;a=f}return r},xL=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},_L=function(e){for(var r=kL(e)?TL:wL,a=[],i=0;i<e.length;i++){var n=e[i];r(n)&&a.push(n)}return a};function wL(t){return t.visible===!0}function TL(t){var e=t[0].trace;return e.visible===!0&&e._length!==0}function kL(t){return Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace}var AL=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},ML=ht,SL=Xt.BADNUM,LL=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,CL=function(e){return typeof e=="string"&&(e=e.replace(LL,"")),ML(e)?Number(e):SL},Dl=ut,DL=Ul.utcFormat,PL=n_.format,aw=ht,iw=Xt,nw=iw.FP_SAFE,EL=-nw,Fm=iw.BADNUM,te=d_.exports={};te.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 $m={};te.warnBadFormat=function(t){var e=String(t);$m[e]||($m[e]=1,te.warn('encountered bad format: "'+e+'"'))};te.noFormat=function(t){return String(t)};te.numberFormat=function(t){var e;try{e=PL(te.adjustFormat(t))}catch{return te.warnBadFormat(t),te.noFormat}return e};te.nestedProperty=jh;te.keyedContainer=rS;te.relativeAttr=nS;te.isPlainObject=Tn;te.toLogRange=Bh;te.relinkPrivateKeys=lS;var Li=Wt;te.isArrayBuffer=Li.isArrayBuffer;te.isTypedArray=Li.isTypedArray;te.isArrayOrTypedArray=Li.isArrayOrTypedArray;te.isArray1D=Li.isArray1D;te.ensureArray=Li.ensureArray;te.concat=Li.concat;te.maxRowLength=Li.maxRowLength;te.minRowLength=Li.minRowLength;var ow=vs;te.mod=ow.mod;te.modHalf=ow.modHalf;var Ci=x_;te.valObjectMeta=Ci.valObjectMeta;te.coerce=Ci.coerce;te.coerce2=Ci.coerce2;te.coerceFont=Ci.coerceFont;te.coercePattern=Ci.coercePattern;te.coerceHoverinfo=Ci.coerceHoverinfo;te.coerceSelectionMarkerOpacity=Ci.coerceSelectionMarkerOpacity;te.validate=Ci.validate;var Wr=M_;te.dateTime2ms=Wr.dateTime2ms;te.isDateTime=Wr.isDateTime;te.ms2DateTime=Wr.ms2DateTime;te.ms2DateTimeLocal=Wr.ms2DateTimeLocal;te.cleanDate=Wr.cleanDate;te.isJSDate=Wr.isJSDate;te.formatDate=Wr.formatDate;te.incrementMonth=Wr.incrementMonth;te.dateTick0=Wr.dateTick0;te.dfltRange=Wr.dfltRange;te.findExactDates=Wr.findExactDates;te.MIN_MS=Wr.MIN_MS;te.MAX_MS=Wr.MAX_MS;var Mn=Kh;te.findBin=Mn.findBin;te.sorterAsc=Mn.sorterAsc;te.sorterDes=Mn.sorterDes;te.distinctVals=Mn.distinctVals;te.roundUp=Mn.roundUp;te.sort=Mn.sort;te.findIndexOfMin=Mn.findIndexOfMin;te.sortObjectKeys=Qh;var ei=Q_;te.aggNums=ei.aggNums;te.len=ei.len;te.mean=ei.mean;te.geometricMean=ei.geometricMean;te.median=ei.median;te.midRange=ei.midRange;te.variance=ei.variance;te.stdev=ei.stdev;te.interp=ei.interp;var ka=Bc;te.init2dArray=ka.init2dArray;te.transposeRagged=ka.transposeRagged;te.dot=ka.dot;te.translationMatrix=ka.translationMatrix;te.rotationMatrix=ka.rotationMatrix;te.rotationXYMatrix=ka.rotationXYMatrix;te.apply3DTransform=ka.apply3DTransform;te.apply2DTransform=ka.apply2DTransform;te.apply2DTransform2=ka.apply2DTransform2;te.convertCssMatrix=ka.convertCssMatrix;te.inverseTransformMatrix=ka.inverseTransformMatrix;var Ha=cL;te.deg2rad=Ha.deg2rad;te.rad2deg=Ha.rad2deg;te.angleDelta=Ha.angleDelta;te.angleDist=Ha.angleDist;te.isFullCircle=Ha.isFullCircle;te.isAngleInsideSector=Ha.isAngleInsideSector;te.isPtInsideSector=Ha.isPtInsideSector;te.pathArc=Ha.pathArc;te.pathSector=Ha.pathSector;te.pathAnnulus=Ha.pathAnnulus;var Bo=kn;te.isLeftAnchor=Bo.isLeftAnchor;te.isCenterAnchor=Bo.isCenterAnchor;te.isRightAnchor=Bo.isRightAnchor;te.isTopAnchor=Bo.isTopAnchor;te.isMiddleAnchor=Bo.isMiddleAnchor;te.isBottomAnchor=Bo.isBottomAnchor;var Go=An;te.segmentsIntersect=Go.segmentsIntersect;te.segmentDistance=Go.segmentDistance;te.getTextLocation=Go.getTextLocation;te.clearLocationCache=Go.clearLocationCache;te.getVisibleSegment=Go.getVisibleSegment;te.findPointOnPath=Go.findPointOnPath;var qc=Rt;te.extendFlat=qc.extendFlat;te.extendDeep=qc.extendDeep;te.extendDeepAll=qc.extendDeepAll;te.extendDeepNoArrays=qc.extendDeepNoArrays;var tp=jo;te.log=tp.log;te.warn=tp.warn;te.error=tp.error;var zL=Ho;te.counterRegex=zL.counter;var rp=Yc;te.throttle=rp.throttle;te.throttleDone=rp.done;te.clearThrottle=rp.clear;var Aa=Gc;te.getGraphDiv=Aa.getGraphDiv;te.isPlotDiv=Aa.isPlotDiv;te.removeElement=Aa.removeElement;te.addStyleRule=Aa.addStyleRule;te.addRelatedStyleRule=Aa.addRelatedStyleRule;te.deleteRelatedStyleRule=Aa.deleteRelatedStyleRule;te.setStyleOnHover=Aa.setStyleOnHover;te.getFullTransformMatrix=Aa.getFullTransformMatrix;te.getElementTransformMatrix=Aa.getElementTransformMatrix;te.getElementAndAncestors=Aa.getElementAndAncestors;te.equalDomRects=Aa.equalDomRects;te.clearResponsive=uL;te.preserveDrawingBuffer=hL;te.makeTraceGroups=yL;te._=bL;te.notifier=P_;te.filterUnique=xL;te.filterVisible=_L;te.pushUnique=E_;te.increment=AL;te.cleanNumber=CL;te.ensureNumber=function(e){return aw(e)?(e=Number(e),e>nw||e<EL?Fm:e):Fm};te.isIndex=function(t,e){return e!==void 0&&t>=e?!1:aw(t)&&t>=0&&t%1===0};te.noop=Wh;te.identity=K_;te.repeat=function(t,e){for(var r=new Array(e),a=0;a<e;a++)r[a]=t;return r};te.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=te.nestedProperty(t,n.replace("?",r)),l=te.nestedProperty(t,n.replace("?",a)),s=o.get();o.set(l.get()),l.set(s)}};te.raiseToTop=function(e){e.parentNode.appendChild(e)};te.cancelTransition=function(t){return t.transition().duration(0)};te.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))};te.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};te.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};te.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?(te.warn("randstr failed uniqueness"),o):t(e,r,a,(i||0)+1):o};te.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};te.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};te.syncOrAsync=function(t,e,r){var a,i;function n(){return te.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)};te.stripTrailingSlash=function(t){return t.substr(-1)==="/"?t.substr(0,t.length-1):t};te.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]]}};te.mergeArray=function(t,e,r,a){var i=typeof a=="function";if(te.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}};te.mergeArrayCastPositive=function(t,e,r){return te.mergeArray(t,e,r,function(a){var i=+a;return isFinite(i)&&i>0?i:0})};te.fillArray=function(t,e,r,a){if(a=a||te.identity,te.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=a(t[i])};te.castOption=function(t,e,r,a){a=a||te.identity;var i=te.nestedProperty(t,r).get();return te.isArrayOrTypedArray(i)?Array.isArray(e)&&te.isArrayOrTypedArray(i[e[0]])?a(i[e[0]][e[1]]):a(i[e]):i};te.extractOption=function(t,e,r,a){if(r in t)return t[r];var i=te.nestedProperty(e,a).get();if(!Array.isArray(i))return i};function lw(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}te.tagSelected=function(t,e,r){var a=e.selectedpoints,i=e._indexToPoints,n;i&&(n=lw(i));function o(u){return u!==void 0&&u<t.length}for(var l=0;l<a.length;l++){var s=a[l];if(te.isIndex(s)||te.isArrayOrTypedArray(s)&&te.isIndex(s[0])&&te.isIndex(s[1])){var f=n?n[s]:s,c=r?r[f]:f;o(c)&&(t[c].selected=1)}}};te.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var a=lw(r),i=[],n=0;n<e.length;n++){var o=e[n];if(te.isIndex(o)){var l=a[o];te.isIndex(l)&&i.push(l)}}return i}else return e};te.getTargetArray=function(t,e){var r=e.target;if(typeof r=="string"&&r){var a=te.nestedProperty(t,r).get();return te.isArrayOrTypedArray(a)?a:!1}else if(te.isArrayOrTypedArray(r))return r;return!1};function sw(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):te.isTypedArray(s)?i===-1?a[l]=s.subarray():a[l]=s.subarray(0,i):s&&typeof s=="object"?a[l]=sw(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}te.minExtend=sw;te.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)};te.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(t.indexOf(e[r])!==-1)return!0;return!1};var RL=/Version\/[\d\.]+.*Safari/;te.isSafari=function(){return RL.test(window.navigator.userAgent)};var IL=/iPad|iPhone|iPod/;te.isIOS=function(){return IL.test(window.navigator.userAgent)};const FL=/Macintosh.+AppleWebKit.+Gecko\)$/;te.isMacWKWebView=()=>FL.test(window.navigator.userAgent);var $L=/Firefox\/(\d+)\.\d+/;te.getFirefoxVersion=function(){var t=$L.exec(window.navigator.userAgent);if(t&&t.length===2){var e=parseInt(t[1]);if(!isNaN(e))return e}return null};te.isD3Selection=function(t){return t instanceof Dl.selection};te.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};te.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};te.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 NL=/^([^\[\.]+)\.(.+)?/,HL=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function Rs(t){return t.slice(0,2)==="__"}te.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(NL)){if(i=t[r],a=e[1],Rs(a))continue;delete t[r],t[a]=te.extendDeepNoArrays(t[a]||{},te.objectFromPath(r,te.expandObjectPaths(i))[a])}else if(e=r.match(HL)){if(i=t[r],a=e[1],Rs(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]||{},te.extendDeepNoArrays(o,te.objectFromPath(l,te.expandObjectPaths(i)));else{if(Rs(a))continue;t[a][n]=te.expandObjectPaths(i)}}else{if(Rs(r))continue;t[r]=te.expandObjectPaths(t[r])}}return t};te.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};te.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var fw=/^\w*$/;te.templateString=function(t,e){var r={};return t.replace(te.TEMPLATE_STRING_REGEX,function(a,i){var n;return fw.test(i)?n=e[i]:(r[i]=r[i]||te.nestedProperty(e,i).get,n=r[i](!0)),n!==void 0?n:""})};var OL={max:10,count:0,name:"hovertemplate"};te.hovertemplateString=function(){return ap.apply(OL,arguments)};var jL={max:10,count:0,name:"texttemplate"};te.texttemplateString=function(){return ap.apply(jL,arguments)};var BL=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function GL(t){var e=t.match(BL);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}var UL={max:10,count:0,name:"texttemplate",parseMultDiv:!0};te.texttemplateStringForShapes=function(){return ap.apply(UL,arguments)};var Nm=/^[:|\|]/;function ap(t,e,r){var a=this,i=arguments;return e||(e={}),t.replace(te.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,p=o;(f||c)&&(p=p.substring(1)),(u||c)&&(p=p.substring(0,p.length-1));var d=null,h=null;if(a.parseMultDiv){var m=GL(p);p=m.key,d=m.op,h=m.number}var y;if(v){if(y=e[p],y===void 0)return""}else{var b,_;for(_=3;_<i.length;_++)if(b=i[_],!!b){if(b.hasOwnProperty(p)){y=b[p];break}if(fw.test(p)||(y=te.nestedProperty(b,p).get(!0)),y!==void 0)break}}if(y!==void 0&&(d==="*"&&(y*=h),d==="/"&&(y/=h)),y===void 0&&a)return a.count<a.max&&(te.warn("Variable '"+p+"' in "+a.name+" could not be found!"),y=n),a.count===a.max&&te.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:te.numberFormat,y!==""&&(y=g(l.replace(Nm,""))(y))),l[0]==="|"){g=r?r.timeFormat:DL;var x=te.dateTime2ms(y);y=te.formatDate(x,l.replace(Nm,""),!1,g)}}else{var w=p+"Label";e.hasOwnProperty(w)&&(y=e[w])}return v&&(y="("+y+")",(f||c)&&(y=" "+y),(u||c)&&(y=y+" ")),y})}var Is=48,Hm=57;te.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>=Is&&o<=Hm,f=l>=Is&&l<=Hm;if(s&&(a=10*a+o-Is),f&&(i=10*i+l-Is),!s||!f){if(a!==i)return a-i;if(o!==l)return o-l}}return i-a};var io=2e9;te.seedPseudoRandom=function(){io=2e9};te.pseudoRandom=function(){var t=io;return io=(69069*io+1)%4294967296,Math.abs(io-t)<429496729?te.pseudoRandom():io/4294967296};te.fillText=function(t,e,r){var a=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=te.extractOption(t,e,"htx","hovertext");if(te.isValidTextValue(i))return a(i);var n=te.extractOption(t,e,"tx","text");if(te.isValidTextValue(n))return a(n)};te.isValidTextValue=function(t){return t||t===0};te.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};te.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||e==="none"};te.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""};te.strRotate=function(t){return t?"rotate("+t+")":""};te.strScale=function(t){return t!==1?"scale("+t+")":""};te.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,te.strTranslate(i-f*(r+o),n-f*(a+l))+te.strScale(f)+(s?"rotate("+s+(e?"":" "+r+" "+a)+")":"")};te.setTransormAndDisplay=function(t,e){t.attr("transform",te.getTextTransform(e)),t.style("display",e.scale?null:"none")};te.ensureUniformFontSize=function(t,e){var r=te.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r};te.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)};te.bigFont=function(t){return Math.round(1.2*t)};var Om=te.getFirefoxVersion(),VL=Om!==null&&Om<86;te.getPositionFromD3Event=function(){return VL?[Dl.event.layerX,Dl.event.layerY]:[Dl.event.offsetX,Dl.event.offsetY]};var xe=d_.exports,WL=xe,jm={"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 Bm in jm){var XL=Bm.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");WL.addStyleRule(XL,jm[Bm])}var It={},ip={},Iu=Fh.EventEmitter,YL={init:function(t){if(t._ev instanceof Iu)return t;var e=new Iu,r=new Iu;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}},ys=YL,Gm=xe,qL=Oo.dfltConfig;function ZL(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)?Gm.extendDeep([],a):Gm.extendDeepAll({},a):r[i]=a;return r}var Ja={};Ja.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>qL.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)};Ja.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0};Ja.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1};Ja.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++)Ja.plotDo(e,r.undo.calls[a],r.undo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1}};Ja.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++)Ja.plotDo(e,r.redo.calls[a],r.redo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}};Ja.plotDo=function(t,e,r){t.autoplay=!0,r=ZL(t,r),e.apply(null,r)};var KL=Ja,Uo={},cw={_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=Je,r=xe,a=oa,i=ms,n=cw,o=Uc,l=Oo.configAttributes,s=Na,f=r.extendDeepAll,c=r.isPlainObject,u=r.isArrayOrTypedArray,v=r.nestedProperty,p=r.valObjectMeta,d="_isSubplotObj",h="_isLinkedToArray",m="_arrayAttrRegexps",y="_deprecated",b=[d,h,m,y];t.IS_SUBPLOT_OBJ=d,t.IS_LINKED_TO_ARRAY=h,t.DEPRECATED=y,t.UNDERSCORE_ATTRS=b,t.get=function(){var I={};return e.allTypes.forEach(function(H){I[H]=w(H)}),{defs:{valObjects:p,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:I,layout:T(),frames:A(),animation:M(o),config:M(l)}},t.crawl=function(I,H,D,E){var k=D||0;E=E||"",Object.keys(I).forEach(function(C){var P=I[C];if(b.indexOf(C)===-1){var F=(E?E+".":"")+C;H(P,C,I,k,F),!t.isValObject(P)&&c(P)&&C!=="impliedEdits"&&t.crawl(P,H,k+1,F)}})},t.isValObject=function(I){return I&&I.valType!==void 0},t.findArrayAttributes=function(I){var H=[],D=[],E=[],k,C;function P(j,G,X,O){D=D.slice(0,O).concat([G]),E=E.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&&F(k,0,"")}function F(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(E[G]){if(Array.isArray(O))for(var W=0;W<O.length;W++)c(O[W])&&F(O[W],G+1,Z+"["+W+"].")}else c(O)&&F(O,G+1,Z+".")}return k=I,C="",t.crawl(a,P),I._module&&I._module.attributes&&t.crawl(I._module.attributes,P),H},t.getTraceValObject=function(I,H){var D=H[0],E=1,k,C,P=I._module;if(P||(P=(e.modules[I.type||a.type.dflt]||{})._module),!P)return!1;if(k=P.attributes,C=k&&k[D],!C){var F=P.basePlotModule;F&&F.attributes&&(C=F.attributes[D])}return C||(C=a[D]),g(C,H,E)},t.getLayoutValObject=function(I,H){var D=_(I,H[0]);return g(D,H,1)};function _(I,H){var D,E,k,C,P=I._basePlotModules;if(P){var F;for(D=0;D<P.length;D++){if(k=P[D],k.attrRegex&&k.attrRegex.test(H)){if(k.layoutAttrOverrides)return k.layoutAttrOverrides;!F&&k.layoutAttributes&&(F=k.layoutAttributes)}var j=k.baseLayoutAttrOverrides;if(j&&H in j)return j[H]}if(F)return F}var G=I._modules;if(G){for(D=0;D<G.length;D++)if(C=G[D].layoutAttributes,C&&H in C)return C[H]}for(E in e.componentsRegistry){if(k=e.componentsRegistry[E],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(I,H,D){if(!I)return!1;if(I._isLinkedToArray){if(x(H[D]))D++;else if(D<H.length)return!1}for(;D<H.length;D++){var E=I[H[D]];if(c(E))I=E;else break;if(D===H.length-1)break;if(I._isLinkedToArray){if(D++,!x(H[D]))return!1}else if(I.valType==="info_array"){D++;var k=H[D];if(!x(k))return!1;var C=I.items;if(Array.isArray(C)){if(k>=C.length)return!1;if(I.dimensions===2){if(D++,H.length===D)return I;var P=H[D];if(!x(P))return!1;I=C[k][P]}else I=C[k]}else I=C}}return I}function x(I){return I===Math.round(I)&&I>=0}function w(I){var H,D;H=e.modules[I]._module,D=H.basePlotModule;var E={};E.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(E,k),e.traceIs(I,"noOpacity")&&delete E.opacity,e.traceIs(I,"showLegend")||(delete E.showlegend,delete E.legendgroup),e.traceIs(I,"noHover")&&(delete E.hoverinfo,delete E.hoverlabel),H.selectPoints||delete E.selectedpoints,f(E,C),D.attributes&&f(E,D.attributes),E.type=I;var P={meta:H.meta||{},categories:H.categories||{},animatable:!!H.animatable,type:I,attributes:M(E)};if(H.layoutAttributes){var F={};f(F,H.layoutAttributes),P.layoutAttributes=M(F)}return H.animatable||t.crawl(P,function(j){t.isValObject(j)&&"anim"in j&&delete j.anim}),P}function T(){var I={},H,D;f(I,i);for(H in e.subplotsRegistry)if(D=e.subplotsRegistry[H],!!D.layoutAttributes)if(Array.isArray(D.attr))for(var E=0;E<D.attr.length;E++)$(I,D,D.attr[E]);else{var k=D.attr==="subplot"?D.name:D.attr;$(I,D,k)}for(H in e.componentsRegistry){D=e.componentsRegistry[H];var C=D.schema;if(C&&(C.subplots||C.layout)){var P=C.subplots;if(P&&P.xaxis&&!P.yaxis)for(var F in P.xaxis)delete I.yaxis[F];delete I.xaxis.shift,delete I.xaxis.autoshift}else D.name==="colorscale"?f(I,D.layoutAttributes):D.layoutAttributes&&N(I,D.layoutAttributes,D.name)}return{layoutAttributes:M(I)}}function A(){var I={frames:f({},n)};return M(I),I.frames}function M(I){return S(I),L(I),z(I),I}function S(I){function H(E){return{valType:"string",description:"Sets the source reference on Chart Studio Cloud for `"+E+"`.",editType:"none"}}function D(E,k,C){t.isValObject(E)?(E.arrayOk===!0||E.valType==="data_array")&&(C[k+"src"]=H(k)):c(E)&&(E.role="object")}t.crawl(I,D)}function L(I){function H(D,E,k){if(D){var C=D[h];C&&(delete D[h],k[E]={items:{}},k[E].items[C]=D,k[E].role="object")}}t.crawl(I,H)}function z(I){function H(D){for(var E in D)if(c(D[E]))H(D[E]);else if(Array.isArray(D[E]))for(var k=0;k<D[E].length;k++)H(D[E][k]);else D[E]instanceof RegExp&&(D[E]=D[E].toString())}H(I)}function $(I,H,D){var E=v(I,D),k=f({},H.layoutAttributes);k[d]=!0,E.set(k)}function N(I,H,D){var E=v(I,D);E.set(f(E.get()||{},H))}})(Uo);var uw={exports:{}},Lt={},go=xe,QL=oa,xi="templateitemname",$d={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(" ")}};$d[xi]={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(" ")};Lt.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=$d.name,e[xi]=$d[xi],e};Lt.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=go.coerce(n,{},QL,"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}};Lt.newContainer=function(t,e,r){var a=t._template,i=a&&(a[e]||r&&a[r]);go.isPlainObject(i)||(i=null);var n=t[e]={_template:i};return n};Lt.arrayTemplater=function(t,e,r){var a=t._template,i=a&&a[vw(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[xi]=f[xi];if(!Um(u))return c._template=i,c;for(var v=0;v<n.length;v++){var p=n[v];if(p.name===u)return o[u]=1,c._template=p,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(Um(v)&&!o[v]){var p={_template:u,name:v,_input:{_templateitemname:v}};p[xi]=u[xi],f.push(p),o[v]=1}}return f}return{newItem:l,defaultItems:s}};function Um(t){return t&&typeof t=="string"}function vw(t){var e=t.length-1;return t.charAt(e)!=="s"&&go.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}Lt.arrayDefaultKey=vw;Lt.arrayEditor=function(t,e,r){var a=(go.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][xi]=n)}s();function f(p,d){l[p]=d}function c(p,d){n?go.nestedProperty(l[o],p).set(d):l[o+"."+p]=d}function u(){var p=l;return s(),p}function v(p,d){p&&c(p,d);var h=u();for(var m in h)go.nestedProperty(t,m).set(h[m])}return{modifyBase:f,modifyItem:c,getUpdateObj:u,applyUpdate:v}};var Ut={},nl=Ho.counter,gr={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=Je,r=gr;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 p=l[v[c]];n?f.push(p[n+"axis"]):f.push(p.xaxis,p.yaxis,p.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)}})(Ut);function JL(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()}function eC(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}var Sn={clearOutlineControllers:JL,clearOutline:eC},np={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(" ")}},gs={},ac=Je;gr.SUBPLOT_PATTERN;gs.getSubplotCalcData=function(t,e,r){var a=ac.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};gs.getModuleCalcData=function(t,e,r){var a=[],i=[],n;if(typeof e=="string"?n=ac.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]};gs.getSubplotData=function(e,r,a){if(!ac.subplotsRegistry[r])return[];for(var i=ac.subplotsRegistry[r].attr,n=[],o,l=0;l<e.length;l++)o=e[l],o[i]===a&&n.push(o);return n};var Fu={},Vm;function tC(){return Vm||(Vm=1,function(t){var e=Je,r=xe;t.manageCommandObserver=function(s,f,c,u){var v={},p=!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(p){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 h=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],m=0;m<h.length;m++)s._internalOn(h[m],v.check);v.remove=function(){for(var y=0;y<h.length;y++)s._removeInternalListener(h[y],v.check)}}else r.log("Unable to automatically bind plot updates to API command"),v.lookupTable={},v.remove=function(){};return v.disable=function(){p=!1},v.enable=function(){p=!0},f&&(f._commandObserver=v),v},t.hasSimpleAPICommandBindings=function(s,f,c){var u,v=f.length,p;for(u=0;u<v;u++){var d,h=f[u],m=h.method,y=h.args;if(Array.isArray(y)||(y=[]),!m)return!1;var b=t.computeAPICommandBindings(s,m,y);if(b.length!==1)return!1;if(!p)p=b[0],Array.isArray(p.traces)&&p.traces.sort();else{if(d=b[0],d.type!==p.type||d.prop!==p.prop)return!1;if(Array.isArray(p.traces))if(Array.isArray(d.traces)){d.traces.sort();for(var _=0;_<p.traces.length;_++)if(p.traces[_]!==d.traces[_])return!1}else return!1;else if(d.prop!==p.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 p};function a(s,f,c){var u,v,p,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(),p=c[f.type]=c[f.type]||{},p.hasOwnProperty(f.prop)&&p[f.prop]!==v&&(d=!0),p[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 p=0;p<c.length;p++)v.push(c[p]);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(p,d,h){c.push({type:"layout",prop:p,value:h})},"",0),c}function o(s,f){var c,u,v,p,d=[];if(u=f[0],v=f[1],c=f[2],p={},typeof u=="string")p[u]=v;else if(r.isPlainObject(u))p=u,c===void 0&&(c=v);else return d;return c===void 0&&(c=null),l(p,function(h,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:h,traces:b,value:_})},"",0),d}function l(s,f,c,u){Object.keys(s).forEach(function(v){var p=s[v];if(v[0]!=="_"){var d=c+(u>0?".":"")+v;r.isPlainObject(p)?l(p,f,d,u+1):f(d,v,p)}})}}(Fu)),Fu}var dw=ut,rC=Ul.timeFormatLocale,aC=n_.formatLocale,Il=ht,iC=a_,Tt=Je,hw=Uo,nC=Lt,Xe=xe,pw=ct,Wm=Xt.BADNUM,zr=Ut,oC=Sn.clearOutline,lC=np,op=Uc,sC=cw,fC=gs.getModuleCalcData,Xm=Xe.relinkPrivateKeys,Gi=Xe._,Ue=uw.exports={};Xe.extendFlat(Ue,Tt);Ue.attributes=oa;Ue.attributes.type.values=Ue.allTypes;Ue.fontAttrs=fr;Ue.layoutAttributes=ms;var Zc=tC();Ue.executeAPICommand=Zc.executeAPICommand;Ue.computeAPICommandBindings=Zc.computeAPICommandBindings;Ue.manageCommandObserver=Zc.manageCommandObserver;Ue.hasSimpleAPICommandBindings=Zc.hasSimpleAPICommandBindings;Ue.redrawText=function(t){return t=Xe.getGraphDiv(t),new Promise(function(e){setTimeout(function(){t._fullLayout&&(Tt.getComponentMethod("annotations","draw")(t),Tt.getComponentMethod("legend","draw")(t),Tt.getComponentMethod("colorbar","draw")(t),e(Ue.previousPromises(t)))},300)})};Ue.resize=function(t){t=Xe.getGraphDiv(t);var e,r=new Promise(function(a,i){(!t||Xe.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||Xe.isHidden(t)){a(t);return}delete t.layout.width,delete t.layout.height;var n=t.changed;t.autoplay=!0,Tt.call("relayout",t,{autosize:!0}).then(function(){t.changed=n,t._resolveResize===a&&(delete t._resolveResize,a(t))})},100)});return e&&e(r),r};Ue.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})};Ue.addLinks=function(t){if(!(!t._context.showLink&&!t._context.showSources)){var e=t._fullLayout,r=Xe.ensureSingle(e._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:pw.defaultLine,"pointer-events":"all"}).each(function(){var f=dw.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&&cC(t,n),o.text(n.text()&&l.text()?" - ":"")}};function cC(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(){Ue.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})}}Ue.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=dw.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=Ue.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var uC=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],vC=["year","month","dayMonth","dayMonthYear"];Ue.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||Ue.createTransitionData(t),i._dfltTitle={plot:Gi(t,"Click to enter Plot title"),subtitle:Gi(t,"Click to enter Plot subtitle"),x:Gi(t,"Click to enter X axis title"),y:Gi(t,"Click to enter Y axis title"),colorbar:Gi(t,"Click to enter Colorscale title"),annotation:Gi(t,"new text")},i._traceWord=Gi(t,"trace");var v=Ym(t,uC);if(i._mapboxAccessToken=c.mapboxAccessToken,a._initialAutoSizeIsDone){var p=a.width,d=a.height;Ue.supplyLayoutGlobalDefaults(n,i,v),n.width||(i.width=p),n.height||(i.height=d),Ue.sanitizeMargins(i)}else{Ue.supplyLayoutGlobalDefaults(n,i,v);var h=!n.width||!n.height,m=i.autosize,y=c.autosizable,b=h&&(m||y);b?Ue.plotAutoSize(t,n,i):h&&Ue.sanitizeMargins(i),!m&&h&&(n.width=i.width,n.height=i.height)}i._d3locale=pC(v,i.separators),i._extraFormat=Ym(t,vC),i._initialAutoSizeIsDone=!0,i._dataLength=s.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var _=i._subplots=hC(),g=i._splomAxes={x:{},y:{}},x=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=dC(o,s),Ue.supplyDataDefaults(s,l,n,i);var w=Object.keys(g.x),T=Object.keys(g.y);if(w.length>1&&T.length>1){for(Tt.getComponentMethod("grid","sizeDefaults")(n,i),u=0;u<w.length;u++)Xe.pushUnique(_.xaxis,w[u]);for(u=0;u<T.length;u++)Xe.pushUnique(_.yaxis,T[u]);for(var A in x)Xe.pushUnique(_.cartesian,A)}if(i._has=Ue._hasPlotType.bind(i),o.length===l.length)for(u=0;u<l.length;u++)Xm(l[u],o[u]);Ue.supplyLayoutModuleDefaults(n,i,l,t._transitionData);var M=i._visibleModules,S=[];for(u=0;u<M.length;u++){var L=M[u].crossTraceDefaults;L&&Xe.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,Ue.linkSubplots(l,i,o,a),Ue.cleanPlot(l,i,o,a);var z=!!(a._has&&a._has("cartesian")),$=!!(i._has&&i._has("cartesian")),N=z,I=$;N&&!I?a._bgLayer.remove():I&&!N&&(i._shouldCreateBgLayer=!0),a._zoomlayer&&!t._dragging&&oC({_fullLayout:a}),mC(l,i),Xm(i,a),Tt.getComponentMethod("colorscale","crossTraceDefaults")(l,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var H=i._tracePreGUI,D={},E;for(E in H)D[E]="old";for(u=0;u<l.length;u++)E=l[u]._fullInput.uid,D[E]||(H[E]={}),D[E]="new";for(E in D)D[E]==="old"&&delete H[E];mw(i),Tt.getComponentMethod("rangeslider","makeData")(i),!r&&f.length===l.length&&Ue.supplyDefaultsUpdateCalc(f,l)};Ue.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=Xe.nestedProperty(n,s).get().slice(),Xe.nestedProperty(a,s).set(f)}i.trace=a}}};function dC(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(p,d){s[d]=p,f[p]=1}function u(p,d){if(p&&typeof p=="string"&&!f[p])return c(p,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(Xe.randstr(f),i))}return s}function hC(){var t=Tt.collectableSubplotTypes,e={},r,a;if(!t){t=[];var i=Tt.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++)Xe.pushUnique(t,l[a])}}for(r=0;r<t.length;r++)e[t[r]]=[];return e}function Ym(t,e){var r=t._context.locale;r||(r="en-US");var a=!1,i={};function n(u){for(var v=!0,p=0;p<e.length;p++){var d=e[p];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=Tt.localeRegistry}var c=r.split("-")[0];if(a||c===r)break;r=c}return a||n(Tt.localeRegistry.en.format),i}function pC(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(r){try{r=aC(t).format(Xe.adjustFormat(r))}catch{return Xe.warnBadFormat(r),Xe.noFormat}return r},timeFormat:rC(t).utcFormat}}function mC(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)}Ue.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=[])};Ue._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=Tt.modules[i];if(n&&n.categories[t])return!0}return!1};Ue.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 p=t[n];if(v===p.uid)continue e}c&&a._infolayer.select(".cb"+v).remove()}};Ue.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],p=zr.getFromId(f,u,"x"),d=zr.getFromId(f,u,"y"),h;for(v?h=l[u]=v:(h=l[u]={},h.id=u),p._counterAxes.push(d._id),d._counterAxes.push(p._id),p._subplotsWith.push(u),d._subplotsWith.push(u),h.xaxis=p,h.yaxis=d,h._hasClipOnAxisFalse=!1,n=0;n<t.length;n++){var m=t[n];if(m.xaxis===h.xaxis._id&&m.yaxis===h.yaxis._id&&m.cliponaxis===!1){h._hasClipOnAxisFalse=!0;break}}}var y=zr.list(f,null,!0),b;for(i=0;i<y.length;i++){b=y[i];var _=null;b.overlaying&&(_=zr.getFromId(f,b.overlaying),_&&_.overlaying&&(b.overlaying=!1,_=null)),b._mainAxis=_||b,_&&(b.domain=_.domain.slice()),b._anchorAxis=b.anchor==="free"?null:zr.getFromId(f,b.anchor)}for(i=0;i<y.length;i++)if(b=y[i],b._counterAxes.sort(zr.idSort),b._subplotsWith.sort(Xe.subplotSort),b._mainSubplot=yC(b,e),b._counterAxes.length&&(b.spikemode&&b.spikemode.indexOf("across")!==-1||b.automargin&&b.mirror&&b.anchor!=="free"||Tt.getComponentMethod("rangeslider","isVisible")(b))){var g=1,x=0;for(n=0;n<b._counterAxes.length;n++){var w=zr.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 yC(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=zr.getFromId(r,c);if(l&&v.overlaying===l){n=u;break}}}return n||o}Ue.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=[],hw.crawl(t._module.attributes,i)),a=0;a<e.length;a++){var n=Xe.nestedProperty(t,"_input."+e[a]);n.get()||Xe.nestedProperty(t,e[a]).set(null)}};Ue.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&&(Xe.pushUnique(i,b),y.visible===!0&&Xe.pushUnique(n,b),Xe.pushUnique(o,y._module.basePlotModule),y._input.visible!==!1&&l++)}var v={},p=[],d=(r.template||{}).data||{},h=nC.traceTemplater(d);for(s=0;s<t.length;s++)c=t[s],f=h.newTrace(c),f.uid=a._traceUids[s],Ue.supplyTraceDefaults(c,f,l,a,s),f.index=s,f._input=c,f._fullInput=f,u(f),Tt.traceIs(f,"carpetAxis")&&(v[f.carpet]=f),Tt.traceIs(f,"carpetDependent")&&p.push(s);for(s=0;s<p.length;s++)if(f=e[p[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}};Ue.supplyAnimationDefaults=function(t){t=t||{};var e,r={};function a(i,n){return Xe.coerce(t||{},r,op,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]=Ue.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=Ue.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=Ue.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=Ue.supplyAnimationTransitionDefaults(t.transition||{});return r};Ue.supplyAnimationFrameDefaults=function(t){var e={};function r(a,i){return Xe.coerce(t||{},e,op.frame,a,i)}return r("duration"),r("redraw"),e};Ue.supplyAnimationTransitionDefaults=function(t){var e={};function r(a,i){return Xe.coerce(t||{},e,op.transition,a,i)}return r("duration"),r("easing"),e};Ue.supplyFrameDefaults=function(t){var e={};function r(a,i){return Xe.coerce(t,e,sC,a,i)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e};Ue.supplyTraceDefaults=function(t,e,r,a,i){var n=a.colorway||pw.defaults,o=n[r%n.length],l;function s(_,g){return Xe.coerce(t,e,Ue.attributes,_,g)}var f=s("visible");s("type"),s("name",a._traceWord+" "+i),s("uirevision",a.uirevision);var c=Ue.getModule(e);if(e._module=c,c){var u=c.basePlotModule,v=u.attr,p=u.attributes;if(v&&p){var d=a._subplots,h="";if(Array.isArray(v))for(l=0;l<v.length;l++){var m=v[l],y=Xe.coerce(t,e,p,m);d[m]&&Xe.pushUnique(d[m],y),h+=y}else h=Xe.coerce(t,e,p,v);d[u.name]&&Xe.pushUnique(d[u.name],h)}}if(f&&(s("customdata"),s("ids"),s("meta"),Tt.traceIs(e,"showLegend")?(Xe.coerce(t,e,c.attributes.showlegend?c.attributes:Ue.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),Tt.traceIs(e,"noOpacity")||s("opacity"),Tt.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),Tt.traceIs(e,"noHover")||(e.hovertemplate||Xe.coerceHoverinfo(t,e,a),e.type!=="parcats"&&Tt.getComponentMethod("fx","supplyDefaults")(t,e,o,a)),c&&c.selectPoints)){var b=s("selectedpoints");Xe.isTypedArray(b)&&(e.selectedpoints=Array.from(b))}return e};Ue.supplyLayoutGlobalDefaults=function(t,e,r){function a(u,v){return Xe.coerce(t,e,Ue.layoutAttributes,u,v)}var i=t.template;Xe.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),a("autotypenumbers");var n=Xe.coerceFont(a,"font"),o=n.size;Xe.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),Xe.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&&Ue.sanitizeMargins(e),Tt.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),Tt.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),Tt.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,a),Tt.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(t,e,a),a("meta"),Xe.isPlainObject(t.transition)&&(a("transition.duration"),a("transition.easing"),a("transition.ordering")),Tt.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),Tt.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,a),Xe.coerce(t,e,lC,"scattermode")};function Fs(t){return typeof t=="string"&&t.substr(t.length-2)==="px"&&parseFloat(t)}Ue.plotAutoSize=function(e,r,a){var i=e._context||{},n=i.frameMargins,o,l,s=Xe.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=Fs(f.width)||Fs(f.maxWidth)||a.width,l=Fs(f.height)||Fs(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=Ue.layoutAttributes.width.min,v=Ue.layoutAttributes.height.min;o<u&&(o=u),l<v&&(l=v);var p=!r.width&&Math.abs(a.width-o)>1,d=!r.height&&Math.abs(a.height-l)>1;(d||p)&&(p&&(a.width=o),d&&(a.height=l)),e._initialAutoSize||(e._initialAutoSize={width:o,height:l}),Ue.sanitizeMargins(a)};Ue.supplyLayoutModuleDefaults=function(t,e,r,a){var i=Tt.componentsRegistry,n=e._basePlotModules,o,l,s,f=Tt.subplotsRegistry.cartesian;for(o in i)s=i[o],s.includeBasePlot&&s.includeBasePlot(t,e);n.length||n.push(f),e._has("cartesian")&&(Tt.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e));for(var c in e._subplots)e._subplots[c].sort(Xe.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)};Ue.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)),Xe.clearThrottle(),Xe.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()};Ue.style=function(t){var e=t._fullLayout._visibleModules,r=[],a;for(a=0;a<e.length;a++){var i=e[a];i.style&&Xe.pushUnique(r,i.style)}for(a=0;a<r.length;a++)r[a](t)};Ue.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))}};Ue.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}};Ue.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1};function mw(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 yw=2,gw=2;Ue.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=Xe.constrain(i-o.l-o.r,yw,l),c=Xe.constrain(n-o.t-o.b,gw,s),u=Math.max(0,i-f),v=Math.max(0,n-c),p=a._pushmargin,d=a._pushmarginIds;if(o.autoexpand!==!1){if(!r)delete p[e],delete d[e];else{var h=r.pad;if(h===void 0&&(h=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;p[e]={l:{val:b,size:r.l+h},r:{val:_,size:r.r+h},b:{val:x,size:r.b+h},t:{val:g,size:r.t+h}},d[e]=1}if(!a._replotting)return Ue.doAutoMargin(t)}};function gC(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=zr.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}Ue.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,a=e.height;e._size||(e._size={}),mw(e);var i=e._size,n=e.margin,o={t:0,b:0,l:0,r:0},l=Xe.extendFlat({},i),s=n.l,f=n.r,c=n.t,u=n.b,v=e._pushmargin,p=e._pushmarginIds,d=e.minreducedwidth,h=e.minreducedheight;if(n.autoexpand!==!1){for(var m in v)p[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,$=S.size,N=L.val,I=L.size,H=r-o.r-o.l,D=a-o.t-o.b;for(var E in v){if(Il($)&&v[E].r){var k=v[E].r.val,C=v[E].r.size;if(k>z){var P=($*k+(C-H)*z)/(k-z),F=(C*(1-z)+($-H)*(1-k))/(k-z);P+F>s+f&&(s=P,f=F)}}if(Il(I)&&v[E].t){var j=v[E].t.val,G=v[E].t.size;if(j>N){var X=(I*j+(G-D)*N)/(j-N),O=(G*(1-N)+(I-D)*(1-j))/(j-N);X+O>u+c&&(u=X,c=O)}}}}}var Z=Xe.constrain(r-n.l-n.r,yw,d),W=Xe.constrain(a-n.t-n.b,gw,h),Y=Math.max(0,r-Z),B=Math.max(0,a-W);if(Y){var Q=(s+f)/Y;Q>1&&(s/=Q,f/=Q)}if(B){var ee=(u+c)/B;ee>1&&(u/=ee,c/=ee)}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&&(Ue.didMarginChange(l,i)||gC(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var se=3*(1+Object.keys(p).length);if(e._redrawFromAutoMarginCount<se)return Tt.call("_doPlot",t);e._size=l,Xe.warn("Too many auto-margin redraws.")}bC(t)};function bC(t){var e=zr.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var a=0;a<e.length;a++){var i=e[a][r];i&&i()}})}var qm=["l","r","t","b","p","w","h"];Ue.didMarginChange=function(t,e){for(var r=0;r<qm.length;r++){var a=qm[r],i=t[a],n=e[a];if(!Il(i)||Math.abs(n-i)>1)return!0}return!1};Ue.graphJson=function(t,e,r,a,i,n){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&Ue.supplyDefaults(t);var o=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function f(v,p){if(typeof v=="function")return p?"_function_":null;if(Xe.isPlainObject(v)){var d={},h;return Object.keys(v).sort().forEach(function(_){if(["_","["].indexOf(_.charAt(0))===-1){if(typeof v[_]=="function"){p&&(d[_]="_function");return}if(r==="keepdata"){if(_.substr(_.length-3)==="src")return}else if(r==="keepstream"){if(h=v[_+"src"],typeof h=="string"&&h.indexOf(":")>0&&!Xe.isPlainObject(v.stream))return}else if(r!=="keepall"&&(h=v[_+"src"],typeof h=="string"&&h.indexOf(":")>0))return;d[_]=f(v[_],p)}}),d}var m=Array.isArray(v),y=Xe.isTypedArray(v);if((m||y)&&v.dtype&&v.shape){var b=v.bdata;return f({dtype:v.dtype,shape:v.shape,bdata:Xe.isArrayBuffer(b)?iC.encode(b):b},p)}return m?v.map(function(_){return f(_,p)}):y?Xe.simpleMap(v,Xe.identity):Xe.isJSDate(v)?Xe.ms2DateTimeLocal(+v):v}var c={data:(o||[]).map(function(v){var p=f(v);return e&&delete p.fit,p})};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)};Ue.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()};Ue.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=Ue.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]=Ue.extendTrace(c.data[o],l.data[a]))}return c};Ue.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)}};Ue.extendObjectWithContainers=function(t,e,r){var a,i,n,o,l,s,f,c,u=Xe.extendDeepNoArrays({},e||{}),v=Xe.expandObjectPaths(u),p={};if(r&&r.length)for(n=0;n<r.length;n++)a=Xe.nestedProperty(v,r[n]),i=a.get(),i===void 0?Xe.nestedProperty(p,r[n]).set(null):(a.set(null),Xe.nestedProperty(p,r[n]).set(i));if(t=Xe.extendDeepNoArrays(t||{},v),r&&r.length){for(n=0;n<r.length;n++)if(l=Xe.nestedProperty(p,r[n]),f=l.get(),!!f){for(s=Xe.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]=Ue.extendObjectWithContainers(c[o],d)}s.set(c)}}return t};Ue.dataArrayContainers=["transforms","dimensions"];Ue.layoutArrayContainers=Tt.layoutArrayContainers;Ue.extendTrace=function(t,e){return Ue.extendObjectWithContainers(t,e,Ue.dataArrayContainers)};Ue.extendLayout=function(t,e){return Ue.extendObjectWithContainers(t,e,Ue.layoutArrayContainers)};Ue.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],p=t._fullData[v],d=p._module;if(d){if(d.animatable){var h=d.basePlotModule.name;l[h]||(l[h]=[]),l[h].push(v)}t.data[c[u]]=Ue.extendTrace(t.data[c[u]],e[u])}}var m=Xe.expandObjectPaths(Xe.extendDeepNoArrays({},r)),y=/^[xy]axis[0-9]*$/;for(var b in m)y.test(b)&&delete m[b].range;Ue.extendLayout(t.layout,m),delete t.calcdata,Ue.supplyDefaults(t),Ue.doCalcdata(t);var _=Xe.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,$=null,N=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]))&&($={xr0:M,xr1:L}),S&&z&&(A.r2l(S[0])!==A.r2l(z[0])||A.r2l(S[1])!==A.r2l(z[1]))&&(N={yr0:S,yr1:z}),($||N)&&s.push(Xe.extendFlat({plotinfo:w},$,N))}}return Promise.resolve()},o.runFn=function(f){var c,u=t._fullLayout._basePlotModules,v=s.length,p;if(r)for(p=0;p<u.length;p++)u[p].transitionAxes&&u[p].transitionAxes(t,s,n,f);v?(c=Xe.extendFlat({},n),c.duration=0,delete l.cartesian):c=n;for(var d in l){var h=l[d],m=t._fullData[h[0]]._module;m.basePlotModule.plot(t,h,c,f)}},bw(t,n,o)};Ue.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,p=a[u._name].range.slice(),d=a[v._name].range.slice(),h=u.range.slice(),m=v.range.slice();u.setScale(),v.setScale();var y=null,b=null;(u.r2l(p[0])!==u.r2l(h[0])||u.r2l(p[1])!==u.r2l(h[1]))&&(y={xr0:p,xr1:h}),(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(Xe.extendFlat({plotinfo:c},y,b))}return Promise.resolve()},o.runFn=function(s){for(var f=t._fullData,c=t._fullLayout,u=c._basePlotModules,v,p,d,h=[],m=0;m<f.length;m++)h.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,p,s)}l.length&&e.anim?n.ordering==="traces first"?(v=Xe.extendFlat({},n,{duration:0}),d=h,p=n,setTimeout(y,n.duration),b()):(v=n,d=null,p=Xe.extendFlat({},n,{duration:0}),setTimeout(b,v.duration),y()):l.length?(v=n,y()):e.anim&&(d=h,p=n,b())},bw(t,n,o)};function bw(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 Tt.call("redraw",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var v=0,p=0;function d(){return v++,function(){p++,!a&&p===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 Tt.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=[Ue.previousPromises,s,r.prepareFn,Ue.rehover,Ue.reselect,o],c=Xe.syncOrAsync(f,t);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return t})}Ue.doCalcdata=function(t,e){var r=zr.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=hw.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 p=i[v];p.cauto!==!1&&(delete p.cmin,delete p.cmax)}var d=!1;function h(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:Wm,y:Wm}]),g[0].t||(g[0].t={}),g[0].trace=n,f[b]=g}}for(Zm(r,a,i),l=0;l<a.length;l++)m(l,!0);for(l=0;l<a.length;l++)h(l);for(d&&Zm(r,a,i),l=0;l<a.length;l++)m(l,!0);for(l=0;l<a.length;l++)m(l,!1);Km(t);var y=_C(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);Km(t)}Tt.getComponentMethod("fx","calc")(t),Tt.getComponentMethod("errorbars","calc")(t)};var xC=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function _C(t,e){var r=[],a,i,n,o,l;function s(E,k,C){var P=k._id.charAt(0);if(E==="histogram2dcontour"){var F=k._counterAxes[0],j=zr.getFromId(e,F),G=P==="x"||F==="x"&&j.type==="category",X=P==="y"||F==="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:(P==="y"?Z:O)-1}}else return function(O,Z){return P==="y"?Z:O}}var f={min:function(E){return Xe.aggNums(Math.min,null,E)},max:function(E){return Xe.aggNums(Math.max,null,E)},sum:function(E){return Xe.aggNums(function(k,C){return k+C},null,E)},total:function(E){return Xe.aggNums(function(k,C){return k+C},null,E)},mean:function(E){return Xe.mean(E)},"geometric mean":function(E){return Xe.geometricMean(E)},median:function(E){return Xe.median(E)}};function c(E,k){return E[1]-k[1]}function u(E,k){return k[1]-E[1]}for(a=0;a<t.length;a++){var v=t[a];if(v.type==="category"){var p=v.categoryorder.match(xC);if(p){var d=p[1],h=p[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;Tt.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 $=g._diag[z][0];$&&(v=e._fullLayout[zr.id2name($)])}var N=M.trace.dimensions[z].values;for(o=0;o<N.length;o++)for(S=v._categoriesMap[N[o]],l=0;l<M.trace.dimensions.length;l++)if(l!==z){var I=M.trace.dimensions[l];b[S][1].push(I.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(h==="descending"?u:c),v._categoriesAggregatedValue=D,v._initialCategories=D.map(function(E){return E[0]}),r=r.concat(v.sortByInitialCategories())}}}return r}function Zm(t,e,r){var a={};function i(s){s.clearCalc(),s.type==="multicategory"&&s.setupMultiCategory(e),a[s._id]=1}Xe.simpleMap(t,i);for(var n=r._axisMatchGroups||[],o=0;o<n.length;o++)for(var l in n[o])a[l]||i(r[zr.id2name(l)])}function Km(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]?Xe.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],p=o==="cartesian"?e._plots[v]:e[v];for(n=0;n<c.length;n++)c[n](t,p,v)}else for(n=0;n<c.length;n++)c[n](t)}}Ue.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()};Ue.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()};Ue.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);Tt.getComponentMethod("selections","reselect")(t,i)};Ue.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 p=n[v],d=p[0][0].trace._module;d.plot(t,e,Xe.filterVisible(p),a)}e.traceHash=n};Ue.plotBasePlot=function(t,e,r,a,i){var n=Tt.getModule(t),o=fC(e.calcdata,n)[0];n.plot(e,o,a,i)};Ue.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 Kt=uw.exports,xw={exports:{}},or={},Vo={};(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}})(Vo);var Sr={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=ut,r=xe,a=r.strTranslate,i=Vo,n=Sr.LINE_SPACING,o=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(k,C,P){var F=k.text(),j=!k.attr("data-notex")&&C&&C._context.typesetMath&&typeof MathJax<"u"&&F.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":F,"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=I(k.node(),F);Z&&k.style("pointer-events","all"),t.positionText(k),P&&P.call(k)}return j?(C&&C._promises||[]).push(new Promise(function(Z){k.style("display","none");var W=parseInt(k.node().style.fontSize,10),Y={fontSize:W};u(j[2],Y,function(B,Q,ee){G.selectAll("svg."+X).remove(),G.selectAll("g."+X+"-group").remove();var se=B&&B.select("svg");if(!se||!se.node()){O(),Z();return}var oe=G.append("g").classed(X+"-group",!0).attr({"pointer-events":"none","data-unformatted":F,"data-math":"Y"});oe.node().appendChild(se.node()),Q&&Q.node()&&se.node().insertBefore(Q.node().cloneNode(!0),se.node().firstChild);var fe=ee.width,pe=ee.height;se.attr({class:X,height:pe,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ge=k.node().style.fill||"black",be=se.select("g");be.attr({fill:ge,stroke:ge});var we=be.node().getBoundingClientRect(),ye=we.width,de=we.height;(ye>fe||de>pe)&&(se.style("overflow","hidden"),we=se.node().getBoundingClientRect(),ye=we.width,de=we.height);var Me=+k.attr("x"),De=+k.attr("y"),ue=W||k.node().getBoundingClientRect().height,Te=-ue/4;if(X[0]==="y")oe.attr({transform:"rotate("+[-90,Me,De]+")"+a(-ye/2,Te-de/2)});else if(X[0]==="l")De=Te-de/2;else if(X[0]==="a"&&X.indexOf("atitle")!==0)Me=0,De=Te;else{var Se=k.attr("text-anchor");Me=Me-ye*(Se==="middle"?.5:Se==="end"?1:0),De=De+Te-de/2}se.attr({x:Me,y:De}),P&&P.call(k,oe),Z(oe)})})):O(),k};var l=/(<|&lt;|&#60;)/g,s=/(>|&gt;|&#62;)/g;function f(k){return k.replace(l,"\\lt ").replace(s,"\\gt ")}var c=[["$","$"],["\\(","\\)"]];function u(k,C,P){var F=parseInt((MathJax.version||"").split(".")[0]);if(F!==2&&F!==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"})},W=function(){G=r.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=c},Y=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")},Q=function(){var ge="math-output-"+r.randstr({},64);O=e.select("body").append("div").attr({id:ge}).style({visibility:"hidden",position:"absolute","font-size":C.fontSize+"px"}).text(f(k));var be=O.node();return F===2?MathJax.Hub.Typeset(be):MathJax.typeset([be])},ee=function(){var ge=O.select(F===2?".MathJax_SVG":".MathJax"),be=!ge.empty()&&O.select("svg").node();if(!be)r.log("There was an error in the tex syntax.",k),P();else{var we=be.getBoundingClientRect(),ye;F===2?ye=e.select("body").select("#MathJax_SVG_glyphs"):ye=ge.select("defs"),P(ge,ye,we)}O.remove()},se=function(){if(j!=="SVG")return MathJax.Hub.setRenderer(j)},oe=function(){j!=="svg"&&(MathJax.config.startup.output=j)},fe=function(){return X!==void 0&&(MathJax.Hub.processSectionDelay=X),MathJax.Hub.Config(G)},pe=function(){MathJax.config=G};F===2?MathJax.Hub.Queue(Z,Y,Q,ee,se,fe):F===3&&(W(),B(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){Q(),ee(),oe(),pe()}))}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"},p={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},h="​",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 P=k.match(C),F=P&&(P[3]||P[4]);return F&&$(F)}var S=/(^|;)\s*color:/;t.plainText=function(k,C){C=C||{};for(var P=C.len!==void 0&&C.len!==-1?C.len:1/0,F=C.allowedTags!==void 0?C.allowedTags:["br"],j="...",G=j.length,X=k.split(b),O=[],Z="",W=0,Y=0;Y<X.length;Y++){var B=X[Y],Q=B.match(_),ee=Q&&Q[2].toLowerCase();if(ee)F.indexOf(ee)!==-1&&(O.push(B),Z=ee);else{var se=B.length;if(W+se<P)O.push(B),W+=se;else if(W<P){var oe=P-W;Z&&(Z!=="br"||oe<=G||se<=G)&&O.pop(),P>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 $(k){return k.replace(z,function(C,P){var F;return P.charAt(0)==="#"?F=N(P.charAt(1)==="x"?parseInt(P.substr(2),16):parseInt(P.substr(1),10)):F=L[P],F||C})}t.convertEntities=$;function N(k){if(!(k>1114111)){var C=String.fromCodePoint;if(C)return C(k);var P=String.fromCharCode;return k<=65535?P(k):P((k>>10)+55232,k%1024+56320)}}function I(k,C){C=C.replace(y," ");var P=!1,F=[],j,G=-1;function X(){G++;var de=document.createElementNS(i.svg,"tspan");e.select(de).attr({class:"line",dy:G*n+"em"}),k.appendChild(de),j=de;var Me=F;if(F=[{node:de}],Me.length>1)for(var De=1;De<Me.length;De++)O(Me[De])}function O(de){var Me=de.type,De={},ue;if(Me==="a"){ue="a";var Te=de.target,Se=de.href,J=de.popup;Se&&(De={"xlink:xlink:show":Te==="_blank"||Te.charAt(0)!=="_"?"new":"replace",target:Te,"xlink:xlink:href":Se},J&&(De.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+J+'");return false;'))}else ue="tspan";de.style&&(De.style=de.style);var _e=document.createElementNS(i.svg,ue);if(Me==="sup"||Me==="sub"){Z(j,h),j.appendChild(_e);var re=document.createElementNS(i.svg,"tspan");Z(re,h),e.select(re).attr("dy",d[Me]),De.dy=p[Me],j.appendChild(_e),j.appendChild(re)}else j.appendChild(_e);e.select(_e).attr(De),j=de.node=_e,F.push(de)}function Z(de,Me){de.appendChild(document.createTextNode(Me))}function W(de){if(F.length===1){r.log("Ignoring unexpected end tag </"+de+">.",C);return}var Me=F.pop();de!==Me.type&&r.log("Start tag <"+Me.type+"> doesnt match end tag <"+de+">. Pretending it did match.",C),j=F[F.length-1].node}var Y=g.test(C);Y?X():(j=k,F=[{node:k}]);for(var B=C.split(b),Q=0;Q<B.length;Q++){var ee=B[Q],se=ee.match(_),oe=se&&se[2].toLowerCase(),fe=v[oe];if(oe==="br")X();else if(fe===void 0)Z(j,$(ee));else if(se[1])W(oe);else{var pe=se[4],ge={type:oe},be=M(pe,x);if(be?(be=be.replace(S,"$1 fill:"),fe&&(be+=";"+fe)):fe&&(be=fe),be&&(ge.style=be),oe==="a"){P=!0;var we=M(pe,w);if(we){var ye=H(we);ye&&(ge.href=ye,ge.target=M(pe,T)||"_blank",ge.popup=M(pe,A))}}O(ge)}}return P}function H(k){var C=encodeURI(decodeURI(k)),P=document.createElement("a"),F=document.createElement("a");P.href=k,F.href=C;var j=P.protocol,G=F.protocol;return m.indexOf(j)!==-1&&m.indexOf(G)!==-1?C:""}t.sanitizeHTML=function(C){C=C.replace(y," ");for(var P=document.createElement("p"),F=P,j=[],G=C.split(b),X=0;X<G.length;X++){var O=G[X],Z=O.match(_),W=Z&&Z[2].toLowerCase();if(W in v)if(Z[1])j.length&&(F=j.pop());else{var Y=Z[4],B=M(Y,x),Q=B?{style:B}:{};if(W==="a"){var ee=M(Y,w);if(ee){var se=H(ee);if(se){Q.href=se;var oe=M(Y,T);oe&&(Q.target=oe)}}}var fe=document.createElement(W);F.appendChild(fe),e.select(fe).attr(Q),F=fe,j.push(fe)}else F.appendChild(document.createTextNode($(O)))}var pe="innerHTML";return P[pe]},t.lineCount=function(C){return C.selectAll("tspan.line").size()||1},t.positionText=function(C,P,F){return C.each(function(){var j=e.select(this);function G(Z,W){return W===void 0?(W=j.attr(Z),W===null&&(j.attr(Z,0),W=0)):j.attr(Z,W),W}var X=G("x",P),O=G("y",F);this.nodeName==="text"&&j.selectAll("tspan.line").attr({x:X,y:O})})};function D(k,C,P){var F=P.horizontalAlign,j=P.verticalAlign||"top",G=k.node().getBoundingClientRect(),X=C.node().getBoundingClientRect(),O,Z,W;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},F==="right"?W=function(){return G.right-O.width}:F==="center"?W=function(){return G.left+(G.width-O.width)/2}:W=function(){return G.left},function(){O=this.node().getBoundingClientRect();var Y=W()-X.left,B=Z()-X.top,Q=P.gd||{};if(P.gd){Q._fullLayout._calcInverseTransform(Q);var ee=r.apply3DTransform(Q._fullLayout._invTransform)(Y,B);Y=ee[0],B=ee[1]}return this.style({top:B+"px",left:Y+"px","z-index":1e3}),this}}var E="1px ";t.makeTextShadow=function(k){var C=E,P=E,F=E;return C+P+F+k+", -"+C+"-"+P+F+k+", "+C+"-"+P+F+k+", -"+C+P+F+k},t.makeEditable=function(k,C){var P=C.gd,F=C.delegate,j=e.dispatch("edit","input","cancel"),G=F||k;if(k.style({"pointer-events":F?"none":"all"}),k.size()!==1)throw new Error("boo");function X(){Z(),k.style({opacity:0});var W=G.attr("class"),Y;W?Y="."+W.split(" ")[0]+"-math-group":Y="[class*=-math-group]",Y&&e.select(k.node().parentNode).select(Y).style({opacity:0})}function O(W){var Y=W.node(),B=document.createRange();B.selectNodeContents(Y);var Q=window.getSelection();Q.removeAllRanges(),Q.addRange(B),Y.focus()}function Z(){var W=e.select(P),Y=W.select(".svg-container"),B=Y.append("div"),Q=k.node().style,ee=parseFloat(Q.fontSize||12),se=C.text;se===void 0&&(se=k.attr("data-unformatted")),B.classed("plugin-editable editable",!0).style({position:"absolute","font-family":Q.fontFamily||"Arial","font-size":ee,color:C.fill||Q.fill||"black",opacity:1,"background-color":C.background||"transparent",outline:"#ffffff33 1px solid",margin:[-ee/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(se).call(D(k,Y,C)).on("blur",function(){P._editing=!1,k.text(this.textContent).style({opacity:1});var oe=e.select(this).attr("class"),fe;oe?fe="."+oe.split(" ")[0]+"-math-group":fe="[class*=-math-group]",fe&&e.select(k.node().parentNode).select(fe).style({opacity:0});var pe=this.textContent;e.select(this).transition().duration(0).remove(),e.select(document).on("mouseup",null),j.edit.call(k,pe)}).on("focus",function(){var oe=this;P._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?(P._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,Y,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")}})(or);var _w={exports:{}},wC=ut,Ff=Ta,Fl=ht,$s=xe,Qm=ct,TC=No.isValid;function kC(t,e,r){var a=e?$s.nestedProperty(t,e).get()||{}:t,i=a[r||"color"];i&&i._inputArray&&(i=i._inputArray);var n=!1;if($s.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(Fl(i[o])){n=!0;break}}return $s.isPlainObject(a)&&(n||a.showscale===!0||Fl(a.cmin)&&Fl(a.cmax)||TC(a.colorscale)||$s.isPlainObject(a.colorbar))}var Jm=["showscale","autocolorscale","colorscale","reversescale","colorbar"],ol=["min","max","mid","auto"];function ww(t){var e=t._colorAx,r=e||t,a={},i,n,o;for(n=0;n<Jm.length;n++)o=Jm[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 Tw(t){for(var e=ww(t),r=e.min,a=e.max,i=e.reversescale?kw(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 kw(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 Aw(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=Ff(a[o]).toRgb();n[o]=[l.r,l.g,l.b,l.a]}var s=wC.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 ey(s(v))}:c?u=function(v){return Fl(v)?s(v):Ff(v).isValid()?v:Qm.defaultLine}:u=function(v){return Fl(v)?ey(s(v)):Ff(v).isValid()?v:Qm.defaultLine},u.domain=s.domain,u.range=function(){return a},u}function AC(t,e){return Aw(Tw(t),e)}function ey(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return Ff(e).toRgbString()}var Ma={hasColorscale:kC,extractOpts:ww,extractScale:Tw,flipScale:kw,makeColorScaleFunc:Aw,makeColorScaleFuncFromTrace:AC},Mw=B_,MC=Mw.FORMAT_LINK,SC=Mw.DATE_FORMAT_LINK;function LC(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?Sw:Lw)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}}function Sw(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: "+MC+"."].join(" ")}function Lw(t,e){return Sw(t,e)+[" And for dates see: "+SC+".","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 Wo={axisHoverFormat:LC,descriptionWithDates:Lw},ty=fr,fo=Tr,Cw=$r.dash,lp=Rt.extendFlat,ry=Lt.templatedArray,CC=cr.templateFormatStringDescription,ay=Wo.descriptionWithDates,DC=Xt.ONEDAY,za=gr,$u=za.HOUR_PATTERN,Nu=za.WEEKDAY_PATTERN,$f={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(" ")},PC=lp({},$f,{values:$f.values.slice().concat(["sync"]),description:[$f.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function iy(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 ny={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(" ")},oy={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(" ")},ly={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(" ")},sy={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 fy(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return t||(e.dflt=5),e}function cy(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return t||(e.dflt=1),e}var uy={valType:"color",dflt:fo.defaultLine,editType:"ticks",description:"Sets the tick color."},vy={valType:"color",dflt:fo.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function dy(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 hy=lp({},Cw,{editType:"ticks"}),py={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(" ")},Oa={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:fo.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:ty({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:[za.idRegex.x.toString(),za.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:[za.idRegex.x.toString(),za.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:ry("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:[Nu,$u,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+Nu+"* - 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 *"+$u+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+Nu+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+$u+"', 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:DC,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:PC,nticks:iy(),tick0:ny,dtick:oy,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:ly,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:sy,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:fy(),tickwidth:cy(),tickcolor:uy,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:lp({},Cw,{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:ty({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:ay("tick label")},tickformatstops:ry("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:ay("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.",CC()].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:fo.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:py,gridcolor:vy,gridwidth:dy(),griddash:hy,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:fo.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:fo.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",za.idRegex.x.toString(),za.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",za.idRegex.x.toString(),za.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:$f,nticks:iy("minor"),tick0:ny,dtick:oy,tickvals:ly,ticks:sy,ticklen:fy("minor"),tickwidth:cy("minor"),tickcolor:uy,gridcolor:vy,gridwidth:dy("minor"),griddash:hy,showgrid:py,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"},Et=Oa,my=fr,yy=Rt.extendFlat,EC=Na.overrideAll,sp=EC({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:Et.linecolor,outlinewidth:Et.linewidth,bordercolor:Et.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:Et.minor.tickmode,nticks:Et.nticks,tick0:Et.tick0,dtick:Et.dtick,tickvals:Et.tickvals,ticktext:Et.ticktext,ticks:yy({},Et.ticks,{dflt:""}),ticklabeloverflow:yy({},Et.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:Et.ticklen,tickwidth:Et.tickwidth,tickcolor:Et.tickcolor,ticklabelstep:Et.ticklabelstep,showticklabels:Et.showticklabels,labelalias:Et.labelalias,tickfont:my({description:"Sets the color bar's tick label font"}),tickangle:Et.tickangle,tickformat:Et.tickformat,tickformatstops:Et.tickformatstops,tickprefix:Et.tickprefix,showtickprefix:Et.showtickprefix,ticksuffix:Et.ticksuffix,showticksuffix:Et.showticksuffix,separatethousands:Et.separatethousands,exponentformat:Et.exponentformat,minexponent:Et.minexponent,showexponent:Et.showexponent,title:{text:{valType:"string",description:"Sets the title of the color bar."},font:my({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"),zC=sp,RC=Ho.counter,IC=Qh,Dw=No.scales,FC=IC(Dw);function ll(t){return"`"+t+"`"}var Ln=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"?Dw[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.":"",p=a+"auto",d=a+"min",h=a+"max",m=a+"mid",y=ll(f+p),b=ll(f+d),_=ll(f+h),g=b+" and "+_,x={};x[d]=x[h]=void 0;var w={};w[p]=!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[p]={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[h]={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: "+FC+"."].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=zC),r.noColorAxis||(T.coloraxis={valType:"subplotid",regex:RC("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},$C=Rt.extendFlat,NC=Ln,Hu=No.scales,Ou="Note that `autocolorscale` must be true for this attribute to work.",Pw={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Hu.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",Ou].join(" ")},sequentialminus:{valType:"colorscale",dflt:Hu.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",Ou].join(" ")},diverging:{valType:"colorscale",dflt:Hu.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",Ou].join(" ")}},coloraxis:$C({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},NC("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))},HC=xe,Ew=function(e){return HC.isPlainObject(e.colorbar)},Kc={},Nd=ht,gy=xe,zw=Xt,OC=zw.ONEDAY,jC=zw.ONEWEEK;Kc.dtick=function(t,e){var r=e==="log",a=e==="date",i=e==="category",n=a?OC:1;if(!t)return n;if(Nd(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=Nd(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};Kc.tick0=function(t,e,r,a){if(e==="date")return gy.cleanDate(t,gy.dateTick0(r,a%jC===0?1:0));if(!(a==="D1"||a==="D2"))return Nd(t)?Number(t):0};var by=Kc,BC=xe.isArrayOrTypedArray,GC=Wt.isTypedArraySpec,UC=Wt.decodeTypedArraySpec,Rw=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 GC(_)&&(_=UC(_)),_!==void 0?_:(s._template||{})[b]}var u=c("tick0"),v=c("dtick"),p=c("tickvals"),d=BC(p)?"array":v?"linear":"auto",h=a(f+"tickmode",d);if(h==="auto"||h==="sync")a(f+"nticks");else if(h==="linear"){var m=s.dtick=by.dtick(v,i);s.tick0=by.tick0(u,i,r.calendar,m)}else if(i!=="multicategory"){var y=a(f+"tickvals");y===void 0?s.tickmode="auto":o||a("ticktext")}},ju=xe,xy=Oa,Iw=function(e,r,a,i){var n=i.isMinor,o=n?e.minor||{}:e,l=n?r.minor:r,s=n?xy.minor:xy,f=n?"minor.":"",c=ju.coerce2(o,l,s,"ticklen",n?(r.ticklen||5)*.6:void 0),u=ju.coerce2(o,l,s,"tickwidth",n?r.tickwidth||1:void 0),v=ju.coerce2(o,l,s,"tickcolor",(n?r.tickcolor:void 0)||l.color),p=a(f+"ticks",!n&&i.outerTicks||c||u||v?"outside":"");p||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)},Fw=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=xe,VC=Lt,ja=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=VC.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 p=f.defaultItems();for(c=0;c<p.length;c++)u=p[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},Hd=xe,WC=ct.contrast,$w=Oa,XC=Fw,YC=ja,Nw=function(e,r,a,i,n){n||(n={});var o=a("labelalias");Hd.isPlainObject(o)||delete r.labelalias;var l=XC(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?WC(n.bgColor):c&&c!==$w.color.dflt?c:f.color;if(Hd.coerceFont(a,"tickfont",f,{overrideDflt:{color:v}}),!n.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&a("ticklabelstep"),!n.noAng){var p=a("tickangle");!n.noAutotickangles&&p==="auto"&&a("autotickangles")}if(i!=="category"){var d=a("tickformat");YC(e,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:qC}),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 qC(t,e){function r(i,n){return Hd.coerce(t,e,$w.tickformatstops,i,n)}var a=r("enabled");a&&(r("dtickrange"),r("value"))}var ZC=Fw,Hw=function(e,r,a,i,n){n||(n={});var o=n.tickSuffixDflt,l=ZC(e),s=a("tickprefix");s&&a("showtickprefix",l);var f=a("ticksuffix",o);f&&a("showticksuffix",l)},si=xe,KC=Lt,QC=Rw,JC=Iw,eD=Nw,tD=Hw,rD=sp,Ow=function(e,r,a){var i=KC.newContainer(r,"colorbar"),n=e.colorbar||{};function o(L,z){return si.coerce(n,i,rD,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 p=o("lenmode");o("len",p==="fraction"?1:u?f:s);var d=o("yref"),h=o("xref"),m=d==="paper",y=h==="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),si.coerce(n,i,{x:{valType:"number",min:y?-2:0,max:y?3:1,dflt:b}},"x"),si.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"),si.noneOrAll(n,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var w=si.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"),QC(n,i,o,"linear");var T=a.font,A={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,font:T};w.indexOf("inside")!==-1&&(A.bgColor="black"),tD(n,i,o,"linear",A),eD(n,i,o,"linear",A),JC(n,i,o,"linear"),o("title.text",a._dfltTitle.colorbar);var M=i.showticklabels?i.tickfont:T,S=si.extendFlat({},T,{family:M.family,size:si.bigFont(M.size)});si.coerceFont(o,"title.font",S),o("title.side",u?"top":"right")},_y=ht,Od=xe,aD=Ew,iD=Ow,wy=No.isValid,nD=Je.traceIs;function Bu(t,e){var r=e.slice(0,e.length-1);return e?Od.nestedProperty(t,r).get()||{}:t}var bs=function t(e,r,a,i,n){var o=n.prefix,l=n.cLetter,s="_module"in r,f=Bu(e,o),c=Bu(r,o),u=Bu(r._template||{},o)||{},v=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,a,i,n)};if(s){var p=a._colorAxes||{},d=i(o+"coloraxis");if(d){var h=nD(r,"contour")&&Od.nestedProperty(r,"contours.coloring").get()||"heatmap",m=p[d];m?(m[2].push(v),m[0]!==h&&(m[0]=!1,Od.warn(["Ignoring coloraxis:",d,"setting","as it is linked to incompatible colorscales."].join(" ")))):p[d]=[h,r,[v]];return}}var y=f[l+"min"],b=f[l+"max"],_=_y(y)&&_y(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=!wy(x)),w!==void 0&&(T=!wy(w)),i(o+"autocolorscale",T),i(o+"colorscale"),i(o+"reversescale"),o!=="marker.line."){var A;o&&s&&(A=aD(f));var M=i(o+"showscale",A);M&&(o&&u&&(c._template=u),iD(f,c,a))}},Ty=xe,oD=Lt,ky=Pw,lD=bs,sD=function(e,r){function a(u,v){return Ty.coerce(e,r,ky,u,v)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var i=r._colorAxes,n,o;function l(u,v){return Ty.coerce(n,o,ky.coloraxis,u,v)}for(var s in i){var f=i[s];if(f[0])n=e[s]||{},o=oD.newContainer(r,s,"coloraxis"),o._name=s,lD(n,o,r,l,{prefix:"",cLetter:"c"});else{for(var c=0;c<f[2].length;c++)f[2][c]();delete r._colorAxes[s]}}},fD=xe,cD=Ma.hasColorscale,uD=Ma.extractOpts,vD=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?fD.nestedProperty(c,u.container).get():c;if(v)if(v.coloraxis)v._colorAx=r[v.coloraxis];else{var p=uD(v),d=p.auto;(d||p.min===void 0)&&a(v,u.min),(d||p.max===void 0)&&a(v,u.max),p.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);cD(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"})},Ay=ht,Gu=xe,dD=Ma.extractOpts,fp=function(e,r,a){var i=e._fullLayout,n=a.vals,o=a.containerStr,l=o?Gu.nestedProperty(r,o).get():r,s=dD(l),f=s.auto!==!1,c=s.min,u=s.max,v=s.mid,p=function(){return Gu.aggNums(Math.min,null,n)},d=function(){return Gu.aggNums(Math.max,null,n)};if(c===void 0?c=p():f&&(l._colorAx&&Ay(c)?c=Math.min(c,p()):c=p()),u===void 0?u=d():f&&(l._colorAx&&Ay(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 h;c*u<0?h=i.colorscale.diverging:c>=0?h=i.colorscale.sequential:h=i.colorscale.sequentialminus,s._sync("colorscale",h)}},Hs=No,Fn=Ma,Mo={moduleType:"component",name:"colorscale",attributes:Ln,layoutAttributes:Pw,supplyLayoutDefaults:sD,handleDefaults:bs,crossTraceDefaults:vD,calc:fp,scales:Hs.scales,defaultScale:Hs.defaultScale,getScale:Hs.get,isValidScale:Hs.isValid,hasColorscale:Fn.hasColorscale,extractOpts:Fn.extractOpts,extractScale:Fn.extractScale,flipScale:Fn.flipScale,makeColorScaleFunc:Fn.makeColorScaleFunc,makeColorScaleFuncFromTrace:Fn.makeColorScaleFuncFromTrace},My=xe,hD=Wt.isTypedArraySpec,kr={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 My.isPlainObject(e)&&(My.isArrayOrTypedArray(e.size)||hD(e.size))}},pD=ht,jw=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 pD(s)&&s>0?Math.max(s,n):0}},la={};(function(t){var e=xe;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],p=a(v);if(l[p]===void 0){var d=e.nestedProperty(s,v).get(),h=i(d,f);h!==void 0&&(l[p]=h)}}},t.appendArrayMultiPointValues=function(l,s,f){var c=s._arrayAttrs;if(c)for(var u=0;u<c.length;u++){var v=c[u],p=a(v);if(l[p]===void 0){for(var d=e.nestedProperty(s,v).get(),h=new Array(f.length),m=0;m<f.length;m++)h[m]=i(d,f[m]);l[p]=h}}};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]}})(la);var Uu,Sy;function mD(){if(Sy)return Uu;Sy=1;var t=o_,e=function(d,h){return h?Math.round(d*(h=Math.pow(10,h)))/h:Math.round(d)},r="M0,0Z",a=Math.sqrt(2),i=Math.sqrt(3),n=Math.PI,o=Math.cos,l=Math.sin;Uu={circle:{n:0,f:function(d,h,m){if(s(h))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?p(h,m,b):b}},square:{n:1,f:function(d,h,m){if(s(h))return r;var y=e(d,2);return p(h,m,"M"+y+","+y+"H-"+y+"V-"+y+"H"+y+"Z")}},diamond:{n:2,f:function(d,h,m){if(s(h))return r;var y=e(d*1.3,2);return p(h,m,"M"+y+",0L0,"+y+"L-"+y+",0L0,-"+y+"Z")}},cross:{n:3,f:function(d,h,m){if(s(h))return r;var y=e(d*.4,2),b=e(d*1.2,2);return p(h,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,h,m){if(s(h))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 p(h,m,"M0,"+y+b+_+g+_+g+x+g+x+b+x+b+"Z")}},"triangle-up":{n:5,f:function(d,h,m){if(s(h))return r;var y=e(d*2/i,2),b=e(d/2,2),_=e(d,2);return p(h,m,"M-"+y+","+b+"H"+y+"L0,-"+_+"Z")}},"triangle-down":{n:6,f:function(d,h,m){if(s(h))return r;var y=e(d*2/i,2),b=e(d/2,2),_=e(d,2);return p(h,m,"M-"+y+",-"+b+"H"+y+"L0,"+_+"Z")}},"triangle-left":{n:7,f:function(d,h,m){if(s(h))return r;var y=e(d*2/i,2),b=e(d/2,2),_=e(d,2);return p(h,m,"M"+b+",-"+y+"V"+y+"L-"+_+",0Z")}},"triangle-right":{n:8,f:function(d,h,m){if(s(h))return r;var y=e(d*2/i,2),b=e(d/2,2),_=e(d,2);return p(h,m,"M-"+b+",-"+y+"V"+y+"L"+_+",0Z")}},"triangle-ne":{n:9,f:function(d,h,m){if(s(h))return r;var y=e(d*.6,2),b=e(d*1.2,2);return p(h,m,"M-"+b+",-"+y+"H"+y+"V"+b+"Z")}},"triangle-se":{n:10,f:function(d,h,m){if(s(h))return r;var y=e(d*.6,2),b=e(d*1.2,2);return p(h,m,"M"+y+",-"+b+"V"+y+"H-"+b+"Z")}},"triangle-sw":{n:11,f:function(d,h,m){if(s(h))return r;var y=e(d*.6,2),b=e(d*1.2,2);return p(h,m,"M"+b+","+y+"H-"+y+"V-"+b+"Z")}},"triangle-nw":{n:12,f:function(d,h,m){if(s(h))return r;var y=e(d*.6,2),b=e(d*1.2,2);return p(h,m,"M-"+y+","+b+"V-"+y+"H"+b+"Z")}},pentagon:{n:13,f:function(d,h,m){if(s(h))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 p(h,m,"M"+y+","+g+"L"+b+","+x+"H-"+b+"L-"+y+","+g+"L0,"+_+"Z")}},hexagon:{n:14,f:function(d,h,m){if(s(h))return r;var y=e(d,2),b=e(d/2,2),_=e(d*i/2,2);return p(h,m,"M"+_+",-"+b+"V"+b+"L0,"+y+"L-"+_+","+b+"V-"+b+"L0,-"+y+"Z")}},hexagon2:{n:15,f:function(d,h,m){if(s(h))return r;var y=e(d,2),b=e(d/2,2),_=e(d*i/2,2);return p(h,m,"M-"+b+","+_+"H"+b+"L"+y+",0L"+b+",-"+_+"H-"+b+"L-"+y+",0Z")}},octagon:{n:16,f:function(d,h,m){if(s(h))return r;var y=e(d*.924,2),b=e(d*.383,2);return p(h,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,h,m){if(s(h))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 p(h,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,h,m){if(s(h))return r;var y=e(d*.66,2),b=e(d*.38,2),_=e(d*.76,2);return p(h,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,h,m){if(s(h))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 p(h,m,"M-"+y+","+b+x+y+","+b+x+"0,-"+_+x+"-"+y+","+b+"Z")}},"star-triangle-down":{n:20,f:function(d,h,m){if(s(h))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 p(h,m,"M"+y+",-"+b+x+"-"+y+",-"+b+x+"0,"+_+x+y+",-"+b+"Z")}},"star-square":{n:21,f:function(d,h,m){if(s(h))return r;var y=e(d*1.1,2),b=e(d*2,2),_="A "+b+","+b+" 0 0 1 ";return p(h,m,"M-"+y+",-"+y+_+"-"+y+","+y+_+y+","+y+_+y+",-"+y+_+"-"+y+",-"+y+"Z")}},"star-diamond":{n:22,f:function(d,h,m){if(s(h))return r;var y=e(d*1.4,2),b=e(d*1.9,2),_="A "+b+","+b+" 0 0 1 ";return p(h,m,"M-"+y+",0"+_+"0,"+y+_+y+",0"+_+"0,-"+y+_+"-"+y+",0Z")}},"diamond-tall":{n:23,f:function(d,h,m){if(s(h))return r;var y=e(d*.7,2),b=e(d*1.4,2);return p(h,m,"M0,"+b+"L"+y+",0L0,-"+b+"L-"+y+",0Z")}},"diamond-wide":{n:24,f:function(d,h,m){if(s(h))return r;var y=e(d*1.4,2),b=e(d*.7,2);return p(h,m,"M0,"+b+"L"+y+",0L0,-"+b+"L-"+y+",0Z")}},hourglass:{n:25,f:function(d,h,m){if(s(h))return r;var y=e(d,2);return p(h,m,"M"+y+","+y+"H-"+y+"L"+y+",-"+y+"H-"+y+"Z")},noDot:!0},bowtie:{n:26,f:function(d,h,m){if(s(h))return r;var y=e(d,2);return p(h,m,"M"+y+","+y+"V-"+y+"L-"+y+","+y+"V-"+y+"Z")},noDot:!0},"circle-cross":{n:27,f:function(d,h,m){if(s(h))return r;var y=e(d,2);return p(h,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,h,m){if(s(h))return r;var y=e(d,2),b=e(d/a,2);return p(h,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,h,m){if(s(h))return r;var y=e(d,2);return p(h,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,h,m){if(s(h))return r;var y=e(d,2);return p(h,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,h,m){if(s(h))return r;var y=e(d*1.3,2);return p(h,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,h,m){if(s(h))return r;var y=e(d*1.3,2),b=e(d*.65,2);return p(h,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,h,m){if(s(h))return r;var y=e(d*1.4,2);return p(h,m,"M0,"+y+"V-"+y+"M"+y+",0H-"+y)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(d,h,m){if(s(h))return r;var y=e(d,2);return p(h,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,h,m){if(s(h))return r;var y=e(d*1.2,2),b=e(d*.85,2);return p(h,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,h,m){if(s(h))return r;var y=e(d/2,2),b=e(d,2);return p(h,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,h,m){if(s(h))return r;var y=e(d*1.2,2),b=e(d*1.6,2),_=e(d*.8,2);return p(h,m,"M-"+y+","+_+"L0,0M"+y+","+_+"L0,0M0,-"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(d,h,m){if(s(h))return r;var y=e(d*1.2,2),b=e(d*1.6,2),_=e(d*.8,2);return p(h,m,"M-"+y+",-"+_+"L0,0M"+y+",-"+_+"L0,0M0,"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(d,h,m){if(s(h))return r;var y=e(d*1.2,2),b=e(d*1.6,2),_=e(d*.8,2);return p(h,m,"M"+_+","+y+"L0,0M"+_+",-"+y+"L0,0M-"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(d,h,m){if(s(h))return r;var y=e(d*1.2,2),b=e(d*1.6,2),_=e(d*.8,2);return p(h,m,"M-"+_+","+y+"L0,0M-"+_+",-"+y+"L0,0M"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(d,h,m){if(s(h))return r;var y=e(d*1.4,2);return p(h,m,"M"+y+",0H-"+y)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(d,h,m){if(s(h))return r;var y=e(d*1.4,2);return p(h,m,"M0,"+y+"V-"+y)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(d,h,m){if(s(h))return r;var y=e(d,2);return p(h,m,"M"+y+",-"+y+"L-"+y+","+y)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(d,h,m){if(s(h))return r;var y=e(d,2);return p(h,m,"M"+y+","+y+"L-"+y+",-"+y)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(d,h,m){if(s(h))return r;var y=e(d,2),b=e(d*2,2);return p(h,m,"M0,0L-"+y+","+b+"H"+y+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(d,h,m){if(s(h))return r;var y=e(d,2),b=e(d*2,2);return p(h,m,"M0,0L-"+y+",-"+b+"H"+y+"Z")},noDot:!0},"arrow-left":{n:47,f:function(d,h,m){if(s(h))return r;var y=e(d*2,2),b=e(d,2);return p(h,m,"M0,0L"+y+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-right":{n:48,f:function(d,h,m){if(s(h))return r;var y=e(d*2,2),b=e(d,2);return p(h,m,"M0,0L-"+y+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(d,h,m){if(s(h))return r;var y=e(d,2),b=e(d*2,2);return p(h,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,h,m){if(s(h))return r;var y=e(d,2),b=e(d*2,2);return p(h,m,"M-"+y+",0H"+y+"M0,0L-"+y+",-"+b+"H"+y+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(d,h,m){if(s(h))return r;var y=e(d*2,2),b=e(d,2);return p(h,m,"M0,-"+b+"V"+b+"M0,0L"+y+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(d,h,m){if(s(h))return r;var y=e(d*2,2),b=e(d,2);return p(h,m,"M0,-"+b+"V"+b+"M0,0L-"+y+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(d,h,m){if(s(h))return r;var y=n/2.5,b=2*d*o(y),_=2*d*l(y);return p(h,m,"M0,0L"+-b+","+_+"L"+b+","+_+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(d,h,m){if(s(h))return r;var y=n/4,b=2*d*o(y),_=2*d*l(y);return p(h,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 p(d,h,m){if((!d||d%360===0)&&!h)return m;if(u===d&&v===h&&f===m)return c;u=d,v=h,f=m;function y(N,I){var H=o(N),D=l(N),E=I[0],k=I[1]+(h||0);return[E*H-k*D,E*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 $=y(b,[_,g]);(M==="H"||M==="V")&&(M="L"),(M==="M"||M==="L"||M==="m"||M==="l")&&(A[1]=$[0],A[2]=$[1]),A[0]=M,w+=A[0]+A.slice(1).join(",")}return c=w,w}return Uu}var nr=ut,St=xe,yD=St.numberFormat,mn=ht,jd=Ta,Qc=Je,hr=ct,gD=Mo,Wl=St.strTranslate,Jc=or,bD=Vo,xD=Sr,_D=xD.LINE_SPACING,Bw=ps.DESELECTDIM,wD=kr,TD=jw,kD=la.appendArrayPointValue,Ve=_w.exports={};Ve.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(hr.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",Vu(MD(c))),s&&t.style("text-shadow",s==="auto"?Jc.makeTextShadow(hr.contrast(n)):Vu(s)),f&&t.style("text-decoration-line",Vu(SD(f)))};function Vu(t){return t==="none"?void 0:t}var AD={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function MD(t){return AD[t]}function SD(t){return t.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Ve.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)};Ve.setSize=function(t,e,r){t.attr("width",e).attr("height",r)};Ve.setRect=function(t,e,r,a,i){t.call(Ve.setPosition,e,r).call(Ve.setSize,a,i)};Ve.translatePoint=function(t,e,r,a){var i=r.c2p(t.x),n=a.c2p(t.y);if(mn(i)&&mn(n)&&e.node())e.node().nodeName==="text"?e.attr("x",i).attr("y",n):e.attr("transform",Wl(i,n));else return!1;return!0};Ve.translatePoints=function(t,e,r){t.each(function(a){var i=nr.select(this);Ve.translatePoint(a,i,e,r)})};Ve.hideOutsideRangePoint=function(t,e,r,a,i,n){e.attr("display",r.isPtWithinRange(t,i)&&a.isPtWithinRange(t,n)?null:"none")};Ve.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){Ve.hideOutsideRangePoint(f,nr.select(this),r,a,o,l)})})}};Ve.crispRound=function(t,e,r){return!e||!mn(e)?r||0:t._context.staticPlot?e:e<1?1:Math.round(e)};Ve.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||"";hr.stroke(e,a||n.color),Ve.dashLine(e,l,o)};Ve.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||"";nr.select(this).call(hr.stroke,r||n.color).call(Ve.dashLine,l,o)})};Ve.dashLine=function(t,e,r){r=+r||0,e=Ve.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})};Ve.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 Gw(t,e,r,a){var i=e.fillpattern,n=e.fillgradient,o=Ve.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),p=e.uid;Ve.pattern(t,"point",r,p,l,u,v,void 0,i.fillmode,s,f,c)}else if(n&&n.type!=="none"){var d=n.type,h="scatterfill-"+e.uid;if(a&&(h="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(Ww,r,h,"linear",n.colorscale,"fill",m,y,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),t.call(Ve.gradient,r,h,d,n.colorscale,"fill")}else e.fillcolor&&t.call(hr.fill,e.fillcolor)}Ve.singleFillStyle=function(t,e){var r=nr.select(t.node()),a=r.data(),i=((a[0]||[])[0]||{}).trace||{};Gw(t,i,e,!1)};Ve.fillGroupStyle=function(t,e,r){t.style("stroke-width",0).each(function(a){var i=nr.select(this);a[0].trace&&Gw(i,a[0].trace,e,r)})};var Ly=mD();Ve.symbolNames=[];Ve.symbolFuncs=[];Ve.symbolBackOffs=[];Ve.symbolNeedLines={};Ve.symbolNoDot={};Ve.symbolNoFill={};Ve.symbolList=[];Object.keys(Ly).forEach(function(t){var e=Ly[t],r=e.n;Ve.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),Ve.symbolNames[r]=t,Ve.symbolFuncs[r]=e.f,Ve.symbolBackOffs[r]=e.backoff||0,e.needLine&&(Ve.symbolNeedLines[r]=!0),e.noDot?Ve.symbolNoDot[r]=!0:Ve.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(Ve.symbolNoFill[r]=!0)});var LD=Ve.symbolNames.length,CD="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ve.symbolNumber=function(t){if(mn(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=Ve.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=LD||t>=400?0:Math.floor(Math.max(t,0))};function Uw(t,e,r,a){var i=t%100;return Ve.symbolFuncs[i](e,r,a)+(t>=200?CD:"")}var Cy=yD("~f"),Vw={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}};Ve.gradient=function(t,e,r,a,i,n){var o=Vw[a];return Ww(t,e,r,o.type,i,n,o.start,o.stop,!1,o.reversed)};function Ww(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),p=0;p<c;p++)u.reversed?v[c-1-p]=[Cy((1-i[p][0])*100),i[p][1]]:v[p]=[Cy(i[p][0]*100),i[p][1]];var d=e._fullLayout,h="g"+d._uid+"-"+r,m=d._defs.select(".gradients").selectAll("#"+h).data([a+v.join(";")],St.identity);m.exit().remove(),m.enter().append(u.node).each(function(){var y=nr.select(this);u.attrs&&y.attr(u.attrs),y.attr("id",h);var b=y.selectAll("stop").data(v);b.exit().remove(),b.enter().append("stop"),b.each(function(_){var g=jd(_[1]);nr.select(this).attr({offset:_[0]+"%","stop-color":hr.tinyRGB(g),"stop-opacity":g.getAlpha()})})}),t.style(n,cp(h,e)).style(n+"-opacity",null),t.classed("gradient_filled",!0)}Ve.pattern=function(t,e,r,a,i,n,o,l,s,f,c,u){var v=e==="legend";l&&(s==="overlay"?(f=l,c=hr.contrast(f)):(f=void 0,c=l));var p=r._fullLayout,d="p"+p._uid+"-"+a,h,m,y=function($,N,I,H,D){return H+(D-H)*($-N)/(I-N)},b,_,g,x,w={},T=jd(c),A=hr.tinyRGB(T),M=T.getAlpha(),S=u*M;switch(i){case"/":h=n*Math.sqrt(2),m=n*Math.sqrt(2),b="M-"+h/4+","+m/4+"l"+h/2+",-"+m/2+"M0,"+m+"L"+h+",0M"+h/4*3+","+m/4*5+"l"+h/2+",-"+m/2,_=o*n,x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case"\\":h=n*Math.sqrt(2),m=n*Math.sqrt(2),b="M"+h/4*3+",-"+m/4+"l"+h/2+","+m/2+"M0,0L"+h+","+m+"M-"+h/4+","+m/4*3+"l"+h/2+","+m/2,_=o*n,x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case"x":h=n*Math.sqrt(2),m=n*Math.sqrt(2),b="M-"+h/4+","+m/4+"l"+h/2+",-"+m/2+"M0,"+m+"L"+h+",0M"+h/4*3+","+m/4*5+"l"+h/2+",-"+m/2+"M"+h/4*3+",-"+m/4+"l"+h/2+","+m/2+"M0,0L"+h+","+m+"M-"+h/4+","+m/4*3+"l"+h/2+","+m/2,_=n-n*Math.sqrt(1-o),x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case"|":h=n,m=n,x="path",b="M"+h/2+",0L"+h/2+","+m,_=o*n,x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case"-":h=n,m=n,x="path",b="M0,"+m/2+"L"+h+","+m/2,_=o*n,x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case"+":h=n,m=n,x="path",b="M"+h/2+",0L"+h/2+","+m+"M0,"+m/2+"L"+h+","+m/2,_=n-n*Math.sqrt(1-o),x="path",w={d:b,opacity:S,stroke:A,"stroke-width":_+"px"};break;case".":h=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:h/2,cy:m/2,r:g,opacity:S,fill:A};break;default:h=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=p._defs.select(".patterns").selectAll("#"+d).data([L],St.identity);z.exit().remove(),z.enter().append("pattern").each(function(){var $=nr.select(this);if($.attr({id:d,width:h+"px",height:m+"px",patternUnits:"userSpaceOnUse",patternTransform:v?"scale(0.8)":""}),f){var N=jd(f),I=hr.tinyRGB(N),H=N.getAlpha(),D=$.selectAll("rect").data([0]);D.exit().remove(),D.enter().append("rect").attr({width:h+"px",height:m+"px",fill:I,"fill-opacity":H})}var E=$.selectAll(x).data([0]);E.exit().remove(),E.enter().append(x).attr(w)}),t.style("fill",cp(d,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)};Ve.initGradients=function(t){var e=t._fullLayout,r=St.ensureSingle(e._defs,"g","gradients");r.selectAll("linearGradient,radialGradient").remove(),nr.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)};Ve.initPatterns=function(t){var e=t._fullLayout,r=St.ensureSingle(e._defs,"g","patterns");r.selectAll("pattern").remove(),nr.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)};Ve.getPatternAttr=function(t,e,r){return t&&St.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t};Ve.pointStyle=function(t,e,r,a){if(t.size()){var i=Ve.makePointStyleFns(e);t.each(function(n){Ve.singlePointStyle(n,nr.select(this),e,i,r,a)})}};Ve.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=Ve.symbolNumber(t.mx||o.symbol)||0;t.om=f%200>=100;var c=vp(t,r),u=up(t,r);e.attr("d",Uw(f,s,c,u))}var v=!1,p,d,h;if(t.so)h=l.outlierwidth,d=l.outliercolor,p=o.outliercolor;else{var m=(l||{}).width;h=(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):St.isArrayOrTypedArray(l.color)?d=hr.defaultLine:d=l.color,St.isArrayOrTypedArray(o.color)&&(p=hr.defaultLine,v=!0),"mc"in t?p=t.mcc=a.markerScale(t.mc):p=o.color||o.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(p=a.selectedColorFn(t))}if(t.om)e.call(hr.stroke,p).style({"stroke-width":(h||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:h)+"px");var y=o.gradient,b=t.mgt;b?v=!0:b=y&&y.type,St.isArrayOrTypedArray(b)&&(b=b[0],Vw[b]||(b=0));var _=o.pattern,g=Ve.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),Ve.gradient(e,i,T,b,[[0,w],[1,p]],"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,$=g(_.size,t.i,8),N=g(_.solidity,t.i,.3);A=A||t.mcc||St.isArrayOrTypedArray(_.shape)||St.isArrayOrTypedArray(_.path)||St.isArrayOrTypedArray(_.bgcolor)||St.isArrayOrTypedArray(_.fgcolor)||St.isArrayOrTypedArray(_.size)||St.isArrayOrTypedArray(_.solidity);var I=r.uid;A&&(I+="-"+t.i),Ve.pattern(e,"point",i,I,x,$,N,t.mcc,_.fillmode,L,S,z)}else St.isArrayOrTypedArray(p)?hr.fill(e,p[t.i]):hr.fill(e,p);h&&hr.stroke(e,d)}};Ve.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=Ve.tryColorscale(r,""),e.lineScale=Ve.tryColorscale(r,"line"),Qc.traceIs(t,"symbols")&&(e.ms2mrc=wD.isBubble(t)?TD(t):function(){return(r.size||6)/2}),t.selectedpoints&&St.extendFlat(e,Ve.makeSelectedPointStyleFns(t)),e};Ve.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;(St.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:Bw*x});var v=i.color,p=n.color,d=o.color;(p||d)&&(e.selectedColorFn=function(g){var x=g.mcc||v;return g.selected?p||x:d||x});var h=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||h/2;return g.selected?b?m/2:x:_?y/2:x}),e};Ve.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:hr.addOpacity(u,Bw))},e};Ve.selectedPointStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Ve.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){hr.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",Uw(Ve.symbolNumber(l),s,vp(o,e),up(o,e))),o.mrc2=s}),i.length&&t.each(function(n){for(var o=nr.select(this),l=0;l<i.length;l++)i[l](o,n)})}};Ve.tryColorscale=function(t,e){var r=e?St.nestedProperty(t,e).get():t;if(r){var a=r.color;if((r.colorscale||r._colorAx)&&St.isArrayOrTypedArray(a))return gD.makeColorScaleFuncFromTrace(r)}return St.identity};var Wu={start:1,end:-1,middle:0,bottom:1,top:-1};function Xw(t,e,r,a,i){var n=nr.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=(Jc.lineCount(t)-1)*_D+1,c=Wu[l]*s,u=r*.75+Wu[o]*s+(Wu[o]-1)*f*r/2;t.attr("text-anchor",l),i||n.attr("transform",Wl(c,u))}function Yw(t,e){var r=t.ts||e.textfont.size;return mn(r)&&r>0?r:0}Ve.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var i=Ve.makeSelectedTextStyleFns(e);a=i.selectedTextColorFn}var n=e.texttemplate,o=r._fullLayout;t.each(function(l){var s=nr.select(this),f=n?St.extractOption(l,e,"txt","texttemplate"):St.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={};kD(v,e,l.i);var p=e._meta||{};f=St.texttemplateString(f,u,o._d3locale,v,l,p)}var d=l.tp||e.textposition,h=Yw(l,e),m=a?a(l):l.tc||e.textfont.color;s.call(Ve.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:h,color:m}).text(f).call(Jc.convertToTspans,r).call(Xw,d,h,l.mrc)})}};Ve.selectedTextStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Ve.makeSelectedTextStyleFns(e);t.each(function(a){var i=nr.select(this),n=r.selectedTextColorFn(a),o=a.tp||e.textposition,l=Yw(a,e);hr.fill(i,n);var s=Qc.traceIs(e,"bar-like");Xw(i,o,l,a.mrc2||a.mrc,s)})}};var Dy=.5;Ve.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(Nf(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};Ve.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r="M"+t[0],a=t.length-1,i=[Nf(t[a],t[0],t[1],e)],n;for(n=1;n<a;n++)i.push(Nf(t[n-1],t[n],t[n+1],e));for(i.push(Nf(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 qw,Zw;function co(t,e,r){return r&&(t=Kw(t)),e?cn(t[1]):fn(t[0])}function fn(t){var e=nr.round(t,2);return qw=e,e}function cn(t){var e=nr.round(t,2);return Zw=e,e}function Nf(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,Dy/2),f=Math.pow(o*o+l*l,Dy/2),c=(f*f*i-s*s*o)*a,u=(f*f*n-s*s*l)*a,v=3*f*(s+f),p=3*s*(s+f);return[[fn(e[0]+(v&&c/v)),cn(e[1]+(v&&u/v))],[fn(e[0]-(p&&c/p)),cn(e[1]-(p&&u/p))]]}var DD={hv:function(t,e,r){return"H"+fn(e[0])+"V"+co(e,1,r)},vh:function(t,e,r){return"V"+cn(e[1])+"H"+co(e,0,r)},hvh:function(t,e,r){return"H"+fn((t[0]+e[0])/2)+"V"+cn(e[1])+"H"+co(e,0,r)},vhv:function(t,e,r){return"V"+cn((t[1]+e[1])/2)+"H"+fn(e[0])+"V"+co(e,1,r)}},PD=function(t,e,r){return"L"+co(e,0,r)+","+co(e,1,r)};Ve.steps=function(t){var e=DD[t]||PD;return function(r){for(var a="M"+fn(r[0][0])+","+cn(r[0][1]),i=r.length,n=1;n<i;n++)a+=e(r[n-1],r[n],n===i-1);return a}};function Kw(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=St.isArrayOrTypedArray(r),l=t,s=e?e[0]:qw||0,f=e?e[1]:Zw||0,c=l[0],u=l[1],v=c-s,p=u-f,d=Math.atan2(p,v),h=o?r[n]:r;if(h==="auto"){var m=l.i;a.type==="scatter"&&m--;var y=l.marker,b=y.symbol;St.isArrayOrTypedArray(b)&&(b=b[m]);var _=y.size;St.isArrayOrTypedArray(_)&&(_=_[m]),h=y?Ve.symbolBackOffs[Ve.symbolNumber(b)]*_:0,h+=Ve.getMarkerStandoff(i[m],a)||0}var g=c-h*Math.cos(d),x=u-h*Math.sin(d);(g<=c&&g>=s||g>=c&&g<=s)&&(x<=u&&x>=f||x>=u&&x<=f)&&(t=[g,x])}return t}Ve.applyBackoff=Kw;Ve.makeTester=function(){var t=St.ensureSingleById(nr.select("body"),"svg","js-plotly-tester",function(r){r.attr(bD.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),e=St.ensureSingle(t,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ve.tester=t,Ve.testref=e};Ve.savedBBoxes={};var Xu=0,ED=1e4;Ve.bBox=function(t,e,r){r||(r=Py(t));var a;if(r){if(a=Ve.savedBBoxes[r],a)return St.extendFlat({},a)}else if(t.childNodes.length===1){var i=t.childNodes[0];if(r=Py(i),r){var n=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,l=i.getAttribute("transform");if(!l){var s=Ve.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=Ve.savedBBoxes[r],a)return St.extendFlat({},a)}}var f,c;e?f=t:(c=Ve.tester.node(),f=t.cloneNode(!0),c.appendChild(f)),nr.select(f).attr("transform",null).call(Jc.positionText,0,0);var u=f.getBoundingClientRect(),v=Ve.testref.node().getBoundingClientRect();e||c.removeChild(f);var p={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 Xu>=ED&&(Ve.savedBBoxes={},Xu=0),r&&(Ve.savedBBoxes[r]=p),Xu++,St.extendFlat({},p)};function Py(t){var e=t.getAttribute("data-unformatted");if(e!==null)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}Ve.setClipUrl=function(t,e,r){t.attr("clip-path",cp(e,r))};function cp(t,e){if(!t)return null;var r=e._context,a=r._exportedPlot?"":r._baseUrl||"";return a?"url('"+a+"#"+t+"')":"url(#"+t+")"}Ve.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}};Ve.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+=Wl(e,r),o=o.trim(),t[n]("transform",o),o};Ve.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}};Ve.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 zD=/\s*sc.*/;Ve.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(zD,"");i+=a,i=i.trim(),this.setAttribute("transform",i)})}};var RD=/translate\([^)]*\)\s*$/;Ve.setTextPointsScale=function(t,e,r){t&&t.each(function(){var a,i=nr.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(RD);e===1&&r===1?a=[]:a=[Wl(o,l),"scale("+e+","+r+")",Wl(-o,-l)],s&&a.push(s),i.attr("transform",a.join(""))}})};function up(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}Ve.getMarkerStandoff=up;var sl=Math.atan2,tn=Math.cos,uo=Math.sin;function Ey(t,e){var r=e[0],a=e[1];return[r*tn(t)-a*uo(t),r*uo(t)+a*tn(t)]}var zy,Ry,Iy,Fy,Yu,qu;function vp(t,e){var r=t.ma;r===void 0&&(r=e.marker.angle,(!r||St.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]),p=sl(v[1]-i,v[0]-a),d=sl(u[1]-i,u[0]-a),h;if(n==="north")h=r/180*Math.PI;else if(n==="previous"){var m=f/180*Math.PI,y=c/180*Math.PI,b=zy/180*Math.PI,_=Ry/180*Math.PI,g=b-m,x=tn(_)*uo(g),w=uo(_)*tn(y)-tn(_)*uo(y)*tn(g);h=-sl(x,w)-Math.PI,zy=f,Ry=c}var T=Ey(p,[tn(h),0]),A=Ey(d,[uo(h),0]);r=sl(T[1]+A[1],T[0]+A[0])/Math.PI*180,n==="previous"&&!(qu===e.uid&&t.i===Yu+1)&&(r=null)}if(n==="previous"&&!e._geo)if(qu===e.uid&&t.i===Yu+1&&mn(a)&&mn(i)){var M=a-Iy,S=i-Fy,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 Iy=a,Fy=i,Yu=t.i,qu=e.uid,r}Ve.getMarkerAngle=vp;var kt=_w.exports,$n=ut,ID=ht,FD=Kt,Zu=Je,Qi=xe,$y=Qi.strTranslate,Os=kt,js=ct,Nn=or,Ny=ps,$D=Sr.OPPOSITE_SIDE,Hy=/ [XY][0-9]* /,Bd=1.6,Gd=1.6;function ND(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,p=i.title,d=(p&&p.text?p.text:"").trim(),h=!1,m=p&&p.font?p.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,$=(i.title||{}).subtitle||{text:"",font:{}},N=$.text.trim(),I=!1,H=1,D=$.font,E=D.family,k=D.size,C=D.color,P=D.weight,F=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 W=t._context.edits[Z];function Y(Me,De){return Me===void 0||De===void 0?!1:Me.replace(Hy," % ")===De.replace(Hy," % ")}d===""?v=0:Y(d,o)&&(W||(d=""),v=.2,h=!0),L&&(N===""?H=0:Y(N,z)&&(W||(N=""),H=.2,I=!0)),r._meta?d=Qi.templateString(d,r._meta):a._meta&&(d=Qi.templateString(d,a._meta));var B=d||N||W,Q;u||(u=Qi.ensureSingle(a._infolayer,"g","g-"+e),Q=a._hColorbarMoveTitle);var ee=u.selectAll("text."+e).data(B?[0]:[]);ee.enter().append("text"),ee.text(d).attr("class",e),ee.exit().remove();var se=null,oe=e+"-subtitle",fe=N||W;if(L&&fe&&(se=u.selectAll("text."+oe).data(fe?[0]:[]),se.enter().append("text"),se.text(N).attr("class",oe),se.exit().remove()),!B)return u;function pe(Me,De){Qi.syncOrAsync([ge,be],{title:Me,subtitle:De})}function ge(Me){var De=Me.title,ue=Me.subtitle,Te;!c&&Q&&(c={}),c?(Te="",c.rotate&&(Te+="rotate("+[c.rotate,f.x,f.y]+")"),(c.offset||Q)&&(Te+=$y(0,(c.offset||0)-(Q||0)))):Te=null,De.attr("transform",Te);function Se(K){if(K){var ne=$n.select(K.node().parentNode).select("."+oe);if(!ne.empty()){var ve=K.node().getBBox();if(ve.height){var me=ve.y+ve.height+Bd*k;ne.attr("y",me)}}}}if(De.style("opacity",v*js.opacity(_)).call(Os.font,{color:js.rgb(_),size:$n.round(b,2),family:y,weight:g,style:x,variant:w,textcase:T,shadow:M,lineposition:A}).attr(f).call(Nn.convertToTspans,t,Se),ue){var J=u.select("."+e+"-math-group"),_e=De.node().getBBox(),re=J.node()?J.node().getBBox():void 0,Ae=re?re.y+re.height+Bd*k:_e.y+_e.height+Gd*k,Le=Qi.extendFlat({},f,{y:Ae});ue.attr("transform",Te),ue.style("opacity",H*js.opacity(C)).call(Os.font,{color:js.rgb(C),size:$n.round(k,2),family:E,weight:P,style:F,variant:j,textcase:G,shadow:O,lineposition:X}).attr(Le).call(Nn.convertToTspans,t)}return FD.previousPromises(t)}function be(Me){var De=Me.title,ue=$n.select(De.node().parentNode);if(s&&s.selection&&s.side&&d){ue.attr("transform",null);var Te=$D[s.side],Se=s.side==="left"||s.side==="top"?-1:1,J=ID(s.pad)?s.pad:2,_e=Os.bBox(ue.node()),re={t:0,b:0,l:0,r:0},Ae=t._fullLayout._reservedMargin;for(var Le in Ae)for(var K in Ae[Le]){var ne=Ae[Le][K];re[K]=Math.max(re[K],ne)}var ve={left:re.l,top:re.t,right:a.width-re.r,bottom:a.height-re.b},me=s.maxShift||Se*(ve[s.side]-_e[s.side]),ke=0;if(me<0)ke=me;else{var Pe=s.offsetLeft||0,Ee=s.offsetTop||0;_e.left-=Pe,_e.right-=Pe,_e.top-=Ee,_e.bottom-=Ee,s.selection.each(function(){var Fe=Os.bBox(this);Qi.bBoxIntersect(_e,Fe,J)&&(ke=Math.max(ke,Se*(Fe[s.side]-_e[Te])+J))}),ke=Math.min(me,ke),i._titleScoot=Math.abs(ke)}if(ke>0||me<0){var Ne={left:[-ke,0],right:[ke,0],top:[0,-ke],bottom:[0,ke]}[s.side];ue.attr("transform",$y(Ne[0],Ne[1]))}}}ee.call(pe,se);function we(Me,De){Me.text(De).on("mouseover.opacity",function(){$n.select(this).transition().duration(Ny.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){$n.select(this).transition().duration(Ny.HIDE_PLACEHOLDER).style("opacity",0)})}if(W&&(d?ee.on(".opacity",null):(we(ee,o),h=!0),ee.call(Nn.makeEditable,{gd:t}).on("edit",function(Me){l!==void 0?Zu.call("_guiRestyle",t,n,Me,l):Zu.call("_guiRelayout",t,n,Me)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(pe)}).on("input",function(Me){this.text(Me||" ").call(Nn.positionText,f.x,f.y)}),L)){if(L&&!d){var ye=ee.node().getBBox(),de=ye.y+ye.height+Gd*k;se.attr("y",de)}N?se.on(".opacity",null):(we(se,z),I=!0),se.call(Nn.makeEditable,{gd:t}).on("edit",function(Me){Zu.call("_guiRelayout",t,"title.subtitle.text",Me)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(pe)}).on("input",function(Me){this.text(Me||" ").call(Nn.positionText,se.attr("x"),se.attr("y"))})}return ee.classed("js-placeholder",h),se&&se.classed("js-placeholder",I),u}var eu={draw:ND,SUBTITLE_PADDING_EM:Gd,SUBTITLE_PADDING_MATHJAX_EM:Bd},HD=ut,OD=Ul.utcFormat,Dt=xe,jD=Dt.numberFormat,La=ht,fi=Dt.cleanNumber,BD=Dt.ms2DateTime,Oy=Dt.dateTime2ms,Ca=Dt.ensureNumber,jy=Dt.isArrayOrTypedArray,Di=Xt,Bs=Di.FP_SAFE,ca=Di.BADNUM,GD=Di.LOG_CLIP,UD=Di.ONEWEEK,Gs=Di.ONEDAY,Us=Di.ONEHOUR,By=Di.ONEMIN,Gy=Di.ONESEC,Vs=Ut,ic=gr,Ws=ic.HOUR_PATTERN,Xs=ic.WEEKDAY_PATTERN;function fl(t){return Math.pow(10,t)}function Ku(t){return t!=null}var dp=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*GD*Math.abs(w-T))}else return ca}function o(g,x,w,T){if((T||{}).msUTC&&La(g))return+g;var A=Oy(g,w||e.calendar);if(A===ca)if(La(g)){g=+g;var M=Math.floor(Dt.mod(g+.05,1)*10),S=Math.round(g-M/10);A=Oy(new Date(S))+M/10}else return ca;return A}function l(g,x,w){return BD(g,x,w||e.calendar)}function s(g){return e._categories[Math.round(g)]}function f(g){if(Ku(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 ca}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(La(g))return+g}function p(g){return La(g)?+g:u(g)}function d(g,x,w){return HD.round(w+x*g,2)}function h(g,x,w){return(g-w)/x}var m=function(x){return La(x)?d(x,e._m,e._b):ca},y=function(g){return h(g,e._m,e._b)};if(e.rangebreaks){var b=i==="y";m=function(g){if(!La(g))return ca;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 $=e._B[M]||0;return isFinite($)?d(g,e._m2,$):0},y=function(g){var x=e._rangebreaks.length;if(!x)return h(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 h(g,e._m2,e._B[w])}}e.c2l=e.type==="log"?n:Ca,e.l2c=e.type==="log"?fl:Ca,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=fi,e.c2d=e.c2r=e.l2d=e.l2r=Ca,e.d2p=e.r2p=function(g){return e.l2p(fi(g))},e.p2d=e.p2r=y,e.cleanPos=Ca):e.type==="log"?(e.d2r=e.d2l=function(g,x){return n(fi(g),x)},e.r2d=e.r2c=function(g){return fl(fi(g))},e.d2c=e.r2l=fi,e.c2d=e.l2r=Ca,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(fi(g))},e.p2r=y,e.cleanPos=Ca):e.type==="date"?(e.d2r=e.r2d=Dt.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 Dt.cleanDate(g,ca,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=p(g);return x!==void 0?x:e.fraction2r(.5)},e.l2r=e.c2r=Ca,e.r2l=p,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:Ca(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=Ca,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:Ca(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[Vs.id2name(M)];x=x.concat(S._traceIndices)}}var L=[[0,{}],[0,{}]],z=[];for(w=0;w<x.length;w++){var $=g[x[w]];if(i in $){var N=$[i],I=$._length||Dt.minRowLength(N);if(jy(N[0])&&jy(N[1]))for(T=0;T<I;T++){var H=N[0][T],D=N[1][T];Ku(H)&&Ku(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(E,k){var C=L[0][1],P=C[E[0]]-C[k[0]];if(P)return P;var F=L[1][1];return F[E[1]]-F[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=Dt.nestedProperty(e,g).get(),A=Dt.simpleMap(T,e.r2l),M=A[1]<A[0];M&&A.reverse();var S=Dt.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 $=L+1;w!==void 0&&($=Math.min($,z)),T[M?1:0]=$}if(w!==void 0){var N=z+1;x!==void 0&&(N=Math.max(N,L)),T[M?0:1]=N}}}},e.cleanRange=function(g,x){e._cleanRange(g,x),e.limitRange(g)},e._cleanRange=function(g,x){x||(x={}),g||(g="range");var w=Dt.nestedProperty(e,g).get(),T,A;if(e.type==="date"?A=Dt.dfltRange(e.calendar):i==="y"?A=ic.DFLTRANGEY:e._name==="realaxis"?A=[0,1]:A=x.dfltRange||ic.DFLTRANGEX,A=A.slice(),(e.rangemode==="tozero"||e.rangemode==="nonnegative")&&(A[0]=0),!w||w.length!==2){Dt.nestedProperty(e,g).set(A);return}var M=w[0]===null,S=w[1]===null;for(e.type==="date"&&!e.autorange&&(w[0]=Dt.cleanDate(w[0],ca,e.calendar),w[1]=Dt.cleanDate(w[1],ca,e.calendar)),T=0;T<2;T++)if(e.type==="date"){if(!Dt.isDateTime(w[T],e.calendar)){e[g]=A;break}if(e.r2l(w[0])===e.r2l(w[1])){var L=Dt.constrain(e.r2l(w[0]),Dt.MIN_MS+1e3,Dt.MAX_MS-1e3);w[0]=e.l2r(L-1e3),w[1]=e.l2r(L+1e3);break}}else{if(!La(w[T]))if(!(M||S)&&La(w[1-T]))w[T]=w[1-T]*(T?10:.1);else{e[g]=A;break}if(w[T]<-Bs?w[T]=-Bs:w[T]>Bs&&(w[T]=Bs),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=Vs.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,$;if(e._rangebreaks=e.locateBreaks(Math.min(M,S),Math.max(M,S)),e._rangebreaks.length){for(z=0;z<e._rangebreaks.length;z++)$=e._rangebreaks[z],e._lBreaks+=Math.abs($.max-$.min);var N=L;M>S&&(N=!N),N&&e._rangebreaks.reverse();var I=N?-1:1;for(e._m2=I*e._length/(Math.abs(S-M)-e._lBreaks),e._B.push(-e._m2*(L?S:M)),z=0;z<e._rangebreaks.length;z++)$=e._rangebreaks[z],e._B.push(e._B[e._B.length-1]-I*e._m2*($.max-$.min));for(z=0;z<e._rangebreaks.length;z++)$=e._rangebreaks[z],$.pmin=m($.min),$.pmax=m($.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?Dt.simpleMap(C.bounds,C.pattern?fi:e.d2c):null})),x._cachedValues||(x._cachedValues=x.map(function(C){return C.enabled&&C.values?Dt.simpleMap(C.values,e.d2c).sort(Dt.sorterAsc):null}));for(var L=0;L<x.length;L++){var z=x[L];if(z.enabled){if(z.bounds){var $=z.pattern;switch(w=x._cachedPatterns[L],T=w[0],A=w[1],$){case Xs:S=new Date(g),M=S.getUTCDay(),T>A&&(A+=7,M<T&&(M+=7));break;case Ws:S=new Date(g);var N=S.getUTCHours(),I=S.getUTCMinutes(),H=S.getUTCSeconds(),D=S.getUTCMilliseconds();M=N+(I/60+H/3600+D/36e5),T>A&&(A+=24,M<T&&(M+=24));break;case"":M=g;break}if(M>=T&&M<A)return ca}else for(var E=x._cachedValues[L],k=0;k<E.length;k++)if(T=E[k],A=T+z.dvalue,g>=T&&g<A)return ca}}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(F,j){return F.pattern===Xs&&j.pattern===Ws?-1:j.pattern===Xs&&F.pattern===Ws?1:0}),z=function(F,j){if(F=Dt.constrain(F,g,x),j=Dt.constrain(j,g,x),F!==j){for(var G=!0,X=0;X<S.length;X++){var O=S[X];F<O.max&&j>=O.min&&(F<O.min&&(O.min=F),j>O.max&&(O.max=j),G=!1)}G&&S.push({min:F,max:j})}};for(w=0;w<L.length;w++){var $=L[w];if($.enabled)if($.bounds){var N=g,I=x;$.pattern&&(N=Math.floor(N)),T=Dt.simpleMap($.bounds,$.pattern?fi:e.r2l),A=T[0],M=T[1];var H=new Date(N),D,E;switch($.pattern){case Xs:E=UD,D=((M<A?7:0)+(M-A))*Gs,N+=A*Gs-(H.getUTCDay()*Gs+H.getUTCHours()*Us+H.getUTCMinutes()*By+H.getUTCSeconds()*Gy+H.getUTCMilliseconds());break;case Ws:E=Gs,D=((M<A?24:0)+(M-A))*Us,N+=A*Us-(H.getUTCHours()*Us+H.getUTCMinutes()*By+H.getUTCSeconds()*Gy+H.getUTCMilliseconds());break;default:N=Math.min(T[0],T[1]),I=Math.max(T[0],T[1]),E=I-N,D=E}for(var k=N;k<I;k+=E)z(k,k+D)}else for(var C=Dt.simpleMap($.values,e.d2c),P=0;P<C.length;P++)A=C[P],M=A+$.dvalue,z(A,M)}return S.sort(function(F,j){return F.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||Dt.minRowLength(T),Dt.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 $=x+"0"in g?e.d2c(g[x+"0"],0,z):0,N=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]=$+M*N}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||La(e.r2l(g[0])))&&(x&&g[1]===null||La(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[Vs.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[Vs.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:OD,e._extraFormat=r._extraFormat),e._separators=r.separators,e._numFormat=_?_.numberFormat:jD,delete e._minDtick,delete e._forceTick0},Qw=ht,hp=xe,VD=Xt.BADNUM,nc=hp.isArrayOrTypedArray,WD=hp.isDateTime,XD=hp.cleanNumber,Jw=Math.round,eT=function(e,r,a){var i=e,n=a.noMultiCategory;if(nc(i)&&!i.length)return"-";if(!n&&QD(i))return"multicategory";if(n&&Array.isArray(i[0])){for(var o=[],l=0;l<i.length;l++)if(nc(i[l]))for(var s=0;s<i[l].length;s++)o.push(i[l][s]);i=o}if(ZD(i,r))return"date";var f=a.autotypenumbers!=="strict";return KD(i,f)?"category":qD(i,f)?"linear":"-"};function YD(t,e){return e?Qw(t):typeof t=="number"}function qD(t,e){for(var r=t.length,a=0;a<r;a++)if(YD(t[a],e))return!0;return!1}function ZD(t,e){for(var r=t.length,a=tT(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=Jw(l),f=t[s],c=String(f);o[c]||(o[c]=1,WD(f,e)&&i++,Qw(f)&&n++)}return i>n*2}function tT(t){return Math.max(1,(t-1)/1e3)}function KD(t,e){for(var r=t.length,a=tT(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=Jw(l),f=t[s],c=String(f);if(!o[c]){o[c]=1;var u=typeof f;u==="boolean"?n++:(e?XD(f)!==VD:u==="number")?i++:u==="string"&&n++}}return n>i*2}function QD(t){return nc(t[0])&&nc(t[1])}var JD=ut,rT=ht,wi=xe,Hf=Xt.FP_SAFE,e5=Je,t5=kt,aT=Ut,r5=aT.getFromId,a5=aT.isLinked,xs={applyAutorangeOptions:nT,getAutoRange:Ud,makePadFn:Vd,doAutoRange:n5,findExtremes:o5,concatExtremes:pp};function Ud(t,e){var r,a,i=[],n=t._fullLayout,o=Vd(n,e,0),l=Vd(n,e,1),s=pp(t,e),f=s.min,c=s.max;if(f.length===0||c.length===0)return wi.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 p=e.autorange,d=p==="reversed"||p==="min reversed"||p==="max reversed";if(!d&&e.range){var h=wi.simpleMap(e.range,e.r2l);d=h[1]<h[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-Uy(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,E){return Math.max(D,l(E))}if(u===v){var $=u-1,N=u+1;if(y)if(u===0)i=[0,1];else{var I=(u>0?c:f).reduce(z,0),H=u/(1-Math.min(.5,I/_));i=u>0?[0,H]:[H,0]}else b?i=[Math.max(0,$),Math.max(1,N)]: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-Uy(e,w.val,T.val))/(_-o(A)-l(M)),i=[A.val-x*o(A),M.val+x*l(M)];return i=nT(i,e),e.limitRange&&e.limitRange(),d&&i.reverse(),wi.simpleMap(i,e.l2r||Number)}function Uy(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 Vd(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=wi.simpleMap(e.range,e.r2l);n=o[1]<o[0]}n&&(r=!r)}var l=0;return a5(t,e._id)||(l=i5(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 Vy=3;function i5(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=wi.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 _=JD.select(this),g=_.select(".text-math-group");g.empty()&&(b.bb=t5.bBox(_.node()))})}for(var p=0;p<l._vals.length;p++){var d=l._vals[p],h=d.bb;if(h){var m=2*Vy+h.width,y=2*Vy+h.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 pp(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],Wd(o,c.val,c.pad,{extrapad:c.extrapad});for(f=0;f<_.max.length;f++)c=_.max[f],Xd(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 p=r5(t,v),d=pp(t,p,!0),h=e._length/p._length;for(f=0;f<d.min.length;f++)c=d.min[f],Wd(o,c.val,c.pad*h,{extrapad:c.extrapad});for(f=0;f<d.max.length;f++)c=d.max[f],Xd(l,c.val,c.pad*h,{extrapad:c.extrapad})}}return{min:o,max:l}}function n5(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():Ud(t,e),e._r=e.range.slice(),e._rl=wi.simpleMap(e._r,e.r2l);var a=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,e5.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=Ud(t,e)),n._input.rangeslider[e._name]=wi.extendFlat({},o)}}function o5(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,p,d,h,m,y,b,_;function g(z){if(Array.isArray(z))return f=!0,function(N){return Math.max(Number(z[N]||0),0)};var $=Math.max(Number(z||0),0);return function(){return $}}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<Hf&&(_=v);else for(u=0;u<n;u++)v=e[u],v<b&&v>-Hf&&(b=v),v>_&&v<Hf&&(_=v);e=[b,_],n=2}var M={tozero:l,extrapad:o};function S(z){p=e[z],rT(p)&&(m=x(z),y=w(z),c?(d=t.c2l(p)-A(z),h=t.c2l(p)+T(z)):(b=p-A(z),_=p+T(z),s&&b<_/10&&(b=_/10),d=t.c2l(b),h=t.c2l(_)),l&&(d=Math.min(0,d),h=Math.max(0,h)),Wy(d)&&Wd(a,d,y,M),Wy(h)&&Xd(i,h,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 Wd(t,e,r,a){iT(t,e,r,a,l5)}function Xd(t,e,r,a){iT(t,e,r,a,s5)}function iT(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 Wy(t){return rT(t)&&Math.abs(t)<Hf}function l5(t,e){return t<=e}function s5(t,e){return t>=e}function f5(t,e){var r=e.autorangeoptions;return r&&r.minallowed!==void 0&&oc(e,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&oc(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}function c5(t,e){var r=e.autorangeoptions;return r&&r.maxallowed!==void 0&&oc(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&oc(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}function oc(t,e,r){return e!==void 0&&r!==void 0?(e=t.d2l(e),r=t.d2l(r),e<r):!0}function nT(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);wi.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=f5(r,e),a=c5(a,e),[r,a]}var ea=ut,Zt=ht,bo=Kt,Xl=Je,it=xe,So=it.strTranslate,rn=or,u5=eu,Yl=ct,Br=kt,v5=Oa,Xy=Kc,pr=Xt,d5=pr.ONEMAXYEAR,lc=pr.ONEAVGYEAR,sc=pr.ONEMINYEAR,h5=pr.ONEMAXQUARTER,Yd=pr.ONEAVGQUARTER,fc=pr.ONEMINQUARTER,p5=pr.ONEMAXMONTH,Lo=pr.ONEAVGMONTH,cc=pr.ONEMINMONTH,Gr=pr.ONEWEEK,wr=pr.ONEDAY,Ti=wr/2,$a=pr.ONEHOUR,ql=pr.ONEMIN,uc=pr.ONESEC,m5=pr.ONEMILLI,y5=pr.ONEMICROSEC,un=pr.MINUS_SIGN,tu=pr.BADNUM,qd={K:"zeroline"},Zd={K:"gridline",L:"path"},Kd={K:"minor-gridline",L:"path"},oT={K:"tick",L:"path"},Yy={K:"tick",L:"text"},qy={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},ru=Sr,Pl=ru.MID_SHIFT,vn=ru.CAP_SHIFT,Zl=ru.LINE_SPACING,g5=ru.OPPOSITE_SIDE,vc=3,ze=xw.exports={};ze.setConvert=dp;var b5=eT,ti=Ut,x5=ti.idSort,_5=ti.isLinked;ze.id2name=ti.id2name;ze.name2id=ti.name2id;ze.cleanId=ti.cleanId;ze.list=ti.list;ze.listIds=ti.listIds;ze.getFromId=ti.getFromId;ze.getFromTrace=ti.getFromTrace;var lT=xs;ze.getAutoRange=lT.getAutoRange;ze.findExtremes=lT.findExtremes;var w5=1e-4;function mp(t){var e=(t[1]-t[0])*w5;return[t[0]-e,t[1]+e]}ze.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},it.coerce(t,e,f,s)};ze.getRefType=function(t){return t===void 0?t:t==="paper"?"paper":t==="pixel"?"pixel":/( domain)$/.test(t)?"domain":"range"};ze.coercePosition=function(t,e,r,a,i,n){var o,l,s=ze.getRefType(a);if(s!=="range")o=it.ensureNumber,l=r(i,n);else{var f=ze.getFromId(e,a);n=f.fraction2r(n),l=r(i,n),o=f.cleanPos}t[i]=o(l)};ze.cleanPosition=function(t,e,r){var a=r==="paper"||r==="pixel"?it.ensureNumber:ze.getFromId(e,r).cleanPos;return a(t)};ze.redrawComponents=function(t,e){e=e||ze.listIds(t);var r=t._fullLayout;function a(i,n,o,l){for(var s=Xl.getComponentMethod(i,n),f={},c=0;c<e.length;c++)for(var u=r[ze.id2name(e[c])],v=u[o],p=0;p<v.length;p++){var d=v[p];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 T5=ze.getDataConversions=function(t,e,r,a){var i,n=r==="x"||r==="y"||r==="z"?r:a;if(it.isArrayOrTypedArray(n)){if(i={type:b5(a,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},ze.setConvert(i),i.type==="category")for(var o=0;o<a.length;o++)i.d2c(a[o])}else i=ze.getFromTrace(t,e,n);return i?{d2c:i.d2c,c2d:i.c2d}:n==="ids"?{d2c:Ky,c2d:Ky}:{d2c:Zy,c2d:Zy}};function Zy(t){return+t}function Ky(t){return String(t)}ze.getDataToCoordFunc=function(t,e,r,a){return T5(t,e,r,a).d2c};ze.counterLetter=function(t){var e=t.charAt(0);if(e==="x")return"y";if(e==="y")return"x"};ze.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))};ze.saveRangeInitial=function(t,e){for(var r=ze.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};ze.saveShowSpikeInitial=function(t,e){for(var r=ze.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};ze.autoBin=function(t,e,r,a,i,n){var o=it.aggNums(Math.min,null,t),l=it.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:it.simpleMap([o,l],e.c2r,0,i),calendar:i},ze.setConvert(s),n=n&&Xy.dtick(n,s.type),n)s.dtick=n,s.tick0=Xy.tick0(void 0,s.type,i);else{var f;if(r)f=(l-o)/r;else{var c=it.distinctVals(t),u=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),v=u*it.roundUp(c.minDiff/u,[.9,1.9,4.9,9.9],!0);f=Math.max(v,2*it.stdev(t)/Math.pow(t.length,a?.25:.4)),Zt(f)||(f=1)}ze.autoTicks(s,f)}var p=s.dtick,d=ze.tickIncrement(ze.tickFirst(s),p,"reverse",i),h,m;if(typeof p=="number")d=k5(d,t,s,o,l),m=1+Math.floor((l-d)/p),h=d+m*p;else for(s.dtick.charAt(0)==="M"&&(d=A5(d,t,p,o,i)),h=d,m=0;h<=l;)h=ze.tickIncrement(h,p,!1,i),m++;return{start:e.c2r(d,0,i),end:e.c2r(h,0,i),size:p,_dataSpan:l-o}};function k5(t,e,r,a,i){var n=0,o=0,l=0,s=0;function f(p){return(1+(p-t)*100/r.dtick)%100<2}for(var c=0;c<e.length;c++)e[c]%1===0?l++:Zt(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 A5(t,e,r,a,i){var n=it.findExactDates(e,i),o=.8;if(n.exactDays>o){var l=Number(r.substr(1));n.exactYears>o&&l%12===0?t=ze.tickIncrement(t,"M6","reverse")+wr*1.5:n.exactMonths>o?t=ze.tickIncrement(t,"M1","reverse")+wr*15.5:t-=Ti;var s=ze.tickIncrement(t,r);if(s<=a)return s}return t}ze.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var a=e.dtick&&Zt(e._tmin),i;if(a){var n=ze.tickIncrement(e._tmin,e.dtick,!0);i=[e._tmin,n*.99+e._tmin*.01]}else{var o=it.simpleMap(e.range,e.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(t.range=it.simpleMap(i,e.l2r),t._isMinor=!0,ze.prepTicks(t,r),a){var l=Zt(e.dtick),s=Zt(t.dtick),f=l?e.dtick:+e.dtick.substring(1),c=s?t.dtick:+t.dtick.substring(1);l&&s?Qu(f,c)?f===2*Gr&&c===2*wr&&(t.dtick=Gr):f===2*Gr&&c===3*wr?t.dtick=Gr:f===Gr&&!(e._input.minor||{}).nticks?t.dtick=wr:Qy(f/c,2.5)?t.dtick=f/2:t.dtick=f:String(e.dtick).charAt(0)==="M"?s?t.dtick="M1":Qu(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"?Qu(f,c)||(t.dtick=Qy(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 Qu(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function Qy(t,e){return Math.abs(t/e-1)<.001}ze.prepTicks=function(t,e){var r=it.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?it.bigFont(t.tickfont.size||12):15,a=t._length/i):(i=t._id.charAt(0)==="y"?40:80,a=it.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,ze.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"&&M5(t),t.tick0||(t.tick0=t.type==="date"?"2000-01-01":0),t.type==="date"&&t.dtick<.1&&(t.dtick=.1),uT(t)};function Ju(t){return+t.substring(1)}function M5(t){var e;function r(){return!(Zt(t.dtick)||t.dtick.charAt(0)!=="M")}var a=r(),i=ze.getTickFormat(t);if(i){var n=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(e=$a,n&&!a&&t.dtick<$a&&(t.dtick=$a)):/%p/.test(i)?(e=Ti,n&&!a&&t.dtick<Ti&&(t.dtick=Ti)):/%[Aadejuwx]/.test(i)?(e=wr,n&&!a&&t.dtick<wr&&(t.dtick=wr)):/%[UVW]/.test(i)?(e=Gr,n&&!a&&t.dtick<Gr&&(t.dtick=Gr)):/%[Bbm]/.test(i)?(e=Lo,n&&(a?Ju(t.dtick)<1:t.dtick<cc)&&(t.dtick="M1")):/%[q]/.test(i)?(e=Yd,n&&(a?Ju(t.dtick)<3:t.dtick<fc)&&(t.dtick="M3")):/%[Yy]/.test(i)&&(e=lc,n&&(a?Ju(t.dtick)<12:t.dtick<sc)&&(t.dtick="M12")))}a=r(),a&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}function S5(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>=sc?f>=sc&&f<=d5?u=f:u=lc:r===Yd&&c>=fc?f>=fc&&f<=h5?u=f:u=Yd:c>=cc?f>=cc&&f<=p5?u=f:u=Lo:r===Gr&&c>=Gr?u=Gr:c>=wr?u=wr:r===Ti&&c>=Ti?u=Ti:r===$a&&c>=$a&&(u=$a);var v;u>=f&&(u=f,v=!0);var p=i+u;if(e.rangebreaks&&u>0){for(var d=84,h=0,m=0;m<d;m++){var y=(m+.5)/d;e.maskBreaks(i*(1-y)+y*p)!==tu&&h++}u*=h/d,u||(t[a].drop=!0),v&&f>Gr&&(u=f)}(u>0||a===0)&&(t[a].periodX=i+u/2)}}ze.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||it.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],f=it.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]),p=Math.max(1e3,e._length||0),d=[],h=[],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:it.extendFlat({},e,e.minor);if(x?ze.prepMinorTicks(w,e,r):ze.prepTicks(w,r),w.tickmode==="array"){g?(m=[],d=Jy(e,!x)):(y=[],h=Jy(e,!x));continue}if(w.tickmode==="sync"){m=[],d=L5(e);continue}var T=mp(f),A=T[0],M=T[1],S=Zt(w.dtick),L=a==="log"&&!(S||w.dtick.charAt(0)==="L"),z=ze.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 $=null,N=z,I;if(g){var H;S?H=e.dtick:a==="date"?typeof e.dtick=="string"&&e.dtick.charAt(0)==="M"&&(H=Lo*e.dtick.substring(1)):H=e._roughDTick,I=Math.round((e.r2l(N)-e.r2l(e.tick0))/H)-1}var D=w.dtick;for(w.rangebreaks&&w._tick0Init!==w.tick0&&(N=ev(N,e),c||(N=ze.tickIncrement(N,D,!c,i))),g&&o&&(N=ze.tickIncrement(N,D,!c,i),I--);c?N>=M:N<=M;N=ze.tickIncrement(N,D,c,i)){if(g&&I++,w.rangebreaks&&!c){if(N<A)continue;if(w.maskBreaks(N)===tu&&ev(N,w)>=v)break}if(m.length>p||N===$)break;$=N;var E={value:N};g?(L&&N!==(N|0)&&(E.simpleLabel=!0),n>1&&I%n&&(E.skipLabel=!0),m.push(E)):(E.minor=!0,y.push(E))}}if(!y||y.length<2)s=!1;else{var k=(y[1].value-y[0].value)*(l?-1:1);Q5(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(de,Me){return de.value-Me.value}).filter(function(de,Me,De){return Me===0||de.value!==De[Me-1].value});var P=C.map(function(de,Me){return de.minor===void 0&&!de.skipLabel?Me:null}).filter(function(de){return de!==null});P.forEach(function(de){s.map(function(Me){var De=de+Me;De>=0&&De<C.length&&it.pushUnique(b,C[De])})})}if(_){var F=e.minor.ticks==="inside"&&e.ticks==="outside"||e.minor.ticks==="outside"&&e.ticks==="inside";if(!F){for(var j=m.map(function(de){return de.value}),G=[],X=0;X<y.length;X++){var O=y[X],Z=O.value;if(j.indexOf(Z)===-1){for(var W=!1,Y=0;!W&&Y<m.length;Y++)1e7+m[Y].value===1e7+Z&&(W=!0);W||G.push(O)}}y=G}}o&&S5(b,e,e._definedDelta);var B;if(e.rangebreaks){var Q=e._id.charAt(0)==="y",ee=1;e.tickmode==="auto"&&(ee=e.tickfont?e.tickfont.size:12);var se=NaN;for(B=m.length-1;B>-1;B--){if(m[B].drop){m.splice(B,1);continue}m[B].value=ev(m[B].value,e);var oe=e.c2p(m[B].value);(Q?se>oe-ee:se<oe+ee)?m.splice(c?B+1:B,1):se=oe}}bp(e)&&Math.abs(f[1]-f[0])===360&&m.pop(),e._tmax=(m[m.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var fe,pe=function(de){de.text="",e._prevDateHead=fe};m=m.concat(y);function ge(de,Me){var De=ze.tickText(de,Me.value,!1,Me.simpleLabel),ue=Me.periodX;return ue!==void 0&&(De.periodX=ue,(ue>v||ue<u)&&(ue>v&&(De.periodX=v),ue<u&&(De.periodX=u),pe(De))),De}var be;for(B=0;B<m.length;B++){var we=m[B].minor,ye=m[B].value;we?(s&&b.indexOf(m[B])!==-1?be=ge(e,m[B]):be={x:ye},be.minor=!0,h.push(be)):(fe=e._prevDateHead,be=ge(e,m[B]),(m[B].skipLabel||s&&b.indexOf(m[B])===-1)&&pe(be),d.push(be))}return d=d.concat(h),e._inCalcTicks=!1,o&&d.length&&(d[0].noTick=!0),d};function sT(t,e){return t.rangebreaks&&(e=e.filter(function(r){return t.maskBreaks(r.x)!==tu})),e}function L5(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=ze.tickText(t,n);e._vals[a].minor&&(o.minor=!0,o.text=""),r.push(o)}}return r=sT(t,r),r}function Jy(t,e){var r=it.simpleMap(t.range,t.r2l),a=mp(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){it.isArrayOrTypedArray(c)||(c=[]);for(var u=0;u<f.length;u++){var v=o(f[u]);if(v>i&&v<n){var p=ze.tickText(t,v,!1,String(c[u]));s&&(p.minor=!0,p.text=""),l.push(p)}}}}return l=sT(t,l),l}var Ys=[2,5,10],eg=[1,2,3,6,12],tg=[1,2,5,10,15,30],C5=[1,2,3,7,14],fT=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],cT=[-.301,0,.301,.699,1],D5=[15,30,45,90,180];function Da(t,e,r){return e*it.roundUp(t/e,r)}ze.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=it.dateTick0(t.calendar,0);var n=2*e;if(n>lc)e/=lc,a=i(10),t.dtick="M"+12*Da(e,a,Ys);else if(n>Lo)e/=Lo,t.dtick="M"+Da(e,1,eg);else if(n>wr){if(t.dtick=Da(e,wr,t._hasDayOfWeekBreaks?[1,2,7,14]:C5),!r){var o=ze.getTickFormat(t),l=t.ticklabelmode==="period";l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=it.dateTick0(t.calendar,2):t.tick0=it.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}}else n>$a?t.dtick=Da(e,$a,eg):n>ql?t.dtick=Da(e,ql,tg):n>uc?t.dtick=Da(e,uc,tg):(a=i(10),t.dtick=Da(e,a,Ys))}else if(t.type==="log"){t.tick0=0;var s=it.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"+Da(e,a,Ys)}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))):bp(t)?(t.tick0=0,a=1,t.dtick=Da(e,a,D5)):(t.tick0=0,a=i(10),t.dtick=Da(e,a,Ys));if(t.dtick===0&&(t.dtick=1),!Zt(t.dtick)&&typeof t.dtick!="string"){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}};function uT(t){var e=t.dtick;if(t._tickexponent=0,!Zt(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>=wr&&i<=10||e>=wr*15)t._tickround="d";else if(e>=ql&&i<=16||e>=$a)t._tickround="M";else if(e>=uc&&i<=19||e>=ql)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(Zt(e)||e.charAt(0)==="L"){var o=t.range.map(t.r2d||Number);Zt(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&&(dc(t.exponentformat)&&!yp(s)?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}ze.tickIncrement=function(t,e,r,a){var i=r?-1:1;if(Zt(e))return it.increment(t,i*e);var n=e.charAt(0),o=i*Number(e.substr(1));if(n==="M")return it.incrementMonth(t,o,a);if(n==="L")return Math.log(Math.pow(10,t)+o)/Math.LN10;if(n==="D"){var l=e==="D2"?cT:fT,s=t+i*.01,f=it.roundUp(it.mod(s,1),l,r);return Math.floor(s)+Math.log(ea.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)};ze.tickFirst=function(t,e){var r=t.r2l||Number,a=it.simpleMap(t.range,r,void 0,void 0,e),i=a[1]<a[0],n=i?Math.floor:Math.ceil,o=mp(a)[0],l=t.dtick,s=r(t.tick0);if(Zt(l)){var f=n((o-s)/l)*l+s;return(t.type==="category"||t.type==="multicategory")&&(f=it.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,p=s,d,h,m;v<10;){if(d=ze.tickIncrement(p,l,i,t.calendar),(d-o)*(p-o)<=0)return i?Math.min(p,d):Math.max(p,d);h=(o-(p+d)/2)/(d-p),m=c+(Math.abs(Math.round(h))||1)*u,p=ze.tickIncrement(p,m,h<0?!i:i,t.calendar),v++}return it.error("tickFirst did not converge",t),p}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"?cT:fT,b=it.roundUp(it.mod(o,1),y,i);return Math.floor(o)+Math.log(ea.round(Math.pow(10,b),1))/Math.LN10}else throw"unrecognized dtick "+String(l)}};ze.tickText=function(t,e,r,a){var i=vT(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&&it.isArrayOrTypedArray(t.ticktext)){var u=it.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 p(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"&&p(t.showexponent)?"hide":"";if(l==="date"?P5(t,i,r,o):l==="log"?E5(t,i,r,o,d):l==="category"?z5(t,i):l==="multicategory"?R5(t,i,r):bp(t)?F5(t,i,r,o,d):I5(t,i,r,o,d),a||(t.tickprefix&&!p(t.showtickprefix)&&(i.text=t.tickprefix+i.text),t.ticksuffix&&!p(t.showticksuffix)&&(i.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(i.text)){var h=t.labelalias[i.text];typeof h=="string"&&(i.text=h)}return(t.tickson==="boundaries"||t.showdividers)&&(i.xbnd=[c(i.x-.5),c(i.x+t.dtick-.5)]),i};ze.hoverLabelText=function(t,e,r){r&&(t=it.extendFlat({},t,{hoverformat:r}));var a=it.isArrayOrTypedArray(e)?e[0]:e,i=it.isArrayOrTypedArray(e)?e[1]:void 0;if(i!==void 0&&i!==a)return ze.hoverLabelText(t,a,r)+" - "+ze.hoverLabelText(t,i,r);var n=t.type==="log"&&a<=0,o=ze.tickText(t,t.c2l(n?-a:a),"hover").text;return n?a===0?"0":un+o:o};function vT(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 P5(t,e,r,a){var i=t._tickround,n=r&&t.hoverformat||ze.getTickFormat(t);a=!n&&a,a&&(Zt(i)?i=4:i={y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o=it.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=Ql(t),c=t._trueSide||t.side;(!f&&c==="top"||f&&c==="bottom")&&(o+="<br> ")}e.text=o}function E5(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=Kl(Math.pow(10,o),t,i,a);else if(Zt(n)||s==="D"&&(t.minorloglabels==="complete"||it.mod(o+.01,1)<.1)){t.minorloglabels==="complete"&&!(it.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),p=t.exponentformat;p==="power"||dc(p)&&yp(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?"":un)+v+"</sup>"),e.fontSize*=1.25):(p==="e"||p==="E")&&v>2?e.text=c[0]+p+(u>0?"+":un)+v:(e.text=Kl(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,it.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 z5(t,e){var r=t._categories[Math.round(e.x)];r===void 0&&(r=""),e.text=String(r)}function R5(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 I5(t,e,r,a,i){i==="never"?i="":t.showexponent==="all"&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=Kl(e.x,t,i,a)}function F5(t,e,r,a,i){if(t.thetaunit==="radians"&&!r){var n=e.x/180;if(n===0)e.text="0";else{var o=$5(n);if(o[1]>=100)e.text=Kl(it.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=un+e.text)}}}else e.text=Kl(e.x,t,i,a)}function $5(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 N5=["f","p","n","μ","m","","k","M","G","T"];function dc(t){return t==="SI"||t==="B"}function yp(t){return t>14||t<-15}function Kl(t,e,r,a){var i=t<0,n=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,s=ze.getTickFormat(e),f=e.separatethousands;if(a){var c={exponentformat:o,minexponent:e.minexponent,dtick:e.showexponent==="none"?e.dtick:Zt(t)&&Math.abs(t)||1,range:e.showexponent==="none"?e.range.map(e.r2d):[0,t||1]};uT(c),n=(Number(c._tickround)||0)+4,l=c._tickexponent,e.hoverformat&&(s=e.hoverformat)}if(s)return e._numFormat(s)(t).replace(/-/g,un);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 p=t.indexOf(".")+1;p&&(t=t.substr(0,p+n).replace(/\.?0+$/,""))}t=it.numSeparate(t,e._separators,f)}if(l&&o!=="hide"){dc(o)&&yp(l)&&(o="power");var d;l<0?d=un+-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":dc(o)&&(t+=N5[l/3+5])}return i?un+t:t}ze.getTickFormat=function(t){var e;function r(s){return typeof s!="string"?s:Number(s.replace("M",""))*Lo}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],p=f[1];return(!v&&typeof v!="number"||u(v)<=u(s))&&(!p&&typeof p!="number"||u(p)>=u(s))}function n(s,f){var c=f[0]===null,u=f[1]===null,v=a(s,f[0])>=0,p=a(s,f[1])<=0;return(c||v)&&(u||p)}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};ze.getSubplots=function(t,e){var r=t._fullLayout._subplots,a=r.cartesian.concat(r.gl2d||[]),i=e?ze.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};ze.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};ze.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=ze.list(t,"x",!0),n=ze.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){ea.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})})}};ze.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"?ze.listIds(t):e,n=ze.list(t),o=n.filter(function(s){return s.autoshift}).map(function(s){return s.overlaying});i.map(function(s){var f=ze.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 it.syncOrAsync(i.map(function(s){return function(){if(s){var f=ze.getFromId(t,s);r||(r={}),r.axShifts=l,r.overlayingShiftedAx=o;var c=ze.drawOne(t,f,r);return f._shiftPusher&&eh(f,f._fullDepth||0,l,!0),f._r=f.range.slice(),f._rl=it.simpleMap(f._r,f.r2l),c}}}))};ze.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=ze.counterLetter(f),v=s._plots[e._mainSubplot],p=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),eh(e,d,a,!0),eh(e,e.shift||0,a,!1)}(r.skipTitle!==!0||e._shift===void 0)&&(e._shift=K5(e,a));var h=v[c+"axislayer"],m=e._mainLinePosition,y=m+=e._shift,b=e._mainMirrorPosition,_=e._vals=ze.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(ye){var de=f+(ye||"tick");return x[de]||(x[de]=B5(e,de,y)),x[de]}if(e.visible){var T=ze.makeTransTickFn(e),A=ze.makeTransTickLabelFn(e),M,S,L=e.ticks==="inside",z=e.ticks==="outside";if(e.tickson==="boundaries"){var $=H5(e,_);S=ze.clipEnds(e,$),M=L?S:$}else S=ze.clipEnds(e,_),M=L&&e.ticklabelmode!=="period"?S:_;var N=e._gridVals=S,I=j5(e,_);if(!s._hasOnlyLargeSploms){var H=e._subplotsWith,D={};for(n=0;n<H.length;n++){o=H[n],l=s._plots[o];var E=l[u+"axis"],k=E._mainAxis._id;if(!D[k]){D[k]=1;var C=c==="x"?"M0,"+E._offset+"v"+E._length:"M"+E._offset+",0h"+E._length;ze.drawGrid(t,e,{vals:N,counterAxis:E,layer:l.gridlayer.select("."+f),minorLayer:l.minorGridlayer.select("."+f),path:C,transFn:T}),ze.drawZeroLine(t,e,{counterAxis:E,layer:p?l.zerolinelayerAbove:l.zerolinelayer,path:C,transFn:T})}}}var P,F=ze.getTickSigns(e),j=ze.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var G=ze.makeTickPath(e,y,F[2]),X=ze.makeTickPath(e,y,j[2],{minor:!0}),O,Z,W,Y;if(e._anchorAxis&&e.mirror&&e.mirror!==!0?(O=ze.makeTickPath(e,b,F[3]),Z=ze.makeTickPath(e,b,j[3],{minor:!0}),W=G+O,Y=X+Z):(O="",Z="",W=G,Y=X),e.showdividers&&z&&e.tickson==="boundaries"){var B={};for(n=0;n<I.length;n++)B[I[n].x]=1;P=function(ye){return B[ye.x]?O:W}}else P=function(ye){return ye.minor?Y:W}}if(ze.drawTicks(t,e,{vals:M,layer:h,path:P,transFn:T}),e.mirror==="allticks"){var Q=Object.keys(e._linepositions||{});for(n=0;n<Q.length;n++){o=Q[n],l=s._plots[o];var ee=e._linepositions[o]||[],se=ee[0],oe=ee[1],fe=ee[2],pe=ze.makeTickPath(e,se,fe?F[0]:j[0],{minor:fe})+ze.makeTickPath(e,oe,fe?F[1]:j[1],{minor:fe});ze.drawTicks(t,e,{vals:M,layer:l[c+"axislayer"],path:pe,transFn:T})}}var ge=[];if(ge.push(function(){return ze.drawLabels(t,e,{vals:_,layer:h,plotinfo:l,transFn:A,labelFns:ze.makeLabelFns(e,y)})}),e.type==="multicategory"){var be={x:2,y:10}[c];ge.push(function(){var ye={x:"height",y:"width"}[c],de=w()[ye]+be+(e._tickAngles[f+"tick"]?e.tickfont.size*Zl:0);return ze.drawLabels(t,e,{vals:O5(e,_),layer:h,cls:f+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:T,labelFns:ze.makeLabelFns(e,y+de*F[4])})}),ge.push(function(){return e._depth=F[4]*(w("tick2")[e.side]-y),U5(t,e,{vals:I,layer:h,path:ze.makeTickPath(e,y,F[4],{len:e._depth}),transFn:T})})}else e.title.hasOwnProperty("standoff")&&ge.push(function(){e._depth=F[4]*(w()[e.side]-y)});var we=Xl.getComponentMethod("rangeslider","isVisible")(e);return!r.skipTitle&&!(we&&e.side==="bottom")&&ge.push(function(){return V5(t,e)}),ge.push(function(){var ye=e.side.charAt(0),de=g5[e.side].charAt(0),Me=ze.getPxPosition(t,e),De=z?e.ticklen:0,ue,Te,Se,J;(e.automargin||we||e._shiftPusher)&&(e.type==="multicategory"?ue=w("tick2"):(ue=w(),c==="x"&&ye==="b"&&(e._depth=Math.max(ue.width>0?ue.bottom-Me:0,De))));var _e=0,re=0;if(e._shiftPusher&&(_e=Math.max(De,ue.height>0?ye==="l"?Me-ue.left:ue.right-Me:0),e.title.text!==s._dfltTitle[c]&&(re=(e._titleStandoff||0)+(e._titleScoot||0),ye==="l"&&(re+=ag(e))),e._fullDepth=Math.max(_e,re)),e.automargin){Te={x:0,y:0,r:0,l:0,t:0,b:0};var Ae=[0,1],Le=typeof e._shift=="number"?e._shift:0;if(c==="x"){if(ye==="b"?Te[ye]=e._depth:(Te[ye]=e._depth=Math.max(ue.width>0?Me-ue.top:0,De),Ae.reverse()),ue.width>0){var K=ue.right-(e._offset+e._length);K>0&&(Te.xr=1,Te.r=K);var ne=e._offset-ue.left;ne>0&&(Te.xl=0,Te.l=ne)}}else if(ye==="l"?(e._depth=Math.max(ue.height>0?Me-ue.left:0,De),Te[ye]=e._depth-Le):(e._depth=Math.max(ue.height>0?ue.right-Me:0,De),Te[ye]=e._depth+Le,Ae.reverse()),ue.height>0){var ve=ue.bottom-(e._offset+e._length);ve>0&&(Te.yb=0,Te.b=ve);var me=e._offset-ue.top;me>0&&(Te.yt=1,Te.t=me)}Te[u]=e.anchor==="free"?e.position:e._anchorAxis.domain[Ae[0]],e.title.text!==s._dfltTitle[c]&&(Te[ye]+=ag(e)+(e.title.standoff||0)),e.mirror&&e.anchor!=="free"&&(Se={x:0,y:0,r:0,l:0,t:0,b:0},Se[de]=e.linewidth,e.mirror&&e.mirror!==!0&&(Se[de]+=De),e.mirror===!0||e.mirror==="ticks"?Se[u]=e._anchorAxis.domain[Ae[1]]:(e.mirror==="all"||e.mirror==="allticks")&&(Se[u]=[e._counterDomainMin,e._counterDomainMax][Ae[1]]))}we&&(J=Xl.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),typeof e.automargin=="string"&&(rg(Te,e.automargin),rg(Se,e.automargin)),bo.autoMargin(t,gp(e),Te),bo.autoMargin(t,hT(e),Se),bo.autoMargin(t,pT(e),J)}),it.syncOrAsync(ge)}};function rg(t,e){if(t){var r=Object.keys(qy).reduce(function(a,i){return e.indexOf(i)!==-1&&qy[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 H5(t,e){var r=[],a,i=function(n,o){var l=n.xbnd[o];l!==null&&r.push(it.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 O5(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(vT(t,it.interp(a[o],.5),o));return r}function j5(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(it.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 B5(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=Jd(this);if(s.node().style.display!=="none"){var f=Br.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=ze.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}}ze.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};ze.makeTransTickFn=function(t){return t._id.charAt(0)==="x"?function(e){return So(t._offset+t.l2p(e.x),0)}:function(e){return So(0,t._offset+t.l2p(e.x))}};ze.makeTransTickLabelFn=function(t){var e=G5(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 So(i+t._offset+t.l2p(Qd(v))+r,n+a)}:function(v){return So(n+a,i+t._offset+t.l2p(Qd(v))+r)}};function Qd(t){return t.periodX!==void 0?t.periodX:t.x}function G5(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=vc,p=t.tickfont?t.tickfont.size:12;return(l||i)&&(u+=p*vn,v+=(t.linewidth||0)/2),(n||o)&&(u+=(t.linewidth||0)/2,v+=vc),s&&c==="top"&&(v-=p*(1-vn)),(n||i)&&(u=-u),(c==="bottom"||c==="right")&&(v=-v),[f?u:0,s?v:0]}ze.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};ze.makeLabelFns=function(t,e,r){var a=t.ticklabelposition||"",i=t.tickson||"",n=function($){return a.indexOf($)!==-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",p=0,d=0,h=v?t.ticklen:0;if(u?h*=-1:c&&(h=0),v&&(p+=h,r)){var m=it.deg2rad(r);p=h*Math.cos(m)+1,d=h*Math.sin(m)}t.showticklabels&&(v||t.showline)&&(p+=.2*t.tickfont.size),p+=(t.linewidth||1)/2*(u?-1:1);var y={labelStandoff:p,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+p*x,g=S?1:-.2,Math.abs(M)===90&&(u?g+=Pl:M===-90&&T==="bottom"?g=vn:M===90&&T==="top"?g=Pl:g=.5,w=Pl/2*(M/90)),y.xFn=function($){return $.dx+b+w*$.fontSize},y.yFn=function($){return $.dy+_+$.fontSize*g},y.anchorFn=function($,N){if(c){if(l)return"end";if(s)return"start"}return!Zt(N)||N===0||N===180?"middle":N*x<0!==u?"end":"start"},y.heightFn=function($,N,I){return N<-60||N>60?-.5*I:t.side==="top"!==u?-I:0};else if(A==="y"){if(S=!u&&T==="left"||u&&T==="right",x=S?1:-1,u&&(x*=-1),b=p,_=d*x,g=0,!u&&Math.abs(M)===90&&(M===-90&&T==="left"||M===90&&T==="right"?g=vn:g=.5),u){var L=Zt(M)?+M:0;if(L!==0){var z=it.deg2rad(L);w=Math.abs(Math.sin(z))*vn*x,g=0}}y.xFn=function($){return $.dx+e-(b+$.fontSize*g)*x+w*$.fontSize},y.yFn=function($){return $.dy+_+$.fontSize*Pl},y.anchorFn=function($,N){return Zt(N)&&Math.abs(N)===90?"middle":S?"end":"start"},y.heightFn=function($,N,I){return t.side==="right"&&(N*=-1),N<-30?-I:N<30?-.5*I:0}}return y};function au(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}ze.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,au);n.exit().remove(),n.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return Yl.stroke(ea.select(this),o.minor?e.minor.tickcolor:e.tickcolor)}).style("stroke-width",function(o){return Br.crispRound(t,o.minor?e.minor.tickwidth:e.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),iu(e,[oT]),n.attr("transform",r.transFn)};ze.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&&ze.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=Br.crispRound(t,e.gridwidth,1);for(var u=i?Br.crispRound(t,e.minor.gridwidth,1):0,v=r.layer,p=r.minorLayer,d=1;d>=0;d--){var h=d?v:p;if(h){var m=h.selectAll("path."+a).data(d?o:n,au);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 Yl.stroke(ea.select(this),y.minor?e.minor.gridcolor:e.gridcolor||"#ddd")}).style("stroke-dasharray",function(y){return Br.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)}}iu(e,[Zd,Kd])}};ze.drawZeroLine=function(t,e,r){r=r||r;var a=e._id+"zl",i=ze.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 x5(o.id,l.id)})}),n.attr("transform",r.transFn).attr("d",r.path).call(Yl.stroke,e.zerolinecolor||Yl.defaultLine).style("stroke-width",Br.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),iu(e,[qd])};ze.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:[],au),v=[];u.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(k){var C=ea.select(this),P=t._promises.length;C.call(rn.positionText,s.xFn(k),s.yFn(k)).call(Br.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(rn.convertToTspans,t),t._promises[P]?v.push(t._promises.pop().then(function(){p(C,f)})):p(C,f)}),iu(e,[Yy]),u.exit().remove(),r.repositionOnUpdate&&u.each(function(k){ea.select(this).select("text").call(rn.positionText,s.xFn(k),s.yFn(k))});function p(k,C){k.each(function(P){var F=ea.select(this),j=F.select(".text-math-group"),G=s.anchorFn(P,C),X=r.transFn.call(F.node(),P)+(Zt(C)&&+C!=0?" rotate("+C+","+s.xFn(P)+","+(s.yFn(P)-P.fontSize/2)+")":""),O=rn.lineCount(F),Z=Zl*P.fontSize,W=s.heightFn(P,Zt(C)?+C:0,(O-1)*Z);if(W&&(X+=So(0,W)),j.empty()){var Y=F.select("text");Y.attr({transform:X,"text-anchor":G}),Y.style("display",null),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var B=Br.bBox(j.node()).width,Q=B*{end:-.5,start:.5}[G];j.attr("transform",X+So(Q,0))}})}e._adjustTickLabelsOverflow=function(){var k=e.ticklabeloverflow;if(!(!k||k==="allow")){var C=k.indexOf("hide")!==-1,P=e._id.charAt(0)==="x",F=0,j=P?t._fullLayout.width:t._fullLayout.height;if(k.indexOf("domain")!==-1){var G=it.simpleMap(e.range,e.r2l);F=e.l2p(G[0])+e._offset,j=e.l2p(G[1])+e._offset}var X=Math.min(F,j),O=Math.max(F,j),Z=e.side,W=1/0,Y=-1/0;u.each(function(se){var oe=ea.select(this),fe=oe.select(".text-math-group");if(fe.empty()){var pe=Br.bBox(oe.node()),ge=0;P?(pe.right>O||pe.left<X)&&(ge=1):(pe.bottom>O||pe.top+(e.tickangle?0:se.fontSize/4)<X)&&(ge=1);var be=oe.select("text");ge?C&&be.style("display","none"):be.node().style.display!=="none"&&(be.style("display",null),Z==="bottom"||Z==="right"?W=Math.min(W,P?pe.top:pe.left):W=-1/0,Z==="top"||Z==="left"?Y=Math.max(Y,P?pe.bottom:pe.right):Y=1/0)}});for(var B in a._plots){var Q=a._plots[B];if(!(e._id!==Q.xaxis._id&&e._id!==Q.yaxis._id)){var ee=P?Q.yaxis:Q.xaxis;ee&&(ee["_visibleLabelMin_"+e._id]=W,ee["_visibleLabelMax_"+e._id]=Y)}}}},e._hideCounterAxisInsideTickLabels=function(k){var C=e._id.charAt(0)==="x",P=[];for(var F in a._plots){var j=a._plots[F];e._id!==j.xaxis._id&&e._id!==j.yaxis._id||P.push(C?j.yaxis:j.xaxis)}P.forEach(function(G,X){G&&Ql(G)&&(k||[qd,Kd,Zd,oT,Yy]).forEach(function(O){var Z=O.K==="tick"&&O.L==="text"&&e.ticklabelmode==="period",W=a._plots[e._mainSubplot],Y;if(O.K===qd.K){var B=n?W.zerolinelayerAbove:W.zerolinelayer;Y=B.selectAll("."+e._id+"zl")}else O.K===Kd.K?Y=W.minorGridlayer.selectAll("."+e._id):O.K===Zd.K?Y=W.gridlayer.selectAll("."+e._id):Y=W[e._id.charAt(0)+"axislayer"];Y.each(function(){var Q=ea.select(this);O.L&&(Q=Q.selectAll(O.L)),Q.each(function(ee){var se=e.l2p(Z?Qd(ee):ee.x)+e._offset,oe=ea.select(this);se<e["_visibleLabelMax_"+G._id]&&se>e["_visibleLabelMin_"+G._id]?oe.style("display","none"):O.K==="tick"&&!X&&oe.node().style.display!=="none"&&oe.style("display",null)})})})})},p(u,c+1?c:f);function d(){return v.length&&Promise.all(v)}var h=null;function m(){if(p(u,f),l.length&&e.autotickangles&&(e.type!=="log"||String(e.dtick).charAt(0)!=="D")){h=e.autotickangles[0];var k=0,C=[],P,F=1;u.each(function(Te){k=Math.max(k,Te.fontSize);var Se=e.l2p(Te.x),J=Jd(this),_e=Br.bBox(J.node());F=Math.max(F,rn.lineCount(J)),C.push({top:0,bottom:10,height:10,left:Se-_e.width/2,right:Se+_e.width/2+2,width:_e.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*F,W=Math.sqrt(Math.pow(O,2)+Math.pow(Z,2)),Y=O/W,B=e.autotickangles.map(function(Te){return Te*Math.PI/180}),Q=B.find(function(Te){return Math.abs(Math.cos(Te))<=Y});Q===void 0&&(Q=B.reduce(function(Te,Se){return Math.abs(Math.cos(Te))<Math.abs(Math.cos(Se))?Te:Se},B[0]));var ee=Q*(180/Math.PI);if(j){var se=2;for(e.ticks&&(se+=e.tickwidth/2),P=0;P<C.length;P++){var oe=l[P].xbnd,fe=C[P];if(oe[0]!==null&&fe.left-e.l2p(oe[0])<se||oe[1]!==null&&e.l2p(oe[1])-fe.right<se){h=ee;break}}}else{var pe=e.ticklabelposition||"",ge=e.tickson||"",be=function(Te){return pe.indexOf(Te)!==-1},we=be("top"),ye=be("left"),de=be("right"),Me=be("bottom"),De=ge!=="boundaries"&&(Me||ye||we||de),ue=De?(e.tickwidth||0)+2*vc:0;for(P=0;P<C.length-1;P++)if(it.bBoxIntersect(C[P],C[P+1],ue)){h=ee;break}}h&&p(u,h)}}e._selections&&(e._selections[o]=u);var y=[d];e.automargin&&a._redrawFromAutoMarginCount&&c===90?(h=c,y.push(function(){p(u,c)})):y.push(m),e._tickAngles&&y.push(function(){e._tickAngles[o]=h===null?Zt(f)?f:0:h});var b=function(){var k=0,C=0;return u.each(function(P,F){var j=Jd(this),G=j.select(".text-math-group");if(G.empty()){var X;e._vals[F]&&(X=e._vals[F].bb||Br.bBox(j.node()),e._vals[F].bb=X),k=Math.max(k,X.width),C=Math.max(C,X.height)}}),{labelsMaxW:k,labelsMaxH:C}},_=e._anchorAxis;if(_&&(_.autorange||_.insiderange)&&Ql(e)&&!_5(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*vc,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]),$=a._insideTickLabelsUpdaterange[_._name+".range"];if($){var N=_.r2p($[T]),I=_.r2p($[A]),H=w*(e._id.charAt(0)==="y"?1:-1);H*L<H*N&&(L=N,M[T]=S[T]=$[T]),H*z>H*I&&(z=I,M[A]=S[A]=$[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 E=it.syncOrAsync(y);return E&&E.then&&t._promises.push(E),E};function U5(t,e,r){var a=e._id+"divider",i=r.vals,n=r.layer.selectAll("path."+a).data(i,au);n.exit().remove(),n.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(Yl.stroke,e.dividercolor).style("stroke-width",Br.crispRound(t,e.dividerwidth,1)+"px"),n.attr("transform",r.transFn).attr("d",r.path)}ze.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 ag(t){var e=t.title.font.size,r=(t.title.text.match(rn.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?e*(vn+r*Zl):r?e*(r+1)*Zl:e}function V5(t,e){var r=t._fullLayout,a=e._id,i=a.charAt(0),n=e.title.font.size,o,l=(e.title.text.match(rn.BR_TAG_ALL)||[]).length;if(e.title.hasOwnProperty("standoff"))e.side==="bottom"||e.side==="right"?o=e._depth+e.title.standoff+n*vn:(e.side==="top"||e.side==="left")&&(o=e._depth+e.title.standoff+n*(Pl+l*Zl));else{var s=Ql(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=ze.getPxPosition(t,e),u,v,p;i==="x"?(v=e._offset+e._length/2,p=e.side==="top"?c-o:c+o):(p=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 h=e._selections[e._id+"tick"];if(d={selection:h,side:e.side},h&&h.node()&&h.node().parentNode){var m=Br.getTranslate(h.node().parentNode);d.offsetLeft=m.x,d.offsetTop=m.y}e.title.hasOwnProperty("standoff")&&(d.pad=0)}return e._titleStandoff=o,u5.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:r._dfltTitle[i],avoid:d,transform:u,attributes:{x:v,y:p,"text-anchor":"middle"}})}ze.shouldShowZeroLine=function(t,e,r){var a=it.simpleMap(e.range,e.r2l);return a[0]*a[1]<=0&&e.zeroline&&(e.type==="linear"||e.type==="-")&&!(e.rangebreaks&&e.maskBreaks(0)===tu)&&(dT(e,0)||!W5(t,e,r,a)||X5(t,e))};ze.clipEnds=function(t,e){return e.filter(function(r){return dT(t,r.x)})};function dT(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function W5(t,e,r,a){var i=r._mainAxis;if(!i)return;var n=t._fullLayout,o=e._id.charAt(0),l=ze.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 h=Math.max((d.linewidth+e.zerolinewidth)/2,1);function m(_){return typeof _=="number"&&Math.abs(_-s)<h}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=ze.list(t,l),v=0;v<u.length;v++){var p=u[v];if(p._mainAxis===i&&f(p))return!0}}function X5(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&&(Xl.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 Jd(t){var e=ea.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}ze.allowAutoMargin=function(t){for(var e=ze.list(t,"",!0),r=0;r<e.length;r++){var a=e[r];a.automargin&&(bo.allowAutoMargin(t,gp(a)),a.mirror&&bo.allowAutoMargin(t,hT(a))),Xl.getComponentMethod("rangeslider","isVisible")(a)&&bo.allowAutoMargin(t,pT(a))}};function gp(t){return t._id+".automargin"}function hT(t){return gp(t)+".mirror"}function pT(t){return t._id+".rangeslider"}ze.swap=function(t,e){for(var r=Y5(t,e),a=0;a<r.length;a++)q5(t,r[a].x,r[a].y)};function Y5(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]],qs(s.x,f.x),qs(s.y,f.y);qs(s.x,[o]),qs(s.y,[l])}}return r}function qs(t,e){for(var r=0;r<e.length;r++)t.indexOf(e[r])===-1&&t.push(e[r])}function q5(t,e,r){var a=[],i=[],n=t.layout,o,l;for(o=0;o<e.length;o++)a.push(ze.getFromId(t,e[o]));for(o=0;o<r.length;o++)i.push(ze.getFromId(t,r[o]));var s=Object.keys(v5),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],p=i[0][u],d=!0,h=!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?h=!0:y!==v&&(d=!1)}for(l=1;l<i.length&&d;l++){var b=i[l][u];u==="type"&&c.indexOf(p)!==-1&&c.indexOf(b)!==-1&&p!==b?m=!0:i[l][u]!==p&&(d=!1)}d&&(h&&(n[a[0]._name].type="linear"),m&&(n[i[0]._name].type="linear"),Z5(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&&it.swapAttrs(n.annotations[o],["?"])}}function Z5(t,e,r,a,i){var n=it.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 bp(t){return t._id==="angularaxis"}function ev(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 Ql(t){return(t.ticklabelposition||"").indexOf("inside")!==-1}function iu(t,e){Ql(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}function eh(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 K5(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}function Q5(t,e){return/%f/.test(e)?t>=y5:/%L/.test(e)?t>=m5:/%[SX]/.test(e)?t>=uc:/%M/.test(e)?t>=ql:/%[HI]/.test(e)?t>=$a:/%p/.test(e)?t>=Ti:/%[Aadejuwx]/.test(e)?t>=wr:/%[UVW]/.test(e)?t>=Gr:/%[Bbm]/.test(e)?t>=cc:/%[q]/.test(e)?t>=fc:/%[Yy]/.test(e)?t>=sc:!0}var Ct=xw.exports,J5=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")},e3=J5,mT=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&&(e3(a,c,l),(o==="linear"||o==="-")&&a("rangemode")),r.cleanRange()},xp={},yT={exports:{}},t3=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},ig=xe,r3=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]],a3=function(e,r,a,i){return a==="left"?e=0:a==="center"?e=1:a==="right"?e=2:e=ig.constrain(Math.floor(e*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=ig.constrain(Math.floor(r*3),0,2),r3[r][e]},gT={exports:{}},i3=ys,n3=Yc,o3=Gc.getGraphDiv,l3=Nc,th=gT.exports={};th.wrapped=function(t,e,r){t=o3(t),t._fullLayout&&n3.clear(t._fullLayout._uid+l3.HOVERID),th.raw(t,e,r)};th.raw=function(e,r){var a=e._fullLayout,i=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&i3.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 s3=gT.exports,f3=zM,tv=s_,c3=l_,u3=xe.removeElement,v3=gr,yn=yT.exports={};yn.align=t3;yn.getCursor=a3;var bT=s3;yn.unhover=bT.wrapped;yn.unhoverRaw=bT.raw;yn.init=function(e){var r=e.gd,a=1,i=r._context.doubleClickDelay,n=e.element,o,l,s,f,c,u,v,p;r._mouseDownTime||(r._mouseDownTime=0),n.style.pointerEvents="all",n.onmousedown=m,c3?(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 h=e.clampFn||d;function m(_){r._dragged=!1,r._dragging=!0;var g=ng(_);o=g[0],l=g[1],v=_.target,u=_,p=_.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),tv&&!p?(c=xT(),c.style.cursor=window.getComputedStyle(n).cursor):tv||(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=ng(_),x=e.minDrag||v3.MINDRAG,w=h(g[0]-o,g[1]-l,x),T=w[0],A=w[1];(T||A)&&(r._dragged=!0,yn.unhover(r,_)),r._dragged&&e.moveFn&&!p&&(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),tv?u3(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),p||v.dispatchEvent(new MouseEvent("click",_))}r._dragging=!1,r._dragged=!1}};function xT(){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}yn.coverSlip=xT;function ng(t){return f3(t.changedTouches?t.changedTouches[0]:t,document.body)}var Ba=yT.exports,nu={},Pi=function(e,r){(e.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&e.classed(a,!1)}),r&&e.classed("cursor-"+r,!0)},rv=Pi,cl="data-savedcursor",og="!!",d3=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,og)}rv(e,r)}else a&&(e.attr(cl,null),a===og?rv(e):rv(e,a))},av=fr,h3=Tr,_T={_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:h3.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:av({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:av({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:av({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"},Xo={};Xo.isGrouped=function(e){return(e.traceorder||"").indexOf("grouped")!==-1};Xo.isVertical=function(e){return e.orientation!=="h"};Xo.isReversed=function(e){return(e.traceorder||"").indexOf("reversed")!==-1};var iv=Je,jr=xe,p3=Lt,m3=oa,y3=_T,g3=ms,nv=Xo;function b3(t,e,r,a){var i=e[t]||{},n=p3.newContainer(r,t);function o(D,E){return jr.coerce(i,n,y3,D,E)}var l=jr.coerceFont(o,"font",r.font);o("bgcolor",r.paper_bgcolor),o("bordercolor");var s=o("visible");if(s){for(var f,c=function(D,E){var k=f._input,C=f;return jr.coerce(k,C,m3,D,E)},u=r.font||{},v=jr.coerceFont(o,"grouptitlefont",u,{overrideDflt:{size:Math.round(u.size*1.1)}}),p=0,d=!1,h="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))&&(p++,f.showlegend&&(d=!0,(!_&&iv.traceIs(f,"pie-like")||f._input.showlegend===!0)&&p++),jr.coerceFont(c,"legendgrouptitle.font",v)),(!_&&iv.traceIs(f,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(f.fill)!==-1)&&(h=nv.isGrouped({traceorder:h})?"grouped+reversed":"reversed"),f.legendgroup!==void 0&&f.legendgroup!==""&&(h=nv.isReversed({traceorder:h})?"reversed+grouped":"grouped")}var g=jr.coerce(e,r,g3,"showlegend",d&&p>(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,iv.getComponentMethod("rangeslider","isVisible")(e.xaxis)?M?(z=1.1,$="bottom"):(z=1,$="top"):M?(z=-.1,$="top"):(z=0,$="bottom")):(z=1,$="auto",S?L=1.02:(L=1,N="right")),jr.coerce(i,n,{x:{valType:"number",editType:"legend",min:S?-2:0,max:S?3:1,dflt:L}},"x"),jr.coerce(i,n,{y:{valType:"number",editType:"legend",min:M?-2:0,max:M?3:1,dflt:z}},"y"),o("traceorder",h),nv.isGrouped(r[t])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("indentation"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",N),o("yanchor",$),o("maxheight"),o("valign"),jr.noneOrAll(i,n,["x","y"]);var I=o("title.text");if(I){o("title.side",A?"left":"top");var H=jr.extendFlat({},l,{size:jr.bigFont(l.size)});jr.coerceFont(o,"title.font",H)}}}}var wT=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++)jr.pushUnique(f,n[i].legend);for(r._legends=[],i=0;i<f.length;i++){var c=f[i];b3(c,e,r,n),r[c]&&r[c].visible&&(r[c]._id=c),r._legends.push(c)}},Hn=Je,rh=xe,x3=rh.pushUnique,ov=!0,_3=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"&&ov&&r.data&&r._context.showTips&&rh.notifier(rh._(r,"Double-click on legend to isolate one trace"),"long"),ov=!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,p=(i.shapes||[]).filter(function(de){return de.showlegend}),d=v.concat(p),h=u.trace;h._isShape&&(h=h._fullInput);var m=h.legendgroup,y,b,_,g,x,w,T={},A=[],M=[],S=[];function L(de,Me){var De=A.indexOf(de),ue=T.visible;return ue||(ue=T.visible=[]),A.indexOf(de)===-1&&(A.push(de),De=A.length-1),ue[De]=Me,De}var z=(i.shapes||[]).map(function(de){return de._input}),$=!1;function N(de,Me){z[de].visible=Me,$=!0}function I(de,Me){if(!(u.groupTitle&&!f)){var De=de._fullInput||de,ue=De._isShape,Te=De.index;Te===void 0&&(Te=De._index);var Se=De.visible===!1?!1:Me;ue?N(Te,Se):L(Te,Se)}}var H=h.legend,D=h._fullInput,E=D&&D._isShape;if(!E&&Hn.traceIs(h,"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 P=C!==-1,F=[];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&&(P=!0),x3(c,X),F.push(X))}}if(!P)for(var O=0;O<F.length;O++){var Z=c.indexOf(F[O]);Z!==-1&&c.splice(Z,1)}}Hn.call("_guiRelayout",r,"hiddenlabels",c)}else{var W=m&&m.length,Y=[],B;if(W)for(y=0;y<d.length;y++)B=d[y],B.visible&&B.legendgroup===m&&Y.push(y);if(s==="toggle"){var Q;switch(h.visible){case!0:Q="legendonly";break;case!1:Q=!1;break;case"legendonly":Q=!0;break}if(W)if(f)for(y=0;y<d.length;y++){var ee=d[y];ee.visible!==!1&&ee.legendgroup===m&&I(ee,Q)}else I(h,Q);else I(h,Q)}else if(s==="toggleothers"){var se,oe,fe,pe,ge,be=!0;for(y=0;y<d.length;y++)if(ge=d[y],se=ge===h,fe=ge.showlegend!==!0,!(se||fe)&&(oe=W&&ge.legendgroup===m,!oe&&ge.legend===H&&ge.visible===!0&&!Hn.traceIs(ge,"notLegendIsolatable"))){be=!1;break}for(y=0;y<d.length;y++)if(ge=d[y],!(ge.visible===!1||ge.legend!==H)&&!Hn.traceIs(ge,"notLegendIsolatable"))switch(h.visible){case"legendonly":I(ge,!0);break;case!0:pe=be?!0:"legendonly",se=ge===h,fe=ge.showlegend!==!0&&!ge.legendgroup,oe=se||W&&ge.legendgroup===m,I(ge,oe||fe?!0:pe);break}}for(y=0;y<M.length;y++)if(_=M[y],!!_){var we=_.constructUpdate(),ye=Object.keys(we);for(b=0;b<ye.length;b++)g=ye[b],w=T[g]=T[g]||[],w[S[y]]=we[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);$?Hn.call("_guiUpdate",r,T,{shapes:z},A):Hn.call("_guiRestyle",r,T,A)}},TT={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5},lg=Je,lv=Xo,w3=function(e,r,a){var i=r._inHover,n=lv.isGrouped(r),o=lv.isReversed(r),l={},s=[],f=!1,c={},u=0,v=0,p,d;function h(D,E,k){if(r.visible!==!1&&!(a&&D!==r._id))if(E===""||!lv.isGrouped(r)){var C="~~i"+u;s.push(C),l[C]=[k],u++}else s.indexOf(E)===-1?(s.push(E),f=!0,l[E]=[k]):l[E].push(k)}for(p=0;p<e.length;p++){var m=e[p],y=m[0],b=y.trace,_=b.legend,g=b.legendgroup;if(!(!i&&(!b.visible||!b.showlegend)))if(lg.traceIs(b,"pie-like"))for(c[g]||(c[g]={}),d=0;d<m.length;d++){var x=m[d].label;c[g][x]||(h(_,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 h(_,g,y),v=Math.max(v,(b.name||"").length)}if(!s.length)return[];var w=!f||!n,T=[];for(p=0;p<s.length;p++){var A=l[s[p]];w?T.push(A[0]):T.push(A)}for(w&&(T=[T]),p=0;p<T.length;p++){var M=1/0;for(d=0;d<T[p].length;d++){var S=T[p][d].trace.legendrank;M>S&&(M=S)}T[p][0]._groupMinRank=M,T[p][0]._preGroupSort=p}var L=function(D,E){return D[0]._groupMinRank-E[0]._groupMinRank||D[0]._preGroupSort-E[0]._preGroupSort},z=function(D,E){return D.trace.legendrank-E.trace.legendrank||D._preSort-E._preSort};for(T.forEach(function(D,E){D[0]._preGroupSort=E}),T.sort(L),p=0;p<T.length;p++){T[p].forEach(function(D,E){D._preSort=E}),T[p].sort(z);var $=T[p][0].trace,N=null;for(d=0;d<T[p].length;d++){var I=T[p][d].trace.legendgrouptitle;if(I&&I.text){N=I,i&&(I.font=r._groupTitleFont);break}}if(o&&T[p].reverse(),N){var H=!1;for(d=0;d<T[p].length;d++)if(lg.traceIs(T[p][d].trace,"pie-like")){H=!0;break}T[p].unshift({i:-1,groupTitle:N,noClick:H,trace:{showlegend:$.showlegend,legendgroup:$.legendgroup,visible:r.groupclick==="toggleitem"?!0:$.visible}})}for(d=0;d<T[p].length;d++)T[p][d]=[T[p][d]]}return r._lgroupsLength=T.length,r._maxNameLength=v,T},Cn={};(function(t){var e=xe;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}})(Cn);var T3=kt,k3=ct,A3=function(e,r,a,i){var n=a.marker.pattern;n&&n.shape?T3.pointStyle(e,a,i,r):k3.fill(e,r.color)},sg=ct,fg=Cn.castOption,M3=A3,_p=function(e,r,a,i){var n=a.marker.line,o=fg(n.color,r.pts)||sg.defaultLine,l=fg(n.width,r.pts)||0;e.call(M3,r,a,i).style("stroke-width",l).call(sg.stroke,o)},br=ut,sv=Je,yr=xe,cg=yr.strTranslate,Hr=kt,qr=ct,fv=Ma.extractOpts,hc=kr,S3=_p,L3=Cn.castOption,C3=TT,ug=12,vg=5,Ui=2,D3=10,On=5,kT=function(e,r,a){var i=r._fullLayout;a||(a=i.legend);var n=a.itemsizing==="constant",o=a.itemwidth,l=(o+C3.itemGap*2)/2,s=cg(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=br.select(this),M=yr.ensureSingle(A,"g","layers");M.style("opacity",T[0].trace.opacity);var S=a.indentation,L=a.valign,z=T[0].lineHeight,$=T[0].height;if(L==="middle"&&S===0||!z||!$)M.attr("transform",null);else{var N={top:1,bottom:-1}[L],I=N*(.5*(z-$+3))||0,H=a.indentation;M.attr("transform",cg(H,I))}var D=M.selectAll("g.legendfill").data([T]);D.enter().append("g").classed("legendfill",!0);var E=M.selectAll("g.legendlines").data([T]);E.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(p).each(m).each(g).each(_).each(c).each(u).each(y).each(b);function c(T){var A=dg(T),M=A.showFill,S=A.showLine,L=A.showGradientLine,z=A.showGradientFill,$=A.anyFill,N=A.anyLine,I=T[0],H=I.trace,D,E,k=fv(H),C=k.colorscale,P=k.reversescale,F=function(Y){if(Y.size())if(M)Hr.fillGroupStyle(Y,r,!0);else{var B="legendfill-"+H.uid;Hr.gradient(Y,r,B,cv(P),C,"fill")}},j=function(Y){if(Y.size()){var B="legendline-"+H.uid;Hr.lineGroupStyle(Y),Hr.gradient(Y,r,B,cv(P),C,"stroke")}},G=hc.hasMarkers(H)||!$?"M5,0":N?"M5,-2":"M5,-3",X=br.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(F),S||L){var Z=f(void 0,H.line,D3,vg);E=yr.minExtend(H,{line:{width:Z}}),D=[yr.minExtend(I,{trace:E})]}var W=X.select(".legendlines").selectAll("path").data(S||L?[D]:[]);W.enter().append("path").classed("js-line",!0),W.exit().remove(),W.attr("d",G+(L?"l"+o+",0.0001":"h"+o)).call(S?Hr.lineGroupStyle:j)}function u(T){var A=dg(T),M=A.anyFill,S=A.anyLine,L=A.showLine,z=A.showMarker,$=T[0],N=$.trace,I=!z&&!S&&!M&&hc.hasText(N),H,D;function E(O,Z,W,Y){var B=yr.nestedProperty(N,O).get(),Q=yr.isArrayOrTypedArray(B)&&Z?Z(B):B;if(n&&Q&&Y!==void 0&&(Q=Y),W){if(Q<W[0])return W[0];if(Q>W[1])return W[1]}return Q}function k(O){return $._distinct&&$.index&&O[$.index]?O[$.index]:O[0]}if(z||I||L){var C={},P={};if(z){C.mc=E("marker.color",k),C.mx=E("marker.symbol",k),C.mo=E("marker.opacity",yr.mean,[.2,1]),C.mlc=E("marker.line.color",k),C.mlw=E("marker.line.width",yr.mean,[0,5],Ui),P.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var F=E("marker.size",yr.mean,[2,16],ug);C.ms=F,P.marker.size=F}L&&(P.line={width:E("line.width",k,[0,10],vg)}),I&&(C.tx="Aa",C.tp=E("textposition",k),C.ts=10,C.tc=E("textfont.color",k),C.tf=E("textfont.family",k),C.tw=E("textfont.weight",k),C.ty=E("textfont.style",k),C.tv=E("textfont.variant",k),C.tC=E("textfont.textcase",k),C.tE=E("textfont.lineposition",k),C.tS=E("textfont.shadow",k)),H=[yr.minExtend($,C)],D=yr.minExtend(N,P),D.selectedpoints=null,D.texttemplate=null}var j=br.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(Hr.pointStyle,D,r),z&&(H[0].mrc=3);var X=j.selectAll("g.pointtext").data(I?H:[]);X.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),X.exit().remove(),X.selectAll("text").call(Hr.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,h(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=br.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($){var N=br.select(this),I=A[$[0]].marker,H=f(void 0,I.line,On,Ui);N.attr("d",$[1]).style("stroke-width",H+"px").call(qr.fill,I.color),H&&N.call(qr.stroke,I.line.color)})}function p(T){h(T,this)}function d(T){h(T,this,"funnel")}function h(T,A,M){var S=T[0].trace,L=S.marker||{},z=L.line||{},$=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",N=M?S.visible&&S.type===M:sv.traceIs(S,"bar"),I=br.select(A).select("g.legendpoints").selectAll("path.legend"+M).data(N?[T]:[]);I.enter().append("path").classed("legend"+M,!0).attr("d",$).attr("transform",s),I.exit().remove(),I.each(function(H){var D=br.select(this),E=H[0],k=f(E.mlw,L.line,On,Ui);D.style("stroke-width",k+"px");var C=E.mcc;if(!a._inHover&&"mc"in E){var P=fv(L),F=P.mid;F===void 0&&(F=(P.max+P.min)/2),C=Hr.tryColorscale(L,"")(F)}var j=C||E.mc||L.color,G=L.pattern,X=Hr.getPatternAttr,O=G&&(X(G.shape,0,"")||X(G.path,0,""));if(O){var Z=X(G.bgcolor,0,null),W=X(G.fgcolor,0,null),Y=G.fgopacity,B=hg(G.size,8,10),Q=hg(G.solidity,.5,1),ee="legend-"+S.uid;D.call(Hr.pattern,"legend",r,ee,O,B,Q,C,G.fillmode,Z,W,Y)}else D.call(qr.fill,j);k&&qr.stroke(D,E.mlc||z.color)})}function m(T){var A=T[0].trace,M=br.select(this).select("g.legendpoints").selectAll("path.legendbox").data(A.visible&&sv.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=br.select(this);if((A.boxpoints==="all"||A.points==="all")&&qr.opacity(A.fillcolor)===0&&qr.opacity((A.line||{}).color)===0){var L=yr.minExtend(A,{marker:{size:n?ug:yr.constrain(A.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});M.call(Hr.pointStyle,L,r)}else{var z=f(void 0,A.line,On,Ui);S.style("stroke-width",z+"px").call(qr.fill,A.fillcolor),z&&qr.stroke(S,A.line.color)}})}function y(T){var A=T[0].trace,M=br.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=br.select(this),$=A[L?"increasing":"decreasing"],N=f(void 0,$.line,On,Ui);z.style("stroke-width",N+"px").call(qr.fill,$.fillcolor),N&&qr.stroke(z,$.line.color)})}function b(T){var A=T[0].trace,M=br.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=br.select(this),$=A[L?"increasing":"decreasing"],N=f(void 0,$.line,On,Ui);z.style("fill","none").call(Hr.dashLine,$.line.dash,N),N&&qr.stroke(z,$.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:sv.traceIs(L,M),$=br.select(A).select("g.legendpoints").selectAll("path.legend"+M).data(z?[T]:[]);if($.enter().append("path").classed("legend"+M,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),$.exit().remove(),$.size()){var N=L.marker||{},I=f(L3(N.line.width,S.pts),N.line,On,Ui),H="pieLike",D=yr.minExtend(L,{marker:{line:{width:I}}},H),E=yr.minExtend(S,{trace:D},H);S3($,E,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=br.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,$){var N=br.select(this),I=fv(A),H=I.colorscale,D=I.reversescale,E=function(F){if(F.size()){var j="legendfill-"+A.uid;Hr.gradient(F,r,j,cv(D,M==="radial"),H,"fill")}},k;if(H){if(!M){var P=H.length;k=$===0?H[D?P-1:0][1]:$===1?H[D?0:P-1][1]:H[Math.floor((P-1)/2)][1]}}else{var C=A.vertexcolor||A.facecolor||A.color;k=yr.isArrayOrTypedArray(C)?C[$]||C[0]:C}N.attr("d",z[0]),k?N.call(qr.fill,k):N.call(E)})}};function cv(t,e){var r=e?"radial":"horizontal";return r+(t?"":"reversed")}function dg(t){var e=t[0].trace,r=e.contours,a=hc.hasLines(e),i=hc.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 hg(t,e,r){return t&&yr.isArrayOrTypedArray(t)?e:t>r?r:t}var Pr=ut,Yt=xe,ah=Kt,xo=Je,pg=ys,uv=Ba,qt=kt,Of=ct,dn=or,mg=_3,er=TT,wp=Sr,AT=wp.LINE_SPACING,vo=wp.FROM_TL,yg=wp.FROM_BR,gg=w3,P3=kT,bg=Xo,no=1,E3=/^legend[0-9]*$/,MT=function(e,r){if(r)xg(e,r);else{var a=e._fullLayout,i=a._legends,n=a._infolayer.selectAll('[class^="legend"]');n.each(function(){var f=Pr.select(this),c=f.attr("class"),u=c.split(" ")[0];u.match(E3)&&i.indexOf(u)===-1&&f.remove()});for(var o=0;o<i.length;o++){var l=i[o],s=e._fullLayout[l];xg(e,s)}}};function z3(t,e,r){if(!(e.title.side!=="top center"&&e.title.side!=="top right")){var a=e.title.font,i=a.size*AT,n=0,o=t.node(),l=qt.bBox(o).width;e.title.side==="top center"?n=.5*(e._width-2*r-2*er.titlePad-l):e.title.side==="top right"&&(n=e._width-2*r-2*er.titlePad-l),dn.positionText(t,r+er.titlePad+n,r+i)}}function xg(t,e){var r=e||{},a=t._fullLayout,i=ou(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=gg(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 p={_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:p}])}}s=a.showlegend&&gg(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(),ah.autoMargin(t,i);var h=Yt.ensureSingle(o,"g",i,function(A){l||A.attr("pointer-events","all")}),m=Yt.ensureSingleById(a._topdefs,"clipPath",n,function(A){A.append("rect")}),y=Yt.ensureSingle(h,"rect","bg",function(A){A.attr("shape-rendering","crispEdges")});y.call(Of.stroke,r.bordercolor).call(Of.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var b=Yt.ensureSingle(h,"g","scrollbox"),_=r.title;r._titleWidth=0,r._titleHeight=0;var g;_.text?(g=Yt.ensureSingle(b,"text",i+"titletext"),g.attr("text-anchor","start").call(qt.font,_.font).text(_.text),jf(g,b,t,r,no)):b.selectAll("."+i+"titletext").remove();var x=Yt.ensureSingle(h,"rect","scrollbar",function(A){A.attr(er.scrollBarEnterAttrs).call(Of.fill,er.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(Yt.identity);T.enter().append("g").attr("class","traces"),T.exit().remove(),T.style("opacity",function(A){var M=A[0].trace;return xo.traceIs(M,"pie-like")?d.indexOf(A[0].label)!==-1?.5:1:M.visible==="legendonly"?.5:1}).each(function(){Pr.select(this).call(R3,t,r)}).call(P3,t,r).each(function(){l||Pr.select(this).call(I3,t,i)}),Yt.syncOrAsync([ah.previousPromises,function(){return N3(t,w,T,r)},function(){var A=a._size,M=r.borderwidth,S=r.xref==="paper",L=r.yref==="paper";if(_.text&&z3(g,r,M),!l){var z,$;S?z=A.l+A.w*r.x-vo[pc(r)]*r._width:z=a.width*r.x-vo[pc(r)]*r._width,L?$=A.t+A.h*(1-r.y)-vo[mc(r)]*r._effHeight:$=a.height*(1-r.y)-vo[mc(r)]*r._effHeight;var N=H3(t,i,z,$);if(N)return;if(a.margin.autoexpand){var I=z,H=$;z=S?Yt.constrain(z,0,a.width-r._width):I,$=L?Yt.constrain($,0,a.height-r._effHeight):H,z!==I&&Yt.log("Constrain "+i+".x to make legend fit inside graph"),$!==H&&Yt.log("Constrain "+i+".y to make legend fit inside graph")}qt.setTranslate(h,z,$)}if(x.on(".drag",null),h.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}),qt.setTranslate(b,0,0),m.select("rect").attr({width:r._width-2*M,height:D-2*M,x:M,y:M}),qt.setClipUrl(b,n,t),qt.setRect(x,0,0,0,0),delete r._scrollY}else{var E=Math.max(er.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),k=r._effHeight-E-2*er.scrollBarMargin,C=r._height-r._effHeight,P=k/C,F=Math.min(r._scrollY||0,C);y.attr({width:r._width-2*M+er.scrollBarWidth+er.scrollBarMargin,height:r._effHeight-M,x:M/2,y:M/2}),m.select("rect").attr({width:r._width-2*M+er.scrollBarWidth+er.scrollBarMargin,height:r._effHeight-2*M,x:M,y:M+F}),qt.setClipUrl(b,n,t),B(F,E,P),h.on("wheel",function(){F=Yt.constrain(r._scrollY+Pr.event.deltaY/k*C,0,C),B(F,E,P),F!==0&&F!==C&&Pr.event.preventDefault()});var j,G,X,O=function(fe,pe,ge){var be=(ge-pe)/P+fe;return Yt.constrain(be,0,C)},Z=function(fe,pe,ge){var be=(pe-ge)/P+fe;return Yt.constrain(be,0,C)},W=Pr.behavior.drag().on("dragstart",function(){var fe=Pr.event.sourceEvent;fe.type==="touchstart"?j=fe.changedTouches[0].clientY:j=fe.clientY,X=F}).on("drag",function(){var fe=Pr.event.sourceEvent;fe.buttons===2||fe.ctrlKey||(fe.type==="touchmove"?G=fe.changedTouches[0].clientY:G=fe.clientY,F=O(X,j,G),B(F,E,P))});x.call(W);var Y=Pr.behavior.drag().on("dragstart",function(){var fe=Pr.event.sourceEvent;fe.type==="touchstart"&&(j=fe.changedTouches[0].clientY,X=F)}).on("drag",function(){var fe=Pr.event.sourceEvent;fe.type==="touchmove"&&(G=fe.changedTouches[0].clientY,F=Z(X,j,G),B(F,E,P))});b.call(Y)}function B(fe,pe,ge){r._scrollY=t._fullLayout[i]._scrollY=fe,qt.setTranslate(b,0,-fe),qt.setRect(x,r._width,er.scrollBarMargin+fe*ge,er.scrollBarWidth,pe),m.select("rect").attr("y",M+fe)}if(t._context.edits.legendPosition){var Q,ee,se,oe;h.classed("cursor-move",!0),uv.init({element:h.node(),gd:t,prepFn:function(fe){if(fe.target!==x.node()){var pe=qt.getTranslate(h);se=pe.x,oe=pe.y}},moveFn:function(fe,pe){if(se!==void 0&&oe!==void 0){var ge=se+fe,be=oe+pe;qt.setTranslate(h,ge,be),Q=uv.align(ge,r._width,A.l,A.l+A.w,r.xanchor),ee=uv.align(be+r._height,-r._height,A.t+A.h,A.t,r.yanchor)}},doneFn:function(){if(Q!==void 0&&ee!==void 0){var fe={};fe[i+".x"]=Q,fe[i+".y"]=ee,xo.call("_guiRelayout",t,fe)}},clickFn:function(fe,pe){var ge=o.selectAll("g.traces").filter(function(){var be=this.getBoundingClientRect();return pe.clientX>=be.left&&pe.clientX<=be.right&&pe.clientY>=be.top&&pe.clientY<=be.bottom});ge.size()>0&&ST(t,h,ge,fe,pe)}})}}],t)}}function Zs(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 ST(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),xo.traceIs(n,"pie-like")&&(o.label=r.datum()[0].label);var l=pg.triggerHandler(t,"plotly_legendclick",o);if(a===1){if(l===!1)return;e._clickTimeout=setTimeout(function(){t._fullLayout&&mg(r,t,a)},t._context.doubleClickDelay)}else if(a===2){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0;var s=pg.triggerHandler(t,"plotly_legenddoubleclick",o);s!==!1&&l!==!1&&mg(r,t,a)}}function R3(t,e,r){var a=ou(r),i=t.data()[0][0],n=i.trace,o=xo.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=Yt.templateString(f,n._meta))));var u=Yt.ensureSingle(t,"text",a+"text");u.attr("text-anchor","start").call(qt.font,c).text(l?_g(f,s):f);var v=r.indentation+r.itemwidth+er.itemGap*2;dn.positionText(u,v,0),l?u.call(dn.makeEditable,{gd:e,text:f}).call(jf,t,e,r).on("edit",function(p){this.text(_g(p,s)).call(jf,t,e,r);var d=i.trace._fullInput||{},h={};return h.name=p,d._isShape?xo.call("_guiRelayout",e,"shapes["+n.index+"].name",h.name):xo.call("_guiRestyle",e,h,n.index)}):jf(u,t,e,r)}function _g(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 I3(t,e,r){var a=e._context.doubleClickDelay,i,n=1,o=Yt.ensureSingle(t,"rect",r+"toggle",function(l){e._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call(Of.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)),ST(e,l,t,n,Pr.event)}}))}function jf(t,e,r,a,i){a._inHover&&t.attr("data-notex",!0),dn.convertToTspans(t,r,function(){F3(e,r,a,i)})}function F3(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=ou(r);r||(r=e._fullLayout[l]);var s=r.borderwidth,f;a===no?f=r.title.font:i.groupTitle?f=i.groupTitle.font:f=r.font;var c=f.size*AT,u,v;if(o){var p=qt.bBox(o);u=p.height,v=p.width,a===no?qt.setTranslate(n,s,s+u*.75):qt.setTranslate(n,0,u*.25)}else{var d="."+l+(a===no?"title":"")+"text",h=t.select(d),m=dn.lineCount(h),y=h.node();if(u=c*m,v=y?qt.bBox(y).width:0,a===no)r.title.side==="left"&&(v+=er.itemGap*2),dn.positionText(h,s+er.titlePad,s+c);else{var b=er.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(b=er.itemGap,v-=r.indentation+r.itemwidth),dn.positionText(h,b,-c*((m-1)/2-.3))}}a===no?(r._titleWidth=v,r._titleHeight=u):(i.lineHeight=c,i.height=Math.max(u,16)+3,i.width=v)}function $3(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 N3(t,e,r,a){var i=t._fullLayout,n=ou(a);a||(a=i[n]);var o=i._size,l=bg.isVertical(a),s=bg.isGrouped(a),f=a.entrywidthmode==="fraction",c=a.borderwidth,u=2*c,v=er.itemGap,p=a.indentation+a.itemwidth+v*2,d=2*(c+v),h=mc(a),m=a.y<0||a.y===0&&h==="top",y=a.y>1||a.y===1&&h==="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=$3(a);if(l)r.each(function(B){var Q=B[0].height;qt.setTranslate(this,c+S[0],c+S[1]+a._height+Q/2+v),a._height+=Q,a._width=Math.max(a._width,B[0].width)}),M=p+a._width,a._width+=v+p+u,a._height+=d,s&&(e.each(function(B,Q){qt.setTranslate(this,0,Q*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var L=pc(a),z=a.x<0||a.x===0&&L==="right",$=a.x>1||a.x===1&&L==="left",N=y||m,I=i.width/2;a._maxWidth=Math.max(z?N&&L==="left"?o.l+o.w:I:$?N&&L==="right"?o.r+o.w:I:o.w,2*p);var H=0,D=0;r.each(function(B){var Q=Zs(B,a,p);H=Math.max(H,Q),D+=Q}),M=null;var E=0;if(s){var k=0,C=0,P=0;e.each(function(){var B=0,Q=0;Pr.select(this).selectAll("g.traces").each(function(se){var oe=Zs(se,a,p),fe=se[0].height;qt.setTranslate(this,S[0],S[1]+c+v+fe/2+Q),Q+=fe,B=Math.max(B,oe),_[se[0].trace.legendgroup]=B});var ee=B+v;C>0&&ee+c+C>a._maxWidth?(E=Math.max(E,C),C=0,P+=k+b,k=Q):k=Math.max(k,Q),qt.setTranslate(this,C,P),C+=ee}),a._width=Math.max(E,C)+c,a._height=P+k+d}else{var F=r.size(),j=D+u+(F-1)*v<a._maxWidth,G=0,X=0,O=0,Z=0;r.each(function(B){var Q=B[0].height,ee=Zs(B,a,p),se=j?ee:H;f||(se+=v),se+c+X-v>=a._maxWidth&&(E=Math.max(E,Z),X=0,O+=G,a._height+=G,G=0),qt.setTranslate(this,S[0]+c+X,S[1]+c+O+Q/2+v),Z=X+ee+v,X+=se,G=Math.max(G,Q)}),j?(a._width=X+u,a._height=G+d):(a._width=Math.max(E,Z)+u,a._height+=G+d)}}a._width=Math.ceil(Math.max(a._width+S[0],a._titleWidth+2*(c+er.titlePad))),a._height=Math.ceil(Math.max(a._height+S[1],a._titleHeight+2*(c+er.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var W=t._context.edits,Y=W.legendText||W.legendPosition;r.each(function(B){var Q=Pr.select(this).select("."+n+"toggle"),ee=B[0].height,se=B[0].trace.legendgroup,oe=Zs(B,a,p);s&&se!==""&&(oe=_[se]);var fe=Y?p:M||oe;!l&&!f&&(fe+=v/2),qt.setRect(Q,0,-ee/2,fe,ee)})}function H3(t,e,r,a){var i=t._fullLayout,n=i[e],o=pc(n),l=mc(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 ah.autoMargin(t,e,{x:n.x,y:n.y,l:n._width*vo[o],r:n._width*yg[o],b:n._effHeight*yg[l],t:n._effHeight*vo[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 pc(t){return Yt.isRightAnchor(t)?"right":Yt.isCenterAnchor(t)?"center":"left"}function mc(t){return Yt.isBottomAnchor(t)?"bottom":Yt.isMiddleAnchor(t)?"middle":"top"}function ou(t){return t._id||"legend"}var nn=ut,qa=ht,wg=Ta,jt=xe,O3=jt.pushUnique,vv=jt.strTranslate,j3=jt.strRotate,B3=ys,Kr=or,G3=d3,Ra=kt,ar=ct,Ks=Ba,Ia=Ct,U3=gr.zindexSeparator,Co=Je,da=la,gn=Nc,V3=wT,W3=MT,LT=gn.YANGLE,Tp=Math.PI*LT/180,X3=1/Math.sin(Tp),Y3=Math.cos(Tp),q3=Math.sin(Tp),zt=gn.HOVERARROWSIZE,gt=gn.HOVERTEXTPAD,Tg={box:!0,ohlc:!0,violin:!0,candlestick:!0},Z3={scatter:!0,scattergl:!0,splom:!0};function kg(t,e){return t.distance-e.distance}nu.hover=function(e,r,a,i){e=jt.getGraphDiv(e);var n=r.target;jt.throttle(e._fullLayout._uid+gn.HOVERID,gn.HOVERMINTIME,function(){K3(e,r,a,i,n)})};nu.loneHover=function(e,r){var a=!0;Array.isArray(e)||(a=!1,e=[e]);var i=r.gd,n=zT(i),o=RT(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(Co.traceIs(S,"gl3d")){var L=i._fullLayout[S.scene]._scene.container,z=L.offsetLeft,$=L.offsetTop;w+=z,T+=z,A+=$,M+=$}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||ar.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=DT(l,{gd:i,hovermode:"closest",rotateLabels:s,bgColor:r.bgColor||ar.background,container:nn.select(r.container),outerContainer:r.outerContainer||r.container}),c=f.hoverLabels,u=5,v=0,p=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&&(p=m.offset)}).each(function(m){m.offset-=p});var d=i._fullLayout._invScaleX,h=i._fullLayout._invScaleY;return ET(c,s,d,h),a?c:c.node()};function K3(t,e,r,a,i){r||(r="xy"),typeof r=="string"&&(r=r.split(U3)[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,p=(v||"").charAt(0)==="x",d=(v||"").charAt(0)==="y",h,m;if(u&&(p||d)&&s==="axis"){for(var y=n.length,b=0;b<y;b++)if(o=n[b],f[o]){h=Ia.getFromId(t,o,"x"),m=Ia.getFromId(t,o,"y");var _=(p?h:m)._subplotsWith;if(_&&_.length)for(var g=0;g<_.length;g++)O3(n,_[g])}}if(c&&s!=="single"){var x=c.overlays.map(function(Ge){return Ge.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{jt.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 Ks.unhoverRaw(t,e);var z=l.hoverdistance;z===-1&&(z=1/0);var $=l.spikedistance;$===-1&&($=1/0);var N=[],I=[],H,D,E,k,C,P,F,j,G,X,O,Z,W,Y={hLinePoint:null,vLinePoint:null},B=!1;if(Array.isArray(e))for(v="array",E=0;E<e.length;E++)C=t.calcdata[e[E].curveNumber||0],C&&(P=C[0].trace,C[0].trace.hoverinfo!=="skip"&&(I.push(C),P.orientation==="h"&&(B=!0)));else{var Q=t.calcdata.slice();for(Q.sort(function(Ge,rt){var at=Ge[0].trace.zorder||0,Ye=rt[0].trace.zorder||0;return at-Ye}),k=0;k<Q.length;k++)C=Q[k],P=C[0].trace,P.hoverinfo!=="skip"&&da.isTraceInSubplots(P,n)&&(I.push(C),P.orientation==="h"&&(B=!0));var ee=!i,se,oe;if(ee)"xpx"in e?se=e.xpx:se=T[0]._length/2,"ypx"in e?oe=e.ypx:oe=A[0]._length/2;else{if(B3.triggerHandler(t,"plotly_beforehover",e)===!1)return;var fe=i.getBoundingClientRect();se=e.clientX-fe.left,oe=e.clientY-fe.top,l._calcInverseTransform(t);var pe=jt.apply3DTransform(l._invTransform)(se,oe);if(se=pe[0],oe=pe[1],se<0||se>T[0]._length||oe<0||oe>A[0]._length)return Ks.unhoverRaw(t,e)}if(e.pointerX=se+T[0]._offset,e.pointerY=oe+A[0]._offset,"xval"in e?H=da.flat(n,e.xval):H=da.p2c(T,se),"yval"in e?D=da.flat(n,e.yval):D=da.p2c(A,oe),!qa(H[0])||!qa(D[0]))return jt.warn("Fx.hover failed",e,t),Ks.unhoverRaw(t,e)}var ge=1/0;function be(Ge,rt){for(k=0;k<I.length;k++)if(C=I[k],!(!C||!C[0]||!C[0].trace)&&(P=C[0].trace,!(P.visible!==!0||P._length===0)&&["carpet","contourcarpet"].indexOf(P._module.name)===-1)){if(G=v,da.isUnifiedHover(G)&&(G=G.charAt(0)),P.type==="splom"?(j=0,F=n[j]):(F=da.getSubplot(P),j=n.indexOf(F)),Z={cd:C,trace:P,xa:T[j],ya:A[j],maxHoverDistance:z,maxSpikeDistance:$,index:!1,distance:Math.min(ge,z),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:ar.defaultLine,name:P.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[F]&&(Z.subplot=l[F]._subplot),l._splomScenes&&l._splomScenes[P.uid]&&(Z.scene=l._splomScenes[P.uid]),G==="array"){var at=e[k];"pointNumber"in at?(Z.index=at.pointNumber,G="closest"):(G="","xval"in at&&(X=at.xval,G="x"),"yval"in at&&(O=at.yval,G=G?"closest":"y"))}else Ge!==void 0&&rt!==void 0?(X=Ge,O=rt):(X=H[j],O=D[j]);if(W=N.length,z!==0)if(P._module&&P._module.hoverPoints){var Ye=P._module.hoverPoints(Z,X,O,G,{finiteRange:!0,hoverLayer:l._hoverlayer,hoversubplots:s,gd:t});if(Ye)for(var wt,tt=0;tt<Ye.length;tt++)wt=Ye[tt],qa(wt.x0)&&qa(wt.y0)&&N.push(tP(wt,v))}else jt.log("Unrecognized trace type in hover:",P);if(v==="closest"&&N.length>W&&(N.splice(0,W),ge=N[0].distance),u&&$!==0&&N.length===0){Z.distance=$,Z.index=!1;var qe=P._module.hoverPoints(Z,X,O,"closest",{hoverLayer:l._hoverlayer});if(qe&&(qe=qe.filter(function(et){return et.spikeDistance<=$})),qe&&qe.length){var vt,pt=qe.filter(function(et){return et.xa.showspikes&&et.xa.spikesnap!=="hovered data"});if(pt.length){var lt=pt[0];qa(lt.x0)&&qa(lt.y0)&&(vt=ye(lt),(!Y.vLinePoint||Y.vLinePoint.spikeDistance>vt.spikeDistance)&&(Y.vLinePoint=vt))}var nt=qe.filter(function(et){return et.ya.showspikes&&et.ya.spikesnap!=="hovered data"});if(nt.length){var Ze=nt[0];qa(Ze.x0)&&qa(Ze.y0)&&(vt=ye(Ze),(!Y.hLinePoint||Y.hLinePoint.spikeDistance>vt.spikeDistance)&&(Y.hLinePoint=vt))}}}}}be();function we(Ge,rt,at){for(var Ye=null,wt=1/0,tt,qe=0;qe<Ge.length;qe++)h&&h._id!==Ge[qe].xa._id||m&&m._id!==Ge[qe].ya._id||(tt=Ge[qe].spikeDistance,at&&qe===0&&(tt=-1/0),tt<=wt&&tt<=rt&&(Ye=Ge[qe],wt=tt));return Ye}function ye(Ge){return Ge?{xa:Ge.xa,ya:Ge.ya,x:Ge.xSpike!==void 0?Ge.xSpike:(Ge.x0+Ge.x1)/2,y:Ge.ySpike!==void 0?Ge.ySpike:(Ge.y0+Ge.y1)/2,distance:Ge.distance,spikeDistance:Ge.spikeDistance,curveNumber:Ge.trace.index,color:Ge.color,pointNumber:Ge.index}:null}var de={fullLayout:l,container:l._hoverlayer,event:e};t._spikepoints;var Me={vLinePoint:Y.vLinePoint,hLinePoint:Y.hLinePoint};t._spikepoints=Me;var De=function(){var Ge=N.filter(function(at){return h&&h._id===at.xa._id&&m&&m._id===at.ya._id}),rt=N.filter(function(at){return!(h&&h._id===at.xa._id&&m&&m._id===at.ya._id)});Ge.sort(kg),rt.sort(kg),N=Ge.concat(rt),N=aP(N,v)};De();var ue=v.charAt(0),Te=(ue==="x"||ue==="y")&&N[0]&&Z3[N[0].trace.type];if(u&&$!==0&&N.length!==0){var Se=N.filter(function(Ge){return Ge.ya.showspikes}),J=we(Se,$,Te);Y.hLinePoint=ye(J);var _e=N.filter(function(Ge){return Ge.xa.showspikes}),re=we(_e,$,Te);Y.vLinePoint=ye(re)}if(N.length===0){var Ae=Ks.unhoverRaw(t,e);return u&&(Y.hLinePoint!==null||Y.vLinePoint!==null)&&Sg()&&Mg(t,Y,de),Ae}if(u&&Sg()&&Mg(t,Y,de),da.isXYhover(G)&&N[0].length!==0&&N[0].trace.type!=="splom"){var Le=N[0];Tg[Le.trace.type]?N=N.filter(function(Ge){return Ge.trace.index===Le.trace.index}):N=[Le];var K=N.length,ne=Cg("x",Le,l),ve=Cg("y",Le,l);be(ne,ve);var me=[],ke={},Pe=0,Ee=function(Ge){var rt=Tg[Ge.trace.type]?CT(Ge):Ge.trace.index;if(!ke[rt])Pe++,ke[rt]=Pe,me.push(Ge);else{var at=ke[rt]-1,Ye=me[at];at>0&&Math.abs(Ge.distance)<Math.abs(Ye.distance)&&(me[at]=Ge)}},Ne;for(Ne=0;Ne<K;Ne++)Ee(N[Ne]);for(Ne=N.length-1;Ne>K-1;Ne--)Ee(N[Ne]);N=me,De()}var Fe=t._hoverdata,ce=[],He=zT(t),Be=RT(t);for(E=0;E<N.length;E++){var $e=N[E],Ke=da.makeEventData($e,$e.trace,$e.cd);if($e.hovertemplate!==!1){var je=!1;$e.cd[$e.index]&&$e.cd[$e.index].ht&&(je=$e.cd[$e.index].ht),$e.hovertemplate=je||$e.trace.hovertemplate||!1}if($e.xa&&$e.ya){var R=$e.x0+$e.xa._offset,U=$e.x1+$e.xa._offset,V=$e.y0+$e.ya._offset,q=$e.y1+$e.ya._offset,le=Math.min(R,U),ae=Math.max(R,U),Re=Math.min(V,q),Ce=Math.max(V,q);Ke.bbox={x0:le+Be,x1:ae+Be,y0:Re+He,y1:Ce+He}}$e.eventData=[Ke],ce.push(Ke)}t._hoverdata=ce;var he=v==="y"&&(I.length>1||N.length>1)||v==="closest"&&B&&N.length>1,ie=ar.combine(l.plot_bgcolor||ar.background,l.paper_bgcolor),Ie=DT(N,{gd:t,hovermode:v,rotateLabels:he,bgColor:ie,container:l._hoverlayer,outerContainer:l._paper.node(),commonLabelOpts:l.hoverlabel,hoverdistance:l.hoverdistance}),Oe=Ie.hoverLabels;if(da.isUnifiedHover(v)||(J3(Oe,he,l,Ie.commonLabelBoundingBox),ET(Oe,he,l._invScaleX,l._invScaleY)),i&&i.tagName){var We=Co.getComponentMethod("annotations","hasClickToShow")(t,ce);G3(nn.select(i),We?"pointer":"")}!i||a||!rP(t,e,Fe)||(Fe&&t.emit("plotly_unhover",{event:e,points:Fe}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:T,yaxes:A,xvals:H,yvals:D}))}function CT(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 Q3=/<extra>([\s\S]*)<\/extra>/;function DT(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||gn.HOVERFONT,u=e.fontSize||gn.HOVERFONTSIZE,v=e.fontWeight||a.font.weight,p=e.fontStyle||a.font.style,d=e.fontVariant||a.font.variant,h=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=jn(r,s),S=M.top,L=M.width,z=M.height,$=T!==void 0&&b.distance<=e.hoverdistance&&(i==="x"||i==="y");if($){var N=!0,I,H;for(I=0;I<t.length;I++)if(N&&t[I].zLabel===void 0&&(N=!1),H=t[I].hoverinfo||t[I].trace.hoverinfo,H){var D=Array.isArray(H)?H:H.split("+");if(D.indexOf("all")===-1&&D.indexOf(i)===-1){$=!1;break}}N&&($=!1)}var E=l.selectAll("g.axistext").data($?[0]:[]);E.enter().append("g").classed("axistext",!0),E.exit().remove();var k={minX:0,maxX:0,minY:0,maxY:0};if(E.each(function(){var K=nn.select(this),ne=jt.ensureSingle(K,"path","",function(he){he.style({"stroke-width":"1px"})}),ve=jt.ensureSingle(K,"text","",function(he){he.attr("data-notex",1)}),me=f.bgcolor||ar.defaultLine,ke=f.bordercolor||ar.contrast(me),Pe=ar.contrast(me),Ee=f.font,Ne={weight:Ee.weight||v,style:Ee.style||p,variant:Ee.variant||d,textcase:Ee.textcase||h,lineposition:Ee.lineposition||m,shadow:Ee.shadow||y,family:Ee.family||c,size:Ee.size||u,color:Ee.color||Pe};ne.style({fill:me,stroke:ke}),ve.text(T).call(Ra.font,Ne).call(Kr.positionText,0,0).call(Kr.convertToTspans,r),K.attr("transform","");var Fe=jn(r,ve.node()),ce,He;if(i==="x"){var Be=_.side==="top"?"-":"";ve.attr("text-anchor","middle").call(Kr.positionText,0,_.side==="top"?S-Fe.bottom-zt-gt:S-Fe.top+zt+gt),ce=_._offset+(b.x0+b.x1)/2,He=g._offset+(_.side==="top"?0:g._length);var $e=Fe.width/2+gt,Ke=ce;ce<$e?Ke=$e:ce>a.width-$e&&(Ke=a.width-$e),ne.attr("d","M"+(ce-Ke)+",0L"+(ce-Ke+zt)+","+Be+zt+"H"+$e+"v"+Be+(gt*2+Fe.height)+"H"+-$e+"V"+Be+zt+"H"+(ce-Ke-zt)+"Z"),ce=Ke,k.minX=ce-$e,k.maxX=ce+$e,_.side==="top"?(k.minY=He-(gt*2+Fe.height),k.maxY=He-gt):(k.minY=He+gt,k.maxY=He+(gt*2+Fe.height))}else{var je,R,U;g.side==="right"?(je="start",R=1,U="",ce=_._offset+_._length):(je="end",R=-1,U="-",ce=_._offset),He=g._offset+(b.y0+b.y1)/2,ve.attr("text-anchor",je),ne.attr("d","M0,0L"+U+zt+","+zt+"V"+(gt+Fe.height/2)+"h"+U+(gt*2+Fe.width)+"V-"+(gt+Fe.height/2)+"H"+U+zt+"V-"+zt+"Z"),k.minY=He-(gt+Fe.height/2),k.maxY=He+(gt+Fe.height/2),g.side==="right"?(k.minX=ce+zt,k.maxX=ce+zt+(gt*2+Fe.width)):(k.minX=ce-zt-(gt*2+Fe.width),k.maxX=ce-zt);var V=Fe.height/2,q=S-Fe.top-V,le="clip"+a._uid+"commonlabel"+g._id,ae;if(ce<Fe.width+2*gt+zt){ae="M-"+(zt+gt)+"-"+V+"h-"+(Fe.width-gt)+"V"+V+"h"+(Fe.width-gt)+"Z";var Re=Fe.width-ce+gt;Kr.positionText(ve,Re,q),je==="end"&&ve.selectAll("tspan").each(function(){var he=nn.select(this),ie=Ra.tester.append("text").text(he.text()).call(Ra.font,Ne),Ie=jn(r,ie.node());Math.round(Ie.width)<Math.round(Fe.width)&&he.attr("x",Re-Ie.width),ie.remove()})}else Kr.positionText(ve,R*(gt+zt),q),ae=null;var Ce=a._topclips.selectAll("#"+le).data(ae?[0]:[]);Ce.enter().append("clipPath").attr("id",le).append("path"),Ce.exit().remove(),Ce.select("path").attr("d",ae),Ra.setClipUrl(ve,ae?le:null,r)}K.attr("transform",vv(ce,He))}),da.isUnifiedHover(i)){l.selectAll("g.hovertext").remove();var C=t.filter(function(K){return K.hoverinfo!=="none"});if(C.length===0)return[];var P=a.hoverlabel,F=P.font,j=C[0],G=((i==="x unified"?j.xa:j.ya).unifiedhovertitle||{}).text,X=G?jt.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:F},font:F,bgcolor:P.bgcolor,bordercolor:P.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},Z={font:F};V3(O,Z,r._fullData);var W=Z.legend;W.entries=[];for(var Y=0;Y<C.length;Y++){var B=C[Y];if(B.hoverinfo!=="none"){var Q=Ag(B,!0,i,a,T),ee=Q[0],se=Q[1];B.name=se,se!==""?B.text=se+" : "+ee:B.text=ee;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,W.entries.push([B])}}W.entries.sort(function(K,ne){return K[0].trace.index-ne[0].trace.index}),W.layer=l,W._inHover=!0,W._groupTitleFont=P.grouptitlefont,W3(r,W);var fe=l.select("g.legend"),pe=jn(r,fe.node()),ge=pe.width+2*gt,be=pe.height+2*gt,we=C[0],ye=(we.x0+we.x1)/2,de=(we.y0+we.y1)/2,Me=!(Co.traceIs(we.trace,"bar-like")||Co.traceIs(we.trace,"box-violin")),De,ue;x==="y"?Me?(ue=de-gt,De=de+gt):(ue=Math.min.apply(null,C.map(function(K){return Math.min(K.y0,K.y1)})),De=Math.max.apply(null,C.map(function(K){return Math.max(K.y0,K.y1)}))):ue=De=jt.mean(C.map(function(K){return(K.y0+K.y1)/2}))-be/2;var Te,Se;x==="x"?Me?(Te=ye+gt,Se=ye-gt):(Te=Math.max.apply(null,C.map(function(K){return Math.max(K.x0,K.x1)})),Se=Math.min.apply(null,C.map(function(K){return Math.min(K.x0,K.x1)}))):Te=Se=jt.mean(C.map(function(K){return(K.x0+K.x1)/2}))-ge/2;var J=_._offset,_e=g._offset;De+=_e,Te+=J,Se+=J-ge,ue+=_e-be;var re,Ae;return Te+ge<L&&Te>=0?re=Te:Se+ge<L&&Se>=0?re=Se:J+ge<L?re=J:Te-ye<ye-Se+ge?re=L-ge:re=0,re+=gt,De+be<z&&De>=0?Ae=De:ue+be<z&&ue>=0?Ae=ue:_e+be<z?Ae=_e:De-de<de-ue+be?Ae=z-be:Ae=0,Ae+=gt,fe.attr("transform",vv(re-1,Ae-1)),fe}var Le=l.selectAll("g.hovertext").data(t,function(K){return CT(K)});return Le.enter().append("g").classed("hovertext",!0).each(function(){var K=nn.select(this);K.append("rect").call(ar.fill,ar.addOpacity(o,.8)),K.append("text").classed("name",!0),K.append("path").style("stroke-width","1px"),K.append("text").classed("nums",!0).call(Ra.font,{weight:v,style:p,variant:d,textcase:h,lineposition:m,shadow:y,family:c,size:u})}),Le.exit().remove(),Le.each(function(K){var ne=nn.select(this).attr("transform",""),ve=K.color;Array.isArray(ve)&&(ve=ve[K.eventData[0].pointNumber]);var me=K.bgcolor||ve,ke=ar.combine(ar.opacity(me)?me:ar.defaultLine,o),Pe=ar.combine(ar.opacity(ve)?ve:ar.defaultLine,o),Ee=K.borderColor||ar.contrast(ke),Ne=Ag(K,$,i,a,T,ne),Fe=Ne[0],ce=Ne[1],He=ne.select("text.nums").call(Ra.font,{family:K.fontFamily||c,size:K.fontSize||u,color:K.fontColor||Ee,weight:K.fontWeight||v,style:K.fontStyle||p,variant:K.fontVariant||d,textcase:K.fontTextcase||h,lineposition:K.fontLineposition||m,shadow:K.fontShadow||y}).text(Fe).attr("data-notex",1).call(Kr.positionText,0,0).call(Kr.convertToTspans,r),Be=ne.select("text.name"),$e=0,Ke=0;if(ce&&ce!==Fe){Be.call(Ra.font,{family:K.fontFamily||c,size:K.fontSize||u,color:Pe,weight:K.fontWeight||v,style:K.fontStyle||p,variant:K.fontVariant||d,textcase:K.fontTextcase||h,lineposition:K.fontLineposition||m,shadow:K.fontShadow||y}).text(ce).attr("data-notex",1).call(Kr.positionText,0,0).call(Kr.convertToTspans,r);var je=jn(r,Be.node());$e=je.width+2*gt,Ke=je.height+2*gt}else Be.remove(),ne.select("rect").remove();ne.select("path").style({fill:ke,stroke:Ee});var R=K.xa._offset+(K.x0+K.x1)/2,U=K.ya._offset+(K.y0+K.y1)/2,V=Math.abs(K.x1-K.x0),q=Math.abs(K.y1-K.y0),le=jn(r,He.node()),ae=le.width/a._invScaleX,Re=le.height/a._invScaleY;K.ty0=(S-le.top)/a._invScaleY,K.bx=ae+2*gt,K.by=Math.max(Re+2*gt,Ke),K.anchor="start",K.txwidth=ae,K.tx2width=$e,K.offset=0;var Ce=(ae+zt+gt+$e)*a._invScaleX,he,ie;if(n)K.pos=R,he=U+q/2+Ce<=z,ie=U-q/2-Ce>=0,(K.idealAlign==="top"||!he)&&ie?(U-=q/2,K.anchor="end"):he?(U+=q/2,K.anchor="start"):K.anchor="middle",K.crossPos=U;else{if(K.pos=U,he=R+V/2+Ce<=L,ie=R-V/2-Ce>=0,(K.idealAlign==="left"||!he)&&ie)R-=V/2,K.anchor="end";else if(he)R+=V/2,K.anchor="start";else{K.anchor="middle";var Ie=Ce/2,Oe=R+Ie-L,We=R-Ie;Oe>0&&(R-=Oe),We<0&&(R+=-We)}K.crossPos=R}He.attr("text-anchor",K.anchor),$e&&Be.attr("text-anchor",K.anchor),ne.attr("transform",vv(R,U)+(n?j3(LT):""))}),{hoverLabels:Le,commonLabelBoundingBox:k}}function Ag(t,e,r,a,i,n){var o="",l="";t.nameOverride!==void 0&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=jt.templateString(t.name,t.trace._meta)),o=Lg(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=jt.hovertemplateString(c,u,a._d3locale,t.eventData[0]||{},t.trace._meta),l=l.replace(Q3,function(v,p){return o=Lg(p,t.nameLength),""})}return[l,o]}function J3(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,p=a.minY,d=a.maxY,h=function(H){return H*r._invScaleX},m=function(H){return H*r._invScaleY};t.each(function(H){var D=H[i],E=H[n],k=D._id.charAt(0)==="x",C=D.range;c===0&&C&&C[0]>C[1]!==k&&(l=-1);var P=0,F=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):h(H.bx/2+H.tx2width/2)),Z=O+(k?m(H.by):h(H.bx));else if(k)O=H.crossPos+m(zt+j.y)-m(H.by/2-zt),Z=O+m(H.by);else{var W=h(X*zt+j.x),Y=W+h(X*H.bx);O=H.crossPos+Math.min(W,Y),Z=H.crossPos+Math.max(W,Y)}k?p!==void 0&&d!==void 0&&Math.min(Z,d)-Math.max(O,p)>1&&(E.side==="left"?(P=E._mainLinePosition,F=r.width):F=E._mainLinePosition):u!==void 0&&v!==void 0&&Math.min(Z,v)-Math.max(O,u)>1&&(E.side==="top"?(P=E._mainLinePosition,F=r.height):F=E._mainLinePosition)}f[c++]=[{datum:H,traceIndex:H.trace.index,dp:0,pos:H.pos,posref:H.posref,size:H.by*(k?X3:1)/2,pmin:P,pmax:F}]}),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],E=H[H.length-1];if(b=D.pmin-D.pos-D.dp+D.size,_=E.pos+E.dp+E.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 $=f[g];for(x=$.length-1;x>=0;x--){var N=$[x],I=N.datum;I.offset=N.dp,I.del=N.del}}}function PT(t,e){var r=0,a=t.offset;return e&&(a*=-q3,r=t.offset*Y3),{x:r,y:a}}function eP(t){var e={start:1,end:-1,middle:0}[t.anchor],r=e*(zt+gt),a=r+e*(t.txwidth+gt),i=t.anchor==="middle";return i&&(r-=t.tx2width/2,a+=t.txwidth/2+gt),{alignShift:e,textShiftX:r,text2ShiftX:a}}function ET(t,e,r,a){var i=function(o){return o*r},n=function(o){return o*a};t.each(function(o){var l=nn.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),f=o.anchor,c=f==="end"?-1:1,u=eP(o),v=PT(o,e),p=v.x,d=v.y,h=f==="middle",m="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,y;h?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*zt+p)+","+n(zt+d)+"v"+n(o.by/2-zt)+"h"+i(c*o.bx)+"v-"+n(o.by)+"H"+i(c*zt+p)+"V"+n(d-zt)+"Z":y="M"+i(c*zt+p)+","+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=p+u.textShiftX,_=d+o.ty0-o.by/2+gt,g=o.textAlign||"auto";g!=="auto"&&(g==="left"&&f!=="start"?(s.attr("text-anchor","start"),b=h?-o.bx/2-o.tx2width/2+gt:-o.bx-gt):g==="right"&&f!=="end"&&(s.attr("text-anchor","end"),b=h?o.bx/2-o.tx2width/2-gt:o.bx+gt)),s.call(Kr.positionText,i(b),n(_)),o.tx2width&&(l.select("text.name").call(Kr.positionText,i(u.text2ShiftX+u.alignShift*gt+p),n(d+o.ty0-o.by/2+gt)),l.select("rect").call(Ra.setRect,i(u.text2ShiftX+(u.alignShift-1)*o.tx2width/2+p),n(d-o.by/2-1),i(o.tx2width),n(o.by+2)))})}function tP(t,e){var r=t.index,a=t.trace||{},i=t.cd[0],n=t.cd[r]||{};function o(v){return v||qa(v)&&v===0}var l=Array.isArray(r)?function(v,p){var d=jt.castOption(i,r,v);return o(d)?d:jt.extractOption({},a,"",p)}:function(v,p){return jt.extractOption(n,a,v,p)};function s(v,p,d){var h=l(p,d);o(h)&&(t[v]=h)}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=jt.constrain(t.x0,0,t.xa._length),t.x1=jt.constrain(t.x1,0,t.xa._length),t.y0=jt.constrain(t.y0,0,t.ya._length),t.y1=jt.constrain(t.y1,0,t.ya._length),t.xLabelVal!==void 0&&(t.xLabel="xLabel"in t?t.xLabel:Ia.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:Ia.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=Ia.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;t.xerrneg!==void 0?t.xLabel+=" +"+f+" / -"+Ia.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=Ia.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;t.yerrneg!==void 0?t.yLabel+=" +"+c+" / -"+Ia.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 Mg(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=ar.combine(i.plot_bgcolor,i.paper_bgcolor);if(l){var v=e.hLinePoint,p,d;f=v&&v.xa,c=v&&v.ya;var h=c.spikesnap;h==="cursor"?(p=o.pointerX,d=o.pointerY):(p=f._offset+v.x,d=c._offset+v.y);var m=wg.readability(v.color,u)<1.5?ar.contrast(u):v.color,y=c.spikemode,b=c.spikethickness,_=c.spikecolor||m,g=Ia.getPxPosition(t,c),x,w;if(y.indexOf("toaxis")!==-1||y.indexOf("across")!==-1){if(y.indexOf("toaxis")!==-1&&(x=g,w=p),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":Ra.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 $=wg.readability(M.color,u)<1.5?ar.contrast(u):M.color,N=f.spikemode,I=f.spikethickness,H=f.spikecolor||$,D=Ia.getPxPosition(t,f),E,k;if(N.indexOf("toaxis")!==-1||N.indexOf("across")!==-1){if(N.indexOf("toaxis")!==-1&&(E=D,k=L),N.indexOf("across")!==-1){var C=f._counterDomainMin,P=f._counterDomainMax;f.anchor==="free"&&(C=Math.min(C,f.position),P=Math.max(P,f.position)),E=n.t+(1-P)*n.h,k=n.t+(1-C)*n.h}a.insert("line",":first-child").attr({x1:S,x2:S,y1:E,y2:k,"stroke-width":I,stroke:H,"stroke-dasharray":Ra.dashStyle(f.spikedash,I)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:S,x2:S,y1:E,y2:k,"stroke-width":I+2,stroke:u}).classed("spikeline",!0).classed("crisp",!0)}N.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:S,cy:D-(f.side!=="top"?I:-I),r:I,fill:H}).classed("spikeline",!0)}}}function rP(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 Sg(t,e){return!0}function Lg(t,e){return Kr.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function aP(t,e){for(var r=e.charAt(0),a=[],i=[],n=[],o=0;o<t.length;o++){var l=t[o];Co.traceIs(l.trace,"bar-like")||Co.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 Cg(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 zT(t){return t.offsetTop+t.clientTop}function RT(t){return t.offsetLeft+t.clientLeft}function jn(t,e){var r=t._fullLayout,a=e.getBoundingClientRect(),i=a.left,n=a.top,o=i+a.width,l=n+a.height,s=jt.apply3DTransform(r._invTransform)(i,n),f=jt.apply3DTransform(r._invTransform)(o,l),c=s[0],u=s[1],v=f[0],p=f[1];return{x:c,y:u,width:v-c,height:p-u,top:Math.min(u,p),left:Math.min(c,v),right:Math.max(c,v),bottom:Math.max(u,p)}}var iP=xe,nP=ct,oP=la.isUnifiedHover,kp=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&&oP(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),n?(i.bgcolor||(i.bgcolor=nP.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),iP.coerceFont(a,"hoverlabel.font",i.font),a("hoverlabel.align",i.align)},lP=xe,sP=kp,fP=hs,cP=function(e,r){function a(i,n){return lP.coerce(e,r,fP,i,n)}sP(e,r,a)},Dg=xe,uP=Hc,vP=kp,dP=function(e,r,a,i){function n(l,s){return Dg.coerce(e,r,uP,l,s)}var o=Dg.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),vP(e,r,n,o)},hP=xe,pP=hs,IT=function(e,r){function a(i,n){return r[i]!==void 0?r[i]:hP.coerce(e,r,pP,i,n)}return a("clickmode"),a("hoversubplots"),a("hovermode")},Pg=xe,mP=hs,yP=IT,gP=kp,bP=function(e,r){function a(c,u){return Pg.coerce(e,r,mP,c,u)}var i=yP(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"),gP(e,r,a),Pg.coerceFont(a,"hoverlabel.grouptitlefont",r.hoverlabel.font)},ih=xe,Eg=Je,xP=function(e){var r=e.calcdata,a=e._fullLayout;function i(f){return function(c){return ih.coerceHoverinfo({hoverinfo:c},{_module:f._module},a)}}for(var n=0;n<r.length;n++){var o=r[n],l=o[0].trace;if(!Eg.traceIs(l,"pie-like")){var s=Eg.traceIs(l,"2dMap")?_P:ih.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 _P(t,e,r,a){a=a||ih.identity,Array.isArray(t)&&(e[0][r]=a(t))}var wP=Je,TP=nu.hover,kP=function(e,r,a){var i=wP.getComponentMethod("annotations","onClick")(e,e._hoverdata);a!==void 0&&TP(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())},AP=ut,yc=xe,MP=Ba,ul=la,zg=hs,Rg=nu,wa={moduleType:"component",name:"fx",constants:Nc,schema:{layout:zg},attributes:Hc,layoutAttributes:zg,supplyLayoutGlobalDefaults:cP,supplyDefaults:dP,supplyLayoutDefaults:bP,calc:xP,getDistanceFunction:ul.getDistanceFunction,getClosest:ul.getClosest,inbox:ul.inbox,quadrature:ul.quadrature,appendArrayPointValue:ul.appendArrayPointValue,castHoverOption:LP,castHoverinfo:CP,hover:Rg.hover,unhover:MP.unhover,loneHover:Rg.loneHover,loneUnhover:SP,click:kP};function SP(t){var e=yc.isD3Selection(t)?t:AP.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function LP(t,e,r){return yc.castOption(t,e,"hoverlabel."+r)}function CP(t,e,r){function a(i){return yc.coerceHoverinfo({hoverinfo:i},{_module:t._module},e)}return yc.castOption(t,r,"hoverinfo",a)}var Dn={};(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)}})(Dn);var Ap=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})})},lu={},FT={exports:{}},Mp={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("")}},Ei={},Qs=32,Sp={CIRCLE_SIDES:Qs,i000:0,i090:Qs/4,i180:Qs/2,i270:Qs/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)},DP=xe.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 PP(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 EP(t){var e=t._id.charAt(0)==="y"?1:0;return function(r){return $T(t,r[e])}}function zP(t){return DP(t.xaxis._offset,t.yaxis._offset)}var Lp={p2r:$T,r2p:PP,axValue:EP,getTransform:zP};(function(t){var e=o_,r=Sp,a=r.CIRCLE_SIDES,i=r.SQRT2,n=Lp,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 p=v.length;if(!p)return"M0,0Z";for(var d="",h=0;h<p;h++)for(var m=v[h].length,y=0;y<m;y++){var b=v[h][y][0];if(b==="Z")d+="Z";else for(var _=v[h][y].length,g=0;g<_;g++){var x=g;b==="Q"||b==="S"?x=f[g]:b==="C"&&(x=s[g]),d+=v[h][y][x],g>0&&g<_-1&&(d+=",")}}return d},t.readPaths=function(v,p,d,h){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,I,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],N=+m[S][2],x=+m[S][3],w=+m[S][4],L.push([D,x,w,z,N]);break;case"C":z=+m[S][1],N=+m[S][2],$=+m[S][3],I=+m[S][4],x=+m[S][5],w=+m[S][6],L.push([D,x,w,z,N,$,I]);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 E=+m[S][1],k=+m[S][2];+m[S][4]||(E=-E,k=-k);var C=x-E,P=w;for(g=1;g<=a/2;g++){var F=2*Math.PI*g/a;L.push([D,C+E*Math.cos(F),P+k*Math.sin(F)])}break;case"Z":(x!==T||w!==A)&&(x=T,w=A,L.push([D,x,w]));break}for(var j=(d||{}).domain,G=p._fullLayout._size,X=d&&d.xsizemode==="pixel",O=d&&d.ysizemode==="pixel",Z=h===!1,W=0;W<L.length;W++){for(g=0;g+2<7;g+=2){var Y=L[W][g+1],B=L[W][g+2];Y===void 0||B===void 0||(x=Y,w=B,d&&(d.xaxis&&d.xaxis.p2r?(Z&&(Y-=d.xaxis._offset),X?Y=l(d.xaxis,d.xanchor)+Y:Y=o(d.xaxis,Y)):(Z&&(Y-=G.l),j?Y=j.x[0]+Y/G.w:Y=Y/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[W][g+1]=Y,L[W][g+2]=B)}y[b].push(L[W].slice())}}return y};function c(v,p){return Math.abs(v-p)<=1e-6}function u(v,p){var d=p[1]-v[1],h=p[2]-v[2];return Math.sqrt(d*d+h*h)}t.pointsOnRectangle=function(v){var p=v.length;if(p!==5)return!1;for(var d=1;d<3;d++){var h=v[0][d]-v[1][d],m=v[3][d]-v[2][d];if(!c(h,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 p=v.length;if(p!==a+1)return!1;p=a;for(var d=0;d<p;d++){var h=(p*2-d)%p,m=(p/2+h)%p,y=(p/2+d)%p;if(!c(u(v[d],v[y]),u(v[h],v[m])))return!1}return!0},t.handleEllipse=function(v,p,d){if(!v)return[p,d];var h=t.ellipseOver({x0:p[0],y0:p[1],x1:d[0],y1:d[1]}),m=(h.x1+h.x0)/2,y=(h.y1+h.y0)/2,b=(h.x1-h.x0)/2,_=(h.y1-h.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 p=v.x0,d=v.y0,h=v.x1,m=v.y1,y=h-p,b=m-d;p-=y,d-=b;var _=(p+h)/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,p,d){var h=p.type==="date",m=d.type==="date";if(!h&&!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)h&&(v[y][b][_+1]=v[y][b][_+1].replace(" ","_")),m&&(v[y][b][_+2]=v[y][b][_+2].replace(" ","_"));return v}})(Ei);var Ig=Ut,NT=Dn,RP=NT.drawMode,IP=NT.openMode,Yo=Sp,Fg=Yo.i000,$g=Yo.i090,Ng=Yo.i180,Hg=Yo.i270,FP=Yo.cos45,$P=Yo.sin45,HT=Lp,Js=HT.p2r,ci=HT.r2p,NP=Sn,HP=NP.clearOutline,su=Ei,OP=su.readPaths,jP=su.writePaths,BP=su.ellipseOver,GP=su.fixDatesForPaths;function UP(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(!RP(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=OT(t,e,n);HP(a);for(var c=e.editHelpers,u=(c||{}).modifyItem,v=[],p=0;p<o.length;p++){var d=a._fullLayout.shapes[p];if(v[p]=d._input,i!==void 0&&p===a._fullLayout._activeShapeIndex){var h=f;switch(d.type){case"line":case"rect":case"circle":var m=Ig.getFromId(a,d.xref);d.xref.charAt(0)==="x"&&m.type.includes("category")?(u("x0",h.x0-(d.x0shift||0)),u("x1",h.x1-(d.x1shift||0))):(u("x0",h.x0),u("x1",h.x1));var y=Ig.getFromId(a,d.yref);d.yref.charAt(0)==="y"&&y.type.includes("category")?(u("y0",h.y0-(d.y0shift||0)),u("y1",h.y1-(d.y1shift||0))):(u("y0",h.y0),u("y1",h.y1));break;case"path":u("path",h.path);break}}}return i===void 0?(v.push(f),v):c?c.getUpdateObj():{}}}}function OT(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,p=IP(r),d=OP(n,i,l,s),h={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}};p||(h.fillcolor=o.fillcolor,h.fillrule=o.fillrule);var m;if(d.length===1&&(m=d[0]),m&&m.length===5&&r==="drawrect")h.type="rect",h.x0=m[0][1],h.y0=m[0][2],h.x1=m[2][1],h.y1=m[2][2];else if(m&&r==="drawline")h.type="line",h.x0=m[0][1],h.y0=m[0][2],h.x1=m[1][1],h.y1=m[1][2];else if(m&&r==="drawcircle"){h.type="circle";var y=m[Fg][1],b=m[$g][1],_=m[Ng][1],g=m[Hg][1],x=m[Fg][2],w=m[$g][2],T=m[Ng][2],A=m[Hg][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=ci(l.xaxis,y),b=ci(l.xaxis,b),_=ci(l.xaxis,_),g=ci(l.xaxis,g)),S&&(x=ci(l.yaxis,x),w=ci(l.yaxis,w),T=ci(l.yaxis,T),A=ci(l.yaxis,A));var L=(b+g)/2,z=(x+T)/2,$=(g-b+_-y)/2,N=(A-w+T-x)/2,I=BP({x0:L,y0:z,x1:L+$*FP,y1:z+N*$P});M&&(I.x0=Js(l.xaxis,I.x0),I.x1=Js(l.xaxis,I.x1)),S&&(I.y0=Js(l.yaxis,I.y0),I.y1=Js(l.yaxis,I.y1)),h.x0=I.x0,h.y0=I.y0,h.x1=I.x1,h.y1=I.y1}else h.type="path",f&&c&&GP(d,f,c),h.path=jP(d),m=null;return h}var Cp={newShapes:UP,createShapeObj:OT},VP=Dn,WP=VP.selectMode,XP=Sn,YP=XP.clearOutline,Dp=Ei,qP=Dp.readPaths,ZP=Dp.writePaths,KP=Dp.fixDatesForPaths,jT=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(!WP(u)&&c!==void 0){var p=n._fullLayout._activeSelectionIndex;if(p<v.length)switch(n._fullLayout.selections[p].type){case"rect":u="select";break;case"path":u="lasso";break}}var d=qP(i,n,l,c),h={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"?(h.type="rect",h.x0=m[0][1],h.y0=m[0][2],h.x1=m[2][1],h.y1=m[2][2]):(h.type="path",s&&f&&KP(d,s,f),h.path=ZP(d),m=null),YP(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=h;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(h),_):y?y.getUpdateObj():{}}}},zi={},fu={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=fu,r=xe,a=Ct;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 p=u.substr(1).match(e.paramRE);if(!(!p||p.length<v)){var d=p[v],h=s?d:r.cleanNumber(d);f.push(h)}}}),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 p=t.shapePositionToRange(l);v=function(d){var h=n(l,s);return l._offset+l.r2p(p(d,!0))+h},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(p){var d=(p-l._offset)/l._length;return s?1-d:d};else{var v=t.rangeToShapePosition(l);u=function(p){return v(l.p2r(p-l._offset))}}else s?u=function(p){return 1-(p-c.t)/c.h}:u=function(p){return(p-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),p=o._fullLayout._size,d,h,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"?h=function(k){return u._offset+u._length*k}:(d=t.shapePositionToRange(u),h=function(k){return u._offset+u.r2p(d(k,!0))}):h=function(k){return p.l+p.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 p.t+p.h*(1-k)},s==="path")return u&&u.type==="date"&&(h=t.decodeDate(h)),v&&v.type==="date"&&(y=t.decodeDate(y)),i(l,h,y);if(l.xsizemode==="pixel"){var S=h(l.xanchor);w=S+l.x0+b,T=S+l.x1+_}else w=h(l.x0)+b,T=h(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,$=(A+M)/2,N=Math.abs(z-w),I=Math.abs($-A),H="A"+N+","+I,D=z+N+","+$,E=z+","+($-I);return"M"+D+H+" 0 1,1 "+E+H+" 0 0,1 "+D+"Z"};function i(o,l,s){var f=o.path,c=o.xsizemode,u=o.ysizemode,v=o.xanchor,p=o.yanchor;return f.replace(e.segmentRE,function(d){var h=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[h]?c==="pixel"?x=l(v)+Number(x):x=l(x):b[h]&&(u==="pixel"?x=s(p)-Number(x):x=s(x)),h++,h>_&&(x="X"),x});return h>_&&(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}})(zi);var QP=xe,Bn=Ct,Og=or,jg=kt,JP=Ei.readPaths,nh=zi,eE=nh.getPathString,Bg=qh,tE=Sr.FROM_TL,BT=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=Bn.getFromId(e,a.xref),s=Bn.getFromId(e,a.yref);for(var f in Bg){var c=Bg[f](a,l,s);c!==void 0&&(o[f]=c)}}n=QP.texttemplateStringForShapes(a.label.texttemplate,{},e._fullLayout._d3locale,o)}else n=a.label.text;var u={"data-index":r},v=a.label.font,p={"data-notex":1},d=i.append("g").attr(u).classed("shape-label",!0),h=d.append("text").attr(p).classed("shape-label-text",!0).text(n),m,y,b,_;if(a.path){var g=eE(e,a),x=JP(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=Bn.getFromId(e,a.xref),$=a.x0shift,N=a.x1shift,I=Bn.getRefType(a.xref),H=Bn.getFromId(e,a.yref),D=a.y0shift,E=a.y1shift,k=Bn.getRefType(a.yref),C=function(W,Y){var B=nh.getDataToPixel(e,z,Y,!1,I);return B(W)},P=function(W,Y){var B=nh.getDataToPixel(e,H,Y,!0,k);return B(W)};m=C(a.x0,$),y=C(a.x1,N),b=P(a.y0,D),_=P(a.y1,E)}var F=a.label.textangle;F==="auto"&&(a.type==="line"?F=rE(m,b,y,_):F=0),h.call(function(W){return W.call(jg.font,v).attr({}),Og.convertToTspans(W,e),W});var j=jg.bBox(h.node()),G=aE(m,b,y,_,a,F,j),X=G.textx,O=G.texty,Z=G.xanchor;h.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[Z],y:O,x:X,transform:"rotate("+F+","+X+","+O+")"}).call(Og.positionText,X,O)}};function rE(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 aE(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),p=Math.cos(u),d=i.label.xanchor,h=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[h];b=-f*v*w,_=f*p*w}else{var T=g[d],A=x[h];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,h==="bottom"?y=y-_:h==="top"&&(y=y+_);var M=tE[h],S=i.label.font.size,L=o.height,z=(L*M-S)*v,$=-(L*M-S)*p;return{textx:m+z,texty:y+$,xanchor:d}}var iE=xe,nE=iE.strTranslate,Gg=Ba,GT=Dn,oE=GT.drawMode,UT=GT.selectMode,VT=Je,Ug=ct,cu=Sp,lE=cu.i000,sE=cu.i090,fE=cu.i180,cE=cu.i270,uE=Sn,WT=uE.clearOutlineControllers,Pp=Ei,ef=Pp.pointsOnRectangle,dv=Pp.pointsOnEllipse,vE=Pp.writePaths,dE=Cp.newShapes,hE=Cp.createShapeObj,pE=jT,mE=BT,Ep=function t(e,r,a,i){i||(i=0);var n=a.gd;function o(){t(e,r,a,i++),(dv(e[0])||a.hasText)&&l({redrawing:!0})}function l(D){var E={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,E=dE(r,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,E=pE(r,a),n._fullLayout._reselect=!0),Object.keys(E).length&&VT.call((D||{}).redrawing?"relayout":"_guiRelayout",n,E)}var s=n._fullLayout,f=s._zoomlayer,c=a.dragmode,u=oE(c),v=UT(c);(u||v)&&(n._fullLayout._outlining=!0),WT(n),r.attr("d",vE(e));var p,d,h,m,y;if(!i&&(a.isActiveShape||a.isActiveSelection)){y=yE([],e);var b=f.append("g").attr("class","outline-controllers");S(b),H()}if(u&&a.hasText){var _=f.select(".label-temp"),g=hE(r,a,a.dragmode);mE(n,"label-temp",g,_)}function x(D){h=+D.srcElement.getAttribute("data-i"),m=+D.srcElement.getAttribute("data-j"),p[h][m].moveFn=w}function w(D,E){if(e.length){var k=y[h][m][1],C=y[h][m][2],P=e[h],F=P.length;if(ef(P)){var j=D,G=E;if(a.isActiveSelection){var X=Vg(P,m);X[1]===P[m][1]?G=0:j=0}for(var O=0;O<F;O++)if(O!==m){var Z=P[O];Z[1]===P[m][1]&&(Z[1]=k+j),Z[2]===P[m][2]&&(Z[2]=C+G)}if(P[m][1]=k+j,P[m][2]=C+G,!ef(P))for(var W=0;W<F;W++)for(var Y=0;Y<P[W].length;Y++)P[W][Y]=y[h][W][Y]}else P[m][1]=k+D,P[m][2]=C+E;o()}}function T(){l()}function A(){if(e.length&&e[h]&&e[h].length){for(var D=[],E=0;E<e[h].length;E++)E!==m&&D.push(e[h][E]);D.length>1&&!(D.length===2&&D[1][0]==="Z")&&(m===0&&(D[0][0]="M"),e[h]=D,o(),l())}}function M(D,E){if(D===2){h=+E.srcElement.getAttribute("data-i"),m=+E.srcElement.getAttribute("data-j");var k=e[h];!ef(k)&&!dv(k)&&A()}}function S(D){p=[];for(var E=0;E<e.length;E++){var k=e[E],C=ef(k),P=!C&&dv(k);p[E]=[];for(var F=k.length,j=0;j<F;j++)if(k[j][0]!=="Z"&&!(P&&j!==lE&&j!==sE&&j!==fE&&j!==cE)){var G=C&&a.isActiveSelection,X;G&&(X=Vg(k,j));var O=k[j][1],Z=k[j][2],W=D.append(G?"rect":"circle").attr("data-i",E).attr("data-j",j).style({fill:Ug.background,stroke:Ug.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(G){var Y=X[1]-O,B=X[2]-Z,Q=B?5:Math.max(Math.min(25,Math.abs(Y)-5),5),ee=Y?5:Math.max(Math.min(25,Math.abs(B)-5),5);W.classed(B?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",Q).attr("height",ee).attr("x",O-Q/2).attr("y",Z-ee/2).attr("transform",nE(Y/2,B/2))}else W.classed("cursor-grab",!0).attr("r",5).attr("cx",O).attr("cy",Z);p[E][j]={element:W.node(),gd:n,prepFn:x,doneFn:T,clickFn:M},Gg.init(p[E][j])}}}function L(D,E){if(e.length)for(var k=0;k<e.length;k++)for(var C=0;C<e[k].length;C++)for(var P=0;P+2<e[k][C].length;P+=2)e[k][C][P+1]=y[k][C][P+1]+D,e[k][C][P+2]=y[k][C][P+2]+E}function z(D,E){L(D,E),o()}function $(D){h=+D.srcElement.getAttribute("data-i"),h||(h=0),d[h].moveFn=z}function N(){l()}function I(D){D===2&&gE(n)}function H(){if(d=[],!!e.length){var D=0;d[D]={element:r[0][0],gd:n,prepFn:$,doneFn:N,clickFn:I},Gg.init(d[D])}}};function yE(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 Vg(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 gE(t){if(UT(t._fullLayout.dragmode)){WT(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},VT.call("_guiRelayout",t,{selections:a})}}}var bE=ut,XT=Je,Wg=xe,Gn=Ct,xE=Ei.readPaths,_E=Ep,oh=BT,YT=Sn.clearOutlineControllers,hv=ct,zp=kt,wE=Lt.arrayEditor,Xg=Ba,Yg=Pi,an=fu,Dr=zi,lh=Dr.getPathString,Rp={draw:Ip,drawOne:qT,eraseActiveShape:AE};function Ip(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&&qT(t,i)}function tf(t){return!!t._fullLayout._outlining}function uu(t){return!t._context.edits.shapePosition}function qT(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=Dr.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=lh(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)",p=a.line.width,d=a.line.dash;!p&&a.editable===!0&&(p=5,d="solid");var h=s[s.length-1]!=="Z",m=uu(t)&&a.editable&&t._fullLayout._activeShapeIndex===e;m&&(u=h?"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(hv.stroke,v).call(hv.fill,u).call(zp.dashLine,d,p);ZT(y,t,a),oh(t,e,a,y);var _;if((m||t._context.edits.shapePosition)&&(_=wE(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=xE(s,t);_E(x,b,g)}else t._context.edits.shapePosition?TE(t,b,a,e,l,_):a.editable===!0&&b.style("pointer-events",h||hv.opacity(u)*c<=.5?"stroke":"all");b.node().addEventListener("click",function(){return kE(t,b)})}}function ZT(t,e,r){var a=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");zp.setClipUrl(t,a?"clip"+e._fullLayout._uid+a:null,e)}function TE(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,p,d,h,m,y,b,_,g,x,w,T,A,M,S,L,z=bE.select(e.node().parentNode),$=Gn.getFromId(t,r.xref),N=Gn.getRefType(r.xref),I=Gn.getFromId(t,r.yref),H=Gn.getRefType(r.yref),D=r.x0shift,E=r.x1shift,k=r.y0shift,C=r.y1shift,P=function(we,ye){var de=Dr.getDataToPixel(t,$,ye,!1,N);return de(we)},F=function(we,ye){var de=Dr.getDataToPixel(t,I,ye,!0,H);return de(we)},j=Dr.getPixelToData(t,$,!1,N),G=Dr.getPixelToData(t,I,!0,H),X=W(),O={element:X.node(),gd:t,prepFn:Q,doneFn:ee,clickFn:se},Z;Xg.init(O),X.node().onmousemove=B;function W(){return c?Y():e}function Y(){var we=10,ye=Math.max(r.line.width,we),de=i.append("g").attr("data-index",a).attr("drag-helper",!0);de.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":ye,"stroke-opacity":"0"});var Me={"fill-opacity":"0"},De=Math.max(ye/2,we);return de.append("circle").attr({"data-line-point":"start-point",cx:s?P(r.xanchor)+r.x0:P(r.x0,D),cy:f?F(r.yanchor)-r.y0:F(r.y0,k),r:De}).style(Me).classed("cursor-grab",!0),de.append("circle").attr({"data-line-point":"end-point",cx:s?P(r.xanchor)+r.x1:P(r.x1,E),cy:f?F(r.yanchor)-r.y1:F(r.y1,C),r:De}).style(Me).classed("cursor-grab",!0),de}function B(we){if(tf(t)){Z=null;return}if(c)we.target.tagName==="path"?Z="move":Z=we.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ye=O.element.getBoundingClientRect(),de=ye.right-ye.left,Me=ye.bottom-ye.top,De=we.clientX-ye.left,ue=we.clientY-ye.top,Te=!u&&de>o&&Me>l&&!we.shiftKey?Xg.getCursor(De/de,1-ue/Me):"move";Yg(e,Te),Z=Te.split("-")[0]}}function Q(we){tf(t)||(s&&(y=P(r.xanchor)),f&&(b=F(r.yanchor)),r.type==="path"?L=r.path:(p=s?r.x0:P(r.x0),d=f?r.y0:F(r.y0),h=s?r.x1:P(r.x1),m=f?r.y1:F(r.y1)),p<h?(x=p,M="x0",w=h,S="x1"):(x=h,M="x1",w=p,S="x0"),!f&&d<m||f&&d>m?(_=d,T="y0",g=m,A="y1"):(_=m,T="y1",g=d,A="y0"),B(we),pe(i,r),be(e,r,t),O.moveFn=Z==="move"?oe:fe,O.altKey=we.altKey)}function ee(){tf(t)||(Yg(e),ge(i),ZT(e,t,r),XT.call("_guiRelayout",t,n.getUpdateObj()))}function se(){tf(t)||ge(i)}function oe(we,ye){if(r.type==="path"){var de=function(ue){return ue},Me=de,De=de;s?v("xanchor",r.xanchor=j(y+we)):(Me=function(Te){return j(P(Te)+we)},$&&$.type==="date"&&(Me=Dr.encodeDate(Me))),f?v("yanchor",r.yanchor=G(b+ye)):(De=function(Te){return G(F(Te)+ye)},I&&I.type==="date"&&(De=Dr.encodeDate(De))),v("path",r.path=qg(L,Me,De))}else s?v("xanchor",r.xanchor=j(y+we)):(v("x0",r.x0=j(p+we)),v("x1",r.x1=j(h+we))),f?v("yanchor",r.yanchor=G(b+ye)):(v("y0",r.y0=G(d+ye)),v("y1",r.y1=G(m+ye)));e.attr("d",lh(t,r)),pe(i,r),oh(t,a,r,z)}function fe(we,ye){if(u){var de=function(Pe){return Pe},Me=de,De=de;s?v("xanchor",r.xanchor=j(y+we)):(Me=function(Ee){return j(P(Ee)+we)},$&&$.type==="date"&&(Me=Dr.encodeDate(Me))),f?v("yanchor",r.yanchor=G(b+ye)):(De=function(Ee){return G(F(Ee)+ye)},I&&I.type==="date"&&(De=Dr.encodeDate(De))),v("path",r.path=qg(L,Me,De))}else if(c){if(Z==="resize-over-start-point"){var ue=p+we,Te=f?d-ye:d+ye;v("x0",r.x0=s?ue:j(ue)),v("y0",r.y0=f?Te:G(Te))}else if(Z==="resize-over-end-point"){var Se=h+we,J=f?m-ye:m+ye;v("x1",r.x1=s?Se:j(Se)),v("y1",r.y1=f?J:G(J))}}else{var _e=function(Pe){return Z.indexOf(Pe)!==-1},re=_e("n"),Ae=_e("s"),Le=_e("w"),K=_e("e"),ne=re?_+ye:_,ve=Ae?g+ye:g,me=Le?x+we:x,ke=K?w+we:w;f&&(re&&(ne=_-ye),Ae&&(ve=g-ye)),(!f&&ve-ne>l||f&&ne-ve>l)&&(v(T,r[T]=f?ne:G(ne)),v(A,r[A]=f?ve:G(ve))),ke-me>o&&(v(M,r[M]=s?me:j(me)),v(S,r[S]=s?ke:j(ke)))}e.attr("d",lh(t,r)),pe(i,r),oh(t,a,r,z)}function pe(we,ye){(s||f)&&de();function de(){var Me=ye.type!=="path",De=we.selectAll(".visual-cue").data([0]),ue=1;De.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ue}).classed("visual-cue",!0);var Te=P(s?ye.xanchor:Wg.midRange(Me?[ye.x0,ye.x1]:Dr.extractPathCoords(ye.path,an.paramIsX))),Se=F(f?ye.yanchor:Wg.midRange(Me?[ye.y0,ye.y1]:Dr.extractPathCoords(ye.path,an.paramIsY)));if(Te=Dr.roundPositionForSharpStrokeRendering(Te,ue),Se=Dr.roundPositionForSharpStrokeRendering(Se,ue),s&&f){var J="M"+(Te-1-ue)+","+(Se-1-ue)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";De.attr("d",J)}else if(s){var _e="M"+(Te-1-ue)+","+(Se-9-ue)+"v18 h2 v-18 Z";De.attr("d",_e)}else{var re="M"+(Te-9-ue)+","+(Se-1-ue)+"h18 v2 h-18 Z";De.attr("d",re)}}}function ge(we){we.selectAll(".visual-cue").remove()}function be(we,ye,de){var Me=ye.xref,De=ye.yref,ue=Gn.getFromId(de,Me),Te=Gn.getFromId(de,De),Se="";Me!=="paper"&&!ue.autorange&&(Se+=Me),De!=="paper"&&!Te.autorange&&(Se+=De),zp.setClipUrl(we,Se?"clip"+de._fullLayout._uid+Se:null,de)}}function qg(t,e,r){return t.replace(an.segmentRE,function(a){var i=0,n=a.charAt(0),o=an.paramIsX[n],l=an.paramIsY[n],s=an.numParams[n],f=a.substr(1).replace(an.paramRE,function(c){return i>=s||(o[i]?c=e(c):l[i]&&(c=r(c)),i++),c});return n+f})}function kE(t,e){if(uu(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeShapeIndex){Zg(t);return}t._fullLayout._activeShapeIndex=a,t._fullLayout._deactivateShape=Zg,Ip(t)}}}function Zg(t){if(uu(t)){var e=t._fullLayout._activeShapeIndex;e>=0&&(YT(t),delete t._fullLayout._activeShapeIndex,Ip(t))}}function AE(t){if(uu(t)){YT(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,XT.call("_guiRelayout",t,{shapes:a})}}}var sa=Je,KT=Kt,QT=Ut,xt=Mp,ME=Rp.eraseActiveShape,Bf=xe,yt=Bf._,_t=FT.exports={};_t.toImage={name:"toImage",title:function(t){var e=t._context.toImageButtonOptions||{},r=e.format||"png";return r==="png"?yt(t,"Download plot as a PNG"):yt(t,"Download plot")},icon:xt.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};Bf.notifier(yt(t,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(a){a in e&&(r[a]=e[a])}),sa.call("downloadImage",t,r).then(function(a){Bf.notifier(yt(t,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){Bf.notifier(yt(t,"Sorry, there was a problem downloading your snapshot!"),"long")})}};_t.sendDataToCloud={name:"sendDataToCloud",title:function(t){return yt(t,"Edit in Chart Studio")},icon:xt.disk,click:function(t){KT.sendDataToCloud(t)}};_t.editInChartStudio={name:"editInChartStudio",title:function(t){return yt(t,"Edit in Chart Studio")},icon:xt.pencil,click:function(t){KT.sendDataToCloud(t)}};_t.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return yt(t,"Zoom")},attr:"dragmode",val:"zoom",icon:xt.zoombox,click:Ar};_t.pan2d={name:"pan2d",_cat:"pan",title:function(t){return yt(t,"Pan")},attr:"dragmode",val:"pan",icon:xt.pan,click:Ar};_t.select2d={name:"select2d",_cat:"select",title:function(t){return yt(t,"Box Select")},attr:"dragmode",val:"select",icon:xt.selectbox,click:Ar};_t.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return yt(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:xt.lasso,click:Ar};_t.drawclosedpath={name:"drawclosedpath",title:function(t){return yt(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:xt.drawclosedpath,click:Ar};_t.drawopenpath={name:"drawopenpath",title:function(t){return yt(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:xt.drawopenpath,click:Ar};_t.drawline={name:"drawline",title:function(t){return yt(t,"Draw line")},attr:"dragmode",val:"drawline",icon:xt.drawline,click:Ar};_t.drawrect={name:"drawrect",title:function(t){return yt(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:xt.drawrect,click:Ar};_t.drawcircle={name:"drawcircle",title:function(t){return yt(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:xt.drawcircle,click:Ar};_t.eraseshape={name:"eraseshape",title:function(t){return yt(t,"Erase active shape")},icon:xt.eraseshape,click:ME};_t.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return yt(t,"Zoom in")},attr:"zoom",val:"in",icon:xt.zoom_plus,click:Ar};_t.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return yt(t,"Zoom out")},attr:"zoom",val:"out",icon:xt.zoom_minus,click:Ar};_t.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return yt(t,"Autoscale")},attr:"zoom",val:"auto",icon:xt.autoscale,click:Ar};_t.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return yt(t,"Reset axes")},attr:"zoom",val:"reset",icon:xt.home,click:Ar};_t.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return yt(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:xt.tooltip_basic,gravity:"ne",click:Ar};_t.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return yt(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:xt.tooltip_compare,gravity:"ne",click:Ar};function Ar(t,e){var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o={},l=QT.list(t,null,!0),s=n._cartesianSpikesEnabled,f,c;if(a==="zoom"){var u=i==="in"?.5:2,v=(1+u)/2,p=(1-u)/2,d,h;for(c=0;c<l.length;c++)if(f=l[c],h=f.modebardisable==="none"||f.modebardisable.indexOf(i==="auto"||i==="reset"?"autoscale":"zoominout")===-1,h&&!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]+p*m[1],v*m[1]+p*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,sa.call("_guiRelayout",t,o)}_t.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return yt(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:xt.zoombox,click:vu};_t.pan3d={name:"pan3d",_cat:"pan",title:function(t){return yt(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:xt.pan,click:vu};_t.orbitRotation={name:"orbitRotation",title:function(t){return yt(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:xt["3d_rotate"],click:vu};_t.tableRotation={name:"tableRotation",title:function(t){return yt(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:xt["z-axis"],click:vu};function vu(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,sa.call("_guiRelayout",t,o)}_t.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return yt(t,"Reset camera to default")},attr:"resetDefault",icon:xt.home,click:Fp};_t.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return yt(t,"Reset camera to last save")},attr:"resetLastSave",icon:xt.movie,click:Fp};function Fp(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=a==="resetLastSave",n=a==="resetDefault",o=t._fullLayout,l=o._subplots.gl3d||[],s={},f=0;f<l.length;f++){var c=l[f],u=c+".camera",v=c+".aspectratio",p=c+".aspectmode",d=o[c]._scene,h;i?(s[u+".up"]=d.viewInitial.up,s[u+".eye"]=d.viewInitial.eye,s[u+".center"]=d.viewInitial.center,h=!0):n&&(s[u+".up"]=null,s[u+".eye"]=null,s[u+".center"]=null,h=!0),h&&(s[v+".x"]=d.viewInitial.aspectratio.x,s[v+".y"]=d.viewInitial.aspectratio.y,s[v+".z"]=d.viewInitial.aspectratio.z,s[p]=d.viewInitial.aspectmode)}sa.call("_guiRelayout",t,s)}_t.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return yt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:xt.tooltip_basic,gravity:"ne",click:SE};function JT(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 p=0;p<3;p++){var d=o[p],h=c+"."+d+".showspikes";s[h]=!1,l[h]=u[d].showspikes}}r._previousVal=l}return s}function SE(t,e){var r=JT(t,e);sa.call("_guiRelayout",t,r)}_t.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return yt(t,"Zoom in")},attr:"zoom",val:"in",icon:xt.zoom_plus,click:$p};_t.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return yt(t,"Zoom out")},attr:"zoom",val:"out",icon:xt.zoom_minus,click:$p};_t.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return yt(t,"Reset")},attr:"reset",val:null,icon:xt.autoscale,click:$p};_t.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return yt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:xt.tooltip_basic,gravity:"ne",click:t2};function $p(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;sa.call("_guiRelayout",t,s+".projection.scale",u)}}a==="reset"&&_o(t,"geo")}_t.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return yt(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:xt.tooltip_basic,gravity:"ne",click:t2};function e2(t){var e=t._fullLayout;return e.hovermode?!1:e._has("cartesian")?e._isHoriz?"y":"x":"closest"}function t2(t){var e=e2(t);sa.call("_guiRelayout",t,"hovermode",e)}_t.resetViewSankey={name:"resetSankeyGroup",title:function(t){return yt(t,"Reset view")},icon:xt.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())}sa.call("restyle",t,e)}};_t.toggleHover={name:"toggleHover",title:function(t){return yt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:xt.tooltip_basic,gravity:"ne",click:function(t,e){var r=JT(t,e);r.hovermode=e2(t),sa.call("_guiRelayout",t,r)}};_t.resetViews={name:"resetViews",title:function(t){return yt(t,"Reset views")},icon:xt.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),Ar(t,e),r.setAttribute("data-attr","resetLastSave"),Fp(t,e),_o(t,"geo"),_o(t,"mapbox"),_o(t,"map")}};_t.toggleSpikelines={name:"toggleSpikelines",title:function(t){return yt(t,"Toggle Spike Lines")},icon:xt.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled=r==="on"?"off":"on",sa.call("_guiRelayout",t,LE(t))}};function LE(t){for(var e=t._fullLayout,r=e._cartesianSpikesEnabled==="on",a=QT.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}_t.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return yt(t,"Reset view")},attr:"reset",icon:xt.home,click:function(t){_o(t,"mapbox")}};_t.resetViewMap={name:"resetViewMap",_cat:"resetView",title:function(t){return yt(t,"Reset view")},attr:"reset",icon:xt.home,click:function(t){_o(t,"map")}};_t.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return yt(t,"Zoom in")},attr:"zoom",val:"in",icon:xt.zoom_plus,click:r2};_t.zoomInMap={name:"zoomInMap",_cat:"zoomin",title:function(t){return yt(t,"Zoom in")},attr:"zoom",val:"in",icon:xt.zoom_plus,click:a2};_t.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return yt(t,"Zoom out")},attr:"zoom",val:"out",icon:xt.zoom_minus,click:r2};_t.zoomOutMap={name:"zoomOutMap",_cat:"zoomout",title:function(t){return yt(t,"Zoom out")},attr:"zoom",val:"out",icon:xt.zoom_minus,click:a2};function r2(t,e){i2(t,e,"mapbox")}function a2(t,e){i2(t,e,"map")}function i2(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}sa.call("_guiRelayout",t,s)}function _o(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]}sa.call("_guiRelayout",t,i)}var n2=FT.exports,o2=n2,CE=Object.keys(o2),l2=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],s2=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(l2),ho=[],DE=function(t){if(s2.indexOf(t._cat||t.name)===-1){var e=t.name,r=(t._cat||t.name).toLowerCase();ho.indexOf(e)===-1&&ho.push(e),ho.indexOf(r)===-1&&ho.push(r)}};CE.forEach(function(t){DE(o2[t])});ho.sort();var f2={DRAW_MODES:l2,backButtons:s2,foreButtons:ho},Kg=f2,c2={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 *"+Kg.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 *"+Kg.foreButtons.join("*, *")+"*."].join(" ")}},PE=xe,vl=ct,EE=Lt,zE=c2,RE=function(e,r){var a=e.modebar||{},i=EE.newContainer(r,"modebar");function n(l,s){return PE.coerce(a,i,zE,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")},Np=ut,IE=ht,du=xe,u2=Mp,FE=$c.version,$E=new DOMParser;function v2(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var Ga=v2.prototype;Ga.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(),du.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+n.activecolor,"fill: "+n.color,this.element)};Ga.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)})};Ga.createGroup=function(){var t=document.createElement("div");t.className="modebar-group";var e=this.graphInfo._fullLayout.modebar;return t.style.backgroundColor=e.bgcolor,t};Ga.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&&Np.select(r).classed("active",!0);var o=t.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||u2.question)),r.setAttribute("data-gravity",t.gravity||"n"),r};Ga.createIcon=function(t){var e=IE(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=$E.parseFromString(t.svg,"application/xml");a=n.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};Ga.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=Np.select(a),s=function(u,v){var p=e.modebar,d=u.querySelector(".icon path");d&&(v||u.matches(":hover")?d.style.fill=p.activecolor:d.style.fill=p.color)};if(o){if(n===r){var f=!l.classed("active");l.classed("active",f),s(a,f)}}else{var c=n===null?n:du.nestedProperty(e,n).get();l.classed("active",c===i),s(a,c===i)}})};Ga.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 NE(t){return t+" (v"+FE+")"}Ga.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",NE(du._(this.graphInfo,"Produced with Plotly.js"))),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(u2.newplotlylogo)),t.appendChild(e),t};Ga.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};Ga.destroy=function(){du.removeElement(this.container.querySelector(".modebar"))};function HE(t,e){var r=t._fullLayout,a=new v2({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&Np.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}var OE=HE,jE=Ut,Qg=kr,sh=Je,BE=la.isUnifiedHover,GE=OE,gc=n2,UE=f2.DRAW_MODES,VE=xe.extendDeep,WE=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=QE(n):!a.displayModeBar&&a.watermark?o=[]:o=XE(e),i?i.update(e,o):r._modeBar=GE(e,o)};function XE(t){var e=t._fullLayout,r=t._fullData,a=t._context;function i(E,k){if(typeof k=="string"){if(k.toLowerCase()===E.toLowerCase())return!0}else{var C=k.name,P=k._cat||k.name;if(C===E||P===E.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(E){for(var k=0;k<a.modeBarButtonsToRemove.length;k++)if(i(E,a.modeBarButtonsToRemove[k]))return!1;return!0})),s=a.modeBarButtonsToRemove.concat(o.filter(function(E){for(var k=0;k<a.modeBarButtonsToAdd.length;k++)if(i(E,a.modeBarButtonsToAdd[k]))return!1;return!0})),f=e._has("cartesian"),c=e._has("gl3d"),u=e._has("geo"),v=e._has("pie"),p=e._has("funnelarea"),d=e._has("ternary"),h=e._has("mapbox"),m=e._has("map"),y=e._has("polar"),b=e._has("smith"),_=e._has("sankey"),g=YE(e),x=BE(e.hovermode),w=[];function T(E){if(E.length){for(var k=[],C=0;C<E.length;C++){for(var P=E[C],F=gc[P],j=F.name.toLowerCase(),G=(F._cat||F.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(gc[P])}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||p||d)+u+c+h+m+y+b>1?(S=["toggleHover"],L=["resetViews"]):u?(M=["zoomInGeo","zoomOutGeo"],S=["hoverClosestGeo"],L=["resetGeo"]):c?(S=["hoverClosest3d"],L=["resetCameraDefault3d","resetCameraLastSave3d"]):h?(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"),(ZE(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"]:h||m||u?z=["pan2d"]:y&&(z=["zoom2d"]),qE(r)&&z.push("select2d","lasso2d");var $=[],N=function(E){$.indexOf(E)===-1&&S.indexOf(E)!==-1&&$.push(E)};if(Array.isArray(l)){for(var I=[],H=0;H<l.length;H++){var D=l[H];typeof D=="string"?(D=D.toLowerCase(),UE.indexOf(D)!==-1?(e._has("mapbox")||e._has("map")||e._has("cartesian"))&&z.push(D):D==="togglespikelines"?N("toggleSpikelines"):D==="togglehover"?N("toggleHover"):D==="hovercompare"?N("hoverCompareCartesian"):D==="hoverclosest"?(N("hoverClosestCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestPie")):D==="v1hovermode"&&(N("hoverClosestCartesian"),N("hoverCompareCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestPie"))):I.push(D)}l=I}return T(z),T(M.concat(L)),T($),KE(w,l)}function YE(t){for(var e=jE.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 qE(t){for(var e=!1,r=0;r<t.length&&!e;r++){var a=t[r];!a._module||!a._module.selectPoints||(sh.traceIs(a,"scatter-like")?(Qg.hasMarkers(a)||Qg.hasText(a))&&(e=!0):sh.traceIs(a,"box-violin")?(a.boxpoints==="all"||a.points==="all")&&(e=!0):e=!0)}return e}function ZE(t){for(var e=0;e<t.length;e++)if(!sh.traceIs(t[e],"noHover"))return!1;return!0}function KE(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 QE(t){for(var e=VE([],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(gc[n]!==void 0)e[r][i]=gc[n];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return e}var d2={moduleType:"component",name:"modebar",layoutAttributes:c2,supplyLayoutDefaults:RE,manage:WE},ri={},JE=Sr.FROM_BL,h2=function(e,r,a){a===void 0&&(a=JE[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()},Ji=xe,pv=xs,ma=Ut.id2name,ez=Oa,Jg=h2,tz=dp,rz=Xt.ALMOST_EQUAL,az=Sr.FROM_BL;ri.handleDefaults=function(t,e,r){var a=r.axIds,i=r.axHasImage,n=e._axisConstraintGroups=[],o=e._axisMatchGroups=[],l,s,f,c,u,v,p,d;for(l=0;l<a.length;l++)c=ma(a[l]),u=t[c],v=e[c],iz(u,v,{axIds:a,layoutOut:e,hasImage:i[c]});function h(A,M){for(l=0;l<A.length;l++){s=A[l];for(f in s)e[ma(f)][M]=s}}for(h(o,"_matchGroup"),l=0;l<n.length;l++){s=n[l];for(f in s)if(v=e[ma(f)],v.fixedrange){for(var m in s){var y=ma(m);(t[y]||{}).fixedrange===!1&&Ji.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[ma(f)],v._matchGroup&&Object.keys(v._matchGroup).length===Object.keys(s).length&&(n.splice(l,1),l--);break}l++}h(n,"_constraintGroup");var b=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],_=!1,g=!1;function x(){d=v[p],p==="rangebreaks"&&(g=v._hasDayOfWeekBreaks)}for(l=0;l<o.length;l++){s=o[l];for(var w=0;w<b.length;w++){p=b[w],d=null;var T;for(f in s)if(c=ma(f),u=t[c],v=e[c],p in v){if(!v.matches&&(T=v,p in u)){x();break}d===null&&p in u&&x()}if(p==="range"&&d&&u.range&&u.range.length===2&&u.range[0]!==null&&u.range[1]!==null&&(_=!0),p==="autorange"&&d===null&&_&&(d=!1),d===null&&p in T&&(d=T[p]),d!==null)for(f in s)v=e[ma(f)],v[p]=p==="range"?d.slice():d,p==="rangebreaks"&&(v._hasDayOfWeekBreaks=g,tz(v,e))}}};function iz(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 p(z,$){return Ji.coerce(t,e,ez,z,$)}p("constrain",n?"domain":"range"),Ji.coerce(t,e,{constraintoward:{valType:"enumerated",values:v?["left","center","right"]:["bottom","middle","top"],dflt:v?"center":"middle"}},"constraintoward");var d=e.type,h,m,y=[];for(h=0;h<a.length;h++)if(m=a[h],m!==u){var b=i[ma(m)];b.type===d&&y.push(m)}var _=p2(o,u);if(_){var g=[];for(h=0;h<y.length;h++)m=y[h],_[m]||g.push(m);y=g}var x=y.length,w,T;x&&(t.matches||c.matches)&&(w=Ji.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=Ji.coerce(t,e,{scaleanchor:{valType:"enumerated",values:y.concat([!1])}},"scaleanchor",A)),w){e._matchGroup=mv(l,u,w,1);var M=i[ma(w)],S=e0(i,e)/e0(i,M);v!==(w.charAt(0)==="x")&&(S=(v?"x":"y")+S),mv(o,u,w,S)}else t.matches&&a.indexOf(t.matches)!==-1&&Ji.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(T){var L=p("scaleratio");L||(L=e.scaleratio=1),mv(o,u,T,L)}else t.scaleanchor&&a.indexOf(t.scaleanchor)!==-1&&Ji.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 e0(t,e){var r=e.domain;return r||(r=t[ma(e.overlaying)].domain),r[1]-r[0]}function p2(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function mv(t,e,r,a){var i,n,o,l,s,f=p2(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]=yv(u,yv(a,f[l]));t.splice(s,1);return}if(a!==1)for(n=0;n<c.length;n++){var v=c[n];f[v]=yv(a,f[v])}f[r]=1}function yv(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 nz(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}ri.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=nz(a[i],r);var v=Object.keys(o),p=1/0,d=0,h=1/0,m={},y={},b=!1;for(n=0;n<v.length;n++)l=v[n],y[l]=s=r[ma(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],p=Math.min(p,f),(s.constrain==="domain"||!s._constraintShrinkable)&&(h=Math.min(h,f)),delete s._constraintShrinkable,d=Math.max(d,f),s.constrain==="domain"&&(b=!0);if(!(p>rz*d&&!b)){for(n=0;n<v.length;n++)if(l=v[n],f=m[l],s=y[l],c=s.constrain,f!==h||c==="domain")if(u=f/h,c==="range")Jg(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(),Jg(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,$=A+L*u*1.0001,N=pv.makePadFn(r,s,0),I=pv.makePadFn(r,s,1);t0(s,u);var H=Math.abs(s._m),D=pv.concatExtremes(e,s),E=D.min,k=D.max,C,P;for(P=0;P<E.length;P++)C=E[P].val-N(E[P])/H,C>z&&C<M&&(M=C);for(P=0;P<k.length;P++)C=k[P].val+I(k[P])/H,C<$&&C>S&&(S=C);var F=(S-M)/(2*L);u/=F,M=s.l2r(M),S=s.l2r(S),s.range=s._input.range=w<T?[M,S]:[S,M]}t0(s,u)}}}};ri.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};ri.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 t0(t,e){var r=t._inputDomain,a=az[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=ut,r=Je,a=Kt,i=xe,n=or,o=Ap,l=ct,s=kt,f=eu,c=d2,u=Ct,v=Sr,p=ri,d=p.enforce,h=p.clean,m=xs.doAutoRange,y="start",b="middle",_="end",g=gr.zindexSeparator;t.layoutStyles=function(k){return i.syncOrAsync([a.doAutoMargin,w],k)};function x(k,C,P){for(var F=0;F<P.length;F++){var j=P[F][0],G=P[F][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,P=C._size,F=P.p,j=u.list(k,"",!0),G,X,O,Z,W,Y;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(je,R,U){var V=je._lw/2;if(je._id.charAt(0)==="x"){if(R){if(U==="top")return R._offset-F-V}else return P.t+P.h*(1-(je.position||0))+V%1;return R._offset+R._length+F+V}if(R){if(U==="right")return R._offset+R._length+F+V}else return P.l+P.w*(je.position||0)+V%1;return R._offset-F-V}for(G=0;G<j.length;G++){Z=j[G];var Q=Z._anchorAxis;Z._linepositions={},Z._lw=s.crispRound(k,Z.linewidth,1),Z._mainLinePosition=B(Z,Q,Z.side),Z._mainMirrorPosition=Z.mirror&&Q?B(Z,Q,v.OPPOSITE_SIDE[Z.side]):null}var ee=[],se=[],oe=[],fe=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 pe=O.xaxis.domain,ge=O.yaxis.domain,be=O.plotgroup;if(x(pe,ge,oe)&&X.indexOf(g)===-1){var we=be.node(),ye=O.bg=i.ensureSingle(be,"rect","bg");we.insertBefore(ye.node(),we.childNodes[0]),se.push(X)}else be.select("rect.bg").remove(),oe.push([pe,ge]),fe||(ee.push(X),se.push(X))}var de=C._bgLayer.selectAll(".bg").data(ee);for(de.enter().append("rect").classed("bg",!0),de.exit().remove(),de.each(function(je){C._plots[je].bg=e.select(this)}),G=0;G<se.length;G++)O=C._plots[se[G]],W=O.xaxis,Y=O.yaxis,O.bg&&W._offset!==void 0&&Y._offset!==void 0&&O.bg.call(s.setRect,W._offset-F,Y._offset-F,W._length+2*F,Y._length+2*F).call(l.fill,C.plot_bgcolor).style("stroke-width",0);if(!C._hasOnlyLargeSploms)for(X in C._plots){O=C._plots[X],W=O.xaxis,Y=O.yaxis;var Me=O.clipId="clip"+C._uid+X+"plot",De=i.ensureSingleById(C._clips,"clipPath",Me,function(je){je.classed("plotclip",!0).append("rect")});O.clipRect=De.select("rect").attr({width:W._length,height:Y._length}),s.setTranslate(O.plot,W._offset,Y._offset);var ue,Te;O._hasClipOnAxisFalse?(ue=null,Te=Me):(ue=Me,Te=null),s.setClipUrl(O.plot,ue,k),O.layerClipId=Te}var Se,J,_e,re,Ae,Le,K,ne,ve,me,ke,Pe,Ee;function Ne(je){return"M"+Se+","+je+"H"+J}function Fe(je){return"M"+W._offset+","+je+"h"+W._length}function ce(je){return"M"+je+","+ne+"V"+K}function He(je){return Y._shift!==void 0&&(je+=Y._shift),"M"+je+","+Y._offset+"v"+Y._length}function Be(je,R,U){if(!je.showline||X!==je._mainSubplot)return"";if(!je._anchorAxis)return U(je._mainLinePosition);var V=R(je._mainLinePosition);return je.mirror&&(V+=R(je._mainMirrorPosition)),V}for(X in C._plots){O=C._plots[X],W=O.xaxis,Y=O.yaxis;var $e="M0,0";T(W,X)&&(Ae=M(W,"left",Y,j),Se=W._offset-(Ae?F+Ae:0),Le=M(W,"right",Y,j),J=W._offset+W._length+(Le?F+Le:0),_e=B(W,Y,"bottom"),re=B(W,Y,"top"),Ee=!W._anchorAxis||X!==W._mainSubplot,Ee&&(W.mirror==="allticks"||W.mirror==="all")&&(W._linepositions[X]=[_e,re]),$e=Be(W,Ne,Fe),Ee&&W.showline&&(W.mirror==="all"||W.mirror==="allticks")&&($e+=Ne(_e)+Ne(re)),O.xlines.style("stroke-width",W._lw+"px").call(l.stroke,W.showline?W.linecolor:"rgba(0,0,0,0)")),O.xlines.attr("d",$e);var Ke="M0,0";T(Y,X)&&(ke=M(Y,"bottom",W,j),K=Y._offset+Y._length+(ke?F:0),Pe=M(Y,"top",W,j),ne=Y._offset-(Pe?F:0),ve=B(Y,W,"left"),me=B(Y,W,"right"),Ee=!Y._anchorAxis||X!==Y._mainSubplot,Ee&&(Y.mirror==="allticks"||Y.mirror==="all")&&(Y._linepositions[X]=[ve,me]),Ke=Be(Y,ce,He),Ee&&Y.showline&&(Y.mirror==="all"||Y.mirror==="allticks")&&(Ke+=ce(ve)+ce(me)),O.ylines.style("stroke-width",Y._lw+"px").call(l.stroke,Y.showline?Y.linecolor:"rgba(0,0,0,0)")),O.ylines.attr("d",Ke)}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,P){if(!P.showline||!P._lw)return!1;if(P.mirror==="all"||P.mirror==="allticks")return!0;var F=P._anchorAxis;if(!F)return!1;var j=v.FROM_BL[C];return P.side===C?F.domain[j]===k.domain[j]:P.mirror&&F.domain[1-j]===k.domain[1-j]}function M(k,C,P,F){if(A(k,C,P))return P._lw;for(var j=0;j<F.length;j++){var G=F[j];if(G._mainAxis===P._mainAxis&&A(k,C,G))return G._lw}return 0}t.drawMainTitle=function(k){var C=k._fullLayout.title,P=k._fullLayout,F=D(P),j=E(P),G=I(P,j),X=N(P,F);if(f.draw(k,"gtitle",{propContainer:P,propName:"title.text",subtitlePropName:"title.subtitle.text",placeholder:P._dfltTitle.plot,subtitlePlaceholder:P._dfltTitle.subtitle,attributes:{x:X,y:G,"text-anchor":F,dy:j}}),C.text&&C.automargin){var O=e.selectAll(".gtitle"),Z=s.bBox(e.selectAll(".g-gtitle").node()).height,W=z(k,C,Z);if(W>0){$(k,G,W,Z),O.attr({x:X,y:G,"text-anchor":F,dy:H(C.yanchor)}).call(n.positionText,X,G);var Y=(C.text.match(n.BR_TAG_ALL)||[]).length;if(Y){var B=v.LINE_SPACING*Y+v.MID_SHIFT;C.y===0&&(B=-B),O.selectAll(".line").each(function(){var fe=+this.getAttribute("dy").slice(0,-2)-B+"em";this.setAttribute("dy",fe)})}var Q=e.selectAll(".gtitle-subtitle");if(Q.node()){var ee=O.node().getBBox(),se=ee.y+ee.height,oe=se+f.SUBTITLE_PADDING_EM*C.subtitle.font.size;Q.attr({x:X,y:oe,"text-anchor":F,dy:H(C.yanchor)}).call(n.positionText,X,oe)}}}};function S(k,C,P,F,j){var G=C.yref==="paper"?k._fullLayout._size.h:k._fullLayout.height,X=i.isTopAnchor(C)?F:F-j,O=P==="b"?G-X:X;return i.isTopAnchor(C)&&P==="t"||i.isBottomAnchor(C)&&P==="b"?!1:O<j}function L(k,C,P,F,j){var G=0;return P==="middle"&&(G+=j/2),k==="t"?(P==="top"&&(G+=j),G+=F-C*F):(P==="bottom"&&(G+=j),G+=C*F),G}function z(k,C,P){var F=C.y,j=C.yanchor,G=F>.5?"t":"b",X=k._fullLayout.margin[G],O=0;return C.yref==="paper"?O=P+C.pad.t+C.pad.b:C.yref==="container"&&(O=L(G,F,j,k._fullLayout.height,P)+C.pad.t+C.pad.b),O>X?O:0}function $(k,C,P,F){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,F)?O[X]=P:G.yref==="container"&&(Z[X]=P,k._fullLayout._reservedMargin[j]=Z),a.allowAutoMargin(k,j),a.autoMargin(k,j,O)}function N(k,C){var P=k.title,F=k._size,j=0;switch(C===y?j=P.pad.l:C===_&&(j=-P.pad.r),P.xref){case"paper":return F.l+F.w*P.x+j;case"container":default:return k.width*P.x+j}}function I(k,C){var P=k.title,F=k._size,j=0;if(C==="0em"||!C?j=-P.pad.b:C===v.CAP_SHIFT+"em"&&(j=P.pad.t),P.y==="auto")return F.t/2;switch(P.yref){case"paper":return F.t+F.h-F.h*P.y+j;case"container":default:return k.height-k.height*P.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,P=b;return i.isRightAnchor(C)?P=_:i.isLeftAnchor(C)&&(P=y),P}function E(k){var C=k.title,P="0em";return i.isTopAnchor(C)?P=v.CAP_SHIFT+"em":i.isMiddleAnchor(C)&&(P=v.MID_SHIFT+"em"),P}t.doTraceStyle=function(k){var C=k.calcdata,P=[],F;for(F=0;F<C.length;F++){var j=C[F],G=j[0]||{},X=G.trace||{},O=X._module||{},Z=O.arraysToCalcdata;Z&&Z(j,X);var W=O.editStyle;W&&P.push({fn:W,cd0:G})}if(P.length){for(F=0;F<P.length;F++){var Y=P[F];Y.fn(k,Y.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 P=0;P<C._basePlotModules.length;P++){var F=C._basePlotModules[P].updateFx;F&&F(k)}return a.previousPromises(k)},t.doCamera=function(k){for(var C=k._fullLayout,P=C._subplots.gl3d,F=0;F<P.length;F++){var j=C[P[F]],G=j._scene;G.setViewport(j)}},t.drawData=function(k){var C=k._fullLayout;o(k);for(var P=C._basePlotModules,F=0;F<P.length;F++)P[F].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 P=k._fullData,F=[],j=[],G,X;for(C._hasOnlyLargeSploms&&C._splomGrid.draw(),G=0;G<P.length;G++){var O=P[G];O.visible===!0&&O._length!==0&&(O.type==="splom"?C._splomScenes[O.uid].draw():O.type==="scattergl"?i.pushUnique(F,O.xaxis+O.yaxis):O.type==="scatterpolargl"&&i.pushUnique(j,O.subplot))}for(G=0;G<F.length;G++)X=C._plots[F[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),P,F={},j=0;j<C.length;j++)if(P=C[j],!F[P._id]){F[P._id]=1,h(k,P),m(k,P);var G=P._matchGroup;if(G)for(var X in G){var O=u.getFromId(k,X);m(k,O,P.range),F[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)}})(lu);var oz=Ei.readPaths,lz=Ep,m2=Sn.clearOutlineControllers,gv=ct,y2=kt,sz=Lt.arrayEditor,g2=zi,fz=g2.getPathString,b2={draw:hu,drawOne:x2,activateLastSelection:vz};function hu(t){var e=t._fullLayout;m2(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++)x2(t,i)}function pu(t){return t._context.editSelection}function x2(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+e+'"]').remove();var r=g2.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input)return;n(t._fullLayout._selectionLayer);function n(o){var l=fz(t,a),s={"data-index":e,"fill-rule":"evenodd",d:l},f=a.opacity,c="rgba(0,0,0,0)",u=a.line.color||gv.contrast(t._fullLayout.plot_bgcolor),v=a.line.width,p=a.line.dash;v||(v=5,p="solid");var d=pu(t)&&t._fullLayout._activeSelectionIndex===e;d&&(c=t._fullLayout.activeselection.fillcolor,f=t._fullLayout.activeselection.opacity);for(var h=[],m=1;m>=0;m--){var y=o.append("path").attr(s).style("opacity",m?.1:f).call(gv.stroke,u).call(gv.fill,c).call(y2.dashLine,m?"solid":p,m?4+v:v);if(cz(y,t,a),d){var b=sz(t.layout,"selections",a);y.style({cursor:"move"});var _={element:y.node(),plotinfo:i,gd:t,editHelpers:b,isActiveSelection:!0},g=oz(l,t);lz(g,y,_)}else y.style("pointer-events",m?"all":"none");h[m]=y}var x=h[0],w=h[1];w.node().addEventListener("click",function(){return uz(t,x)})}}function cz(t,e,r){var a=r.xref+r.yref;y2.setClipUrl(t,"clip"+e._fullLayout._uid+a,e)}function uz(t,e){if(pu(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeSelectionIndex){fh(t);return}t._fullLayout._activeSelectionIndex=a,t._fullLayout._deactivateSelection=fh,hu(t)}}}function vz(t){if(pu(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=fh,hu(t)}}function fh(t){if(pu(t)){var e=t._fullLayout._activeSelectionIndex;e>=0&&(m2(t),delete t._fullLayout._activeSelectionIndex,hu(t))}}var _2={exports:{}},bv=Bc.dot,rf=Xt.BADNUM,bc=_2.exports={};bc.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,h){var m=d[0],y=d[1];return!(m===rf||m<a||m>i||y===rf||y<n||y>o||h&&f(d))}function u(d,h){var m=d[0],y=d[1];if(m===rf||m<a||m>i||y===rf||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&&h);y<=S&&m!==M&&x++}return x%2===1}var v=!0,p=r[0];for(l=1;l<r.length;l++)if(p[0]!==r[l][0]||p[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}};bc.isSegmentBent=function(e,r,a,i){var n=e[r],o=[e[a][0]-n[0],e[a][1]-n[1]],l=bv(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=bv(u,o),v<0||v>l||Math.abs(bv(u,f))>i)return!0;return!1};bc.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||bc.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 w2=_2.exports,dz={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"},r0=RM,hz=IM,Jl=Je,pz=kt.dashStyle,dl=ct,mz=wa,yz=la.makeEventData,_s=Dn,gz=_s.freeMode,bz=_s.rectMode,es=_s.drawMode,Hp=_s.openMode,Op=_s.selectMode,a0=zi,i0=fu,T2=Ep,k2=Sn.clearOutline,A2=Ei,xv=A2.handleEllipse,xz=A2.readPaths,_z=Cp.newShapes,wz=jT,Tz=b2.activateLastSelection,Gf=xe,kz=Gf.sorterAsc,M2=w2,hl=Yc,ta=Ut.getFromId,Az=Ap,Mz=lu.redrawReglTraces,Uf=dz,Pa=Uf.MINSELECT,Sz=M2.filter,jp=M2.tester,Bp=Lp,n0=Bp.p2r,Lz=Bp.axValue,Cz=Bp.getTransform;function Gp(t){return t.subplot!==void 0}function Dz(t,e,r,a,i){var n=!Gp(a),o=gz(i),l=bz(i),s=Hp(i),f=es(i),c=Op(i),u=i==="drawline",v=i==="drawcircle",p=u||v,d=a.gd,h=d._fullLayout,m=c&&h.newselection.mode==="immediate"&&n,y=h._zoomlayer,b=a.element.getBoundingClientRect(),_=a.plotinfo,g=Cz(_),x=e-b.left,w=r-b.top;h._calcInverseTransform(d);var T=Gf.apply3DTransform(h._invTransform)(x,w);x=T[0],w=T[1];var A=h._invScaleX,M=h._invScaleY,S=x,L=w,z="M"+x+","+w,$=a.xaxes[0],N=a.yaxes[0],I=$._length,H=N._length,D=t.altKey&&!(es(i)&&s),E,k,C,P,F,j,G;L2(t,d,a),o&&(E=Sz([[x,w]],Uf.BENDPX));var X=y.selectAll("path.select-outline-"+_.id).data([1]),O=f?h.newshape:h.newselection;f&&(a.hasText=O.label.text||O.label.texttemplate);var Z=f&&!s?O.fillcolor:"rgba(0,0,0,0)",W=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":pz(O.line.dash,O.line.width),"stroke-width":O.line.width+"px","shape-rendering":"crispEdges"}).call(dl.stroke,W).call(dl.fill,Z).attr("fill-rule","evenodd").classed("cursor-move",!!f).attr("transform",g).attr("d",z+"Z");var Y=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 Q=h._uid+Uf.SELECTID,ee=[],se=mu(d,a.xaxes,a.yaxes,a.subplot);m&&!t.shiftKey&&(a._clearSubplotSelections=function(){if(n){var fe=$._id,pe=N._id;z2(d,fe,pe,se);for(var ge=(d.layout||{}).selections||[],be=[],we=!1,ye=0;ye<ge.length;ye++){var de=h.selections[ye];!de||de.xref!==fe||de.yref!==pe?be.push(ge[ye]):we=!0}we&&(d._fullLayout._noEmitSelectedAtStart=!0,Jl.call("_guiRelayout",d,{selections:be}))}});var oe=Uz(a);a.moveFn=function(fe,pe){a._clearSubplotSelections&&(a._clearSubplotSelections(),a._clearSubplotSelections=void 0),S=Math.max(0,Math.min(I,A*fe+x)),L=Math.max(0,Math.min(H,M*pe+w));var ge=Math.abs(S-x),be=Math.abs(L-w);if(l){var we,ye,de;if(c){var Me=h.selectdirection;switch(Me==="any"?be<Math.min(ge*.6,Pa)?we="h":ge<Math.min(be*.6,Pa)?we="v":we="d":we=Me,we){case"h":ye=v?H/2:0,de=H;break;case"v":ye=v?I/2:0,de=I;break}}if(f)switch(h.newshape.drawdirection){case"vertical":we="h",ye=v?H/2:0,de=H;break;case"horizontal":we="v",ye=v?I/2:0,de=I;break;case"ortho":ge<be?(we="h",ye=w,de=L):(we="v",ye=x,de=S);break;default:we="d"}we==="h"?(P=p?xv(v,[S,ye],[S,de]):[[x,ye],[x,de],[S,de],[S,ye]],P.xmin=p?S:Math.min(x,S),P.xmax=p?S:Math.max(x,S),P.ymin=Math.min(ye,de),P.ymax=Math.max(ye,de),Y.attr("d","M"+P.xmin+","+(w-Pa)+"h-4v"+2*Pa+"h4ZM"+(P.xmax-1)+","+(w-Pa)+"h4v"+2*Pa+"h-4Z")):we==="v"?(P=p?xv(v,[ye,L],[de,L]):[[ye,w],[ye,L],[de,L],[de,w]],P.xmin=Math.min(ye,de),P.xmax=Math.max(ye,de),P.ymin=p?L:Math.min(w,L),P.ymax=p?L:Math.max(w,L),Y.attr("d","M"+(x-Pa)+","+P.ymin+"v-4h"+2*Pa+"v4ZM"+(x-Pa)+","+(P.ymax-1)+"v4h"+2*Pa+"v-4Z")):we==="d"&&(P=p?xv(v,[x,w],[S,L]):[[x,w],[x,L],[S,L],[S,w]],P.xmin=Math.min(x,S),P.xmax=Math.max(x,S),P.ymin=Math.min(w,L),P.ymax=Math.max(w,L),Y.attr("d","M0,0Z"))}else o&&(E.addPt([S,L]),P=E.filtered);if(a.selectionDefs&&a.selectionDefs.length?(C=C2(a.mergedPolygons,P,D),P.subtract=D,k=Up(a.selectionDefs.concat([P]))):(C=[P],k=jp(P)),T2(P2(C,s),X,a),c){var De=ch(d,!1),ue=De.eventData?De.eventData.points.slice():[];De=ch(d,!1,k,se,a),k=De.selectionTesters,G=De.eventData;var Te;E?Te=E.filtered:Te=R2(C),hl.throttle(Q,Uf.SELECTDELAY,function(){ee=E2(k,se);for(var Se=ee.slice(),J=0;J<ue.length;J++){for(var _e=ue[J],re=!1,Ae=0;Ae<Se.length;Ae++)if(Se[Ae].curveNumber===_e.curveNumber&&Se[Ae].pointNumber===_e.pointNumber){re=!0;break}re||Se.push(_e)}Se.length&&(G||(G={}),G.points=Se),oe(G,Te),Vz(d,G)})}},a.clickFn=function(fe,pe){if(Y.remove(),d._fullLayout._activeShapeIndex>=0){d._fullLayout._deactivateShape(d);return}if(!f){var ge=h.clickmode;hl.done(Q).then(function(){if(hl.clear(Q),fe===2){for(X.remove(),F=0;F<se.length;F++)j=se[F],j._module.selectPoints(j,!1);if(rs(d,se),ts(a),Wp(d),se.length){var be=se[0].xaxis,we=se[0].yaxis;if(be&&we){for(var ye=[],de=d._fullLayout.selections,Me=0;Me<de.length;Me++){var De=de[Me];De&&(De.xref!==be._id||De.yref!==we._id)&&ye.push(De)}ye.length<de.length&&(d._fullLayout._noEmitSelectedAtStart=!0,Jl.call("_guiRelayout",d,{selections:ye}))}}}else ge.indexOf("select")>-1&&S2(pe,d,a.xaxes,a.yaxes,a.subplot,a,X),ge==="event"&&as(d,void 0);mz.click(d,pe,_.id)}).catch(Gf.error)}},a.doneFn=function(){Y.remove(),hl.done(Q).then(function(){hl.clear(Q),!m&&P&&a.selectionDefs&&(P.subtract=D,a.selectionDefs.push(P),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,C)),(m||f)&&ts(a,m),a.doneFnCompleted&&a.doneFnCompleted(ee),c&&as(d,G)}).catch(Gf.error)}}function S2(t,e,r,a,i,n,o){var l=e._hoverdata,s=e._fullLayout,f=s.clickmode,c=f.indexOf("event")>-1,u=[],v,p,d,h,m,y,b,_,g,x;if(Iz(l)){L2(t,e,n),v=mu(e,r,a,i);var w=Fz(l,v),T=w.pointNumbers.length>0;if(T?$z(v,w):Nz(v)&&(b=l0(w))){for(o&&o.remove(),x=0;x<v.length;x++)p=v[x],p._module.selectPoints(p,!1);rs(e,v),ts(n),c&&Wp(e)}else{_=t.shiftKey&&(b!==void 0?b:l0(w)),d=Pz(w.pointNumber,w.searchInfo,_);var A=n.selectionDefs.concat([d]);for(h=Up(A),x=0;x<v.length;x++)if(m=v[x]._module.selectPoints(v[x],h),y=D2(m,v[x]),u.length)for(var M=0;M<y.length;M++)u.push(y[M]);else u=y;if(g={points:u},rs(e,v,g),d&&n&&n.selectionDefs.push(d),o){var S=n.mergedPolygons,L=Hp(n.dragmode);T2(P2(S,L),o,n)}c&&as(e,g)}}}function Pz(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}function _v(t){return"pointNumber"in t&&"searchInfo"in t}function Ez(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 Up(t){if(!t.length)return;for(var e=[],r=_v(t[0])?0:t[0][0][0],a=r,i=_v(t[0])?0:t[0][0][1],n=i,o=0;o<t.length;o++)if(_v(t[o]))e.push(Ez(t[o]));else{var l=jp(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 p=!1,d=0;d<e.length;d++)e[d].contains(f,c,u,v)&&(p=!e[d].subtract);return p}return{xmin:r,xmax:a,ymin:i,ymax:n,pts:[],contains:s,isRect:!1,degenerate:!1}}function L2(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)&&!(es(n)&&Hp(n));o&&l&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!l||!i.selection)&&ts(r),o||(k2(e),a._lastSelectedSubplot=i.id)}function zz(t){return t._fullLayout._activeShapeIndex>=0}function Rz(t){return t._fullLayout._activeSelectionIndex>=0}function ts(t,e){var r=t.dragmode,a=t.plotinfo,i=t.gd;zz(i)&&i._fullLayout._deactivateShape(i),Rz(i)&&i._fullLayout._deactivateSelection(i);var n=i._fullLayout,o=n._zoomlayer,l=es(r),s=Op(r);if(l||s){var f=o.selectAll(".select-outline-"+a.id);if(f&&i._fullLayout._outlining){var c;l&&(c=_z(f,t)),c&&Jl.call("_guiRelayout",i,{shapes:c});var u;s&&!Gp(t)&&(u=wz(f,t)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,Jl.call("_guiRelayout",i,{selections:u}).then(function(){e&&Tz(i)})),i._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=t.selectionDefs=[],a.selection.mergedPolygons=t.mergedPolygons=[]}function o0(t){return t._id}function mu(t,e,r,a){if(!t.calcdata)return[];var i=[],n=e.map(o0),o=r.map(o0),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(Gp({subplot:a})&&(s.subplot===a||s.geo===a))i.push(af(s._module,l,e[0],r[0]));else if(s.type==="splom"){if(s._xaxes[n[0]]&&s._yaxes[o[0]]){var c=af(s._module,l,e[0],r[0]);c.scene=t._fullLayout._splomScenes[s.uid],i.push(c)}}else if(s.type==="sankey"){var u=af(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(af(s._module,l,ta(t,s.xaxis),ta(t,s.yaxis)))}return i}function af(t,e,r,a){return{_module:t,cd:e,xaxis:r,yaxis:a}}function Iz(t){return t&&Array.isArray(t)&&t[0].hoverOnBox!==!0}function Fz(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 l0(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 $z(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 Nz(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 rs(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,p=f.pointIndices;p?([].push.apply(c.selectedpoints,p),o._fullInput!==o&&[].push.apply(u.selectedpoints,p)):(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;Hz(t,e)}function Hz(t,e){for(var r=!1,a=0;a<e.length;a++){var i=e[a],n=i.cd;Jl.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&&(Az(t),Mz(t))}function C2(t,e,r){for(var a=r?r0.difference:r0.union,i=a({regions:t},{regions:[e]}),n=i.regions.reverse(),o=0;o<n.length;o++){var l=n[o];l.subtract=Vp(l,n.slice(0,o))}return n}function D2(t,e){if(Array.isArray(t))for(var r=e.cd,a=e.cd[0].trace,i=0;i<t.length;i++)t[i]=yz(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 E2(t,e){for(var r=[],a,i,n=0;n<e.length;n++){var o=e[n];i=o._module.selectPoints(o,t),a=D2(i,o),r=r.concat(a)}return r}function ch(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=s0(t),v=t._fullLayout;if(o){var p=v._zoomlayer,d=v.dragmode,h=es(d),m=Op(d);if(h||m){var y=ta(t,l,"x"),b=ta(t,s,"y");if(y&&b){var _=p.selectAll(".select-outline-"+o.id);if(_&&t._fullLayout._outlining&&_.length){for(var g=_[0][0],x=g.getAttribute("d"),w=xz(x,t,o),T=[],A=0;A<w.length;A++){for(var M=w[A],S=[],L=0;L<M.length;L++)S.push([mi(y,M[L][1]),mi(b,M[L][2])]);S.xref=l,S.yref=s,S.subtract=Vp(S,T),T.push(S)}u=u.concat(T)}}}}var z=l&&s?[l+s]:v._subplots.cartesian;Oz(t);for(var $={},N=0;N<z.length;N++){var I=z[N],H=I.indexOf("y"),D=I.slice(0,H),E=I.slice(H),k=l&&s?r:void 0;if(k=Bz(u,D,E,k),k){var C=a;if(!n){var P=ta(t,D,"x"),F=ta(t,E,"y");C=mu(t,[P],[F],I);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,W=O.y,Y=O._length;X.t.xpx=[],X.t.ypx=[];for(var B=0;B<Y;B++)X.t.xpx[B]=P.c2p(Z[B]),X.t.ypx[B]=F.c2p(W[B])}G._module.name==="splom"&&($[O.uid]||($[O.uid]=!0))}}var Q=E2(k,C);f=f.concat(Q),c=c.concat(C)}}var ee={points:f};rs(t,c,ee);var se=v.clickmode,oe=se.indexOf("event")>-1&&e;if(!o&&e){var fe=s0(t,!0);if(fe.length){var pe=fe[0].xref,ge=fe[0].yref;if(pe&&ge){var be=R2(fe),we=I2([ta(t,pe,"x"),ta(t,ge,"y")]);we(ee,be)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:oe&&as(t,ee),v._reselect=!1}if(!o&&v._deselect){var ye=v._deselect;l=ye.xref,s=ye.yref,jz(l,s,c)||z2(t,l,s,a),oe&&(ee.points.length?as(t,ee):Wp(t)),v._deselect=!1}return{eventData:ee,selectionTesters:r}}function Oz(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 jz(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 z2(t,e,r,a){a=mu(t,[ta(t,e,"x")],[ta(t,r,"y")],e+r);for(var i=0;i<a.length;i++){var n=a[i];n._module.selectPoints(n,!1)}rs(t,a)}function Bz(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=C2(i,o,l),a=Up(i)}else i=[o],a=jp(o)}return a}function s0(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=ta(t,s,"x"),u=ta(t,f,"y"),v,p,d,h,m;if(l.type==="rect"){m=[];var y=mi(c,l.x0),b=mi(c,l.x1),_=mi(u,l.y0),g=mi(u,l.y1);m=[[y,_],[y,g],[b,g],[b,_]],v=Math.min(y,b),p=Math.max(y,b),d=Math.min(_,g),h=Math.max(_,g),m.xmin=v,m.xmax=p,m.ymin=d,m.ymax=h,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=a0.extractPathCoords(A,i0.paramIsX,"raw"),S=a0.extractPathCoords(A,i0.paramIsY,"raw");v=1/0,p=-1/0,d=1/0,h=-1/0,m=[];for(var L=0;L<M.length;L++){var z=mi(c,M[L]),$=mi(u,S[L]);m.push([z,$]),v=Math.min(z,v),p=Math.max(z,p),d=Math.min($,d),h=Math.max($,h)}m.xmin=v,m.xmax=p,m.ymin=d,m.ymax=h,m.xref=s,m.yref=f,m.subtract=Vp(m,w),w.push(m),r.push(m)}}}}return r}function Vp(t,e){for(var r=!1,a=0;a<e.length;a++)for(var i=e[a],n=0;n<t.length;n++)if(hz(t[n],i)){r=!r;break}return r}function mi(t,e){return t.type==="date"&&(e=e.replace("_"," ")),t.type==="log"?t.c2p(e):t.r2p(e,null,t.calendar)}function R2(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 Gz(r)}function Gz(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 I2(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]=[n0(o,f),n0(o,c)].sort(kz))}else i||(i={}),i[l]=r.map(Lz(o))}a&&(e.range=a),i&&(e.lassoPoints=i)}}function Uz(t){var e=t.plotinfo;return e.fillRangeItems||I2(t.xaxes.concat(t.yaxes))}function Vz(t,e){t.emit("plotly_selecting",e)}function as(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function Wp(t){t.emit("plotly_deselect",null)}var Wz={reselect:ch,prepSelect:Dz,clearOutline:k2,clearSelectionsCache:ts,selectOnClick:S2},F2=[{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}],yu={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(" ")}},f0=F2,c0=fr,nf=gr,Xz=Lt.templatedArray,of=yu;function u0(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 v0(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 ws=Xz("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:c0({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:f0.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:f0.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:[v0("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[v0("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",nf.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",of.axisRefDescription("x","left","right"),u0("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",nf.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",of.axisRefDescription("y","bottom","top"),u0("y")].join(" ")},xref:{valType:"enumerated",values:["paper",nf.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",of.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",nf.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",of.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:c0({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"}),gu={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(" ")}},d0=Wo.axisHoverFormat,Yz=cr.texttemplateAttrs,qz=cr.hovertemplateAttrs,h0=Ln,Zz=fr,Kz=$r.dash,Qz=$r.pattern,Jz=kt,p0=gu,lf=Rt.extendFlat,eR=$2;function m0(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 y0(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 g0(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 Ri={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:m0("x"),yperiod:m0("y"),xperiod0:y0("x0"),yperiod0:y0("y0"),xperiodalignment:g0("x"),yperiodalignment:g0("y"),xhoverformat:d0("x"),yhoverformat:d0("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:Yz({},{}),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 "+p0.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:qz({},{keys:p0.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:lf({},Kz,{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:eR(!0),fillgradient:lf({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:Qz,marker:lf({symbol:{valType:"enumerated",values:Jz.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:lf({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"},h0("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"},h0("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:Zz({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(" ")}},b0=ws,x0=Ri.line,tR=$r.dash,sf=Rt.extendFlat,rR=Na.overrideAll,aR=Lt.templatedArray,_0=yu,N2=rR(aR("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:sf({},b0.xref,{description:["Sets the selection's x coordinate axis.",_0.axisRefDescription("x","left","right")].join(" ")}),yref:sf({},b0.yref,{description:["Sets the selection's x coordinate axis.",_0.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:x0.color,width:sf({},x0.width,{min:1,dflt:1}),dash:sf({},tR,{dflt:"dot"})}}),"arraydraw","from-root"),w0=xe,ff=Ct,iR=ja,nR=N2,T0=zi,oR=function(e,r){iR(e,r,{name:"selections",handleItemDefaults:lR});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 lR(t,e,r){function a(w,T){return w0.coerce(t,e,nR,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,p,d,h=ff.coerceRef(t,e,u,c);if(v=ff.getFromId(u,h),v._selectionIndices.push(e._index),d=T0.rangeToShapePosition(v),p=T0.shapePositionToRange(v),l){var m=c+"0",y=c+"1",b=t[m],_=t[y];t[m]=p(t[m],!0),t[y]=p(t[y],!0),ff.coercePosition(e,u,a,h,m),ff.coercePosition(e,u,a,h,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&&w0.noneOrAll(t,e,["x0","x1","y0","y1"])}var sR=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")},fR=Je,k0=xe,A0=Ut,bu=function(e){return function(a,i){var n=a[e];if(Array.isArray(n))for(var o=fR.subplotsRegistry.cartesian,l=o.idRegex,s=i._subplots,f=s.xaxis,c=s.yaxis,u=s.cartesian,v=i._has("cartesian"),p=0;p<n.length;p++){var d=n[p];if(k0.isPlainObject(d)){var h=A0.cleanId(d.xref,"x",!1),m=A0.cleanId(d.yref,"y",!1),y=l.x.test(h),b=l.y.test(m);if(y||b){v||k0.pushUnique(i._basePlotModules,o);var _=!1;y&&f.indexOf(h)===-1&&(f.push(h),_=!0),b&&c.indexOf(m)===-1&&(c.push(m),_=!0),_&&y&&b&&u.push(h+m)}}}}},M0=b2,pl=Wz,Ts={moduleType:"component",name:"selections",layoutAttributes:N2,supplyLayoutDefaults:oR,supplyDrawNewSelectionDefaults:sR,includeBasePlot:bu("selections"),draw:M0.draw,drawOne:M0.drawOne,reselect:pl.reselect,prepSelect:pl.prepSelect,clearOutline:pl.clearOutline,clearSelectionsCache:pl.clearSelectionsCache,selectOnClick:pl.selectOnClick},Xp=ut,ra=xe,S0=ra.numberFormat,cR=Ta,uR=l_,cf=Je,H2=ra.strTranslate,vR=or,L0=ct,di=kt,dR=wa,C0=Ct,hR=Pi,pR=Ba,O2=Dn,uf=O2.selectingOrDrawing,mR=O2.freeMode,yR=Sr.FROM_TL,gR=Ap,bR=lu.redrawReglTraces,xR=Kt,uh=Ut.getFromId,_R=Ts.prepSelect,wR=Ts.clearOutline,TR=Ts.selectOnClick,wv=h2,Yp=gr,D0=Yp.MINDRAG,Mr=Yp.MINZOOM,P0=!0;function kR(t,e,r,a,i,n,o,l){var s=t._fullLayout._zoomlayer,f=o+l==="nsew",c=(o+l).length===1,u,v,p,d,h,m,y,b,_,g,x,w,T,A,M,S,L,z,$,N,I,H,D;r+=e.yaxis._shift;function E(){if(u=e.xaxis,v=e.yaxis,_=u._length,g=v._length,y=u._offset,b=v._offset,p={},p[u._id]=u,d={},d[v._id]=v,o&&l)for(var K=e.overlays,ne=0;ne<K.length;ne++){var ve=K[ne].xaxis;p[ve._id]=ve;var me=K[ne].yaxis;d[me._id]=me}h=F0(p),m=F0(d),T=E0(h,l),A=E0(m,o),M=!A&&!T,w=I0(t,t._fullLayout._axisMatchGroups,p,d),x=I0(t,t._fullLayout._axisConstraintGroups,p,d,w);var ke=x.isSubplotConstrained||w.isSubplotConstrained;S=l||ke,L=o||ke;var Pe=t._fullLayout;z=Pe._has("scattergl"),$=Pe._has("splom"),N=Pe._has("svg")}E();var k=CR(A+T,t._fullLayout.dragmode,f),C=MR(e,o+l+"drag",k,r,a,i,n);if(M&&!f)return C.onmousedown=null,C.style.pointerEvents="none",C;var P={element:C,gd:t,plotinfo:e};P.prepFn=function(K,ne,ve){var me=P.dragmode,ke=t._fullLayout.dragmode;ke!==me&&(P.dragmode=ke),E(),H=t._fullLayout._invScaleX,D=t._fullLayout._invScaleY,M||(f?K.shiftKey?ke==="pan"?ke="zoom":uf(ke)||(ke="pan"):K.ctrlKey&&(ke="pan"):ke="pan"),mR(ke)?P.minDrag=1:P.minDrag=void 0,uf(ke)?(P.xaxes=h,P.yaxes=m,_R(K,ne,ve,P,ke)):(P.clickFn=j,uf(me)&&F(),M||(ke==="zoom"?(P.moveFn=fe,P.doneFn=ge,P.minDrag=1,oe(K,ne,ve)):ke==="pan"&&(P.moveFn=De,P.doneFn=J))),t._fullLayout._redrag=function(){var Pe=t._dragdata;if(Pe&&Pe.element===C){var Ee=t._fullLayout.dragmode;uf(Ee)||(E(),_e([0,0,_,g]),P.moveFn(Pe.dx,Pe.dy))}}};function F(){P.plotinfo.selection=!1,wR(t)}function j(K,ne){var ve=P.gd;if(ve._fullLayout._activeShapeIndex>=0){ve._fullLayout._deactivateShape(ve);return}var me=ve._fullLayout.clickmode;if(R0(ve),K===2&&!c&&Se(),f)me.indexOf("select")>-1&&TR(ne,ve,h,m,e.id,P),me.indexOf("event")>-1&&dR.click(ve,ne,e.id);else if(K===1&&c){var ke=o?v:u,Pe=o==="s"||l==="w"?0:1,Ee=ke._name+".range["+Pe+"]",Ne=SR(ke,Pe),Fe="left",ce="middle";if(ke.fixedrange)return;o?(ce=o==="n"?"top":"bottom",ke.side==="right"&&(Fe="right")):l==="e"&&(Fe="right"),ve._context.showAxisRangeEntryBoxes&&Xp.select(C).call(vR.makeEditable,{gd:ve,immediate:!0,background:ve._fullLayout.paper_bgcolor,text:String(Ne),fill:ke.tickfont?ke.tickfont.color:"#444",horizontalAlign:Fe,verticalAlign:ce}).on("edit",function(He){var Be=ke.d2r(He);Be!==void 0&&cf.call("_guiRelayout",ve,Ee,Be)})}}pR.init(P);var G,X,O,Z,W,Y,B,Q,ee,se;function oe(K,ne,ve){var me=C.getBoundingClientRect();G=ne-me.left,X=ve-me.top,t._fullLayout._calcInverseTransform(t);var ke=ra.apply3DTransform(t._fullLayout._invTransform)(G,X);G=ke[0],X=ke[1],O={l:G,r:G,w:0,t:X,b:X,h:0},Z=t._hmpixcount?t._hmlumcount/t._hmpixcount:cR(t._fullLayout.plot_bgcolor).getLuminance(),W="M0,0H"+_+"V"+g+"H0V0",Y=!1,B="xy",se=!1,Q=DR(s,Z,y,b,W),ee=PR(s,y,b)}function fe(K,ne){if(t._transitioningWithDuration)return!1;var ve=Math.max(0,Math.min(_,H*K+G)),me=Math.max(0,Math.min(g,D*ne+X)),ke=Math.abs(ve-G),Pe=Math.abs(me-X);O.l=Math.min(G,ve),O.r=Math.max(G,ve),O.t=Math.min(X,me),O.b=Math.max(X,me);function Ee(){B="",O.r=O.l,O.t=O.b,ee.attr("d","M0,0Z")}if(x.isSubplotConstrained)ke>Mr||Pe>Mr?(B="xy",ke/_>Pe/g?(Pe=ke*g/_,X>me?O.t=X-Pe:O.b=X+Pe):(ke=Pe*_/g,G>ve?O.l=G-ke:O.r=G+ke),ee.attr("d",Tv(O))):Ee();else if(w.isSubplotConstrained)if(ke>Mr||Pe>Mr){B="xy";var Ne=Math.min(O.l/_,(g-O.b)/g),Fe=Math.max(O.r/_,(g-O.t)/g);O.l=Ne*_,O.r=Fe*_,O.b=(1-Ne)*g,O.t=(1-Fe)*g,ee.attr("d",Tv(O))}else Ee();else!A||Pe<Math.min(Math.max(ke*.6,D0),Mr)?ke<D0||!T?Ee():(O.t=0,O.b=g,B="x",ee.attr("d",IR(O,X))):!T||ke<Math.min(Pe*.6,Mr)?(O.l=0,O.r=_,B="y",ee.attr("d",FR(O,G))):(B="xy",ee.attr("d",Tv(O)));O.w=O.r-O.l,O.h=O.b-O.t,B&&(se=!0),t._dragged=se,ER(Q,ee,O,W,Y,Z),pe(),t.emit("plotly_relayouting",I),Y=!0}function pe(){I={},(B==="xy"||B==="x")&&(vh(h,O.l/_,O.r/_,I,x.xaxes),ue("x",I)),(B==="xy"||B==="y")&&(vh(m,(g-O.b)/g,(g-O.t)/g,I,x.yaxes),ue("y",I))}function ge(){pe(),R0(t),J(),RR(t)}var be=[0,0,_,g],we=null,ye=Yp.REDRAWDELAY,de=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function Me(K){if(!t._context._scrollZoom.cartesian&&!t._fullLayout._enablescrollzoom)return;if(F(),t._transitioningWithDuration){K.preventDefault(),K.stopPropagation();return}E(),clearTimeout(we);var ne=-K.deltaY;if(isFinite(ne)||(ne=K.wheelDelta/10),!isFinite(ne)){ra.log("Did not find wheel motion attributes: ",K);return}var ve=Math.exp(-Math.min(Math.max(ne,-20),20)/200),me=de.draglayer.select(".nsewdrag").node().getBoundingClientRect(),ke=(K.clientX-me.left)/me.width,Pe=(me.bottom-K.clientY)/me.height,Ee;function Ne(Fe,ce,He){if(Fe.fixedrange)return;var Be=ra.simpleMap(Fe.range,Fe.r2l),$e=Be[0]+(Be[1]-Be[0])*ce;function Ke(je){return Fe.l2r($e+(je-$e)*He)}Fe.range=Be.map(Ke)}if(S){for(l||(ke=.5),Ee=0;Ee<h.length;Ee++)Ne(h[Ee],ke,ve);ue("x"),be[2]*=ve,be[0]+=be[2]*ke*(1/ve-1)}if(L){for(o||(Pe=.5),Ee=0;Ee<m.length;Ee++)Ne(m[Ee],Pe,ve);ue("y"),be[3]*=ve,be[1]+=be[3]*(1-Pe)*(1/ve-1)}_e(be),Te(),t.emit("plotly_relayouting",I),we=setTimeout(function(){t._fullLayout&&(be=[0,0,_,g],J())},ye),K.preventDefault()}o.length*l.length!==1&&$R(C,Me);function De(K,ne){if(K=K*H,ne=ne*D,t._transitioningWithDuration)return;if(t._fullLayout._replotting=!0,T==="ew"||A==="ns"){var ve=T?-K:0,me=A?-ne:0;if(w.isSubplotConstrained){if(T&&A){var ke=(K/_-ne/g)/2;K=ke*_,ne=-ke*g,ve=-K,me=-ne}A?ve=-me*_/g:me=-ve*g/_}T&&(z0(h,K),ue("x")),A&&(z0(m,ne),ue("y")),_e([ve,me,_,g]),Te(),t.emit("plotly_relayouting",I);return}function Pe(Ke,je,R){for(var U=1-je,V,q,le=0;le<Ke.length;le++){var ae=Ke[le];if(!ae.fixedrange){V=ae,q=ae._rl[U]+(ae._rl[je]-ae._rl[U])/LR(R/ae._length);var Re=ae.l2r(q);Re!==!1&&Re!==void 0&&(ae.range[je]=Re)}}return V._length*(V._rl[je]-q)/(V._rl[je]-V._rl[U])}var Ee=T==="w"==(A==="n")?1:-1;if(T&&A&&(x.isSubplotConstrained||w.isSubplotConstrained)){var Ne=(K/_+Ee*ne/g)/2;K=Ne*_,ne=Ee*Ne*g}var Fe,ce;if(T==="w"?K=Pe(h,0,K):T==="e"?K=Pe(h,1,-K):T||(K=0),A==="n"?ne=Pe(m,1,ne):A==="s"?ne=Pe(m,0,-ne):A||(ne=0),Fe=T==="w"?K:0,ce=A==="n"?ne:0,x.isSubplotConstrained&&!w.isSubplotConstrained||w.isSubplotConstrained&&T&&A&&Ee>0){var He;if(w.isSubplotConstrained||!T&&A.length===1){for(He=0;He<h.length;He++)h[He].range=h[He]._r.slice(),wv(h[He],1-ne/g);K=ne*_/g,Fe=K/2}if(w.isSubplotConstrained||!A&&T.length===1){for(He=0;He<m.length;He++)m[He].range=m[He]._r.slice(),wv(m[He],1-K/_);ne=K*g/_,ce=ne/2}}(!w.isSubplotConstrained||!A)&&ue("x"),(!w.isSubplotConstrained||!T)&&ue("y");var Be=_-K,$e=g-ne;w.isSubplotConstrained&&!(T&&A)&&(T?(ce=Fe?0:K*g/_,$e=Be*g/_):(Fe=ce?0:ne*_/g,Be=$e*_/g)),_e([Fe,ce,Be,$e]),Te(),t.emit("plotly_relayouting",I)}function ue(K,ne){for(var ve=w.isSubplotConstrained?{x:m,y:h}[K]:w[K+"axes"],me=w.isSubplotConstrained?{x:h,y:m}[K]:[],ke=0;ke<ve.length;ke++){var Pe=ve[ke],Ee=Pe._id,Ne=w.xLinks[Ee]||w.yLinks[Ee],Fe=me[0]||p[Ne]||d[Ne];Fe&&(ne?(ne[Pe._name+".range[0]"]=ne[Fe._name+".range[0]"],ne[Pe._name+".range[1]"]=ne[Fe._name+".range[1]"]):Pe.range=Fe.range.slice())}}function Te(){var K=[],ne;function ve(Ee){for(ne=0;ne<Ee.length;ne++)Ee[ne].fixedrange||K.push(Ee[ne]._id)}function me(Ee,Ne){for(ne=0;ne<Ee.length;ne++){var Fe=Ee[ne],ce=Fe[Ne];!Fe.fixedrange&&ce.tickmode==="sync"&&K.push(ce._id)}}for(S&&(ve(h),ve(x.xaxes),ve(w.xaxes),me(e.overlays,"xaxis")),L&&(ve(m),ve(x.yaxes),ve(w.yaxes),me(e.overlays,"yaxis")),I={},ne=0;ne<K.length;ne++){var ke=K[ne],Pe=uh(t,ke);C0.drawOne(t,Pe,{skipTitle:!0}),I[Pe._name+".range[0]"]=Pe.range[0],I[Pe._name+".range[1]"]=Pe.range[1]}C0.redrawComponents(t,K)}function Se(){if(!t._transitioningWithDuration){var K=t._context.doubleClick,ne=[];T&&(ne=ne.concat(h)),A&&(ne=ne.concat(m)),w.xaxes&&(ne=ne.concat(w.xaxes)),w.yaxes&&(ne=ne.concat(w.yaxes));var ve={},me,ke;if(K==="reset+autosize")for(K="autosize",ke=0;ke<ne.length;ke++){me=ne[ke];var Pe=me._rangeInitial0,Ee=me._rangeInitial1,Ne=Pe!==void 0||Ee!==void 0;if(Ne&&(Pe!==void 0&&Pe!==me.range[0]||Ee!==void 0&&Ee!==me.range[1])||!Ne&&me.autorange!==!0){K="reset";break}}if(K==="autosize")for(ke=0;ke<ne.length;ke++)me=ne[ke],me.fixedrange||(ve[me._name+".autorange"]=!0);else if(K==="reset"){for((T||x.isSubplotConstrained)&&(ne=ne.concat(x.xaxes)),A&&!x.isSubplotConstrained&&(ne=ne.concat(x.yaxes)),x.isSubplotConstrained&&(T?A||(ne=ne.concat(m)):ne=ne.concat(h)),ke=0;ke<ne.length;ke++)if(me=ne[ke],!me.fixedrange){var Fe=me._name,ce=me._autorangeInitial;me._rangeInitial0===void 0&&me._rangeInitial1===void 0?ve[Fe+".autorange"]=!0:me._rangeInitial0===void 0?(ve[Fe+".autorange"]=ce,ve[Fe+".range"]=[null,me._rangeInitial1]):me._rangeInitial1===void 0?(ve[Fe+".range"]=[me._rangeInitial0,null],ve[Fe+".autorange"]=ce):ve[Fe+".range"]=[me._rangeInitial0,me._rangeInitial1]}}t.emit("plotly_doubleclick",null),cf.call("_guiRelayout",t,ve)}}function J(){_e([0,0,_,g]),ra.syncOrAsync([xR.previousPromises,function(){t._fullLayout._replotting=!1,cf.call("_guiRelayout",t,I)}],t)}function _e(K){var ne=t._fullLayout,ve=ne._plots,me=ne._subplots.cartesian,ke,Pe,Ee,Ne;if($&&cf.subplotsRegistry.splom.drag(t),z){for(ke=0;ke<me.length;ke++)if(Pe=ve[me[ke]],Ee=Pe.xaxis,Ne=Pe.yaxis,Pe._scene){Ee.limitRange&&Ee.limitRange(),Ne.limitRange&&Ne.limitRange();var Fe=ra.simpleMap(Ee.range,Ee.r2l),ce=ra.simpleMap(Ne.range,Ne.r2l);Pe._scene.update({range:[Fe[0],ce[0],Fe[1],ce[1]]})}}if(($||z)&&(gR(t),bR(t)),N){var He=K[2]/u._length,Be=K[3]/v._length;for(ke=0;ke<me.length;ke++){Pe=ve[me[ke]],Ee=Pe.xaxis,Ne=Pe.yaxis;var $e=(S||w.isSubplotConstrained)&&!Ee.fixedrange&&p[Ee._id],Ke=(L||w.isSubplotConstrained)&&!Ne.fixedrange&&d[Ne._id],je,R,U,V;if($e?(je=He,U=l||w.isSubplotConstrained?K[0]:Le(Ee,je)):w.xaHash[Ee._id]?(je=He,U=K[0]*Ee._length/u._length):w.yaHash[Ee._id]?(je=Be,U=A==="ns"?-K[1]*Ee._length/v._length:Le(Ee,je,{n:"top",s:"bottom"}[A])):(je=re(Ee,He,Be),U=Ae(Ee,je)),je>1&&(Ee.maxallowed!==void 0&&S===(Ee.range[0]<Ee.range[1]?"e":"w")||Ee.minallowed!==void 0&&S===(Ee.range[0]<Ee.range[1]?"w":"e"))&&(je=1,U=0),Ke?(R=Be,V=o||w.isSubplotConstrained?K[1]:Le(Ne,R)):w.yaHash[Ne._id]?(R=Be,V=K[1]*Ne._length/v._length):w.xaHash[Ne._id]?(R=He,V=T==="ew"?-K[0]*Ne._length/u._length:Le(Ne,R,{e:"right",w:"left"}[T])):(R=re(Ne,He,Be),V=Ae(Ne,R)),R>1&&(Ne.maxallowed!==void 0&&L===(Ne.range[0]<Ne.range[1]?"n":"s")||Ne.minallowed!==void 0&&L===(Ne.range[0]<Ne.range[1]?"s":"n"))&&(R=1,V=0),!(!je&&!R)){je||(je=1),R||(R=1);var q=Ee._offset-U/je,le=Ne._offset-V/R;Pe.clipRect.call(di.setTranslate,U,V).call(di.setScale,je,R),Pe.plot.call(di.setTranslate,q,le).call(di.setScale,1/je,1/R),(je!==Pe.xScaleFactor||R!==Pe.yScaleFactor)&&(di.setPointGroupScale(Pe.zoomScalePts,je,R),di.setTextPointsScale(Pe.zoomScaleTxt,je,R)),di.hideOutsideRangePoints(Pe.clipOnAxisFalseTraces,Pe),Pe.xScaleFactor=je,Pe.yScaleFactor=R}}}}function re(K,ne,ve){return K.fixedrange?0:S&&x.xaHash[K._id]?ne:L&&(x.isSubplotConstrained?x.xaHash:x.yaHash)[K._id]?ve:0}function Ae(K,ne){return ne?(K.range=K._r.slice(),wv(K,ne),Le(K,ne)):0}function Le(K,ne,ve){return K._length*(1-ne)*yR[ve||K.constraintoward||"middle"]}return C}function AR(t,e,r,a){var i=ra.ensureSingle(t.draglayer,e,r,function(n){n.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",t.id)});return i.call(hR,a),i.node()}function MR(t,e,r,a,i,n,o){var l=AR(t,"rect",e,r);return Xp.select(l).call(di.setRect,a,i,n,o),l}function E0(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return""}function SR(t,e){var r=t.range[e],a=Math.abs(r-t.range[1-e]),i;return t.type==="date"?r:t.type==="log"?(i=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,S0("."+i+"g")(Math.pow(10,r))):(i=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,S0("."+String(i)+"g")(r))}function vh(t,e,r,a,i){for(var n=0;n<t.length;n++){var o=t[n];if(!o.fixedrange)if(o.rangebreaks){var l=o._id.charAt(0)==="y",s=l?1-e:e,f=l?1-r:r;a[o._name+".range[0]"]=o.l2r(o.p2l(s*o._length)),a[o._name+".range[1]"]=o.l2r(o.p2l(f*o._length))}else{var c=o._rl[0],u=o._rl[1]-c;a[o._name+".range[0]"]=o.l2r(c+u*e),a[o._name+".range[1]"]=o.l2r(c+u*r)}}if(i&&i.length){var v=(e+(1-r))/2;vh(i,v,1-v,a,[])}}function z0(t,e){for(var r=0;r<t.length;r++){var a=t[r];if(!a.fixedrange){if(a.rangebreaks){var i=0,n=a._length,o=a.p2l(i+e)-a.p2l(i),l=a.p2l(n+e)-a.p2l(n),s=(o+l)/2;a.range=[a.l2r(a._rl[0]-s),a.l2r(a._rl[1]-s)]}else a.range=[a.l2r(a._rl[0]-e/a._m),a.l2r(a._rl[1]-e/a._m)];a.limitRange&&a.limitRange()}}}function LR(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function CR(t,e,r){return t?t==="nsew"?r?"":e==="pan"?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function DR(t,e,r,a,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",H2(r,a)).attr("d",i+"Z")}function PR(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:L0.background,stroke:L0.defaultLine,"stroke-width":1,opacity:0}).attr("transform",H2(e,r)).attr("d","M0,0Z")}function ER(t,e,r,a,i,n){t.attr("d",a+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),zR(t,e,i,n)}function zR(t,e,r,a){r||(t.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function R0(t){Xp.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function RR(t){P0&&t.data&&t._context.showTips&&(ra.notifier(ra._(t,"Double-click to zoom back out"),"long"),P0=!1)}function IR(t,e){return"M"+(t.l-.5)+","+(e-Mr-.5)+"h-3v"+(2*Mr+1)+"h3ZM"+(t.r+.5)+","+(e-Mr-.5)+"h3v"+(2*Mr+1)+"h-3Z"}function FR(t,e){return"M"+(e-Mr-.5)+","+(t.t-.5)+"v-3h"+(2*Mr+1)+"v3ZM"+(e-Mr-.5)+","+(t.b+.5)+"v3h"+(2*Mr+1)+"v-3Z"}function Tv(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,Mr)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function I0(t,e,r,a,i){for(var n=!1,o={},l={},s,f,c,u,v=(i||{}).xaHash,p=(i||{}).yaHash,d=0;d<e.length;d++){var h=e[d];for(s in r)if(h[s]){for(c in h)!(i&&(v[c]||p[c]))&&!(c.charAt(0)==="x"?r:a)[c]&&(o[c]=s);for(f in a)!(i&&(v[f]||p[f]))&&h[f]&&(n=!0)}for(f in a)if(h[f])for(u in h)!(i&&(v[u]||p[u]))&&!(u.charAt(0)==="x"?r:a)[u]&&(l[u]=f)}n&&(ra.extendFlat(o,l),l={});var m={},y=[];for(c in o){var b=uh(t,c);y.push(b),m[b._id]=b}var _={},g=[];for(u in l){var x=uh(t,u);g.push(x),_[x._id]=x}return{xaHash:m,yaHash:_,xaxes:y,yaxes:g,xLinks:o,yLinks:l,isSubplotConstrained:n}}function $R(t,e){if(!uR)t.onwheel!==void 0?t.onwheel=e:t.onmousewheel!==void 0?t.onmousewheel=e:t.isAddedWheelEvent||(t.isAddedWheelEvent=!0,t.addEventListener("wheel",e,{passive:!1}));else{var r=t.onwheel!==void 0?"wheel":"mousewheel";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}}function F0(t){var e=[];for(var r in t)e.push(t[r]);return e}var NR={makeDragBox:kR};(function(t){var e=ut,r=wa,a=Ba,i=Pi,n=NR.makeDragBox,o=gr.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,p){if((f._plots[v].mainplot&&!0)===(f._plots[p].mainplot&&!0)){var d=v.split("y"),h=p.split("y");return d[0]===h[0]?Number(d[1]||1)-Number(h[1]||1):Number(d[0]||1)-Number(h[0]||1)}return f._plots[v].mainplot?1:-1});c.forEach(function(v){var p=f._plots[v],d=p.xaxis,h=p.yaxis;if(!p.mainplot){var m=n(s,p,d._offset,h._offset,d._length,h._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,p,d._offset-o,h._offset-o,o,o,"n","w"),n(s,p,d._offset+d._length,h._offset-o,o,o,"n","e"),n(s,p,d._offset-o,h._offset+h._length,o,o,"s","w"),n(s,p,d._offset+d._length,h._offset+h._length,o,o,"s","e"))}if(s._context.showAxisDragHandles){if(v===d._mainSubplot){var y=d._mainLinePosition;d.side==="top"&&(y-=o),n(s,p,d._offset+d._length*.1,y,d._length*.8,o,"","ew"),n(s,p,d._offset,y,d._length*.1,o,"","w"),n(s,p,d._offset+d._length*.9,y,d._length*.1,o,"","e")}if(v===h._mainSubplot){var b=h._mainLinePosition;h.side!=="right"&&(b-=o),n(s,p,b,h._offset+h._length*.1,o,h._length*.8,"ns",""),n(s,p,b,h._offset+h._length*.9,o,h._length*.1,"s",""),n(s,p,b,h._offset,o,h._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)}})(xp);var ks={},$0=Je,HR=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:""}},OR=Tn,kv=Wh,ml=jo,jR=Kh.sorterAsc,Av=Je;ks.containerArrayMatch=HR;var BR=ks.isAddVal=function(e){return e==="add"||OR(e)},N0=ks.isRemoveVal=function(e){return e===null||e==="remove"};ks.applyContainerArrayChanges=function(e,r,a,i,n){var o=r.astr,l=Av.getComponentMethod(o,"supplyLayoutDefaults"),s=Av.getComponentMethod(o,"draw"),f=Av.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||l===kv||s===kv,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 p=a[""][""];if(N0(p))r.set(null);else if(Array.isArray(p))r.set(p);else return ml.warn("Unrecognized full array edit value",o,p),!0;return c?!1:(l(u,v),s(e),!0)}var d=Object.keys(a).map(Number).sort(jR),h=r.get(),m=h||[],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=BR(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),N0(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?h||r.set(m):r.set(null),c)return!1;if(l(u,v),f!==kv){var $;if(_===-1)$=d;else{for(g=Math.max(m.length,g),$=[],x=0;x<d.length&&(T=d[x],!(T>=_));x++)$.push(T);for(x=_;x<g;x++)$.push(x)}for(x=0;x<$.length;x++)f(e,$[x])}else s(e);return!0};var j2={};(function(t){var e=ht,r=Je,a=xe,i=Kt,n=Ut,o=ct,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 $=b.images[_];a.isPlainObject($)&&(c($,"xref"),c($,"yref"))}var N=b.legend;return N&&(N.x>3?(N.x=1.02,N.xanchor="left"):N.x<-2&&(N.x=-.02,N.xanchor="right"),N.y>3?(N.y=1.02,N.yanchor="bottom"):N.y<-2&&(N.y=-.02,N.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]=p(g.textposition[x]);else g.textposition&&(g.textposition=p(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,$=u(g.increasing),N=u(g.decreasing);if($!==!1&&N!==!1){var I=v($,N,L,z);I&&(g.name=I)}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 p(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 h=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function m(b){var _=b.search(h);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)}}}})(j2);(function(t){var e=ut,r=ht,a=s_,i=xe,n=i.nestedProperty,o=ys,l=KL,s=Je,f=Uo,c=Kt,u=Ct,v=mT,p=Oa,d=kt,h=ct,m=xp.initInteractions,y=Vo,b=Ts.clearOutline,_=Oo.dfltConfig,g=ks,x=j2,w=lu,T=Na,A=gr.AX_NAME_PATTERN,M=0,S=5;function L(R,U,V,q){var le;if(R=i.getGraphDiv(R),o.init(R),i.isPlainObject(U)){var ae=U;U=ae.data,V=ae.layout,q=ae.config,le=ae.frames}var Re=o.triggerHandler(R,"plotly_beforeplot",[U,V,q]);if(Re===!1)return Promise.reject();!U&&!V&&!i.isPlotDiv(R)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",R);function Ce(){if(le)return t.addFrames(R,le)}H(R,q),V||(V={}),e.select(R).classed("js-plotly-plot",!0),d.makeTester(),Array.isArray(R._promises)||(R._promises=[]);var he=(R.data||[]).length===0&&Array.isArray(U);Array.isArray(U)&&(x.cleanData(U),he?R.data=U:R.data.push.apply(R.data,U),R.empty=!1),(!R.layout||he)&&(R.layout=x.cleanLayout(V)),c.supplyDefaults(R);var ie=R._fullLayout,Ie=ie._has("cartesian");ie._replotting=!0,(he||ie._shouldCreateBgLayer)&&(je(R),ie._shouldCreateBgLayer&&delete ie._shouldCreateBgLayer),d.initGradients(R),d.initPatterns(R),he&&u.saveShowSpikeInitial(R);var Oe=!R.calcdata||R.calcdata.length!==(R._fullData||[]).length;Oe&&c.doCalcdata(R);for(var We=0;We<R.calcdata.length;We++)R.calcdata[We][0].trace=R._fullData[We];R._context.responsive?R._responsiveChartHandler||(R._responsiveChartHandler=function(){i.isHidden(R)||c.resize(R)},window.addEventListener("resize",R._responsiveChartHandler)):i.clearResponsive(R);var Ge=i.extendFlat({},ie._size),rt=0;function at(){for(var nt=ie._basePlotModules,Ze=0;Ze<nt.length;Ze++)nt[Ze].drawFramework&&nt[Ze].drawFramework(R);!ie._glcanvas&&ie._has("gl")&&(ie._glcanvas=ie._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(Qe){return Qe.key}),ie._glcanvas.enter().append("canvas").attr("class",function(Qe){return"gl-canvas gl-canvas-"+Qe.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var et=R._context.plotGlPixelRatio;if(ie._glcanvas){ie._glcanvas.attr("width",ie.width*et).attr("height",ie.height*et).style("width",ie.width+"px").style("height",ie.height+"px");var ft=ie._glcanvas.data()[0].regl;if(ft&&(Math.floor(ie.width*et)!==ft._gl.drawingBufferWidth||Math.floor(ie.height*et)!==ft._gl.drawingBufferHeight)){var mt="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(rt)i.error(mt);else return i.log(mt+" Clearing graph and plotting again."),c.cleanPlot([],{},R._fullData,ie),c.supplyDefaults(R),ie=R._fullLayout,c.doCalcdata(R),rt++,at()}}return ie.modebar.orientation==="h"?ie._modebardiv.style("height",null).style("width","100%"):ie._modebardiv.style("width",null).style("height",ie.height+"px"),c.previousPromises(R)}function Ye(){if(c.clearAutoMarginIds(R),w.drawMarginPushers(R),u.allowAutoMargin(R),R._fullLayout.title.text&&R._fullLayout.title.automargin&&c.allowAutoMargin(R,"title.automargin"),ie._has("pie"))for(var nt=R._fullData,Ze=0;Ze<nt.length;Ze++){var et=nt[Ze];et.type==="pie"&&et.automargin&&c.allowAutoMargin(R,"pie."+et.uid+".automargin")}return c.doAutoMargin(R),c.previousPromises(R)}function wt(){if(c.didMarginChange(Ge,ie._size))return i.syncOrAsync([Ye,w.layoutStyles],R)}function tt(){if(!Oe){qe();return}return i.syncOrAsync([s.getComponentMethod("shapes","calcAutorange"),s.getComponentMethod("annotations","calcAutorange"),qe],R)}function qe(){R._transitioning||(w.doAutoRangeAndConstraints(R),he&&u.saveRangeInitial(R),s.getComponentMethod("rangeslider","calcAutorange")(R))}function vt(){return u.draw(R,he?"":"redraw")}var pt=[c.previousPromises,Ce,at,Ye,wt];Ie&&pt.push(tt),pt.push(w.layoutStyles),Ie&&pt.push(vt,function(Ze){var et=Ze._fullLayout._insideTickLabelsUpdaterange;if(et)return Ze._fullLayout._insideTickLabelsUpdaterange=void 0,be(Ze,et).then(function(){u.saveRangeInitial(Ze,!0)})}),pt.push(w.drawData,w.finalDraw,m,c.addLinks,c.rehover,c.redrag,c.reselect,c.doAutoMargin,c.previousPromises);var lt=i.syncOrAsync(pt,R);return(!lt||!lt.then)&&(lt=Promise.resolve()),lt.then(function(){return z(R),R})}function z(R){var U=R._fullLayout;U._redrawFromAutoMarginCount?U._redrawFromAutoMarginCount--:R.emit("plotly_afterplot")}function $(R){return i.extendFlat(_,R)}function N(R,U){try{R._fullLayout._paper.style("background",U)}catch(V){i.error(V)}}function I(R,U){var V=h.combine(U,"white");N(R,V)}function H(R,U){if(!R._context){R._context=i.extendDeep({},_);var V=e.select("base");R._context._baseUrl=V.size()&&V.attr("href")?window.location.href.split("#")[0]:""}var q=R._context,le,ae,Re;if(U){for(ae=Object.keys(U),le=0;le<ae.length;le++)Re=ae[le],!(Re==="editable"||Re==="edits")&&Re in q&&(Re==="setBackground"&&U[Re]==="opaque"?q[Re]=I:q[Re]=U[Re]);var Ce=U.editable;if(Ce!==void 0)for(q.editable=Ce,ae=Object.keys(q.edits),le=0;le<ae.length;le++)q.edits[ae[le]]=Ce;if(U.edits)for(ae=Object.keys(U.edits),le=0;le<ae.length;le++)Re=ae[le],Re in q.edits&&(q.edits[Re]=U.edits[Re]);q._exportedPlot=U._exportedPlot}q.staticPlot&&(q.editable=!1,q.edits={},q.autosizable=!1,q.scrollZoom=!1,q.doubleClick=!1,q.showTips=!1,q.showLink=!1,q.displayModeBar=!1),q.displayModeBar==="hover"&&!a&&(q.displayModeBar=!0),(q.setBackground==="transparent"||typeof q.setBackground!="function")&&(q.setBackground=N),q._hasZeroHeight=q._hasZeroHeight||R.clientHeight===0,q._hasZeroWidth=q._hasZeroWidth||R.clientWidth===0;var he=q.scrollZoom,ie=q._scrollZoom={};if(he===!0)ie.cartesian=1,ie.gl3d=1,ie.geo=1,ie.mapbox=1,ie.map=1;else if(typeof he=="string"){var Ie=he.split("+");for(le=0;le<Ie.length;le++)ie[Ie[le]]=1}else he!==!1&&(ie.gl3d=1,ie.geo=1,ie.mapbox=1,ie.map=1)}function D(R){if(R=i.getGraphDiv(R),!i.isPlotDiv(R))throw new Error("This element is not a Plotly plot: "+R);return x.cleanData(R.data),x.cleanLayout(R.layout),R.calcdata=void 0,t._doPlot(R).then(function(){return R.emit("plotly_redraw"),R})}function E(R,U,V,q){return R=i.getGraphDiv(R),c.cleanPlot([],{},R._fullData||[],R._fullLayout||{}),c.purge(R),t._doPlot(R,U,V,q)}function k(R,U){var V=U+1,q=[],le,ae;for(le=0;le<R.length;le++)ae=R[le],ae<0?q.push(V+ae):q.push(ae);return q}function C(R,U,V){var q,le;for(q=0;q<U.length;q++){if(le=U[q],le!==parseInt(le,10))throw new Error("all values in "+V+" must be integers");if(le>=R.data.length||le<-R.data.length)throw new Error(V+" must be valid indices for gd.data.");if(U.indexOf(le,q+1)>-1||le>=0&&U.indexOf(-R.data.length+le)>-1||le<0&&U.indexOf(R.data.length+le)>-1)throw new Error("each index in "+V+" must be unique.")}}function P(R,U,V){if(!Array.isArray(R.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(R,U,"currentIndices"),typeof V<"u"&&!Array.isArray(V)&&(V=[V]),typeof V<"u"&&C(R,V,"newIndices"),typeof V<"u"&&U.length!==V.length)throw new Error("current and new indices must be of equal length.")}function F(R,U,V){var q,le;if(!Array.isArray(R.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]),q=0;q<U.length;q++)if(le=U[q],typeof le!="object"||Array.isArray(le)||le===null)throw new Error("all values in traces array must be non-array objects");if(typeof V<"u"&&!Array.isArray(V)&&(V=[V]),typeof V<"u"&&V.length!==U.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function j(R,U,V,q){var le=i.isPlainObject(q);if(!Array.isArray(R.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 V>"u")throw new Error("indices must be an integer or array of integers");C(R,V,"indices");for(var ae in U){if(!Array.isArray(U[ae])||U[ae].length!==V.length)throw new Error("attribute "+ae+" must be an array of length equal to indices array length");if(le&&(!(ae in q)||!Array.isArray(q[ae])||q[ae].length!==U[ae].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(R,U,V,q){var le=i.isPlainObject(q),ae=[],Re,Ce,he,ie,Ie;Array.isArray(V)||(V=[V]),V=k(V,R.data.length-1);for(var Oe in U)for(var We=0;We<V.length;We++){if(Re=R.data[V[We]],he=n(Re,Oe),Ce=he.get(),ie=U[Oe][We],!i.isArrayOrTypedArray(ie))throw new Error("attribute: "+Oe+" index: "+We+" must be an array");if(!i.isArrayOrTypedArray(Ce))throw new Error("cannot extend missing or non-array attribute: "+Oe);if(Ce.constructor!==ie.constructor)throw new Error("cannot extend array with an array of a different type: "+Oe);Ie=le?q[Oe][We]:q,r(Ie)||(Ie=-1),ae.push({prop:he,target:Ce,insert:ie,maxp:Math.floor(Ie)})}return ae}function X(R,U,V,q,le){j(R,U,V,q);for(var ae=G(R,U,V,q),Re={},Ce={},he=0;he<ae.length;he++){var ie=ae[he].prop,Ie=ae[he].maxp,Oe=le(ae[he].target,ae[he].insert,Ie);ie.set(Oe[0]),Array.isArray(Re[ie.astr])||(Re[ie.astr]=[]),Re[ie.astr].push(Oe[1]),Array.isArray(Ce[ie.astr])||(Ce[ie.astr]=[]),Ce[ie.astr].push(ae[he].target.length)}return{update:Re,maxPoints:Ce}}function O(R,U){var V=new R.constructor(R.length+U.length);return V.set(R),V.set(U,R.length),V}function Z(R,U,V,q){R=i.getGraphDiv(R);function le(he,ie,Ie){var Oe,We;if(i.isTypedArray(he))if(Ie<0){var Ge=new he.constructor(0),rt=O(he,ie);Ie<0?(Oe=rt,We=Ge):(Oe=Ge,We=rt)}else if(Oe=new he.constructor(Ie),We=new he.constructor(he.length+ie.length-Ie),Ie===ie.length)Oe.set(ie),We.set(he);else if(Ie<ie.length){var at=ie.length-Ie;Oe.set(ie.subarray(at)),We.set(he),We.set(ie.subarray(0,at),he.length)}else{var Ye=Ie-ie.length,wt=he.length-Ye;Oe.set(he.subarray(wt)),Oe.set(ie,Ye),We.set(he.subarray(0,wt))}else Oe=he.concat(ie),We=Ie>=0&&Ie<Oe.length?Oe.splice(0,Oe.length-Ie):[];return[Oe,We]}var ae=X(R,U,V,q,le),Re=t.redraw(R),Ce=[R,ae.update,V,ae.maxPoints];return l.add(R,t.prependTraces,Ce,Z,arguments),Re}function W(R,U,V,q){R=i.getGraphDiv(R);function le(he,ie,Ie){var Oe,We;if(i.isTypedArray(he))if(Ie<=0){var Ge=new he.constructor(0),rt=O(ie,he);Ie<0?(Oe=rt,We=Ge):(Oe=Ge,We=rt)}else if(Oe=new he.constructor(Ie),We=new he.constructor(he.length+ie.length-Ie),Ie===ie.length)Oe.set(ie),We.set(he);else if(Ie<ie.length){var at=ie.length-Ie;Oe.set(ie.subarray(0,at)),We.set(ie.subarray(at)),We.set(he,at)}else{var Ye=Ie-ie.length;Oe.set(ie),Oe.set(he.subarray(0,Ye),ie.length),We.set(he.subarray(Ye))}else Oe=ie.concat(he),We=Ie>=0&&Ie<Oe.length?Oe.splice(Ie,Oe.length):[];return[Oe,We]}var ae=X(R,U,V,q,le),Re=t.redraw(R),Ce=[R,ae.update,V,ae.maxPoints];return l.add(R,t.extendTraces,Ce,W,arguments),Re}function Y(R,U,V){R=i.getGraphDiv(R);var q=[],le=t.deleteTraces,ae=Y,Re=[R,q],Ce=[R,U],he,ie;for(F(R,U,V),Array.isArray(U)||(U=[U]),U=U.map(function(Ie){return i.extendFlat({},Ie)}),x.cleanData(U),he=0;he<U.length;he++)R.data.push(U[he]);for(he=0;he<U.length;he++)q.push(-U.length+he);if(typeof V>"u")return ie=t.redraw(R),l.add(R,le,Re,ae,Ce),ie;Array.isArray(V)||(V=[V]);try{P(R,q,V)}catch(Ie){throw R.data.splice(R.data.length-U.length,U.length),Ie}return l.startSequence(R),l.add(R,le,Re,ae,Ce),ie=t.moveTraces(R,q,V),l.stopSequence(R),ie}function B(R,U){R=i.getGraphDiv(R);var V=[],q=t.addTraces,le=B,ae=[R,V,U],Re=[R,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(R,U,"indices"),U=k(U,R.data.length-1),U.sort(i.sorterDes),Ce=0;Ce<U.length;Ce+=1)he=R.data.splice(U[Ce],1)[0],V.push(he);var ie=t.redraw(R);return l.add(R,q,ae,le,Re),ie}function Q(R,U,V){R=i.getGraphDiv(R);var q=[],le=[],ae=Q,Re=Q,Ce=[R,V,U],he=[R,U,V],ie;if(P(R,U,V),U=Array.isArray(U)?U:[U],typeof V>"u")for(V=[],ie=0;ie<U.length;ie++)V.push(-U.length+ie);for(V=Array.isArray(V)?V:[V],U=k(U,R.data.length-1),V=k(V,R.data.length-1),ie=0;ie<R.data.length;ie++)U.indexOf(ie)===-1&&q.push(R.data[ie]);for(ie=0;ie<U.length;ie++)le.push({newIndex:V[ie],trace:R.data[U[ie]]});for(le.sort(function(Oe,We){return Oe.newIndex-We.newIndex}),ie=0;ie<le.length;ie+=1)q.splice(le[ie].newIndex,0,le[ie].trace);R.data=q;var Ie=t.redraw(R);return l.add(R,ae,Ce,Re,he),Ie}function ee(R,U,V,q){R=i.getGraphDiv(R),x.clearPromiseQueue(R);var le={};if(typeof U=="string")le[U]=V;else if(i.isPlainObject(U))le=i.extendFlat({},U),q===void 0&&(q=V);else return i.warn("Restyle fail.",U,V,q),Promise.reject();Object.keys(le).length&&(R.changed=!0);var ae=x.coerceTraceIndices(R,q),Re=ge(R,le,ae),Ce=Re.flags;Ce.calc&&(R.calcdata=void 0),Ce.clearAxisTypes&&x.clearAxisTypes(R,ae,{});var he=[];Ce.fullReplot?he.push(t._doPlot):(he.push(c.previousPromises),c.supplyDefaults(R),Ce.markerSize&&(c.doCalcdata(R),ye(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(R,ee,[R,Re.undoit,Re.traces],ee,[R,Re.redoit,Re.traces]);var ie=i.syncOrAsync(he,R);return(!ie||!ie.then)&&(ie=Promise.resolve()),ie.then(function(){return R.emit("plotly_restyle",Re.eventData),R})}function se(R){return R===void 0?null:R}function oe(R,U){return U?function(V,q,le){var ae=n(V,q),Re=ae.set;return ae.set=function(Ce){var he=(le||"")+q;fe(he,ae.get(),Ce,R),Re(Ce)},ae}:n}function fe(R,U,V,q){if(Array.isArray(U)||Array.isArray(V))for(var le=Array.isArray(U)?U:[],ae=Array.isArray(V)?V:[],Re=Math.max(le.length,ae.length),Ce=0;Ce<Re;Ce++)fe(R+"["+Ce+"]",le[Ce],ae[Ce],q);else if(i.isPlainObject(U)||i.isPlainObject(V)){var he=i.isPlainObject(U)?U:{},ie=i.isPlainObject(V)?V:{},Ie=i.extendFlat({},he,ie);for(var Oe in Ie)fe(R+"."+Oe,he[Oe],ie[Oe],q)}else q[R]===void 0&&(q[R]=se(U))}function pe(R,U,V){for(var q in V){var le=n(R,q);fe(q,le.get(),V[q],U)}}function ge(R,U,V){var q=R._fullLayout,le=R._fullData,ae=R.data,Re=q._guiEditing,Ce=oe(q._preGUI,Re),he=i.extendDeepAll({},U),ie,Ie=T.traceFlags(),Oe={},We={},Ge;function rt(){return V.map(function(){})}function at($t){var mr=u.id2name($t);Ge.indexOf(mr)===-1&&Ge.push(mr)}function Ye($t){return"LAYOUT"+$t+".autorange"}function wt($t){return"LAYOUT"+$t+".range"}function tt($t){for(var mr=$t;mr<le.length;mr++)if(le[mr]._input===ae[$t])return le[mr]}function qe($t,mr,Va){if(Array.isArray($t)){$t.forEach(function(oi){qe(oi,mr,Va)});return}if(!($t in U||x.hasParent(U,$t))){var Oi;if($t.substr(0,6)==="LAYOUT")Oi=Ce(R.layout,$t.replace("LAYOUT",""));else{var Jo=V[Va],fa=q._tracePreGUI[tt(Jo)._fullInput.uid];Oi=oe(fa,Re)(ae[Jo],$t)}$t in We||(We[$t]=rt()),We[$t][Va]===void 0&&(We[$t][Va]=se(Oi.get())),mr!==void 0&&Oi.set(mr)}}function vt($t){return function(mr){return le[mr][$t]}}function pt($t){return function(mr,Va){return mr===!1?le[V[Va]][$t]:null}}for(var lt in U){if(x.hasParent(U,lt))throw new Error("cannot set "+lt+" and a parent attribute simultaneously");var nt=U[lt],Ze,et,ft,mt,Qe,bt;if((lt==="autobinx"||lt==="autobiny")&&(lt=lt.charAt(lt.length-1)+"bins",Array.isArray(nt)?nt=nt.map(pt(lt)):nt===!1?nt=V.map(vt(lt)):nt=null),Oe[lt]=nt,lt.substr(0,6)==="LAYOUT"){ft=Ce(R.layout,lt.replace("LAYOUT","")),We[lt]=[se(ft.get())],ft.set(Array.isArray(nt)?nt[0]:nt),Ie.calc=!0;continue}for(We[lt]=rt(),ie=0;ie<V.length;ie++){Ze=ae[V[ie]],et=tt(V[ie]);var Mt=q._tracePreGUI[et._fullInput.uid];if(ft=oe(Mt,Re)(Ze,lt),mt=ft.get(),Qe=Array.isArray(nt)?nt[ie%nt.length]:nt,Qe!==void 0){var Lr=ft.parts[ft.parts.length-1],ur=lt.substr(0,lt.length-Lr.length-1),Xr=ur?ur+".":"",Yr=ur?n(et,ur).get():et;if(bt=f.getTraceValObject(et,ft.parts),bt&&bt.impliedEdits&&Qe!==null)for(var Ko in bt.impliedEdits)qe(i.relativeAttr(lt,Ko),bt.impliedEdits[Ko],ie);else if((Lr==="thicknessmode"||Lr==="lenmode")&&mt!==Qe&&(Qe==="fraction"||Qe==="pixels")&&Yr){var $i=q._size,Pn=Yr.orient,En=Pn==="top"||Pn==="bottom";if(Lr==="thicknessmode"){var Ds=En?$i.h:$i.w;qe(Xr+"thickness",Yr.thickness*(Qe==="fraction"?1/Ds:Ds),ie)}else{var Ua=En?$i.w:$i.h;qe(Xr+"len",Yr.len*(Qe==="fraction"?1/Ua:Ua),ie)}}else if(lt==="type"&&(Qe==="pie"!=(mt==="pie")||Qe==="funnelarea"!=(mt==="funnelarea"))){var Sa="x",Qo="y";(Qe==="bar"||mt==="bar")&&Ze.orientation==="h"&&(Sa="y",Qo="x"),i.swapAttrs(Ze,["?","?src"],"labels",Sa),i.swapAttrs(Ze,["d?","?0"],"label",Sa),i.swapAttrs(Ze,["?","?src"],"values",Qo),mt==="pie"||mt==="funnelarea"?(n(Ze,"marker.color").set(n(Ze,"marker.colors").get()),q._pielayer.selectAll("g.trace").remove()):s.traceIs(Ze,"cartesian")&&n(Ze,"marker.colors").set(n(Ze,"marker.color").get())}We[lt][ie]=se(mt);var Ni=["swapxy","swapxyaxes","orientation","orientationaxes"];if(Ni.indexOf(lt)!==-1){if(lt==="orientation"){ft.set(Qe);var zn=Ze.x&&!Ze.y?"h":"v";if((ft.get()||zn)===et.orientation)continue}else lt==="orientationaxes"&&(Ze.orientation={v:"h",h:"v"}[et.orientation]);x.swapXYData(Ze),Ie.calc=Ie.clearAxisTypes=!0}else c.dataArrayContainers.indexOf(ft.parts[0])!==-1?(x.manageArrayContainers(ft,Qe,We),Ie.calc=!0):(bt?bt.arrayOk&&!s.traceIs(et,"regl")&&(i.isArrayOrTypedArray(Qe)||i.isArrayOrTypedArray(mt))?Ie.calc=!0:T.update(Ie,bt):Ie.calc=!0,ft.set(Qe))}}if(["swapxyaxes","orientationaxes"].indexOf(lt)!==-1&&u.swap(R,V),lt==="orientationaxes"){var ni=n(R.layout,"hovermode"),Rn=ni.get();Rn==="x"?ni.set("y"):Rn==="y"?ni.set("x"):Rn==="x unified"?ni.set("y unified"):Rn==="y unified"&&ni.set("x unified")}if(["orientation","type"].indexOf(lt)!==-1){for(Ge=[],ie=0;ie<V.length;ie++){var Hi=ae[V[ie]];s.traceIs(Hi,"cartesian")&&(at(Hi.xaxis||"x"),at(Hi.yaxis||"y"))}qe(Ge.map(Ye),!0,0),qe(Ge.map(wt),[0,1],0)}}return(Ie.calc||Ie.plot)&&(Ie.fullReplot=!0),{flags:Ie,undoit:We,redoit:Oe,traces:V,eventData:i.extendDeepNoArrays([],[he,V])}}function be(R,U,V){R=i.getGraphDiv(R),x.clearPromiseQueue(R);var q={};if(typeof U=="string")q[U]=V;else if(i.isPlainObject(U))q=i.extendFlat({},U);else return i.warn("Relayout fail.",U,V),Promise.reject();Object.keys(q).length&&(R.changed=!0);var le=ue(R,q),ae=le.flags;ae.calc&&(R.calcdata=void 0);var Re=[c.previousPromises];ae.layoutReplot?Re.push(w.layoutReplot):Object.keys(q).length&&(we(R,ae,le)||c.supplyDefaults(R),ae.legend&&Re.push(w.doLegend),ae.layoutstyle&&Re.push(w.layoutStyles),ae.axrange&&ye(Re,le.rangesAltered),ae.ticks&&Re.push(w.doTicksRelayout),ae.modebar&&Re.push(w.doModeBar),ae.camera&&Re.push(w.doCamera),ae.colorbars&&Re.push(w.doColorBars),Re.push(z)),Re.push(c.rehover,c.redrag,c.reselect),l.add(R,be,[R,le.undoit],be,[R,le.redoit]);var Ce=i.syncOrAsync(Re,R);return(!Ce||!Ce.then)&&(Ce=Promise.resolve(R)),Ce.then(function(){return R.emit("plotly_relayout",le.eventData),R})}function we(R,U,V){var q=R._fullLayout;if(!U.axrange)return!1;for(var le in U)if(le!=="axrange"&&U[le])return!1;var ae,Re,Ce=function(Ge,rt){return i.coerce(ae,Re,p,Ge,rt)},he={};for(var ie in V.rangesAltered){var Ie=u.id2name(ie);if(ae=R.layout[Ie],Re=q[Ie],v(ae,Re,Ce,he),Re._matchGroup){for(var Oe in Re._matchGroup)if(Oe!==ie){var We=q[u.id2name(Oe)];We.autorange=Re.autorange,We.range=Re.range.slice(),We._input.range=Re.range.slice()}}}return!0}function ye(R,U){var V=U?function(q){var le=[],ae=!0;for(var Re in U){var Ce=u.getFromId(q,Re);if(le.push(Re),(Ce.ticklabelposition||"").indexOf("inside")!==-1&&Ce._anchorAxis&&le.push(Ce._anchorAxis._id),Ce._matchGroup)for(var he in Ce._matchGroup)U[he]||le.push(he)}return u.draw(q,le,{skipTitle:ae})}:function(q){return u.draw(q,"redraw")};R.push(b,w.doAutoRangeAndConstraints,V,w.drawData,w.finalDraw)}var de=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Me=/^[xyz]axis[0-9]*\.autorange$/,De=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function ue(R,U){var V=R.layout,q=R._fullLayout,le=q._guiEditing,ae=oe(q._preGUI,le),Re=Object.keys(U),Ce=u.list(R),he=i.extendDeepAll({},U),ie={},Ie,Oe,We;for(Re=Object.keys(U),Oe=0;Oe<Re.length;Oe++)if(Re[Oe].indexOf("allaxes")===0){for(We=0;We<Ce.length;We++){var Ge=Ce[We]._id.substr(1),rt=Ge.indexOf("scene")!==-1?Ge+".":"",at=Re[Oe].replace("allaxes",rt+Ce[We]._name);U[at]||(U[at]=U[Re[Oe]])}delete U[Re[Oe]]}var Ye=T.layoutFlags(),wt={},tt={};function qe(fa,oi){if(Array.isArray(fa)){fa.forEach(function(LM){qe(LM,oi)});return}if(!(fa in U||x.hasParent(U,fa))){var km=ae(V,fa);fa in tt||(tt[fa]=se(km.get())),oi!==void 0&&km.set(oi)}}var vt={},pt;function lt(fa){var oi=u.name2id(fa.split(".")[0]);return vt[oi]=1,oi}for(var nt in U){if(x.hasParent(U,nt))throw new Error("cannot set "+nt+" and a parent attribute simultaneously");for(var Ze=ae(V,nt),et=U[nt],ft=Ze.parts.length,mt=ft-1;mt>0&&typeof Ze.parts[mt]!="string";)mt--;var Qe=Ze.parts[mt],bt=Ze.parts[mt-1]+"."+Qe,Mt=Ze.parts.slice(0,mt).join("."),Lr=n(R.layout,Mt).get(),ur=n(q,Mt).get(),Xr=Ze.get();if(et!==void 0){wt[nt]=et,tt[nt]=Qe==="reverse"?et:se(Xr);var Yr=f.getLayoutValObject(q,Ze.parts);if(Yr&&Yr.impliedEdits&&et!==null)for(var Ko in Yr.impliedEdits)qe(i.relativeAttr(nt,Ko),Yr.impliedEdits[Ko]);if(["width","height"].indexOf(nt)!==-1)if(et){qe("autosize",null);var $i=nt==="height"?"width":"height";qe($i,q[$i])}else q[nt]=R._initialAutoSize[nt];else if(nt==="autosize")qe("width",et?null:q.width),qe("height",et?null:q.height);else if(bt.match(de))lt(bt),n(q,Mt+"._inputRange").set(null);else if(bt.match(Me)){lt(bt),n(q,Mt+"._inputRange").set(null);var Pn=n(q,Mt).get();Pn._inputDomain&&(Pn._input.domain=Pn._inputDomain.slice())}else bt.match(De)&&n(q,Mt+"._inputDomain").set(null);if(Qe==="type"){pt=Lr;var En=ur.type==="linear"&&et==="log",Ds=ur.type==="log"&&et==="linear";if(En||Ds){if(!pt||!pt.range)qe(Mt+".autorange",!0);else if(ur.autorange)En&&(pt.range=pt.range[1]>pt.range[0]?[1,2]:[2,1]);else{var Ua=pt.range[0],Sa=pt.range[1];En?(Ua<=0&&Sa<=0&&qe(Mt+".autorange",!0),Ua<=0?Ua=Sa/1e6:Sa<=0&&(Sa=Ua/1e6),qe(Mt+".range[0]",Math.log(Ua)/Math.LN10),qe(Mt+".range[1]",Math.log(Sa)/Math.LN10)):(qe(Mt+".range[0]",Math.pow(10,Ua)),qe(Mt+".range[1]",Math.pow(10,Sa)))}Array.isArray(q._subplots.polar)&&q._subplots.polar.length&&q[Ze.parts[0]]&&Ze.parts[1]==="radialaxis"&&delete q[Ze.parts[0]]._subplot.viewInitial["radialaxis.range"],s.getComponentMethod("annotations","convertCoords")(R,ur,et,qe),s.getComponentMethod("images","convertCoords")(R,ur,et,qe)}else qe(Mt+".autorange",!0),qe(Mt+".range",null);n(q,Mt+"._inputRange").set(null)}else if(Qe.match(A)){var Qo=n(q,nt).get(),Ni=(et||{}).type;(!Ni||Ni==="-")&&(Ni="linear"),s.getComponentMethod("annotations","convertCoords")(R,Qo,Ni,qe),s.getComponentMethod("images","convertCoords")(R,Qo,Ni,qe)}var zn=g.containerArrayMatch(nt);if(zn){Ie=zn.array,Oe=zn.index;var ni=zn.property,Rn=Yr||{editType:"calc"};Oe!==""&&ni===""&&(g.isAddVal(et)?tt[nt]=null:g.isRemoveVal(et)?tt[nt]=(n(V,Ie).get()||[])[Oe]:i.warn("unrecognized full object value",U)),T.update(Ye,Rn),ie[Ie]||(ie[Ie]={});var Hi=ie[Ie][Oe];Hi||(Hi=ie[Ie][Oe]={}),Hi[ni]=et,delete U[nt]}else Qe==="reverse"?(Lr.range?Lr.range.reverse():(qe(Mt+".autorange",!0),Lr.range=[1,0]),ur.autorange?Ye.calc=!0:Ye.plot=!0):(nt==="dragmode"&&(et===!1&&Xr!==!1||et!==!1&&Xr===!1)||q._has("scatter-like")&&q._has("regl")&&nt==="dragmode"&&(et==="lasso"||et==="select")&&!(Xr==="lasso"||Xr==="select")?Ye.plot=!0:Yr?T.update(Ye,Yr):Ye.calc=!0,Ze.set(et))}}for(Ie in ie){var $t=g.applyContainerArrayChanges(R,ae(V,Ie),ie[Ie],Ye,ae);$t||(Ye.plot=!0)}for(var mr in vt){pt=u.getFromId(R,mr);var Va=pt&&pt._constraintGroup;if(Va){Ye.calc=!0;for(var Oi in Va)vt[Oi]||(u.getFromId(R,Oi)._constraintShrinkable=!0)}}(Te(R)||U.height||U.width)&&(Ye.plot=!0);var Jo=q.shapes;for(Oe=0;Oe<Jo.length;Oe++)if(Jo[Oe].showlegend){Ye.calc=!0;break}return(Ye.plot||Ye.calc)&&(Ye.layoutReplot=!0),{flags:Ye,rangesAltered:vt,undoit:tt,redoit:wt,eventData:he}}function Te(R){var U=R._fullLayout,V=U.width,q=U.height;return R.layout.autosize&&c.plotAutoSize(R,R.layout,U),U.width!==V||U.height!==q}function Se(R,U,V,q){R=i.getGraphDiv(R),x.clearPromiseQueue(R),i.isPlainObject(U)||(U={}),i.isPlainObject(V)||(V={}),Object.keys(U).length&&(R.changed=!0),Object.keys(V).length&&(R.changed=!0);var le=x.coerceTraceIndices(R,q),ae=ge(R,i.extendFlat({},U),le),Re=ae.flags,Ce=ue(R,i.extendFlat({},V)),he=Ce.flags;(Re.calc||he.calc)&&(R.calcdata=void 0),Re.clearAxisTypes&&x.clearAxisTypes(R,le,V);var ie=[];he.layoutReplot?ie.push(w.layoutReplot):Re.fullReplot?ie.push(t._doPlot):(ie.push(c.previousPromises),we(R,he,Ce)||c.supplyDefaults(R),Re.style&&ie.push(w.doTraceStyle),(Re.colorbars||he.colorbars)&&ie.push(w.doColorBars),he.legend&&ie.push(w.doLegend),he.layoutstyle&&ie.push(w.layoutStyles),he.axrange&&ye(ie,Ce.rangesAltered),he.ticks&&ie.push(w.doTicksRelayout),he.modebar&&ie.push(w.doModeBar),he.camera&&ie.push(w.doCamera),ie.push(z)),ie.push(c.rehover,c.redrag,c.reselect),l.add(R,Se,[R,ae.undoit,Ce.undoit,ae.traces],Se,[R,ae.redoit,Ce.redoit,ae.traces]);var Ie=i.syncOrAsync(ie,R);return(!Ie||!Ie.then)&&(Ie=Promise.resolve(R)),Ie.then(function(){return R.emit("plotly_update",{data:ae.eventData,layout:Ce.eventData}),R})}function J(R){return function(V){V._fullLayout._guiEditing=!0;var q=R.apply(null,arguments);return V._fullLayout._guiEditing=!1,q}}var _e=[{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"}],re=[{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 Ae(R,U){for(var V=0;V<U.length;V++){var q=U[V],le=R.match(q.pattern);if(le){var ae=le[1]||"";return{head:ae,tail:R.substr(ae.length+1),attr:q.attr}}}}function Le(R,U){var V=n(U,R).get();if(V!==void 0)return V;var q=R.split(".");for(q.pop();q.length>1;)if(q.pop(),V=n(U,q.join(".")+".uirevision").get(),V!==void 0)return V;return U.uirevision}function K(R,U){for(var V=0;V<U.length;V++)if(U[V]._fullInput.uid===R)return V;return-1}function ne(R,U,V){for(var q=0;q<U.length;q++)if(U[q].uid===R)return q;return!U[V]||U[V].uid?-1:V}function ve(R,U){var V=i.isPlainObject(R),q=Array.isArray(R);return V||q?(V&&i.isPlainObject(U)||q&&Array.isArray(U))&&JSON.stringify(R)===JSON.stringify(U):R===U}function me(R,U,V,q){var le=q._preGUI,ae,Re,Ce,he,ie,Ie,Oe,We,Ge,rt,at=[],Ye={},wt={};for(ae in le){if(ie=Ae(ae,_e),ie){if(Ge=ie.head,rt=ie.tail,Re=ie.attr||Ge+".uirevision",Ce=n(q,Re).get(),he=Ce&&Le(Re,U),he&&he===Ce){if(Ie=le[ae],Ie===null&&(Ie=void 0),Oe=n(U,ae),We=Oe.get(),ve(We,Ie)){We===void 0&&rt==="autorange"&&at.push(Ge),Oe.set(se(n(q,ae).get()));continue}else if(rt==="autorange"||rt.substr(0,6)==="range["){var tt=le[Ge+".range[0]"],qe=le[Ge+".range[1]"],vt=le[Ge+".autorange"];if(vt||vt===null&&tt===null&&qe===null){if(!(Ge in Ye)){var pt=n(U,Ge).get();Ye[Ge]=pt&&(pt.autorange||pt.autorange!==!1&&(!pt.range||pt.range.length!==2))}if(Ye[Ge]){Oe.set(se(n(q,ae).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+ae);delete le[ae],ie&&ie.tail.substr(0,6)==="range["&&(wt[ie.head]=1)}for(var lt=0;lt<at.length;lt++){var nt=at[lt];if(wt[nt]){var Ze=n(U,nt).get();Ze&&delete Ze.autorange}}var et=q._tracePreGUI;for(var ft in et){var mt=et[ft],Qe=null,bt;for(ae in mt){if(!Qe){var Mt=K(ft,V);if(Mt<0){delete et[ft];break}var Lr=V[Mt];bt=Lr._fullInput;var ur=ne(ft,R,bt.index);if(ur<0){delete et[ft];break}Qe=R[ur]}if(ie=Ae(ae,re),ie){if(ie.attr?(Ce=n(q,ie.attr).get(),he=Ce&&Le(ie.attr,U)):(Ce=bt.uirevision,he=Qe.uirevision,he===void 0&&(he=U.uirevision)),he&&he===Ce&&(Ie=mt[ae],Ie===null&&(Ie=void 0),Oe=n(Qe,ae),We=Oe.get(),ve(We,Ie))){Oe.set(se(n(bt,ae).get()));continue}}else i.warn("unrecognized GUI edit: "+ae+" in trace uid "+ft);delete mt[ae]}}}function ke(R,U,V,q){var le,ae;function Re(){return t.addFrames(R,le)}R=i.getGraphDiv(R),x.clearPromiseQueue(R);var Ce=R._fullData,he=R._fullLayout;if(!i.isPlotDiv(R)||!Ce||!he)ae=t.newPlot(R,U,V,q);else{if(i.isPlainObject(U)){var ie=U;U=ie.data,V=ie.layout,q=ie.config,le=ie.frames}var Ie=!1;if(q){var Oe=i.extendDeep({},R._context);R._context=void 0,H(R,q),Ie=Fe(Oe,R._context)}R.data=U||[],x.cleanData(R.data),R.layout=V||{},x.cleanLayout(R.layout),me(R.data,R.layout,Ce,he),c.supplyDefaults(R,{skipUpdateCalc:!0});var We=R._fullData,Ge=R._fullLayout,rt=Ge.datarevision===void 0,at=Ge.transition,Ye=Ee(R,he,Ge,rt,at),wt=Ye.newDataRevision,tt=Pe(R,Ce,We,rt,at,wt);if(Te(R)&&(Ye.layoutReplot=!0),tt.calc||Ye.calc){R.calcdata=void 0;for(var qe=Object.getOwnPropertyNames(Ge),vt=0;vt<qe.length;vt++){var pt=qe[vt],lt=pt.substring(0,5);if(lt==="xaxis"||lt==="yaxis"){var nt=Ge[pt]._emptyCategories;nt&&nt()}}}else c.supplyDefaultsUpdateCalc(R.calcdata,We);var Ze=[];if(le&&(R._transitionData={},c.createTransitionData(R),Ze.push(Re)),Ge.transition&&!Ie&&(tt.anim||Ye.anim))Ye.ticks&&Ze.push(w.doTicksRelayout),c.doCalcdata(R),w.doAutoRangeAndConstraints(R),Ze.push(function(){return c.transitionFromReact(R,tt,Ye,he)});else if(tt.fullReplot||Ye.layoutReplot||Ie)R._fullLayout._skipDefaults=!0,Ze.push(t._doPlot);else{for(var et in Ye.arrays){var ft=Ye.arrays[et];if(ft.length){var mt=s.getComponentMethod(et,"drawOne");if(mt!==i.noop)for(var Qe=0;Qe<ft.length;Qe++)mt(R,ft[Qe]);else{var bt=s.getComponentMethod(et,"draw");if(bt===i.noop)throw new Error("cannot draw components: "+et);bt(R)}}}Ze.push(c.previousPromises),tt.style&&Ze.push(w.doTraceStyle),(tt.colorbars||Ye.colorbars)&&Ze.push(w.doColorBars),Ye.legend&&Ze.push(w.doLegend),Ye.layoutstyle&&Ze.push(w.layoutStyles),Ye.axrange&&ye(Ze),Ye.ticks&&Ze.push(w.doTicksRelayout),Ye.modebar&&Ze.push(w.doModeBar),Ye.camera&&Ze.push(w.doCamera),Ze.push(z)}Ze.push(c.rehover,c.redrag,c.reselect),ae=i.syncOrAsync(Ze,R),(!ae||!ae.then)&&(ae=Promise.resolve(R))}return ae.then(function(){return R.emit("plotly_react",{data:U,layout:V}),R})}function Pe(R,U,V,q,le,ae){var Re=U.length===V.length;if(!le&&!Re)return{fullReplot:!0,calc:!0};var Ce=T.traceFlags();Ce.arrays={},Ce.nChanges=0,Ce.nChangesAnim=0;var he,ie;function Ie(Ge){var rt=f.getTraceValObject(ie,Ge);return!ie._module.animatable&&rt.anim&&(rt.anim=!1),rt}var Oe={getValObject:Ie,flags:Ce,immutable:q,transition:le,newDataRevision:ae,gd:R},We={};for(he=0;he<U.length;he++)if(V[he]){if(ie=V[he]._fullInput,We[ie.uid])continue;We[ie.uid]=1,Ne(U[he]._fullInput,ie,[],Oe)}return(Ce.calc||Ce.plot)&&(Ce.fullReplot=!0),le&&Ce.nChanges&&Ce.nChangesAnim&&(Ce.anim=Ce.nChanges===Ce.nChangesAnim&&Re?"all":"some"),Ce}function Ee(R,U,V,q,le){var ae=T.layoutFlags();ae.arrays={},ae.rangesAltered={},ae.nChanges=0,ae.nChangesAnim=0;function Re(We){return f.getLayoutValObject(V,We)}for(var Ce in V)if(!(!Ce.startsWith("xaxis")&&!Ce.startsWith("yaxis"))&&U[Ce]){var he=V[Ce].domain,ie=U[Ce].domain,Ie=U[Ce]._inputDomain;U[Ce]._inputDomain&&(he[0]===Ie[0]&&he[1]===Ie[1]?V[Ce].domain=U[Ce].domain:(he[0]!==ie[0]||he[1]!==ie[1])&&(V[Ce]._inputDomain=null))}var Oe={getValObject:Re,flags:ae,immutable:q,transition:le,gd:R};return Ne(U,V,[],Oe),(ae.plot||ae.calc)&&(ae.layoutReplot=!0),le&&ae.nChanges&&ae.nChangesAnim&&(ae.anim=ae.nChanges===ae.nChangesAnim?"all":"some"),ae}function Ne(R,U,V,q){var le,ae,Re,Ce=q.getValObject,he=q.flags,ie=q.immutable,Ie=q.inArray,Oe=q.arrayIndex;function We(){var Mt=le.editType;if(Ie&&Mt.indexOf("arraydraw")!==-1){i.pushUnique(he.arrays[Ie],Oe);return}T.update(he,le),Mt!=="none"&&he.nChanges++,q.transition&&le.anim&&he.nChangesAnim++,(de.test(Re)||Me.test(Re))&&(he.rangesAltered[V[0]]=1),ae==="datarevision"&&(he.newDataRevision=1)}function Ge(Mt){return Mt.valType==="data_array"||Mt.arrayOk}for(ae in R){if(he.calc&&!q.transition)return;var rt=R[ae],at=U[ae],Ye=V.concat(ae);if(Re=Ye.join("."),!(ae.charAt(0)==="_"||typeof rt=="function"||rt===at)){if((ae==="tick0"||ae==="dtick")&&V[0]!=="geo"){var wt=U.tickmode;if(wt==="auto"||wt==="array"||!wt)continue}if(!(ae==="range"&&U.autorange)&&!((ae==="zmin"||ae==="zmax")&&U.type==="contourcarpet")&&(le=Ce(Ye),!!le&&!(le._compareAsJSON&&JSON.stringify(rt)===JSON.stringify(at)))){var tt=le.valType,qe,vt=Ge(le),pt=Array.isArray(rt),lt=Array.isArray(at);if(pt&&lt){var nt="_input_"+ae,Ze=R[nt],et=U[nt];if(Array.isArray(Ze)&&Ze===et)continue}if(at===void 0)vt&&pt?he.calc=!0:We();else if(le._isLinkedToArray){var ft=[],mt=!1;Ie||(he.arrays[ae]=ft);var Qe=Math.min(rt.length,at.length),bt=Math.max(rt.length,at.length);if(Qe!==bt)if(le.editType==="arraydraw")mt=!0;else{We();continue}for(qe=0;qe<Qe;qe++)Ne(rt[qe],at[qe],Ye.concat(qe),i.extendFlat({inArray:ae,arrayIndex:qe},q));if(mt)for(qe=Qe;qe<bt;qe++)ft.push(qe)}else!tt&&i.isPlainObject(rt)?Ne(rt,at,Ye,q):vt?pt&&lt?(ie&&(he.calc=!0),(ie||q.newDataRevision)&&We()):pt!==lt?he.calc=!0:We():pt&&lt?(rt.length!==at.length||String(rt)!==String(at))&&We():We()}}}for(ae in U)if(!(ae in R||ae.charAt(0)==="_"||typeof U[ae]=="function"))if(le=Ce(V.concat(ae)),Ge(le)&&Array.isArray(U[ae])){he.calc=!0;return}else We()}function Fe(R,U){var V;for(V in R)if(V.charAt(0)!=="_"){var q=R[V],le=U[V];if(q!==le)if(i.isPlainObject(q)&&i.isPlainObject(le)){if(Fe(q,le))return!0}else if(Array.isArray(q)&&Array.isArray(le)){if(q.length!==le.length)return!0;for(var ae=0;ae<q.length;ae++)if(q[ae]!==le[ae])if(i.isPlainObject(q[ae])&&i.isPlainObject(le[ae])){if(Fe(q[ae],le[ae]))return!0}else return!0}else return!0}}function ce(R,U,V){if(R=i.getGraphDiv(R),!i.isPlotDiv(R))throw new Error("This element is not a Plotly plot: "+R+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var q=R._transitionData;q._frameQueue||(q._frameQueue=[]),V=c.supplyAnimationDefaults(V);var le=V.transition,ae=V.frame;q._frameWaitingCnt===void 0&&(q._frameWaitingCnt=0);function Re(ie){return Array.isArray(le)?ie>=le.length?le[0]:le[ie]:le}function Ce(ie){return Array.isArray(ae)?ie>=ae.length?ae[0]:ae[ie]:ae}function he(ie,Ie){var Oe=0;return function(){if(ie&&++Oe===Ie)return ie()}}return new Promise(function(ie,Ie){function Oe(){if(q._frameQueue.length!==0){for(;q._frameQueue.length;){var Qe=q._frameQueue.pop();Qe.onInterrupt&&Qe.onInterrupt()}R.emit("plotly_animationinterrupted",[])}}function We(Qe){if(Qe.length!==0){for(var bt=0;bt<Qe.length;bt++){var Mt;Qe[bt].type==="byname"?Mt=c.computeFrame(R,Qe[bt].name):Mt=Qe[bt].data;var Lr=Ce(bt),ur=Re(bt);ur.duration=Math.min(ur.duration,Lr.duration);var Xr={frame:Mt,name:Qe[bt].name,frameOpts:Lr,transitionOpts:ur};bt===Qe.length-1&&(Xr.onComplete=he(ie,2),Xr.onInterrupt=Ie),q._frameQueue.push(Xr)}V.mode==="immediate"&&(q._lastFrameAt=-1/0),q._animationRaf||at()}}function Ge(){R.emit("plotly_animated"),window.cancelAnimationFrame(q._animationRaf),q._animationRaf=null}function rt(){q._currentFrame&&q._currentFrame.onComplete&&q._currentFrame.onComplete();var Qe=q._currentFrame=q._frameQueue.shift();if(Qe){var bt=Qe.name?Qe.name.toString():null;R._fullLayout._currentFrame=bt,q._lastFrameAt=Date.now(),q._timeToNext=Qe.frameOpts.duration,c.transition(R,Qe.frame.data,Qe.frame.layout,x.coerceTraceIndices(R,Qe.frame.traces),Qe.frameOpts,Qe.transitionOpts).then(function(){Qe.onComplete&&Qe.onComplete()}),R.emit("plotly_animatingframe",{name:bt,frame:Qe.frame,animation:{frame:Qe.frameOpts,transition:Qe.transitionOpts}})}else Ge()}function at(){R.emit("plotly_animating"),q._lastFrameAt=-1/0,q._timeToNext=0,q._runningTransitions=0,q._currentFrame=null;var Qe=function(){q._animationRaf=window.requestAnimationFrame(Qe),Date.now()-q._lastFrameAt>q._timeToNext&&rt()};Qe()}var Ye=0;function wt(Qe){return Array.isArray(le)?Ye>=le.length?Qe.transitionOpts=le[Ye]:Qe.transitionOpts=le[0]:Qe.transitionOpts=le,Ye++,Qe}var tt,qe,vt=[],pt=U==null,lt=Array.isArray(U),nt=!pt&&!lt&&i.isPlainObject(U);if(nt)vt.push({type:"object",data:wt(i.extendFlat({},U))});else if(pt||["string","number"].indexOf(typeof U)!==-1)for(tt=0;tt<q._frames.length;tt++)qe=q._frames[tt],qe&&(pt||String(qe.group)===String(U))&&vt.push({type:"byname",name:String(qe.name),data:wt({name:qe.name})});else if(lt)for(tt=0;tt<U.length;tt++){var Ze=U[tt];["number","string"].indexOf(typeof Ze)!==-1?(Ze=String(Ze),vt.push({type:"byname",name:Ze,data:wt({name:Ze})})):i.isPlainObject(Ze)&&vt.push({type:"object",data:wt(i.extendFlat({},Ze))})}for(tt=0;tt<vt.length;tt++)if(qe=vt[tt],qe.type==="byname"&&!q._frameHash[qe.data.name]){i.warn('animate failure: frame not found: "'+qe.data.name+'"'),Ie();return}["next","immediate"].indexOf(V.mode)!==-1&&Oe(),V.direction==="reverse"&&vt.reverse();var et=R._fullLayout._currentFrame;if(et&&V.fromcurrent){var ft=-1;for(tt=0;tt<vt.length;tt++)if(qe=vt[tt],qe.type==="byname"&&qe.name===et){ft=tt;break}if(ft>0&&ft<vt.length-1){var mt=[];for(tt=0;tt<vt.length;tt++)qe=vt[tt],(vt[tt].type!=="byname"||tt>ft)&&mt.push(qe);vt=mt}}vt.length>0?We(vt):(R.emit("plotly_animated"),ie())})}function He(R,U,V){if(R=i.getGraphDiv(R),U==null)return Promise.resolve();if(!i.isPlotDiv(R))throw new Error("This element is not a Plotly plot: "+R+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var q,le,ae,Re,Ce=R._transitionData._frames,he=R._transitionData._frameHash;if(!Array.isArray(U))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+U);var ie=Ce.length+U.length*2,Ie=[],Oe={};for(q=U.length-1;q>=0;q--)if(i.isPlainObject(U[q])){var We=U[q].name,Ge=(he[We]||Oe[We]||{}).name,rt=U[q].name,at=he[Ge]||Oe[Ge];Ge&&rt&&typeof rt=="number"&&at&&M<S&&(M++,i.warn('addFrames: overwriting frame "'+(he[Ge]||Oe[Ge]).name+'" with a frame whose name of type "number" also equates to "'+Ge+'". 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.")),Oe[We]={name:We},Ie.push({frame:c.supplyFrameDefaults(U[q]),index:V&&V[q]!==void 0&&V[q]!==null?V[q]:ie+q})}Ie.sort(function(nt,Ze){return nt.index>Ze.index?-1:nt.index<Ze.index?1:0});var Ye=[],wt=[],tt=Ce.length;for(q=Ie.length-1;q>=0;q--){if(le=Ie[q].frame,typeof le.name=="number"&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!le.name)for(;he[le.name="frame "+R._transitionData._counter++];);if(he[le.name]){for(ae=0;ae<Ce.length&&(Ce[ae]||{}).name!==le.name;ae++);Ye.push({type:"replace",index:ae,value:le}),wt.unshift({type:"replace",index:ae,value:Ce[ae]})}else Re=Math.max(0,Math.min(Ie[q].index,tt)),Ye.push({type:"insert",index:Re,value:le}),wt.unshift({type:"delete",index:Re}),tt++}var qe=c.modifyFrames,vt=c.modifyFrames,pt=[R,wt],lt=[R,Ye];return l&&l.add(R,qe,pt,vt,lt),c.modifyFrames(R,Ye)}function Be(R,U){if(R=i.getGraphDiv(R),!i.isPlotDiv(R))throw new Error("This element is not a Plotly plot: "+R);var V,q,le=R._transitionData._frames,ae=[],Re=[];if(!U)for(U=[],V=0;V<le.length;V++)U.push(V);for(U=U.slice(),U.sort(),V=U.length-1;V>=0;V--)q=U[V],ae.push({type:"delete",index:q}),Re.unshift({type:"insert",index:q,value:le[q]});var Ce=c.modifyFrames,he=c.modifyFrames,ie=[R,Re],Ie=[R,ae];return l&&l.add(R,Ce,ie,he,Ie),c.modifyFrames(R,ae)}function $e(R){R=i.getGraphDiv(R);var U=R._fullLayout||{},V=R._fullData||[];return c.cleanPlot([],{},V,U),c.purge(R),o.purge(R),U._container&&U._container.remove(),delete R._context,R}function Ke(R){var U=R._fullLayout,V=R.getBoundingClientRect();if(!i.equalDomRects(V,U._lastBBox)){var q=U._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(R));U._invScaleX=Math.sqrt(q[0][0]*q[0][0]+q[0][1]*q[0][1]+q[0][2]*q[0][2]),U._invScaleY=Math.sqrt(q[1][0]*q[1][0]+q[1][1]*q[1][1]+q[1][2]*q[1][2]),U._lastBBox=V}}function je(R){var U=e.select(R),V=R._fullLayout;if(V._calcInverseTransform=Ke,V._calcInverseTransform(R),V._container=U.selectAll(".plot-container").data([0]),V._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),V._paperdiv=V._container.selectAll(".svg-container").data([0]),V._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),V._glcontainer=V._paperdiv.selectAll(".gl-container").data([{}]),V._glcontainer.enter().append("div").classed("gl-container",!0),V._paperdiv.selectAll(".main-svg").remove(),V._paperdiv.select(".modebar-container").remove(),V._paper=V._paperdiv.insert("svg",":first-child").classed("main-svg",!0),V._toppaper=V._paperdiv.append("svg").classed("main-svg",!0),V._modebardiv=V._paperdiv.append("div"),delete V._modeBar,V._hoverpaper=V._paperdiv.append("svg").classed("main-svg",!0),!V._uid){var q={};e.selectAll("defs").each(function(){this.id&&(q[this.id.split("-")[1]]=1)}),V._uid=i.randstr(q)}V._paperdiv.selectAll(".main-svg").attr(y.svgAttrs),V._defs=V._paper.append("defs").attr("id","defs-"+V._uid),V._clips=V._defs.append("g").classed("clips",!0),V._topdefs=V._toppaper.append("defs").attr("id","topdefs-"+V._uid),V._topclips=V._topdefs.append("g").classed("clips",!0),V._bgLayer=V._paper.append("g").classed("bglayer",!0),V._draggers=V._paper.append("g").classed("draglayer",!0);var le=V._paper.append("g").classed("layer-below",!0);V._imageLowerLayer=le.append("g").classed("imagelayer",!0),V._shapeLowerLayer=le.append("g").classed("shapelayer",!0),V._cartesianlayer=V._paper.append("g").classed("cartesianlayer",!0),V._polarlayer=V._paper.append("g").classed("polarlayer",!0),V._smithlayer=V._paper.append("g").classed("smithlayer",!0),V._ternarylayer=V._paper.append("g").classed("ternarylayer",!0),V._geolayer=V._paper.append("g").classed("geolayer",!0),V._funnelarealayer=V._paper.append("g").classed("funnelarealayer",!0),V._pielayer=V._paper.append("g").classed("pielayer",!0),V._iciclelayer=V._paper.append("g").classed("iciclelayer",!0),V._treemaplayer=V._paper.append("g").classed("treemaplayer",!0),V._sunburstlayer=V._paper.append("g").classed("sunburstlayer",!0),V._indicatorlayer=V._toppaper.append("g").classed("indicatorlayer",!0),V._glimages=V._paper.append("g").classed("glimages",!0);var ae=V._toppaper.append("g").classed("layer-above",!0);V._imageUpperLayer=ae.append("g").classed("imagelayer",!0),V._shapeUpperLayer=ae.append("g").classed("shapelayer",!0),V._selectionLayer=V._toppaper.append("g").classed("selectionlayer",!0),V._infolayer=V._toppaper.append("g").classed("infolayer",!0),V._menulayer=V._toppaper.append("g").classed("menulayer",!0),V._zoomlayer=V._toppaper.append("g").classed("zoomlayer",!0),V._hoverlayer=V._hoverpaper.append("g").classed("hoverlayer",!0),V._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),R.emit("plotly_framework")}t.animate=ce,t.addFrames=He,t.deleteFrames=Be,t.addTraces=Y,t.deleteTraces=B,t.extendTraces=Z,t.moveTraces=Q,t.prependTraces=W,t.newPlot=E,t._doPlot=L,t.purge=$e,t.react=ke,t.redraw=D,t.relayout=be,t.restyle=ee,t.setPlotConfig=$,t.update=Se,t._guiRelayout=J(be),t._guiRestyle=J(ee),t._guiUpdate=J(Se),t._storeDirectGUIEdit=pe})(ip);var Nr={},GR=Je;Nr.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("mapbox")||t._has("map"))?500:0};Nr.getRedrawFunc=function(t){return function(){GR.getComponentMethod("colorbar","draw")(t)}};Nr.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)};Nr.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var B2=window.URL||window.webkitURL;Nr.createObjectURL=function(t){return B2.createObjectURL(t)};Nr.revokeObjectURL=function(t){return B2.revokeObjectURL(t)};Nr.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=UR(window.atob(t));return new window.Blob([r],{type:"image/"+e})};Nr.octetStream=function(t){document.location.href="data:application/octet-stream"+t};function UR(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}Nr.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/;var dh=ut,VR=kt,WR=ct,Mv=/"/g,$l="TOBESTRIPPED",XR=new RegExp('("'+$l+")|("+$l+'")',"g");function YR(t){var e=dh.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(a){return a==="&lt;"?"&#60;":a==="&rt;"?"&#62;":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":e.html(a).text()});return e.remove(),r}function qR(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}var qp=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(VR.setRect,0,0,l,s).call(WR.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,p=Array.prototype.slice.call(v);for(f=0;f<p.length;f++){var d=p[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=dh.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(Mv,$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=dh.select(this),y=this.style.fill;y&&y.indexOf("url(")!==-1&&m.style("fill",y.replace(Mv,$l));var b=this.style.stroke;b&&b.indexOf("url(")!==-1&&m.style("stroke",b.replace(Mv,$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 h=new window.XMLSerializer().serializeToString(n.node());return h=YR(h),h=qR(h),h=h.replace(XR,"'"),h},ZR=xe,KR=Fh.EventEmitter,yl=Nr;function QR(t){var e=t.emitter||new KR,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,p=f*u,d=s.getContext("2d",{willReadFrequently:!0}),h=new n,m,y;l==="svg"||ZR.isSafari()?y=yl.encodeSVG(o):(m=yl.createBlob(o,"svg"),y=yl.createObjectURL(m)),s.width=v,s.height=p,h.onload=function(){var b;switch(m=null,yl.revokeObjectURL(y),l!=="svg"&&d.drawImage(h,0,0,v,p),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)},h.onerror=function(b){if(m=null,yl.revokeObjectURL(y),i(b),!t.promise)return e.emit("error",b)},h.src=y});return t.promise?r:e}var Zp=QR,H0=ht,O0=ip,JR=Kt,Ea=xe,gl=Nr,eI=qp,tI=Zp,rI=$c.version,Sv={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 aI(t,e){e=e||{};var r,a,i,n;Ea.isPlainObject(t)?(r=t.data||[],a=t.layout||{},i=t.config||{},n={}):(t=Ea.getGraphDiv(t),r=Ea.extendDeep([],t.data),a=Ea.extendDeep({},t.layout),i=t._context,n=t._fullLayout||{});function o(w){return!(w in e)||Ea.validate(e[w],Sv[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 "+Ea.join2(Sv.format.values,", "," or ")+".");var l={};function s(w,T){return Ea.coerce(e,l,Sv,w,T)}var f=s("format"),c=s("width"),u=s("height"),v=s("scale"),p=s("setBackground"),d=s("imageDataOnly"),h=document.createElement("div");h.style.position="absolute",h.style.left="-5000px",document.body.appendChild(h);var m=Ea.extendFlat({},a);c?m.width=c:e.width===null&&H0(n.width)&&(m.width=n.width),u?m.height=u:e.height===null&&H0(n.height)&&(m.height=n.height);var y=Ea.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:p}),b=gl.getRedrawFunc(h);function _(){return new Promise(function(w){setTimeout(w,gl.getDelay(h._fullLayout))})}function g(){return new Promise(function(w,T){var A=eI(h,f,v),M=h._fullLayout.width,S=h._fullLayout.height;function L(){O0.purge(h),document.body.removeChild(h)}if(f==="full-json"){var z=JR.graphJson(h,!1,"keepdata","object",!0,!0);return z.version=rI,z=JSON.stringify(z),L(),w(d?z:gl.encodeJSON(z))}if(L(),f==="svg")return w(d?A:gl.encodeSVG(A));var $=document.createElement("canvas");$.id=Ea.randstr(),tI({format:f,width:M,height:S,scale:v,canvas:$,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){O0.newPlot(h,r,m,y).then(b).then(_).then(g).then(function(A){w(x(A))}).catch(function(A){T(A)})})}var G2=aI,ia=xe,iI=Kt,nI=Uo,oI=Oo.dfltConfig,pa=ia.isPlainObject,hn=Array.isArray,Lv=ia.isArrayOrTypedArray,lI=function(e,r){e===void 0&&(e=[]),r===void 0&&(r={});var a=nI.get(),i=[],n={_context:ia.extendFlat({},oI)},o,l;hn(e)?(n.data=ia.extendDeep([],e),o=e):(n.data=[],o=[],i.push(rr("array","data"))),pa(r)?(n.layout=ia.extendDeep({},r),l=r):(n.layout={},l={},arguments.length>1&&i.push(rr("object","layout"))),iI.supplyDefaults(n);for(var s=n._fullData,f=o.length,c=0;c<f;c++){var u=o[c],v=["data",c];if(!pa(u)){i.push(rr("object",v));continue}var p=s[c],d=p.type,h=a.traces[d].attributes;h.type={valType:"enumerated",values:[d]},p.visible===!1&&u.visible!==!1&&i.push(rr("invisible",v)),xc(u,p,h,i,v)}var m=n._fullLayout,y=sI(a,s);return xc(l,m,y,i,"layout"),i.length===0?void 0:i};function xc(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=uI(r,s),p=(v||{}).valType,d=p==="info_array",h=p==="colorscale",m=(v||{}).items;if(!cI(r,s))a.push(rr("schema",i,f));else if(pa(c)&&pa(u)&&p!=="any")xc(c,u,v,a,i,f);else if(d&&hn(c)){c.length>u.length&&a.push(rr("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(hn(c[g])){c[g].length>u[g].length&&a.push(rr("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][_],ia.validate(w,x)?T!==w&&T!==+w&&a.push(rr("dynamic",i,f.concat(g,_),w,T)):a.push(rr("value",i,f.concat(g,_),w))}else a.push(rr("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],ia.validate(w,x)?T!==w&&T!==+w&&a.push(rr("dynamic",i,f.concat(g),w,T)):a.push(rr("value",i,f.concat(g),w))}else if(v.items&&!d&&hn(c)){var M=m[Object.keys(m)[0]],S=[],L,z;for(L=0;L<u.length;L++){var $=u[L]._index||L;if(z=f.slice(),z.push($),pa(c[$])&&pa(u[L])){S.push($);var N=c[$],I=u[L];pa(N)&&N.visible!==!1&&I.visible===!1?a.push(rr("invisible",i,z)):xc(N,I,M,a,i,z)}}for(L=0;L<c.length;L++)z=f.slice(),z.push(L),pa(c[L])?S.indexOf(L)===-1&&a.push(rr("unused",i,z)):a.push(rr("object",i,z,c[L]))}else!pa(c)&&pa(u)?a.push(rr("object",i,f,c)):!Lv(c)&&Lv(u)&&!d&&!h?a.push(rr("array",i,f,c)):s in e?ia.validate(c,v)?v.valType==="enumerated"&&(v.coerceNumber&&c!==+u||!Lv(c)&&c!==u||String(c)!==String(u))&&a.push(rr("dynamic",i,f,c,u)):a.push(rr("value",i,f,c)):a.push(rr("unused",i,f,c))}return a}function sI(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?ia.extendFlat(r[n.attributes.subplot.dflt],o):ia.extendFlat(r,o))}return r}var fI={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=Vi(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=Vi(t)+"key "+e,r+" must be linked to an array container"},schema:function(t,e){return Vi(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var a=pa(r)?"container":"key";return Vi(t)+a+" "+e+" did not get coerced"},dynamic:function(t,e,r,a){return[Vi(t)+"key",e,"(set to '"+r+"')","got reset to","'"+a+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?Vi(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[Vi(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function Vi(t){return hn(t)?"In data trace "+t[1]+", ":"In "+t+", "}function rr(t,e,r,a,i){r=r||"";var n,o;hn(e)?(n=e[0],o=e[1]):(n=e,o=null);var l=dI(r),s=fI[t](e,l,a,i);return ia.log(s),{code:t,container:n,trace:o,path:r,astr:l,msg:s}}function cI(t,e){var r=U2(e),a=r.keyMinusId,i=r.id;return a in t&&t[a]._isSubplotObj&&i?!0:e in t}function uI(t,e){if(e in t)return t[e];var r=U2(e);return t[r.keyMinusId]}var vI=ia.counterRegex("([a-z]+)");function U2(t){var e=t.match(vI);return{keyMinusId:e&&e[1],id:e&&e[2]}}function dI(t){if(!hn(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 hI=xe,vf=Nr;function pI(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=vf.createBlob(t,r),f=vf.createObjectURL(s),a.href=f,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),vf.revokeObjectURL(f),s=null,o(e);if(hI.isSafari()){var c=r==="svg"?",":";base64,";return vf.octetStream(c+encodeURIComponent(t)),o(e)}l(new Error("download error"))});return n}var mI=pI,j0=xe,yI=G2,gI=mI;function bI(t,e){var r;return j0.isPlainObject(t)||(r=j0.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=yI(t,e),o=e.filename||t.fn||"newplot";o+="."+e.format.replace("-","."),n.then(function(l){return r&&(r._snapshotInProgress=!1),gI(l,o,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),i(l)})})}var V2=bI,Kp={},Rr=xe,Ir=Rr.isPlainObject,W2=Uo,X2=Kt,xI=oa,Y2=Lt,q2=Oo.dfltConfig;Kp.makeTemplate=function(t){t=Rr.isPlainObject(t)?t:Rr.getGraphDiv(t),t=Rr.extendDeep({_context:q2},{data:t.data,layout:t.layout}),X2.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(p){var d={};Nl(p,d,wI.bind(null,p));var h=Rr.coerce(p,{},xI,"type"),m=a.data[h];m||(m=a.data[h]=[]),m.push(d)}),Nl(r,a.layout,_I.bind(null,r)),delete a.layout.template;var i=r.template;if(Ir(i)){var n=i.layout,o,l,s,f,c,u;Ir(n)&&_c(n,a.layout);var v=i.data;if(Ir(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++)_c(s[o%f],c[o]);for(o=u;o<f;o++)c.push(Rr.extendDeep({},s[o]))}for(l in v)l in a.data||(a.data[l]=Rr.extendDeep([],v[l]))}}return a};function _c(t,e){t=Rr.extendDeep({},t);var r=Object.keys(t).sort(),a,i;function n(c,u,v){if(Ir(u)&&Ir(c))_c(c,u);else if(Array.isArray(u)&&Array.isArray(c)){var p=Y2.arrayTemplater({_template:t},v);for(i=0;i<u.length;i++){var d=u[i],h=p.newItem(d)._template;h&&_c(h,d)}var m=p.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,wc(o)===o)for(var s in e){var f=wc(s);s!==f&&f===o&&!(s in t)&&n(l,e[s],o)}}}function wc(t){return t.replace(/[0-9]+$/,"")}function Nl(t,e,r,a,i){var n=i&&r(i);for(var o in t){var l=t[o],s=Qr(t,o,a),f=Qr(t,o,i),c=r(f);if(!c){var u=wc(o);u!==o&&(f=Qr(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&&Ir(l))Nl(l,e,r,s,f);else if(c._isLinkedToArray&&Array.isArray(l))for(var v=!1,p=0,d={},h=0;h<l.length;h++){var m=l[h];if(Ir(m)){var y=m.name;if(y)d[y]||(Nl(m,e,r,Qr(l,p,s),Qr(l,p,f)),p++,d[y]=1);else if(!v){var b=Y2.arrayDefaultKey(o),_=Qr(t,b,a),g=Qr(l,p,s);Nl(m,e,r,g,Qr(l,p,f));var x=Rr.nestedProperty(e,g),w=Rr.nestedProperty(e,_);w.set(x.get()),x.set(null),v=!0}}}else{var T=Rr.nestedProperty(e,s);T.set(l)}}}function _I(t,e){return W2.getLayoutValObject(t,Rr.nestedProperty({},e).parts)}function wI(t,e){return W2.getTraceValObject(t,Rr.nestedProperty({},e).parts)}function Qr(t,e,r){var a;return r?Array.isArray(t)?a=r+"["+e+"]":a=r+"."+e:a=e,a}Kp.validateTemplate=function(t,e){var r=Rr.extendDeep({},{_context:q2,data:t.data,layout:t.layout}),a=r.layout||{};Ir(e)||(e=a.template||{});var i=e.layout,n=e.data,o=[];r.layout=a,r.layout.template=e,X2.supplyDefaults(r);var l=r._fullLayout,s=r._fullData,f={};function c(_,g){for(var x in _)if(x.charAt(0)!=="_"&&Ir(_[x])){var w=wc(x),T=[],A;for(A=0;A<g.length;A++)T.push(Qr(_,x,g[A])),w!==x&&T.push(Qr(_,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&&Ir(_[x])){var w=Qr(_,x,g);f[w]?u(_[x],w):o.push({code:"unused",path:w})}}if(Ir(i)?(c(l,["layout"]),u(i,"layout")):o.push({code:"layout"}),!Ir(n))o.push({code:"data"});else{for(var v={},p,d=0;d<s.length;d++){var h=s[d];p=h.type,v[p]=(v[p]||0)+1,h._fullInput._template||o.push({code:"missing",index:h.index,traceType:p})}for(p in n){var m=n[p].length,y=v[p]||0;m>y?o.push({code:"unused",traceType:p,templateCount:m,dataCount:y}):y>m&&o.push({code:"reused",traceType:p,templateCount:m,dataCount:y})}}function b(_,g){for(var x in _)if(x.charAt(0)!=="_"){var w=_[x],T=Qr(_,x,g);Ir(w)?(Array.isArray(_)&&w._template===!1&&w.templateitemname&&o.push({code:"missing",path:T,templateitemname:w.templateitemname}),b(w,T)):Array.isArray(w)&&TI(w)&&b(w,T)}}if(b({data:s,layout:l},""),o.length)return o.map(kI)};function TI(t){for(var e=0;e<t.length;e++)if(Ir(t[e]))return!0}function kI(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 tr=ip;It._doPlot=tr._doPlot;It.newPlot=tr.newPlot;It.restyle=tr.restyle;It.relayout=tr.relayout;It.redraw=tr.redraw;It.update=tr.update;It._guiRestyle=tr._guiRestyle;It._guiRelayout=tr._guiRelayout;It._guiUpdate=tr._guiUpdate;It._storeDirectGUIEdit=tr._storeDirectGUIEdit;It.react=tr.react;It.extendTraces=tr.extendTraces;It.prependTraces=tr.prependTraces;It.addTraces=tr.addTraces;It.deleteTraces=tr.deleteTraces;It.moveTraces=tr.moveTraces;It.purge=tr.purge;It.addFrames=tr.addFrames;It.deleteFrames=tr.deleteFrames;It.animate=tr.animate;It.setPlotConfig=tr.setPlotConfig;var AI=Gc.getGraphDiv,MI=Rp.eraseActiveShape;It.deleteActiveShape=function(t){return MI(AI(t))};It.toImage=G2;It.validate=lI;It.downloadImage=V2;var Z2=Kp;It.makeTemplate=Z2.makeTemplate;It.validateTemplate=Z2.validateTemplate;var Cv=xe,SI=Je,Qp=function(e,r,a,i){var n=i("x"),o=i("y"),l,s=SI.getComponentMethod("calendars","handleTraceDefaults");if(s(e,r,["x","y"],a),n){var f=Cv.minRowLength(n);o?l=Math.min(f,Cv.minRowLength(o)):(l=f,i("y0"),i("dy"))}else{if(!o)return 0;l=Cv.minRowLength(o),i("x0"),i("dx")}return r._length=l,l},B0=xe.dateTick0,LI=Xt,CI=LI.ONEWEEK;function G0(t,e){return t%CI===0?B0(e,1):B0(e,0)}var xu=function(e,r,a,i,n){if(n||(n={x:!0,y:!0}),n.x){var o=i("xperiod");o&&(i("xperiod0",G0(o,r.xcalendar)),i("xperiodalignment"))}if(n.y){var l=i("yperiod");l&&(i("yperiod0",G0(l,r.ycalendar)),i("yperiodalignment"))}},U0=["orientation","groupnorm","stackgaps"],DI=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<U0.length;v++){var p=U0[v],d=p+"Found";if(!f[d]){var h=e[p]!==void 0,m=p==="orientation";if((h||c)&&(f[p]=i(p,u[p]),m&&(f.fillDflt=f[p]==="h"?"tonextx":"tonexty"),h&&(f[d]=!0,!c&&(delete f.traces[0][p],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}},V0=ct,W0=Ma.hasColorscale,X0=bs,PI=kr,K2=function(e,r,a,i,n,o){var l=PI.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),W0(e,"marker")&&X0(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=V0.background:f=V0.defaultLine,n("marker.line.color",f),W0(e,"marker.line")&&X0(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")}},EI=xe.isArrayOrTypedArray,zI=Ma.hasColorscale,RI=bs,Q2=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),zI(e,"line"))RI(e,r,i,n,{prefix:"line.",cLetter:"c"});else{var s=(EI(l)?!1:l)||a;n("line.color",s)}n("line.width"),o.noDash||n("line.dash"),o.backoff&&n("line.backoff")},II=function(e,r,a){var i=a("line.shape");i==="spline"&&a("line.smoothing")},FI=xe,J2=function(t,e,r,a,i){i=i||{},a("textposition"),FI.coerceFont(a,"textfont",i.font||r.font,i),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))},Vf=ct,Y0=xe.isArrayOrTypedArray;function $I(t){for(var e=Vf.interpolate(t[0][1],t[1][1],.5),r=2;r<t.length;r++){var a=Vf.interpolate(t[r-1][1],t[r][1],.5);e=Vf.interpolate(e,a,t[r-1][0]/t[r][0])}return e}var ek=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&&!Y0(l)?o=l:s&&!Y0(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=$I(u))}}i("fillcolor",Vf.addOpacity((r.line||{}).color||o||f||a,.5))},q0=xe,NI=Je,HI=Ri,OI=gu,Un=kr,jI=Qp,BI=xu,GI=DI,UI=K2,VI=Q2,Z0=II,WI=J2,XI=ek,YI=xe.coercePattern,qI=function(e,r,a,i){function n(p,d){return q0.coerce(e,r,HI,p,d)}var o=jI(e,r,i,n);if(o||(r.visible=!1),!!r.visible){BI(e,r,i,n),n("xhoverformat"),n("yhoverformat"),n("zorder");var l=GI(e,r,i,n);i.scattermode==="group"&&r.orientation===void 0&&n("orientation","v");var s=!l&&o<OI.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("mode",s),Un.hasMarkers(r)&&UI(e,r,a,i,n,{gradient:!0}),Un.hasLines(r)&&(VI(e,r,a,i,n,{backoff:!0}),Z0(e,r,n),n("connectgaps"),n("line.simplify")),Un.hasText(r)&&(n("texttemplate"),WI(e,r,i,n));var f=[];(Un.hasMarkers(r)||Un.hasText(r))&&(n("cliponaxis"),n("marker.maxdisplayed"),f.push("points")),n("fill",l?l.fillDflt:"none"),r.fill!=="none"&&(XI(e,r,a,n,{moduleHasFillgradient:!0}),Un.hasLines(r)||Z0(e,r,n),YI(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=NI.getComponentMethod("errorbars","supplyDefaults");v(e,r,c||u||a,{axis:"y"}),v(e,r,c||u||a,{axis:"x",inherit:"y"}),q0.coerceSelectionMarkerOpacity(r,n)}},ZI=ri.getAxisGroup,Jp=function(e,r,a,i,n){var o=r.orientation,l=r[{v:"x",h:"y"}[o]+"axis"],s=ZI(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 p=i("offsetgroup")||"",d=v.offsetGroups,h=d[p];r._offsetIndex=0,(n!=="group"||p)&&(h||(h=d[p]={offsetIndex:Object.keys(d).length}),r._offsetIndex=h.offsetIndex)},KI=xe,QI=Jp,JI=Ri,tk=function(e,r){var a,i,n,o=r.scattermode;function l(v){return KI.coerce(i._input,i,JI,v)}if(r.scattermode==="group")for(n=0;n<e.length;n++)i=e[n],i.type==="scatter"&&(a=i._input,QI(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}}}}},eF=xe,tF=np,rF=function(t,e){function r(i,n){return eF.coerce(t,e,tF,i,n)}var a=e.barmode==="group";e.scattermode==="group"&&r("scattergap",a?e.bargap:.2)},aF=ht,rk=xe,iF=rk.dateTime2ms,df=rk.incrementMonth,nF=Xt,oF=nF.ONEAVGMONTH,_u=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(aF(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"],p=iF(v,f)||0,d=[],h=[],m=[],y=i.length,b=0;b<y;b++){var _=i[b],g,x,w;if(l){for(g=Math.round((_-p)/(l*oF)),w=df(p,l*g,f);w>_;)w=df(w,-l,f);for(;w<=_;)w=df(w,l,f);x=df(w,-l,f)}else{for(g=Math.round((_-p)/o),w=p+g*o;w>_;)w-=o;for(;w<=_;)w+=o;x=w-o}d[b]=c?x:u?w:(x+w)/2,h[b]=x,m[b]=w}return{vals:d,starts:h,ends:m}},Dv=Ma.hasColorscale,Pv=fp,K0=kr,ak=function(e,r){K0.hasLines(r)&&Dv(r,"line")&&Pv(e,r,{vals:r.line.color,containerStr:"line"}),K0.hasMarkers(r)&&(Dv(r,"marker")&&Pv(e,r,{vals:r.marker.color,containerStr:"marker"}),Dv(r,"marker.line")&&Pv(e,r,{vals:r.marker.line.color,containerStr:"marker.line"}))},Bt=xe,ik=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;Bt.mergeArray(r.text,e,"tx"),Bt.mergeArray(r.texttemplate,e,"txt"),Bt.mergeArray(r.hovertext,e,"htx"),Bt.mergeArray(r.customdata,e,"data"),Bt.mergeArray(r.textposition,e,"tp"),r.textfont&&(Bt.mergeArrayCastPositive(r.textfont.size,e,"ts"),Bt.mergeArray(r.textfont.color,e,"tc"),Bt.mergeArray(r.textfont.family,e,"tf"),Bt.mergeArray(r.textfont.weight,e,"tw"),Bt.mergeArray(r.textfont.style,e,"ty"),Bt.mergeArray(r.textfont.variant,e,"tv"),Bt.mergeArray(r.textfont.textcase,e,"tC"),Bt.mergeArray(r.textfont.lineposition,e,"tE"),Bt.mergeArray(r.textfont.shadow,e,"tS"));var i=r.marker;if(i){Bt.mergeArrayCastPositive(i.size,e,"ms"),Bt.mergeArrayCastPositive(i.opacity,e,"mo"),Bt.mergeArray(i.symbol,e,"mx"),Bt.mergeArray(i.angle,e,"ma"),Bt.mergeArray(i.standoff,e,"mf"),Bt.mergeArray(i.color,e,"mc");var n=i.line;i.line&&(Bt.mergeArray(n.color,e,"mlc"),Bt.mergeArrayCastPositive(n.width,e,"mlw"));var o=i.gradient;o&&o.type!=="none"&&(Bt.mergeArray(o.type,e,"mgt"),Bt.mergeArray(o.color,e,"mgc"))}},Q0=xe,nk=function(e,r){Q0.isArrayOrTypedArray(r.selectedpoints)&&Q0.tagSelected(e,r)},J0=ht,hh=xe,is=Ct,eb=_u,Ev=Xt.BADNUM,ph=kr,lF=ak,sF=ik,fF=nk;function cF(t,e){var r=t._fullLayout,a=e._xA=is.getFromId(t,e.xaxis||"x","x"),i=e._yA=is.getFromId(t,e.yaxis||"y","y"),n=a.makeCalcdata(e,"x"),o=i.makeCalcdata(e,"y"),l=eb(e,a,"x",n),s=eb(e,i,"y",o),f=l.vals,c=s.vals,u=e._length,v=new Array(u),p=e.ids,d=em(e,r,a,i),h=!1,m,y,b,_,g,x;sk(r,e);var w="x",T="y",A;if(d)hh.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=lk(e,u);ok(t,e,a,i,f,c,M)}var S=!!e.xperiodalignment,L=!!e.yperiodalignment;for(y=0;y<u;y++){var z=v[y]={},$=J0(f[y]),N=J0(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=Ev,h=!0):z.s=0):z[w]=z[T]=Ev,p&&(z.id=String(p[y]))}if(sF(v,e),lF(t,e),fF(v,e),d){for(y=0;y<v.length;)v[y][A]===Ev?v.splice(y,1):y++;if(hh.sort(v,function(E,k){return E[A]-k[A]||E.i-k.i}),h){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 I=v[y-1][A],H=v[y-1].s,D=(v[b].s-H)/(v[b][A]-I);y<b;)v[y].s=H+(v[y][A]-I)*D,y++}}}return v}function ok(t,e,r,a,i,n,o){var l=e._length,s=t._fullLayout,f=r._id,c=a._id,u=s._firstScatter[fk(e)]===e.uid,v=(em(e,s,r,a)||{}).orientation,p=e.fill;r._minDtick=0,a._minDtick=0;var d={padded:!0},h={padded:!0};o&&(d.ppad=h.ppad=o);var m=l<2||i[0]!==i[l-1]||n[0]!==n[l-1];m&&(p==="tozerox"||p==="tonextx"&&(u||v==="h"))?d.tozero=!0:!(e.error_y||{}).visible&&(p==="tonexty"||p==="tozeroy"||!ph.hasMarkers(e)&&!ph.hasText(e))&&(d.padded=!1,d.ppad=0),m&&(p==="tozeroy"||p==="tonexty"&&(u||v==="v"))?h.tozero=!0:(p==="tonextx"||p==="tozerox")&&(h.padded=!1),f&&(e._extremes[f]=is.findExtremes(r,i,d)),c&&(e._extremes[c]=is.findExtremes(a,n,h))}function lk(t,e){if(ph.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)},hh.isArrayOrTypedArray(r.size)){var n={type:"linear"};is.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 sk(t,e){var r=fk(e),a=t._firstScatter;a[r]||(a[r]=e.uid)}function fk(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function em(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 tm={calc:cF,calcMarkerSize:lk,calcAxisExpansion:ok,setFirstScatter:sk,getStackOpts:em},uF=wu,vF=xe.distinctVals;function wu(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=vF(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={}}wu.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};wu.prototype.get=function(e,r,a){var i=this.getLabel(e,r,a);return this.bins[i]||0};wu.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 na=ht,Ai=xe.isArrayOrTypedArray,Do=Xt.BADNUM,dF=Je,ns=Ct,hF=ri.getAxisGroup,Tu=uF;function pF(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&&dF.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 p={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};mh(t,r,a,s,p),mh(t,a,r,l,p)}function mh(t,e,r,a,i){if(a.length){var n,o,l,s,f;switch(gF(r,a),i.mode){case"overlay":zv(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&&bF(t,e,r,o,i),n.length&&zv(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);yF(o),o.length&&xF(t,e,r,o,i),n.length&&zv(t,e,r,n,i);break}mF(a),MF(a,e)}}function mF(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=na(n)?+n:+n.slice(0,-1),l=na(n)?"px":"%",i.cornerradiusvalue=o,i.cornerradiusform=l))}function yF(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=na(n)?+n:+n.slice(0,-1),l=na(n)?"px":"%",e=0;e<t.length;e++)r=t[e],i=r[0].t,i.cornerradiusvalue=o,i.cornerradiusform=l}}function gF(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(Ai(o)){for(a=0;a<Math.min(o.length,i.length);a++)l=f(o[a],0,s),na(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=na(l);for(l=c?l:0,a=0;a<i.length;a++)i[a].b=l,c&&(i[a].hasB=1)}}}function zv(t,e,r,a,i){for(var n=0;n<a.length;n++){var o=a[n],l=new Tu([o],{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});rm(t,e,l,i),i.norm?(uk(l),am(r,l,i)):ck(r,l)}}function bF(t,e,r,a,i){var n=new Tu(a,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});rm(t,e,n,i),kF(n,e),i.norm?(uk(n),am(r,n,i)):ck(r,n)}function xF(t,e,r,a,i){var n=new Tu(a,{posAxis:e,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});rm(t,e,n,i),TF(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!==Do){var u=c.b+c.s===n.get(c.p,s,c.s);u&&(c._outmost=!0)}}i.norm&&am(r,n,i)}function rm(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,p,d,h;if(e._id==="angularaxis")v=u,p=v*(1-(a.groupgap||0)),d=-p/2;else{var m=hF(i,e._id)+s[0][0].trace.orientation;h=i._alignmentOpts[m]||{}}for(var y=0;y<f;y++){var b=s[y],_=b[0].trace;if(e._id!=="angularaxis"){var g=h[_.alignmentgroup]||{},x=Object.keys(g.offsetGroups||{}).length;x?v=u/x:v=c?u/f:u,p=v*(1-(a.groupgap||0)),x?d=((2*_._offsetIndex+1-x)*v-p)/2:d=c?((2*y+1-f)*v-p)/2:-p/2}var w=b[0].t;w.barwidth=p,w.offsetindex=_._offsetIndex||0,w.poffset=d,w.bargroupwidth=u,w.bardelta=l}r.binWidth=s[0][0].t.barwidth/100,_F(r),wF(e,r),e._id==="angularaxis"?tb(e,r):tb(e,r,c)}function _F(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(Ai(s)){for(c=Array.prototype.slice.call(s,0,i.length),a=0;a<c.length;a++)na(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(Ai(u)){var p=Array.prototype.slice.call(u,0,i.length);for(a=0;a<p.length;a++)na(p[a])||(p[a]=v);for(a=p.length;a<i.length;a++)p.push(v);if(l.barwidth=p,s===void 0){for(c=[],a=0;a<i.length;a++)c.push(f+(v-p[a])/2);l.poffset=c}}else u!==void 0&&(l.barwidth=u,s===void 0&&(l.poffset=f+(v-u)/2))}}function wF(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=Ai(l),f=o.barwidth,c=Ai(f),u=0;u<n.length;u++){var v=n[u],p=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)+p/2;v[a]=v.p+d}}function tb(t,e,r){var a=e.traces,i=e.minDiff,n=i/2;ns.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,p,d;for(d=0;d<l.length;d++)u=l[d],v=u.p-n,p=u.p+n,c.push(v,p);if(f.width||f.offset){var h=s.t,m=h.poffset,y=h.barwidth,b=Ai(m),_=Ai(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,p=v+x,c.push(v,p)}}f._extremes[t._id]=ns.findExtremes(t,c,{padded:!1})}}function ck(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],p=l?0:v.b,d=l?s?v.y:v.x:p+v.s;v[a]=d,f.push(d),v.hasB&&f.push(p),(!v.hasB||!v.b)&&(c=!0)}o._extremes[t._id]=ns.findExtremes(t,f,{tozero:c,padded:!0})}}function TF(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!==Do&&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!==Do){var p;l?p=c.s:p=c.s+c.b;var d=e.put(c.p,u,p),h=d+p;c.b=d,c[a]=h,r.norm||(v.push(h),c.hasB&&v.push(d))}r.norm||(o._extremes[t._id]=ns.findExtremes(t,v,{tozero:!0,padded:!0}))}}function uk(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!==Do&&t.put(o.p,i,o.b+o.s)}}function kF(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 Tu([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),s=0;s<i.length;s++){var f=i[s];if(f.p!==Do){var c=l.put(f.p,o,f.b+f.s);c&&(f.b=c)}}}}function am(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 na(t.c2l(w))&&(w<l-o||w>s+o||!na(l))}for(var c=0;c<a.length;c++){for(var u=a[c],v=u[0].t.offsetindex,p=u[0].trace,d=[],h=!1,m=!1,y=0;y<u.length;y++){var b=u[y];if(b.s!==Do){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)&&(h=!0)}}p._extremes[t._id]=ns.findExtremes(t,d,{tozero:h,padded:m})}}function AF(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 MF(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;na(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={},p={},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 h=o[0].t.poffset,m=Ai(h);for(n=0;n<o.length;n++){var y=o[n],b=y[r]-y.w/2;if(na(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?h[n]:h),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,p[T]=T in p?Math.max(p[T],w):w}}}d&&AF(t,v,p,e)}function qo(t){return t._id.charAt(0)}var im={crossTraceCalc:pF,setGroupPositions:mh},rb=tm,ab=im.setGroupPositions;function SF(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};ab(t,r,a,s,u),ab(t,a,r,l,u)}var LF=function(e,r){e._fullLayout.scattermode==="group"&&SF(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,p,d,h,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;p=l[A[0]];var M=new Array(p.length);for(s=0;s<p.length;s++)M[s]=p[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++)Rv(v,f,M[c],s,w,b,g),f++;if(d!==M[c]){for(u=0;u<s;u++)Rv(l[A[u]],c,d,u,w,b,g);M.splice(c,0,d)}c++}for(;c<M.length;c++)Rv(v,f,M[c],s,w,b,g),f++}var S=M.length;for(f=0;f<p.length;f++){for(h=p[f][x]=p[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,h+=v[f].s,v[f][x]=h;if(_)for(m=(_==="fraction"?h:h/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,$=rb.calcMarkerSize(z,z._rawLength),N=Array.isArray($);if($&&w[s]||N){var I=$;for($=new Array(S),f=0;f<S;f++)$[f]=v[f].gap?0:N?I[v[f].i]:I}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;rb.calcAxisExpansion(e,z,a,i,H,D,$),v[0].t.orientation=y.orientation}}}}};function Rv(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=CF(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 CF(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 DF=kt,vk=Xt,bl=vk.BADNUM,dk=vk.LOG_CLIP,ib=dk+.5,nb=dk-.5,Tc=xe,PF=Tc.segmentsIntersect,ob=Tc.constrain,Iv=gu,EF=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,p=r.baseTolerance,d=r.shape,h=d==="linear",m=a.fill&&a.fill!=="none",y=[],b=Iv.minTolerance,_=e.length,g=new Array(_),x=0,w,T,A,M,S,L,z,$,N,I,H,D,E,k,C,P;function F(ce){var He=e[ce];if(!He)return!1;var Be=r.linearized?i.l2p(He.x):i.c2p(He.x),$e=r.linearized?n.l2p(He.y):n.c2p(He.y);if(Be===bl){if(o&&(Be=i.c2p(He.x,!0)),Be===bl)return!1;l&&$e===bl&&(Be*=Math.abs(i._m*f*(i._m>0?ib:nb)/(n._m*s*(n._m>0?ib:nb)))),Be*=1e3}if($e===bl){if(l&&($e=n.c2p(He.y,!0)),$e===bl)return!1;$e*=1e3}return[Be,$e]}function j(ce,He,Be,$e){var Ke=Be-ce,je=$e-He,R=.5-ce,U=.5-He,V=Ke*Ke+je*je,q=Ke*R+je*U;if(q>0&&q<V){var le=R*je-U*Ke;if(le*le<V)return!0}}var G,X;function O(ce,He){var Be=ce[0]/s,$e=ce[1]/f,Ke=Math.max(0,-Be,Be-1,-$e,$e-1);return Ke&&G!==void 0&&j(Be,$e,G,X)&&(Ke=0),Ke&&He&&j(Be,$e,He[0]/s,He[1]/f)&&(Ke=0),(1+Iv.toleranceGrowth*Ke)*p}function Z(ce,He){var Be=ce[0]-He[0],$e=ce[1]-He[1];return Math.sqrt(Be*Be+$e*$e)}var W=Iv.maxScreensAway,Y=-s*W,B=s*(1+W),Q=-f*W,ee=f*(1+W),se=[[Y,Q,B,Q],[B,Q,B,ee],[B,ee,Y,ee],[Y,ee,Y,Q]],oe,fe,pe,ge,be,we;function ye(ce,He){for(var Be=[],$e=0,Ke=0;Ke<4;Ke++){var je=se[Ke],R=PF(ce[0],ce[1],He[0],He[1],je[0],je[1],je[2],je[3]);R&&(!$e||Math.abs(R.x-Be[0][0])>1||Math.abs(R.y-Be[0][1])>1)&&(R=[R.x,R.y],$e&&Z(R,ce)<Z(Be[0],ce)?Be.unshift(R):Be.push(R),$e++)}return Be}function de(ce){if(ce[0]<Y||ce[0]>B||ce[1]<Q||ce[1]>ee)return[ob(ce[0],Y,B),ob(ce[1],Q,ee)]}function Me(ce,He){if(ce[0]===He[0]&&(ce[0]===Y||ce[0]===B)||ce[1]===He[1]&&(ce[1]===Q||ce[1]===ee))return!0}function De(ce,He){var Be=[],$e=de(ce),Ke=de(He);return $e&&Ke&&Me($e,Ke)||($e&&Be.push($e),Ke&&Be.push(Ke)),Be}function ue(ce,He,Be){return function($e,Ke){var je=de($e),R=de(Ke),U=[];if(je&&R&&Me(je,R))return U;je&&U.push(je),R&&U.push(R);var V=2*Tc.constrain(($e[ce]+Ke[ce])/2,He,Be)-((je||$e)[ce]+(R||Ke)[ce]);if(V){var q;je&&R?q=V>0==je[ce]>R[ce]?je:R:q=je||R,q[ce]+=V}return U}}var Te;d==="linear"||d==="spline"?Te=ye:d==="hv"||d==="vh"?Te=De:d==="hvh"?Te=ue(0,Y,B):d==="vhv"&&(Te=ue(1,Q,ee));function Se(ce,He){var Be=He[0]-ce[0],$e=(He[1]-ce[1])/Be,Ke=(ce[1]*He[0]-He[1]*ce[0])/Be;return Ke>0?[$e>0?Y:B,ee]:[$e>0?B:Y,Q]}function J(ce){var He=ce[0],Be=ce[1],$e=He===g[x-1][0],Ke=Be===g[x-1][1];if(!($e&&Ke))if(x>1){var je=He===g[x-2][0],R=Be===g[x-2][1];$e&&(He===Y||He===B)&&je?R?x--:g[x-1]=ce:Ke&&(Be===Q||Be===ee)&&R?je?x--:g[x-1]=ce:g[x++]=ce}else g[x++]=ce}function _e(ce){g[x-1][0]!==ce[0]&&g[x-1][1]!==ce[1]&&J([pe,ge]),J(ce),be=null,pe=ge=0}var re=Tc.isArrayOrTypedArray(u);function Ae(ce){if(ce&&c&&(ce.i=w,ce.d=e,ce.trace=a,ce.marker=re?u[ce.i]:u,ce.backoff=c),G=ce[0]/s,X=ce[1]/f,oe=ce[0]<Y?Y:ce[0]>B?B:0,fe=ce[1]<Q?Q:ce[1]>ee?ee:0,oe||fe){if(!x)g[x++]=[oe||ce[0],fe||ce[1]];else if(be){var He=Te(be,ce);He.length>1&&(_e(He[0]),g[x++]=He[1])}else we=Te(g[x-1],ce)[0],g[x++]=we;var Be=g[x-1];oe&&fe&&(Be[0]!==oe||Be[1]!==fe)?(be&&(pe!==oe&&ge!==fe?J(pe&&ge?Se(be,ce):[pe||oe,ge||fe]):pe&&ge&&J([pe,ge])),J([oe,fe])):pe-oe&&ge-fe&&J([oe||pe,fe||ge]),be=ce,pe=oe,ge=fe}else be&&_e(Te(be,ce)[0]),g[x++]=ce}for(w=0;w<_;w++)if(T=F(w),!!T){for(x=0,be=null,Ae(T),w++;w<_;w++){if(M=F(w),!M){if(v)continue;break}if(!h||!r.simplify){Ae(M);continue}var Le=F(w+1);if(I=Z(M,T),!(!(m&&(x===0||x===_-1))&&I<O(M,Le)*b)){for($=[(M[0]-T[0])/I,(M[1]-T[1])/I],S=T,H=I,D=k=C=0,z=!1,A=M,w++;w<e.length;w++){if(L=Le,Le=F(w+1),!L){if(v)continue;break}if(N=[L[0]-T[0],L[1]-T[1]],P=N[0]*$[1]-N[1]*$[0],k=Math.min(k,P),C=Math.max(C,P),C-k>O(L,Le))break;A=L,E=N[0]*$[0]+N[1]*$[1],E>H?(H=E,M=L,z=!1):E<D&&(D=E,S=L,z=!0)}if(z?(Ae(M),A!==S&&Ae(S)):(S!==T&&Ae(S),A!==M&&Ae(M)),Ae(A),w>=e.length||!L)break;Ae(L),T=L}}be&&J([pe||be[0],ge||be[1]]),y.push(g.slice(0,x))}var K=d.slice(d.length-1);if(c&&K!=="h"&&K!=="v"){for(var ne=!1,ve=-1,me=[],ke=0;ke<y.length;ke++)for(var Pe=0;Pe<y[ke].length-1;Pe++){var Ee=y[ke][Pe],Ne=y[ke][Pe+1],Fe=DF.applyBackoff(Ne,Ee);(Fe[0]!==Ne[0]||Fe[1]!==Ne[1])&&(ne=!0),me[ve+1]||(ve++,me[ve]=[Ee,[Fe[0],Fe[1]]])}return ne?me:y}return y},lb={tonextx:1,tonexty:1,tonext:1},hk=function(e,r,a){var i,n,o,l,s,f={},c=!1,u=-1,v=0,p=-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 lb&&p>=0?s=p:(s=p=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 h={};for(n=0;n<d.length;n++)i=d[n][0].trace,o=i.stackgroup||"",i.visible===!0?(i._nexttrace=null,i.fill in lb&&(l=h[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),h[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return d},ya=ut,zF=Je,os=xe,po=os.ensureSingle,pk=os.identity,Gt=kt,mo=kr,RF=EF,IF=hk,hf=w2.tester,FF=function(e,r,a,i,n,o){var l,s,f=!n,c=!!n&&n.duration>0,u=IF(e,r,a);if(l=i.selectAll("g.trace").data(u,function(p){return p[0].trace.uid}),l.enter().append("g").attr("class",function(p){return"trace scatter trace"+p[0].trace.uid}).style("stroke-miterlimit",2),l.order(),$F(e,l,r),c){o&&(s=o());var v=ya.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(p,d){sb(e,d,r,p,u,this,n)})})}else l.each(function(p,d){sb(e,d,r,p,u,this,n)});f&&l.exit().remove(),i.selectAll("path:not([d])").remove()};function $F(t,e,r){e.each(function(a){var i=po(ya.select(this),"g","fills");Gt.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,pk);l.enter().append("g"),l.exit().each(function(s){n[s]=null}).remove(),l.order().each(function(s){n[s]=po(ya.select(this),"path","js-fill")})})}function sb(t,e,r,a,i,n,o){var l=t._context.staticPlot,s;NF(t,e,r,a,i);var f=!!o&&o.duration>0;function c(ue){return f?ue.transition():ue}var u=r.xaxis,v=r.yaxis,p=a[0].trace,d=p.line,h=ya.select(n),m=po(h,"g","errorbars"),y=po(h,"g","lines"),b=po(h,"g","points"),_=po(h,"g","text");if(zF.getComponentMethod("errorbars","plot")(t,m,r,o),p.visible!==!0)return;c(h).style("opacity",p.opacity);var g,x,w=p.fill.charAt(p.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"]=h;var M="",S=[],L=p._prevtrace,z=null,$=null;L&&(M=L._prevRevpath||"",x=L._nextFill,S=L._ownPolygons,z=L._fillsegments,$=L._fillElement);var N,I,H="",D="",E,k,C,P,F,j,G=[];p._polygons=[];var X=[],O=[],Z=os.noop;if(g=p._ownFill,mo.hasLines(p)||p.fill!=="none"){x&&x.datum(a),["hv","vh","hvh","vhv"].indexOf(d.shape)!==-1?(E=Gt.steps(d.shape),k=Gt.steps(d.shape.split("").reverse().join(""))):d.shape==="spline"?E=k=function(ue){var Te=ue[ue.length-1];return ue.length>1&&ue[0][0]===Te[0]&&ue[0][1]===Te[1]?Gt.smoothclosed(ue.slice(1),d.smoothing):Gt.smoothopen(ue,d.smoothing)}:E=k=function(ue){return"M"+ue.join("L")},C=function(ue){return k(ue.reverse())},O=RF(a,{xaxis:u,yaxis:v,trace:p,connectGaps:p.connectgaps,baseTolerance:Math.max(d.width||1,3)/4,shape:d.shape,backoff:d.backoff,simplify:d.simplify,fill:p.fill}),X=new Array(O.length);var W=0;for(s=0;s<O.length;s++){var Y,B=O[s];!Y||!w?(Y=B.slice(),X[W]=Y,W++):Y.push.apply(Y,B)}p._fillElement=null,p._fillExclusionElement=$,p._fillsegments=X.slice(0,W),X=p._fillsegments,O.length&&(P=O[0][0].slice(),F=O[O.length-1],j=F[F.length-1].slice()),Z=function(ue){return function(Te){if(N=E(Te),I=C(Te),H?w?(H+="L"+N.substr(1),D=I+("L"+D.substr(1))):(H+="Z"+N,D=I+"Z"+D):(H=N,D=I),mo.hasLines(p)){var Se=ya.select(this);if(Se.datum(a),ue)c(Se.style("opacity",0).attr("d",N).call(Gt.lineGroupStyle)).style("opacity",1);else{var J=c(Se);J.attr("d",N),Gt.singleLineStyle(a,J)}}}}}var Q=y.selectAll(".js-line").data(O);c(Q.exit()).style("opacity",0).remove(),Q.each(Z(!1)),Q.enter().append("path").classed("js-line",!0).style("vector-effect",l?"none":"non-scaling-stroke").call(Gt.lineGroupStyle).each(Z(!0)),Gt.setClipUrl(Q,r.layerClipId,t);function ee(ue){c(ue).attr("d","M0,0Z")}var se=function(){var ue=new Array(X.length);for(s=0;s<X.length;s++)ue[s]=hf(X[s]);return ue},oe=function(ue){var Te,Se;if(!ue||ue.length===0)for(Te=new Array(X.length),Se=0;Se<X.length;Se++){var J=X[Se][0].slice(),_e=X[Se][X[Se].length-1].slice();J[T]=_e[T]=A;var re=[_e,J],Ae=re.concat(X[Se]);Te[Se]=hf(Ae)}else{for(Te=new Array(ue.length-1+X.length),Se=0;Se<ue.length-1;Se++)Te[Se]=hf(ue[Se]);var Le=ue[ue.length-1].slice();for(Le.reverse(),Se=0;Se<X.length;Se++)Te[ue.length-1+Se]=hf(X[Se].concat(Le))}return Te};O.length?(g?(g.datum(a),P&&j&&(w?(P[T]=j[T]=A,c(g).attr("d","M"+j+"L"+P+"L"+H.substr(1)).call(Gt.singleFillStyle,t),G=oe(null)):(c(g).attr("d",H+"Z").call(Gt.singleFillStyle,t),G=se())),p._polygons=G,p._fillElement=g):x&&(p.fill.substr(0,6)==="tonext"&&H&&M?(p.fill==="tonext"?(c(x).attr("d",H+"Z"+M+"Z").call(Gt.singleFillStyle,t),G=se(),p._polygons=G.concat(S)):(c(x).attr("d",H+"L"+M.substr(1)+"Z").call(Gt.singleFillStyle,t),G=oe(z),p._polygons=G),p._fillElement=x):ee(x)),p._prevRevpath=D):(g?ee(g):x&&ee(x),p._prevRevpath=null),p._ownPolygons=G;function fe(ue){return ue.filter(function(Te){return!Te.gap&&Te.vis})}function pe(ue){return ue.filter(function(Te){return Te.vis})}function ge(ue){return ue.filter(function(Te){return!Te.gap})}function be(ue){return ue.id}function we(ue){if(ue.ids)return be}function ye(){return!1}function de(ue,Te,Se){var J,_e,re,Ae=Se[0].trace,Le=mo.hasMarkers(Ae),K=mo.hasText(Ae),ne=we(Ae),ve=ye,me=ye;if(Le||K){var ke=pk,Pe=Ae.stackgroup,Ee=Pe&&t._fullLayout._scatterStackOpts[u._id+v._id][Pe].stackgaps==="infer zero";Ae.marker.maxdisplayed||Ae._needsCull?ke=Ee?pe:fe:Pe&&!Ee&&(ke=ge),Le&&(ve=ke),K&&(me=ke)}_e=ue.selectAll("path.point"),J=_e.data(ve,ne);var Ne=J.enter().append("path").classed("point",!0);f&&Ne.call(Gt.pointStyle,Ae,t).call(Gt.translatePoints,u,v).style("opacity",0).transition().style("opacity",1),J.order();var Fe;Le&&(Fe=Gt.makePointStyleFns(Ae)),J.each(function(ce){var He=ya.select(this),Be=c(He);re=Gt.translatePoint(ce,Be,u,v),re?(Gt.singlePointStyle(ce,Be,Ae,Fe,t),r.layerClipId&&Gt.hideOutsideRangePoint(ce,Be,u,v,Ae.xcalendar,Ae.ycalendar),Ae.customdata&&He.classed("plotly-customdata",ce.data!==null&&ce.data!==void 0)):Be.remove()}),f?J.exit().transition().style("opacity",0).remove():J.exit().remove(),_e=Te.selectAll("g"),J=_e.data(me,ne),J.enter().append("g").classed("textpoint",!0).append("text"),J.order(),J.each(function(ce){var He=ya.select(this),Be=c(He.select("text"));re=Gt.translatePoint(ce,Be,u,v),re?r.layerClipId&&Gt.hideOutsideRangePoint(ce,He,u,v,Ae.xcalendar,Ae.ycalendar):He.remove()}),J.selectAll("text").call(Gt.textPointStyle,Ae,t).each(function(ce){var He=u.c2p(ce.x),Be=v.c2p(ce.y);ya.select(this).selectAll("tspan.line").each(function(){c(ya.select(this)).attr({x:He,y:Be})})}),J.exit().remove()}b.datum(a),_.datum(a),de(b,_,a);var Me=p.cliponaxis===!1,De=Me?null:r.layerClipId;Gt.setClipUrl(b,De,t),Gt.setClipUrl(_,De,t)}function NF(t,e,r,a,i){var n=r.xaxis,o=r.yaxis,l=ya.extent(os.simpleMap(n.range,n.r2c)),s=ya.extent(os.simpleMap(o.range,o.r2c)),f=a[0].trace;if(mo.hasMarkers(f)){var c=f.marker.maxdisplayed;if(c!==0){var u=a.filter(function(h){return h.x>=l[0]&&h.x<=l[1]&&h.y>=s[0]&&h.y<=s[1]}),v=Math.ceil(u.length/c),p=0;i.forEach(function(h,m){var y=h[0].trace;mo.hasMarkers(y)&&y.marker.maxdisplayed>0&&m<e&&p++});var d=Math.round(p*v/3+Math.floor(p/3)*v/7.1);a.forEach(function(h){delete h.vis}),u.forEach(function(h,m){Math.round((m+d)%v)===0&&(h.vis=!0)})}}}var As={container:"marker",min:"cmin",max:"cmax"},pf=Ct,mk=function(e,r,a){var i={},n={_fullLayout:a},o=pf.getFromTrace(n,r,"x"),l=pf.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=pf.tickText(o,o.c2l(s),!0).text,i.yLabel=pf.tickText(l,l.c2l(f),!0).text,i},Fv=ut,Po=kt,HF=Je;function OF(t){var e=Fv.select(t).selectAll("g.trace.scatter");e.style("opacity",function(r){return r[0].trace.opacity}),e.selectAll("g.points").each(function(r){var a=Fv.select(this),i=r.trace||r[0].trace;yk(a,i,t)}),e.selectAll("g.text").each(function(r){var a=Fv.select(this),i=r.trace||r[0].trace;gk(a,i,t)}),e.selectAll("g.trace path.js-line").call(Po.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(Po.fillGroupStyle,t,!1),HF.getComponentMethod("errorbars","style")(e)}function yk(t,e,r){Po.pointStyle(t.selectAll("path.point"),e,r)}function gk(t,e,r){Po.textPointStyle(t.selectAll("text"),e,r)}function jF(t,e,r){var a=e[0].trace;a.selectedpoints?(Po.selectedPointStyle(r.selectAll("path.point"),a),Po.selectedTextStyle(r.selectAll("text"),a)):(yk(r,a,t),gk(r,a,t))}var fb={style:OF,styleOnSelect:jF},Vn=ct,BF=kr,bk=function(e,r){var a,i;if(e.mode==="lines")return a=e.line.color,a&&Vn.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&&Vn.opacity(n)?n:o&&Vn.opacity(o)&&(r.mlw||((e.marker||{}).line||{}).width)?o:"",i?Vn.opacity(i)<.3?Vn.addOpacity(i,.3):i:(a=(e.line||{}).color,a&&Vn.opacity(a)&&BF.hasLines(e)&&e.line.width?a:e.fillcolor)},Wf=xe,cb=wa,GF=Je,UF=bk,$v=ct,VF=Wf.fillText,WF=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||"",p=o.mode.indexOf("markers")!==-1?3:.5,d=!!o.xperiodalignment,h=!!o.yperiodalignment;if(v.indexOf("points")!==-1){var m=function(D){if(d){var E=l.c2p(D.xStart),k=l.c2p(D.xEnd);return f>=Math.min(E,k)&&f<=Math.max(E,k)?0:1/0}var C=Math.max(3,D.mrc||0),P=1-1/C,F=Math.abs(l.c2p(D.x)-f);return F<C?P*F/C:F-C+P},y=function(D){if(h){var E=s.c2p(D.yStart),k=s.c2p(D.yEnd);return c>=Math.min(E,k)&&c<=Math.max(E,k)?0:1/0}var C=Math.max(3,D.mrc||0),P=1-1/C,F=Math.abs(s.c2p(D.y)-c);return F<C?P*F/C:F-C+P},b=function(D){var E=Math.max(p,D.mrc||0),k=l.c2p(D.x)-f,C=s.c2p(D.y)-c;return Math.max(Math.sqrt(k*k+C*C)-E,1-p/E)},_=cb.getDistanceFunction(i,m,y,b);if(cb.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 Wf.extendFlat(e,{color:UF(o,g),x0:x-T,x1:x+T,xLabelVal:S,y0:w-T,y1:w+T,yLabelVal:L,spikeDistance:b(g),hovertemplate:o.hovertemplate}),VF(g,o,e),GF.getComponentMethod("errorbars","hoverInfo")(g,o,e),[e]}}function z(D){if(!D)return!1;var E=D.node();try{var k=new DOMPoint(u[0],u[1]);return E.isPointInFill(k)}catch{var C=E.ownerSVGElement.createSVGPoint();return C.x=u[0],C.y=u[1],E.isPointInFill(C)}}function $(D){var E,k=[],C=1/0,P=-1/0,F=1/0,j=-1/0,G;for(E=0;E<D.length;E++){var X=D[E];X.contains(u)&&(k.push(X),F=Math.min(F,X.ymin),j=Math.max(j,X.ymax))}if(k.length===0)return null;F=Math.max(F,0),j=Math.min(j,s._length),G=(F+j)/2;var O,Z,W,Y,B,Q,ee;for(E=0;E<k.length;E++)for(Z=k[E].pts,O=1;O<Z.length;O++)Q=Z[O-1][1],ee=Z[O][1],Q>G!=ee>=G&&(Y=Z[O-1][0],B=Z[O][0],ee-Q&&(W=Y+(B-Y)*(G-Q)/(ee-Q),C=Math.min(C,W),P=Math.max(P,W)));return C=Math.max(C,0),P=Math.min(P,l._length),{x0:C,x1:P,y0:G,y1:G}}if(v.indexOf("fills")!==-1&&o._fillElement){var N=z(o._fillElement)&&!z(o._fillExclusionElement);if(N){var I=$(o._polygons);I===null&&(I={x0:u[0],x1:u[0],y0:u[1],y1:u[1]});var H=$v.defaultLine;return $v.opacity(o.fillcolor)?H=o.fillcolor:$v.opacity((o.line||{}).color)&&(H=o.line.color),Wf.extendFlat(e,{distance:e.maxHoverDistance,x0:I.x0,x1:I.x1,y0:I.y0,y1:I.y1,color:H,hovertemplate:!1}),delete e.index,o.text&&!Wf.isArrayOrTypedArray(o.text)?e.text=String(o.text):e.text=o.name,[e]}}},ub=kr,XF=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s,f,c,u,v=!ub.hasMarkers(l)&&!ub.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},Qt={},Nv,vb;function YF(){return vb||(vb=1,Nv={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(" ")}}),Nv}var Hv,db;function qF(){if(db)return Hv;db=1;var t=Je.traceIs,e=eT;Hv=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",p=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 h=i(u),m=[];for(c=0;c<l.length;c++){var y=l[c];!t(y,"box-violin")||(y[f+"axis"]||f)!==s||(y[h]!==void 0?m.push(y[h][0]):y.name!==void 0?m.push(y.name):m.push("text"),y[v]!==p&&(p=void 0))}o.type=e(m,p,d)}else if(u.type==="splom"){var b=u.dimensions,_=b[u._axesDim[s]];_.visible&&(o.type=e(_.values,p,d))}else o.type=e(u[f]||[u[f+"0"]],p,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 Hv}var ZF=Wt.isTypedArraySpec;function KF(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 QF=function(e,r,a,i){if(r.type==="category"){var n=e.categoryarray,o=Array.isArray(n)&&n.length>0||ZF(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=KF(r,i).sort(),s==="category ascending"?r._initialCategories=f:s==="category descending"&&(r._initialCategories=f.reverse()))}},hb=Ta.mix,JF=Tr,e$=xe,t$=function(e,r,a,i){i=i||{};var n=i.dfltColor;function o(T,A){return e$.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=hb(n,i.bgColor,i.blend||JF.lightFraction).toRgbString(),u=o("gridcolor",c),v=o("gridwidth"),p=o("griddash"),d=a("showgrid",i.showGrid||!!u||!!v||!!p);if(d||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var h=hb(r.gridcolor,i.bgColor,67).toRgbString(),m=o("minor.gridcolor",h),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)}},pb=ht,r$=Je,El=xe,a$=Lt,i$=ja,yh=Oa,mb=Rw,yb=Iw,n$=Nw,o$=Hw,l$=QF,s$=t$,f$=mT,gb=dp,Xf=gr.WEEKDAY_PATTERN,c$=gr.HOUR_PATTERN,xk=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 p=r$.getComponentMethod("calendars","handleDefaults");p(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"),gb(r,n),f$(e,r,a,i),l$(e,r,a,i),i.noHover||(u!=="category"&&a("hoverformat"),i.noUnifiedhovertitle||a("unifiedhovertitle.text"));var h=a("color"),m=h!==yh.color.dflt?h:l.color,y=s.label||n._dfltTitle[o];if(o$(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}}),mb(e,r,a,u);var b=i.hasMinor;if(b&&(a$.newContainer(r,"minor"),mb(e,r,a,u,{isMinor:!0})),n$(e,r,a,u,i),yb(e,r,a,i),b){var _=i.isMinor;i.isMinor=!0,yb(e,r,a,i),i.isMinor=_}s$(e,r,a,{dfltColor:h,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:b,attributes:yh}),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(i$(e,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:u$}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var w=0;w<r.rangebreaks.length;w++)if(r.rangebreaks[w].pattern===Xf){r._hasDayOfWeekBreaks=!0;break}if(gb(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 u$(t,e,r){function a(v,p){return El.coerce(t,e,yh.rangebreaks,v,p)}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=bb(n[l]),s){o=Xf;break}}var f=a("pattern",o);if(f===Xf)for(l=0;l<2;l++)s=bb(n[l]),s&&(e.bounds[l]=n[l]=s-1);if(f)for(l=0;l<2;l++)switch(s=n[l],f){case Xf:if(!pb(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 c$:if(!pb(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 v$={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function bb(t){if(typeof t=="string")return v$[t.substr(0,3).toLowerCase()]}var d$=ht,mf=xe,_k=function(e,r,a,i){var n=i.counterAxes||[],o=i.overlayableAxes||[],l=i.letter,s=i.grid,f=i.overlayingDomain,c,u,v,p,d,h;s&&(u=s._domains[l][s._axisMap[r._id]],c=s._anchors[r._id],u&&(v=s[l+"side"].split(" ")[0],p=s.domain[l][v==="right"||v==="top"?1:0])),u=u||[0,1],c=c||(d$(e.position)?"free":n[0]||"free"),v=v||(l==="x"?"bottom":"left"),p=p||0,d=0,h=!1;var m=mf.coerce(e,r,{anchor:{valType:"enumerated",values:["free"].concat(n),dflt:c}},"anchor"),y=mf.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&&(p=y==="left"?f[0]:f[1],h=r.automargin?r.automargin:!0,d=y==="left"?-3:3),a("shift",d)}a("position",p)}a("automargin",h);var _=!1;if(o.length&&(_=mf.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),mf.noneOrAll(e.domain,r.domain,u),r.tickmode==="sync"&&(r.tickmode="auto")}return a("layer"),r},Ov,xb;function h$(){if(xb)return Ov;xb=1;var t=xe,e=ct,r=la.isUnifiedHover,a=IT,i=Lt,n=ms,o=Oa,l=qF(),s=xk,f=ri,c=_k,u=Ut,v=u.id2name,p=u.name2id,d=gr.AX_ID_PATTERN,h=Je,m=h.traceIs,y=h.getComponentMethod;function b(_,g,x){Array.isArray(_[g])?_[g].push(x):_[g]=[x]}return Ov=function(g,x,w){var T=x.autotypenumbers,A={},M={},S={},L={},z={},$={},N={},I={},H={},D={},E,k;for(E=0;E<w.length;E++){var C=w[E];if(m(C,"cartesian")){var P;if(C.xaxis)P=v(C.xaxis),b(A,P,C);else if(C.xaxes)for(k=0;k<C.xaxes.length;k++)b(A,v(C.xaxes[k]),C);var F;if(C.yaxis)F=v(C.yaxis),b(A,F,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"?(P&&(M[P]=!0),F&&(N[F]=!0)):F&&(S[F]=!0):C.type==="image"?(F&&(I[F]=!0),P&&(I[P]=!0)):(F&&(z[F]=!0,$[F]=!0),(!m(C,"carpet")||C.type==="carpet"&&!C._cheater)&&P&&(L[P]=!0)),C.type==="carpet"&&C._cheater&&P&&(M[P]=!0),m(C,"2dMap")&&(H[P]=!0,H[F]=!0),m(C,"oriented")){var j=C.orientation==="h"?F:P;D[j]=!0}}}var G=x._subplots,X=G.xaxis,O=G.yaxis,Z=t.simpleMap(X,v),W=t.simpleMap(O,v),Y=Z.concat(W),B=e.background;X.length&&O.length&&(B=t.coerce(g,x,n,"plot_bgcolor"));var Q=e.combine(B,x.paper_bgcolor),ee,se,oe,fe,pe;function ge(){var R=A[ee]||[];pe._traceIndices=R.map(function(U){return U.index}),pe._annIndices=[],pe._shapeIndices=[],pe._selectionIndices=[],pe._imgIndices=[],pe._subplotsWith=[],pe._counterAxes=[],pe._name=pe._attr=ee,pe._id=se}function be(R,U){return t.coerce(fe,pe,o,R,U)}function we(R,U){return t.coerce2(fe,pe,o,R,U)}function ye(R){return R==="x"?O:X}function de(R,U){for(var V=R==="x"?Z:W,q=[],le=0;le<V.length;le++){var ae=V[le];ae!==U&&!(g[ae]||{}).overlaying&&q.push(p(ae))}return q}var Me={x:ye("x"),y:ye("y")},De=Me.x.concat(Me.y),ue={},Te=[];function Se(){var R=fe.matches;d.test(R)&&De.indexOf(R)===-1&&(ue[R]=fe.type,Te=Object.keys(ue))}var J=a(g,x),_e=r(J);for(E=0;E<Y.length;E++){ee=Y[E],se=p(ee),oe=ee.charAt(0),t.isPlainObject(g[ee])||(g[ee]={}),fe=g[ee],pe=i.newContainer(x,ee,oe+"axis"),ge();var re=oe==="x"&&!L[ee]&&M[ee]||oe==="y"&&!z[ee]&&S[ee],Ae=oe==="y"&&(!$[ee]&&N[ee]||I[ee]),Le={hasMinor:!0,letter:oe,font:x.font,outerTicks:H[ee],showGrid:!D[ee],data:A[ee]||[],bgColor:Q,calendar:x.calendar,automargin:!0,visibleDflt:re,reverseDflt:Ae,autotypenumbersDflt:T,splomStash:((x._splomAxes||{})[oe]||{})[se],noAutotickangles:oe==="y"};be("uirevision",x.uirevision),l(fe,pe,be,Le),s(fe,pe,be,Le,x);var K=_e&&oe===J.charAt(0),ne=we("spikecolor",_e?pe.color:void 0),ve=we("spikethickness",_e?1.5:void 0),me=we("spikedash",_e?"dot":void 0),ke=we("spikemode",_e?"across":void 0),Pe=we("spikesnap"),Ee=be("showspikes",!!K||!!ne||!!ve||!!me||!!ke||!!Pe);Ee||(delete pe.spikecolor,delete pe.spikethickness,delete pe.spikedash,delete pe.spikemode,delete pe.spikesnap);var Ne=v(fe.overlaying),Fe=[0,1];if(x[Ne]!==void 0){var ce=v(x[Ne].anchor);x[ce]!==void 0&&(Fe=x[ce].domain)}c(fe,pe,be,{letter:oe,counterAxes:Me[oe],overlayableAxes:de(oe,ee),grid:x.grid,overlayingDomain:Fe}),be("title.standoff"),Se(),pe._input=fe}for(E=0;E<Te.length;){se=Te[E++],ee=v(se),oe=ee.charAt(0),t.isPlainObject(g[ee])||(g[ee]={}),fe=g[ee],pe=i.newContainer(x,ee,oe+"axis"),ge();var He={letter:oe,font:x.font,outerTicks:H[ee],showGrid:!D[ee],data:[],bgColor:Q,calendar:x.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((x._splomAxes||{})[oe]||{})[se]};be("uirevision",x.uirevision),pe.type=ue[se]||"linear",s(fe,pe,be,He,x),c(fe,pe,be,{letter:oe,counterAxes:Me[oe],overlayableAxes:de(oe,ee),grid:x.grid}),be("fixedrange"),be("modebardisable"),Se(),pe._input=fe}var Be=y("rangeslider","handleDefaults"),$e=y("rangeselector","handleDefaults");for(E=0;E<Z.length;E++)ee=Z[E],fe=g[ee],pe=x[ee],Be(g,x,ee),pe.type==="date"&&$e(fe,pe,x,W,pe.calendar),be("fixedrange"),be("modebardisable");for(E=0;E<W.length;E++){ee=W[E],fe=g[ee],pe=x[ee];var Ke=x[v(pe.anchor)],je=y("rangeslider","isVisible")(Ke);be("fixedrange",je),be("modebardisable")}f.handleDefaults(g,x,{axIds:De.concat(Te).sort(u.idSort),axHasImage:I})},Ov}var jv,_b;function p$(){if(_b)return jv;_b=1;var t=ut,e=Je,r=xe,a=kt,i=Ct;return jv=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,$=!!x.yr1,N=[];if(z){var I=r.simpleMap(x.xr0,A.r2l),H=r.simpleMap(x.xr1,A.r2l),D=I[1]-I[0],E=H[1]-H[0];N[0]=(I[0]*(1-w)+w*H[0]-I[0])/(I[1]-I[0])*S,N[2]=S*(1-w+w*E/D),A.range[0]=A.l2r(I[0]*(1-w)+w*H[0]),A.range[1]=A.l2r(I[1]*(1-w)+w*H[1])}else N[0]=0,N[2]=S;if($){var k=r.simpleMap(x.yr0,M.r2l),C=r.simpleMap(x.yr1,M.r2l),P=k[1]-k[0],F=C[1]-C[0];N[1]=(k[1]*(1-w)+w*C[1]-k[1])/(k[0]-k[1])*L,N[3]=L*(1-w+w*F/P),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 N[1]=0,N[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/N[2]:1,G=$?L/N[3]:1,X=z?N[0]:0,O=$?N[1]:0,Z=z?N[0]/N[2]*S:0,W=$?N[1]/N[3]*L:0,Y=A._offset-Z,B=M._offset-W;T.clipRect.call(a.setTranslate,X,O).call(a.setScale,1/j,1/G),T.plot.call(a.setTranslate,Y,B).call(a.setScale,j,G),a.setPointGroupScale(T.zoomScalePts,1/j,1/G),a.setTextPointsScale(T.zoomScaleTxt,1/j,1/G)}var p;f&&(p=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 p&&p(),e.call("relayout",o,x).then(function(){for(var S=0;S<l.length;S++)u(l[S].plotinfo)})}function h(){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,h()});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()},jv}var ku=ut,wb=Je,bn=xe,m$=Kt,y$=kt,Tb=gs.getModuleCalcData,_i=Ut,_a=gr,g$=Vo,At=bn.ensureSingle;function yf(t,e,r){return bn.ensureSingle(t,e,r,function(a){a.datum(r)})}var xn=_a.zindexSeparator;Qt.name="cartesian";Qt.attr=["xaxis","yaxis"];Qt.idRoot=["x","y"];Qt.idRegex=_a.idRegex;Qt.attrRegex=_a.attrRegex;Qt.attributes=YF();Qt.layoutAttributes=Oa;Qt.supplyLayoutDefaults=h$();Qt.transitionAxes=p$();Qt.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[_i.id2name(c)]||{}).anchor,_a.idRegex.y.test(u)||(u="y"),n.push(c+u),o.push(c+u),s[u]||(s[u]=1,bn.pushUnique(i,u)));for(f=0;f<i.length;f++)u=i[f],s[u]||(c=(t[_i.id2name(u)]||{}).anchor,_a.idRegex.x.test(c)||(c="x"),n.push(c+u),o.push(c+u),l[c]||(l[c]=1,bn.pushUnique(a,c)));if(!o.length){c="",u="";for(var p in t)if(_a.attrRegex.test(p)){var d=p.charAt(0);d==="x"?(!c||+p.substr(5)<+c.substr(5))&&(c=p):(!u||+p.substr(5)<+u.substr(5))&&(u=p)}c=c?_i.name2id(c):"x",u=u?_i.name2id(u):"y",a.push(c),i.push(u),n.push(c+u)}};Qt.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 p=v.id;if(p.indexOf(xn)!==-1)continue;p+=xn+(f+1),v=bn.extendFlat({},v,{id:p,plot:i._cartesianlayer.selectAll(".subplot").select("."+p)})}for(var d=[],h,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)&&(h&&h[0].trace.xaxis+h[0].trace.yaxis===u&&["tonextx","tonexty","tonext"].indexOf(b.fill)!==-1&&d.indexOf(h)===-1&&d.push(h),d.push(y)),h=y)}wk(t,v,d,r,a)}}};function wk(t,e,r,a,i){for(var n=_a.traceLayerClasses,o=t._fullLayout,l=o._zindices,s=o._modules,f,c,u,v=[],p=[],d=0;d<l.length;d++)for(var h=l[d],m=0;m<s.length;m++){f=s[m];var y=f.name,b=wb.modules[y].categories;if(b.svg){var _=f.layerName||y+"layer",g=_+(d?Number(d)+1:""),x=f.plot;c=Tb(r,x,h),u=c[0],r=c[1],u.length&&v.push({i:n.indexOf(_),zindex:d,className:g,plotMethod:x,cdModule:u}),b.zoomScale&&p.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=ku.select(this),S=A.className;A.plotMethod(t,e,A.cdModule,M,a,i),_a.clipOnAxisFalseQuery.indexOf("."+S)===-1&&y$.setClipUrl(M,e.layerClipId,t)}),o._has("scattergl")&&(f=wb.getModule("scattergl"),u=Tb(r,f)[0],f.plot(t,e,u)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(_a.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),p.length)){var T=e.plot.selectAll(p.join(",")).selectAll(".trace");e.zoomScalePts=T.selectAll("path.point"),e.zoomScaleTxt=T.selectAll(".textpoint")}}Qt.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=_i.listIds({_fullLayout:a});for(s=0;s<v.length;s++){var p=v[s];e[_i.id2name(p)]||a._infolayer.selectAll(".g-"+p+"title").remove()}}var d=a._has&&a._has("cartesian"),h=e._has&&e._has("cartesian");if(d&&!h)kk(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(xn)===-1&&!n[m]){var y="."+m+",."+m+"-x,."+m+"-y";a._cartesianlayer.selectAll(y).remove(),Ak(m,a)}}};Qt.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(bn.sorterAsc);s.length||(s=[0]),e._zindices=s;var f=b$(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 p=[];for(a=0;a<c;a++)p[a]=f[a].slice(),p[a][0]+=xn+(v+1);u=u.concat(p)}var d=e._cartesianlayer.selectAll(".subplot").data(u,String);d.enter().append("g").attr("class",function(h){return"subplot "+h[0]}),d.order(),d.exit().call(kk,e),d.each(function(h){var m=h[0],y=m.indexOf(xn),b=y!==-1,_=b?m.slice(0,y):m,g=e._plots[m];g||(g=bn.extendFlat({},e._plots[_]),g&&(g.id=m,e._plots[m]=g,e._subplots.cartesian.push(m))),g&&(g.plotgroup=ku.select(this),Tk(t,g),b||(g.draglayer=At(e._draggers,"g",m)))})};Qt.rangePlot=function(t,e,r){Tk(t,e),wk(t,e,r),m$.style(t)};function b$(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 p=f._mainAxis,d=c._mainAxis,h=p._id+d._id,m=e._plots[h];s.overlays=[],h!==l&&m?(s.mainplot=h,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+=xn+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 Tk(t,e){var r=t._fullLayout,a=e.plotgroup,i=e.id,n=i.indexOf(xn),o=n!==-1,l=_a.layerValue2layerClass[e.xaxis.layer],s=_a.layerValue2layerClass[e.yaxis.layer],f=r._hasOnlyLargeSploms,c=r._zindices.length>1,u=e.mainplotinfo;if(!e.mainplot||c)if(f)e.xlines=At(a,"path","xlines-above"),e.ylines=At(a,"path","ylines-above"),e.xaxislayer=At(a,"g","xaxislayer-above"),e.yaxislayer=At(a,"g","yaxislayer-above");else{if(!o){var v=At(a,"g","layer-subplot");e.shapelayer=At(v,"g","shapelayer"),e.imagelayer=At(v,"g","imagelayer"),u&&c?(e.minorGridlayer=u.minorGridlayer,e.gridlayer=u.gridlayer,e.zerolinelayer=u.zerolinelayer):(e.minorGridlayer=At(a,"g","minor-gridlayer"),e.gridlayer=At(a,"g","gridlayer"),e.zerolinelayer=At(a,"g","zerolinelayer"));var p=At(a,"g","layer-between");e.shapelayerBetween=At(p,"g","shapelayer"),e.imagelayerBetween=At(p,"g","imagelayer"),At(a,"path","xlines-below"),At(a,"path","ylines-below"),e.overlinesBelow=At(a,"g","overlines-below"),At(a,"g","xaxislayer-below"),At(a,"g","yaxislayer-below"),e.overaxesBelow=At(a,"g","overaxes-below")}e.overplot=At(a,"g","overplot"),e.plot=At(e.overplot,"g",i),u&&c?e.zerolinelayerAbove=u.zerolinelayerAbove:e.zerolinelayerAbove=At(a,"g","zerolinelayer-above"),o||(e.xlines=At(a,"path","xlines-above"),e.ylines=At(a,"path","ylines-above"),e.overlinesAbove=At(a,"g","overlines-above"),At(a,"g","xaxislayer-above"),At(a,"g","yaxislayer-above"),e.overaxesAbove=At(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,h=i+"-x",m=i+"-y";e.minorGridlayer=u.minorGridlayer,e.gridlayer=u.gridlayer,e.zerolinelayer=u.zerolinelayer,e.zerolinelayerAbove=u.zerolinelayerAbove,At(u.overlinesBelow,"path",h),At(u.overlinesBelow,"path",m),At(u.overaxesBelow,"g",h),At(u.overaxesBelow,"g",m),e.plot=At(u.overplot,"g",i),At(u.overlinesAbove,"path",h),At(u.overlinesAbove,"path",m),At(u.overaxesAbove,"g",h),At(u.overaxesAbove,"g",m),e.xlines=d.select(".overlines-"+l).select("."+h),e.ylines=d.select(".overlines-"+s).select("."+m),e.xaxislayer=d.select(".overaxes-"+l).select("."+h),e.yaxislayer=d.select(".overaxes-"+s).select("."+m)}o||(f||(yf(e.minorGridlayer,"g",e.xaxis._id),yf(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map(function(y){return y[0]}).sort(_i.idSort),yf(e.gridlayer,"g",e.xaxis._id),yf(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map(function(y){return y[0]}).sort(_i.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0))}function kk(t,e){if(t){var r={};t.each(function(s){var f=s[0],c=ku.select(this);c.remove(),Ak(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 Ak(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}Qt.toSVG=function(t){var e=t._fullLayout._glimages,r=ku.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:g$.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}a.each(i)};Qt.updateFx=xp.updateFx;var gf=kr,x$={hasLines:gf.hasLines,hasMarkers:gf.hasMarkers,hasText:gf.hasText,isBubble:gf.isBubble,attributes:Ri,layoutAttributes:np,supplyDefaults:qI,crossTraceDefaults:tk,supplyLayoutDefaults:rF,calc:tm.calc,crossTraceCalc:LF,arraysToCalcdata:ik,plot:FF,colorbar:As,formatLabels:mk,style:fb.style,styleOnSelect:fb.styleOnSelect,hoverPoints:WF,selectPoints:XF,animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Qt,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(" ")}},_$=ut,w$=ct,kb=F2,nm=xe,T$=nm.strScale,k$=nm.strRotate,A$=nm.strTranslate,M$=function(e,r,a){var i=e.node(),n=kb[a.arrowhead||0],o=kb[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,p,d,h,m;if(i.nodeName==="line"){p={x:+e.attr("x1"),y:+e.attr("y1")},d={x:+e.attr("x2"),y:+e.attr("y2")};var y=p.x-d.x,b=p.y-d.y;if(h=Math.atan2(b,y),m=h+Math.PI,u&&v&&u+v>Math.sqrt(y*y+b*b)){N();return}if(u){if(u*u>y*y+b*b){N();return}var _=u*Math.cos(h),g=u*Math.sin(h);d.x+=_,d.y+=g,e.attr({x2:d.x,y2:d.y})}if(v){if(v*v>y*y+b*b){N();return}var x=v*Math.cos(h),w=v*Math.sin(h);p.x-=x,p.y-=w,e.attr({x1:p.x,y1:p.y})}}else if(i.nodeName==="path"){var T=i.getTotalLength(),A="";if(T<u+v){N();return}var M=i.getPointAtLength(0),S=i.getPointAtLength(.1);h=Math.atan2(M.y-S.y,M.x-S.x),p=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 $=A?v+u:u;A+=T-$+"px,"+T+"px",e.style("stroke-dasharray",A)}function N(){e.style("stroke-dasharray","0px,100px")}function I(H,D,E,k){H.path&&(H.noRotate&&(E=0),_$.select(i.parentNode).append("path").attr({class:e.attr("class"),d:H.path,transform:A$(D.x,D.y)+k$(E*180/Math.PI)+T$(k)}).style({fill:w$.rgb(a.arrowcolor),"stroke-width":0}))}f&&I(o,p,h,s),c&&I(n,d,m,l)},Ab=ut,Bv=Je,S$=Kt,hi=xe,Gv=hi.strTranslate,ls=Ct,Wi=ct,Wa=kt,Mb=wa,Uv=or,Vv=Pi,xl=Ba,L$=Lt.arrayEditor,C$=M$,om={draw:D$,drawOne:Mk,drawRaw:Sk};function D$(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&Mk(t,r);return S$.previousPromises(t)}function Mk(t,e){var r=t._fullLayout,a=r.annotations[e]||{},i=ls.getFromId(t,a.xref),n=ls.getFromId(t,a.yref);i&&i.setScale(),n&&n.setScale(),Sk(t,a,e,!1,i,n)}function ui(t,e,r,a,i){var n=i[r],o=i[r+"ref"],l=r.indexOf("y")!==-1,s=ls.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 Sk(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=L$(t.layout,c,e),v=u.modifyBase,p=u.modifyItem,d=u.getUpdateObj;o._infolayer.selectAll("."+f+'[data-index="'+r+'"]').remove();var h="clip"+o._uid+"_ann"+r;if(!e._input||e.visible===!1){Ab.selectAll("#"+h).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(Vv,"pointer").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",w(Ab.event))});e.hovertext&&T.on("mouseover",function(){var k=e.hoverlabel,C=k.font,P=this.getBoundingClientRect(),F=t.getBoundingClientRect();Mb.loneHover({x0:P.left-F.left,x1:P.right-F.left,y:(P.top+P.bottom)/2-F.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(){Mb.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(Wi.stroke,e.bordercolor).call(Wi.fill,e.bgcolor),z=e.width||e.height,$=o._topclips.selectAll("#"+h).data(z?[0]:[]);$.enter().append("clipPath").classed("annclip",!0).attr("id",h).append("rect"),$.exit().remove();var N=e.font,I=o._meta?hi.templateString(e.text,o._meta):e.text,H=T.append("text").classed("annotation-text",!0).text(I);function D(k){return k.call(Wa.font,N).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),Uv.convertToTspans(k,t,E),k}function E(){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 P=T.select(".annotation-text-math-group"),F=!P.empty(),j=Wa.bBox((F?P:H).node()),G=j.width,X=j.height,O=e.width||G,Z=e.height||X,W=Math.round(O+2*S),Y=Math.round(Z+2*S);function B($e,Ke){return Ke==="auto"&&($e<1/3?Ke="left":$e>2/3?Ke="right":Ke="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ke]}for(var Q=!1,ee=["x","y"],se=0;se<ee.length;se++){var oe=ee[se],fe=e[oe+"ref"]||oe,pe=e["a"+oe+"ref"],ge={x:i,y:n}[oe],be=(y+(oe==="x"?0:-90))*Math.PI/180,we=W*Math.cos(be),ye=Y*Math.sin(be),de=Math.abs(we)+Math.abs(ye),Me=e[oe+"anchor"],De=e[oe+"shift"]*(oe==="x"?1:-1),ue=m[oe],Te,Se,J,_e,re,Ae=ls.getRefType(fe);if(ge&&Ae!=="domain"){var Le=ge.r2fraction(e[oe]);(Le<0||Le>1)&&(pe===fe?(Le=ge.r2fraction(e["a"+oe]),(Le<0||Le>1)&&(Q=!0)):Q=!0),Te=ge._offset+ge.r2p(e[oe]),_e=.5}else{var K=Ae==="domain";oe==="x"?(J=e[oe],Te=K?ge._offset+ge._length*J:Te=l.l+l.w*J):(J=1-e[oe],Te=K?ge._offset+ge._length*J:Te=l.t+l.h*J),_e=e.showarrow?.5:J}if(e.showarrow){ue.head=Te;var ne=e["a"+oe];if(re=we*B(.5,e.xanchor)-ye*B(.5,e.yanchor),pe===fe){var ve=ls.getRefType(pe);ve==="domain"?(oe==="y"&&(ne=1-ne),ue.tail=ge._offset+ge._length*ne):ve==="paper"?oe==="y"?(ne=1-ne,ue.tail=l.t+l.h*ne):ue.tail=l.l+l.w*ne:ue.tail=ge._offset+ge.r2p(ne),Se=re}else ue.tail=Te+ne,Se=re+ne;ue.text=ue.tail+re;var me=o[oe==="x"?"width":"height"];if(fe==="paper"&&(ue.head=hi.constrain(ue.head,1,me-1)),pe==="pixel"){var ke=-Math.max(ue.tail-3,ue.text),Pe=Math.min(ue.tail+3,ue.text)-me;ke>0?(ue.tail+=ke,ue.text+=ke):Pe>0&&(ue.tail-=Pe,ue.text-=Pe)}ue.tail+=De,ue.head+=De}else re=de*B(_e,Me),Se=re,ue.text=Te+re;ue.text+=De,re+=De,Se+=De,e["_"+oe+"padplus"]=de/2+Se,e["_"+oe+"padminus"]=de/2-Se,e["_"+oe+"size"]=de,e["_"+oe+"shift"]=re}if(Q){T.remove();return}var Ee=0,Ne=0;if(e.align!=="left"&&(Ee=(O-G)*(e.align==="center"?.5:1)),e.valign!=="top"&&(Ne=(Z-X)*(e.valign==="middle"?.5:1)),F)P.select("svg").attr({x:S+Ee-1,y:S+Ne}).call(Wa.setClipUrl,z?h:null,t);else{var Fe=S+Ne-j.top,ce=S+Ee-j.left;H.call(Uv.positionText,ce,Fe).call(Wa.setClipUrl,z?h:null,t)}$.select("rect").call(Wa.setRect,S,S,O,Z),L.call(Wa.setRect,A/2,A/2,W-A,Y-A),T.call(Wa.setTranslate,Math.round(m.x.text-W/2),Math.round(m.y.text-Y/2)),_.attr({transform:"rotate("+y+","+m.x.text+","+m.y.text+")"});var He=function($e,Ke){b.selectAll(".annotation-arrow-g").remove();var je=m.x.head,R=m.y.head,U=m.x.tail+$e,V=m.y.tail+Ke,q=m.x.text+$e,le=m.y.text+Ke,ae=hi.rotationXYMatrix(y,q,le),Re=hi.apply2DTransform(ae),Ce=hi.apply2DTransform2(ae),he=+L.attr("width"),ie=+L.attr("height"),Ie=q-.5*he,Oe=Ie+he,We=le-.5*ie,Ge=We+ie,rt=[[Ie,We,Ie,Ge],[Ie,Ge,Oe,Ge],[Oe,Ge,Oe,We],[Oe,We,Ie,We]].map(Ce);if(!rt.reduce(function(ft,mt){return ft^!!hi.segmentsIntersect(je,R,je+1e6,R+1e6,mt[0],mt[1],mt[2],mt[3])},!1)){rt.forEach(function(ft){var mt=hi.segmentsIntersect(U,V,je,R,ft[0],ft[1],ft[2],ft[3]);mt&&(U=mt.x,V=mt.y)});var at=e.arrowwidth,Ye=e.arrowcolor,wt=e.arrowside,tt=b.append("g").style({opacity:Wi.opacity(Ye)}).classed("annotation-arrow-g",!0),qe=tt.append("path").attr("d","M"+U+","+V+"L"+je+","+R).style("stroke-width",at+"px").call(Wi.stroke,Wi.rgb(Ye));if(C$(qe,wt,e),s.annotationPosition&&qe.node().parentNode&&!a){var vt=je,pt=R;if(e.standoff){var lt=Math.sqrt(Math.pow(je-U,2)+Math.pow(R-V,2));vt+=e.standoff*(U-je)/lt,pt+=e.standoff*(V-R)/lt}var nt=tt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(U-vt)+","+(V-pt),transform:Gv(vt,pt)}).style("stroke-width",at+6+"px").call(Wi.stroke,"rgba(0,0,0,0)").call(Wi.fill,"rgba(0,0,0,0)"),Ze,et;xl.init({element:nt.node(),gd:t,prepFn:function(){var ft=Wa.getTranslate(T);Ze=ft.x,et=ft.y,i&&i.autorange&&v(i._name+".autorange",!0),n&&n.autorange&&v(n._name+".autorange",!0)},moveFn:function(ft,mt){var Qe=Re(Ze,et),bt=Qe[0]+ft,Mt=Qe[1]+mt;T.call(Wa.setTranslate,bt,Mt),p("x",ui(i,ft,"x",l,e)),p("y",ui(n,mt,"y",l,e)),e.axref===e.xref&&p("ax",ui(i,ft,"ax",l,e)),e.ayref===e.yref&&p("ay",ui(n,mt,"ay",l,e)),tt.attr("transform",Gv(ft,mt)),_.attr({transform:"rotate("+y+","+bt+","+Mt+")"})},doneFn:function(){Bv.call("_guiRelayout",t,d());var ft=document.querySelector(".js-notes-box-panel");ft&&ft.redraw(ft.selectedObj)}})}}};if(e.showarrow&&He(0,0),g){var Be;xl.init({element:T.node(),gd:t,prepFn:function(){Be=_.attr("transform")},moveFn:function($e,Ke){var je="pointer";if(e.showarrow)e.axref===e.xref?p("ax",ui(i,$e,"ax",l,e)):p("ax",e.ax+$e),e.ayref===e.yref?p("ay",ui(n,Ke,"ay",l.w,e)):p("ay",e.ay+Ke),He($e,Ke);else{if(a)return;var R,U;if(i)R=ui(i,$e,"x",l,e);else{var V=e._xsize/l.w,q=e.x+(e._xshift-e.xshift)/l.w-V/2;R=xl.align(q+$e/l.w,V,0,1,e.xanchor)}if(n)U=ui(n,Ke,"y",l,e);else{var le=e._ysize/l.h,ae=e.y-(e._yshift+e.yshift)/l.h-le/2;U=xl.align(ae-Ke/l.h,le,0,1,e.yanchor)}p("x",R),p("y",U),(!i||!n)&&(je=xl.getCursor(i?.5:R,n?.5:U,e.xanchor,e.yanchor))}_.attr({transform:Gv($e,Ke)+Be}),Vv(T,je)},clickFn:function($e,Ke){e.captureevents&&t.emit("plotly_clickannotation",w(Ke))},doneFn:function(){Vv(T),Bv.call("_guiRelayout",t,d());var $e=document.querySelector(".js-notes-box-panel");$e&&$e.redraw($e.selectedObj)}})}}s.annotationText?H.call(Uv.makeEditable,{delegate:T,gd:t}).call(D).on("edit",function(k){e.text=k,this.call(D),p("text",k),i&&i.autorange&&v(i._name+".autorange",!0),n&&n.autorange&&v(n._name+".autorange",!0),Bv.call("_guiRelayout",t,d())}):H.call(D)}var Sb=xe,P$=Je,Lb=Lt.arrayEditor,E$={hasClickToShow:z$,onClick:R$};function z$(t,e){var r=Lk(t,e);return r.on.length>0||r.explicitOff.length>0}function R$(t,e){var r=Lk(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=Lb(t.layout,"annotations",o[a[l]]),s.modifyItem("visible",!0),Sb.extendFlat(n,s.getUpdateObj());for(l=0;l<i.length;l++)s=Lb(t.layout,"annotations",o[i[l]]),s.modifyItem("visible",!1),Sb.extendFlat(n,s.getUpdateObj());return P$.call("update",t,{},n)}}function Lk(t,e){var r=t._fullLayout.annotations,a=[],i=[],n=[],o=(e||[]).length,l,s,f,c,u,v,p,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,p=u.yaxis,v._id===f.xref&&p._id===f.yref&&v.d2r(u.x)===Cb(f._xclick,v)&&p.d2r(u.y)===Cb(f._yclick,p)){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 Cb(t,e){return e.type==="log"?e.l2r(t):e.d2r(t)}var Wv=xe,Wn=ct,Ck=function(e,r,a,i){i("opacity");var n=i("bgcolor"),o=i("bordercolor"),l=Wn.opacity(o);i("borderpad");var s=i("borderwidth"),f=i("showarrow");i("text",f?" ":a._dfltTitle.annotation),i("textangle"),Wv.coerceFont(i,"font",a.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),f){var u=i("arrowside"),v,p;u.indexOf("end")!==-1&&(v=i("arrowhead"),p=i("arrowsize")),u.indexOf("start")!==-1&&(i("startarrowhead",v),i("startarrowsize",p)),i("arrowcolor",l?r.bordercolor:Wn.defaultLine),i("arrowwidth",(l&&s||1)*2),i("standoff"),i("startstandoff")}var d=i("hovertext"),h=a.hoverlabel||{};if(d){var m=i("hoverlabel.bgcolor",h.bgcolor||(Wn.opacity(n)?Wn.rgb(n):Wn.defaultLine)),y=i("hoverlabel.bordercolor",h.bordercolor||Wn.contrast(m)),b=Wv.extendFlat({},h.font);b.color||(b.color=y),Wv.coerceFont(i,"hoverlabel.font",b)}i("captureevents",!!d)},Xv=xe,Xi=Ct,I$=ja,F$=Ck,$$=ws,N$=function(e,r){I$(e,r,{name:"annotations",handleItemDefaults:H$})};function H$(t,e,r){function a(_,g){return Xv.coerce(t,e,$$,_,g)}var i=a("visible"),n=a("clicktoshow");if(i||n){F$(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=Xi.coerceRef(t,e,f,u,"","paper");if(v!=="paper"){var p=Xi.getFromId(f,v);p._annIndices.push(e._index)}if(Xi.coercePosition(e,f,a,v,u,.5),o){var d="a"+u,h=Xi.coerceRef(t,e,f,d,"pixel",["pixel","paper"]);h!=="pixel"&&h!==v&&(h=e[d]="pixel");var m=h==="pixel"?s[c]:.4;Xi.coercePosition(e,f,a,h,d,m)}a(u+"anchor"),a(u+"shift")}if(Xv.noneOrAll(t,e,["x","y"]),o&&Xv.noneOrAll(t,e,["ax","ay"]),n){var y=a("xclick"),b=a("yclick");e._xclick=y===void 0?e.x:Xi.cleanPosition(y,f,e.xref),e._yclick=b===void 0?e.y:Xi.cleanPosition(b,f,e.yref)}}}var gh=xe,on=Ct,O$=om.draw,j$=function(e){var r=e._fullLayout,a=gh.filterVisible(r.annotations);if(a.length&&e._fullData.length)return gh.syncOrAsync([O$,B$],e)};function B$(t){var e=t._fullLayout;gh.filterVisible(e.annotations).forEach(function(r){var a=on.getFromId(t,r.xref),i=on.getFromId(t,r.yref),n=on.getRefType(r.xref),o=on.getRefType(r.yref);r._extremes={},n==="range"&&Db(r,a),o==="range"&&Db(r,i)})}function Db(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,p=u-c,d=3*t.startarrowsize*t.arrowwidth||0,h=d+c,m=d-c,y;if(l===o){var b=on.findExtremes(e,[e.r2c(i)],{ppadplus:v,ppadminus:p}),_=on.findExtremes(e,[e.r2c(n)],{ppadplus:Math.max(s,h),ppadminus:Math.max(f,m)});y={min:[b.min[0],_.min[0]],max:[b.max[0],_.max[0]]}}else h=n?h+n:h,m=n?m-n:m,y=on.findExtremes(e,[e.r2c(i)],{ppadplus:Math.max(s,v,h),ppadminus:Math.max(f,p,m)});t._extremes[r]=y}var G$=ht,U$=Bh,V$=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(p){var d=f[p],h=null;n?h=U$(d,r.range):h=Math.pow(10,d),G$(h)||(h=null),i(c+p,h)}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)},Yv=om,Pb=E$,W$={moduleType:"component",name:"annotations",layoutAttributes:ws,supplyLayoutDefaults:N$,includeBasePlot:bu("annotations"),calcAutorange:j$,draw:Yv.draw,drawOne:Yv.drawOne,drawRaw:Yv.drawRaw,hasClickToShow:Pb.hasClickToShow,onClick:Pb.onClick,convertCoords:V$},Pt=ws,X$=Na.overrideAll,Y$=Lt.templatedArray,bh=X$(Y$("annotation",{visible:Pt.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:Pt.xanchor,xshift:Pt.xshift,yanchor:Pt.yanchor,yshift:Pt.yshift,text:Pt.text,textangle:Pt.textangle,font:Pt.font,width:Pt.width,height:Pt.height,opacity:Pt.opacity,align:Pt.align,valign:Pt.valign,bgcolor:Pt.bgcolor,bordercolor:Pt.bordercolor,borderpad:Pt.borderpad,borderwidth:Pt.borderwidth,showarrow:Pt.showarrow,arrowcolor:Pt.arrowcolor,arrowhead:Pt.arrowhead,startarrowhead:Pt.startarrowhead,arrowside:Pt.arrowside,arrowsize:Pt.arrowsize,startarrowsize:Pt.startarrowsize,arrowwidth:Pt.arrowwidth,standoff:Pt.standoff,startstandoff:Pt.startstandoff,hovertext:Pt.hovertext,hoverlabel:Pt.hoverlabel,captureevents:Pt.captureevents}),"calc","from-root"),qv=xe,q$=Ct,Z$=ja,K$=Ck,Q$=bh,J$=function(e,r,a){Z$(e,r,{name:"annotations",handleItemDefaults:eN,fullLayout:a.fullLayout})};function eN(t,e,r,a){function i(l,s){return qv.coerce(t,e,Q$,l,s)}function n(l){var s=l+"axis",f={_fullLayout:{}};return f._fullLayout[s]=r[s],q$.coercePosition(e,f,i,l,l,.5)}var o=i("visible");o&&(K$(t,e,a.fullLayout,i),n("x"),n("y"),n("z"),qv.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),qv.noneOrAll(t,e,["ax","ay"])))}var Eb=xe,zb=Ct,tN=function(e){for(var r=e.fullSceneLayout,a=r.annotations,i=0;i<a.length;i++)rN(a[i],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function rN(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={},Eb.extendFlat(t._xa,n),zb.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={},Eb.extendFlat(t._ya,n),zb.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 Zv(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 aN(t,e){var r=Zv(t.projection,Zv(t.view,Zv(t.model,[e[0],e[1],e[2],1])));return r}var iN=aN,nN=om.drawRaw,oN=iN,lN=["x","y","z"],sN=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=lN[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=oN(e.glplot.cameraParams,[r.xaxis.r2l(o.x)*a[0],r.yaxis.r2l(o.y)*a[1],r.zaxis.r2l(o.z)*a[2]]),nN(e.graphDiv,o,n,e.id,o._xa,o._ya))}},fN=Je,Rb=xe,cN={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:bh}}},layoutAttributes:bh,handleDefaults:J$,includeBasePlot:uN,convert:tN,draw:sN};function uN(t,e){var r=fN.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&&(Rb.pushUnique(e._basePlotModules,r),Rb.pushUnique(e._subplots.gl3d,o))}}var Ib=ws,Fb=fr,$b=Ri.line,vN=$r.dash,ua=Rt.extendFlat,dN=Lt.templatedArray,Nb=yu,Xn=oa,hN=cr.shapeTexttemplateAttrs,pN=qh,Dk=dN("shape",{visible:ua({},Xn.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:ua({},Xn.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:ua({},Xn.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:ua({},Xn.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:Fb({editType:"calc+arraydraw",description:["Sets this legend group's title font."].join(" ")}),editType:"calc+arraydraw"},legendrank:ua({},Xn.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:ua({},Xn.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:ua({},Ib.xref,{description:["Sets the shape's x coordinate axis.",Nb.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:ua({},Ib.yref,{description:["Sets the shape's y coordinate axis.",Nb.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:ua({},$b.color,{editType:"arraydraw"}),width:ua({},$b.width,{editType:"calc+arraydraw"}),dash:ua({},vN,{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:hN({},{keys:Object.keys(pN)}),font:Fb({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=xe,Yn=Ct,mN=ja,yN=Dk,Hb=zi,gN=function(e,r){mN(e,r,{name:"shapes",handleItemDefaults:xN})};function bN(t,e){return t?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}function xN(t,e,r){function a(k,C){return _l.coerce(t,e,yN,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"),p=["x","y"],d=0;d<2;d++){var h=p[d],m=h+"anchor",y=h==="x"?u:v,b={_fullLayout:r},_,g,x,w=Yn.coerceRef(t,e,b,h,void 0,"paper"),T=Yn.getRefType(w);if(T==="range"?(_=Yn.getFromId(b,w),_._shapeIndices.push(e._index),x=Hb.rangeToShapePosition(_),g=Hb.shapePositionToRange(_),(_.type==="category"||_.type==="multicategory")&&(a(h+"0shift"),a(h+"1shift"))):g=x=_l.identity,f){var A=.25,M=.75,S=h+"0",L=h+"1",z=t[S],$=t[L];t[S]=g(t[S],!0),t[L]=g(t[L],!0),y==="pixel"?(a(S,0),a(L,10)):(Yn.coercePosition(e,b,a,w,S,A),Yn.coercePosition(e,b,a,w,L,M)),e[S]=x(e[S]),e[L]=x(e[L]),t[S]=z,t[L]=$}if(y==="pixel"){var N=t[m];t[m]=g(t[m],!0),Yn.coercePosition(e,b,a,w,m,.25),e[m]=x(e[m]),t[m]=N}}f&&_l.noneOrAll(t,e,["x0","x1","y0","y1"]);var I=s==="line",H,D;if(f&&(H=a("label.texttemplate")),H||(D=a("label.text")),D||H){a("label.textangle");var E=a("label.textposition",I?"middle":"middle center");a("label.xanchor"),a("label.yanchor",bN(I,E)),a("label.padding"),_l.coerceFont(a,"label.font",r.font)}}}var _N=ct,Ob=xe;function wN(t,e){return t?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}var TN=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"),Ob.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",_N.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",wN(o,f)),a("newshape.label.padding"),Ob.coerceFont(a,"newshape.label.font",r.font)}a("activeshape.fillcolor"),a("activeshape.opacity")},xh=xe,qn=Ct,Eo=fu,Pk=zi,kN=function(e){var r=e._fullLayout,a=xh.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=jb(o,n,Eo.paramIsX),l&&(n._extremes[o._id]=qn.findExtremes(o,l,AN(n)))),n.yref!=="paper"&&f!=="domain"&&(o=qn.getFromId(e,n.yref),l=jb(o,n,Eo.paramIsY),l&&(n._extremes[o._id]=qn.findExtremes(o,l,MN(n))))}};function AN(t){return Ek(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function MN(t){return Ek(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function Ek(t,e,r,a,i,n){var o=t/2,l=n;if(e==="pixel"){var s=i?Pk.extractPathCoords(i,n?Eo.paramIsY:Eo.paramIsX):[r,a],f=xh.aggNums(Math.max,null,s),c=xh.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 jb(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,p=e.path.match(Eo.segmentRE),d,h,m,y,b;for(t.type==="date"&&(f=Pk.decodeDate(f)),d=0;d<p.length;d++)h=p[d],m=r[h.charAt(0)].drawn,m!==void 0&&(y=p[d].substr(1).match(Eo.paramRE),!(!y||y.length<m)&&(b=f(y[m]),b<u&&(u=b),b>v&&(v=b)));if(v>=u)return[u,v]}}var Bb=Rp,SN={moduleType:"component",name:"shapes",layoutAttributes:Dk,supplyLayoutDefaults:gN,supplyDrawNewShapeDefaults:TN,includeBasePlot:bu("shapes"),calcAutorange:kN,draw:Bb.draw,drawOne:Bb.drawOne},Gb=gr,LN=Lt.templatedArray,Ub=yu,zk=LN("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",Gb.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",Ub.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",Gb.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",Ub.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"}),CN=xe,Kv=Ct,DN=ja,PN=zk,EN="images",zN=function(e,r){var a={name:EN,handleItemDefaults:RN};DN(e,r,a)};function RN(t,e,r){function a(v,p){return CN.coerce(t,e,PN,v,p)}var i=a("source"),n=a("visible",!!i);if(!n)return e;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var o={_fullLayout:r},l=["x","y"],s=0;s<2;s++){var f=l[s],c=Kv.coerceRef(t,e,o,f,"paper",void 0);if(c!=="paper"){var u=Kv.getFromId(o,c);u._imgIndices.push(e._index)}Kv.coercePosition(e,o,a,c,f,0)}return e}var Vb=ut,IN=kt,Zn=Ct,Wb=Ut,FN=Vo,$N=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=Wb.ref2id(s.xref)+Wb.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=Vb.select(this);if(this._imgSrc!==g.source)if(x.attr("xmlns",FN.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=Vb.select(this),w=Zn.getFromId(e,g.xref),T=Zn.getFromId(e,g.yref),A=Zn.getRefType(g.xref)==="domain",M=Zn.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 $=L*c.x[g.xanchor].offset,N=z*c.y[g.yanchor].offset,I=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+=$,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+=N,g.sizing){case"fill":I+=" slice";break;case"stretch":I="none";break}x.attr({x:H,y:D,width:L,height:z,preserveAspectRatio:I,opacity:g.opacity});var E=w&&Zn.getRefType(g.xref)!=="domain"?w._id:"",k=T&&Zn.getRefType(g.yref)!=="domain"?T._id:"",C=E+k;IN.setClipUrl(x,C?"clip"+r._uid+C:null,e)}function p(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 h=r._imageLowerLayer.selectAll("image").data(n,p),m=r._imageUpperLayer.selectAll("image").data(a,p);h.enter().append("image"),m.enter().append("image"),h.exit().remove(),m.exit().remove(),h.each(function(g){u.bind(this)(g),v.bind(this)(g)}),m.each(function(g){u.bind(this)(g),v.bind(this)(g)}),h.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]||[],p);_.enter().append("image"),_.exit().remove(),_.each(function(g){u.bind(this)(g),v.bind(this)(g)}),_.sort(d)}}},Xb=ht,NN=Bh,HN=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],p=f["size"+s],d=null,h=null;if(n){d=NN(v,r.range);var m=p/Math.pow(10,d)/2;h=2*Math.log(m+Math.sqrt(1+m*m))/Math.LN10}else d=Math.pow(10,v),h=d*(Math.pow(10,p/2)-Math.pow(10,-p/2));Xb(d)?Xb(h)||(h=null):(d=null,h=null),i(c+s,d),i(c+"size"+s,h)}}},ON={moduleType:"component",name:"images",layoutAttributes:zk,supplyLayoutDefaults:zN,includeBasePlot:bu("images"),draw:$N,convertCoords:HN},lm={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:"▼"}},jN=fr,BN=Tr,GN=Rt.extendFlat,UN=Na.overrideAll,VN=Zh,Rk=Lt.templatedArray,WN=Rk("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(" ")}}),Ik=UN(Rk("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:WN,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:GN(VN({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:jN({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:BN.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"),Yf=xe,Fk=ja,$k=Ik,XN=lm,YN=XN.name,qN=$k.buttons,ZN=function(e,r){var a={name:YN,handleItemDefaults:KN};Fk(e,r,a)};function KN(t,e,r){function a(o,l){return Yf.coerce(t,e,$k,o,l)}var i=Fk(t,e,{name:"buttons",handleItemDefaults:QN}),n=a("visible",i.length>0);n&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Yf.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Yf.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function QN(t,e){function r(i,n){return Yf.coerce(t,e,qN,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 JN=Nt,ga=ut,Yb=ct,wo=kt,kc=xe;function Nt(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})}Nt.barWidth=2;Nt.barLength=20;Nt.barRadius=2;Nt.barPad=1;Nt.barColor="#808BA4";Nt.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",p=u==="left",d=u==="right",h=u==="up",m=s,y=c,b,_,g,x;!v&&!p&&!d&&!h&&(this.position.direction="down",v=!0);var w=v||h;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,p?(_=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=Nt.barLength+2*Nt.barPad,M=Nt.barWidth+2*Nt.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(Yb.fill,Nt.barColor),T?(this.hbar=z.attr({rx:Nt.barRadius,ry:Nt.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 $=c>y,N=Nt.barWidth+2*Nt.barPad,I=Nt.barLength+2*Nt.barPad,H=l+s,D=f;H+N>n&&(H=n-N);var E=this.container.selectAll("rect.scrollbar-vertical").data($?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-vertical",!0).call(Yb.fill,Nt.barColor),$?(this.vbar=E.attr({rx:Nt.barRadius,ry:Nt.barRadius,x:H,y:D,width:N,height:I}),this._vbarYMin=D+I/2,this._vbarTranslateMax=y-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var k=this.id,C=b-.5,P=$?_+N+.5:_+.5,F=g-.5,j=T?x+M+.5:x+.5,G=i._topdefs.selectAll("#"+k).data(T||$?[0]:[]);if(G.exit().remove(),G.enter().append("clipPath").attr("id",k).append("rect"),T||$?(this._clipRect=G.select("rect").attr({x:Math.floor(C),y:Math.floor(F),width:Math.ceil(P)-Math.floor(C),height:Math.ceil(j)-Math.floor(F)}),this.container.call(wo.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(wo.setClipUrl,null),delete this._clipRect),T||$){var X=ga.behavior.drag().on("dragstart",function(){ga.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=ga.behavior.drag().on("dragstart",function(){ga.event.sourceEvent.preventDefault(),ga.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(O),$&&this.vbar.on(".drag",null).call(O)}this.setTranslate(r,a)};Nt.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(wo.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)};Nt.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=ga.event.dx),this.vbar&&(r-=ga.event.dy),this.setTranslate(e,r)};Nt.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=ga.event.deltaY),this.vbar&&(r+=ga.event.deltaY),this.setTranslate(e,r)};Nt.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,i=a+this._hbarTranslateMax,n=kc.constrain(ga.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=kc.constrain(ga.event.y,s,f),u=(c-s)/(f-s),v=this.position.h-this._box.h;r=u*v}this.setTranslate(e,r)};Nt.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=kc.constrain(e||0,0,a),r=kc.constrain(r||0,0,i),this.translateX=e,this.translateY=r,this.container.call(wo.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(wo.setTranslate,e+n*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(wo.setTranslate,e,r+o*this._vbarTranslateMax)}};var zo=ut,ss=Kt,fs=ct,Ro=kt,Ur=xe,Ac=or,e4=Lt.arrayEditor,Nk=Sr.LINE_SPACING,ot=lm,t4=JN,r4=function(e){var r=e._fullLayout,a=Ur.filterVisible(r[ot.name]);function i(v){ss.autoMargin(e,Gk(v))}var n=r._menulayer.selectAll("g."+ot.containerClassName).data(a.length>0?[0]:[]);if(n.enter().append("g").classed(ot.containerClassName,!0).style("cursor","pointer"),n.exit().each(function(){zo.select(this).selectAll("g."+ot.headerGroupClassName).each(i)}).remove(),a.length!==0){var o=n.selectAll("g."+ot.headerGroupClassName).data(a,a4);o.enter().append("g").classed(ot.headerGroupClassName,!0);for(var l=Ur.ensureSingle(n,"g",ot.dropdownButtonGroupClassName,function(v){v.style("pointer-events","all")}),s=0;s<a.length;s++){var f=a[s];f4(e,f)}var c="updatemenus"+r._uid,u=new t4(e,l,c);o.enter().size()&&(l.node().parentNode.appendChild(l.node()),l.call(wh)),o.exit().each(function(v){l.call(wh),i(v)}).remove(),o.each(function(v){var p=zo.select(this),d=v.type==="dropdown"?l:null;ss.manageCommandObserver(e,v,v.buttons,function(h){_h(e,v,v.buttons[h.index],p,d,u,h.index,!0)}),v.type==="dropdown"?(Ok(e,p,l,u,v),Hk(l,v)&&cs(e,p,l,u,v)):cs(e,p,null,null,v)})}};function a4(t){return t._index}function i4(t){return+t.attr(ot.menuIndexAttrName)==-1}function Hk(t,e){return+t.attr(ot.menuIndexAttrName)===e._index}function _h(t,e,r,a,i,n,o,l){e.active=o,e4(t.layout,ot.name,e).applyUpdate("active",o),e.type==="buttons"?cs(t,a,null,null,e):e.type==="dropdown"&&(i.attr(ot.menuIndexAttrName,"-1"),Ok(t,a,i,n,e),l||cs(t,a,i,n,e))}function Ok(t,e,r,a,i){var n=Ur.ensureSingle(e,"g",ot.headerClassName,function(v){v.style("pointer-events","all")}),o=i._dims,l=i.active,s=i.buttons[l]||ot.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(sm,i,s,t).call(Uk,i,f,c);var u=Ur.ensureSingle(e,"text",ot.headerArrowClassName,function(v){v.attr("text-anchor","end").call(Ro.font,i.font).text(ot.arrowSymbol[i.direction])});u.attr({x:o.headerWidth-ot.arrowOffsetX+i.pad.l,y:o.headerHeight/2+ot.textOffsetY+i.pad.t}),n.on("click",function(){r.call(wh,String(Hk(r,i)?-1:i._index)),cs(t,e,r,a,i)}),n.on("mouseover",function(){n.call(jk)}),n.on("mouseout",function(){n.call(Bk,i)}),Ro.setTranslate(e,o.lx,o.ly)}function cs(t,e,r,a,i){r||(r=e,r.attr("pointer-events","all"));var n=!i4(r)||i.type==="buttons"?i.buttons:[],o=i.type==="dropdown"?ot.dropdownButtonClassName:ot.buttonClassName,l=r.selectAll("g."+o).data(Ur.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,p=["up","down"].indexOf(i.direction)!==-1;i.type==="dropdown"&&(p?u=v.headerHeight+ot.gapButtonHeader:c=v.headerWidth+ot.gapButtonHeader),i.type==="dropdown"&&i.direction==="up"&&(u=-ot.gapButtonHeader+ot.gapButton-v.openHeight),i.type==="dropdown"&&i.direction==="left"&&(c=-ot.gapButtonHeader+ot.gapButton-v.openWidth);var d={x:v.lx+c+i.pad.l,y:v.ly+u+i.pad.t,yPad:ot.gapButton,xPad:ot.gapButton,index:0},h={l:d.x+i.borderwidth,t:d.y+i.borderwidth};l.each(function(m,y){var b=zo.select(this);b.call(sm,i,m,t).call(Uk,i,d),b.on("click",function(){zo.event.defaultPrevented||(m.execute&&(m.args2&&i.active===y?(_h(t,i,m,e,r,a,-1),ss.executeAPICommand(t,m.method,m.args2)):(_h(t,i,m,e,r,a,y),ss.executeAPICommand(t,m.method,m.args))),t.emit("plotly_buttonclicked",{menu:i,button:m,active:i.active}))}),b.on("mouseover",function(){b.call(jk)}),b.on("mouseout",function(){b.call(Bk,i),l.call(qb,i)})}),l.call(qb,i),p?(h.w=Math.max(v.openWidth,v.headerWidth),h.h=d.y-h.t):(h.w=d.x-h.l,h.h=Math.max(v.openHeight,v.headerHeight)),h.direction=i.direction,a&&(l.size()?n4(t,e,r,a,i,h):o4(a))}function n4(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]+ot.gapButton;else for(c=0,v=0;v<f;v++)c+=s.widths[v]+ot.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 o4(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 sm(t,e,r,a){t.call(l4,e).call(s4,e,r,a)}function l4(t,e){var r=Ur.ensureSingle(t,"rect",ot.itemRectClassName,function(a){a.attr({rx:ot.rx,ry:ot.ry,"shape-rendering":"crispEdges"})});r.call(fs.stroke,e.bordercolor).call(fs.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function s4(t,e,r,a){var i=Ur.ensureSingle(t,"text",ot.itemTextClassName,function(l){l.attr({"text-anchor":"start","data-notex":1})}),n=r.label,o=a._fullLayout._meta;o&&(n=Ur.templateString(n,o)),i.call(Ro.font,e.font).text(n).call(Ac.convertToTspans,a)}function qb(t,e){var r=e.active;t.each(function(a,i){var n=zo.select(this);i===r&&e.showactive&&n.select("rect."+ot.itemRectClassName).call(fs.fill,ot.activeColor)})}function jk(t){t.select("rect."+ot.itemRectClassName).call(fs.fill,ot.hoverColor)}function Bk(t,e){t.select("rect."+ot.itemRectClassName).call(fs.fill,e.bgcolor)}function f4(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=Ro.tester.selectAll("g."+ot.dropdownButtonClassName).data(Ur.filterVisible(e.buttons));a.enter().append("g").classed(ot.dropdownButtonClassName,!0);var i=["up","down"].indexOf(e.direction)!==-1;a.each(function(c,u){var v=zo.select(this);v.call(sm,e,c,t);var p=v.select("."+ot.itemTextClassName),d=p.node()&&Ro.bBox(p.node()).width,h=Math.max(d+ot.textPadX,ot.minWidth),m=e.font.size*Nk,y=Ac.lineCount(p),b=Math.max(m*y,ot.minHeight)+ot.textOffsetY;b=Math.ceil(b),h=Math.ceil(h),r.widths[u]=h,r.heights[u]=b,r.height1=Math.max(r.height1,b),r.width1=Math.max(r.width1,h),i?(r.totalWidth=Math.max(r.totalWidth,h),r.openWidth=r.totalWidth,r.totalHeight+=b+ot.gapButton,r.openHeight+=b+ot.gapButton):(r.totalWidth+=h+ot.gapButton,r.openWidth+=h+ot.gapButton,r.totalHeight=Math.max(r.totalHeight,b),r.openHeight=r.totalHeight)}),i?r.totalHeight-=ot.gapButton:r.totalWidth-=ot.gapButton,r.headerWidth=r.width1+ot.arrowPadX,r.headerHeight=r.height1,e.type==="dropdown"&&(i?(r.width1+=ot.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=ot.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";Ur.isRightAnchor(e)&&(r.lx-=n,s="right"),Ur.isCenterAnchor(e)&&(r.lx-=n/2,s="center");var f="top";Ur.isBottomAnchor(e)&&(r.ly-=o,f="bottom"),Ur.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),ss.autoMargin(t,Gk(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 Gk(t){return ot.autoMarginIdRoot+t._index}function Uk(t,e,r,a){a=a||{};var i=t.select("."+ot.itemRectClassName),n=t.select("."+ot.itemTextClassName),o=e.borderwidth,l=r.index,s=e._dims;Ro.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*Nk,v=Ac.lineCount(n),p=(v-1)*u/2;Ac.positionText(n,ot.textOffsetX,c/2-p+ot.textOffsetY),f?r.y+=s.heights[l]+r.yPad:r.x+=s.widths[l]+r.xPad,r.index++}function wh(t,e){t.attr(ot.menuIndexAttrName,e||"-1").selectAll("g."+ot.dropdownButtonClassName).remove()}var c4=lm,u4={moduleType:"component",name:c4.name,layoutAttributes:Ik,supplyLayoutDefaults:ZN,draw:r4},Au={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},Zb=fr,v4=Zh,d4=Rt.extendDeepAll,h4=Na.overrideAll,p4=Uc,Vk=Lt.templatedArray,Yi=Au,m4=Vk("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(" ")}}),Wk=h4(Vk("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:m4,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:d4(v4({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:p4.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:Zb({description:"Sets the font of the current value label text."})},font:Zb({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:Yi.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:Yi.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:Yi.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:Yi.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:Yi.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:Yi.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:Yi.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root"),oo=xe,Xk=ja,Yk=Wk,y4=Au,g4=y4.name,b4=Yk.steps,x4=function(e,r){Xk(e,r,{name:g4,handleItemDefaults:_4})};function _4(t,e,r){function a(u,v){return oo.coerce(t,e,Yk,u,v)}for(var i=Xk(t,e,{name:"steps",handleItemDefaults:w4}),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=oo.filterVisible(i),f=a("active");(i[f]||{}).visible||(e.active=s[0]._index),a("x"),a("y"),oo.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"),oo.coerceFont(a,"font",r.font);var c=a("currentvalue.visible");c&&(a("currentvalue.xanchor"),a("currentvalue.prefix"),a("currentvalue.suffix"),a("currentvalue.offset"),oo.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 w4(t,e){function r(n,o){return oo.coerce(t,e,b4,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 ba=ut,Mc=Kt,Mi=ct,xa=kt,Vr=xe,T4=Vr.strTranslate,Hl=or,k4=Lt.arrayEditor,dt=Au,fm=Sr,qk=fm.LINE_SPACING,Qv=fm.FROM_TL,Jv=fm.FROM_BR,A4=function(e){var r=e._context.staticPlot,a=e._fullLayout,i=M4(a,e),n=a._infolayer.selectAll("g."+dt.containerClassName).data(i.length>0?[0]:[]);n.enter().append("g").classed(dt.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),Mc.autoMargin(e,Zk(c))}if(n.exit().each(function(){ba.select(this).selectAll("g."+dt.groupClassName).each(o)}).remove(),i.length!==0){var l=n.selectAll("g."+dt.groupClassName).data(i,S4);l.enter().append("g").classed(dt.groupClassName,!0),l.exit().each(o).remove();for(var s=0;s<i.length;s++){var f=i[s];L4(e,f)}l.each(function(c){var u=ba.select(this);z4(c),Mc.manageCommandObserver(e,c,c._visibleSteps,function(v){var p=u.data()[0];p.active!==v.index&&(p._dragging||Qk(e,u,p,v.index,!1,!0))}),C4(e,ba.select(this),c)})}};function Zk(t){return dt.autoMarginIdRoot+t._index}function M4(t,e){for(var r=t[dt.name],a=[],i=0;i<r.length;i++){var n=r[i];n.visible&&(n._gd=e,a.push(n))}return a}function S4(t){return t._index}function L4(t,e){var r=xa.tester.selectAll("g."+dt.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(dt.labelGroupClass,!0);var a=0,i=0;r.each(function(d){var h=ba.select(this),m=Kk(h,{step:d},e),y=m.node();if(y){var b=xa.bBox(y);i=Math.max(i,b.height),a=Math.max(a,b.width)}}),r.remove();var n=e._dims={};n.inputAreaWidth=Math.max(dt.railWidth,dt.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*dt.stepInset,s=l/(e._stepCount-1),f=a+dt.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=xa.tester.append("g");r.each(function(d){var h=Sc(c,e,d.label),m=h.node()&&xa.bBox(h.node())||{width:0,height:0},y=Hl.lineCount(h);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+dt.tickOffset+e.ticklen+dt.labelOffset+n.labelHeight+e.pad.t+e.pad.b;var u="left";Vr.isRightAnchor(e)&&(n.lx-=n.outerLength,u="right"),Vr.isCenterAnchor(e)&&(n.lx-=n.outerLength/2,u="center");var v="top";Vr.isBottomAnchor(e)&&(n.ly-=n.height,v="bottom"),Vr.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 p={y:e.y,b:n.height*Jv[v],t:n.height*Qv[v]};e.lenmode==="fraction"?(p.l=0,p.xl=e.x-e.len*Qv[u],p.r=0,p.xr=e.x+e.len*Jv[u]):(p.x=e.x,p.l=n.outerLength*Qv[u],p.r=n.outerLength*Jv[u]),Mc.autoMargin(t,Zk(e),p)}function C4(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(Sc,r).call(I4,r).call(P4,r).call(E4,r).call(R4,t,r).call(D4,t,r);var a=r._dims;xa.setTranslate(e,a.lx+r.pad.l,a.ly+r.pad.t),e.call(eA,r,!1),e.call(Sc,r)}function Sc(t,e,r){if(e.currentvalue.visible){var a=e._dims,i,n;switch(e.currentvalue.xanchor){case"right":i=a.inputAreaLength-dt.currentValueInset-a.currentValueMaxWidth,n="left";break;case"center":i=a.inputAreaLength*.5,n="middle";break;default:i=dt.currentValueInset,n="left"}var o=Vr.ensureSingle(t,"text",dt.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=Vr.templateString(s,f)),l+=s}e.currentvalue.suffix&&(l+=e.currentvalue.suffix),o.call(xa.font,e.currentvalue.font).text(l).call(Hl.convertToTspans,e._gd);var c=Hl.lineCount(o),u=(a.currentValueMaxLines+1-c)*e.currentvalue.font.size*qk;return Hl.positionText(o,i,u),o}}function D4(t,e,r){var a=Vr.ensureSingle(t,"rect",dt.gripRectClass,function(i){i.call(Jk,e,t,r).style("pointer-events","all")});a.attr({width:dt.gripWidth,height:dt.gripHeight,rx:dt.gripRadius,ry:dt.gripRadius}).call(Mi.stroke,r.bordercolor).call(Mi.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function Kk(t,e,r){var a=Vr.ensureSingle(t,"text",dt.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),i=e.step.label,n=r._gd._fullLayout._meta;return n&&(i=Vr.templateString(i,n)),a.call(xa.font,r.font).text(i).call(Hl.convertToTspans,r._gd),a}function P4(t,e){var r=Vr.ensureSingle(t,"g",dt.labelsClass),a=e._dims,i=r.selectAll("g."+dt.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(dt.labelGroupClass,!0),i.exit().remove(),i.each(function(n){var o=ba.select(this);o.call(Kk,n,e),xa.setTranslate(o,cm(e,n.fraction),dt.tickOffset+e.ticklen+e.font.size*qk+dt.labelOffset+a.currentValueTotalHeight)})}function Kb(t,e,r,a,i){var n=Math.round(a*(r._stepCount-1)),o=r._visibleSteps[n]._index;o!==r.active&&Qk(t,e,r,o,!0,i)}function Qk(t,e,r,a,i,n){var o=r.active;r.active=a,k4(t.layout,dt.name,r).applyUpdate("active",a);var l=r.steps[r.active];e.call(eA,r,n),e.call(Sc,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&&Mc.executeAPICommand(t,s.method,s.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function Jk(t,e,r){if(e._context.staticPlot)return;var a=r.node(),i=ba.select(e);function n(){return r.data()[0]}function o(){var l=n();e.emit("plotly_sliderstart",{slider:l});var s=r.select("."+dt.gripRectClass);ba.event.stopPropagation(),ba.event.preventDefault(),s.call(Mi.fill,l.activebgcolor);var f=Qb(l,ba.mouse(a)[0]);Kb(e,r,l,f,!0),l._dragging=!0;function c(){var v=n(),p=Qb(v,ba.mouse(a)[0]);Kb(e,r,v,p,!1)}i.on("mousemove",c),i.on("touchmove",c);function u(){var v=n();v._dragging=!1,s.call(Mi.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 E4(t,e){var r=t.selectAll("rect."+dt.tickRectClass).data(e._visibleSteps),a=e._dims;r.enter().append("rect").classed(dt.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=ba.select(this);l.attr({height:o?e.ticklen:e.minorticklen}).call(Mi.fill,e.tickcolor),xa.setTranslate(l,cm(e,n/(e._stepCount-1))-.5*e.tickwidth,(o?dt.tickOffset:dt.minorTickOffset)+a.currentValueTotalHeight)})}function z4(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 eA(t,e,r){for(var a=t.select("rect."+dt.gripRectClass),i=0,n=0;n<e._stepCount;n++)if(e._visibleSteps[n]._index===e.active){i=n;break}var o=cm(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",T4(o-dt.gripWidth*.5,e._dims.currentValueTotalHeight))}}function cm(t,e){var r=t._dims;return r.inputAreaStart+dt.stepInset+(r.inputAreaLength-2*dt.stepInset)*Math.min(1,Math.max(0,e))}function Qb(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-dt.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*dt.stepInset-2*r.inputAreaStart)))}function R4(t,e,r){var a=r._dims,i=Vr.ensureSingle(t,"rect",dt.railTouchRectClass,function(n){n.call(Jk,e,t,r).style("pointer-events","all")});i.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,dt.tickOffset+r.ticklen+a.labelHeight)}).call(Mi.fill,r.bgcolor).attr("opacity",0),xa.setTranslate(i,0,a.currentValueTotalHeight)}function I4(t,e){var r=e._dims,a=r.inputAreaLength-dt.railInset*2,i=Vr.ensureSingle(t,"rect",dt.railRectClass);i.attr({width:a,height:dt.railWidth,rx:dt.railRadius,ry:dt.railRadius,"shape-rendering":"crispEdges"}).call(Mi.stroke,e.bordercolor).call(Mi.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),xa.setTranslate(i,dt.railInset,(r.inputAreaWidth-dt.railWidth)*.5+r.currentValueTotalHeight)}var F4=Au,$4={moduleType:"component",name:F4.name,layoutAttributes:Wk,supplyLayoutDefaults:x4,draw:A4},Jb=Tr,um={bgcolor:{valType:"color",dflt:Jb.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:Jb.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"},tA={_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"},Mu={},vm={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},N4=Ut,H4=or,rA=vm,O4=Sr.LINE_SPACING,Lc=rA.name;function aA(t){var e=t&&t[Lc];return e&&e.visible}Mu.isVisible=aA;Mu.makeData=function(t){for(var e=N4.list({_fullLayout:t},"x",!0),r=t.margin,a=[],i=0;i<e.length;i++){var n=e[i];if(aA(n)){a.push(n);var o=n[Lc];o._id=Lc+n._id,o._height=(t.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}t._rangeSliderData=a};Mu.autoMarginOpts=function(t,e){var r=t._fullLayout,a=e[Lc],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(H4.BR_TAG_ALL)||[]).length;o+=l*e.title.font.size*O4}return{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:a._height+n+Math.max(r.margin.b,o),pad:rA.extraPad+a._offsetShift*2}};var ed,ex;function j4(){if(ex)return ed;ex=1;var t=xe,e=Lt,r=Ut,a=um,i=tA;return ed=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 p(S,L){return t.coerce(u,v,a,S,L)}var d,h;function m(S,L){return t.coerce(d,h,i,S,L)}var y=p("visible");if(y){p("bgcolor",l.plot_bgcolor),p("bordercolor"),p("borderwidth"),p("thickness"),p("autorange",!c.isValidRange(u.range)),p("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]||{},h=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}},ed}var td,tx;function B4(){if(tx)return td;tx=1;var t=Ut.list,e=xs.getAutoRange,r=vm;return td=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))}},td}var rd,rx;function G4(){if(rx)return rd;rx=1;var t=ut,e=Je,r=Kt,a=xe,i=a.strTranslate,n=kt,o=ct,l=eu,s=Qt,f=Ut,c=Ba,u=Pi,v=vm;rd=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 $(I){return I._name}var N=M._infolayer.selectAll("g."+v.containerClassName).data(S,$);N.exit().each(function(I){var H=I[v.name];M._topdefs.select("#"+H._clipId).remove()}).remove(),S.length!==0&&(N.enter().append("g").classed(v.containerClassName,!0).attr("pointer-events","all"),N.each(function(I){var H=t.select(this),D=I[v.name],E=M[f.id2name(I.anchor)],k=D[f.id2name(I.anchor)];if(D.range){var C=a.simpleMap(D.range,I.r2l),P=a.simpleMap(I.range,I.r2l),F;P[0]<P[1]?F=[Math.min(C[0],P[0]),Math.max(C[1],P[1])]:F=[Math.max(C[0],P[0]),Math.min(C[1],P[1])],D.range=D._input.range=a.simpleMap(F,I.l2r)}I.cleanRange("rangeslider.range");var j=M._size,G=I.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-I._counterDomainMin)+(I.side==="bottom"?I._depth:0)+D._offsetShift+v.extraPad);H.attr("transform",i(X,O)),D._rl=a.simpleMap(D.range,I.r2l);var Z=D._rl[0],W=D._rl[1],Y=W-Z;if(D.p2d=function(we){return we/D._width*Y+Z},D.d2p=function(we){return(we-Z)/Y*D._width},I.rangebreaks){var B=I.locateBreaks(Z,W);if(B.length){var Q,ee,se=0;for(Q=0;Q<B.length;Q++)ee=B[Q],se+=ee.max-ee.min;var oe=D._width/(W-Z-se),fe=[-oe*Z];for(Q=0;Q<B.length;Q++)ee=B[Q],fe.push(fe[fe.length-1]-oe*(ee.max-ee.min));for(D.d2p=function(we){for(var ye=fe[0],de=0;de<B.length;de++){var Me=B[de];if(we>=Me.max)ye=fe[de+1];else if(we<Me.min)break}return ye+oe*we},Q=0;Q<B.length;Q++)ee=B[Q],ee.pmin=D.d2p(ee.min),ee.pmax=D.d2p(ee.max);D.p2d=function(we){for(var ye=fe[0],de=0;de<B.length;de++){var Me=B[de];if(we>=Me.pmax)ye=fe[de+1];else if(we<Me.pmin)break}return(we-ye)/oe}}}if(k.rangemode!=="match"){var pe=E.r2l(k.range[0]),ge=E.r2l(k.range[1]),be=ge-pe;D.d2pOppAxis=function(we){return(we-pe)/be*D._height}}H.call(y,A,I,D).call(b,A,I,D).call(_,A,I,D).call(x,A,I,D,k).call(w,A,I,D).call(T,A,I,D),d(H,A,I,D),m(H,A,I,D,E,k),I.side==="bottom"&&l.draw(A,I._id+"title",{propContainer:I,propName:I._name+".title",placeholder:M._dfltTitle.x,attributes:{x:I._offset+I._length/2,y:O+D._height+D._offsetShift+10+1.5*I.title.font.size,"text-anchor":"middle"}})}))};function p(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(),$=A.select("rect."+v.grabAreaMinClassName).node(),N=A.select("rect."+v.grabAreaMaxClassName).node();function I(){var H=t.event,D=H.target,E=p(H),k=E-A.node().getBoundingClientRect().left,C=L.d2p(S._rl[0]),P=L.d2p(S._rl[1]),F=c.coverSlip();this.addEventListener("touchmove",j),this.addEventListener("touchend",G),F.addEventListener("mousemove",j),F.addEventListener("mouseup",G);function j(X){var O=p(X),Z=+O-E,W,Y,B;switch(D){case z:if(B="ew-resize",C+Z>S._length||P+Z<0)return;W=C+Z,Y=P+Z;break;case $:if(B="col-resize",C+Z>S._length)return;W=C+Z,Y=P;break;case N:if(B="col-resize",P+Z<0)return;W=C,Y=P+Z;break;default:B="ew-resize",W=k,Y=k+Z;break}if(Y<W){var Q=Y;Y=W,W=Q}L._pixelMin=W,L._pixelMax=Y,u(t.select(F),B),h(A,M,S,L)}function G(){F.removeEventListener("mousemove",j),F.removeEventListener("mouseup",G),this.removeEventListener("touchmove",j),this.removeEventListener("touchend",G),a.removeElement(F)}}A.on("mousedown",I),A.on("touchstart",I)}function h(A,M,S,L){function z(I){return S.l2r(a.constrain(I,L._rl[0],L._rl[1]))}var $=z(L.p2d(L._pixelMin)),N=z(L.p2d(L._pixelMax));window.requestAnimationFrame(function(){e.call("_guiRelayout",M,S._name+".range",[$,N])})}function m(A,M,S,L,z,$){var N=v.handleWidth/2;function I(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,-N,L._width+N)}var E=I(L.d2p(S._rl[0])),k=I(L.d2p(S._rl[1]));if(A.select("rect."+v.slideBoxClassName).attr("x",E).attr("width",k-E),A.select("rect."+v.maskMinClassName).attr("width",E),A.select("rect."+v.maskMaxClassName).attr("x",k).attr("width",L._width-k),$.rangemode!=="match"){var C=L._height-H(L.d2pOppAxis(z._rl[1])),P=L._height-H(L.d2pOppAxis(z._rl[0]));A.select("rect."+v.maskMinOppAxisClassName).attr("x",E).attr("height",C).attr("width",k-E),A.select("rect."+v.maskMaxOppAxisClassName).attr("x",E).attr("y",P).attr("height",L._height-P).attr("width",k-E),A.select("rect."+v.slideBoxClassName).attr("y",C).attr("height",P-C)}var F=.5,j=Math.round(D(E-N))-F,G=Math.round(D(k-N))+F;A.select("g."+v.grabberMinClassName).attr("transform",i(j,F)),A.select("g."+v.grabberMaxClassName).attr("transform",i(G,F))}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"})}),$=L.borderwidth%2===0?L.borderwidth:L.borderwidth-1,N=-L._offsetShift,I=n.crispRound(M,L.borderwidth);z.attr({width:L._width+$,height:L._height+$,transform:i(N,N),"stroke-width":I}).call(o.stroke,L.bordercolor).call(o.fill,L.bgcolor)}function b(A,M,S,L){var z=M._fullLayout,$=a.ensureSingleById(z._topdefs,"clipPath",L._clipId,function(N){N.append("rect").attr({x:0,y:0})});$.select("rect").attr({width:L._width,height:L._height})}function _(A,M,S,L){var z=M.calcdata,$=A.selectAll("g."+v.rangePlotClassName).data(S._subplotsWith,a.identity);$.enter().append("g").attr("class",function(I){return v.rangePlotClassName+" "+I}).call(n.setClipUrl,L._clipId,M),$.order(),$.exit().remove();var N;$.each(function(I,H){var D=t.select(this),E=H===0,k=f.getFromId(M,I,"y"),C=k._name,P=L[C],F={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&&(F.layout.xaxis.rangebreaks=S.rangebreaks),F.layout[C]={type:k.type,domain:[0,1],range:P.rangemode!=="match"?P.range.slice():k.range.slice(),calendar:k.calendar},k.rangebreaks&&(F.layout[C].rangebreaks=k.rangebreaks),r.supplyDefaults(F);var j=F._fullLayout.xaxis,G=F._fullLayout[C];j.clearCalc(),j.setScale(),G.clearCalc(),G.setScale();var X={id:I,plotgroup:D,xaxis:j,yaxis:G,isRangePlot:!0};E?N=X:(X.mainplot="xy",X.mainplotinfo=N),s.rangePlot(M,X,g(z,I))})}function g(A,M){for(var S=[],L=0;L<A.length;L++){var z=A[L],$=z[0].trace;$.xaxis+$.yaxis===M&&S.push(z)}return S}function x(A,M,S,L,z){var $=a.ensureSingle(A,"rect",v.maskMinClassName,function(D){D.attr({x:0,y:0,"shape-rendering":"crispEdges"})});$.attr("height",L._height).call(o.fill,v.maskColor);var N=a.ensureSingle(A,"rect",v.maskMaxClassName,function(D){D.attr({y:0,"shape-rendering":"crispEdges"})});if(N.attr("height",L._height).call(o.fill,v.maskColor),z.rangemode!=="match"){var I=a.ensureSingle(A,"rect",v.maskMinOppAxisClassName,function(D){D.attr({y:0,"shape-rendering":"crispEdges"})});I.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($){$.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),$=a.ensureSingle(A,"g",v.grabberMaxClassName),N={x:0,width:v.handleWidth,rx:v.handleRadius,fill:o.background,stroke:o.defaultLine,"stroke-width":v.handleStrokeWidth,"shape-rendering":"crispEdges"},I={y:Math.round(L._height/4),height:Math.round(L._height/2)},H=a.ensureSingle(z,"rect",v.handleMinClassName,function(P){P.attr(N)});H.attr(I);var D=a.ensureSingle($,"rect",v.handleMaxClassName,function(P){P.attr(N)});D.attr(I);var E={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(P){P.attr(E)});k.attr("height",L._height);var C=a.ensureSingle($,"rect",v.grabAreaMaxClassName,function(P){P.attr(E)});C.attr("height",L._height)}return rd}var U4=xe,V4=um,W4=tA,ad=Mu,X4={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:U4.extendFlat({},V4,{yaxis:W4})}}},layoutAttributes:um,handleDefaults:j4(),calcAutorange:B4(),draw:G4(),isVisible:ad.isVisible,makeData:ad.makeData,autoMarginOpts:ad.autoMarginOpts},Y4=fr,ax=Tr,q4=Lt.templatedArray,Z4=q4("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(" ")}),Th={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:Z4,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:Y4({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:ax.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:ax.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"},iA={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10},qf=xe,K4=ct,Q4=Lt,J4=ja,nA=Th,kh=iA,e6=function(e,r,a,i,n){var o=e.rangeselector||{},l=Q4.newContainer(r,"rangeselector");function s(p,d){return qf.coerce(o,l,nA,p,d)}var f=J4(o,l,{name:"buttons",handleItemDefaults:t6,calendar:n}),c=s("visible",f.length>0);if(c){var u=r6(r,a,i);s("x",u[0]),s("y",u[1]),qf.noneOrAll(e,r,["x","y"]),s("xanchor"),s("yanchor"),qf.coerceFont(s,"font",a.font);var v=s("bgcolor");s("activecolor",K4.contrast(v,kh.lightAmount,kh.darkAmount)),s("bordercolor"),s("borderwidth")}};function t6(t,e,r,a){var i=a.calendar;function n(s,f){return qf.coerce(t,e,nA.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 r6(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+kh.yPad]}var a6=FM,i6=xe.titleCase,n6=function(e,r){var a=e._name,i={};if(r.step==="all")i[a+".autorange"]=!0;else{var n=o6(e,r);i[a+".range[0]"]=n[0],i[a+".range[1]"]=n[1]}return i};function o6(t,e){var r=t.range,a=new Date(t.r2l(r[1])),i=e.step,n=a6["utc"+i6(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 Cc=ut,l6=Je,s6=Kt,ix=ct,oA=kt,Qa=xe,nx=Qa.strTranslate,Zf=or,f6=Ut,dm=Sr,ox=dm.LINE_SPACING,lx=dm.FROM_TL,sx=dm.FROM_BR,Ah=iA,c6=n6,u6=function(e){var r=e._fullLayout,a=r._infolayer.selectAll(".rangeselector").data(v6(e),d6);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(i){var n=Cc.select(this),o=i,l=o.rangeselector,s=n.selectAll("g.button").data(Qa.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(f){var c=Cc.select(this),u=c6(o,f);f._isActive=h6(o,f,u),c.call(id,l,f),c.call(m6,l,f,e),c.on("click",function(){e._dragged||l6.call("_guiRelayout",e,u)}),c.on("mouseover",function(){f._isHovered=!0,c.call(id,l,f)}),c.on("mouseout",function(){f._isHovered=!1,c.call(id,l,f)})}),g6(e,s,l,o._name,n)})};function v6(t){for(var e=f6.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 d6(t){return t._id}function h6(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 id(t,e,r){var a=Qa.ensureSingle(t,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});a.attr({rx:Ah.rx,ry:Ah.ry}),a.call(ix.stroke,e.bordercolor).call(ix.fill,p6(e,r)).style("stroke-width",e.borderwidth+"px")}function p6(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}function m6(t,e,r,a){function i(o){Zf.convertToTspans(o,a)}var n=Qa.ensureSingle(t,"text","selector-text",function(o){o.attr("text-anchor","middle")});n.call(oA.font,e.font).text(y6(r,a._fullLayout._meta)).call(i)}function y6(t,e){return t.label?e?Qa.templateString(t.label,e):t.label:t.step==="all"?"all":t.count+t.step.charAt(0)}function g6(t,e,r,a,i){var n=0,o=0,l=r.borderwidth;e.each(function(){var p=Cc.select(this),d=p.select(".selector-text"),h=r.font.size*ox,m=Math.max(h*Zf.lineCount(d),16)+3;o=Math.max(o,m)}),e.each(function(){var p=Cc.select(this),d=p.select(".selector-rect"),h=p.select(".selector-text"),m=h.node()&&oA.bBox(h.node()).width,y=r.font.size*ox,b=Zf.lineCount(h),_=Math.max(m+10,Ah.minButtonWidth);p.attr("transform",nx(l+n,l)),d.attr({x:0,y:0,width:_,height:o}),Zf.positionText(h,_/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";Qa.isRightAnchor(r)&&(f-=n,u="right"),Qa.isCenterAnchor(r)&&(f-=n/2,u="center");var v="top";Qa.isBottomAnchor(r)&&(c-=o,v="bottom"),Qa.isMiddleAnchor(r)&&(c-=o/2,v="middle"),n=Math.ceil(n),o=Math.ceil(o),f=Math.round(f),c=Math.round(c),s6.autoMargin(t,a+"-range-selector",{x:r.x,y:r.y,l:n*lx[u],r:n*sx[u],b:o*sx[v],t:o*lx[v]}),i.attr("transform",nx(f,c))}var b6={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Th}}},layoutAttributes:Th,handleDefaults:e6,draw:u6},Ii={},fx=Rt.extendFlat;Ii.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:fx({},r,{description:["Sets the horizontal domain of this ",a,i,"(in plot fraction).",n].join("")}),y:fx({},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};Ii.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 x6=xe,_6=Ho.counter,w6=Ii.attributes,cx=gr.idRegex,T6=Lt,Mh={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:[_6("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:[cx.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:[cx.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:w6({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 Dc(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 k6(t,e){var r=t.grid||{},a=Dc(e,r,"x"),i=Dc(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=T6.newContainer(e,"grid");function v(w,T){return x6.coerce(r,u,Mh,w,T)}var p=v("rows",f),d=v("columns",c);if(!(p*d>1)){delete e.grid;return}if(!n&&!o&&!l){var h=v("pattern")==="independent";h&&(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:ux("x",v,b,g,d),y:ux("y",v,_,x,p,y)}}function ux(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 p=f+c*v;s[n?i-1-v:v]=[p,p+u]}return s}function A6(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,p,d,h,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?(p=b===1?"xy":"x"+b+"y"+b,b++):p=g[c],_[c]="",i.cartesian.indexOf(p)!==-1){if(h=p.indexOf("y"),u=p.slice(0,h),v=p.slice(h),m[u]!==void 0&&m[u]!==c||m[v]!==void 0&&m[v]!==f)continue;_[c]=p,m[u]=c,m[v]=f}}}else{var x=Dc(e,a,"x"),w=Dc(e,a,"y");r.xaxes=vx(x,i.xaxis,l,m,"x"),r.yaxes=vx(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,$=1,N=o):(z=o-1,$=-1,N=-1),n){var I=m[M];for(f=z;f!==N;f+=$)if(p=d[f][I],!!p&&(h=p.indexOf("y"),p.slice(0,h)===M)){T[M]=p.slice(h);break}}else for(f=z;f!==N;f+=$)if(v=r.yaxes[f],i.cartesian.indexOf(M+v)!==-1){T[M]=v;break}}else if(L.charAt(0)==="l"?(z=0,$=1,N=l):(z=l-1,$=-1,N=-1),n){var H=m[M];for(f=z;f!==N;f+=$)if(p=d[H][f],!!p&&(h=p.indexOf("y"),p.slice(h)===M)){T[M]=p.slice(0,h);break}}else for(f=z;f!==N;f+=$)if(u=r.xaxes[f],i.cartesian.indexOf(u+M)!==-1){T[M]=u;break}}}}function vx(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 M6={moduleType:"component",name:"grid",schema:{layout:{grid:Mh}},layoutAttributes:Mh,sizeDefaults:k6,contentDefaults:A6},lA={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"},nd,dx;function S6(){if(dx)return nd;dx=1;var t=ht,e=Je,r=xe,a=Lt,i=lA;return nd=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 p=u.array!==void 0||u.value!==void 0||u.type==="sqrt",d=v("visible",p);if(d!==!1){var h=v("type","array"in u?"data":"percent"),m=!0;h!=="sqrt"&&(m=v("symmetric",!((h==="data"?"arrayminus":"valueminus")in u))),h==="data"?(v("array"),v("traceref"),m||(v("arrayminus"),v("tracerefminus"))):(h==="percent"||h==="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))}},nd}var od,hx;function sA(){if(hx)return od;hx=1,od=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],p=+o[u];return!isNaN(v)||!isNaN(p)?[p||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 od}var ld,px;function L6(){if(px)return ld;px=1;var t=ht,e=Je,r=Ct,a=xe,i=sA();ld=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),p=r.getFromId(l,u.yaxis);n(c,u,v,"x"),n(c,u,p,"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 p=i(c),d=0;d<o.length;d++){var h=o[d],m=h.i;if(m===void 0)m=d;else if(m===null)continue;var y=h[f];if(t(s.c2l(y))){var b=p(y,m);if(t(b[0])&&t(b[1])){var _=h[f+"s"]=y-b[0],g=h[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 ld}var sd,mx;function C6(){if(mx)return sd;mx=1;var t=ut,e=ht,r=kt,a=kr;sd=function(o,l,s,f){var c,u=s.xaxis,v=s.yaxis,p=f&&f.duration>0,d=o._context.staticPlot;l.each(function(h){var m=h[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&&(h=[]);var x=t.select(this).selectAll("g.errorbar").data(h,_);if(x.exit().remove(),!!h.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);p&&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):p&&(L=L.transition().duration(f.duration).ease(f.easing)),L.attr("d",S)}else L.remove();var $=A.select("path.xerror");if(y.visible&&e(M.y)&&e(M.xh)&&e(M.xs)){var N=(y.copy_ystyle?b:y).width;S="M"+M.xh+","+(M.y-N)+"v"+2*N+"m0,-"+N+"H"+M.xs,M.noXS||(S+="m0,-"+N+"v"+2*N),c=!$.size(),c?$=A.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("xerror",!0):p&&($=$.transition().duration(f.duration).ease(f.easing)),$.attr("d",S)}else $.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 sd}var fd,yx;function D6(){if(yx)return fd;yx=1;var t=ut,e=ct;return fd=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)})},fd}var Ol=xe,gx=Na.overrideAll,jl=lA,ln={error_x:Ol.extendFlat({},jl),error_y:Ol.extendFlat({},jl)};delete ln.error_x.copy_zstyle;delete ln.error_y.copy_zstyle;delete ln.error_y.copy_ystyle;var Ms={error_x:Ol.extendFlat({},jl),error_y:Ol.extendFlat({},jl),error_z:Ol.extendFlat({},jl)};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 P6={moduleType:"component",name:"errorbars",schema:{traces:{scatter:ln,bar:ln,histogram:ln,scatter3d:gx(Ms,"calc","nested"),scattergl:gx(ln,"calc","nested")}},supplyDefaults:S6(),calc:L6(),makeComputeError:sA(),plot:C6(),style:D6(),hoverInfo:E6};function E6(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 z6={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"}},pi=ut,cd=Ta,Kf=Kt,bx=Je,Xa=Ct,bf=Ba,aa=xe,ha=aa.strTranslate,fA=Rt.extendFlat,ud=Pi,va=kt,vd=ct,R6=eu,I6=or,F6=Ma.flipScale,$6=xk,N6=_k,H6=Oa,hm=Sr,xx=hm.LINE_SPACING,_x=hm.FROM_TL,wx=hm.FROM_BR,Ft=z6.cn;function O6(t){var e=t._fullLayout,r=e._infolayer.selectAll("g."+Ft.colorbar).data(j6(t),function(a){return a._id});r.enter().append("g").attr("class",function(a){return a._id}).classed(Ft.colorbar,!0),r.each(function(a){var i=pi.select(this);aa.ensureSingle(i,"rect",Ft.cbbg),aa.ensureSingle(i,"g",Ft.cbfills),aa.ensureSingle(i,"g",Ft.cblines),aa.ensureSingle(i,"g",Ft.cbaxis,function(o){o.classed(Ft.crisp,!0)}),aa.ensureSingle(i,"g",Ft.cbtitleunshift,function(o){o.append("g").classed(Ft.cbtitle,!0)}),aa.ensureSingle(i,"rect",Ft.cboutline);var n=B6(i,a,t);n&&n.then&&(t._promises||[]).push(n),t._context.edits.colorbarPosition&&G6(i,a,t)}),r.exit().each(function(a){Kf.autoMargin(t,a._id)}).remove(),r.order()}function j6(t){var e=t._fullLayout,r=t.calcdata,a=[],i,n,o,l;function s(_){return fA(_,{_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?F6(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 p=Array.isArray(v),d=p?v:[v],h=0;h<d.length;h++){l=d[h];var m=l.container;n=m?o[m]:o,n&&n.showscale&&(i=s(n.colorbar),i._id="cb"+o.uid+(p&&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 B6(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,p=e.xpad,d=e.ypad,h=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||pi.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,$=U6(r,e,M),N=$.fill,I=$.line,H=Math.round(o*(l==="fraction"?a?g.w:g.h:1)),D=H/(a?g.w:g.h),E=Math.round(i*(n==="fraction"?a?g.h:g.w:1)),k=E/(a?g.h:g.w),C=b?g.w:r._fullLayout.width,P=y?g.h:r._fullLayout.height,F=Math.round(a?h*C+p:m*P+d),j={center:.5,right:1}[u]||0,G={top:1,middle:.5}[v]||0,X=a?h-j*D:m-G*D,O=a?m-G*k:h-j*k,Z=Math.round(a?P*(1-O):C*O);e._lenFrac=k,e._thickFrac=D,e._uFrac=X,e._vFrac=O;var W=e._axis=V6(r,e,M);W.position=D+(a?h+p/g.w:m+d/g.h);var Y=["top","bottom"].indexOf(A)!==-1;if(a&&Y&&(W.title.side=A,W.titlex=h+p/g.w,W.titley=O+(T.side==="top"?k-d/g.h:d/g.h)),!a&&!Y&&(W.title.side=A,W.titley=m+d/g.h,W.titlex=O+p/g.w),w.color&&e.tickmode==="auto"){W.tickmode="linear",W.tick0=z.start;var B=z.size,Q=aa.constrain(E/50,4,15)+1,ee=(M[1]-M[0])/((e.nticks||Q)*B);if(ee>1){var se=Math.pow(10,Math.floor(Math.log(ee)/Math.LN10));B*=se*aa.roundUp(ee/se,[2,5,10]),(Math.abs(z.start)/z.size+1e-6)%1<2e-6&&(W.tick0=0)}W.dtick=B}W.domain=a?[O+d/g.h,O+k-d/g.h]:[O+p/g.w,O+k-p/g.w],W.setScale(),t.attr("transform",ha(Math.round(g.l),Math.round(g.t)));var oe=t.select("."+Ft.cbtitleunshift).attr("transform",ha(-Math.round(g.l),-Math.round(g.t))),fe=W.ticklabelposition,pe=W.title.font.size,ge=t.select("."+Ft.cbaxis),be,we=0,ye=0;function de(Se,J){var _e={propContainer:W,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:_._dfltTitle.colorbar,containerGroup:t.select("."+Ft.cbtitle)},re=Se.charAt(0)==="h"?Se.substr(1):"h"+Se;t.selectAll("."+re+",."+re+"-math-group").remove(),R6.draw(r,Se,fA(_e,J||{}))}function Me(){if(a&&Y||!a&&!Y){var Se,J;A==="top"&&(Se=p+g.l+C*h,J=d+g.t+P*(1-O-k)+3+pe*.75),A==="bottom"&&(Se=p+g.l+C*h,J=d+g.t+P*(1-O)-3-pe*.25),A==="right"&&(J=d+g.t+P*m+3+pe*.75,Se=p+g.l+C*O),de(W._id+"title",{attributes:{x:Se,y:J,"text-anchor":a?"start":"middle"}})}}function De(){if(a&&!Y||!a&&Y){var Se=W.position||0,J=W._offset+W._length/2,_e,re;if(A==="right")re=J,_e=g.l+C*Se+10+pe*(W.showticklabels?1:.5);else if(_e=J,A==="bottom"&&(re=g.t+P*Se+10+(fe.indexOf("inside")===-1?W.tickfont.size:0)+(W.ticks!=="intside"&&e.ticklen||0)),A==="top"){var Ae=T.text.split("<br>").length;re=g.t+P*Se+10-H-xx*pe*Ae}de((a?"h":"v")+W._id+"title",{avoid:{selection:pi.select(r).selectAll("g."+W._id+"tick"),side:A,offsetTop:a?0:g.t,offsetLeft:a?g.l:0,maxShift:a?_.width:_.height},attributes:{x:_e,y:re,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function ue(){if(!a&&!Y||a&&Y){var Se=t.select("."+Ft.cbtitle),J=Se.select("text"),_e=[-s/2,s/2],re=Se.select(".h"+W._id+"title-math-group").node(),Ae=15.6;J.node()&&(Ae=parseInt(J.node().style.fontSize,10)*xx);var Le;if(re?(Le=va.bBox(re),ye=Le.width,we=Le.height,we>Ae&&(_e[1]-=(we-Ae)/2)):J.node()&&!J.classed(Ft.jsPlaceholder)&&(Le=va.bBox(J.node()),ye=Le.width,we=Le.height),a){if(we){if(we+=5,A==="top")W.domain[1]-=we/g.h,_e[1]*=-1;else{W.domain[0]+=we/g.h;var K=I6.lineCount(J);_e[1]+=(1-K)*Ae}Se.attr("transform",ha(_e[0],_e[1])),W.setScale()}}else ye&&(A==="right"&&(W.domain[0]+=(ye+pe/2)/g.w),Se.attr("transform",ha(_e[0],_e[1])),W.setScale())}t.selectAll("."+Ft.cbfills+",."+Ft.cblines).attr("transform",a?ha(0,Math.round(g.h*(1-W.domain[1]))):ha(Math.round(g.w*W.domain[0]),0)),ge.attr("transform",a?ha(0,Math.round(-g.t)):ha(Math.round(-g.l),0));var ne=t.select("."+Ft.cbfills).selectAll("rect."+Ft.cbfill).attr("style","").data(N);ne.enter().append("rect").classed(Ft.cbfill,!0).attr("style",""),ne.exit().remove();var ve=M.map(W.c2p).map(Math.round).sort(function(Ne,Fe){return Ne-Fe});ne.each(function(Ne,Fe){var ce=[Fe===0?M[0]:(N[Fe]+N[Fe-1])/2,Fe===N.length-1?M[1]:(N[Fe]+N[Fe+1])/2].map(W.c2p).map(Math.round);a&&(ce[1]=aa.constrain(ce[1]+(ce[1]>ce[0])?1:-1,ve[0],ve[1]));var He=pi.select(this).attr(a?"x":"y",F).attr(a?"y":"x",pi.min(ce)).attr(a?"width":"height",Math.max(H,2)).attr(a?"height":"width",Math.max(pi.max(ce)-pi.min(ce),2));if(e._fillgradient)va.gradient(He,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var Be=L(Ne).replace("e-","");He.attr("fill",cd(Be).toHexString())}});var me=t.select("."+Ft.cblines).selectAll("path."+Ft.cbline).data(w.color&&w.width?I:[]);me.enter().append("path").classed(Ft.cbline,!0),me.exit().remove(),me.each(function(Ne){var Fe=F,ce=Math.round(W.c2p(Ne))+w.width/2%1;pi.select(this).attr("d","M"+(a?Fe+","+ce:ce+","+Fe)+(a?"h":"v")+H).call(va.lineGroupStyle,w.width,S(Ne),w.dash)}),ge.selectAll("g."+W._id+"tick,path").remove();var ke=F+H+(s||0)/2-(e.ticks==="outside"?1:0),Pe=Xa.calcTicks(W),Ee=Xa.getTickSigns(W)[2];return Xa.drawTicks(r,W,{vals:W.ticks==="inside"?Xa.clipEnds(W,Pe):Pe,layer:ge,path:Xa.makeTickPath(W,ke,Ee),transFn:Xa.makeTransTickFn(W)}),Xa.drawLabels(r,W,{vals:Pe,layer:ge,transFn:Xa.makeTransTickLabelFn(W),labelFns:Xa.makeLabelFns(W,ke)})}function Te(){var Se,J=H+s/2;fe.indexOf("inside")===-1&&(Se=va.bBox(ge.node()),J+=a?Se.width:Se.height),be=oe.select("text");var _e=0,re=a&&A==="top",Ae=!a&&A==="right",Le=0;if(be.node()&&!be.classed(Ft.jsPlaceholder)){var K,ne=oe.select(".h"+W._id+"title-math-group").node();ne&&(a&&Y||!a&&!Y)?(Se=va.bBox(ne),_e=Se.width,K=Se.height):(Se=va.bBox(oe.node()),_e=Se.right-g.l-(a?F:Z),K=Se.bottom-g.t-(a?Z:F),!a&&A==="top"&&(J+=Se.height,Le=Se.height)),Ae&&(be.attr("transform",ha(_e/2+pe/2,0)),_e*=2),J=Math.max(J,a?_e:K)}var ve=(a?p:d)*2+J+f+s/2,me=0;!a&&T.text&&v==="bottom"&&m<=0&&(me=ve/2,ve+=me,Le+=me),_._hColorbarMoveTitle=me,_._hColorbarMoveCBTitle=Le;var ke=f+s,Pe=(a?F:Z)-ke/2-(a?p:0),Ee=(a?Z:F)-(a?E:d+Le-me);t.select("."+Ft.cbbg).attr("x",Pe).attr("y",Ee).attr(a?"width":"height",Math.max(ve-me,2)).attr(a?"height":"width",Math.max(E+ke,2)).call(vd.fill,c).call(vd.stroke,e.bordercolor).style("stroke-width",f);var Ne=Ae?Math.max(_e-10,0):0;t.selectAll("."+Ft.cboutline).attr("x",(a?F:Z+p)+Ne).attr("y",(a?Z+d-E:F)+(re?we:0)).attr(a?"width":"height",Math.max(H,2)).attr(a?"height":"width",Math.max(E-(a?2*d+we:2*p+Ne),2)).call(vd.stroke,e.outlinecolor).style({fill:"none","stroke-width":s});var Fe=a?j*ve:0,ce=a?0:(1-G)*ve-Le;if(Fe=b?g.l-Fe:-Fe,ce=y?g.t-ce:-ce,t.attr("transform",ha(Fe,ce)),!a&&(f||cd(c).getAlpha()&&!cd.equals(_.paper_bgcolor,c))){var He=ge.selectAll("text"),Be=He[0].length,$e=t.select("."+Ft.cbbg).node(),Ke=va.bBox($e),je=va.getTranslate(t),R=2;He.each(function(Ie,Oe){var We=0,Ge=Be-1;if(Oe===We||Oe===Ge){var rt=va.bBox(this),at=va.getTranslate(this),Ye;if(Oe===Ge){var wt=rt.right+at.x,tt=Ke.right+je.x+Z-f-R+h;Ye=tt-wt,Ye>0&&(Ye=0)}else if(Oe===We){var qe=rt.left+at.x,vt=Ke.left+je.x+Z+f+R;Ye=vt-qe,Ye<0&&(Ye=0)}Ye&&(Be<3?this.setAttribute("transform","translate("+Ye+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var U={},V=_x[u],q=wx[u],le=_x[v],ae=wx[v],Re=ve-H;a?(n==="pixels"?(U.y=m,U.t=E*le,U.b=E*ae):(U.t=U.b=0,U.yt=m+i*le,U.yb=m-i*ae),l==="pixels"?(U.x=h,U.l=ve*V,U.r=ve*q):(U.l=Re*V,U.r=Re*q,U.xl=h-o*V,U.xr=h+o*q)):(n==="pixels"?(U.x=h,U.l=E*V,U.r=E*q):(U.l=U.r=0,U.xl=h+i*V,U.xr=h-i*q),l==="pixels"?(U.y=1-m,U.t=ve*le,U.b=ve*ae):(U.t=Re*le,U.b=Re*ae,U.yt=m-o*le,U.yb=m+o*ae));var Ce=e.y<.5?"b":"t",he=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var ie={r:_.width-Pe-Fe,l:Pe+U.r,b:_.height-Ee-ce,t:Ee+U.b};b&&y?Kf.autoMargin(r,e._id,U):b?r._fullLayout._reservedMargin[e._id][Ce]=ie[Ce]:y||a?r._fullLayout._reservedMargin[e._id][he]=ie[he]:r._fullLayout._reservedMargin[e._id][Ce]=ie[Ce]}return aa.syncOrAsync([Kf.previousPromises,Me,ue,De,Kf.previousPromises,Te],r)}function G6(t,e,r){var a=e.orientation==="v",i=r._fullLayout,n=i._size,o,l,s;bf.init({element:t.node(),gd:r,prepFn:function(){o=t.attr("transform"),ud(t)},moveFn:function(f,c){t.attr("transform",o+ha(f,c)),l=bf.align((a?e._uFrac:e._vFrac)+f/n.w,a?e._thickFrac:e._lenFrac,0,1,e.xanchor),s=bf.align((a?e._vFrac:1-e._uFrac)-c/n.h,a?e._lenFrac:e._thickFrac,0,1,e.yanchor);var u=bf.getCursor(l,s,e.xanchor,e.yanchor);ud(t,u)},doneFn:function(){if(ud(t),l!==void 0&&s!==void 0){var f={};f[e._propPrefix+"x"]=l,f[e._propPrefix+"y"]=s,e._traceIndex!==void 0?bx.call("_guiRestyle",r,f,e._traceIndex):bx.call("_guiRelayout",r,f)}}})}function U6(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(p){return p-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 V6(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 aa.coerce(n,l,H6,c,u)}return $6(n,l,f,s,a),N6(n,l,f,s),l}var W6={draw:O6},X6={moduleType:"component",name:"colorbar",attributes:sp,supplyDefaults:Ow,draw:W6.draw,hasColorbar:Ew},Y6={moduleType:"component",name:"legend",layoutAttributes:_T,supplyLayoutDefaults:wT,draw:MT,style:kT},q6={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"}},Z6={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}},K6=Je,cA=xe,dd=cA.extendFlat,Tx=cA.extendDeep;function kx(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 Q6(t){var e=["xaxis","yaxis","zaxis"];return e.indexOf(t.slice(0,5))>-1}var uA=function(e,r){var a,i=e.data,n=e.layout,o=Tx([],i),l=Tx({},n,kx(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++)Q6(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),K6.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 p=l[u[a]];p.xaxis||(p.xaxis={}),p.yaxis||(p.yaxis={}),p.zaxis||(p.zaxis={}),dd(p.xaxis,v),dd(p.yaxis,v),dd(p.zaxis,v),p._scene=null}}var d=document.createElement("div");r.tileClass&&(d.className=r.tileClass);var h={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"&&(h.config.setBackground=r.setBackground||"opaque"),h.gd.defaultLayout=kx(r.tileClass),h},J6=Fh.EventEmitter,e8=Je,t8=xe,Ax=Nr,r8=uA,a8=qp,i8=Zp;function n8(t,e){var r=new J6,a=r8(t,{}),i=a.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function n(){var l=Ax.getDelay(i._fullLayout);setTimeout(function(){var s=a8(i),f=document.createElement("canvas");f.id=t8.randstr(),r=i8({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=Ax.getRedrawFunc(i);return e8.call("_doPlot",i,a.data,a.layout,a.config).then(o).then(n).catch(function(l){r.emit("error",l)}),r}var o8=n8,Mx=Nr,l8={getDelay:Mx.getDelay,getRedrawFunc:Mx.getRedrawFunc,clone:uA,toSVG:qp,svgToImg:Zp,toImage:o8,downloadImage:V2},s8=l8;(function(t){t.version=$c.version;for(var e=Je,r=t.register=e.register,a=It,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(x$),r([W$,cN,Ts,SN,ON,u4,$4,X4,b6,M6,P6,Mo,X6,Y6,wa,d2]),r([q6,Z6]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(r(window.PlotlyLocales),delete window.PlotlyLocales),t.Icons=Mp;var l=wa,s=Kt;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=s8,t.PlotSchema=Uo})(v_);var f8=v_;const p9=Si(f8);var Ss={TEXTPAD:3,eventDataKeys:["value","label"]},Ht=Ri,Sx=Wo.axisHoverFormat,c8=cr.hovertemplateAttrs,u8=cr.texttemplateAttrs,vA=Ln,v8=fr,Lx=Ss,d8=$r.pattern,sn=Rt.extendFlat,hd=v8({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),h8=Ht.marker,p8=h8.line,m8=sn({},p8.width,{dflt:0}),y8=sn({width:m8,editType:"calc"},vA("marker.line")),g8=sn({line:y8,editType:"calc"},vA("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:d8,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:Ht.x,x0:Ht.x0,dx:Ht.dx,y:Ht.y,y0:Ht.y0,dy:Ht.dy,xperiod:Ht.xperiod,yperiod:Ht.yperiod,xperiod0:Ht.xperiod0,yperiod0:Ht.yperiod0,xperiodalignment:Ht.xperiodalignment,yperiodalignment:Ht.yperiodalignment,xhoverformat:Sx("x"),yhoverformat:Sx("y"),text:Ht.text,texttemplate:u8({editType:"plot"},{keys:Lx.eventDataKeys}),hovertext:Ht.hovertext,hovertemplate:c8({},{keys:Lx.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:sn({},hd,{description:"Sets the font used for `text`."}),insidetextfont:sn({},hd,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:sn({},hd,{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:sn({},Ht.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:g8,offsetgroup:Ht.offsetgroup,alignmentgroup:Ht.alignmentgroup,selected:{marker:{opacity:Ht.selected.marker.opacity,color:Ht.selected.marker.color,editType:"style"},textfont:Ht.selected.textfont,editType:"style"},unselected:{marker:{opacity:Ht.unselected.marker.opacity,color:Ht.unselected.marker.color,editType:"style"},textfont:Ht.unselected.textfont,editType:"style"},zorder:Ht.zorder},pm={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(" ")}},b8=ct,Cx=Ma.hasColorscale,Dx=bs,x8=xe.coercePattern,dA=function(e,r,a,i,n){var o=a("marker.color",i),l=Cx(e,"marker");l&&Dx(e,r,n,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",b8.defaultLine),Cx(e,"marker.line")&&Dx(e,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),x8(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")},Px=ht,Io=xe,Ex=ct,_8=Je,w8=Qp,T8=xu,k8=dA,A8=Jp,hA=Ls,xf=Io.coerceFont;function M8(t,e,r,a){function i(f,c){return Io.coerce(t,e,hA,f,c)}var n=w8(t,e,a,i);if(!n){e.visible=!1;return}T8(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");mA(t,e,a,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),k8(t,e,i,r,a);var l=(e.marker.line||{}).color,s=_8.getComponentMethod("errorbars","supplyDefaults");s(t,e,l||Ex.defaultLine,{axis:"y"}),s(t,e,l||Ex.defaultLine,{axis:"x",inherit:"y"}),Io.coerceSelectionMarkerOpacity(e,i)}function S8(t,e){var r,a;function i(l,s){return Io.coerce(a._input,a,hA,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=pA(o)),A8(r,a,e,i,e.barmode)}}function pA(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 mA(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,p=Array.isArray(i)||i==="auto",d=p||i==="inside",h=p||i==="outside";if(d||h){var m=xf(a,"textfont",r.font),y=Io.extendFlat({},m),b=t.textfont&&t.textfont.color,_=!b;if(_&&delete y.color,xf(a,"insidetextfont",y),v){var g=Io.extendFlat({},m);_&&delete g.color,xf(a,"pathbar.textfont",g)}h&&xf(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 _n={supplyDefaults:M8,crossTraceDefaults:S8,handleText:mA,validateCornerradius:pA},L8=Je,C8=Ct,D8=xe,P8=pm,E8=_n.validateCornerradius,yA=function(t,e,r){function a(h,m){return D8.coerce(t,e,P8,h,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(L8.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 p=C8.getFromId({_fullLayout:e},u[u.orientation==="v"?"xaxis":"yaxis"]);p.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=E8(d)},Kn=xe,mm=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;Kn.mergeArray(r.text,e,"tx"),Kn.mergeArray(r.hovertext,e,"htx");var i=r.marker;if(i){Kn.mergeArray(i.opacity,e,"mo",!0),Kn.mergeArray(i.color,e,"mc");var n=i.line;n&&(Kn.mergeArray(n.color,e,"mlc"),Kn.mergeArrayCastPositive(n.width,e,"mlw"))}},zx=Ct,Rx=_u,Ix=Ma.hasColorscale,Fx=fp,z8=mm,R8=nk,I8=function(e,r){var a=zx.getFromId(e,r.xaxis||"x"),i=zx.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=Rx(r,i,"y",l),f=!!r.yperiodalignment,c="y"):(n=i.makeCalcdata(r,"y",u),l=a.makeCalcdata(r,"x"),s=Rx(r,a,"x",l),f=!!r.xperiodalignment,c="x"),o=s.vals;for(var v=Math.min(o.length,n.length),p=new Array(v),d=0;d<v;d++)p[d]={p:o[d],s:n[d]},f&&(p[d].orig_p=l[d],p[d][c+"End"]=s.ends[d],p[d][c+"Start"]=s.starts[d]),r.ids&&(p[d].id=String(r.ids[d]));return Ix(r,"marker")&&Fx(e,r,{vals:r.marker.color,containerStr:"marker"}),Ix(r,"marker.line")&&Fx(e,r,{vals:r.marker.line.color,containerStr:"marker.line"}),z8(p,r),R8(p,r),p},F8=ut,$8=xe;function N8(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=F8.select(this).select("text");$8.setTransormAndDisplay(f,s)}})}}function H8(t,e,r){if(r.uniformtext.mode){var a=gA(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 O8(t,e){var r=gA(t);e[r]=void 0}function gA(t){return"_"+t+"Text_minsize"}var ai={recordMinTextSize:H8,clearMinTextSize:O8,resizeText:N8},ii={},j8=ht,B8=Ta,bA=xe.isArrayOrTypedArray;ii.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};ii.coerceNumber=function(t,e,r){if(j8(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};ii.coerceColor=function(t,e,r){return B8(e).isValid()?e:r!==void 0?r:t.dflt};ii.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),t.values.indexOf(e)!==-1?e:r!==void 0?r:t.dflt};ii.getValue=function(t,e){var r;return bA(t)?e<t.length&&(r=t[e]):r=t,r};ii.getLineWidth=function(t,e){var r=0<e.mlw?e.mlw:bA(t.marker.line.width)?0:t.marker.line.width;return r};var Bl=ut,G8=ct,us=kt,xA=xe,_A=Je,wA=ai.resizeText,ym=Ls,U8=ym.textfont,V8=ym.insidetextfont,W8=ym.outsidetextfont,vr=ii;function X8(t){var e=Bl.select(t).selectAll('g[class^="barlayer"]').selectAll("g.trace");wA(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)&&Bl.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(i){var n=Bl.select(this),o=i[0].trace;TA(n,o,t)}),_A.getComponentMethod("errorbars","style")(e)}function TA(t,e,r){us.pointStyle(t.selectAll("path"),e,r),kA(t,e,r)}function kA(t,e,r){t.selectAll("text").each(function(a){var i=Bl.select(this),n=xA.ensureUniformFontSize(r,AA(i,a,e,r));us.font(i,n)})}function Y8(t,e,r){var a=e[0].trace;a.selectedpoints?q8(r,a,t):(TA(r,a,t),_A.getComponentMethod("errorbars","style")(r))}function q8(t,e,r){us.selectedPointStyle(t.selectAll("path"),e),Z8(t.selectAll("text"),e,r)}function Z8(t,e,r){t.each(function(a){var i=Bl.select(this),n;if(a.selected){n=xA.ensureUniformFontSize(r,AA(i,a,e,r));var o=e.selected.textfont&&e.selected.textfont.color;o&&(n.color=o),us.font(i,n)}else us.selectedTextStyle(i,e)})}function AA(t,e,r,a){var i=a._fullLayout.font,n=r.textfont;if(t.classed("bartext-inside")){var o=CA(e,r);n=SA(r,e.i,i,o)}else t.classed("bartext-outside")&&(n=LA(r,e.i,i));return n}function MA(t,e,r){return gm(U8,t.textfont,e,r)}function SA(t,e,r,a){var i=MA(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:G8.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}),gm(V8,t.insidetextfont,e,i)}function LA(t,e,r){var a=MA(t,e,r);return gm(W8,t.outsidetextfont,e,a)}function gm(t,e,r,a){e=e||{};var i=vr.getValue(e.family,r),n=vr.getValue(e.size,r),o=vr.getValue(e.color,r),l=vr.getValue(e.weight,r),s=vr.getValue(e.style,r),f=vr.getValue(e.variant,r),c=vr.getValue(e.textcase,r),u=vr.getValue(e.lineposition,r),v=vr.getValue(e.shadow,r);return{family:vr.coerceString(t.family,i,a.family),size:vr.coerceNumber(t.size,n,a.size),color:vr.coerceColor(t.color,o,a.color),weight:vr.coerceString(t.weight,l,a.weight),style:vr.coerceString(t.style,s,a.style),variant:vr.coerceString(t.variant,f,a.variant),textcase:vr.coerceString(t.variant,c,a.textcase),lineposition:vr.coerceString(t.variant,u,a.lineposition),shadow:vr.coerceString(t.variant,v,a.shadow)}}function CA(t,e){return e.type==="waterfall"?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}var wn={style:X8,styleTextPoints:kA,styleOnSelect:Y8,getInsideTextFont:SA,getOutsideTextFont:LA,getBarColor:CA,resizeText:wA},_f=ut,wf=ht,lr=xe,K8=or,Q8=ct,bi=kt,J8=Je,Pc=Ct.tickText,DA=ai,eH=DA.recordMinTextSize,tH=DA.clearMinTextSize,pd=wn,Fo=ii,rH=Ss,PA=Ls,aH=PA.text,iH=PA.textposition,nH=la.appendArrayPointValue,_r=rH.TEXTPAD;function oH(t){return t.id}function lH(t){if(t.ids)return oH}function md(t){return(t>0)-(t<0)}function Fa(t,e){return t<e?1:-1}function sH(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 EA(t,e,r,a){if(!e.uniformtext.mode&&zA(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 zA(t){return t&&t.duration>0}function fH(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},tH("bar",s));var c=lr.makeTraceGroups(a,r,"trace bars").each(function(u){var v=_f.select(this),p=u[0].trace,d=u[0].t,h=p.type==="waterfall",m=p.type==="funnel",y=p.type==="histogram",b=p.type==="bar",_=b||m,g=0;h&&p.connector.visible&&p.connector.mode==="between"&&(g=p.connector.line.width/2);var x=p.orientation==="h",w=zA(i),T=lr.ensureSingle(v,"g","points"),A=lH(p),M=T.selectAll("g.point").data(lr.identity,A);M.enter().append("g").classed("point",!0),M.exit().remove(),M.each(function(L,z){var $=_f.select(this),N=sH(L,o,l,x),I=N[0][0],H=N[0][1],D=N[1][0],E=N[1][1],k=(x?H-I:E-D)===0;k&&_&&Fo.getLineWidth(p,L)&&(k=!1),k||(k=!wf(I)||!wf(H)||!wf(D)||!wf(E)),L.isBlank=k,k&&(x?H=I:E=D),g&&!k&&(x?(I-=Fa(I,H)*g,H+=Fa(I,H)*g):(D-=Fa(D,E)*g,E+=Fa(D,E)*g));var C,P;if(p.type==="waterfall"){if(!k){var F=p[L.dir].marker;C=F.line.width,P=F.color}}else C=Fo.getLineWidth(p,L),P=L.mc||p.marker.color;function j(J){var _e=_f.round(C/2%1,2);return i.gap===0&&i.groupgap===0?_f.round(Math.round(J)-_e,2):J}function G(J,_e,re){return re&&J===_e?J:Math.abs(J-_e)>=2?j(J):J>_e?Math.ceil(J):Math.floor(J)}var X=Q8.opacity(P),O=X<1||C>.01?j:G;t._context.staticPlot||(I=O(I,H,x),H=O(H,I,x),D=O(D,E,!x),E=O(E,D,!x));var Z=x?o.c2p:l.c2p,W;L.s0>0?W=L._sMax:L.s0<0?W=L._sMin:W=L.s1>0?L._sMax:L._sMin;function Y(J,_e){if(!J)return 0;var re=Math.abs(x?E-D:H-I),Ae=Math.abs(x?H-I:E-D),Le=O(Math.abs(Z(W,!0)-Z(0,!0))),K=L.hasB?Math.min(re/2,Ae/2):Math.min(re/2,Le),ne;if(_e==="%"){var ve=Math.min(50,J);ne=re*(ve/100)}else ne=J;return O(Math.max(Math.min(ne,K),0))}var B=b||y?Y(d.cornerradiusvalue,d.cornerradiusform):0,Q,ee,se="M"+I+","+D+"V"+E+"H"+H+"V"+D+"Z",oe=0;if(B&&L.s){var fe=md(L.s0)===0||md(L.s)===md(L.s0)?L.s1:L.s0;if(oe=O(L.hasB?0:Math.abs(Z(W,!0)-Z(fe,!0))),oe<B){var pe=Fa(I,H),ge=Fa(D,E),be=pe===-ge?1:0;if(x)if(L.hasB)Q="M"+(I+B*pe)+","+D+"A "+B+","+B+" 0 0 "+be+" "+I+","+(D+B*ge)+"V"+(E-B*ge)+"A "+B+","+B+" 0 0 "+be+" "+(I+B*pe)+","+E+"H"+(H-B*pe)+"A "+B+","+B+" 0 0 "+be+" "+H+","+(E-B*ge)+"V"+(D+B*ge)+"A "+B+","+B+" 0 0 "+be+" "+(H-B*pe)+","+D+"Z";else{ee=Math.abs(H-I)+oe;var we=ee<B?B-Math.sqrt(ee*(2*B-ee)):0,ye=oe>0?Math.sqrt(oe*(2*B-oe)):0,de=pe>0?Math.max:Math.min;Q="M"+I+","+D+"V"+(E-we*ge)+"H"+de(H-(B-oe)*pe,I)+"A "+B+","+B+" 0 0 "+be+" "+H+","+(E-B*ge-ye)+"V"+(D+B*ge+ye)+"A "+B+","+B+" 0 0 "+be+" "+de(H-(B-oe)*pe,I)+","+(D+we*ge)+"Z"}else if(L.hasB)Q="M"+(I+B*pe)+","+D+"A "+B+","+B+" 0 0 "+be+" "+I+","+(D+B*ge)+"V"+(E-B*ge)+"A "+B+","+B+" 0 0 "+be+" "+(I+B*pe)+","+E+"H"+(H-B*pe)+"A "+B+","+B+" 0 0 "+be+" "+H+","+(E-B*ge)+"V"+(D+B*ge)+"A "+B+","+B+" 0 0 "+be+" "+(H-B*pe)+","+D+"Z";else{ee=Math.abs(E-D)+oe;var Me=ee<B?B-Math.sqrt(ee*(2*B-ee)):0,De=oe>0?Math.sqrt(oe*(2*B-oe)):0,ue=ge>0?Math.max:Math.min;Q="M"+(I+Me*pe)+","+D+"V"+ue(E-(B-oe)*ge,D)+"A "+B+","+B+" 0 0 "+be+" "+(I+B*pe-De)+","+E+"H"+(H-B*pe+De)+"A "+B+","+B+" 0 0 "+be+" "+(H-Me*pe)+","+ue(E-(B-oe)*ge,D)+"V"+D+"Z"}}else Q=se}else Q=se;var Te=EA(lr.ensureSingle($,"path"),s,i,n);if(Te.style("vector-effect",f?"none":"non-scaling-stroke").attr("d",isNaN((H-I)*(E-D))||k&&t._context.staticPlot?"M0,0Z":Q).call(bi.setClipUrl,e.layerClipId,t),!s.uniformtext.mode&&w){var Se=bi.makePointStyleFns(p);bi.singlePointStyle(L,Te,p,Se,t)}cH(t,e,$,u,z,I,H,D,E,B,oe,i,n),e.layerClipId&&bi.hideOutsideRangePoint(L,$.select("text"),o,l,p.xcalendar,p.ycalendar)});var S=p.cliponaxis===!1;bi.setClipUrl(v,S?null:e.layerClipId,t)});J8.getComponentMethod("errorbars","plot")(t,c,e,i)}function cH(t,e,r,a,i,n,o,l,s,f,c,u,v){var p=e.xaxis,d=e.yaxis,h=t._fullLayout,m;function y(ee,se,oe){var fe=lr.ensureSingle(ee,"text").text(se).attr({class:"bartext bartext-"+m,"text-anchor":"middle","data-notex":1}).call(bi.font,oe).call(K8.convertToTspans,t);return fe}var b=a[0].trace,_=b.orientation==="h",g=dH(h,a,i,p,d);m=hH(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=h.font,L=pd.getBarColor(a[i],b),z=pd.getInsideTextFont(b,i,S,L),$=pd.getOutsideTextFont(b,i,S),N=b.insidetextanchor||"end",I=r.datum();_?p.type==="log"&&I.s0<=0&&(p.range[0]<p.range[1]?n=0:n=p._length):d.type==="log"&&I.s0<=0&&(d.range[0]<d.range[1]?l=d._length:l=0);var H=Math.abs(o-n),D=Math.abs(s-l),E=H-2*_r,k=D-2*_r,C,P,F,j,G;if(m==="outside"&&!T&&!w.hasB&&(m="inside"),m==="auto")if(T){m="inside",G=lr.ensureUniformFontSize(t,z),C=y(r,g,G),P=bi.bBox(C.node()),F=P.width,j=P.height;var X=F>0&&j>0,O;M?A?O=qi(E-2*f,k,F,j,_)||qi(E,k-2*f,F,j,_):_?O=qi(E-(f-c),k,F,j,_)||qi(E,k-2*(f-c),F,j,_):O=qi(E,k-(f-c),F,j,_)||qi(E-2*(f-c),k,F,j,_):O=qi(E,k,F,j,_),X&&O?m="inside":(m="outside",C.remove(),C=null)}else m="inside";if(!C){G=lr.ensureUniformFontSize(t,m==="outside"?$:z),C=y(r,g,G);var Z=C.attr("transform");if(C.attr("transform",""),P=bi.bBox(C.node()),F=P.width,j=P.height,C.attr("transform",Z),F<=0||j<=0){C.remove();return}}var W=b.textangle,Y,B;m==="outside"?(B=b.constraintext==="both"||b.constraintext==="outside",Y=vH(n,o,l,s,P,{isHorizontal:_,constrained:B,angle:W})):(B=b.constraintext==="both"||b.constraintext==="inside",Y=FA(n,o,l,s,P,{isHorizontal:_,constrained:B,angle:W,anchor:N,hasB:A,r:f,overhead:c})),Y.fontSize=G.size,eH(b.type==="histogram"?"bar":b.type,Y,h),w.transform=Y;var Q=EA(C,h,u,v);lr.setTransormAndDisplay(Q,Y)}function qi(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 RA(t){return t==="auto"?0:t}function IA(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 FA(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,p=(v+1)/2,d=1-p,h=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=RA(s);s==="auto"&&!(b<=g&&_<=x)&&(b>g||_>x)&&(!(b>x||_>g)||b<_!=g<x)&&(T+=90);var A=IA(i,T),M,S;if(m&&m-y>_r){var L=uH(t,e,r,a,A,m,y,o,h);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*p,$=(i.top+i.bottom)/2,N=(t+_r)*d+(e-_r)*p,I=(r+a)/2,H=0,D=0;if(u||c){var E=(o?A.x:A.y)/2;m&&(c||h)&&(w+=S);var k=o?Fa(t,e):Fa(r,a);o?u?(N=t+k*w,H=-k*E):(N=e-k*w,H=k*E):u?(I=r+k*w,D=-k*E):(I=a-k*w,D=k*E)}return{textX:z,textY:$,targetX:N,targetY:I,anchorX:H,anchorY:D,scale:M,rotate:T}}function uH(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,p=s?u*2:l?u-o:2*v,d=s?u*2:l?2*v:u-o,h,m,y,b,_;return i.y/i.x>=c/(f-p)?b=c/i.y:i.y/i.x<=(c-d)/f?b=f/i.x:!s&&l?(h=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*h*y))/(2*h)):s?(h=(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*h*y))/(2*h)):(h=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*h*y))/(2*h)),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 vH(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),p;o?p=v>2*_r?_r:0:p=u>2*_r?_r:0;var d=1;l&&(d=o?Math.min(1,v/c):Math.min(1,u/f));var h=RA(s),m=IA(i,h),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?Fa(e,t):Fa(r,a);return o?(g=e-A*p,w=A*y):(x=a+A*p,T=-A*y),{textX:b,textY:_,targetX:g,targetY:x,anchorX:w,anchorY:T,scale:d,rotate:h}}function dH(t,e,r,a,i){var n=e[0].trace,o=n.texttemplate,l;return o?l=pH(t,e,r,a,i):n.textinfo?l=mH(e,r,a,i):l=Fo.getValue(n.text,r),Fo.coerceString(aH,l)}function hH(t,e){var r=Fo.getValue(t.textposition,e);return Fo.coerceEnumerated(iH,r)}function pH(t,e,r,a,i){var n=e[0].trace,o=lr.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,p,d;c?(u="y",v=i,p="x",d=a):(u="x",v=a,p="y",d=i);function h(w){return Pc(v,v.c2l(w),!0).text}function m(w){return Pc(d,d.c2l(w),!0).text}var y=e[r],b={};b.label=y.p,b.labelLabel=b[u+"Label"]=h(y.p);var _=lr.castOption(n,y.i,"text");(_===0||_)&&(b.text=_),b.value=y.s,b.valueLabel=b[p+"Label"]=m(y.s);var g={};nH(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=lr.formatPercent(y.begR),b.percentPrevious=y.difR,b.percentPreviousLabel=lr.formatPercent(y.difR),b.percentTotal=y.sumR,b.percenTotalLabel=lr.formatPercent(y.sumR));var x=lr.castOption(n,y.i,"customdata");return x&&(b.customdata=x),lr.texttemplateString(o,b,t._d3locale,g,b,n._meta||{})}function mH(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 Pc(w,x,!0).text}function f(x){var w=n?r:a;return Pc(w,+x,!0).text}var c=i.textinfo,u=t[e],v=c.split("+"),p=[],d,h=function(x){return v.indexOf(x)!==-1};if(h("label")&&p.push(s(t[e].p)),h("text")&&(d=lr.castOption(i,u.i,"text"),(d===0||d)&&p.push(d)),o){var m=+u.rawS||u.s,y=u.v,b=y-m;h("initial")&&p.push(f(b)),h("delta")&&p.push(f(m)),h("final")&&p.push(f(y))}if(l){h("value")&&p.push(f(u.s));var _=0;h("percent initial")&&_++,h("percent previous")&&_++,h("percent total")&&_++;var g=_>1;h("percent initial")&&(d=lr.formatPercent(u.begR),g&&(d+=" of initial"),p.push(d)),h("percent previous")&&(d=lr.formatPercent(u.difR),g&&(d+=" of previous"),p.push(d)),h("percent total")&&(d=lr.formatPercent(u.sumR),g&&(d+=" of total"),p.push(d))}return p.join("<br>")}var bm={plot:fH,toMoveInsideBar:FA},wl=wa,yH=Je,$x=ct,gH=xe.fillText,bH=ii.getLineWidth,yd=Ct.hoverLabelText,xH=Xt.BADNUM;function _H(t,e,r,a,i){var n=wH(t,e,r,a,i);if(n){var o=n.cd,l=o[0].trace,s=o[n.index];return n.color=TH(l,s),yH.getComponentMethod("errorbars","hoverInfo")(s,l,n),[n]}}function wH(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,p,d,h,m,y,b;o.orientation==="h"?(v=r,p=e,d="y",h="x",m=I,y=z):(v=e,p=r,d="x",h="y",y=I,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 W=O.w;return O[d]+Z*W/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,W){return i.finiteRange&&(W=0),wl.inbox(O-v,Z-v,W+Math.min(1,Math.abs(Z-O)/b)-1)}function z(O){return L(M(O),S(O),c)}function $(O){return L(x(O),w(O),u)}function N(O){var Z=O[h];if(f){var W=Math.abs(O.rawS)||0;p>0?Z+=W:p<0&&(Z-=W)}return Z}function I(O){var Z=p,W=O.b,Y=N(O);return wl.inbox(W-Z,Y-Z,c+(Y-Z)/(Y-W)-1)}function H(O){var Z=p,W=O.b,Y=N(O);return wl.inbox(W-Z,Y-Z,u+(Y-Z)/(Y-W)-1)}var D=t[d+"a"],E=t[h+"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!==xH){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 P=t.index,F=n[P],j=o.base?F.b+F.s:F.s;t[h+"0"]=t[h+"1"]=E.c2p(F[h],!0),t[h+"LabelVal"]=j;var G=l.extents[l.extents.round(F.p)];t[d+"0"]=D.c2p(s?M(F):G[0],!0),t[d+"1"]=D.c2p(s?S(F):G[1],!0);var X=F.orig_p!==void 0;return t[d+"LabelVal"]=X?F.orig_p:F.p,t.labelLabel=yd(D,t[d+"LabelVal"],o[d+"hoverformat"]),t.valueLabel=yd(E,t[h+"LabelVal"],o[h+"hoverformat"]),t.baseLabel=yd(E,F.b,o[h+"hoverformat"]),t.spikeDistance=(H(F)+$(F))/2,t[d+"Spike"]=D.c2p(F.p,!0),gH(F,o,t),t.hovertemplate=o.hovertemplate,t}}function TH(t,e){var r=e.mcc||t.marker.color,a=e.mlcc||t.marker.line.color,i=bH(t,e);if($x.opacity(r))return r;if($x.opacity(a)&&i)return a}var $A={hoverPoints:_H},kH=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},NA=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:AH(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 AH(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 MH={attributes:Ls,layoutAttributes:pm,supplyDefaults:_n.supplyDefaults,crossTraceDefaults:_n.crossTraceDefaults,supplyLayoutDefaults:yA,calc:I8,crossTraceCalc:im.crossTraceCalc,colorbar:As,arraysToCalcdata:mm,plot:bm.plot,style:wn.style,styleOnSelect:wn.styleOnSelect,hoverPoints:$A.hoverPoints,eventData:kH,selectPoints:NA,moduleType:"trace",name:"bar",basePlotModule:Qt,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(" ")}},SH=MH;const m9=Si(SH);var LH=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"}},CH={eventDataKeys:["binNumber"]},Cr=Ls,Nx=Wo.axisHoverFormat,DH=cr.hovertemplateAttrs,PH=cr.texttemplateAttrs,gd=fr,Hx=LH,EH=CH,bd=Rt.extendFlat,HA={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:Nx("x"),yhoverformat:Nx("y"),text:bd({},Cr.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:bd({},Cr.hovertext,{description:"Same as `text`."}),orientation:Cr.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:Hx("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:Hx("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:DH({},{keys:EH.eventDataKeys}),texttemplate:PH({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:bd({},Cr.textposition,{arrayOk:!1}),textfont:gd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:gd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:gd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),insidetextanchor:Cr.insidetextanchor,textangle:Cr.textangle,cliponaxis:Cr.cliponaxis,constraintext:Cr.constraintext,marker:Cr.marker,offsetgroup:Cr.offsetgroup,alignmentgroup:Cr.alignmentgroup,selected:Cr.selected,unselected:Cr.unselected,zorder:Cr.zorder},Ox=Je,Tl=xe,jx=ct,zH=_n.handleText,RH=dA,IH=HA,FH=function(e,r,a,i){function n(b,_){return Tl.coerce(e,r,IH,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");zH(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",p=o&&l?Math.min(Tl.minRowLength(o)&&Tl.minRowLength(l)):Tl.minRowLength(r[u]||[]);if(!p){r.visible=!1;return}r._length=p;var d=Ox.getComponentMethod("calendars","handleTraceDefaults");d(e,r,["x","y"],i);var h=r[v];h&&n("histfunc"),n("histnorm"),n("autobin"+u),RH(e,r,n,a,i),Tl.coerceSelectionMarkerOpacity(r,n);var m=(r.marker.line||{}).color,y=Ox.getComponentMethod("errorbars","supplyDefaults");y(e,r,m||jx.defaultLine,{axis:"y"}),y(e,r,m||jx.defaultLine,{axis:"x",inherit:"y"}),n("zorder")},zl=xe,$H=Ut,Tf=Je.traceIs,NH=Jp,HH=_n.validateCornerradius,Bx=zl.nestedProperty,xd=ri.getAxisGroup,Gx=[{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"}],OH=["x","y"],jH=function(e,r){var a=r._histogramBinOpts={},i=[],n={},o=[],l,s,f,c,u,v,p;function d(I,H){return zl.coerce(l._input,l,l._module.attributes,I,H)}function h(I){return I.orientation==="v"?"x":"y"}function m(I,H){var D=$H.getFromTrace({_fullLayout:r},I,H);return D.type}function y(I,H,D){var E=I.uid+"__"+D;H||(H=E);var k=m(I,D),C=I[D+"calendar"]||"",P=a[H],F=!0;P&&(k===P.axType&&C===P.calendar?(F=!1,P.traces.push(I),P.dirs.push(D)):(H=E,k!==P.axType&&zl.warn(["Attempted to group the bins of trace",I.index,"set on a","type:"+k,"axis","with bins on","type:"+P.axType,"axis."].join(" ")),C!==P.calendar&&zl.warn(["Attempted to group the bins of trace",I.index,"set with a",C,"calendar","with bins",P.calendar?"on a "+P.calendar+" calendar":"w/o a set calendar"].join(" ")))),F&&(a[H]={traces:[I],dirs:[D],axType:k,calendar:I[D+"calendar"]||""}),I["_"+D+"bingroup"]=H}for(u=0;u<e.length;u++)if(l=e[u],Tf(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=HH(b))}Tf(l,"2dMap")||NH(l._input,l,r,d,r.barmode)}var _=r._alignmentOpts||{};for(u=0;u<i.length;u++){if(l=i[u],f="",!Tf(l,"2dMap")){if(c=h(l),r.barmode==="group"&&l.alignmentgroup){var g=l[c+"axis"],x=xd(r,g)+l.orientation;(_[x]||{})[l.alignmentgroup]&&(f=x)}!f&&r.barmode!=="overlay"&&(f=xd(r,l.xaxis)+xd(r,l.yaxis)+h(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,h(l))}}for(u=0;u<o.length;u++){l=o[u];var A=d("bingroup");if(Tf(l,"2dMap"))for(p=0;p<2;p++){c=OH[p];var M=d(c+"bingroup",A?A+"__"+c:null);y(l,M,c)}else y(l,A,h(l))}for(f in a){var S=a[f];for(s=S.traces,v=0;v<Gx.length;v++){var L=Gx[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],$=L.aStr[c],Bx(l._input,$).get()!==void 0){S[z]=d($),S[z+"Found"]=!0;break}N=(l._autoBin||{})[c]||{},N[z]&&Bx(l,$).set(N[z])}if(z==="start"||z==="end")for(;u<s.length;u++)l=s[u],l["_"+c+"bingroup"]&&(N=(l._autoBin||{})[c]||{},d($,N[z]));z==="nbins"&&!S.sizeFound&&!S.nbinsFound&&(l=s[0],S[z]=d($))}}}},Qn=ht,BH={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,a){var i=a[e];return Qn(i)?(i=Number(i),r[t]+=i,i):0},avg:function(t,e,r,a,i){var n=a[e];return Qn(n)&&(n=Number(n),r[t]+=n,i[t]++),0},min:function(t,e,r,a){var i=a[e];if(Qn(i))if(i=Number(i),Qn(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(Qn(i))if(i=Number(i),Qn(r[t])){if(r[t]<i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0}},GH={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}},UH=function(e,r){for(var a=e.length,i=0,n=0;n<a;n++)r[n]?(e[n]/=r[n],i+=e[n]):e[n]=null;return i},Zo=Xt,pn=Zo.ONEAVGYEAR,Ux=Zo.ONEAVGMONTH,Ec=Zo.ONEDAY,Vx=Zo.ONEHOUR,Wx=Zo.ONEMIN,Xx=Zo.ONESEC,Yx=Ct.tickIncrement,VH=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(kf(f+l,f+s,i,n),kf(c+l,c+s,i,n)),v=Math.min(kf(f+o,f+l,i,n),kf(c+o,c+l,i,n)),p,d;if(u>v&&v<Math.abs(c-f)/4e3?(p=u,d=!1):(p=Math.min(u,v),d=!0),i.type==="date"&&p>Ec){var h=p===pn?1:6,m=p===pn?"M12":"M1";return function(y,b){var _=i.c2d(y,pn,n),g=_.indexOf("-",h);g>0&&(_=_.substr(0,g));var x=i.d2c(_,0,n);if(x<y){var w=Yx(x,m,!1,n);(x+w)/2<y+e&&(x=w)}return b&&d?Yx(x,m,!0,n):x}}return function(y,b){var _=p*Math.round(y/p);return _+p/10<y&&_+p*.9<y+e&&(_+=p),b&&d&&(_-=p),_}};function kf(t,e,r,a){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),n=r.type==="date",o=qx(i,n),l=0;l<10;l++){var s=qx(o*80,n);if(o===s)break;if(WH(s,t,e,n,r,a))o=s;else break}return o}function qx(t,e){return e&&t>Xx?t>Ec?t>pn*1.1?pn:t>Ux*1.1?Ux:Ec:t>Vx?Vx:t>Wx?Wx:Xx:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function WH(t,e,r,a,i,n){if(a&&t>Ec){var o=Zx(e,i,n),l=Zx(r,i,n),s=t===pn?0:1;return o[s]!==l[s]}return Math.floor(r/t)-Math.floor(e/t)>.1}function Zx(t,e,r){var a=e.c2d(t,pn,r).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}var Sh=ht,xr=xe,Kx=Je,Jr=Ct,XH=mm,Qx=BH,YH=GH,qH=UH,ZH=VH;function KH(t,e){var r=[],a=[],i=e.orientation==="h",n=Jr.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=OA(t,e,n,o),v=u[0],p=u[1],d=typeof v.size=="string",h=[],m=d?h: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,$=Qx.count,N=YH[x],I=!1,H=function(ee){return n.r2c(ee,0,s)},D;for(xr.isArrayOrTypedArray(e[l])&&w!=="count"&&(D=e[l],I=w==="avg",$=Qx[w]),c=H(v.start),M=H(v.end)+(c-Jr.tickIncrement(c,v.size,!1,s))/1e6;c<M&&r.length<1e6&&(A=Jr.tickIncrement(c,v.size,!1,s),r.push((c+A)/2),a.push(z),_.push([]),h.push(c),T&&y.push(1/(A-c)),I&&b.push(0),!(A<=c));)c=A;h.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 E=e["_"+o+"bingroup"],k={leftGap:1/0,rightGap:1/0};E&&(t._fullLayout._roundFnOpts[E]||(t._fullLayout._roundFnOpts[E]=k),k=t._fullLayout._roundFnOpts[E]);var C=a.length,P=!0,F=k.leftGap,j=k.rightGap,G={};for(c=0;c<p.length;c++){var X=p[c];S=xr.findBin(X,m),S>=0&&S<C&&(g+=$(S,c,a,D,b),P&&_[S].length&&X!==p[_[S][0]]&&(P=!1),_[S].push(c),G[c]=S,F=Math.min(F,X-h[S]),j=Math.min(j,h[S+1]-X))}k.leftGap=F,k.rightGap=j;var O;P||(O=function(ee,se){return function(){var oe=t._fullLayout._roundFnOpts[E];return ZH(oe.leftGap,oe.rightGap,h,n,s)(ee,se)}}),I&&(g=qH(a,b)),N&&N(a,g,y),f.enabled&&eO(a,f.direction,f.currentbin);var Z=Math.min(r.length,a.length),W=[],Y=0,B=Z-1;for(c=0;c<Z;c++)if(a[c]){Y=c;break}for(c=Z-1;c>=Y;c--)if(a[c]){B=c;break}for(c=Y;c<=B;c++)if(Sh(r[c])&&Sh(a[c])){var Q={p:r[c],s:a[c],b:0};f.enabled||(Q.pts=_[c],P?Q.ph0=Q.ph1=_[c].length?p[_[c][0]]:r[c]:(e._computePh=!0,Q.ph0=O(h[c]),Q.ph1=O(h[c+1],!0))),W.push(Q)}return W.length===1&&(W[0].width1=Jr.tickIncrement(W[0].p,v.size,!1,s)-W[0].p),XH(W,e),xr.isArrayOrTypedArray(e.selectedpoints)&&xr.tagSelected(W,e,G),W}function OA(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,p,d,h,m,y=function(X){return r.r2c(X,0,p)},b=function(X){return r.c2r(X,0,p)},_=r.type==="date"?function(X){return X||X===0?xr.cleanDate(X,null,p):null}:function(X){return Sh(X)?Number(X):null};function g(X,O,Z){O[X+"Found"]?(O[X]=_(O[X]),O[X]===null&&(O[X]=Z[X])):(h[X]=O[X]=Z[X],xr.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=xr.concat(x,d),delete v["_"+a+"autoBinFinished"],e.visible===!0&&(w?w=!1:(delete v._autoBin,v["_"+a+"autoBinFinished"]=1),Kx.traceIs(v,"2dMap")&&(T=!0),v.type==="histogram2dcontour"&&(A=!0))}p=u[0][a+"calendar"];var S=Jr.autoBin(x,r,s.nbins,T,p,s.sizeFound&&s.size),L=u[0]._autoBin={};if(h=L[s.dirs[0]]={},A&&(s.size||(S.start=b(Jr.tickIncrement(y(S.start),S.size,!0,p))),s.end===void 0&&(S.end=b(Jr.tickIncrement(y(S.end),S.size,!1,p)))),f&&!Kx.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=QH(t,e,r,a,n)}m=v.cumulative||{},m.enabled&&m.currentbin!=="include"&&(m.direction==="decreasing"?S.start=b(Jr.tickIncrement(y(S.start),S.size,!0,p)):S.end=b(Jr.tickIncrement(y(S.end),S.size,!1,p))),s.size=S.size,s.sizeFound||(h.size=S.size,xr.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]||{},$=xr.extendFlat({},s),N=s.start,I=r.r2l(z.start),H=I!==void 0;if((s.startFound||H)&&I!==r.r2l(N)){var D=H?I:xr.aggNums(Math.min,null,d),E={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:s.size,tick0:N,calendar:p,range:[D,Jr.tickIncrement(D,s.size,!1,p)].map(r.l2r)},k=Jr.tickFirst(E);k>r.r2l(D)&&(k=Jr.tickIncrement(k,s.size,!0,p)),$.start=r.l2r(k),H||xr.nestedProperty(e,n+".start").set($.start)}var C=s.end,P=r.r2l(z.end),F=P!==void 0;if((s.endFound||F)&&P!==r.r2l(C)){var j=F?P:xr.aggNums(Math.max,null,d);$.end=r.l2r(j),F||xr.nestedProperty(e,n+".start").set($.end)}var G="autobin"+a;return e._input[G]===!1&&(e._input[n]=xr.extendFlat({},e[n]||{}),delete e._input[G],delete e[G]),[$,d]}function QH(t,e,r,a,i){var n=t._fullLayout,o=JH(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 p=OA(t,u,r,a,!0),d=p[0],h=p[2];u["_"+a+"autoBinFinished"]=1,u["_"+a+"pos0"]=p[1],h?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=xr.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&&xr.extendFlat(v,g)}return e[i]}function JH(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 eO(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 tO={calc:KH},rO=$A.hoverPoints,aO=Ct.hoverLabelText,iO=function(e,r,a,i,n){var o=rO(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"]=aO(e[f+"a"],[l.ph0,l.ph1],s[f+"hoverformat"])}return o}},nO=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},oO={attributes:HA,layoutAttributes:pm,supplyDefaults:FH,crossTraceDefaults:jH,supplyLayoutDefaults:yA,calc:tO.calc,crossTraceCalc:im.crossTraceCalc,plot:bm.plot,layerName:"barlayer",style:wn.style,styleOnSelect:wn.styleOnSelect,colorbar:As,hoverPoints:iO,selectPoints:NA,eventData:nO,moduleType:"trace",name:"histogram",basePlotModule:Qt,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(" ")}},lO=oO;const y9=Si(lO);var sO=oa,fO=Ii.attributes,cO=fr,uO=Tr,vO=cr.hovertemplateAttrs,dO=cr.texttemplateAttrs,kl=Rt.extendFlat,hO=$r.pattern,Af=cO({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."}),Su={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:uO.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:hO,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({},sO.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:vO({},{keys:["label","color","value","percent","text"]}),texttemplate:dO({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({},Af,{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({},Af,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:kl({},Af,{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({},Af,{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:fO({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(" ")}},pO=ht,Gl=xe,mO=Su,yO=Ii.defaults,gO=_n.handleText,bO=xe.coercePattern;function xO(t,e){var r=Gl.isArrayOrTypedArray(t),a=Gl.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(pO(l)&&l>0){n=!0;break}}n||(i=0)}return{hasLabels:r,hasValues:a,len:i}}function jA(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");bO(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 _O(t,e,r,a){function i(b,_){return Gl.coerce(t,e,mO,b,_)}var n=i("labels"),o=i("values"),l=xO(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,jA(t,e,a,i,!0),i("scalegroup");var f=i("text"),c=i("texttemplate"),u;if(c||(u=i("textinfo",Gl.isArrayOrTypedArray(f)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),c||u&&u!=="none"){var v=i("textposition");gO(t,e,a,i,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var p=Array.isArray(v)||v==="auto",d=p||v==="outside";d&&i("automargin"),(v==="inside"||v==="auto"||Array.isArray(v))&&i("insidetextorientation")}else u==="none"&&i("textposition","none");yO(e,a,i);var h=i("hole"),m=i("title.text");if(m){var y=i("title.position",h?"middle center":"top center");!h&&y==="middle center"&&(e.title.position="top center"),Gl.coerceFont(i,"title.font",a.font)}i("sort"),i("direction"),i("rotation"),i("pull")}var BA={handleMarkerDefaults:jA,supplyDefaults:_O},GA={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(" ")}},wO=xe,TO=GA,kO=function(e,r){function a(i,n){return wO.coerce(e,r,TO,i,n)}a("hiddenlabels"),a("piecolorway",r.colorway),a("extendpiecolors")},AO=ht,Lh=Ta,MO=ct,SO={};function LO(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={},p=UA(a["_"+e.type+"colormap"]),d=0,h=!1;for(c=0;c<s;c++){var m,y,b;if(f){if(m=l[c],!AO(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:p(o[c],y),i:c,pts:[c],hidden:b})):(h=!0,u=r[_],u.v+=m,u.pts.push(c),u.hidden||(d+=m),u.color===!1&&o[c]&&(u.color=p(o[c],y)))}r=r.filter(function(x){return x.v>=0});var g=e.type==="funnelarea"?h:e.sort;return g&&r.sort(function(x,w){return w.v-x.v}),r[0]&&(r[0].vTotal=d),r}function UA(t){return function(r,a){return!r||(r=Lh(r),!r.isValid())?!1:(r=MO.addOpacity(r,r.getAlpha()),t[a]||(t[a]=r),r)}}function CO(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=VA(n,SO));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 VA(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(Lh(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)i.push(Lh(t[r]).darken(20).toHexString());e[a]=i}return i}var zc={calc:LO,crossTraceCalc:CO,makePullColorFn:UA,generateExtendedColors:VA},DO=la.appendArrayMultiPointValues,PO=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]),DO(a,r,e.pts),r.type==="funnelarea"&&(delete a.v,delete a.i),a},Er=ut,EO=Kt,Mf=wa,WA=ct,Ka=kt,dr=xe,zO=dr.strScale,Jx=dr.strTranslate,Ch=or,XA=ai,RO=XA.recordMinTextSize,IO=XA.clearMinTextSize,YA=Ss.TEXTPAD,st=Cn,Sf=PO,e1=xe.isValidTextValue;function FO(t,e){var r=t._context.staticPlot,a=t._fullLayout,i=a._size;IO("pie",a),jO(e,t),YO(e,i);var n=dr.makeTraceGroups(a._pielayer,e,"trace").each(function(o){var l=Er.select(this),s=o[0],f=s.trace;ZO(o),l.attr("stroke-linejoin","round"),l.each(function(){var c=Er.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){Er.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=Er.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(NO,t,o),f.pull){var S=+st.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(E,k,C,P){var F=P*(k[0]-E[0]),j=P*(k[1]-E[1]);return"a"+P*s.r+","+P*s.r+" 0 "+g.largeArc+(C?" 1 ":" 0 ")+F+","+j}var z=f.hole;if(g.v===s.vTotal){var $="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"+$):M.attr("d",$)}else{var N=L(g.px0,g.px1,!0,1);if(z){var I=1-z;M.attr("d","M"+(w+z*g.px1[0])+","+(T+z*g.px1[1])+L(g.px1,g.px0,!1,z)+"l"+I*g.px0[0]+","+I*g.px0[1]+N+"Z")}else M.attr("d","M"+w+","+T+"l"+g.px0[0]+","+g.px0[1]+N+"Z")}KO(t,g,s);var H=st.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 E=dr.ensureSingle(Er.select(this),"text","",function(O){O.attr("data-notex",1)}),k=dr.ensureUniformFontSize(t,H==="outside"?HO(f,g,a.font):OO(f,g,a.font));E.text(g.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Ka.font,k).call(Ch.convertToTspans,t);var C=Ka.bBox(E.node()),P;if(H==="outside")P=a1(C,g);else if(P=qA(C,g,s),H==="auto"&&P.scale<1){var F=dr.ensureUniformFontSize(t,f.outsidetextfont);E.call(Ka.font,F),C=Ka.bBox(E.node()),P=a1(C,g)}var j=P.textPosAngle,G=j===void 0?g.pxmid:Qf(s.r,j);if(P.targetX=w+G[0]*P.rCenter+(P.x||0),P.targetY=T+G[1]*P.rCenter+(P.y||0),eM(P,C),P.outside){var X=P.targetY;g.yLabelMin=X-C.height/2,g.yLabelMid=X,g.yLabelMax=X+C.height/2,g.labelExtraX=0,g.labelExtraY=0,v=!0}P.fontSize=k.size,RO(f.type,P,a),o[x].transform=P,dr.setTransormAndDisplay(E,P)})});var p=Er.select(this).selectAll("g.titletext").data(f.title.text?[0]:[]);if(p.enter().append("g").classed("titletext",!0),p.exit().remove(),p.each(function(){var g=dr.ensureSingle(Er.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(Ka.font,f.title.font).call(Ch.convertToTspans,t);var w;f.title.position==="middle center"?w=UO(s):w=VO(s,i),g.attr("transform",Jx(w.x,w.y)+zO(Math.min(1,w.scale))+Jx(w.tx,w.ty))}),v&&XO(u,f),$O(c,f),v&&f.automargin){var d=Ka.bBox(l.node()),h=f.domain,m=i.w*(h.x[1]-h.x[0]),y=i.h*(h.y[1]-h.y[0]),b=(.5*m-s.r)/i.w,_=(.5*y-s.r)/i.h;EO.autoMargin(t,"pie."+f.uid+".automargin",{xl:h.x[0]-b,xr:h.x[1]+b,yb:h.y[0]-_,yt:h.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=Er.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function $O(t,e){t.each(function(r){var a=Er.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(WA.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:l,fill:"none"})})}function NO(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=Mf.castHoverinfo({hoverinfo:[st.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,p=i+s.pxmid[0]*(1-v),d=n+s.pxmid[1]*(1-v),h=f.separators,m=[];if(u&&u.indexOf("label")!==-1&&m.push(s.label),s.text=st.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=st.formatPieValue(s.v,h),u&&u.indexOf("value")!==-1&&m.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=st.formatPiePercent(s.percent,h),u&&u.indexOf("percent")!==-1&&m.push(s.percentLabel);var b=c.hoverlabel,_=b.font,g=[];Mf.loneHover({trace:o,x0:p-v*a.r,x1:p+v*a.r,y:d,_x0:l?i+s.TL[0]:p-v*a.r,_x1:l?i+s.TR[0]:p+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:st.castOption(b.bgcolor,s.pts)||s.color,borderColor:st.castOption(b.bordercolor,s.pts),fontFamily:st.castOption(_.family,s.pts),fontSize:st.castOption(_.size,s.pts),fontColor:st.castOption(_.color,s.pts),nameLength:st.castOption(b.namelength,s.pts),textAlign:st.castOption(b.align,s.pts),hovertemplate:st.castOption(c.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[Sf(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:[Sf(s,c)],event:Er.event})}}),t.on("mouseout",function(s){var f=e._fullLayout,c=e._fullData[o.index],u=Er.select(this).datum();o._hasHoverEvent&&(s.originalEvent=Er.event,e.emit("plotly_unhover",{points:[Sf(u,c)],event:Er.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(Mf.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=[Sf(s,c)],Mf.click(e,Er.event))})}function HO(t,e,r){var a=st.castOption(t.outsidetextfont.color,e.pts)||st.castOption(t.textfont.color,e.pts)||r.color,i=st.castOption(t.outsidetextfont.family,e.pts)||st.castOption(t.textfont.family,e.pts)||r.family,n=st.castOption(t.outsidetextfont.size,e.pts)||st.castOption(t.textfont.size,e.pts)||r.size,o=st.castOption(t.outsidetextfont.weight,e.pts)||st.castOption(t.textfont.weight,e.pts)||r.weight,l=st.castOption(t.outsidetextfont.style,e.pts)||st.castOption(t.textfont.style,e.pts)||r.style,s=st.castOption(t.outsidetextfont.variant,e.pts)||st.castOption(t.textfont.variant,e.pts)||r.variant,f=st.castOption(t.outsidetextfont.textcase,e.pts)||st.castOption(t.textfont.textcase,e.pts)||r.textcase,c=st.castOption(t.outsidetextfont.lineposition,e.pts)||st.castOption(t.textfont.lineposition,e.pts)||r.lineposition,u=st.castOption(t.outsidetextfont.shadow,e.pts)||st.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 OO(t,e,r){var a=st.castOption(t.insidetextfont.color,e.pts);!a&&t._input.textfont&&(a=st.castOption(t._input.textfont.color,e.pts));var i=st.castOption(t.insidetextfont.family,e.pts)||st.castOption(t.textfont.family,e.pts)||r.family,n=st.castOption(t.insidetextfont.size,e.pts)||st.castOption(t.textfont.size,e.pts)||r.size,o=st.castOption(t.insidetextfont.weight,e.pts)||st.castOption(t.textfont.weight,e.pts)||r.weight,l=st.castOption(t.insidetextfont.style,e.pts)||st.castOption(t.textfont.style,e.pts)||r.style,s=st.castOption(t.insidetextfont.variant,e.pts)||st.castOption(t.textfont.variant,e.pts)||r.variant,f=st.castOption(t.insidetextfont.textcase,e.pts)||st.castOption(t.textfont.textcase,e.pts)||r.textcase,c=st.castOption(t.insidetextfont.lineposition,e.pts)||st.castOption(t.textfont.lineposition,e.pts)||r.lineposition,u=st.castOption(t.insidetextfont.shadow,e.pts)||st.castOption(t.textfont.shadow,e.pts)||r.shadow;return{color:a||WA.contrast(e.color),family:i,size:n,weight:o,style:l,variant:s,textcase:f,lineposition:c,shadow:u}}function jO(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=Ka.tester.append("text").attr("data-notex",1).text(n).call(Ka.font,a.title.font).call(Ch.convertToTspans,e),l=Ka.bBox(o.node(),!0);r.titleBox={width:l.width,height:l.height},o.remove()}}function qA(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",p=c==="radial",d=c==="auto",h=[],m;if(!d){var y=function(A,M){if(BO(e,A)){var S=Math.abs(A-e.startangle),L=Math.abs(A-e.stopangle),z=S<L?S:L;M==="tan"?m=r1(t,a,o,z,0):m=t1(t,a,o,z,Math.PI/2),m.textPosAngle=A,h.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||p){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;h.push(m)}(d||p)&&(m=t1(t,a,o,s,f),m.textPosAngle=(e.startangle+e.stopangle)/2,h.push(m)),(d||v)&&(m=r1(t,a,o,s,f),m.textPosAngle=(e.startangle+e.stopangle)/2,h.push(m));for(var g=0,x=0,w=0;w<h.length;w++){var T=h[w].scale;if(x<T&&(x=T,g=w),!d&&x>=1)break}return h[g]}function BO(t,e){var r=t.startangle,a=t.stopangle;return r>e&&e>a||r<e&&e<a}function t1(t,e,r,a,i){e=Math.max(0,e-2*YA);var n=t.width/t.height,o=QA(n,a,e,r);return{scale:o*2/t.height,rCenter:ZA(n,o/e),rotate:KA(i)}}function r1(t,e,r,a,i){e=Math.max(0,e-2*YA);var n=t.height/t.width,o=QA(n,a,e,r);return{scale:o*2/t.width,rCenter:ZA(n,o/e),rotate:KA(i+Math.PI/2)}}function ZA(t,e){return Math.cos(e)-t*e}function KA(t){return(180/Math.PI*t+720)%180-90}function QA(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 GO(t,e){return t.v===e.vTotal&&!e.trace.hole?1:Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2)}function a1(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 UO(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 VO(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=JA(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=WO(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=Dh(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,a),tx:l.tx,ty:l.ty}}function WO(t,e){return t/(e===void 0?1:e)}function Dh(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 JA(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 XO(t,e){var r,a,i,n,o,l,s,f,c,u,v,p,d;function h(_,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,I;if(M*s>0&&(_.labelExtraY=M),!!dr.isArrayOrTypedArray(e.pull))for(L=0;L<u.length;L++)z=u[L],!(z===_||(st.castOption(e.pull,_.pts)||0)>=(st.castOption(e.pull,z.pts)||0))&&((_.pxmid[1]-z.pxmid[1])*s>0?($=z.cyFinal+o(z.px0[1],z.px1[1]),M=$-w-_.labelExtraY,M*s>0&&(_.labelExtraY+=M)):(T+_.labelExtraY-A)*s>0&&(S=3*l*Math.abs(L-u.indexOf(_)),N=z.cxFinal+n(z.px0[0],z.px1[0]),I=N+S-(_.cxFinal+_.pxmid[0])-_.labelExtraX,I*l>0&&(_.labelExtraX+=I)))}for(a=0;a<2;a++)for(i=a?h: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),p=[],v=0;v<f.length;v++)f[v].yLabelMid!==void 0&&p.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<p.length;v++){var b=v&&p[v-1];d&&!v&&(b=d),y(p[v],b)}}}function YO(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-=Dh(i,e));var f=l/2,c=s/2;n.type==="funnelarea"&&!n.scalegroup&&(c/=n.aspectratio),i.r=Math.min(f,c)/(1+JA(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-=Dh(i,e)),n.scalegroup&&r.indexOf(n.scalegroup)===-1&&r.push(n.scalegroup)}qO(t,r)}function qO(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 ZO(t){var e=t[0],r=e.r,a=e.trace,i=st.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=GO(f,e))}function Qf(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function KO(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"),p=a.separators,d;if(d=f?[e.label]:[],c){var h=st.getFirstFilled(i.text,e.pts);e1(h)&&d.push(h)}u&&d.push(st.formatPieValue(e.v,p)),v&&d.push(st.formatPiePercent(e.v/r.vTotal,p)),e.text=d.join("<br>")}function m(g){return{label:g.label,value:g.v,valueLabel:st.formatPieValue(g.v,a.separators),percent:g.v/r.vTotal,percentLabel:st.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),_=st.getFirstFilled(i.text,e.pts);(e1(_)||_==="")&&(b.text=_),e.text=dr.texttemplateString(y,b,t._fullLayout._d3locale,b,i._meta||{})}}}function eM(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 tM={plot:FO,transformInsideText:qA,computeTransform:eM},i1=ut,QO=_p,JO=ai.resizeText,e7=function(e){var r=e._fullLayout._pielayer.selectAll(".trace");JO(e,r,"pie"),r.each(function(a){var i=a[0],n=i.trace,o=i1.select(this);o.style({opacity:n.opacity}),o.selectAll("path.surface").each(function(l){i1.select(this).call(QO,l,n,e)})})},rM={};(function(t){var e=Kt;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)}})(rM);var t7={attributes:Su,supplyDefaults:BA.supplyDefaults,supplyLayoutDefaults:kO,layoutAttributes:GA,calc:zc.calc,crossTraceCalc:zc.crossTraceCalc,plot:tM.plot,style:e7,styleOne:_p,moduleType:"trace",name:"pie",basePlotModule:rM,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(" ")}},r7=t7;const g9=Si(r7);var aM={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}},Jf=xe.extendFlat,Rl=Ri,n1=Wo.axisHoverFormat,Ph=$r.dash,a7=Hc,iM=aM,i7=iM.INCREASING.COLOR,n7=iM.DECREASING.COLOR,Rc=Rl.line;function o1(t){return{line:{color:Jf({},Rc.color,{dflt:t}),width:Rc.width,dash:Ph,editType:"style"},editType:"style"}}var nM={xperiod:Rl.xperiod,xperiod0:Rl.xperiod0,xperiodalignment:Rl.xperiodalignment,xhoverformat:n1("x"),yhoverformat:n1("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:Jf({},Rc.width,{description:[Rc.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:Jf({},Ph,{description:[Ph.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:o1(i7),decreasing:o1(n7),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:Jf({},a7.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}}),zorder:Rl.zorder},o7=Je,l7=xe,s7=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=o7.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,l7.minRowLength(n))),r._length=u,u}},f7=xe,c7=s7,u7=xu,v7=nM,d7=function(e,r,a,i){function n(l,s){return f7.coerce(e,r,v7,l,s)}var o=c7(e,r,n,i);if(!o){r.visible=!1;return}u7(e,r,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),l1(e,r,n,"increasing"),l1(e,r,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),i._requestRangeslider[r.xaxis]=!0,n("zorder")};function l1(t,e,r,a){r(a+".line.color"),r(a+".line.width",e.line.width),r(a+".line.dash",e.line.dash)}var To=xe,Lf=To._,ec=Ct,h7=_u,Al=Xt.BADNUM;function p7(t,e){var r=ec.getFromId(t,e.xaxis),a=ec.getFromId(t,e.yaxis),i=g7(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=y7(t,e,o,l,a,m7);return e._extremes[r._id]=ec.findExtremes(r,l,{vpad:n/2}),s.length?(To.extendFlat(s[0].t,{wHover:n/2,tickLen:i}),s):[{t:{empty:!0}}]}function m7(t,e,r,a){return{o:t,h:e,l:r,c:a}}function y7(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=To.isArrayOrTypedArray(e.text),u=To.isArrayOrTypedArray(e.hovertext),v=!0,p=null,d=!!e.xperiodalignment,h=[],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?p!==null&&x!==p&&(v=x>p):v=x>b,p=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]),h.push(w)}else h.push({pos:y,empty:!0})}return e._extremes[i._id]=ec.findExtremes(i,To.concat(s,l),{padded:!0}),h.length&&(h[0].t={labels:{open:Lf(t,"open:")+" ",high:Lf(t,"high:")+" ",low:Lf(t,"low:")+" ",close:Lf(t,"close:")+" "}}),h}function g7(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=h7(r,e,"x",s).vals;l._xcalc=f;var c=To.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 b7={calc:p7},x7=ut,s1=xe,_7=function(e,r,a,i){var n=r.yaxis,o=r.xaxis,l=!!o.rangebreaks;s1.makeTraceGroups(i,a,"trace ohlc").each(function(s){var f=x7.select(this),c=s[0],u=c.t,v=c.trace;if(v.visible!==!0||u.empty){f.remove();return}var p=u.tickLen,d=f.selectAll("path").data(s1.identity);d.enter().append("path"),d.exit().remove(),d.attr("d",function(h){if(h.empty)return"M0,0Z";var m=o.c2p(h.pos-p,!0),y=o.c2p(h.pos+p,!0),b=l?(m+y)/2:o.c2p(h.pos,!0),_=n.c2p(h.o,!0),g=n.c2p(h.h,!0),x=n.c2p(h.l,!0),w=n.c2p(h.c,!0);return"M"+m+","+_+"H"+b+"M"+b+","+g+"V"+x+"M"+y+","+w+"H"+b})})},_d=ut,w7=kt,T7=ct,k7=function(e,r,a){var i=a||_d.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;_d.select(this).selectAll("path").each(function(l){if(!l.empty){var s=o[l.dir].line;_d.select(this).style("fill","none").call(T7.stroke,s.color).call(w7.dashLine,s.dash,s.width).style("opacity",o.selectedpoints&&!l.selected?.3:1)}})})},Eh=Ct,A7=xe,Cf=wa,M7=ct,S7=xe.fillText,f1=aM,L7={increasing:f1.INCREASING.SYMBOL,decreasing:f1.DECREASING.SYMBOL};function C7(t,e,r,a){var i=t.cd,n=i[0].trace;return n.hoverlabel.split?D7(t,e,r,a):P7(t,e,r,a)}function oM(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,p=l.bPos||0,d=function(S){return S.pos+p-e},h=l.bdPos||l.tickLen,m=l.wHover,y=Math.min(1,h/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 Cf.inbox(L-m,L+m,u)}function _(S){var L=S[f],z=S[c];return L===z||Cf.inbox(L-r,z-r,u)}function g(S){return(b(S)+_(S))/2}var x=Cf.getDistanceFunction(a,b,_,g);if(Cf.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 M7.opacity(M)&&A.line.width?t.color=M:t.color=A.fillcolor,t.x0=n.c2p(w.pos+p-h,!0),t.x1=n.c2p(w.pos+p+h,!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 D7(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=[],f=oM(t,e,r,a);if(!f)return[];var c=f.index,u=i[c],v=u.hi||o.hoverinfo,p=v.split("+"),d=v==="all",h=d||p.indexOf("y")!==-1;if(!h)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[_]+Eh.hoverLabelText(n,g,o.yhoverformat)):(w=A7.extendFlat({},f),w.y0=w.y1=x,w.yLabelVal=g,w.yLabel=l.labels[_]+Eh.hoverLabelText(n,g,o.yhoverformat),w.name="",s.push(w),y[g]=w)}return s}function P7(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=oM(t,e,r,a);if(!s)return[];var f=s.index,c=i[f],u=s.index=c.i,v=c.dir;function p(g){return l.labels[g]+Eh.hoverLabelText(n,o[g][u],o.yhoverformat)}var d=c.hi||o.hoverinfo,h=d.split("+"),m=d==="all",y=m||h.indexOf("y")!==-1,b=m||h.indexOf("text")!==-1,_=y?[p("open"),p("high"),p("low"),p("close")+" "+L7[v]]:[];return b&&S7(c,o,_),s.extraText=_.join("<br>"),s.y0=s.y1=n.c2p(c.yc,!0),[s]}var E7={hoverPoints:C7},z7=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},R7={moduleType:"trace",name:"ohlc",basePlotModule:Qt,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:nM,supplyDefaults:d7,calc:b7.calc,plot:_7,style:k7,hoverPoints:E7.hoverPoints,selectPoints:z7},I7=R7;const b9=Si(I7);var F7=Je,Or=xe,$7=bk;function N7(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),p=t.distance,d;if(n.tree){var h=l.p2c(u-p),m=l.p2c(u+p),y=s.p2c(v-p),b=s.p2c(v+p);a==="x"?d=n.tree.range(Math.min(h,m),Math.min(s._rl[0],s._rl[1]),Math.max(h,m),Math.max(s._rl[0],s._rl[1])):d=n.tree.range(Math.min(h,m),Math.min(y,b),Math.max(h,m),Math.max(y,b))}else d=n.ids;var _,g,x,w,T,A,M,S,L,z=p;if(a==="x"){var $=!!o.xperiodalignment,N=!!o.yperiodalignment;for(T=0;T<d.length;T++){if(_=d[T],x=f[_],A=Math.abs(l.c2p(x)-u),$){var I=l.c2p(o._xStarts[_]),H=l.c2p(o._xEnds[_]);A=u>=Math.min(I,H)&&u<=Math.max(I,H)?0:1/0}if(A<z){if(z=A,w=c[_],M=s.c2p(w)-v,N){var D=s.c2p(o._yStarts[_]),E=s.c2p(o._yEnds[_]);M=v>=Math.min(D,E)&&v<=Math.max(D,E)?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]:[H7(t,f,c,o)]}function H7(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=Or.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=Or.isArrayOrTypedArray(c.size)?c.size[s]:c.size,f.tc=Or.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=Or.isArrayOrTypedArray(u.size)?u.size[s]:u.size,f.mo=Or.isArrayOrTypedArray(u.opacity)?u.opacity[s]:u.opacity,f.mx=Or.isArrayOrTypedArray(u.symbol)?u.symbol[s]:u.symbol,f.ma=Or.isArrayOrTypedArray(u.angle)?u.angle[s]:u.angle,f.mc=Or.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=Or.isArrayOrTypedArray(v.width)?v.width[s]:v.width);var p=u&&u.gradient;p&&p.type!=="none"&&(f.mgt=Array.isArray(p.type)?p.type[s]:p.type,f.mgc=Array.isArray(p.color)?p.color[s]:p.color);var d=i.c2p(f.x,!0),h=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=Or.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=Or.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=Or.extendFlat({},t,{color:$7(a,f),x0:d-m,x1:d+m,xLabelVal:x?x[s]:f.x,y0:h-m,y1:h+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),Or.fillText(f,a,T),F7.getComponentMethod("errorbars","hoverInfo")(f,a,T),T}var O7={hoverPoints:N7},lM={exports:{}},c1=20,Lu={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:c1,SYMBOL_STROKE:c1/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]}},j7=oa,B7=fr,G7=$2,Ot=Ri,u1=Wo.axisHoverFormat,v1=Ln,U7=Qh,wd=Rt.extendFlat,V7=Na.overrideAll,W7=Lu.DASHES,d1=Ot.line,Za=Ot.marker,X7=Za.line,yo=lM.exports=V7({x:Ot.x,x0:Ot.x0,dx:Ot.dx,y:Ot.y,y0:Ot.y0,dy:Ot.dy,xperiod:Ot.xperiod,yperiod:Ot.yperiod,xperiod0:Ot.xperiod0,yperiod0:Ot.yperiod0,xperiodalignment:Ot.xperiodalignment,yperiodalignment:Ot.yperiodalignment,xhoverformat:u1("x"),yhoverformat:u1("y"),text:Ot.text,hovertext:Ot.hovertext,textposition:Ot.textposition,textfont:B7({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:d1.color,width:d1.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:U7(W7),dflt:"solid",description:"Sets the style of the lines."}},marker:wd({},v1("marker"),{symbol:Za.symbol,angle:Za.angle,size:Za.size,sizeref:Za.sizeref,sizemin:Za.sizemin,sizemode:Za.sizemode,opacity:Za.opacity,colorbar:Za.colorbar,line:wd({},v1("marker.line"),{width:X7.width})}),connectgaps:Ot.connectgaps,fill:wd({},Ot.fill,{dflt:"none"}),fillcolor:G7(),selected:{marker:Ot.selected.marker,textfont:Ot.selected.textfont},unselected:{marker:Ot.unselected.marker,textfont:Ot.unselected.textfont},opacity:j7.opacity},"calc","nested");yo.x.editType=yo.y.editType=yo.x0.editType=yo.y0.editType="calc+clearAxisTypes";yo.hovertemplate=Ot.hovertemplate;yo.texttemplate=Ot.texttemplate;var sM=lM.exports,Cu={},fM=Lu;Cu.isOpenSymbol=function(t){return typeof t=="string"?fM.OPEN_RE.test(t):t%200>100};Cu.isDotSymbol=function(t){return typeof t=="string"?fM.DOT_RE.test(t):t>200};var h1=xe,Y7=Je,q7=Cu,Z7=sM,K7=gu,Df=kr,Q7=Qp,J7=xu,ej=K2,tj=Q2,rj=ek,aj=J2,ij=function(e,r,a,i){function n(p,d){return h1.coerce(e,r,Z7,p,d)}var o=e.marker?q7.isOpenSymbol(e.marker.symbol):!1,l=Df.isBubble(e),s=Q7(e,r,i,n);if(!s){r.visible=!1;return}J7(e,r,i,n),n("xhoverformat"),n("yhoverformat");var f=s<K7.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("hovertemplate"),n("mode",f),Df.hasMarkers(r)&&(ej(e,r,a,i,n,{noAngleRef:!0,noStandOff:!0}),n("marker.line.width",o||l?1:0)),Df.hasLines(r)&&(n("connectgaps"),tj(e,r,a,i,n),n("line.shape")),Df.hasText(r)&&(n("texttemplate"),aj(e,r,i,n,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(r.line||{}).color,u=(r.marker||{}).color;n("fill"),r.fill!=="none"&&rj(e,r,a,n);var v=Y7.getComponentMethod("errorbars","supplyDefaults");v(e,r,c||u||a,{axis:"y"}),v(e,r,c||u||a,{axis:"x",inherit:"y"}),h1.coerceSelectionMarkerOpacity(r,n)},nj=mk,oj=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]),nj(e,r,a)},cM=ht,Ic=f_,p1=Mo,lj=Tr.defaultLine,m1=Wt.isArrayOrTypedArray,zh=Ic(lj),uM=1;function y1(t,e){var r=t;return r[3]*=e,r}function g1(t){if(cM(t))return zh;var e=Ic(t);return e.length?e:zh}function b1(t){return cM(t)?t:uM}function sj(t,e,r){var a=t.color;a&&a._inputArray&&(a=a._inputArray);var i=m1(a),n=m1(e),o=p1.extractOpts(t),l=[],s,f,c,u,v;if(o.colorscale!==void 0?s=p1.makeColorScaleFuncFromTrace(t):s=g1,i?f=function(d,h){return d[h]===void 0?zh:Ic(s(d[h]))}:f=g1,n?c=function(d,h){return d[h]===void 0?uM:b1(d[h])}:c=b1,i||n)for(var p=0;p<r;p++)u=f(a,p),v=c(e,p),l[p]=y1(u,v);else l=y1(Ic(a),e);return l}var fj={formatColor:sj},tc=ht,cj=$M,Pf=f_,uj=Je,$o=xe,Vt=$o.isArrayOrTypedArray,lo=kt,x1=Ut,_1=fj.formatColor,ko=kr,vj=jw,Rh=Cu,Cs=Lu,dj=ps.DESELECTDIM,w1={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},hj=la.appendArrayPointValue;function pj(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(ko.hasText(e)&&(a.text=vM(t,e),a.textSel=k1(t,e,e.selected),a.textUnsel=k1(t,e,e.unselected)),ko.hasMarkers(e)&&(a.marker=xm(t,e),a.markerSel=Ih(t,e,e.selected),a.markerUnsel=Ih(t,e,e.unselected),!e.unselected&&Vt(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]=dj*n[r]}if(ko.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=A1(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(a.errorY=A1(e,e.error_y,i)),e.fill&&e.fill!=="none"&&(a.fill={closed:!0,fill:e.fillcolor,thickness:0}),a}function vM(t,e){var r=t._fullLayout,a=e._length,i=e.textfont,n=e.textposition,o=Vt(n)?n:[n],l=i.color,s=i.size,f=i.family,c=i.weight,u=i.style,v=i.variant,p={},d,h=t._context.plotGlPixelRatio,m=e.texttemplate;if(m){p.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={};hj(T,e,d);var A=e._meta||{};p.text.push($o.texttemplateString(g(d),w,y,T,x,A))}}else Vt(e.text)&&e.text.length<a?p.text=e.text.slice():p.text=e.text;if(Vt(p.text))for(d=p.text.length;d<a;d++)p.text[d]="";for(p.opacity=e.opacity,p.font={},p.align=[],p.baseline=[],d=0;d<o.length;d++){var M=o[d].split(/\s+/);switch(M[1]){case"left":p.align.push("right");break;case"right":p.align.push("left");break;default:p.align.push(M[1])}switch(M[0]){case"top":p.baseline.push("bottom");break;case"bottom":p.baseline.push("top");break;default:p.baseline.push(M[0])}}if(Vt(l))for(p.color=new Array(a),d=0;d<a;d++)p.color[d]=l[d];else p.color=l;if(Vt(s)||Array.isArray(f)||Vt(c)||Array.isArray(u)||Array.isArray(v))for(p.font=new Array(a),d=0;d<a;d++){var S=p.font[d]={};S.size=($o.isTypedArray(s)?s[d]:Vt(s)?tc(s[d])?s[d]:0:s)*h,S.family=Array.isArray(f)?f[d]:f,S.weight=T1(Vt(c)?c[d]:c),S.style=Array.isArray(u)?u[d]:u,S.variant=Array.isArray(v)?v[d]:v}else p.font={size:s*h,family:f,weight:T1(c),style:u,variant:v};return p}function T1(t){return t<=1e3?t>500?"bold":"normal":t}function xm(t,e){var r=e._length,a=e.marker,i={},n,o=Vt(a.symbol),l=Vt(a.angle),s=Vt(a.color),f=Vt(a.line.color),c=Vt(a.opacity),u=Vt(a.size),v=Vt(a.line.width),p;if(o||(p=Rh.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,h=a.angle,m=_1(a,a.opacity,r),y=_1(a.line,a.opacity,r);if(!Vt(y[0])){var b=y;for(y=Array(r),n=0;n<r;n++)y[n]=b}if(!Vt(m[0])){var _=m;for(m=Array(r),n=0;n<r;n++)m[n]=_}if(!Vt(d)){var g=d;for(d=Array(r),n=0;n<r;n++)d[n]=g}if(!Vt(h)){var x=h;for(h=Array(r),n=0;n<r;n++)h[n]=x}for(i.symbols=d,i.angles=h,i.colors=m,i.borderColors=y,n=0;n<r;n++)o&&(p=Rh.isOpenSymbol(a.symbol[n])),p&&(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]=L1({mx:i.symbols[n],ma:i.angles[n]},e)}else p?(i.color=Pf(a.color,"uint8"),i.color[3]=0,i.borderColor=Pf(a.color,"uint8")):(i.color=Pf(a.color,"uint8"),i.borderColor=Pf(a.line.color,"uint8")),i.opacity=e.opacity*a.opacity,i.marker=L1({mx:a.symbol,ma:a.angle},e);var w=1,T=vj(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 Ih(t,e,r){var a=e.marker,i={};return r&&(r.marker&&r.marker.symbol?i=xm(t,$o.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 k1(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:$o.extendFlat({},e.textfont)};r.textfont&&$o.extendFlat(i.textfont,r.textfont),a=vM(t,i)}return a}function A1(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 M1=Cs.SYMBOL_SDF_SIZE,en=Cs.SYMBOL_SIZE,S1=Cs.SYMBOL_STROKE,Td={},mj=lo.symbolFuncs[0](en*.05);function L1(t,e){var r=t.mx;if(r==="circle")return null;var a,i,n=lo.symbolNumber(r),o=lo.symbolFuncs[n%100],l=!!lo.symbolNoDot[n%100],s=!!lo.symbolNoFill[n%100],f=Rh.isDotSymbol(r);if(t.ma&&(r+="_"+t.ma),Td[r])return Td[r];var c=lo.getMarkerAngle(t,e);return f&&!l?a=o(en*1.1,c)+mj:a=o(en,c),i=cj(a,{w:M1,h:M1,viewBox:[-en,-en,en,en],stroke:s?S1:-S1}),Td[r]=i,i||null}function yj(t,e,r){var a=r.length,i=a/2,n,o;if(ko.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||ko.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 gj(t,e,r,a,i){var n=uj.getComponentMethod("errorbars","makeComputeError"),o=x1.getFromId(t,e.xaxis,"x"),l=x1.getFromId(t,e.yaxis,"y"),s=r.length/2,f={};function c(u,v){var p=v._id.charAt(0),d=e["error_"+p];if(d&&d.visible&&(v.type==="linear"||v.type==="log")){for(var h=n(d),m={x:0,y:1}[p],y={x:[0,1,2,3],y:[2,3,0,1]}[p],b=new Float64Array(4*s),_=1/0,g=-1/0,x=0,w=0;x<s;x++,w+=4){var T=u[x];if(tc(T)){var A=r[x*2+m],M=h(T,x),S=M[0],L=M[1];if(tc(S)&&tc(L)){var z=T-S,$=T+L;b[w+y[0]]=A-v.c2l(z),b[w+y[1]]=v.c2l($)-A,b[w+y[2]]=0,b[w+y[3]]=0,_=Math.min(_,T-S),g=Math.max(g,T+L)}}}f[p]={positions:r,errors:b,_bnds:[_,g]}}}return c(a,o),c(i,l),f}function bj(t,e,r,a){var i=e._length,n={},o;if(ko.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=Vt(l)?l[o].size:l.size,v=Vt(s)?s.length>1?s[o]:s[0]:s,p=Vt(f)?f.length>1?f[o]:f[0]:f,d=w1[v],h=w1[p],m=c?c/.8+1:0,y=-h*m-h*.5;n.offset[o]=[d*m/u,y/u]}}return n}var xj={style:pj,markerStyle:xm,markerSelection:Ih,linePositions:yj,errorBarPositions:gj,textPosition:bj},Ef=xe,_j=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(){Ef.extendFlat(a,n,i)},a.init(),a.update=function(l){var s=Ef.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,p=a.select2d,d=a.selectBatch,h=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(h[m].length){var y=Ef.repeat([],a.count);y[m]=h[m],u.draw(y)}else d[m].length||u.draw(m);v[m]&&a.textOptions[m]&&v[m].render()}p&&p.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||Ef.extendFlat(a,i),a},wj=NM,Jn=xe,C1=Ut,Tj=xs.findExtremes,D1=_u,_m=tm,kj=_m.calcMarkerSize,Aj=_m.calcAxisExpansion,Mj=_m.setFirstScatter,Sj=ak,eo=xj,Lj=_j,P1=Xt.BADNUM,Cj=Lu.TOO_MANY_POINTS,Dj=function(e,r){var a=e._fullLayout,i=r._xA=C1.getFromId(e,r.xaxis,"x"),n=r._yA=C1.getFromId(e,r.yaxis,"y"),o=a._plots[r.xaxis+r.yaxis],l=r._length,s=l>=Cj,f=l*2,c={},u,v=i.makeCalcdata(r,"x"),p=n.makeCalcdata(r,"y"),d=D1(r,i,"x",v),h=D1(r,n,"y",p),m=d.vals,y=h.vals;r._x=m,r._y=y,r.xperiodalignment&&(r._origX=v,r._xStarts=d.starts,r._xEnds=d.ends),r.yperiodalignment&&(r._origY=p,r._yStarts=h.starts,r._yEnds=h.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=wj(b):c.ids=_,Sj(e,r);var g=Pj(e,o,r,b,m,y),x=Lj(e,o);Mj(a,r);var w;return s?g.marker&&(w=g.marker.sizeAvg||Math.max(g.marker.size,3)):w=kj(r,l),Aj(e,r,i,n,m,y,w),g.errorX&&E1(r,i,g.errorX),g.errorY&&E1(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 E1(t,e,r){var a=t._extremes[e._id],i=Tj(e,r._bnds,{padded:!0});a.min=a.min.concat(i.min),a.max=a.max.concat(i.max)}function Pj(t,e,r,a,i,n){var o=eo.style(t,r);if(o.marker&&(o.marker.positions=a),o.line&&a.length>1&&Jn.extendFlat(o.line,eo.linePositions(t,r,a)),o.errorX||o.errorY){var l=eo.errorBarPositions(t,r,a,i,n);o.errorX&&Jn.extendFlat(o.errorX,l.x),o.errorY&&Jn.extendFlat(o.errorY,l.y)}return o.text&&(Jn.extendFlat(o.text,{positions:a},eo.textPosition(t,r,o.text,o.marker)),Jn.extendFlat(o.textSel,{positions:a},eo.textPosition(t,r,o.text,o.markerSel)),Jn.extendFlat(o.textUnsel,{positions:a},eo.textPosition(t,r,o.text,o.markerUnsel))),o}var z1=xe,Ej=ct,zj=ps.DESELECTDIM;function Rj(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=z1.extendFlat({},s),v,p;if(o.length||l.length){var d=f.color,h=c.color,m=s.color,y=z1.isArrayOrTypedArray(m);for(u.color=new Array(r._length),v=0;v<o.length;v++)p=o[v],u.color[p]=d||(y?m[p]:m);for(v=0;v<l.length;v++){p=l[v];var b=y?m[p]:m;u.color[p]=h||(d?b:Ej.addOpacity(b,zj))}}i.glText[n].update(u)}var dM={styleTextSelection:Rj},R1=kr,Ij=dM.styleTextSelection,Fj=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,p=s.index;if(!v)return o;var d=R1.hasText(l),h=R1.hasMarkers(l),m=!h&&!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(h){var g=v.scatter2d;if(!y.length&&!b.length){var x=new Array(v.count);x[p]=v.markerOptions[p],g.update.apply(g,x)}else if(!v.selectBatch[p].length&&!v.unselectBatch[p].length){var w=new Array(v.count);w[p]=v.markerUnselectedOptions[p],g.update.apply(g,w)}}return v.selectBatch[p]=y,v.unselectBatch[p]=b,d&&Ij(a),o},$j=O7,Nj={moduleType:"trace",name:"scattergl",basePlotModule:Qt,categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:sM,supplyDefaults:ij,crossTraceDefaults:tk,colorbar:As,formatLabels:oj,calc:Dj,hoverPoints:$j.hoverPoints,selectPoints:Fj,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(" ")}},hM={exports:{}},I1=ct,Hj=function(){},Oj=function(e){for(var r in e)typeof e[r]=="function"&&(e[r]=Hj);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=I1.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=I1.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},jj=Oj,Bj=HM,Gj=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=Bj({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||CM.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||jj({container:i._glcontainer.node()}),n},F1=GM,$1=BM,Uj=jM,N1=OM,kd=xe,Vj=Dn.selectMode,Wj=Gj,Xj=kr,Yj=hk,qj=dM.styleTextSelection,pM={};function Zj(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 Kj=hM.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=Wj(e,["ANGLE_instanced_arrays","OES_element_index_uint"],pM);if(!c){n.init();return}var u=n.count,v=i._glcanvas.data()[0].regl;if(Yj(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=Uj(v)),n.line2d===!0&&(n.line2d=$1(v)),n.scatter2d===!0&&(n.scatter2d=F1(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 N1(v);if(n.glText){if(u>n.glText.length){var p=u-n.glText.length;for(s=0;s<p;s++)n.glText.push(new N1(v))}else if(u<n.glText.length){var d=n.glText.length-u,h=n.glText.splice(u,d);h.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,P=0;P<C.length&&(isNaN(C[P])||isNaN(C[P+1]));)P+=2;for(var F=C.length-2;F>P&&(isNaN(C[F])||isNaN(C[F+1]));)F-=2;k.positions=C.slice(P,F+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=kd.repeat(null,u),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(k,C){var P=a[C];if(!(!k||!P||!P[0]||!P[0].trace)){var F=P[0],j=F.trace,G=F.t,X=n.lineOptions[C],O,Z,W=[];j._ownfill&&W.push(C),j._nexttrace&&W.push(C+1),W.length&&(n.fillOrder[C]=W);var Y=[],B=X&&X.positions||G.positions,Q,ee;if(j.fill==="tozeroy"){for(Q=0;Q<B.length&&isNaN(B[Q+1]);)Q+=2;for(ee=B.length-2;ee>Q&&isNaN(B[ee+1]);)ee-=2;B[Q+1]!==0&&(Y=[B[Q],0]),Y=Y.concat(B.slice(Q,ee+2)),B[ee+1]!==0&&(Y=Y.concat([B[ee],0]))}else if(j.fill==="tozerox"){for(Q=0;Q<B.length&&isNaN(B[Q]);)Q+=2;for(ee=B.length-2;ee>Q&&isNaN(B[ee]);)ee-=2;B[Q]!==0&&(Y=[0,B[Q+1]]),Y=Y.concat(B.slice(Q,ee+2)),B[ee]!==0&&(Y=Y.concat([0,B[ee+1]]))}else if(j.fill==="toself"||j.fill==="tonext"){for(Y=[],O=0,k.splitNull=!0,Z=0;Z<B.length;Z+=2)(isNaN(B[Z])||isNaN(B[Z+1]))&&(Y=Y.concat(B.slice(O,Z)),Y.push(B[O],B[O+1]),Y.push(null,null),O=Z+2);Y=Y.concat(B.slice(O)),O&&Y.push(B[O],B[O+1])}else{var se=j._nexttrace;if(se){var oe=n.lineOptions[C+1];if(oe){var fe=oe.positions;if(j.fill==="tonexty"){for(Y=B.slice(),C=Math.floor(fe.length/2);C--;){var pe=fe[C*2],ge=fe[C*2+1];isNaN(pe)||isNaN(ge)||Y.push(pe,ge)}k.fill=se.fillcolor}}}}if(j._prevtrace&&j._prevtrace.fill==="tonext"){var be=n.lineOptions[C-1].positions,we=Y.length/2;O=we;var ye=[O];for(Z=0;Z<be.length;Z+=2)(isNaN(be[Z])||isNaN(be[Z+1]))&&(ye.push(Z/2+we+1),O=Z+2);Y=Y.concat(be),k.hole=ye}return k.fillmode=j.fill,k.opacity=j.opacity,k.positions=Y,k}}),n.fill2d.update(n.fillOptions))}var y=i.dragmode,b=Vj(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]=kd.selIndices2selPoints(x),z={};for(f=0;f<L.length;f++)z[L[f]]=1;var $=[];for(f=0;f<A;f++)z[f]||$.push(f);n.unselectBatch[T]=$}var N=w.xpx=new Array(A),I=w.ypx=new Array(A);for(f=0;f<A;f++)N[f]=o.c2p(M[f]),I[f]=l.c2p(S[f])}else w.xpx=w.ypx=null}if(b){if(n.select2d||(n.select2d=F1(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||{};Xj.hasText(C)&&qj(k)})}else n.scatter2d&&n.scatter2d.update(n.markerOptions);var D={viewport:Zj(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]]},E=kd.repeat(D,n.count);n.fill2d&&n.fill2d.update(E),n.line2d&&n.line2d.update(E),n.error2d&&n.error2d.update(E.concat(E)),n.scatter2d&&n.scatter2d.update(E),n.select2d&&n.select2d.update(E),n.glText&&n.glText.forEach(function(k){k.update(D)})}}};Kj.reglPrecompiled=pM;var Qj=hM.exports,mM=Nj;mM.plot=Qj;var Jj=mM,eB=Jj;const x9=Si(eB);var yM={};(function(t){var e=Kt;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)}})(yM);var gM={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]},tB=oa,rB=cr.hovertemplateAttrs,aB=cr.texttemplateAttrs,iB=Ln,nB=Ii.attributes,Ya=Su,H1=gM,Ml=Rt.extendFlat,oB=$r.pattern,lB={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({},Ya.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:Ml({},Ya.marker.line.width,{dflt:1}),editType:"calc"},pattern:oB,editType:"calc"},iB("marker",{colorAttr:"colors",anim:!1})),text:Ya.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:aB({editType:"plot"},{keys:H1.eventDataKeys.concat(["label","value"])}),hovertext:Ya.hovertext,hoverinfo:Ml({},tB.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:rB({},{keys:H1.eventDataKeys}),textfont:Ya.textfont,insidetextorientation:Ya.insidetextorientation,insidetextfont:Ya.insidetextfont,outsidetextfont:Ml({},Ya.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:Ya.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:nB({name:"sunburst",trace:!0,editType:"calc"})},Du={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1},sB=cr.hovertemplateAttrs,fB=cr.texttemplateAttrs,cB=Ln,uB=Ii.attributes,Zi=Su,Zr=lB,O1=Du,Ad=Rt.extendFlat,vB=$r.pattern,bM={labels:Zr.labels,parents:Zr.parents,values:Zr.values,branchvalues:Zr.branchvalues,count:Zr.count,level:Zr.level,maxdepth:Zr.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:Ad({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:Zr.marker.colors,pattern:vB,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:Zr.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the maximum rounding of corners (in px)."].join(" ")},editType:"calc"},cB("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:Ad({},Zi.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},text:Zi.text,textinfo:Zr.textinfo,texttemplate:fB({editType:"plot"},{keys:O1.eventDataKeys.concat(["label","value"])}),hovertext:Zi.hovertext,hoverinfo:Zr.hoverinfo,hovertemplate:sB({},{keys:O1.eventDataKeys}),textfont:Zi.textfont,insidetextfont:Zi.insidetextfont,outsidetextfont:Ad({},Zi.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:Zi.sort,root:Zr.root,domain:uB({name:"treemap",trace:!0,editType:"calc"})},xM={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(" ")}},j1=xe,dB=bM,hB=ct,pB=Ii.defaults,mB=_n.handleText,yB=Ss.TEXTPAD,gB=BA.handleMarkerDefaults,_M=Mo,bB=_M.hasColorscale,xB=_M.handleDefaults,_B=function(e,r,a,i){function n(m,y){return j1.coerce(e,r,dB,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",j1.isArrayOrTypedArray(c)?"text+label":"label"),n("hovertext"),n("hovertemplate");var u=n("pathbar.visible"),v="auto";mB(e,r,i,n,v,{hasPathbar:u,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),n("textposition");var p=r.textposition.indexOf("bottom")!==-1;gB(e,r,i,n);var d=r._hasColorscale=bB(e,"marker","colors")||(e.marker||{}).coloraxis;d?xB(e,r,i,n,{prefix:"marker.",cLetter:"c"}):n("marker.depthfade",!(r.marker.colors||[]).length);var h=r.textfont.size*2;n("marker.pad.t",p?h/4:h),n("marker.pad.l",h/4),n("marker.pad.r",h/4),n("marker.pad.b",p?h:h/4),n("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:hB.contrast(i.paper_bgcolor)}}},u&&(n("pathbar.thickness",r.pathbar.textfont.size+2*yB),n("pathbar.side"),n("pathbar.edgeshape")),n("sort"),n("root.color"),pB(r,i,n),r._length=null},wB=xe,TB=xM,kB=function(e,r){function a(i,n){return wB.coerce(e,r,TB,i,n)}a("treemapcolorway",r.colorway),a("extendtreemapcolors")},Fc={},wM={};(function(t){var e=$h,r=ht,a=xe,i=Mo.makeColorScaleFuncFromTrace,n=zc.makePullColorFn,o=zc.generateExtendedColors,l=Mo.calc,s=Xt.ALMOST_EQUAL,f={},c={},u={};t.calc=function(p,d){var h=p._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,Q){T[B]?T[B].push(Q):T[B]=[Q],A[Q]=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),$=function(B){return S(m[B])&&L(B)},N=function(B){return String(m[B])}):(z=Math.min(b.length,_.length),$=function(B){return S(b[B])&&L(B)},N=function(B){return String(b[B])}),x&&(z=Math.min(z,g.length));for(var I=0;I<z;I++)if($(I)){var H=N(I),D=S(_[I])?String(_[I]):"",E={i:I,id:H,pid:D,label:S(b[I])?String(b[I]):""};x&&(E.v=+g[I]),w.push(E),M(D,H)}if(T[""]){if(T[""].length>1){for(var P=a.randstr(),F=0;F<w.length;F++)w[F].pid===""&&(w[F].pid=P);w.unshift({hasMultipleRoots:!0,id:P,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 Q=B.data.data,ee=Q.v;if(B.children){var se=B.children.reduce(function(oe,fe){return oe+fe.data.data.v},0);if((Q.hasImpliedRoot||Q.hasMultipleRoots)&&(ee=se),ee<se*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 =`,ee,`
6
- children sum =`,se].join(" "))}B.value=ee});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,Q){return Q.value-B.value});var O,Z,W=d.marker.colors||[],Y=!!W.length;return d._hasColorscale?(Y||(W=x?d.values:d._values),l(p,d,{vals:W,containerStr:"marker",cLetter:"c"}),Z=i(d.marker)):O=n(h["_"+d.type+"colormap"]),G.each(function(B){var Q=B.data.data;Q.color=d._hasColorscale?Z(W[Q.i]):O(W[Q.i],Q.id)}),w[0].hierarchy=G,w}},t._runCrossTraceCalc=function(p,d){var h=d._fullLayout,m=d.calcdata,y=h[p+"colorway"],b=h["_"+p+"colormap"];h["extend"+p+"colors"]&&(y=o(y,p==="icicle"?u:p==="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===p&&A.hierarchy&&(g=A.trace.root.color,A.hierarchy.each(x))}},t.crossTraceCalc=function(p){return t._runCrossTraceCalc("sunburst",p)};function v(p,d,h){var m=0,y=p.children;if(y){for(var b=y.length,_=0;_<b;_++)m+=v(y[_],d,h);h.branches&&m++}else h.leaves&&m++;return p.value=p.data.data.value=m,d._values||(d._values=[]),d._values[p.data.data.i]=m,m}})(wM);var TM=wM;Fc.calc=function(t,e){return TM.calc(t,e)};Fc.crossTraceCalc=function(t){return TM._runCrossTraceCalc("treemap",t)};var Fi={};(function(t){var e=xe,r=ct,a=Pi,i=Cn;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||[],p=0;p<v.length;p++){var d=v[p];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,p=f.data.data,d=p.i,h=e.castOption(s,d,(v?"pathbar.textfont":"insidetextfont")+".color");return!h&&s._input.textfont&&(h=e.castOption(s._input,d,"textfont.color")),{color:h||r.contrast(p.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 p=(v||{}).onPathbar,d=p?"pathbar.textfont":"insidetextfont",h=c.data.data.i;return e.castOption(f,h,d+"."+s)||e.castOption(f,h,"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}})(Fi);var AB=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)},so=$h,MB=AB,kM=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=so.treemap().tile(SB(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)&&MB(v,r,{swapXY:o,flipX:i,flipY:n}),v};function SB(t,e){switch(t){case"squarify":return so.treemapSquarify.ratio(e);case"binary":return so.treemapBinary;case"dice":return so.treemapDice;case"slice":return so.treemapSlice;default:return so.treemapSliceDice}}var LB=kt,CB=ct,AM=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),LB.pointStyle(e,a,i,r)}else CB.fill(e,s)},B1=ut,to=ct,G1=xe,Md=Fi,DB=ai.resizeText,PB=AM;function EB(t){var e=t._fullLayout._treemaplayer.selectAll(".trace");DB(t,e,"treemap"),e.each(function(r){var a=B1.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){B1.select(this).call(MM,o,n,t,{hovered:!1})})})}function MM(t,e,r,a,i){var n=(i||{}).hovered,o=e.data.data,l=o.i,s,f,c=o.color,u=Md.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=G1.castOption(r,l,"marker.line.color")||to.defaultLine,f=G1.castOption(r,l,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var p=r.marker.depthfade;if(p){var d=to.combine(to.addOpacity(r._backgroundColor,.75),c),h;if(p===!0){var m=Md.getMaxDepth(r);isFinite(m)?Md.isLeaf(e)?h=0:h=r._maxVisibleLayers-(e.data.depth-r._entryDepth):h=e.data.height+1}else h=e.data.depth-r._entryDepth,r._atRootLevel||h++;if(h>0)for(var y=0;y<h;y++){var b=.5*y/h;c=to.combine(to.addOpacity(d,b),c)}}}t.call(PB,e,r,a,c).style("stroke-width",f).call(to.stroke,s).style("opacity",v)}var wm={style:EB,styleOne:MM},ro=ut,U1=Je,zB=la.appendArrayPointValue,Sl=wa,V1=xe,RB=ys,Jt=Fi,IB=Cn,FB=IB.formatPieValue,Tm=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 h=a._fullLayout;if(!(a._dragging||h.hovermode===!1)){var m=a._fullData[l.index],y=d.data.data,b=y.i,_=Jt.isHierarchyRoot(d),g=Jt.getParent(s,d),x=Jt.getValue(d),w=function(j){return V1.castOption(m,b,j)},T=w("hovertemplate"),A=Sl.castHoverinfo(m,h,b),M=h.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=[],I=[],H=function(j){return N.indexOf(j)!==-1};A&&(N=A==="all"?m._module.attributes.hoverinfo.flags:A.split("+")),$.label=y.label,H("label")&&$.label&&I.push($.label),y.hasOwnProperty("v")&&($.value=y.v,$.valueLabel=FB($.value,M),H("value")&&I.push($.valueLabel)),$.currentPath=d.currentPath=Jt.getPath(d.data),H("current path")&&!_&&I.push($.currentPath);var D,E=[],k=function(){E.indexOf(D)===-1&&(I.push(D),E.push(D))};$.percentParent=d.percentParent=x/Jt.getValue(g),$.parent=d.parentString=Jt.getPtLabel(g),H("percent parent")&&(D=Jt.formatPercent($.percentParent,M)+" of "+$.parent,k()),$.percentEntry=d.percentEntry=x/Jt.getValue(r),$.entry=d.entry=Jt.getPtLabel(r),H("percent entry")&&!_&&!d.onPathbar&&(D=Jt.formatPercent($.percentEntry,M)+" of "+$.entry,k()),$.percentRoot=d.percentRoot=x/Jt.getValue(s),$.root=d.root=Jt.getPtLabel(s),H("percent root")&&!_&&(D=Jt.formatPercent($.percentRoot,M)+" of "+$.root,k()),$.text=w("hovertext")||w("text"),H("text")&&(D=$.text,V1.isValidTextValue(D)&&I.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:I.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:$,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 P=[];Sl.loneHover(C,{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:a,inOut_bbox:P}),S[0].bbox=P[0],l._hasHoverLabel=!0}if(c){var F=e.select("path.surface");n.styleOne(F,d,m,a,{hovered:!0})}l._hasHoverEvent=!0,a.emit("plotly_hover",{points:S||[Ll(d,m,n.eventDataKeys)],event:ro.event})}},v=function(d){var h=a._fullLayout,m=a._fullData[l.index],y=ro.select(this).datum();if(l._hasHoverEvent&&(d.originalEvent=ro.event,a.emit("plotly_unhover",{points:[Ll(y,m,n.eventDataKeys)],event:ro.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(Sl.loneUnhover(h._hoverlayer.node()),l._hasHoverLabel=!1),c){var b=e.select("path.surface");n.styleOne(b,y,m,a,{hovered:!1})}},p=function(d){var h=a._fullLayout,m=a._fullData[l.index],y=f&&(Jt.isHierarchyRoot(d)||Jt.isLeaf(d)),b=Jt.getPtId(d),_=Jt.isEntry(d)?Jt.findEntryWithChild(s,b):Jt.findEntryWithLevel(s,b),g=Jt.getPtId(_),x={points:[Ll(d,m,n.eventDataKeys)],event:ro.event};y||(x.nextLevel=g);var w=RB.triggerHandler(a,"plotly_"+l.type+"click",x);if(w!==!1&&h.hovermode&&(a._hoverdata=[Ll(d,m,n.eventDataKeys)],Sl.click(a,ro.event)),!y&&w!==!1&&!a._dragging&&!a._transitioning){U1.call("_storeDirectGUIEdit",m,h._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(h._hoverlayer.node()),U1.call("animate",a,T,A)}};e.on("mouseover",u),e.on("mouseout",v),e.on("click",p)};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&&!Jt.isHierarchyRoot(t)&&(i.parent=t.parentString),zB(i,e,a.i),i}var W1=ut,zf=xe,X1=kt,$B=or,NB=kM,Y1=wm.styleOne,Sd=Du,ao=Fi,HB=Tm,Ld=!0,OB=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,p=n.strTransform,d=n.hasTransition,h=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=ao.listPath(a.data,"id"),S=NB(T.copy(),[l,s],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();S=S.filter(function(z){var $=M.indexOf(z.data.id);return $===-1?!1:(z.x0=A*$,z.x1=A*($+1),z.y0=o,z.y1=o+s,z.onPathbar=!0,!0)}),S.reverse(),i=i.data(S,ao.getPtId),i.enter().append("g").classed("pathbar",!0),h(i,Ld,b,[l,s],u),i.order();var L=i;d&&(L=L.transition().each("end",function(){var z=W1.select(this);ao.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 $=W1.select(this),N=zf.ensureSingle($,"path","surface",function(E){E.style("pointer-events",_?"none":"all")});d?N.transition().attrTween("d",function(E){var k=m(E,Ld,b,[l,s]);return function(C){return u(k(C))}}):N.attr("d",u),$.call(HB,a,e,r,{styleOne:Y1,eventDataKeys:Sd.eventDataKeys,transitionTime:Sd.CLICK_TRANSITION_TIME,transitionEasing:Sd.CLICK_TRANSITION_EASING}).call(ao.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),N.call(Y1,z,w,e,{hovered:!1}),z._text=(ao.getPtLabel(z)||"").split("<br>").join(" ")||"";var I=zf.ensureSingle($,"g","slicetext"),H=zf.ensureSingle(I,"text","",function(E){E.attr("data-notex",1)}),D=zf.ensureUniformFontSize(e,ao.determineTextFont(w,z,g.font,{onPathbar:!0}));H.text(z._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(X1.font,D).call($B.convertToTspans,e),z.textBB=X1.bBox(H.node()),z.transform=v(z,{fontSize:D.size,onPathbar:!0}),z.transform.fontSize=D.size,d?H.transition().attrTween("transform",function(E){var k=y(E,Ld,b,[l,s]);return function(C){return p(k(C))}}):H.attr("transform",p(z))})},q1=ut,Cd=c_.interpolate,yi=Fi,Cl=xe,Z1=Ss.TEXTPAD,jB=bm,BB=jB.toMoveInsideBar,GB=ai,Dd=GB.recordMinTextSize,UB=Du,VB=OB;function Ki(t){return yi.isHierarchyRoot(t)?"":yi.getPtId(t)}var WB=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=yi.findEntryWithLevel(u,s.level),p=q1.select(a),d=p.selectAll("g.pathbar"),h=p.selectAll("g.slice");if(!v){d.remove(),h.remove();return}var m=yi.isHierarchyRoot(v),y=!o.uniformtext.mode&&yi.hasTransition(i),b=yi.getMaxDepth(s),_=function(J){return J.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+UB.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},$=function(J,_e,re){var Ae=s.tiling.pad,Le=function(me){return me-Ae<=_e.x0},K=function(me){return me+Ae>=_e.x1},ne=function(me){return me-Ae<=_e.y0},ve=function(me){return me+Ae>=_e.y1};return J.x0===_e.x0&&J.x1===_e.x1&&J.y0===_e.y0&&J.y1===_e.y1?{x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1}:{x0:Le(J.x0-Ae)?0:K(J.x0-Ae)?re[0]:J.x0,x1:Le(J.x1+Ae)?0:K(J.x1+Ae)?re[0]:J.x1,y0:ne(J.y0-Ae)?0:ve(J.y0-Ae)?re[1]:J.y0,y1:ne(J.y1+Ae)?0:ve(J.y1+Ae)?re[1]:J.y1}},N=null,I={},H={},D=null,E=function(J,_e){return _e?I[Ki(J)]:H[Ki(J)]},k=function(J,_e,re,Ae){if(_e)return I[Ki(u)]||z;var Le=H[s.level]||re;return _(J)?$(J,Le,Ae):{}};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,P=-T/2+g.t+g.h*(1-(x.y[1]+x.y[0])/2),F=function(J){return C+J},j=function(J){return P+J},G=j(0),X=F(0),O=function(J){return X+J},Z=function(J){return G+J};function W(J,_e){return J+","+_e}var Y=O(0),B=function(J){J.x=Math.max(Y,J.x)},Q=s.pathbar.edgeshape,ee=function(J){var _e=O(Math.max(Math.min(J.x0,J.x0),0)),re=O(Math.min(Math.max(J.x1,J.x1),A)),Ae=Z(J.y0),Le=Z(J.y1),K=M/2,ne={},ve={};ne.x=_e,ve.x=re,ne.y=ve.y=(Ae+Le)/2;var me={x:_e,y:Ae},ke={x:re,y:Ae},Pe={x:re,y:Le},Ee={x:_e,y:Le};return Q===">"?(me.x-=K,ke.x-=K,Pe.x-=K,Ee.x-=K):Q==="/"?(Pe.x-=K,Ee.x-=K,ne.x-=K/2,ve.x-=K/2):Q==="\\"?(me.x-=K,ke.x-=K,ne.x-=K/2,ve.x-=K/2):Q==="<"&&(ne.x-=K,ve.x-=K),B(me),B(Ee),B(ne),B(ke),B(Pe),B(ve),"M"+W(me.x,me.y)+"L"+W(ke.x,ke.y)+"L"+W(ve.x,ve.y)+"L"+W(Pe.x,Pe.y)+"L"+W(Ee.x,Ee.y)+"L"+W(ne.x,ne.y)+"Z"},se=s[c?"tiling":"marker"].pad,oe=function(J){return s.textposition.indexOf(J)!==-1},fe=oe("top"),pe=oe("left"),ge=oe("right"),be=oe("bottom"),we=function(J){var _e=F(J.x0),re=F(J.x1),Ae=j(J.y0),Le=j(J.y1),K=re-_e,ne=Le-Ae;if(!K||!ne)return"";var ve=s.marker.cornerradius||0,me=Math.min(ve,K/2,ne/2);me&&J.data&&J.data.data&&J.data.data.label&&(fe&&(me=Math.min(me,se.t)),pe&&(me=Math.min(me,se.l)),ge&&(me=Math.min(me,se.r)),be&&(me=Math.min(me,se.b)));var ke=function(Pe,Ee){return me?"a"+W(me,me)+" 0 0 1 "+W(Pe,Ee):""};return"M"+W(_e,Ae+me)+ke(me,-me)+"L"+W(re-me,Ae)+ke(me,me)+"L"+W(re,Le-me)+ke(-me,me)+"L"+W(_e+me,Le)+ke(-me,-me)+"Z"},ye=function(J,_e){var re=J.x0,Ae=J.x1,Le=J.y0,K=J.y1,ne=J.textBB,ve=fe||_e.isHeader&&!be,me=ve?"start":be?"end":"middle",ke=oe("right"),Pe=oe("left")||_e.onPathbar,Ee=Pe?-1:ke?1:0;if(_e.isHeader){if(re+=(c?se:se.l)-Z1,Ae-=(c?se:se.r)-Z1,re>=Ae){var Ne=(re+Ae)/2;re=Ne,Ae=Ne}var Fe;be?(Fe=K-(c?se:se.b),Le<Fe&&Fe<K&&(Le=Fe)):(Fe=Le+(c?se:se.t),Le<Fe&&Fe<K&&(K=Fe))}var ce=BB(re,Ae,Le,K,ne,{isHorizontal:!1,constrained:!0,angle:0,anchor:me,leftToRight:Ee});return ce.fontSize=_e.fontSize,ce.targetX=F(ce.targetX),ce.targetY=j(ce.targetY),isNaN(ce.targetX)||isNaN(ce.targetY)?{}:(re!==Ae&&Le!==K&&Dd(s.type,ce,o),{scale:ce.scale,rotate:ce.rotate,textX:ce.textX,textY:ce.textY,anchorX:ce.anchorX,anchorY:ce.anchorY,targetX:ce.targetX,targetY:ce.targetY})},de=function(J,_e){for(var re,Ae=0,Le=J;!re&&Ae<b;)Ae++,Le=Le.parent,Le?re=E(Le,_e):Ae=b;return re||{}},Me=function(J,_e,re,Ae){var Le=E(J,_e),K;if(_e)K=z;else{var ne=E(v,_e);ne?K=$(J,ne,Ae):K={}}return Cd(Le,K)},De=function(J,_e,re,Ae,Le){var K=E(J,_e),ne;if(K)ne=K;else if(_e)ne=z;else if(N)if(J.parent){var ve=D||re;ve&&!_e?ne=$(J,ve,Ae):(ne={},Cl.extendFlat(ne,de(J,_e)))}else ne=Cl.extendFlat({},J),c&&(Le.orientation==="h"?Le.flipX?ne.x0=J.x1:ne.x1=0:Le.flipY?ne.y0=J.y1:ne.y1=0);else ne={};return Cd(ne,{x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1})},ue=function(J,_e,re,Ae){var Le=E(J,_e),K={},ne=k(J,_e,re,Ae);Cl.extendFlat(K,{transform:ye({x0:ne.x0,x1:ne.x1,y0:ne.y0,y1:ne.y1,textBB:J.textBB,_text:J._text},{isHeader:yi.isHeader(J,s)})}),Le?K=Le:J.parent&&Cl.extendFlat(K,de(J,_e));var ve=J.transform;return J.x0!==J.x1&&J.y0!==J.y1&&Dd(s.type,ve,o),Cd(K,{transform:{scale:ve.scale,rotate:ve.rotate,textX:ve.textX,textY:ve.textY,anchorX:ve.anchorX,anchorY:ve.anchorY,targetX:ve.targetX,targetY:ve.targetY}})},Te=function(J,_e,re,Ae,Le){var K=Ae[0],ne=Ae[1];y?J.exit().transition().each(function(){var ve=q1.select(this),me=ve.select("path.surface");me.transition().attrTween("d",function(Pe){var Ee=Me(Pe,_e,re,[K,ne]);return function(Ne){return Le(Ee(Ne))}});var ke=ve.select("g.slicetext");ke.attr("opacity",0)}).remove():J.exit().remove()},Se=function(J){var _e=J.transform;return J.x0!==J.x1&&J.y0!==J.y1&&Dd(s.type,_e,o),Cl.getTextTransform({textX:_e.textX,textY:_e.textY,anchorX:_e.anchorX,anchorY:_e.anchorY,targetX:_e.targetX,targetY:_e.targetY,scale:_e.scale,rotate:_e.rotate})};y&&(d.each(function(J){I[Ki(J)]={x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1},J.transform&&(I[Ki(J)].transform={textX:J.transform.textX,textY:J.transform.textY,anchorX:J.transform.anchorX,anchorY:J.transform.anchorY,targetX:J.transform.targetX,targetY:J.transform.targetY,scale:J.transform.scale,rotate:J.transform.rotate})}),h.each(function(J){H[Ki(J)]={x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1},J.transform&&(H[Ki(J)].transform={textX:J.transform.textX,textY:J.transform.textY,anchorX:J.transform.anchorX,anchorY:J.transform.anchorY,targetX:J.transform.targetX,targetY:J.transform.targetY,scale:J.transform.scale,rotate:J.transform.rotate}),!N&&yi.isEntry(J)&&(N=J)})),D=n(e,r,v,h,{width:w,height:T,viewX:F,viewY:j,pathSlice:we,toMoveInsideSlice:ye,prevEntry:N,makeUpdateSliceInterpolator:De,makeUpdateTextInterpolator:ue,handleSlicesExit:Te,hasTransition:y,strTransform:Se}),s.pathbar.visible?VB(e,r,v,d,{barDifY:L,width:A,height:M,viewX:O,viewY:Z,pathSlice:ee,toMoveInsideSlice:ye,makeUpdateSliceInterpolator:De,makeUpdateTextInterpolator:ue,handleSlicesExit:Te,hasTransition:y,strTransform:Se}):d.remove()},XB=ut,YB=Fi,qB=ai,ZB=qB.clearMinTextSize,KB=wn.resizeText,K1=WB,QB=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(ZB(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&&YB.hasTransition(a)){i&&(u=i());var p=XB.transition().duration(a.duration).ease(a.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});p.each(function(){f.selectAll("g.trace").each(function(d){K1(e,d,this,a,l)})})}else c.each(function(d){K1(e,d,this,a,l)}),s.uniformtext.mode&&KB(e,f.selectAll(".trace"),o);v&&c.exit().remove()},SM={},Q1=ct,J1=xe;ai.resizeText;var JB=AM;function e9(t,e,r,a){var i=e.data.data,n=!e.children,o=i.i,l=J1.castOption(r,o,"marker.line.color")||Q1.defaultLine,s=J1.castOption(r,o,"marker.line.width")||0;t.call(JB,e,r,a).style("stroke-width",s).call(Q1.stroke,l).style("opacity",n?r.leaf.opacity:null)}var t9={styleOne:e9};(function(t){var e=ut,r=$h,a=c_.interpolate,i=kt,n=xe,o=or,l=ai,s=l.recordMinTextSize,f=l.clearMinTextSize,c=tM,u=Cn.getRotationAngle,v=c.computeTransform,p=c.transformInsideText,d=t9.styleOne,h=wn.resizeText,m=Tm,y=gM,b=Fi;t.plot=function(A,M,S,L){var z=A._fullLayout,$=z._sunburstlayer,N,I,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}),N.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),N.order(),D){L&&(I=L());var E=e.transition().duration(S.duration).ease(S.easing).each("end",function(){I&&I()}).each("interrupt",function(){I&&I()});E.each(function(){$.selectAll("g.trace").each(function(k){_(A,k,this,S)})})}else N.each(function(k){_(A,k,this,S)}),z.uniformtext.mode&&h(A,z._sunburstlayer.selectAll(".trace"),"sunburst");H&&N.exit().remove()};function _(A,M,S,L){var z=A._context.staticPlot,$=A._fullLayout,N=!$.uniformtext.mode&&b.hasTransition(L),I=e.select(S),H=I.selectAll("g.slice"),D=M[0],E=D.trace,k=D.hierarchy,C=b.findEntryWithLevel(k,E.level),P=b.getMaxDepth(E),F=$._size,j=E.domain,G=F.w*(j.x[1]-j.x[0]),X=F.h*(j.y[1]-j.y[0]),O=.5*Math.min(G,X),Z=D.cx=F.l+F.w*(j.x[1]+j.x[0])/2,W=D.cy=F.t+F.h*(1-j.y[0])-X/2;if(!C)return H.remove();var Y=null,B={};N&&H.each(function(re){B[b.getPtId(re)]={rpx0:re.rpx0,rpx1:re.rpx1,x0:re.x0,x1:re.x1,transform:re.transform},!Y&&b.isEntry(re)&&(Y=re)});var Q=g(C).descendants(),ee=C.height+1,se=0,oe=P;D.hasMultipleRoots&&b.isHierarchyRoot(C)&&(Q=Q.slice(1),ee-=1,se=1,oe+=1),Q=Q.filter(function(re){return re.y1<=oe});var fe=u(E.rotation);fe&&Q.forEach(function(re){re.x0+=fe,re.x1+=fe});var pe=Math.min(ee,P),ge=function(re){return(re-se)/pe*O},be=function(re,Ae){return[re*Math.cos(Ae),-re*Math.sin(Ae)]},we=function(re){return n.pathAnnulus(re.rpx0,re.rpx1,re.x0,re.x1,Z,W)},ye=function(re){return Z+w(re)[0]*(re.transform.rCenter||0)+(re.transform.x||0)},de=function(re){return W+w(re)[1]*(re.transform.rCenter||0)+(re.transform.y||0)};H=H.data(Q,b.getPtId),H.enter().append("g").classed("slice",!0),N?H.exit().transition().each(function(){var re=e.select(this),Ae=re.select("path.surface");Ae.transition().attrTween("d",function(K){var ne=Te(K);return function(ve){return we(ne(ve))}});var Le=re.select("g.slicetext");Le.attr("opacity",0)}).remove():H.exit().remove(),H.order();var Me=null;if(N&&Y){var De=b.getPtId(Y);H.each(function(re){Me===null&&b.getPtId(re)===De&&(Me=re.x1)})}var ue=H;N&&(ue=ue.transition().each("end",function(){var re=e.select(this);b.setSliceCursor(re,A,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),ue.each(function(re){var Ae=e.select(this),Le=n.ensureSingle(Ae,"path","surface",function(Pe){Pe.style("pointer-events",z?"none":"all")});re.rpx0=ge(re.y0),re.rpx1=ge(re.y1),re.xmid=(re.x0+re.x1)/2,re.pxmid=be(re.rpx1,re.xmid),re.midangle=-(re.xmid-Math.PI/2),re.startangle=-(re.x0-Math.PI/2),re.stopangle=-(re.x1-Math.PI/2),re.halfangle=.5*Math.min(n.angleDelta(re.x0,re.x1)||Math.PI,Math.PI),re.ring=1-re.rpx0/re.rpx1,re.rInscribed=x(re),N?Le.transition().attrTween("d",function(Pe){var Ee=Se(Pe);return function(Ne){return we(Ee(Ne))}}):Le.attr("d",we),Ae.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}),Le.call(d,re,E,A);var K=n.ensureSingle(Ae,"g","slicetext"),ne=n.ensureSingle(K,"text","",function(Pe){Pe.attr("data-notex",1)}),ve=n.ensureUniformFontSize(A,b.determineTextFont(E,re,$.font));ne.text(t.formatSliceLabel(re,C,E,M,$)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,ve).call(o.convertToTspans,A);var me=i.bBox(ne.node());re.transform=p(me,re,D),re.transform.targetX=ye(re),re.transform.targetY=de(re);var ke=function(Pe,Ee){var Ne=Pe.transform;return v(Ne,Ee),Ne.fontSize=ve.size,s(E.type,Ne,$),n.getTextTransform(Ne)};N?ne.transition().attrTween("transform",function(Pe){var Ee=J(Pe);return function(Ne){return ke(Ee(Ne),me)}}):ne.attr("transform",ke(re,me))});function Te(re){var Ae=b.getPtId(re),Le=B[Ae],K=B[b.getPtId(C)],ne;if(K){var ve=(re.x1>K.x1?2*Math.PI:0)+fe;ne=re.rpx1<K.rpx1?{x0:re.x0,x1:re.x1,rpx0:0,rpx1:0}:{x0:ve,x1:ve,rpx0:re.rpx0,rpx1:re.rpx1}}else{var me,ke=b.getPtId(re.parent);H.each(function(ce){if(b.getPtId(ce)===ke)return me=ce});var Pe=me.children,Ee;Pe.forEach(function(ce,He){if(b.getPtId(ce)===Ae)return Ee=He});var Ne=Pe.length,Fe=a(me.x0,me.x1);ne={rpx0:O,rpx1:O,x0:Fe(Ee/Ne),x1:Fe((Ee+1)/Ne)}}return a(Le,ne)}function Se(re){var Ae=B[b.getPtId(re)],Le,K={x0:re.x0,x1:re.x1,rpx0:re.rpx0,rpx1:re.rpx1};if(Ae)Le=Ae;else if(Y)if(re.parent)if(Me){var ne=(re.x1>Me?2*Math.PI:0)+fe;Le={x0:ne,x1:ne}}else Le={rpx0:O,rpx1:O},n.extendFlat(Le,_e(re));else Le={rpx0:0,rpx1:0};else Le={x0:fe,x1:fe};return a(Le,K)}function J(re){var Ae=B[b.getPtId(re)],Le,K=re.transform;if(Ae)Le=Ae;else if(Le={rpx1:re.rpx1,transform:{textPosAngle:K.textPosAngle,scale:0,rotate:K.rotate,rCenter:K.rCenter,x:K.x,y:K.y}},Y)if(re.parent)if(Me){var ne=re.x1>Me?2*Math.PI:0;Le.x0=Le.x1=ne}else n.extendFlat(Le,_e(re));else Le.x0=Le.x1=fe;else Le.x0=Le.x1=fe;var ve=a(Le.transform.textPosAngle,re.transform.textPosAngle),me=a(Le.rpx1,re.rpx1),ke=a(Le.x0,re.x0),Pe=a(Le.x1,re.x1),Ee=a(Le.transform.scale,K.scale),Ne=a(Le.transform.rotate,K.rotate),Fe=K.rCenter===0?3:Le.transform.rCenter===0?1/3:1,ce=a(Le.transform.rCenter,K.rCenter),He=function(Be){return ce(Math.pow(Be,Fe))};return function(Be){var $e=me(Be);ke(Be),Pe(Be);var Ke=He(Be),je=ve(Be),R={rpx1:$e,transform:{textPosAngle:je,rCenter:Ke,x:K.x,y:K.y}};return s(E.type,K,$),{transform:{targetX:ye(R),targetY:de(R),scale:Ee(Be),rotate:Ne(Be),rCenter:Ke}}}}function _e(re){var Ae=re.parent,Le=B[b.getPtId(Ae)],K={};if(Le){var ne=Ae.children,ve=ne.indexOf(re),me=ne.length,ke=a(Le.x0,Le.x1);K.x0=ke(ve/me),K.x1=ke(ve/me)}else K.x0=K.x1=0;return K}}function g(A){return r.partition().size([2*Math.PI,A.height+1])(A)}t.formatSliceLabel=function(A,M,S,L,z){var $=S.texttemplate,N=S.textinfo;if(!$&&(!N||N==="none"))return"";var I=z.separators,H=L[0],D=A.data.data,E=H.hierarchy,k=b.isHierarchyRoot(A),C=b.getParent(E,A),P=b.getValue(A);if(!$){var F=N.split("+"),j=function(se){return F.indexOf(se)!==-1},G=[],X;if(j("label")&&D.label&&G.push(D.label),D.hasOwnProperty("v")&&j("value")&&G.push(b.formatValue(D.v,I)),!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 W,Y=function(se){X=b.formatPercent(W,I),Z&&(X+=" of "+se),G.push(X)};j("percent parent")&&!k&&(W=P/b.getValue(C),Y("parent")),j("percent entry")&&(W=P/b.getValue(M),Y("entry")),j("percent root")&&(W=P/b.getValue(E),Y("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 Q={};D.label&&(Q.label=D.label),D.hasOwnProperty("v")&&(Q.value=D.v,Q.valueLabel=b.formatValue(D.v,I)),Q.currentPath=b.getPath(A.data),k||(Q.percentParent=P/b.getValue(C),Q.percentParentLabel=b.formatPercent(Q.percentParent,I),Q.parent=b.getPtLabel(C)),Q.percentEntry=P/b.getValue(M),Q.percentEntryLabel=b.formatPercent(Q.percentEntry,I),Q.entry=b.getPtLabel(M),Q.percentRoot=P/b.getValue(E),Q.percentRootLabel=b.formatPercent(Q.percentRoot,I),Q.root=b.getPtLabel(E),D.hasOwnProperty("color")&&(Q.color=D.color);var ee=n.castOption(S,D.i,"text");return(n.isValidTextValue(ee)||ee==="")&&(Q.text=ee),Q.customdata=n.castOption(S,D.i,"customdata"),n.texttemplateString(B,Q,z._d3locale,Q,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)]}})(SM);var e_=ut,Rf=xe,t_=kt,r9=or,a9=kM,r_=wm.styleOne,Pd=Du,vi=Fi,i9=Tm,n9=SM.formatSliceLabel,Ed=!1,o9=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,p=n.hasTransition,d=n.handleSlicesExit,h=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=a9(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(),$=1/0,N=-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):($=Math.min($,C),N=Math.max(N,C))}),i=i.data(z,vi.getPtId),w._maxVisibleLayers=isFinite(N)?N-$+1:0,i.enter().append("g").classed("slice",!0),d(i,Ed,b,[o,l],c),i.order();var I=null;if(p&&y){var H=vi.getPtId(y);i.each(function(k){I===null&&vi.getPtId(k)===H&&(I={x0:k.x0,x1:k.x1,y0:k.y0,y1:k.y1})})}var D=function(){return I||{x0:0,x1:o,y0:0,y1:l}},E=i;return p&&(E=E.transition().each("end",function(){var k=e_.select(this);vi.setSliceCursor(k,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),E.each(function(k){var C=vi.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 P=e_.select(this),F=Rf.ensureSingle(P,"path","surface",function(W){W.style("pointer-events",_?"none":"all")});p?F.transition().attrTween("d",function(W){var Y=h(W,Ed,D(),[o,l]);return function(B){return c(Y(B))}}):F.attr("d",c),P.call(i9,a,e,r,{styleOne:r_,eventDataKeys:Pd.eventDataKeys,transitionTime:Pd.CLICK_TRANSITION_TIME,transitionEasing:Pd.CLICK_TRANSITION_EASING}).call(vi.setSliceCursor,e,{isTransitioning:e._transitioning}),F.call(r_,k,w,e,{hovered:!1}),k.x0===k.x1||k.y0===k.y1?k._text="":C?k._text=S?"":vi.getPtLabel(k)||"":k._text=n9(k,a,w,r,g)||"";var j=Rf.ensureSingle(P,"g","slicetext"),G=Rf.ensureSingle(j,"text","",function(W){W.attr("data-notex",1)}),X=Rf.ensureUniformFontSize(e,vi.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(t_.font,X).call(r9.convertToTspans,e),k.textBB=t_.bBox(G.node()),k.transform=u(k,{fontSize:X.size,isHeader:C}),k.transform.fontSize=X.size,p?G.transition().attrTween("transform",function(W){var Y=m(W,Ed,D(),[o,l]);return function(B){return v(Y(B))}}):G.attr("transform",v(k))}),I},l9=QB,s9=o9,f9=function(e,r,a,i){return l9(e,r,a,i,{type:"treemap",drawDescendants:s9})},c9={moduleType:"trace",name:"treemap",basePlotModule:yM,categories:[],animatable:!0,attributes:bM,layoutAttributes:xM,supplyDefaults:_B,supplyLayoutDefaults:kB,calc:Fc.calc,crossTraceCalc:Fc.crossTraceCalc,plot:f9,style:wm.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(" ")}},u9=c9;const _9=Si(u9);export{p9 as P,m9 as b,h9 as c,y9 as h,b9 as o,g9 as p,x9 as s,_9 as t};
7
- //# sourceMappingURL=plotly-CJ0h1Bb8.js.map