@deephaven/code-studio 0.16.1-vite.18 → 0.16.1-vite.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/helpers.162e09a8.js +1 -0
- package/build/assets/index.5fe264e6.js +251 -0
- package/build/assets/{monaco.d72d91be.js → monaco.bc5092a3.js} +3 -3
- package/build/assets/{plotly.47ff3b23.js → plotly.e46f8c30.js} +1 -1
- package/build/assets/vendor.3dfc6121.js +1320 -0
- package/build/index.html +6 -5
- package/package.json +26 -26
- package/build/assets/index.8b7501ff.js +0 -266
- package/build/assets/vendor.8004d4dd.js +0 -1305
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as lt,t as Wr,d as tt,g as tx,r as fl,i as ck,a as rx,e as zd,m as uk,h as ax,b as ix,p as vk,c as dk,j as hk,k as pk,l as nx,s as mk,n as yk,o as gk,q as bk,u as xk,v as _k,w as wk,x as Id,y as ox,z as Tk,A as kk}from"./vendor.8004d4dd.js";import{g as pi,c as Ak}from"./monaco.d72d91be.js";var lx={exports:{}},sx={},jf={};jf.version="2.11.1";var de={exports:{}},Ot={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"},Sr={},Nd=Array.isArray,Mk=ArrayBuffer,Sk=DataView;function fx(t){return Mk.isView(t)&&!(t instanceof Sk)}Sr.isTypedArray=fx;function ff(t){return Nd(t)||fx(t)}Sr.isArrayOrTypedArray=ff;function Lk(t){return!ff(t[0])}Sr.isArray1D=Lk;Sr.ensureArray=function(t,e){return Nd(t)||(t=[]),t.length=e,t};Sr.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),Nd(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};Sr.maxRowLength=function(t){return cx(t,Math.max,0)};Sr.minRowLength=function(t){return cx(t,Math.min,1/0)};function cx(t,e,r){if(ff(t))if(ff(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 ux=lt,Fd=Sr.isArrayOrTypedArray,Hd=function(e,r){if(ux(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";for(var a=0,i=r.split("."),n,o,l;a<i.length;){if(n=String(i[a]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),n){if(n[1])i[a]=n[1];else if(a===0)i.splice(0,1);else throw"bad property string";for(o=n[2].substr(1,n[2].length-2).split("]["),l=0;l<o.length;l++)a++,i.splice(a,0,Number(o[l]))}a++}return typeof e!="object"?Ek(e,r,i):{set:dx(e,i,r),get:vx(e,i),astr:r,parts:i,obj:e}};function vx(t,e){return function(){var r=t,a,i,n,o,l;for(o=0;o<e.length-1;o++){if(a=e[o],a===-1){for(i=!0,n=[],l=0;l<r.length;l++)n[l]=vx(r[l],e.slice(o+1))(),n[l]!==n[0]&&(i=!1);return i?n[0]:n}if(typeof a=="number"&&!Fd(r)||(r=r[a],typeof r!="object"||r===null))return}if(!(typeof r!="object"||r===null)&&(n=r[e[o]],n!==null))return n}}var Ck=/(^|\.)args\[/;function Ev(t,e){return t===void 0||t===null&&!e.match(Ck)}function dx(t,e,r){return function(a){var i=t,n="",o=Ev(a,r),l,s;for(s=0;s<e.length-1;s++){if(l=e[s],typeof l=="number"&&!Fd(i))throw"array index but container is not an array";if(l===-1){if(o=!$k(i,e.slice(s+1),a,r),o)break;return}if(!hx(i,l,e[s+1],o))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";n=Dk(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 Dk(t,e){var r=e;return ux(e)?r="["+e+"]":t&&(r="."+e),t+r}function $k(t,e,r,a){var i=Fd(r),n=!0,o=r,l=a.replace("-1",0),s=i?!1:Ev(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=Ev(o,l)),s&&(n=!1),hx(t,c,f,s)&&dx(t[c],e,a.replace("-1",c))(o);return n}function hx(t,e,r,a){if(t[e]===void 0){if(a)return!1;typeof r=="number"?t[e]=[]:t[e]={}}return!0}function Ek(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var dn=Hd,Rk=/^\w*$/,Pk=0,xp=1,Yl=2,_p=3,Si=4,zk=function(e,r,a,i){a=a||"name",i=i||"value";var n,o,l,s={};r&&r.length?(l=dn(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=Rk.test(i),v={set:function(u,d){var h=d===null?Si:Pk;if(!o){if(!l||h===Si)return;o=[],l.set(o)}var p=f[u];if(p===void 0){if(h===Si)return;h=h|_p,p=o.length,f[u]=p}else d!==(c?o[p][i]:dn(o[p],i).get())&&(h=h|Yl);var g=o[p]=o[p]||{};return g[a]=u,c?g[i]=d:dn(g,i).set(d),d!==null&&(h=h&~Si),s[p]=s[p]|h,v},get:function(u){if(!!o){var d=f[u];if(d!==void 0)return c?o[d][i]:dn(o[d],i).get()}},rename:function(u,d){var h=f[u];return h===void 0||(s[h]=s[h]|xp,f[d]=h,delete f[u],o[h][a]=d),v},remove:function(u){var d=f[u];if(d===void 0)return v;var h=o[d];if(Object.keys(h).length>2)return s[d]=s[d]|Yl,v.set(u,null);if(c){for(n=d;n<o.length;n++)s[n]=s[n]|_p;for(n=d;n<o.length;n++)f[o[n][a]]--;o.splice(d,1),delete f[u]}else dn(h,i).set(null),s[d]=s[d]|Yl|Si;return v},constructUpdate:function(){for(var u,d,h={},p=Object.keys(s),g=0;g<p.length;g++)d=p[g],u=r+"["+d+"]",o[d]?(s[d]&xp&&(h[u+"."+a]=o[d][a]),s[d]&Yl&&(c?h[u+"."+i]=s[d]&Si?null:o[d][i]:h[u+"."+i]=s[d]&Si?null:dn(o[d],i).get())):h[u]=null;return h}};return v},Ik=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Nk=/^[^\.\[\]]+$/,Fk=function(t,e){for(;e;){var r=t.match(Ik);if(r)t=r[1];else if(t.match(Nk))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},Ml=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")},Hk=lt,Od=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 Hk(a)||(a=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),a},wp=Sr.isArrayOrTypedArray,ko=Ml,Ok=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(wp(i)&&wp(n)&&ko(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]&&ko(i[l])&&ko(n[l])&&t(n[l],i[l])}else ko(i)&&ko(n)&&(t(n,i),Object.keys(n).length||delete e[a])}};function Bk(t,e){var r=t%e;return r<0?r+e:r}function jk(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}var Sl={mod:Bk,modHalf:jk},px={},dr=function(t){var e=t.editType,r=t.colorEditType;r===void 0&&(r=e);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:e,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:e},color:{valType:"color",editType:r},editType:e,description:""+(t.description||"")};return t.autoSize&&(a.size.dflt="auto"),t.autoColor&&(a.color.dflt="auto"),t.arrayOk&&(a.family.arrayOk=!0,a.size.arrayOk=!0,a.color.arrayOk=!0),a},Gf={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"},mx=Gf,yx=dr,Bd=yx({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});Bd.family.dflt=mx.HOVERFONT;Bd.size.dflt=mx.HOVERFONTSIZE;var Ll={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:Bd,grouptitlefont:yx({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}},Bt={},Tp=Ml,Ao=Array.isArray;function Gk(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}Bt.extendFlat=function(){return Cl(arguments,!1,!1,!1)};Bt.extendDeep=function(){return Cl(arguments,!0,!1,!1)};Bt.extendDeepAll=function(){return Cl(arguments,!0,!0,!1)};Bt.extendDeepNoArrays=function(){return Cl(arguments,!0,!1,!0)};function Cl(t,e,r,a){var i=t[0],n=t.length,o,l,s,f,c,v,u;if(n===2&&Ao(i)&&Ao(t[1])&&i.length===0){if(u=Gk(t[1],i),u)return i;i.splice(0,i.length)}for(var d=1;d<n;d++){o=t[d];for(l in o)s=i[l],f=o[l],a&&Ao(f)?i[l]=f:e&&f&&(Tp(f)||(c=Ao(f)))?(c?(c=!1,v=s&&Ao(s)?s:[]):v=s&&Tp(s)?s:{},i[l]=Cl([v,f],e,r,a)):(typeof f<"u"||r)&&(i[l]=f)}return i}var Uk=dr,Wl=Ll.hoverlabel,Zl=Bt.extendFlat,Uf={hoverlabel:{bgcolor:Zl({},Wl.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:Zl({},Wl.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:Uk({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:Zl({},Wl.align,{arrayOk:!0}),namelength:Zl({},Wl.namelength,{arrayOk:!0}),editType:"none"}},Vk=dr,qk=Uf,La={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:Vk({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with `*reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appear as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:qk.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}},Xk=Wr.exports,Vf={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)"]]},gx=Vf.RdBu;function Yk(t,e){if(e||(e=gx),!t)return e;function r(){try{t=Vf[t]||JSON.parse(t)}catch{t=e}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),bx(t)?t:e}function bx(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||!Xk(a[1]).isValid())return!1;e=+a[0]}return!0}function Wk(t){return Vf[t]!==void 0?!0:bx(t)}var fo={scales:Vf,defaultScale:gx,get:Yk,isValid:Wk},Je={exports:{}},hr={};hr.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];hr.defaultLine="#444";hr.lightLine="#eee";hr.background="#fff";hr.borderLine="#BEC8D9";hr.lightFraction=100*(14-4)/(15-4);var fa=Wr.exports,Zk=lt,Kk=Sr.isTypedArray,tr=Je.exports={},qf=hr;tr.defaults=qf.defaults;var Qk=tr.defaultLine=qf.defaultLine;tr.lightLine=qf.lightLine;var Rv=tr.background=qf.background;tr.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"};tr.rgb=function(t){return tr.tinyRGB(fa(t))};tr.opacity=function(t){return t?fa(t).getAlpha():0};tr.addOpacity=function(t,e){var r=fa(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"};tr.combine=function(t,e){var r=fa(t).toRgb();if(r.a===1)return fa(t).toRgbString();var a=fa(e||Rv).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 fa(n).toRgbString()};tr.contrast=function(t,e,r){var a=fa(t);a.getAlpha()!==1&&(a=fa(tr.combine(t,Rv)));var i=a.isDark()?e?a.lighten(e):Rv:r?a.darken(r):Qk;return i.toString()};tr.stroke=function(t,e){var r=fa(e);t.style({stroke:tr.tinyRGB(r),"stroke-opacity":r.getAlpha()})};tr.fill=function(t,e){var r=fa(e);t.style({fill:tr.tinyRGB(r),"fill-opacity":r.getAlpha()})};tr.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]=Lc(n[a]);else t[i]=Lc(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]=Lc(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++)tr.clean(n[a])}else n&&typeof n=="object"&&!Kk(n)&&tr.clean(n)}};function Lc(t){if(Zk(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 Dl={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2},co={};co.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=lt,r=Wr.exports,a=La,i=fo,n=Je.exports,o=Dl.DESELECTDIM,l=Hd,s=co.counter,f=Sl.modHalf,c=Sr.isArrayOrTypedArray;t.valObjectMeta={data_array:{description:["An {array} of data.","The value MUST be an {array}, or we ignore it.","Note that typed arrays (e.g. Float32Array) are supported."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){c(u)?d.set(u):h!==void 0&&d.set(h)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(u,d,h,p){p.coerceNumber&&(u=+u),p.values.indexOf(u)===-1?d.set(h):d.set(u)},validateFunction:function(u,d){d.coerceNumber&&(u=+u);for(var h=d.values,p=0;p<h.length;p++){var g=String(h[p]);if(g.charAt(0)==="/"&&g.charAt(g.length-1)==="/"){var _=new RegExp(g.substr(1,g.length-2));if(_.test(u))return!0}else if(u===h[p])return!0}return!1}},boolean:{description:"A boolean (true/false) value.",requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){u===!0||u===!1?d.set(u):d.set(h)}},number:{description:["A number or a numeric value","(e.g. a number inside a string).","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,d,h,p){!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?d.set(h):d.set(+u)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,d,h,p){u%1||!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?d.set(h):d.set(+u)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(u,d,h,p){if(typeof u!="string"){var g=typeof u=="number";p.strict===!0||!g?d.set(h):d.set(String(u))}else p.noBlank&&!u?d.set(h):d.set(u)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(u,d,h){r(u).isValid()?d.set(u):d.set(h)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){function p(g){return r(g).isValid()}!Array.isArray(u)||!u.length?d.set(h):u.every(p)?d.set(u):d.set(h)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(i.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){d.set(i.get(u,h))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){u==="auto"?d.set("auto"):e(u)?d.set(f(+u,360)):d.set(h)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(u,d,h,p){var g=p.regex||s(h);if(typeof u=="string"&&g.test(u)){d.set(u);return}d.set(h)},validateFunction:function(u,d){var h=d.dflt;return u===h?!0:typeof u!="string"?!1:!!s(h).test(u)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(u,d,h,p){if(typeof u!="string"){d.set(h);return}if((p.extras||[]).indexOf(u)!==-1){d.set(u);return}for(var g=u.split("+"),_=0;_<g.length;){var b=g[_];p.flags.indexOf(b)===-1||g.indexOf(b)<_?g.splice(_,1):_++}g.length?d.set(g.join("+")):d.set(h)}},any:{description:"Any type.",requiredOpts:[],otherOpts:["dflt","values","arrayOk"],coerceFunction:function(u,d,h){u===void 0?d.set(h):d.set(u)}},info_array:{description:["An {array} of plot information."].join(" "),requiredOpts:["items"],otherOpts:["dflt","freeLength","dimensions"],coerceFunction:function(u,d,h,p){function g(E,I,P){var R,L={set:function(D){R=D}};return P===void 0&&(P=I.dflt),t.valObjectMeta[I.valType].coerceFunction(E,L,P,I),R}var _=p.dimensions===2||p.dimensions==="1-2"&&Array.isArray(u)&&Array.isArray(u[0]);if(!Array.isArray(u)){d.set(h);return}var b=p.items,w=[],m=Array.isArray(b),y=m&&_&&Array.isArray(b[0]),x=_&&m&&!y,T=m&&!x?b.length:u.length,k,S,A,$,M,C;if(h=Array.isArray(h)?h:[],_)for(k=0;k<T;k++)for(w[k]=[],A=Array.isArray(u[k])?u[k]:[],x?M=b.length:m?M=b[k].length:M=A.length,S=0;S<M;S++)x?$=b[S]:m?$=b[k][S]:$=b,C=g(A[S],$,(h[k]||[])[S]),C!==void 0&&(w[k][S]=C);else for(k=0;k<T;k++)C=g(u[k],m?b[k]:b,h[k]),C!==void 0&&(w[k]=C);d.set(w)},validateFunction:function(u,d){if(!Array.isArray(u))return!1;var h=d.items,p=Array.isArray(h),g=d.dimensions===2;if(!d.freeLength&&u.length!==h.length)return!1;for(var _=0;_<u.length;_++)if(g){if(!Array.isArray(u[_])||!d.freeLength&&u[_].length!==h[_].length)return!1;for(var b=0;b<u[_].length;b++)if(!v(u[_][b],p?h[_][b]:h))return!1}else if(!v(u[_],p?h[_]:h))return!1;return!0}}},t.coerce=function(u,d,h,p,g){var _=l(h,p).get(),b=l(u,p),w=l(d,p),m=b.get(),y=d._template;if(m===void 0&&y&&(m=l(y,p).get(),y=0),g===void 0&&(g=_.dflt),_.arrayOk&&c(m))return w.set(m),m;var x=t.valObjectMeta[_.valType].coerceFunction;x(m,w,g,_);var T=w.get();return y&&T===g&&!v(m,_)&&(m=l(y,p).get(),x(m,w,g,_),T=w.get()),T},t.coerce2=function(u,d,h,p,g){var _=l(u,p),b=t.coerce(u,d,h,p,g),w=_.get();return w!=null?b:!1},t.coerceFont=function(u,d,h){var p={};return h=h||{},p.family=u(d+".family",h.family),p.size=u(d+".size",h.size),p.color=u(d+".color",h.color),p},t.coercePattern=function(u,d,h,p){var g=u(d+".shape");if(g){u(d+".solidity"),u(d+".size");var _=u(d+".fillmode"),b=_==="overlay";if(!p){var w=u(d+".bgcolor",b?h:void 0);u(d+".fgcolor",b?n.contrast(w):h)}u(d+".fgopacity",b?.5:1)}},t.coerceHoverinfo=function(u,d,h){var p=d._module.attributes,g=p.hoverinfo?p:a,_=g.hoverinfo,b;if(h._dataLength===1){var w=_.dflt==="all"?_.flags.slice():_.dflt.split("+");w.splice(w.indexOf("name"),1),b=w.join("+")}return t.coerce(u,d,g,"hoverinfo",b)},t.coerceSelectionMarkerOpacity=function(u,d){if(!!u.marker){var h=u.marker.opacity;if(h!==void 0){var p,g;!c(h)&&!u.selected&&!u.unselected&&(p=h,g=o*h),d("selected.marker.opacity",p),d("unselected.marker.opacity",g)}}};function v(u,d){var h=t.valObjectMeta[d.valType];if(d.arrayOk&&c(u))return!0;if(h.validateFunction)return h.validateFunction(u,d);var p={},g=p,_={set:function(b){g=b}};return h.coerceFunction(u,_,p,d),g!==p}t.validate=v})(px);var xx={},en={exports:{}},_x={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."}},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","<path-to-plotly.js>/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},wx={};function Tx(t,e){for(var r in t){var a=t[r];a.valType?e[r]=a.dflt:(e[r]||(e[r]={}),Tx(a,e[r]))}}Tx(_x,wx);var uo={configAttributes:_x,dfltConfig:wx},Cc=tt.exports,Jk=lt,Mo=[],kx=function(t,e){if(Mo.indexOf(t)!==-1)return;Mo.push(t);var r=1e3;Jk(e)?r=e:e==="long"&&(r=3e3);var a=Cc.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(Mo);function n(o){o.duration(700).style("opacity",0).each("end",function(l){var s=Mo.indexOf(l);s!==-1&&Mo.splice(s,1),Cc.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=Cc.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(n)});for(var s=l.append("p"),f=o.split(/<br\s*\/?>/g),c=0;c<f.length;c++)c&&s.append("br"),s.append("span").text(f[c]);e==="stick"?l.transition().duration(350).style("opacity",1):l.transition().duration(700).style("opacity",1).transition().delay(r).call(n)})},Zn=uo.dfltConfig,jd=kx,Gd=en.exports={};Gd.log=function(){var t;if(Zn.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Zn.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);jd(r.join("<br>"),"long")}};Gd.warn=function(){var t;if(Zn.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Zn.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);jd(r.join("<br>"),"stick")}};Gd.error=function(){var t;if(Zn.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(Zn.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);jd(r.join("<br>"),"stick")}};var Ve={},Ud=function(){},Ax=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},Xf={};(function(t){var e=tx;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]]]}})(Xf);var eA=tt.exports,tA=en.exports,rA=Xf,aA=tx;function iA(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 nA(t){var e=eA.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")}function Mx(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function oA(t,e){Sx("global",t,e)}function Sx(t,e,r){var a="plotly.js-style-"+t,i=document.getElementById(a);i||(i=document.createElement("style"),i.setAttribute("id",a),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var n=i.sheet;n.insertRule?n.insertRule(e+"{"+r+"}",0):n.addRule?n.addRule(e,r,0):tA.warn("addStyleRule failed")}function lA(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&Mx(r)}function sA(t){var e=Cx(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=Lx(a);if(i){var n=rA.convertCssMatrix(i);r=aA.multiply(r,r,n)}}),r}function Lx(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 Cx(t){for(var e=[];fA(t);)e.push(t),t=t.parentNode;return e}function fA(t){return t&&(t instanceof Element||t instanceof HTMLElement)}function cA(t,e){return t&&e&&t.x===e.x&&t.y===e.y&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}var Vd={getGraphDiv:iA,isPlotDiv:nA,removeElement:Mx,addStyleRule:oA,addRelatedStyleRule:Sx,deleteRelatedStyleRule:lA,getFullTransformMatrix:sA,getElementTransformMatrix:Lx,getElementAndAncestors:Cx,equalDomRects:cA},Yf={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(" ")}}},Ga={};Ga.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(" ")};Ga.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")};var uA=Ga.dash,vA=Bt.extendFlat,dA={newshape:{line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,editType:"none",description:"Sets the line width (in px)."},dash:vA({},uA,{dflt:"solid",editType:"none"}),editType:"none"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"none",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"none",description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"none",description:"Specifies whether new shapes are drawn below or above traces."},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",editType:"none",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},editType:"none"},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",editType:"none",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active shape."},editType:"none"}},qd=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}},Pv=dr,hA=Yf,Us=hr,kp=dA,pA=qd,Ap=Bt.extendFlat,Wf=Pv({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});Wf.family.dflt='"Open Sans", verdana, arial, sans-serif';Wf.size.dflt=12;Wf.color.dflt=Us.defaultLine;var $l={font:Wf,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Pv({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:Ap(pA({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},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:Us.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:Us.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:Us.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:kp.newshape,activeshape:kp.activeshape,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:Ap({},hA.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:Pv({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}};(function(t){var e=en.exports,r=Ud,a=Ax,i=Ml,n=Vd.addStyleRule,o=Bt,l=La,s=$l,f=o.extendFlat,c=o.extendDeepAll;t.modules={},t.allCategories={},t.allTypes=[],t.subplotsRegistry={},t.transformsRegistry={},t.componentsRegistry={},t.layoutArrayContainers=[],t.layoutArrayRegexes=[],t.traceLayoutAttributes={},t.localeRegistry={},t.apiMethodRegistry={},t.collectableSubplotTypes=null,t.register=function(x){if(t.collectableSubplotTypes=null,x)x&&!Array.isArray(x)&&(x=[x]);else throw new Error("No argument passed to Plotly.register.");for(var T=0;T<x.length;T++){var k=x[T];if(!k)throw new Error("Invalid module was attempted to be registered!");switch(k.moduleType){case"trace":v(k);break;case"transform":h(k);break;case"component":d(k);break;case"locale":p(k);break;case"apiMethod":var S=k.name;t.apiMethodRegistry[S]=k.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},t.getModule=function(y){var x=t.modules[m(y)];return x?x._module:!1},t.traceIs=function(y,x){if(y=m(y),y==="various")return!1;var T=t.modules[y];return T||(y&&e.log("Unrecognized trace type "+y+"."),T=t.modules[l.type.dflt]),!!T.categories[x]},t.getTransformIndices=function(y,x){for(var T=[],k=y.transforms||[],S=0;S<k.length;S++)k[S].type===x&&T.push(S);return T},t.hasTransform=function(y,x){for(var T=y.transforms||[],k=0;k<T.length;k++)if(T[k].type===x)return!0;return!1},t.getComponentMethod=function(y,x){var T=t.componentsRegistry[y];return T&&T[x]||r},t.call=function(){var y=arguments[0],x=[].slice.call(arguments,1);return t.apiMethodRegistry[y].apply(null,x)};function v(y){var x=y.name,T=y.categories,k=y.meta;if(t.modules[x]){e.log("Type "+x+" already registered");return}t.subplotsRegistry[y.basePlotModule.name]||u(y.basePlotModule);for(var S={},A=0;A<T.length;A++)S[T[A]]=!0,t.allCategories[T[A]]=!0;t.modules[x]={_module:y,categories:S},k&&Object.keys(k).length&&(t.modules[x].meta=k),t.allTypes.push(x);for(var $ in t.componentsRegistry)_($,x);y.layoutAttributes&&f(t.traceLayoutAttributes,y.layoutAttributes);var M=y.basePlotModule,C=M.name;if(C==="mapbox"){var E=M.constants.styleRules;for(var I in E)n(".js-plotly-plot .plotly .mapboxgl-"+I,E[I])}(C==="geo"||C==="mapbox")&&typeof window!==void 0&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function u(y){var x=y.name;if(t.subplotsRegistry[x]){e.log("Plot type "+x+" already registered.");return}g(y),t.subplotsRegistry[x]=y;for(var T in t.componentsRegistry)w(T,y.name)}function d(y){if(typeof y.name!="string")throw new Error("Component module *name* must be a string.");var x=y.name;t.componentsRegistry[x]=y,y.layoutAttributes&&(y.layoutAttributes._isLinkedToArray&&a(t.layoutArrayContainers,x),g(y));for(var T in t.modules)_(x,T);for(var k in t.subplotsRegistry)w(x,k);for(var S in t.transformsRegistry)b(x,S);y.schema&&y.schema.layout&&c(s,y.schema.layout)}function h(y){if(typeof y.name!="string")throw new Error("Transform module *name* must be a string.");var x="Transform module "+y.name,T=typeof y.transform=="function",k=typeof y.calcTransform=="function";if(!T&&!k)throw new Error(x+" is missing a *transform* or *calcTransform* method.");T&&k&&e.log([x+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),i(y.attributes)||e.log(x+" registered without an *attributes* object."),typeof y.supplyDefaults!="function"&&e.log(x+" registered without a *supplyDefaults* method."),t.transformsRegistry[y.name]=y;for(var S in t.componentsRegistry)b(S,y.name)}function p(y){var x=y.name,T=x.split("-")[0],k=y.dictionary,S=y.format,A=k&&Object.keys(k).length,$=S&&Object.keys(S).length,M=t.localeRegistry,C=M[x];if(C||(M[x]=C={}),T!==x){var E=M[T];E||(M[T]=E={}),A&&E.dictionary===C.dictionary&&(E.dictionary=k),$&&E.format===C.format&&(E.format=S)}A&&(C.dictionary=k),$&&(C.format=S)}function g(y){if(y.layoutAttributes){var x=y.layoutAttributes._arrayAttrRegexps;if(x)for(var T=0;T<x.length;T++)a(t.layoutArrayRegexes,x[T])}}function _(y,x){var T=t.componentsRegistry[y].schema;if(!(!T||!T.traces)){var k=T.traces[x];k&&c(t.modules[x]._module.attributes,k)}}function b(y,x){var T=t.componentsRegistry[y].schema;if(!(!T||!T.transforms)){var k=T.transforms[x];k&&c(t.transformsRegistry[x].attributes,k)}}function w(y,x){var T=t.componentsRegistry[y].schema;if(!(!T||!T.subplots)){var k=t.subplotsRegistry[x],S=k.layoutAttributes,A=k.attr==="subplot"?k.name:k.attr;Array.isArray(A)&&(A=A[0]);var $=T.subplots[A];S&&$&&c(S,$)}}function m(y){return typeof y=="object"&&(y=y.type),y}})(Ve);(function(t){var e=fl.timeFormat,r=lt,a=en.exports,i=Sl.mod,n=Ot,o=n.BADNUM,l=n.ONEDAY,s=n.ONEHOUR,f=n.ONEMIN,c=n.ONESEC,v=n.EPOCHJD,u=Ve,d=fl.utcFormat,h=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,p=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,g=new Date().getFullYear()-70;function _(R){return R&&u.componentsRegistry.calendars&&typeof R=="string"&&R!=="gregorian"}t.dateTick0=function(R,L){var D=b(R,!!L);if(L<2)return D;var z=t.dateTime2ms(D,R);return z+=l*(L-1),t.ms2DateTime(z,0,R)};function b(R,L){return _(R)?L?u.getComponentMethod("calendars","CANONICAL_SUNDAY")[R]:u.getComponentMethod("calendars","CANONICAL_TICK")[R]:L?"2000-01-02":"2000-01-01"}t.dfltRange=function(R){return _(R)?u.getComponentMethod("calendars","DFLTRANGE")[R]:["2000-01-01","2001-01-01"]},t.isJSDate=function(R){return typeof R=="object"&&R!==null&&typeof R.getTime=="function"};var w,m;t.dateTime2ms=function(R,L){if(t.isJSDate(R)){var D=R.getTimezoneOffset()*f,z=(R.getUTCMinutes()-R.getMinutes())*f+(R.getUTCSeconds()-R.getSeconds())*c+(R.getUTCMilliseconds()-R.getMilliseconds());if(z){var F=3*f;D=D-F/2+i(z-D+F/2,F)}return R=Number(R)-D,R>=w&&R<=m?R:o}if(typeof R!="string"&&typeof R!="number")return o;R=String(R);var H=_(L),U=R.charAt(0);H&&(U==="G"||U==="g")&&(R=R.substr(1),L="");var B=H&&L.substr(0,7)==="chinese",X=R.match(B?p:h);if(!X)return o;var O=X[1],Y=X[3]||"1",W=Number(X[5]||1),K=Number(X[7]||0),Z=Number(X[9]||0),ae=Number(X[11]||0);if(H){if(O.length===2)return o;O=Number(O);var ne;try{var oe=u.getComponentMethod("calendars","getCal")(L);if(B){var re=Y.charAt(Y.length-1)==="i";Y=parseInt(Y,10),ne=oe.newDate(O,oe.toMonthIndex(O,Y,re),W)}else ne=oe.newDate(O,Number(Y),W)}catch{return o}return ne?(ne.toJD()-v)*l+K*s+Z*f+ae*c:o}O.length===2?O=(Number(O)+2e3-g)%100+g:O=Number(O),Y-=1;var se=new Date(Date.UTC(2e3,Y,W,K,Z));return se.setUTCFullYear(O),se.getUTCMonth()!==Y||se.getUTCDate()!==W?o:se.getTime()+ae*c},w=t.MIN_MS=t.dateTime2ms("-9999"),m=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(R,L){return t.dateTime2ms(R,L)!==o};function y(R,L){return String(R+Math.pow(10,L)).substr(1)}var x=90*l,T=3*s,k=5*f;t.ms2DateTime=function(R,L,D){if(typeof R!="number"||!(R>=w&&R<=m))return o;L||(L=0);var z=Math.floor(i(R+.05,1)*10),F=Math.round(R-z/10),H,U,B,X,O,Y;if(_(D)){var W=Math.floor(F/l)+v,K=Math.floor(i(R,l));try{H=u.getComponentMethod("calendars","getCal")(D).fromJD(W).formatDate("yyyy-mm-dd")}catch{H=d("G%Y-%m-%d")(new Date(F))}if(H.charAt(0)==="-")for(;H.length<11;)H="-0"+H.substr(1);else for(;H.length<10;)H="0"+H;U=L<x?Math.floor(K/s):0,B=L<x?Math.floor(K%s/f):0,X=L<T?Math.floor(K%f/c):0,O=L<k?K%c*10+z:0}else Y=new Date(F),H=d("%Y-%m-%d")(Y),U=L<x?Y.getUTCHours():0,B=L<x?Y.getUTCMinutes():0,X=L<T?Y.getUTCSeconds():0,O=L<k?Y.getUTCMilliseconds()*10+z:0;return S(H,U,B,X,O)},t.ms2DateTimeLocal=function(R){if(!(R>=w+l&&R<=m-l))return o;var L=Math.floor(i(R+.05,1)*10),D=new Date(Math.round(R-L/10)),z=e("%Y-%m-%d")(D),F=D.getHours(),H=D.getMinutes(),U=D.getSeconds(),B=D.getUTCMilliseconds()*10+L;return S(z,F,H,U,B)};function S(R,L,D,z,F){if((L||D||z||F)&&(R+=" "+y(L,2)+":"+y(D,2),(z||F)&&(R+=":"+y(z,2),F))){for(var H=4;F%10===0;)H-=1,F/=10;R+="."+y(F,H)}return R}t.cleanDate=function(R,L,D){if(R===o)return L;if(t.isJSDate(R)||typeof R=="number"&&isFinite(R)){if(_(D))return a.error("JS Dates and milliseconds are incompatible with world calendars",R),L;if(R=t.ms2DateTimeLocal(+R),!R&&L!==void 0)return L}else if(!t.isDateTime(R,D))return a.error("unrecognized date",R),L;return R};var A=/%\d?f/g,$=/%h/g,M={1:"1",2:"1",3:"2",4:"2"};function C(R,L,D,z){R=R.replace(A,function(H){var U=Math.min(+H.charAt(1)||6,6),B=(L/1e3%1+2).toFixed(U).substr(2).replace(/0+$/,"")||"0";return B});var F=new Date(Math.floor(L+.05));if(R=R.replace($,function(){return M[D("%q")(F)]}),_(z))try{R=u.getComponentMethod("calendars","worldCalFmt")(R,L,z)}catch{return"Invalid"}return D(R)(F)}var E=[59,59.9,59.99,59.999,59.9999];function I(R,L){var D=i(R+.05,l),z=y(Math.floor(D/s),2)+":"+y(i(Math.floor(D/f),60),2);if(L!=="M"){r(L)||(L=0);var F=Math.min(i(R/c,60),E[L]),H=(100+F).toFixed(L).substr(1);L>0&&(H=H.replace(/0+$/,"").replace(/[\.]$/,"")),z+=":"+H}return z}t.formatDate=function(R,L,D,z,F,H){if(F=_(F)&&F,!L)if(D==="y")L=H.year;else if(D==="m")L=H.month;else if(D==="d")L=H.dayMonth+`
|
|
1
|
+
import{f as lt,t as Wr,d as tt,g as tx,r as fl,i as ck,a as rx,e as zd,m as uk,h as ax,b as ix,p as vk,c as dk,j as hk,k as pk,l as nx,s as mk,n as yk,o as gk,q as bk,u as xk,v as _k,w as wk,x as Id,y as ox,z as Tk,A as kk}from"./vendor.3dfc6121.js";import{g as pi,c as Ak}from"./helpers.162e09a8.js";var lx={exports:{}},sx={},jf={};jf.version="2.11.1";var de={exports:{}},Ot={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"},Sr={},Nd=Array.isArray,Mk=ArrayBuffer,Sk=DataView;function fx(t){return Mk.isView(t)&&!(t instanceof Sk)}Sr.isTypedArray=fx;function ff(t){return Nd(t)||fx(t)}Sr.isArrayOrTypedArray=ff;function Lk(t){return!ff(t[0])}Sr.isArray1D=Lk;Sr.ensureArray=function(t,e){return Nd(t)||(t=[]),t.length=e,t};Sr.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),Nd(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};Sr.maxRowLength=function(t){return cx(t,Math.max,0)};Sr.minRowLength=function(t){return cx(t,Math.min,1/0)};function cx(t,e,r){if(ff(t))if(ff(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 ux=lt,Fd=Sr.isArrayOrTypedArray,Hd=function(e,r){if(ux(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";for(var a=0,i=r.split("."),n,o,l;a<i.length;){if(n=String(i[a]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),n){if(n[1])i[a]=n[1];else if(a===0)i.splice(0,1);else throw"bad property string";for(o=n[2].substr(1,n[2].length-2).split("]["),l=0;l<o.length;l++)a++,i.splice(a,0,Number(o[l]))}a++}return typeof e!="object"?Ek(e,r,i):{set:dx(e,i,r),get:vx(e,i),astr:r,parts:i,obj:e}};function vx(t,e){return function(){var r=t,a,i,n,o,l;for(o=0;o<e.length-1;o++){if(a=e[o],a===-1){for(i=!0,n=[],l=0;l<r.length;l++)n[l]=vx(r[l],e.slice(o+1))(),n[l]!==n[0]&&(i=!1);return i?n[0]:n}if(typeof a=="number"&&!Fd(r)||(r=r[a],typeof r!="object"||r===null))return}if(!(typeof r!="object"||r===null)&&(n=r[e[o]],n!==null))return n}}var Ck=/(^|\.)args\[/;function Ev(t,e){return t===void 0||t===null&&!e.match(Ck)}function dx(t,e,r){return function(a){var i=t,n="",o=Ev(a,r),l,s;for(s=0;s<e.length-1;s++){if(l=e[s],typeof l=="number"&&!Fd(i))throw"array index but container is not an array";if(l===-1){if(o=!$k(i,e.slice(s+1),a,r),o)break;return}if(!hx(i,l,e[s+1],o))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";n=Dk(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 Dk(t,e){var r=e;return ux(e)?r="["+e+"]":t&&(r="."+e),t+r}function $k(t,e,r,a){var i=Fd(r),n=!0,o=r,l=a.replace("-1",0),s=i?!1:Ev(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=Ev(o,l)),s&&(n=!1),hx(t,c,f,s)&&dx(t[c],e,a.replace("-1",c))(o);return n}function hx(t,e,r,a){if(t[e]===void 0){if(a)return!1;typeof r=="number"?t[e]=[]:t[e]={}}return!0}function Ek(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var dn=Hd,Rk=/^\w*$/,Pk=0,xp=1,Yl=2,_p=3,Si=4,zk=function(e,r,a,i){a=a||"name",i=i||"value";var n,o,l,s={};r&&r.length?(l=dn(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=Rk.test(i),v={set:function(u,d){var h=d===null?Si:Pk;if(!o){if(!l||h===Si)return;o=[],l.set(o)}var p=f[u];if(p===void 0){if(h===Si)return;h=h|_p,p=o.length,f[u]=p}else d!==(c?o[p][i]:dn(o[p],i).get())&&(h=h|Yl);var g=o[p]=o[p]||{};return g[a]=u,c?g[i]=d:dn(g,i).set(d),d!==null&&(h=h&~Si),s[p]=s[p]|h,v},get:function(u){if(!!o){var d=f[u];if(d!==void 0)return c?o[d][i]:dn(o[d],i).get()}},rename:function(u,d){var h=f[u];return h===void 0||(s[h]=s[h]|xp,f[d]=h,delete f[u],o[h][a]=d),v},remove:function(u){var d=f[u];if(d===void 0)return v;var h=o[d];if(Object.keys(h).length>2)return s[d]=s[d]|Yl,v.set(u,null);if(c){for(n=d;n<o.length;n++)s[n]=s[n]|_p;for(n=d;n<o.length;n++)f[o[n][a]]--;o.splice(d,1),delete f[u]}else dn(h,i).set(null),s[d]=s[d]|Yl|Si;return v},constructUpdate:function(){for(var u,d,h={},p=Object.keys(s),g=0;g<p.length;g++)d=p[g],u=r+"["+d+"]",o[d]?(s[d]&xp&&(h[u+"."+a]=o[d][a]),s[d]&Yl&&(c?h[u+"."+i]=s[d]&Si?null:o[d][i]:h[u+"."+i]=s[d]&Si?null:dn(o[d],i).get())):h[u]=null;return h}};return v},Ik=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Nk=/^[^\.\[\]]+$/,Fk=function(t,e){for(;e;){var r=t.match(Ik);if(r)t=r[1];else if(t.match(Nk))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},Ml=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")},Hk=lt,Od=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 Hk(a)||(a=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),a},wp=Sr.isArrayOrTypedArray,ko=Ml,Ok=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(wp(i)&&wp(n)&&ko(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]&&ko(i[l])&&ko(n[l])&&t(n[l],i[l])}else ko(i)&&ko(n)&&(t(n,i),Object.keys(n).length||delete e[a])}};function Bk(t,e){var r=t%e;return r<0?r+e:r}function jk(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}var Sl={mod:Bk,modHalf:jk},px={},dr=function(t){var e=t.editType,r=t.colorEditType;r===void 0&&(r=e);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:e,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:e},color:{valType:"color",editType:r},editType:e,description:""+(t.description||"")};return t.autoSize&&(a.size.dflt="auto"),t.autoColor&&(a.color.dflt="auto"),t.arrayOk&&(a.family.arrayOk=!0,a.size.arrayOk=!0,a.color.arrayOk=!0),a},Gf={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"},mx=Gf,yx=dr,Bd=yx({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});Bd.family.dflt=mx.HOVERFONT;Bd.size.dflt=mx.HOVERFONTSIZE;var Ll={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:Bd,grouptitlefont:yx({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}},Bt={},Tp=Ml,Ao=Array.isArray;function Gk(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}Bt.extendFlat=function(){return Cl(arguments,!1,!1,!1)};Bt.extendDeep=function(){return Cl(arguments,!0,!1,!1)};Bt.extendDeepAll=function(){return Cl(arguments,!0,!0,!1)};Bt.extendDeepNoArrays=function(){return Cl(arguments,!0,!1,!0)};function Cl(t,e,r,a){var i=t[0],n=t.length,o,l,s,f,c,v,u;if(n===2&&Ao(i)&&Ao(t[1])&&i.length===0){if(u=Gk(t[1],i),u)return i;i.splice(0,i.length)}for(var d=1;d<n;d++){o=t[d];for(l in o)s=i[l],f=o[l],a&&Ao(f)?i[l]=f:e&&f&&(Tp(f)||(c=Ao(f)))?(c?(c=!1,v=s&&Ao(s)?s:[]):v=s&&Tp(s)?s:{},i[l]=Cl([v,f],e,r,a)):(typeof f<"u"||r)&&(i[l]=f)}return i}var Uk=dr,Wl=Ll.hoverlabel,Zl=Bt.extendFlat,Uf={hoverlabel:{bgcolor:Zl({},Wl.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:Zl({},Wl.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:Uk({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:Zl({},Wl.align,{arrayOk:!0}),namelength:Zl({},Wl.namelength,{arrayOk:!0}),editType:"none"}},Vk=dr,qk=Uf,La={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:Vk({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with `*reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appear as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:qk.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}},Xk=Wr.exports,Vf={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)"]]},gx=Vf.RdBu;function Yk(t,e){if(e||(e=gx),!t)return e;function r(){try{t=Vf[t]||JSON.parse(t)}catch{t=e}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),bx(t)?t:e}function bx(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||!Xk(a[1]).isValid())return!1;e=+a[0]}return!0}function Wk(t){return Vf[t]!==void 0?!0:bx(t)}var fo={scales:Vf,defaultScale:gx,get:Yk,isValid:Wk},Je={exports:{}},hr={};hr.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];hr.defaultLine="#444";hr.lightLine="#eee";hr.background="#fff";hr.borderLine="#BEC8D9";hr.lightFraction=100*(14-4)/(15-4);var fa=Wr.exports,Zk=lt,Kk=Sr.isTypedArray,tr=Je.exports={},qf=hr;tr.defaults=qf.defaults;var Qk=tr.defaultLine=qf.defaultLine;tr.lightLine=qf.lightLine;var Rv=tr.background=qf.background;tr.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"};tr.rgb=function(t){return tr.tinyRGB(fa(t))};tr.opacity=function(t){return t?fa(t).getAlpha():0};tr.addOpacity=function(t,e){var r=fa(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"};tr.combine=function(t,e){var r=fa(t).toRgb();if(r.a===1)return fa(t).toRgbString();var a=fa(e||Rv).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 fa(n).toRgbString()};tr.contrast=function(t,e,r){var a=fa(t);a.getAlpha()!==1&&(a=fa(tr.combine(t,Rv)));var i=a.isDark()?e?a.lighten(e):Rv:r?a.darken(r):Qk;return i.toString()};tr.stroke=function(t,e){var r=fa(e);t.style({stroke:tr.tinyRGB(r),"stroke-opacity":r.getAlpha()})};tr.fill=function(t,e){var r=fa(e);t.style({fill:tr.tinyRGB(r),"fill-opacity":r.getAlpha()})};tr.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]=Lc(n[a]);else t[i]=Lc(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]=Lc(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++)tr.clean(n[a])}else n&&typeof n=="object"&&!Kk(n)&&tr.clean(n)}};function Lc(t){if(Zk(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 Dl={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2},co={};co.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=lt,r=Wr.exports,a=La,i=fo,n=Je.exports,o=Dl.DESELECTDIM,l=Hd,s=co.counter,f=Sl.modHalf,c=Sr.isArrayOrTypedArray;t.valObjectMeta={data_array:{description:["An {array} of data.","The value MUST be an {array}, or we ignore it.","Note that typed arrays (e.g. Float32Array) are supported."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){c(u)?d.set(u):h!==void 0&&d.set(h)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(u,d,h,p){p.coerceNumber&&(u=+u),p.values.indexOf(u)===-1?d.set(h):d.set(u)},validateFunction:function(u,d){d.coerceNumber&&(u=+u);for(var h=d.values,p=0;p<h.length;p++){var g=String(h[p]);if(g.charAt(0)==="/"&&g.charAt(g.length-1)==="/"){var _=new RegExp(g.substr(1,g.length-2));if(_.test(u))return!0}else if(u===h[p])return!0}return!1}},boolean:{description:"A boolean (true/false) value.",requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){u===!0||u===!1?d.set(u):d.set(h)}},number:{description:["A number or a numeric value","(e.g. a number inside a string).","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,d,h,p){!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?d.set(h):d.set(+u)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,d,h,p){u%1||!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?d.set(h):d.set(+u)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(u,d,h,p){if(typeof u!="string"){var g=typeof u=="number";p.strict===!0||!g?d.set(h):d.set(String(u))}else p.noBlank&&!u?d.set(h):d.set(u)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(u,d,h){r(u).isValid()?d.set(u):d.set(h)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){function p(g){return r(g).isValid()}!Array.isArray(u)||!u.length?d.set(h):u.every(p)?d.set(u):d.set(h)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(i.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){d.set(i.get(u,h))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){u==="auto"?d.set("auto"):e(u)?d.set(f(+u,360)):d.set(h)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(u,d,h,p){var g=p.regex||s(h);if(typeof u=="string"&&g.test(u)){d.set(u);return}d.set(h)},validateFunction:function(u,d){var h=d.dflt;return u===h?!0:typeof u!="string"?!1:!!s(h).test(u)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(u,d,h,p){if(typeof u!="string"){d.set(h);return}if((p.extras||[]).indexOf(u)!==-1){d.set(u);return}for(var g=u.split("+"),_=0;_<g.length;){var b=g[_];p.flags.indexOf(b)===-1||g.indexOf(b)<_?g.splice(_,1):_++}g.length?d.set(g.join("+")):d.set(h)}},any:{description:"Any type.",requiredOpts:[],otherOpts:["dflt","values","arrayOk"],coerceFunction:function(u,d,h){u===void 0?d.set(h):d.set(u)}},info_array:{description:["An {array} of plot information."].join(" "),requiredOpts:["items"],otherOpts:["dflt","freeLength","dimensions"],coerceFunction:function(u,d,h,p){function g(E,I,P){var R,L={set:function(D){R=D}};return P===void 0&&(P=I.dflt),t.valObjectMeta[I.valType].coerceFunction(E,L,P,I),R}var _=p.dimensions===2||p.dimensions==="1-2"&&Array.isArray(u)&&Array.isArray(u[0]);if(!Array.isArray(u)){d.set(h);return}var b=p.items,w=[],m=Array.isArray(b),y=m&&_&&Array.isArray(b[0]),x=_&&m&&!y,T=m&&!x?b.length:u.length,k,S,A,$,M,C;if(h=Array.isArray(h)?h:[],_)for(k=0;k<T;k++)for(w[k]=[],A=Array.isArray(u[k])?u[k]:[],x?M=b.length:m?M=b[k].length:M=A.length,S=0;S<M;S++)x?$=b[S]:m?$=b[k][S]:$=b,C=g(A[S],$,(h[k]||[])[S]),C!==void 0&&(w[k][S]=C);else for(k=0;k<T;k++)C=g(u[k],m?b[k]:b,h[k]),C!==void 0&&(w[k]=C);d.set(w)},validateFunction:function(u,d){if(!Array.isArray(u))return!1;var h=d.items,p=Array.isArray(h),g=d.dimensions===2;if(!d.freeLength&&u.length!==h.length)return!1;for(var _=0;_<u.length;_++)if(g){if(!Array.isArray(u[_])||!d.freeLength&&u[_].length!==h[_].length)return!1;for(var b=0;b<u[_].length;b++)if(!v(u[_][b],p?h[_][b]:h))return!1}else if(!v(u[_],p?h[_]:h))return!1;return!0}}},t.coerce=function(u,d,h,p,g){var _=l(h,p).get(),b=l(u,p),w=l(d,p),m=b.get(),y=d._template;if(m===void 0&&y&&(m=l(y,p).get(),y=0),g===void 0&&(g=_.dflt),_.arrayOk&&c(m))return w.set(m),m;var x=t.valObjectMeta[_.valType].coerceFunction;x(m,w,g,_);var T=w.get();return y&&T===g&&!v(m,_)&&(m=l(y,p).get(),x(m,w,g,_),T=w.get()),T},t.coerce2=function(u,d,h,p,g){var _=l(u,p),b=t.coerce(u,d,h,p,g),w=_.get();return w!=null?b:!1},t.coerceFont=function(u,d,h){var p={};return h=h||{},p.family=u(d+".family",h.family),p.size=u(d+".size",h.size),p.color=u(d+".color",h.color),p},t.coercePattern=function(u,d,h,p){var g=u(d+".shape");if(g){u(d+".solidity"),u(d+".size");var _=u(d+".fillmode"),b=_==="overlay";if(!p){var w=u(d+".bgcolor",b?h:void 0);u(d+".fgcolor",b?n.contrast(w):h)}u(d+".fgopacity",b?.5:1)}},t.coerceHoverinfo=function(u,d,h){var p=d._module.attributes,g=p.hoverinfo?p:a,_=g.hoverinfo,b;if(h._dataLength===1){var w=_.dflt==="all"?_.flags.slice():_.dflt.split("+");w.splice(w.indexOf("name"),1),b=w.join("+")}return t.coerce(u,d,g,"hoverinfo",b)},t.coerceSelectionMarkerOpacity=function(u,d){if(!!u.marker){var h=u.marker.opacity;if(h!==void 0){var p,g;!c(h)&&!u.selected&&!u.unselected&&(p=h,g=o*h),d("selected.marker.opacity",p),d("unselected.marker.opacity",g)}}};function v(u,d){var h=t.valObjectMeta[d.valType];if(d.arrayOk&&c(u))return!0;if(h.validateFunction)return h.validateFunction(u,d);var p={},g=p,_={set:function(b){g=b}};return h.coerceFunction(u,_,p,d),g!==p}t.validate=v})(px);var xx={},en={exports:{}},_x={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."}},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","<path-to-plotly.js>/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},wx={};function Tx(t,e){for(var r in t){var a=t[r];a.valType?e[r]=a.dflt:(e[r]||(e[r]={}),Tx(a,e[r]))}}Tx(_x,wx);var uo={configAttributes:_x,dfltConfig:wx},Cc=tt.exports,Jk=lt,Mo=[],kx=function(t,e){if(Mo.indexOf(t)!==-1)return;Mo.push(t);var r=1e3;Jk(e)?r=e:e==="long"&&(r=3e3);var a=Cc.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(Mo);function n(o){o.duration(700).style("opacity",0).each("end",function(l){var s=Mo.indexOf(l);s!==-1&&Mo.splice(s,1),Cc.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=Cc.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(n)});for(var s=l.append("p"),f=o.split(/<br\s*\/?>/g),c=0;c<f.length;c++)c&&s.append("br"),s.append("span").text(f[c]);e==="stick"?l.transition().duration(350).style("opacity",1):l.transition().duration(700).style("opacity",1).transition().delay(r).call(n)})},Zn=uo.dfltConfig,jd=kx,Gd=en.exports={};Gd.log=function(){var t;if(Zn.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Zn.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);jd(r.join("<br>"),"long")}};Gd.warn=function(){var t;if(Zn.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Zn.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);jd(r.join("<br>"),"stick")}};Gd.error=function(){var t;if(Zn.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(Zn.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);jd(r.join("<br>"),"stick")}};var Ve={},Ud=function(){},Ax=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},Xf={};(function(t){var e=tx;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]]]}})(Xf);var eA=tt.exports,tA=en.exports,rA=Xf,aA=tx;function iA(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 nA(t){var e=eA.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")}function Mx(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function oA(t,e){Sx("global",t,e)}function Sx(t,e,r){var a="plotly.js-style-"+t,i=document.getElementById(a);i||(i=document.createElement("style"),i.setAttribute("id",a),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var n=i.sheet;n.insertRule?n.insertRule(e+"{"+r+"}",0):n.addRule?n.addRule(e,r,0):tA.warn("addStyleRule failed")}function lA(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&Mx(r)}function sA(t){var e=Cx(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=Lx(a);if(i){var n=rA.convertCssMatrix(i);r=aA.multiply(r,r,n)}}),r}function Lx(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 Cx(t){for(var e=[];fA(t);)e.push(t),t=t.parentNode;return e}function fA(t){return t&&(t instanceof Element||t instanceof HTMLElement)}function cA(t,e){return t&&e&&t.x===e.x&&t.y===e.y&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}var Vd={getGraphDiv:iA,isPlotDiv:nA,removeElement:Mx,addStyleRule:oA,addRelatedStyleRule:Sx,deleteRelatedStyleRule:lA,getFullTransformMatrix:sA,getElementTransformMatrix:Lx,getElementAndAncestors:Cx,equalDomRects:cA},Yf={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(" ")}}},Ga={};Ga.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(" ")};Ga.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")};var uA=Ga.dash,vA=Bt.extendFlat,dA={newshape:{line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,editType:"none",description:"Sets the line width (in px)."},dash:vA({},uA,{dflt:"solid",editType:"none"}),editType:"none"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"none",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"none",description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"none",description:"Specifies whether new shapes are drawn below or above traces."},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",editType:"none",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},editType:"none"},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",editType:"none",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active shape."},editType:"none"}},qd=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}},Pv=dr,hA=Yf,Us=hr,kp=dA,pA=qd,Ap=Bt.extendFlat,Wf=Pv({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});Wf.family.dflt='"Open Sans", verdana, arial, sans-serif';Wf.size.dflt=12;Wf.color.dflt=Us.defaultLine;var $l={font:Wf,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Pv({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:Ap(pA({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},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:Us.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:Us.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:Us.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:kp.newshape,activeshape:kp.activeshape,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:Ap({},hA.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:Pv({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}};(function(t){var e=en.exports,r=Ud,a=Ax,i=Ml,n=Vd.addStyleRule,o=Bt,l=La,s=$l,f=o.extendFlat,c=o.extendDeepAll;t.modules={},t.allCategories={},t.allTypes=[],t.subplotsRegistry={},t.transformsRegistry={},t.componentsRegistry={},t.layoutArrayContainers=[],t.layoutArrayRegexes=[],t.traceLayoutAttributes={},t.localeRegistry={},t.apiMethodRegistry={},t.collectableSubplotTypes=null,t.register=function(x){if(t.collectableSubplotTypes=null,x)x&&!Array.isArray(x)&&(x=[x]);else throw new Error("No argument passed to Plotly.register.");for(var T=0;T<x.length;T++){var k=x[T];if(!k)throw new Error("Invalid module was attempted to be registered!");switch(k.moduleType){case"trace":v(k);break;case"transform":h(k);break;case"component":d(k);break;case"locale":p(k);break;case"apiMethod":var S=k.name;t.apiMethodRegistry[S]=k.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},t.getModule=function(y){var x=t.modules[m(y)];return x?x._module:!1},t.traceIs=function(y,x){if(y=m(y),y==="various")return!1;var T=t.modules[y];return T||(y&&e.log("Unrecognized trace type "+y+"."),T=t.modules[l.type.dflt]),!!T.categories[x]},t.getTransformIndices=function(y,x){for(var T=[],k=y.transforms||[],S=0;S<k.length;S++)k[S].type===x&&T.push(S);return T},t.hasTransform=function(y,x){for(var T=y.transforms||[],k=0;k<T.length;k++)if(T[k].type===x)return!0;return!1},t.getComponentMethod=function(y,x){var T=t.componentsRegistry[y];return T&&T[x]||r},t.call=function(){var y=arguments[0],x=[].slice.call(arguments,1);return t.apiMethodRegistry[y].apply(null,x)};function v(y){var x=y.name,T=y.categories,k=y.meta;if(t.modules[x]){e.log("Type "+x+" already registered");return}t.subplotsRegistry[y.basePlotModule.name]||u(y.basePlotModule);for(var S={},A=0;A<T.length;A++)S[T[A]]=!0,t.allCategories[T[A]]=!0;t.modules[x]={_module:y,categories:S},k&&Object.keys(k).length&&(t.modules[x].meta=k),t.allTypes.push(x);for(var $ in t.componentsRegistry)_($,x);y.layoutAttributes&&f(t.traceLayoutAttributes,y.layoutAttributes);var M=y.basePlotModule,C=M.name;if(C==="mapbox"){var E=M.constants.styleRules;for(var I in E)n(".js-plotly-plot .plotly .mapboxgl-"+I,E[I])}(C==="geo"||C==="mapbox")&&typeof window!==void 0&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function u(y){var x=y.name;if(t.subplotsRegistry[x]){e.log("Plot type "+x+" already registered.");return}g(y),t.subplotsRegistry[x]=y;for(var T in t.componentsRegistry)w(T,y.name)}function d(y){if(typeof y.name!="string")throw new Error("Component module *name* must be a string.");var x=y.name;t.componentsRegistry[x]=y,y.layoutAttributes&&(y.layoutAttributes._isLinkedToArray&&a(t.layoutArrayContainers,x),g(y));for(var T in t.modules)_(x,T);for(var k in t.subplotsRegistry)w(x,k);for(var S in t.transformsRegistry)b(x,S);y.schema&&y.schema.layout&&c(s,y.schema.layout)}function h(y){if(typeof y.name!="string")throw new Error("Transform module *name* must be a string.");var x="Transform module "+y.name,T=typeof y.transform=="function",k=typeof y.calcTransform=="function";if(!T&&!k)throw new Error(x+" is missing a *transform* or *calcTransform* method.");T&&k&&e.log([x+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),i(y.attributes)||e.log(x+" registered without an *attributes* object."),typeof y.supplyDefaults!="function"&&e.log(x+" registered without a *supplyDefaults* method."),t.transformsRegistry[y.name]=y;for(var S in t.componentsRegistry)b(S,y.name)}function p(y){var x=y.name,T=x.split("-")[0],k=y.dictionary,S=y.format,A=k&&Object.keys(k).length,$=S&&Object.keys(S).length,M=t.localeRegistry,C=M[x];if(C||(M[x]=C={}),T!==x){var E=M[T];E||(M[T]=E={}),A&&E.dictionary===C.dictionary&&(E.dictionary=k),$&&E.format===C.format&&(E.format=S)}A&&(C.dictionary=k),$&&(C.format=S)}function g(y){if(y.layoutAttributes){var x=y.layoutAttributes._arrayAttrRegexps;if(x)for(var T=0;T<x.length;T++)a(t.layoutArrayRegexes,x[T])}}function _(y,x){var T=t.componentsRegistry[y].schema;if(!(!T||!T.traces)){var k=T.traces[x];k&&c(t.modules[x]._module.attributes,k)}}function b(y,x){var T=t.componentsRegistry[y].schema;if(!(!T||!T.transforms)){var k=T.transforms[x];k&&c(t.transformsRegistry[x].attributes,k)}}function w(y,x){var T=t.componentsRegistry[y].schema;if(!(!T||!T.subplots)){var k=t.subplotsRegistry[x],S=k.layoutAttributes,A=k.attr==="subplot"?k.name:k.attr;Array.isArray(A)&&(A=A[0]);var $=T.subplots[A];S&&$&&c(S,$)}}function m(y){return typeof y=="object"&&(y=y.type),y}})(Ve);(function(t){var e=fl.timeFormat,r=lt,a=en.exports,i=Sl.mod,n=Ot,o=n.BADNUM,l=n.ONEDAY,s=n.ONEHOUR,f=n.ONEMIN,c=n.ONESEC,v=n.EPOCHJD,u=Ve,d=fl.utcFormat,h=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,p=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,g=new Date().getFullYear()-70;function _(R){return R&&u.componentsRegistry.calendars&&typeof R=="string"&&R!=="gregorian"}t.dateTick0=function(R,L){var D=b(R,!!L);if(L<2)return D;var z=t.dateTime2ms(D,R);return z+=l*(L-1),t.ms2DateTime(z,0,R)};function b(R,L){return _(R)?L?u.getComponentMethod("calendars","CANONICAL_SUNDAY")[R]:u.getComponentMethod("calendars","CANONICAL_TICK")[R]:L?"2000-01-02":"2000-01-01"}t.dfltRange=function(R){return _(R)?u.getComponentMethod("calendars","DFLTRANGE")[R]:["2000-01-01","2001-01-01"]},t.isJSDate=function(R){return typeof R=="object"&&R!==null&&typeof R.getTime=="function"};var w,m;t.dateTime2ms=function(R,L){if(t.isJSDate(R)){var D=R.getTimezoneOffset()*f,z=(R.getUTCMinutes()-R.getMinutes())*f+(R.getUTCSeconds()-R.getSeconds())*c+(R.getUTCMilliseconds()-R.getMilliseconds());if(z){var F=3*f;D=D-F/2+i(z-D+F/2,F)}return R=Number(R)-D,R>=w&&R<=m?R:o}if(typeof R!="string"&&typeof R!="number")return o;R=String(R);var H=_(L),U=R.charAt(0);H&&(U==="G"||U==="g")&&(R=R.substr(1),L="");var B=H&&L.substr(0,7)==="chinese",X=R.match(B?p:h);if(!X)return o;var O=X[1],Y=X[3]||"1",W=Number(X[5]||1),K=Number(X[7]||0),Z=Number(X[9]||0),ae=Number(X[11]||0);if(H){if(O.length===2)return o;O=Number(O);var ne;try{var oe=u.getComponentMethod("calendars","getCal")(L);if(B){var re=Y.charAt(Y.length-1)==="i";Y=parseInt(Y,10),ne=oe.newDate(O,oe.toMonthIndex(O,Y,re),W)}else ne=oe.newDate(O,Number(Y),W)}catch{return o}return ne?(ne.toJD()-v)*l+K*s+Z*f+ae*c:o}O.length===2?O=(Number(O)+2e3-g)%100+g:O=Number(O),Y-=1;var se=new Date(Date.UTC(2e3,Y,W,K,Z));return se.setUTCFullYear(O),se.getUTCMonth()!==Y||se.getUTCDate()!==W?o:se.getTime()+ae*c},w=t.MIN_MS=t.dateTime2ms("-9999"),m=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(R,L){return t.dateTime2ms(R,L)!==o};function y(R,L){return String(R+Math.pow(10,L)).substr(1)}var x=90*l,T=3*s,k=5*f;t.ms2DateTime=function(R,L,D){if(typeof R!="number"||!(R>=w&&R<=m))return o;L||(L=0);var z=Math.floor(i(R+.05,1)*10),F=Math.round(R-z/10),H,U,B,X,O,Y;if(_(D)){var W=Math.floor(F/l)+v,K=Math.floor(i(R,l));try{H=u.getComponentMethod("calendars","getCal")(D).fromJD(W).formatDate("yyyy-mm-dd")}catch{H=d("G%Y-%m-%d")(new Date(F))}if(H.charAt(0)==="-")for(;H.length<11;)H="-0"+H.substr(1);else for(;H.length<10;)H="0"+H;U=L<x?Math.floor(K/s):0,B=L<x?Math.floor(K%s/f):0,X=L<T?Math.floor(K%f/c):0,O=L<k?K%c*10+z:0}else Y=new Date(F),H=d("%Y-%m-%d")(Y),U=L<x?Y.getUTCHours():0,B=L<x?Y.getUTCMinutes():0,X=L<T?Y.getUTCSeconds():0,O=L<k?Y.getUTCMilliseconds()*10+z:0;return S(H,U,B,X,O)},t.ms2DateTimeLocal=function(R){if(!(R>=w+l&&R<=m-l))return o;var L=Math.floor(i(R+.05,1)*10),D=new Date(Math.round(R-L/10)),z=e("%Y-%m-%d")(D),F=D.getHours(),H=D.getMinutes(),U=D.getSeconds(),B=D.getUTCMilliseconds()*10+L;return S(z,F,H,U,B)};function S(R,L,D,z,F){if((L||D||z||F)&&(R+=" "+y(L,2)+":"+y(D,2),(z||F)&&(R+=":"+y(z,2),F))){for(var H=4;F%10===0;)H-=1,F/=10;R+="."+y(F,H)}return R}t.cleanDate=function(R,L,D){if(R===o)return L;if(t.isJSDate(R)||typeof R=="number"&&isFinite(R)){if(_(D))return a.error("JS Dates and milliseconds are incompatible with world calendars",R),L;if(R=t.ms2DateTimeLocal(+R),!R&&L!==void 0)return L}else if(!t.isDateTime(R,D))return a.error("unrecognized date",R),L;return R};var A=/%\d?f/g,$=/%h/g,M={1:"1",2:"1",3:"2",4:"2"};function C(R,L,D,z){R=R.replace(A,function(H){var U=Math.min(+H.charAt(1)||6,6),B=(L/1e3%1+2).toFixed(U).substr(2).replace(/0+$/,"")||"0";return B});var F=new Date(Math.floor(L+.05));if(R=R.replace($,function(){return M[D("%q")(F)]}),_(z))try{R=u.getComponentMethod("calendars","worldCalFmt")(R,L,z)}catch{return"Invalid"}return D(R)(F)}var E=[59,59.9,59.99,59.999,59.9999];function I(R,L){var D=i(R+.05,l),z=y(Math.floor(D/s),2)+":"+y(i(Math.floor(D/f),60),2);if(L!=="M"){r(L)||(L=0);var F=Math.min(i(R/c,60),E[L]),H=(100+F).toFixed(L).substr(1);L>0&&(H=H.replace(/0+$/,"").replace(/[\.]$/,"")),z+=":"+H}return z}t.formatDate=function(R,L,D,z,F,H){if(F=_(F)&&F,!L)if(D==="y")L=H.year;else if(D==="m")L=H.month;else if(D==="d")L=H.dayMonth+`
|
|
2
2
|
`+H.year;else return I(R,D)+`
|
|
3
3
|
`+C(H.dayMonthYear,R,z,F);return C(L,R,z,F)};var P=3*l;t.incrementMonth=function(R,L,D){D=_(D)&&D;var z=i(R,l);if(R=Math.round(R-z),D)try{var F=Math.round(R/l)+v,H=u.getComponentMethod("calendars","getCal")(D),U=H.fromJD(F);return L%12?H.add(U,L,"m"):H.add(U,L/12,"y"),(U.toJD()-v)*l+z}catch{a.error("invalid ms "+R+" in calendar "+D)}var B=new Date(R+P);return B.setUTCMonth(B.getUTCMonth()+L)+z-P},t.findExactDates=function(R,L){for(var D=0,z=0,F=0,H=0,U,B,X=_(L)&&u.getComponentMethod("calendars","getCal")(L),O=0;O<R.length;O++){if(B=R[O],!r(B)){H++;continue}if(!(B%l))if(X)try{U=X.fromJD(B/l+v),U.day()===1?U.month()===1?D++:z++:F++}catch{}else U=new Date(B),U.getUTCDate()===1?U.getUTCMonth()===0?D++:z++:F++}z+=D,F+=z;var Y=R.length-H;return{exactYears:D/Y,exactMonths:z/Y,exactDays:F/Y}}})(xx);var Xd={},Dx=function(e){return e};(function(t){var e=lt,r=en.exports,a=Dx,i=Ot.BADNUM,n=1e-9;t.findBin=function(c,v,u){if(e(v.start))return u?Math.ceil((c-v.start)/v.size-n)-1:Math.floor((c-v.start)/v.size+n);var d=0,h=v.length,p=0,g=h>1?(v[h-1]-v[0])/(h-1):1,_,b;for(g>=0?b=u?o:l:b=u?f:s,c+=g*n*(u?-1:1)*(g>=0?1:-1);d<h&&p++<100;)_=Math.floor((d+h)/2),b(v[_],c)?d=_+1:h=_;return p>90&&r.log("Long binary search..."),d-1};function o(c,v){return c<v}function l(c,v){return c<=v}function s(c,v){return c>v}function f(c,v){return c>=v}t.sorterAsc=function(c,v){return c-v},t.sorterDes=function(c,v){return v-c},t.distinctVals=function(c){var v=c.slice();v.sort(t.sorterAsc);var u;for(u=v.length-1;u>-1&&v[u]===i;u--);for(var d=v[u]-v[0]||1,h=d/(u||1)/1e4,p=[],g,_=0;_<=u;_++){var b=v[_],w=b-g;g===void 0?(p.push(b),g=b):w>h&&(d=Math.min(d,w),p.push(b),g=b)}return{vals:p,minDiff:d}},t.roundUp=function(c,v,u){for(var d=0,h=v.length-1,p,g=0,_=u?0:1,b=u?1:0,w=u?Math.ceil:Math.floor;d<h&&g++<100;)p=w((d+h)/2),v[p]<=c?d=p+_:h=p-b;return v[d]},t.sort=function(c,v){for(var u=0,d=0,h=1;h<c.length;h++){var p=v(c[h],c[h-1]);if(p<0?u=1:p>0&&(d=1),u&&d)return c.sort(v)}return d?c:c.reverse()},t.findIndexOfMin=function(c,v){v=v||a;for(var u=1/0,d,h=0;h<c.length;h++){var p=v(c[h]);p<u&&(u=p,d=h)}return d}})(Xd);var Yd=function(e){return Object.keys(e).sort()},$x={};(function(t){var e=lt,r=Sr.isArrayOrTypedArray;t.aggNums=function(a,i,n,o){var l,s;if((!o||o>n.length)&&(o=n.length),e(i)||(i=!1),r(n[0])){for(s=new Array(o),l=0;l<o;l++)s[l]=t.aggNums(a,i,n[l]);n=s}for(l=0;l<o;l++)e(i)?e(n[l])&&(i=a(+i,+n[l])):i=n[l];return i},t.len=function(a){return t.aggNums(function(i){return i+1},0,a)},t.mean=function(a,i){return i||(i=t.len(a)),t.aggNums(function(n,o){return n+o},0,a)/i},t.midRange=function(a){if(!(a===void 0||a.length===0))return(t.aggNums(Math.max,null,a)+t.aggNums(Math.min,null,a))/2},t.variance=function(a,i,n){return i||(i=t.len(a)),e(n)||(n=t.mean(a,i)),t.aggNums(function(o,l){return o+Math.pow(l-n,2)},0,a)/i},t.stdev=function(a,i,n){return Math.sqrt(t.variance(a,i,n))},t.median=function(a){var i=a.slice().sort();return t.interp(i,.5)},t.interp=function(a,i){if(!e(i))throw"n should be a finite number";if(i=i*a.length-.5,i<0)return a[0];if(i>a.length-1)return a[a.length-1];var n=i%1;return n*a[Math.ceil(i)]+(1-n)*a[Math.floor(i)]}})($x);var Ex=Sl,Dc=Ex.mod,mA=Ex.modHalf,cl=Math.PI,si=2*cl;function yA(t){return t/180*cl}function gA(t){return t/cl*180}function Wd(t){return Math.abs(t[1]-t[0])>si-1e-14}function Rx(t,e){return mA(e-t,si)}function bA(t,e){return Math.abs(Rx(t,e))}function Px(t,e){if(Wd(e))return!0;var r,a;e[0]<e[1]?(r=e[0],a=e[1]):(r=e[1],a=e[0]),r=Dc(r,si),a=Dc(a,si),r>a&&(a+=si);var i=Dc(t,si),n=i+si;return i>=r&&i<=a||n>=r&&n<=a}function xA(t,e,r,a){if(!Px(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 Zd(t,e,r,a,i,n,o){i=i||0,n=n||0;var l=Wd([r,a]),s,f,c,v,u;l?(s=0,f=cl,c=si):r<a?(s=r,c=a):(s=a,c=r),t<e?(v=t,u=e):(v=e,u=t);function d(_,b){return[_*Math.cos(b)+i,n-_*Math.sin(b)]}var h=Math.abs(c-s)<=cl?0:1;function p(_,b,w){return"A"+[_,_]+" "+[0,h,w]+" "+d(_,b)}var g;return l?v===null?g="M"+d(u,s)+p(u,f,0)+p(u,c,0)+"Z":g="M"+d(v,s)+p(v,f,0)+p(v,c,0)+"ZM"+d(u,s)+p(u,f,1)+p(u,c,1)+"Z":v===null?(g="M"+d(u,s)+p(u,c,0),o&&(g+="L0,0Z")):g="M"+d(v,s)+"L"+d(u,s)+p(u,c,0)+"L"+d(v,c)+p(v,s,1)+"Z",g}function _A(t,e,r,a,i){return Zd(null,t,e,r,a,i,0)}function wA(t,e,r,a,i){return Zd(null,t,e,r,a,i,1)}function TA(t,e,r,a,i,n){return Zd(t,e,r,a,i,n,1)}var kA={deg2rad:yA,rad2deg:gA,angleDelta:Rx,angleDist:bA,isFullCircle:Wd,isAngleInsideSector:Px,isPtInsideSector:xA,pathArc:_A,pathSector:wA,pathAnnulus:TA},tn={};tn.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=1/3};tn.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>1/3&&e.x<2/3};tn.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=2/3};tn.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=2/3};tn.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>1/3&&e.y<2/3};tn.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=1/3};var rn={},$c=Sl.mod;rn.segmentsIntersect=zx;function zx(t,e,r,a,i,n,o,l){var s=r-t,f=i-t,c=o-i,v=a-e,u=n-e,d=l-n,h=s*d-c*v;if(h===0)return null;var p=(f*d-c*u)/h,g=(f*v-s*u)/h;return g<0||g>1||p<0||p>1?null:{x:t+s*p,y:e+v*p}}rn.segmentDistance=function(e,r,a,i,n,o,l,s){if(zx(e,r,a,i,n,o,l,s))return 0;var f=a-e,c=i-r,v=l-n,u=s-o,d=f*f+c*c,h=v*v+u*u,p=Math.min(Kl(f,c,d,n-e,o-r),Kl(f,c,d,l-e,s-r),Kl(v,u,h,e-n,r-o),Kl(v,u,h,a-n,i-o));return Math.sqrt(p)};function Kl(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 Ql,zv,Mp;rn.getTextLocation=function(e,r,a,i){if((e!==zv||i!==Mp)&&(Ql={},zv=e,Mp=i),Ql[a])return Ql[a];var n=e.getPointAtLength($c(a-i/2,r)),o=e.getPointAtLength($c(a+i/2,r)),l=Math.atan((o.y-n.y)/(o.x-n.x)),s=e.getPointAtLength($c(a,r)),f=(s.x*4+n.x+o.x)/6,c=(s.y*4+n.y+o.y)/6,v={x:f,y:c,theta:l};return Ql[a]=v,v};rn.clearLocationCache=function(){zv=null};rn.getVisibleSegment=function(e,r,a){var i=r.left,n=r.right,o=r.top,l=r.bottom,s=0,f=e.getTotalLength(),c=f,v,u;function d(p){var g=e.getPointAtLength(p);p===0?v=g:p===f&&(u=g);var _=g.x<i?i-g.x:g.x>n?g.x-n:0,b=g.y<o?o-g.y:g.y>l?g.y-l:0;return Math.sqrt(_*_+b*b)}for(var h=d(s);h;){if(s+=h+a,s>c)return;h=d(s)}for(h=d(c);h;){if(c-=h+a,s>c)return;h=d(c)}return{min:s,max:c,len:c-s,total:f,isClosed:s===0&&c===f&&Math.abs(v.x-u.x)<.1&&Math.abs(v.y-u.y)<.1}};rn.findPointOnPath=function(e,r,a,i){i=i||{};for(var n=i.pathLength||e.getTotalLength(),o=i.tolerance||.001,l=i.iterationLimit||30,s=e.getPointAtLength(0)[a]>e.getPointAtLength(n)[a]?-1:1,f=0,c=0,v=n,u,d,h;f<l;){if(u=(c+v)/2,d=e.getPointAtLength(u),h=d[a]-r,Math.abs(h)<o)return d;s*h>0?v=u:c=u,f++}return d};var Zf={};(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)}})(Zf);var AA=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)},MA=lt,SA=ck.exports,LA=function(e){var r;if(e&&e.hasOwnProperty("userAgent")?r=e.userAgent:r=CA(),typeof r!="string")return!0;var a=SA({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(MA(f)&&(f=+f),f>=13)return!0}}}return a};function CA(){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 DA=tt.exports,$A=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]=DA.select(this)}),i},EA=Ve,RA=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=EA.localeRegistry}var f=a.split("-")[0];if(f===a)break;a=f}return r},PA=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},zA=function(e){for(var r=FA(e)?NA:IA,a=[],i=0;i<e.length;i++){var n=e[i];r(n)&&a.push(n)}return a};function IA(t){return t.visible===!0}function NA(t){var e=t[0].trace;return e.visible===!0&&e._length!==0}function FA(t){return Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace}var HA=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},OA=lt,BA=Ot.BADNUM,jA=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,GA=function(e){return typeof e=="string"&&(e=e.replace(jA,"")),OA(e)?Number(e):BA},Wo=tt.exports,UA=fl.utcFormat,VA=rx.format,Ix=lt,Nx=Ot,Fx=Nx.FP_SAFE,qA=-Fx,Sp=Nx.BADNUM,J=de.exports={};J.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 Lp={};J.warnBadFormat=function(t){var e=String(t);Lp[e]||(Lp[e]=1,J.warn('encountered bad format: "'+e+'"'))};J.noFormat=function(t){return String(t)};J.numberFormat=function(t){var e;try{e=VA(J.adjustFormat(t))}catch{return J.warnBadFormat(t),J.noFormat}return e};J.nestedProperty=Hd;J.keyedContainer=zk;J.relativeAttr=Fk;J.isPlainObject=Ml;J.toLogRange=Od;J.relinkPrivateKeys=Ok;var an=Sr;J.isTypedArray=an.isTypedArray;J.isArrayOrTypedArray=an.isArrayOrTypedArray;J.isArray1D=an.isArray1D;J.ensureArray=an.ensureArray;J.concat=an.concat;J.maxRowLength=an.maxRowLength;J.minRowLength=an.minRowLength;var Hx=Sl;J.mod=Hx.mod;J.modHalf=Hx.modHalf;var mi=px;J.valObjectMeta=mi.valObjectMeta;J.coerce=mi.coerce;J.coerce2=mi.coerce2;J.coerceFont=mi.coerceFont;J.coercePattern=mi.coercePattern;J.coerceHoverinfo=mi.coerceHoverinfo;J.coerceSelectionMarkerOpacity=mi.coerceSelectionMarkerOpacity;J.validate=mi.validate;var zr=xx;J.dateTime2ms=zr.dateTime2ms;J.isDateTime=zr.isDateTime;J.ms2DateTime=zr.ms2DateTime;J.ms2DateTimeLocal=zr.ms2DateTimeLocal;J.cleanDate=zr.cleanDate;J.isJSDate=zr.isJSDate;J.formatDate=zr.formatDate;J.incrementMonth=zr.incrementMonth;J.dateTick0=zr.dateTick0;J.dfltRange=zr.dfltRange;J.findExactDates=zr.findExactDates;J.MIN_MS=zr.MIN_MS;J.MAX_MS=zr.MAX_MS;var nn=Xd;J.findBin=nn.findBin;J.sorterAsc=nn.sorterAsc;J.sorterDes=nn.sorterDes;J.distinctVals=nn.distinctVals;J.roundUp=nn.roundUp;J.sort=nn.sort;J.findIndexOfMin=nn.findIndexOfMin;J.sortObjectKeys=Yd;var yi=$x;J.aggNums=yi.aggNums;J.len=yi.len;J.mean=yi.mean;J.median=yi.median;J.midRange=yi.midRange;J.variance=yi.variance;J.stdev=yi.stdev;J.interp=yi.interp;var va=Xf;J.init2dArray=va.init2dArray;J.transposeRagged=va.transposeRagged;J.dot=va.dot;J.translationMatrix=va.translationMatrix;J.rotationMatrix=va.rotationMatrix;J.rotationXYMatrix=va.rotationXYMatrix;J.apply3DTransform=va.apply3DTransform;J.apply2DTransform=va.apply2DTransform;J.apply2DTransform2=va.apply2DTransform2;J.convertCssMatrix=va.convertCssMatrix;J.inverseTransformMatrix=va.inverseTransformMatrix;var Ca=kA;J.deg2rad=Ca.deg2rad;J.rad2deg=Ca.rad2deg;J.angleDelta=Ca.angleDelta;J.angleDist=Ca.angleDist;J.isFullCircle=Ca.isFullCircle;J.isAngleInsideSector=Ca.isAngleInsideSector;J.isPtInsideSector=Ca.isPtInsideSector;J.pathArc=Ca.pathArc;J.pathSector=Ca.pathSector;J.pathAnnulus=Ca.pathAnnulus;var vo=tn;J.isLeftAnchor=vo.isLeftAnchor;J.isCenterAnchor=vo.isCenterAnchor;J.isRightAnchor=vo.isRightAnchor;J.isTopAnchor=vo.isTopAnchor;J.isMiddleAnchor=vo.isMiddleAnchor;J.isBottomAnchor=vo.isBottomAnchor;var ho=rn;J.segmentsIntersect=ho.segmentsIntersect;J.segmentDistance=ho.segmentDistance;J.getTextLocation=ho.getTextLocation;J.clearLocationCache=ho.clearLocationCache;J.getVisibleSegment=ho.getVisibleSegment;J.findPointOnPath=ho.findPointOnPath;var Kf=Bt;J.extendFlat=Kf.extendFlat;J.extendDeep=Kf.extendDeep;J.extendDeepAll=Kf.extendDeepAll;J.extendDeepNoArrays=Kf.extendDeepNoArrays;var Kd=en.exports;J.log=Kd.log;J.warn=Kd.warn;J.error=Kd.error;var XA=co;J.counterRegex=XA.counter;var Qd=Zf;J.throttle=Qd.throttle;J.throttleDone=Qd.done;J.clearThrottle=Qd.clear;var Da=Vd;J.getGraphDiv=Da.getGraphDiv;J.isPlotDiv=Da.isPlotDiv;J.removeElement=Da.removeElement;J.addStyleRule=Da.addStyleRule;J.addRelatedStyleRule=Da.addRelatedStyleRule;J.deleteRelatedStyleRule=Da.deleteRelatedStyleRule;J.getFullTransformMatrix=Da.getFullTransformMatrix;J.getElementTransformMatrix=Da.getElementTransformMatrix;J.getElementAndAncestors=Da.getElementAndAncestors;J.equalDomRects=Da.equalDomRects;J.clearResponsive=AA;J.preserveDrawingBuffer=LA;J.makeTraceGroups=$A;J._=RA;J.notifier=kx;J.filterUnique=PA;J.filterVisible=zA;J.pushUnique=Ax;J.increment=HA;J.cleanNumber=GA;J.ensureNumber=function(e){return Ix(e)?(e=Number(e),e>Fx||e<qA?Sp:e):Sp};J.isIndex=function(t,e){return e!==void 0&&t>=e?!1:Ix(t)&&t>=0&&t%1===0};J.noop=Ud;J.identity=Dx;J.repeat=function(t,e){for(var r=new Array(e),a=0;a<e;a++)r[a]=t;return r};J.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=J.nestedProperty(t,n.replace("?",r)),l=J.nestedProperty(t,n.replace("?",a)),s=o.get();o.set(l.get()),l.set(s)}};J.raiseToTop=function(e){e.parentNode.appendChild(e)};J.cancelTransition=function(t){return t.transition().duration(0)};J.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))};J.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};J.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};J.randstr=function t(e,r,a,i){if(a||(a=16),r===void 0&&(r=24),r<=0)return"0";var n=Math.log(Math.pow(2,r))/Math.log(a),o="",l,s,f;for(l=2;n===1/0;l*=2)n=Math.log(Math.pow(2,r/l))/Math.log(a)*l;var c=n-Math.floor(n);for(l=0;l<Math.floor(n);l++)f=Math.floor(Math.random()*a).toString(a),o=f+o;c&&(s=Math.pow(a,c),f=Math.floor(Math.random()*s).toString(a),o=f+o);var v=parseInt(o,a);return e&&e[o]||v!==1/0&&v>=Math.pow(2,r)?i>10?(J.warn("randstr failed uniqueness"),o):t(e,r,a,(i||0)+1):o};J.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};J.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};J.syncOrAsync=function(t,e,r){var a,i;function n(){return J.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)};J.stripTrailingSlash=function(t){return t.substr(-1)==="/"?t.substr(0,t.length-1):t};J.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]]}};J.mergeArray=function(t,e,r,a){var i=typeof a=="function";if(J.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}};J.mergeArrayCastPositive=function(t,e,r){return J.mergeArray(t,e,r,function(a){var i=+a;return isFinite(i)&&i>0?i:0})};J.fillArray=function(t,e,r,a){if(a=a||J.identity,J.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=a(t[i])};J.castOption=function(t,e,r,a){a=a||J.identity;var i=J.nestedProperty(t,r).get();return J.isArrayOrTypedArray(i)?Array.isArray(e)&&J.isArrayOrTypedArray(i[e[0]])?a(i[e[0]][e[1]]):a(i[e]):i};J.extractOption=function(t,e,r,a){if(r in t)return t[r];var i=J.nestedProperty(e,a).get();if(!Array.isArray(i))return i};function Ox(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}J.tagSelected=function(t,e,r){var a=e.selectedpoints,i=e._indexToPoints,n;i&&(n=Ox(i));function o(v){return v!==void 0&&v<t.length}for(var l=0;l<a.length;l++){var s=a[l];if(J.isIndex(s)||J.isArrayOrTypedArray(s)&&J.isIndex(s[0])&&J.isIndex(s[1])){var f=n?n[s]:s,c=r?r[f]:f;o(c)&&(t[c].selected=1)}}};J.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var a=Ox(r),i=[],n=0;n<e.length;n++){var o=e[n];if(J.isIndex(o)){var l=a[o];J.isIndex(l)&&i.push(l)}}return i}else return e};J.getTargetArray=function(t,e){var r=e.target;if(typeof r=="string"&&r){var a=J.nestedProperty(t,r).get();return Array.isArray(a)?a:!1}else if(Array.isArray(r))return r;return!1};J.minExtend=function(t,e){var r={};typeof e!="object"&&(e={});var a=3,i=Object.keys(t),n,o,l;for(n=0;n<i.length;n++)o=i[n],l=t[o],!(o.charAt(0)==="_"||typeof l=="function")&&(o==="module"?r[o]=l:Array.isArray(l)?o==="colorscale"?r[o]=l.slice():r[o]=l.slice(0,a):J.isTypedArray(l)?r[o]=l.subarray(0,a):l&&typeof l=="object"?r[o]=J.minExtend(t[o],e[o]):r[o]=l);for(i=Object.keys(e),n=0;n<i.length;n++)o=i[n],l=e[o],(typeof l!="object"||!(o in r)||typeof r[o]!="object")&&(r[o]=l);return r};J.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)};J.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(t.indexOf(e[r])!==-1)return!0;return!1};J.isIE=function(){return typeof window.navigator.msSaveBlob<"u"};var YA=/Version\/[\d\.]+.*Safari/;J.isSafari=function(){return YA.test(window.navigator.userAgent)};var WA=/iPad|iPhone|iPod/;J.isIOS=function(){return WA.test(window.navigator.userAgent)};var ZA=/Firefox\/(\d+)\.\d+/;J.getFirefoxVersion=function(){var t=ZA.exec(window.navigator.userAgent);if(t&&t.length===2){var e=parseInt(t[1]);if(!isNaN(e))return e}return null};J.isD3Selection=function(t){return t instanceof Wo.selection};J.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};J.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};J.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 KA=/^([^\[\.]+)\.(.+)?/,QA=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;J.expandObjectPaths=function(t){var e,r,a,i,n,o,l;if(typeof t=="object"&&!Array.isArray(t))for(r in t)t.hasOwnProperty(r)&&((e=r.match(KA))?(i=t[r],a=e[1],delete t[r],t[a]=J.extendDeepNoArrays(t[a]||{},J.objectFromPath(r,J.expandObjectPaths(i))[a])):(e=r.match(QA))?(i=t[r],a=e[1],n=parseInt(e[2]),delete t[r],t[a]=t[a]||[],e[3]==="."?(l=e[4],o=t[a][n]=t[a][n]||{},J.extendDeepNoArrays(o,J.objectFromPath(l,J.expandObjectPaths(i)))):t[a][n]=J.expandObjectPaths(i)):t[r]=J.expandObjectPaths(t[r]));return t};J.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};J.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Bx=/^\w*$/;J.templateString=function(t,e){var r={};return t.replace(J.TEMPLATE_STRING_REGEX,function(a,i){var n;return Bx.test(i)?n=e[i]:(r[i]=r[i]||J.nestedProperty(e,i).get,n=r[i]()),J.isValidTextValue(n)?n:""})};var JA={max:10,count:0,name:"hovertemplate"};J.hovertemplateString=function(){return jx.apply(JA,arguments)};var eM={max:10,count:0,name:"texttemplate"};J.texttemplateString=function(){return jx.apply(eM,arguments)};var Cp=/^[:|\|]/;function jx(t,e,r){var a=this,i=arguments;e||(e={});var n={};return t.replace(J.TEMPLATE_STRING_REGEX,function(o,l,s){var f=l==="xother"||l==="yother",c=l==="_xother"||l==="_yother",v=l==="_xother_"||l==="_yother_",u=l==="xother_"||l==="yother_",d=f||c||u||v,h=l;(c||v)&&(h=h.substring(1)),(u||v)&&(h=h.substring(0,h.length-1));var p;if(d){if(p=e[h],p===void 0)return""}else{var g,_;for(_=3;_<i.length;_++)if(g=i[_],!!g){if(g.hasOwnProperty(h)){p=g[h];break}if(Bx.test(h)||(p=J.nestedProperty(g,h).get(),p=n[h]||J.nestedProperty(g,h).get(),p&&(n[h]=p)),p!==void 0)break}}if(p===void 0&&a)return a.count<a.max&&(J.warn("Variable '"+h+"' in "+a.name+" could not be found!"),p=o),a.count===a.max&&J.warn("Too many "+a.name+" warnings - additional warnings will be suppressed"),a.count++,o;if(s){var b;if(s[0]===":"&&(b=r?r.numberFormat:J.numberFormat,p=b(s.replace(Cp,""))(p)),s[0]==="|"){b=r?r.timeFormat:UA;var w=J.dateTime2ms(p);p=J.formatDate(w,s.replace(Cp,""),!1,b)}}else{var m=h+"Label";e.hasOwnProperty(m)&&(p=e[m])}return d&&(p="("+p+")",(c||v)&&(p=" "+p),(u||v)&&(p=p+" ")),p})}var Jl=48,Dp=57;J.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>=Jl&&o<=Dp,f=l>=Jl&&l<=Dp;if(s&&(a=10*a+o-Jl),f&&(i=10*i+l-Jl),!s||!f){if(a!==i)return a-i;if(o!==l)return o-l}}return i-a};var zn=2e9;J.seedPseudoRandom=function(){zn=2e9};J.pseudoRandom=function(){var t=zn;return zn=(69069*zn+1)%4294967296,Math.abs(zn-t)<429496729?J.pseudoRandom():zn/4294967296};J.fillText=function(t,e,r){var a=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=J.extractOption(t,e,"htx","hovertext");if(J.isValidTextValue(i))return a(i);var n=J.extractOption(t,e,"tx","text");if(J.isValidTextValue(n))return a(n)};J.isValidTextValue=function(t){return t||t===0};J.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};J.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||e==="none"};J.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""};J.strRotate=function(t){return t?"rotate("+t+")":""};J.strScale=function(t){return t!==1?"scale("+t+")":""};J.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,J.strTranslate(i-f*(r+o),n-f*(a+l))+J.strScale(f)+(s?"rotate("+s+(e?"":" "+r+" "+a)+")":"")};J.ensureUniformFontSize=function(t,e){var r=J.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r};J.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)};J.bigFont=function(t){return Math.round(1.2*t)};var $p=J.getFirefoxVersion(),tM=$p!==null&&$p<86;J.getPositionFromD3Event=function(){return tM?[Wo.event.layerX,Wo.event.layerY]:[Wo.event.offsetX,Wo.event.offsetY]};var rM=de.exports,Ep={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:transparent;border:6px solid transparent;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 transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:#fff;","X .select-outline-2":"stroke:#000;stroke-dasharray:2px 2px;",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 Rp in Ep){var aM=Rp.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");rM.addStyleRule(aM,Ep[Rp])}var It={},Jd={},Ec=zd.exports.EventEmitter,iM={init:function(t){if(t._ev instanceof Ec)return t;var e=new Ec,r=new Ec;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(a,i){typeof jQuery<"u"&&jQuery(t).trigger(a,i),e.emit(a,i),r.emit(a,i)},t},triggerHandler:function(t,e,r){var a,i;typeof jQuery<"u"&&(a=jQuery(t).triggerHandler(e,r));var n=t._ev;if(!n)return a;var o=n._events[e];if(!o)return a;function l(f){if(f.listener){if(n.removeListener(e,f.listener),!f.fired)return f.fired=!0,f.listener.apply(n,[r])}else return f.apply(n,[r])}o=Array.isArray(o)?o:[o];var s;for(s=0;s<o.length-1;s++)l(o[s]);return i=l(o[s]),a!==void 0?a:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}},El=iM,Pp=de.exports,nM=uo.dfltConfig;function oM(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)?Pp.extendDeep([],a):Pp.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>nM.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=oM(t,r),e.apply(null,r)};var lM=ja,po={},Gx={_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(" ")}},Ux=de.exports,Vx=Ux.extendFlat,sM=Ux.isPlainObject,qx={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(" ")},Xx={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(" ")},fM=qx.flags.slice().concat(["fullReplot"]),cM=Xx.flags.slice().concat("layoutReplot"),gi={traces:qx,layout:Xx,traceFlags:function(){return zp(fM)},layoutFlags:function(){return zp(cM)},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:Yx};function zp(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function Yx(t,e,r){var a=Vx({},t);for(var i in a){var n=a[i];sM(n)&&(a[i]=Wx(n,e,r,i))}return r==="from-root"&&(a.editType=e),a}function Wx(t,e,r,a){if(t.valType){var i=Vx({},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]=Wx(t.items[n],e)}return i}else return Yx(t,e,a.charAt(0)==="_"?"nested":"from-root")}(function(t){var e=Ve,r=de.exports,a=La,i=$l,n=Gx,o=Yf,l=uo.configAttributes,s=gi,f=r.extendDeepAll,c=r.isPlainObject,v=r.isArrayOrTypedArray,u=r.nestedProperty,d=r.valObjectMeta,h="_isSubplotObj",p="_isLinkedToArray",g="_arrayAttrRegexps",_="_deprecated",b=[h,p,g,_];t.IS_SUBPLOT_OBJ=h,t.IS_LINKED_TO_ARRAY=p,t.DEPRECATED=_,t.UNDERSCORE_ATTRS=b,t.get=function(){var P={};e.allTypes.forEach(function(L){P[L]=x(L)});var R={};return Object.keys(e.transformsRegistry).forEach(function(L){R[L]=k(L)}),{defs:{valObjects:d,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:P,layout:T(),transforms:R,frames:S(),animation:A(o),config:A(l)}},t.crawl=function(P,R,L,D){var z=L||0;D=D||"",Object.keys(P).forEach(function(F){var H=P[F];if(b.indexOf(F)===-1){var U=(D?D+".":"")+F;R(H,F,P,z,U),!t.isValObject(H)&&c(H)&&F!=="impliedEdits"&&t.crawl(H,R,z+1,U)}})},t.isValObject=function(P){return P&&P.valType!==void 0},t.findArrayAttributes=function(P){var R=[],L=[],D=[],z,F;function H(W,K,Z,ae){L=L.slice(0,ae).concat([K]),D=D.slice(0,ae).concat([W&&W._isLinkedToArray]);var ne=W&&(W.valType==="data_array"||W.arrayOk===!0)&&!(L[ae-1]==="colorbar"&&(K==="ticktext"||K==="tickvals"));!ne||U(z,0,"")}function U(W,K,Z){var ae=W[L[K]],ne=Z+L[K];if(K===L.length-1)v(ae)&&R.push(F+ne);else if(D[K]){if(Array.isArray(ae))for(var oe=0;oe<ae.length;oe++)c(ae[oe])&&U(ae[oe],K+1,ne+"["+oe+"].")}else c(ae)&&U(ae,K+1,ne+".")}z=P,F="",t.crawl(a,H),P._module&&P._module.attributes&&t.crawl(P._module.attributes,H);var B=P.transforms;if(B)for(var X=0;X<B.length;X++){var O=B[X],Y=O._module;Y&&(F="transforms["+X+"].",z=O,t.crawl(Y.attributes,H))}return R},t.getTraceValObject=function(P,R){var L=R[0],D=1,z,F;if(L==="transforms"){if(R.length===1)return a.transforms;var H=P.transforms;if(!Array.isArray(H)||!H.length)return!1;var U=R[1];if(!y(U)||U>=H.length)return!1;z=(e.transformsRegistry[H[U].type]||{}).attributes,F=z&&z[R[2]],D=3}else{var B=P._module;if(B||(B=(e.modules[P.type||a.type.dflt]||{})._module),!B)return!1;if(z=B.attributes,F=z&&z[L],!F){var X=B.basePlotModule;X&&X.attributes&&(F=X.attributes[L])}F||(F=a[L])}return m(F,R,D)},t.getLayoutValObject=function(P,R){var L=w(P,R[0]);return m(L,R,1)};function w(P,R){var L,D,z,F,H=P._basePlotModules;if(H){var U;for(L=0;L<H.length;L++){if(z=H[L],z.attrRegex&&z.attrRegex.test(R)){if(z.layoutAttrOverrides)return z.layoutAttrOverrides;!U&&z.layoutAttributes&&(U=z.layoutAttributes)}var B=z.baseLayoutAttrOverrides;if(B&&R in B)return B[R]}if(U)return U}var X=P._modules;if(X){for(L=0;L<X.length;L++)if(F=X[L].layoutAttributes,F&&R in F)return F[R]}for(D in e.componentsRegistry){if(z=e.componentsRegistry[D],z.name==="colorscale"&&R.indexOf("coloraxis")===0)return z.layoutAttributes[R];if(!z.schema&&R===z.name)return z.layoutAttributes}return R in i?i[R]:!1}function m(P,R,L){if(!P)return!1;if(P._isLinkedToArray){if(y(R[L]))L++;else if(L<R.length)return!1}for(;L<R.length;L++){var D=P[R[L]];if(c(D))P=D;else break;if(L===R.length-1)break;if(P._isLinkedToArray){if(L++,!y(R[L]))return!1}else if(P.valType==="info_array"){L++;var z=R[L];if(!y(z))return!1;var F=P.items;if(Array.isArray(F)){if(z>=F.length)return!1;if(P.dimensions===2){if(L++,R.length===L)return P;var H=R[L];if(!y(H))return!1;P=F[z][H]}else P=F[z]}else P=F}}return P}function y(P){return P===Math.round(P)&&P>=0}function x(P){var R,L;R=e.modules[P]._module,L=R.basePlotModule;var D={};D.type=null;var z=f({},a),F=f({},R.attributes);t.crawl(F,function(B,X,O,Y,W){u(z,W).set(void 0),B===void 0&&u(F,W).set(void 0)}),f(D,z),e.traceIs(P,"noOpacity")&&delete D.opacity,e.traceIs(P,"showLegend")||(delete D.showlegend,delete D.legendgroup),e.traceIs(P,"noHover")&&(delete D.hoverinfo,delete D.hoverlabel),R.selectPoints||delete D.selectedpoints,f(D,F),L.attributes&&f(D,L.attributes),D.type=P;var H={meta:R.meta||{},categories:R.categories||{},animatable:Boolean(R.animatable),type:P,attributes:A(D)};if(R.layoutAttributes){var U={};f(U,R.layoutAttributes),H.layoutAttributes=A(U)}return R.animatable||t.crawl(H,function(B){t.isValObject(B)&&"anim"in B&&delete B.anim}),H}function T(){var P={},R,L;f(P,i);for(R in e.subplotsRegistry)if(L=e.subplotsRegistry[R],!!L.layoutAttributes)if(Array.isArray(L.attr))for(var D=0;D<L.attr.length;D++)E(P,L,L.attr[D]);else{var z=L.attr==="subplot"?L.name:L.attr;E(P,L,z)}for(R in e.componentsRegistry){L=e.componentsRegistry[R];var F=L.schema;if(F&&(F.subplots||F.layout)){var H=F.subplots;if(H&&H.xaxis&&!H.yaxis)for(var U in H.xaxis)delete P.yaxis[U]}else L.name==="colorscale"?f(P,L.layoutAttributes):L.layoutAttributes&&I(P,L.layoutAttributes,L.name)}return{layoutAttributes:A(P)}}function k(P){var R=e.transformsRegistry[P],L=f({},R.attributes);return Object.keys(e.componentsRegistry).forEach(function(D){var z=e.componentsRegistry[D];z.schema&&z.schema.transforms&&z.schema.transforms[P]&&Object.keys(z.schema.transforms[P]).forEach(function(F){I(L,z.schema.transforms[P][F],F)})}),{attributes:A(L)}}function S(){var P={frames:f({},n)};return A(P),P.frames}function A(P){return $(P),M(P),C(P),P}function $(P){function R(D){return{valType:"string",description:"Sets the source reference on Chart Studio Cloud for `"+D+"`.",editType:"none"}}function L(D,z,F){t.isValObject(D)?(D.arrayOk===!0||D.valType==="data_array")&&(F[z+"src"]=R(z)):c(D)&&(D.role="object")}t.crawl(P,L)}function M(P){function R(L,D,z){if(!!L){var F=L[p];!F||(delete L[p],z[D]={items:{}},z[D].items[F]=L,z[D].role="object")}}t.crawl(P,R)}function C(P){function R(L){for(var D in L)if(c(L[D]))R(L[D]);else if(Array.isArray(L[D]))for(var z=0;z<L[D].length;z++)R(L[D][z]);else L[D]instanceof RegExp&&(L[D]=L[D].toString())}R(P)}function E(P,R,L){var D=u(P,L),z=f({},R.layoutAttributes);z[h]=!0,D.set(z)}function I(P,R,L){var D=u(P,L);D.set(f(D.get()||{},R))}})(po);var Ut={exports:{}},Mt={},Vn=de.exports,uM=La,ci="templateitemname",Iv={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(" ")}};Iv[ci]={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(" ")};Mt.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=Iv.name,e[ci]=Iv[ci],e};Mt.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=Vn.coerce(n,{},uM,"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}};Mt.newContainer=function(t,e,r){var a=t._template,i=a&&(a[e]||r&&a[r]);Vn.isPlainObject(i)||(i=null);var n=t[e]={_template:i};return n};Mt.arrayTemplater=function(t,e,r){var a=t._template,i=a&&a[Zx(e)],n=a&&a[e];(!Array.isArray(n)||!n.length)&&(n=[]);var o={};function l(f){var c={name:f.name,_input:f},v=c[ci]=f[ci];if(!Ip(v))return c._template=i,c;for(var u=0;u<n.length;u++){var d=n[u];if(d.name===v)return o[v]=1,c._template=d,c}return c[r]=f[r]||!1,c._template=!1,c}function s(){for(var f=[],c=0;c<n.length;c++){var v=n[c],u=v.name;if(Ip(u)&&!o[u]){var d={_template:v,name:u,_input:{_templateitemname:u}};d[ci]=v[ci],f.push(d),o[u]=1}}return f}return{newItem:l,defaultItems:s}};function Ip(t){return t&&typeof t=="string"}function Zx(t){var e=t.length-1;return t.charAt(e)!=="s"&&Vn.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}Mt.arrayDefaultKey=Zx;Mt.arrayEditor=function(t,e,r){var a=(Vn.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][ci]=n)}s();function f(d,h){l[d]=h}function c(d,h){n?Vn.nestedProperty(l[o],d).set(h):l[o+"."+d]=h}function v(){var d=l;return s(),d}function u(d,h){d&&c(d,h);var p=v();for(var g in p)Vn.nestedProperty(t,g).set(p[g])}return{modifyBase:f,modifyItem:c,getUpdateObj:v,applyUpdate:u}};var Vt={},So=co.counter,pr={idRegex:{x:So("x","( domain)?"),y:So("y","( domain)?")},attrRegex:So("[xy]axis"),xAxisMatch:So("xaxis"),yAxisMatch:So("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,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:"-select",DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}};(function(t){var e=Ve,r=pr;t.id2name=function(n){if(!(typeof n!="string"||!n.match(r.AX_ID_PATTERN))){var o=n.split(" ")[0].substr(1);return o==="1"&&(o=""),n.charAt(0)+"axis"+o}},t.name2id=function(n){if(!!n.match(r.AX_NAME_PATTERN)){var o=n.substr(5);return o==="1"&&(o=""),n.charAt(0)+o}},t.cleanId=function(n,o,l){var s=/( domain)$/.test(n);if(!(typeof n!="string"||!n.match(r.AX_ID_PATTERN))&&!(o&&n.charAt(0)!==o)&&!(s&&!l)){var f=n.split(" ")[0].substr(1).replace(/^0+/,"");return f==="1"&&(f=""),n.charAt(0)+f+(s&&l?" domain":"")}},t.list=function(i,n,o){var l=i._fullLayout;if(!l)return[];var s=t.listIds(i,n),f=new Array(s.length),c;for(c=0;c<s.length;c++){var v=s[c];f[c]=l[v.charAt(0)+"axis"+v.substr(1)]}if(!o){var u=l._subplots.gl3d||[];for(c=0;c<u.length;c++){var d=l[u[c]];n?f.push(d[n+"axis"]):f.push(d.xaxis,d.yaxis,d.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)}})(Vt);function vM(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()}function dM(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._drawing=!1}var Rl={clearOutlineControllers:vM,clearSelect:dM},Pl={},el=Ve,hM=pr.SUBPLOT_PATTERN;Pl.getSubplotCalcData=function(t,e,r){var a=el.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};Pl.getModuleCalcData=function(t,e){var r=[],a=[],i;if(typeof e=="string"?i=el.getModule(e).plot:typeof e=="function"?i=e:i=e.plot,!i)return[r,t];for(var n=0;n<t.length;n++){var o=t[n],l=o[0].trace;l.visible!==!0||l._length===0||(l._module.plot===i?r.push(o):a.push(o))}return[r,a]};Pl.getSubplotData=function(e,r,a){if(!el.subplotsRegistry[r])return[];var i=el.subplotsRegistry[r].attr,n=[],o,l,s;if(r==="gl2d"){var f=a.match(hM);l="x"+f[1],s="y"+f[2]}for(var c=0;c<e.length;c++)o=e[c],r==="gl2d"&&el.traceIs(o,"gl2d")?o[i[0]]===l&&o[i[1]]===s&&n.push(o):o[i]===a&&n.push(o);return n};var Rc={},Np;function pM(){return Np||(Np=1,function(t){var e=Ve,r=de.exports;t.manageCommandObserver=function(s,f,c,v){var u={},d=!0;f&&f._commandObserver&&(u=f._commandObserver),u.cache||(u.cache={}),u.lookupTable={};var h=t.hasSimpleAPICommandBindings(s,c,u.lookupTable);if(f&&f._commandObserver){if(h)return u;if(f._commandObserver.remove)return f._commandObserver.remove(),f._commandObserver=null,u}if(h){a(s,h,u.cache),u.check=function(){if(!!d){var b=a(s,h,u.cache);return b.changed&&v&&u.lookupTable[b.value]!==void 0&&(u.disable(),Promise.resolve(v({value:b.value,type:h.type,prop:h.prop,traces:h.traces,index:u.lookupTable[b.value]})).then(u.enable,u.enable)),b.changed}};for(var p=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],g=0;g<p.length;g++)s._internalOn(p[g],u.check);u.remove=function(){for(var _=0;_<p.length;_++)s._removeInternalListener(p[_],u.check)}}else r.log("Unable to automatically bind plot updates to API command"),u.lookupTable={},u.remove=function(){};return u.disable=function(){d=!1},u.enable=function(){d=!0},f&&(f._commandObserver=u),u},t.hasSimpleAPICommandBindings=function(s,f,c){var v,u=f.length,d;for(v=0;v<u;v++){var h,p=f[v],g=p.method,_=p.args;if(Array.isArray(_)||(_=[]),!g)return!1;var b=t.computeAPICommandBindings(s,g,_);if(b.length!==1)return!1;if(!d)d=b[0],Array.isArray(d.traces)&&d.traces.sort();else{if(h=b[0],h.type!==d.type||h.prop!==d.prop)return!1;if(Array.isArray(d.traces))if(Array.isArray(h.traces)){h.traces.sort();for(var w=0;w<d.traces.length;w++)if(d.traces[w]!==h.traces[w])return!1}else return!1;else if(h.prop!==d.prop)return!1}h=b[0];var m=h.value;if(Array.isArray(m))if(m.length===1)m=m[0];else return!1;c&&(c[m]=v)}return d};function a(s,f,c){var v,u,d,h=!1;if(f.type==="data")v=s._fullData[f.traces!==null?f.traces[0]:0];else if(f.type==="layout")v=s._fullLayout;else return!1;return u=r.nestedProperty(v,f.prop).get(),d=c[f.type]=c[f.type]||{},d.hasOwnProperty(f.prop)&&d[f.prop]!==u&&(h=!0),d[f.prop]=u,{changed:h,value:u}}t.executeAPICommand=function(s,f,c){if(f==="skip")return Promise.resolve();var v=e.apiMethodRegistry[f],u=[s];Array.isArray(c)||(c=[]);for(var d=0;d<c.length;d++)u.push(c[d]);return v.apply(null,u).catch(function(h){return r.warn("API call to Plotly."+f+" rejected.",h),Promise.reject(h)})},t.computeAPICommandBindings=function(s,f,c){var v;switch(Array.isArray(c)||(c=[]),f){case"restyle":v=o(s,c);break;case"relayout":v=n(s,c);break;case"update":v=o(s,[c[0],c[2]]).concat(n(s,[c[1]]));break;case"animate":v=i(s,c);break;default:v=[]}return v};function i(s,f){return Array.isArray(f[0])&&f[0].length===1&&["string","number"].indexOf(typeof f[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:f[0][0].toString()}]:[]}function n(s,f){var c=[],v=f[0],u={};if(typeof v=="string")u[v]=f[1];else if(r.isPlainObject(v))u=v;else return c;return l(u,function(d,h,p){c.push({type:"layout",prop:d,value:p})},"",0),c}function o(s,f){var c,v,u,d,h=[];if(v=f[0],u=f[1],c=f[2],d={},typeof v=="string")d[v]=u;else if(r.isPlainObject(v))d=v,c===void 0&&(c=u);else return h;return c===void 0&&(c=null),l(d,function(p,g,_){var b,w;if(Array.isArray(_)){w=_.slice();var m=Math.min(w.length,s.data.length);c&&(m=Math.min(m,c.length)),b=[];for(var y=0;y<m;y++)b[y]=c?c[y]:y}else w=_,b=c?c.slice():null;if(b===null)Array.isArray(w)&&(w=w[0]);else if(Array.isArray(b)){if(!Array.isArray(w)){var x=w;w=[];for(var T=0;T<b.length;T++)w[T]=x}w.length=Math.min(b.length,w.length)}h.push({type:"data",prop:p,traces:b,value:w})},"",0),h}function l(s,f,c,v){Object.keys(s).forEach(function(u){var d=s[u];if(u[0]!=="_"){var h=c+(v>0?".":"")+u;r.isPlainObject(d)?l(d,f,h,v+1):f(h,u,d)}})}}(Rc)),Rc}var Kx=tt.exports,mM=fl.timeFormatLocale,yM=rx.formatLocale,cf=lt,xt=Ve,Qx=po,gM=Mt,He=de.exports,Jx=Je.exports,Fp=Ot.BADNUM,$r=Vt,bM=Rl.clearSelect,eh=Yf,xM=Gx,_M=Pl.getModuleCalcData,Nv=He.relinkPrivateKeys,hn=He._,$e=Ut.exports={};He.extendFlat($e,xt);$e.attributes=La;$e.attributes.type.values=$e.allTypes;$e.fontAttrs=dr;$e.layoutAttributes=$l;$e.fontWeight="normal";var Qf=$e.transformsRegistry,Jf=pM();$e.executeAPICommand=Jf.executeAPICommand;$e.computeAPICommandBindings=Jf.computeAPICommandBindings;$e.manageCommandObserver=Jf.manageCommandObserver;$e.hasSimpleAPICommandBindings=Jf.hasSimpleAPICommandBindings;$e.redrawText=function(t){return t=He.getGraphDiv(t),new Promise(function(e){setTimeout(function(){!t._fullLayout||(xt.getComponentMethod("annotations","draw")(t),xt.getComponentMethod("legend","draw")(t),xt.getComponentMethod("colorbar","draw")(t),e($e.previousPromises(t)))},300)})};$e.resize=function(t){t=He.getGraphDiv(t);var e,r=new Promise(function(a,i){(!t||He.isHidden(t))&&i(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=a,t._redrawTimer=setTimeout(function(){if(!t.layout||t.layout.width&&t.layout.height||He.isHidden(t)){a(t);return}delete t.layout.width,delete t.layout.height;var n=t.changed;t.autoplay=!0,xt.call("relayout",t,{autosize:!0}).then(function(){t.changed=n,t._resolveResize===a&&(delete t._resolveResize,a(t))})},100)});return e&&e(r),r};$e.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})};$e.addLinks=function(t){if(!(!t._context.showLink&&!t._context.showSources)){var e=t._fullLayout,r=He.ensureSingle(e._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Jx.defaultLine,"pointer-events":"all"}).each(function(){var f=Kx.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&&wM(t,n),o.text(n.text()&&l.text()?" - ":"")}};function wM(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",function(){$e.sendDataToCloud(t)});else{var a=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+i})}}$e.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(!!e){t.emit("plotly_beforeexport");var r=Kx.select(t).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"}),i=a.append("input").attr({type:"text",name:"data"});return i.node().value=$e.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var TM=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],kM=["year","month","dayMonth","dayMonthYear"];$e.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,a=t._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var i=t._fullLayout={},n=t.layout||{},o=t._fullData||[],l=t._fullData=[],s=t.data||[],f=t.calcdata||[],c=t._context||{},v;t._transitionData||$e.createTransitionData(t),i._dfltTitle={plot:hn(t,"Click to enter Plot title"),x:hn(t,"Click to enter X axis title"),y:hn(t,"Click to enter Y axis title"),colorbar:hn(t,"Click to enter Colorscale title"),annotation:hn(t,"new text")},i._traceWord=hn(t,"trace");var u=Hp(t,TM);if(i._mapboxAccessToken=c.mapboxAccessToken,a._initialAutoSizeIsDone){var d=a.width,h=a.height;$e.supplyLayoutGlobalDefaults(n,i,u),n.width||(i.width=d),n.height||(i.height=h),$e.sanitizeMargins(i)}else{$e.supplyLayoutGlobalDefaults(n,i,u);var p=!n.width||!n.height,g=i.autosize,_=c.autosizable,b=p&&(g||_);b?$e.plotAutoSize(t,n,i):p&&$e.sanitizeMargins(i),!g&&p&&(n.width=i.width,n.height=i.height)}i._d3locale=SM(u,i.separators),i._extraFormat=Hp(t,kM),i._initialAutoSizeIsDone=!0,i._dataLength=s.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var w=i._subplots=MM(),m=i._splomAxes={x:{},y:{}},y=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=AM(o,s),i._globalTransforms=(t._context||{}).globalTransforms,$e.supplyDataDefaults(s,l,n,i);var x=Object.keys(m.x),T=Object.keys(m.y);if(x.length>1&&T.length>1){for(xt.getComponentMethod("grid","sizeDefaults")(n,i),v=0;v<x.length;v++)He.pushUnique(w.xaxis,x[v]);for(v=0;v<T.length;v++)He.pushUnique(w.yaxis,T[v]);for(var k in y)He.pushUnique(w.cartesian,k)}if(i._has=$e._hasPlotType.bind(i),o.length===l.length)for(v=0;v<l.length;v++)Nv(l[v],o[v]);$e.supplyLayoutModuleDefaults(n,i,l,t._transitionData);var S=i._visibleModules,A=[];for(v=0;v<S.length;v++){var $=S[v].crossTraceDefaults;$&&He.pushUnique(A,$)}for(v=0;v<A.length;v++)A[v](l,i);i._hasOnlyLargeSploms=i._basePlotModules.length===1&&i._basePlotModules[0].name==="splom"&&x.length>15&&T.length>15&&i.shapes.length===0&&i.images.length===0,$e.linkSubplots(l,i,o,a),$e.cleanPlot(l,i,o,a);var M=!!(a._has&&a._has("gl2d")),C=!!(i._has&&i._has("gl2d")),E=!!(a._has&&a._has("cartesian")),I=!!(i._has&&i._has("cartesian")),P=E||M,R=I||C;P&&!R?a._bgLayer.remove():R&&!P&&(i._shouldCreateBgLayer=!0),a._zoomlayer&&!t._dragging&&bM({_fullLayout:a}),LM(l,i),Nv(i,a),xt.getComponentMethod("colorscale","crossTraceDefaults")(l,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var L=i._tracePreGUI,D={},z;for(z in L)D[z]="old";for(v=0;v<l.length;v++)z=l[v]._fullInput.uid,D[z]||(L[z]={}),D[z]="new";for(z in D)D[z]==="old"&&delete L[z];t1(i),xt.getComponentMethod("rangeslider","makeData")(i),!r&&f.length===l.length&&$e.supplyDefaultsUpdateCalc(f,l)};$e.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var a=e[r],i=(t[r]||[])[0];if(i&&i.trace){var n=i.trace;if(n._hasCalcTransform){var o=n._arrayAttrs,l,s,f;for(l=0;l<o.length;l++)s=o[l],f=He.nestedProperty(n,s).get().slice(),He.nestedProperty(a,s).set(f)}i.trace=a}}};function AM(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(d,h){s[h]=d,f[d]=1}function v(d,h){if(d&&typeof d=="string"&&!f[d])return c(d,h),!0}for(i=0;i<r;i++){var u=e[i].uid;typeof u=="number"&&(u=String(u)),!v(u,i)&&(i<l&&v(a[i].uid,i)||c(He.randstr(f),i))}return s}function MM(){var t=xt.collectableSubplotTypes,e={},r,a;if(!t){t=[];var i=xt.subplotsRegistry;for(var n in i){var o=i[n],l=o.attr;if(l&&(t.push(n),Array.isArray(l)))for(a=0;a<l.length;a++)He.pushUnique(t,l[a])}}for(r=0;r<t.length;r++)e[t[r]]=[];return e}function Hp(t,e){var r=t._context.locale;r||(r="en-US");var a=!1,i={};function n(v){for(var u=!0,d=0;d<e.length;d++){var h=e[d];i[h]||(v[h]?i[h]=v[h]:u=!1)}u&&(a=!0)}for(var o=0;o<2;o++){for(var l=t._context.locales,s=0;s<2;s++){var f=(l[r]||{}).format;if(f&&(n(f),a))break;l=xt.localeRegistry}var c=r.split("-")[0];if(a||c===r)break;r=c}return a||n(xt.localeRegistry.en.format),i}function SM(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(r){try{r=yM(t).format(He.adjustFormat(r))}catch{return He.warnBadFormat(r),He.noFormat}return r},timeFormat:mM(t).utcFormat}}function LM(t,e){var r,a=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i<t.length;i++){var n=t[i];n.meta?a[n.index]=n._meta={meta:n.meta}:e.meta&&(n._meta={meta:e.meta}),e.meta&&(n._meta.layout={meta:e.meta})}a.length&&(r||(r=e._meta={}),r.data=a)}$e.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])};$e._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var a=this._modules||[];for(e=0;e<a.length;e++){var i=a[e].name;if(i===t)return!0;var n=xt.modules[i];if(n&&n.categories[t])return!0}return!1};$e.cleanPlot=function(t,e,r,a){var i,n,o=a._basePlotModules||[];for(i=0;i<o.length;i++){var l=o[i];l.clean&&l.clean(t,e,r,a)}var s=a._has&&a._has("gl"),f=e._has&&e._has("gl");s&&!f&&a._glcontainer!==void 0&&(a._glcontainer.selectAll(".gl-canvas").remove(),a._glcontainer.selectAll(".no-webgl").remove(),a._glcanvas=null);var c=!!a._infolayer;e:for(i=0;i<r.length;i++){var v=r[i],u=v.uid;for(n=0;n<t.length;n++){var d=t[n];if(u===d.uid)continue e}c&&a._infolayer.select(".cb"+u).remove()}};$e.linkSubplots=function(t,e,r,a){var i,n,o=a._plots||{},l=e._plots={},s=e._subplots,f={_fullData:t,_fullLayout:e},c=s.cartesian.concat(s.gl2d||[]);for(i=0;i<c.length;i++){var v=c[i],u=o[v],d=$r.getFromId(f,v,"x"),h=$r.getFromId(f,v,"y"),p;for(u?p=l[v]=u:(p=l[v]={},p.id=v),d._counterAxes.push(h._id),h._counterAxes.push(d._id),d._subplotsWith.push(v),h._subplotsWith.push(v),p.xaxis=d,p.yaxis=h,p._hasClipOnAxisFalse=!1,n=0;n<t.length;n++){var g=t[n];if(g.xaxis===p.xaxis._id&&g.yaxis===p.yaxis._id&&g.cliponaxis===!1){p._hasClipOnAxisFalse=!0;break}}}var _=$r.list(f,null,!0),b;for(i=0;i<_.length;i++){b=_[i];var w=null;b.overlaying&&(w=$r.getFromId(f,b.overlaying),w&&w.overlaying&&(b.overlaying=!1,w=null)),b._mainAxis=w||b,w&&(b.domain=w.domain.slice()),b._anchorAxis=b.anchor==="free"?null:$r.getFromId(f,b.anchor)}for(i=0;i<_.length;i++)if(b=_[i],b._counterAxes.sort($r.idSort),b._subplotsWith.sort(He.subplotSort),b._mainSubplot=CM(b,e),b._counterAxes.length&&(b.spikemode&&b.spikemode.indexOf("across")!==-1||b.automargin&&b.mirror&&b.anchor!=="free"||xt.getComponentMethod("rangeslider","isVisible")(b))){var m=1,y=0;for(n=0;n<b._counterAxes.length;n++){var x=$r.getFromId(f,b._counterAxes[n]);m=Math.min(m,x.domain[0]),y=Math.max(y,x.domain[1])}m<y&&(b._counterDomainMin=m,b._counterDomainMax=y)}};function CM(t,e){var r={_fullLayout:e},a=t._id.charAt(0)==="x",i=t._mainAxis._anchorAxis,n="",o="",l="";if(i&&(l=i._mainAxis._id,n=a?t._id+l:l+t._id),!n||!e._plots[n]){n="";for(var s=t._counterAxes,f=0;f<s.length;f++){var c=s[f],v=a?t._id+c:c+t._id;o||(o=v);var u=$r.getFromId(r,c);if(l&&u.overlaying===l){n=v;break}}}return n||o}$e.clearExpandedTraceDefaultColors=function(t){var e,r,a;function i(o,l,s,f){r[f]=l,r.length=f+1,o.valType==="color"&&o.dflt===void 0&&e.push(r.join("."))}for(r=[],e=t._module._colorAttrs,e||(t._module._colorAttrs=e=[],Qx.crawl(t._module.attributes,i)),a=0;a<e.length;a++){var n=He.nestedProperty(t,"_input."+e[a]);n.get()||He.nestedProperty(t,e[a]).set(null)}};$e.supplyDataDefaults=function(t,e,r,a){var i=a._modules,n=a._visibleModules,o=a._basePlotModules,l=0,s=0,f,c,v;a._transformModules=[];function u(T){e.push(T);var k=T._module;!k||(He.pushUnique(i,k),T.visible===!0&&He.pushUnique(n,k),He.pushUnique(o,T._module.basePlotModule),l++,T._input.visible!==!1&&s++)}var d={},h=[],p=(r.template||{}).data||{},g=gM.traceTemplater(p);for(f=0;f<t.length;f++){if(v=t[f],c=g.newTrace(v),c.uid=a._traceUids[f],$e.supplyTraceDefaults(v,c,s,a,f),c.index=f,c._input=v,c._expandedIndex=l,c.transforms&&c.transforms.length)for(var _=v.visible!==!1&&c.visible===!1,b=DM(c,e,r,a),w=0;w<b.length;w++){var m=b[w],y={_template:c._template,type:c.type,uid:c.uid+w};_&&m.visible===!1&&delete m.visible,$e.supplyTraceDefaults(m,y,l,a,f),Nv(y,m),y.index=f,y._input=v,y._fullInput=c,y._expandedIndex=l,y._expandedInput=m,u(y)}else c._fullInput=c,c._expandedInput=c,u(c);xt.traceIs(c,"carpetAxis")&&(d[c.carpet]=c),xt.traceIs(c,"carpetDependent")&&h.push(f)}for(f=0;f<h.length;f++)if(c=e[h[f]],!!c.visible){var x=d[c.carpet];if(c._carpet=x,!x||!x.visible){c.visible=!1;continue}c.xaxis=x.xaxis,c.yaxis=x.yaxis}};$e.supplyAnimationDefaults=function(t){t=t||{};var e,r={};function a(i,n){return He.coerce(t||{},r,eh,i,n)}if(a("mode"),a("direction"),a("fromcurrent"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=$e.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=$e.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=$e.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=$e.supplyAnimationTransitionDefaults(t.transition||{});return r};$e.supplyAnimationFrameDefaults=function(t){var e={};function r(a,i){return He.coerce(t||{},e,eh.frame,a,i)}return r("duration"),r("redraw"),e};$e.supplyAnimationTransitionDefaults=function(t){var e={};function r(a,i){return He.coerce(t||{},e,eh.transition,a,i)}return r("duration"),r("easing"),e};$e.supplyFrameDefaults=function(t){var e={};function r(a,i){return He.coerce(t,e,xM,a,i)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e};$e.supplyTraceDefaults=function(t,e,r,a,i){var n=a.colorway||Jx.defaults,o=n[r%n.length],l;function s(b,w){return He.coerce(t,e,$e.attributes,b,w)}var f=s("visible");s("type"),s("name",a._traceWord+" "+i),s("uirevision",a.uirevision);var c=$e.getModule(e);if(e._module=c,c){var v=c.basePlotModule,u=v.attr,d=v.attributes;if(u&&d){var h=a._subplots,p="";if(f||v.name!=="gl2d"){if(Array.isArray(u))for(l=0;l<u.length;l++){var g=u[l],_=He.coerce(t,e,d,g);h[g]&&He.pushUnique(h[g],_),p+=_}else p=He.coerce(t,e,d,u);h[v.name]&&He.pushUnique(h[v.name],p)}}}return f&&(s("customdata"),s("ids"),s("meta"),xt.traceIs(e,"showLegend")?(He.coerce(t,e,c.attributes.showlegend?c.attributes:$e.attributes,"showlegend"),s("legendgroup"),s("legendgrouptitle.text"),s("legendrank"),e._dfltShowLegend=!0):e._dfltShowLegend=!1,c&&c.supplyDefaults(t,e,o,a),xt.traceIs(e,"noOpacity")||s("opacity"),xt.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),xt.traceIs(e,"noHover")||(e.hovertemplate||He.coerceHoverinfo(t,e,a),e.type!=="parcats"&&xt.getComponentMethod("fx","supplyDefaults")(t,e,o,a)),c&&c.selectPoints&&s("selectedpoints"),$e.supplyTransformDefaults(t,e,a)),e};function e1(t){var e=t.transforms;if(Array.isArray(e)&&e.length)for(var r=0;r<e.length;r++){var a=e[r],i=a._module||Qf[a.type];if(i&&i.makesData)return!0}return!1}$e.hasMakesDataTransform=e1;$e.supplyTransformDefaults=function(t,e,r){if(!!(e._length||e1(t))){var a=r._globalTransforms||[],i=r._transformModules||[];if(!(!Array.isArray(t.transforms)&&a.length===0))for(var n=t.transforms||[],o=a.concat(n),l=e.transforms=[],s=0;s<o.length;s++){var f=o[s],c=f.type,v=Qf[c],u,d=!(f._module&&f._module===v),h=v&&typeof v.transform=="function";v||He.warn("Unrecognized transform type "+c+"."),v&&v.supplyDefaults&&(d||h)?(u=v.supplyDefaults(f,e,r,t),u.type=c,u._module=v,He.pushUnique(i,v)):u=He.extendFlat({},f),l.push(u)}}};function DM(t,e,r,a){for(var i=t.transforms,n=[t],o=0;o<i.length;o++){var l=i[o],s=Qf[l.type];s&&s.transform&&(n=s.transform(n,{transform:l,fullTrace:t,fullData:e,layout:r,fullLayout:a,transformIndex:o}))}return n}$e.supplyLayoutGlobalDefaults=function(t,e,r){function a(f,c){return He.coerce(t,e,$e.layoutAttributes,f,c)}var i=t.template;He.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),a("autotypenumbers");var n=He.coerceFont(a,"font"),o=n.size;He.coerceFont(a,"title.font",He.extendFlat({},n,{size:Math.round(o*1.4)})),a("title.text",e._dfltTitle.plot),a("title.xref"),a("title.yref"),a("title.x"),a("title.y"),a("title.xanchor"),a("title.yanchor"),a("title.pad.t"),a("title.pad.r"),a("title.pad.b"),a("title.pad.l");var l=a("uniformtext.mode");l&&a("uniformtext.minsize"),a("autosize",!(t.width&&t.height)),a("width"),a("height"),a("margin.l"),a("margin.r"),a("margin.t"),a("margin.b"),a("margin.pad"),a("margin.autoexpand"),t.width&&t.height&&$e.sanitizeMargins(e),xt.getComponentMethod("grid","sizeDefaults")(t,e),a("paper_bgcolor"),a("separators",r.decimal+r.thousands),a("hidesources"),a("colorway"),a("datarevision");var s=a("uirevision");a("editrevision",s),a("selectionrevision",s),xt.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),xt.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,a),a("meta"),He.isPlainObject(t.transition)&&(a("transition.duration"),a("transition.easing"),a("transition.ordering")),xt.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),xt.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,a)};function es(t){return typeof t=="string"&&t.substr(t.length-2)==="px"&&parseFloat(t)}$e.plotAutoSize=function(e,r,a){var i=e._context||{},n=i.frameMargins,o,l,s=He.isPlotDiv(e);if(s&&e.emit("plotly_autosize"),i.fillFrame)o=window.innerWidth,l=window.innerHeight,document.body.style.overflow="hidden";else{var f=s?window.getComputedStyle(e):{};if(o=es(f.width)||es(f.maxWidth)||a.width,l=es(f.height)||es(f.maxHeight)||a.height,cf(n)&&n>0){var c=1-2*n;o=Math.round(c*o),l=Math.round(c*l)}}var v=$e.layoutAttributes.width.min,u=$e.layoutAttributes.height.min;o<v&&(o=v),l<u&&(l=u);var d=!r.width&&Math.abs(a.width-o)>1,h=!r.height&&Math.abs(a.height-l)>1;(h||d)&&(d&&(a.width=o),h&&(a.height=l)),e._initialAutoSize||(e._initialAutoSize={width:o,height:l}),$e.sanitizeMargins(a)};$e.supplyLayoutModuleDefaults=function(t,e,r,a){var i=xt.componentsRegistry,n=e._basePlotModules,o,l,s,f=xt.subplotsRegistry.cartesian;for(o in i)s=i[o],s.includeBasePlot&&s.includeBasePlot(t,e);n.length||n.push(f),e._has("cartesian")&&(xt.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e));for(var c in e._subplots)e._subplots[c].sort(He.subplotSort);for(l=0;l<n.length;l++)s=n[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var v=e._modules;for(l=0;l<v.length;l++)s=v[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var u=e._transformModules;for(l=0;l<u.length;l++)s=u[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r,a);for(o in i)s=i[o],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r)};$e.purge=function(t){var e=t._fullLayout||{};e._glcontainer!==void 0&&(e._glcontainer.selectAll(".gl-canvas").remove(),e._glcontainer.remove(),e._glcanvas=null),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),He.clearThrottle(),He.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._dragdata,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()};$e.style=function(t){var e=t._fullLayout._visibleModules,r=[],a;for(a=0;a<e.length;a++){var i=e[a];i.style&&He.pushUnique(r,i.style)}for(a=0;a<r.length;a++)r[a](t)};$e.sanitizeMargins=function(t){if(!(!t||!t.margin)){var e=t.width,r=t.height,a=t.margin,i=e-(a.l+a.r),n=r-(a.t+a.b),o;i<0&&(o=(e-1)/(a.l+a.r),a.l=Math.floor(o*a.l),a.r=Math.floor(o*a.r)),n<0&&(o=(r-1)/(a.t+a.b),a.t=Math.floor(o*a.t),a.b=Math.floor(o*a.b))}};$e.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}};$e.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1};function t1(t){var e=t.margin;if(!t._size){var r=t._size={l:Math.round(e.l),r:Math.round(e.r),t:Math.round(e.t),b:Math.round(e.b),p:Math.round(e.pad)};r.w=Math.round(t.width)-r.l-r.r,r.h=Math.round(t.height)-r.t-r.b}t._pushmargin||(t._pushmargin={}),t._pushmarginIds||(t._pushmarginIds={})}var r1=2,a1=2,i1=64,n1=64;$e.autoMargin=function(t,e,r){var a=t._fullLayout,i=a.width,n=a.height,o=a.margin,l=He.constrain(i-o.l-o.r,r1,i1),s=He.constrain(n-o.t-o.b,a1,n1),f=Math.max(0,i-l),c=Math.max(0,n-s),v=a._pushmargin,u=a._pushmarginIds;if(o.autoexpand!==!1){if(!r)delete v[e],delete u[e];else{var d=r.pad;if(d===void 0&&(d=Math.min(12,o.l,o.r,o.t,o.b)),f){var h=(r.l+r.r)/f;h>1&&(r.l/=h,r.r/=h)}if(c){var p=(r.t+r.b)/c;p>1&&(r.t/=p,r.b/=p)}var g=r.xl!==void 0?r.xl:r.x,_=r.xr!==void 0?r.xr:r.x,b=r.yt!==void 0?r.yt:r.y,w=r.yb!==void 0?r.yb:r.y;v[e]={l:{val:g,size:r.l+d},r:{val:_,size:r.r+d},b:{val:w,size:r.b+d},t:{val:b,size:r.t+d}},u[e]=1}if(!a._replotting)return $e.doAutoMargin(t)}};$e.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,a=e.height;e._size||(e._size={}),t1(e);var i=e._size,n=e.margin,o=He.extendFlat({},i),l=n.l,s=n.r,f=n.t,c=n.b,v=e._pushmargin,u=e._pushmarginIds;if(e.margin.autoexpand!==!1){for(var d in v)u[d]||delete v[d];v.base={l:{val:0,size:l},r:{val:1,size:s},t:{val:1,size:f},b:{val:0,size:c}};for(var h in v){var p=v[h].l||{},g=v[h].b||{},_=p.val,b=p.size,w=g.val,m=g.size;for(var y in v){if(cf(b)&&v[y].r){var x=v[y].r.val,T=v[y].r.size;if(x>_){var k=(b*x+(T-r)*_)/(x-_),S=(T*(1-_)+(b-r)*(1-x))/(x-_);k+S>l+s&&(l=k,s=S)}}if(cf(m)&&v[y].t){var A=v[y].t.val,$=v[y].t.size;if(A>w){var M=(m*A+($-a)*w)/(A-w),C=($*(1-w)+(m-a)*(1-A))/(A-w);M+C>c+f&&(c=M,f=C)}}}}}var E=He.constrain(r-n.l-n.r,r1,i1),I=He.constrain(a-n.t-n.b,a1,n1),P=Math.max(0,r-E),R=Math.max(0,a-I);if(P){var L=(l+s)/P;L>1&&(l/=L,s/=L)}if(R){var D=(c+f)/R;D>1&&(c/=D,f/=D)}if(i.l=Math.round(l),i.r=Math.round(s),i.t=Math.round(f),i.b=Math.round(c),i.p=Math.round(n.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(a)-i.t-i.b,!e._replotting&&$e.didMarginChange(o,i)){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var z=3*(1+Object.keys(u).length);if(e._redrawFromAutoMarginCount<z)return xt.call("_doPlot",t);e._size=o,He.warn("Too many auto-margin redraws.")}$M(t)};function $M(t){var e=$r.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var a=0;a<e.length;a++){var i=e[a][r];i&&i()}})}var Op=["l","r","t","b","p","w","h"];$e.didMarginChange=function(t,e){for(var r=0;r<Op.length;r++){var a=Op[r],i=t[a],n=e[a];if(!cf(i)||Math.abs(n-i)>1)return!0}return!1};$e.graphJson=function(t,e,r,a,i,n){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&$e.supplyDefaults(t);var o=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function f(u,d){if(typeof u=="function")return d?"_function_":null;if(He.isPlainObject(u)){var h={},p;return Object.keys(u).sort().forEach(function(g){if(["_","["].indexOf(g.charAt(0))===-1){if(typeof u[g]=="function"){d&&(h[g]="_function");return}if(r==="keepdata"){if(g.substr(g.length-3)==="src")return}else if(r==="keepstream"){if(p=u[g+"src"],typeof p=="string"&&p.indexOf(":")>0&&!He.isPlainObject(u.stream))return}else if(r!=="keepall"&&(p=u[g+"src"],typeof p=="string"&&p.indexOf(":")>0))return;h[g]=f(u[g],d)}}),h}return Array.isArray(u)?u.map(function(g){return f(g,d)}):He.isTypedArray(u)?He.simpleMap(u,He.identity):He.isJSDate(u)?He.ms2DateTimeLocal(+u):u}var c={data:(o||[]).map(function(u){var d=f(u);return e&&delete d.fit,d})};if(!e&&(c.layout=f(l),i)){var v=l._size;c.layout.computed={margin:{b:v.b,l:v.l,r:v.r,t:v.t}}}return s&&(c.frames=f(s)),n&&(c.config=f(t._context,!0)),a==="object"?c:JSON.stringify(c)};$e.modifyFrames=function(t,e){var r,a,i,n=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch(a=e[r],a.type){case"replace":i=a.value;var l=(n[a.index]||{}).name,s=i.name;n[a.index]=o[s]=i,s!==l&&(delete o[l],o[s]=i);break;case"insert":i=a.value,o[i.name]=i,n.splice(a.index,0,i);break;case"delete":i=n[a.index],delete o[i.name],n.splice(a.index,1);break}return Promise.resolve()};$e.computeFrame=function(t,e){var r=t._transitionData._frameHash,a,i,n,o;if(!e)throw new Error("computeFrame must be given a string frame name");var l=r[e.toString()];if(!l)return!1;for(var s=[l],f=[l.name];l.baseframe&&(l=r[l.baseframe.toString()])&&f.indexOf(l.name)===-1;)s.push(l),f.push(l.name);for(var c={};l=s.pop();)if(l.layout&&(c.layout=$e.extendLayout(c.layout,l.layout)),l.data){if(c.data||(c.data=[]),i=l.traces,!i)for(i=[],a=0;a<l.data.length;a++)i[a]=a;for(c.traces||(c.traces=[]),a=0;a<l.data.length;a++)n=i[a],n!=null&&(o=c.traces.indexOf(n),o===-1&&(o=c.data.length,c.traces[o]=n),c.data[o]=$e.extendTrace(c.data[o],l.data[a]))}return c};$e.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,a=0;a<r.length;a++){var i=r[a];i&&i.name&&(e[i.name]=i)}};$e.extendObjectWithContainers=function(t,e,r){var a,i,n,o,l,s,f,c,v=He.extendDeepNoArrays({},e||{}),u=He.expandObjectPaths(v),d={};if(r&&r.length)for(n=0;n<r.length;n++)a=He.nestedProperty(u,r[n]),i=a.get(),i===void 0?He.nestedProperty(d,r[n]).set(null):(a.set(null),He.nestedProperty(d,r[n]).set(i));if(t=He.extendDeepNoArrays(t||{},u),r&&r.length){for(n=0;n<r.length;n++)if(l=He.nestedProperty(d,r[n]),f=l.get(),!!f){for(s=He.nestedProperty(t,r[n]),c=s.get(),Array.isArray(c)||(c=[],s.set(c)),o=0;o<f.length;o++){var h=f[o];h===null?c[o]=null:c[o]=$e.extendObjectWithContainers(c[o],h)}s.set(c)}}return t};$e.dataArrayContainers=["transforms","dimensions"];$e.layoutArrayContainers=xt.layoutArrayContainers;$e.extendTrace=function(t,e){return $e.extendObjectWithContainers(t,e,$e.dataArrayContainers)};$e.extendLayout=function(t,e){return $e.extendObjectWithContainers(t,e,$e.layoutArrayContainers)};$e.transition=function(t,e,r,a,i,n){var o={redraw:i.redraw},l={},s=[];return o.prepareFn=function(){for(var f=Array.isArray(e)?e.length:0,c=a.slice(0,f),v=0;v<c.length;v++){var u=c[v],d=t._fullData[u],h=d._module;if(!!h){if(h.animatable){var p=h.basePlotModule.name;l[p]||(l[p]=[]),l[p].push(u)}t.data[c[v]]=$e.extendTrace(t.data[c[v]],e[v])}}var g=He.expandObjectPaths(He.extendDeepNoArrays({},r)),_=/^[xy]axis[0-9]*$/;for(var b in g)!_.test(b)||delete g[b].range;$e.extendLayout(t.layout,g),delete t.calcdata,$e.supplyDefaults(t),$e.doCalcdata(t);var w=He.expandObjectPaths(r);if(w){var m=t._fullLayout._plots;for(var y in m){var x=m[y],T=x.xaxis,k=x.yaxis,S=T.range.slice(),A=k.range.slice(),$=null,M=null,C=null,E=null;Array.isArray(w[T._name+".range"])?$=w[T._name+".range"].slice():Array.isArray((w[T._name]||{}).range)&&($=w[T._name].range.slice()),Array.isArray(w[k._name+".range"])?M=w[k._name+".range"].slice():Array.isArray((w[k._name]||{}).range)&&(M=w[k._name].range.slice()),S&&$&&(T.r2l(S[0])!==T.r2l($[0])||T.r2l(S[1])!==T.r2l($[1]))&&(C={xr0:S,xr1:$}),A&&M&&(k.r2l(A[0])!==k.r2l(M[0])||k.r2l(A[1])!==k.r2l(M[1]))&&(E={yr0:A,yr1:M}),(C||E)&&s.push(He.extendFlat({plotinfo:x},C,E))}}return Promise.resolve()},o.runFn=function(f){var c,v=t._fullLayout._basePlotModules,u=s.length,d;if(r)for(d=0;d<v.length;d++)v[d].transitionAxes&&v[d].transitionAxes(t,s,n,f);u?(c=He.extendFlat({},n),c.duration=0,delete l.cartesian):c=n;for(var h in l){var p=l[h],g=t._fullData[p[0]]._module;g.basePlotModule.plot(t,p,c,f)}},o1(t,n,o)};$e.transitionFromReact=function(t,e,r,a){var i=t._fullLayout,n=i.transition,o={},l=[];return o.prepareFn=function(){var s=i._plots;o.redraw=!1,e.anim==="some"&&(o.redraw=!0),r.anim==="some"&&(o.redraw=!0);for(var f in s){var c=s[f],v=c.xaxis,u=c.yaxis,d=a[v._name].range.slice(),h=a[u._name].range.slice(),p=v.range.slice(),g=u.range.slice();v.setScale(),u.setScale();var _=null,b=null;(v.r2l(d[0])!==v.r2l(p[0])||v.r2l(d[1])!==v.r2l(p[1]))&&(_={xr0:d,xr1:p}),(u.r2l(h[0])!==u.r2l(g[0])||u.r2l(h[1])!==u.r2l(g[1]))&&(b={yr0:h,yr1:g}),(_||b)&&l.push(He.extendFlat({plotinfo:c},_,b))}return Promise.resolve()},o.runFn=function(s){for(var f=t._fullData,c=t._fullLayout,v=c._basePlotModules,u,d,h,p=[],g=0;g<f.length;g++)p.push(g);function _(){if(!!t._fullLayout)for(var w=0;w<v.length;w++)v[w].transitionAxes&&v[w].transitionAxes(t,l,u,s)}function b(){if(!!t._fullLayout)for(var w=0;w<v.length;w++)v[w].plot(t,h,d,s)}l.length&&e.anim?n.ordering==="traces first"?(u=He.extendFlat({},n,{duration:0}),h=p,d=n,setTimeout(_,n.duration),b()):(u=n,h=null,d=He.extendFlat({},n,{duration:0}),setTimeout(b,u.duration),_()):l.length?(u=n,_()):e.anim&&(h=p,d=n,b())},o1(t,n,o)};function o1(t,e,r){var a=!1;function i(v){var u=Promise.resolve();if(!v)return u;for(;v.length;)u=u.then(v.shift());return u}function n(v){if(!!v)for(;v.length;)v.shift()}function o(){return t.emit("plotly_transitioning",[]),new Promise(function(v){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){a=!0}),r.redraw&&t._transitionData._interruptCallbacks.push(function(){return xt.call("redraw",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var u=0,d=0;function h(){return u++,function(){d++,!a&&d===u&&l(v)}}r.runFn(h),setTimeout(h())})}function l(v){if(!!t._transitionData)return n(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return xt.call("redraw",t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])}).then(v)}function s(){if(!!t._transitionData)return t._transitioning=!1,i(t._transitionData._interruptCallbacks)}var f=[$e.previousPromises,s,r.prepareFn,$e.rehover,o],c=He.syncOrAsync(f,t);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return t})}$e.doCalcdata=function(t,e){var r=$r.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=Qx.findArrayAttributes(n),n._extremes={};var v=i._subplots.polar||[];for(l=0;l<v.length;l++)r.push(i[v[l]].radialaxis,i[v[l]].angularaxis);for(var u in i._colorAxes){var d=i[u];d.cauto!==!1&&(delete d.cmin,delete d.cmax)}var h=!1;function p(b){if(n=a[b],o=n._module,n.visible===!0&&n.transforms){if(o&&o.calc){var w=o.calc(t,n);w[0]&&w[0].t&&w[0].t._scene&&delete w[0].t._scene.dirty}for(s=0;s<n.transforms.length;s++){var m=n.transforms[s];o=Qf[m.type],o&&o.calcTransform&&(n._hasCalcTransform=!0,h=!0,o.calcTransform(t,n,m))}}}function g(b,w){if(n=a[b],o=n._module,!!o.isContainer===w){var m=[];if(n.visible===!0&&n._length!==0){delete n._indexToPoints;var y=n.transforms||[];for(s=y.length-1;s>=0;s--)if(y[s].enabled){n._indexToPoints=y[s]._indexToPoints;break}o&&o.calc&&(m=o.calc(t,n))}(!Array.isArray(m)||!m[0])&&(m=[{x:Fp,y:Fp}]),m[0].t||(m[0].t={}),m[0].trace=n,f[b]=m}}for(Bp(r,a,i),l=0;l<a.length;l++)g(l,!0);for(l=0;l<a.length;l++)p(l);for(h&&Bp(r,a,i),l=0;l<a.length;l++)g(l,!0);for(l=0;l<a.length;l++)g(l,!1);jp(t);var _=RM(r,t);if(_.length){for(i._numBoxes=0,i._numViolins=0,l=0;l<_.length;l++)g(_[l],!0);for(l=0;l<_.length;l++)g(_[l],!1);jp(t)}xt.getComponentMethod("fx","calc")(t),xt.getComponentMethod("errorbars","calc")(t)};var EM=/(total|sum|min|max|mean|median) (ascending|descending)/;function RM(t,e){var r=[],a,i,n,o,l;function s(P,R,L){var D=R._id.charAt(0);if(P==="histogram2dcontour"){var z=R._counterAxes[0],F=$r.getFromId(e,z),H=D==="x"||z==="x"&&F.type==="category",U=D==="y"||z==="y"&&F.type==="category";return function(B,X){return B===0||X===0||H&&B===L[X].length-1||U&&X===L.length-1?-1:(D==="y"?X:B)-1}}else return function(B,X){return D==="y"?X:B}}var f={min:function(P){return He.aggNums(Math.min,null,P)},max:function(P){return He.aggNums(Math.max,null,P)},sum:function(P){return He.aggNums(function(R,L){return R+L},null,P)},total:function(P){return He.aggNums(function(R,L){return R+L},null,P)},mean:function(P){return He.mean(P)},median:function(P){return He.median(P)}};for(a=0;a<t.length;a++){var c=t[a];if(c.type==="category"){var v=c.categoryorder.match(EM);if(v){var u=v[1],d=v[2],h=c._id.charAt(0),p=h==="x",g=[];for(i=0;i<c._categories.length;i++)g.push([c._categories[i],[]]);for(i=0;i<c._traceIndices.length;i++){var _=c._traceIndices[i],b=e._fullData[_];if(b.visible===!0){var w=b.type;xt.traceIs(b,"histogram")&&(delete b._xautoBinFinished,delete b._yautoBinFinished);var m=w==="splom",y=w==="scattergl",x=e.calcdata[_];for(n=0;n<x.length;n++){var T=x[n],k,S;if(m){var A=b._axesDim[c._id];if(!p){var $=b._diag[A][0];$&&(c=e._fullLayout[$r.id2name($)])}var M=T.trace.dimensions[A].values;for(o=0;o<M.length;o++)for(k=c._categoriesMap[M[o]],l=0;l<T.trace.dimensions.length;l++)if(l!==A){var C=T.trace.dimensions[l];g[k][1].push(C.values[o])}}else if(y){for(o=0;o<T.t.x.length;o++)p?(k=T.t.x[o],S=T.t.y[o]):(k=T.t.y[o],S=T.t.x[o]),g[k][1].push(S);T.t&&T.t._scene&&delete T.t._scene.dirty}else if(T.hasOwnProperty("z")){S=T.z;var E=s(b.type,c,S);for(o=0;o<S.length;o++)for(l=0;l<S[o].length;l++)k=E(l,o),k+1&&g[k][1].push(S[o][l])}else for(k=T.p,k===void 0&&(k=T[h]),S=T.s,S===void 0&&(S=T.v),S===void 0&&(S=p?T.y:T.x),Array.isArray(S)||(S===void 0?S=[]:S=[S]),o=0;o<S.length;o++)g[k][1].push(S[o])}}}c._categoriesValue=g;var I=[];for(i=0;i<g.length;i++)I.push([g[i][0],f[u](g[i][1])]);I.sort(function(P,R){return P[1]-R[1]}),c._categoriesAggregatedValue=I,c._initialCategories=I.map(function(P){return P[0]}),d==="descending"&&c._initialCategories.reverse(),r=r.concat(c.sortByInitialCategories())}}}return r}function Bp(t,e,r){var a={};function i(s){s.clearCalc(),s.type==="multicategory"&&s.setupMultiCategory(e),a[s._id]=1}He.simpleMap(t,i);for(var n=r._axisMatchGroups||[],o=0;o<n.length;o++)for(var l in n[o])a[l]||i(r[$r.id2name(l)])}function jp(t){var e=t._fullLayout,r=e._visibleModules,a={},i,n,o;for(n=0;n<r.length;n++){var l=r[n],s=l.crossTraceCalc;if(s){var f=l.basePlotModule.name;a[f]?He.pushUnique(a[f],s):a[f]=[s]}}for(o in a){var c=a[o],v=e._subplots[o];if(Array.isArray(v))for(i=0;i<v.length;i++){var u=v[i],d=o==="cartesian"?e._plots[u]:e[u];for(n=0;n<c.length;n++)c[n](t,d,u)}else for(n=0;n<c.length;n++)c[n](t)}}$e.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()};$e.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()};$e.generalUpdatePerTraceModule=function(t,e,r,a){var i=e.traceHash,n={},o;for(o=0;o<r.length;o++){var l=r[o],s=l[0].trace;s.visible&&(n[s.type]=n[s.type]||[],n[s.type].push(l))}for(var f in i)if(!n[f]){var c=i[f][0],v=c[0].trace;v.visible=!1,n[f]=[c]}for(var u in n){var d=n[u],h=d[0][0].trace._module;h.plot(t,e,He.filterVisible(d),a)}e.traceHash=n};$e.plotBasePlot=function(t,e,r,a,i){var n=xt.getModule(t),o=_M(e.calcdata,n)[0];n.plot(e,o,a,i)};$e.cleanBasePlot=function(t,e,r,a,i){var n=i._has&&i._has(t),o=r._has&&r._has(t);n&&!o&&i["_"+t+"layer"].selectAll("g.trace").remove()};var Ct={exports:{}},ir={},on={};(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}})(on);var Lr={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=tt.exports,r=de.exports,a=r.strTranslate,i=on,n=Lr.LINE_SPACING,o=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(D,z,F){var H=D.text(),U=!D.attr("data-notex")&&z&&z._context.typesetMath&&typeof MathJax<"u"&&H.match(o),B=e.select(D.node().parentNode);if(B.empty())return;var X=D.attr("class")?D.attr("class").split(" ")[0]:"text";X+="-math",B.selectAll("svg."+X).remove(),B.selectAll("g."+X+"-group").remove(),D.style("display",null).attr({"data-unformatted":H,"data-math":"N"});function O(){B.empty()||(X=D.attr("class")+"-math",B.select("svg."+X).remove()),D.text("").style("white-space","pre");var Y=I(D.node(),H);Y&&D.style("pointer-events","all"),t.positionText(D),F&&F.call(D)}return U?(z&&z._promises||[]).push(new Promise(function(Y){D.style("display","none");var W=parseInt(D.node().style.fontSize,10),K={fontSize:W};v(U[2],K,function(Z,ae,ne){B.selectAll("svg."+X).remove(),B.selectAll("g."+X+"-group").remove();var oe=Z&&Z.select("svg");if(!oe||!oe.node()){O(),Y();return}var re=B.append("g").classed(X+"-group",!0).attr({"pointer-events":"none","data-unformatted":H,"data-math":"Y"});re.node().appendChild(oe.node()),ae&&ae.node()&&oe.node().insertBefore(ae.node().cloneNode(!0),oe.node().firstChild);var se=ne.width,me=ne.height;oe.attr({class:X,height:me,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var Re=D.node().style.fill||"black",ke=oe.select("g");ke.attr({fill:Re,stroke:Re});var ze=ke.node().getBoundingClientRect(),he=ze.width,te=ze.height;(he>se||te>me)&&(oe.style("overflow","hidden"),ze=oe.node().getBoundingClientRect(),he=ze.width,te=ze.height);var ue=+D.attr("x"),Le=+D.attr("y"),we=W||D.node().getBoundingClientRect().height,Pe=-we/4;if(X[0]==="y")re.attr({transform:"rotate("+[-90,ue,Le]+")"+a(-he/2,Pe-te/2)});else if(X[0]==="l")Le=Pe-te/2;else if(X[0]==="a"&&X.indexOf("atitle")!==0)ue=0,Le=Pe;else{var Ee=D.attr("text-anchor");ue=ue-he*(Ee==="middle"?.5:Ee==="end"?1:0),Le=Le+Pe-te/2}oe.attr({x:ue,y:Le}),F&&F.call(D,re),Y(re)})})):O(),D};var l=/(<|<|<)/g,s=/(>|>|>)/g;function f(D){return D.replace(l,"\\lt ").replace(s,"\\gt ")}var c=[["$","$"],["\\(","\\)"]];function v(D,z,F){var H=parseInt((MathJax.version||"").split(".")[0]);if(H!==2&&H!==3){r.warn("No MathJax version:",MathJax.version);return}var U,B,X,O,Y=function(){return B=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(){B=r.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=c},K=function(){if(U=MathJax.Hub.config.menuSettings.renderer,U!=="SVG")return MathJax.Hub.setRenderer("SVG")},Z=function(){U=MathJax.config.startup.output,U!=="svg"&&(MathJax.config.startup.output="svg")},ae=function(){var Re="math-output-"+r.randstr({},64);O=e.select("body").append("div").attr({id:Re}).style({visibility:"hidden",position:"absolute","font-size":z.fontSize+"px"}).text(f(D));var ke=O.node();return H===2?MathJax.Hub.Typeset(ke):MathJax.typeset([ke])},ne=function(){var Re=O.select(H===2?".MathJax_SVG":".MathJax"),ke=!Re.empty()&&O.select("svg").node();if(!ke)r.log("There was an error in the tex syntax.",D),F();else{var ze=ke.getBoundingClientRect(),he;H===2?he=e.select("body").select("#MathJax_SVG_glyphs"):he=Re.select("defs"),F(Re,he,ze)}O.remove()},oe=function(){if(U!=="SVG")return MathJax.Hub.setRenderer(U)},re=function(){U!=="svg"&&(MathJax.config.startup.output=U)},se=function(){return X!==void 0&&(MathJax.Hub.processSectionDelay=X),MathJax.Hub.Config(B)},me=function(){MathJax.config=B};H===2?MathJax.Hub.Queue(Y,K,ae,ne,oe,se):H===3&&(W(),Z(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ae(),ne(),re(),me()}))}var u={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},d={sub:"0.3em",sup:"-0.6em"},h={sub:"-0.21em",sup:"0.42em"},p="\u200B",g=["http:","https:","mailto:","",void 0,":"],_=t.NEWLINES=/(\r\n?|\n)/g,b=/(<[^<>]*>)/,w=/<(\/?)([^ >]*)(\s+(.*))?>/i,m=/<br(\s+.*)?>/i;t.BR_TAG_ALL=/<br(\s+.*)?>/gi;var y=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,x=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(D,z){if(!D)return null;var F=D.match(z),H=F&&(F[3]||F[4]);return H&&C(H)}var A=/(^|;)\s*color:/;t.plainText=function(D,z){z=z||{};for(var F=z.len!==void 0&&z.len!==-1?z.len:1/0,H=z.allowedTags!==void 0?z.allowedTags:["br"],U="...",B=U.length,X=D.split(b),O=[],Y="",W=0,K=0;K<X.length;K++){var Z=X[K],ae=Z.match(w),ne=ae&&ae[2].toLowerCase();if(ne)H.indexOf(ne)!==-1&&(O.push(Z),Y=ne);else{var oe=Z.length;if(W+oe<F)O.push(Z),W+=oe;else if(W<F){var re=F-W;Y&&(Y!=="br"||re<=B||oe<=B)&&O.pop(),F>B?O.push(Z.substr(0,re-B)+U):O.push(Z.substr(0,re));break}Y=""}}return O.join("")};var $={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},M=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(D){return D.replace(M,function(z,F){var H;return F.charAt(0)==="#"?H=E(F.charAt(1)==="x"?parseInt(F.substr(2),16):parseInt(F.substr(1),10)):H=$[F],H||z})}t.convertEntities=C;function E(D){if(!(D>1114111)){var z=String.fromCodePoint;if(z)return z(D);var F=String.fromCharCode;return D<=65535?F(D):F((D>>10)+55232,D%1024+56320)}}function I(D,z){z=z.replace(_," ");var F=!1,H=[],U,B=-1;function X(){B++;var te=document.createElementNS(i.svg,"tspan");e.select(te).attr({class:"line",dy:B*n+"em"}),D.appendChild(te),U=te;var ue=H;if(H=[{node:te}],ue.length>1)for(var Le=1;Le<ue.length;Le++)O(ue[Le])}function O(te){var ue=te.type,Le={},we;if(ue==="a"){we="a";var Pe=te.target,Ee=te.href,Ce=te.popup;Ee&&(Le={"xlink:xlink:show":Pe==="_blank"||Pe.charAt(0)!=="_"?"new":"replace",target:Pe,"xlink:xlink:href":Ee},Ce&&(Le.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+Ce+'");return false;'))}else we="tspan";te.style&&(Le.style=te.style);var q=document.createElementNS(i.svg,we);if(ue==="sup"||ue==="sub"){Y(U,p),U.appendChild(q);var pe=document.createElementNS(i.svg,"tspan");Y(pe,p),e.select(pe).attr("dy",h[ue]),Le.dy=d[ue],U.appendChild(q),U.appendChild(pe)}else U.appendChild(q);e.select(q).attr(Le),U=te.node=q,H.push(te)}function Y(te,ue){te.appendChild(document.createTextNode(ue))}function W(te){if(H.length===1){r.log("Ignoring unexpected end tag </"+te+">.",z);return}var ue=H.pop();te!==ue.type&&r.log("Start tag <"+ue.type+"> doesnt match end tag <"+te+">. Pretending it did match.",z),U=H[H.length-1].node}var K=m.test(z);K?X():(U=D,H=[{node:D}]);for(var Z=z.split(b),ae=0;ae<Z.length;ae++){var ne=Z[ae],oe=ne.match(w),re=oe&&oe[2].toLowerCase(),se=u[re];if(re==="br")X();else if(se===void 0)Y(U,C(ne));else if(oe[1])W(re);else{var me=oe[4],Re={type:re},ke=S(me,y);if(ke?(ke=ke.replace(A,"$1 fill:"),se&&(ke+=";"+se)):se&&(ke=se),ke&&(Re.style=ke),re==="a"){F=!0;var ze=S(me,x);if(ze){var he=P(ze);he&&(Re.href=he,Re.target=S(me,T)||"_blank",Re.popup=S(me,k))}}O(Re)}}return F}function P(D){var z=encodeURI(decodeURI(D)),F=document.createElement("a"),H=document.createElement("a");F.href=D,H.href=z;var U=F.protocol,B=H.protocol;return g.indexOf(U)!==-1&&g.indexOf(B)!==-1?z:""}t.sanitizeHTML=function(z){z=z.replace(_," ");for(var F=document.createElement("p"),H=F,U=[],B=z.split(b),X=0;X<B.length;X++){var O=B[X],Y=O.match(w),W=Y&&Y[2].toLowerCase();if(W in u)if(Y[1])U.length&&(H=U.pop());else{var K=Y[4],Z=S(K,y),ae=Z?{style:Z}:{};if(W==="a"){var ne=S(K,x);if(ne){var oe=P(ne);if(oe){ae.href=oe;var re=S(K,T);re&&(ae.target=re)}}}var se=document.createElement(W);H.appendChild(se),e.select(se).attr(ae),H=se,U.push(se)}else H.appendChild(document.createTextNode(C(O)))}var me="innerHTML";return F[me]},t.lineCount=function(z){return z.selectAll("tspan.line").size()||1},t.positionText=function(z,F,H){return z.each(function(){var U=e.select(this);function B(Y,W){return W===void 0?(W=U.attr(Y),W===null&&(U.attr(Y,0),W=0)):U.attr(Y,W),W}var X=B("x",F),O=B("y",H);this.nodeName==="text"&&U.selectAll("tspan.line").attr({x:X,y:O})})};function R(D,z,F){var H=F.horizontalAlign,U=F.verticalAlign||"top",B=D.node().getBoundingClientRect(),X=z.node().getBoundingClientRect(),O,Y,W;return U==="bottom"?Y=function(){return B.bottom-O.height}:U==="middle"?Y=function(){return B.top+(B.height-O.height)/2}:Y=function(){return B.top},H==="right"?W=function(){return B.right-O.width}:H==="center"?W=function(){return B.left+(B.width-O.width)/2}:W=function(){return B.left},function(){O=this.node().getBoundingClientRect();var K=W()-X.left,Z=Y()-X.top,ae=F.gd||{};if(F.gd){ae._fullLayout._calcInverseTransform(ae);var ne=r.apply3DTransform(ae._fullLayout._invTransform)(K,Z);K=ne[0],Z=ne[1]}return this.style({top:Z+"px",left:K+"px","z-index":1e3}),this}}var L="1px ";t.makeTextShadow=function(D){var z=L,F=L,H=L;return z+F+H+D+", -"+z+"-"+F+H+D+", "+z+"-"+F+H+D+", -"+z+F+H+D},t.makeEditable=function(D,z){var F=z.gd,H=z.delegate,U=e.dispatch("edit","input","cancel"),B=H||D;if(D.style({"pointer-events":H?"none":"all"}),D.size()!==1)throw new Error("boo");function X(){Y(),D.style({opacity:0});var W=B.attr("class"),K;W?K="."+W.split(" ")[0]+"-math-group":K="[class*=-math-group]",K&&e.select(D.node().parentNode).select(K).style({opacity:0})}function O(W){var K=W.node(),Z=document.createRange();Z.selectNodeContents(K);var ae=window.getSelection();ae.removeAllRanges(),ae.addRange(Z),K.focus()}function Y(){var W=e.select(F),K=W.select(".svg-container"),Z=K.append("div"),ae=D.node().style,ne=parseFloat(ae.fontSize||12),oe=z.text;oe===void 0&&(oe=D.attr("data-unformatted")),Z.classed("plugin-editable editable",!0).style({position:"absolute","font-family":ae.fontFamily||"Arial","font-size":ne,color:z.fill||ae.fill||"black",opacity:1,"background-color":z.background||"transparent",outline:"#ffffff33 1px solid",margin:[-ne/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(oe).call(R(D,K,z)).on("blur",function(){F._editing=!1,D.text(this.textContent).style({opacity:1});var re=e.select(this).attr("class"),se;re?se="."+re.split(" ")[0]+"-math-group":se="[class*=-math-group]",se&&e.select(D.node().parentNode).select(se).style({opacity:0});var me=this.textContent;e.select(this).transition().duration(0).remove(),e.select(document).on("mouseup",null),U.edit.call(D,me)}).on("focus",function(){var re=this;F._editing=!0,e.select(document).on("mouseup",function(){if(e.event.target===re)return!1;document.activeElement===Z.node()&&Z.node().blur()})}).on("keyup",function(){e.event.which===27?(F._editing=!1,D.style({opacity:1}),e.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),U.cancel.call(D,this.textContent)):(U.input.call(D,this.textContent),e.select(this).call(R(D,K,z)))}).on("keydown",function(){e.event.which===13&&this.blur()}).call(O)}return z.immediate?X():B.on("click",X),e.rebind(D,U,"on")}})(ir);var Tt={exports:{}},PM=tt.exports,Vs=Wr.exports,tl=lt,ts=de.exports,Gp=Je.exports,zM=fo.isValid;function IM(t,e,r){var a=e?ts.nestedProperty(t,e).get()||{}:t,i=a[r||"color"],n=!1;if(ts.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(tl(i[o])){n=!0;break}}return ts.isPlainObject(a)&&(n||a.showscale===!0||tl(a.cmin)&&tl(a.cmax)||zM(a.colorscale)||ts.isPlainObject(a.colorbar))}var Up=["showscale","autocolorscale","colorscale","reversescale","colorbar"],Lo=["min","max","mid","auto"];function l1(t){var e=t._colorAx,r=e||t,a={},i,n,o;for(n=0;n<Up.length;n++)o=Up[n],a[o]=r[o];if(e)for(i="c",n=0;n<Lo.length;n++)o=Lo[n],a[o]=r["c"+o];else{var l;for(n=0;n<Lo.length;n++){if(o=Lo[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=Lo.indexOf(s)!==-1?i+s:s;r[c]=r["_"+c]=f},a}function s1(t){for(var e=l1(t),r=e.min,a=e.max,i=e.reversescale?f1(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 f1(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 c1(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=Vs(a[o]).toRgb();n[o]=[l.r,l.g,l.b,l.a]}var s=PM.scale.linear().domain(r).range(n).clamp(!0),f=e.noNumericCheck,c=e.returnArray,v;return f&&c?v=s:f?v=function(u){return Vp(s(u))}:c?v=function(u){return tl(u)?s(u):Vs(u).isValid()?u:Gp.defaultLine}:v=function(u){return tl(u)?Vp(s(u)):Vs(u).isValid()?u:Gp.defaultLine},v.domain=s.domain,v.range=function(){return a},v}function NM(t,e){return c1(s1(t),e)}function Vp(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return Vs(e).toRgbString()}var da={hasColorscale:IM,extractOpts:l1,extractScale:s1,flipScale:f1,makeColorScaleFunc:c1,makeColorScaleFuncFromTrace:NM},u1={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"},v1=u1,FM=v1.FORMAT_LINK,HM=v1.DATE_FORMAT_LINK;function OM(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?th:d1)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}}function th(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: "+FM+"."].join(" ")}function d1(t,e){return th(t,e)+[" And for dates see: "+HM+".","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 mo={axisHoverFormat:OM,descriptionOnlyNumbers:th,descriptionWithDates:d1},Pc=dr,pn=hr,BM=Ga.dash,jM=Bt.extendFlat,qp=Mt.templatedArray,Xp=mo.descriptionWithDates,GM=Ot.ONEDAY,Ta=pr,zc=Ta.HOUR_PATTERN,Ic=Ta.WEEKDAY_PATTERN,Ua={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:pn.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Pc({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},scaleanchor:{valType:"enumerated",values:[Ta.idRegex.x.toString(),Ta.idRegex.y.toString()],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[Ta.idRegex.x.toString(),Ta.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:qp("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:[Ic,zc,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+Ic+"* - 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 *"+zc+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+Ic+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+zc+"', 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:GM,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:{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(" ")},nticks:{valType:"integer",min:0,dflt: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(" ")},tick0:{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(" ")},dtick:{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(" ")},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:{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(" ")},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:{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(" ")},tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:{valType:"number",min:0,dflt:5,editType:"ticks",description:"Sets the tick length (in px)."},tickwidth:{valType:"number",min:0,dflt:1,editType:"ticks",description:"Sets the tick width (in px)."},tickcolor:{valType:"color",dflt:pn.defaultLine,editType:"ticks",description:"Sets the tick color."},showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},automargin:{valType:"boolean",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:jM({},BM,{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:Pc({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Xp("tick label")},tickformatstops:qp("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:Xp("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:pn.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:{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(" ")},gridcolor:{valType:"color",dflt:pn.lightLine,editType:"ticks",description:"Sets the color of the grid lines."},gridwidth:{valType:"number",min:0,dflt:1,editType:"ticks",description:"Sets the width (in px) of the grid lines."},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:pn.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:pn.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",Ta.idRegex.x.toString(),Ta.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",Ta.idRegex.x.toString(),Ta.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(" ")},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(" ")},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:Pc({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}},Rt=Ua,Nc=dr,Yp=Bt.extendFlat,UM=gi.overrideAll,rh=UM({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,description:["Sets the x position of the color bar (in plot fraction).","Defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",min:-2,max:3,description:["Sets the y position of the color bar (in plot fraction).","Defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:Rt.linecolor,outlinewidth:Rt.linewidth,bordercolor:Rt.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:Rt.tickmode,nticks:Rt.nticks,tick0:Rt.tick0,dtick:Rt.dtick,tickvals:Rt.tickvals,ticktext:Rt.ticktext,ticks:Yp({},Rt.ticks,{dflt:""}),ticklabeloverflow:Yp({},Rt.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:Rt.ticklen,tickwidth:Rt.tickwidth,tickcolor:Rt.tickcolor,ticklabelstep:Rt.ticklabelstep,showticklabels:Rt.showticklabels,tickfont:Nc({description:"Sets the color bar's tick label font"}),tickangle:Rt.tickangle,tickformat:Rt.tickformat,tickformatstops:Rt.tickformatstops,tickprefix:Rt.tickprefix,showtickprefix:Rt.showtickprefix,ticksuffix:Rt.ticksuffix,showticksuffix:Rt.showticksuffix,separatethousands:Rt.separatethousands,exponentformat:Rt.exponentformat,minexponent:Rt.minexponent,showexponent:Rt.showexponent,title:{text:{valType:"string",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Nc({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:Nc({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root"),VM=rh,qM=co.counter,XM=Yd,h1=fo.scales,YM=XM(h1);function Co(t){return"`"+t+"`"}var ln=function(e,r){e=e||"",r=r||{};var a=r.cLetter||"c",i="onlyIfNumerical"in r?r.onlyIfNumerical:Boolean(e),n="noScale"in r?r.noScale:e==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:a==="z",l=typeof r.colorscaleDflt=="string"?h1[r.colorscaleDflt]:null,s=r.editTypeOverride||"",f=e?e+".":"",c,v;"colorAttr"in r?(c=r.colorAttr,v=r.colorAttr):(c={z:"z",c:"color"}[a],v="in "+Co(f+c));var u=i?" Has an effect only if "+v+"is set to a numerical array.":"",d=a+"auto",h=a+"min",p=a+"max",g=a+"mid",_=Co(f+d),b=Co(f+h),w=Co(f+p),m=b+" and "+w,y={};y[h]=y[p]=void 0;var x={};x[d]=!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"," "+m+" if set."].join("")},r.anim&&(T.color.anim=!0)),T[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:y,description:["Determines whether or not the color domain is computed"," with respect to the input data (here "+v+") or the bounds set in"," ",m," ",u," Defaults to `false` when ",m," are set by the user."].join("")},T[h]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:x,description:["Sets the lower bound of the color domain.",u," Value should have the same units as ",v," and if set, ",w," must be set as well."].join("")},T[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:x,description:["Sets the upper bound of the color domain.",u," Value should have the same units as ",v," and if set, ",b," must be set as well."].join("")},T[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:y,description:["Sets the mid-point of the color domain by scaling ",b," and/or ",w," to be equidistant to this point.",u," Value should have the same units as ",v,". ","Has no effect when ",_," is `false`."].join("")},T.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale.",u," The colorscale must be an array containing"," arrays mapping a normalized value to an"," rgb, rgba, hex, hsl, hsv, or named color string."," At minimum, a mapping for the lowest (0) and highest (1)"," values are required. For example,"," `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`."," To control the bounds of the colorscale in color space,"," use",m,"."," Alternatively, `colorscale` may be a palette name string"," of the following list: "+YM+"."].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 ",Co(f+"colorscale"),".",u," In case `colorscale` is unspecified or `autocolorscale` is true, the default "," palette will be chosen according to whether numbers in the `color` array are"," all positive, all negative or mixed."].join("")},T.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true.",u," If true, ",b," will correspond to the last color"," in the array and ",w," will correspond to the first color."].join("")},n||(T.showscale={valType:"boolean",dflt:o,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace.",u].join("")},T.colorbar=VM),r.noColorAxis||(T.coloraxis={valType:"subplotid",regex:qM("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},WM=Bt.extendFlat,ZM=ln,Fc=fo.scales,Hc="Note that `autocolorscale` must be true for this attribute to work.",p1={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Fc.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",Hc].join(" ")},sequentialminus:{valType:"colorscale",dflt:Fc.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",Hc].join(" ")},diverging:{valType:"colorscale",dflt:Fc.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",Hc].join(" ")}},coloraxis:WM({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},ZM("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))},KM=de.exports,m1=function(e){return KM.isPlainObject(e.colorbar)},ec={},Fv=lt,Wp=de.exports,y1=Ot,QM=y1.ONEDAY,JM=y1.ONEWEEK;ec.dtick=function(t,e){var r=e==="log",a=e==="date",i=e==="category",n=a?QM:1;if(!t)return n;if(Fv(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=Fv(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};ec.tick0=function(t,e,r,a){if(e==="date")return Wp.cleanDate(t,Wp.dateTick0(r,a%JM===0?1:0));if(!(a==="D1"||a==="D2"))return Fv(t)?Number(t):0};var Zp=ec,eS=de.exports.isArrayOrTypedArray,g1=function(e,r,a,i){function n(d){var h=e[d];return h!==void 0?h:(r._template||{})[d]}var o=n("tick0"),l=n("dtick"),s=n("tickvals"),f=eS(s)?"array":l?"linear":"auto",c=a("tickmode",f);if(c==="auto")a("nticks");else if(c==="linear"){var v=r.dtick=Zp.dtick(l,i);r.tick0=Zp.tick0(o,i,r.calendar,v)}else if(i!=="multicategory"){var u=a("tickvals");u===void 0?r.tickmode="auto":a("ticktext")}},Oc=de.exports,Bc=Ua,b1=function(e,r,a,i){var n=Oc.coerce2(e,r,Bc,"ticklen"),o=Oc.coerce2(e,r,Bc,"tickwidth"),l=Oc.coerce2(e,r,Bc,"tickcolor",r.color),s=a("ticks",i.outerTicks||n||o||l?"outside":"");s||(delete r.ticklen,delete r.tickwidth,delete r.tickcolor)},x1=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]]},rs=de.exports,tS=Mt,Va=function(e,r,a){var i=a.name,n=a.inclusionAttr||"visible",o=r[i],l=rs.isArrayOrTypedArray(e[i])?e[i]:[],s=r[i]=[],f=tS.arrayTemplater(r,i,n),c,v;for(c=0;c<l.length;c++){var u=l[c];rs.isPlainObject(u)?v=f.newItem(u):(v=f.newItem({}),v[n]=!1),v._index=c,v[n]!==!1&&a.handleItemDefaults(u,v,r,a),s.push(v)}var d=f.defaultItems();for(c=0;c<d.length;c++)v=d[c],v._index=s.length,a.handleItemDefaults({},v,r,a,{}),s.push(v);if(rs.isArrayOrTypedArray(o)){var h=Math.min(o.length,s.length);for(c=0;c<h;c++)rs.relinkPrivateKeys(s[c],o[c])}return s},_1=de.exports,rS=Je.exports.contrast,w1=Ua,aS=x1,iS=Va,T1=function(e,r,a,i,n){n||(n={});var o=aS(e),l=a("showticklabels");if(l){var s=n.font||{},f=r.color,c=r.ticklabelposition||"",v=c.indexOf("inside")!==-1?rS(n.bgColor):f&&f!==w1.color.dflt?f:s.color;if(_1.coerceFont(a,"tickfont",{family:s.family,size:s.size,color:v}),!n.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&a("ticklabelstep"),n.noAng||a("tickangle"),i!=="category"){var u=a("tickformat");iS(e,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:nS}),r.tickformatstops.length||delete r.tickformatstops,!n.noExp&&!u&&i!=="date"&&(a("showexponent",o),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function nS(t,e){function r(i,n){return _1.coerce(t,e,w1.tickformatstops,i,n)}var a=r("enabled");a&&(r("dtickrange"),r("value"))}var oS=x1,k1=function(e,r,a,i,n){n||(n={});var o=n.tickSuffixDflt,l=oS(e),s=a("tickprefix");s&&a("showtickprefix",l);var f=a("ticksuffix",o);f&&a("showticksuffix",l)},mn=de.exports,lS=Mt,sS=g1,fS=b1,cS=T1,uS=k1,vS=rh,A1=function(e,r,a){var i=lS.newContainer(r,"colorbar"),n=e.colorbar||{};function o(w,m){return mn.coerce(n,i,vS,w,m)}var l=a.margin||{t:0,b:0,l:0,r:0},s=a.width-l.l-l.r,f=a.height-l.t-l.b,c=o("orientation"),v=c==="v",u=o("thicknessmode");o("thickness",u==="fraction"?30/(v?s:f):30);var d=o("lenmode");o("len",d==="fraction"?1:v?f:s),o("x",v?1.02:.5),o("xanchor",v?"left":"center"),o("xpad"),o("y",v?.5:1.02),o("yanchor",v?"middle":"bottom"),o("ypad"),mn.noneOrAll(n,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var h=mn.coerce(n,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",h.indexOf("inside")!==-1?"hide past domain":"hide past div"),sS(n,i,o,"linear");var p=a.font,g={outerTicks:!1,font:p};h.indexOf("inside")!==-1&&(g.bgColor="black"),uS(n,i,o,"linear",g),cS(n,i,o,"linear",g),fS(n,i,o,"linear"),o("title.text",a._dfltTitle.colorbar);var _=i.tickfont,b=mn.extendFlat({},_,{color:p.color,size:mn.bigFont(_.size)});mn.coerceFont(o,"title.font",b),o("title.side",v?"top":"right")},Kp=lt,Hv=de.exports,dS=m1,hS=A1,Qp=fo.isValid,pS=Ve.traceIs;function jc(t,e){var r=e.slice(0,e.length-1);return e?Hv.nestedProperty(t,r).get()||{}:t}var zl=function t(e,r,a,i,n){var o=n.prefix,l=n.cLetter,s="_module"in r,f=jc(e,o),c=jc(r,o),v=jc(r._template||{},o)||{},u=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,a,i,n)};if(s){var d=a._colorAxes||{},h=i(o+"coloraxis");if(h){var p=pS(r,"contour")&&Hv.nestedProperty(r,"contours.coloring").get()||"heatmap",g=d[h];g?(g[2].push(u),g[0]!==p&&(g[0]=!1,Hv.warn(["Ignoring coloraxis:",h,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[h]=[p,r,[u]];return}}var _=f[l+"min"],b=f[l+"max"],w=Kp(_)&&Kp(b)&&_<b,m=i(o+l+"auto",!w);m?i(o+l+"mid"):(i(o+l+"min"),i(o+l+"max"));var y=f.colorscale,x=v.colorscale,T;if(y!==void 0&&(T=!Qp(y)),x!==void 0&&(T=!Qp(x)),i(o+"autocolorscale",T),i(o+"colorscale"),i(o+"reversescale"),o!=="marker.line."){var k;o&&s&&(k=dS(f));var S=i(o+"showscale",k);S&&(o&&v&&(c._template=v),hS(f,c,a))}},Jp=de.exports,mS=Mt,em=p1,yS=zl,gS=function(e,r){function a(v,u){return Jp.coerce(e,r,em,v,u)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var i=r._colorAxes,n,o;function l(v,u){return Jp.coerce(n,o,em.coloraxis,v,u)}for(var s in i){var f=i[s];if(f[0])n=e[s]||{},o=mS.newContainer(r,s,"coloraxis"),o._name=s,yS(n,o,r,l,{prefix:"",cLetter:"c"});else{for(var c=0;c<f[2].length;c++)f[2][c]();delete r._colorAxes[s]}}},bS=de.exports,xS=da.hasColorscale,_S=da.extractOpts,wS=function(e,r){function a(c,v){var u=c["_"+v];u!==void 0&&(c[v]=u)}function i(c,v){var u=v.container?bS.nestedProperty(c,v.container).get():c;if(u)if(u.coloraxis)u._colorAx=r[u.coloraxis];else{var d=_S(u),h=d.auto;(h||d.min===void 0)&&a(u,v.min),(h||d.max===void 0)&&a(u,v.max),d.autocolorscale&&a(u,"colorscale")}}for(var n=0;n<e.length;n++){var o=e[n],l=o._module.colorbar;if(l)if(Array.isArray(l))for(var s=0;s<l.length;s++)i(o,l[s]);else i(o,l);xS(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"})},tm=lt,Gc=de.exports,TS=da.extractOpts,ah=function(e,r,a){var i=e._fullLayout,n=a.vals,o=a.containerStr,l=o?Gc.nestedProperty(r,o).get():r,s=TS(l),f=s.auto!==!1,c=s.min,v=s.max,u=s.mid,d=function(){return Gc.aggNums(Math.min,null,n)},h=function(){return Gc.aggNums(Math.max,null,n)};if(c===void 0?c=d():f&&(l._colorAx&&tm(c)?c=Math.min(c,d()):c=d()),v===void 0?v=h():f&&(l._colorAx&&tm(v)?v=Math.max(v,h()):v=h()),f&&u!==void 0&&(v-u>u-c?c=u-(v-u):v-u<u-c&&(v=u+(u-c))),c===v&&(c-=.5,v+=.5),s._sync("min",c),s._sync("max",v),s.autocolorscale){var p;c*v<0?p=i.colorscale.diverging:c>=0?p=i.colorscale.sequential:p=i.colorscale.sequentialminus,s._sync("colorscale",p)}},as=fo,yn=da,Kn={moduleType:"component",name:"colorscale",attributes:ln,layoutAttributes:p1,supplyLayoutDefaults:gS,handleDefaults:zl,crossTraceDefaults:wS,calc:ah,scales:as.scales,defaultScale:as.defaultScale,getScale:as.get,isValidScale:as.isValid,hasColorscale:yn.hasColorscale,extractOpts:yn.extractOpts,extractScale:yn.extractScale,flipScale:yn.flipScale,makeColorScaleFunc:yn.makeColorScaleFunc,makeColorScaleFuncFromTrace:yn.makeColorScaleFuncFromTrace},rm=de.exports,mr={hasLines:function(t){return t.visible&&t.mode&&t.mode.indexOf("lines")!==-1},hasMarkers:function(t){return t.visible&&(t.mode&&t.mode.indexOf("markers")!==-1||t.type==="splom")},hasText:function(t){return t.visible&&t.mode&&t.mode.indexOf("text")!==-1},isBubble:function(t){return rm.isPlainObject(t.marker)&&rm.isArrayOrTypedArray(t.marker.size)}},kS=lt,M1=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 kS(s)&&s>0?Math.max(s,n):0}},Zr={};(function(t){var e=de.exports;t.getSubplot=function(l){return l.subplot||l.xaxis+l.yaxis||l.geo},t.isTraceInSubplots=function(l,s){if(l.type==="splom"){for(var f=l.xaxes||[],c=l.yaxes||[],v=0;v<f.length;v++)for(var u=0;u<c.length;u++)if(s.indexOf(f[v]+c[u])!==-1)return!0;return!1}return s.indexOf(t.getSubplot(l))!==-1},t.flat=function(l,s){for(var f=new Array(l.length),c=0;c<l.length;c++)f[c]=s;return f},t.p2c=function(l,s){for(var f=new Array(l.length),c=0;c<l.length;c++)f[c]=l[c].p2c(s);return f},t.getDistanceFunction=function(l,s,f,c){return l==="closest"?c||t.quadrature(s,f):l.charAt(0)==="x"?s:f},t.getClosest=function(l,s,f){if(f.index!==!1)f.index>=0&&f.index<l.length?f.distance=0:f.index=!1;else for(var c=0;c<l.length;c++){var v=s(l[c]);v<=f.distance&&(f.index=c,f.distance=v)}return f},t.inbox=function(l,s,f){return l*s<0||l===0?f:1/0},t.quadrature=function(l,s){return function(f){var c=l(f),v=s(f);return Math.sqrt(c*c+v*v)}},t.makeEventData=function(l,s,f){var c="index"in l?l.index:l.pointNumber,v={data:s._input,fullData:s,curveNumber:s.index,pointNumber:c};if(s._indexToPoints){var u=s._indexToPoints[c];u.length===1?v.pointIndex=u[0]:v.pointIndices=u}else v.pointIndex=c;return s._module.eventData?v=s._module.eventData(v,l,s,f,c):("xVal"in l?v.x=l.xVal:"x"in l&&(v.x=l.x),"yVal"in l?v.y=l.yVal:"y"in l&&(v.y=l.y),l.xa&&(v.xaxis=l.xa),l.ya&&(v.yaxis=l.ya),l.zLabelVal!==void 0&&(v.z=l.zLabelVal)),t.appendArrayPointValue(v,s,c),v},t.appendArrayPointValue=function(l,s,f){var c=s._arrayAttrs;if(!!c)for(var v=0;v<c.length;v++){var u=c[v],d=a(u);if(l[d]===void 0){var h=e.nestedProperty(s,u).get(),p=i(h,f);p!==void 0&&(l[d]=p)}}},t.appendArrayMultiPointValues=function(l,s,f){var c=s._arrayAttrs;if(!!c)for(var v=0;v<c.length;v++){var u=c[v],d=a(u);if(l[d]===void 0){for(var h=e.nestedProperty(s,u).get(),p=new Array(f.length),g=0;g<f.length;g++)p[g]=i(h,f[g]);l[d]=p}}};var r={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function a(l){return r[l]||l}function i(l,s){if(Array.isArray(s)){if(Array.isArray(l)&&Array.isArray(l[s[0]]))return l[s[0]][s[1]]}else return l[s]}var n={x:!0,y:!0},o={"x unified":!0,"y unified":!0};t.isUnifiedHover=function(l){return typeof l!="string"?!1:!!o[l]},t.isXYhover=function(l){return typeof l!="string"?!1:!!n[l]}})(Zr);var Uc,am;function AS(){if(am)return Uc;am=1;var t=tt.exports;return Uc={circle:{n:0,f:function(e){var r=t.round(e,2);return"M"+r+",0A"+r+","+r+" 0 1,1 0,-"+r+"A"+r+","+r+" 0 0,1 "+r+",0Z"}},square:{n:1,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"H-"+r+"V-"+r+"H"+r+"Z"}},diamond:{n:2,f:function(e){var r=t.round(e*1.3,2);return"M"+r+",0L0,"+r+"L-"+r+",0L0,-"+r+"Z"}},cross:{n:3,f:function(e){var r=t.round(e*.4,2),a=t.round(e*1.2,2);return"M"+a+","+r+"H"+r+"V"+a+"H-"+r+"V"+r+"H-"+a+"V-"+r+"H-"+r+"V-"+a+"H"+r+"V-"+r+"H"+a+"Z"}},x:{n:4,f:function(e){var r=t.round(e*.8/Math.sqrt(2),2),a="l"+r+","+r,i="l"+r+",-"+r,n="l-"+r+",-"+r,o="l-"+r+","+r;return"M0,"+r+a+i+n+i+n+o+n+o+a+o+a+"Z"}},"triangle-up":{n:5,f:function(e){var r=t.round(e*2/Math.sqrt(3),2),a=t.round(e/2,2),i=t.round(e,2);return"M-"+r+","+a+"H"+r+"L0,-"+i+"Z"}},"triangle-down":{n:6,f:function(e){var r=t.round(e*2/Math.sqrt(3),2),a=t.round(e/2,2),i=t.round(e,2);return"M-"+r+",-"+a+"H"+r+"L0,"+i+"Z"}},"triangle-left":{n:7,f:function(e){var r=t.round(e*2/Math.sqrt(3),2),a=t.round(e/2,2),i=t.round(e,2);return"M"+a+",-"+r+"V"+r+"L-"+i+",0Z"}},"triangle-right":{n:8,f:function(e){var r=t.round(e*2/Math.sqrt(3),2),a=t.round(e/2,2),i=t.round(e,2);return"M-"+a+",-"+r+"V"+r+"L"+i+",0Z"}},"triangle-ne":{n:9,f:function(e){var r=t.round(e*.6,2),a=t.round(e*1.2,2);return"M-"+a+",-"+r+"H"+r+"V"+a+"Z"}},"triangle-se":{n:10,f:function(e){var r=t.round(e*.6,2),a=t.round(e*1.2,2);return"M"+r+",-"+a+"V"+r+"H-"+a+"Z"}},"triangle-sw":{n:11,f:function(e){var r=t.round(e*.6,2),a=t.round(e*1.2,2);return"M"+a+","+r+"H-"+r+"V-"+a+"Z"}},"triangle-nw":{n:12,f:function(e){var r=t.round(e*.6,2),a=t.round(e*1.2,2);return"M-"+r+","+a+"V-"+r+"H"+a+"Z"}},pentagon:{n:13,f:function(e){var r=t.round(e*.951,2),a=t.round(e*.588,2),i=t.round(-e,2),n=t.round(e*-.309,2),o=t.round(e*.809,2);return"M"+r+","+n+"L"+a+","+o+"H-"+a+"L-"+r+","+n+"L0,"+i+"Z"}},hexagon:{n:14,f:function(e){var r=t.round(e,2),a=t.round(e/2,2),i=t.round(e*Math.sqrt(3)/2,2);return"M"+i+",-"+a+"V"+a+"L0,"+r+"L-"+i+","+a+"V-"+a+"L0,-"+r+"Z"}},hexagon2:{n:15,f:function(e){var r=t.round(e,2),a=t.round(e/2,2),i=t.round(e*Math.sqrt(3)/2,2);return"M-"+a+","+i+"H"+a+"L"+r+",0L"+a+",-"+i+"H-"+a+"L-"+r+",0Z"}},octagon:{n:16,f:function(e){var r=t.round(e*.924,2),a=t.round(e*.383,2);return"M-"+a+",-"+r+"H"+a+"L"+r+",-"+a+"V"+a+"L"+a+","+r+"H-"+a+"L-"+r+","+a+"V-"+a+"Z"}},star:{n:17,f:function(e){var r=e*1.4,a=t.round(r*.225,2),i=t.round(r*.951,2),n=t.round(r*.363,2),o=t.round(r*.588,2),l=t.round(-r,2),s=t.round(r*-.309,2),f=t.round(r*.118,2),c=t.round(r*.809,2),v=t.round(r*.382,2);return"M"+a+","+s+"H"+i+"L"+n+","+f+"L"+o+","+c+"L0,"+v+"L-"+o+","+c+"L-"+n+","+f+"L-"+i+","+s+"H-"+a+"L0,"+l+"Z"}},hexagram:{n:18,f:function(e){var r=t.round(e*.66,2),a=t.round(e*.38,2),i=t.round(e*.76,2);return"M-"+i+",0l-"+a+",-"+r+"h"+i+"l"+a+",-"+r+"l"+a+","+r+"h"+i+"l-"+a+","+r+"l"+a+","+r+"h-"+i+"l-"+a+","+r+"l-"+a+",-"+r+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(e){var r=t.round(e*Math.sqrt(3)*.8,2),a=t.round(e*.8,2),i=t.round(e*1.6,2),n=t.round(e*4,2),o="A "+n+","+n+" 0 0 1 ";return"M-"+r+","+a+o+r+","+a+o+"0,-"+i+o+"-"+r+","+a+"Z"}},"star-triangle-down":{n:20,f:function(e){var r=t.round(e*Math.sqrt(3)*.8,2),a=t.round(e*.8,2),i=t.round(e*1.6,2),n=t.round(e*4,2),o="A "+n+","+n+" 0 0 1 ";return"M"+r+",-"+a+o+"-"+r+",-"+a+o+"0,"+i+o+r+",-"+a+"Z"}},"star-square":{n:21,f:function(e){var r=t.round(e*1.1,2),a=t.round(e*2,2),i="A "+a+","+a+" 0 0 1 ";return"M-"+r+",-"+r+i+"-"+r+","+r+i+r+","+r+i+r+",-"+r+i+"-"+r+",-"+r+"Z"}},"star-diamond":{n:22,f:function(e){var r=t.round(e*1.4,2),a=t.round(e*1.9,2),i="A "+a+","+a+" 0 0 1 ";return"M-"+r+",0"+i+"0,"+r+i+r+",0"+i+"0,-"+r+i+"-"+r+",0Z"}},"diamond-tall":{n:23,f:function(e){var r=t.round(e*.7,2),a=t.round(e*1.4,2);return"M0,"+a+"L"+r+",0L0,-"+a+"L-"+r+",0Z"}},"diamond-wide":{n:24,f:function(e){var r=t.round(e*1.4,2),a=t.round(e*.7,2);return"M0,"+a+"L"+r+",0L0,-"+a+"L-"+r+",0Z"}},hourglass:{n:25,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"H-"+r+"L"+r+",-"+r+"H-"+r+"Z"},noDot:!0},bowtie:{n:26,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"V-"+r+"L-"+r+","+r+"V-"+r+"Z"},noDot:!0},"circle-cross":{n:27,f:function(e){var r=t.round(e,2);return"M0,"+r+"V-"+r+"M"+r+",0H-"+r+"M"+r+",0A"+r+","+r+" 0 1,1 0,-"+r+"A"+r+","+r+" 0 0,1 "+r+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e){var r=t.round(e,2),a=t.round(e/Math.sqrt(2),2);return"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+r+",0A"+r+","+r+" 0 1,1 0,-"+r+"A"+r+","+r+" 0 0,1 "+r+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e){var r=t.round(e,2);return"M0,"+r+"V-"+r+"M"+r+",0H-"+r+"M"+r+","+r+"H-"+r+"V-"+r+"H"+r+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+r+","+r+"H-"+r+"V-"+r+"H"+r+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e){var r=t.round(e*1.3,2);return"M"+r+",0L0,"+r+"L-"+r+",0L0,-"+r+"ZM0,-"+r+"V"+r+"M-"+r+",0H"+r},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e){var r=t.round(e*1.3,2),a=t.round(e*.65,2);return"M"+r+",0L0,"+r+"L-"+r+",0L0,-"+r+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e){var r=t.round(e*1.4,2);return"M0,"+r+"V-"+r+"M"+r+",0H-"+r},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e){var r=t.round(e*1.2,2),a=t.round(e*.85,2);return"M0,"+r+"V-"+r+"M"+r+",0H-"+r+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e){var r=t.round(e/2,2),a=t.round(e,2);return"M"+r+","+a+"V-"+a+"m-"+a+",0V"+a+"M"+a+","+r+"H-"+a+"m0,-"+a+"H"+a},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e){var r=t.round(e*1.2,2),a=t.round(e*1.6,2),i=t.round(e*.8,2);return"M-"+r+","+i+"L0,0M"+r+","+i+"L0,0M0,-"+a+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e){var r=t.round(e*1.2,2),a=t.round(e*1.6,2),i=t.round(e*.8,2);return"M-"+r+",-"+i+"L0,0M"+r+",-"+i+"L0,0M0,"+a+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e){var r=t.round(e*1.2,2),a=t.round(e*1.6,2),i=t.round(e*.8,2);return"M"+i+","+r+"L0,0M"+i+",-"+r+"L0,0M-"+a+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e){var r=t.round(e*1.2,2),a=t.round(e*1.6,2),i=t.round(e*.8,2);return"M-"+i+","+r+"L0,0M-"+i+",-"+r+"L0,0M"+a+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e){var r=t.round(e*1.4,2);return"M"+r+",0H-"+r},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e){var r=t.round(e*1.4,2);return"M0,"+r+"V-"+r},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e){var r=t.round(e,2);return"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"L-"+r+",-"+r},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e){var r=t.round(e,2),a=t.round(e*2,2);return"M0,0L-"+r+","+a+"H"+r+"Z"},noDot:!0},"arrow-down":{n:46,f:function(e){var r=t.round(e,2),a=t.round(e*2,2);return"M0,0L-"+r+",-"+a+"H"+r+"Z"},noDot:!0},"arrow-left":{n:47,f:function(e){var r=t.round(e*2,2),a=t.round(e,2);return"M0,0L"+r+",-"+a+"V"+a+"Z"},noDot:!0},"arrow-right":{n:48,f:function(e){var r=t.round(e*2,2),a=t.round(e,2);return"M0,0L-"+r+",-"+a+"V"+a+"Z"},noDot:!0},"arrow-bar-up":{n:49,f:function(e){var r=t.round(e,2),a=t.round(e*2,2);return"M-"+r+",0H"+r+"M0,0L-"+r+","+a+"H"+r+"Z"},needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e){var r=t.round(e,2),a=t.round(e*2,2);return"M-"+r+",0H"+r+"M0,0L-"+r+",-"+a+"H"+r+"Z"},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e){var r=t.round(e*2,2),a=t.round(e,2);return"M0,-"+a+"V"+a+"M0,0L"+r+",-"+a+"V"+a+"Z"},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e){var r=t.round(e*2,2),a=t.round(e,2);return"M0,-"+a+"V"+a+"M0,0L-"+r+",-"+a+"V"+a+"Z"},needLine:!0,noDot:!0}},Uc}var _t=tt.exports,Et=de.exports,MS=Et.numberFormat,ul=lt,SS=Wr.exports,tc=Ve,Mr=Je.exports,LS=Kn,vl=Et.strTranslate,ih=ir,CS=on,DS=Lr,$S=DS.LINE_SPACING,S1=Dl.DESELECTDIM,ES=mr,RS=M1,PS=Zr.appendArrayPointValue,Ie=Tt.exports={};Ie.font=function(t,e,r,a){Et.isPlainObject(e)&&(a=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),a&&t.call(Mr.fill,a)};Ie.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)};Ie.setSize=function(t,e,r){t.attr("width",e).attr("height",r)};Ie.setRect=function(t,e,r,a,i){t.call(Ie.setPosition,e,r).call(Ie.setSize,a,i)};Ie.translatePoint=function(t,e,r,a){var i=r.c2p(t.x),n=a.c2p(t.y);if(ul(i)&&ul(n)&&e.node())e.node().nodeName==="text"?e.attr("x",i).attr("y",n):e.attr("transform",vl(i,n));else return!1;return!0};Ie.translatePoints=function(t,e,r){t.each(function(a){var i=_t.select(this);Ie.translatePoint(a,i,e,r)})};Ie.hideOutsideRangePoint=function(t,e,r,a,i,n){e.attr("display",r.isPtWithinRange(t,i)&&a.isPtWithinRange(t,n)?null:"none")};Ie.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=tc.traceIs(n,"bar-like")?".bartext":".point,.textpoint";t.selectAll(s).each(function(f){Ie.hideOutsideRangePoint(f,_t.select(this),r,a,o,l)})})}};Ie.crispRound=function(t,e,r){return!e||!ul(e)?r||0:t._context.staticPlot?e:e<1?1:Math.round(e)};Ie.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||"";Mr.stroke(e,a||n.color),Ie.dashLine(e,l,o)};Ie.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||"";_t.select(this).call(Mr.stroke,r||n.color).call(Ie.dashLine,l,o)})};Ie.dashLine=function(t,e,r){r=+r||0,e=Ie.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})};Ie.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 L1(t,e,r){var a=e.fillpattern,i=a&&Ie.getPatternAttr(a.shape,0,"");if(i){var n=Ie.getPatternAttr(a.bgcolor,0,null),o=Ie.getPatternAttr(a.fgcolor,0,null),l=a.fgopacity,s=Ie.getPatternAttr(a.size,0,8),f=Ie.getPatternAttr(a.solidity,0,.3),c=e.uid;Ie.pattern(t,"point",r,c,i,s,f,void 0,a.fillmode,n,o,l)}else e.fillcolor&&t.call(Mr.fill,e.fillcolor)}Ie.singleFillStyle=function(t,e){var r=_t.select(t.node()),a=r.data(),i=((a[0]||[])[0]||{}).trace||{};L1(t,i,e)};Ie.fillGroupStyle=function(t,e){t.style("stroke-width",0).each(function(r){var a=_t.select(this);r[0].trace&&L1(a,r[0].trace,e)})};var im=AS();Ie.symbolNames=[];Ie.symbolFuncs=[];Ie.symbolNeedLines={};Ie.symbolNoDot={};Ie.symbolNoFill={};Ie.symbolList=[];Object.keys(im).forEach(function(t){var e=im[t],r=e.n;Ie.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),Ie.symbolNames[r]=t,Ie.symbolFuncs[r]=e.f,e.needLine&&(Ie.symbolNeedLines[r]=!0),e.noDot?Ie.symbolNoDot[r]=!0:Ie.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(Ie.symbolNoFill[r]=!0)});var zS=Ie.symbolNames.length,IS="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ie.symbolNumber=function(t){if(ul(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=Ie.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=zS||t>=400?0:Math.floor(Math.max(t,0))};function C1(t,e){var r=t%100;return Ie.symbolFuncs[r](e)+(t>=200?IS:"")}var nm={x1:1,x2:0,y1:0,y2:0},om={x1:0,x2:0,y1:1,y2:0},lm=MS("~f"),D1={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:nm},horizontalreversed:{node:"linearGradient",attrs:nm,reversed:!0},vertical:{node:"linearGradient",attrs:om},verticalreversed:{node:"linearGradient",attrs:om,reversed:!0}};Ie.gradient=function(t,e,r,a,i,n){for(var o=i.length,l=D1[a],s=new Array(o),f=0;f<o;f++)l.reversed?s[o-1-f]=[lm((1-i[f][0])*100),i[f][1]]:s[f]=[lm(i[f][0]*100),i[f][1]];var c=e._fullLayout,v="g"+c._uid+"-"+r,u=c._defs.select(".gradients").selectAll("#"+v).data([a+s.join(";")],Et.identity);u.exit().remove(),u.enter().append(l.node).each(function(){var d=_t.select(this);l.attrs&&d.attr(l.attrs),d.attr("id",v);var h=d.selectAll("stop").data(s);h.exit().remove(),h.enter().append("stop"),h.each(function(p){var g=SS(p[1]);_t.select(this).attr({offset:p[0]+"%","stop-color":Mr.tinyRGB(g),"stop-opacity":g.getAlpha()})})}),t.style(n,nh(v,e)).style(n+"-opacity",null),t.classed("gradient_filled",!0)};Ie.pattern=function(t,e,r,a,i,n,o,l,s,f,c,v){var u=e==="legend";l&&(s==="overlay"?(f=l,c=Mr.contrast(f)):(f=void 0,c=l));var d=r._fullLayout,h="p"+d._uid+"-"+a,p,g,_=function(S,A,$,M,C){return M+(C-M)*(S-A)/($-A)},b,w,m,y,x={};switch(i){case"/":p=n*Math.sqrt(2),g=n*Math.sqrt(2),b="M-"+p/4+","+g/4+"l"+p/2+",-"+g/2+"M0,"+g+"L"+p+",0M"+p/4*3+","+g/4*5+"l"+p/2+",-"+g/2,w=o*n,y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case"\\":p=n*Math.sqrt(2),g=n*Math.sqrt(2),b="M"+p/4*3+",-"+g/4+"l"+p/2+","+g/2+"M0,0L"+p+","+g+"M-"+p/4+","+g/4*3+"l"+p/2+","+g/2,w=o*n,y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case"x":p=n*Math.sqrt(2),g=n*Math.sqrt(2),b="M-"+p/4+","+g/4+"l"+p/2+",-"+g/2+"M0,"+g+"L"+p+",0M"+p/4*3+","+g/4*5+"l"+p/2+",-"+g/2+"M"+p/4*3+",-"+g/4+"l"+p/2+","+g/2+"M0,0L"+p+","+g+"M-"+p/4+","+g/4*3+"l"+p/2+","+g/2,w=n-n*Math.sqrt(1-o),y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case"|":p=n,g=n,y="path",b="M"+p/2+",0L"+p/2+","+g,w=o*n,y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case"-":p=n,g=n,y="path",b="M0,"+g/2+"L"+p+","+g/2,w=o*n,y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case"+":p=n,g=n,y="path",b="M"+p/2+",0L"+p/2+","+g+"M0,"+g/2+"L"+p+","+g/2,w=n-n*Math.sqrt(1-o),y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case".":p=n,g=n,o<Math.PI/4?m=Math.sqrt(o*n*n/Math.PI):m=_(o,Math.PI/4,1,n/2,n/Math.sqrt(2)),y="circle",x={cx:p/2,cy:g/2,r:m,opacity:v,fill:c};break}var T=[i||"noSh",f||"noBg",c||"noFg",n,o].join(";"),k=d._defs.select(".patterns").selectAll("#"+h).data([T],Et.identity);k.exit().remove(),k.enter().append("pattern").each(function(){var S=_t.select(this);if(S.attr({id:h,width:p+"px",height:g+"px",patternUnits:"userSpaceOnUse",patternTransform:u?"scale(0.8)":""}),f){var A=S.selectAll("rect").data([0]);A.exit().remove(),A.enter().append("rect").attr({width:p+"px",height:g+"px",fill:f})}var $=S.selectAll(y).data([0]);$.exit().remove(),$.enter().append(y).attr(x)}),t.style("fill",nh(h,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)};Ie.initGradients=function(t){var e=t._fullLayout,r=Et.ensureSingle(e._defs,"g","gradients");r.selectAll("linearGradient,radialGradient").remove(),_t.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)};Ie.initPatterns=function(t){var e=t._fullLayout,r=Et.ensureSingle(e._defs,"g","patterns");r.selectAll("pattern").remove(),_t.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)};Ie.getPatternAttr=function(t,e,r){return t&&Et.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t};Ie.pointStyle=function(t,e,r){if(!!t.size()){var a=Ie.makePointStyleFns(e);t.each(function(i){Ie.singlePointStyle(i,_t.select(this),e,a,r)})}};Ie.singlePointStyle=function(t,e,r,a,i){var n=r.marker,o=n.line;if(e.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(t):t.mo===void 0?n.opacity:t.mo),a.ms2mrc){var l;t.ms==="various"||n.size==="various"?l=3:l=a.ms2mrc(t.ms),t.mrc=l,a.selectedSizeFn&&(l=t.mrc=a.selectedSizeFn(t));var s=Ie.symbolNumber(t.mx||n.symbol)||0;t.om=s%200>=100,e.attr("d",C1(s,l))}var f=!1,c,v,u;if(t.so)u=o.outlierwidth,v=o.outliercolor,c=n.outliercolor;else{var d=(o||{}).width;u=(t.mlw+1||d+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in t?v=t.mlcc=a.lineScale(t.mlc):Et.isArrayOrTypedArray(o.color)?v=Mr.defaultLine:v=o.color,Et.isArrayOrTypedArray(n.color)&&(c=Mr.defaultLine,f=!0),"mc"in t?c=t.mcc=a.markerScale(t.mc):c=n.color||"rgba(0,0,0,0)",a.selectedColorFn&&(c=a.selectedColorFn(t))}if(t.om)e.call(Mr.stroke,c).style({"stroke-width":(u||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:u)+"px");var h=n.gradient,p=t.mgt;p?f=!0:p=h&&h.type,Et.isArrayOrTypedArray(p)&&(p=p[0],D1[p]||(p=0));var g=n.pattern,_=g&&Ie.getPatternAttr(g.shape,t.i,"");if(p&&p!=="none"){var b=t.mgc;b?f=!0:b=h.color;var w=r.uid;f&&(w+="-"+t.i),Ie.gradient(e,i,w,p,[[0,b],[1,c]],"fill")}else if(_){var m=Ie.getPatternAttr(g.bgcolor,t.i,null),y=Ie.getPatternAttr(g.fgcolor,t.i,null),x=g.fgopacity,T=Ie.getPatternAttr(g.size,t.i,8),k=Ie.getPatternAttr(g.solidity,t.i,.3),S=t.mcc||Et.isArrayOrTypedArray(g.shape)||Et.isArrayOrTypedArray(g.bgcolor)||Et.isArrayOrTypedArray(g.size)||Et.isArrayOrTypedArray(g.solidity),A=r.uid;S&&(A+="-"+t.i),Ie.pattern(e,"point",i,A,_,T,k,t.mcc,g.fillmode,m,y,x)}else Mr.fill(e,c);u&&Mr.stroke(e,v)}};Ie.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=Ie.tryColorscale(r,""),e.lineScale=Ie.tryColorscale(r,"line"),tc.traceIs(t,"symbols")&&(e.ms2mrc=ES.isBubble(t)?RS(t):function(){return(r.size||6)/2}),t.selectedpoints&&Et.extendFlat(e,Ie.makeSelectedPointStyleFns(t)),e};Ie.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},a=t.unselected||{},i=t.marker||{},n=r.marker||{},o=a.marker||{},l=i.opacity,s=n.opacity,f=o.opacity,c=s!==void 0,v=f!==void 0;(Et.isArrayOrTypedArray(l)||c||v)&&(e.selectedOpacityFn=function(m){var y=m.mo===void 0?i.opacity:m.mo;return m.selected?c?s:y:v?f:S1*y});var u=i.color,d=n.color,h=o.color;(d||h)&&(e.selectedColorFn=function(m){var y=m.mcc||u;return m.selected?d||y:h||y});var p=i.size,g=n.size,_=o.size,b=g!==void 0,w=_!==void 0;return tc.traceIs(t,"symbols")&&(b||w)&&(e.selectedSizeFn=function(m){var y=m.mrc||p/2;return m.selected?b?g/2:y:w?_/2:y}),e};Ie.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},a=t.unselected||{},i=t.textfont||{},n=r.textfont||{},o=a.textfont||{},l=i.color,s=n.color,f=o.color;return e.selectedTextColorFn=function(c){var v=c.tc||l;return c.selected?s||v:f||(s?v:Mr.addOpacity(v,S1))},e};Ie.selectedPointStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Ie.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){Mr.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",C1(Ie.symbolNumber(l),s)),o.mrc2=s}),i.length&&t.each(function(n){for(var o=_t.select(this),l=0;l<i.length;l++)i[l](o,n)})}};Ie.tryColorscale=function(t,e){var r=e?Et.nestedProperty(t,e).get():t;if(r){var a=r.color;if((r.colorscale||r._colorAx)&&Et.isArrayOrTypedArray(a))return LS.makeColorScaleFuncFromTrace(r)}return Et.identity};var Vc={start:1,end:-1,middle:0,bottom:1,top:-1};function $1(t,e,r,a,i){var n=_t.select(t.node().parentNode),o=e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle",l=e.indexOf("left")!==-1?"end":e.indexOf("right")!==-1?"start":"middle",s=a?a/.8+1:0,f=(ih.lineCount(t)-1)*$S+1,c=Vc[l]*s,v=r*.75+Vc[o]*s+(Vc[o]-1)*f*r/2;t.attr("text-anchor",l),i||n.attr("transform",vl(c,v))}function E1(t,e){var r=t.ts||e.textfont.size;return ul(r)&&r>0?r:0}Ie.textPointStyle=function(t,e,r){if(!!t.size()){var a;if(e.selectedpoints){var i=Ie.makeSelectedTextStyleFns(e);a=i.selectedTextColorFn}var n=e.texttemplate,o=r._fullLayout;t.each(function(l){var s=_t.select(this),f=n?Et.extractOption(l,e,"txt","texttemplate"):Et.extractOption(l,e,"tx","text");if(!f&&f!==0){s.remove();return}if(n){var c=e._module.formatLabels,v=c?c(l,e,o):{},u={};PS(u,e,l.i);var d=e._meta||{};f=Et.texttemplateString(f,v,o._d3locale,u,l,d)}var h=l.tp||e.textposition,p=E1(l,e),g=a?a(l):l.tc||e.textfont.color;s.call(Ie.font,l.tf||e.textfont.family,p,g).text(f).call(ih.convertToTspans,r).call($1,h,p,l.mrc)})}};Ie.selectedTextStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Ie.makeSelectedTextStyleFns(e);t.each(function(a){var i=_t.select(this),n=r.selectedTextColorFn(a),o=a.tp||e.textposition,l=E1(a,e);Mr.fill(i,n);var s=tc.traceIs(e,"bar-like");$1(i,o,l,a.mrc2||a.mrc,s)})}};var sm=.5;Ie.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(qs(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};Ie.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r="M"+t[0],a=t.length-1,i=[qs(t[a],t[0],t[1],e)],n;for(n=1;n<a;n++)i.push(qs(t[n-1],t[n],t[n+1],e));for(i.push(qs(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};function qs(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,sm/2),f=Math.pow(o*o+l*l,sm/2),c=(f*f*i-s*s*o)*a,v=(f*f*n-s*s*l)*a,u=3*f*(s+f),d=3*s*(s+f);return[[_t.round(e[0]+(u&&c/u),2),_t.round(e[1]+(u&&v/u),2)],[_t.round(e[0]-(d&&c/d),2),_t.round(e[1]-(d&&v/d),2)]]}var NS={hv:function(t,e){return"H"+_t.round(e[0],2)+"V"+_t.round(e[1],2)},vh:function(t,e){return"V"+_t.round(e[1],2)+"H"+_t.round(e[0],2)},hvh:function(t,e){return"H"+_t.round((t[0]+e[0])/2,2)+"V"+_t.round(e[1],2)+"H"+_t.round(e[0],2)},vhv:function(t,e){return"V"+_t.round((t[1]+e[1])/2,2)+"H"+_t.round(e[0],2)+"V"+_t.round(e[1],2)}},FS=function(t,e){return"L"+_t.round(e[0],2)+","+_t.round(e[1],2)};Ie.steps=function(t){var e=NS[t]||FS;return function(r){for(var a="M"+_t.round(r[0][0],2)+","+_t.round(r[0][1],2),i=1;i<r.length;i++)a+=e(r[i-1],r[i]);return a}};Ie.makeTester=function(){var t=Et.ensureSingleById(_t.select("body"),"svg","js-plotly-tester",function(r){r.attr(CS.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),e=Et.ensureSingle(t,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ie.tester=t,Ie.testref=e};Ie.savedBBoxes={};var qc=0,HS=1e4;Ie.bBox=function(t,e,r){r||(r=fm(t));var a;if(r){if(a=Ie.savedBBoxes[r],a)return Et.extendFlat({},a)}else if(t.childNodes.length===1){var i=t.childNodes[0];if(r=fm(i),r){var n=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,l=i.getAttribute("transform");if(!l){var s=Ie.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=Ie.savedBBoxes[r],a)return Et.extendFlat({},a)}}var f,c;e?f=t:(c=Ie.tester.node(),f=t.cloneNode(!0),c.appendChild(f)),_t.select(f).attr("transform",null).call(ih.positionText,0,0);var v=f.getBoundingClientRect(),u=Ie.testref.node().getBoundingClientRect();e||c.removeChild(f);var d={height:v.height,width:v.width,left:v.left-u.left,top:v.top-u.top,right:v.right-u.left,bottom:v.bottom-u.top};return qc>=HS&&(Ie.savedBBoxes={},qc=0),r&&(Ie.savedBBoxes[r]=d),qc++,Et.extendFlat({},d)};function fm(t){var e=t.getAttribute("data-unformatted");if(e!==null)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}Ie.setClipUrl=function(t,e,r){t.attr("clip-path",nh(e,r))};function nh(t,e){if(!t)return null;var r=e._context,a=r._exportedPlot?"":r._baseUrl||"";return a?"url('"+a+"#"+t+"')":"url(#"+t+")"}Ie.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}};Ie.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+=vl(e,r),o=o.trim(),t[n]("transform",o),o};Ie.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}};Ie.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 OS=/\s*sc.*/;Ie.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(OS,"");i+=a,i=i.trim(),this.setAttribute("transform",i)})}};var BS=/translate\([^)]*\)\s*$/;Ie.setTextPointsScale=function(t,e,r){!t||t.each(function(){var a,i=_t.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(BS);e===1&&r===1?a=[]:a=[vl(o,l),"scale("+e+","+r+")",vl(-o,-l)],s&&a.push(s),i.attr("transform",a.join(""))}})};var is=tt.exports,jS=lt,cm=Ut.exports,um=Ve,In=de.exports,vm=In.strTranslate,dm=Tt.exports,hm=Je.exports,Xc=ir,pm=Dl,GS=Lr.OPPOSITE_SIDE,mm=/ [XY][0-9]* /;function US(t,e,r){var a=r.propContainer,i=r.propName,n=r.placeholder,o=r.traceIndex,l=r.avoid||{},s=r.attributes,f=r.transform,c=r.containerGroup,v=t._fullLayout,u=1,d=!1,h=a.title,p=(h&&h.text?h.text:"").trim(),g=h&&h.font?h.font:{},_=g.family,b=g.size,w=g.color,m;i==="title.text"?m="titleText":i.indexOf("axis")!==-1?m="axisTitleText":i.indexOf("colorbar"!==-1)&&(m="colorbarTitleText");var y=t._context.edits[m];p===""?u=0:p.replace(mm," % ")===n.replace(mm," % ")&&(u=.2,d=!0,y||(p="")),r._meta?p=In.templateString(p,r._meta):v._meta&&(p=In.templateString(p,v._meta));var x=p||y,T;c||(c=In.ensureSingle(v._infolayer,"g","g-"+e),T=v._hColorbarMoveTitle);var k=c.selectAll("text").data(x?[0]:[]);if(k.enter().append("text"),k.text(p).attr("class",e),k.exit().remove(),!x)return c;function S(C){In.syncOrAsync([A,$],C)}function A(C){var E;return!f&&T&&(f={}),f?(E="",f.rotate&&(E+="rotate("+[f.rotate,s.x,s.y]+")"),(f.offset||T)&&(E+=vm(0,(f.offset||0)-(T||0)))):E=null,C.attr("transform",E),C.style({"font-family":_,"font-size":is.round(b,2)+"px",fill:hm.rgb(w),opacity:u*hm.opacity(w),"font-weight":cm.fontWeight}).attr(s).call(Xc.convertToTspans,t),cm.previousPromises(t)}function $(C){var E=is.select(C.node().parentNode);if(l&&l.selection&&l.side&&p){E.attr("transform",null);var I=GS[l.side],P=l.side==="left"||l.side==="top"?-1:1,R=jS(l.pad)?l.pad:2,L=dm.bBox(E.node()),D={left:0,top:0,right:v.width,bottom:v.height},z=l.maxShift||P*(D[l.side]-L[l.side]),F=0;if(z<0)F=z;else{var H=l.offsetLeft||0,U=l.offsetTop||0;L.left-=H,L.right-=H,L.top-=U,L.bottom-=U,l.selection.each(function(){var X=dm.bBox(this);In.bBoxIntersect(L,X,R)&&(F=Math.max(F,P*(X[l.side]-L[I])+R))}),F=Math.min(z,F)}if(F>0||z<0){var B={left:[-F,0],right:[F,0],top:[0,-F],bottom:[0,F]}[l.side];E.attr("transform",vm(B[0],B[1]))}}}k.call(S);function M(){u=0,d=!0,k.text(n).on("mouseover.opacity",function(){is.select(this).transition().duration(pm.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){is.select(this).transition().duration(pm.HIDE_PLACEHOLDER).style("opacity",0)})}return y&&(p?k.on(".opacity",null):M(),k.call(Xc.makeEditable,{gd:t}).on("edit",function(C){o!==void 0?um.call("_guiRestyle",t,i,C,o):um.call("_guiRelayout",t,i,C)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(S)}).on("input",function(C){this.text(C||" ").call(Xc.positionText,s.x,s.y)})),k.classed("js-placeholder",d),c}var rc={draw:US},VS=tt.exports,qS=fl.utcFormat,Dt=de.exports,XS=Dt.numberFormat,ya=lt,Qa=Dt.cleanNumber,YS=Dt.ms2DateTime,ym=Dt.dateTime2ms,ga=Dt.ensureNumber,gm=Dt.isArrayOrTypedArray,bi=Ot,ns=bi.FP_SAFE,Qr=bi.BADNUM,WS=bi.LOG_CLIP,ZS=bi.ONEWEEK,os=bi.ONEDAY,ls=bi.ONEHOUR,bm=bi.ONEMIN,xm=bi.ONESEC,ss=Vt,uf=pr,fs=uf.HOUR_PATTERN,cs=uf.WEEKDAY_PATTERN;function Do(t){return Math.pow(10,t)}function Yc(t){return t!=null}var oh=function(e,r){r=r||{};var a=e._id||"x",i=a.charAt(0);function n(m,y){if(m>0)return Math.log(m)/Math.LN10;if(m<=0&&y&&e.range&&e.range.length===2){var x=e.range[0],T=e.range[1];return .5*(x+T-2*WS*Math.abs(x-T))}else return Qr}function o(m,y,x,T){if((T||{}).msUTC&&ya(m))return+m;var k=ym(m,x||e.calendar);if(k===Qr)if(ya(m)){m=+m;var S=Math.floor(Dt.mod(m+.05,1)*10),A=Math.round(m-S/10);k=ym(new Date(A))+S/10}else return Qr;return k}function l(m,y,x){return YS(m,y,x||e.calendar)}function s(m){return e._categories[Math.round(m)]}function f(m){if(Yc(m)){if(e._categoriesMap===void 0&&(e._categoriesMap={}),e._categoriesMap[m]!==void 0)return e._categoriesMap[m];e._categories.push(typeof m=="number"?String(m):m);var y=e._categories.length-1;return e._categoriesMap[m]=y,y}return Qr}function c(m,y){for(var x=new Array(y),T=0;T<y;T++){var k=(m[0]||[])[T],S=(m[1]||[])[T];x[T]=v([k,S])}return x}function v(m){if(e._categoriesMap)return e._categoriesMap[m]}function u(m){var y=v(m);if(y!==void 0)return y;if(ya(m))return+m}function d(m){return ya(m)?+m:v(m)}function h(m,y,x){return VS.round(x+y*m,2)}function p(m,y,x){return(m-x)/y}var g=function(y){return ya(y)?h(y,e._m,e._b):Qr},_=function(m){return p(m,e._m,e._b)};if(e.rangebreaks){var b=i==="y";g=function(m){if(!ya(m))return Qr;var y=e._rangebreaks.length;if(!y)return h(m,e._m,e._b);var x=b;e.range[0]>e.range[1]&&(x=!x);for(var T=x?-1:1,k=T*m,S=0,A=0;A<y;A++){var $=T*e._rangebreaks[A].min,M=T*e._rangebreaks[A].max;if(k<$)break;if(k>M)S=A+1;else{S=k<($+M)/2?A:A+1;break}}var C=e._B[S]||0;return isFinite(C)?h(m,e._m2,C):0},_=function(m){var y=e._rangebreaks.length;if(!y)return p(m,e._m,e._b);for(var x=0,T=0;T<y&&!(m<e._rangebreaks[T].pmin);T++)m>e._rangebreaks[T].pmax&&(x=T+1);return p(m,e._m2,e._B[x])}}e.c2l=e.type==="log"?n:ga,e.l2c=e.type==="log"?Do:ga,e.l2p=g,e.p2l=_,e.c2p=e.type==="log"?function(m,y){return g(n(m,y))}:g,e.p2c=e.type==="log"?function(m){return Do(_(m))}:_,["linear","-"].indexOf(e.type)!==-1?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=Qa,e.c2d=e.c2r=e.l2d=e.l2r=ga,e.d2p=e.r2p=function(m){return e.l2p(Qa(m))},e.p2d=e.p2r=_,e.cleanPos=ga):e.type==="log"?(e.d2r=e.d2l=function(m,y){return n(Qa(m),y)},e.r2d=e.r2c=function(m){return Do(Qa(m))},e.d2c=e.r2l=Qa,e.c2d=e.l2r=ga,e.c2r=n,e.l2d=Do,e.d2p=function(m,y){return e.l2p(e.d2r(m,y))},e.p2d=function(m){return Do(_(m))},e.r2p=function(m){return e.l2p(Qa(m))},e.p2r=_,e.cleanPos=ga):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(m,y,x){return e.l2p(o(m,0,x))},e.p2d=e.p2r=function(m,y,x){return l(_(m),y,x)},e.cleanPos=function(m){return Dt.cleanDate(m,Qr,e.calendar)}):e.type==="category"?(e.d2c=e.d2l=f,e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=u,e.r2c=function(m){var y=d(m);return y!==void 0?y:e.fraction2r(.5)},e.l2r=e.c2r=ga,e.r2l=d,e.d2p=function(m){return e.l2p(e.r2c(m))},e.p2d=function(m){return s(_(m))},e.r2p=e.d2p,e.p2r=_,e.cleanPos=function(m){return typeof m=="string"&&m!==""?m:ga(m)}):e.type==="multicategory"&&(e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=u,e.r2c=function(m){var y=u(m);return y!==void 0?y:e.fraction2r(.5)},e.r2c_just_indices=v,e.l2r=e.c2r=ga,e.r2l=u,e.d2p=function(m){return e.l2p(e.r2c(m))},e.p2d=function(m){return s(_(m))},e.r2p=e.d2p,e.p2r=_,e.cleanPos=function(m){return Array.isArray(m)||typeof m=="string"&&m!==""?m:ga(m)},e.setupMultiCategory=function(m){var y=e._traceIndices,x,T,k=e._matchGroup;if(k&&e._categories.length===0){for(var S in k)if(S!==a){var A=r[ss.id2name(S)];y=y.concat(A._traceIndices)}}var $=[[0,{}],[0,{}]],M=[];for(x=0;x<y.length;x++){var C=m[y[x]];if(i in C){var E=C[i],I=C._length||Dt.minRowLength(E);if(gm(E[0])&&gm(E[1]))for(T=0;T<I;T++){var P=E[0][T],R=E[1][T];Yc(P)&&Yc(R)&&(M.push([P,R]),P in $[0][1]||($[0][1][P]=$[0][0]++),R in $[1][1]||($[1][1][R]=$[1][0]++))}}}for(M.sort(function(L,D){var z=$[0][1],F=z[L[0]]-z[D[0]];if(F)return F;var H=$[1][1];return H[L[1]]-H[D[1]]}),x=0;x<M.length;x++)f(M[x])}),e.fraction2r=function(m){var y=e.r2l(e.range[0]),x=e.r2l(e.range[1]);return e.l2r(y+m*(x-y))},e.r2fraction=function(m){var y=e.r2l(e.range[0]),x=e.r2l(e.range[1]);return(e.r2l(m)-y)/(x-y)},e.cleanRange=function(m,y){y||(y={}),m||(m="range");var x=Dt.nestedProperty(e,m).get(),T,k;if(e.type==="date"?k=Dt.dfltRange(e.calendar):i==="y"?k=uf.DFLTRANGEY:e._name==="realaxis"?k=[0,1]:k=y.dfltRange||uf.DFLTRANGEX,k=k.slice(),(e.rangemode==="tozero"||e.rangemode==="nonnegative")&&(k[0]=0),!x||x.length!==2){Dt.nestedProperty(e,m).set(k);return}for(e.type==="date"&&!e.autorange&&(x[0]=Dt.cleanDate(x[0],Qr,e.calendar),x[1]=Dt.cleanDate(x[1],Qr,e.calendar)),T=0;T<2;T++)if(e.type==="date"){if(!Dt.isDateTime(x[T],e.calendar)){e[m]=k;break}if(e.r2l(x[0])===e.r2l(x[1])){var S=Dt.constrain(e.r2l(x[0]),Dt.MIN_MS+1e3,Dt.MAX_MS-1e3);x[0]=e.l2r(S-1e3),x[1]=e.l2r(S+1e3);break}}else{if(!ya(x[T]))if(ya(x[1-T]))x[T]=x[1-T]*(T?10:.1);else{e[m]=k;break}if(x[T]<-ns?x[T]=-ns:x[T]>ns&&(x[T]=ns),x[0]===x[1]){var A=Math.max(1,Math.abs(x[0]*1e-6));x[0]-=A,x[1]+=A}}},e.setScale=function(m){var y=r._size;if(e.overlaying){var x=ss.getFromId({_fullLayout:r},e.overlaying);e.domain=x.domain}var T=m&&e._r?"_r":"range",k=e.calendar;e.cleanRange(T);var S=e.r2l(e[T][0],k),A=e.r2l(e[T][1],k),$=i==="y";if($?(e._offset=y.t+(1-e.domain[1])*y.h,e._length=y.h*(e.domain[1]-e.domain[0]),e._m=e._length/(S-A),e._b=-e._m*A):(e._offset=y.l+e.domain[0]*y.w,e._length=y.w*(e.domain[1]-e.domain[0]),e._m=e._length/(A-S),e._b=-e._m*S),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks){var M,C;if(e._rangebreaks=e.locateBreaks(Math.min(S,A),Math.max(S,A)),e._rangebreaks.length){for(M=0;M<e._rangebreaks.length;M++)C=e._rangebreaks[M],e._lBreaks+=Math.abs(C.max-C.min);var E=$;S>A&&(E=!E),E&&e._rangebreaks.reverse();var I=E?-1:1;for(e._m2=I*e._length/(Math.abs(A-S)-e._lBreaks),e._B.push(-e._m2*($?A:S)),M=0;M<e._rangebreaks.length;M++)C=e._rangebreaks[M],e._B.push(e._B[e._B.length-1]-I*e._m2*(C.max-C.min));for(M=0;M<e._rangebreaks.length;M++)C=e._rangebreaks[M],C.pmin=g(C.min),C.pmax=g(C.max)}}if(!isFinite(e._m)||!isFinite(e._b)||e._length<0)throw r._replotting=!1,new Error("Something went wrong with axis scaling")},e.maskBreaks=function(m){var y=e.rangebreaks||[],x,T,k,S,A;y._cachedPatterns||(y._cachedPatterns=y.map(function(z){return z.enabled&&z.bounds?Dt.simpleMap(z.bounds,z.pattern?Qa:e.d2c):null})),y._cachedValues||(y._cachedValues=y.map(function(z){return z.enabled&&z.values?Dt.simpleMap(z.values,e.d2c).sort(Dt.sorterAsc):null}));for(var $=0;$<y.length;$++){var M=y[$];if(M.enabled){if(M.bounds){var C=M.pattern;switch(x=y._cachedPatterns[$],T=x[0],k=x[1],C){case cs:A=new Date(m),S=A.getUTCDay(),T>k&&(k+=7,S<T&&(S+=7));break;case fs:A=new Date(m);var E=A.getUTCHours(),I=A.getUTCMinutes(),P=A.getUTCSeconds(),R=A.getUTCMilliseconds();S=E+(I/60+P/3600+R/36e5),T>k&&(k+=24,S<T&&(S+=24));break;case"":S=m;break}if(S>=T&&S<k)return Qr}else for(var L=y._cachedValues[$],D=0;D<L.length;D++)if(T=L[D],k=T+M.dvalue,m>=T&&m<k)return Qr}}return m},e.locateBreaks=function(m,y){var x,T,k,S,A=[];if(!e.rangebreaks)return A;var $=e.rangebreaks.slice().sort(function(H,U){return H.pattern===cs&&U.pattern===fs?-1:U.pattern===cs&&H.pattern===fs?1:0}),M=function(H,U){if(H=Dt.constrain(H,m,y),U=Dt.constrain(U,m,y),H!==U){for(var B=!0,X=0;X<A.length;X++){var O=A[X];H<O.max&&U>=O.min&&(H<O.min&&(O.min=H),U>O.max&&(O.max=U),B=!1)}B&&A.push({min:H,max:U})}};for(x=0;x<$.length;x++){var C=$[x];if(C.enabled)if(C.bounds){var E=m,I=y;C.pattern&&(E=Math.floor(E)),T=Dt.simpleMap(C.bounds,C.pattern?Qa:e.r2l),k=T[0],S=T[1];var P=new Date(E),R,L;switch(C.pattern){case cs:L=ZS,R=((S<k?7:0)+(S-k))*os,E+=k*os-(P.getUTCDay()*os+P.getUTCHours()*ls+P.getUTCMinutes()*bm+P.getUTCSeconds()*xm+P.getUTCMilliseconds());break;case fs:L=os,R=((S<k?24:0)+(S-k))*ls,E+=k*ls-(P.getUTCHours()*ls+P.getUTCMinutes()*bm+P.getUTCSeconds()*xm+P.getUTCMilliseconds());break;default:E=Math.min(T[0],T[1]),I=Math.max(T[0],T[1]),L=I-E,R=L}for(var D=E;D<I;D+=L)M(D,D+R)}else for(var z=Dt.simpleMap(C.values,e.d2c),F=0;F<z.length;F++)k=z[F],S=k+C.dvalue,M(k,S)}return A.sort(function(H,U){return H.min-U.min}),A},e.makeCalcdata=function(m,y,x){var T,k,S,A,$=e.type,M=$==="date"&&m[y+"calendar"];if(y in m){if(T=m[y],A=m._length||Dt.minRowLength(T),Dt.isTypedArray(T)&&($==="linear"||$==="log")){if(A===T.length)return T;if(T.subarray)return T.subarray(0,A)}if($==="multicategory")return c(T,A);for(k=new Array(A),S=0;S<A;S++)k[S]=e.d2c(T[S],0,M,x)}else{var C=y+"0"in m?e.d2c(m[y+"0"],0,M):0,E=m["d"+y]?Number(m["d"+y]):1;for(T=m[{x:"y",y:"x"}[y]],A=m._length||T.length,k=new Array(A),S=0;S<A;S++)k[S]=C+S*E}if(e.rangebreaks)for(S=0;S<A;S++)k[S]=e.maskBreaks(k[S]);return k},e.isValidRange=function(m){return Array.isArray(m)&&m.length===2&&ya(e.r2l(m[0]))&&ya(e.r2l(m[1]))},e.isPtWithinRange=function(m,y){var x=e.c2l(m[i],null,y),T=e.r2l(e.range[0]),k=e.r2l(e.range[1]);return T<k?T<=x&&x<=k:k<=x&&x<=T},e._emptyCategories=function(){e._categories=[],e._categoriesMap={}},e.clearCalc=function(){var m=e._matchGroup;if(m){var y=null,x=null;for(var T in m){var k=r[ss.id2name(T)];if(k._categories){y=k._categories,x=k._categoriesMap;break}}y&&x?(e._categories=y,e._categoriesMap=x):e._emptyCategories()}else e._emptyCategories();if(e._initialCategories)for(var S=0;S<e._initialCategories.length;S++)f(e._initialCategories[S])},e.sortByInitialCategories=function(){var m=[];if(e._emptyCategories(),e._initialCategories)for(var y=0;y<e._initialCategories.length;y++)f(e._initialCategories[y]);m=m.concat(e._traceIndices);var x=e._matchGroup;for(var T in x)if(a!==T){var k=r[ss.id2name(T)];k._categories=e._categories,k._categoriesMap=e._categoriesMap,m=m.concat(k._traceIndices)}return m};var w=r._d3locale;e.type==="date"&&(e._dateFormat=w?w.timeFormat:qS,e._extraFormat=r._extraFormat),e._separators=r.separators,e._numFormat=w?w.numberFormat:XS,delete e._minDtick,delete e._forceTick0},R1=lt,lh=de.exports,KS=Ot.BADNUM,vf=lh.isArrayOrTypedArray,QS=lh.isDateTime,JS=lh.cleanNumber,P1=Math.round,z1=function(e,r,a){var i=e,n=a.noMultiCategory;if(vf(i)&&!i.length)return"-";if(!n&&iL(i))return"multicategory";if(n&&Array.isArray(i[0])){for(var o=[],l=0;l<i.length;l++)if(vf(i[l]))for(var s=0;s<i[l].length;s++)o.push(i[l][s]);i=o}if(rL(i,r))return"date";var f=a.autotypenumbers!=="strict";return aL(i,f)?"category":tL(i,f)?"linear":"-"};function eL(t,e){return e?R1(t):typeof t=="number"}function tL(t,e){for(var r=t.length,a=0;a<r;a++)if(eL(t[a],e))return!0;return!1}function rL(t,e){for(var r=t.length,a=I1(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=P1(l),f=t[s],c=String(f);o[c]||(o[c]=1,QS(f,e)&&i++,R1(f)&&n++)}return i>n*2}function I1(t){return Math.max(1,(t-1)/1e3)}function aL(t,e){for(var r=t.length,a=I1(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=P1(l),f=t[s],c=String(f);if(!o[c]){o[c]=1;var v=typeof f;v==="boolean"?n++:(e?JS(f)!==KS:v==="number")?i++:v==="string"&&n++}}return n>i*2}function iL(t){return vf(t[0])&&vf(t[1])}var nL=tt.exports,N1=lt,qi=de.exports,Xs=Ot.FP_SAFE,oL=Ve,lL=Tt.exports,F1=Vt,sL=F1.getFromId,fL=F1.isLinked,Il={getAutoRange:Ov,makePadFn:Bv,doAutoRange:uL,findExtremes:vL,concatExtremes:sh};function Ov(t,e){var r,a,i=[],n=t._fullLayout,o=Bv(n,e,0),l=Bv(n,e,1),s=sh(t,e),f=s.min,c=s.max;if(f.length===0||c.length===0)return qi.simpleMap(e.range,e.r2l);var v=f[0].val,u=c[0].val;for(r=1;r<f.length&&v===u;r++)v=Math.min(v,f[r].val);for(r=1;r<c.length&&v===u;r++)u=Math.max(u,c[r].val);var d=!1;if(e.range){var h=qi.simpleMap(e.range,e.r2l);d=h[1]<h[0]}e.autorange==="reversed"&&(d=!0,e.autorange=!0);var p=e.rangemode,g=p==="tozero",_=p==="nonnegative",b=e._length,w=b/10,m=0,y,x,T,k,S,A;for(r=0;r<f.length;r++)for(y=f[r],a=0;a<c.length;a++)x=c[a],A=x.val-y.val-_m(e,y.val,x.val),A>0&&(S=b-o(y)-l(x),S>w?A/S>m&&(T=y,k=x,m=A/S):A/b>m&&(T={val:y.val,nopad:1},k={val:x.val,nopad:1},m=A/b));function $(P,R){return Math.max(P,l(R))}if(v===u){var M=v-1,C=v+1;if(g)if(v===0)i=[0,1];else{var E=(v>0?c:f).reduce($,0),I=v/(1-Math.min(.5,E/b));i=v>0?[0,I]:[I,0]}else _?i=[Math.max(0,M),Math.max(1,C)]:i=[M,C]}else g?(T.val>=0&&(T={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):_&&(T.val-m*o(T)<0&&(T={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),m=(k.val-T.val-_m(e,y.val,x.val))/(b-o(T)-l(k)),i=[T.val-m*o(T),k.val+m*l(k)];return d&&i.reverse(),qi.simpleMap(i,e.l2r||Number)}function _m(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 Bv(t,e,r){var a=.05*e._length,i=e._anchorAxis||{};if((e.ticklabelposition||"").indexOf("inside")!==-1||(i.ticklabelposition||"").indexOf("inside")!==-1){var n=e.autorange==="reversed";if(!n){var o=qi.simpleMap(e.range,e.r2l);n=o[1]<o[0]}n&&(r=!r)}var l=0;return fL(t,e._id)||(l=cL(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 wm=3;function cL(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=qi.deg2rad(l._tickAngles[l._id+"tick"]||0),f=Math.abs(Math.cos(s)),c=Math.abs(Math.sin(s));if(!l._vals[0].bb){var v=l._id+"tick",u=l._selections[v];u.each(function(b){var w=nL.select(this),m=w.select(".text-math-group");m.empty()&&(b.bb=lL.bBox(w.node()))})}for(var d=0;d<l._vals.length;d++){var h=l._vals[d],p=h.bb;if(p){var g=2*wm+p.width,_=2*wm+p.height;a=Math.max(a,i?Math.max(g*f,_*c):Math.max(_*f,g*c))}}}l.ticks==="inside"&&l.ticklabelposition==="inside"&&(a+=l.ticklen||0)}}}return a}function sh(t,e,r){var a=e._id,i=t._fullData,n=t._fullLayout,o=[],l=[],s,f,c;function v(g,_){for(s=0;s<_.length;s++){var b=g[_[s]],w=(b._extremes||{})[a];if(b.visible===!0&&w){for(f=0;f<w.min.length;f++)c=w.min[f],jv(o,c.val,c.pad,{extrapad:c.extrapad});for(f=0;f<w.max.length;f++)c=w.max[f],Gv(l,c.val,c.pad,{extrapad:c.extrapad})}}}if(v(i,e._traceIndices),v(n.annotations||[],e._annIndices||[]),v(n.shapes||[],e._shapeIndices||[]),e._matchGroup&&!r){for(var u in e._matchGroup)if(u!==e._id){var d=sL(t,u),h=sh(t,d,!0),p=e._length/d._length;for(f=0;f<h.min.length;f++)c=h.min[f],jv(o,c.val,c.pad*p,{extrapad:c.extrapad});for(f=0;f<h.max.length;f++)c=h.max[f],Gv(l,c.val,c.pad*p,{extrapad:c.extrapad})}}return{min:o,max:l}}function uL(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():Ov(t,e),e._r=e.range.slice(),e._rl=qi.simpleMap(e._r,e.r2l);var a=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,oL.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=Ov(t,e)),n._input.rangeslider[e._name]=qi.extendFlat({},o)}}function vL(t,e,r){r||(r={}),t._m||t.setScale();var a=[],i=[],n=e.length,o=r.padded||!1,l=r.tozero&&(t.type==="linear"||t.type==="-"),s=t.type==="log",f=!1,c=r.vpadLinearized||!1,v,u,d,h,p,g,_,b,w;function m(M){if(Array.isArray(M))return f=!0,function(E){return Math.max(Number(M[E]||0),0)};var C=Math.max(Number(M||0),0);return function(){return C}}var y=m((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),x=m((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),T=m(r.vpadplus||r.vpad),k=m(r.vpadminus||r.vpad);if(!f){if(b=1/0,w=-1/0,s)for(v=0;v<n;v++)u=e[v],u<b&&u>0&&(b=u),u>w&&u<Xs&&(w=u);else for(v=0;v<n;v++)u=e[v],u<b&&u>-Xs&&(b=u),u>w&&u<Xs&&(w=u);e=[b,w],n=2}var S={tozero:l,extrapad:o};function A(M){d=e[M],N1(d)&&(g=y(M),_=x(M),c?(h=t.c2l(d)-k(M),p=t.c2l(d)+T(M)):(b=d-k(M),w=d+T(M),s&&b<w/10&&(b=w/10),h=t.c2l(b),p=t.c2l(w)),l&&(h=Math.min(0,h),p=Math.max(0,p)),Tm(h)&&jv(a,h,_,S),Tm(p)&&Gv(i,p,g,S))}var $=Math.min(6,n);for(v=0;v<$;v++)A(v);for(v=n-1;v>=$;v--)A(v);return{min:a,max:i,opts:r}}function jv(t,e,r,a){H1(t,e,r,a,dL)}function Gv(t,e,r,a){H1(t,e,r,a,hL)}function H1(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 Tm(t){return N1(t)&&Math.abs(t)<Xs}function dL(t,e){return t<=e}function hL(t,e){return t>=e}var Aa=tt.exports,Jt=lt,qn=Ut.exports,dl=Ve,it=de.exports,Qn=it.strTranslate,Zo=ir,pL=rc,hl=Je.exports,na=Tt.exports,mL=Ua,km=ec,yr=Ot,yL=yr.ONEMAXYEAR,df=yr.ONEAVGYEAR,Uv=yr.ONEMINYEAR,gL=yr.ONEMAXQUARTER,Vv=yr.ONEAVGQUARTER,qv=yr.ONEMINQUARTER,bL=yr.ONEMAXMONTH,Jn=yr.ONEAVGMONTH,Xv=yr.ONEMINMONTH,Hi=yr.ONEWEEK,Xr=yr.ONEDAY,Xi=Xr/2,Ba=yr.ONEHOUR,hf=yr.ONEMIN,Yv=yr.ONESEC,Yi=yr.MINUS_SIGN,ac=yr.BADNUM,Wv={K:"zeroline"},Zv={K:"gridline",L:"path"},O1={K:"tick",L:"path"},Am={K:"tick",L:"text"},ic=Lr,us=ic.MID_SHIFT,Wi=ic.CAP_SHIFT,pf=ic.LINE_SPACING,xL=ic.OPPOSITE_SIDE,Kv=3,Se=Ct.exports={};Se.setConvert=oh;var _L=z1,qa=Vt,wL=qa.idSort,TL=qa.isLinked;Se.id2name=qa.id2name;Se.name2id=qa.name2id;Se.cleanId=qa.cleanId;Se.list=qa.list;Se.listIds=qa.listIds;Se.getFromId=qa.getFromId;Se.getFromTrace=qa.getFromTrace;var B1=Il;Se.getAutoRange=B1.getAutoRange;Se.findExtremes=B1.findExtremes;var kL=1e-4;function fh(t){var e=(t[1]-t[0])*kL;return[t[0]-e,t[1]+e]}Se.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)};Se.getRefType=function(t){return t===void 0?t:t==="paper"?"paper":t==="pixel"?"pixel":/( domain)$/.test(t)?"domain":"range"};Se.coercePosition=function(t,e,r,a,i,n){var o,l,s=Se.getRefType(a);if(s!=="range")o=it.ensureNumber,l=r(i,n);else{var f=Se.getFromId(e,a);n=f.fraction2r(n),l=r(i,n),o=f.cleanPos}t[i]=o(l)};Se.cleanPosition=function(t,e,r){var a=r==="paper"||r==="pixel"?it.ensureNumber:Se.getFromId(e,r).cleanPos;return a(t)};Se.redrawComponents=function(t,e){e=e||Se.listIds(t);var r=t._fullLayout;function a(i,n,o,l){for(var s=dl.getComponentMethod(i,n),f={},c=0;c<e.length;c++)for(var v=r[Se.id2name(e[c])],u=v[o],d=0;d<u.length;d++){var h=u[d];if(!f[h]&&(s(t,h),f[h]=1,l))return}}a("annotations","drawOne","_annIndices"),a("shapes","drawOne","_shapeIndices"),a("images","draw","_imgIndices",!0)};var AL=Se.getDataConversions=function(t,e,r,a){var i,n=r==="x"||r==="y"||r==="z"?r:a;if(Array.isArray(n)){if(i={type:_L(a,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},Se.setConvert(i),i.type==="category")for(var o=0;o<a.length;o++)i.d2c(a[o])}else i=Se.getFromTrace(t,e,n);return i?{d2c:i.d2c,c2d:i.c2d}:n==="ids"?{d2c:Sm,c2d:Sm}:{d2c:Mm,c2d:Mm}};function Mm(t){return+t}function Sm(t){return String(t)}Se.getDataToCoordFunc=function(t,e,r,a){return AL(t,e,r,a).d2c};Se.counterLetter=function(t){var e=t.charAt(0);if(e==="x")return"y";if(e==="y")return"x"};Se.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))};Se.saveRangeInitial=function(t,e){for(var r=Se.list(t,"",!0),a=!1,i=0;i<r.length;i++){var n=r[i],o=n._rangeInitial===void 0,l=o||!(n.range[0]===n._rangeInitial[0]&&n.range[1]===n._rangeInitial[1]);(o&&n.autorange===!1||e&&l)&&(n._rangeInitial=n.range.slice(),a=!0)}return a};Se.saveShowSpikeInitial=function(t,e){for(var r=Se.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};Se.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},Se.setConvert(s),n=n&&km.dtick(n,s.type),n)s.dtick=n,s.tick0=km.tick0(void 0,s.type,i);else{var f;if(r)f=(l-o)/r;else{var c=it.distinctVals(t),v=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),u=v*it.roundUp(c.minDiff/v,[.9,1.9,4.9,9.9],!0);f=Math.max(u,2*it.stdev(t)/Math.pow(t.length,a?.25:.4)),Jt(f)||(f=1)}Se.autoTicks(s,f)}var d=s.dtick,h=Se.tickIncrement(Se.tickFirst(s),d,"reverse",i),p,g;if(typeof d=="number")h=ML(h,t,s,o,l),g=1+Math.floor((l-h)/d),p=h+g*d;else for(s.dtick.charAt(0)==="M"&&(h=SL(h,t,d,o,i)),p=h,g=0;p<=l;)p=Se.tickIncrement(p,d,!1,i),g++;return{start:e.c2r(h,0,i),end:e.c2r(p,0,i),size:d,_dataSpan:l-o}};function ML(t,e,r,a,i){var n=0,o=0,l=0,s=0;function f(d){return(1+(d-t)*100/r.dtick)%100<2}for(var c=0;c<e.length;c++)e[c]%1===0?l++:Jt(e[c])||s++,f(e[c])&&n++,f(e[c]+r.dtick/2)&&o++;var v=e.length-s;if(l===v&&r.type!=="date")r.dtick<1?t=a-.5*r.dtick:(t-=.5,t+r.dtick<a&&(t+=r.dtick));else if(o<v*.1&&(n>v*.3||f(a)||f(i))){var u=r.dtick/2;t+=t+u<a?u:-u}return t}function SL(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=Se.tickIncrement(t,"M6","reverse")+Xr*1.5:n.exactMonths>o?t=Se.tickIncrement(t,"M1","reverse")+Xr*15.5:t-=Xi;var s=Se.tickIncrement(t,r);if(s<=a)return s}return t}Se.prepTicks=function(t,e){var r=it.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t._dtickInit=t.dtick,t._tick0Init=t.tick0,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.tickmode==="array"&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,Se.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"&&LL(t),t.tick0||(t.tick0=t.type==="date"?"2000-01-01":0),t.type==="date"&&t.dtick<.1&&(t.dtick=.1),U1(t)};function Wc(t){return+t.substring(1)}function LL(t){var e;function r(){return!(Jt(t.dtick)||t.dtick.charAt(0)!=="M")}var a=r(),i=Se.getTickFormat(t);if(i){var n=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(e=Ba,n&&!a&&t.dtick<Ba&&(t.dtick=Ba)):/%p/.test(i)?(e=Xi,n&&!a&&t.dtick<Xi&&(t.dtick=Xi)):/%[Aadejuwx]/.test(i)?(e=Xr,n&&!a&&t.dtick<Xr&&(t.dtick=Xr)):/%[UVW]/.test(i)?(e=Hi,n&&!a&&t.dtick<Hi&&(t.dtick=Hi)):/%[Bbm]/.test(i)?(e=Jn,n&&(a?Wc(t.dtick)<1:t.dtick<Xv)&&(t.dtick="M1")):/%[q]/.test(i)?(e=Vv,n&&(a?Wc(t.dtick)<3:t.dtick<qv)&&(t.dtick="M3")):/%[Yy]/.test(i)&&(e=df,n&&(a?Wc(t.dtick)<12:t.dtick<Uv)&&(t.dtick="M12")))}a=r(),a&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}function CL(t,e,r){for(var a=0;a<t.length;a++){var i=t[a].value,n=a,o=a+1;a<t.length-1?(n=a,o=a+1):a>0?(n=a-1,o=a):(n=a,o=a);var l=t[n].value,s=t[o].value,f=Math.abs(s-l),c=r||f,v=0;c>=Uv?f>=Uv&&f<=yL?v=f:v=df:r===Vv&&c>=qv?f>=qv&&f<=gL?v=f:v=Vv:c>=Xv?f>=Xv&&f<=bL?v=f:v=Jn:r===Hi&&c>=Hi?v=Hi:c>=Xr?v=Xr:r===Xi&&c>=Xi?v=Xi:r===Ba&&c>=Ba&&(v=Ba);var u;v>=f&&(v=f,u=!0);var d=i+v;if(e.rangebreaks&&v>0){for(var h=84,p=0,g=0;g<h;g++){var _=(g+.5)/h;e.maskBreaks(i*(1-_)+_*d)!==ac&&p++}v*=p/h,v||(t[a].drop=!0),u&&f>Hi&&(v=f)}(v>0||a===0)&&(t[a].periodX=i+v/2)}}Se.calcTicks=function(e,r){Se.prepTicks(e,r);var a=it.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="array")return DL(e);var i=fh(a),n=i[0],o=i[1],l=a[1]<a[0],s=Math.min(a[0],a[1]),f=Math.max(a[0],a[1]),c=Jt(e.dtick),v=e.type==="log"&&!(c||e.dtick.charAt(0)==="L"),u=e.ticklabelmode==="period";if(e._tmin=Se.tickFirst(e,r),e._tmin<n!==l)return[];(e.type==="category"||e.type==="multicategory")&&(o=l?Math.max(-.5,o):Math.min(e._categories.length-.5,o));var d=e._tmin;e.rangebreaks&&e._tick0Init!==e.tick0&&(d=Zc(d,e),l||(d=Se.tickIncrement(d,e.dtick,!l,e.calendar))),u&&(d=Se.tickIncrement(d,e.dtick,!l,e.calendar));var h=e.ticklabelstep,p=Math.max(1e3,e._length||0),g=[],_=null,b;c?b=e.dtick:e.type==="date"?typeof e.dtick=="string"&&e.dtick.charAt(0)==="M"&&(b=Jn*e.dtick.substring(1)):b=e._roughDTick;for(var w=Math.round((e.r2l(d)-e.r2l(e.tick0))/b)-1;l?d>=o:d<=o;d=Se.tickIncrement(d,e.dtick,l,e.calendar)){if(w++,e.rangebreaks&&!l){if(d<n)continue;if(e.maskBreaks(d)===ac&&Zc(d,e)>=f)break}if(g.length>p||d===_)break;_=d;var m=!1;v&&d!==(d|0)&&(m=!0);var y={minor:m,value:d};h>1&&w%h&&(y.skipLabel=!0),g.push(y)}u&&CL(g,e,e._definedDelta);var x;if(e.rangebreaks){var T=e._id.charAt(0)==="y",k=1;e.tickmode==="auto"&&(k=e.tickfont?e.tickfont.size:12);var S=NaN;for(x=g.length-1;x>-1;x--){if(g[x].drop){g.splice(x,1);continue}g[x].value=Zc(g[x].value,e);var A=e.c2p(g[x].value);(T?S>A-k:S<A+k)?g.splice(l?x+1:x,1):S=A}}dh(e)&&Math.abs(a[1]-a[0])===360&&g.pop(),e._tmax=(g[g.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var $,M=function(L){L.text=" ",e._prevDateHead=$},C=[],E,I;for(x=0;x<g.length;x++){var P=g[x].minor,R=g[x].value;$=e._prevDateHead,E=Se.tickText(e,R,!1,P),I=g[x].periodX,I!==void 0&&(E.periodX=I,(I>f||I<s)&&(I>f&&(E.periodX=f),I<s&&(E.periodX=s),M(E))),g[x].skipLabel&&M(E),C.push(E)}return e._inCalcTicks=!1,C};function DL(t){var e=t.tickvals,r=t.ticktext,a=new Array(e.length),i=it.simpleMap(t.range,t.r2l),n=fh(i),o=Math.min(n[0],n[1]),l=Math.max(n[0],n[1]),s=0;Array.isArray(r)||(r=[]);var f=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 c=0;c<e.length;c++){var v=f(e[c]);v>o&&v<l&&(r[c]===void 0?a[s]=Se.tickText(t,v):a[s]=ch(t,v,String(r[c])),s++)}return s<e.length&&a.splice(s,e.length-s),t.rangebreaks&&(a=a.filter(function(u){return t.maskBreaks(u.x)!==ac})),a}var vs=[2,5,10],Lm=[1,2,3,6,12],Cm=[1,2,5,10,15,30],$L=[1,2,3,7,14],j1=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],G1=[-.301,0,.301,.699,1],EL=[15,30,45,90,180];function ba(t,e,r){return e*it.roundUp(t/e,r)}Se.autoTicks=function(t,e){var r;function a(c){return Math.pow(c,Math.floor(Math.log(e)/Math.LN10))}if(t.type==="date"){t.tick0=it.dateTick0(t.calendar,0);var i=2*e;if(i>df)e/=df,r=a(10),t.dtick="M"+12*ba(e,r,vs);else if(i>Jn)e/=Jn,t.dtick="M"+ba(e,1,Lm);else if(i>Xr){t.dtick=ba(e,Xr,t._hasDayOfWeekBreaks?[1,2,7,14]:$L);var n=Se.getTickFormat(t),o=t.ticklabelmode==="period";o&&(t._rawTick0=t.tick0),/%[uVW]/.test(n)?t.tick0=it.dateTick0(t.calendar,2):t.tick0=it.dateTick0(t.calendar,1),o&&(t._dowTick0=t.tick0)}else i>Ba?t.dtick=ba(e,Ba,Lm):i>hf?t.dtick=ba(e,hf,Cm):i>Yv?t.dtick=ba(e,Yv,Cm):(r=a(10),t.dtick=ba(e,r,vs))}else if(t.type==="log"){t.tick0=0;var l=it.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(l[1]-l[0])<1){var s=1.5*Math.abs((l[1]-l[0])/e);e=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/s,r=a(10),t.dtick="L"+ba(e,r,vs)}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))):dh(t)?(t.tick0=0,r=1,t.dtick=ba(e,r,EL)):(t.tick0=0,r=a(10),t.dtick=ba(e,r,vs));if(t.dtick===0&&(t.dtick=1),!Jt(t.dtick)&&typeof t.dtick!="string"){var f=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(f)}};function U1(t){var e=t.dtick;if(t._tickexponent=0,!Jt(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>=Xr&&i<=10||e>=Xr*15)t._tickround="d";else if(e>=hf&&i<=16||e>=Ba)t._tickround="M";else if(e>=Yv&&i<=19||e>=hf)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(Jt(e)||e.charAt(0)==="L"){var o=t.range.map(t.r2d||Number);Jt(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&&(mf(t.exponentformat)&&!uh(s)?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}Se.tickIncrement=function(t,e,r,a){var i=r?-1:1;if(Jt(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"?G1:j1,s=t+i*.01,f=it.roundUp(it.mod(s,1),l,r);return Math.floor(s)+Math.log(Aa.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)};Se.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=fh(a)[0],l=t.dtick,s=r(t.tick0);if(Jt(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),v=Number(l.substr(1));if(c==="M"){for(var u=0,d=s,h,p,g;u<10;){if(h=Se.tickIncrement(d,l,i,t.calendar),(h-o)*(d-o)<=0)return i?Math.min(d,h):Math.max(d,h);p=(o-(d+h)/2)/(h-d),g=c+(Math.abs(Math.round(p))||1)*v,d=Se.tickIncrement(d,g,p<0?!i:i,t.calendar),u++}return it.error("tickFirst did not converge",t),d}else{if(c==="L")return Math.log(n((Math.pow(10,o)-s)/v)*v+s)/Math.LN10;if(c==="D"){var _=l==="D2"?G1:j1,b=it.roundUp(it.mod(o,1),_,i);return Math.floor(o)+Math.log(Aa.round(Math.pow(10,b),1))/Math.LN10}else throw"unrecognized dtick "+String(l)}};Se.tickText=function(t,e,r,a){var i=ch(t,e),n=t.tickmode==="array",o=r||n,l=t.type,s=l==="category"?t.d2l_noadd:t.d2l,f;if(n&&Array.isArray(t.ticktext)){var c=it.simpleMap(t.range,t.r2l),v=(Math.abs(c[1]-c[0])-(t._lBreaks||0))/1e4;for(f=0;f<t.ticktext.length&&!(Math.abs(e-s(t.tickvals[f]))<v);f++);if(f<t.ticktext.length)return i.text=String(t.ticktext[f]),i}function u(p){if(p===void 0)return!0;if(r)return p==="none";var g={first:t._tmin,last:t._tmax}[p];return p!=="all"&&e!==g}var d=r?"never":t.exponentformat!=="none"&&u(t.showexponent)?"hide":"";if(l==="date"?RL(t,i,r,o):l==="log"?PL(t,i,r,o,d):l==="category"?zL(t,i):l==="multicategory"?IL(t,i,r):dh(t)?FL(t,i,r,o,d):NL(t,i,r,o,d),a||(t.tickprefix&&!u(t.showtickprefix)&&(i.text=t.tickprefix+i.text),t.ticksuffix&&!u(t.showticksuffix)&&(i.text+=t.ticksuffix)),t.tickson==="boundaries"||t.showdividers){var h=function(p){var g=t.l2p(p);return g>=0&&g<=t._length?p:null};i.xbnd=[h(i.x-.5),h(i.x+t.dtick-.5)]}return i};Se.hoverLabelText=function(t,e,r){r&&(t=it.extendFlat({},t,{hoverformat:r}));var a=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(i!==void 0&&i!==a)return Se.hoverLabelText(t,a,r)+" - "+Se.hoverLabelText(t,i,r);var n=t.type==="log"&&a<=0,o=Se.tickText(t,t.c2l(n?-a:a),"hover").text;return n?a===0?"0":Yi+o:o};function ch(t,e,r){var a=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:a.size,font:a.family,fontColor:a.color}}function RL(t,e,r,a){var i=t._tickround,n=r&&t.hoverformat||Se.getTickFormat(t);a&&(Jt(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
4
|
`);if(s!==-1&&(l=o.substr(s+1),o=o.substr(0,s)),a&&(o==="00:00:00"||o==="00:00"?(o=l,l=""):o.length===8&&(o=o.replace(/:00$/,""))),l)if(r)i==="d"?o+=", "+l:o=l+(o?", "+o:"");else if(!t._inCalcTicks||t._prevDateHead!==l)t._prevDateHead=l,o+="<br>"+l;else{var f=ml(t),c=t._trueSide||t.side;(!f&&c==="top"||f&&c==="bottom")&&(o+="<br> ")}e.text=o}function PL(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=pl(Math.pow(10,o),t,i,a);else if(Jt(n)||s==="D"&&it.mod(o+.01,1)<.1){var f=Math.round(o),c=Math.abs(f),v=t.exponentformat;v==="power"||mf(v)&&uh(f)?(f===0?e.text=1:f===1?e.text="10":e.text="10<sup>"+(f>1?"":Yi)+c+"</sup>",e.fontSize*=1.25):(v==="e"||v==="E")&&c>2?e.text="1"+v+(f>0?"+":Yi)+c:(e.text=pl(Math.pow(10,o),t,"","fakehover"),n==="D1"&&t._id.charAt(0)==="y"&&(e.dy-=e.fontSize/6))}else if(s==="D")e.text=String(Math.round(Math.pow(10,it.mod(o,1)))),e.fontSize*=.75;else throw"unrecognized dtick "+String(n);if(t.dtick==="D1"){var u=String(e.text).charAt(0);(u==="0"||u==="1")&&(t._id.charAt(0)==="y"?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(o<0?.5:.25)))}}function zL(t,e){var r=t._categories[Math.round(e.x)];r===void 0&&(r=""),e.text=String(r)}function IL(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 NL(t,e,r,a,i){i==="never"?i="":t.showexponent==="all"&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=pl(e.x,t,i,a)}function FL(t,e,r,a,i){if(t.thetaunit==="radians"&&!r){var n=e.x/180;if(n===0)e.text="0";else{var o=HL(n);if(o[1]>=100)e.text=pl(it.deg2rad(e.x),t,i,a);else{var l=e.x<0;o[1]===1?o[0]===1?e.text="\u03C0":e.text=o[0]+"\u03C0":e.text=["<sup>",o[0],"</sup>","\u2044","<sub>",o[1],"</sub>","\u03C0"].join(""),l&&(e.text=Yi+e.text)}}}else e.text=pl(e.x,t,i,a)}function HL(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 OL=["f","p","n","\u03BC","m","","k","M","G","T"];function mf(t){return t==="SI"||t==="B"}function uh(t){return t>14||t<-15}function pl(t,e,r,a){var i=t<0,n=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,s=Se.getTickFormat(e),f=e.separatethousands;if(a){var c={exponentformat:o,minexponent:e.minexponent,dtick:e.showexponent==="none"?e.dtick:Jt(t)&&Math.abs(t)||1,range:e.showexponent==="none"?e.range.map(e.r2d):[0,t||1]};U1(c),n=(Number(c._tickround)||0)+4,l=c._tickexponent,e.hoverformat&&(s=e.hoverformat)}if(s)return e._numFormat(s)(t).replace(/-/g,Yi);var v=Math.pow(10,-n)/2;if(o==="none"&&(l=0),t=Math.abs(t),t<v)t="0",i=!1;else{if(t+=v,l&&(t*=Math.pow(10,-l),n+=l),n===0)t=String(Math.floor(t));else if(n<0){t=String(Math.round(t)),t=t.substr(0,t.length+n);for(var u=n;u<0;u++)t+="0"}else{t=String(t);var d=t.indexOf(".")+1;d&&(t=t.substr(0,d+n).replace(/\.?0+$/,""))}t=it.numSeparate(t,e._separators,f)}if(l&&o!=="hide"){mf(o)&&uh(l)&&(o="power");var h;l<0?h=Yi+-l:o!=="power"?h="+"+l:h=String(l),o==="e"||o==="E"?t+=o+h:o==="power"?t+="\xD710<sup>"+h+"</sup>":o==="B"&&l===9?t+="B":mf(o)&&(t+=OL[l/3+5])}return i?Yi+t:t}Se.getTickFormat=function(t){var e;function r(s){return typeof s!="string"?s:Number(s.replace("M",""))*Jn}function a(s,f){var c=["L","D"];if(typeof s==typeof f){if(typeof s=="number")return s-f;var v=c.indexOf(s.charAt(0)),u=c.indexOf(f.charAt(0));return v===u?Number(s.replace(/(L|D)/g,""))-Number(f.replace(/(L|D)/g,"")):v-u}else return typeof s=="number"?1:-1}function i(s,f,c){var v=c||function(h){return h},u=f[0],d=f[1];return(!u&&typeof u!="number"||v(u)<=v(s))&&(!d&&typeof d!="number"||v(d)>=v(s))}function n(s,f){var c=f[0]===null,v=f[1]===null,u=a(s,f[0])>=0,d=a(s,f[1])<=0;return(c||u)&&(v||d)}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};Se.getSubplots=function(t,e){var r=t._fullLayout._subplots,a=r.cartesian.concat(r.gl2d||[]),i=e?Se.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};Se.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};Se.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=Se.list(t,"x",!0),n=Se.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){Aa.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})})}};Se.draw=function(t,e,r){var a=t._fullLayout;e==="redraw"&&a._paper.selectAll("g.subplot").each(function(n){var o=n[0],l=a._plots[o];if(l){var s=l.xaxis,f=l.yaxis;l.xaxislayer.selectAll("."+s._id+"tick").remove(),l.yaxislayer.selectAll("."+f._id+"tick").remove(),l.xaxislayer.selectAll("."+s._id+"tick2").remove(),l.yaxislayer.selectAll("."+f._id+"tick2").remove(),l.xaxislayer.selectAll("."+s._id+"divider").remove(),l.yaxislayer.selectAll("."+f._id+"divider").remove(),l.gridlayer&&l.gridlayer.selectAll("path").remove(),l.zerolinelayer&&l.zerolinelayer.selectAll("path").remove(),a._infolayer.select(".g-"+s._id+"title").remove(),a._infolayer.select(".g-"+f._id+"title").remove()}});var i=!e||e==="redraw"?Se.listIds(t):e;return it.syncOrAsync(i.map(function(n){return function(){if(!!n){var o=Se.getFromId(t,n),l=Se.drawOne(t,o,r);return o._r=o.range.slice(),o._rl=it.simpleMap(o._r,o.r2l),l}}}))};Se.drawOne=function(t,e,r){r=r||{};var a,i,n;e.setScale();var o=t._fullLayout,l=e._id,s=l.charAt(0),f=Se.counterLetter(l),c=o._plots[e._mainSubplot];if(!c)return;var v=c[s+"axislayer"],u=e._mainLinePosition,d=e._mainMirrorPosition,h=e._vals=Se.calcTicks(e),p=[e.mirror,u,d].join("_");for(a=0;a<h.length;a++)h[a].axInfo=p;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var g={};function _(W){var K=l+(W||"tick");return g[K]||(g[K]=UL(e,K)),g[K]}if(!!e.visible){var b=Se.makeTransTickFn(e),w=Se.makeTransTickLabelFn(e),m,y,x=e.ticks==="inside",T=e.ticks==="outside";if(e.tickson==="boundaries"){var k=BL(e,h);y=Se.clipEnds(e,k),m=x?y:k}else y=Se.clipEnds(e,h),m=x&&e.ticklabelmode!=="period"?y:h;var S=e._gridVals=y,A=GL(e,h);if(!o._hasOnlyLargeSploms){var $=e._subplotsWith,M={};for(a=0;a<$.length;a++){i=$[a],n=o._plots[i];var C=n[f+"axis"],E=C._mainAxis._id;if(!M[E]){M[E]=1;var I=s==="x"?"M0,"+C._offset+"v"+C._length:"M"+C._offset+",0h"+C._length;Se.drawGrid(t,e,{vals:S,counterAxis:C,layer:n.gridlayer.select("."+l),path:I,transFn:b}),Se.drawZeroLine(t,e,{counterAxis:C,layer:n.zerolinelayer,path:I,transFn:b})}}}var P=Se.getTickSigns(e),R=[];if(e.ticks){var L=Se.makeTickPath(e,u,P[2]),D,z;e._anchorAxis&&e.mirror&&e.mirror!==!0?(D=Se.makeTickPath(e,d,P[3]),z=L+D):(D="",z=L);var F;if(e.showdividers&&T&&e.tickson==="boundaries"){var H={};for(a=0;a<A.length;a++)H[A[a].x]=1;F=function(W){return H[W.x]?D:z}}else F=z;Se.drawTicks(t,e,{vals:m,layer:v,path:F,transFn:b}),e.mirror==="allticks"&&(R=Object.keys(e._linepositions||{}))}for(a=0;a<R.length;a++){i=R[a],n=o._plots[i];var U=e._linepositions[i]||[],B=Se.makeTickPath(e,U[0],P[0])+Se.makeTickPath(e,U[1],P[1]);Se.drawTicks(t,e,{vals:m,layer:n[s+"axislayer"],path:B,transFn:b})}var X=[];if(X.push(function(){return Se.drawLabels(t,e,{vals:h,layer:v,plotinfo:n,transFn:w,labelFns:Se.makeLabelFns(e,u)})}),e.type==="multicategory"){var O={x:2,y:10}[s];X.push(function(){var W={x:"height",y:"width"}[s],K=_()[W]+O+(e._tickAngles[l+"tick"]?e.tickfont.size*pf:0);return Se.drawLabels(t,e,{vals:jL(e,h),layer:v,cls:l+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:b,labelFns:Se.makeLabelFns(e,u+K*P[4])})}),X.push(function(){return e._depth=P[4]*(_("tick2")[e.side]-u),qL(t,e,{vals:A,layer:v,path:Se.makeTickPath(e,u,P[4],e._depth),transFn:b})})}else e.title.hasOwnProperty("standoff")&&X.push(function(){e._depth=P[4]*(_()[e.side]-u)});var Y=dl.getComponentMethod("rangeslider","isVisible")(e);return X.push(function(){var W=e.side.charAt(0),K=xL[e.side].charAt(0),Z=Se.getPxPosition(t,e),ae=T?e.ticklen:0,ne,oe,re,se;if((e.automargin||Y)&&(e.type==="multicategory"?ne=_("tick2"):(ne=_(),s==="x"&&W==="b"&&(e._depth=Math.max(ne.width>0?ne.bottom-Z:0,ae)))),e.automargin){oe={x:0,y:0,r:0,l:0,t:0,b:0};var me=[0,1];if(s==="x"){if(W==="b"?oe[W]=e._depth:(oe[W]=e._depth=Math.max(ne.width>0?Z-ne.top:0,ae),me.reverse()),ne.width>0){var Re=ne.right-(e._offset+e._length);Re>0&&(oe.xr=1,oe.r=Re);var ke=e._offset-ne.left;ke>0&&(oe.xl=0,oe.l=ke)}}else if(W==="l"?oe[W]=e._depth=Math.max(ne.height>0?Z-ne.left:0,ae):(oe[W]=e._depth=Math.max(ne.height>0?ne.right-Z:0,ae),me.reverse()),ne.height>0){var ze=ne.bottom-(e._offset+e._length);ze>0&&(oe.yb=0,oe.b=ze);var he=e._offset-ne.top;he>0&&(oe.yt=1,oe.t=he)}oe[f]=e.anchor==="free"?e.position:e._anchorAxis.domain[me[0]],e.title.text!==o._dfltTitle[s]&&(oe[W]+=V1(e)+(e.title.standoff||0)),e.mirror&&e.anchor!=="free"&&(re={x:0,y:0,r:0,l:0,t:0,b:0},re[K]=e.linewidth,e.mirror&&e.mirror!==!0&&(re[K]+=ae),e.mirror===!0||e.mirror==="ticks"?re[f]=e._anchorAxis.domain[me[1]]:(e.mirror==="all"||e.mirror==="allticks")&&(re[f]=[e._counterDomainMin,e._counterDomainMax][me[1]]))}Y&&(se=dl.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),qn.autoMargin(t,vh(e),oe),qn.autoMargin(t,X1(e),re),qn.autoMargin(t,Y1(e),se)}),!r.skipTitle&&!(Y&&e.side==="bottom")&&X.push(function(){return XL(t,e)}),it.syncOrAsync(X)}};function BL(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 jL(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(ch(t,it.interp(a[o],.5),o));return r}function GL(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 UL(t,e){var r,a,i,n;return t._selections[e].size()?(r=1/0,a=-1/0,i=1/0,n=-1/0,t._selections[e].each(function(){var o=Jv(this),l=na.bBox(o.node().parentNode);r=Math.min(r,l.top),a=Math.max(a,l.bottom),i=Math.min(i,l.left),n=Math.max(n,l.right)})):(r=0,a=0,i=0,n=0),{top:r,bottom:a,left:i,right:n,height:a-r,width:n-i}}Se.getTickSigns=function(t){var e=t._id.charAt(0),r={x:"top",y:"right"}[e],a=t.side===r?1:-1,i=[-1,1,a,-a];return t.ticks!=="inside"==(e==="x")&&(i=i.map(function(n){return-n})),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i};Se.makeTransTickFn=function(t){return t._id.charAt(0)==="x"?function(e){return Qn(t._offset+t.l2p(e.x),0)}:function(e){return Qn(0,t._offset+t.l2p(e.x))}};Se.makeTransTickLabelFn=function(t){var e=VL(t),r=e[0],a=e[1];return t._id.charAt(0)==="x"?function(i){return Qn(r+t._offset+t.l2p(Qv(i)),a)}:function(i){return Qn(a,r+t._offset+t.l2p(Qv(i)))}};function Qv(t){return t.periodX!==void 0?t.periodX:t.x}function VL(t){var e=t.ticklabelposition||"",r=function(d){return e.indexOf(d)!==-1},a=r("top"),i=r("left"),n=r("right"),o=r("bottom"),l=r("inside"),s=o||i||a||n;if(!s&&!l)return[0,0];var f=t.side,c=s?(t.tickwidth||0)/2:0,v=Kv,u=t.tickfont?t.tickfont.size:12;return(o||a)&&(c+=u*Wi,v+=(t.linewidth||0)/2),(i||n)&&(c+=(t.linewidth||0)/2,v+=Kv),l&&f==="top"&&(v-=u*(1-Wi)),(i||a)&&(c=-c),(f==="bottom"||f==="right")&&(v=-v),[s?c:0,l?v:0]}Se.makeTickPath=function(t,e,r,a){a=a!==void 0?a:t.ticklen;var i=t._id.charAt(0),n=(t.linewidth||1)/2;return i==="x"?"M0,"+(e+n*r)+"v"+a*r:"M"+(e+n*r)+",0h"+a*r};Se.makeLabelFns=function(t,e,r){var a=t.ticklabelposition||"",i=function(M){return a.indexOf(M)!==-1},n=i("top"),o=i("left"),l=i("right"),s=i("bottom"),f=s||o||n||l,c=i("inside"),v=a==="inside"&&t.ticks==="inside"||!c&&t.ticks==="outside"&&t.tickson!=="boundaries",u=0,d=0,h=v?t.ticklen:0;if(c?h*=-1:f&&(h=0),v&&(u+=h,r)){var p=it.deg2rad(r);u=h*Math.cos(p)+1,d=h*Math.sin(p)}t.showticklabels&&(v||t.showline)&&(u+=.2*t.tickfont.size),u+=(t.linewidth||1)/2*(c?-1:1);var g={labelStandoff:u,labelShift:d},_,b,w,m,y=0,x=t.side,T=t._id.charAt(0),k=t.tickangle,S;if(T==="x")S=!c&&x==="bottom"||c&&x==="top",m=S?1:-1,c&&(m*=-1),_=d*m,b=e+u*m,w=S?1:-.2,Math.abs(k)===90&&(c?w+=us:k===-90&&x==="bottom"?w=Wi:k===90&&x==="top"?w=us:w=.5,y=us/2*(k/90)),g.xFn=function(M){return M.dx+_+y*M.fontSize},g.yFn=function(M){return M.dy+b+M.fontSize*w},g.anchorFn=function(M,C){if(f){if(o)return"end";if(l)return"start"}return!Jt(C)||C===0||C===180?"middle":C*m<0!==c?"end":"start"},g.heightFn=function(M,C,E){return C<-60||C>60?-.5*E:t.side==="top"!==c?-E:0};else if(T==="y"){if(S=!c&&x==="left"||c&&x==="right",m=S?1:-1,c&&(m*=-1),_=u,b=d*m,w=0,!c&&Math.abs(k)===90&&(k===-90&&x==="left"||k===90&&x==="right"?w=Wi:w=.5),c){var A=Jt(k)?+k:0;if(A!==0){var $=it.deg2rad(A);y=Math.abs(Math.sin($))*Wi*m,w=0}}g.xFn=function(M){return M.dx+e-(_+M.fontSize*w)*m+y*M.fontSize},g.yFn=function(M){return M.dy+b+M.fontSize*us},g.anchorFn=function(M,C){return Jt(C)&&Math.abs(C)===90?"middle":S?"end":"start"},g.heightFn=function(M,C,E){return t.side==="right"&&(C*=-1),C<-30?-E:C<30?-.5*E:0}}return g};function nc(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}Se.drawTicks=function(t,e,r){r=r||{};var a=e._id+"tick",i=r.vals;e.ticklabelmode==="period"&&(i=i.slice(),i.shift());var n=r.layer.selectAll("path."+a).data(e.ticks?i:[],nc);n.exit().remove(),n.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",r.crisp!==!1).call(hl.stroke,e.tickcolor).style("stroke-width",na.crispRound(t,e.tickwidth,1)+"px").attr("d",r.path).style("display",null),oc(e,[O1]),n.attr("transform",r.transFn)};Se.drawGrid=function(t,e,r){r=r||{};var a=e._id+"grid",i=r.vals,n=r.counterAxis;if(e.showgrid===!1)i=[];else if(n&&Se.shouldShowZeroLine(t,e,n))for(var o=e.tickmode==="array",l=0;l<i.length;l++){var s=i[l].x;if(o?!s:Math.abs(s)<e.dtick/100)if(i=i.slice(0,l).concat(i.slice(l+1)),o)l--;else break}var f=r.layer.selectAll("path."+a).data(i,nc);f.exit().remove(),f.enter().append("path").classed(a,1).classed("crisp",r.crisp!==!1),e._gw=na.crispRound(t,e.gridwidth,1),f.attr("transform",r.transFn).attr("d",r.path).call(hl.stroke,e.gridcolor||"#ddd").style("stroke-width",e._gw+"px").style("display",null),oc(e,[Zv]),typeof r.path=="function"&&f.attr("d",r.path)};Se.drawZeroLine=function(t,e,r){r=r||r;var a=e._id+"zl",i=Se.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 wL(o.id,l.id)})}),n.attr("transform",r.transFn).attr("d",r.path).call(hl.stroke,e.zerolinecolor||hl.defaultLine).style("stroke-width",na.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),oc(e,[Wv])};Se.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,i=e._id,n=i.charAt(0),o=r.cls||i+"tick",l=r.vals,s=r.labelFns,f=r.secondary?0:e.tickangle,c=(e._prevTickAngles||{})[o],v=r.layer.selectAll("g."+o).data(e.showticklabels?l:[],nc),u=[];v.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(m){var y=Aa.select(this),x=t._promises.length;y.call(Zo.positionText,s.xFn(m),s.yFn(m)).call(na.font,m.font,m.fontSize,m.fontColor).text(m.text).call(Zo.convertToTspans,t),t._promises[x]?u.push(t._promises.pop().then(function(){d(y,f)})):d(y,f)}),oc(e,[Am]),v.exit().remove(),r.repositionOnUpdate&&v.each(function(m){Aa.select(this).select("text").call(Zo.positionText,s.xFn(m),s.yFn(m))});function d(m,y){m.each(function(x){var T=Aa.select(this),k=T.select(".text-math-group"),S=s.anchorFn(x,y),A=r.transFn.call(T.node(),x)+(Jt(y)&&+y!=0?" rotate("+y+","+s.xFn(x)+","+(s.yFn(x)-x.fontSize/2)+")":""),$=Zo.lineCount(T),M=pf*x.fontSize,C=s.heightFn(x,Jt(y)?+y:0,($-1)*M);if(C&&(A+=Qn(0,C)),k.empty()){var E=T.select("text");E.attr({transform:A,"text-anchor":S}),E.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var I=na.bBox(k.node()).width,P=I*{end:-.5,start:.5}[S];k.attr("transform",A+Qn(P,0))}})}e._adjustTickLabelsOverflow=function(){var m=e.ticklabeloverflow;if(!(!m||m==="allow")){var y=m.indexOf("hide")!==-1,x=e._id.charAt(0)==="x",T=0,k=x?t._fullLayout.width:t._fullLayout.height;if(m.indexOf("domain")!==-1){var S=it.simpleMap(e.range,e.r2l);T=e.l2p(S[0])+e._offset,k=e.l2p(S[1])+e._offset}var A=Math.min(T,k),$=Math.max(T,k),M=e.side,C=1/0,E=-1/0;v.each(function(L){var D=Aa.select(this),z=D.select(".text-math-group");if(z.empty()){var F=na.bBox(D.node()),H=0;x?(F.right>$||F.left<A)&&(H=1):(F.bottom>$||F.top+(e.tickangle?0:L.fontSize/4)<A)&&(H=1);var U=D.select("text");H?y&&U.style("opacity",0):(U.style("opacity",1),M==="bottom"||M==="right"?C=Math.min(C,x?F.top:F.left):C=-1/0,M==="top"||M==="left"?E=Math.max(E,x?F.bottom:F.right):E=1/0)}});for(var I in a._plots){var P=a._plots[I];if(!(e._id!==P.xaxis._id&&e._id!==P.yaxis._id)){var R=x?P.yaxis:P.xaxis;R&&(R["_visibleLabelMin_"+e._id]=C,R["_visibleLabelMax_"+e._id]=E)}}}},e._hideCounterAxisInsideTickLabels=function(m){var y=e._id.charAt(0)==="x",x=[];for(var T in a._plots){var k=a._plots[T];e._id!==k.xaxis._id&&e._id!==k.yaxis._id||x.push(y?k.yaxis:k.xaxis)}x.forEach(function(S,A){S&&ml(S)&&(m||[Wv,Zv,O1,Am]).forEach(function($){var M=$.K==="tick"&&$.L==="text"&&e.ticklabelmode==="period",C=a._plots[e._mainSubplot],E;$.K===Wv.K?E=C.zerolinelayer.selectAll("."+e._id+"zl"):$.K===Zv.K?E=C.gridlayer.selectAll("."+e._id):E=C[e._id.charAt(0)+"axislayer"],E.each(function(){var I=Aa.select(this);$.L&&(I=I.selectAll($.L)),I.each(function(P){var R=e.l2p(M?Qv(P):P.x)+e._offset,L=Aa.select(this);R<e["_visibleLabelMax_"+S._id]&&R>e["_visibleLabelMin_"+S._id]?L.style("display","none"):$.K==="tick"&&!A&&L.style("display",null)})})})})},d(v,c+1?c:f);function h(){return u.length&&Promise.all(u)}var p=null;function g(){if(d(v,f),l.length&&n==="x"&&!Jt(f)&&(e.type!=="log"||String(e.dtick).charAt(0)!=="D")){p=0;var m=0,y=[],x;if(v.each(function(F){m=Math.max(m,F.fontSize);var H=e.l2p(F.x),U=Jv(this),B=na.bBox(U.node());y.push({top:0,bottom:10,height:10,left:H-B.width/2,right:H+B.width/2+2,width:B.width+2})}),(e.tickson==="boundaries"||e.showdividers)&&!r.secondary){var T=2;for(e.ticks&&(T+=e.tickwidth/2),x=0;x<y.length;x++){var k=l[x].xbnd,S=y[x];if(k[0]!==null&&S.left-e.l2p(k[0])<T||k[1]!==null&&e.l2p(k[1])-S.right<T){p=90;break}}}else{var A=l.length,$=Math.abs((l[A-1].x-l[0].x)*e._m)/(A-1),M=e.ticklabelposition||"",C=function(F){return M.indexOf(F)!==-1},E=C("top"),I=C("left"),P=C("right"),R=C("bottom"),L=R||I||E||P,D=L?(e.tickwidth||0)+2*Kv:0,z=$<m*2.5||e.type==="multicategory"||e._name==="realaxis";for(x=0;x<y.length-1;x++)if(it.bBoxIntersect(y[x],y[x+1],D)){p=z?90:30;break}}p&&d(v,p)}}e._selections&&(e._selections[o]=v);var _=[h];e.automargin&&a._redrawFromAutoMarginCount&&c===90?(p=90,_.push(function(){d(v,c)})):_.push(g),e._tickAngles&&_.push(function(){e._tickAngles[o]=p===null?Jt(f)?f:0:p});var b=e._anchorAxis;b&&b.autorange&&ml(e)&&!TL(a,e._id)&&(a._insideTickLabelsAutorange||(a._insideTickLabelsAutorange={}),a._insideTickLabelsAutorange[b._name+".autorange"]=b.autorange,_.push(function(){v.each(function(y,x){var T=Jv(this),k=T.select(".text-math-group");k.empty()&&(e._vals[x].bb=na.bBox(T.node()))})}));var w=it.syncOrAsync(_);return w&&w.then&&t._promises.push(w),w};function qL(t,e,r){var a=e._id+"divider",i=r.vals,n=r.layer.selectAll("path."+a).data(i,nc);n.exit().remove(),n.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(hl.stroke,e.dividercolor).style("stroke-width",na.crispRound(t,e.dividerwidth,1)+"px"),n.attr("transform",r.transFn).attr("d",r.path)}Se.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,_length:0}),i==="top"||i==="left")return n._offset;if(i==="bottom"||i==="right")return n._offset+n._length};function V1(t){var e=t.title.font.size,r=(t.title.text.match(Zo.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?r?e*(Wi+r*pf):e*Wi:r?e*(r+1)*pf:e}function XL(t,e){var r=t._fullLayout,a=e._id,i=a.charAt(0),n=e.title.font.size,o;if(e.title.hasOwnProperty("standoff"))o=e._depth+e.title.standoff+V1(e);else{var l=ml(e);if(e.type==="multicategory")o=e._depth;else{var s=1.5*n;l&&(s=.5*n,e.ticks==="outside"&&(s+=e.ticklen)),o=10+s+(e.linewidth?e.linewidth-1:0)}l||(i==="x"?o+=e.side==="top"?n*(e.showticklabels?1:0):n*(e.showticklabels?1.5:.5):o+=e.side==="right"?n*(e.showticklabels?1:.5):n*(e.showticklabels?.5:0))}var f=Se.getPxPosition(t,e),c,v,u;i==="x"?(v=e._offset+e._length/2,u=e.side==="top"?f-o:f+o):(u=e._offset+e._length/2,v=e.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var 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 p=na.getTranslate(h.node().parentNode);d.offsetLeft=p.x,d.offsetTop=p.y}e.title.hasOwnProperty("standoff")&&(d.pad=0)}return pL.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:r._dfltTitle[i],avoid:d,transform:c,attributes:{x:v,y:u,"text-anchor":"middle"}})}Se.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)===ac)&&(q1(e,0)||!YL(t,e,r,a)||WL(t,e))};Se.clipEnds=function(t,e){return e.filter(function(r){return q1(t,r.x)})};function q1(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function YL(t,e,r,a){var i=r._mainAxis;if(!i)return;var n=t._fullLayout,o=e._id.charAt(0),l=Se.counterLetter(e._id),s=e._offset+(Math.abs(a[0])<Math.abs(a[1])==(o==="x")?0:e._length);function f(h){if(!h.showline||!h.linewidth)return!1;var p=Math.max((h.linewidth+e.zerolinewidth)/2,1);function g(w){return typeof w=="number"&&Math.abs(w-s)<p}if(g(h._mainLinePosition)||g(h._mainMirrorPosition))return!0;var _=h._linepositions||{};for(var b in _)if(g(_[b][0])||g(_[b][1]))return!0}var c=n._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return f(r);for(var v=Se.list(t,l),u=0;u<v.length;u++){var d=v[u];if(d._mainAxis===i&&f(d))return!0}}function WL(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&&(dl.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 Jv(t){var e=Aa.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}Se.allowAutoMargin=function(t){for(var e=Se.list(t,"",!0),r=0;r<e.length;r++){var a=e[r];a.automargin&&(qn.allowAutoMargin(t,vh(a)),a.mirror&&qn.allowAutoMargin(t,X1(a))),dl.getComponentMethod("rangeslider","isVisible")(a)&&qn.allowAutoMargin(t,Y1(a))}};function vh(t){return t._id+".automargin"}function X1(t){return vh(t)+".mirror"}function Y1(t){return t._id+".rangeslider"}Se.swap=function(t,e){for(var r=ZL(t,e),a=0;a<r.length;a++)KL(t,r[a].x,r[a].y)};function ZL(t,e){var r=[],a,i;for(a=0;a<e.length;a++){var n=[],o=t._fullData[e[a]].xaxis,l=t._fullData[e[a]].yaxis;if(!(!o||!l)){for(i=0;i<r.length;i++)(r[i].x.indexOf(o)!==-1||r[i].y.indexOf(l)!==-1)&&n.push(i);if(!n.length){r.push({x:[o],y:[l]});continue}var s=r[n[0]],f;if(n.length>1)for(i=1;i<n.length;i++)f=r[n[i]],ds(s.x,f.x),ds(s.y,f.y);ds(s.x,[o]),ds(s.y,[l])}}return r}function ds(t,e){for(var r=0;r<e.length;r++)t.indexOf(e[r])===-1&&t.push(e[r])}function KL(t,e,r){var a=[],i=[],n=t.layout,o,l;for(o=0;o<e.length;o++)a.push(Se.getFromId(t,e[o]));for(o=0;o<r.length;o++)i.push(Se.getFromId(t,r[o]));var s=Object.keys(mL),f=["anchor","domain","overlaying","position","side","tickangle","editType"],c=["linear","log"];for(o=0;o<s.length;o++){var v=s[o],u=a[0][v],d=i[0][v],h=!0,p=!1,g=!1;if(!(v.charAt(0)==="_"||typeof u=="function"||f.indexOf(v)!==-1)){for(l=1;l<a.length&&h;l++){var _=a[l][v];v==="type"&&c.indexOf(u)!==-1&&c.indexOf(_)!==-1&&u!==_?p=!0:_!==u&&(h=!1)}for(l=1;l<i.length&&h;l++){var b=i[l][v];v==="type"&&c.indexOf(d)!==-1&&c.indexOf(b)!==-1&&d!==b?g=!0:i[l][v]!==d&&(h=!1)}h&&(p&&(n[a[0]._name].type="linear"),g&&(n[i[0]._name].type="linear"),QL(n,v,a,i,t._fullLayout._dfltTitle))}}for(o=0;o<t._fullLayout.annotations.length;o++){var w=t._fullLayout.annotations[o];e.indexOf(w.xref)!==-1&&r.indexOf(w.yref)!==-1&&it.swapAttrs(n.annotations[o],["?"])}}function QL(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 dh(t){return t._id==="angularaxis"}function Zc(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 ml(t){return(t.ticklabelposition||"").indexOf("inside")!==-1}function oc(t,e){ml(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}var hh={},ha={exports:{}},JL=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},Dm=de.exports,eC=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]],tC=function(e,r,a,i){return a==="left"?e=0:a==="center"?e=1:a==="right"?e=2:e=Dm.constrain(Math.floor(e*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Dm.constrain(Math.floor(r*3),0,2),eC[r][e]},W1={exports:{}},rC=El,aC=Zf,iC=Vd.getGraphDiv,nC=Gf,ed=W1.exports={};ed.wrapped=function(t,e,r){t=iC(t),t._fullLayout&&aC.clear(t._fullLayout._uid+nC.HOVERID),ed.raw(t,e,r)};ed.raw=function(e,r){var a=e._fullLayout,i=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&rC.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 oC=uk,Kc=ax,lC=ix,sC=de.exports.removeElement,fC=pr,Ki=ha.exports={};Ki.align=JL;Ki.getCursor=tC;var Z1=W1.exports;Ki.unhover=Z1.wrapped;Ki.unhoverRaw=Z1.raw;Ki.init=function(e){var r=e.gd,a=1,i=r._context.doubleClickDelay,n=e.element,o,l,s,f,c,v,u,d;r._mouseDownTime||(r._mouseDownTime=0),n.style.pointerEvents="all",n.onmousedown=g,lC?(n._ontouchstart&&n.removeEventListener("touchstart",n._ontouchstart),n._ontouchstart=g,n.addEventListener("touchstart",g,{passive:!1})):n.ontouchstart=g;function h(w,m,y){return Math.abs(w)<y&&(w=0),Math.abs(m)<y&&(m=0),[w,m]}var p=e.clampFn||h;function g(w){r._dragged=!1,r._dragging=!0;var m=Qc(w);o=m[0],l=m[1],u=w.target,v=w,d=w.buttons===2||w.ctrlKey,typeof w.clientX>"u"&&typeof w.clientY>"u"&&(w.clientX=o,w.clientY=l),s=new Date().getTime(),s-r._mouseDownTime<i?a+=1:(a=1,r._mouseDownTime=s),e.prepFn&&e.prepFn(w,o,l),Kc&&!d?(c=K1(),c.style.cursor=window.getComputedStyle(n).cursor):Kc||(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&&(w.preventDefault(),document.addEventListener("mousemove",_),document.addEventListener("touchmove",_,{passive:!1}))}function _(w){w.preventDefault();var m=Qc(w),y=e.minDrag||fC.MINDRAG,x=p(m[0]-o,m[1]-l,y),T=x[0],k=x[1];(T||k)&&(r._dragged=!0,Ki.unhover(r,w)),r._dragged&&e.moveFn&&!d&&(r._dragdata={element:n,dx:T,dy:k},e.moveFn(T,k))}function b(w){if(delete r._dragdata,e.dragmode!==!1&&(w.preventDefault(),document.removeEventListener("mousemove",_),document.removeEventListener("touchmove",_)),document.removeEventListener("mouseup",b),document.removeEventListener("touchend",b),Kc?sC(c):f&&(c.documentElement.style.cursor=f,f=null),!r._dragging){r._dragged=!1;return}if(r._dragging=!1,new Date().getTime()-r._mouseDownTime>i&&(a=Math.max(a-1,1)),r._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(a,v),!d){var m;try{m=new MouseEvent("click",w)}catch{var y=Qc(w);m=document.createEvent("MouseEvents"),m.initMouseEvent("click",w.bubbles,w.cancelable,w.view,w.detail,w.screenX,w.screenY,y[0],y[1],w.ctrlKey,w.altKey,w.shiftKey,w.metaKey,w.button,w.relatedTarget)}u.dispatchEvent(m)}r._dragging=!1,r._dragged=!1}};function K1(){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}Ki.coverSlip=K1;function Qc(t){return oC(t.changedTouches?t.changedTouches[0]:t,document.body)}var lc={},xi=function(e,r){(e.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&e.classed(a,!1)}),r&&e.classed("cursor-"+r,!0)},Jc=xi,$o="data-savedcursor",$m="!!",cC=function(e,r){var a=e.attr($o);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($o,o.substr(7)).classed(o,!1)}e.attr($o)||e.attr($o,$m)}Jc(e,r)}else a&&(e.attr($o,null),a===$m?Jc(e):Jc(e,a))},eu=dr,uC=hr,Q1={bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:uC.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:eu({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:eu({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(" ")},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",min:-2,max:3,editType:"legend",description:["Sets the x position (in normalized coordinates) of the legend.","Defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"legend",description:["Sets the y position (in normalized coordinates) of the legend.","Defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:eu({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"},yo={};yo.isGrouped=function(e){return(e.traceorder||"").indexOf("grouped")!==-1};yo.isVertical=function(e){return e.orientation!=="h"};yo.isReversed=function(e){return(e.traceorder||"").indexOf("reversed")!==-1};var tu=Ve,Jr=de.exports,vC=Mt,dC=La,hC=Q1,pC=$l,ru=yo,J1=function(e,r,a){var i=e.legend||{},n=vC.newContainer(r,"legend");function o(k,S){return Jr.coerce(i,n,hC,k,S)}for(var l,s=function(k,S){var A=l._input,$=l;return Jr.coerce(A,$,dC,k,S)},f=r.font||{},c=Jr.coerceFont(o,"grouptitlefont",Jr.extendFlat({},f,{size:Math.round(f.size*1.1)})),v=0,u=!1,d="normal",h=0;h<a.length;h++)l=a[h],l.visible&&((l.showlegend||l._dfltShowLegend&&!(l._module&&l._module.attributes&&l._module.attributes.showlegend&&l._module.attributes.showlegend.dflt===!1))&&(v++,l.showlegend&&(u=!0,(tu.traceIs(l,"pie-like")||l._input.showlegend===!0)&&v++),Jr.coerceFont(s,"legendgrouptitle.font",c)),(tu.traceIs(l,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(l.fill)!==-1)&&(d=ru.isGrouped({traceorder:d})?"grouped+reversed":"reversed"),l.legendgroup!==void 0&&l.legendgroup!==""&&(d=ru.isReversed({traceorder:d})?"reversed+grouped":"grouped"));var p=Jr.coerce(e,r,pC,"showlegend",u&&v>1);if(p===!1&&(r.legend=void 0),!(p===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),p!==!1)){o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth");var g=Jr.coerceFont(o,"font",r.font),_=o("orientation"),b=_==="h",w,m,y;b?(w=0,tu.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(m=1.1,y="bottom"):(m=-.1,y="top")):(w=1.02,m=1,y="auto"),o("traceorder",d),ru.isGrouped(r.legend)&&o("tracegroupgap"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("x",w),o("xanchor"),o("y",m),o("yanchor",y),o("valign"),Jr.noneOrAll(i,n,["x","y"]);var x=o("title.text");if(x){o("title.side",b?"left":"top");var T=Jr.extendFlat({},g,{size:Jr.bigFont(g.size)});Jr.coerceFont(o,"title.font",T)}}},au=de.exports,Li=Ve,iu=!0,mC=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"&&iu&&r.data&&r._context.showTips&&au.notifier(au._(r,"Double-click on legend to isolate one trace"),"long"),iu=!1;var s;if(a===1?s=n:a===2&&(s=o),!s)return;var f=l==="togglegroup",c=i.hiddenlabels?i.hiddenlabels.slice():[],v=e.data()[0][0];if(v.groupTitle&&v.noClick)return;var u=r._fullData,d=v.trace,h=d.legendgroup,p,g,_,b,w,m,y={},x=[],T=[],k=[];function S(B,X,O){var Y=x.indexOf(B),W=y[X];return W||(W=y[X]=[]),x.indexOf(B)===-1&&(x.push(B),Y=x.length-1),W[Y]=O,Y}function A(B,X){if(!(v.groupTitle&&!f)){var O=B._fullInput;if(Li.hasTransform(O,"groupby")){var Y=T[O.index];if(!Y){var W=Li.getTransformIndices(O,"groupby"),K=W[W.length-1];Y=au.keyedContainer(O,"transforms["+K+"].styles","target","value.visible"),T[O.index]=Y}var Z=Y.get(B._group);Z===void 0&&(Z=!0),Z!==!1&&Y.set(B._group,X),k[O.index]=S(O.index,"visible",O.visible!==!1)}else{var ae=O.visible===!1?!1:X;S(O.index,"visible",ae)}}}if(Li.traceIs(d,"pie-like")){var $=v.label,M=c.indexOf($);s==="toggle"?M===-1?c.push($):c.splice(M,1):s==="toggleothers"&&(c=[],r.calcdata[0].forEach(function(B){$!==B.label&&c.push(B.label)}),r._fullLayout.hiddenlabels&&r._fullLayout.hiddenlabels.length===c.length&&M===-1&&(c=[])),Li.call("_guiRelayout",r,"hiddenlabels",c)}else{var C=h&&h.length,E=[],I;if(C)for(p=0;p<u.length;p++)I=u[p],!!I.visible&&I.legendgroup===h&&E.push(p);if(s==="toggle"){var P;switch(d.visible){case!0:P="legendonly";break;case!1:P=!1;break;case"legendonly":P=!0;break}if(C)if(f)for(p=0;p<u.length;p++)u[p].visible!==!1&&u[p].legendgroup===h&&A(u[p],P);else A(d,P);else A(d,P)}else if(s==="toggleothers"){var R,L,D,z,F=!0;for(p=0;p<u.length;p++)if(R=u[p]===d,D=u[p].showlegend!==!0,!(R||D)&&(L=C&&u[p].legendgroup===h,!L&&u[p].visible===!0&&!Li.traceIs(u[p],"notLegendIsolatable"))){F=!1;break}for(p=0;p<u.length;p++)if(u[p].visible!==!1&&!Li.traceIs(u[p],"notLegendIsolatable"))switch(d.visible){case"legendonly":A(u[p],!0);break;case!0:z=F?!0:"legendonly",R=u[p]===d,D=u[p].showlegend!==!0&&!u[p].legendgroup,L=R||C&&u[p].legendgroup===h,A(u[p],L||D?!0:z);break}}for(p=0;p<T.length;p++)if(_=T[p],!!_){var H=_.constructUpdate(),U=Object.keys(H);for(g=0;g<U.length;g++)b=U[g],m=y[b]=y[b]||[],m[k[p]]=H[b]}for(w=Object.keys(y),p=0;p<w.length;p++)for(b=w[p],g=0;g<x.length;g++)y[b].hasOwnProperty(g)||(y[b][g]=void 0);Li.call("_guiRestyle",r,y,x)}},e_={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5},Em=Ve,nu=yo,yC=function(e,r){var a=r._inHover,i=nu.isGrouped(r),n=nu.isReversed(r),o={},l=[],s=!1,f={},c=0,v=0,u,d;function h(I,P){if(I===""||!nu.isGrouped(r)){var R="~~i"+c;l.push(R),o[R]=[P],c++}else l.indexOf(I)===-1?(l.push(I),s=!0,o[I]=[P]):o[I].push(P)}for(u=0;u<e.length;u++){var p=e[u],g=p[0],_=g.trace,b=_.legendgroup;if(!(!a&&(!_.visible||!_.showlegend)))if(Em.traceIs(_,"pie-like"))for(f[b]||(f[b]={}),d=0;d<p.length;d++){var w=p[d].label;f[b][w]||(h(b,{label:w,color:p[d].color,i:p[d].i,trace:_,pts:p[d].pts}),f[b][w]=!0,v=Math.max(v,(w||"").length))}else h(b,g),v=Math.max(v,(_.name||"").length)}if(!l.length)return[];var m=!s||!i,y=[];for(u=0;u<l.length;u++){var x=o[l[u]];m?y.push(x[0]):y.push(x)}for(m&&(y=[y]),u=0;u<y.length;u++){var T=1/0;for(d=0;d<y[u].length;d++){var k=y[u][d].trace.legendrank;T>k&&(T=k)}y[u][0]._groupMinRank=T,y[u][0]._preGroupSort=u}var S=function(I,P){return I[0]._groupMinRank-P[0]._groupMinRank||I[0]._preGroupSort-P[0]._preGroupSort},A=function(I,P){return I.trace.legendrank-P.trace.legendrank||I._preSort-P._preSort};for(y.forEach(function(I,P){I[0]._preGroupSort=P}),y.sort(S),u=0;u<y.length;u++){y[u].forEach(function(I,P){I._preSort=P}),y[u].sort(A);var $=y[u][0].trace,M=null;for(d=0;d<y[u].length;d++){var C=y[u][d].trace.legendgrouptitle;if(C&&C.text){M=C,a&&(C.font=r._groupTitleFont);break}}if(n&&y[u].reverse(),M){var E=!1;for(d=0;d<y[u].length;d++)if(Em.traceIs(y[u][d].trace,"pie-like")){E=!0;break}y[u].unshift({i:-1,groupTitle:M,noClick:E,trace:{showlegend:$.showlegend,legendgroup:$.legendgroup,visible:r.groupclick==="toggleitem"?!0:$.visible}})}for(d=0;d<y[u].length;d++)y[u][d]=[y[u][d]]}return r._lgroupsLength=y.length,r._maxNameLength=v,y},sn={};(function(t){var e=de.exports;function r(a){return a.indexOf("e")!==-1?a.replace(/[.]?0+e/,"e"):a.indexOf(".")!==-1?a.replace(/[.]?0+$/,""):a}t.formatPiePercent=function(i,n){var o=r((i*100).toPrecision(3));return e.numSeparate(o,n)+"%"},t.formatPieValue=function(i,n){var o=r(i.toPrecision(10));return e.numSeparate(o,n)},t.getFirstFilled=function(i,n){if(!!Array.isArray(i))for(var o=0;o<n.length;o++){var l=i[n[o]];if(l||l===0||l==="")return l}},t.castOption=function(i,n){if(Array.isArray(i))return t.getFirstFilled(i,n);if(i)return i},t.getRotationAngle=function(a){return(a==="auto"?0:a)*Math.PI/180}})(sn);var ou=Je.exports,Rm=sn.castOption,ph=function(e,r,a){var i=a.marker.line,n=Rm(i.color,r.pts)||ou.defaultLine,o=Rm(i.width,r.pts)||0;e.style("stroke-width",o).call(ou.fill,r.color).call(ou.stroke,n)},fr=tt.exports,lu=Ve,lr=de.exports,Pm=lr.strTranslate,xr=Tt.exports,Fr=Je.exports,su=da.extractOpts,yf=mr,gC=ph,bC=sn.castOption,xC=e_,zm=12,Im=5,Ci=2,_C=10,gn=5,t_=function(e,r,a){var i=r._fullLayout;a||(a=i.legend);var n=a.itemsizing==="constant",o=a.itemwidth,l=(o+xC.itemGap*2)/2,s=Pm(l,0),f=function(T,k,S,A){var $;if(T+1)$=T;else if(k&&k.width>0)$=k.width;else return 0;return n?A:Math.min($,S)};e.each(function(T){var k=fr.select(this),S=lr.ensureSingle(k,"g","layers");S.style("opacity",T[0].trace.opacity);var A=a.valign,$=T[0].lineHeight,M=T[0].height;if(A==="middle"||!$||!M)S.attr("transform",null);else{var C={top:1,bottom:-1}[A],E=C*(.5*($-M+3));S.attr("transform",Pm(0,E))}var I=S.selectAll("g.legendfill").data([T]);I.enter().append("g").classed("legendfill",!0);var P=S.selectAll("g.legendlines").data([T]);P.enter().append("g").classed("legendlines",!0);var R=S.selectAll("g.legendsymbols").data([T]);R.enter().append("g").classed("legendsymbols",!0),R.selectAll("g.legendpoints").data([T]).enter().append("g").classed("legendpoints",!0)}).each(x).each(u).each(h).each(d).each(g).each(m).each(w).each(c).each(v).each(_).each(b);function c(T){var k=Nm(T),S=k.showFill,A=k.showLine,$=k.showGradientLine,M=k.showGradientFill,C=k.anyFill,E=k.anyLine,I=T[0],P=I.trace,R,L,D=su(P),z=D.colorscale,F=D.reversescale,H=function(K){if(K.size())if(S)xr.fillGroupStyle(K,r);else{var Z="legendfill-"+P.uid;xr.gradient(K,r,Z,fu(F),z,"fill")}},U=function(K){if(K.size()){var Z="legendline-"+P.uid;xr.lineGroupStyle(K),xr.gradient(K,r,Z,fu(F),z,"stroke")}},B=yf.hasMarkers(P)||!C?"M5,0":E?"M5,-2":"M5,-3",X=fr.select(this),O=X.select(".legendfill").selectAll("path").data(S||M?[T]:[]);if(O.enter().append("path").classed("js-fill",!0),O.exit().remove(),O.attr("d",B+"h"+o+"v6h-"+o+"z").call(H),A||$){var Y=f(void 0,P.line,_C,Im);L=lr.minExtend(P,{line:{width:Y}}),R=[lr.minExtend(I,{trace:L})]}var W=X.select(".legendlines").selectAll("path").data(A||$?[R]:[]);W.enter().append("path").classed("js-line",!0),W.exit().remove(),W.attr("d",B+($?"l"+o+",0.0001":"h"+o)).call(A?xr.lineGroupStyle:U)}function v(T){var k=Nm(T),S=k.anyFill,A=k.anyLine,$=k.showLine,M=k.showMarker,C=T[0],E=C.trace,I=!M&&!A&&!S&&yf.hasText(E),P,R;function L(O,Y,W,K){var Z=lr.nestedProperty(E,O).get(),ae=lr.isArrayOrTypedArray(Z)&&Y?Y(Z):Z;if(n&&ae&&K!==void 0&&(ae=K),W){if(ae<W[0])return W[0];if(ae>W[1])return W[1]}return ae}function D(O){return C._distinct&&C.index&&O[C.index]?O[C.index]:O[0]}if(M||I||$){var z={},F={};if(M){z.mc=L("marker.color",D),z.mx=L("marker.symbol",D),z.mo=L("marker.opacity",lr.mean,[.2,1]),z.mlc=L("marker.line.color",D),z.mlw=L("marker.line.width",lr.mean,[0,5],Ci),F.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var H=L("marker.size",lr.mean,[2,16],zm);z.ms=H,F.marker.size=H}$&&(F.line={width:L("line.width",D,[0,10],Im)}),I&&(z.tx="Aa",z.tp=L("textposition",D),z.ts=10,z.tc=L("textfont.color",D),z.tf=L("textfont.family",D)),P=[lr.minExtend(C,z)],R=lr.minExtend(E,F),R.selectedpoints=null,R.texttemplate=null}var U=fr.select(this).select("g.legendpoints"),B=U.selectAll("path.scatterpts").data(M?P:[]);B.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),B.exit().remove(),B.call(xr.pointStyle,R,r),M&&(P[0].mrc=3);var X=U.selectAll("g.pointtext").data(I?P:[]);X.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),X.exit().remove(),X.selectAll("text").call(xr.textPointStyle,R,r)}function u(T){var k=T[0].trace,S=k.type==="waterfall";if(T[0]._distinct&&S){var A=T[0].trace[T[0].dir].marker;return T[0].mc=A.color,T[0].mlw=A.line.width,T[0].mlc=A.line.color,p(T,this,"waterfall")}var $=[];k.visible&&S&&($=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 M=fr.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data($);M.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),M.exit().remove(),M.each(function(C){var E=fr.select(this),I=k[C[0]].marker,P=f(void 0,I.line,gn,Ci);E.attr("d",C[1]).style("stroke-width",P+"px").call(Fr.fill,I.color),P&&E.call(Fr.stroke,I.line.color)})}function d(T){p(T,this)}function h(T){p(T,this,"funnel")}function p(T,k,S){var A=T[0].trace,$=A.marker||{},M=$.line||{},C=S?A.visible&&A.type===S:lu.traceIs(A,"bar"),E=fr.select(k).select("g.legendpoints").selectAll("path.legend"+S).data(C?[T]:[]);E.enter().append("path").classed("legend"+S,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),E.exit().remove(),E.each(function(I){var P=fr.select(this),R=I[0],L=f(R.mlw,$.line,gn,Ci);P.style("stroke-width",L+"px");var D=R.mcc;if(!a._inHover&&"mc"in R){var z=su($),F=z.mid;F===void 0&&(F=(z.max+z.min)/2),D=xr.tryColorscale($,"")(F)}var H=D||R.mc||$.color,U=$.pattern,B=U&&xr.getPatternAttr(U.shape,0,"");if(B){var X=xr.getPatternAttr(U.bgcolor,0,null),O=xr.getPatternAttr(U.fgcolor,0,null),Y=U.fgopacity,W=Fm(U.size,8,10),K=Fm(U.solidity,.5,1),Z="legend-"+A.uid;P.call(xr.pattern,"legend",r,Z,B,W,K,D,U.fillmode,X,O,Y)}else P.call(Fr.fill,H);L&&Fr.stroke(P,R.mlc||M.color)})}function g(T){var k=T[0].trace,S=fr.select(this).select("g.legendpoints").selectAll("path.legendbox").data(k.visible&&lu.traceIs(k,"box-violin")?[T]:[]);S.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),S.exit().remove(),S.each(function(){var A=fr.select(this);if((k.boxpoints==="all"||k.points==="all")&&Fr.opacity(k.fillcolor)===0&&Fr.opacity((k.line||{}).color)===0){var $=lr.minExtend(k,{marker:{size:n?zm:lr.constrain(k.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});S.call(xr.pointStyle,$,r)}else{var M=f(void 0,k.line,gn,Ci);A.style("stroke-width",M+"px").call(Fr.fill,k.fillcolor),M&&Fr.stroke(A,k.line.color)}})}function _(T){var k=T[0].trace,S=fr.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(k.visible&&k.type==="candlestick"?[T,T]:[]);S.enter().append("path").classed("legendcandle",!0).attr("d",function(A,$){return $?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(A,$){var M=fr.select(this),C=k[$?"increasing":"decreasing"],E=f(void 0,C.line,gn,Ci);M.style("stroke-width",E+"px").call(Fr.fill,C.fillcolor),E&&Fr.stroke(M,C.line.color)})}function b(T){var k=T[0].trace,S=fr.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(k.visible&&k.type==="ohlc"?[T,T]:[]);S.enter().append("path").classed("legendohlc",!0).attr("d",function(A,$){return $?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(A,$){var M=fr.select(this),C=k[$?"increasing":"decreasing"],E=f(void 0,C.line,gn,Ci);M.style("fill","none").call(xr.dashLine,C.line.dash,E),E&&Fr.stroke(M,C.line.color)})}function w(T){y(T,this,"pie")}function m(T){y(T,this,"funnelarea")}function y(T,k,S){var A=T[0],$=A.trace,M=S?$.visible&&$.type===S:lu.traceIs($,S),C=fr.select(k).select("g.legendpoints").selectAll("path.legend"+S).data(M?[T]:[]);if(C.enter().append("path").classed("legend"+S,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),C.exit().remove(),C.size()){var E=($.marker||{}).line,I=f(bC(E.width,A.pts),E,gn,Ci),P=lr.minExtend($,{marker:{line:{width:I}}});P.marker.line.color=E.color;var R=lr.minExtend(A,{trace:P});gC(C,R,P)}}function x(T){var k=T[0].trace,S,A=[];if(k.visible)switch(k.type){case"histogram2d":case"heatmap":A=[["M-15,-2V4H15V-2Z"]],S=!0;break;case"choropleth":case"choroplethmapbox":A=[["M-6,-6V6H6V-6Z"]],S=!0;break;case"densitymapbox":A=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],S="radial";break;case"cone":A=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],S=!1;break;case"streamtube":A=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],S=!1;break;case"surface":A=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],S=!0;break;case"mesh3d":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!1;break;case"volume":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!0;break;case"isosurface":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],S=!1;break}var $=fr.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(A);$.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),$.exit().remove(),$.each(function(M,C){var E=fr.select(this),I=su(k),P=I.colorscale,R=I.reversescale,L=function(H){if(H.size()){var U="legendfill-"+k.uid;xr.gradient(H,r,U,fu(R,S==="radial"),P,"fill")}},D;if(P){if(!S){var F=P.length;D=C===0?P[R?F-1:0][1]:C===1?P[R?0:F-1][1]:P[Math.floor((F-1)/2)][1]}}else{var z=k.vertexcolor||k.facecolor||k.color;D=lr.isArrayOrTypedArray(z)?z[C]||z[0]:z}E.attr("d",M[0]),D?E.call(Fr.fill,D):E.call(L)})}};function fu(t,e){var r=e?"radial":"horizontal";return r+(t?"":"reversed")}function Nm(t){var e=t[0].trace,r=e.contours,a=yf.hasLines(e),i=yf.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 Fm(t,e,r){return t&&lr.isArrayOrTypedArray(t)?e:t>r?r:t}var Dr=tt.exports,jt=de.exports,td=Ut.exports,Oi=Ve,Hm=El,cu=ha.exports,Zt=Tt.exports,Ys=Je.exports,Xn=ir,Om=mC,ar=e_,mh=Lr,wC=mh.LINE_SPACING,gf=mh.FROM_TL,Bm=mh.FROM_BR,jm=yC,TC=t_,Gm=yo,Nn=1,r_=function(e,r){return r||(r=e._fullLayout.legend||{}),kC(e,r)};function kC(t,e){var r=t._fullLayout,a="legend"+r._uid,i,n=e._inHover;if(n?(i=e.layer,a+="-hover"):i=r._infolayer,!!i){t._legendMouseDownTime||(t._legendMouseDownTime=0);var o;if(n){if(!e.entries)return;o=jm(e.entries,e)}else{if(!t.calcdata)return;o=r.showlegend&&jm(t.calcdata,e)}var l=r.hiddenlabels||[];if(!n&&(!r.showlegend||!o.length))return i.selectAll(".legend").remove(),r._topdefs.select("#"+a).remove(),td.autoMargin(t,"legend");var s=jt.ensureSingle(i,"g","legend",function(_){n||_.attr("pointer-events","all")}),f=jt.ensureSingleById(r._topdefs,"clipPath",a,function(_){_.append("rect")}),c=jt.ensureSingle(s,"rect","bg",function(_){_.attr("shape-rendering","crispEdges")});c.call(Ys.stroke,e.bordercolor).call(Ys.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px");var v=jt.ensureSingle(s,"g","scrollbox"),u=e.title;if(e._titleWidth=0,e._titleHeight=0,u.text){var d=jt.ensureSingle(v,"text","legendtitletext");d.attr("text-anchor","start").call(Zt.font,u.font).text(u.text),Ws(d,v,t,e,Nn)}else v.selectAll(".legendtitletext").remove();var h=jt.ensureSingle(s,"rect","scrollbar",function(_){_.attr(ar.scrollBarEnterAttrs).call(Ys.fill,ar.scrollBarColor)}),p=v.selectAll("g.groups").data(o);p.enter().append("g").attr("class","groups"),p.exit().remove();var g=p.selectAll("g.traces").data(jt.identity);g.enter().append("g").attr("class","traces"),g.exit().remove(),g.style("opacity",function(_){var b=_[0].trace;return Oi.traceIs(b,"pie-like")?l.indexOf(_[0].label)!==-1?.5:1:b.visible==="legendonly"?.5:1}).each(function(){Dr.select(this).call(AC,t,e)}).call(TC,t,e).each(function(){n||Dr.select(this).call(MC,t)}),jt.syncOrAsync([td.previousPromises,function(){return CC(t,p,g,e)},function(){var _=r._size,b=e.borderwidth;if(!n){var w=DC(t);if(w)return;var m=_.l+_.w*e.x-gf[yh(e)]*e._width,y=_.t+_.h*(1-e.y)-gf[gh(e)]*e._effHeight;if(r.margin.autoexpand){var x=m,T=y;m=jt.constrain(m,0,r.width-e._width),y=jt.constrain(y,0,r.height-e._effHeight),m!==x&&jt.log("Constrain legend.x to make legend fit inside graph"),y!==T&&jt.log("Constrain legend.y to make legend fit inside graph")}Zt.setTranslate(s,m,y)}if(h.on(".drag",null),s.on("wheel",null),n||e._height<=e._maxHeight||t._context.staticPlot){var k=e._effHeight;n&&(k=e._height),c.attr({width:e._width-b,height:k-b,x:b/2,y:b/2}),Zt.setTranslate(v,0,0),f.select("rect").attr({width:e._width-2*b,height:k-2*b,x:b,y:b}),Zt.setClipUrl(v,a,t),Zt.setRect(h,0,0,0,0),delete e._scrollY}else{var S=Math.max(ar.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),A=e._effHeight-S-2*ar.scrollBarMargin,$=e._height-e._effHeight,M=A/$,C=Math.min(e._scrollY||0,$);c.attr({width:e._width-2*b+ar.scrollBarWidth+ar.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),f.select("rect").attr({width:e._width-2*b+ar.scrollBarWidth+ar.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+C}),Zt.setClipUrl(v,a,t),F(C,S,M),s.on("wheel",function(){C=jt.constrain(e._scrollY+Dr.event.deltaY/A*$,0,$),F(C,S,M),C!==0&&C!==$&&Dr.event.preventDefault()});var E,I,P,R=function(O,Y,W){var K=(W-Y)/M+O;return jt.constrain(K,0,$)},L=function(O,Y,W){var K=(Y-W)/M+O;return jt.constrain(K,0,$)},D=Dr.behavior.drag().on("dragstart",function(){var O=Dr.event.sourceEvent;O.type==="touchstart"?E=O.changedTouches[0].clientY:E=O.clientY,P=C}).on("drag",function(){var O=Dr.event.sourceEvent;O.buttons===2||O.ctrlKey||(O.type==="touchmove"?I=O.changedTouches[0].clientY:I=O.clientY,C=R(P,E,I),F(C,S,M))});h.call(D);var z=Dr.behavior.drag().on("dragstart",function(){var O=Dr.event.sourceEvent;O.type==="touchstart"&&(E=O.changedTouches[0].clientY,P=C)}).on("drag",function(){var O=Dr.event.sourceEvent;O.type==="touchmove"&&(I=O.changedTouches[0].clientY,C=L(P,E,I),F(C,S,M))});v.call(z)}function F(O,Y,W){e._scrollY=t._fullLayout.legend._scrollY=O,Zt.setTranslate(v,0,-O),Zt.setRect(h,e._width,ar.scrollBarMargin+O*W,ar.scrollBarWidth,Y),f.select("rect").attr("y",b+O)}if(t._context.edits.legendPosition){var H,U,B,X;s.classed("cursor-move",!0),cu.init({element:s.node(),gd:t,prepFn:function(){var O=Zt.getTranslate(s);B=O.x,X=O.y},moveFn:function(O,Y){var W=B+O,K=X+Y;Zt.setTranslate(s,W,K),H=cu.align(W,0,_.l,_.l+_.w,e.xanchor),U=cu.align(K,0,_.t+_.h,_.t,e.yanchor)},doneFn:function(){H!==void 0&&U!==void 0&&Oi.call("_guiRelayout",t,{"legend.x":H,"legend.y":U})},clickFn:function(O,Y){var W=i.selectAll("g.traces").filter(function(){var K=this.getBoundingClientRect();return Y.clientX>=K.left&&Y.clientX<=K.right&&Y.clientY>=K.top&&Y.clientY<=K.bottom});W.size()>0&&a_(t,s,W,O,Y)}})}}],t)}}function a_(t,e,r,a,i){var n=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:n.index,expandedIndex:n._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};n._group&&(o.group=n._group),Oi.traceIs(n,"pie-like")&&(o.label=r.datum()[0].label);var l=Hm.triggerHandler(t,"plotly_legendclick",o);if(l!==!1){if(a===1)e._clickTimeout=setTimeout(function(){!t._fullLayout||Om(r,t,a)},t._context.doubleClickDelay);else if(a===2){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0;var s=Hm.triggerHandler(t,"plotly_legenddoubleclick",o);s!==!1&&Om(r,t,a)}}}function AC(t,e,r){var a=t.data()[0][0],i=a.trace,n=Oi.traceIs(i,"pie-like"),o=!r._inHover&&e._context.edits.legendText&&!n,l=r._maxNameLength,s,f;a.groupTitle?(s=a.groupTitle.text,f=a.groupTitle.font):(f=r.font,r.entries?s=a.text:(s=n?a.label:i.name,i._meta&&(s=jt.templateString(s,i._meta))));var c=jt.ensureSingle(t,"text","legendtext");c.attr("text-anchor","start").call(Zt.font,f).text(o?Um(s,l):s);var v=r.itemwidth+ar.itemGap*2;Xn.positionText(c,v,0),o?c.call(Xn.makeEditable,{gd:e,text:s}).call(Ws,t,e,r).on("edit",function(u){this.text(Um(u,l)).call(Ws,t,e,r);var d=a.trace._fullInput||{},h={};if(Oi.hasTransform(d,"groupby")){var p=Oi.getTransformIndices(d,"groupby"),g=p[p.length-1],_=jt.keyedContainer(d,"transforms["+g+"].styles","target","value.name");_.set(a.trace._group,u),h=_.constructUpdate()}else h.name=u;return Oi.call("_guiRestyle",e,h,i.index)}):Ws(c,t,e,r)}function Um(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 MC(t,e){var r=e._context.doubleClickDelay,a,i=1,n=jt.ensureSingle(t,"rect","legendtoggle",function(o){e._context.staticPlot||o.style("cursor","pointer").attr("pointer-events","all"),o.call(Ys.fill,"rgba(0,0,0,0)")});e._context.staticPlot||(n.on("mousedown",function(){a=new Date().getTime(),a-e._legendMouseDownTime<r?i+=1:(i=1,e._legendMouseDownTime=a)}),n.on("mouseup",function(){if(!(e._dragged||e._editing)){var o=e._fullLayout.legend;new Date().getTime()-e._legendMouseDownTime>r&&(i=Math.max(i-1,1)),a_(e,o,t,i,Dr.event)}}))}function Ws(t,e,r,a,i){a._inHover&&t.attr("data-notex",!0),Xn.convertToTspans(t,r,function(){SC(e,r,a,i)})}function SC(t,e,r,a){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend){t.remove();return}var n=t.select("g[class*=math-group]"),o=n.node();r||(r=e._fullLayout.legend);var l=r.borderwidth,s;a===Nn?s=r.title.font:i.groupTitle?s=i.groupTitle.font:s=r.font;var f=s.size*wC,c,v;if(o){var u=Zt.bBox(o);c=u.height,v=u.width,a===Nn?Zt.setTranslate(n,l,l+c*.75):Zt.setTranslate(n,0,c*.25)}else{var d=t.select(a===Nn?".legendtitletext":".legendtext"),h=Xn.lineCount(d),p=d.node();if(c=f*h,v=p?Zt.bBox(p).width:0,a===Nn)r.title.side==="left"&&(v+=ar.itemGap*2),Xn.positionText(d,l+ar.titlePad,l+f);else{var g=ar.itemGap*2+r.itemwidth;i.groupTitle&&(g=ar.itemGap,v-=r.itemwidth),Xn.positionText(d,g,-f*((h-1)/2-.3))}}a===Nn?(r._titleWidth=v,r._titleHeight=c):(i.lineHeight=f,i.height=Math.max(c,16)+3,i.width=v)}function LC(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 CC(t,e,r,a){var i=t._fullLayout;a||(a=i.legend);var n=i._size,o=Gm.isVertical(a),l=Gm.isGrouped(a),s=a.borderwidth,f=2*s,c=ar.itemGap,v=a.itemwidth+c*2,u=2*(s+c),d=gh(a),h=a.y<0||a.y===0&&d==="top",p=a.y>1||a.y===1&&d==="bottom",g=a.tracegroupgap;a._maxHeight=Math.max(h||p?i.height/2:n.h,30);var _=0;a._width=0,a._height=0;var b=LC(a);if(o)r.each(function(H){var U=H[0].height;Zt.setTranslate(this,s+b[0],s+b[1]+a._height+U/2+c),a._height+=U,a._width=Math.max(a._width,H[0].width)}),_=v+a._width,a._width+=c+v+f,a._height+=u,l&&(e.each(function(H,U){Zt.setTranslate(this,0,U*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var w=yh(a),m=a.x<0||a.x===0&&w==="right",y=a.x>1||a.x===1&&w==="left",x=p||h,T=i.width/2;a._maxWidth=Math.max(m?x&&w==="left"?n.l+n.w:T:y?x&&w==="right"?n.r+n.w:T:n.w,2*v);var k=0,S=0;r.each(function(H){var U=H[0].width+v;k=Math.max(k,U),S+=U}),_=null;var A=0;if(l){var $=0,M=0,C=0;e.each(function(){var H=0,U=0;Dr.select(this).selectAll("g.traces").each(function(X){var O=X[0].width,Y=X[0].height;Zt.setTranslate(this,b[0],b[1]+s+c+Y/2+U),U+=Y,H=Math.max(H,v+O)});var B=H+c;M>0&&B+s+M>a._maxWidth?(A=Math.max(A,M),M=0,C+=$+g,$=U):$=Math.max($,U),Zt.setTranslate(this,M,C),M+=B}),a._width=Math.max(A,M)+s,a._height=C+$+u}else{var E=r.size(),I=S+f+(E-1)*c<a._maxWidth,P=0,R=0,L=0,D=0;r.each(function(H){var U=H[0].height,B=v+H[0].width,X=(I?B:k)+c;X+s+R-c>=a._maxWidth&&(A=Math.max(A,D),R=0,L+=P,a._height+=P,P=0),Zt.setTranslate(this,b[0]+s+R,b[1]+s+L+U/2+c),D=R+B+c,R+=X,P=Math.max(P,U)}),I?(a._width=R+f,a._height=P+u):(a._width=Math.max(A,D)+f,a._height+=P+u)}}a._width=Math.ceil(Math.max(a._width+b[0],a._titleWidth+2*(s+ar.titlePad))),a._height=Math.ceil(Math.max(a._height+b[1],a._titleHeight+2*(s+ar.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var z=t._context.edits,F=z.legendText||z.legendPosition;r.each(function(H){var U=Dr.select(this).select(".legendtoggle"),B=H[0].height,X=F?v:_||v+H[0].width;o||(X+=c/2),Zt.setRect(U,0,-B/2,X,B)})}function DC(t){var e=t._fullLayout,r=e.legend,a=yh(r),i=gh(r);return td.autoMargin(t,"legend",{x:r.x,y:r.y,l:r._width*gf[a],r:r._width*Bm[a],b:r._effHeight*Bm[i],t:r._effHeight*gf[i]})}function yh(t){return jt.isRightAnchor(t)?"right":jt.isCenterAnchor(t)?"center":"left"}function gh(t){return jt.isBottomAnchor(t)?"bottom":jt.isMiddleAnchor(t)?"middle":"top"}var Bi=tt.exports,Na=lt,Vm=Wr.exports,Gt=de.exports,uu=Gt.strTranslate,$C=Gt.strRotate,EC=El,Or=ir,RC=cC,ka=Tt.exports,Qt=Je.exports,hs=ha.exports,oi=Ct.exports,eo=Ve,ta=Zr,Qi=Gf,PC=J1,zC=r_,i_=Qi.YANGLE,bh=Math.PI*i_/180,IC=1/Math.sin(bh),NC=Math.cos(bh),FC=Math.sin(bh),$t=Qi.HOVERARROWSIZE,mt=Qi.HOVERTEXTPAD,qm={box:!0,ohlc:!0,violin:!0,candlestick:!0},HC={scatter:!0,scattergl:!0,splom:!0};lc.hover=function(e,r,a,i){e=Gt.getGraphDiv(e);var n=r.target;Gt.throttle(e._fullLayout._uid+Qi.HOVERID,Qi.HOVERMINTIME,function(){OC(e,r,a,i,n)})};lc.loneHover=function(e,r){var a=!0;Array.isArray(e)||(a=!1,e=[e]);var i=r.gd,n=s_(i),o=f_(i),l=e.map(function(p){var g=p._x0||p.x0||p.x||0,_=p._x1||p.x1||p.x||0,b=p._y0||p.y0||p.y||0,w=p._y1||p.y1||p.y||0,m=p.eventData;if(m){var y=Math.min(g,_),x=Math.max(g,_),T=Math.min(b,w),k=Math.max(b,w),S=p.trace;if(eo.traceIs(S,"gl3d")){var A=i._fullLayout[S.scene]._scene.container,$=A.offsetLeft,M=A.offsetTop;y+=$,x+=$,T+=M,k+=M}m.bbox={x0:y+o,x1:x+o,y0:T+n,y1:k+n},r.inOut_bbox&&r.inOut_bbox.push(m.bbox)}else m=!1;return{color:p.color||Qt.defaultLine,x0:p.x0||p.x||0,x1:p.x1||p.x||0,y0:p.y0||p.y||0,y1:p.y1||p.y||0,xLabel:p.xLabel,yLabel:p.yLabel,zLabel:p.zLabel,text:p.text,name:p.name,idealAlign:p.idealAlign,borderColor:p.borderColor,fontFamily:p.fontFamily,fontSize:p.fontSize,fontColor:p.fontColor,nameLength:p.nameLength,textAlign:p.textAlign,trace:p.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:p.hovertemplate||!1,hovertemplateLabels:p.hovertemplateLabels||!1,eventData:m}}),s=!1,f=o_(l,{gd:i,hovermode:"closest",rotateLabels:s,bgColor:r.bgColor||Qt.background,container:Bi.select(r.container),outerContainer:r.outerContainer||r.container}),c=5,v=0,u=0;f.sort(function(p,g){return p.y0-g.y0}).each(function(p,g){var _=p.y0-p.by/2;_-c<v?p.offset=v-_+c:p.offset=0,v=_+p.by+p.offset,g===r.anchorIndex&&(u=p.offset)}).each(function(p){p.offset-=u});var d=i._fullLayout._invScaleX,h=i._fullLayout._invScaleY;return l_(f,s,d,h),a?f:f.node()};function OC(t,e,r,a,i){r||(r="xy");var n=Array.isArray(r)?r:[r],o=t._fullLayout,l=o._plots||[],s=l[r],f=o._has("cartesian");if(s){var c=s.overlays.map(function(ee){return ee.id});n=n.concat(c)}for(var v=n.length,u=new Array(v),d=new Array(v),h=!1,p=0;p<v;p++){var g=n[p];if(l[g])h=!0,u[p]=l[g].xaxis,d[p]=l[g].yaxis;else if(o[g]&&o[g]._subplot){var _=o[g]._subplot;u[p]=_.xaxis,d[p]=_.yaxis}else{Gt.warn("Unrecognized subplot: "+g);return}}var b=e.hovermode||o.hovermode;if(b&&!h&&(b="closest"),["x","y","closest","x unified","y unified"].indexOf(b)===-1||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return hs.unhoverRaw(t,e);var w=o.hoverdistance;w===-1&&(w=1/0);var m=o.spikedistance;m===-1&&(m=1/0);var y=[],x=[],T,k,S,A,$,M,C,E,I,P,R,L,D,z={hLinePoint:null,vLinePoint:null},F=!1;if(Array.isArray(e))for(b="array",S=0;S<e.length;S++)$=t.calcdata[e[S].curveNumber||0],$&&(M=$[0].trace,$[0].trace.hoverinfo!=="skip"&&(x.push($),M.orientation==="h"&&(F=!0)));else{for(A=0;A<t.calcdata.length;A++)$=t.calcdata[A],M=$[0].trace,M.hoverinfo!=="skip"&&ta.isTraceInSubplots(M,n)&&(x.push($),M.orientation==="h"&&(F=!0));var H=!i,U,B;if(H)"xpx"in e?U=e.xpx:U=u[0]._length/2,"ypx"in e?B=e.ypx:B=d[0]._length/2;else{if(EC.triggerHandler(t,"plotly_beforehover",e)===!1)return;var X=i.getBoundingClientRect();U=e.clientX-X.left,B=e.clientY-X.top,o._calcInverseTransform(t);var O=Gt.apply3DTransform(o._invTransform)(U,B);if(U=O[0],B=O[1],U<0||U>u[0]._length||B<0||B>d[0]._length)return hs.unhoverRaw(t,e)}if(e.pointerX=U+u[0]._offset,e.pointerY=B+d[0]._offset,"xval"in e?T=ta.flat(n,e.xval):T=ta.p2c(u,U),"yval"in e?k=ta.flat(n,e.yval):k=ta.p2c(d,B),!Na(T[0])||!Na(k[0]))return Gt.warn("Fx.hover failed",e,t),hs.unhoverRaw(t,e)}var Y=1/0;function W(ee,Q){for(A=0;A<x.length;A++)if($=x[A],!(!$||!$[0]||!$[0].trace)&&(M=$[0].trace,!(M.visible!==!0||M._length===0)&&["carpet","contourcarpet"].indexOf(M._module.name)===-1)){if(M.type==="splom"?(E=0,C=n[E]):(C=ta.getSubplot(M),E=n.indexOf(C)),I=b,ta.isUnifiedHover(I)&&(I=I.charAt(0)),L={cd:$,trace:M,xa:u[E],ya:d[E],maxHoverDistance:w,maxSpikeDistance:m,index:!1,distance:Math.min(Y,w),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:Qt.defaultLine,name:M.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},o[C]&&(L.subplot=o[C]._subplot),o._splomScenes&&o._splomScenes[M.uid]&&(L.scene=o._splomScenes[M.uid]),D=y.length,I==="array"){var ge=e[A];"pointNumber"in ge?(L.index=ge.pointNumber,I="closest"):(I="","xval"in ge&&(P=ge.xval,I="x"),"yval"in ge&&(R=ge.yval,I=I?"closest":"y"))}else ee!==void 0&&Q!==void 0?(P=ee,R=Q):(P=T[E],R=k[E]);if(w!==0)if(M._module&&M._module.hoverPoints){var _e=M._module.hoverPoints(L,P,R,I,{finiteRange:!0,hoverLayer:o._hoverlayer});if(_e)for(var ce,ie=0;ie<_e.length;ie++)ce=_e[ie],Na(ce.x0)&&Na(ce.y0)&&y.push(GC(ce,b))}else Gt.log("Unrecognized trace type in hover:",M);if(b==="closest"&&y.length>D&&(y.splice(0,D),Y=y[0].distance),f&&m!==0&&y.length===0){L.distance=m,L.index=!1;var Me=M._module.hoverPoints(L,P,R,"closest",{hoverLayer:o._hoverlayer});if(Me&&(Me=Me.filter(function(Ue){return Ue.spikeDistance<=m})),Me&&Me.length){var Ne,je=Me.filter(function(Ue){return Ue.xa.showspikes&&Ue.xa.spikesnap!=="hovered data"});if(je.length){var Ze=je[0];Na(Ze.x0)&&Na(Ze.y0)&&(Ne=Z(Ze),(!z.vLinePoint||z.vLinePoint.spikeDistance>Ne.spikeDistance)&&(z.vLinePoint=Ne))}var nt=Me.filter(function(Ue){return Ue.ya.showspikes&&Ue.ya.spikesnap!=="hovered data"});if(nt.length){var dt=nt[0];Na(dt.x0)&&Na(dt.y0)&&(Ne=Z(dt),(!z.hLinePoint||z.hLinePoint.spikeDistance>Ne.spikeDistance)&&(z.hLinePoint=Ne))}}}}}W();function K(ee,Q,ge){for(var _e=null,ce=1/0,ie,Me=0;Me<ee.length;Me++)ie=ee[Me].spikeDistance,ge&&Me===0&&(ie=-1/0),ie<=ce&&ie<=Q&&(_e=ee[Me],ce=ie);return _e}function Z(ee){return ee?{xa:ee.xa,ya:ee.ya,x:ee.xSpike!==void 0?ee.xSpike:(ee.x0+ee.x1)/2,y:ee.ySpike!==void 0?ee.ySpike:(ee.y0+ee.y1)/2,distance:ee.distance,spikeDistance:ee.spikeDistance,curveNumber:ee.trace.index,color:ee.color,pointNumber:ee.index}:null}var ae={fullLayout:o,container:o._hoverlayer,event:e},ne=t._spikepoints,oe={vLinePoint:z.vLinePoint,hLinePoint:z.hLinePoint};t._spikepoints=oe;var re=function(){y.sort(function(ee,Q){return ee.distance-Q.distance}),y=VC(y,b)};re();var se=b.charAt(0),me=(se==="x"||se==="y")&&y[0]&&HC[y[0].trace.type];if(f&&m!==0&&y.length!==0){var Re=y.filter(function(ee){return ee.ya.showspikes}),ke=K(Re,m,me);z.hLinePoint=Z(ke);var ze=y.filter(function(ee){return ee.xa.showspikes}),he=K(ze,m,me);z.vLinePoint=Z(he)}if(y.length===0){var te=hs.unhoverRaw(t,e);return f&&(z.hLinePoint!==null||z.vLinePoint!==null)&&Wm(ne)&&Ym(t,z,ae),te}if(f&&Wm(ne)&&Ym(t,z,ae),ta.isXYhover(I)&&y[0].length!==0&&y[0].trace.type!=="splom"){var ue=y[0];qm[ue.trace.type]?y=y.filter(function(ee){return ee.trace.index===ue.trace.index}):y=[ue];var Le=y.length,we=Km("x",ue,o),Pe=Km("y",ue,o);W(we,Pe);var Ee=[],Ce={},q=0,pe=function(ee){var Q=qm[ee.trace.type]?n_(ee):ee.trace.index;if(!Ce[Q])q++,Ce[Q]=q,Ee.push(ee);else{var ge=Ce[Q]-1,_e=Ee[ge];ge>0&&Math.abs(ee.distance)<Math.abs(_e.distance)&&(Ee[ge]=ee)}},ve;for(ve=0;ve<Le;ve++)pe(y[ve]);for(ve=y.length-1;ve>Le-1;ve--)pe(y[ve]);y=Ee,re()}var ye=t._hoverdata,le=[],fe=s_(t),Te=f_(t);for(S=0;S<y.length;S++){var xe=y[S],be=ta.makeEventData(xe,xe.trace,xe.cd);if(xe.hovertemplate!==!1){var Ae=!1;xe.cd[xe.index]&&xe.cd[xe.index].ht&&(Ae=xe.cd[xe.index].ht),xe.hovertemplate=Ae||xe.trace.hovertemplate||!1}if(xe.xa&&xe.ya){var De=xe.x0+xe.xa._offset,Oe=xe.x1+xe.xa._offset,Fe=xe.y0+xe.ya._offset,st=xe.y1+xe.ya._offset,Xe=Math.min(De,Oe),ut=Math.max(De,Oe),Ke=Math.min(Fe,st),ft=Math.max(Fe,st);be.bbox={x0:Xe+Te,x1:ut+Te,y0:Ke+fe,y1:ft+fe}}xe.eventData=[be],le.push(be)}t._hoverdata=le;var N=b==="y"&&(x.length>1||y.length>1)||b==="closest"&&F&&y.length>1,G=Qt.combine(o.plot_bgcolor||Qt.background,o.paper_bgcolor),j=o_(y,{gd:t,hovermode:b,rotateLabels:N,bgColor:G,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance});if(ta.isUnifiedHover(b)||(jC(j,N?"xa":"ya",o),l_(j,N,o._invScaleX,o._invScaleY)),i&&i.tagName){var V=eo.getComponentMethod("annotations","hasClickToShow")(t,le);RC(Bi.select(i),V?"pointer":"")}!i||a||!UC(t,e,ye)||(ye&&t.emit("plotly_unhover",{event:e,points:ye}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:u,yaxes:d,xvals:T,yvals:k}))}function n_(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 BC=/<extra>([\s\S]*)<\/extra>/;function o_(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||Qi.HOVERFONT,v=e.fontSize||Qi.HOVERFONTSIZE,u=t[0],d=u.xa,h=u.ya,p=i.charAt(0),g=u[p+"Label"],_=bn(r,s),b=_.top,w=_.width,m=_.height,y=g!==void 0&&u.distance<=e.hoverdistance&&(i==="x"||i==="y");if(y){var x=!0,T,k;for(T=0;T<t.length;T++)if(x&&t[T].zLabel===void 0&&(x=!1),k=t[T].hoverinfo||t[T].trace.hoverinfo,k){var S=Array.isArray(k)?k:k.split("+");if(S.indexOf("all")===-1&&S.indexOf(i)===-1){y=!1;break}}x&&(y=!1)}var A=l.selectAll("g.axistext").data(y?[0]:[]);if(A.enter().append("g").classed("axistext",!0),A.exit().remove(),A.each(function(){var he=Bi.select(this),te=Gt.ensureSingle(he,"path","",function(st){st.style({"stroke-width":"1px"})}),ue=Gt.ensureSingle(he,"text","",function(st){st.attr("data-notex",1)}),Le=f.bgcolor||Qt.defaultLine,we=f.bordercolor||Qt.contrast(Le),Pe=Qt.contrast(Le),Ee={family:f.font.family||c,size:f.font.size||v,color:f.font.color||Pe};te.style({fill:Le,stroke:we}),ue.text(g).call(ka.font,Ee).call(Or.positionText,0,0).call(Or.convertToTspans,r),he.attr("transform","");var Ce=bn(r,ue.node()),q,pe;if(i==="x"){var ve=d.side==="top"?"-":"";ue.attr("text-anchor","middle").call(Or.positionText,0,d.side==="top"?b-Ce.bottom-$t-mt:b-Ce.top+$t+mt),q=d._offset+(u.x0+u.x1)/2,pe=h._offset+(d.side==="top"?0:h._length);var ye=Ce.width/2+mt;q<ye?(q=ye,te.attr("d","M-"+(ye-$t)+",0L-"+(ye-$t*2)+","+ve+$t+"H"+(mt+Ce.width/2)+"v"+ve+(mt*2+Ce.height)+"H-"+ye+"V"+ve+$t+"Z")):q>a.width-ye?(q=a.width-ye,te.attr("d","M"+(ye-$t)+",0L"+ye+","+ve+$t+"v"+ve+(mt*2+Ce.height)+"H-"+ye+"V"+ve+$t+"H"+(ye-$t*2)+"Z")):te.attr("d","M0,0L"+$t+","+ve+$t+"H"+(mt+Ce.width/2)+"v"+ve+(mt*2+Ce.height)+"H-"+(mt+Ce.width/2)+"V"+ve+$t+"H-"+$t+"Z")}else{var le,fe,Te;h.side==="right"?(le="start",fe=1,Te="",q=d._offset+d._length):(le="end",fe=-1,Te="-",q=d._offset),pe=h._offset+(u.y0+u.y1)/2,ue.attr("text-anchor",le),te.attr("d","M0,0L"+Te+$t+","+$t+"V"+(mt+Ce.height/2)+"h"+Te+(mt*2+Ce.width)+"V-"+(mt+Ce.height/2)+"H"+Te+$t+"V-"+$t+"Z");var xe=Ce.height/2,be=b-Ce.top-xe,Ae="clip"+a._uid+"commonlabel"+h._id,De;if(q<Ce.width+2*mt+$t){De="M-"+($t+mt)+"-"+xe+"h-"+(Ce.width-mt)+"V"+xe+"h"+(Ce.width-mt)+"Z";var Oe=Ce.width-q+mt;Or.positionText(ue,Oe,be),le==="end"&&ue.selectAll("tspan").each(function(){var st=Bi.select(this),Xe=ka.tester.append("text").text(st.text()).call(ka.font,Ee),ut=bn(r,Xe.node());Math.round(ut.width)<Math.round(Ce.width)&&st.attr("x",Oe-ut.width),Xe.remove()})}else Or.positionText(ue,fe*(mt+$t),be),De=null;var Fe=a._topclips.selectAll("#"+Ae).data(De?[0]:[]);Fe.enter().append("clipPath").attr("id",Ae).append("path"),Fe.exit().remove(),Fe.select("path").attr("d",De),ka.setClipUrl(ue,De?Ae:null,r)}he.attr("transform",uu(q,pe))}),ta.isUnifiedHover(i)){l.selectAll("g.hovertext").remove();var $=t.filter(function(he){return he.hoverinfo!=="none"});if($.length===0)return;var M=a.hoverlabel,C=M.font,E={showlegend:!0,legend:{title:{text:g,font:C},font:C,bgcolor:M.bgcolor,bordercolor:M.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},I={font:C};PC(E,I,r._fullData);var P=I.legend;P.entries=[];for(var R=0;R<$.length;R++){var L=$[R];if(L.hoverinfo!=="none"){var D=Xm(L,!0,i,a,g),z=D[0],F=D[1];L.name=F,F!==""?L.text=F+" : "+z:L.text=z;var H=L.cd[L.index];H&&(H.mc&&(L.mc=H.mc),H.mcc&&(L.mc=H.mcc),H.mlc&&(L.mlc=H.mlc),H.mlcc&&(L.mlc=H.mlcc),H.mlw&&(L.mlw=H.mlw),H.mrc&&(L.mrc=H.mrc),H.dir&&(L.dir=H.dir)),L._distinct=!0,P.entries.push([L])}}P.entries.sort(function(he,te){return he[0].trace.index-te[0].trace.index}),P.layer=l,P._inHover=!0,P._groupTitleFont=M.grouptitlefont,zC(r,P);var U=l.select("g.legend"),B=bn(r,U.node()),X=B.width+2*mt,O=B.height+2*mt,Y=$[0],W=(Y.x0+Y.x1)/2,K=(Y.y0+Y.y1)/2,Z=!(eo.traceIs(Y.trace,"bar-like")||eo.traceIs(Y.trace,"box-violin")),ae,ne;p==="y"?Z?(ne=K-mt,ae=K+mt):(ne=Math.min.apply(null,$.map(function(he){return Math.min(he.y0,he.y1)})),ae=Math.max.apply(null,$.map(function(he){return Math.max(he.y0,he.y1)}))):ne=ae=Gt.mean($.map(function(he){return(he.y0+he.y1)/2}))-O/2;var oe,re;p==="x"?Z?(oe=W+mt,re=W-mt):(oe=Math.max.apply(null,$.map(function(he){return Math.max(he.x0,he.x1)})),re=Math.min.apply(null,$.map(function(he){return Math.min(he.x0,he.x1)}))):oe=re=Gt.mean($.map(function(he){return(he.x0+he.x1)/2}))-X/2;var se=d._offset,me=h._offset;ae+=me,oe+=se,re+=se-X,ne+=me-O;var Re,ke;return oe+X<w&&oe>=0?Re=oe:re+X<w&&re>=0?Re=re:se+X<w?Re=se:oe-W<W-re+X?Re=w-X:Re=0,Re+=mt,ae+O<m&&ae>=0?ke=ae:ne+O<m&&ne>=0?ke=ne:me+O<m?ke=me:ae-K<K-ne+O?ke=m-O:ke=0,ke+=mt,U.attr("transform",uu(Re-1,ke-1)),U}var ze=l.selectAll("g.hovertext").data(t,function(he){return n_(he)});return ze.enter().append("g").classed("hovertext",!0).each(function(){var he=Bi.select(this);he.append("rect").call(Qt.fill,Qt.addOpacity(o,.8)),he.append("text").classed("name",!0),he.append("path").style("stroke-width","1px"),he.append("text").classed("nums",!0).call(ka.font,c,v)}),ze.exit().remove(),ze.each(function(he){var te=Bi.select(this).attr("transform",""),ue=he.color;Array.isArray(ue)&&(ue=ue[he.eventData[0].pointNumber]);var Le=he.bgcolor||ue,we=Qt.combine(Qt.opacity(Le)?Le:Qt.defaultLine,o),Pe=Qt.combine(Qt.opacity(ue)?ue:Qt.defaultLine,o),Ee=he.borderColor||Qt.contrast(we),Ce=Xm(he,y,i,a,g,te),q=Ce[0],pe=Ce[1],ve=te.select("text.nums").call(ka.font,he.fontFamily||c,he.fontSize||v,he.fontColor||Ee).text(q).attr("data-notex",1).call(Or.positionText,0,0).call(Or.convertToTspans,r),ye=te.select("text.name"),le=0,fe=0;if(pe&&pe!==q){ye.call(ka.font,he.fontFamily||c,he.fontSize||v,Pe).text(pe).attr("data-notex",1).call(Or.positionText,0,0).call(Or.convertToTspans,r);var Te=bn(r,ye.node());le=Te.width+2*mt,fe=Te.height+2*mt}else ye.remove(),te.select("rect").remove();te.select("path").style({fill:we,stroke:Ee});var xe=he.xa._offset+(he.x0+he.x1)/2,be=he.ya._offset+(he.y0+he.y1)/2,Ae=Math.abs(he.x1-he.x0),De=Math.abs(he.y1-he.y0),Oe=bn(r,ve.node()),Fe=Oe.width/a._invScaleX,st=Oe.height/a._invScaleY;he.ty0=(b-Oe.top)/a._invScaleY,he.bx=Fe+2*mt,he.by=Math.max(st+2*mt,fe),he.anchor="start",he.txwidth=Fe,he.tx2width=le,he.offset=0;var Xe=(Fe+$t+mt+le)*a._invScaleX,ut,Ke;if(n)he.pos=xe,ut=be+De/2+Xe<=m,Ke=be-De/2-Xe>=0,(he.idealAlign==="top"||!ut)&&Ke?(be-=De/2,he.anchor="end"):ut?(be+=De/2,he.anchor="start"):he.anchor="middle";else if(he.pos=be,ut=xe+Ae/2+Xe<=w,Ke=xe-Ae/2-Xe>=0,(he.idealAlign==="left"||!ut)&&Ke)xe-=Ae/2,he.anchor="end";else if(ut)xe+=Ae/2,he.anchor="start";else{he.anchor="middle";var ft=Xe/2,N=xe+ft-w,G=xe-ft;N>0&&(xe-=N),G<0&&(xe+=-G)}ve.attr("text-anchor",he.anchor),le&&ye.attr("text-anchor",he.anchor),te.attr("transform",uu(xe,be)+(n?$C(i_):""))}),ze}function Xm(t,e,r,a,i,n){var o="",l="";t.nameOverride!==void 0&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=Gt.templateString(t.name,t.trace._meta)),o=Zm(t.name,t.nameLength));var s=r.charAt(0),f=s==="x"?"y":"x";t.zLabel!==void 0?(t.xLabel!==void 0&&(l+="x: "+t.xLabel+"<br>"),t.yLabel!==void 0&&(l+="y: "+t.yLabel+"<br>"),t.trace.type!=="choropleth"&&t.trace.type!=="choroplethmapbox"&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[s+"Label"]===i?l=t[f+"Label"]||"":t.xLabel===void 0?t.yLabel!==void 0&&t.trace.type!=="scattercarpet"&&(l=t.yLabel):t.yLabel===void 0?l=t.xLabel:l="("+t.xLabel+", "+t.yLabel+")",(t.text||t.text===0)&&!Array.isArray(t.text)&&(l+=(l?"<br>":"")+t.text),t.extraText!==void 0&&(l+=(l?"<br>":"")+t.extraText),n&&l===""&&!t.hovertemplate&&(o===""&&n.remove(),l=o);var c=t.hovertemplate||!1;if(c){var v=t.hovertemplateLabels||t;t[s+"Label"]!==i&&(v[s+"other"]=v[s+"Val"],v[s+"otherLabel"]=v[s+"Label"]),l=Gt.hovertemplateString(c,v,a._d3locale,t.eventData[0]||{},t.trace._meta),l=l.replace(BC,function(u,d){return o=Zm(d,t.nameLength),""})}return[l,o]}function jC(t,e,r){var a=0,i=1,n=t.size(),o=new Array(n),l=0;t.each(function(T){var k=T[e],S=k._id.charAt(0)==="x",A=k.range;l===0&&A&&A[0]>A[1]!==S&&(i=-1),o[l++]=[{datum:T,traceIndex:T.trace.index,dp:0,pos:T.pos,posref:T.posref,size:T.by*(S?IC:1)/2,pmin:0,pmax:S?r.width:r.height}]}),o.sort(function(T,k){return T[0].posref-k[0].posref||i*(k[0].traceIndex-T[0].traceIndex)});var s,f,c,v,u,d,h;function p(T){var k=T[0],S=T[T.length-1];if(f=k.pmin-k.pos-k.dp+k.size,c=S.pos+S.dp+S.size-k.pmax,f>.01){for(u=T.length-1;u>=0;u--)T[u].dp+=f;s=!1}if(!(c<.01)){if(f<-.01){for(u=T.length-1;u>=0;u--)T[u].dp-=c;s=!1}if(!!s){var A=0;for(v=0;v<T.length;v++)d=T[v],d.pos+d.dp+d.size>k.pmax&&A++;for(v=T.length-1;v>=0&&!(A<=0);v--)d=T[v],d.pos>k.pmax-1&&(d.del=!0,A--);for(v=0;v<T.length&&!(A<=0);v++)if(d=T[v],d.pos<k.pmin+1)for(d.del=!0,A--,c=d.size*2,u=T.length-1;u>=0;u--)T[u].dp-=c;for(v=T.length-1;v>=0&&!(A<=0);v--)d=T[v],d.pos+d.dp+d.size>k.pmax&&(d.del=!0,A--)}}}for(;!s&&a<=n;){for(a++,s=!0,v=0;v<o.length-1;){var g=o[v],_=o[v+1],b=g[g.length-1],w=_[0];if(f=b.pos+b.dp+b.size-w.pos-w.dp+w.size,f>.01&&b.pmin===w.pmin&&b.pmax===w.pmax){for(u=_.length-1;u>=0;u--)_[u].dp+=f;for(g.push.apply(g,_),o.splice(v+1,1),h=0,u=g.length-1;u>=0;u--)h+=g[u].dp;for(c=h/g.length,u=g.length-1;u>=0;u--)g[u].dp-=c;s=!1}else v++}o.forEach(p)}for(v=o.length-1;v>=0;v--){var m=o[v];for(u=m.length-1;u>=0;u--){var y=m[u],x=y.datum;x.offset=y.dp,x.del=y.del}}}function l_(t,e,r,a){var i=function(o){return o*r},n=function(o){return o*a};t.each(function(o){var l=Bi.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),f=o.anchor,c=f==="end"?-1:1,v={start:1,end:-1,middle:0}[f],u=v*($t+mt),d=u+v*(o.txwidth+mt),h=0,p=o.offset,g=f==="middle";g&&(u-=o.tx2width/2,d+=o.txwidth/2+mt),e&&(p*=-FC,h=o.offset*NC),l.select("path").attr("d",g?"M-"+i(o.bx/2+o.tx2width/2)+","+n(p-o.by/2)+"h"+i(o.bx)+"v"+n(o.by)+"h-"+i(o.bx)+"Z":"M0,0L"+i(c*$t+h)+","+n($t+p)+"v"+n(o.by/2-$t)+"h"+i(c*o.bx)+"v-"+n(o.by)+"H"+i(c*$t+h)+"V"+n(p-$t)+"Z");var _=h+u,b=p+o.ty0-o.by/2+mt,w=o.textAlign||"auto";w!=="auto"&&(w==="left"&&f!=="start"?(s.attr("text-anchor","start"),_=g?-o.bx/2-o.tx2width/2+mt:-o.bx-mt):w==="right"&&f!=="end"&&(s.attr("text-anchor","end"),_=g?o.bx/2-o.tx2width/2-mt:o.bx+mt)),s.call(Or.positionText,i(_),n(b)),o.tx2width&&(l.select("text.name").call(Or.positionText,i(d+v*mt+h),n(p+o.ty0-o.by/2+mt)),l.select("rect").call(ka.setRect,i(d+(v-1)*o.tx2width/2+h),n(p-o.by/2-1),i(o.tx2width),n(o.by+2)))})}function GC(t,e){var r=t.index,a=t.trace||{},i=t.cd[0],n=t.cd[r]||{};function o(u){return u||Na(u)&&u===0}var l=Array.isArray(r)?function(u,d){var h=Gt.castOption(i,r,u);return o(h)?h:Gt.extractOption({},a,"",d)}:function(u,d){return Gt.extractOption(n,a,u,d)};function s(u,d,h){var p=l(d,h);o(p)&&(t[u]=p)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),t.posref=e==="y"||e==="closest"&&a.orientation==="h"?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=Gt.constrain(t.x0,0,t.xa._length),t.x1=Gt.constrain(t.x1,0,t.xa._length),t.y0=Gt.constrain(t.y0,0,t.ya._length),t.y1=Gt.constrain(t.y1,0,t.ya._length),t.xLabelVal!==void 0&&(t.xLabel="xLabel"in t?t.xLabel:oi.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:oi.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=oi.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;t.xerrneg!==void 0?t.xLabel+=" +"+f+" / -"+oi.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xB1 "+f,e==="x"&&(t.distance+=1)}if(!isNaN(t.yerr)&&!(t.ya.type==="log"&&t.yerr<=0)){var c=oi.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;t.yerrneg!==void 0?t.yLabel+=" +"+c+" / -"+oi.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xB1 "+c,e==="y"&&(t.distance+=1)}var v=t.hoverinfo||t.trace.hoverinfo;return v&&v!=="all"&&(v=Array.isArray(v)?v:v.split("+"),v.indexOf("x")===-1&&(t.xLabel=void 0),v.indexOf("y")===-1&&(t.yLabel=void 0),v.indexOf("z")===-1&&(t.zLabel=void 0),v.indexOf("text")===-1&&(t.text=void 0),v.indexOf("name")===-1&&(t.name=void 0)),t}function Ym(t,e,r){var a=r.container,i=r.fullLayout,n=i._size,o=r.event,l=!!e.hLinePoint,s=!!e.vLinePoint,f,c;if(a.selectAll(".spikeline").remove(),!!(s||l)){var v=Qt.combine(i.plot_bgcolor,i.paper_bgcolor);if(l){var u=e.hLinePoint,d,h;f=u&&u.xa,c=u&&u.ya;var p=c.spikesnap;p==="cursor"?(d=o.pointerX,h=o.pointerY):(d=f._offset+u.x,h=c._offset+u.y);var g=Vm.readability(u.color,v)<1.5?Qt.contrast(v):u.color,_=c.spikemode,b=c.spikethickness,w=c.spikecolor||g,m=oi.getPxPosition(t,c),y,x;if(_.indexOf("toaxis")!==-1||_.indexOf("across")!==-1){if(_.indexOf("toaxis")!==-1&&(y=m,x=d),_.indexOf("across")!==-1){var T=c._counterDomainMin,k=c._counterDomainMax;c.anchor==="free"&&(T=Math.min(T,c.position),k=Math.max(k,c.position)),y=n.l+T*n.w,x=n.l+k*n.w}a.insert("line",":first-child").attr({x1:y,x2:x,y1:h,y2:h,"stroke-width":b,stroke:w,"stroke-dasharray":ka.dashStyle(c.spikedash,b)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:y,x2:x,y1:h,y2:h,"stroke-width":b+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}_.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:m+(c.side!=="right"?b:-b),cy:h,r:b,fill:w}).classed("spikeline",!0)}if(s){var S=e.vLinePoint,A,$;f=S&&S.xa,c=S&&S.ya;var M=f.spikesnap;M==="cursor"?(A=o.pointerX,$=o.pointerY):(A=f._offset+S.x,$=c._offset+S.y);var C=Vm.readability(S.color,v)<1.5?Qt.contrast(v):S.color,E=f.spikemode,I=f.spikethickness,P=f.spikecolor||C,R=oi.getPxPosition(t,f),L,D;if(E.indexOf("toaxis")!==-1||E.indexOf("across")!==-1){if(E.indexOf("toaxis")!==-1&&(L=R,D=$),E.indexOf("across")!==-1){var z=f._counterDomainMin,F=f._counterDomainMax;f.anchor==="free"&&(z=Math.min(z,f.position),F=Math.max(F,f.position)),L=n.t+(1-F)*n.h,D=n.t+(1-z)*n.h}a.insert("line",":first-child").attr({x1:A,x2:A,y1:L,y2:D,"stroke-width":I,stroke:P,"stroke-dasharray":ka.dashStyle(f.spikedash,I)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:A,x2:A,y1:L,y2:D,"stroke-width":I+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}E.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:A,cy:R-(f.side!=="top"?I:-I),r:I,fill:P}).classed("spikeline",!0)}}}function UC(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var a=r.length-1;a>=0;a--){var i=r[a],n=t._hoverdata[a];if(i.curveNumber!==n.curveNumber||String(i.pointNumber)!==String(n.pointNumber)||String(i.pointNumbers)!==String(n.pointNumbers))return!0}return!1}function Wm(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function Zm(t,e){return Or.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function VC(t,e){for(var r=e.charAt(0),a=[],i=[],n=[],o=0;o<t.length;o++){var l=t[o];eo.traceIs(l.trace,"bar-like")||eo.traceIs(l.trace,"box-violin")?n.push(l):l.trace[r+"period"]?i.push(l):a.push(l)}return a.concat(i).concat(n)}function Km(t,e,r){var a=e[t+"a"],i=e[t+"Val"],n=e.cd[0];if(a.type==="category")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 s_(t){return t.offsetTop+t.clientTop}function f_(t){return t.offsetLeft+t.clientLeft}function bn(t,e){var r=t._fullLayout,a=e.getBoundingClientRect(),i=a.x,n=a.y,o=i+a.width,l=n+a.height,s=Gt.apply3DTransform(r._invTransform)(i,n),f=Gt.apply3DTransform(r._invTransform)(o,l),c=s[0],v=s[1],u=f[0],d=f[1];return{x:c,y:v,width:u-c,height:d-v,top:Math.min(v,d),left:Math.min(c,u),right:Math.max(c,u),bottom:Math.max(v,d)}}var qC=de.exports,XC=Je.exports,YC=Zr.isUnifiedHover,xh=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&&YC(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),n?(i.bgcolor||(i.bgcolor=XC.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),qC.coerceFont(a,"hoverlabel.font",i.font),a("hoverlabel.align",i.align)},WC=de.exports,ZC=xh,KC=Ll,QC=function(e,r){function a(i,n){return WC.coerce(e,r,KC,i,n)}ZC(e,r,a)},Qm=de.exports,JC=Uf,eD=xh,tD=function(e,r,a,i){function n(l,s){return Qm.coerce(e,r,JC,l,s)}var o=Qm.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),eD(e,r,n,o)},rD=de.exports,aD=Ll,c_=function(e,r){function a(i,n){return r[i]!==void 0?r[i]:rD.coerce(e,r,aD,i,n)}return a("clickmode"),a("hovermode")},Jm=de.exports,iD=Ll,nD=c_,oD=xh,lD=function(e,r){function a(f,c){return Jm.coerce(e,r,iD,f,c)}var i=nD(e,r);i&&(a("hoverdistance"),a("spikedistance"));var n=a("dragmode");n==="select"&&a("selectdirection");var o=r._has("mapbox"),l=r._has("geo"),s=r._basePlotModules.length;r.dragmode==="zoom"&&((o||l)&&s===1||o&&l&&s===2)&&(r.dragmode="pan"),oD(e,r,a),Jm.coerceFont(a,"hoverlabel.grouptitlefont",r.hoverlabel.font)},rd=de.exports,ey=Ve,sD=function(e){var r=e.calcdata,a=e._fullLayout;function i(f){return function(c){return rd.coerceHoverinfo({hoverinfo:c},{_module:f._module},a)}}for(var n=0;n<r.length;n++){var o=r[n],l=o[0].trace;if(!ey.traceIs(l,"pie-like")){var s=ey.traceIs(l,"2dMap")?fD:rd.fillArray;s(l.hoverinfo,o,"hi",i(l)),l.hovertemplate&&s(l.hovertemplate,o,"ht"),l.hoverlabel&&(s(l.hoverlabel.bgcolor,o,"hbg"),s(l.hoverlabel.bordercolor,o,"hbc"),s(l.hoverlabel.font.size,o,"hts"),s(l.hoverlabel.font.color,o,"htc"),s(l.hoverlabel.font.family,o,"htf"),s(l.hoverlabel.namelength,o,"hnl"),s(l.hoverlabel.align,o,"hta"))}}};function fD(t,e,r,a){a=a||rd.identity,Array.isArray(t)&&(e[0][r]=a(t))}var cD=Ve,uD=lc.hover,vD=function(e,r,a){var i=cD.getComponentMethod("annotations","onClick")(e,e._hoverdata);a!==void 0&&uD(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())},dD=tt.exports,bf=de.exports,hD=ha.exports,Eo=Zr,ty=Ll,ry=lc,ua={moduleType:"component",name:"fx",constants:Gf,schema:{layout:ty},attributes:Uf,layoutAttributes:ty,supplyLayoutGlobalDefaults:QC,supplyDefaults:tD,supplyLayoutDefaults:lD,calc:sD,getDistanceFunction:Eo.getDistanceFunction,getClosest:Eo.getClosest,inbox:Eo.inbox,quadrature:Eo.quadrature,appendArrayPointValue:Eo.appendArrayPointValue,castHoverOption:mD,castHoverinfo:yD,hover:ry.hover,unhover:hD.unhover,loneHover:ry.loneHover,loneUnhover:pD,click:vD};function pD(t){var e=bf.isD3Selection(t)?t:dD.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function mD(t,e,r){return bf.castOption(t,e,"hoverlabel."+r)}function yD(t,e,r){function a(i){return bf.coerceHoverinfo({hoverinfo:i},{_module:t._module},e)}return bf.castOption(t,r,"hoverinfo",a)}var go={};(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)}})(go);var _h=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})})},sc={},wh={exports:{}},Th={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'><defs><style>.cls-1 {fill: #3f4f75;} .cls-2 {fill: #80cfbe;} .cls-3 {fill: #fff;}</style></defs><title>plotly-logomark</title><g id='symbol'><rect class='cls-1' width='132' height='132' rx='6' ry='6'/><circle class='cls-2' cx='78' cy='54' r='6'/><circle class='cls-2' cx='102' cy='30' r='6'/><circle class='cls-2' cx='78' cy='30' r='6'/><circle class='cls-2' cx='54' cy='30' r='6'/><circle class='cls-2' cx='30' cy='30' r='6'/><circle class='cls-2' cx='30' cy='54' r='6'/><path class='cls-3' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/><path class='cls-3' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/><path class='cls-3' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/><path class='cls-3' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/></g></svg>"}},Nl={},ps=32,kh={CIRCLE_SIDES:ps,i000:0,i090:ps/4,i180:ps/2,i270:ps/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)},gD=de.exports.strTranslate;function u_(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 bD(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 xD(t){var e=t._id.charAt(0)==="y"?1:0;return function(r){return u_(t,r[e])}}function _D(t){return gD(t.xaxis._offset,t.yaxis._offset)}var Ah={p2r:u_,r2p:bD,axValue:xD,getTransform:_D};(function(t){var e=vk,r=kh,a=r.CIRCLE_SIDES,i=r.SQRT2,n=Ah,o=n.p2r,l=n.r2p,s=[0,3,4,5,6,1,2],f=[0,3,4,1,2];t.writePaths=function(u){var d=u.length;if(!d)return"M0,0Z";for(var h="",p=0;p<d;p++)for(var g=u[p].length,_=0;_<g;_++){var b=u[p][_][0];if(b==="Z")h+="Z";else for(var w=u[p][_].length,m=0;m<w;m++){var y=m;b==="Q"||b==="S"?y=f[m]:b==="C"&&(y=s[m]),h+=u[p][_][y],m>0&&m<w-1&&(h+=",")}}return h},t.readPaths=function(u,d,h,p){var g=e(u),_=[],b=-1,w=function(){b++,_[b]=[]},m,y=0,x=0,T,k,S=function(){T=y,k=x};S();for(var A=0;A<g.length;A++){var $=[],M,C,E,I,P=g[A][0],R=P;switch(P){case"M":w(),y=+g[A][1],x=+g[A][2],$.push([R,y,x]),S();break;case"Q":case"S":M=+g[A][1],E=+g[A][2],y=+g[A][3],x=+g[A][4],$.push([R,y,x,M,E]);break;case"C":M=+g[A][1],E=+g[A][2],C=+g[A][3],I=+g[A][4],y=+g[A][5],x=+g[A][6],$.push([R,y,x,M,E,C,I]);break;case"T":case"L":y=+g[A][1],x=+g[A][2],$.push([R,y,x]);break;case"H":R="L",y=+g[A][1],$.push([R,y,x]);break;case"V":R="L",x=+g[A][1],$.push([R,y,x]);break;case"A":R="L";var L=+g[A][1],D=+g[A][2];+g[A][4]||(L=-L,D=-D);var z=y-L,F=x;for(m=1;m<=a/2;m++){var H=2*Math.PI*m/a;$.push([R,z+L*Math.cos(H),F+D*Math.sin(H)])}break;case"Z":(y!==T||x!==k)&&(y=T,x=k,$.push([R,y,x]));break}for(var U=(h||{}).domain,B=d._fullLayout._size,X=h&&h.xsizemode==="pixel",O=h&&h.ysizemode==="pixel",Y=p===!1,W=0;W<$.length;W++){for(m=0;m+2<7;m+=2){var K=$[W][m+1],Z=$[W][m+2];K===void 0||Z===void 0||(y=K,x=Z,h&&(h.xaxis&&h.xaxis.p2r?(Y&&(K-=h.xaxis._offset),X?K=l(h.xaxis,h.xanchor)+K:K=o(h.xaxis,K)):(Y&&(K-=B.l),U?K=U.x[0]+K/B.w:K=K/B.w),h.yaxis&&h.yaxis.p2r?(Y&&(Z-=h.yaxis._offset),O?Z=l(h.yaxis,h.yanchor)-Z:Z=o(h.yaxis,Z)):(Y&&(Z-=B.t),U?Z=U.y[1]-Z/B.h:Z=1-Z/B.h)),$[W][m+1]=K,$[W][m+2]=Z)}_[b].push($[W].slice())}}return _};function c(u,d){return Math.abs(u-d)<=1e-6}function v(u,d){var h=d[1]-u[1],p=d[2]-u[2];return Math.sqrt(h*h+p*p)}t.pointsShapeRectangle=function(u){var d=u.length;if(d!==5)return!1;for(var h=1;h<3;h++){var p=u[0][h]-u[1][h],g=u[3][h]-u[2][h];if(!c(p,g))return!1;var _=u[0][h]-u[3][h],b=u[1][h]-u[2][h];if(!c(_,b))return!1}return!c(u[0][1],u[1][1])&&!c(u[0][1],u[3][1])?!1:!!(v(u[0],u[1])*v(u[0],u[3]))},t.pointsShapeEllipse=function(u){var d=u.length;if(d!==a+1)return!1;d=a;for(var h=0;h<d;h++){var p=(d*2-h)%d,g=(d/2+p)%d,_=(d/2+h)%d;if(!c(v(u[h],u[_]),v(u[p],u[g])))return!1}return!0},t.handleEllipse=function(u,d,h){if(!u)return[d,h];var p=t.ellipseOver({x0:d[0],y0:d[1],x1:h[0],y1:h[1]}),g=(p.x1+p.x0)/2,_=(p.y1+p.y0)/2,b=(p.x1-p.x0)/2,w=(p.y1-p.y0)/2;b||(b=w=w/i),w||(w=b=b/i);for(var m=[],y=0;y<a;y++){var x=y*2*Math.PI/a;m.push([g+b*Math.cos(x),_+w*Math.sin(x)])}return m},t.ellipseOver=function(u){var d=u.x0,h=u.y0,p=u.x1,g=u.y1,_=p-d,b=g-h;d-=_,h-=b;var w=(d+p)/2,m=(h+g)/2,y=i;return _*=y,b*=y,{x0:w-_,y0:m-b,x1:w+_,y1:m+b}}})(Nl);var v_=go,wD=v_.drawMode,TD=v_.openMode,bo=kh,ay=bo.i000,iy=bo.i090,ny=bo.i180,oy=bo.i270,kD=bo.cos45,AD=bo.sin45,d_=Ah,ms=d_.p2r,Ja=d_.r2p,MD=Rl,SD=MD.clearSelect,Mh=Nl,LD=Mh.readPaths,CD=Mh.writePaths,DD=Mh.ellipseOver,h_=function(e,r){if(!!e.length){var a=e[0][0];if(!!a){var i=a.getAttribute("d"),n=r.gd,o=n._fullLayout.newshape,l=r.plotinfo,s=l.xaxis,f=l.yaxis,c=!!l.domain||!l.xaxis,v=!!l.domain||!l.yaxis,u=r.isActiveShape,d=r.dragmode,h=(n.layout||{}).shapes||[];if(!wD(d)&&u!==void 0){var p=n._fullLayout._activeShapeIndex;if(p<h.length)switch(n._fullLayout.shapes[p].type){case"rect":d="drawrect";break;case"circle":d="drawcircle";break;case"line":d="drawline";break;case"path":var g=h[p].path||"";g[g.length-1]==="Z"?d="drawclosedpath":d="drawopenpath";break}}var _=TD(d),b=LD(i,n,l,u),w={editable:!0,xref:c?"paper":s._id,yref:v?"paper":f._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};_||(w.fillcolor=o.fillcolor,w.fillrule=o.fillrule);var m;if(b.length===1&&(m=b[0]),m&&d==="drawrect")w.type="rect",w.x0=m[0][1],w.y0=m[0][2],w.x1=m[2][1],w.y1=m[2][2];else if(m&&d==="drawline")w.type="line",w.x0=m[0][1],w.y0=m[0][2],w.x1=m[1][1],w.y1=m[1][2];else if(m&&d==="drawcircle"){w.type="circle";var y=m[ay][1],x=m[iy][1],T=m[ny][1],k=m[oy][1],S=m[ay][2],A=m[iy][2],$=m[ny][2],M=m[oy][2],C=l.xaxis&&(l.xaxis.type==="date"||l.xaxis.type==="log"),E=l.yaxis&&(l.yaxis.type==="date"||l.yaxis.type==="log");C&&(y=Ja(l.xaxis,y),x=Ja(l.xaxis,x),T=Ja(l.xaxis,T),k=Ja(l.xaxis,k)),E&&(S=Ja(l.yaxis,S),A=Ja(l.yaxis,A),$=Ja(l.yaxis,$),M=Ja(l.yaxis,M));var I=(x+k)/2,P=(S+$)/2,R=(k-x+T-y)/2,L=(M-A+$-S)/2,D=DD({x0:I,y0:P,x1:I+R*kD,y1:P+L*AD});C&&(D.x0=ms(l.xaxis,D.x0),D.x1=ms(l.xaxis,D.x1)),E&&(D.y0=ms(l.yaxis,D.y0),D.y1=ms(l.yaxis,D.y1)),w.x0=D.x0,w.y0=D.y0,w.x1=D.x1,w.y1=D.y1}else w.type="path",s&&f&&$D(b,s,f),w.path=CD(b),m=null;SD(n);for(var z=r.editHelpers,F=(z||{}).modifyItem,H=[],U=0;U<h.length;U++){var B=n._fullLayout.shapes[U];if(H[U]=B._input,u!==void 0&&U===n._fullLayout._activeShapeIndex){var X=w;switch(B.type){case"line":case"rect":case"circle":F("x0",X.x0),F("x1",X.x1),F("y0",X.y0),F("y1",X.y1);break;case"path":F("path",X.path);break}}}return u===void 0?(H.push(w),H):z?z.getUpdateObj():{}}}};function $D(t,e,r){var a=e.type==="date",i=r.type==="date";if(!a&&!i)return t;for(var n=0;n<t.length;n++)for(var o=0;o<t[n].length;o++)for(var l=0;l+2<t[n][o].length;l+=2)a&&(t[n][o][l+1]=t[n][o][l+1].replace(" ","_")),i&&(t[n][o][l+2]=t[n][o][l+2].replace(" ","_"));return t}var ly=ha.exports,ED=go,RD=ED.drawMode,PD=Ve,fc=kh,zD=fc.i000,ID=fc.i090,ND=fc.i180,FD=fc.i270,HD=Rl,OD=HD.clearOutlineControllers,Sh=Nl,ys=Sh.pointsShapeRectangle,vu=Sh.pointsShapeEllipse,BD=Sh.writePaths,jD=h_,p_=function t(e,r,a,i){i||(i=0);var n=a.gd;function o(){t(e,r,a,i++),vu(e[0])&&l({redrawing:!0})}function l(E){a.isActiveShape=!1;var I=jD(r,a);Object.keys(I).length&&PD.call((E||{}).redrawing?"relayout":"_guiRelayout",n,I)}var s=a.isActiveShape,f=n._fullLayout,c=f._zoomlayer,v=a.dragmode,u=RD(v);u?n._fullLayout._drawing=!0:n._fullLayout._activeShapeIndex>=0&&OD(n),r.attr("d",BD(e));var d,h,p,g,_;if(s&&!i){_=GD([],e);var b=c.append("g").attr("class","outline-controllers");k(b),C()}function w(E){p=+E.srcElement.getAttribute("data-i"),g=+E.srcElement.getAttribute("data-j"),d[p][g].moveFn=m}function m(E,I){if(!!e.length){var P=_[p][g][1],R=_[p][g][2],L=e[p],D=L.length;if(ys(L)){for(var z=0;z<D;z++)if(z!==g){var F=L[z];F[1]===L[g][1]&&(F[1]=P+E),F[2]===L[g][2]&&(F[2]=R+I)}if(L[g][1]=P+E,L[g][2]=R+I,!ys(L))for(var H=0;H<D;H++)for(var U=0;U<L[H].length;U++)L[H][U]=_[p][H][U]}else L[g][1]=P+E,L[g][2]=R+I;o()}}function y(){l()}function x(){if(!!e.length&&!!e[p]&&!!e[p].length){for(var E=[],I=0;I<e[p].length;I++)I!==g&&E.push(e[p][I]);E.length>1&&!(E.length===2&&E[1][0]==="Z")&&(g===0&&(E[0][0]="M"),e[p]=E,o(),l())}}function T(E,I){if(E===2){p=+I.srcElement.getAttribute("data-i"),g=+I.srcElement.getAttribute("data-j");var P=e[p];!ys(P)&&!vu(P)&&x()}}function k(E){d=[];for(var I=0;I<e.length;I++){var P=e[I],R=ys(P),L=!R&&vu(P);d[I]=[];for(var D=0;D<P.length;D++)if(P[D][0]!=="Z"&&!(L&&D!==zD&&D!==ID&&D!==ND&&D!==FD)){var z=P[D][1],F=P[D][2],H=E.append("circle").classed("cursor-grab",!0).attr("data-i",I).attr("data-j",D).attr("cx",z).attr("cy",F).attr("r",4).style({"mix-blend-mode":"luminosity",fill:"black",stroke:"white","stroke-width":1});d[I][D]={element:H.node(),gd:n,prepFn:w,doneFn:y,clickFn:T},ly.init(d[I][D])}}}function S(E,I){if(!!e.length)for(var P=0;P<e.length;P++)for(var R=0;R<e[P].length;R++)for(var L=0;L+2<e[P][R].length;L+=2)e[P][R][L+1]=_[P][R][L+1]+E,e[P][R][L+2]=_[P][R][L+2]+I}function A(E,I){S(E,I),o()}function $(E){p=+E.srcElement.getAttribute("data-i"),p||(p=0),h[p].moveFn=A}function M(){l()}function C(){if(h=[],!!e.length){var E=0;h[E]={element:r[0][0],gd:n,prepFn:$,doneFn:M},ly.init(h[E])}}};function GD(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}var Lh={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}},cc={};(function(t){var e=Lh,r=de.exports;t.rangeToShapePosition=function(a){return a.type==="log"?a.r2d:function(i){return i}},t.shapePositionToRange=function(a){return a.type==="log"?a.d2r:function(i){return i}},t.decodeDate=function(a){return function(i){return i.replace&&(i=i.replace("_"," ")),a(i)}},t.encodeDate=function(a){return function(i){return a(i).replace(" ","_")}},t.extractPathCoords=function(a,i){var n=[],o=a.match(e.segmentRE);return o.forEach(function(l){var s=i[l.charAt(0)].drawn;if(s!==void 0){var f=l.substr(1).match(e.paramRE);!f||f.length<s||n.push(r.cleanNumber(f[s]))}}),n},t.getDataToPixel=function(a,i,n,o){var l=a._fullLayout._size,s;if(i)if(o==="domain")s=function(c){return i._length*(n?1-c:c)+i._offset};else{var f=t.shapePositionToRange(i);s=function(c){return i._offset+i.r2p(f(c,!0))},i.type==="date"&&(s=t.decodeDate(s))}else n?s=function(c){return l.t+l.h*(1-c)}:s=function(c){return l.l+l.w*c};return s},t.getPixelToData=function(a,i,n,o){var l=a._fullLayout._size,s;if(i)if(o==="domain")s=function(c){var v=(c-i._offset)/i._length;return n?1-v:v};else{var f=t.rangeToShapePosition(i);s=function(c){return f(i.p2r(c-i._offset))}}else n?s=function(c){return 1-(c-l.t)/l.h}:s=function(c){return(c-l.l)/l.w};return s},t.roundPositionForSharpStrokeRendering=function(a,i){var n=Math.round(i%2)===1,o=Math.round(a);return n?o+.5:o},t.makeOptionsAndPlotinfo=function(a,i){var n=a._fullLayout.shapes[i]||{},o=a._fullLayout._plots[n.xref+n.yref],l=!!o;return l?o._hadPlotinfo=!0:(o={},n.xref&&n.xref!=="paper"&&(o.xaxis=a._fullLayout[n.xref+"axis"]),n.yref&&n.yref!=="paper"&&(o.yaxis=a._fullLayout[n.yref+"axis"])),o.xsizemode=n.xsizemode,o.ysizemode=n.ysizemode,o.xanchor=n.xanchor,o.yanchor=n.yanchor,{options:n,plotinfo:o}}})(cc);var m_=Ve,ad=de.exports,Ma=Ct.exports,UD=Nl.readPaths,VD=p_,y_=Rl.clearOutlineControllers,du=Je.exports,Ch=Tt.exports,qD=Mt.arrayEditor,sy=ha.exports,fy=xi,qr=Lh,sr=cc,g_={draw:Dh,drawOne:b_,eraseActiveShape:ZD};function Dh(t){var e=t._fullLayout;e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove();for(var r in e._plots){var a=e._plots[r].shapelayer;a&&a.selectAll("path").remove()}for(var i=0;i<e.shapes.length;i++)e.shapes[i].visible&&b_(t,i)}function gs(t){return!!t._fullLayout._drawing}function uc(t){return!t._context.edits.shapePosition}function b_(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=sr.makeOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input||a.visible===!1)return;if(a.layer!=="below")o(t._fullLayout._shapeUpperLayer);else if(a.xref==="paper"||a.yref==="paper")o(t._fullLayout._shapeLowerLayer);else if(i._hadPlotinfo){var n=i.mainplotinfo||i;o(n.shapelayer)}else o(t._fullLayout._shapeLowerLayer);function o(l){var s=id(t,a),f={"data-index":e,"fill-rule":a.fillrule,d:s},c=a.opacity,v=a.fillcolor,u=a.line.width?a.line.color:"rgba(0,0,0,0)",d=a.line.width,h=a.line.dash;!d&&a.editable===!0&&(d=5,h="solid");var p=s[s.length-1]!=="Z",g=uc(t)&&a.editable&&t._fullLayout._activeShapeIndex===e;g&&(v=p?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,c=t._fullLayout.activeshape.opacity);var _=l.append("path").attr(f).style("opacity",c).call(du.stroke,u).call(du.fill,v).call(Ch.dashLine,h,d);x_(_,t,a);var b;if((g||t._context.edits.shapePosition)&&(b=qD(t.layout,"shapes",a)),g){_.style({cursor:"move"});var w={element:_.node(),plotinfo:i,gd:t,editHelpers:b,isActiveShape:!0},m=UD(s,t);VD(m,_,w)}else t._context.edits.shapePosition?XD(t,_,a,e,l,b):a.editable===!0&&_.style("pointer-events",p||du.opacity(v)*c<=.5?"stroke":"all");_.node().addEventListener("click",function(){return WD(t,_)})}}function x_(t,e,r){var a=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");Ch.setClipUrl(t,a?"clip"+e._fullLayout._uid+a:null,e)}function XD(t,e,r,a,i,n){var o=10,l=10,s=r.xsizemode==="pixel",f=r.ysizemode==="pixel",c=r.type==="line",v=r.type==="path",u=n.modifyItem,d,h,p,g,_,b,w,m,y,x,T,k,S,A,$,M=Ma.getFromId(t,r.xref),C=Ma.getRefType(r.xref),E=Ma.getFromId(t,r.yref),I=Ma.getRefType(r.yref),P=sr.getDataToPixel(t,M,!1,C),R=sr.getDataToPixel(t,E,!0,I),L=sr.getPixelToData(t,M,!1,C),D=sr.getPixelToData(t,E,!0,I),z=U(),F={element:z.node(),gd:t,prepFn:O,doneFn:Y,clickFn:W},H;sy.init(F),z.node().onmousemove=X;function U(){return c?B():e}function B(){var re=10,se=Math.max(r.line.width,re),me=i.append("g").attr("data-index",a);me.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":se,"stroke-opacity":"0"});var Re={"fill-opacity":"0"},ke=Math.max(se/2,re);return me.append("circle").attr({"data-line-point":"start-point",cx:s?P(r.xanchor)+r.x0:P(r.x0),cy:f?R(r.yanchor)-r.y0:R(r.y0),r:ke}).style(Re).classed("cursor-grab",!0),me.append("circle").attr({"data-line-point":"end-point",cx:s?P(r.xanchor)+r.x1:P(r.x1),cy:f?R(r.yanchor)-r.y1:R(r.y1),r:ke}).style(Re).classed("cursor-grab",!0),me}function X(re){if(gs(t)){H=null;return}if(c)re.target.tagName==="path"?H="move":H=re.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var se=F.element.getBoundingClientRect(),me=se.right-se.left,Re=se.bottom-se.top,ke=re.clientX-se.left,ze=re.clientY-se.top,he=!v&&me>o&&Re>l&&!re.shiftKey?sy.getCursor(ke/me,1-ze/Re):"move";fy(e,he),H=he.split("-")[0]}}function O(re){gs(t)||(s&&(_=P(r.xanchor)),f&&(b=R(r.yanchor)),r.type==="path"?$=r.path:(d=s?r.x0:P(r.x0),h=f?r.y0:R(r.y0),p=s?r.x1:P(r.x1),g=f?r.y1:R(r.y1)),d<p?(y=d,S="x0",x=p,A="x1"):(y=p,S="x1",x=d,A="x0"),!f&&h<g||f&&h>g?(w=h,T="y0",m=g,k="y1"):(w=g,T="y1",m=h,k="y0"),X(re),ae(i,r),oe(e,r,t),F.moveFn=H==="move"?K:Z,F.altKey=re.altKey)}function Y(){gs(t)||(fy(e),ne(i),x_(e,t,r),m_.call("_guiRelayout",t,n.getUpdateObj()))}function W(){gs(t)||ne(i)}function K(re,se){if(r.type==="path"){var me=function(ze){return ze},Re=me,ke=me;s?u("xanchor",r.xanchor=L(_+re)):(Re=function(he){return L(P(he)+re)},M&&M.type==="date"&&(Re=sr.encodeDate(Re))),f?u("yanchor",r.yanchor=D(b+se)):(ke=function(he){return D(R(he)+se)},E&&E.type==="date"&&(ke=sr.encodeDate(ke))),u("path",r.path=cy($,Re,ke))}else s?u("xanchor",r.xanchor=L(_+re)):(u("x0",r.x0=L(d+re)),u("x1",r.x1=L(p+re))),f?u("yanchor",r.yanchor=D(b+se)):(u("y0",r.y0=D(h+se)),u("y1",r.y1=D(g+se)));e.attr("d",id(t,r)),ae(i,r)}function Z(re,se){if(v){var me=function(le){return le},Re=me,ke=me;s?u("xanchor",r.xanchor=L(_+re)):(Re=function(fe){return L(P(fe)+re)},M&&M.type==="date"&&(Re=sr.encodeDate(Re))),f?u("yanchor",r.yanchor=D(b+se)):(ke=function(fe){return D(R(fe)+se)},E&&E.type==="date"&&(ke=sr.encodeDate(ke))),u("path",r.path=cy($,Re,ke))}else if(c){if(H==="resize-over-start-point"){var ze=d+re,he=f?h-se:h+se;u("x0",r.x0=s?ze:L(ze)),u("y0",r.y0=f?he:D(he))}else if(H==="resize-over-end-point"){var te=p+re,ue=f?g-se:g+se;u("x1",r.x1=s?te:L(te)),u("y1",r.y1=f?ue:D(ue))}}else{var Le=function(le){return H.indexOf(le)!==-1},we=Le("n"),Pe=Le("s"),Ee=Le("w"),Ce=Le("e"),q=we?w+se:w,pe=Pe?m+se:m,ve=Ee?y+re:y,ye=Ce?x+re:x;f&&(we&&(q=w-se),Pe&&(pe=m-se)),(!f&&pe-q>l||f&&q-pe>l)&&(u(T,r[T]=f?q:D(q)),u(k,r[k]=f?pe:D(pe))),ye-ve>o&&(u(S,r[S]=s?ve:L(ve)),u(A,r[A]=s?ye:L(ye)))}e.attr("d",id(t,r)),ae(i,r)}function ae(re,se){(s||f)&&me();function me(){var Re=se.type!=="path",ke=re.selectAll(".visual-cue").data([0]),ze=1;ke.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ze}).classed("visual-cue",!0);var he=P(s?se.xanchor:ad.midRange(Re?[se.x0,se.x1]:sr.extractPathCoords(se.path,qr.paramIsX))),te=R(f?se.yanchor:ad.midRange(Re?[se.y0,se.y1]:sr.extractPathCoords(se.path,qr.paramIsY)));if(he=sr.roundPositionForSharpStrokeRendering(he,ze),te=sr.roundPositionForSharpStrokeRendering(te,ze),s&&f){var ue="M"+(he-1-ze)+","+(te-1-ze)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ke.attr("d",ue)}else if(s){var Le="M"+(he-1-ze)+","+(te-9-ze)+"v18 h2 v-18 Z";ke.attr("d",Le)}else{var we="M"+(he-9-ze)+","+(te-1-ze)+"h18 v2 h-18 Z";ke.attr("d",we)}}}function ne(re){re.selectAll(".visual-cue").remove()}function oe(re,se,me){var Re=se.xref,ke=se.yref,ze=Ma.getFromId(me,Re),he=Ma.getFromId(me,ke),te="";Re!=="paper"&&!ze.autorange&&(te+=Re),ke!=="paper"&&!he.autorange&&(te+=ke),Ch.setClipUrl(re,te?"clip"+me._fullLayout._uid+te:null,me)}}function id(t,e){var r=e.type,a=Ma.getRefType(e.xref),i=Ma.getRefType(e.yref),n=Ma.getFromId(t,e.xref),o=Ma.getFromId(t,e.yref),l=t._fullLayout._size,s,f,c,v,u,d,h,p;if(n?a==="domain"?f=function(S){return n._offset+n._length*S}:(s=sr.shapePositionToRange(n),f=function(S){return n._offset+n.r2p(s(S,!0))}):f=function(S){return l.l+l.w*S},o?i==="domain"?v=function(S){return o._offset+o._length*(1-S)}:(c=sr.shapePositionToRange(o),v=function(S){return o._offset+o.r2p(c(S,!0))}):v=function(S){return l.t+l.h*(1-S)},r==="path")return n&&n.type==="date"&&(f=sr.decodeDate(f)),o&&o.type==="date"&&(v=sr.decodeDate(v)),YD(e,f,v);if(e.xsizemode==="pixel"){var g=f(e.xanchor);u=g+e.x0,d=g+e.x1}else u=f(e.x0),d=f(e.x1);if(e.ysizemode==="pixel"){var _=v(e.yanchor);h=_-e.y0,p=_-e.y1}else h=v(e.y0),p=v(e.y1);if(r==="line")return"M"+u+","+h+"L"+d+","+p;if(r==="rect")return"M"+u+","+h+"H"+d+"V"+p+"H"+u+"Z";var b=(u+d)/2,w=(h+p)/2,m=Math.abs(b-u),y=Math.abs(w-h),x="A"+m+","+y,T=b+m+","+w,k=b+","+(w-y);return"M"+T+x+" 0 1,1 "+k+x+" 0 0,1 "+T+"Z"}function YD(t,e,r){var a=t.path,i=t.xsizemode,n=t.ysizemode,o=t.xanchor,l=t.yanchor;return a.replace(qr.segmentRE,function(s){var f=0,c=s.charAt(0),v=qr.paramIsX[c],u=qr.paramIsY[c],d=qr.numParams[c],h=s.substr(1).replace(qr.paramRE,function(p){return v[f]?i==="pixel"?p=e(o)+Number(p):p=e(p):u[f]&&(n==="pixel"?p=r(l)-Number(p):p=r(p)),f++,f>d&&(p="X"),p});return f>d&&(h=h.replace(/[\s,]*X.*/,""),ad.log("Ignoring extra params in segment "+s)),c+h})}function cy(t,e,r){return t.replace(qr.segmentRE,function(a){var i=0,n=a.charAt(0),o=qr.paramIsX[n],l=qr.paramIsY[n],s=qr.numParams[n],f=a.substr(1).replace(qr.paramRE,function(c){return i>=s||(o[i]?c=e(c):l[i]&&(c=r(c)),i++),c});return n+f})}function WD(t,e){if(!!uc(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeShapeIndex){uy(t);return}t._fullLayout._activeShapeIndex=a,t._fullLayout._deactivateShape=uy,Dh(t)}}}function uy(t){if(!!uc(t)){var e=t._fullLayout._activeShapeIndex;e>=0&&(y_(t),delete t._fullLayout._activeShapeIndex,Dh(t))}}function ZD(t){if(!!uc(t)){y_(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var a=[],i=0;i<r.length;i++)i!==e&&a.push(r[i]);delete t._fullLayout._activeShapeIndex,m_.call("_guiRelayout",t,{shapes:a})}}}var Kr=Ve,__=Ut.exports,w_=Vt,gt=Th,KD=g_.eraseActiveShape,Fn=de.exports,pt=Fn._,bt=wh.exports={};bt.toImage={name:"toImage",title:function(t){var e=t._context.toImageButtonOptions||{},r=e.format||"png";return r==="png"?pt(t,"Download plot as a png"):pt(t,"Download plot")},icon:gt.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};Fn.notifier(pt(t,"Taking snapshot - this may take a few seconds"),"long"),r.format!=="svg"&&Fn.isIE()&&(Fn.notifier(pt(t,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach(function(a){a in e&&(r[a]=e[a])}),Kr.call("downloadImage",t,r).then(function(a){Fn.notifier(pt(t,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){Fn.notifier(pt(t,"Sorry, there was a problem downloading your snapshot!"),"long")})}};bt.sendDataToCloud={name:"sendDataToCloud",title:function(t){return pt(t,"Edit in Chart Studio")},icon:gt.disk,click:function(t){__.sendDataToCloud(t)}};bt.editInChartStudio={name:"editInChartStudio",title:function(t){return pt(t,"Edit in Chart Studio")},icon:gt.pencil,click:function(t){__.sendDataToCloud(t)}};bt.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return pt(t,"Zoom")},attr:"dragmode",val:"zoom",icon:gt.zoombox,click:gr};bt.pan2d={name:"pan2d",_cat:"pan",title:function(t){return pt(t,"Pan")},attr:"dragmode",val:"pan",icon:gt.pan,click:gr};bt.select2d={name:"select2d",_cat:"select",title:function(t){return pt(t,"Box Select")},attr:"dragmode",val:"select",icon:gt.selectbox,click:gr};bt.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return pt(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:gt.lasso,click:gr};bt.drawclosedpath={name:"drawclosedpath",title:function(t){return pt(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:gt.drawclosedpath,click:gr};bt.drawopenpath={name:"drawopenpath",title:function(t){return pt(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:gt.drawopenpath,click:gr};bt.drawline={name:"drawline",title:function(t){return pt(t,"Draw line")},attr:"dragmode",val:"drawline",icon:gt.drawline,click:gr};bt.drawrect={name:"drawrect",title:function(t){return pt(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:gt.drawrect,click:gr};bt.drawcircle={name:"drawcircle",title:function(t){return pt(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:gt.drawcircle,click:gr};bt.eraseshape={name:"eraseshape",title:function(t){return pt(t,"Erase active shape")},icon:gt.eraseshape,click:KD};bt.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:gt.zoom_plus,click:gr};bt.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:gt.zoom_minus,click:gr};bt.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return pt(t,"Autoscale")},attr:"zoom",val:"auto",icon:gt.autoscale,click:gr};bt.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return pt(t,"Reset axes")},attr:"zoom",val:"reset",icon:gt.home,click:gr};bt.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return pt(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:gt.tooltip_basic,gravity:"ne",click:gr};bt.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return pt(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:gt.tooltip_compare,gravity:"ne",click:gr};function gr(t,e){var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o={},l=w_.list(t,null,!0),s=n._cartesianSpikesEnabled,f,c;if(a==="zoom"){var v=i==="in"?.5:2,u=(1+v)/2,d=(1-v)/2,h;for(c=0;c<l.length;c++)if(f=l[c],!f.fixedrange)if(h=f._name,i==="auto")o[h+".autorange"]=!0;else if(i==="reset"){if(f._rangeInitial===void 0)o[h+".autorange"]=!0;else{var p=f._rangeInitial.slice();o[h+".range[0]"]=p[0],o[h+".range[1]"]=p[1]}f._showSpikeInitial!==void 0&&(o[h+".showspikes"]=f._showSpikeInitial,s==="on"&&!f._showSpikeInitial&&(s="off"))}else{var g=[f.r2l(f.range[0]),f.r2l(f.range[1])],_=[u*g[0]+d*g[1],u*g[1]+d*g[0]];o[h+".range[0]"]=f.l2r(_[0]),o[h+".range[1]"]=f.l2r(_[1])}}else a==="hovermode"&&(i==="x"||i==="y")&&(i=n._isHoriz?"y":"x",r.setAttribute("data-val",i)),o[a]=i;n._cartesianSpikesEnabled=s,Kr.call("_guiRelayout",t,o)}bt.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return pt(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:gt.zoombox,click:vc};bt.pan3d={name:"pan3d",_cat:"pan",title:function(t){return pt(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:gt.pan,click:vc};bt.orbitRotation={name:"orbitRotation",title:function(t){return pt(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:gt["3d_rotate"],click:vc};bt.tableRotation={name:"tableRotation",title:function(t){return pt(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:gt["z-axis"],click:vc};function vc(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,Kr.call("_guiRelayout",t,o)}bt.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return pt(t,"Reset camera to default")},attr:"resetDefault",icon:gt.home,click:$h};bt.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return pt(t,"Reset camera to last save")},attr:"resetLastSave",icon:gt.movie,click:$h};function $h(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=a==="resetLastSave",n=a==="resetDefault",o=t._fullLayout,l=o._subplots.gl3d||[],s={},f=0;f<l.length;f++){var c=l[f],v=c+".camera",u=c+".aspectratio",d=c+".aspectmode",h=o[c]._scene,p;i?(s[v+".up"]=h.viewInitial.up,s[v+".eye"]=h.viewInitial.eye,s[v+".center"]=h.viewInitial.center,p=!0):n&&(s[v+".up"]=null,s[v+".eye"]=null,s[v+".center"]=null,p=!0),p&&(s[u+".x"]=h.viewInitial.aspectratio.x,s[u+".y"]=h.viewInitial.aspectratio.y,s[u+".z"]=h.viewInitial.aspectratio.z,s[d]=h.viewInitial.aspectmode)}Kr.call("_guiRelayout",t,s)}bt.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:gt.tooltip_basic,gravity:"ne",click:QD};function T_(t,e){var r=e.currentTarget,a=r._previousVal,i=t._fullLayout,n=i._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],l={},s={};if(a)s=a,r._previousVal=null;else{for(var f=0;f<n.length;f++){var c=n[f],v=i[c],u=c+".hovermode";l[u]=v.hovermode,s[u]=!1;for(var d=0;d<3;d++){var h=o[d],p=c+"."+h+".showspikes";s[p]=!1,l[p]=v[h].showspikes}}r._previousVal=l}return s}function QD(t,e){var r=T_(t,e);Kr.call("_guiRelayout",t,r)}bt.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:gt.zoom_plus,click:Eh};bt.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:gt.zoom_minus,click:Eh};bt.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return pt(t,"Reset")},attr:"reset",val:null,icon:gt.autoscale,click:Eh};bt.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:gt.tooltip_basic,gravity:"ne",click:Rh};function Eh(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o=n._subplots.geo||[],l=0;l<o.length;l++){var s=o[l],f=n[s];if(a==="zoom"){var c=f.projection.scale,v=i==="in"?2*c:.5*c;Kr.call("_guiRelayout",t,s+".projection.scale",v)}}a==="reset"&&xf(t,"geo")}bt.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:gt.tooltip_basic,gravity:"ne",click:Rh};bt.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:gt.tooltip_basic,gravity:"ne",click:Rh};function k_(t){var e=t._fullLayout;return e.hovermode?!1:e._has("cartesian")?e._isHoriz?"y":"x":"closest"}function Rh(t){var e=k_(t);Kr.call("_guiRelayout",t,"hovermode",e)}bt.resetViewSankey={name:"resetSankeyGroup",title:function(t){return pt(t,"Reset view")},icon:gt.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())}Kr.call("restyle",t,e)}};bt.toggleHover={name:"toggleHover",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:gt.tooltip_basic,gravity:"ne",click:function(t,e){var r=T_(t,e);r.hovermode=k_(t),Kr.call("_guiRelayout",t,r)}};bt.resetViews={name:"resetViews",title:function(t){return pt(t,"Reset views")},icon:gt.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),gr(t,e),r.setAttribute("data-attr","resetLastSave"),$h(t,e),xf(t,"geo"),xf(t,"mapbox")}};bt.toggleSpikelines={name:"toggleSpikelines",title:function(t){return pt(t,"Toggle Spike Lines")},icon:gt.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled=r==="on"?"off":"on",Kr.call("_guiRelayout",t,JD(t))}};function JD(t){for(var e=t._fullLayout,r=e._cartesianSpikesEnabled==="on",a=w_.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}bt.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return pt(t,"Reset view")},attr:"reset",icon:gt.home,click:function(t){xf(t,"mapbox")}};bt.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:gt.zoom_plus,click:A_};bt.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:gt.zoom_minus,click:A_};function A_(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-val"),i=t._fullLayout,n=i._subplots.mapbox||[],o=1.05,l={},s=0;s<n.length;s++){var f=n[s],c=i[f].zoom,v=a==="in"?o*c:c/o;l[f+".zoom"]=v}Kr.call("_guiRelayout",t,l)}function xf(t,e){for(var r=t._fullLayout,a=r._subplots[e]||[],i={},n=0;n<a.length;n++)for(var o=a[n],l=r[o]._subplot,s=l.viewInitial,f=Object.keys(s),c=0;c<f.length;c++){var v=f[c];i[o+"."+v]=s[v]}Kr.call("_guiRelayout",t,i)}var M_=wh.exports,e5=Object.keys(M_),S_=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],L_=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(S_),Bn=[],t5=function(t){if(L_.indexOf(t._cat||t.name)===-1){var e=t.name,r=(t._cat||t.name).toLowerCase();Bn.indexOf(e)===-1&&Bn.push(e),Bn.indexOf(r)===-1&&Bn.push(r)}};e5.forEach(function(t){t5(M_[t])});Bn.sort();var C_={DRAW_MODES:S_,backButtons:L_,foreButtons:Bn},vy=C_,D_={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 *"+vy.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 *"+vy.foreButtons.join("*, *")+"*."].join(" ")}},r5=de.exports,Ro=Je.exports,a5=Mt,i5=D_,n5=function(e,r){var a=e.modebar||{},i=a5.newContainer(r,"modebar");function n(l,s){return r5.coerce(a,i,i5,l,s)}n("orientation"),n("bgcolor",Ro.addOpacity(r.paper_bgcolor,.5));var o=Ro.contrast(Ro.rgb(r.modebar.bgcolor));n("color",Ro.addOpacity(o,.3)),n("activecolor",Ro.addOpacity(o,.7)),n("uirevision",r.uirevision),n("add"),n("remove")},Ph=tt.exports,o5=lt,Ha=de.exports,$_=Th,l5=jf.version,s5=new DOMParser;function E_(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var $a=E_.prototype;$a.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,a=this.graphInfo._fullLayout,i="modebar-"+a._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",e=e.reverse());var n=a.modebar,o=r.displayModeBar==="hover"?".js-plotly-plot .plotly:hover ":"";Ha.deleteRelatedStyleRule(i),Ha.addRelatedStyleRule(i,o+"#"+i+" .modebar-group","background-color: "+n.bgcolor),Ha.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+n.color),Ha.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+n.activecolor),Ha.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+n.activecolor);var l=!this.hasButtons(e),s=this.hasLogo!==r.displaylogo,f=this.locale!==r.locale;if(this.locale=r.locale,(l||s||f)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton()};$a.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)})};$a.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t};$a.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var a=t.title;a===void 0?a=t.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&r.setAttribute("data-title",a),t.attr!==void 0&&r.setAttribute("data-attr",t.attr);var i=t.val;i!==void 0&&(typeof i=="function"&&(i=i(this.graphInfo)),r.setAttribute("data-val",i));var n=t.click;if(typeof n!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(l){t.click(e.graphInfo,l),e.updateActiveButton(l.currentTarget)}),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&Ph.select(r).classed("active",!0);var o=t.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||$_.question)),r.setAttribute("data-gravity",t.gravity||"n"),r};$a.createIcon=function(t){var e=o5(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=s5.parseFromString(t.svg,"application/xml");a=n.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};$a.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=Ph.select(a);if(o)n===r&&l.classed("active",!l.classed("active"));else{var s=n===null?n:Ha.nestedProperty(e,n).get();l.classed("active",s===i)}})};$a.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 f5(t){return t+" (v"+l5+")"}$a.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",f5(Ha._(this.graphInfo,"Produced with Plotly.js"))),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon($_.newplotlylogo)),t.appendChild(e),t};$a.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};$a.destroy=function(){Ha.removeElement(this.container.querySelector(".modebar")),Ha.deleteRelatedStyleRule(this._uid)};function c5(t,e){var r=t._fullLayout,a=new E_({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&Ph.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}var u5=c5,v5=Vt,dy=mr,nd=Ve,d5=Zr.isUnifiedHover,h5=u5,_f=wh.exports,p5=C_.DRAW_MODES,m5=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=w5(n):!a.displayModeBar&&a.watermark?o=[]:o=y5(e),i?i.update(e,o):r._modeBar=h5(e,o)};function y5(t){var e=t._fullLayout,r=t._fullData,a=t._context;function i(L,D){if(typeof D=="string"){if(D.toLowerCase()===L.toLowerCase())return!0}else{var z=D.name,F=D._cat||D.name;if(z===L||F===L.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(L){for(var D=0;D<a.modeBarButtonsToRemove.length;D++)if(i(L,a.modeBarButtonsToRemove[D]))return!1;return!0})),s=a.modeBarButtonsToRemove.concat(o.filter(function(L){for(var D=0;D<a.modeBarButtonsToAdd.length;D++)if(i(L,a.modeBarButtonsToAdd[D]))return!1;return!0})),f=e._has("cartesian"),c=e._has("gl3d"),v=e._has("geo"),u=e._has("pie"),d=e._has("funnelarea"),h=e._has("gl2d"),p=e._has("ternary"),g=e._has("mapbox"),_=e._has("polar"),b=e._has("smith"),w=e._has("sankey"),m=g5(e),y=d5(e.hovermode),x=[];function T(L){if(!!L.length){for(var D=[],z=0;z<L.length;z++){for(var F=L[z],H=_f[F],U=H.name.toLowerCase(),B=(H._cat||H.name).toLowerCase(),X=!1,O=0;O<s.length;O++){var Y=s[O].toLowerCase();if(Y===U||Y===B){X=!0;break}}X||D.push(_f[F])}x.push(D)}}var k=["toImage"];a.showEditInChartStudio?k.push("editInChartStudio"):a.showSendToCloud&&k.push("sendDataToCloud"),T(k);var S=[],A=[],$=[],M=[];(f||h||u||d||p)+v+c+g+_+b>1?(A=["toggleHover"],$=["resetViews"]):v?(S=["zoomInGeo","zoomOutGeo"],A=["hoverClosestGeo"],$=["resetGeo"]):c?(A=["hoverClosest3d"],$=["resetCameraDefault3d","resetCameraLastSave3d"]):g?(S=["zoomInMapbox","zoomOutMapbox"],A=["toggleHover"],$=["resetViewMapbox"]):h?A=["hoverClosestGl2d"]:u?A=["hoverClosestPie"]:w?(A=["hoverClosestCartesian","hoverCompareCartesian"],$=["resetViewSankey"]):A=["toggleHover"],f&&(A=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(x5(r)||y)&&(A=[]),(f||h)&&!m&&(S=["zoomIn2d","zoomOut2d","autoScale2d"],$[0]!=="resetViews"&&($=["resetScale2d"])),c?M=["zoom3d","pan3d","orbitRotation","tableRotation"]:(f||h)&&!m||p?M=["zoom2d","pan2d"]:g||v?M=["pan2d"]:_&&(M=["zoom2d"]),b5(r)&&M.push("select2d","lasso2d");var C=[],E=function(L){C.indexOf(L)===-1&&A.indexOf(L)!==-1&&C.push(L)};if(Array.isArray(l)){for(var I=[],P=0;P<l.length;P++){var R=l[P];typeof R=="string"?(R=R.toLowerCase(),p5.indexOf(R)!==-1?(e._has("mapbox")||e._has("cartesian"))&&M.push(R):R==="togglespikelines"?E("toggleSpikelines"):R==="togglehover"?E("toggleHover"):R==="hovercompare"?E("hoverCompareCartesian"):R==="hoverclosest"?(E("hoverClosestCartesian"),E("hoverClosestGeo"),E("hoverClosest3d"),E("hoverClosestGl2d"),E("hoverClosestPie")):R==="v1hovermode"&&(E("toggleHover"),E("hoverClosestCartesian"),E("hoverCompareCartesian"),E("hoverClosestGeo"),E("hoverClosest3d"),E("hoverClosestGl2d"),E("hoverClosestPie"))):I.push(R)}l=I}return T(M),T(S.concat($)),T(C),_5(x,l)}function g5(t){for(var e=v5.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}function b5(t){for(var e=!1,r=0;r<t.length&&!e;r++){var a=t[r];!a._module||!a._module.selectPoints||(nd.traceIs(a,"scatter-like")?(dy.hasMarkers(a)||dy.hasText(a))&&(e=!0):nd.traceIs(a,"box-violin")?(a.boxpoints==="all"||a.points==="all")&&(e=!0):e=!0)}return e}function x5(t){for(var e=0;e<t.length;e++)if(!nd.traceIs(t[e],"noHover"))return!1;return!0}function _5(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 w5(t){for(var e=0;e<t.length;e++)for(var r=t[e],a=0;a<r.length;a++){var i=r[a];if(typeof i=="string")if(_f[i]!==void 0)t[e][a]=_f[i];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return t}var R_={moduleType:"component",name:"modebar",layoutAttributes:D_,supplyLayoutDefaults:n5,manage:m5},Xa={},T5=Lr.FROM_BL,P_=function(e,r,a){a===void 0&&(a=T5[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()},Ni=de.exports,hu=Il,aa=Vt.id2name,k5=Ua,hy=P_,A5=oh,M5=Ot.ALMOST_EQUAL,S5=Lr.FROM_BL;Xa.handleDefaults=function(t,e,r){var a=r.axIds,i=r.axHasImage,n=e._axisConstraintGroups=[],o=e._axisMatchGroups=[],l,s,f,c,v,u,d,h;for(l=0;l<a.length;l++)c=aa(a[l]),v=t[c],u=e[c],L5(v,u,{axIds:a,layoutOut:e,hasImage:i[c]});function p(k,S){for(l=0;l<k.length;l++){s=k[l];for(f in s)e[aa(f)][S]=s}}for(p(o,"_matchGroup"),l=0;l<n.length;l++){s=n[l];for(f in s)if(u=e[aa(f)],u.fixedrange){for(var g in s){var _=aa(g);(t[_]||{}).fixedrange===!1&&Ni.warn("fixedrange was specified as false for axis "+_+" but was overridden because another axis in its constraint group has fixedrange true"),e[_].fixedrange=!0}break}}for(l=0;l<n.length;){s=n[l];for(f in s){u=e[aa(f)],u._matchGroup&&Object.keys(u._matchGroup).length===Object.keys(s).length&&(n.splice(l,1),l--);break}l++}p(n,"_constraintGroup");var b=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],w=!1,m=!1;function y(){h=u[d],d==="rangebreaks"&&(m=u._hasDayOfWeekBreaks)}for(l=0;l<o.length;l++){s=o[l];for(var x=0;x<b.length;x++){d=b[x],h=null;var T;for(f in s)if(c=aa(f),v=t[c],u=e[c],d in u){if(!u.matches&&(T=u,d in v)){y();break}h===null&&d in v&&y()}if(d==="range"&&h&&(w=!0),d==="autorange"&&h===null&&w&&(h=!1),h===null&&d in T&&(h=T[d]),h!==null)for(f in s)u=e[aa(f)],u[d]=d==="range"?h.slice():h,d==="rangebreaks"&&(u._hasDayOfWeekBreaks=m,A5(u,e))}}};function L5(t,e,r){var a=r.axIds,i=r.layoutOut,n=r.hasImage,o=i._axisConstraintGroups,l=i._axisMatchGroups,s=e._id,f=s.charAt(0),c=((i._splomAxes||{})[f]||{})[s]||{},v=e._id,u=v.charAt(0)==="x";e._matchGroup=null,e._constraintGroup=null;function d(M,C){return Ni.coerce(t,e,k5,M,C)}d("constrain",n?"domain":"range"),Ni.coerce(t,e,{constraintoward:{valType:"enumerated",values:u?["left","center","right"]:["bottom","middle","top"],dflt:u?"center":"middle"}},"constraintoward");var h=e.type,p,g,_=[];for(p=0;p<a.length;p++)if(g=a[p],g!==v){var b=i[aa(g)];b.type===h&&_.push(g)}var w=z_(o,v);if(w){var m=[];for(p=0;p<_.length;p++)g=_[p],w[g]||m.push(g);_=m}var y=_.length,x,T;y&&(t.matches||c.matches)&&(x=Ni.coerce(t,e,{matches:{valType:"enumerated",values:_,dflt:_.indexOf(c.matches)!==-1?c.matches:void 0}},"matches"));var k=n&&!u?e.anchor:void 0;if(y&&!x&&(t.scaleanchor||k)&&(T=Ni.coerce(t,e,{scaleanchor:{valType:"enumerated",values:_}},"scaleanchor",k)),x){e._matchGroup=pu(l,v,x,1);var S=i[aa(x)],A=py(i,e)/py(i,S);u!==(x.charAt(0)==="x")&&(A=(u?"x":"y")+A),pu(o,v,x,A)}else t.matches&&a.indexOf(t.matches)!==-1&&Ni.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(T){var $=d("scaleratio");$||($=e.scaleratio=1),pu(o,v,T,$)}else t.scaleanchor&&a.indexOf(t.scaleanchor)!==-1&&Ni.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 py(t,e){var r=e.domain;return r||(r=t[aa(e.overlaying)].domain),r[1]-r[0]}function z_(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function pu(t,e,r,a){var i,n,o,l,s,f=z_(t,e);f===null?(f={},f[e]=1,s=t.length,t.push(f)):s=t.indexOf(f);var c=Object.keys(f);for(i=0;i<t.length;i++)if(o=t[i],i!==s&&o[r]){var v=o[r];for(n=0;n<c.length;n++)l=c[n],o[l]=mu(v,mu(a,f[l]));t.splice(s,1);return}if(a!==1)for(n=0;n<c.length;n++){var u=c[n];f[u]=mu(a,f[u])}f[r]=1}function mu(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 C5(t,e){for(var r=e._size,a=r.h/r.w,i={},n=Object.keys(t),o=0;o<n.length;o++){var l=n[o],s=t[l];if(typeof s=="string"){var f=s.match(/^[xy]*/)[0],c=f.length;s=+s.substr(c);for(var v=f.charAt(0)==="y"?a:1/a,u=0;u<c;u++)s*=v}i[l]=s}return i}Xa.enforce=function(e){var r=e._fullLayout,a=r._axisConstraintGroups||[],i,n,o,l,s,f,c,v;for(i=0;i<a.length;i++){o=C5(a[i],r);var u=Object.keys(o),d=1/0,h=0,p=1/0,g={},_={},b=!1;for(n=0;n<u.length;n++)l=u[n],_[l]=s=r[aa(l)],s._inputDomain?s.domain=s._inputDomain.slice():s._inputDomain=s.domain.slice(),s._inputRange||(s._inputRange=s.range.slice()),s.setScale(),g[l]=f=Math.abs(s._m)/o[l],d=Math.min(d,f),(s.constrain==="domain"||!s._constraintShrinkable)&&(p=Math.min(p,f)),delete s._constraintShrinkable,h=Math.max(h,f),s.constrain==="domain"&&(b=!0);if(!(d>M5*h&&!b)){for(n=0;n<u.length;n++)if(l=u[n],f=g[l],s=_[l],c=s.constrain,f!==p||c==="domain")if(v=f/p,c==="range")hy(s,v);else{var w=s._inputDomain,m=(s.domain[1]-s.domain[0])/(w[1]-w[0]),y=(s.r2l(s.range[1])-s.r2l(s.range[0]))/(s.r2l(s._inputRange[1])-s.r2l(s._inputRange[0]));if(v/=m,v*y<1){s.domain=s._input.domain=w.slice(),hy(s,v);continue}if(y<1&&(s.range=s._input.range=s._inputRange.slice(),v*=y),s.autorange){var x=s.r2l(s.range[0]),T=s.r2l(s.range[1]),k=(x+T)/2,S=k,A=k,$=Math.abs(T-k),M=k-$*v*1.0001,C=k+$*v*1.0001,E=hu.makePadFn(r,s,0),I=hu.makePadFn(r,s,1);my(s,v);var P=Math.abs(s._m),R=hu.concatExtremes(e,s),L=R.min,D=R.max,z,F;for(F=0;F<L.length;F++)z=L[F].val-E(L[F])/P,z>M&&z<S&&(S=z);for(F=0;F<D.length;F++)z=D[F].val+I(D[F])/P,z<C&&z>A&&(A=z);var H=(A-S)/(2*$);v/=H,S=s.l2r(S),A=s.l2r(A),s.range=s._input.range=x<T?[S,A]:[A,S]}my(s,v)}}}};Xa.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};Xa.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 my(t,e){var r=t._inputDomain,a=S5[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=tt.exports,r=Ve,a=Ut.exports,i=de.exports,n=_h,o=Je.exports,l=Tt.exports,s=rc,f=R_,c=Ct.exports,v=Lr,u=Xa,d=u.enforce,h=u.clean,p=Il.doAutoRange,g="start",_="middle",b="end";t.layoutStyles=function(M){return i.syncOrAsync([a.doAutoMargin,m],M)};function w(M,C,E){for(var I=0;I<E.length;I++){var P=E[I][0],R=E[I][1];if(!(P[0]>=M[1]||P[1]<=M[0])&&R[0]<C[1]&&R[1]>C[0])return!0}return!1}function m(M){var C=M._fullLayout,E=C._size,I=E.p,P=c.list(M,"",!0),R,L,D,z,F,H;if(C._paperdiv.style({width:M._context.responsive&&C.autosize&&!M._context._hasZeroWidth&&!M.layout.width?"100%":C.width+"px",height:M._context.responsive&&C.autosize&&!M._context._hasZeroHeight&&!M.layout.height?"100%":C.height+"px"}).selectAll(".main-svg").call(l.setSize,C.width,C.height),M._context.setBackground(M,C.paper_bgcolor),t.drawMainTitle(M),f.manage(M),!C._has("cartesian"))return a.previousPromises(M);function U(Oe,Fe,st){var Xe=Oe._lw/2;if(Oe._id.charAt(0)==="x"){if(Fe){if(st==="top")return Fe._offset-I-Xe}else return E.t+E.h*(1-(Oe.position||0))+Xe%1;return Fe._offset+Fe._length+I+Xe}if(Fe){if(st==="right")return Fe._offset+Fe._length+I+Xe}else return E.l+E.w*(Oe.position||0)+Xe%1;return Fe._offset-I-Xe}for(R=0;R<P.length;R++){z=P[R];var B=z._anchorAxis;z._linepositions={},z._lw=l.crispRound(M,z.linewidth,1),z._mainLinePosition=U(z,B,z.side),z._mainMirrorPosition=z.mirror&&B?U(z,B,v.OPPOSITE_SIDE[z.side]):null}var X=[],O=[],Y=[],W=o.opacity(C.paper_bgcolor)===1&&o.opacity(C.plot_bgcolor)===1&&C.paper_bgcolor===C.plot_bgcolor;for(L in C._plots)if(D=C._plots[L],D.mainplot)D.bg&&D.bg.remove(),D.bg=void 0;else{var K=D.xaxis.domain,Z=D.yaxis.domain,ae=D.plotgroup;if(w(K,Z,Y)){var ne=ae.node(),oe=D.bg=i.ensureSingle(ae,"rect","bg");ne.insertBefore(oe.node(),ne.childNodes[0]),O.push(L)}else ae.select("rect.bg").remove(),Y.push([K,Z]),W||(X.push(L),O.push(L))}var re=C._bgLayer.selectAll(".bg").data(X);for(re.enter().append("rect").classed("bg",!0),re.exit().remove(),re.each(function(Oe){C._plots[Oe].bg=e.select(this)}),R=0;R<O.length;R++)D=C._plots[O[R]],F=D.xaxis,H=D.yaxis,D.bg&&F._offset!==void 0&&H._offset!==void 0&&D.bg.call(l.setRect,F._offset-I,H._offset-I,F._length+2*I,H._length+2*I).call(o.fill,C.plot_bgcolor).style("stroke-width",0);if(!C._hasOnlyLargeSploms)for(L in C._plots){D=C._plots[L],F=D.xaxis,H=D.yaxis;var se=D.clipId="clip"+C._uid+L+"plot",me=i.ensureSingleById(C._clips,"clipPath",se,function(Oe){Oe.classed("plotclip",!0).append("rect")});D.clipRect=me.select("rect").attr({width:F._length,height:H._length}),l.setTranslate(D.plot,F._offset,H._offset);var Re,ke;D._hasClipOnAxisFalse?(Re=null,ke=se):(Re=se,ke=null),l.setClipUrl(D.plot,Re,M),D.layerClipId=ke}var ze,he,te,ue,Le,we,Pe,Ee,Ce,q,pe,ve,ye;function le(Oe){return"M"+ze+","+Oe+"H"+he}function fe(Oe){return"M"+F._offset+","+Oe+"h"+F._length}function Te(Oe){return"M"+Oe+","+Ee+"V"+Pe}function xe(Oe){return"M"+Oe+","+H._offset+"v"+H._length}function be(Oe,Fe,st){if(!Oe.showline||L!==Oe._mainSubplot)return"";if(!Oe._anchorAxis)return st(Oe._mainLinePosition);var Xe=Fe(Oe._mainLinePosition);return Oe.mirror&&(Xe+=Fe(Oe._mainMirrorPosition)),Xe}for(L in C._plots){D=C._plots[L],F=D.xaxis,H=D.yaxis;var Ae="M0,0";y(F,L)&&(Le=T(F,"left",H,P),ze=F._offset-(Le?I+Le:0),we=T(F,"right",H,P),he=F._offset+F._length+(we?I+we:0),te=U(F,H,"bottom"),ue=U(F,H,"top"),ye=!F._anchorAxis||L!==F._mainSubplot,ye&&(F.mirror==="allticks"||F.mirror==="all")&&(F._linepositions[L]=[te,ue]),Ae=be(F,le,fe),ye&&F.showline&&(F.mirror==="all"||F.mirror==="allticks")&&(Ae+=le(te)+le(ue)),D.xlines.style("stroke-width",F._lw+"px").call(o.stroke,F.showline?F.linecolor:"rgba(0,0,0,0)")),D.xlines.attr("d",Ae);var De="M0,0";y(H,L)&&(pe=T(H,"bottom",F,P),Pe=H._offset+H._length+(pe?I:0),ve=T(H,"top",F,P),Ee=H._offset-(ve?I:0),Ce=U(H,F,"left"),q=U(H,F,"right"),ye=!H._anchorAxis||L!==H._mainSubplot,ye&&(H.mirror==="allticks"||H.mirror==="all")&&(H._linepositions[L]=[Ce,q]),De=be(H,Te,xe),ye&&H.showline&&(H.mirror==="all"||H.mirror==="allticks")&&(De+=Te(Ce)+Te(q)),D.ylines.style("stroke-width",H._lw+"px").call(o.stroke,H.showline?H.linecolor:"rgba(0,0,0,0)")),D.ylines.attr("d",De)}return c.makeClipPaths(M),a.previousPromises(M)}function y(M,C){return(M.ticks||M.showline)&&(C===M._mainSubplot||M.mirror==="all"||M.mirror==="allticks")}function x(M,C,E){if(!E.showline||!E._lw)return!1;if(E.mirror==="all"||E.mirror==="allticks")return!0;var I=E._anchorAxis;if(!I)return!1;var P=v.FROM_BL[C];return E.side===C?I.domain[P]===M.domain[P]:E.mirror&&I.domain[1-P]===M.domain[1-P]}function T(M,C,E,I){if(x(M,C,E))return E._lw;for(var P=0;P<I.length;P++){var R=I[P];if(R._mainAxis===E._mainAxis&&x(M,C,R))return R._lw}return 0}t.drawMainTitle=function(M){var C=M._fullLayout,E=A(C),I=$(C);s.draw(M,"gtitle",{propContainer:C,propName:"title.text",placeholder:C._dfltTitle.plot,attributes:{x:k(C,E),y:S(C,I),"text-anchor":E,dy:I}})};function k(M,C){var E=M.title,I=M._size,P=0;switch(C===g?P=E.pad.l:C===b&&(P=-E.pad.r),E.xref){case"paper":return I.l+I.w*E.x+P;case"container":default:return M.width*E.x+P}}function S(M,C){var E=M.title,I=M._size,P=0;if(C==="0em"||!C?P=-E.pad.b:C===v.CAP_SHIFT+"em"&&(P=E.pad.t),E.y==="auto")return I.t/2;switch(E.yref){case"paper":return I.t+I.h-I.h*E.y+P;case"container":default:return M.height-M.height*E.y+P}}function A(M){var C=M.title,E=_;return i.isRightAnchor(C)?E=b:i.isLeftAnchor(C)&&(E=g),E}function $(M){var C=M.title,E="0em";return i.isTopAnchor(C)?E=v.CAP_SHIFT+"em":i.isMiddleAnchor(C)&&(E=v.MID_SHIFT+"em"),E}t.doTraceStyle=function(M){var C=M.calcdata,E=[],I;for(I=0;I<C.length;I++){var P=C[I],R=P[0]||{},L=R.trace||{},D=L._module||{},z=D.arraysToCalcdata;z&&z(P,L);var F=D.editStyle;F&&E.push({fn:F,cd0:R})}if(E.length){for(I=0;I<E.length;I++){var H=E[I];H.fn(M,H.cd0)}n(M),t.redrawReglTraces(M)}return a.style(M),r.getComponentMethod("legend","draw")(M),a.previousPromises(M)},t.doColorBars=function(M){return r.getComponentMethod("colorbar","draw")(M),a.previousPromises(M)},t.layoutReplot=function(M){var C=M.layout;return M.layout=void 0,r.call("_doPlot",M,"",C)},t.doLegend=function(M){return r.getComponentMethod("legend","draw")(M),a.previousPromises(M)},t.doTicksRelayout=function(M){return c.draw(M,"redraw"),M._fullLayout._hasOnlyLargeSploms&&(r.subplotsRegistry.splom.updateGrid(M),n(M),t.redrawReglTraces(M)),t.drawMainTitle(M),a.previousPromises(M)},t.doModeBar=function(M){var C=M._fullLayout;f.manage(M);for(var E=0;E<C._basePlotModules.length;E++){var I=C._basePlotModules[E].updateFx;I&&I(M)}return a.previousPromises(M)},t.doCamera=function(M){for(var C=M._fullLayout,E=C._subplots.gl3d,I=0;I<E.length;I++){var P=C[E[I]],R=P._scene;R.setViewport(P)}},t.drawData=function(M){var C=M._fullLayout;n(M);for(var E=C._basePlotModules,I=0;I<E.length;I++)E[I].plot(M);return t.redrawReglTraces(M),a.style(M),r.getComponentMethod("shapes","draw")(M),r.getComponentMethod("annotations","draw")(M),r.getComponentMethod("images","draw")(M),C._replotting=!1,a.previousPromises(M)},t.redrawReglTraces=function(M){var C=M._fullLayout;if(C._has("regl")){var E=M._fullData,I=[],P=[],R,L;for(C._hasOnlyLargeSploms&&C._splomGrid.draw(),R=0;R<E.length;R++){var D=E[R];D.visible===!0&&D._length!==0&&(D.type==="splom"?C._splomScenes[D.uid].draw():D.type==="scattergl"?i.pushUnique(I,D.xaxis+D.yaxis):D.type==="scatterpolargl"&&i.pushUnique(P,D.subplot))}for(R=0;R<I.length;R++)L=C._plots[I[R]],L._scene&&L._scene.draw();for(R=0;R<P.length;R++)L=C[P[R]]._subplot,L._scene&&L._scene.draw()}},t.doAutoRangeAndConstraints=function(M){for(var C=c.list(M,"",!0),E,I={},P=0;P<C.length;P++)if(E=C[P],!I[E._id]){I[E._id]=1,h(M,E),p(M,E);var R=E._matchGroup;if(R)for(var L in R){var D=c.getFromId(M,L);p(M,D,E.range),I[L]=1}}d(M)},t.finalDraw=function(M){r.getComponentMethod("rangeslider","draw")(M),r.getComponentMethod("rangeselector","draw")(M)},t.drawMarginPushers=function(M){r.getComponentMethod("legend","draw")(M),r.getComponentMethod("rangeselector","draw")(M),r.getComponentMethod("sliders","draw")(M),r.getComponentMethod("updatemenus","draw")(M),r.getComponentMethod("colorbar","draw")(M)}})(sc);var zh={exports:{}},yu=Xf.dot,bs=Ot.BADNUM,wf=zh.exports={};wf.tester=function(e){var r=e.slice(),a=r[0][0],i=a,n=r[0][1],o=n,l;for(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(h){return h[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(h){return h[1]===r[0][1]}));function c(h,p){var g=h[0],_=h[1];return!(g===bs||g<a||g>i||_===bs||_<n||_>o||p&&f(h))}function v(h,p){var g=h[0],_=h[1];if(g===bs||g<a||g>i||_===bs||_<n||_>o)return!1;var b=r.length,w=r[0][0],m=r[0][1],y=0,x,T,k,S,A;for(x=1;x<b;x++)if(T=w,k=m,w=r[x][0],m=r[x][1],S=Math.min(T,w),!(g<S||g>Math.max(T,w)||_>Math.max(k,m)))if(_<Math.min(k,m))g!==S&&y++;else{if(w===T?A=_:A=k+(g-T)*(m-k)/(w-T),_===A)return!(x===1&&p);_<=A&&g!==S&&y++}return y%2===1}var u=!0,d=r[0];for(l=1;l<r.length;l++)if(d[0]!==r[l][0]||d[1]!==r[l][1]){u=!1;break}return{xmin:a,xmax:i,ymin:n,ymax:o,pts:r,contains:s?c:v,isRect:s,degenerate:u}};wf.isSegmentBent=function(e,r,a,i){var n=e[r],o=[e[a][0]-n[0],e[a][1]-n[1]],l=yu(o,o),s=Math.sqrt(l),f=[-o[1]/s,o[0]/s],c,v,u;for(c=r+1;c<a;c++)if(v=[e[c][0]-n[0],e[c][1]-n[1]],u=yu(v,o),u<0||u>l||Math.abs(yu(v,f))>i)return!0;return!1};wf.filter=function(e,r){var a=[e[0]],i=0,n=0;function o(s){e.push(s);var f=a.length,c=i;a.splice(n+1);for(var v=c+1;v<e.length;v++)(v===e.length-1||wf.isSegmentBent(e,c,v+1,r))&&(a.push(e[v]),a.length<f-2&&(i=v,n=a.length-1),c=v)}if(e.length>1){var l=e.pop();o(l)}return{addPt:o,raw:e,filtered:a}};var yy=dk,I_=Ve,D5=Tt.exports.dashStyle,gy=Je.exports,$5=ua,E5=Zr.makeEventData,Fl=go,R5=Fl.freeMode,P5=Fl.rectMode,Tf=Fl.drawMode,Ih=Fl.openMode,z5=Fl.selectMode,N_=p_,gu=Nl.handleEllipse,I5=h_,bu=de.exports,Nh=zh.exports,Po=Zf,by=Vt.getFromId,N5=_h,F5=sc.redrawReglTraces,Zs=pr,xa=Zs.MINSELECT,H5=Nh.filter,O5=Nh.tester,F_=Rl.clearSelect,Fh=Ah,xy=Fh.p2r,B5=Fh.axValue,j5=Fh.getTransform;function G5(t,e,r,a,i){var n=R5(i),o=P5(i),l=Ih(i),s=Tf(i),f=z5(i),c=i==="drawline",v=i==="drawcircle",u=c||v,d=a.gd,h=d._fullLayout,p=h._zoomlayer,g=a.element.getBoundingClientRect(),_=a.plotinfo,b=j5(_),w=e-g.left,m=r-g.top;h._calcInverseTransform(d);var y=bu.apply3DTransform(h._invTransform)(w,m);w=y[0],m=y[1];var x=h._invScaleX,T=h._invScaleY,k=w,S=m,A="M"+w+","+m,$=a.xaxes[0]._length,M=a.yaxes[0]._length,C=a.xaxes.concat(a.yaxes),E=t.altKey&&!(Tf(i)&&l),I,P,R,L,D,z,F;B_(t,d,a),n&&(I=H5([[w,m]],Zs.BENDPX));var H=p.selectAll("path.select-outline-"+_.id).data(s?[0]:[1,2]),U=h.newshape;H.enter().append("path").attr("class",function(Z){return"select-outline select-outline-"+Z+" select-outline-"+_.id}).style(s?{opacity:U.opacity/2,fill:l?void 0:U.fillcolor,stroke:U.line.color,"stroke-dasharray":D5(U.line.dash,U.line.width),"stroke-width":U.line.width+"px"}:{}).attr("fill-rule",U.fillrule).classed("cursor-move",!!s).attr("transform",b).attr("d",A+"Z");var B=p.append("path").attr("class","zoombox-corners").style({fill:gy.background,stroke:gy.defaultLine,"stroke-width":1}).attr("transform",b).attr("d","M0,0Z"),X=h._uid+Zs.SELECTID,O=[],Y=j_(d,a.xaxes,a.yaxes,a.subplot);function W(Z,ae){return Z-ae}var K;_.fillRangeItems?K=_.fillRangeItems:o?K=function(Z,ae){var ne=Z.range={};for(D=0;D<C.length;D++){var oe=C[D],re=oe._id.charAt(0);ne[oe._id]=[xy(oe,ae[re+"min"]),xy(oe,ae[re+"max"])].sort(W)}}:K=function(Z,ae,ne){var oe=Z.lassoPoints={};for(D=0;D<C.length;D++){var re=C[D];oe[re._id]=ne.filtered.map(B5(re))}},a.moveFn=function(Z,ae){k=Math.max(0,Math.min($,x*Z+w)),S=Math.max(0,Math.min(M,T*ae+m));var ne=Math.abs(k-w),oe=Math.abs(S-m);if(o){var re,se,me;if(f){var Re=h.selectdirection;switch(Re==="any"?oe<Math.min(ne*.6,xa)?re="h":ne<Math.min(oe*.6,xa)?re="v":re="d":re=Re,re){case"h":se=v?M/2:0,me=M;break;case"v":se=v?$/2:0,me=$;break}}if(s)switch(h.newshape.drawdirection){case"vertical":re="h",se=v?M/2:0,me=M;break;case"horizontal":re="v",se=v?$/2:0,me=$;break;case"ortho":ne<oe?(re="h",se=m,me=S):(re="v",se=w,me=k);break;default:re="d"}re==="h"?(L=u?gu(v,[k,se],[k,me]):[[w,se],[w,me],[k,me],[k,se]],L.xmin=u?k:Math.min(w,k),L.xmax=u?k:Math.max(w,k),L.ymin=Math.min(se,me),L.ymax=Math.max(se,me),B.attr("d","M"+L.xmin+","+(m-xa)+"h-4v"+2*xa+"h4ZM"+(L.xmax-1)+","+(m-xa)+"h4v"+2*xa+"h-4Z")):re==="v"?(L=u?gu(v,[se,S],[me,S]):[[se,m],[se,S],[me,S],[me,m]],L.xmin=Math.min(se,me),L.xmax=Math.max(se,me),L.ymin=u?S:Math.min(m,S),L.ymax=u?S:Math.max(m,S),B.attr("d","M"+(w-xa)+","+L.ymin+"v-4h"+2*xa+"v4ZM"+(w-xa)+","+(L.ymax-1)+"v4h"+2*xa+"v-4Z")):re==="d"&&(L=u?gu(v,[w,m],[k,S]):[[w,m],[w,S],[k,S],[k,m]],L.xmin=Math.min(w,k),L.xmax=Math.max(w,k),L.ymin=Math.min(m,S),L.ymax=Math.max(m,S),B.attr("d","M0,0Z"))}else n&&(I.addPt([k,S]),L=I.filtered);a.selectionDefs&&a.selectionDefs.length?(R=Z5(a.mergedPolygons,L,E),L.subtract=E,P=O_(a.selectionDefs.concat([L]))):(R=[L],P=O5(L)),N_(U_(R,l),H,a),f&&Po.throttle(X,Zs.SELECTDELAY,function(){O=[];var ke,ze;for(D=0;D<Y.length;D++)if(z=Y[D],ze=z._module.selectPoints(z,P),ke=G_(ze,z),O.length)for(var he=0;he<ke.length;he++)O.push(ke[he]);else O=ke;F={points:O},kf(d,Y,F),K(F,L,I),a.gd.emit("plotly_selecting",F)})},a.clickFn=function(Z,ae){if(B.remove(),d._fullLayout._activeShapeIndex>=0){d._fullLayout._deactivateShape(d);return}if(!s){var ne=h.clickmode;Po.done(X).then(function(){if(Po.clear(X),Z===2){for(H.remove(),D=0;D<Y.length;D++)z=Y[D],z._module.selectPoints(z,!1);kf(d,Y),yl(a),d.emit("plotly_deselect",null)}else ne.indexOf("select")>-1&&H_(ae,d,a.xaxes,a.yaxes,a.subplot,a,H),ne==="event"&&d.emit("plotly_selected",void 0);$5.click(d,ae)}).catch(bu.error)}},a.doneFn=function(){B.remove(),Po.done(X).then(function(){Po.clear(X),a.gd.emit("plotly_selected",F),L&&a.selectionDefs&&(L.subtract=E,a.selectionDefs.push(L),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,R)),a.doneFnCompleted&&a.doneFnCompleted(O)}).catch(bu.error),s&&yl(a)}}function H_(t,e,r,a,i,n,o){var l=e._hoverdata,s=e._fullLayout,f=s.clickmode,c=f.indexOf("event")>-1,v=[],u,d,h,p,g,_,b,w,m,y;if(q5(l)){B_(t,e,n),u=j_(e,r,a,i);var x=X5(l,u),T=x.pointNumbers.length>0;if(T?Y5(u,x):W5(u)&&(b=_y(x))){for(o&&o.remove(),y=0;y<u.length;y++)d=u[y],d._module.selectPoints(d,!1);kf(e,u),yl(n),c&&e.emit("plotly_deselect",null)}else{w=t.shiftKey&&(b!==void 0?b:_y(x)),h=U5(x.pointNumber,x.searchInfo,w);var k=n.selectionDefs.concat([h]);for(p=O_(k),y=0;y<u.length;y++)if(g=u[y]._module.selectPoints(u[y],p),_=G_(g,u[y]),v.length)for(var S=0;S<_.length;S++)v.push(_[S]);else v=_;if(m={points:v},kf(e,u,m),h&&n&&n.selectionDefs.push(h),o){var A=n.mergedPolygons,$=Ih(n.dragmode);N_(U_(A,$),o,n)}c&&e.emit("plotly_selected",m)}}}function U5(t,e,r){return{pointNumber:t,searchInfo:e,subtract:r}}function xu(t){return"pointNumber"in t&&"searchInfo"in t}function V5(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,a,i){var n=t.searchInfo.cd[0].trace._expandedIndex,o=i.cd[0].trace._expandedIndex;return o===n&&a===t.pointNumber},isRect:!1,degenerate:!1,subtract:t.subtract}}function O_(t){for(var e=[],r=xu(t[0])?0:t[0][0][0],a=r,i=xu(t[0])?0:t[0][0][1],n=i,o=0;o<t.length;o++)if(xu(t[o]))e.push(V5(t[o]));else{var l=Nh.tester(t[o]);l.subtract=t[o].subtract,e.push(l),r=Math.min(r,l.xmin),a=Math.max(a,l.xmax),i=Math.min(i,l.ymin),n=Math.max(n,l.ymax)}function s(f,c,v,u){for(var d=!1,h=0;h<e.length;h++)e[h].contains(f,c,v,u)&&(d=e[h].subtract===!1);return d}return{xmin:r,xmax:a,ymin:i,ymax:n,pts:[],contains:s,isRect:!1,degenerate:!1}}function B_(t,e,r){e._fullLayout._drawing=!1;var a=e._fullLayout,i=r.plotinfo,n=r.dragmode,o=a._lastSelectedSubplot&&a._lastSelectedSubplot===i.id,l=(t.shiftKey||t.altKey)&&!(Tf(n)&&Ih(n));o&&l&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!l||!i.selection)&&yl(r),o||(F_(e),a._lastSelectedSubplot=i.id)}function yl(t){var e=t.dragmode,r=t.plotinfo,a=t.gd;if(a._fullLayout._activeShapeIndex>=0&&a._fullLayout._deactivateShape(a),Tf(e)){var i=a._fullLayout,n=i._zoomlayer,o=n.selectAll(".select-outline-"+r.id);if(o&&a._fullLayout._drawing){var l=I5(o,t);l&&I_.call("_guiRelayout",a,{shapes:l}),a._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=t.selectionDefs=[],r.selection.mergedPolygons=t.mergedPolygons=[]}function j_(t,e,r,a){var i=[],n=e.map(function(d){return d._id}),o=r.map(function(d){return d._id}),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(a&&(s.subplot===a||s.geo===a))i.push(u(s._module,l,e[0],r[0]));else if(s.type==="splom"&&s._xaxes[n[0]]&&s._yaxes[o[0]]){var c=u(s._module,l,e[0],r[0]);c.scene=t._fullLayout._splomScenes[s.uid],i.push(c)}else if(s.type==="sankey"){var v=u(s._module,l,e[0],r[0]);i.push(v)}else{if(n.indexOf(s.xaxis)===-1||o.indexOf(s.yaxis)===-1)continue;i.push(u(s._module,l,by(t,s.xaxis),by(t,s.yaxis)))}return i;function u(d,h,p,g){return{_module:d,cd:h,xaxis:p,yaxis:g}}}function q5(t){return t&&Array.isArray(t)&&t[0].hoverOnBox!==!0}function X5(t,e){var r=t[0],a=-1,i=[],n,o;for(o=0;o<e.length;o++)if(n=e[o],r.fullData._expandedIndex===n.cd[0].trace._expandedIndex){if(r.hoverOnBox===!0)break;r.pointNumber!==void 0?a=r.pointNumber:r.binNumber!==void 0&&(a=r.binNumber,i=r.pointNumbers);break}return{pointNumber:a,pointNumbers:i,searchInfo:n}}function _y(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 Y5(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 W5(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 kf(t,e,r){var a,i,n,o;for(a=0;a<e.length;a++){var l=e[a].cd[0].trace._fullInput,s=t._fullLayout._tracePreGUI[l.uid]||{};s.selectedpoints===void 0&&(s.selectedpoints=l._input.selectedpoints||null)}if(r){var f=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(a=0;a<f.length;a++){var c=f[a],v=c.data,u=c.fullData;c.pointIndices?([].push.apply(v.selectedpoints,c.pointIndices),o._fullInput!==o&&[].push.apply(u.selectedpoints,c.pointIndices)):(v.selectedpoints.push(c.pointIndex),o._fullInput!==o&&u.selectedpoints.push(c.pointIndex))}}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;var d=!1;for(a=0;a<e.length;a++){i=e[a],n=i.cd,o=n[0].trace,I_.traceIs(o,"regl")&&(d=!0);var h=i._module,p=h.styleOnSelect||h.style;p&&(p(t,n,n[0].node3),n[0].nodeRangePlot3&&p(t,n,n[0].nodeRangePlot3))}d&&(N5(t),F5(t))}function Z5(t,e,r){var a;return r?(a=yy.difference({regions:t,inverted:!1},{regions:[e],inverted:!1}),a.regions):(a=yy.union({regions:t,inverted:!1},{regions:[e],inverted:!1}),a.regions)}function G_(t,e){if(Array.isArray(t))for(var r=e.cd,a=e.cd[0].trace,i=0;i<t.length;i++)t[i]=E5(t[i],a,r);return t}function U_(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}var dc={prepSelect:G5,clearSelect:F_,clearSelectionsCache:yl,selectOnClick:H_},Hh=tt.exports,Ur=de.exports,wy=Ur.numberFormat,K5=Wr.exports,Q5=ix,xs=Ve,V_=Ur.strTranslate,J5=ir,Ty=Je.exports,ri=Tt.exports,e3=ua,ky=Ct.exports,t3=xi,r3=ha.exports,q_=go,_s=q_.selectingOrDrawing,a3=q_.freeMode,i3=Lr.FROM_TL,n3=_h,o3=sc.redrawReglTraces,l3=Ut.exports,od=Vt.getFromId,s3=dc.prepSelect,f3=dc.clearSelect,c3=dc.selectOnClick,_u=P_,Oh=pr,Ay=Oh.MINDRAG,_r=Oh.MINZOOM,My=!0;function u3(t,e,r,a,i,n,o,l){var s=t._fullLayout._zoomlayer,f=o+l==="nsew",c=(o+l).length===1,v,u,d,h,p,g,_,b,w,m,y,x,T,k,S,A,$,M,C,E,I,P,R;function L(){if(v=e.xaxis,u=e.yaxis,w=v._length,m=u._length,_=v._offset,b=u._offset,d={},d[v._id]=v,h={},h[u._id]=u,o&&l)for(var le=e.overlays,fe=0;fe<le.length;fe++){var Te=le[fe].xaxis;d[Te._id]=Te;var xe=le[fe].yaxis;h[xe._id]=xe}p=Dy(d),g=Dy(h),T=Sy(p,l),k=Sy(g,o),S=!k&&!T,x=Cy(t,t._fullLayout._axisMatchGroups,d,h),y=Cy(t,t._fullLayout._axisConstraintGroups,d,h,x);var be=y.isSubplotConstrained||x.isSubplotConstrained;A=l||be,$=o||be;var Ae=t._fullLayout;M=Ae._has("scattergl"),C=Ae._has("splom"),E=Ae._has("svg")}L();var D=h3(k+T,t._fullLayout.dragmode,f),z=Y_(e,o+l+"drag",D,r,a,i,n);if(S&&!f)return z.onmousedown=null,z.style.pointerEvents="none",z;var F={element:z,gd:t,plotinfo:e};F.prepFn=function(le,fe,Te){var xe=F.dragmode,be=t._fullLayout.dragmode;be!==xe&&(F.dragmode=be),L(),P=t._fullLayout._invScaleX,R=t._fullLayout._invScaleY,S||(f?le.shiftKey?be==="pan"?be="zoom":_s(be)||(be="pan"):le.ctrlKey&&(be="pan"):be="pan"),a3(be)?F.minDrag=1:F.minDrag=void 0,_s(be)?(F.xaxes=p,F.yaxes=g,s3(le,fe,Te,F,be)):(F.clickFn=U,_s(xe)&&H(),S||(be==="zoom"?(F.moveFn=se,F.doneFn=Re,F.minDrag=1,re(le,fe,Te)):be==="pan"&&(F.moveFn=Le,F.doneFn=Ce))),t._fullLayout._redrag=function(){var Ae=t._dragdata;if(Ae&&Ae.element===z){var De=t._fullLayout.dragmode;_s(De)||(L(),q([0,0,w,m]),F.moveFn(Ae.dx,Ae.dy))}}};function H(){F.plotinfo.selection=!1,f3(t)}function U(le,fe){var Te=F.gd;if(Te._fullLayout._activeShapeIndex>=0){Te._fullLayout._deactivateShape(Te);return}var xe=Te._fullLayout.clickmode;if(sd(Te),le===2&&!c&&Ee(),f)xe.indexOf("select")>-1&&c3(fe,Te,p,g,e.id,F),xe.indexOf("event")>-1&&e3.click(Te,fe,e.id);else if(le===1&&c){var be=o?u:v,Ae=o==="s"||l==="w"?0:1,De=be._name+".range["+Ae+"]",Oe=v3(be,Ae),Fe="left",st="middle";if(be.fixedrange)return;o?(st=o==="n"?"top":"bottom",be.side==="right"&&(Fe="right")):l==="e"&&(Fe="right"),Te._context.showAxisRangeEntryBoxes&&Hh.select(z).call(J5.makeEditable,{gd:Te,immediate:!0,background:Te._fullLayout.paper_bgcolor,text:String(Oe),fill:be.tickfont?be.tickfont.color:"#444",horizontalAlign:Fe,verticalAlign:st}).on("edit",function(Xe){var ut=be.d2r(Xe);ut!==void 0&&xs.call("_guiRelayout",Te,De,ut)})}}r3.init(F);var B,X,O,Y,W,K,Z,ae,ne,oe;function re(le,fe,Te){var xe=z.getBoundingClientRect();B=fe-xe.left,X=Te-xe.top,t._fullLayout._calcInverseTransform(t);var be=Ur.apply3DTransform(t._fullLayout._invTransform)(B,X);B=be[0],X=be[1],O={l:B,r:B,w:0,t:X,b:X,h:0},Y=t._hmpixcount?t._hmlumcount/t._hmpixcount:K5(t._fullLayout.plot_bgcolor).getLuminance(),W="M0,0H"+w+"V"+m+"H0V0",K=!1,Z="xy",oe=!1,ae=W_(s,Y,_,b,W),ne=Z_(s,_,b)}function se(le,fe){if(t._transitioningWithDuration)return!1;var Te=Math.max(0,Math.min(w,P*le+B)),xe=Math.max(0,Math.min(m,R*fe+X)),be=Math.abs(Te-B),Ae=Math.abs(xe-X);O.l=Math.min(B,Te),O.r=Math.max(B,Te),O.t=Math.min(X,xe),O.b=Math.max(X,xe);function De(){Z="",O.r=O.l,O.t=O.b,ne.attr("d","M0,0Z")}if(y.isSubplotConstrained)be>_r||Ae>_r?(Z="xy",be/w>Ae/m?(Ae=be*m/w,X>xe?O.t=X-Ae:O.b=X+Ae):(be=Ae*w/m,B>Te?O.l=B-be:O.r=B+be),ne.attr("d",Ks(O))):De();else if(x.isSubplotConstrained)if(be>_r||Ae>_r){Z="xy";var Oe=Math.min(O.l/w,(m-O.b)/m),Fe=Math.max(O.r/w,(m-O.t)/m);O.l=Oe*w,O.r=Fe*w,O.b=(1-Oe)*m,O.t=(1-Fe)*m,ne.attr("d",Ks(O))}else De();else!k||Ae<Math.min(Math.max(be*.6,Ay),_r)?be<Ay||!T?De():(O.t=0,O.b=m,Z="x",ne.attr("d",p3(O,X))):!T||be<Math.min(Ae*.6,_r)?(O.l=0,O.r=w,Z="y",ne.attr("d",m3(O,B))):(Z="xy",ne.attr("d",Ks(O)));O.w=O.r-O.l,O.h=O.b-O.t,Z&&(oe=!0),t._dragged=oe,K_(ae,ne,O,W,K,Y),me(),t.emit("plotly_relayouting",I),K=!0}function me(){I={},(Z==="xy"||Z==="x")&&(ld(p,O.l/w,O.r/w,I,y.xaxes),we("x",I)),(Z==="xy"||Z==="y")&&(ld(g,(m-O.b)/m,(m-O.t)/m,I,y.yaxes),we("y",I))}function Re(){me(),sd(t),Ce(),J_(t)}var ke=[0,0,w,m],ze=null,he=Oh.REDRAWDELAY,te=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function ue(le){if(!t._context._scrollZoom.cartesian&&!t._fullLayout._enablescrollzoom)return;if(H(),t._transitioningWithDuration){le.preventDefault(),le.stopPropagation();return}L(),clearTimeout(ze);var fe=-le.deltaY;if(isFinite(fe)||(fe=le.wheelDelta/10),!isFinite(fe)){Ur.log("Did not find wheel motion attributes: ",le);return}var Te=Math.exp(-Math.min(Math.max(fe,-20),20)/200),xe=te.draglayer.select(".nsewdrag").node().getBoundingClientRect(),be=(le.clientX-xe.left)/xe.width,Ae=(xe.bottom-le.clientY)/xe.height,De;function Oe(Fe,st,Xe){if(Fe.fixedrange)return;var ut=Ur.simpleMap(Fe.range,Fe.r2l),Ke=ut[0]+(ut[1]-ut[0])*st;function ft(N){return Fe.l2r(Ke+(N-Ke)*Xe)}Fe.range=ut.map(ft)}if(A){for(l||(be=.5),De=0;De<p.length;De++)Oe(p[De],be,Te);we("x"),ke[2]*=Te,ke[0]+=ke[2]*be*(1/Te-1)}if($){for(o||(Ae=.5),De=0;De<g.length;De++)Oe(g[De],Ae,Te);we("y"),ke[3]*=Te,ke[1]+=ke[3]*(1-Ae)*(1/Te-1)}q(ke),Pe(),t.emit("plotly_relayouting",I),ze=setTimeout(function(){!t._fullLayout||(ke=[0,0,w,m],Ce())},he),le.preventDefault()}o.length*l.length!==1&&ew(z,ue);function Le(le,fe){if(le=le*P,fe=fe*R,t._transitioningWithDuration)return;if(t._fullLayout._replotting=!0,T==="ew"||k==="ns"){var Te=T?-le:0,xe=k?-fe:0;if(x.isSubplotConstrained){if(T&&k){var be=(le/w-fe/m)/2;le=be*w,fe=-be*m,Te=-le,xe=-fe}k?Te=-xe*w/m:xe=-Te*m/w}T&&(Ly(p,le),we("x")),k&&(Ly(g,fe),we("y")),q([Te,xe,w,m]),Pe(),t.emit("plotly_relayouting",I);return}function Ae(ft,N,G){for(var j=1-N,V,ee,Q=0;Q<ft.length;Q++){var ge=ft[Q];if(!ge.fixedrange){V=ge,ee=ge._rl[j]+(ge._rl[N]-ge._rl[j])/d3(G/ge._length);var _e=ge.l2r(ee);_e!==!1&&_e!==void 0&&(ge.range[N]=_e)}}return V._length*(V._rl[N]-ee)/(V._rl[N]-V._rl[j])}var De=T==="w"==(k==="n")?1:-1;if(T&&k&&(y.isSubplotConstrained||x.isSubplotConstrained)){var Oe=(le/w+De*fe/m)/2;le=Oe*w,fe=De*Oe*m}var Fe,st;if(T==="w"?le=Ae(p,0,le):T==="e"?le=Ae(p,1,-le):T||(le=0),k==="n"?fe=Ae(g,1,fe):k==="s"?fe=Ae(g,0,-fe):k||(fe=0),Fe=T==="w"?le:0,st=k==="n"?fe:0,y.isSubplotConstrained&&!x.isSubplotConstrained||x.isSubplotConstrained&&T&&k&&De>0){var Xe;if(x.isSubplotConstrained||!T&&k.length===1){for(Xe=0;Xe<p.length;Xe++)p[Xe].range=p[Xe]._r.slice(),_u(p[Xe],1-fe/m);le=fe*w/m,Fe=le/2}if(x.isSubplotConstrained||!k&&T.length===1){for(Xe=0;Xe<g.length;Xe++)g[Xe].range=g[Xe]._r.slice(),_u(g[Xe],1-le/w);fe=le*m/w,st=fe/2}}(!x.isSubplotConstrained||!k)&&we("x"),(!x.isSubplotConstrained||!T)&&we("y");var ut=w-le,Ke=m-fe;x.isSubplotConstrained&&!(T&&k)&&(T?(st=Fe?0:le*m/w,Ke=ut*m/w):(Fe=st?0:fe*w/m,ut=Ke*w/m)),q([Fe,st,ut,Ke]),Pe(),t.emit("plotly_relayouting",I)}function we(le,fe){for(var Te=x.isSubplotConstrained?{x:g,y:p}[le]:x[le+"axes"],xe=x.isSubplotConstrained?{x:p,y:g}[le]:[],be=0;be<Te.length;be++){var Ae=Te[be],De=Ae._id,Oe=x.xLinks[De]||x.yLinks[De],Fe=xe[0]||d[Oe]||h[Oe];Fe&&(fe?(fe[Ae._name+".range[0]"]=fe[Fe._name+".range[0]"],fe[Ae._name+".range[1]"]=fe[Fe._name+".range[1]"]):Ae.range=Fe.range.slice())}}function Pe(){var le=[],fe;function Te(Ae){for(fe=0;fe<Ae.length;fe++)Ae[fe].fixedrange||le.push(Ae[fe]._id)}for(A&&(Te(p),Te(y.xaxes),Te(x.xaxes)),$&&(Te(g),Te(y.yaxes),Te(x.yaxes)),I={},fe=0;fe<le.length;fe++){var xe=le[fe],be=od(t,xe);ky.drawOne(t,be,{skipTitle:!0}),I[be._name+".range[0]"]=be.range[0],I[be._name+".range[1]"]=be.range[1]}ky.redrawComponents(t,le)}function Ee(){if(!t._transitioningWithDuration){var le=t._context.doubleClick,fe=[];T&&(fe=fe.concat(p)),k&&(fe=fe.concat(g)),x.xaxes&&(fe=fe.concat(x.xaxes)),x.yaxes&&(fe=fe.concat(x.yaxes));var Te={},xe,be,Ae;if(le==="reset+autosize"){for(le="autosize",be=0;be<fe.length;be++)if(xe=fe[be],xe._rangeInitial&&(xe.range[0]!==xe._rangeInitial[0]||xe.range[1]!==xe._rangeInitial[1])||!xe._rangeInitial&&!xe.autorange){le="reset";break}}if(le==="autosize")for(be=0;be<fe.length;be++)xe=fe[be],xe.fixedrange||(Te[xe._name+".autorange"]=!0);else if(le==="reset")for((T||y.isSubplotConstrained)&&(fe=fe.concat(y.xaxes)),k&&!y.isSubplotConstrained&&(fe=fe.concat(y.yaxes)),y.isSubplotConstrained&&(T?k||(fe=fe.concat(g)):fe=fe.concat(p)),be=0;be<fe.length;be++)xe=fe[be],xe.fixedrange||(xe._rangeInitial?(Ae=xe._rangeInitial,Te[xe._name+".range[0]"]=Ae[0],Te[xe._name+".range[1]"]=Ae[1]):Te[xe._name+".autorange"]=!0);t.emit("plotly_doubleclick",null),xs.call("_guiRelayout",t,Te)}}function Ce(){q([0,0,w,m]),Ur.syncOrAsync([l3.previousPromises,function(){t._fullLayout._replotting=!1,xs.call("_guiRelayout",t,I)}],t)}function q(le){var fe=t._fullLayout,Te=fe._plots,xe=fe._subplots.cartesian,be,Ae,De,Oe;if(C&&xs.subplotsRegistry.splom.drag(t),M){for(be=0;be<xe.length;be++)if(Ae=Te[xe[be]],De=Ae.xaxis,Oe=Ae.yaxis,Ae._scene){var Fe=Ur.simpleMap(De.range,De.r2l),st=Ur.simpleMap(Oe.range,Oe.r2l);Ae._scene.update({range:[Fe[0],st[0],Fe[1],st[1]]})}}if((C||M)&&(n3(t),o3(t)),E){var Xe=le[2]/v._length,ut=le[3]/u._length;for(be=0;be<xe.length;be++){Ae=Te[xe[be]],De=Ae.xaxis,Oe=Ae.yaxis;var Ke=(A||x.isSubplotConstrained)&&!De.fixedrange&&d[De._id],ft=($||x.isSubplotConstrained)&&!Oe.fixedrange&&h[Oe._id],N,G,j,V;if(Ke?(N=Xe,j=l||x.isSubplotConstrained?le[0]:ye(De,N)):x.xaHash[De._id]?(N=Xe,j=le[0]*De._length/v._length):x.yaHash[De._id]?(N=ut,j=k==="ns"?-le[1]*De._length/u._length:ye(De,N,{n:"top",s:"bottom"}[k])):(N=pe(De,Xe,ut),j=ve(De,N)),ft?(G=ut,V=o||x.isSubplotConstrained?le[1]:ye(Oe,G)):x.yaHash[Oe._id]?(G=ut,V=le[1]*Oe._length/u._length):x.xaHash[Oe._id]?(G=Xe,V=T==="ew"?-le[0]*Oe._length/v._length:ye(Oe,G,{e:"right",w:"left"}[T])):(G=pe(Oe,Xe,ut),V=ve(Oe,G)),!(!N&&!G)){N||(N=1),G||(G=1);var ee=De._offset-j/N,Q=Oe._offset-V/G;Ae.clipRect.call(ri.setTranslate,j,V).call(ri.setScale,N,G),Ae.plot.call(ri.setTranslate,ee,Q).call(ri.setScale,1/N,1/G),(N!==Ae.xScaleFactor||G!==Ae.yScaleFactor)&&(ri.setPointGroupScale(Ae.zoomScalePts,N,G),ri.setTextPointsScale(Ae.zoomScaleTxt,N,G)),ri.hideOutsideRangePoints(Ae.clipOnAxisFalseTraces,Ae),Ae.xScaleFactor=N,Ae.yScaleFactor=G}}}}function pe(le,fe,Te){return le.fixedrange?0:A&&y.xaHash[le._id]?fe:$&&(y.isSubplotConstrained?y.xaHash:y.yaHash)[le._id]?Te:0}function ve(le,fe){return fe?(le.range=le._r.slice(),_u(le,fe),ye(le,fe)):0}function ye(le,fe,Te){return le._length*(1-fe)*i3[Te||le.constraintoward||"middle"]}return z}function X_(t,e,r,a){var i=Ur.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(t3,a),i.node()}function Y_(t,e,r,a,i,n,o){var l=X_(t,"rect",e,r);return Hh.select(l).call(ri.setRect,a,i,n,o),l}function Sy(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return""}function v3(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,wy("."+i+"g")(Math.pow(10,r))):(i=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,wy("."+String(i)+"g")(r))}function ld(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],v=o._rl[1]-c;a[o._name+".range[0]"]=o.l2r(c+v*e),a[o._name+".range[1]"]=o.l2r(c+v*r)}}if(i&&i.length){var u=(e+(1-r))/2;ld(i,u,1-u,a,[])}}function Ly(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)]}}function d3(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function h3(t,e,r){return t?t==="nsew"?r?"":e==="pan"?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function W_(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",V_(r,a)).attr("d",i+"Z")}function Z_(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:Ty.background,stroke:Ty.defaultLine,"stroke-width":1,opacity:0}).attr("transform",V_(e,r)).attr("d","M0,0Z")}function K_(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"),Q_(t,e,i,n)}function Q_(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 sd(t){Hh.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function J_(t){My&&t.data&&t._context.showTips&&(Ur.notifier(Ur._(t,"Double-click to zoom back out"),"long"),My=!1)}function p3(t,e){return"M"+(t.l-.5)+","+(e-_r-.5)+"h-3v"+(2*_r+1)+"h3ZM"+(t.r+.5)+","+(e-_r-.5)+"h3v"+(2*_r+1)+"h-3Z"}function m3(t,e){return"M"+(e-_r-.5)+","+(t.t-.5)+"v-3h"+(2*_r+1)+"v3ZM"+(e-_r-.5)+","+(t.b+.5)+"v3h"+(2*_r+1)+"v-3Z"}function Ks(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,_r)/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 Cy(t,e,r,a,i){for(var n=!1,o={},l={},s,f,c,v,u=(i||{}).xaHash,d=(i||{}).yaHash,h=0;h<e.length;h++){var p=e[h];for(s in r)if(p[s]){for(c in p)!(i&&(u[c]||d[c]))&&!(c.charAt(0)==="x"?r:a)[c]&&(o[c]=s);for(f in a)!(i&&(u[f]||d[f]))&&p[f]&&(n=!0)}for(f in a)if(p[f])for(v in p)!(i&&(u[v]||d[v]))&&!(v.charAt(0)==="x"?r:a)[v]&&(l[v]=f)}n&&(Ur.extendFlat(o,l),l={});var g={},_=[];for(c in o){var b=od(t,c);_.push(b),g[b._id]=b}var w={},m=[];for(v in l){var y=od(t,v);m.push(y),w[y._id]=y}return{xaHash:g,yaHash:w,xaxes:_,yaxes:m,xLinks:o,yLinks:l,isSubplotConstrained:n}}function ew(t,e){if(!Q5)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 Dy(t){var e=[];for(var r in t)e.push(t[r]);return e}var y3={makeDragBox:u3,makeDragger:X_,makeRectDragger:Y_,makeZoombox:W_,makeCorners:Z_,updateZoombox:K_,xyCorners:Ks,transitionZoombox:Q_,removeZoombox:sd,showDoubleClickNotifier:J_,attachWheelEventHandler:ew};(function(t){var e=tt.exports,r=ua,a=ha.exports,i=xi,n=y3.makeDragBox,o=pr.DRAGGERSIZE;t.initInteractions=function(s){var f=s._fullLayout;if(s._context.staticPlot){e.select(s).selectAll(".drag").remove();return}if(!(!f._has("cartesian")&&!f._has("splom"))){var c=Object.keys(f._plots||{}).sort(function(u,d){if((f._plots[u].mainplot&&!0)===(f._plots[d].mainplot&&!0)){var h=u.split("y"),p=d.split("y");return h[0]===p[0]?Number(h[1]||1)-Number(p[1]||1):Number(h[0]||1)-Number(p[0]||1)}return f._plots[u].mainplot?1:-1});c.forEach(function(u){var d=f._plots[u],h=d.xaxis,p=d.yaxis;if(!d.mainplot){var g=n(s,d,h._offset,p._offset,h._length,p._length,"ns","ew");g.onmousemove=function(w){s._fullLayout._rehover=function(){s._fullLayout._hoversubplot===u&&s._fullLayout._plots[u]&&r.hover(s,w,u)},r.hover(s,w,u),s._fullLayout._lasthover=g,s._fullLayout._hoversubplot=u},g.onmouseout=function(w){s._dragging||(s._fullLayout._hoversubplot=null,a.unhover(s,w))},s._context.showAxisDragHandles&&(n(s,d,h._offset-o,p._offset-o,o,o,"n","w"),n(s,d,h._offset+h._length,p._offset-o,o,o,"n","e"),n(s,d,h._offset-o,p._offset+p._length,o,o,"s","w"),n(s,d,h._offset+h._length,p._offset+p._length,o,o,"s","e"))}if(s._context.showAxisDragHandles){if(u===h._mainSubplot){var _=h._mainLinePosition;h.side==="top"&&(_-=o),n(s,d,h._offset+h._length*.1,_,h._length*.8,o,"","ew"),n(s,d,h._offset,_,h._length*.1,o,"","w"),n(s,d,h._offset+h._length*.9,_,h._length*.1,o,"","e")}if(u===p._mainSubplot){var b=p._mainLinePosition;p.side!=="right"&&(b-=o),n(s,d,b,p._offset+p._length*.1,o,p._length*.8,"ns",""),n(s,d,b,p._offset+p._length*.9,o,p._length*.1,"s",""),n(s,d,b,p._offset,o,p._length*.1,"n","")}}});var v=f._hoverlayer.node();v.onmousemove=function(u){u.target=s._fullLayout._lasthover,r.hover(s,u,f._hoversubplot)},v.onclick=function(u){u.target=s._fullLayout._lasthover,r.click(s,u)},v.onmousedown=function(u){s._fullLayout._lasthover.onmousedown(u)},t.updateFx(s)}},t.updateFx=function(l){var s=l._fullLayout,f=s.dragmode==="pan"?"move":"crosshair";i(s._draggers,f)}})(hh);var Hl={},$y=Ve,g3=function(e){for(var r=$y.layoutArrayContainers,a=$y.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:""}},b3=Ml,wu=Ud,zo=en.exports,x3=Xd.sorterAsc,Tu=Ve;Hl.containerArrayMatch=g3;var _3=Hl.isAddVal=function(e){return e==="add"||b3(e)},Ey=Hl.isRemoveVal=function(e){return e===null||e==="remove"};Hl.applyContainerArrayChanges=function(e,r,a,i,n){var o=r.astr,l=Tu.getComponentMethod(o,"supplyLayoutDefaults"),s=Tu.getComponentMethod(o,"draw"),f=Tu.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||l===wu||s===wu,v=e.layout,u=e._fullLayout;if(a[""]){Object.keys(a).length>1&&zo.warn("Full array edits are incompatible with other edits",o);var d=a[""][""];if(Ey(d))r.set(null);else if(Array.isArray(d))r.set(d);else return zo.warn("Unrecognized full array edit value",o,d),!0;return c?!1:(l(v,u),s(e),!0)}var h=Object.keys(a).map(Number).sort(x3),p=r.get(),g=p||[],_=n(u,o).get(),b=[],w=-1,m=g.length,y,x,T,k,S,A,$,M;for(y=0;y<h.length;y++){if(T=h[y],k=a[T],S=Object.keys(k),A=k[""],$=_3(A),T<0||T>g.length-($?0:1)){zo.warn("index out of range",o,T);continue}if(A!==void 0)S.length>1&&zo.warn("Insertion & removal are incompatible with edits to the same index.",o,T),Ey(A)?b.push(T):$?(A==="add"&&(A={}),g.splice(T,0,A),_&&_.splice(T,0,{})):zo.warn("Unrecognized full object edit value",o,T,A),w===-1&&(w=T);else for(x=0;x<S.length;x++)M=o+"["+T+"].",n(g[T],S[x],M).set(k[S[x]])}for(y=b.length-1;y>=0;y--)g.splice(b[y],1),_&&_.splice(b[y],1);if(g.length?p||r.set(g):r.set(null),c)return!1;if(l(v,u),f!==wu){var C;if(w===-1)C=h;else{for(m=Math.max(g.length,m),C=[],y=0;y<h.length&&(T=h[y],!(T>=w));y++)C.push(T);for(y=w;y<m;y++)C.push(y)}for(y=0;y<C.length;y++)f(e,C[y])}else s(e);return!0};var tw={};(function(t){var e=lt,r=hk,a=Ve,i=de.exports,n=Ut.exports,o=Vt,l=Je.exports,s=o.cleanId,f=o.getFromTrace,c=a.traceIs;t.clearPromiseQueue=function(m){Array.isArray(m._promises)&&m._promises.length>0&&i.log("Clearing previous rejected promises from queue."),m._promises=[]},t.cleanLayout=function(m){var y,x;m||(m={}),m.xaxis1&&(m.xaxis||(m.xaxis=m.xaxis1),delete m.xaxis1),m.yaxis1&&(m.yaxis||(m.yaxis=m.yaxis1),delete m.yaxis1),m.scene1&&(m.scene||(m.scene=m.scene1),delete m.scene1);var T=(n.subplotsRegistry.cartesian||{}).attrRegex,k=(n.subplotsRegistry.polar||{}).attrRegex,S=(n.subplotsRegistry.ternary||{}).attrRegex,A=(n.subplotsRegistry.gl3d||{}).attrRegex,$=Object.keys(m);for(y=0;y<$.length;y++){var M=$[y];if(T&&T.test(M)){var C=m[M];C.anchor&&C.anchor!=="free"&&(C.anchor=s(C.anchor)),C.overlaying&&(C.overlaying=s(C.overlaying)),C.type||(C.isdate?C.type="date":C.islog?C.type="log":C.isdate===!1&&C.islog===!1&&(C.type="linear")),(C.autorange==="withzero"||C.autorange==="tozero")&&(C.autorange=!0,C.rangemode="tozero"),delete C.islog,delete C.isdate,delete C.categories,g(C,"domain")&&delete C.domain,C.autotick!==void 0&&(C.tickmode===void 0&&(C.tickmode=C.autotick?"auto":"linear"),delete C.autotick),u(C)}else if(k&&k.test(M)){var E=m[M];u(E.radialaxis)}else if(S&&S.test(M)){var I=m[M];u(I.aaxis),u(I.baxis),u(I.caxis)}else if(A&&A.test(M)){var P=m[M],R=P.cameraposition;if(Array.isArray(R)&&R[0].length===4){var L=R[0],D=R[1],z=R[2],F=r([],L),H=[];for(x=0;x<3;++x)H[x]=D[x]+z*F[2+4*x];P.camera={eye:{x:H[0],y:H[1],z:H[2]},center:{x:D[0],y:D[1],z:D[2]},up:{x:0,y:0,z:1}},delete P.cameraposition}u(P.xaxis),u(P.yaxis),u(P.zaxis)}}var U=Array.isArray(m.annotations)?m.annotations.length:0;for(y=0;y<U;y++){var B=m.annotations[y];!i.isPlainObject(B)||(B.ref&&(B.ref==="paper"?(B.xref="paper",B.yref="paper"):B.ref==="data"&&(B.xref="x",B.yref="y"),delete B.ref),v(B,"xref"),v(B,"yref"))}var X=Array.isArray(m.shapes)?m.shapes.length:0;for(y=0;y<X;y++){var O=m.shapes[y];!i.isPlainObject(O)||(v(O,"xref"),v(O,"yref"))}var Y=Array.isArray(m.images)?m.images.length:0;for(y=0;y<Y;y++){var W=m.images[y];!i.isPlainObject(W)||(v(W,"xref"),v(W,"yref"))}var K=m.legend;return K&&(K.x>3?(K.x=1.02,K.xanchor="left"):K.x<-2&&(K.x=-.02,K.xanchor="right"),K.y>3?(K.y=1.02,K.yanchor="bottom"):K.y<-2&&(K.y=-.02,K.yanchor="top")),u(m),m.dragmode==="rotate"&&(m.dragmode="orbit"),l.clean(m),m.template&&m.template.layout&&t.cleanLayout(m.template.layout),m};function v(m,y){var x=m[y],T=y.charAt(0);x&&x!=="paper"&&(m[y]=s(x,T,!0))}function u(m){m&&((typeof m.title=="string"||typeof m.title=="number")&&(m.title={text:m.title}),y("titlefont","font"),y("titleposition","position"),y("titleside","side"),y("titleoffset","offset"));function y(x,T){var k=m[x],S=m.title&&m.title[T];k&&!S&&(m.title||(m.title={}),m.title[T]=m[x],delete m[x])}}t.cleanData=function(m){for(var y=0;y<m.length;y++){var x=m[y],T;if(x.type==="histogramy"&&"xbins"in x&&!("ybins"in x)&&(x.ybins=x.xbins,delete x.xbins),x.error_y&&"opacity"in x.error_y){var k=l.defaults,S=x.error_y.color||(c(x,"bar")?l.defaultLine:k[y%k.length]);x.error_y.color=l.addOpacity(l.rgb(S),l.opacity(S)*x.error_y.opacity),delete x.error_y.opacity}if("bardir"in x&&(x.bardir==="h"&&(c(x,"bar")||x.type.substr(0,9)==="histogram")&&(x.orientation="h",t.swapXYData(x)),delete x.bardir),x.type==="histogramy"&&t.swapXYData(x),(x.type==="histogramx"||x.type==="histogramy")&&(x.type="histogram"),"scl"in x&&!("colorscale"in x)&&(x.colorscale=x.scl,delete x.scl),"reversescl"in x&&!("reversescale"in x)&&(x.reversescale=x.reversescl,delete x.reversescl),x.xaxis&&(x.xaxis=s(x.xaxis,"x")),x.yaxis&&(x.yaxis=s(x.yaxis,"y")),c(x,"gl3d")&&x.scene&&(x.scene=n.subplotsRegistry.gl3d.cleanId(x.scene)),!c(x,"pie-like")&&!c(x,"bar-like"))if(Array.isArray(x.textposition))for(T=0;T<x.textposition.length;T++)x.textposition[T]=p(x.textposition[T]);else x.textposition&&(x.textposition=p(x.textposition));var A=a.getModule(x);if(A&&A.colorbar){var $=A.colorbar.container,M=$?x[$]:x;M&&M.colorscale&&(M.colorscale==="YIGnBu"&&(M.colorscale="YlGnBu"),M.colorscale==="YIOrRd"&&(M.colorscale="YlOrRd"))}if(x.type==="surface"&&i.isPlainObject(x.contours)){var C=["x","y","z"];for(T=0;T<C.length;T++){var E=x.contours[C[T]];!i.isPlainObject(E)||(E.highlightColor&&(E.highlightcolor=E.highlightColor,delete E.highlightColor),E.highlightWidth&&(E.highlightwidth=E.highlightWidth,delete E.highlightWidth))}}if(x.type==="candlestick"||x.type==="ohlc"){var I=(x.increasing||{}).showlegend!==!1,P=(x.decreasing||{}).showlegend!==!1,R=d(x.increasing),L=d(x.decreasing);if(R!==!1&&L!==!1){var D=h(R,L,I,P);D&&(x.name=D)}else(R||L)&&!x.name&&(x.name=R||L)}if(Array.isArray(x.transforms)){var z=x.transforms;for(T=0;T<z.length;T++){var F=z[T];if(!!i.isPlainObject(F))switch(F.type){case"filter":F.filtersrc&&(F.target=F.filtersrc,delete F.filtersrc),F.calendar&&(F.valuecalendar||(F.valuecalendar=F.calendar),delete F.calendar);break;case"groupby":if(F.styles=F.styles||F.style,F.styles&&!Array.isArray(F.styles)){var H=F.styles,U=Object.keys(H);F.styles=[];for(var B=0;B<U.length;B++)F.styles.push({target:U[B],value:H[U[B]]})}break}}}g(x,"line")&&delete x.line,"marker"in x&&(g(x.marker,"line")&&delete x.marker.line,g(x,"marker")&&delete x.marker),l.clean(x),x.autobinx&&(delete x.autobinx,delete x.xbins),x.autobiny&&(delete x.autobiny,delete x.ybins),u(x),x.colorbar&&u(x.colorbar),x.marker&&x.marker.colorbar&&u(x.marker.colorbar),x.line&&x.line.colorbar&&u(x.line.colorbar),x.aaxis&&u(x.aaxis),x.baxis&&u(x.baxis)}};function d(m){if(!i.isPlainObject(m))return!1;var y=m.name;return delete m.name,delete m.showlegend,(typeof y=="string"||typeof y=="number")&&String(y)}function h(m,y,x,T){if(x&&!T)return m;if(T&&!x||!m.trim())return y;if(!y.trim())return m;var k=Math.min(m.length,y.length),S;for(S=0;S<k&&m.charAt(S)===y.charAt(S);S++);var A=m.substr(0,S);return A.trim()}function p(m){var y="middle",x="center";return typeof m=="string"&&(m.indexOf("top")!==-1?y="top":m.indexOf("bottom")!==-1&&(y="bottom"),m.indexOf("left")!==-1?x="left":m.indexOf("right")!==-1&&(x="right")),y+" "+x}function g(m,y){return y in m&&typeof m[y]=="object"&&Object.keys(m[y]).length===0}t.swapXYData=function(m){var y;if(i.swapAttrs(m,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(m.z)&&Array.isArray(m.z[0])&&(m.transpose?delete m.transpose:m.transpose=!0),m.error_x&&m.error_y){var x=m.error_y,T="copy_ystyle"in x?x.copy_ystyle:!(x.color||x.thickness||x.width);i.swapAttrs(m,["error_?.copy_ystyle"]),T&&i.swapAttrs(m,["error_?.color","error_?.thickness","error_?.width"])}if(typeof m.hoverinfo=="string"){var k=m.hoverinfo.split("+");for(y=0;y<k.length;y++)k[y]==="x"?k[y]="y":k[y]==="y"&&(k[y]="x");m.hoverinfo=k.join("+")}},t.coerceTraceIndices=function(m,y){if(e(y))return[y];if(!Array.isArray(y)||!y.length)return m.data.map(function(k,S){return S});if(Array.isArray(y)){for(var x=[],T=0;T<y.length;T++)i.isIndex(y[T],m.data.length)?x.push(y[T]):i.warn("trace index (",y[T],") is not a number or is out of bounds");return x}return y},t.manageArrayContainers=function(m,y,x){var T=m.obj,k=m.parts,S=k.length,A=k[S-1],$=e(A);if($&&y===null){var M=k.slice(0,S-1).join("."),C=i.nestedProperty(T,M).get();C.splice(A,1)}else $&&m.get()===void 0&&m.get()===void 0&&(x[m.astr]=null),m.set(y)};var _=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function b(m){var y=m.search(_);if(y>0)return m.substr(0,y)}t.hasParent=function(m,y){for(var x=b(y);x;){if(x in m)return!0;x=b(x)}return!1};var w=["x","y","z"];t.clearAxisTypes=function(m,y,x){for(var T=0;T<y.length;T++)for(var k=m._fullData[T],S=0;S<3;S++){var A=f(m,k,w[S]);if(A&&A.type!=="log"){var $=A._name,M=A._id.substr(1);if(M.substr(0,5)==="scene"){if(x[M]!==void 0)continue;$=M+"."+$}var C=$+".type";x[$]===void 0&&x[C]===void 0&&i.nestedProperty(m.layout,C).set(null)}}}})(tw);(function(t){var e=tt.exports,r=lt,a=ax,i=de.exports,n=i.nestedProperty,o=El,l=lM,s=Ve,f=po,c=Ut.exports,v=Ct.exports,u=Tt.exports,d=Je.exports,h=hh.initInteractions,p=on,g=dc.clearSelect,_=uo.dfltConfig,b=Hl,w=tw,m=sc,y=gi,x=pr.AX_NAME_PATTERN,T=0,k=5;function S(N,G,j,V){var ee;if(N=i.getGraphDiv(N),o.init(N),i.isPlainObject(G)){var Q=G;G=Q.data,j=Q.layout,V=Q.config,ee=Q.frames}var ge=o.triggerHandler(N,"plotly_beforeplot",[G,j,V]);if(ge===!1)return Promise.reject();!G&&!j&&!i.isPlotDiv(N)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",N);function _e(){if(ee)return t.addFrames(N,ee)}E(N,V),j||(j={}),e.select(N).classed("js-plotly-plot",!0),u.makeTester(),Array.isArray(N._promises)||(N._promises=[]);var ce=(N.data||[]).length===0&&Array.isArray(G);Array.isArray(G)&&(w.cleanData(G),ce?N.data=G:N.data.push.apply(N.data,G),N.empty=!1),(!N.layout||ce)&&(N.layout=w.cleanLayout(j)),c.supplyDefaults(N);var ie=N._fullLayout,Me=ie._has("cartesian");ie._replotting=!0,(ce||ie._shouldCreateBgLayer)&&(ft(N),ie._shouldCreateBgLayer&&delete ie._shouldCreateBgLayer),u.initGradients(N),u.initPatterns(N),ce&&v.saveShowSpikeInitial(N);var Ne=!N.calcdata||N.calcdata.length!==(N._fullData||[]).length;Ne&&c.doCalcdata(N);for(var je=0;je<N.calcdata.length;je++)N.calcdata[je][0].trace=N._fullData[je];N._context.responsive?N._responsiveChartHandler||(N._responsiveChartHandler=function(){i.isHidden(N)||c.resize(N)},window.addEventListener("resize",N._responsiveChartHandler)):i.clearResponsive(N);var Ze=i.extendFlat({},ie._size),nt=0;function dt(){for(var Ge=ie._basePlotModules,We=0;We<Ge.length;We++)Ge[We].drawFramework&&Ge[We].drawFramework(N);!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(vt){return vt.key}),ie._glcanvas.enter().append("canvas").attr("class",function(vt){return"gl-canvas gl-canvas-"+vt.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var ct=N._context.plotGlPixelRatio;if(ie._glcanvas){ie._glcanvas.attr("width",ie.width*ct).attr("height",ie.height*ct).style("width",ie.width+"px").style("height",ie.height+"px");var rt=ie._glcanvas.data()[0].regl;if(rt&&(Math.floor(ie.width*ct)!==rt._gl.drawingBufferWidth||Math.floor(ie.height*ct)!==rt._gl.drawingBufferHeight)){var Be="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(nt)i.error(Be);else return i.log(Be+" Clearing graph and plotting again."),c.cleanPlot([],{},N._fullData,ie),c.supplyDefaults(N),ie=N._fullLayout,c.doCalcdata(N),nt++,dt()}}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(N)}function Ue(){if(c.clearAutoMarginIds(N),m.drawMarginPushers(N),v.allowAutoMargin(N),ie._has("pie"))for(var Ge=N._fullData,We=0;We<Ge.length;We++){var ct=Ge[We];ct.type==="pie"&&ct.automargin&&c.allowAutoMargin(N,"pie."+ct.uid+".automargin")}return c.doAutoMargin(N),c.previousPromises(N)}function St(){if(!!c.didMarginChange(Ze,ie._size))return i.syncOrAsync([Ue,m.layoutStyles],N)}function at(){if(!Ne){qe();return}return i.syncOrAsync([s.getComponentMethod("shapes","calcAutorange"),s.getComponentMethod("annotations","calcAutorange"),qe],N)}function qe(){N._transitioning||(m.doAutoRangeAndConstraints(N),ce&&v.saveRangeInitial(N),s.getComponentMethod("rangeslider","calcAutorange")(N))}function yt(){return v.draw(N,ce?"":"redraw")}var ht=[c.previousPromises,_e,dt,Ue,St];Me&&ht.push(at),ht.push(m.layoutStyles),Me&&ht.push(yt,function(We){We._fullLayout._insideTickLabelsAutorange&&Re(We,We._fullLayout._insideTickLabelsAutorange).then(function(){We._fullLayout._insideTickLabelsAutorange=void 0})}),ht.push(m.drawData,m.finalDraw,h,c.addLinks,c.rehover,c.redrag,c.doAutoMargin,et,c.previousPromises);function et(Ge){Ge._fullLayout._insideTickLabelsAutorange&&ce&&v.saveRangeInitial(Ge,!0)}var Qe=i.syncOrAsync(ht,N);return(!Qe||!Qe.then)&&(Qe=Promise.resolve()),Qe.then(function(){return A(N),N})}function A(N){var G=N._fullLayout;G._redrawFromAutoMarginCount?G._redrawFromAutoMarginCount--:N.emit("plotly_afterplot")}function $(N){return i.extendFlat(_,N)}function M(N,G){try{N._fullLayout._paper.style("background",G)}catch(j){i.error(j)}}function C(N,G){var j=d.combine(G,"white");M(N,j)}function E(N,G){if(!N._context){N._context=i.extendDeep({},_);var j=e.select("base");N._context._baseUrl=j.size()&&j.attr("href")?window.location.href.split("#")[0]:""}var V=N._context,ee,Q,ge;if(G){for(Q=Object.keys(G),ee=0;ee<Q.length;ee++)ge=Q[ee],!(ge==="editable"||ge==="edits")&&ge in V&&(ge==="setBackground"&&G[ge]==="opaque"?V[ge]=C:V[ge]=G[ge]);G.plot3dPixelRatio&&!V.plotGlPixelRatio&&(V.plotGlPixelRatio=V.plot3dPixelRatio);var _e=G.editable;if(_e!==void 0)for(V.editable=_e,Q=Object.keys(V.edits),ee=0;ee<Q.length;ee++)V.edits[Q[ee]]=_e;if(G.edits)for(Q=Object.keys(G.edits),ee=0;ee<Q.length;ee++)ge=Q[ee],ge in V.edits&&(V.edits[ge]=G.edits[ge]);V._exportedPlot=G._exportedPlot}V.staticPlot&&(V.editable=!1,V.edits={},V.autosizable=!1,V.scrollZoom=!1,V.doubleClick=!1,V.showTips=!1,V.showLink=!1,V.displayModeBar=!1),V.displayModeBar==="hover"&&!a&&(V.displayModeBar=!0),(V.setBackground==="transparent"||typeof V.setBackground!="function")&&(V.setBackground=M),V._hasZeroHeight=V._hasZeroHeight||N.clientHeight===0,V._hasZeroWidth=V._hasZeroWidth||N.clientWidth===0;var ce=V.scrollZoom,ie=V._scrollZoom={};if(ce===!0)ie.cartesian=1,ie.gl3d=1,ie.geo=1,ie.mapbox=1;else if(typeof ce=="string"){var Me=ce.split("+");for(ee=0;ee<Me.length;ee++)ie[Me[ee]]=1}else ce!==!1&&(ie.gl3d=1,ie.geo=1,ie.mapbox=1)}function I(N){if(N=i.getGraphDiv(N),!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N);return w.cleanData(N.data),w.cleanLayout(N.layout),N.calcdata=void 0,t._doPlot(N).then(function(){return N.emit("plotly_redraw"),N})}function P(N,G,j,V){return N=i.getGraphDiv(N),c.cleanPlot([],{},N._fullData||[],N._fullLayout||{}),c.purge(N),t._doPlot(N,G,j,V)}function R(N,G){var j=G+1,V=[],ee,Q;for(ee=0;ee<N.length;ee++)Q=N[ee],Q<0?V.push(j+Q):V.push(Q);return V}function L(N,G,j){var V,ee;for(V=0;V<G.length;V++){if(ee=G[V],ee!==parseInt(ee,10))throw new Error("all values in "+j+" must be integers");if(ee>=N.data.length||ee<-N.data.length)throw new Error(j+" must be valid indices for gd.data.");if(G.indexOf(ee,V+1)>-1||ee>=0&&G.indexOf(-N.data.length+ee)>-1||ee<0&&G.indexOf(N.data.length+ee)>-1)throw new Error("each index in "+j+" must be unique.")}}function D(N,G,j){if(!Array.isArray(N.data))throw new Error("gd.data must be an array.");if(typeof G>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(G)||(G=[G]),L(N,G,"currentIndices"),typeof j<"u"&&!Array.isArray(j)&&(j=[j]),typeof j<"u"&&L(N,j,"newIndices"),typeof j<"u"&&G.length!==j.length)throw new Error("current and new indices must be of equal length.")}function z(N,G,j){var V,ee;if(!Array.isArray(N.data))throw new Error("gd.data must be an array.");if(typeof G>"u")throw new Error("traces must be defined.");for(Array.isArray(G)||(G=[G]),V=0;V<G.length;V++)if(ee=G[V],typeof ee!="object"||Array.isArray(ee)||ee===null)throw new Error("all values in traces array must be non-array objects");if(typeof j<"u"&&!Array.isArray(j)&&(j=[j]),typeof j<"u"&&j.length!==G.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function F(N,G,j,V){var ee=i.isPlainObject(V);if(!Array.isArray(N.data))throw new Error("gd.data must be an array");if(!i.isPlainObject(G))throw new Error("update must be a key:value object");if(typeof j>"u")throw new Error("indices must be an integer or array of integers");L(N,j,"indices");for(var Q in G){if(!Array.isArray(G[Q])||G[Q].length!==j.length)throw new Error("attribute "+Q+" must be an array of length equal to indices array length");if(ee&&(!(Q in V)||!Array.isArray(V[Q])||V[Q].length!==G[Q].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}function H(N,G,j,V){var ee=i.isPlainObject(V),Q=[],ge,_e,ce,ie,Me;Array.isArray(j)||(j=[j]),j=R(j,N.data.length-1);for(var Ne in G)for(var je=0;je<j.length;je++){if(ge=N.data[j[je]],ce=n(ge,Ne),_e=ce.get(),ie=G[Ne][je],!i.isArrayOrTypedArray(ie))throw new Error("attribute: "+Ne+" index: "+je+" must be an array");if(!i.isArrayOrTypedArray(_e))throw new Error("cannot extend missing or non-array attribute: "+Ne);if(_e.constructor!==ie.constructor)throw new Error("cannot extend array with an array of a different type: "+Ne);Me=ee?V[Ne][je]:V,r(Me)||(Me=-1),Q.push({prop:ce,target:_e,insert:ie,maxp:Math.floor(Me)})}return Q}function U(N,G,j,V,ee){F(N,G,j,V);for(var Q=H(N,G,j,V),ge={},_e={},ce=0;ce<Q.length;ce++){var ie=Q[ce].prop,Me=Q[ce].maxp,Ne=ee(Q[ce].target,Q[ce].insert,Me);ie.set(Ne[0]),Array.isArray(ge[ie.astr])||(ge[ie.astr]=[]),ge[ie.astr].push(Ne[1]),Array.isArray(_e[ie.astr])||(_e[ie.astr]=[]),_e[ie.astr].push(Q[ce].target.length)}return{update:ge,maxPoints:_e}}function B(N,G){var j=new N.constructor(N.length+G.length);return j.set(N),j.set(G,N.length),j}function X(N,G,j,V){N=i.getGraphDiv(N);function ee(ce,ie,Me){var Ne,je;if(i.isTypedArray(ce))if(Me<0){var Ze=new ce.constructor(0),nt=B(ce,ie);Me<0?(Ne=nt,je=Ze):(Ne=Ze,je=nt)}else if(Ne=new ce.constructor(Me),je=new ce.constructor(ce.length+ie.length-Me),Me===ie.length)Ne.set(ie),je.set(ce);else if(Me<ie.length){var dt=ie.length-Me;Ne.set(ie.subarray(dt)),je.set(ce),je.set(ie.subarray(0,dt),ce.length)}else{var Ue=Me-ie.length,St=ce.length-Ue;Ne.set(ce.subarray(St)),Ne.set(ie,Ue),je.set(ce.subarray(0,St))}else Ne=ce.concat(ie),je=Me>=0&&Me<Ne.length?Ne.splice(0,Ne.length-Me):[];return[Ne,je]}var Q=U(N,G,j,V,ee),ge=t.redraw(N),_e=[N,Q.update,j,Q.maxPoints];return l.add(N,t.prependTraces,_e,X,arguments),ge}function O(N,G,j,V){N=i.getGraphDiv(N);function ee(ce,ie,Me){var Ne,je;if(i.isTypedArray(ce))if(Me<=0){var Ze=new ce.constructor(0),nt=B(ie,ce);Me<0?(Ne=nt,je=Ze):(Ne=Ze,je=nt)}else if(Ne=new ce.constructor(Me),je=new ce.constructor(ce.length+ie.length-Me),Me===ie.length)Ne.set(ie),je.set(ce);else if(Me<ie.length){var dt=ie.length-Me;Ne.set(ie.subarray(0,dt)),je.set(ie.subarray(dt)),je.set(ce,dt)}else{var Ue=Me-ie.length;Ne.set(ie),Ne.set(ce.subarray(0,Ue),ie.length),je.set(ce.subarray(Ue))}else Ne=ie.concat(ce),je=Me>=0&&Me<Ne.length?Ne.splice(Me,Ne.length):[];return[Ne,je]}var Q=U(N,G,j,V,ee),ge=t.redraw(N),_e=[N,Q.update,j,Q.maxPoints];return l.add(N,t.extendTraces,_e,O,arguments),ge}function Y(N,G,j){N=i.getGraphDiv(N);var V=[],ee=t.deleteTraces,Q=Y,ge=[N,V],_e=[N,G],ce,ie;for(z(N,G,j),Array.isArray(G)||(G=[G]),G=G.map(function(Me){return i.extendFlat({},Me)}),w.cleanData(G),ce=0;ce<G.length;ce++)N.data.push(G[ce]);for(ce=0;ce<G.length;ce++)V.push(-G.length+ce);if(typeof j>"u")return ie=t.redraw(N),l.add(N,ee,ge,Q,_e),ie;Array.isArray(j)||(j=[j]);try{D(N,V,j)}catch(Me){throw N.data.splice(N.data.length-G.length,G.length),Me}return l.startSequence(N),l.add(N,ee,ge,Q,_e),ie=t.moveTraces(N,V,j),l.stopSequence(N),ie}function W(N,G){N=i.getGraphDiv(N);var j=[],V=t.addTraces,ee=W,Q=[N,j,G],ge=[N,G],_e,ce;if(typeof G>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(G)||(G=[G]),L(N,G,"indices"),G=R(G,N.data.length-1),G.sort(i.sorterDes),_e=0;_e<G.length;_e+=1)ce=N.data.splice(G[_e],1)[0],j.push(ce);var ie=t.redraw(N);return l.add(N,V,Q,ee,ge),ie}function K(N,G,j){N=i.getGraphDiv(N);var V=[],ee=[],Q=K,ge=K,_e=[N,j,G],ce=[N,G,j],ie;if(D(N,G,j),G=Array.isArray(G)?G:[G],typeof j>"u")for(j=[],ie=0;ie<G.length;ie++)j.push(-G.length+ie);for(j=Array.isArray(j)?j:[j],G=R(G,N.data.length-1),j=R(j,N.data.length-1),ie=0;ie<N.data.length;ie++)G.indexOf(ie)===-1&&V.push(N.data[ie]);for(ie=0;ie<G.length;ie++)ee.push({newIndex:j[ie],trace:N.data[G[ie]]});for(ee.sort(function(Ne,je){return Ne.newIndex-je.newIndex}),ie=0;ie<ee.length;ie+=1)V.splice(ee[ie].newIndex,0,ee[ie].trace);N.data=V;var Me=t.redraw(N);return l.add(N,Q,_e,ge,ce),Me}function Z(N,G,j,V){N=i.getGraphDiv(N),w.clearPromiseQueue(N);var ee={};if(typeof G=="string")ee[G]=j;else if(i.isPlainObject(G))ee=i.extendFlat({},G),V===void 0&&(V=j);else return i.warn("Restyle fail.",G,j,V),Promise.reject();Object.keys(ee).length&&(N.changed=!0);var Q=w.coerceTraceIndices(N,V),ge=se(N,ee,Q),_e=ge.flags;_e.calc&&(N.calcdata=void 0),_e.clearAxisTypes&&w.clearAxisTypes(N,Q,{});var ce=[];_e.fullReplot?ce.push(t._doPlot):(ce.push(c.previousPromises),c.supplyDefaults(N),_e.markerSize&&(c.doCalcdata(N),ze(ce)),_e.style&&ce.push(m.doTraceStyle),_e.colorbars&&ce.push(m.doColorBars),ce.push(A)),ce.push(c.rehover,c.redrag),l.add(N,Z,[N,ge.undoit,ge.traces],Z,[N,ge.redoit,ge.traces]);var ie=i.syncOrAsync(ce,N);return(!ie||!ie.then)&&(ie=Promise.resolve()),ie.then(function(){return N.emit("plotly_restyle",ge.eventData),N})}function ae(N){return N===void 0?null:N}function ne(N,G){return G?function(j,V,ee){var Q=n(j,V),ge=Q.set;return Q.set=function(_e){var ce=(ee||"")+V;oe(ce,Q.get(),_e,N),ge(_e)},Q}:n}function oe(N,G,j,V){if(Array.isArray(G)||Array.isArray(j))for(var ee=Array.isArray(G)?G:[],Q=Array.isArray(j)?j:[],ge=Math.max(ee.length,Q.length),_e=0;_e<ge;_e++)oe(N+"["+_e+"]",ee[_e],Q[_e],V);else if(i.isPlainObject(G)||i.isPlainObject(j)){var ce=i.isPlainObject(G)?G:{},ie=i.isPlainObject(j)?j:{},Me=i.extendFlat({},ce,ie);for(var Ne in Me)oe(N+"."+Ne,ce[Ne],ie[Ne],V)}else V[N]===void 0&&(V[N]=ae(G))}function re(N,G,j){for(var V in j){var ee=n(N,V);oe(V,ee.get(),j[V],G)}}function se(N,G,j){var V=N._fullLayout,ee=N._fullData,Q=N.data,ge=V._guiEditing,_e=ne(V._preGUI,ge),ce=i.extendDeepAll({},G),ie;me(G);var Me=y.traceFlags(),Ne={},je={},Ze;function nt(){return j.map(function(){})}function dt(Nt){var or=v.id2name(Nt);Ze.indexOf(or)===-1&&Ze.push(or)}function Ue(Nt){return"LAYOUT"+Nt+".autorange"}function St(Nt){return"LAYOUT"+Nt+".range"}function at(Nt){for(var or=Nt;or<ee.length;or++)if(ee[or]._input===Q[Nt])return ee[or]}function qe(Nt,or,Ra){if(Array.isArray(Nt)){Nt.forEach(function(Xl){qe(Xl,or,Ra)});return}if(!(Nt in G||w.hasParent(G,Nt))){var Mi;if(Nt.substr(0,6)==="LAYOUT")Mi=_e(N.layout,Nt.replace("LAYOUT",""));else{var Nr=j[Ra],Ka=V._tracePreGUI[at(Nr)._fullInput.uid];Mi=ne(Ka,ge)(Q[Nr],Nt)}Nt in je||(je[Nt]=nt()),je[Nt][Ra]===void 0&&(je[Nt][Ra]=ae(Mi.get())),or!==void 0&&Mi.set(or)}}function yt(Nt){return function(or){return ee[or][Nt]}}function ht(Nt){return function(or,Ra){return or===!1?ee[j[Ra]][Nt]:null}}for(var et in G){if(w.hasParent(G,et))throw new Error("cannot set "+et+" and a parent attribute simultaneously");var Qe=G[et],Ge,We,ct,rt,Be,vt;if((et==="autobinx"||et==="autobiny")&&(et=et.charAt(et.length-1)+"bins",Array.isArray(Qe)?Qe=Qe.map(ht(et)):Qe===!1?Qe=j.map(yt(et)):Qe=null),Ne[et]=Qe,et.substr(0,6)==="LAYOUT"){ct=_e(N.layout,et.replace("LAYOUT","")),je[et]=[ae(ct.get())],ct.set(Array.isArray(Qe)?Qe[0]:Qe),Me.calc=!0;continue}for(je[et]=nt(),ie=0;ie<j.length;ie++){Ge=Q[j[ie]],We=at(j[ie]);var kt=V._tracePreGUI[We._fullInput.uid];if(ct=ne(kt,ge)(Ge,et),rt=ct.get(),Be=Array.isArray(Qe)?Qe[ie%Qe.length]:Qe,Be!==void 0){var nr=ct.parts[ct.parts.length-1],rr=et.substr(0,et.length-nr.length-1),pa=rr?rr+".":"",Ir=rr?n(We,rr).get():We;if(vt=f.getTraceValObject(We,ct.parts),vt&&vt.impliedEdits&&Be!==null)for(var wo in vt.impliedEdits)qe(i.relativeAttr(et,wo),vt.impliedEdits[wo],ie);else if((nr==="thicknessmode"||nr==="lenmode")&&rt!==Be&&(Be==="fraction"||Be==="pixels")&&Ir){var Ti=V._size,fn=Ir.orient,cn=fn==="top"||fn==="bottom";if(nr==="thicknessmode"){var ql=cn?Ti.h:Ti.w;qe(pa+"thickness",Ir.thickness*(Be==="fraction"?1/ql:ql),ie)}else{var Ea=cn?Ti.w:Ti.h;qe(pa+"len",Ir.len*(Be==="fraction"?1/Ea:Ea),ie)}}else if(et==="type"&&(Be==="pie"!=(rt==="pie")||Be==="funnelarea"!=(rt==="funnelarea"))){var ma="x",To="y";(Be==="bar"||rt==="bar")&&Ge.orientation==="h"&&(ma="y",To="x"),i.swapAttrs(Ge,["?","?src"],"labels",ma),i.swapAttrs(Ge,["d?","?0"],"label",ma),i.swapAttrs(Ge,["?","?src"],"values",To),rt==="pie"||rt==="funnelarea"?(n(Ge,"marker.color").set(n(Ge,"marker.colors").get()),V._pielayer.selectAll("g.trace").remove()):s.traceIs(Ge,"cartesian")&&n(Ge,"marker.colors").set(n(Ge,"marker.color").get())}je[et][ie]=ae(rt);var ki=["swapxy","swapxyaxes","orientation","orientationaxes"];if(ki.indexOf(et)!==-1){if(et==="orientation"){ct.set(Be);var un=Ge.x&&!Ge.y?"h":"v";if((ct.get()||un)===We.orientation)continue}else et==="orientationaxes"&&(Ge.orientation={v:"h",h:"v"}[We.orientation]);w.swapXYData(Ge),Me.calc=Me.clearAxisTypes=!0}else c.dataArrayContainers.indexOf(ct.parts[0])!==-1?(w.manageArrayContainers(ct,Be,je),Me.calc=!0):(vt?vt.arrayOk&&!s.traceIs(We,"regl")&&(i.isArrayOrTypedArray(Be)||i.isArrayOrTypedArray(rt))?Me.calc=!0:y.update(Me,vt):Me.calc=!0,ct.set(Be))}}if(["swapxyaxes","orientationaxes"].indexOf(et)!==-1&&v.swap(N,j),et==="orientationaxes"){var Za=n(N.layout,"hovermode"),vn=Za.get();vn==="x"?Za.set("y"):vn==="y"?Za.set("x"):vn==="x unified"?Za.set("y unified"):vn==="y unified"&&Za.set("x unified")}if(["orientation","type"].indexOf(et)!==-1){for(Ze=[],ie=0;ie<j.length;ie++){var Ai=Q[j[ie]];s.traceIs(Ai,"cartesian")&&(dt(Ai.xaxis||"x"),dt(Ai.yaxis||"y"))}qe(Ze.map(Ue),!0,0),qe(Ze.map(St),[0,1],0)}}return(Me.calc||Me.plot)&&(Me.fullReplot=!0),{flags:Me,undoit:je,redoit:Ne,traces:j,eventData:i.extendDeepNoArrays([],[ce,j])}}function me(N){var G=i.counterRegex("axis",".title",!1,!1),j=/colorbar\.title$/,V=Object.keys(N),ee,Q,ge;for(ee=0;ee<V.length;ee++)Q=V[ee],ge=N[Q],(Q==="title"||G.test(Q)||j.test(Q))&&(typeof ge=="string"||typeof ge=="number")?_e(Q,Q.replace("title","title.text")):Q.indexOf("titlefont")>-1&&Q.indexOf("grouptitlefont")===-1?_e(Q,Q.replace("titlefont","title.font")):Q.indexOf("titleposition")>-1?_e(Q,Q.replace("titleposition","title.position")):Q.indexOf("titleside")>-1?_e(Q,Q.replace("titleside","title.side")):Q.indexOf("titleoffset")>-1&&_e(Q,Q.replace("titleoffset","title.offset"));function _e(ce,ie){N[ie]=N[ce],delete N[ce]}}function Re(N,G,j){N=i.getGraphDiv(N),w.clearPromiseQueue(N);var V={};if(typeof G=="string")V[G]=j;else if(i.isPlainObject(G))V=i.extendFlat({},G);else return i.warn("Relayout fail.",G,j),Promise.reject();Object.keys(V).length&&(N.changed=!0);var ee=Le(N,V),Q=ee.flags;Q.calc&&(N.calcdata=void 0);var ge=[c.previousPromises];Q.layoutReplot?ge.push(m.layoutReplot):Object.keys(V).length&&(ke(N,Q,ee)||c.supplyDefaults(N),Q.legend&&ge.push(m.doLegend),Q.layoutstyle&&ge.push(m.layoutStyles),Q.axrange&&ze(ge,ee.rangesAltered),Q.ticks&&ge.push(m.doTicksRelayout),Q.modebar&&ge.push(m.doModeBar),Q.camera&&ge.push(m.doCamera),Q.colorbars&&ge.push(m.doColorBars),ge.push(A)),ge.push(c.rehover,c.redrag),l.add(N,Re,[N,ee.undoit],Re,[N,ee.redoit]);var _e=i.syncOrAsync(ge,N);return(!_e||!_e.then)&&(_e=Promise.resolve(N)),_e.then(function(){return N.emit("plotly_relayout",ee.eventData),N})}function ke(N,G,j){var V=N._fullLayout;if(!G.axrange)return!1;for(var ee in G)if(ee!=="axrange"&&G[ee])return!1;for(var Q in j.rangesAltered){var ge=v.id2name(Q),_e=N.layout[ge],ce=V[ge];if(ce.autorange=_e.autorange,_e.range&&(ce.range=_e.range.slice()),ce.cleanRange(),ce._matchGroup){for(var ie in ce._matchGroup)if(ie!==Q){var Me=V[v.id2name(ie)];Me.autorange=ce.autorange,Me.range=ce.range.slice(),Me._input.range=ce.range.slice()}}}return!0}function ze(N,G){var j=G?function(V){var ee=[],Q=!0;for(var ge in G){var _e=v.getFromId(V,ge);if(ee.push(ge),(_e.ticklabelposition||"").indexOf("inside")!==-1&&_e._anchorAxis&&ee.push(_e._anchorAxis._id),_e._matchGroup)for(var ce in _e._matchGroup)G[ce]||ee.push(ce);_e.automargin&&(Q=!1)}return v.draw(V,ee,{skipTitle:Q})}:function(V){return v.draw(V,"redraw")};N.push(g,m.doAutoRangeAndConstraints,j,m.drawData,m.finalDraw)}var he=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,te=/^[xyz]axis[0-9]*\.autorange$/,ue=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Le(N,G){var j=N.layout,V=N._fullLayout,ee=V._guiEditing,Q=ne(V._preGUI,ee),ge=Object.keys(G),_e=v.list(N),ce=i.extendDeepAll({},G),ie={},Me,Ne,je;for(me(G),ge=Object.keys(G),Ne=0;Ne<ge.length;Ne++)if(ge[Ne].indexOf("allaxes")===0){for(je=0;je<_e.length;je++){var Ze=_e[je]._id.substr(1),nt=Ze.indexOf("scene")!==-1?Ze+".":"",dt=ge[Ne].replace("allaxes",nt+_e[je]._name);G[dt]||(G[dt]=G[ge[Ne]])}delete G[ge[Ne]]}var Ue=y.layoutFlags(),St={},at={};function qe(Nr,Ka){if(Array.isArray(Nr)){Nr.forEach(function(fk){qe(fk,Ka)});return}if(!(Nr in G||w.hasParent(G,Nr))){var Xl=Q(j,Nr);Nr in at||(at[Nr]=ae(Xl.get())),Ka!==void 0&&Xl.set(Ka)}}var yt={},ht;function et(Nr){var Ka=v.name2id(Nr.split(".")[0]);return yt[Ka]=1,Ka}for(var Qe in G){if(w.hasParent(G,Qe))throw new Error("cannot set "+Qe+" and a parent attribute simultaneously");for(var Ge=Q(j,Qe),We=G[Qe],ct=Ge.parts.length,rt=ct-1;rt>0&&typeof Ge.parts[rt]!="string";)rt--;var Be=Ge.parts[rt],vt=Ge.parts[rt-1]+"."+Be,kt=Ge.parts.slice(0,rt).join("."),nr=n(N.layout,kt).get(),rr=n(V,kt).get(),pa=Ge.get();if(We!==void 0){St[Qe]=We,at[Qe]=Be==="reverse"?We:ae(pa);var Ir=f.getLayoutValObject(V,Ge.parts);if(Ir&&Ir.impliedEdits&&We!==null)for(var wo in Ir.impliedEdits)qe(i.relativeAttr(Qe,wo),Ir.impliedEdits[wo]);if(["width","height"].indexOf(Qe)!==-1)if(We){qe("autosize",null);var Ti=Qe==="height"?"width":"height";qe(Ti,V[Ti])}else V[Qe]=N._initialAutoSize[Qe];else if(Qe==="autosize")qe("width",We?null:V.width),qe("height",We?null:V.height);else if(vt.match(he))et(vt),n(V,kt+"._inputRange").set(null);else if(vt.match(te)){et(vt),n(V,kt+"._inputRange").set(null);var fn=n(V,kt).get();fn._inputDomain&&(fn._input.domain=fn._inputDomain.slice())}else vt.match(ue)&&n(V,kt+"._inputDomain").set(null);if(Be==="type"){ht=nr;var cn=rr.type==="linear"&&We==="log",ql=rr.type==="log"&&We==="linear";if(cn||ql){if(!ht||!ht.range)qe(kt+".autorange",!0);else if(rr.autorange)cn&&(ht.range=ht.range[1]>ht.range[0]?[1,2]:[2,1]);else{var Ea=ht.range[0],ma=ht.range[1];cn?(Ea<=0&&ma<=0&&qe(kt+".autorange",!0),Ea<=0?Ea=ma/1e6:ma<=0&&(ma=Ea/1e6),qe(kt+".range[0]",Math.log(Ea)/Math.LN10),qe(kt+".range[1]",Math.log(ma)/Math.LN10)):(qe(kt+".range[0]",Math.pow(10,Ea)),qe(kt+".range[1]",Math.pow(10,ma)))}Array.isArray(V._subplots.polar)&&V._subplots.polar.length&&V[Ge.parts[0]]&&Ge.parts[1]==="radialaxis"&&delete V[Ge.parts[0]]._subplot.viewInitial["radialaxis.range"],s.getComponentMethod("annotations","convertCoords")(N,rr,We,qe),s.getComponentMethod("images","convertCoords")(N,rr,We,qe)}else qe(kt+".autorange",!0),qe(kt+".range",null);n(V,kt+"._inputRange").set(null)}else if(Be.match(x)){var To=n(V,Qe).get(),ki=(We||{}).type;(!ki||ki==="-")&&(ki="linear"),s.getComponentMethod("annotations","convertCoords")(N,To,ki,qe),s.getComponentMethod("images","convertCoords")(N,To,ki,qe)}var un=b.containerArrayMatch(Qe);if(un){Me=un.array,Ne=un.index;var Za=un.property,vn=Ir||{editType:"calc"};Ne!==""&&Za===""&&(b.isAddVal(We)?at[Qe]=null:b.isRemoveVal(We)?at[Qe]=(n(j,Me).get()||[])[Ne]:i.warn("unrecognized full object value",G)),y.update(Ue,vn),ie[Me]||(ie[Me]={});var Ai=ie[Me][Ne];Ai||(Ai=ie[Me][Ne]={}),Ai[Za]=We,delete G[Qe]}else Be==="reverse"?(nr.range?nr.range.reverse():(qe(kt+".autorange",!0),nr.range=[1,0]),rr.autorange?Ue.calc=!0:Ue.plot=!0):(V._has("scatter-like")&&V._has("regl")&&Qe==="dragmode"&&(We==="lasso"||We==="select")&&!(pa==="lasso"||pa==="select")||V._has("gl2d")?Ue.plot=!0:Ir?y.update(Ue,Ir):Ue.calc=!0,Ge.set(We))}}for(Me in ie){var Nt=b.applyContainerArrayChanges(N,Q(j,Me),ie[Me],Ue,Q);Nt||(Ue.plot=!0)}for(var or in yt){ht=v.getFromId(N,or);var Ra=ht&&ht._constraintGroup;if(Ra){Ue.calc=!0;for(var Mi in Ra)yt[Mi]||(v.getFromId(N,Mi)._constraintShrinkable=!0)}}return(we(N)||G.height||G.width)&&(Ue.plot=!0),(Ue.plot||Ue.calc)&&(Ue.layoutReplot=!0),{flags:Ue,rangesAltered:yt,undoit:at,redoit:St,eventData:ce}}function we(N){var G=N._fullLayout,j=G.width,V=G.height;return N.layout.autosize&&c.plotAutoSize(N,N.layout,G),G.width!==j||G.height!==V}function Pe(N,G,j,V){N=i.getGraphDiv(N),w.clearPromiseQueue(N),i.isPlainObject(G)||(G={}),i.isPlainObject(j)||(j={}),Object.keys(G).length&&(N.changed=!0),Object.keys(j).length&&(N.changed=!0);var ee=w.coerceTraceIndices(N,V),Q=se(N,i.extendFlat({},G),ee),ge=Q.flags,_e=Le(N,i.extendFlat({},j)),ce=_e.flags;(ge.calc||ce.calc)&&(N.calcdata=void 0),ge.clearAxisTypes&&w.clearAxisTypes(N,ee,j);var ie=[];ce.layoutReplot?ie.push(m.layoutReplot):ge.fullReplot?ie.push(t._doPlot):(ie.push(c.previousPromises),ke(N,ce,_e)||c.supplyDefaults(N),ge.style&&ie.push(m.doTraceStyle),(ge.colorbars||ce.colorbars)&&ie.push(m.doColorBars),ce.legend&&ie.push(m.doLegend),ce.layoutstyle&&ie.push(m.layoutStyles),ce.axrange&&ze(ie,_e.rangesAltered),ce.ticks&&ie.push(m.doTicksRelayout),ce.modebar&&ie.push(m.doModeBar),ce.camera&&ie.push(m.doCamera),ie.push(A)),ie.push(c.rehover,c.redrag),l.add(N,Pe,[N,Q.undoit,_e.undoit,Q.traces],Pe,[N,Q.redoit,_e.redoit,Q.traces]);var Me=i.syncOrAsync(ie,N);return(!Me||!Me.then)&&(Me=Promise.resolve(N)),Me.then(function(){return N.emit("plotly_update",{data:Q.eventData,layout:_e.eventData}),N})}function Ee(N){return function(j){j._fullLayout._guiEditing=!0;var V=N.apply(null,arguments);return j._fullLayout._guiEditing=!1,V}}var Ce=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],q=[{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 pe(N,G){for(var j=0;j<G.length;j++){var V=G[j],ee=N.match(V.pattern);if(ee){var Q=ee[1]||"";return{head:Q,tail:N.substr(Q.length+1),attr:V.attr}}}}function ve(N,G){var j=n(G,N).get();if(j!==void 0)return j;var V=N.split(".");for(V.pop();V.length>1;)if(V.pop(),j=n(G,V.join(".")+".uirevision").get(),j!==void 0)return j;return G.uirevision}function ye(N,G){for(var j=0;j<G.length;j++)if(G[j]._fullInput.uid===N)return j;return-1}function le(N,G,j){for(var V=0;V<G.length;V++)if(G[V].uid===N)return V;return!G[j]||G[j].uid?-1:j}function fe(N,G){var j=i.isPlainObject(N),V=Array.isArray(N);return j||V?(j&&i.isPlainObject(G)||V&&Array.isArray(G))&&JSON.stringify(N)===JSON.stringify(G):N===G}function Te(N,G,j,V){var ee=V._preGUI,Q,ge,_e,ce,ie,Me,Ne,je,Ze,nt,dt=[],Ue={},St={};for(Q in ee){if(ie=pe(Q,Ce),ie){if(Ze=ie.head,nt=ie.tail,ge=ie.attr||Ze+".uirevision",_e=n(V,ge).get(),ce=_e&&ve(ge,G),ce&&ce===_e){if(Me=ee[Q],Me===null&&(Me=void 0),Ne=n(G,Q),je=Ne.get(),fe(je,Me)){je===void 0&&nt==="autorange"&&dt.push(Ze),Ne.set(ae(n(V,Q).get()));continue}else if(nt==="autorange"||nt.substr(0,6)==="range["){var at=ee[Ze+".range[0]"],qe=ee[Ze+".range[1]"],yt=ee[Ze+".autorange"];if(yt||yt===null&&at===null&&qe===null){if(!(Ze in Ue)){var ht=n(G,Ze).get();Ue[Ze]=ht&&(ht.autorange||ht.autorange!==!1&&(!ht.range||ht.range.length!==2))}if(Ue[Ze]){Ne.set(ae(n(V,Q).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+Q);delete ee[Q],ie&&ie.tail.substr(0,6)==="range["&&(St[ie.head]=1)}for(var et=0;et<dt.length;et++){var Qe=dt[et];if(St[Qe]){var Ge=n(G,Qe).get();Ge&&delete Ge.autorange}}var We=V._tracePreGUI;for(var ct in We){var rt=We[ct],Be=null,vt;for(Q in rt){if(!Be){var kt=ye(ct,j);if(kt<0){delete We[ct];break}var nr=j[kt];vt=nr._fullInput;var rr=le(ct,N,vt.index);if(rr<0){delete We[ct];break}Be=N[rr]}if(ie=pe(Q,q),ie){if(ie.attr?(_e=n(V,ie.attr).get(),ce=_e&&ve(ie.attr,G)):(_e=vt.uirevision,ce=Be.uirevision,ce===void 0&&(ce=G.uirevision)),ce&&ce===_e&&(Me=rt[Q],Me===null&&(Me=void 0),Ne=n(Be,Q),je=Ne.get(),fe(je,Me))){Ne.set(ae(n(vt,Q).get()));continue}}else i.warn("unrecognized GUI edit: "+Q+" in trace uid "+ct);delete rt[Q]}}}function xe(N,G,j,V){var ee,Q;function ge(){return t.addFrames(N,ee)}N=i.getGraphDiv(N),w.clearPromiseQueue(N);var _e=N._fullData,ce=N._fullLayout;if(!i.isPlotDiv(N)||!_e||!ce)Q=t.newPlot(N,G,j,V);else{if(i.isPlainObject(G)){var ie=G;G=ie.data,j=ie.layout,V=ie.config,ee=ie.frames}var Me=!1;if(V){var Ne=i.extendDeep({},N._context);N._context=void 0,E(N,V),Me=Oe(Ne,N._context)}N.data=G||[],w.cleanData(N.data),N.layout=j||{},w.cleanLayout(N.layout),Te(N.data,N.layout,_e,ce),c.supplyDefaults(N,{skipUpdateCalc:!0});var je=N._fullData,Ze=N._fullLayout,nt=Ze.datarevision===void 0,dt=Ze.transition,Ue=Ae(N,ce,Ze,nt,dt),St=Ue.newDataRevision,at=be(N,_e,je,nt,dt,St);if(we(N)&&(Ue.layoutReplot=!0),at.calc||Ue.calc){N.calcdata=void 0;for(var qe=Object.getOwnPropertyNames(Ze),yt=0;yt<qe.length;yt++){var ht=qe[yt],et=ht.substring(0,5);if(et==="xaxis"||et==="yaxis"){var Qe=Ze[ht]._emptyCategories;Qe&&Qe()}}}else c.supplyDefaultsUpdateCalc(N.calcdata,je);var Ge=[];if(ee&&(N._transitionData={},c.createTransitionData(N),Ge.push(ge)),Ze.transition&&!Me&&(at.anim||Ue.anim))Ue.ticks&&Ge.push(m.doTicksRelayout),c.doCalcdata(N),m.doAutoRangeAndConstraints(N),Ge.push(function(){return c.transitionFromReact(N,at,Ue,ce)});else if(at.fullReplot||Ue.layoutReplot||Me)N._fullLayout._skipDefaults=!0,Ge.push(t._doPlot);else{for(var We in Ue.arrays){var ct=Ue.arrays[We];if(ct.length){var rt=s.getComponentMethod(We,"drawOne");if(rt!==i.noop)for(var Be=0;Be<ct.length;Be++)rt(N,ct[Be]);else{var vt=s.getComponentMethod(We,"draw");if(vt===i.noop)throw new Error("cannot draw components: "+We);vt(N)}}}Ge.push(c.previousPromises),at.style&&Ge.push(m.doTraceStyle),(at.colorbars||Ue.colorbars)&&Ge.push(m.doColorBars),Ue.legend&&Ge.push(m.doLegend),Ue.layoutstyle&&Ge.push(m.layoutStyles),Ue.axrange&&ze(Ge),Ue.ticks&&Ge.push(m.doTicksRelayout),Ue.modebar&&Ge.push(m.doModeBar),Ue.camera&&Ge.push(m.doCamera),Ge.push(A)}Ge.push(c.rehover,c.redrag),Q=i.syncOrAsync(Ge,N),(!Q||!Q.then)&&(Q=Promise.resolve(N))}return Q.then(function(){return N.emit("plotly_react",{data:G,layout:j}),N})}function be(N,G,j,V,ee,Q){var ge=G.length===j.length;if(!ee&&!ge)return{fullReplot:!0,calc:!0};var _e=y.traceFlags();_e.arrays={},_e.nChanges=0,_e.nChangesAnim=0;var ce,ie;function Me(Ze){var nt=f.getTraceValObject(ie,Ze);return!ie._module.animatable&&nt.anim&&(nt.anim=!1),nt}var Ne={getValObject:Me,flags:_e,immutable:V,transition:ee,newDataRevision:Q,gd:N},je={};for(ce=0;ce<G.length;ce++)if(j[ce]){if(ie=j[ce]._fullInput,c.hasMakesDataTransform(ie)&&(ie=j[ce]),je[ie.uid])continue;je[ie.uid]=1,De(G[ce]._fullInput,ie,[],Ne)}return(_e.calc||_e.plot)&&(_e.fullReplot=!0),ee&&_e.nChanges&&_e.nChangesAnim&&(_e.anim=_e.nChanges===_e.nChangesAnim&&ge?"all":"some"),_e}function Ae(N,G,j,V,ee){var Q=y.layoutFlags();Q.arrays={},Q.rangesAltered={},Q.nChanges=0,Q.nChangesAnim=0;function ge(ce){return f.getLayoutValObject(j,ce)}var _e={getValObject:ge,flags:Q,immutable:V,transition:ee,gd:N};return De(G,j,[],_e),(Q.plot||Q.calc)&&(Q.layoutReplot=!0),ee&&Q.nChanges&&Q.nChangesAnim&&(Q.anim=Q.nChanges===Q.nChangesAnim?"all":"some"),Q}function De(N,G,j,V){var ee,Q,ge,_e=V.getValObject,ce=V.flags,ie=V.immutable,Me=V.inArray,Ne=V.arrayIndex;function je(){var kt=ee.editType;if(Me&&kt.indexOf("arraydraw")!==-1){i.pushUnique(ce.arrays[Me],Ne);return}y.update(ce,ee),kt!=="none"&&ce.nChanges++,V.transition&&ee.anim&&ce.nChangesAnim++,(he.test(ge)||te.test(ge))&&(ce.rangesAltered[j[0]]=1),ue.test(ge)&&n(G,"_inputDomain").set(null),Q==="datarevision"&&(ce.newDataRevision=1)}function Ze(kt){return kt.valType==="data_array"||kt.arrayOk}for(Q in N){if(ce.calc&&!V.transition)return;var nt=N[Q],dt=G[Q],Ue=j.concat(Q);if(ge=Ue.join("."),!(Q.charAt(0)==="_"||typeof nt=="function"||nt===dt)){if((Q==="tick0"||Q==="dtick")&&j[0]!=="geo"){var St=G.tickmode;if(St==="auto"||St==="array"||!St)continue}if(!(Q==="range"&&G.autorange)&&!((Q==="zmin"||Q==="zmax")&&G.type==="contourcarpet")&&(ee=_e(Ue),!!ee&&!(ee._compareAsJSON&&JSON.stringify(nt)===JSON.stringify(dt)))){var at=ee.valType,qe,yt=Ze(ee),ht=Array.isArray(nt),et=Array.isArray(dt);if(ht&&et){var Qe="_input_"+Q,Ge=N[Qe],We=G[Qe];if(Array.isArray(Ge)&&Ge===We)continue}if(dt===void 0)yt&&ht?ce.calc=!0:je();else if(ee._isLinkedToArray){var ct=[],rt=!1;Me||(ce.arrays[Q]=ct);var Be=Math.min(nt.length,dt.length),vt=Math.max(nt.length,dt.length);if(Be!==vt)if(ee.editType==="arraydraw")rt=!0;else{je();continue}for(qe=0;qe<Be;qe++)De(nt[qe],dt[qe],Ue.concat(qe),i.extendFlat({inArray:Q,arrayIndex:qe},V));if(rt)for(qe=Be;qe<vt;qe++)ct.push(qe)}else!at&&i.isPlainObject(nt)?De(nt,dt,Ue,V):yt?ht&&et?(ie&&(ce.calc=!0),(ie||V.newDataRevision)&&je()):ht!==et?ce.calc=!0:je():ht&&et?(nt.length!==dt.length||String(nt)!==String(dt))&&je():je()}}}for(Q in G)if(!(Q in N||Q.charAt(0)==="_"||typeof G[Q]=="function"))if(ee=_e(j.concat(Q)),Ze(ee)&&Array.isArray(G[Q])){ce.calc=!0;return}else je()}function Oe(N,G){var j;for(j in N)if(j.charAt(0)!=="_"){var V=N[j],ee=G[j];if(V!==ee)if(i.isPlainObject(V)&&i.isPlainObject(ee)){if(Oe(V,ee))return!0}else if(Array.isArray(V)&&Array.isArray(ee)){if(V.length!==ee.length)return!0;for(var Q=0;Q<V.length;Q++)if(V[Q]!==ee[Q])if(i.isPlainObject(V[Q])&&i.isPlainObject(ee[Q])){if(Oe(V[Q],ee[Q]))return!0}else return!0}else return!0}}function Fe(N,G,j){if(N=i.getGraphDiv(N),!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var V=N._transitionData;V._frameQueue||(V._frameQueue=[]),j=c.supplyAnimationDefaults(j);var ee=j.transition,Q=j.frame;V._frameWaitingCnt===void 0&&(V._frameWaitingCnt=0);function ge(ie){return Array.isArray(ee)?ie>=ee.length?ee[0]:ee[ie]:ee}function _e(ie){return Array.isArray(Q)?ie>=Q.length?Q[0]:Q[ie]:Q}function ce(ie,Me){var Ne=0;return function(){if(ie&&++Ne===Me)return ie()}}return new Promise(function(ie,Me){function Ne(){if(V._frameQueue.length!==0){for(;V._frameQueue.length;){var Be=V._frameQueue.pop();Be.onInterrupt&&Be.onInterrupt()}N.emit("plotly_animationinterrupted",[])}}function je(Be){if(Be.length!==0){for(var vt=0;vt<Be.length;vt++){var kt;Be[vt].type==="byname"?kt=c.computeFrame(N,Be[vt].name):kt=Be[vt].data;var nr=_e(vt),rr=ge(vt);rr.duration=Math.min(rr.duration,nr.duration);var pa={frame:kt,name:Be[vt].name,frameOpts:nr,transitionOpts:rr};vt===Be.length-1&&(pa.onComplete=ce(ie,2),pa.onInterrupt=Me),V._frameQueue.push(pa)}j.mode==="immediate"&&(V._lastFrameAt=-1/0),V._animationRaf||dt()}}function Ze(){N.emit("plotly_animated"),window.cancelAnimationFrame(V._animationRaf),V._animationRaf=null}function nt(){V._currentFrame&&V._currentFrame.onComplete&&V._currentFrame.onComplete();var Be=V._currentFrame=V._frameQueue.shift();if(Be){var vt=Be.name?Be.name.toString():null;N._fullLayout._currentFrame=vt,V._lastFrameAt=Date.now(),V._timeToNext=Be.frameOpts.duration,c.transition(N,Be.frame.data,Be.frame.layout,w.coerceTraceIndices(N,Be.frame.traces),Be.frameOpts,Be.transitionOpts).then(function(){Be.onComplete&&Be.onComplete()}),N.emit("plotly_animatingframe",{name:vt,frame:Be.frame,animation:{frame:Be.frameOpts,transition:Be.transitionOpts}})}else Ze()}function dt(){N.emit("plotly_animating"),V._lastFrameAt=-1/0,V._timeToNext=0,V._runningTransitions=0,V._currentFrame=null;var Be=function(){V._animationRaf=window.requestAnimationFrame(Be),Date.now()-V._lastFrameAt>V._timeToNext&&nt()};Be()}var Ue=0;function St(Be){return Array.isArray(ee)?Ue>=ee.length?Be.transitionOpts=ee[Ue]:Be.transitionOpts=ee[0]:Be.transitionOpts=ee,Ue++,Be}var at,qe,yt=[],ht=G==null,et=Array.isArray(G),Qe=!ht&&!et&&i.isPlainObject(G);if(Qe)yt.push({type:"object",data:St(i.extendFlat({},G))});else if(ht||["string","number"].indexOf(typeof G)!==-1)for(at=0;at<V._frames.length;at++)qe=V._frames[at],!!qe&&(ht||String(qe.group)===String(G))&&yt.push({type:"byname",name:String(qe.name),data:St({name:qe.name})});else if(et)for(at=0;at<G.length;at++){var Ge=G[at];["number","string"].indexOf(typeof Ge)!==-1?(Ge=String(Ge),yt.push({type:"byname",name:Ge,data:St({name:Ge})})):i.isPlainObject(Ge)&&yt.push({type:"object",data:St(i.extendFlat({},Ge))})}for(at=0;at<yt.length;at++)if(qe=yt[at],qe.type==="byname"&&!V._frameHash[qe.data.name]){i.warn('animate failure: frame not found: "'+qe.data.name+'"'),Me();return}["next","immediate"].indexOf(j.mode)!==-1&&Ne(),j.direction==="reverse"&&yt.reverse();var We=N._fullLayout._currentFrame;if(We&&j.fromcurrent){var ct=-1;for(at=0;at<yt.length;at++)if(qe=yt[at],qe.type==="byname"&&qe.name===We){ct=at;break}if(ct>0&&ct<yt.length-1){var rt=[];for(at=0;at<yt.length;at++)qe=yt[at],(yt[at].type!=="byname"||at>ct)&&rt.push(qe);yt=rt}}yt.length>0?je(yt):(N.emit("plotly_animated"),ie())})}function st(N,G,j){if(N=i.getGraphDiv(N),G==null)return Promise.resolve();if(!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var V,ee,Q,ge,_e=N._transitionData._frames,ce=N._transitionData._frameHash;if(!Array.isArray(G))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+G);var ie=_e.length+G.length*2,Me=[],Ne={};for(V=G.length-1;V>=0;V--)if(!!i.isPlainObject(G[V])){var je=G[V].name,Ze=(ce[je]||Ne[je]||{}).name,nt=G[V].name,dt=ce[Ze]||Ne[Ze];Ze&&nt&&typeof nt=="number"&&dt&&T<k&&(T++,i.warn('addFrames: overwriting frame "'+(ce[Ze]||Ne[Ze]).name+'" with a frame whose name of type "number" also equates to "'+Ze+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),T===k&&i.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),Ne[je]={name:je},Me.push({frame:c.supplyFrameDefaults(G[V]),index:j&&j[V]!==void 0&&j[V]!==null?j[V]:ie+V})}Me.sort(function(Qe,Ge){return Qe.index>Ge.index?-1:Qe.index<Ge.index?1:0});var Ue=[],St=[],at=_e.length;for(V=Me.length-1;V>=0;V--){if(ee=Me[V].frame,typeof ee.name=="number"&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!ee.name)for(;ce[ee.name="frame "+N._transitionData._counter++];);if(ce[ee.name]){for(Q=0;Q<_e.length&&(_e[Q]||{}).name!==ee.name;Q++);Ue.push({type:"replace",index:Q,value:ee}),St.unshift({type:"replace",index:Q,value:_e[Q]})}else ge=Math.max(0,Math.min(Me[V].index,at)),Ue.push({type:"insert",index:ge,value:ee}),St.unshift({type:"delete",index:ge}),at++}var qe=c.modifyFrames,yt=c.modifyFrames,ht=[N,St],et=[N,Ue];return l&&l.add(N,qe,ht,yt,et),c.modifyFrames(N,Ue)}function Xe(N,G){if(N=i.getGraphDiv(N),!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N);var j,V,ee=N._transitionData._frames,Q=[],ge=[];if(!G)for(G=[],j=0;j<ee.length;j++)G.push(j);for(G=G.slice(),G.sort(),j=G.length-1;j>=0;j--)V=G[j],Q.push({type:"delete",index:V}),ge.unshift({type:"insert",index:V,value:ee[V]});var _e=c.modifyFrames,ce=c.modifyFrames,ie=[N,ge],Me=[N,Q];return l&&l.add(N,_e,ie,ce,Me),c.modifyFrames(N,Q)}function ut(N){N=i.getGraphDiv(N);var G=N._fullLayout||{},j=N._fullData||[];return c.cleanPlot([],{},j,G),c.purge(N),o.purge(N),G._container&&G._container.remove(),delete N._context,N}function Ke(N){var G=N._fullLayout,j=N.getBoundingClientRect();if(!i.equalDomRects(j,G._lastBBox)){var V=G._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(N));G._invScaleX=Math.sqrt(V[0][0]*V[0][0]+V[0][1]*V[0][1]+V[0][2]*V[0][2]),G._invScaleY=Math.sqrt(V[1][0]*V[1][0]+V[1][1]*V[1][1]+V[1][2]*V[1][2]),G._lastBBox=j}}function ft(N){var G=e.select(N),j=N._fullLayout;if(j._calcInverseTransform=Ke,j._calcInverseTransform(N),j._container=G.selectAll(".plot-container").data([0]),j._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),j._paperdiv=j._container.selectAll(".svg-container").data([0]),j._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),j._glcontainer=j._paperdiv.selectAll(".gl-container").data([{}]),j._glcontainer.enter().append("div").classed("gl-container",!0),j._paperdiv.selectAll(".main-svg").remove(),j._paperdiv.select(".modebar-container").remove(),j._paper=j._paperdiv.insert("svg",":first-child").classed("main-svg",!0),j._toppaper=j._paperdiv.append("svg").classed("main-svg",!0),j._modebardiv=j._paperdiv.append("div"),delete j._modeBar,j._hoverpaper=j._paperdiv.append("svg").classed("main-svg",!0),!j._uid){var V={};e.selectAll("defs").each(function(){this.id&&(V[this.id.split("-")[1]]=1)}),j._uid=i.randstr(V)}j._paperdiv.selectAll(".main-svg").attr(p.svgAttrs),j._defs=j._paper.append("defs").attr("id","defs-"+j._uid),j._clips=j._defs.append("g").classed("clips",!0),j._topdefs=j._toppaper.append("defs").attr("id","topdefs-"+j._uid),j._topclips=j._topdefs.append("g").classed("clips",!0),j._bgLayer=j._paper.append("g").classed("bglayer",!0),j._draggers=j._paper.append("g").classed("draglayer",!0);var ee=j._paper.append("g").classed("layer-below",!0);j._imageLowerLayer=ee.append("g").classed("imagelayer",!0),j._shapeLowerLayer=ee.append("g").classed("shapelayer",!0),j._cartesianlayer=j._paper.append("g").classed("cartesianlayer",!0),j._polarlayer=j._paper.append("g").classed("polarlayer",!0),j._smithlayer=j._paper.append("g").classed("smithlayer",!0),j._ternarylayer=j._paper.append("g").classed("ternarylayer",!0),j._geolayer=j._paper.append("g").classed("geolayer",!0),j._funnelarealayer=j._paper.append("g").classed("funnelarealayer",!0),j._pielayer=j._paper.append("g").classed("pielayer",!0),j._iciclelayer=j._paper.append("g").classed("iciclelayer",!0),j._treemaplayer=j._paper.append("g").classed("treemaplayer",!0),j._sunburstlayer=j._paper.append("g").classed("sunburstlayer",!0),j._indicatorlayer=j._toppaper.append("g").classed("indicatorlayer",!0),j._glimages=j._paper.append("g").classed("glimages",!0);var Q=j._toppaper.append("g").classed("layer-above",!0);j._imageUpperLayer=Q.append("g").classed("imagelayer",!0),j._shapeUpperLayer=Q.append("g").classed("shapelayer",!0),j._infolayer=j._toppaper.append("g").classed("infolayer",!0),j._menulayer=j._toppaper.append("g").classed("menulayer",!0),j._zoomlayer=j._toppaper.append("g").classed("zoomlayer",!0),j._hoverlayer=j._hoverpaper.append("g").classed("hoverlayer",!0),j._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),N.emit("plotly_framework")}t.animate=Fe,t.addFrames=st,t.deleteFrames=Xe,t.addTraces=Y,t.deleteTraces=W,t.extendTraces=X,t.moveTraces=K,t.prependTraces=O,t.newPlot=P,t._doPlot=S,t.purge=ut,t.react=xe,t.redraw=I,t.relayout=Re,t.restyle=Z,t.setPlotConfig=$,t.update=Pe,t._guiRelayout=Ee(Re),t._guiRestyle=Ee(Z),t._guiUpdate=Ee(Pe),t._storeDirectGUIEdit=re})(Jd);var br={},w3=Ve;br.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0};br.getRedrawFunc=function(t){return function(){w3.getComponentMethod("colorbar","draw")(t)}};br.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)};br.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var rw=window.URL||window.webkitURL;br.createObjectURL=function(t){return rw.createObjectURL(t)};br.revokeObjectURL=function(t){return rw.revokeObjectURL(t)};br.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=T3(window.atob(t));return new window.Blob([r],{type:"image/"+e})};br.octetStream=function(t){document.location.href="data:application/octet-stream"+t};function T3(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}br.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/;br.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.";var fd=tt.exports,k3=de.exports,A3=Tt.exports,M3=Je.exports,ws=on,ku=/"/g,rl="TOBESTRIPPED",S3=new RegExp('("'+rl+")|("+rl+'")',"g");function L3(t){var e=fd.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":e.html(a).text()});return e.remove(),r}function C3(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}var Bh=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(A3.setRect,0,0,l,s).call(M3.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(f=0;f<c.length;f++){var v=c[f];v.toSVG&&v.toSVG(e)}if(o){var u=o.node().childNodes,d=Array.prototype.slice.call(u);for(f=0;f<d.length;f++){var h=d[f];h.childNodes.length&&n.node().appendChild(h)}}i._draggers&&i._draggers.remove(),n.node().style.background="",n.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var g=fd.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){g.remove();return}else g.style({visibility:null,display:null});var _=this.style.fontFamily;_&&_.indexOf('"')!==-1&&g.style("font-family",_.replace(ku,rl))}),n.selectAll(".gradient_filled,.pattern_filled").each(function(){var g=fd.select(this),_=this.style.fill;_&&_.indexOf("url(")!==-1&&g.style("fill",_.replace(ku,rl));var b=this.style.stroke;b&&b.indexOf("url(")!==-1&&g.style("stroke",b.replace(ku,rl))}),(r==="pdf"||r==="eps")&&n.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),n.node().setAttributeNS(ws.xmlns,"xmlns",ws.svg),n.node().setAttributeNS(ws.xmlns,"xmlns:xlink",ws.xlink),r==="svg"&&a&&(n.attr("width",a*l),n.attr("height",a*s),n.attr("viewBox","0 0 "+l+" "+s));var p=new window.XMLSerializer().serializeToString(n.node());return p=L3(p),p=C3(p),p=p.replace(S3,"'"),k3.isIE()&&(p=p.replace(/"/gi,"'"),p=p.replace(/(\('#)([^']*)('\))/gi,'("#$2")'),p=p.replace(/(\\')/gi,'"')),p},Ry=de.exports,D3=zd.exports.EventEmitter,xn=br;function $3(t){var e=t.emitter||new D3,r=new Promise(function(a,i){var n=window.Image,o=t.svg,l=t.format||"png";if(Ry.isIE()&&l!=="svg"){var s=new Error(xn.MSG_IE_BAD_FORMAT);return i(s),t.promise?r:e.emit("error",s)}var f=t.canvas,c=t.scale||1,v=t.width||300,u=t.height||150,d=c*v,h=c*u,p=f.getContext("2d"),g=new n,_,b;l==="svg"||Ry.isSafari()?b=xn.encodeSVG(o):(_=xn.createBlob(o,"svg"),b=xn.createObjectURL(_)),f.width=d,f.height=h,g.onload=function(){var w;switch(_=null,xn.revokeObjectURL(b),l!=="svg"&&p.drawImage(g,0,0,d,h),l){case"jpeg":w=f.toDataURL("image/jpeg");break;case"png":w=f.toDataURL("image/png");break;case"webp":w=f.toDataURL("image/webp");break;case"svg":w=b;break;default:var m="Image format is not jpeg, png, svg or webp.";if(i(new Error(m)),!t.promise)return e.emit("error",m)}a(w),t.promise||e.emit("success",w)},g.onerror=function(w){if(_=null,xn.revokeObjectURL(b),i(w),!t.promise)return e.emit("error",w)},g.src=b});return t.promise?r:e}var jh=$3,Py=lt,zy=Jd,E3=Ut.exports,_a=de.exports,Io=br,R3=Bh,P3=jh,z3=jf.version,Au={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 I3(t,e){e=e||{};var r,a,i,n;_a.isPlainObject(t)?(r=t.data||[],a=t.layout||{},i=t.config||{},n={}):(t=_a.getGraphDiv(t),r=_a.extendDeep([],t.data),a=_a.extendDeep({},t.layout),i=t._context,n=t._fullLayout||{});function o(x){return!(x in e)||_a.validate(e[x],Au[x])}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 "+_a.join2(Au.format.values,", "," or ")+".");var l={};function s(x,T){return _a.coerce(e,l,Au,x,T)}var f=s("format"),c=s("width"),v=s("height"),u=s("scale"),d=s("setBackground"),h=s("imageDataOnly"),p=document.createElement("div");p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var g=_a.extendFlat({},a);c?g.width=c:e.width===null&&Py(n.width)&&(g.width=n.width),v?g.height=v:e.height===null&&Py(n.height)&&(g.height=n.height);var _=_a.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),b=Io.getRedrawFunc(p);function w(){return new Promise(function(x){setTimeout(x,Io.getDelay(p._fullLayout))})}function m(){return new Promise(function(x,T){var k=R3(p,f,u),S=p._fullLayout.width,A=p._fullLayout.height;function $(){zy.purge(p),document.body.removeChild(p)}if(f==="full-json"){var M=E3.graphJson(p,!1,"keepdata","object",!0,!0);return M.version=z3,M=JSON.stringify(M),$(),x(h?M:Io.encodeJSON(M))}if($(),f==="svg")return x(h?k:Io.encodeSVG(k));var C=document.createElement("canvas");C.id=_a.randstr(),P3({format:f,width:S,height:A,scale:u,canvas:C,svg:k,promise:!0}).then(x).catch(T)})}function y(x){return h?x.replace(Io.IMAGE_URL_PREFIX,""):x}return new Promise(function(x,T){zy.newPlot(p,r,g,_).then(b).then(w).then(m).then(function(k){x(y(k))}).catch(function(k){T(k)})})}var aw=I3,Yr=de.exports,N3=Ut.exports,F3=po,H3=uo.dfltConfig,Br=Yr.isPlainObject,vi=Array.isArray,Iy=Yr.isArrayOrTypedArray,O3=function(e,r){e===void 0&&(e=[]),r===void 0&&(r={});var a=F3.get(),i=[],n={_context:Yr.extendFlat({},H3)},o,l;vi(e)?(n.data=Yr.extendDeep([],e),o=e):(n.data=[],o=[],i.push(Xt("array","data"))),Br(r)?(n.layout=Yr.extendDeep({},r),l=r):(n.layout={},l={},arguments.length>1&&i.push(Xt("object","layout"))),N3.supplyDefaults(n);for(var s=n._fullData,f=o.length,c=0;c<f;c++){var v=o[c],u=["data",c];if(!Br(v)){i.push(Xt("object",u));continue}var d=s[c],h=d.type,p=a.traces[h].attributes;p.type={valType:"enumerated",values:[h]},d.visible===!1&&v.visible!==!1&&i.push(Xt("invisible",u)),al(v,d,p,i,u);var g=v.transforms,_=d.transforms;if(g){vi(g)||i.push(Xt("array",u,["transforms"])),u.push("transforms");for(var b=0;b<g.length;b++){var w=["transforms",b],m=g[b].type;if(!Br(g[b])){i.push(Xt("object",u,w));continue}var y=a.transforms[m]?a.transforms[m].attributes:{};y.type={valType:"enumerated",values:Object.keys(a.transforms)},al(g[b],_[b],y,i,u,w)}}}var x=n._fullLayout,T=B3(a,s);return al(l,x,T,i,"layout"),i.length===0?void 0:i};function al(t,e,r,a,i,n){n=n||[];for(var o=Object.keys(t),l=0;l<o.length;l++){var s=o[l];if(s!=="transforms"){var f=n.slice();f.push(s);var c=t[s],v=e[s],u=U3(r,s),d=(u||{}).valType,h=d==="info_array",p=d==="colorscale",g=(u||{}).items;if(!G3(r,s))a.push(Xt("schema",i,f));else if(Br(c)&&Br(v)&&d!=="any")al(c,v,u,a,i,f);else if(h&&vi(c)){c.length>v.length&&a.push(Xt("unused",i,f.concat(v.length)));var _=v.length,b=Array.isArray(g);b&&(_=Math.min(_,g.length));var w,m,y,x,T;if(u.dimensions===2)for(m=0;m<_;m++)if(vi(c[m])){c[m].length>v[m].length&&a.push(Xt("unused",i,f.concat(m,v[m].length)));var k=v[m].length;for(w=0;w<(b?Math.min(k,g[m].length):k);w++)y=b?g[m][w]:g,x=c[m][w],T=v[m][w],Yr.validate(x,y)?T!==x&&T!==+x&&a.push(Xt("dynamic",i,f.concat(m,w),x,T)):a.push(Xt("value",i,f.concat(m,w),x))}else a.push(Xt("array",i,f.concat(m),c[m]));else for(m=0;m<_;m++)y=b?g[m]:g,x=c[m],T=v[m],Yr.validate(x,y)?T!==x&&T!==+x&&a.push(Xt("dynamic",i,f.concat(m),x,T)):a.push(Xt("value",i,f.concat(m),x))}else if(u.items&&!h&&vi(c)){var S=g[Object.keys(g)[0]],A=[],$,M;for($=0;$<v.length;$++){var C=v[$]._index||$;if(M=f.slice(),M.push(C),Br(c[C])&&Br(v[$])){A.push(C);var E=c[C],I=v[$];Br(E)&&E.visible!==!1&&I.visible===!1?a.push(Xt("invisible",i,M)):al(E,I,S,a,i,M)}}for($=0;$<c.length;$++)M=f.slice(),M.push($),Br(c[$])?A.indexOf($)===-1&&a.push(Xt("unused",i,M)):a.push(Xt("object",i,M,c[$]))}else!Br(c)&&Br(v)?a.push(Xt("object",i,f,c)):!Iy(c)&&Iy(v)&&!h&&!p?a.push(Xt("array",i,f,c)):s in e?Yr.validate(c,u)?u.valType==="enumerated"&&(u.coerceNumber&&c!==+v||c!==v)&&a.push(Xt("dynamic",i,f,c,v)):a.push(Xt("value",i,f,c)):a.push(Xt("unused",i,f,c))}}return a}function B3(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?Yr.extendFlat(r[n.attributes.subplot.dflt],o):Yr.extendFlat(r,o))}return r}var j3={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=Di(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=Di(t)+"key "+e,r+" must be linked to an array container"},schema:function(t,e){return Di(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var a=Br(r)?"container":"key";return Di(t)+a+" "+e+" did not get coerced"},dynamic:function(t,e,r,a){return[Di(t)+"key",e,"(set to '"+r+"')","got reset to","'"+a+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?Di(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[Di(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function Di(t){return vi(t)?"In data trace "+t[1]+", ":"In "+t+", "}function Xt(t,e,r,a,i){r=r||"";var n,o;vi(e)?(n=e[0],o=e[1]):(n=e,o=null);var l=q3(r),s=j3[t](e,l,a,i);return Yr.log(s),{code:t,container:n,trace:o,path:r,astr:l,msg:s}}function G3(t,e){var r=iw(e),a=r.keyMinusId,i=r.id;return a in t&&t[a]._isSubplotObj&&i?!0:e in t}function U3(t,e){if(e in t)return t[e];var r=iw(e);return t[r.keyMinusId]}var V3=Yr.counterRegex("([a-z]+)");function iw(t){var e=t.match(V3);return{keyMinusId:e&&e[1],id:e&&e[2]}}function q3(t){if(!vi(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 Ny=de.exports,No=br;function X3(t,e,r){var a=document.createElement("a"),i="download"in a,n=new Promise(function(o,l){var s,f;if(Ny.isIE())return s=No.createBlob(t,"svg"),window.navigator.msSaveBlob(s,e),s=null,o(e);if(i)return s=No.createBlob(t,r),f=No.createObjectURL(s),a.href=f,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),No.revokeObjectURL(f),s=null,o(e);if(Ny.isSafari()){var c=r==="svg"?",":";base64,";return No.octetStream(c+encodeURIComponent(t)),o(e)}l(new Error("download error"))});return n}var Y3=X3,Mu=de.exports,W3=aw,Z3=Y3,K3=br;function Q3(t,e){var r;return Mu.isPlainObject(t)||(r=Mu.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.")),Mu.isIE()&&e.format!=="svg"&&i(new Error(K3.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var n=W3(t,e),o=e.filename||t.fn||"newplot";o+="."+e.format.replace("-","."),n.then(function(l){return r&&(r._snapshotInProgress=!1),Z3(l,o,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),i(l)})})}var nw=Q3,Gh={},kr=de.exports,Ar=kr.isPlainObject,ow=po,lw=Ut.exports,J3=La,sw=Mt,fw=uo.dfltConfig;Gh.makeTemplate=function(t){t=kr.isPlainObject(t)?t:kr.getGraphDiv(t),t=kr.extendDeep({_context:fw},{data:t.data,layout:t.layout}),lw.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(d){var h={};il(d,h,t$.bind(null,d));var p=kr.coerce(d,{},J3,"type"),g=a.data[p];g||(g=a.data[p]=[]),g.push(h)}),il(r,a.layout,e$.bind(null,r)),delete a.layout.template;var i=r.template;if(Ar(i)){var n=i.layout,o,l,s,f,c,v;Ar(n)&&Af(n,a.layout);var u=i.data;if(Ar(u)){for(l in a.data)if(s=u[l],Array.isArray(s)){for(c=a.data[l],v=c.length,f=s.length,o=0;o<v;o++)Af(s[o%f],c[o]);for(o=v;o<f;o++)c.push(kr.extendDeep({},s[o]))}for(l in u)l in a.data||(a.data[l]=kr.extendDeep([],u[l]))}}return a};function Af(t,e){t=kr.extendDeep({},t);var r=Object.keys(t).sort(),a,i;function n(c,v,u){if(Ar(v)&&Ar(c))Af(c,v);else if(Array.isArray(v)&&Array.isArray(c)){var d=sw.arrayTemplater({_template:t},u);for(i=0;i<v.length;i++){var h=v[i],p=d.newItem(h)._template;p&&Af(p,h)}var g=d.defaultItems();for(i=0;i<g.length;i++)v.push(g[i]._template);for(i=0;i<v.length;i++)delete v[i].templateitemname}}for(a=0;a<r.length;a++){var o=r[a],l=t[o];if(o in e?n(l,e[o],o):e[o]=l,Mf(o)===o)for(var s in e){var f=Mf(s);s!==f&&f===o&&!(s in t)&&n(l,e[s],o)}}}function Mf(t){return t.replace(/[0-9]+$/,"")}function il(t,e,r,a,i){var n=i&&r(i);for(var o in t){var l=t[o],s=jr(t,o,a),f=jr(t,o,i),c=r(f);if(!c){var v=Mf(o);v!==o&&(f=jr(t,v,i),c=r(f))}if(!(n&&n===c)&&!(!c||c._noTemplating||c.valType==="data_array"||c.arrayOk&&Array.isArray(l)))if(!c.valType&&Ar(l))il(l,e,r,s,f);else if(c._isLinkedToArray&&Array.isArray(l))for(var u=!1,d=0,h={},p=0;p<l.length;p++){var g=l[p];if(Ar(g)){var _=g.name;if(_)h[_]||(il(g,e,r,jr(l,d,s),jr(l,d,f)),d++,h[_]=1);else if(!u){var b=sw.arrayDefaultKey(o),w=jr(t,b,a),m=jr(l,d,s);il(g,e,r,m,jr(l,d,f));var y=kr.nestedProperty(e,m),x=kr.nestedProperty(e,w);x.set(y.get()),y.set(null),u=!0}}}else{var T=kr.nestedProperty(e,s);T.set(l)}}}function e$(t,e){return ow.getLayoutValObject(t,kr.nestedProperty({},e).parts)}function t$(t,e){return ow.getTraceValObject(t,kr.nestedProperty({},e).parts)}function jr(t,e,r){var a;return r?Array.isArray(t)?a=r+"["+e+"]":a=r+"."+e:a=e,a}Gh.validateTemplate=function(t,e){var r=kr.extendDeep({},{_context:fw,data:t.data,layout:t.layout}),a=r.layout||{};Ar(e)||(e=a.template||{});var i=e.layout,n=e.data,o=[];r.layout=a,r.layout.template=e,lw.supplyDefaults(r);var l=r._fullLayout,s=r._fullData,f={};function c(w,m){for(var y in w)if(y.charAt(0)!=="_"&&Ar(w[y])){var x=Mf(y),T=[],k;for(k=0;k<m.length;k++)T.push(jr(w,y,m[k])),x!==y&&T.push(jr(w,x,m[k]));for(k=0;k<T.length;k++)f[T[k]]=1;c(w[y],T)}}function v(w,m){for(var y in w)if(y.indexOf("defaults")===-1&&Ar(w[y])){var x=jr(w,y,m);f[x]?v(w[y],x):o.push({code:"unused",path:x})}}if(Ar(i)?(c(l,["layout"]),v(i,"layout")):o.push({code:"layout"}),!Ar(n))o.push({code:"data"});else{for(var u={},d,h=0;h<s.length;h++){var p=s[h];d=p.type,u[d]=(u[d]||0)+1,p._fullInput._template||o.push({code:"missing",index:p._fullInput.index,traceType:d})}for(d in n){var g=n[d].length,_=u[d]||0;g>_?o.push({code:"unused",traceType:d,templateCount:g,dataCount:_}):_>g&&o.push({code:"reused",traceType:d,templateCount:g,dataCount:_})}}function b(w,m){for(var y in w)if(y.charAt(0)!=="_"){var x=w[y],T=jr(w,y,m);Ar(x)?(Array.isArray(w)&&x._template===!1&&x.templateitemname&&o.push({code:"missing",path:T,templateitemname:x.templateitemname}),b(x,T)):Array.isArray(x)&&r$(x)&&b(x,T)}}if(b({data:s,layout:l},""),o.length)return o.map(a$)};function r$(t){for(var e=0;e<t.length;e++)if(Ar(t[e]))return!0}function a$(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 Kt=Jd;It._doPlot=Kt._doPlot;It.newPlot=Kt.newPlot;It.restyle=Kt.restyle;It.relayout=Kt.relayout;It.redraw=Kt.redraw;It.update=Kt.update;It._guiRestyle=Kt._guiRestyle;It._guiRelayout=Kt._guiRelayout;It._guiUpdate=Kt._guiUpdate;It._storeDirectGUIEdit=Kt._storeDirectGUIEdit;It.react=Kt.react;It.extendTraces=Kt.extendTraces;It.prependTraces=Kt.prependTraces;It.addTraces=Kt.addTraces;It.deleteTraces=Kt.deleteTraces;It.moveTraces=Kt.moveTraces;It.purge=Kt.purge;It.addFrames=Kt.addFrames;It.deleteFrames=Kt.deleteFrames;It.animate=Kt.animate;It.setPlotConfig=Kt.setPlotConfig;It.toImage=aw;It.validate=O3;It.downloadImage=nw;var cw=Gh;It.makeTemplate=cw.makeTemplate;It.validateTemplate=cw.validateTemplate;var Cr={},uw=u1,i$=uw.FORMAT_LINK,n$=uw.DATE_FORMAT_LINK;function vw(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}".`,i$,"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}".`,n$,"for details on the date formatting syntax."].join(" ")}function dw(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var a=[],i=0;i<r.length;i++)a[i]="`"+r[i]+"`";e=e+"Finally, the template string has access to ",r.length===1?e="variable "+a[0]:e="variables "+a.slice(0,-1).join(", ")+" and "+a.slice(-1)+"."}return e}Cr.hovertemplateAttrs=function(t,e){t=t||{},e=e||{};var r=dw(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`.",vw({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=dw(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`.",vw(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return t.arrayOk!==!1&&(a.arrayOk=!0),a};var hc={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]},Fy=mo.axisHoverFormat,o$=Cr.texttemplateAttrs,l$=Cr.hovertemplateAttrs,Hy=ln,s$=dr,f$=Ga.dash,c$=Ga.pattern,u$=Tt.exports,Oy=hc,Su=Bt.extendFlat;function By(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 jy(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 Gy(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 xo={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:By("x"),yperiod:By("y"),xperiod0:jy("x0"),yperiod0:jy("y0"),xperiodalignment:Gy("x"),yperiodalignment:Gy("y"),xhoverformat:Fy("x"),yhoverformat:Fy("y"),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 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:o$({},{}),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 "+Oy.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:l$({},{keys:Oy.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:Su({},f$,{editType:"style"}),simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},fillpattern:c$,marker:Su({symbol:{valType:"enumerated",values:u$.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."},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:Su({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"},Hy("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"},Hy("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:s$({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."})},Lu=de.exports,v$=Ve,Uh=function(e,r,a,i){var n=i("x"),o=i("y"),l,s=v$.getComponentMethod("calendars","handleTraceDefaults");if(s(e,r,["x","y"],a),n){var f=Lu.minRowLength(n);o?l=Math.min(f,Lu.minRowLength(o)):(l=f,i("y0"),i("dy"))}else{if(!o)return 0;l=Lu.minRowLength(o),i("x0"),i("dx")}return r._length=l,l},Uy=de.exports.dateTick0,d$=Ot,h$=d$.ONEWEEK;function Vy(t,e){return t%h$===0?Uy(e,1):Uy(e,0)}var pc=function(e,r,a,i,n){if(n||(n={x:!0,y:!0}),n.x){var o=i("xperiod");o&&(i("xperiod0",Vy(o,r.xcalendar)),i("xperiodalignment"))}if(n.y){var l=i("yperiod");l&&(i("yperiod0",Vy(l,r.ycalendar)),i("yperiodalignment"))}},qy=["orientation","groupnorm","stackgaps"],p$=function(e,r,a,i){var n=a._scatterStackOpts,o=i("stackgroup");if(o){var l=r.xaxis+r.yaxis,s=n[l];s||(s=n[l]={});var f=s[o],c=!1;f?f.traces.push(r):(f=s[o]={traceIndices:[],traces:[r]},c=!0);for(var v={orientation:r.x&&!r.y?"h":"v"},u=0;u<qy.length;u++){var d=qy[u],h=d+"Found";if(!f[h]){var p=e[d]!==void 0,g=d==="orientation";if((p||c)&&(f[d]=i(d,v[d]),g&&(f.fillDflt=f[d]==="h"?"tonextx":"tonexty"),p&&(f[h]=!0,!c&&(delete f.traces[0][d],g))))for(var _=0;_<f.traces.length-1;_++){var b=f.traces[_];b._input.fill!==b.fill&&(b.fill=f.fillDflt)}}}return f}},Xy=Je.exports,Yy=da.hasColorscale,Wy=zl,m$=mr,hw=function(e,r,a,i,n,o){var l=m$.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"),n("marker.color",a),Yy(e,"marker")&&Wy(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=Xy.background:f=Xy.defaultLine,n("marker.line.color",f),Yy(e,"marker.line")&&Wy(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")}},y$=de.exports.isArrayOrTypedArray,g$=da.hasColorscale,b$=zl,pw=function(e,r,a,i,n,o){var l=(e.marker||{}).color;if(n("line.color",a),g$(e,"line"))b$(e,r,i,n,{prefix:"line.",cLetter:"c"});else{var s=(y$(l)?!1:l)||a;n("line.color",s)}n("line.width"),(o||{}).noDash||n("line.dash")},x$=function(e,r,a){var i=a("line.shape");i==="spline"&&a("line.smoothing")},_$=de.exports,mw=function(t,e,r,a,i){i=i||{},a("textposition"),_$.coerceFont(a,"textfont",r.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))},w$=Je.exports,Zy=de.exports.isArrayOrTypedArray,yw=function(e,r,a,i){var n=!1;if(r.marker){var o=r.marker.color,l=(r.marker.line||{}).color;o&&!Zy(o)?n=o:l&&!Zy(l)&&(n=l)}i("fillcolor",w$.addOpacity((r.line||{}).color||n||a,.5))},Ky=de.exports,T$=Ve,k$=xo,A$=hc,_n=mr,M$=Uh,S$=pc,L$=p$,C$=hw,D$=pw,Qy=x$,$$=mw,E$=yw,R$=de.exports.coercePattern,P$=function(e,r,a,i){function n(d,h){return Ky.coerce(e,r,k$,d,h)}var o=M$(e,r,i,n);if(o||(r.visible=!1),!!r.visible){S$(e,r,i,n),n("xhoverformat"),n("yhoverformat");var l=L$(e,r,i,n),s=!l&&o<A$.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("mode",s),_n.hasLines(r)&&(D$(e,r,a,i,n),Qy(e,r,n),n("connectgaps"),n("line.simplify")),_n.hasMarkers(r)&&C$(e,r,a,i,n,{gradient:!0}),_n.hasText(r)&&(n("texttemplate"),$$(e,r,i,n));var f=[];(_n.hasMarkers(r)||_n.hasText(r))&&(n("cliponaxis"),n("marker.maxdisplayed"),f.push("points")),n("fill",l?l.fillDflt:"none"),r.fill!=="none"&&(E$(e,r,a,n),_n.hasLines(r)||Qy(e,r,n),R$(n,"fillpattern",r.fillcolor,!1));var c=(r.line||{}).color,v=(r.marker||{}).color;(r.fill==="tonext"||r.fill==="toself")&&f.push("fills"),n("hoveron",f.join("+")||"points"),r.hoveron!=="fills"&&n("hovertemplate");var u=T$.getComponentMethod("errorbars","supplyDefaults");u(e,r,c||v||a,{axis:"y"}),u(e,r,c||v||a,{axis:"x",inherit:"y"}),Ky.coerceSelectionMarkerOpacity(r,n)}},gw=function(e){for(var r=0;r<e.length;r++){var a=e[r];if(a.type==="scatter"){var i=a.fill;if(!(i==="none"||i==="toself")&&(a.opacity=void 0,i==="tonexty"||i==="tonextx"))for(var n=r-1;n>=0;n--){var o=e[n];if(o.type==="scatter"&&o.xaxis===a.xaxis&&o.yaxis===a.yaxis){o.opacity=void 0;break}}}}},z$=lt,bw=de.exports,I$=bw.dateTime2ms,Ts=bw.incrementMonth,N$=Ot,F$=N$.ONEAVGMONTH,mc=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(z$(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:i}}for(var f=r.calendar,c=n==="start",v=n==="end",u=e[a+"period0"],d=I$(u,f)||0,h=[],p=[],g=[],_=i.length,b=0;b<_;b++){var w=i[b],m,y,x;if(l){for(m=Math.round((w-d)/(l*F$)),x=Ts(d,l*m,f);x>w;)x=Ts(x,-l,f);for(;x<=w;)x=Ts(x,l,f);y=Ts(x,-l,f)}else{for(m=Math.round((w-d)/o),x=d+m*o;x>w;)x-=o;for(;x<=w;)x+=o;y=x-o}h[b]=c?y:v?x:(y+x)/2,p[b]=y,g[b]=x}return{vals:h,starts:p,ends:g}},Cu=da.hasColorscale,Du=ah,Jy=mr,xw=function(e,r){Jy.hasLines(r)&&Cu(r,"line")&&Du(e,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),Jy.hasMarkers(r)&&(Cu(r,"marker")&&Du(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),Cu(r,"marker.line")&&Du(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))},cr=de.exports,_w=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;cr.mergeArray(r.text,e,"tx"),cr.mergeArray(r.texttemplate,e,"txt"),cr.mergeArray(r.hovertext,e,"htx"),cr.mergeArray(r.customdata,e,"data"),cr.mergeArray(r.textposition,e,"tp"),r.textfont&&(cr.mergeArrayCastPositive(r.textfont.size,e,"ts"),cr.mergeArray(r.textfont.color,e,"tc"),cr.mergeArray(r.textfont.family,e,"tf"));var i=r.marker;if(i){cr.mergeArrayCastPositive(i.size,e,"ms"),cr.mergeArrayCastPositive(i.opacity,e,"mo"),cr.mergeArray(i.symbol,e,"mx"),cr.mergeArray(i.color,e,"mc");var n=i.line;i.line&&(cr.mergeArray(n.color,e,"mlc"),cr.mergeArrayCastPositive(n.width,e,"mlw"));var o=i.gradient;o&&o.type!=="none"&&(cr.mergeArray(o.type,e,"mgt"),cr.mergeArray(o.color,e,"mgc"))}},eg=de.exports,ww=function(e,r){eg.isArrayOrTypedArray(r.selectedpoints)&&eg.tagSelected(e,r)},tg=lt,cd=de.exports,gl=Ct.exports,rg=mc,$u=Ot.BADNUM,ud=mr,H$=xw,O$=_w,B$=ww;function j$(t,e){var r=t._fullLayout,a=gl.getFromId(t,e.xaxis||"x"),i=gl.getFromId(t,e.yaxis||"y"),n=a.makeCalcdata(e,"x"),o=i.makeCalcdata(e,"y"),l=rg(e,a,"x",n),s=rg(e,i,"y",o),f=l.vals,c=s.vals,v=e._length,u=new Array(v),d=e.ids,h=Vh(e,r,a,i),p=!1,g,_,b,w,m,y;Aw(r,e);var x="x",T="y",k;if(h)cd.pushUnique(h.traceIndices,e._expandedIndex),g=h.orientation==="v",g?(T="s",k="x"):(x="s",k="y"),m=h.stackgaps==="interpolate";else{var S=kw(e,v);Tw(t,e,a,i,f,c,S)}var A=!!e.xperiodalignment,$=!!e.yperiodalignment;for(_=0;_<v;_++){var M=u[_]={},C=tg(f[_]),E=tg(c[_]);C&&E?(M[x]=f[_],M[T]=c[_],A&&(M.orig_x=n[_],M.xEnd=l.ends[_],M.xStart=l.starts[_]),$&&(M.orig_y=o[_],M.yEnd=s.ends[_],M.yStart=s.starts[_])):h&&(g?C:E)?(M[k]=g?f[_]:c[_],M.gap=!0,m?(M.s=$u,p=!0):M.s=0):M[x]=M[T]=$u,d&&(M.id=String(d[_]))}if(O$(u,e),H$(t,e),B$(u,e),h){for(_=0;_<u.length;)u[_][k]===$u?u.splice(_,1):_++;if(cd.sort(u,function(L,D){return L[k]-D[k]||L.i-D.i}),p){for(_=0;_<u.length-1&&u[_].gap;)_++;for(y=u[_].s,y||(y=u[_].s=0),b=0;b<_;b++)u[b].s=y;for(w=u.length-1;w>_&&u[w].gap;)w--;for(y=u[w].s,b=u.length-1;b>w;b--)u[b].s=y;for(;_<w;)if(_++,u[_].gap){for(b=_+1;u[b].gap;)b++;for(var I=u[_-1][k],P=u[_-1].s,R=(u[b].s-P)/(u[b][k]-I);_<b;)u[_].s=P+(u[_][k]-I)*R,_++}}}return u}function Tw(t,e,r,a,i,n,o){var l=e._length,s=t._fullLayout,f=r._id,c=a._id,v=s._firstScatter[Mw(e)]===e.uid,u=(Vh(e,s,r,a)||{}).orientation,d=e.fill;r._minDtick=0,a._minDtick=0;var h={padded:!0},p={padded:!0};o&&(h.ppad=p.ppad=o);var g=l<2||i[0]!==i[l-1]||n[0]!==n[l-1];g&&(d==="tozerox"||d==="tonextx"&&(v||u==="h"))?h.tozero=!0:!(e.error_y||{}).visible&&(d==="tonexty"||d==="tozeroy"||!ud.hasMarkers(e)&&!ud.hasText(e))&&(h.padded=!1,h.ppad=0),g&&(d==="tozeroy"||d==="tonexty"&&(v||u==="v"))?p.tozero=!0:(d==="tonextx"||d==="tozerox")&&(p.padded=!1),f&&(e._extremes[f]=gl.findExtremes(r,i,h)),c&&(e._extremes[c]=gl.findExtremes(a,n,p))}function kw(t,e){if(!!ud.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)},cd.isArrayOrTypedArray(r.size)){var n={type:"linear"};gl.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 Aw(t,e){var r=Mw(e),a=t._firstScatter;a[r]||(a[r]=e.uid)}function Mw(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function Vh(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 qh={calc:j$,calcMarkerSize:kw,calcAxisExpansion:Tw,setFirstScatter:Aw,getStackOpts:Vh},ag=qh,G$=function(e,r){var a=r.xaxis,i=r.yaxis,n=a._id+i._id,o=e._fullLayout._scatterStackOpts[n];if(!!o){var l=e.calcdata,s,f,c,v,u,d,h,p,g,_,b,w,m,y,x;for(var T in o){_=o[T];var k=_.traceIndices;if(!!k.length){for(b=_.stackgaps==="interpolate",w=_.groupnorm,_.orientation==="v"?(m="x",y="y"):(m="y",y="x"),x=new Array(k.length),s=0;s<x.length;s++)x[s]=!1;d=l[k[0]];var S=new Array(d.length);for(s=0;s<d.length;s++)S[s]=d[s][m];for(s=1;s<k.length;s++){for(u=l[k[s]],f=c=0;f<u.length;f++){for(h=u[f][m];h>S[c]&&c<S.length;c++)Eu(u,f,S[c],s,x,b,m),f++;if(h!==S[c]){for(v=0;v<s;v++)Eu(l[k[v]],c,h,v,x,b,m);S.splice(c,0,h)}c++}for(;c<S.length;c++)Eu(u,f,S[c],s,x,b,m),f++}var A=S.length;for(f=0;f<d.length;f++){for(p=d[f][y]=d[f].s,s=1;s<k.length;s++)u=l[k[s]],u[0].trace._rawLength=u[0].trace._length,u[0].trace._length=A,p+=u[f].s,u[f][y]=p;if(w)for(g=(w==="fraction"?p:p/100)||1,s=0;s<k.length;s++){var $=l[k[s]][f];$[y]/=g,$.sNorm=$.s/g}}for(s=0;s<k.length;s++){u=l[k[s]];var M=u[0].trace,C=ag.calcMarkerSize(M,M._rawLength),E=Array.isArray(C);if(C&&x[s]||E){var I=C;for(C=new Array(A),f=0;f<A;f++)C[f]=u[f].gap?0:E?I[u[f].i]:I}var P=new Array(A),R=new Array(A);for(f=0;f<A;f++)P[f]=u[f].x,R[f]=u[f].y;ag.calcAxisExpansion(e,M,a,i,P,R,C),u[0].t.orientation=_.orientation}}}}};function Eu(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=U$(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 U$(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 Sw=Ot,Fo=Sw.BADNUM,Lw=Sw.LOG_CLIP,ig=Lw+.5,ng=Lw-.5,Xh=de.exports,V$=Xh.segmentsIntersect,og=Xh.constrain,Ru=hc,q$=function(e,r){var a=r.xaxis,i=r.yaxis,n=a.type==="log",o=i.type==="log",l=a._length,s=i._length,f=r.connectGaps,c=r.baseTolerance,v=r.shape,u=v==="linear",d=r.fill&&r.fill!=="none",h=[],p=Ru.minTolerance,g=e.length,_=new Array(g),b=0,w,m,y,x,T,k,S,A,$,M,C,E,I,P,R,L;function D(q){var pe=e[q];if(!pe)return!1;var ve=r.linearized?a.l2p(pe.x):a.c2p(pe.x),ye=r.linearized?i.l2p(pe.y):i.c2p(pe.y);if(ve===Fo){if(n&&(ve=a.c2p(pe.x,!0)),ve===Fo)return!1;o&&ye===Fo&&(ve*=Math.abs(a._m*s*(a._m>0?ig:ng)/(i._m*l*(i._m>0?ig:ng)))),ve*=1e3}if(ye===Fo){if(o&&(ye=i.c2p(pe.y,!0)),ye===Fo)return!1;ye*=1e3}return[ve,ye]}function z(q,pe,ve,ye){var le=ve-q,fe=ye-pe,Te=.5-q,xe=.5-pe,be=le*le+fe*fe,Ae=le*Te+fe*xe;if(Ae>0&&Ae<be){var De=Te*fe-xe*le;if(De*De<be)return!0}}var F,H;function U(q,pe){var ve=q[0]/l,ye=q[1]/s,le=Math.max(0,-ve,ve-1,-ye,ye-1);return le&&F!==void 0&&z(ve,ye,F,H)&&(le=0),le&&pe&&z(ve,ye,pe[0]/l,pe[1]/s)&&(le=0),(1+Ru.toleranceGrowth*le)*c}function B(q,pe){var ve=q[0]-pe[0],ye=q[1]-pe[1];return Math.sqrt(ve*ve+ye*ye)}var X=Ru.maxScreensAway,O=-l*X,Y=l*(1+X),W=-s*X,K=s*(1+X),Z=[[O,W,Y,W],[Y,W,Y,K],[Y,K,O,K],[O,K,O,W]],ae,ne,oe,re,se,me;function Re(q,pe){for(var ve=[],ye=0,le=0;le<4;le++){var fe=Z[le],Te=V$(q[0],q[1],pe[0],pe[1],fe[0],fe[1],fe[2],fe[3]);Te&&(!ye||Math.abs(Te.x-ve[0][0])>1||Math.abs(Te.y-ve[0][1])>1)&&(Te=[Te.x,Te.y],ye&&B(Te,q)<B(ve[0],q)?ve.unshift(Te):ve.push(Te),ye++)}return ve}function ke(q){if(q[0]<O||q[0]>Y||q[1]<W||q[1]>K)return[og(q[0],O,Y),og(q[1],W,K)]}function ze(q,pe){if(q[0]===pe[0]&&(q[0]===O||q[0]===Y)||q[1]===pe[1]&&(q[1]===W||q[1]===K))return!0}function he(q,pe){var ve=[],ye=ke(q),le=ke(pe);return ye&&le&&ze(ye,le)||(ye&&ve.push(ye),le&&ve.push(le)),ve}function te(q,pe,ve){return function(ye,le){var fe=ke(ye),Te=ke(le),xe=[];if(fe&&Te&&ze(fe,Te))return xe;fe&&xe.push(fe),Te&&xe.push(Te);var be=2*Xh.constrain((ye[q]+le[q])/2,pe,ve)-((fe||ye)[q]+(Te||le)[q]);if(be){var Ae;fe&&Te?Ae=be>0==fe[q]>Te[q]?fe:Te:Ae=fe||Te,Ae[q]+=be}return xe}}var ue;v==="linear"||v==="spline"?ue=Re:v==="hv"||v==="vh"?ue=he:v==="hvh"?ue=te(0,O,Y):v==="vhv"&&(ue=te(1,W,K));function Le(q,pe){var ve=pe[0]-q[0],ye=(pe[1]-q[1])/ve,le=(q[1]*pe[0]-pe[1]*q[0])/ve;return le>0?[ye>0?O:Y,K]:[ye>0?Y:O,W]}function we(q){var pe=q[0],ve=q[1],ye=pe===_[b-1][0],le=ve===_[b-1][1];if(!(ye&&le))if(b>1){var fe=pe===_[b-2][0],Te=ve===_[b-2][1];ye&&(pe===O||pe===Y)&&fe?Te?b--:_[b-1]=q:le&&(ve===W||ve===K)&&Te?fe?b--:_[b-1]=q:_[b++]=q}else _[b++]=q}function Pe(q){_[b-1][0]!==q[0]&&_[b-1][1]!==q[1]&&we([oe,re]),we(q),se=null,oe=re=0}function Ee(q){if(F=q[0]/l,H=q[1]/s,ae=q[0]<O?O:q[0]>Y?Y:0,ne=q[1]<W?W:q[1]>K?K:0,ae||ne){if(!b)_[b++]=[ae||q[0],ne||q[1]];else if(se){var pe=ue(se,q);pe.length>1&&(Pe(pe[0]),_[b++]=pe[1])}else me=ue(_[b-1],q)[0],_[b++]=me;var ve=_[b-1];ae&&ne&&(ve[0]!==ae||ve[1]!==ne)?(se&&(oe!==ae&&re!==ne?we(oe&&re?Le(se,q):[oe||ae,re||ne]):oe&&re&&we([oe,re])),we([ae,ne])):oe-ae&&re-ne&&we([ae||oe,ne||re]),se=q,oe=ae,re=ne}else se&&Pe(ue(se,q)[0]),_[b++]=q}for(w=0;w<g;w++)if(m=D(w),!!m){for(b=0,se=null,Ee(m),w++;w<g;w++){if(x=D(w),!x){if(f)continue;break}if(!u||!r.simplify){Ee(x);continue}var Ce=D(w+1);if(M=B(x,m),!(!(d&&(b===0||b===g-1))&&M<U(x,Ce)*p)){for(A=[(x[0]-m[0])/M,(x[1]-m[1])/M],T=m,C=M,E=P=R=0,S=!1,y=x,w++;w<e.length;w++){if(k=Ce,Ce=D(w+1),!k){if(f)continue;break}if($=[k[0]-m[0],k[1]-m[1]],L=$[0]*A[1]-$[1]*A[0],P=Math.min(P,L),R=Math.max(R,L),R-P>U(k,Ce))break;y=k,I=$[0]*A[0]+$[1]*A[1],I>C?(C=I,x=k,S=!1):I<E&&(E=I,T=k,S=!0)}if(S?(Ee(x),y!==T&&Ee(T)):(T!==m&&Ee(T),y!==x&&Ee(x)),Ee(y),w>=e.length||!k)break;Ee(k),m=k}}se&&we([oe||se[0],re||se[1]]),h.push(_.slice(0,b))}return h},lg={tonextx:1,tonexty:1,tonext:1},Cw=function(e,r,a){var i,n,o,l,s,f={},c=!1,v=-1,u=0,d=-1;for(n=0;n<a.length;n++)i=a[n][0].trace,o=i.stackgroup||"",o?o in f?s=f[o]:(s=f[o]=u,u++):i.fill in lg&&d>=0?s=d:(s=d=u,u++),s<v&&(c=!0),i._groupIndex=v=s;var h=a.slice();c&&h.sort(function(g,_){var b=g[0].trace,w=_[0].trace;return b._groupIndex-w._groupIndex||b.index-w.index});var p={};for(n=0;n<h.length;n++)i=h[n][0].trace,o=i.stackgroup||"",i.visible===!0?(i._nexttrace=null,i.fill in lg&&(l=p[o],i._prevtrace=l||null,l&&(l._nexttrace=i)),i._ownfill=i.fill&&(i.fill.substr(0,6)==="tozero"||i.fill==="toself"||i.fill.substr(0,2)==="to"&&!i._prevtrace),p[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return h},ia=tt.exports,X$=Ve,bl=de.exports,jn=bl.ensureSingle,Dw=bl.identity,Ht=Tt.exports,Gn=mr,Y$=q$,W$=Cw,Z$=zh.exports.tester,K$=function(e,r,a,i,n,o){var l,s,f=!n,c=!!n&&n.duration>0,v=W$(e,r,a);if(l=i.selectAll("g.trace").data(v,function(d){return d[0].trace.uid}),l.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),l.order(),Q$(e,l,r),c){o&&(s=o());var u=ia.transition().duration(n.duration).ease(n.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});u.each(function(){i.selectAll("g.trace").each(function(d,h){sg(e,h,r,d,v,this,n)})})}else l.each(function(d,h){sg(e,h,r,d,v,this,n)});f&&l.exit().remove(),i.selectAll("path:not([d])").remove()};function Q$(t,e,r){e.each(function(a){var i=jn(ia.select(this),"g","fills");Ht.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,Dw);l.enter().append("g"),l.exit().each(function(s){n[s]=null}).remove(),l.order().each(function(s){n[s]=jn(ia.select(this),"path","js-fill")})})}function sg(t,e,r,a,i,n,o){var l;J$(t,e,r,a,i);var s=!!o&&o.duration>0;function f(oe){return s?oe.transition():oe}var c=r.xaxis,v=r.yaxis,u=a[0].trace,d=u.line,h=ia.select(n),p=jn(h,"g","errorbars"),g=jn(h,"g","lines"),_=jn(h,"g","points"),b=jn(h,"g","text");if(X$.getComponentMethod("errorbars","plot")(t,p,r,o),u.visible!==!0)return;f(h).style("opacity",u.opacity);var w,m,y=u.fill.charAt(u.fill.length-1);y!=="x"&&y!=="y"&&(y=""),a[0][r.isRangePlot?"nodeRangePlot3":"node3"]=h;var x="",T=[],k=u._prevtrace;k&&(x=k._prevRevpath||"",m=k._nextFill,T=k._polygons);var S,A,$="",M="",C,E,I,P,R,L,D,z=[],F=bl.noop;if(w=u._ownFill,Gn.hasLines(u)||u.fill!=="none"){for(m&&m.datum(a),["hv","vh","hvh","vhv"].indexOf(d.shape)!==-1?(C=Ht.steps(d.shape),E=Ht.steps(d.shape.split("").reverse().join(""))):d.shape==="spline"?C=E=function(oe){var re=oe[oe.length-1];return oe.length>1&&oe[0][0]===re[0]&&oe[0][1]===re[1]?Ht.smoothclosed(oe.slice(1),d.smoothing):Ht.smoothopen(oe,d.smoothing)}:C=E=function(oe){return"M"+oe.join("L")},I=function(oe){return E(oe.reverse())},z=Y$(a,{xaxis:c,yaxis:v,connectGaps:u.connectgaps,baseTolerance:Math.max(d.width||1,3)/4,shape:d.shape,simplify:d.simplify,fill:u.fill}),D=u._polygons=new Array(z.length),l=0;l<z.length;l++)u._polygons[l]=Z$(z[l]);z.length&&(P=z[0][0],R=z[z.length-1],L=R[R.length-1]),F=function(oe){return function(re){if(S=C(re),A=I(re),$?y?($+="L"+S.substr(1),M=A+("L"+M.substr(1))):($+="Z"+S,M=A+"Z"+M):($=S,M=A),Gn.hasLines(u)&&re.length>1){var se=ia.select(this);if(se.datum(a),oe)f(se.style("opacity",0).attr("d",S).call(Ht.lineGroupStyle)).style("opacity",1);else{var me=f(se);me.attr("d",S),Ht.singleLineStyle(a,me)}}}}}var H=g.selectAll(".js-line").data(z);f(H.exit()).style("opacity",0).remove(),H.each(F(!1)),H.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(Ht.lineGroupStyle).each(F(!0)),Ht.setClipUrl(H,r.layerClipId,t);function U(oe){f(oe).attr("d","M0,0Z")}z.length?(w?(w.datum(a),P&&L&&(y?(y==="y"?P[1]=L[1]=v.c2p(0,!0):y==="x"&&(P[0]=L[0]=c.c2p(0,!0)),f(w).attr("d","M"+L+"L"+P+"L"+$.substr(1)).call(Ht.singleFillStyle,t)):f(w).attr("d",$+"Z").call(Ht.singleFillStyle,t))):m&&(u.fill.substr(0,6)==="tonext"&&$&&x?(u.fill==="tonext"?f(m).attr("d",$+"Z"+x+"Z").call(Ht.singleFillStyle,t):f(m).attr("d",$+"L"+x.substr(1)+"Z").call(Ht.singleFillStyle,t),u._polygons=u._polygons.concat(T)):(U(m),u._polygons=null)),u._prevRevpath=M,u._prevPolygons=D):(w?U(w):m&&U(m),u._polygons=u._prevRevpath=u._prevPolygons=null);function B(oe){return oe.filter(function(re){return!re.gap&&re.vis})}function X(oe){return oe.filter(function(re){return re.vis})}function O(oe){return oe.filter(function(re){return!re.gap})}function Y(oe){return oe.id}function W(oe){if(oe.ids)return Y}function K(){return!1}function Z(oe,re,se){var me,Re,ke,ze=se[0].trace,he=Gn.hasMarkers(ze),te=Gn.hasText(ze),ue=W(ze),Le=K,we=K;if(he||te){var Pe=Dw,Ee=ze.stackgroup,Ce=Ee&&t._fullLayout._scatterStackOpts[c._id+v._id][Ee].stackgaps==="infer zero";ze.marker.maxdisplayed||ze._needsCull?Pe=Ce?X:B:Ee&&!Ce&&(Pe=O),he&&(Le=Pe),te&&(we=Pe)}Re=oe.selectAll("path.point"),me=Re.data(Le,ue);var q=me.enter().append("path").classed("point",!0);s&&q.call(Ht.pointStyle,ze,t).call(Ht.translatePoints,c,v).style("opacity",0).transition().style("opacity",1),me.order();var pe;he&&(pe=Ht.makePointStyleFns(ze)),me.each(function(ve){var ye=ia.select(this),le=f(ye);ke=Ht.translatePoint(ve,le,c,v),ke?(Ht.singlePointStyle(ve,le,ze,pe,t),r.layerClipId&&Ht.hideOutsideRangePoint(ve,le,c,v,ze.xcalendar,ze.ycalendar),ze.customdata&&ye.classed("plotly-customdata",ve.data!==null&&ve.data!==void 0)):le.remove()}),s?me.exit().transition().style("opacity",0).remove():me.exit().remove(),Re=re.selectAll("g"),me=Re.data(we,ue),me.enter().append("g").classed("textpoint",!0).append("text"),me.order(),me.each(function(ve){var ye=ia.select(this),le=f(ye.select("text"));ke=Ht.translatePoint(ve,le,c,v),ke?r.layerClipId&&Ht.hideOutsideRangePoint(ve,ye,c,v,ze.xcalendar,ze.ycalendar):ye.remove()}),me.selectAll("text").call(Ht.textPointStyle,ze,t).each(function(ve){var ye=c.c2p(ve.x),le=v.c2p(ve.y);ia.select(this).selectAll("tspan.line").each(function(){f(ia.select(this)).attr({x:ye,y:le})})}),me.exit().remove()}_.datum(a),b.datum(a),Z(_,b,a);var ae=u.cliponaxis===!1,ne=ae?null:r.layerClipId;Ht.setClipUrl(_,ne,t),Ht.setClipUrl(b,ne,t)}function J$(t,e,r,a,i){var n=r.xaxis,o=r.yaxis,l=ia.extent(bl.simpleMap(n.range,n.r2c)),s=ia.extent(bl.simpleMap(o.range,o.r2c)),f=a[0].trace;if(!!Gn.hasMarkers(f)){var c=f.marker.maxdisplayed;if(c!==0){var v=a.filter(function(p){return p.x>=l[0]&&p.x<=l[1]&&p.y>=s[0]&&p.y<=s[1]}),u=Math.ceil(v.length/c),d=0;i.forEach(function(p,g){var _=p[0].trace;Gn.hasMarkers(_)&&_.marker.maxdisplayed>0&&g<e&&d++});var h=Math.round(d*u/3+Math.floor(d/3)*u/7.1);a.forEach(function(p){delete p.vis}),v.forEach(function(p,g){Math.round((g+h)%u)===0&&(p.vis=!0)})}}}var Ol={container:"marker",min:"cmin",max:"cmax"},ks=Ct.exports,$w=function(e,r,a){var i={},n={_fullLayout:a},o=ks.getFromTrace(n,r,"x"),l=ks.getFromTrace(n,r,"y");return i.xLabel=ks.tickText(o,o.c2l(e.x),!0).text,i.yLabel=ks.tickText(l,l.c2l(e.y),!0).text,i},Pu=tt.exports,to=Tt.exports,eE=Ve;function tE(t){var e=Pu.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=Pu.select(this),i=r.trace||r[0].trace;Yh(a,i,t)}),e.selectAll("g.text").each(function(r){var a=Pu.select(this),i=r.trace||r[0].trace;Wh(a,i,t)}),e.selectAll("g.trace path.js-line").call(to.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(to.fillGroupStyle,t),eE.getComponentMethod("errorbars","style")(e)}function Yh(t,e,r){to.pointStyle(t.selectAll("path.point"),e,r)}function Wh(t,e,r){to.textPointStyle(t.selectAll("text"),e,r)}function rE(t,e,r){var a=e[0].trace;a.selectedpoints?(to.selectedPointStyle(r.selectAll("path.point"),a),to.selectedTextStyle(r.selectAll("text"),a)):(Yh(r,a,t),Wh(r,a,t))}var fg={style:tE,stylePoints:Yh,styleText:Wh,styleOnSelect:rE},wn=Je.exports,aE=mr,Ew=function(e,r){var a,i;if(e.mode==="lines")return a=e.line.color,a&&wn.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&&wn.opacity(n)?n:o&&wn.opacity(o)&&(r.mlw||((e.marker||{}).line||{}).width)?o:"",i?wn.opacity(i)<.3?wn.addOpacity(i,.3):i:(a=(e.line||{}).color,a&&wn.opacity(a)&&aE.hasLines(e)&&e.line.width?a:e.fillcolor)},vd=de.exports,cg=ua,iE=Ve,nE=Ew,zu=Je.exports,oE=vd.fillText,lE=function(e,r,a,i){var n=e.cd,o=n[0].trace,l=e.xa,s=e.ya,f=l.c2p(r),c=s.c2p(a),v=[f,c],u=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,h=!!o.xperiodalignment,p=!!o.yperiodalignment;if(u.indexOf("points")!==-1){var g=function(Z){if(h){var ae=l.c2p(Z.xStart),ne=l.c2p(Z.xEnd);return f>=Math.min(ae,ne)&&f<=Math.max(ae,ne)?0:1/0}var oe=Math.max(3,Z.mrc||0),re=1-1/oe,se=Math.abs(l.c2p(Z.x)-f);return se<oe?re*se/oe:se-oe+re},_=function(Z){if(p){var ae=s.c2p(Z.yStart),ne=s.c2p(Z.yEnd);return c>=Math.min(ae,ne)&&c<=Math.max(ae,ne)?0:1/0}var oe=Math.max(3,Z.mrc||0),re=1-1/oe,se=Math.abs(s.c2p(Z.y)-c);return se<oe?re*se/oe:se-oe+re},b=function(Z){var ae=Math.max(d,Z.mrc||0),ne=l.c2p(Z.x)-f,oe=s.c2p(Z.y)-c;return Math.max(Math.sqrt(ne*ne+oe*oe)-ae,1-d/ae)},w=cg.getDistanceFunction(i,g,_,b);if(cg.getClosest(n,w,e),e.index!==!1){var m=n[e.index],y=l.c2p(m.x,!0),x=s.c2p(m.y,!0),T=m.mrc||1;e.index=m.i;var k=n[0].t.orientation,S=k&&(m.sNorm||m.s),A=k==="h"?S:m.orig_x!==void 0?m.orig_x:m.x,$=k==="v"?S:m.orig_y!==void 0?m.orig_y:m.y;return vd.extendFlat(e,{color:nE(o,m),x0:y-T,x1:y+T,xLabelVal:A,y0:x-T,y1:x+T,yLabelVal:$,spikeDistance:b(m),hovertemplate:o.hovertemplate}),oE(m,o,e),iE.getComponentMethod("errorbars","hoverInfo")(m,o,e),[e]}}if(u.indexOf("fills")!==-1&&o._polygons){var M=o._polygons,C=[],E=!1,I=1/0,P=-1/0,R=1/0,L=-1/0,D,z,F,H,U,B,X,O,Y;for(D=0;D<M.length;D++)F=M[D],F.contains(v)&&(E=!E,C.push(F),R=Math.min(R,F.ymin),L=Math.max(L,F.ymax));if(E){R=Math.max(R,0),L=Math.min(L,s._length);var W=(R+L)/2;for(D=0;D<C.length;D++)for(H=C[D].pts,z=1;z<H.length;z++)O=H[z-1][1],Y=H[z][1],O>W!=Y>=W&&(B=H[z-1][0],X=H[z][0],Y-O&&(U=B+(X-B)*(W-O)/(Y-O),I=Math.min(I,U),P=Math.max(P,U)));I=Math.max(I,0),P=Math.min(P,l._length);var K=zu.defaultLine;return zu.opacity(o.fillcolor)?K=o.fillcolor:zu.opacity((o.line||{}).color)&&(K=o.line.color),vd.extendFlat(e,{distance:e.maxHoverDistance,x0:I,x1:P,y0:W,y1:W,color:K,hovertemplate:!1}),delete e.index,o.text&&!Array.isArray(o.text)?e.text=String(o.text):e.text=o.name,[e]}}},ug=mr,sE=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s,f,c,v,u=!ug.hasMarkers(l)&&!ug.hasText(l);if(u)return[];if(r===!1)for(s=0;s<a.length;s++)a[s].selected=0;else for(s=0;s<a.length;s++)f=a[s],c=i.c2p(f.x),v=n.c2p(f.y),f.i!==null&&r.contains([c,v],!1,s,e)?(o.push({pointNumber:f.i,x:i.c2d(f.x),y:n.c2d(f.y)}),f.selected=1):f.selected=0;return o},Yt={},Iu,vg;function fE(){return vg||(vg=1,Iu={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(" ")}}),Iu}var Nu,dg;function cE(){if(dg)return Nu;dg=1;var t=Ve.traceIs,e=z1;Nu=function(l,s,f,c){f("autotypenumbers",c.autotypenumbersDflt);var v=f("type",(c.splomStash||{}).type);v==="-"&&(r(s,c.data),s.type==="-"?s.type="linear":l.type=s.type)};function r(o,l){if(o.type==="-"){var s=o._id,f=s.charAt(0),c;s.indexOf("scene")!==-1&&(s=f);var v=a(l,s,f);if(!!v){if(v.type==="histogram"&&f==={v:"y",h:"x"}[v.orientation||"v"]){o.type="linear";return}var u=f+"calendar",d=v[u],h={noMultiCategory:!t(v,"cartesian")||t(v,"noMultiCategory")};if(v.type==="box"&&v._hasPreCompStats&&f==={h:"x",v:"y"}[v.orientation||"v"]&&(h.noMultiCategory=!0),h.autotypenumbers=o.autotypenumbers,n(v,f)){var p=i(v),g=[];for(c=0;c<l.length;c++){var _=l[c];!t(_,"box-violin")||(_[f+"axis"]||f)!==s||(_[p]!==void 0?g.push(_[p][0]):_.name!==void 0?g.push(_.name):g.push("text"),_[u]!==d&&(d=void 0))}o.type=e(g,d,h)}else if(v.type==="splom"){var b=v.dimensions,w=b[v._axesDim[s]];w.visible&&(o.type=e(w.values,d,h))}else o.type=e(v[f]||[v[f+"0"]],d,h)}}}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 Nu}function uE(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 vE=function(e,r,a,i){if(r.type==="category"){var n=e.categoryarray,o=Array.isArray(n)&&n.length>0,l;o&&(l="array");var s=a("categoryorder",l),f;s==="array"&&(f=a("categoryarray")),!o&&s==="array"&&(s=r.categoryorder="trace"),s==="trace"?r._initialCategories=[]:s==="array"?r._initialCategories=f.slice():(f=uE(r,i).sort(),s==="category ascending"?r._initialCategories=f:s==="category descending"&&(r._initialCategories=f.reverse()))}},dE=Wr.exports.mix,hE=hr.lightFraction,pE=de.exports,mE=function(e,r,a,i){i=i||{};var n=i.dfltColor;function o(_,b){return pE.coerce2(e,r,i.attributes,_,b)}var l=o("linecolor",n),s=o("linewidth"),f=a("showline",i.showLine||!!l||!!s);f||(delete r.linecolor,delete r.linewidth);var c=dE(n,i.bgColor,i.blend||hE).toRgbString(),v=o("gridcolor",c),u=o("gridwidth"),d=a("showgrid",i.showGrid||!!v||!!u);if(d||(delete r.gridcolor,delete r.gridwidth),!i.noZeroLine){var h=o("zerolinecolor",n),p=o("zerolinewidth"),g=a("zeroline",i.showGrid||!!h||!!p);g||(delete r.zerolinecolor,delete r.zerolinewidth)}},hg=lt,yE=Ve,Ko=de.exports,gE=Va,dd=Ua,bE=g1,xE=b1,_E=T1,wE=k1,TE=vE,kE=mE,pg=oh,Qs=pr.WEEKDAY_PATTERN,AE=pr.HOUR_PATTERN,Rw=function(e,r,a,i,n){var o=i.letter,l=i.font||{},s=i.splomStash||{},f=a("visible",!i.visibleDflt),c=r._template||{},v=r.type||c.type||"-",u;if(v==="date"){var d=yE.getComponentMethod("calendars","handleDefaults");d(e,r,"calendar",i.calendar),i.noTicklabelmode||(u=a("ticklabelmode"))}var h="";(!i.noTicklabelposition||v==="multicategory")&&(h=Ko.coerce(e,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),i.noTicklabeloverflow||a("ticklabeloverflow",h.indexOf("inside")!==-1?"hide past domain":v==="category"||v==="multicategory"?"allow":"hide past div"),pg(r,n);var p=!r.isValidRange(e.range);p&&i.reverseDflt&&(p="reversed");var g=a("autorange",p);g&&(v==="linear"||v==="-")&&a("rangemode"),a("range"),r.cleanRange(),TE(e,r,a,i),v!=="category"&&!i.noHover&&a("hoverformat");var _=a("color"),b=_!==dd.color.dflt?_:l.color,w=s.label||n._dfltTitle[o];if(wE(e,r,a,v,i),!f)return r;a("title.text",w),Ko.coerceFont(a,"title.font",{family:l.family,size:Ko.bigFont(l.size),color:b}),bE(e,r,a,v),_E(e,r,a,v,i),xE(e,r,a,i),kE(e,r,a,{dfltColor:_,bgColor:i.bgColor,showGrid:i.showGrid,attributes:dd}),(r.showline||r.ticks)&&a("mirror"),i.automargin&&a("automargin");var m=v==="multicategory";if(!i.noTickson&&(v==="category"||m)&&(r.ticks||r.showgrid)){var y;m&&(y="boundaries");var x=a("tickson",y);x==="boundaries"&&delete r.ticklabelposition}if(m){var T=a("showdividers");T&&(a("dividercolor"),a("dividerwidth"))}if(v==="date")if(gE(e,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:ME}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var k=0;k<r.rangebreaks.length;k++)if(r.rangebreaks[k].pattern===Qs){r._hasDayOfWeekBreaks=!0;break}if(pg(r,n),n._has("scattergl")||n._has("splom"))for(var S=0;S<i.data.length;S++){var A=i.data[S];(A.type==="scattergl"||A.type==="splom")&&(A.visible=!1,Ko.warn(A.type+" traces do not work on axes with rangebreaks. Setting trace "+A.index+" to `visible: false`."))}}return r};function ME(t,e,r){function a(u,d){return Ko.coerce(t,e,dd.rangebreaks,u,d)}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=mg(n[l]),s){o=Qs;break}}var f=a("pattern",o);if(f===Qs)for(l=0;l<2;l++)s=mg(n[l]),s&&(e.bounds[l]=n[l]=s-1);if(f)for(l=0;l<2;l++)switch(s=n[l],f){case Qs:if(!hg(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 AE:if(!hg(s)){e.enabled=!1;return}if(s=+s,s<0||s>24){e.enabled=!1;return}e.bounds[l]=n[l]=s;break}if(r.autorange===!1){var c=r.range;if(c[0]<c[1]){if(n[0]<c[0]&&n[1]>c[1]){e.enabled=!1;return}}else if(n[0]>c[0]&&n[1]<c[1]){e.enabled=!1;return}}}else{var v=a("values");if(v&&v.length)a("dvalue");else{e.enabled=!1;return}}}}var SE={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function mg(t){if(typeof t=="string")return SE[t.substr(0,3).toLowerCase()]}var LE=lt,As=de.exports,Pw=function(e,r,a,i){var n=i.counterAxes||[],o=i.overlayableAxes||[],l=i.letter,s=i.grid,f,c,v,u;s&&(c=s._domains[l][s._axisMap[r._id]],f=s._anchors[r._id],c&&(v=s[l+"side"].split(" ")[0],u=s.domain[l][v==="right"||v==="top"?1:0])),c=c||[0,1],f=f||(LE(e.position)?"free":n[0]||"free"),v=v||(l==="x"?"bottom":"left"),u=u||0;var d=As.coerce(e,r,{anchor:{valType:"enumerated",values:["free"].concat(n),dflt:f}},"anchor");d==="free"&&a("position",u),As.coerce(e,r,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");var h=!1;if(o.length&&(h=As.coerce(e,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!h){var p=a("domain",c);p[0]>p[1]-1/4096&&(r.domain=c),As.noneOrAll(e.domain,r.domain,c)}return a("layer"),r},Fu,yg;function CE(){if(yg)return Fu;yg=1;var t=de.exports,e=Je.exports,r=Zr.isUnifiedHover,a=c_,i=Mt,n=$l,o=Ua,l=cE(),s=Rw,f=Xa,c=Pw,v=Vt,u=v.id2name,d=v.name2id,h=pr.AX_ID_PATTERN,p=Ve,g=p.traceIs,_=p.getComponentMethod;function b(w,m,y){Array.isArray(w[m])?w[m].push(y):w[m]=[y]}return Fu=function(m,y,x){var T=y.autotypenumbers,k={},S={},A={},$={},M={},C={},E={},I={},P={},R={},L,D;for(L=0;L<x.length;L++){var z=x[L];if(!(!g(z,"cartesian")&&!g(z,"gl2d"))){var F;if(z.xaxis)F=u(z.xaxis),b(k,F,z);else if(z.xaxes)for(D=0;D<z.xaxes.length;D++)b(k,u(z.xaxes[D]),z);var H;if(z.yaxis)H=u(z.yaxis),b(k,H,z);else if(z.yaxes)for(D=0;D<z.yaxes.length;D++)b(k,u(z.yaxes[D]),z);if(z.type==="funnel"?z.orientation==="h"?(F&&(S[F]=!0),H&&(E[H]=!0)):H&&(A[H]=!0):z.type==="image"?(H&&(I[H]=!0),F&&(I[F]=!0)):(H&&(M[H]=!0,C[H]=!0),(!g(z,"carpet")||z.type==="carpet"&&!z._cheater)&&F&&($[F]=!0)),z.type==="carpet"&&z._cheater&&F&&(S[F]=!0),g(z,"2dMap")&&(P[F]=!0,P[H]=!0),g(z,"oriented")){var U=z.orientation==="h"?H:F;R[U]=!0}}}var B=y._subplots,X=B.xaxis,O=B.yaxis,Y=t.simpleMap(X,u),W=t.simpleMap(O,u),K=Y.concat(W),Z=e.background;X.length&&O.length&&(Z=t.coerce(m,y,n,"plot_bgcolor"));var ae=e.combine(Z,y.paper_bgcolor),ne,oe,re,se,me;function Re(){var Ke=k[ne]||[];me._traceIndices=Ke.map(function(ft){return ft._expandedIndex}),me._annIndices=[],me._shapeIndices=[],me._imgIndices=[],me._subplotsWith=[],me._counterAxes=[],me._name=me._attr=ne,me._id=oe}function ke(Ke,ft){return t.coerce(se,me,o,Ke,ft)}function ze(Ke,ft){return t.coerce2(se,me,o,Ke,ft)}function he(Ke){return Ke==="x"?O:X}function te(Ke,ft){for(var N=Ke==="x"?Y:W,G=[],j=0;j<N.length;j++){var V=N[j];V!==ft&&!(m[V]||{}).overlaying&&G.push(d(V))}return G}var ue={x:he("x"),y:he("y")},Le=ue.x.concat(ue.y),we={},Pe=[];function Ee(){var Ke=se.matches;h.test(Ke)&&Le.indexOf(Ke)===-1&&(we[Ke]=se.type,Pe=Object.keys(we))}var Ce=a(m,y),q=r(Ce);for(L=0;L<K.length;L++){ne=K[L],oe=d(ne),re=ne.charAt(0),t.isPlainObject(m[ne])||(m[ne]={}),se=m[ne],me=i.newContainer(y,ne,re+"axis"),Re();var pe=re==="x"&&!$[ne]&&S[ne]||re==="y"&&!M[ne]&&A[ne],ve=re==="y"&&(!C[ne]&&E[ne]||I[ne]),ye={letter:re,font:y.font,outerTicks:P[ne],showGrid:!R[ne],data:k[ne]||[],bgColor:ae,calendar:y.calendar,automargin:!0,visibleDflt:pe,reverseDflt:ve,autotypenumbersDflt:T,splomStash:((y._splomAxes||{})[re]||{})[oe]};ke("uirevision",y.uirevision),l(se,me,ke,ye),s(se,me,ke,ye,y);var le=q&&re===Ce.charAt(0),fe=ze("spikecolor",q?me.color:void 0),Te=ze("spikethickness",q?1.5:void 0),xe=ze("spikedash",q?"dot":void 0),be=ze("spikemode",q?"across":void 0),Ae=ze("spikesnap"),De=ke("showspikes",!!le||!!fe||!!Te||!!xe||!!be||!!Ae);De||(delete me.spikecolor,delete me.spikethickness,delete me.spikedash,delete me.spikemode,delete me.spikesnap),c(se,me,ke,{letter:re,counterAxes:ue[re],overlayableAxes:te(re,ne),grid:y.grid}),ke("title.standoff"),Ee(),me._input=se}for(L=0;L<Pe.length;){oe=Pe[L++],ne=u(oe),re=ne.charAt(0),t.isPlainObject(m[ne])||(m[ne]={}),se=m[ne],me=i.newContainer(y,ne,re+"axis"),Re();var Oe={letter:re,font:y.font,outerTicks:P[ne],showGrid:!R[ne],data:[],bgColor:ae,calendar:y.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((y._splomAxes||{})[re]||{})[oe]};ke("uirevision",y.uirevision),me.type=we[oe]||"linear",s(se,me,ke,Oe,y),c(se,me,ke,{letter:re,counterAxes:ue[re],overlayableAxes:te(re,ne),grid:y.grid}),ke("fixedrange"),Ee(),me._input=se}var Fe=_("rangeslider","handleDefaults"),st=_("rangeselector","handleDefaults");for(L=0;L<Y.length;L++)ne=Y[L],se=m[ne],me=y[ne],Fe(m,y,ne),me.type==="date"&&st(se,me,y,W,me.calendar),ke("fixedrange");for(L=0;L<W.length;L++){ne=W[L],se=m[ne],me=y[ne];var Xe=y[u(me.anchor)],ut=_("rangeslider","isVisible")(Xe);ke("fixedrange",ut)}f.handleDefaults(m,y,{axIds:Le.concat(Pe).sort(v.idSort),axHasImage:I})},Fu}var Hu,gg;function DE(){if(gg)return Hu;gg=1;var t=tt.exports,e=Ve,r=de.exports,a=Tt.exports,i=Ct.exports;return Hu=function(o,l,s,f){var c=o._fullLayout;if(l.length===0){i.redrawComponents(o);return}function v(y){var x=y.xaxis,T=y.yaxis;c._defs.select("#"+y.clipId+"> rect").call(a.setTranslate,0,0).call(a.setScale,1,1),y.plot.call(a.setTranslate,x._offset,T._offset).call(a.setScale,1,1);var k=y.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(a.setPointGroupScale,1,1),k.selectAll(".textpoint").call(a.setTextPointsScale,1,1),k.call(a.hideOutsideRangePoints,y)}function u(y,x){var T=y.plotinfo,k=T.xaxis,S=T.yaxis,A=k._length,$=S._length,M=!!y.xr1,C=!!y.yr1,E=[];if(M){var I=r.simpleMap(y.xr0,k.r2l),P=r.simpleMap(y.xr1,k.r2l),R=I[1]-I[0],L=P[1]-P[0];E[0]=(I[0]*(1-x)+x*P[0]-I[0])/(I[1]-I[0])*A,E[2]=A*(1-x+x*L/R),k.range[0]=k.l2r(I[0]*(1-x)+x*P[0]),k.range[1]=k.l2r(I[1]*(1-x)+x*P[1])}else E[0]=0,E[2]=A;if(C){var D=r.simpleMap(y.yr0,S.r2l),z=r.simpleMap(y.yr1,S.r2l),F=D[1]-D[0],H=z[1]-z[0];E[1]=(D[1]*(1-x)+x*z[1]-D[1])/(D[0]-D[1])*$,E[3]=$*(1-x+x*H/F),S.range[0]=k.l2r(D[0]*(1-x)+x*z[0]),S.range[1]=S.l2r(D[1]*(1-x)+x*z[1])}else E[1]=0,E[3]=$;i.drawOne(o,k,{skipTitle:!0}),i.drawOne(o,S,{skipTitle:!0}),i.redrawComponents(o,[k._id,S._id]);var U=M?A/E[2]:1,B=C?$/E[3]:1,X=M?E[0]:0,O=C?E[1]:0,Y=M?E[0]/E[2]*A:0,W=C?E[1]/E[3]*$:0,K=k._offset-Y,Z=S._offset-W;T.clipRect.call(a.setTranslate,X,O).call(a.setScale,1/U,1/B),T.plot.call(a.setTranslate,K,Z).call(a.setScale,U,B),a.setPointGroupScale(T.zoomScalePts,1/U,1/B),a.setTextPointsScale(T.zoomScaleTxt,1/U,1/B)}var d;f&&(d=f());function h(){for(var y={},x=0;x<l.length;x++){var T=l[x],k=T.plotinfo.xaxis,S=T.plotinfo.yaxis;T.xr1&&(y[k._name+".range"]=T.xr1.slice()),T.yr1&&(y[S._name+".range"]=T.yr1.slice())}return d&&d(),e.call("relayout",o,y).then(function(){for(var A=0;A<l.length;A++)v(l[A].plotinfo)})}function p(){for(var y={},x=0;x<l.length;x++){var T=l[x],k=T.plotinfo.xaxis,S=T.plotinfo.yaxis;T.xr0&&(y[k._name+".range"]=T.xr0.slice()),T.yr0&&(y[S._name+".range"]=T.yr0.slice())}return e.call("relayout",o,y).then(function(){for(var A=0;A<l.length;A++)v(l[A].plotinfo)})}var g,_,b,w=t.ease(s.easing);o._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(b),b=null,p()});function m(){_=Date.now();for(var y=Math.min(1,(_-g)/s.duration),x=w(y),T=0;T<l.length;T++)u(l[T],x);_-g>s.duration?(h(),b=window.cancelAnimationFrame(m)):b=window.requestAnimationFrame(m)}return g=Date.now(),b=window.requestAnimationFrame(m),Promise.resolve()},Hu}var yc=tt.exports,bg=Ve,Sf=de.exports,$E=Ut.exports,EE=Tt.exports,xg=Pl.getModuleCalcData,ji=Vt,Sa=pr,RE=on,At=Sf.ensureSingle;function _g(t,e,r){return Sf.ensureSingle(t,e,r,function(a){a.datum(r)})}Yt.name="cartesian";Yt.attr=["xaxis","yaxis"];Yt.idRoot=["x","y"];Yt.idRegex=Sa.idRegex;Yt.attrRegex=Sa.attrRegex;Yt.attributes=fE();Yt.layoutAttributes=Ua;Yt.supplyLayoutDefaults=CE();Yt.transitionAxes=DE();Yt.finalizeSubplots=function(t,e){var r=e._subplots,a=r.xaxis,i=r.yaxis,n=r.cartesian,o=n.concat(r.gl2d||[]),l={},s={},f,c,v;for(f=0;f<o.length;f++){var u=o[f].split("y");l[u[0]]=1,s["y"+u[1]]=1}for(f=0;f<a.length;f++)c=a[f],l[c]||(v=(t[ji.id2name(c)]||{}).anchor,Sa.idRegex.y.test(v)||(v="y"),n.push(c+v),o.push(c+v),s[v]||(s[v]=1,Sf.pushUnique(i,v)));for(f=0;f<i.length;f++)v=i[f],s[v]||(c=(t[ji.id2name(v)]||{}).anchor,Sa.idRegex.x.test(c)||(c="x"),n.push(c+v),o.push(c+v),l[c]||(l[c]=1,Sf.pushUnique(a,c)));if(!o.length){c="",v="";for(var d in t)if(Sa.attrRegex.test(d)){var h=d.charAt(0);h==="x"?(!c||+d.substr(5)<+c.substr(5))&&(c=d):(!v||+d.substr(5)<+v.substr(5))&&(v=d)}c=c?ji.name2id(c):"x",v=v?ji.name2id(v):"y",a.push(c),i.push(v),n.push(c+v)}};Yt.plot=function(t,e,r,a){var i=t._fullLayout,n=i._subplots.cartesian,o=t.calcdata,l;if(!Array.isArray(e))for(e=[],l=0;l<o.length;l++)e.push(l);for(l=0;l<n.length;l++){for(var s=n[l],f=i._plots[s],c=[],v,u=0;u<o.length;u++){var d=o[u],h=d[0].trace;h.xaxis+h.yaxis===s&&((e.indexOf(h.index)!==-1||h.carpet)&&(v&&v[0].trace.xaxis+v[0].trace.yaxis===s&&["tonextx","tonexty","tonext"].indexOf(h.fill)!==-1&&c.indexOf(v)===-1&&c.push(v),c.push(d)),v=d)}zw(t,f,c,r,a)}};function zw(t,e,r,a,i){for(var n=Sa.traceLayerClasses,o=t._fullLayout,l=o._modules,s,f,c,v=[],u=[],d=0;d<l.length;d++){s=l[d];var h=s.name,p=bg.modules[h].categories;if(p.svg){var g=s.layerName||h+"layer",_=s.plot;f=xg(r,_),c=f[0],r=f[1],c.length&&v.push({i:n.indexOf(g),className:g,plotMethod:_,cdModule:c}),p.zoomScale&&u.push("."+g)}}v.sort(function(m,y){return m.i-y.i});var b=e.plot.selectAll("g.mlayer").data(v,function(m){return m.className});if(b.enter().append("g").attr("class",function(m){return m.className}).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),b.exit().remove(),b.order(),b.each(function(m){var y=yc.select(this),x=m.className;m.plotMethod(t,e,m.cdModule,y,a,i),Sa.clipOnAxisFalseQuery.indexOf("."+x)===-1&&EE.setClipUrl(y,e.layerClipId,t)}),o._has("scattergl")&&(s=bg.getModule("scattergl"),c=xg(r,s)[0],s.plot(t,e,c)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(Sa.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),u.length)){var w=e.plot.selectAll(u.join(",")).selectAll(".trace");e.zoomScalePts=w.selectAll("path.point"),e.zoomScaleTxt=w.selectAll(".textpoint")}}Yt.clean=function(t,e,r,a){var i=a._plots||{},n=e._plots||{},o=a._subplots||{},l,s,f;if(a._hasOnlyLargeSploms&&!e._hasOnlyLargeSploms)for(f in i)l=i[f],l.plotgroup&&l.plotgroup.remove();var c=a._has&&a._has("gl"),v=e._has&&e._has("gl");if(c&&!v)for(f in i)l=i[f],l._scene&&l._scene.destroy();if(o.xaxis&&o.yaxis){var u=ji.listIds({_fullLayout:a});for(s=0;s<u.length;s++){var d=u[s];e[ji.id2name(d)]||a._infolayer.selectAll(".g-"+d+"title").remove()}}var h=a._has&&a._has("cartesian"),p=e._has&&e._has("cartesian");if(h&&!p)Nw(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 g=o.cartesian[s];if(!n[g]){var _="."+g+",."+g+"-x,."+g+"-y";a._cartesianlayer.selectAll(_).remove(),Fw(g,a)}}};Yt.drawFramework=function(t){var e=t._fullLayout,r=PE(t),a=e._cartesianlayer.selectAll(".subplot").data(r,String);a.enter().append("g").attr("class",function(i){return"subplot "+i[0]}),a.order(),a.exit().call(Nw,e),a.each(function(i){var n=i[0],o=e._plots[n];o.plotgroup=yc.select(this),Iw(t,o),o.draglayer=At(e._draggers,"g",n)})};Yt.rangePlot=function(t,e,r){Iw(t,e),zw(t,e,r),$E.style(t)};function PE(t){var e=t._fullLayout,r=e._subplots.cartesian,a=r.length,i,n,o,l,s,f,c=[],v=[];for(i=0;i<a;i++){o=r[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var u=s._mainAxis,d=f._mainAxis,h=u._id+d._id,p=e._plots[h];l.overlays=[],h!==o&&p?(l.mainplot=h,l.mainplotinfo=p,v.push(o)):(l.mainplot=void 0,l.mainplotinfo=void 0,c.push(o))}for(i=0;i<v.length;i++)o=v[i],l=e._plots[o],l.mainplotinfo.overlays.push(l);var g=c.concat(v),_=new Array(a);for(i=0;i<a;i++){o=g[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var b=[o,s.layer,f.layer,s.overlaying||"",f.overlaying||""];for(n=0;n<l.overlays.length;n++)b.push(l.overlays[n].id);_[i]=b}return _}function Iw(t,e){var r=e.plotgroup,a=e.id,i=Sa.layerValue2layerClass[e.xaxis.layer],n=Sa.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,f=s.plotgroup,c=a+"-x",v=a+"-y";e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,At(s.overlinesBelow,"path",c),At(s.overlinesBelow,"path",v),At(s.overaxesBelow,"g",c),At(s.overaxesBelow,"g",v),e.plot=At(s.overplot,"g",a),At(s.overlinesAbove,"path",c),At(s.overlinesAbove,"path",v),At(s.overaxesAbove,"g",c),At(s.overaxesAbove,"g",v),e.xlines=f.select(".overlines-"+i).select("."+c),e.ylines=f.select(".overlines-"+n).select("."+v),e.xaxislayer=f.select(".overaxes-"+i).select("."+c),e.yaxislayer=f.select(".overaxes-"+n).select("."+v)}else if(o)e.xlines=At(r,"path","xlines-above"),e.ylines=At(r,"path","ylines-above"),e.xaxislayer=At(r,"g","xaxislayer-above"),e.yaxislayer=At(r,"g","yaxislayer-above");else{var l=At(r,"g","layer-subplot");e.shapelayer=At(l,"g","shapelayer"),e.imagelayer=At(l,"g","imagelayer"),e.gridlayer=At(r,"g","gridlayer"),e.zerolinelayer=At(r,"g","zerolinelayer"),At(r,"path","xlines-below"),At(r,"path","ylines-below"),e.overlinesBelow=At(r,"g","overlines-below"),At(r,"g","xaxislayer-below"),At(r,"g","yaxislayer-below"),e.overaxesBelow=At(r,"g","overaxes-below"),e.plot=At(r,"g","plot"),e.overplot=At(r,"g","overplot"),e.xlines=At(r,"path","xlines-above"),e.ylines=At(r,"path","ylines-above"),e.overlinesAbove=At(r,"g","overlines-above"),At(r,"g","xaxislayer-above"),At(r,"g","yaxislayer-above"),e.overaxesAbove=At(r,"g","overaxes-above"),e.xlines=r.select(".xlines-"+i),e.ylines=r.select(".ylines-"+n),e.xaxislayer=r.select(".xaxislayer-"+i),e.yaxislayer=r.select(".yaxislayer-"+n)}o||(_g(e.gridlayer,"g",e.xaxis._id),_g(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map(function(u){return u[0]}).sort(ji.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0)}function Nw(t,e){if(!!t){var r={};t.each(function(s){var f=s[0],c=yc.select(this);c.remove(),Fw(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 Fw(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}Yt.toSVG=function(t){var e=t._fullLayout._glimages,r=yc.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:RE.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}a.each(i)};Yt.updateFx=hh.updateFx;var Ms=mr,zE={hasLines:Ms.hasLines,hasMarkers:Ms.hasMarkers,hasText:Ms.hasText,isBubble:Ms.isBubble,attributes:xo,supplyDefaults:P$,crossTraceDefaults:gw,calc:qh.calc,crossTraceCalc:G$,arraysToCalcdata:_w,plot:K$,colorbar:Ol,formatLabels:$w,style:fg.style,styleOnSelect:fg.styleOnSelect,hoverPoints:lE,selectPoints:sE,animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Yt,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(" ")}},IE={moduleType:"component",name:"legend",layoutAttributes:Q1,supplyLayoutDefaults:J1,draw:r_,style:t_},Hw=[{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}],NE=tt.exports,FE=Je.exports,wg=Hw,Zh=de.exports,HE=Zh.strScale,OE=Zh.strRotate,BE=Zh.strTranslate,jE=function(e,r,a){var i=e.node(),n=wg[a.arrowhead||0],o=wg[a.startarrowhead||0],l=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),f=r.indexOf("start")>=0,c=r.indexOf("end")>=0,v=n.backoff*l+a.standoff,u=o.backoff*s+a.startstandoff,d,h,p,g;if(i.nodeName==="line"){d={x:+e.attr("x1"),y:+e.attr("y1")},h={x:+e.attr("x2"),y:+e.attr("y2")};var _=d.x-h.x,b=d.y-h.y;if(p=Math.atan2(b,_),g=p+Math.PI,v&&u&&v+u>Math.sqrt(_*_+b*b)){E();return}if(v){if(v*v>_*_+b*b){E();return}var w=v*Math.cos(p),m=v*Math.sin(p);h.x+=w,h.y+=m,e.attr({x2:h.x,y2:h.y})}if(u){if(u*u>_*_+b*b){E();return}var y=u*Math.cos(p),x=u*Math.sin(p);d.x-=y,d.y-=x,e.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var T=i.getTotalLength(),k="";if(T<v+u){E();return}var S=i.getPointAtLength(0),A=i.getPointAtLength(.1);p=Math.atan2(S.y-A.y,S.x-A.x),d=i.getPointAtLength(Math.min(u,T)),k="0px,"+u+"px,";var $=i.getPointAtLength(T),M=i.getPointAtLength(T-.1);g=Math.atan2($.y-M.y,$.x-M.x),h=i.getPointAtLength(Math.max(0,T-v));var C=k?u+v:v;k+=T-C+"px,"+T+"px",e.style("stroke-dasharray",k)}function E(){e.style("stroke-dasharray","0px,100px")}function I(P,R,L,D){!P.path||(P.noRotate&&(L=0),NE.select(i.parentNode).append("path").attr({class:e.attr("class"),d:P.path,transform:BE(R.x,R.y)+OE(L*180/Math.PI)+HE(D)}).style({fill:FE.rgb(a.arrowcolor),"stroke-width":0}))}f&&I(o,d,p,s),c&&I(n,h,g,l)},Tg=tt.exports,Ou=Ve,GE=Ut.exports,ai=de.exports,Bu=ai.strTranslate,xl=Ct.exports,$i=Je.exports,Pa=Tt.exports,kg=ua,ju=ir,Gu=xi,Ho=ha.exports,UE=Mt.arrayEditor,VE=jE,Kh={draw:qE,drawOne:Ow,drawRaw:Bw};function qE(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&Ow(t,r);return GE.previousPromises(t)}function Ow(t,e){var r=t._fullLayout,a=r.annotations[e]||{},i=xl.getFromId(t,a.xref),n=xl.getFromId(t,a.yref);i&&i.setScale(),n&&n.setScale(),Bw(t,a,e,!1,i,n)}function ei(t,e,r,a,i){var n=i[r],o=i[r+"ref"],l=r.indexOf("y")!==-1,s=xl.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 Bw(t,e,r,a,i,n){var o=t._fullLayout,l=t._fullLayout._size,s=t._context.edits,f,c;a?(f="annotation-"+a,c=a+".annotations"):(f="annotation",c="annotations");var v=UE(t.layout,c,e),u=v.modifyBase,d=v.modifyItem,h=v.getUpdateObj;o._infolayer.selectAll("."+f+'[data-index="'+r+'"]').remove();var p="clip"+o._uid+"_ann"+r;if(!e._input||e.visible===!1){Tg.selectAll("#"+p).remove();return}var g={x:{},y:{}},_=+e.textangle||0,b=o._infolayer.append("g").classed(f,!0).attr("data-index",String(r)).style("opacity",e.opacity),w=b.append("g").classed("annotation-text-g",!0),m=s[e.showarrow?"annotationTail":"annotationPosition"],y=e.captureevents||s.annotationText||m;function x(D){var z={index:r,annotation:e._input,fullAnnotation:e,event:D};return a&&(z.subplotId=a),z}var T=w.append("g").style("pointer-events",y?"all":null).call(Gu,"pointer").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",x(Tg.event))});e.hovertext&&T.on("mouseover",function(){var D=e.hoverlabel,z=D.font,F=this.getBoundingClientRect(),H=t.getBoundingClientRect();kg.loneHover({x0:F.left-H.left,x1:F.right-H.left,y:(F.top+F.bottom)/2-H.top,text:e.hovertext,color:D.bgcolor,borderColor:D.bordercolor,fontFamily:z.family,fontSize:z.size,fontColor:z.color},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:t})}).on("mouseout",function(){kg.loneUnhover(o._hoverlayer.node())});var k=e.borderwidth,S=e.borderpad,A=k+S,$=T.append("rect").attr("class","bg").style("stroke-width",k+"px").call($i.stroke,e.bordercolor).call($i.fill,e.bgcolor),M=e.width||e.height,C=o._topclips.selectAll("#"+p).data(M?[0]:[]);C.enter().append("clipPath").classed("annclip",!0).attr("id",p).append("rect"),C.exit().remove();var E=e.font,I=o._meta?ai.templateString(e.text,o._meta):e.text,P=T.append("text").classed("annotation-text",!0).text(I);function R(D){return D.call(Pa.font,E).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),ju.convertToTspans(D,t,L),D}function L(){var D=P.selectAll("a");if(D.size()===1&&D.text()===P.text()){var z=T.insert("a",":first-child").attr({"xlink:xlink:href":D.attr("xlink:href"),"xlink:xlink:show":D.attr("xlink:show")}).style({cursor:"pointer"});z.node().appendChild($.node())}var F=T.select(".annotation-text-math-group"),H=!F.empty(),U=Pa.bBox((H?F:P).node()),B=U.width,X=U.height,O=e.width||B,Y=e.height||X,W=Math.round(O+2*A),K=Math.round(Y+2*A);function Z(Ke,ft){return ft==="auto"&&(Ke<1/3?ft="left":Ke>2/3?ft="right":ft="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[ft]}for(var ae=!1,ne=["x","y"],oe=0;oe<ne.length;oe++){var re=ne[oe],se=e[re+"ref"]||re,me=e["a"+re+"ref"],Re={x:i,y:n}[re],ke=(_+(re==="x"?0:-90))*Math.PI/180,ze=W*Math.cos(ke),he=K*Math.sin(ke),te=Math.abs(ze)+Math.abs(he),ue=e[re+"anchor"],Le=e[re+"shift"]*(re==="x"?1:-1),we=g[re],Pe,Ee,Ce,q,pe,ve=xl.getRefType(se);if(Re&&ve!=="domain"){var ye=Re.r2fraction(e[re]);(ye<0||ye>1)&&(me===se?(ye=Re.r2fraction(e["a"+re]),(ye<0||ye>1)&&(ae=!0)):ae=!0),Pe=Re._offset+Re.r2p(e[re]),q=.5}else{var le=ve==="domain";re==="x"?(Ce=e[re],Pe=le?Re._offset+Re._length*Ce:Pe=l.l+l.w*Ce):(Ce=1-e[re],Pe=le?Re._offset+Re._length*Ce:Pe=l.t+l.h*Ce),q=e.showarrow?.5:Ce}if(e.showarrow){we.head=Pe;var fe=e["a"+re];if(pe=ze*Z(.5,e.xanchor)-he*Z(.5,e.yanchor),me===se){var Te=xl.getRefType(me);Te==="domain"?(re==="y"&&(fe=1-fe),we.tail=Re._offset+Re._length*fe):Te==="paper"?re==="y"?(fe=1-fe,we.tail=l.t+l.h*fe):we.tail=l.l+l.w*fe:we.tail=Re._offset+Re.r2p(fe),Ee=pe}else we.tail=Pe+fe,Ee=pe+fe;we.text=we.tail+pe;var xe=o[re==="x"?"width":"height"];if(se==="paper"&&(we.head=ai.constrain(we.head,1,xe-1)),me==="pixel"){var be=-Math.max(we.tail-3,we.text),Ae=Math.min(we.tail+3,we.text)-xe;be>0?(we.tail+=be,we.text+=be):Ae>0&&(we.tail-=Ae,we.text-=Ae)}we.tail+=Le,we.head+=Le}else pe=te*Z(q,ue),Ee=pe,we.text=Pe+pe;we.text+=Le,pe+=Le,Ee+=Le,e["_"+re+"padplus"]=te/2+Ee,e["_"+re+"padminus"]=te/2-Ee,e["_"+re+"size"]=te,e["_"+re+"shift"]=pe}if(ae){T.remove();return}var De=0,Oe=0;if(e.align!=="left"&&(De=(O-B)*(e.align==="center"?.5:1)),e.valign!=="top"&&(Oe=(Y-X)*(e.valign==="middle"?.5:1)),H)F.select("svg").attr({x:A+De-1,y:A+Oe}).call(Pa.setClipUrl,M?p:null,t);else{var Fe=A+Oe-U.top,st=A+De-U.left;P.call(ju.positionText,st,Fe).call(Pa.setClipUrl,M?p:null,t)}C.select("rect").call(Pa.setRect,A,A,O,Y),$.call(Pa.setRect,k/2,k/2,W-k,K-k),T.call(Pa.setTranslate,Math.round(g.x.text-W/2),Math.round(g.y.text-K/2)),w.attr({transform:"rotate("+_+","+g.x.text+","+g.y.text+")"});var Xe=function(Ke,ft){b.selectAll(".annotation-arrow-g").remove();var N=g.x.head,G=g.y.head,j=g.x.tail+Ke,V=g.y.tail+ft,ee=g.x.text+Ke,Q=g.y.text+ft,ge=ai.rotationXYMatrix(_,ee,Q),_e=ai.apply2DTransform(ge),ce=ai.apply2DTransform2(ge),ie=+$.attr("width"),Me=+$.attr("height"),Ne=ee-.5*ie,je=Ne+ie,Ze=Q-.5*Me,nt=Ze+Me,dt=[[Ne,Ze,Ne,nt],[Ne,nt,je,nt],[je,nt,je,Ze],[je,Ze,Ne,Ze]].map(ce);if(!dt.reduce(function(rt,Be){return rt^!!ai.segmentsIntersect(N,G,N+1e6,G+1e6,Be[0],Be[1],Be[2],Be[3])},!1)){dt.forEach(function(rt){var Be=ai.segmentsIntersect(j,V,N,G,rt[0],rt[1],rt[2],rt[3]);Be&&(j=Be.x,V=Be.y)});var Ue=e.arrowwidth,St=e.arrowcolor,at=e.arrowside,qe=b.append("g").style({opacity:$i.opacity(St)}).classed("annotation-arrow-g",!0),yt=qe.append("path").attr("d","M"+j+","+V+"L"+N+","+G).style("stroke-width",Ue+"px").call($i.stroke,$i.rgb(St));if(VE(yt,at,e),s.annotationPosition&&yt.node().parentNode&&!a){var ht=N,et=G;if(e.standoff){var Qe=Math.sqrt(Math.pow(N-j,2)+Math.pow(G-V,2));ht+=e.standoff*(j-N)/Qe,et+=e.standoff*(V-G)/Qe}var Ge=qe.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(j-ht)+","+(V-et),transform:Bu(ht,et)}).style("stroke-width",Ue+6+"px").call($i.stroke,"rgba(0,0,0,0)").call($i.fill,"rgba(0,0,0,0)"),We,ct;Ho.init({element:Ge.node(),gd:t,prepFn:function(){var rt=Pa.getTranslate(T);We=rt.x,ct=rt.y,i&&i.autorange&&u(i._name+".autorange",!0),n&&n.autorange&&u(n._name+".autorange",!0)},moveFn:function(rt,Be){var vt=_e(We,ct),kt=vt[0]+rt,nr=vt[1]+Be;T.call(Pa.setTranslate,kt,nr),d("x",ei(i,rt,"x",l,e)),d("y",ei(n,Be,"y",l,e)),e.axref===e.xref&&d("ax",ei(i,rt,"ax",l,e)),e.ayref===e.yref&&d("ay",ei(n,Be,"ay",l,e)),qe.attr("transform",Bu(rt,Be)),w.attr({transform:"rotate("+_+","+kt+","+nr+")"})},doneFn:function(){Ou.call("_guiRelayout",t,h());var rt=document.querySelector(".js-notes-box-panel");rt&&rt.redraw(rt.selectedObj)}})}}};if(e.showarrow&&Xe(0,0),m){var ut;Ho.init({element:T.node(),gd:t,prepFn:function(){ut=w.attr("transform")},moveFn:function(Ke,ft){var N="pointer";if(e.showarrow)e.axref===e.xref?d("ax",ei(i,Ke,"ax",l,e)):d("ax",e.ax+Ke),e.ayref===e.yref?d("ay",ei(n,ft,"ay",l.w,e)):d("ay",e.ay+ft),Xe(Ke,ft);else{if(a)return;var G,j;if(i)G=ei(i,Ke,"x",l,e);else{var V=e._xsize/l.w,ee=e.x+(e._xshift-e.xshift)/l.w-V/2;G=Ho.align(ee+Ke/l.w,V,0,1,e.xanchor)}if(n)j=ei(n,ft,"y",l,e);else{var Q=e._ysize/l.h,ge=e.y-(e._yshift+e.yshift)/l.h-Q/2;j=Ho.align(ge-ft/l.h,Q,0,1,e.yanchor)}d("x",G),d("y",j),(!i||!n)&&(N=Ho.getCursor(i?.5:G,n?.5:j,e.xanchor,e.yanchor))}w.attr({transform:Bu(Ke,ft)+ut}),Gu(T,N)},clickFn:function(Ke,ft){e.captureevents&&t.emit("plotly_clickannotation",x(ft))},doneFn:function(){Gu(T),Ou.call("_guiRelayout",t,h());var Ke=document.querySelector(".js-notes-box-panel");Ke&&Ke.redraw(Ke.selectedObj)}})}}s.annotationText?P.call(ju.makeEditable,{delegate:T,gd:t}).call(R).on("edit",function(D){e.text=D,this.call(R),d("text",D),i&&i.autorange&&u(i._name+".autorange",!0),n&&n.autorange&&u(n._name+".autorange",!0),Ou.call("_guiRelayout",t,h())}):P.call(R)}var Ag=de.exports,XE=Ve,Mg=Mt.arrayEditor,YE={hasClickToShow:WE,onClick:ZE};function WE(t,e){var r=jw(t,e);return r.on.length>0||r.explicitOff.length>0}function ZE(t,e){var r=jw(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=Mg(t.layout,"annotations",o[a[l]]),s.modifyItem("visible",!0),Ag.extendFlat(n,s.getUpdateObj());for(l=0;l<i.length;l++)s=Mg(t.layout,"annotations",o[i[l]]),s.modifyItem("visible",!1),Ag.extendFlat(n,s.getUpdateObj());return XE.call("update",t,{},n)}}function jw(t,e){var r=t._fullLayout.annotations,a=[],i=[],n=[],o=(e||[]).length,l,s,f,c,v,u,d,h;for(l=0;l<r.length;l++)if(f=r[l],c=f.clicktoshow,c){for(s=0;s<o;s++)if(v=e[s],u=v.xaxis,d=v.yaxis,u._id===f.xref&&d._id===f.yref&&u.d2r(v.x)===Sg(f._xclick,u)&&d.d2r(v.y)===Sg(f._yclick,d)){f.visible?c==="onout"?h=i:h=n:h=a,h.push(l);break}s===o&&f.visible&&c==="onout"&&i.push(l)}return{on:a,off:i,explicitOff:n}}function Sg(t,e){return e.type==="log"?e.l2r(t):e.d2r(t)}var Qh={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}},Lg=Hw,Cg=dr,Ss=pr,KE=Mt.templatedArray,Ls=Qh;function Dg(t){return["In order for absolute positioning of the arrow to work, *a"+t+"ref* must be exactly the same as *"+t+"ref*, otherwise *a"+t+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+t+"ref* can be set to *pixel*,","in which case the *a"+t+"* value is specified in pixels","relative to *"+t+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function $g(t,e,r){return["Sets the",t,"component of the arrow tail about the arrow head.","If `a"+t+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",e,"("+e,"to",r+").","If `a"+t+"ref` is not `pixel` and is exactly the same as `"+t+"ref`,","this is an absolute value on that axis,","like `"+t+"`, specified in the same coordinates as `"+t+"ref`."].join(" ")}var gc=KE("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (<br>), bold (<b></b>), italics (<i></i>),","hyperlinks (<a href='...'></a>). Tags <em>, <sup>, <sub>","<span> are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:Cg({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use <br> to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more <br> HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:Lg.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:Lg.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[$g("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[$g("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",Ss.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",Ls.axisRefDescription("ax","left","right"),Dg("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Ss.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",Ls.axisRefDescription("ay","bottom","top"),Dg("y")].join(" ")},xref:{valType:"enumerated",values:["paper",Ss.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",Ls.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",Ss.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",Ls.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:Cg({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}}),Eg=de.exports,Tn=Je.exports,Gw=function(e,r,a,i){i("opacity");var n=i("bgcolor"),o=i("bordercolor"),l=Tn.opacity(o);i("borderpad");var s=i("borderwidth"),f=i("showarrow");i("text",f?" ":a._dfltTitle.annotation),i("textangle"),Eg.coerceFont(i,"font",a.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),f){var v=i("arrowside"),u,d;v.indexOf("end")!==-1&&(u=i("arrowhead"),d=i("arrowsize")),v.indexOf("start")!==-1&&(i("startarrowhead",u),i("startarrowsize",d)),i("arrowcolor",l?r.bordercolor:Tn.defaultLine),i("arrowwidth",(l&&s||1)*2),i("standoff"),i("startstandoff")}var h=i("hovertext"),p=a.hoverlabel||{};if(h){var g=i("hoverlabel.bgcolor",p.bgcolor||(Tn.opacity(n)?Tn.rgb(n):Tn.defaultLine)),_=i("hoverlabel.bordercolor",p.bordercolor||Tn.contrast(g));Eg.coerceFont(i,"hoverlabel.font",{family:p.font.family,size:p.font.size,color:p.font.color||_})}i("captureevents",!!h)},Uu=de.exports,Ei=Ct.exports,QE=Va,JE=Gw,eR=gc,tR=function(e,r){QE(e,r,{name:"annotations",handleItemDefaults:rR})};function rR(t,e,r){function a(w,m){return Uu.coerce(t,e,eR,w,m)}var i=a("visible"),n=a("clicktoshow");if(!!(i||n)){JE(t,e,r,a);for(var o=e.showarrow,l=["x","y"],s=[-10,-30],f={_fullLayout:r},c=0;c<2;c++){var v=l[c],u=Ei.coerceRef(t,e,f,v,"","paper");if(u!=="paper"){var d=Ei.getFromId(f,u);d._annIndices.push(e._index)}if(Ei.coercePosition(e,f,a,u,v,.5),o){var h="a"+v,p=Ei.coerceRef(t,e,f,h,"pixel",["pixel","paper"]);p!=="pixel"&&p!==u&&(p=e[h]="pixel");var g=p==="pixel"?s[c]:.4;Ei.coercePosition(e,f,a,p,h,g)}a(v+"anchor"),a(v+"shift")}if(Uu.noneOrAll(t,e,["x","y"]),o&&Uu.noneOrAll(t,e,["ax","ay"]),n){var _=a("xclick"),b=a("yclick");e._xclick=_===void 0?e.x:Ei.cleanPosition(_,f,e.xref),e._yclick=b===void 0?e.y:Ei.cleanPosition(b,f,e.yref)}}}var aR=Ve,Rg=de.exports,Pg=Vt,Jh=function(e){return function(a,i){var n=a[e];if(!!Array.isArray(n))for(var o=aR.subplotsRegistry.cartesian,l=o.idRegex,s=i._subplots,f=s.xaxis,c=s.yaxis,v=s.cartesian,u=i._has("cartesian")||i._has("gl2d"),d=0;d<n.length;d++){var h=n[d];if(!!Rg.isPlainObject(h)){var p=Pg.cleanId(h.xref,"x",!1),g=Pg.cleanId(h.yref,"y",!1),_=l.x.test(p),b=l.y.test(g);if(_||b){u||Rg.pushUnique(i._basePlotModules,o);var w=!1;_&&f.indexOf(p)===-1&&(f.push(p),w=!0),b&&c.indexOf(g)===-1&&(c.push(g),w=!0),w&&_&&b&&v.push(p+g)}}}}},hd=de.exports,Gi=Ct.exports,iR=Kh.draw,nR=function(e){var r=e._fullLayout,a=hd.filterVisible(r.annotations);if(a.length&&e._fullData.length)return hd.syncOrAsync([iR,oR],e)};function oR(t){var e=t._fullLayout;hd.filterVisible(e.annotations).forEach(function(r){var a=Gi.getFromId(t,r.xref),i=Gi.getFromId(t,r.yref),n=Gi.getRefType(r.xref),o=Gi.getRefType(r.yref);r._extremes={},n==="range"&&zg(r,a),o==="range"&&zg(r,i)})}function zg(t,e){var r=e._id,a=r.charAt(0),i=t[a],n=t["a"+a],o=t[a+"ref"],l=t["a"+a+"ref"],s=t["_"+a+"padplus"],f=t["_"+a+"padminus"],c={x:1,y:-1}[a]*t[a+"shift"],v=3*t.arrowsize*t.arrowwidth||0,u=v+c,d=v-c,h=3*t.startarrowsize*t.arrowwidth||0,p=h+c,g=h-c,_;if(l===o){var b=Gi.findExtremes(e,[e.r2c(i)],{ppadplus:u,ppadminus:d}),w=Gi.findExtremes(e,[e.r2c(n)],{ppadplus:Math.max(s,p),ppadminus:Math.max(f,g)});_={min:[b.min[0],w.min[0]],max:[b.max[0],w.max[0]]}}else p=n?p+n:p,g=n?g-n:g,_=Gi.findExtremes(e,[e.r2c(i)],{ppadplus:Math.max(s,u,p),ppadminus:Math.max(f,d,g)});t._extremes[r]=_}var lR=lt,sR=Od,fR=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(!(n||o))return;var l=e._fullLayout.annotations,s=r._id.charAt(0),f,c;function v(d){var h=f[d],p=null;n?p=sR(h,r.range):p=Math.pow(10,h),lR(p)||(p=null),i(c+d,p)}for(var u=0;u<l.length;u++)f=l[u],c="annotations["+u+"].",f[s+"ref"]===r._id&&v(s),f["a"+s+"ref"]===r._id&&v("a"+s)},Vu=Kh,Ig=YE,cR={moduleType:"component",name:"annotations",layoutAttributes:gc,supplyLayoutDefaults:tR,includeBasePlot:Jh("annotations"),calcAutorange:nR,draw:Vu.draw,drawOne:Vu.drawOne,drawRaw:Vu.drawRaw,hasClickToShow:Ig.hasClickToShow,onClick:Ig.onClick,convertCoords:fR},Lt=gc,uR=gi.overrideAll,vR=Mt.templatedArray,pd=uR(vR("annotation",{visible:Lt.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:Lt.xanchor,xshift:Lt.xshift,yanchor:Lt.yanchor,yshift:Lt.yshift,text:Lt.text,textangle:Lt.textangle,font:Lt.font,width:Lt.width,height:Lt.height,opacity:Lt.opacity,align:Lt.align,valign:Lt.valign,bgcolor:Lt.bgcolor,bordercolor:Lt.bordercolor,borderpad:Lt.borderpad,borderwidth:Lt.borderwidth,showarrow:Lt.showarrow,arrowcolor:Lt.arrowcolor,arrowhead:Lt.arrowhead,startarrowhead:Lt.startarrowhead,arrowside:Lt.arrowside,arrowsize:Lt.arrowsize,startarrowsize:Lt.startarrowsize,arrowwidth:Lt.arrowwidth,standoff:Lt.standoff,startstandoff:Lt.startstandoff,hovertext:Lt.hovertext,hoverlabel:Lt.hoverlabel,captureevents:Lt.captureevents}),"calc","from-root"),qu=de.exports,dR=Ct.exports,hR=Va,pR=Gw,mR=pd,yR=function(e,r,a){hR(e,r,{name:"annotations",handleItemDefaults:gR,fullLayout:a.fullLayout})};function gR(t,e,r,a){function i(l,s){return qu.coerce(t,e,mR,l,s)}function n(l){var s=l+"axis",f={_fullLayout:{}};return f._fullLayout[s]=r[s],dR.coercePosition(e,f,i,l,l,.5)}var o=i("visible");!o||(pR(t,e,a.fullLayout,i),n("x"),n("y"),n("z"),qu.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),qu.noneOrAll(t,e,["ax","ay"])))}var Ng=de.exports,Fg=Ct.exports,bR=function(e){for(var r=e.fullSceneLayout,a=r.annotations,i=0;i<a.length;i++)xR(a[i],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function xR(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={},Ng.extendFlat(t._xa,n),Fg.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={},Ng.extendFlat(t._ya,n),Fg.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 Xu(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 _R(t,e){var r=Xu(t.projection,Xu(t.view,Xu(t.model,[e[0],e[1],e[2],1])));return r}var wR=_R,TR=Kh.drawRaw,kR=wR,AR=["x","y","z"],MR=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=AR[s],c=o[f],v=r[f+"axis"],u=v.r2fraction(c);if(u<0||u>1){l=!0;break}}l?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+n+'"]').remove():(o._pdata=kR(e.glplot.cameraParams,[r.xaxis.r2l(o.x)*a[0],r.yaxis.r2l(o.y)*a[1],r.zaxis.r2l(o.z)*a[2]]),TR(e.graphDiv,o,n,e.id,o._xa,o._ya))}},SR=Ve,Hg=de.exports,LR={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:pd}}},layoutAttributes:pd,handleDefaults:yR,includeBasePlot:CR,convert:bR,draw:MR};function CR(t,e){var r=SR.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&&(Hg.pushUnique(e._basePlotModules,r),Hg.pushUnique(e._subplots.gl3d,o))}}var Og=gc,Bg=xo.line,DR=Ga.dash,Oo=Bt.extendFlat,$R=Mt.templatedArray,jg=Qh,Uw=$R("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this shape is visible."].join(" ")},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:"Specifies whether shapes are drawn below or above traces."},xref:Oo({},Og.xref,{description:["Sets the shape's x coordinate axis.",jg.axisRefDescription("x","left","right"),"If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, then you must convert","the date to unix time in milliseconds."].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},yref:Oo({},Og.yref,{description:["Sets the annotation's y coordinate axis.",jg.axisRefDescription("y","bottom","top")].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},path:{valType:"string",editType:"calc+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:Oo({},Bg.color,{editType:"arraydraw"}),width:Oo({},Bg.width,{editType:"calc+arraydraw"}),dash:Oo({},DR,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color filling the shape's interior. Only applies to closed shapes."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw",description:["Determines which regions of complex paths constitute the interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether the shape could be activated for edit or not.","Has no effect when the older editable shapes mode is enabled via","`config.editable` or `config.edits.shapePosition`."].join(" ")},editType:"arraydraw"}),Yu=de.exports,kn=Ct.exports,ER=Va,RR=Uw,Gg=cc,PR=function(e,r){ER(e,r,{name:"shapes",handleItemDefaults:zR})};function zR(t,e,r){function a(C,E){return Yu.coerce(t,e,RR,C,E)}var i=a("visible");if(!!i){var n=a("path"),o=n?"path":"rect",l=a("type",o);e.type!=="path"&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var s=a("line.width");s&&(a("line.color"),a("line.dash"));for(var f=a("xsizemode"),c=a("ysizemode"),v=["x","y"],u=0;u<2;u++){var d=v[u],h=d+"anchor",p=d==="x"?f:c,g={_fullLayout:r},_,b,w,m=kn.coerceRef(t,e,g,d,void 0,"paper"),y=kn.getRefType(m);if(y==="range"?(_=kn.getFromId(g,m),_._shapeIndices.push(e._index),w=Gg.rangeToShapePosition(_),b=Gg.shapePositionToRange(_)):b=w=Yu.identity,l!=="path"){var x=.25,T=.75,k=d+"0",S=d+"1",A=t[k],$=t[S];t[k]=b(t[k],!0),t[S]=b(t[S],!0),p==="pixel"?(a(k,0),a(S,10)):(kn.coercePosition(e,g,a,m,k,x),kn.coercePosition(e,g,a,m,S,T)),e[k]=w(e[k]),e[S]=w(e[S]),t[k]=A,t[S]=$}if(p==="pixel"){var M=t[h];t[h]=b(t[h],!0),kn.coercePosition(e,g,a,m,h,.25),e[h]=w(e[h]),t[h]=M}}l==="path"?a("path"):Yu.noneOrAll(t,e,["x0","x1","y0","y1"])}}var IR=Je.exports,NR=function(e,r,a){a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var i=a("newshape.line.width");if(i){var n=(e||{}).plot_bgcolor||"#FFF";a("newshape.line.color",IR.contrast(n)),a("newshape.line.dash")}a("activeshape.fillcolor"),a("activeshape.opacity")},md=de.exports,An=Ct.exports,ro=Lh,Vw=cc,FR=function(e){var r=e._fullLayout,a=md.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=An.getRefType(n.xref),f=An.getRefType(n.yref);if(n.xref!=="paper"&&s!=="domain"){var c=n.xsizemode==="pixel"?n.xanchor:n.x0,v=n.xsizemode==="pixel"?n.xanchor:n.x1;o=An.getFromId(e,n.xref),l=Ug(o,c,v,n.path,ro.paramIsX),l&&(n._extremes[o._id]=An.findExtremes(o,l,HR(n)))}if(n.yref!=="paper"&&f!=="domain"){var u=n.ysizemode==="pixel"?n.yanchor:n.y0,d=n.ysizemode==="pixel"?n.yanchor:n.y1;o=An.getFromId(e,n.yref),l=Ug(o,u,d,n.path,ro.paramIsY),l&&(n._extremes[o._id]=An.findExtremes(o,l,OR(n)))}}};function HR(t){return qw(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function OR(t){return qw(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function qw(t,e,r,a,i,n){var o=t/2,l=n;if(e==="pixel"){var s=i?Vw.extractPathCoords(i,n?ro.paramIsY:ro.paramIsX):[r,a],f=md.aggNums(Math.max,null,s),c=md.aggNums(Math.min,null,s),v=c<0?Math.abs(c)+o:o,u=f>0?f+o:o;return{ppad:o,ppadplus:l?v:u,ppadminus:l?u:v}}else return{ppad:o}}function Ug(t,e,r,a,i){var n=t.type==="category"||t.type==="multicategory"?t.r2c:t.d2c;if(e!==void 0)return[n(e),n(r)];if(!!a){var o=1/0,l=-1/0,s=a.match(ro.segmentRE),f,c,v,u,d;for(t.type==="date"&&(n=Vw.decodeDate(n)),f=0;f<s.length;f++)c=s[f],v=i[c.charAt(0)].drawn,v!==void 0&&(u=s[f].substr(1).match(ro.paramRE),!(!u||u.length<v)&&(d=n(u[v]),d<o&&(o=d),d>l&&(l=d)));if(l>=o)return[o,l]}}var Vg=g_,BR={moduleType:"component",name:"shapes",layoutAttributes:Uw,supplyLayoutDefaults:PR,supplyDrawNewShapeDefaults:NR,includeBasePlot:Jh("shapes"),calcAutorange:FR,draw:Vg.draw,drawOne:Vg.drawOne},qg=pr,jR=Mt.templatedArray,Xg=Qh,Xw=jR("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",qg.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",Xg.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",qg.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",Xg.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"}),GR=de.exports,Wu=Ct.exports,UR=Va,VR=Xw,qR="images",XR=function(e,r){var a={name:qR,handleItemDefaults:YR};UR(e,r,a)};function YR(t,e,r){function a(u,d){return GR.coerce(t,e,VR,u,d)}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=Wu.coerceRef(t,e,o,f,"paper",void 0);if(c!=="paper"){var v=Wu.getFromId(o,c);v._imgIndices.push(e._index)}Wu.coercePosition(e,o,a,c,f,0)}return e}var Yg=tt.exports,WR=Tt.exports,Mn=Ct.exports,Wg=Vt,ZR=on,KR=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=Wg.ref2id(s.xref)+Wg.ref2id(s.yref);var f=r._plots[o];if(!f){n.push(s);continue}f.mainplot&&(o=f.mainplot.id),i[o]||(i[o]=[]),i[o].push(s)}else s.layer==="above"?a.push(s):n.push(s)}var c={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function v(b){var w=Yg.select(this);if(this._imgSrc!==b.source)if(w.attr("xmlns",ZR.svg),b.source&&b.source.slice(0,5)==="data:")w.attr("xlink:href",b.source),this._imgSrc=b.source;else{var m=new Promise(function(y){var x=new Image;this.img=x,x.setAttribute("crossOrigin","anonymous"),x.onerror=T,x.onload=function(){var k=document.createElement("canvas");k.width=this.width,k.height=this.height;var S=k.getContext("2d");S.drawImage(this,0,0);var A=k.toDataURL("image/png");w.attr("xlink:href",A),y()},w.on("error",T),x.src=b.source,this._imgSrc=b.source;function T(){w.remove(),y()}}.bind(this));e._promises.push(m)}}function u(b){var w=Yg.select(this),m=Mn.getFromId(e,b.xref),y=Mn.getFromId(e,b.yref),x=Mn.getRefType(b.xref)==="domain",T=Mn.getRefType(b.yref)==="domain",k=r._size,S,A;m!==void 0?S=typeof b.xref=="string"&&x?m._length*b.sizex:Math.abs(m.l2p(b.sizex)-m.l2p(0)):S=b.sizex*k.w,y!==void 0?A=typeof b.yref=="string"&&T?y._length*b.sizey:Math.abs(y.l2p(b.sizey)-y.l2p(0)):A=b.sizey*k.h;var $=S*c.x[b.xanchor].offset,M=A*c.y[b.yanchor].offset,C=c.x[b.xanchor].sizing+c.y[b.yanchor].sizing,E,I;switch(m!==void 0?E=typeof b.xref=="string"&&x?m._length*b.x+m._offset:m.r2p(b.x)+m._offset:E=b.x*k.w+k.l,E+=$,y!==void 0?I=typeof b.yref=="string"&&T?y._length*(1-b.y)+y._offset:y.r2p(b.y)+y._offset:I=k.h-b.y*k.h+k.t,I+=M,b.sizing){case"fill":C+=" slice";break;case"stretch":C="none";break}w.attr({x:E,y:I,width:S,height:A,preserveAspectRatio:C,opacity:b.opacity});var P=m&&Mn.getRefType(b.xref)!=="domain"?m._id:"",R=y&&Mn.getRefType(b.yref)!=="domain"?y._id:"",L=P+R;WR.setClipUrl(w,L?"clip"+r._uid+L:null,e)}var d=r._imageLowerLayer.selectAll("image").data(n),h=r._imageUpperLayer.selectAll("image").data(a);d.enter().append("image"),h.enter().append("image"),d.exit().remove(),h.exit().remove(),d.each(function(b){v.bind(this)(b),u.bind(this)(b)}),h.each(function(b){v.bind(this)(b),u.bind(this)(b)});var p=Object.keys(r._plots);for(l=0;l<p.length;l++){o=p[l];var g=r._plots[o];if(!!g.imagelayer){var _=g.imagelayer.selectAll("image").data(i[o]||[]);_.enter().append("image"),_.exit().remove(),_.each(function(b){v.bind(this)(b),u.bind(this)(b)})}}},Zg=lt,QR=Od,JR=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(!!(n||o)){for(var l=e._fullLayout.images,s=r._id.charAt(0),f,c,v=0;v<l.length;v++)if(f=l[v],c="images["+v+"].",f[s+"ref"]===r._id){var u=f[s],d=f["size"+s],h=null,p=null;if(n){h=QR(u,r.range);var g=d/Math.pow(10,h)/2;p=2*Math.log(g+Math.sqrt(1+g*g))/Math.LN10}else h=Math.pow(10,u),p=h*(Math.pow(10,d/2)-Math.pow(10,-d/2));Zg(h)?Zg(p)||(p=null):(h=null,p=null),i(c+s,h),i(c+"size"+s,p)}}},eP={moduleType:"component",name:"images",layoutAttributes:Xw,supplyLayoutDefaults:XR,includeBasePlot:Jh("images"),draw:KR,convertCoords:JR},ep={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}},tP=dr,rP=hr,aP=Bt.extendFlat,iP=gi.overrideAll,nP=qd,Yw=Mt.templatedArray,oP=Yw("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(" ")}}),Ww=iP(Yw("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:oP,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:aP(nP({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:tP({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:rP.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"),Js=de.exports,Zw=Va,Kw=Ww,lP=ep,sP=lP.name,fP=Kw.buttons,cP=function(e,r){var a={name:sP,handleItemDefaults:uP};Zw(e,r,a)};function uP(t,e,r){function a(o,l){return Js.coerce(t,e,Kw,o,l)}var i=Zw(t,e,{name:"buttons",handleItemDefaults:vP}),n=a("visible",i.length>0);!n||(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Js.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Js.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function vP(t,e){function r(i,n){return Js.coerce(t,e,fP,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 dP=Ft,oa=tt.exports,Kg=Je.exports,Yn=Tt.exports,Lf=de.exports;function Ft(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})}Ft.barWidth=2;Ft.barLength=20;Ft.barRadius=2;Ft.barPad=1;Ft.barColor="#808BA4";Ft.prototype.enable=function(e,r,a){var i=this.gd._fullLayout,n=i.width,o=i.height;this.position=e;var l=this.position.l,s=this.position.w,f=this.position.t,c=this.position.h,v=this.position.direction,u=v==="down",d=v==="left",h=v==="right",p=v==="up",g=s,_=c,b,w,m,y;!u&&!d&&!h&&!p&&(this.position.direction="down",u=!0);var x=u||p;x?(b=l,w=b+g,u?(m=f,y=Math.min(m+_,o),_=y-m):(y=f+_,m=Math.max(y-_,0),_=y-m)):(m=f,y=m+_,d?(w=l+g,b=Math.max(w-g,0),g=w-b):(b=l,w=Math.min(b+g,n),g=w-b)),this._box={l:b,t:m,w:g,h:_};var T=s>g,k=Ft.barLength+2*Ft.barPad,S=Ft.barWidth+2*Ft.barPad,A=l,$=f+c;$+S>o&&($=o-S);var M=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);M.exit().on(".drag",null).remove(),M.enter().append("rect").classed("scrollbar-horizontal",!0).call(Kg.fill,Ft.barColor),T?(this.hbar=M.attr({rx:Ft.barRadius,ry:Ft.barRadius,x:A,y:$,width:k,height:S}),this._hbarXMin=A+k/2,this._hbarTranslateMax=g-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=c>_,E=Ft.barWidth+2*Ft.barPad,I=Ft.barLength+2*Ft.barPad,P=l+s,R=f;P+E>n&&(P=n-E);var L=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-vertical",!0).call(Kg.fill,Ft.barColor),C?(this.vbar=L.attr({rx:Ft.barRadius,ry:Ft.barRadius,x:P,y:R,width:E,height:I}),this._vbarYMin=R+I/2,this._vbarTranslateMax=_-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var D=this.id,z=b-.5,F=C?w+E+.5:w+.5,H=m-.5,U=T?y+S+.5:y+.5,B=i._topdefs.selectAll("#"+D).data(T||C?[0]:[]);if(B.exit().remove(),B.enter().append("clipPath").attr("id",D).append("rect"),T||C?(this._clipRect=B.select("rect").attr({x:Math.floor(z),y:Math.floor(H),width:Math.ceil(F)-Math.floor(z),height:Math.ceil(U)-Math.floor(H)}),this.container.call(Yn.setClipUrl,D,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(Yn.setClipUrl,null),delete this._clipRect),T||C){var X=oa.behavior.drag().on("dragstart",function(){oa.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=oa.behavior.drag().on("dragstart",function(){oa.event.sourceEvent.preventDefault(),oa.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(O),C&&this.vbar.on(".drag",null).call(O)}this.setTranslate(r,a)};Ft.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Yn.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)};Ft.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=oa.event.dx),this.vbar&&(r-=oa.event.dy),this.setTranslate(e,r)};Ft.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=oa.event.deltaY),this.vbar&&(r+=oa.event.deltaY),this.setTranslate(e,r)};Ft.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,i=a+this._hbarTranslateMax,n=Lf.constrain(oa.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=Lf.constrain(oa.event.y,s,f),v=(c-s)/(f-s),u=this.position.h-this._box.h;r=v*u}this.setTranslate(e,r)};Ft.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=Lf.constrain(e||0,0,a),r=Lf.constrain(r||0,0,i),this.translateX=e,this.translateY=r,this.container.call(Yn.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(Yn.setTranslate,e+n*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(Yn.setTranslate,e,r+o*this._vbarTranslateMax)}};var ao=tt.exports,_l=Ut.exports,wl=Je.exports,io=Tt.exports,Rr=de.exports,Cf=ir,hP=Mt.arrayEditor,Qw=Lr.LINE_SPACING,Ye=ep,pP=dP,mP=function(e){var r=e._fullLayout,a=Rr.filterVisible(r[Ye.name]);function i(u){_l.autoMargin(e,aT(u))}var n=r._menulayer.selectAll("g."+Ye.containerClassName).data(a.length>0?[0]:[]);if(n.enter().append("g").classed(Ye.containerClassName,!0).style("cursor","pointer"),n.exit().each(function(){ao.select(this).selectAll("g."+Ye.headerGroupClassName).each(i)}).remove(),a.length!==0){var o=n.selectAll("g."+Ye.headerGroupClassName).data(a,yP);o.enter().append("g").classed(Ye.headerGroupClassName,!0);for(var l=Rr.ensureSingle(n,"g",Ye.dropdownButtonGroupClassName,function(u){u.style("pointer-events","all")}),s=0;s<a.length;s++){var f=a[s];TP(e,f)}var c="updatemenus"+r._uid,v=new pP(e,l,c);o.enter().size()&&(l.node().parentNode.appendChild(l.node()),l.call(gd)),o.exit().each(function(u){l.call(gd),i(u)}).remove(),o.each(function(u){var d=ao.select(this),h=u.type==="dropdown"?l:null;_l.manageCommandObserver(e,u,u.buttons,function(p){yd(e,u,u.buttons[p.index],d,h,v,p.index,!0)}),u.type==="dropdown"?(eT(e,d,l,v,u),Jw(l,u)&&Tl(e,d,l,v,u)):Tl(e,d,null,null,u)})}};function yP(t){return t._index}function gP(t){return+t.attr(Ye.menuIndexAttrName)==-1}function Jw(t,e){return+t.attr(Ye.menuIndexAttrName)===e._index}function yd(t,e,r,a,i,n,o,l){e.active=o,hP(t.layout,Ye.name,e).applyUpdate("active",o),e.type==="buttons"?Tl(t,a,null,null,e):e.type==="dropdown"&&(i.attr(Ye.menuIndexAttrName,"-1"),eT(t,a,i,n,e),l||Tl(t,a,i,n,e))}function eT(t,e,r,a,i){var n=Rr.ensureSingle(e,"g",Ye.headerClassName,function(u){u.style("pointer-events","all")}),o=i._dims,l=i.active,s=i.buttons[l]||Ye.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(tp,i,s,t).call(iT,i,f,c);var v=Rr.ensureSingle(e,"text",Ye.headerArrowClassName,function(u){u.attr("text-anchor","end").call(io.font,i.font).text(Ye.arrowSymbol[i.direction])});v.attr({x:o.headerWidth-Ye.arrowOffsetX+i.pad.l,y:o.headerHeight/2+Ye.textOffsetY+i.pad.t}),n.on("click",function(){r.call(gd,String(Jw(r,i)?-1:i._index)),Tl(t,e,r,a,i)}),n.on("mouseover",function(){n.call(tT)}),n.on("mouseout",function(){n.call(rT,i)}),io.setTranslate(e,o.lx,o.ly)}function Tl(t,e,r,a,i){r||(r=e,r.attr("pointer-events","all"));var n=!gP(r)||i.type==="buttons"?i.buttons:[],o=i.type==="dropdown"?Ye.dropdownButtonClassName:Ye.buttonClassName,l=r.selectAll("g."+o).data(Rr.filterVisible(n)),s=l.enter().append("g").classed(o,!0),f=l.exit();i.type==="dropdown"?(s.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var c=0,v=0,u=i._dims,d=["up","down"].indexOf(i.direction)!==-1;i.type==="dropdown"&&(d?v=u.headerHeight+Ye.gapButtonHeader:c=u.headerWidth+Ye.gapButtonHeader),i.type==="dropdown"&&i.direction==="up"&&(v=-Ye.gapButtonHeader+Ye.gapButton-u.openHeight),i.type==="dropdown"&&i.direction==="left"&&(c=-Ye.gapButtonHeader+Ye.gapButton-u.openWidth);var h={x:u.lx+c+i.pad.l,y:u.ly+v+i.pad.t,yPad:Ye.gapButton,xPad:Ye.gapButton,index:0},p={l:h.x+i.borderwidth,t:h.y+i.borderwidth};l.each(function(g,_){var b=ao.select(this);b.call(tp,i,g,t).call(iT,i,h),b.on("click",function(){ao.event.defaultPrevented||(g.execute&&(g.args2&&i.active===_?(yd(t,i,g,e,r,a,-1),_l.executeAPICommand(t,g.method,g.args2)):(yd(t,i,g,e,r,a,_),_l.executeAPICommand(t,g.method,g.args))),t.emit("plotly_buttonclicked",{menu:i,button:g,active:i.active}))}),b.on("mouseover",function(){b.call(tT)}),b.on("mouseout",function(){b.call(rT,i),l.call(Qg,i)})}),l.call(Qg,i),d?(p.w=Math.max(u.openWidth,u.headerWidth),p.h=h.y-p.t):(p.w=h.x-p.l,p.h=Math.max(u.openHeight,u.headerHeight)),p.direction=i.direction,a&&(l.size()?bP(t,e,r,a,i,p):xP(a))}function bP(t,e,r,a,i,n){var o=i.direction,l=o==="up"||o==="down",s=i._dims,f=i.active,c,v,u;if(l)for(v=0,u=0;u<f;u++)v+=s.heights[u]+Ye.gapButton;else for(c=0,u=0;u<f;u++)c+=s.widths[u]+Ye.gapButton;a.enable(n,c,v),a.hbar&&a.hbar.attr("opacity","0").transition().attr("opacity","1"),a.vbar&&a.vbar.attr("opacity","0").transition().attr("opacity","1")}function xP(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 tp(t,e,r,a){t.call(_P,e).call(wP,e,r,a)}function _P(t,e){var r=Rr.ensureSingle(t,"rect",Ye.itemRectClassName,function(a){a.attr({rx:Ye.rx,ry:Ye.ry,"shape-rendering":"crispEdges"})});r.call(wl.stroke,e.bordercolor).call(wl.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function wP(t,e,r,a){var i=Rr.ensureSingle(t,"text",Ye.itemTextClassName,function(l){l.attr({"text-anchor":"start","data-notex":1})}),n=r.label,o=a._fullLayout._meta;o&&(n=Rr.templateString(n,o)),i.call(io.font,e.font).text(n).call(Cf.convertToTspans,a)}function Qg(t,e){var r=e.active;t.each(function(a,i){var n=ao.select(this);i===r&&e.showactive&&n.select("rect."+Ye.itemRectClassName).call(wl.fill,Ye.activeColor)})}function tT(t){t.select("rect."+Ye.itemRectClassName).call(wl.fill,Ye.hoverColor)}function rT(t,e){t.select("rect."+Ye.itemRectClassName).call(wl.fill,e.bgcolor)}function TP(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=io.tester.selectAll("g."+Ye.dropdownButtonClassName).data(Rr.filterVisible(e.buttons));a.enter().append("g").classed(Ye.dropdownButtonClassName,!0);var i=["up","down"].indexOf(e.direction)!==-1;a.each(function(c,v){var u=ao.select(this);u.call(tp,e,c,t);var d=u.select("."+Ye.itemTextClassName),h=d.node()&&io.bBox(d.node()).width,p=Math.max(h+Ye.textPadX,Ye.minWidth),g=e.font.size*Qw,_=Cf.lineCount(d),b=Math.max(g*_,Ye.minHeight)+Ye.textOffsetY;b=Math.ceil(b),p=Math.ceil(p),r.widths[v]=p,r.heights[v]=b,r.height1=Math.max(r.height1,b),r.width1=Math.max(r.width1,p),i?(r.totalWidth=Math.max(r.totalWidth,p),r.openWidth=r.totalWidth,r.totalHeight+=b+Ye.gapButton,r.openHeight+=b+Ye.gapButton):(r.totalWidth+=p+Ye.gapButton,r.openWidth+=p+Ye.gapButton,r.totalHeight=Math.max(r.totalHeight,b),r.openHeight=r.totalHeight)}),i?r.totalHeight-=Ye.gapButton:r.totalWidth-=Ye.gapButton,r.headerWidth=r.width1+Ye.arrowPadX,r.headerHeight=r.height1,e.type==="dropdown"&&(i?(r.width1+=Ye.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=Ye.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";Rr.isRightAnchor(e)&&(r.lx-=n,s="right"),Rr.isCenterAnchor(e)&&(r.lx-=n/2,s="center");var f="top";Rr.isBottomAnchor(e)&&(r.ly-=o,f="bottom"),Rr.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),_l.autoMargin(t,aT(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 aT(t){return Ye.autoMarginIdRoot+t._index}function iT(t,e,r,a){a=a||{};var i=t.select("."+Ye.itemRectClassName),n=t.select("."+Ye.itemTextClassName),o=e.borderwidth,l=r.index,s=e._dims;io.setTranslate(t,o+r.x,o+r.y);var f=["up","down"].indexOf(e.direction)!==-1,c=a.height||(f?s.heights[l]:s.height1);i.attr({x:0,y:0,width:a.width||(f?s.width1:s.widths[l]),height:c});var v=e.font.size*Qw,u=Cf.lineCount(n),d=(u-1)*v/2;Cf.positionText(n,Ye.textOffsetX,c/2-d+Ye.textOffsetY),f?r.y+=s.heights[l]+r.yPad:r.x+=s.widths[l]+r.xPad,r.index++}function gd(t,e){t.attr(Ye.menuIndexAttrName,e||"-1").selectAll("g."+Ye.dropdownButtonClassName).remove()}var kP=ep,AP={moduleType:"component",name:kP.name,layoutAttributes:Ww,supplyLayoutDefaults:cP,draw:mP},bc={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0},Jg=dr,MP=qd,SP=Bt.extendDeepAll,LP=gi.overrideAll,CP=Yf,nT=Mt.templatedArray,Ri=bc,DP=nT("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(" ")}}),oT=LP(nT("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:DP,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:SP(MP({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:CP.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:Jg({description:"Sets the font of the current value label text."})},font:Jg({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:Ri.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:Ri.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:Ri.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:Ri.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:Ri.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:Ri.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:Ri.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root"),Hn=de.exports,lT=Va,sT=oT,$P=bc,EP=$P.name,RP=sT.steps,PP=function(e,r){lT(e,r,{name:EP,handleItemDefaults:zP})};function zP(t,e,r){function a(v,u){return Hn.coerce(t,e,sT,v,u)}for(var i=lT(t,e,{name:"steps",handleItemDefaults:IP}),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=Hn.filterVisible(i),f=a("active");(i[f]||{}).visible||(e.active=s[0]._index),a("x"),a("y"),Hn.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"),Hn.coerceFont(a,"font",r.font);var c=a("currentvalue.visible");c&&(a("currentvalue.xanchor"),a("currentvalue.prefix"),a("currentvalue.suffix"),a("currentvalue.offset"),Hn.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 IP(t,e){function r(n,o){return Hn.coerce(t,e,RP,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 la=tt.exports,Df=Ut.exports,di=Je.exports,ca=Tt.exports,Pr=de.exports,NP=Pr.strTranslate,nl=ir,FP=Mt.arrayEditor,ot=bc,rp=Lr,fT=rp.LINE_SPACING,Zu=rp.FROM_TL,Ku=rp.FROM_BR,HP=function(e){var r=e._fullLayout,a=OP(r,e),i=r._infolayer.selectAll("g."+ot.containerClassName).data(a.length>0?[0]:[]);i.enter().append("g").classed(ot.containerClassName,!0).style("cursor","ew-resize");function n(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),Df.autoMargin(e,cT(f))}if(i.exit().each(function(){la.select(this).selectAll("g."+ot.groupClassName).each(n)}).remove(),a.length!==0){var o=i.selectAll("g."+ot.groupClassName).data(a,BP);o.enter().append("g").classed(ot.groupClassName,!0),o.exit().each(n).remove();for(var l=0;l<a.length;l++){var s=a[l];jP(e,s)}o.each(function(f){var c=la.select(this);XP(f),Df.manageCommandObserver(e,f,f._visibleSteps,function(v){var u=c.data()[0];u.active!==v.index&&(u._dragging||vT(e,c,u,v.index,!1,!0))}),GP(e,la.select(this),f)})}};function cT(t){return ot.autoMarginIdRoot+t._index}function OP(t,e){for(var r=t[ot.name],a=[],i=0;i<r.length;i++){var n=r[i];!n.visible||(n._gd=e,a.push(n))}return a}function BP(t){return t._index}function jP(t,e){var r=ca.tester.selectAll("g."+ot.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(ot.labelGroupClass,!0);var a=0,i=0;r.each(function(h){var p=la.select(this),g=uT(p,{step:h},e),_=g.node();if(_){var b=ca.bBox(_);i=Math.max(i,b.height),a=Math.max(a,b.width)}}),r.remove();var n=e._dims={};n.inputAreaWidth=Math.max(ot.railWidth,ot.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*ot.stepInset,s=l/(e._stepCount-1),f=a+ot.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=ca.tester.append("g");r.each(function(h){var p=$f(c,e,h.label),g=p.node()&&ca.bBox(p.node())||{width:0,height:0},_=nl.lineCount(p);n.currentValueMaxWidth=Math.max(n.currentValueMaxWidth,Math.ceil(g.width)),n.currentValueHeight=Math.max(n.currentValueHeight,Math.ceil(g.height)),n.currentValueMaxLines=Math.max(n.currentValueMaxLines,_)}),n.currentValueTotalHeight=n.currentValueHeight+e.currentvalue.offset,c.remove()}n.height=n.currentValueTotalHeight+ot.tickOffset+e.ticklen+ot.labelOffset+n.labelHeight+e.pad.t+e.pad.b;var v="left";Pr.isRightAnchor(e)&&(n.lx-=n.outerLength,v="right"),Pr.isCenterAnchor(e)&&(n.lx-=n.outerLength/2,v="center");var u="top";Pr.isBottomAnchor(e)&&(n.ly-=n.height,u="bottom"),Pr.isMiddleAnchor(e)&&(n.ly-=n.height/2,u="middle"),n.outerLength=Math.ceil(n.outerLength),n.height=Math.ceil(n.height),n.lx=Math.round(n.lx),n.ly=Math.round(n.ly);var d={y:e.y,b:n.height*Ku[u],t:n.height*Zu[u]};e.lenmode==="fraction"?(d.l=0,d.xl=e.x-e.len*Zu[v],d.r=0,d.xr=e.x+e.len*Ku[v]):(d.x=e.x,d.l=n.outerLength*Zu[v],d.r=n.outerLength*Ku[v]),Df.autoMargin(t,cT(e),d)}function GP(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call($f,r).call(WP,r).call(VP,r).call(qP,r).call(YP,t,r).call(UP,t,r);var a=r._dims;ca.setTranslate(e,a.lx+r.pad.l,a.ly+r.pad.t),e.call(hT,r,!1),e.call($f,r)}function $f(t,e,r){if(!!e.currentvalue.visible){var a=e._dims,i,n;switch(e.currentvalue.xanchor){case"right":i=a.inputAreaLength-ot.currentValueInset-a.currentValueMaxWidth,n="left";break;case"center":i=a.inputAreaLength*.5,n="middle";break;default:i=ot.currentValueInset,n="left"}var o=Pr.ensureSingle(t,"text",ot.labelClass,function(u){u.attr({"text-anchor":n,"data-notex":1})}),l=e.currentvalue.prefix?e.currentvalue.prefix:"";if(typeof r=="string")l+=r;else{var s=e.steps[e.active].label,f=e._gd._fullLayout._meta;f&&(s=Pr.templateString(s,f)),l+=s}e.currentvalue.suffix&&(l+=e.currentvalue.suffix),o.call(ca.font,e.currentvalue.font).text(l).call(nl.convertToTspans,e._gd);var c=nl.lineCount(o),v=(a.currentValueMaxLines+1-c)*e.currentvalue.font.size*fT;return nl.positionText(o,i,v),o}}function UP(t,e,r){var a=Pr.ensureSingle(t,"rect",ot.gripRectClass,function(i){i.call(dT,e,t,r).style("pointer-events","all")});a.attr({width:ot.gripWidth,height:ot.gripHeight,rx:ot.gripRadius,ry:ot.gripRadius}).call(di.stroke,r.bordercolor).call(di.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function uT(t,e,r){var a=Pr.ensureSingle(t,"text",ot.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),i=e.step.label,n=r._gd._fullLayout._meta;return n&&(i=Pr.templateString(i,n)),a.call(ca.font,r.font).text(i).call(nl.convertToTspans,r._gd),a}function VP(t,e){var r=Pr.ensureSingle(t,"g",ot.labelsClass),a=e._dims,i=r.selectAll("g."+ot.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(ot.labelGroupClass,!0),i.exit().remove(),i.each(function(n){var o=la.select(this);o.call(uT,n,e),ca.setTranslate(o,ap(e,n.fraction),ot.tickOffset+e.ticklen+e.font.size*fT+ot.labelOffset+a.currentValueTotalHeight)})}function e0(t,e,r,a,i){var n=Math.round(a*(r._stepCount-1)),o=r._visibleSteps[n]._index;o!==r.active&&vT(t,e,r,o,!0,i)}function vT(t,e,r,a,i,n){var o=r.active;r.active=a,FP(t.layout,ot.name,r).applyUpdate("active",a);var l=r.steps[r.active];e.call(hT,r,n),e.call($f,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&&Df.executeAPICommand(t,s.method,s.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function dT(t,e,r){var a=r.node(),i=la.select(e);function n(){return r.data()[0]}function o(){var l=n();e.emit("plotly_sliderstart",{slider:l});var s=r.select("."+ot.gripRectClass);la.event.stopPropagation(),la.event.preventDefault(),s.call(di.fill,l.activebgcolor);var f=t0(l,la.mouse(a)[0]);e0(e,r,l,f,!0),l._dragging=!0;function c(){var u=n(),d=t0(u,la.mouse(a)[0]);e0(e,r,u,d,!1)}i.on("mousemove",c),i.on("touchmove",c);function v(){var u=n();u._dragging=!1,s.call(di.fill,u.bgcolor),i.on("mouseup",null),i.on("mousemove",null),i.on("touchend",null),i.on("touchmove",null),e.emit("plotly_sliderend",{slider:u,step:u.steps[u.active]})}i.on("mouseup",v),i.on("touchend",v)}t.on("mousedown",o),t.on("touchstart",o)}function qP(t,e){var r=t.selectAll("rect."+ot.tickRectClass).data(e._visibleSteps),a=e._dims;r.enter().append("rect").classed(ot.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=la.select(this);l.attr({height:o?e.ticklen:e.minorticklen}).call(di.fill,e.tickcolor),ca.setTranslate(l,ap(e,n/(e._stepCount-1))-.5*e.tickwidth,(o?ot.tickOffset:ot.minorTickOffset)+a.currentValueTotalHeight)})}function XP(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 hT(t,e,r){for(var a=t.select("rect."+ot.gripRectClass),i=0,n=0;n<e._stepCount;n++)if(e._visibleSteps[n]._index===e.active){i=n;break}var o=ap(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",NP(o-ot.gripWidth*.5,e._dims.currentValueTotalHeight))}}function ap(t,e){var r=t._dims;return r.inputAreaStart+ot.stepInset+(r.inputAreaLength-2*ot.stepInset)*Math.min(1,Math.max(0,e))}function t0(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-ot.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*ot.stepInset-2*r.inputAreaStart)))}function YP(t,e,r){var a=r._dims,i=Pr.ensureSingle(t,"rect",ot.railTouchRectClass,function(n){n.call(dT,e,t,r).style("pointer-events","all")});i.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,ot.tickOffset+r.ticklen+a.labelHeight)}).call(di.fill,r.bgcolor).attr("opacity",0),ca.setTranslate(i,0,a.currentValueTotalHeight)}function WP(t,e){var r=e._dims,a=r.inputAreaLength-ot.railInset*2,i=Pr.ensureSingle(t,"rect",ot.railRectClass);i.attr({width:a,height:ot.railWidth,rx:ot.railRadius,ry:ot.railRadius,"shape-rendering":"crispEdges"}).call(di.stroke,e.bordercolor).call(di.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),ca.setTranslate(i,ot.railInset,(r.inputAreaWidth-ot.railWidth)*.5+r.currentValueTotalHeight)}var ZP=bc,KP={moduleType:"component",name:ZP.name,layoutAttributes:oT,supplyLayoutDefaults:PP,draw:HP},r0=hr,ip={bgcolor:{valType:"color",dflt:r0.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:r0.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"},pT={_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"},xc={},np={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},QP=Vt,JP=ir,mT=np,ez=Lr.LINE_SPACING,Ef=mT.name;function yT(t){var e=t&&t[Ef];return e&&e.visible}xc.isVisible=yT;xc.makeData=function(t){var e=QP.list({_fullLayout:t},"x",!0),r=t.margin,a=[];if(!t._has("gl2d"))for(var i=0;i<e.length;i++){var n=e[i];if(yT(n)){a.push(n);var o=n[Ef];o._id=Ef+n._id,o._height=(t.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}t._rangeSliderData=a};xc.autoMarginOpts=function(t,e){var r=t._fullLayout,a=e[Ef],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(JP.BR_TAG_ALL)||[]).length;o+=l*e.title.font.size*ez}return{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:a._height+n+Math.max(r.margin.b,o),pad:mT.extraPad+a._offsetShift*2}};var Qu,a0;function tz(){if(a0)return Qu;a0=1;var t=de.exports,e=Mt,r=Vt,a=ip,i=pT;return Qu=function(o,l,s){var f=o[s],c=l[s];if(!(f.rangeslider||l._requestRangeslider[c._id]))return;t.isPlainObject(f.rangeslider)||(f.rangeslider={});var v=f.rangeslider,u=e.newContainer(c,"rangeslider");function d(A,$){return t.coerce(v,u,a,A,$)}var h,p;function g(A,$){return t.coerce(h,p,i,A,$)}var _=d("visible");if(!!_){d("bgcolor",l.plot_bgcolor),d("bordercolor"),d("borderwidth"),d("thickness"),d("autorange",!c.isValidRange(v.range)),d("range");var b=l._subplots;if(b)for(var w=b.cartesian.filter(function(A){return A.substr(0,A.indexOf("y"))===r.name2id(s)}).map(function(A){return A.substr(A.indexOf("y"),A.length)}),m=t.simpleMap(w,r.id2name),y=0;y<m.length;y++){var x=m[y];h=v[x]||{},p=e.newContainer(u,x,"yaxis");var T=l[x],k;h.range&&T.isValidRange(h.range)&&(k="fixed");var S=g("rangemode",k);S!=="match"&&g("range",T.range.slice())}u._input=v}},Qu}var Ju,i0;function rz(){if(i0)return Ju;i0=1;var t=Vt.list,e=Il.getAutoRange,r=np;return Ju=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))}},Ju}var ev,n0;function az(){if(n0)return ev;n0=1;var t=tt.exports,e=Ve,r=Ut.exports,a=de.exports,i=a.strTranslate,n=Tt.exports,o=Je.exports,l=rc,s=Yt,f=Vt,c=ha.exports,v=xi,u=np;ev=function(T){for(var k=T._fullLayout,S=k._rangeSliderData,A=0;A<S.length;A++){var $=S[A][u.name];$._clipId=$._id+"-"+k._uid}function M(E){return E._name}var C=k._infolayer.selectAll("g."+u.containerClassName).data(S,M);C.exit().each(function(E){var I=E[u.name];k._topdefs.select("#"+I._clipId).remove()}).remove(),S.length!==0&&(C.enter().append("g").classed(u.containerClassName,!0).attr("pointer-events","all"),C.each(function(E){var I=t.select(this),P=E[u.name],R=k[f.id2name(E.anchor)],L=P[f.id2name(E.anchor)];if(P.range){var D=a.simpleMap(P.range,E.r2l),z=a.simpleMap(E.range,E.r2l),F;z[0]<z[1]?F=[Math.min(D[0],z[0]),Math.max(D[1],z[1])]:F=[Math.max(D[0],z[0]),Math.min(D[1],z[1])],P.range=P._input.range=a.simpleMap(F,E.l2r)}E.cleanRange("rangeslider.range");var H=k._size,U=E.domain;P._width=H.w*(U[1]-U[0]);var B=Math.round(H.l+H.w*U[0]),X=Math.round(H.t+H.h*(1-E._counterDomainMin)+(E.side==="bottom"?E._depth:0)+P._offsetShift+u.extraPad);I.attr("transform",i(B,X)),P._rl=a.simpleMap(P.range,E.r2l);var O=P._rl[0],Y=P._rl[1],W=Y-O;if(P.p2d=function(ke){return ke/P._width*W+O},P.d2p=function(ke){return(ke-O)/W*P._width},E.rangebreaks){var K=E.locateBreaks(O,Y);if(K.length){var Z,ae,ne=0;for(Z=0;Z<K.length;Z++)ae=K[Z],ne+=ae.max-ae.min;var oe=P._width/(Y-O-ne),re=[-oe*O];for(Z=0;Z<K.length;Z++)ae=K[Z],re.push(re[re.length-1]-oe*(ae.max-ae.min));for(P.d2p=function(ke){for(var ze=re[0],he=0;he<K.length;he++){var te=K[he];if(ke>=te.max)ze=re[he+1];else if(ke<te.min)break}return ze+oe*ke},Z=0;Z<K.length;Z++)ae=K[Z],ae.pmin=P.d2p(ae.min),ae.pmax=P.d2p(ae.max);P.p2d=function(ke){for(var ze=re[0],he=0;he<K.length;he++){var te=K[he];if(ke>=te.pmax)ze=re[he+1];else if(ke<te.pmin)break}return(ke-ze)/oe}}}if(L.rangemode!=="match"){var se=R.r2l(L.range[0]),me=R.r2l(L.range[1]),Re=me-se;P.d2pOppAxis=function(ke){return(ke-se)/Re*P._height}}I.call(g,T,E,P).call(_,T,E,P).call(b,T,E,P).call(m,T,E,P,L).call(y,T,E,P).call(x,T,E,P),d(I,T,E,P),p(I,T,E,P,R,L),E.side==="bottom"&&l.draw(T,E._id+"title",{propContainer:E,propName:E._name+".title",placeholder:k._dfltTitle.x,attributes:{x:E._offset+E._length/2,y:X+P._height+P._offsetShift+10+1.5*E.title.font.size,"text-anchor":"middle"}})}))};function d(T,k,S,A){if(k._context.staticPlot)return;var $=T.select("rect."+u.slideBoxClassName).node(),M=T.select("rect."+u.grabAreaMinClassName).node(),C=T.select("rect."+u.grabAreaMaxClassName).node();function E(){var I=t.event,P=I.target,R=I.clientX||I.touches[0].clientX,L=R-T.node().getBoundingClientRect().left,D=A.d2p(S._rl[0]),z=A.d2p(S._rl[1]),F=c.coverSlip();this.addEventListener("touchmove",H),this.addEventListener("touchend",U),F.addEventListener("mousemove",H),F.addEventListener("mouseup",U);function H(B){var X=B.clientX||B.touches[0].clientX,O=+X-R,Y,W,K;switch(P){case $:K="ew-resize",Y=D+O,W=z+O;break;case M:K="col-resize",Y=D+O,W=z;break;case C:K="col-resize",Y=D,W=z+O;break;default:K="ew-resize",Y=L,W=L+O;break}if(W<Y){var Z=W;W=Y,Y=Z}A._pixelMin=Y,A._pixelMax=W,v(t.select(F),K),h(T,k,S,A)}function U(){F.removeEventListener("mousemove",H),F.removeEventListener("mouseup",U),this.removeEventListener("touchmove",H),this.removeEventListener("touchend",U),a.removeElement(F)}}T.on("mousedown",E),T.on("touchstart",E)}function h(T,k,S,A){function $(E){return S.l2r(a.constrain(E,A._rl[0],A._rl[1]))}var M=$(A.p2d(A._pixelMin)),C=$(A.p2d(A._pixelMax));window.requestAnimationFrame(function(){e.call("_guiRelayout",k,S._name+".range",[M,C])})}function p(T,k,S,A,$,M){var C=u.handleWidth/2;function E(B){return a.constrain(B,0,A._width)}function I(B){return a.constrain(B,0,A._height)}function P(B){return a.constrain(B,-C,A._width+C)}var R=E(A.d2p(S._rl[0])),L=E(A.d2p(S._rl[1]));if(T.select("rect."+u.slideBoxClassName).attr("x",R).attr("width",L-R),T.select("rect."+u.maskMinClassName).attr("width",R),T.select("rect."+u.maskMaxClassName).attr("x",L).attr("width",A._width-L),M.rangemode!=="match"){var D=A._height-I(A.d2pOppAxis($._rl[1])),z=A._height-I(A.d2pOppAxis($._rl[0]));T.select("rect."+u.maskMinOppAxisClassName).attr("x",R).attr("height",D).attr("width",L-R),T.select("rect."+u.maskMaxOppAxisClassName).attr("x",R).attr("y",z).attr("height",A._height-z).attr("width",L-R),T.select("rect."+u.slideBoxClassName).attr("y",D).attr("height",z-D)}var F=.5,H=Math.round(P(R-C))-F,U=Math.round(P(L-C))+F;T.select("g."+u.grabberMinClassName).attr("transform",i(H,F)),T.select("g."+u.grabberMaxClassName).attr("transform",i(U,F))}function g(T,k,S,A){var $=a.ensureSingle(T,"rect",u.bgClassName,function(I){I.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),M=A.borderwidth%2===0?A.borderwidth:A.borderwidth-1,C=-A._offsetShift,E=n.crispRound(k,A.borderwidth);$.attr({width:A._width+M,height:A._height+M,transform:i(C,C),fill:A.bgcolor,stroke:A.bordercolor,"stroke-width":E})}function _(T,k,S,A){var $=k._fullLayout,M=a.ensureSingleById($._topdefs,"clipPath",A._clipId,function(C){C.append("rect").attr({x:0,y:0})});M.select("rect").attr({width:A._width,height:A._height})}function b(T,k,S,A){var $=k.calcdata,M=T.selectAll("g."+u.rangePlotClassName).data(S._subplotsWith,a.identity);M.enter().append("g").attr("class",function(E){return u.rangePlotClassName+" "+E}).call(n.setClipUrl,A._clipId,k),M.order(),M.exit().remove();var C;M.each(function(E,I){var P=t.select(this),R=I===0,L=f.getFromId(k,E,"y"),D=L._name,z=A[D],F={data:[],layout:{xaxis:{type:S.type,domain:[0,1],range:A.range.slice(),calendar:S.calendar},width:A._width,height:A._height,margin:{t:0,b:0,l:0,r:0}},_context:k._context};S.rangebreaks&&(F.layout.xaxis.rangebreaks=S.rangebreaks),F.layout[D]={type:L.type,domain:[0,1],range:z.rangemode!=="match"?z.range.slice():L.range.slice(),calendar:L.calendar},L.rangebreaks&&(F.layout[D].rangebreaks=L.rangebreaks),r.supplyDefaults(F);var H=F._fullLayout.xaxis,U=F._fullLayout[D];H.clearCalc(),H.setScale(),U.clearCalc(),U.setScale();var B={id:E,plotgroup:P,xaxis:H,yaxis:U,isRangePlot:!0};R?C=B:(B.mainplot="xy",B.mainplotinfo=C),s.rangePlot(k,B,w($,E))})}function w(T,k){for(var S=[],A=0;A<T.length;A++){var $=T[A],M=$[0].trace;M.xaxis+M.yaxis===k&&S.push($)}return S}function m(T,k,S,A,$){var M=a.ensureSingle(T,"rect",u.maskMinClassName,function(P){P.attr({x:0,y:0,"shape-rendering":"crispEdges"})});M.attr("height",A._height).call(o.fill,u.maskColor);var C=a.ensureSingle(T,"rect",u.maskMaxClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});if(C.attr("height",A._height).call(o.fill,u.maskColor),$.rangemode!=="match"){var E=a.ensureSingle(T,"rect",u.maskMinOppAxisClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});E.attr("width",A._width).call(o.fill,u.maskOppAxisColor);var I=a.ensureSingle(T,"rect",u.maskMaxOppAxisClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});I.attr("width",A._width).style("border-top",u.maskOppBorder).call(o.fill,u.maskOppAxisColor)}}function y(T,k,S,A){if(!k._context.staticPlot){var $=a.ensureSingle(T,"rect",u.slideBoxClassName,function(M){M.attr({y:0,cursor:u.slideBoxCursor,"shape-rendering":"crispEdges"})});$.attr({height:A._height,fill:u.slideBoxFill})}}function x(T,k,S,A){var $=a.ensureSingle(T,"g",u.grabberMinClassName),M=a.ensureSingle(T,"g",u.grabberMaxClassName),C={x:0,width:u.handleWidth,rx:u.handleRadius,fill:o.background,stroke:o.defaultLine,"stroke-width":u.handleStrokeWidth,"shape-rendering":"crispEdges"},E={y:Math.round(A._height/4),height:Math.round(A._height/2)},I=a.ensureSingle($,"rect",u.handleMinClassName,function(z){z.attr(C)});I.attr(E);var P=a.ensureSingle(M,"rect",u.handleMaxClassName,function(z){z.attr(C)});P.attr(E);var R={width:u.grabAreaWidth,x:0,y:0,fill:u.grabAreaFill,cursor:k._context.staticPlot?void 0:u.grabAreaCursor},L=a.ensureSingle($,"rect",u.grabAreaMinClassName,function(z){z.attr(R)});L.attr("height",A._height);var D=a.ensureSingle(M,"rect",u.grabAreaMaxClassName,function(z){z.attr(R)});D.attr("height",A._height)}return ev}var iz=de.exports,nz=ip,oz=pT,tv=xc,lz={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:iz.extendFlat({},nz,{yaxis:oz})}}},layoutAttributes:ip,handleDefaults:tz(),calcAutorange:rz(),draw:az(),isVisible:tv.isVisible,makeData:tv.makeData,autoMarginOpts:tv.autoMarginOpts},sz=dr,o0=hr,fz=Mt.templatedArray,cz=fz("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(" ")}),bd={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:cz,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:sz({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:o0.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:o0.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"},gT={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10},ef=de.exports,uz=Je.exports,vz=Mt,dz=Va,bT=bd,xd=gT,hz=function(e,r,a,i,n){var o=e.rangeselector||{},l=vz.newContainer(r,"rangeselector");function s(d,h){return ef.coerce(o,l,bT,d,h)}var f=dz(o,l,{name:"buttons",handleItemDefaults:pz,calendar:n}),c=s("visible",f.length>0);if(c){var v=mz(r,a,i);s("x",v[0]),s("y",v[1]),ef.noneOrAll(e,r,["x","y"]),s("xanchor"),s("yanchor"),ef.coerceFont(s,"font",a.font);var u=s("bgcolor");s("activecolor",uz.contrast(u,xd.lightAmount,xd.darkAmount)),s("bordercolor"),s("borderwidth")}};function pz(t,e,r,a){var i=a.calendar;function n(s,f){return ef.coerce(t,e,bT.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 mz(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+xd.yPad]}var yz=pk,gz=de.exports.titleCase,bz=function(e,r){var a=e._name,i={};if(r.step==="all")i[a+".autorange"]=!0;else{var n=xz(e,r);i[a+".range[0]"]=n[0],i[a+".range[1]"]=n[1]}return i};function xz(t,e){var r=t.range,a=new Date(t.r2l(r[1])),i=e.step,n=yz["utc"+gz(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 Rf=tt.exports,_z=Ve,wz=Ut.exports,l0=Je.exports,xT=Tt.exports,Oa=de.exports,s0=Oa.strTranslate,tf=ir,Tz=Vt,op=Lr,f0=op.LINE_SPACING,c0=op.FROM_TL,u0=op.FROM_BR,_d=gT,kz=bz,Az=function(e){var r=e._fullLayout,a=r._infolayer.selectAll(".rangeselector").data(Mz(e),Sz);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(i){var n=Rf.select(this),o=i,l=o.rangeselector,s=n.selectAll("g.button").data(Oa.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(f){var c=Rf.select(this),v=kz(o,f);f._isActive=Lz(o,f,v),c.call(rv,l,f),c.call(Dz,l,f,e),c.on("click",function(){e._dragged||_z.call("_guiRelayout",e,v)}),c.on("mouseover",function(){f._isHovered=!0,c.call(rv,l,f)}),c.on("mouseout",function(){f._isHovered=!1,c.call(rv,l,f)})}),Ez(e,s,l,o._name,n)})};function Mz(t){for(var e=Tz.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 Sz(t){return t._id}function Lz(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 rv(t,e,r){var a=Oa.ensureSingle(t,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});a.attr({rx:_d.rx,ry:_d.ry}),a.call(l0.stroke,e.bordercolor).call(l0.fill,Cz(e,r)).style("stroke-width",e.borderwidth+"px")}function Cz(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}function Dz(t,e,r,a){function i(o){tf.convertToTspans(o,a)}var n=Oa.ensureSingle(t,"text","selector-text",function(o){o.attr("text-anchor","middle")});n.call(xT.font,e.font).text($z(r,a._fullLayout._meta)).call(i)}function $z(t,e){return t.label?e?Oa.templateString(t.label,e):t.label:t.step==="all"?"all":t.count+t.step.charAt(0)}function Ez(t,e,r,a,i){var n=0,o=0,l=r.borderwidth;e.each(function(){var d=Rf.select(this),h=d.select(".selector-text"),p=r.font.size*f0,g=Math.max(p*tf.lineCount(h),16)+3;o=Math.max(o,g)}),e.each(function(){var d=Rf.select(this),h=d.select(".selector-rect"),p=d.select(".selector-text"),g=p.node()&&xT.bBox(p.node()).width,_=r.font.size*f0,b=tf.lineCount(p),w=Math.max(g+10,_d.minButtonWidth);d.attr("transform",s0(l+n,l)),h.attr({x:0,y:0,width:w,height:o}),tf.positionText(p,w/2,o/2-(b-1)*_/2+3),n+=w+5});var s=t._fullLayout._size,f=s.l+s.w*r.x,c=s.t+s.h*(1-r.y),v="left";Oa.isRightAnchor(r)&&(f-=n,v="right"),Oa.isCenterAnchor(r)&&(f-=n/2,v="center");var u="top";Oa.isBottomAnchor(r)&&(c-=o,u="bottom"),Oa.isMiddleAnchor(r)&&(c-=o/2,u="middle"),n=Math.ceil(n),o=Math.ceil(o),f=Math.round(f),c=Math.round(c),wz.autoMargin(t,a+"-range-selector",{x:r.x,y:r.y,l:n*c0[v],r:n*u0[v],b:o*u0[u],t:o*c0[u]}),i.attr("transform",s0(f,c))}var Rz={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:bd}}},layoutAttributes:bd,handleDefaults:hz,draw:Az},_i={},v0=Bt.extendFlat;_i.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:v0({},r,{description:["Sets the horizontal domain of this ",a,i,"(in plot fraction).",n].join("")}),y:v0({},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};_i.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 Pz=de.exports,zz=co.counter,Iz=_i.attributes,d0=pr.idRegex,Nz=Mt,wd={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:[zz("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:[d0.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:[d0.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:Iz({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 Pf(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 Fz(t,e){var r=t.grid||{},a=Pf(e,r,"x"),i=Pf(e,r,"y");if(!t.grid&&!a&&!i)return;var n=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(a),l=Array.isArray(i),s=o&&a!==r.xaxes&&l&&i!==r.yaxes,f,c;n?(f=r.subplots.length,c=r.subplots[0].length):(l&&(f=i.length),o&&(c=a.length));var v=Nz.newContainer(e,"grid");function u(x,T){return Pz.coerce(r,v,wd,x,T)}var d=u("rows",f),h=u("columns",c);if(!(d*h>1)){delete e.grid;return}if(!n&&!o&&!l){var p=u("pattern")==="independent";p&&(n=!0)}v._hasSubplotGrid=n;var g=u("roworder"),_=g==="top to bottom",b=n?.2:.1,w=n?.3:.1,m,y;s&&e._splomGridDflt&&(m=e._splomGridDflt.xside,y=e._splomGridDflt.yside),v._domains={x:h0("x",u,b,m,h),y:h0("y",u,w,y,d,_)}}function h0(t,e,r,a,i,n){var o=e(t+"gap",r),l=e("domain."+t);e(t+"side",a);for(var s=new Array(i),f=l[0],c=(l[1]-f)/(i-o),v=c*(1-o),u=0;u<i;u++){var d=f+c*u;s[n?i-1-u:u]=[d,d+v]}return s}function Hz(t,e){var r=e.grid;if(!(!r||!r._domains)){var a=t.grid||{},i=e._subplots,n=r._hasSubplotGrid,o=r.rows,l=r.columns,s=r.pattern==="independent",f,c,v,u,d,h,p,g=r._axisMap={};if(n){var _=a.subplots||[];h=r.subplots=new Array(o);var b=1;for(f=0;f<o;f++){var w=h[f]=new Array(l),m=_[f]||[];for(c=0;c<l;c++)if(s?(d=b===1?"xy":"x"+b+"y"+b,b++):d=m[c],w[c]="",i.cartesian.indexOf(d)!==-1){if(p=d.indexOf("y"),v=d.slice(0,p),u=d.slice(p),g[v]!==void 0&&g[v]!==c||g[u]!==void 0&&g[u]!==f)continue;w[c]=d,g[v]=c,g[u]=f}}}else{var y=Pf(e,a,"x"),x=Pf(e,a,"y");r.xaxes=p0(y,i.xaxis,l,g,"x"),r.yaxes=p0(x,i.yaxis,o,g,"y")}var T=r._anchors={},k=r.roworder==="top to bottom";for(var S in g){var A=S.charAt(0),$=r[A+"side"],M,C,E;if($.length<8)T[S]="free";else if(A==="x"){if($.charAt(0)==="t"===k?(M=0,C=1,E=o):(M=o-1,C=-1,E=-1),n){var I=g[S];for(f=M;f!==E;f+=C)if(d=h[f][I],!!d&&(p=d.indexOf("y"),d.slice(0,p)===S)){T[S]=d.slice(p);break}}else for(f=M;f!==E;f+=C)if(u=r.yaxes[f],i.cartesian.indexOf(S+u)!==-1){T[S]=u;break}}else if($.charAt(0)==="l"?(M=0,C=1,E=l):(M=l-1,C=-1,E=-1),n){var P=g[S];for(f=M;f!==E;f+=C)if(d=h[P][f],!!d&&(p=d.indexOf("y"),d.slice(p)===S)){T[S]=d.slice(0,p);break}}else for(f=M;f!==E;f+=C)if(v=r.xaxes[f],i.cartesian.indexOf(v+S)!==-1){T[S]=v;break}}}}function p0(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 Oz={moduleType:"component",name:"grid",schema:{layout:{grid:wd}},layoutAttributes:wd,sizeDefaults:Fz,contentDefaults:Hz},_T={visible:{valType:"boolean",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the square of the","underlying data.","If *data*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}},av,m0;function Bz(){if(m0)return av;m0=1;var t=lt,e=Ve,r=de.exports,a=Mt,i=_T;return av=function(n,o,l,s){var f="error_"+s.axis,c=a.newContainer(o,f),v=n[f]||{};function u(w,m){return r.coerce(v,c,i,w,m)}var d=v.array!==void 0||v.value!==void 0||v.type==="sqrt",h=u("visible",d);if(h!==!1){var p=u("type","array"in v?"data":"percent"),g=!0;p!=="sqrt"&&(g=u("symmetric",!((p==="data"?"arrayminus":"valueminus")in v))),p==="data"?(u("array"),u("traceref"),g||(u("arrayminus"),u("tracerefminus"))):(p==="percent"||p==="constant")&&(u("value"),g||u("valueminus"));var _="copy_"+s.inherit+"style";if(s.inherit){var b=o["error_"+s.inherit];(b||{}).visible&&u(_,!(v.color||t(v.thickness)||t(v.width)))}(!s.inherit||!c[_])&&(u("color",l),u("thickness"),u("width",e.traceIs(o,"gl3d")?0:4))}},av}var iv,y0;function wT(){if(y0)return iv;y0=1,iv=function(r){var a=r.type,i=r.symmetric;if(a==="data"){var n=r.array||[];if(i)return function(c,v){var u=+n[v];return[u,u]};var o=r.arrayminus||[];return function(c,v){var u=+n[v],d=+o[v];return!isNaN(u)||!isNaN(d)?[d||0,u||0]:[NaN,NaN]}}else{var l=t(a,r.value),s=t(a,r.valueminus);return i||r.valueminus===void 0?function(c){var v=l(c);return[v,v]}:function(c){return[s(c),l(c)]}}};function t(e,r){if(e==="percent")return function(a){return Math.abs(a*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(a){return Math.sqrt(Math.abs(a))}}return iv}var nv,g0;function jz(){if(g0)return nv;g0=1;var t=lt,e=Ve,r=Ct.exports,a=de.exports,i=wT();nv=function(l){for(var s=l.calcdata,f=0;f<s.length;f++){var c=s[f],v=c[0].trace;if(v.visible===!0&&e.traceIs(v,"errorBarsOK")){var u=r.getFromId(l,v.xaxis),d=r.getFromId(l,v.yaxis);n(c,v,u,"x"),n(c,v,d,"y")}}};function n(o,l,s,f){var c=l["error_"+f]||{},v=c.visible&&["linear","log"].indexOf(s.type)!==-1,u=[];if(!!v){for(var d=i(c),h=0;h<o.length;h++){var p=o[h],g=p.i;if(g===void 0)g=h;else if(g===null)continue;var _=p[f];if(!!t(s.c2l(_))){var b=d(_,g);if(t(b[0])&&t(b[1])){var w=p[f+"s"]=_-b[0],m=p[f+"h"]=_+b[1];u.push(w,m)}}}var y=s._id,x=l._extremes[y],T=r.findExtremes(s,u,a.extendFlat({tozero:x.opts.tozero},{padded:!0}));x.min=x.min.concat(T.min),x.max=x.max.concat(T.max)}}return nv}var ov,b0;function Gz(){if(b0)return ov;b0=1;var t=tt.exports,e=lt,r=Tt.exports,a=mr;ov=function(o,l,s,f){var c,v=s.xaxis,u=s.yaxis,d=f&&f.duration>0;l.each(function(h){var p=h[0].trace,g=p.error_x||{},_=p.error_y||{},b;p.ids&&(b=function(x){return x.id});var w=a.hasMarkers(p)&&p.marker.maxdisplayed>0;!_.visible&&!g.visible&&(h=[]);var m=t.select(this).selectAll("g.errorbar").data(h,b);if(m.exit().remove(),!!h.length){g.visible||m.selectAll("path.xerror").remove(),_.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var y=m.enter().append("g").classed("errorbar",!0);d&&y.style("opacity",0).transition().duration(f.duration).style("opacity",1),r.setClipUrl(m,s.layerClipId,o),m.each(function(x){var T=t.select(this),k=i(x,v,u);if(!(w&&!x.vis)){var S,A=T.select("path.yerror");if(_.visible&&e(k.x)&&e(k.yh)&&e(k.ys)){var $=_.width;S="M"+(k.x-$)+","+k.yh+"h"+2*$+"m-"+$+",0V"+k.ys,k.noYS||(S+="m-"+$+",0h"+2*$),c=!A.size(),c?A=T.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0):d&&(A=A.transition().duration(f.duration).ease(f.easing)),A.attr("d",S)}else A.remove();var M=T.select("path.xerror");if(g.visible&&e(k.y)&&e(k.xh)&&e(k.xs)){var C=(g.copy_ystyle?_:g).width;S="M"+k.xh+","+(k.y-C)+"v"+2*C+"m0,-"+C+"H"+k.xs,k.noXS||(S+="m0,-"+C+"v"+2*C),c=!M.size(),c?M=T.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):d&&(M=M.transition().duration(f.duration).ease(f.easing)),M.attr("d",S)}else M.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 ov}var lv,x0;function Uz(){if(x0)return lv;x0=1;var t=tt.exports,e=Je.exports;return lv=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)})},lv}var ol=de.exports,_0=gi.overrideAll,ll=_T,Ui={error_x:ol.extendFlat({},ll),error_y:ol.extendFlat({},ll)};delete Ui.error_x.copy_zstyle;delete Ui.error_y.copy_zstyle;delete Ui.error_y.copy_ystyle;var Bl={error_x:ol.extendFlat({},ll),error_y:ol.extendFlat({},ll),error_z:ol.extendFlat({},ll)};delete Bl.error_x.copy_ystyle;delete Bl.error_y.copy_ystyle;delete Bl.error_z.copy_ystyle;delete Bl.error_z.copy_zstyle;var Vz={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Ui,bar:Ui,histogram:Ui,scatter3d:_0(Bl,"calc","nested"),scattergl:_0(Ui,"calc","nested")}},supplyDefaults:Bz(),calc:jz(),makeComputeError:wT(),plot:Gz(),style:Uz(),hoverInfo:qz};function qz(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 Xz={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"}},ii=tt.exports,sv=Wr.exports,rf=Ut.exports,w0=Ve,za=Ct.exports,Cs=ha.exports,Vr=de.exports,ra=Vr.strTranslate,TT=Bt.extendFlat,fv=xi,ea=Tt.exports,cv=Je.exports,Yz=rc,Wz=ir,Zz=da.flipScale,Kz=Rw,Qz=Pw,Jz=Ua,lp=Lr,T0=lp.LINE_SPACING,k0=lp.FROM_TL,A0=lp.FROM_BR,zt=Xz.cn;function eI(t){var e=t._fullLayout,r=e._infolayer.selectAll("g."+zt.colorbar).data(tI(t),function(a){return a._id});r.enter().append("g").attr("class",function(a){return a._id}).classed(zt.colorbar,!0),r.each(function(a){var i=ii.select(this);Vr.ensureSingle(i,"rect",zt.cbbg),Vr.ensureSingle(i,"g",zt.cbfills),Vr.ensureSingle(i,"g",zt.cblines),Vr.ensureSingle(i,"g",zt.cbaxis,function(o){o.classed(zt.crisp,!0)}),Vr.ensureSingle(i,"g",zt.cbtitleunshift,function(o){o.append("g").classed(zt.cbtitle,!0)}),Vr.ensureSingle(i,"rect",zt.cboutline);var n=rI(i,a,t);n&&n.then&&(t._promises||[]).push(n),t._context.edits.colorbarPosition&&aI(i,a,t)}),r.exit().each(function(a){rf.autoMargin(t,a._id)}).remove(),r.order()}function tI(t){var e=t._fullLayout,r=t.calcdata,a=[],i,n,o,l;function s(w){return TT(w,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function f(){typeof l.calc=="function"?l.calc(t,o,i):(i._fillgradient=n.reversescale?Zz(n.colorscale):n.colorscale,i._zrange=[n[l.min],n[l.max]])}for(var c=0;c<r.length;c++){var v=r[c];o=v[0].trace;var u=o._module.colorbar;if(o.visible===!0&&u)for(var d=Array.isArray(u),h=d?u:[u],p=0;p<h.length;p++){l=h[p];var g=l.container;n=g?o[g]:o,n&&n.showscale&&(i=s(n.colorbar),i._id="cb"+o.uid+(d&&g?"-"+g:""),i._traceIndex=o.index,i._propPrefix=(g?g+".":"")+"colorbar.",i._meta=o._meta,f(),a.push(i))}}for(var _ in e._colorAxes)if(n=e[_],n.showscale){var b=e._colorAxes[_];i=s(n.colorbar),i._id="cb"+_,i._propPrefix=_+".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 rI(t,e,r){var a=e.orientation==="v",i=e.len,n=e.lenmode,o=e.thickness,l=e.thicknessmode,s=e.outlinewidth,f=e.borderwidth,c=e.bgcolor,v=e.xanchor,u=e.yanchor,d=e.xpad,h=e.ypad,p=e.x,g=a?e.y:1-e.y,_=r._fullLayout,b=_._size,w=e._fillcolor,m=e._line,y=e.title,x=y.side,T=e._zrange||ii.extent((typeof w=="function"?w:m.color).domain()),k=typeof m.color=="function"?m.color:function(){return m.color},S=typeof w=="function"?w:function(){return w},A=e._levels,$=iI(r,e,T),M=$.fill,C=$.line,E=Math.round(o*(l==="fraction"?a?b.w:b.h:1)),I=E/(a?b.w:b.h),P=Math.round(i*(n==="fraction"?a?b.h:b.w:1)),R=P/(a?b.h:b.w),L=Math.round(a?p*b.w+d:g*b.h+h),D={center:.5,right:1}[v]||0,z={top:1,middle:.5}[u]||0,F=a?p-D*I:g-z*I,H=a?g-z*R:p-D*R,U=Math.round(a?b.h*(1-H):b.w*H);e._lenFrac=R,e._thickFrac=I,e._uFrac=F,e._vFrac=H;var B=e._axis=nI(r,e,T);B.position=I+(a?p+d/b.w:g+h/b.h);var X=["top","bottom"].indexOf(x)!==-1;if(a&&X&&(B.title.side=x,B.titlex=p+d/b.w,B.titley=H+(y.side==="top"?R-h/b.h:h/b.h)),!a&&!X&&(B.title.side=x,B.titley=g+h/b.h,B.titlex=H+d/b.w),m.color&&e.tickmode==="auto"){B.tickmode="linear",B.tick0=A.start;var O=A.size,Y=Vr.constrain(P/50,4,15)+1,W=(T[1]-T[0])/((e.nticks||Y)*O);if(W>1){var K=Math.pow(10,Math.floor(Math.log(W)/Math.LN10));O*=K*Vr.roundUp(W/K,[2,5,10]),(Math.abs(A.start)/A.size+1e-6)%1<2e-6&&(B.tick0=0)}B.dtick=O}B.domain=a?[H+h/b.h,H+R-h/b.h]:[H+d/b.w,H+R-d/b.w],B.setScale(),t.attr("transform",ra(Math.round(b.l),Math.round(b.t)));var Z=t.select("."+zt.cbtitleunshift).attr("transform",ra(-Math.round(b.l),-Math.round(b.t))),ae=B.ticklabelposition,ne=B.title.font.size,oe=t.select("."+zt.cbaxis),re,se=0,me=0;function Re(ue,Le){var we={propContainer:B,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:_._dfltTitle.colorbar,containerGroup:t.select("."+zt.cbtitle)},Pe=ue.charAt(0)==="h"?ue.substr(1):"h"+ue;t.selectAll("."+Pe+",."+Pe+"-math-group").remove(),Yz.draw(r,ue,TT(we,Le||{}))}function ke(){if(a&&X||!a&&!X){var ue,Le;x==="top"&&(ue=d+b.l+b.w*p,Le=h+b.t+b.h*(1-H-R)+3+ne*.75),x==="bottom"&&(ue=d+b.l+b.w*p,Le=h+b.t+b.h*(1-H)-3-ne*.25),x==="right"&&(Le=h+b.t+b.h*g+3+ne*.75,ue=d+b.l+b.w*H),Re(B._id+"title",{attributes:{x:ue,y:Le,"text-anchor":a?"start":"middle"}})}}function ze(){if(a&&!X||!a&&X){var ue=B.position||0,Le=B._offset+B._length/2,we,Pe;if(x==="right")Pe=Le,we=b.l+b.w*ue+10+ne*(B.showticklabels?1:.5);else if(we=Le,x==="bottom"&&(Pe=b.t+b.h*ue+10+(ae.indexOf("inside")===-1?B.tickfont.size:0)+(B.ticks!=="intside"&&e.ticklen||0)),x==="top"){var Ee=y.text.split("<br>").length;Pe=b.t+b.h*ue+10-E-T0*ne*Ee}Re((a?"h":"v")+B._id+"title",{avoid:{selection:ii.select(r).selectAll("g."+B._id+"tick"),side:x,offsetTop:a?0:b.t,offsetLeft:a?b.l:0,maxShift:a?_.width:_.height},attributes:{x:we,y:Pe,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function he(){if(!a&&!X||a&&X){var ue=t.select("."+zt.cbtitle),Le=ue.select("text"),we=[-s/2,s/2],Pe=ue.select(".h"+B._id+"title-math-group").node(),Ee=15.6;Le.node()&&(Ee=parseInt(Le.node().style.fontSize,10)*T0);var Ce;if(Pe?(Ce=ea.bBox(Pe),me=Ce.width,se=Ce.height,se>Ee&&(we[1]-=(se-Ee)/2)):Le.node()&&!Le.classed(zt.jsPlaceholder)&&(Ce=ea.bBox(Le.node()),me=Ce.width,se=Ce.height),a){if(se){if(se+=5,x==="top")B.domain[1]-=se/b.h,we[1]*=-1;else{B.domain[0]+=se/b.h;var q=Wz.lineCount(Le);we[1]+=(1-q)*Ee}ue.attr("transform",ra(we[0],we[1])),B.setScale()}}else me&&(x==="right"&&(B.domain[0]+=(me+ne/2)/b.w),ue.attr("transform",ra(we[0],we[1])),B.setScale())}t.selectAll("."+zt.cbfills+",."+zt.cblines).attr("transform",a?ra(0,Math.round(b.h*(1-B.domain[1]))):ra(Math.round(b.w*B.domain[0]),0)),oe.attr("transform",a?ra(0,Math.round(-b.t)):ra(Math.round(-b.l),0));var pe=t.select("."+zt.cbfills).selectAll("rect."+zt.cbfill).attr("style","").data(M);pe.enter().append("rect").classed(zt.cbfill,!0).style("stroke","none"),pe.exit().remove();var ve=T.map(B.c2p).map(Math.round).sort(function(xe,be){return xe-be});pe.each(function(xe,be){var Ae=[be===0?T[0]:(M[be]+M[be-1])/2,be===M.length-1?T[1]:(M[be]+M[be+1])/2].map(B.c2p).map(Math.round);a&&(Ae[1]=Vr.constrain(Ae[1]+(Ae[1]>Ae[0])?1:-1,ve[0],ve[1]));var De=ii.select(this).attr(a?"x":"y",L).attr(a?"y":"x",ii.min(Ae)).attr(a?"width":"height",Math.max(E,2)).attr(a?"height":"width",Math.max(ii.max(Ae)-ii.min(Ae),2));if(e._fillgradient)ea.gradient(De,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var Oe=S(xe).replace("e-","");De.attr("fill",sv(Oe).toHexString())}});var ye=t.select("."+zt.cblines).selectAll("path."+zt.cbline).data(m.color&&m.width?C:[]);ye.enter().append("path").classed(zt.cbline,!0),ye.exit().remove(),ye.each(function(xe){var be=L,Ae=Math.round(B.c2p(xe))+m.width/2%1;ii.select(this).attr("d","M"+(a?be+","+Ae:Ae+","+be)+(a?"h":"v")+E).call(ea.lineGroupStyle,m.width,k(xe),m.dash)}),oe.selectAll("g."+B._id+"tick,path").remove();var le=L+E+(s||0)/2-(e.ticks==="outside"?1:0),fe=za.calcTicks(B),Te=za.getTickSigns(B)[2];return za.drawTicks(r,B,{vals:B.ticks==="inside"?za.clipEnds(B,fe):fe,layer:oe,path:za.makeTickPath(B,le,Te),transFn:za.makeTransTickFn(B)}),za.drawLabels(r,B,{vals:fe,layer:oe,transFn:za.makeTransTickLabelFn(B),labelFns:za.makeLabelFns(B,le)})}function te(){var ue,Le=E+s/2;ae.indexOf("inside")===-1&&(ue=ea.bBox(oe.node()),Le+=a?ue.width:ue.height),re=Z.select("text");var we=0,Pe=a&&x==="top",Ee=!a&&x==="right",Ce=0;if(re.node()&&!re.classed(zt.jsPlaceholder)){var q,pe=Z.select(".h"+B._id+"title-math-group").node();pe&&(a&&X||!a&&!X)?(ue=ea.bBox(pe),we=ue.width,q=ue.height):(ue=ea.bBox(Z.node()),we=ue.right-b.l-(a?L:U),q=ue.bottom-b.t-(a?U:L),!a&&x==="top"&&(Le+=ue.height,Ce=ue.height)),Ee&&(re.attr("transform",ra(we/2+ne/2,0)),we*=2),Le=Math.max(Le,a?we:q)}var ve=(a?d:h)*2+Le+f+s/2,ye=0;!a&&y.text&&u==="bottom"&&g<=0&&(ye=ve/2,ve+=ye,Ce+=ye),_._hColorbarMoveTitle=ye,_._hColorbarMoveCBTitle=Ce;var le=f+s;t.select("."+zt.cbbg).attr("x",(a?L:U)-le/2-(a?d:0)).attr("y",(a?U:L)-(a?P:h+Ce-ye)).attr(a?"width":"height",Math.max(ve-ye,2)).attr(a?"height":"width",Math.max(P+le,2)).call(cv.fill,c).call(cv.stroke,e.bordercolor).style("stroke-width",f);var fe=Ee?Math.max(we-10,0):0;if(t.selectAll("."+zt.cboutline).attr("x",(a?L:U+d)+fe).attr("y",(a?U+h-P:L)+(Pe?se:0)).attr(a?"width":"height",Math.max(E,2)).attr(a?"height":"width",Math.max(P-(a?2*h+se:2*d+fe),2)).call(cv.stroke,e.outlinecolor).style({fill:"none","stroke-width":s}),t.attr("transform",ra(b.l-(a?D*ve:0),b.t-(a?0:(1-z)*ve-Ce))),!a&&(f||sv(c).getAlpha()&&!sv.equals(_.paper_bgcolor,c))){var Te=oe.selectAll("text"),xe=Te[0].length,be=t.select("."+zt.cbbg).node(),Ae=ea.bBox(be),De=ea.getTranslate(t),Oe=2;Te.each(function(N,G){var j=0,V=xe-1;if(G===j||G===V){var ee=ea.bBox(this),Q=ea.getTranslate(this),ge;if(G===V){var _e=ee.right+Q.x,ce=Ae.right+De.x+U-f-Oe+p;ge=ce-_e,ge>0&&(ge=0)}else if(G===j){var ie=ee.left+Q.x,Me=Ae.left+De.x+U+f+Oe;ge=Me-ie,ge<0&&(ge=0)}ge&&(xe<3?this.setAttribute("transform","translate("+ge+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Fe={},st=k0[v],Xe=A0[v],ut=k0[u],Ke=A0[u],ft=ve-E;a?(n==="pixels"?(Fe.y=g,Fe.t=P*ut,Fe.b=P*Ke):(Fe.t=Fe.b=0,Fe.yt=g+i*ut,Fe.yb=g-i*Ke),l==="pixels"?(Fe.x=p,Fe.l=ve*st,Fe.r=ve*Xe):(Fe.l=ft*st,Fe.r=ft*Xe,Fe.xl=p-o*st,Fe.xr=p+o*Xe)):(n==="pixels"?(Fe.x=p,Fe.l=P*st,Fe.r=P*Xe):(Fe.l=Fe.r=0,Fe.xl=p+i*st,Fe.xr=p-i*Xe),l==="pixels"?(Fe.y=1-g,Fe.t=ve*ut,Fe.b=ve*Ke):(Fe.t=ft*ut,Fe.b=ft*Ke,Fe.yt=g-o*ut,Fe.yb=g+o*Ke)),rf.autoMargin(r,e._id,Fe)}return Vr.syncOrAsync([rf.previousPromises,ke,he,ze,rf.previousPromises,te],r)}function aI(t,e,r){var a=e.orientation==="v",i=r._fullLayout,n=i._size,o,l,s;Cs.init({element:t.node(),gd:r,prepFn:function(){o=t.attr("transform"),fv(t)},moveFn:function(f,c){t.attr("transform",o+ra(f,c)),l=Cs.align((a?e._uFrac:e._vFrac)+f/n.w,a?e._thickFrac:e._lenFrac,0,1,e.xanchor),s=Cs.align((a?e._vFrac:1-e._uFrac)-c/n.h,a?e._lenFrac:e._thickFrac,0,1,e.yanchor);var v=Cs.getCursor(l,s,e.xanchor,e.yanchor);fv(t,v)},doneFn:function(){if(fv(t),l!==void 0&&s!==void 0){var f={};f[e._propPrefix+"x"]=l,f[e._propPrefix+"y"]=s,e._traceIndex!==void 0?w0.call("_guiRestyle",r,f,e._traceIndex):w0.call("_guiRelayout",r,f)}}})}function iI(t,e,r){var a=e._levels,i=[],n=[],o,l,s=a.end+a.size/100,f=a.size,c=1.001*r[0]-.001*r[1],v=1.001*r[1]-.001*r[0];for(l=0;l<1e5&&(o=a.start+l*f,!(f>0?o>=s:o<=s));l++)o>c&&o<v&&i.push(o);if(e._fillgradient)n=[0];else if(typeof e._fillcolor=="function"){var u=e._filllevels;if(u)for(s=u.end+u.size/100,f=u.size,l=0;l<1e5&&(o=u.start+l*f,!(f>0?o>=s:o<=s));l++)o>r[0]&&o<r[1]&&n.push(o);else n=i.map(function(d){return d-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 nI(t,e,r){var a=t._fullLayout,i=e.orientation==="v",n={type:"linear",range:r,tickmode:e.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:e.ticks,ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,showticklabels:e.showticklabels,ticklabelposition:e.ticklabelposition,ticklabeloverflow:e.ticklabeloverflow,ticklabelstep:e.ticklabelstep,tickfont:e.tickfont,tickangle:e.tickangle,tickformat:e.tickformat,exponentformat:e.exponentformat,minexponent:e.minexponent,separatethousands:e.separatethousands,showexponent:e.showexponent,showtickprefix:e.showtickprefix,tickprefix:e.tickprefix,showticksuffix:e.showticksuffix,ticksuffix:e.ticksuffix,title:e.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},o=i?"y":"x",l={type:"linear",_id:o+e._id},s={letter:o,font:a.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:a.calendar};function f(c,v){return Vr.coerce(n,l,Jz,c,v)}return Kz(n,l,f,s,a),Qz(n,l,f,s),l}var oI={draw:eI},lI={moduleType:"component",name:"colorbar",attributes:rh,supplyDefaults:A1,draw:oI.draw,hasColorbar:m1},sI={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"}},fI={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}},cI=Ve,kT=de.exports,uv=kT.extendFlat,M0=kT.extendDeep;function S0(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 uI(t){var e=["xaxis","yaxis","zaxis"];return e.indexOf(t.slice(0,5))>-1}var AT=function(e,r){var a,i=e.data,n=e.layout,o=M0([],i),l=M0({},n,S0(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++)uI(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),cI.traceIs(c,"pie-like")&&(c.textposition="none")}}if(Array.isArray(r.annotations))for(a=0;a<r.annotations.length;a++)l.annotations.push(r.annotations[a]);var v=Object.keys(l).filter(function(g){return g.match(/^scene\d*$/)});if(v.length){var u={};for(r.tileClass==="thumbnail"&&(u={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),a=0;a<v.length;a++){var d=l[v[a]];d.xaxis||(d.xaxis={}),d.yaxis||(d.yaxis={}),d.zaxis||(d.zaxis={}),uv(d.xaxis,u),uv(d.yaxis,u),uv(d.zaxis,u),d._scene=null}}var h=document.createElement("div");r.tileClass&&(h.className=r.tileClass);var p={gd:h,td:h,layout:l,data:o,config:{staticPlot:r.staticPlot===void 0?!0:r.staticPlot,plotGlPixelRatio:r.plotGlPixelRatio===void 0?2:r.plotGlPixelRatio,displaylogo:r.displaylogo||!1,showLink:r.showLink||!1,showTips:r.showTips||!1,mapboxAccessToken:s.mapboxAccessToken}};return r.setBackground!=="transparent"&&(p.config.setBackground=r.setBackground||"opaque"),p.gd.defaultLayout=S0(r.tileClass),p},vI=zd.exports.EventEmitter,dI=Ve,hI=de.exports,L0=br,pI=AT,mI=Bh,yI=jh;function gI(t,e){var r=new vI,a=pI(t,{format:"png"}),i=a.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function n(){var l=L0.getDelay(i._fullLayout);setTimeout(function(){var s=mI(i),f=document.createElement("canvas");f.id=hI.randstr(),r=yI({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=L0.getRedrawFunc(i);return dI.call("_doPlot",i,a.data,a.layout,a.config).then(o).then(n).catch(function(l){r.emit("error",l)}),r}var bI=gI,C0=br,xI={getDelay:C0.getDelay,getRedrawFunc:C0.getRedrawFunc,clone:AT,toSVG:Bh,svgToImg:jh,toImage:bI,downloadImage:nw},_I=xI;(function(t){t.version=jf.version;for(var e=Ve,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(zE),r([IE,ua,cR,LR,BR,eP,AP,KP,lz,Rz,Oz,Vz,Kn,lI,R_]),r([sI,fI]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(r(window.PlotlyLocales),delete window.PlotlyLocales),t.Icons=Th;var l=ua,s=Ut.exports;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=_I,t.PlotSchema=po})(sx);(function(t){t.exports=sx})(lx);const vH=pi(lx.exports);var MT={exports:{}},jl={TEXTPAD:3,eventDataKeys:["value","label"]},qt=xo,D0=mo.axisHoverFormat,wI=Cr.hovertemplateAttrs,TI=Cr.texttemplateAttrs,ST=ln,kI=dr,$0=jl,AI=Ga.pattern,Vi=Bt.extendFlat,vv=kI({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),MI=qt.marker,SI=MI.line,LI=Vi({},SI.width,{dflt:0}),CI=Vi({width:LI,editType:"calc"},ST("marker.line")),DI=Vi({line:CI,editType:"calc"},ST("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:AI}),Gl={x:qt.x,x0:qt.x0,dx:qt.dx,y:qt.y,y0:qt.y0,dy:qt.dy,xperiod:qt.xperiod,yperiod:qt.yperiod,xperiod0:qt.xperiod0,yperiod0:qt.yperiod0,xperiodalignment:qt.xperiodalignment,yperiodalignment:qt.yperiodalignment,xhoverformat:D0("x"),yhoverformat:D0("y"),text:qt.text,texttemplate:TI({editType:"plot"},{keys:$0.eventDataKeys}),hovertext:qt.hovertext,hovertemplate:wI({},{keys:$0.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:Vi({},vv,{description:"Sets the font used for `text`."}),insidetextfont:Vi({},vv,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:Vi({},vv,{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:Vi({},qt.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:DI,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(" ")},selected:{marker:{opacity:qt.selected.marker.opacity,color:qt.selected.marker.color,editType:"style"},textfont:qt.selected.textfont,editType:"style"},unselected:{marker:{opacity:qt.unselected.marker.opacity,color:qt.unselected.marker.color,editType:"style"},textfont:qt.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"],description:"Renamed to `orientation`."}}},sp={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 an *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(" ")}},$I=Je.exports,E0=da.hasColorscale,R0=zl,EI=de.exports.coercePattern,LT=function(e,r,a,i,n){var o=a("marker.color",i),l=E0(e,"marker");l&&R0(e,r,n,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",$I.defaultLine),E0(e,"marker.line")&&R0(e,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),EI(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")},no=de.exports,P0=Je.exports,RI=Ve,PI=Uh,zI=pc,II=LT,NI=Xa.getAxisGroup,CT=Gl,Ds=no.coerceFont;function FI(t,e,r,a){function i(f,c){return no.coerce(t,e,CT,f,c)}var n=PI(t,e,a,i);if(!n){e.visible=!1;return}zI(t,e,a,i),i("xhoverformat"),i("yhoverformat"),i("orientation",e.x&&!e.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate");var o=i("textposition");$T(t,e,a,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),II(t,e,i,r,a);var l=(e.marker.line||{}).color,s=RI.getComponentMethod("errorbars","supplyDefaults");s(t,e,l||P0.defaultLine,{axis:"y"}),s(t,e,l||P0.defaultLine,{axis:"x",inherit:"y"}),no.coerceSelectionMarkerOpacity(e,i)}function DT(t,e,r,a){var i=e.orientation,n=e[{v:"x",h:"y"}[i]+"axis"],o=NI(r,n)+i,l=r._alignmentOpts||{},s=a("alignmentgroup"),f=l[o];f||(f=l[o]={});var c=f[s];c?c.traces.push(e):c=f[s]={traces:[e],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var v=a("offsetgroup"),u=c.offsetGroups,d=u[v];v&&(d||(d=u[v]={offsetIndex:Object.keys(u).length}),e._offsetIndex=d.offsetIndex)}function HI(t,e){var r,a;function i(o){return no.coerce(a._input,a,CT,o)}if(e.barmode==="group")for(var n=0;n<t.length;n++)a=t[n],a.type==="bar"&&(r=a._input,DT(r,a,e,i))}function $T(t,e,r,a,i,n){n=n||{};var o=n.moduleHasSelected!==!1,l=n.moduleHasUnselected!==!1,s=n.moduleHasConstrain!==!1,f=n.moduleHasCliponaxis!==!1,c=n.moduleHasTextangle!==!1,v=n.moduleHasInsideanchor!==!1,u=!!n.hasPathbar,d=Array.isArray(i)||i==="auto",h=d||i==="inside",p=d||i==="outside";if(h||p){var g=Ds(a,"textfont",r.font),_=no.extendFlat({},g),b=t.textfont&&t.textfont.color,w=!b;if(w&&delete _.color,Ds(a,"insidetextfont",_),u){var m=no.extendFlat({},g);w&&delete m.color,Ds(a,"pathbar.textfont",m)}p&&Ds(a,"outsidetextfont",g),o&&a("selected.textfont.color"),l&&a("unselected.textfont.color"),s&&a("constraintext"),f&&a("cliponaxis"),c&&a("textangle"),a("texttemplate")}h&&v&&a("insidetextanchor")}var oo={supplyDefaults:FI,crossTraceDefaults:HI,handleGroupingDefaults:DT,handleText:$T},OI=Ve,BI=Ct.exports,jI=de.exports,GI=sp,ET=function(t,e,r){function a(d,h){return jI.coerce(t,e,GI,d,h)}for(var i=!1,n=!1,o=!1,l={},s=a("barmode"),f=0;f<r.length;f++){var c=r[f];if(OI.traceIs(c,"bar")&&c.visible)i=!0;else continue;if(s==="group"){var v=c.xaxis+c.yaxis;l[v]&&(o=!0),l[v]=!0}if(c.visible&&c.type==="histogram"){var u=BI.getFromId({_fullLayout:e},c[c.orientation==="v"?"xaxis":"yaxis"]);u.type!=="category"&&(n=!0)}}if(!i){delete e.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",n&&!o?0:.2),a("bargroupgap")},Sn=de.exports,fp=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;Sn.mergeArray(r.text,e,"tx"),Sn.mergeArray(r.hovertext,e,"htx");var i=r.marker;if(i){Sn.mergeArray(i.opacity,e,"mo",!0),Sn.mergeArray(i.color,e,"mc");var n=i.line;n&&(Sn.mergeArray(n.color,e,"mlc"),Sn.mergeArrayCastPositive(n.width,e,"mlw"))}},z0=Ct.exports,I0=mc,N0=da.hasColorscale,F0=ah,UI=fp,VI=ww,qI=function(e,r){var a=z0.getFromId(e,r.xaxis||"x"),i=z0.getFromId(e,r.yaxis||"y"),n,o,l,s,f,c,v={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(n=a.makeCalcdata(r,"x",v),l=i.makeCalcdata(r,"y"),s=I0(r,i,"y",l),f=!!r.yperiodalignment,c="y"):(n=i.makeCalcdata(r,"y",v),l=a.makeCalcdata(r,"x"),s=I0(r,a,"x",l),f=!!r.xperiodalignment,c="x"),o=s.vals;for(var u=Math.min(o.length,n.length),d=new Array(u),h=0;h<u;h++)d[h]={p:o[h],s:n[h]},f&&(d[h].orig_p=l[h],d[h][c+"End"]=s.ends[h],d[h][c+"Start"]=s.starts[h]),r.ids&&(d[h].id=String(r.ids[h]));return N0(r,"marker")&&F0(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),N0(r,"marker.line")&&F0(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),UI(d,r),VI(d,r),d},XI=_c,YI=de.exports.distinctVals,WI=Ot.BADNUM;function _c(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,a=[],i=0;i<t.length;i++){for(var n=t[i],o=0;o<n.length;o++){var l=n[o];l.p!==WI&&a.push(l.p)}n[0]&&n[0].width1&&(r=Math.min(n[0].width1,r))}this.positions=a;var s=YI(a);this.distinctPositions=s.vals,s.vals.length===1&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(s.minDiff,r);var f=(e.posAxis||{}).type;(f==="category"||f==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}_c.prototype.put=function(e,r){var a=this.getLabel(e,r),i=this.bins[a]||0;return this.bins[a]=i+r,i};_c.prototype.get=function(e,r){var a=this.getLabel(e,r);return this.bins[a]||0};_c.prototype.getLabel=function(e,r){var a=r<0&&this.sepNegVal?"v":"^",i=this.overlapNoMerge?e:Math.round(e/this.binWidth);return a+i};var hi=lt,Td=de.exports.isArrayOrTypedArray,lo=Ot.BADNUM,ZI=Ve,kl=Ct.exports,KI=Xa.getAxisGroup,wc=XI;function QI(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&&ZI.traceIs(c,"bar")&&c.xaxis===r._id&&c.yaxis===a._id&&(c.orientation==="h"?l.push(o[f]):s.push(o[f]),c._computePh))for(var v=t.calcdata[f],u=0;u<v.length;u++)typeof v[u].ph0=="function"&&(v[u].ph0=v[u].ph0()),typeof v[u].ph1=="function"&&(v[u].ph1=v[u].ph1())}var d={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};kd(t,r,a,s,d),kd(t,a,r,l,d)}function kd(t,e,r,a,i){if(!!a.length){var n,o,l,s,f;switch(JI(r,a),i.mode){case"overlay":dv(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&&eN(t,e,r,o,i),n.length&&dv(e,r,n,i);break;case"stack":case"relative":for(n=[],o=[],l=0;l<a.length;l++)s=a[l],f=s[0].trace,f.base===void 0?o.push(s):n.push(s);o.length&&tN(t,e,r,o,i),n.length&&dv(e,r,n,i);break}nN(a,e)}}function JI(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(Td(o)){for(a=0;a<Math.min(o.length,i.length);a++)l=f(o[a],0,s),hi(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=hi(l);for(l=c?l:0,a=0;a<i.length;a++)i[a].b=l,c&&(i[a].hasB=1)}}}function dv(t,e,r,a){for(var i=0;i<r.length;i++){var n=r[i],o=new wc([n],{posAxis:t,sepNegVal:!1,overlapNoMerge:!a.norm});RT(t,o,a),a.norm?(FT(o),cp(e,o,a)):NT(e,o)}}function eN(t,e,r,a,i){var n=new wc(a,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});rN(t,e,n,i),iN(n,e),i.norm?(FT(n),cp(r,n,i)):NT(r,n)}function tN(t,e,r,a,i){var n=new wc(a,{posAxis:e,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});RT(e,n,i),aN(r,n,i);for(var o=0;o<a.length;o++)for(var l=a[o],s=0;s<l.length;s++){var f=l[s];if(f.s!==lo){var c=f.b+f.s===n.get(f.p,f.s);c&&(f._outmost=!0)}}i.norm&&cp(r,n,i)}function RT(t,e,r){for(var a=e.minDiff,i=e.traces,n=a*(1-r.gap),o=n,l=o*(1-(r.groupgap||0)),s=-l/2,f=0;f<i.length;f++){var c=i[f],v=c[0].t;v.barwidth=l,v.poffset=s,v.bargroupwidth=n,v.bardelta=a}e.binWidth=i[0][0].t.barwidth/100,PT(e),zT(t,e),IT(t,e)}function rN(t,e,r,a){for(var i=t._fullLayout,n=r.positions,o=r.distinctPositions,l=r.minDiff,s=r.traces,f=s.length,c=n.length!==o.length,v=l*(1-a.gap),u=KI(i,e._id)+s[0][0].trace.orientation,d=i._alignmentOpts[u]||{},h=0;h<f;h++){var p=s[h],g=p[0].trace,_=d[g.alignmentgroup]||{},b=Object.keys(_.offsetGroups||{}).length,w;b?w=v/b:w=c?v/f:v;var m=w*(1-(a.groupgap||0)),y;b?y=((2*g._offsetIndex+1-b)*w-m)/2:y=c?((2*h+1-f)*w-m)/2:-m/2;var x=p[0].t;x.barwidth=m,x.poffset=y,x.bargroupwidth=v,x.bardelta=l}r.binWidth=s[0][0].t.barwidth/100,PT(r),zT(e,r),IT(e,r,c)}function PT(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(Td(s)){for(c=Array.prototype.slice.call(s,0,i.length),a=0;a<c.length;a++)hi(c[a])||(c[a]=f);for(a=c.length;a<i.length;a++)c.push(f);l.poffset=c}else s!==void 0&&(l.poffset=s);var v=o._width||o.width,u=l.barwidth;if(Td(v)){var d=Array.prototype.slice.call(v,0,i.length);for(a=0;a<d.length;a++)hi(d[a])||(d[a]=u);for(a=d.length;a<i.length;a++)d.push(u);if(l.barwidth=d,s===void 0){for(c=[],a=0;a<i.length;a++)c.push(f+(u-d[a])/2);l.poffset=c}}else v!==void 0&&(l.barwidth=v,s===void 0&&(l.poffset=f+(u-v)/2))}}function zT(t,e){for(var r=e.traces,a=Ul(t),i=0;i<r.length;i++)for(var n=r[i],o=n[0].t,l=o.poffset,s=Array.isArray(l),f=o.barwidth,c=Array.isArray(f),v=0;v<n.length;v++){var u=n[v],d=u.w=c?f[v]:f;u[a]=u.p+(s?l[v]:l)+d/2}}function IT(t,e,r){var a=e.traces,i=e.minDiff,n=i/2;kl.minDtick(t,e.minDiff,e.distinctPositions[0],r);for(var o=0;o<a.length;o++){var l=a[o],s=l[0],f=s.trace,c=[],v,u,d,h;for(h=0;h<l.length;h++)v=l[h],u=v.p-n,d=v.p+n,c.push(u,d);if(f.width||f.offset){var p=s.t,g=p.poffset,_=p.barwidth,b=Array.isArray(g),w=Array.isArray(_);for(h=0;h<l.length;h++){v=l[h];var m=b?g[h]:g,y=w?_[h]:_;u=v.p+m,d=u+y,c.push(u,d)}}f._extremes[t._id]=kl.findExtremes(t,c,{padded:!1})}}function NT(t,e){for(var r=e.traces,a=Ul(t),i=0;i<r.length;i++){for(var n=r[i],o=n[0].trace,l=[],s=!1,f=0;f<n.length;f++){var c=n[f],v=c.b,u=v+c.s;c[a]=u,l.push(u),c.hasB&&l.push(v),(!c.hasB||!c.b)&&(s=!0)}o._extremes[t._id]=kl.findExtremes(t,l,{tozero:s,padded:!0})}}function aN(t,e,r){var a=Ul(t),i=e.traces,n,o,l,s,f,c;for(s=0;s<i.length;s++)if(n=i[s],o=n[0].trace,o.type==="funnel")for(f=0;f<n.length;f++)c=n[f],c.s!==lo&&e.put(c.p,-.5*c.s);for(s=0;s<i.length;s++){n=i[s],o=n[0].trace,l=o.type==="funnel";var v=[];for(f=0;f<n.length;f++)if(c=n[f],c.s!==lo){var u;l?u=c.s:u=c.s+c.b;var d=e.put(c.p,u),h=d+u;c.b=d,c[a]=h,r.norm||(v.push(h),c.hasB&&v.push(d))}r.norm||(o._extremes[t._id]=kl.findExtremes(t,v,{tozero:!0,padded:!0}))}}function FT(t){for(var e=t.traces,r=0;r<e.length;r++)for(var a=e[r],i=0;i<a.length;i++){var n=a[i];n.s!==lo&&t.put(n.p,n.b+n.s)}}function iN(t,e){for(var r=t.traces,a=0;a<r.length;a++){var i=r[a],n=i[0].trace;if(n.base===void 0)for(var o=new wc([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<i.length;l++){var s=i[l];if(s.p!==lo){var f=o.put(s.p,s.b+s.s);f&&(s.b=f)}}}}function cp(t,e,r){var a=e.traces,i=Ul(t),n=r.norm==="fraction"?1:100,o=n/1e9,l=t.l2c(t.c2l(0)),s=r.mode==="stack"?n:l;function f(y){return hi(t.c2l(y))&&(y<l-o||y>s+o||!hi(l))}for(var c=0;c<a.length;c++){for(var v=a[c],u=v[0].trace,d=[],h=!1,p=!1,g=0;g<v.length;g++){var _=v[g];if(_.s!==lo){var b=Math.abs(n/e.get(_.p,_.s));_.b*=b,_.s*=b;var w=_.b,m=w+_.s;_[i]=m,d.push(m),p=p||f(m),_.hasB&&(d.push(w),p=p||f(w)),(!_.hasB||!_.b)&&(h=!0)}}u._extremes[t._id]=kl.findExtremes(t,d,{tozero:h,padded:p})}}function nN(t,e){var r=Ul(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;hi(f)&&(l=Math.min(l,f),s=Math.max(s,f))}var c=1e4/(s-l),v=a.round=function(b){return String(Math.round(c*(b-l)))};for(i=0;i<t.length;i++){o=t[i],o[0].t.extents=a;var u=o[0].t.poffset,d=Array.isArray(u);for(n=0;n<o.length;n++){var h=o[n],p=h[r]-h.w/2;if(hi(p)){var g=h[r]+h.w/2,_=v(h.p);a[_]?a[_]=[Math.min(p,a[_][0]),Math.max(g,a[_][1])]:a[_]=[p,g]}h.p0=h.p+(d?u[n]:u),h.p1=h.p0+h.w,h.s0=h.b,h.s1=h.s0+h.s}}}function Ul(t){return t._id.charAt(0)}var HT={crossTraceCalc:QI,setGroupPositions:kd},oN=tt.exports,lN=de.exports;function sN(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=oN.select(this).select("text");f.attr("transform",lN.getTextTransform(s))}})}}function fN(t,e,r){if(r.uniformtext.mode){var a=OT(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 cN(t,e){var r=OT(t);e[r]=void 0}function OT(t){return"_"+t+"Text_minsize"}var Ya={recordMinTextSize:fN,clearMinTextSize:cN,resizeText:sN},Wa={},uN=lt,vN=Wr.exports,dN=de.exports.isArrayOrTypedArray;Wa.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};Wa.coerceNumber=function(t,e,r){if(uN(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};Wa.coerceColor=function(t,e,r){return vN(e).isValid()?e:r!==void 0?r:t.dflt};Wa.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),t.values.indexOf(e)!==-1?e:r!==void 0?r:t.dflt};Wa.getValue=function(t,e){var r;return Array.isArray(t)?e<t.length&&(r=t[e]):r=t,r};Wa.getLineWidth=function(t,e){var r=0<e.mlw?e.mlw:dN(t.marker.line.width)?0:t.marker.line.width;return r};var sl=tt.exports,hN=Je.exports,Al=Tt.exports,BT=de.exports,jT=Ve,GT=Ya.resizeText,up=Gl,pN=up.textfont,mN=up.insidetextfont,yN=up.outsidetextfont,Ln=Wa;function gN(t){var e=sl.select(t).selectAll("g.barlayer").selectAll("g.trace");GT(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)&&sl.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(i){var n=sl.select(this),o=i[0].trace;UT(n,o,t)}),jT.getComponentMethod("errorbars","style")(e)}function UT(t,e,r){Al.pointStyle(t.selectAll("path"),e,r),VT(t,e,r)}function VT(t,e,r){t.selectAll("text").each(function(a){var i=sl.select(this),n=BT.ensureUniformFontSize(r,qT(i,a,e,r));Al.font(i,n)})}function bN(t,e,r){var a=e[0].trace;a.selectedpoints?xN(r,a,t):(UT(r,a,t),jT.getComponentMethod("errorbars","style")(r))}function xN(t,e,r){Al.selectedPointStyle(t.selectAll("path"),e),_N(t.selectAll("text"),e,r)}function _N(t,e,r){t.each(function(a){var i=sl.select(this),n;if(a.selected){n=BT.ensureUniformFontSize(r,qT(i,a,e,r));var o=e.selected.textfont&&e.selected.textfont.color;o&&(n.color=o),Al.font(i,n)}else Al.selectedTextStyle(i,e)})}function qT(t,e,r,a){var i=a._fullLayout.font,n=r.textfont;if(t.classed("bartext-inside")){var o=ZT(e,r);n=YT(r,e.i,i,o)}else t.classed("bartext-outside")&&(n=WT(r,e.i,i));return n}function XT(t,e,r){return vp(pN,t.textfont,e,r)}function YT(t,e,r,a){var i=XT(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:hN.contrast(a),family:i.family,size:i.size}),vp(mN,t.insidetextfont,e,i)}function WT(t,e,r){var a=XT(t,e,r);return vp(yN,t.outsidetextfont,e,a)}function vp(t,e,r,a){e=e||{};var i=Ln.getValue(e.family,r),n=Ln.getValue(e.size,r),o=Ln.getValue(e.color,r);return{family:Ln.coerceString(t.family,i,a.family),size:Ln.coerceNumber(t.size,n,a.size),color:Ln.coerceColor(t.color,o,a.color)}}function ZT(t,e){return e.type==="waterfall"?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}var Ji={style:gN,styleTextPoints:VT,styleOnSelect:bN,getInsideTextFont:YT,getOutsideTextFont:WT,getBarColor:ZT,resizeText:GT},$s=tt.exports,Es=lt,er=de.exports,wN=ir,TN=Je.exports,fi=Tt.exports,kN=Ve,zf=Ct.exports.tickText,KT=Ya,AN=KT.recordMinTextSize,MN=KT.clearMinTextSize,hv=Ji,so=Wa,SN=jl,QT=Gl,LN=QT.text,CN=QT.textposition,DN=Zr.appendArrayPointValue,sa=SN.TEXTPAD;function $N(t){return t.id}function EN(t){if(t.ids)return $N}function ui(t,e){return t<e?1:-1}function RN(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 JT(t,e,r,a){if(!e.uniformtext.mode&&e2(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 e2(t){return t&&t.duration>0}function PN(t,e,r,a,i,n){var o=e.xaxis,l=e.yaxis,s=t._fullLayout;i||(i={mode:s.barmode,norm:s.barmode,gap:s.bargap,groupgap:s.bargroupgap},MN("bar",s));var f=er.makeTraceGroups(a,r,"trace bars").each(function(c){var v=$s.select(this),u=c[0].trace,d=u.type==="waterfall",h=u.type==="funnel",p=u.type==="bar",g=p||h,_=0;d&&u.connector.visible&&u.connector.mode==="between"&&(_=u.connector.line.width/2);var b=u.orientation==="h",w=e2(i),m=er.ensureSingle(v,"g","points"),y=EN(u),x=m.selectAll("g.point").data(er.identity,y);x.enter().append("g").classed("point",!0),x.exit().remove(),x.each(function(k,S){var A=$s.select(this),$=RN(k,o,l,b),M=$[0][0],C=$[0][1],E=$[1][0],I=$[1][1],P=(b?C-M:I-E)===0;P&&g&&so.getLineWidth(u,k)&&(P=!1),P||(P=!Es(M)||!Es(C)||!Es(E)||!Es(I)),k.isBlank=P,P&&(b?C=M:I=E),_&&!P&&(b?(M-=ui(M,C)*_,C+=ui(M,C)*_):(E-=ui(E,I)*_,I+=ui(E,I)*_));var R,L;if(u.type==="waterfall"){if(!P){var D=u[k.dir].marker;R=D.line.width,L=D.color}}else R=so.getLineWidth(u,k),L=k.mc||u.marker.color;function z(O){var Y=$s.round(R/2%1,2);return i.gap===0&&i.groupgap===0?$s.round(Math.round(O)-Y,2):O}function F(O,Y,W){return W&&O===Y?O:Math.abs(O-Y)>=2?z(O):O>Y?Math.ceil(O):Math.floor(O)}if(!t._context.staticPlot){var H=TN.opacity(L),U=H<1||R>.01?z:F;M=U(M,C,b),C=U(C,M,b),E=U(E,I,!b),I=U(I,E,!b)}var B=JT(er.ensureSingle(A,"path"),s,i,n);if(B.style("vector-effect","non-scaling-stroke").attr("d",isNaN((C-M)*(I-E))||P&&t._context.staticPlot?"M0,0Z":"M"+M+","+E+"V"+I+"H"+C+"V"+E+"Z").call(fi.setClipUrl,e.layerClipId,t),!s.uniformtext.mode&&w){var X=fi.makePointStyleFns(u);fi.singlePointStyle(k,B,u,X,t)}zN(t,e,A,c,S,M,C,E,I,i,n),e.layerClipId&&fi.hideOutsideRangePoint(k,A.select("text"),o,l,u.xcalendar,u.ycalendar)});var T=u.cliponaxis===!1;fi.setClipUrl(v,T?null:e.layerClipId,t)});kN.getComponentMethod("errorbars","plot")(t,f,e,i)}function zN(t,e,r,a,i,n,o,l,s,f,c){var v=e.xaxis,u=e.yaxis,d=t._fullLayout,h;function p(O,Y,W){var K=er.ensureSingle(O,"text").text(Y).attr({class:"bartext bartext-"+h,"text-anchor":"middle","data-notex":1}).call(fi.font,W).call(wN.convertToTspans,t);return K}var g=a[0].trace,_=g.orientation==="h",b=NN(d,a,i,v,u);h=FN(g,i);var w=f.mode==="stack"||f.mode==="relative",m=a[i],y=!w||m._outmost;if(!b||h==="none"||(m.isBlank||n===o||l===s)&&(h==="auto"||h==="inside")){r.select("text").remove();return}var x=d.font,T=hv.getBarColor(a[i],g),k=hv.getInsideTextFont(g,i,x,T),S=hv.getOutsideTextFont(g,i,x),A=r.datum();_?v.type==="log"&&A.s0<=0&&(v.range[0]<v.range[1]?n=0:n=v._length):u.type==="log"&&A.s0<=0&&(u.range[0]<u.range[1]?l=u._length:l=0);var $=Math.abs(o-n)-2*sa,M=Math.abs(s-l)-2*sa,C,E,I,P,R;if(h==="outside"&&!y&&!m.hasB&&(h="inside"),h==="auto")if(y){h="inside",R=er.ensureUniformFontSize(t,k),C=p(r,b,R),E=fi.bBox(C.node()),I=E.width,P=E.height;var L=I>0&&P>0,D=I<=$&&P<=M,z=I<=M&&P<=$,F=_?$>=I*(M/P):M>=P*($/I);L&&(D||z||F)?h="inside":(h="outside",C.remove(),C=null)}else h="inside";if(!C){R=er.ensureUniformFontSize(t,h==="outside"?S:k),C=p(r,b,R);var H=C.attr("transform");if(C.attr("transform",""),E=fi.bBox(C.node()),I=E.width,P=E.height,C.attr("transform",H),I<=0||P<=0){C.remove();return}}var U=g.textangle,B,X;h==="outside"?(X=g.constraintext==="both"||g.constraintext==="outside",B=IN(n,o,l,s,E,{isHorizontal:_,constrained:X,angle:U})):(X=g.constraintext==="both"||g.constraintext==="inside",B=a2(n,o,l,s,E,{isHorizontal:_,constrained:X,angle:U,anchor:g.insidetextanchor})),B.fontSize=R.size,AN(g.type==="histogram"?"bar":g.type,B,d),m.transform=B,JT(C,d,f,c).attr("transform",er.getTextTransform(B))}function t2(t){return t==="auto"?0:t}function r2(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 a2(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=n.anchor||"end",c=f==="end",v=f==="start",u=n.leftToRight||0,d=(u+1)/2,h=1-d,p=i.width,g=i.height,_=Math.abs(e-t),b=Math.abs(a-r),w=_>2*sa&&b>2*sa?sa:0;_-=2*w,b-=2*w;var m=t2(s);s==="auto"&&!(p<=_&&g<=b)&&(p>_||g>b)&&(!(p>b||g>_)||p<g!=_<b)&&(m+=90);var y=r2(i,m),x=1;l&&(x=Math.min(1,_/y.x,b/y.y));var T=i.left*h+i.right*d,k=(i.top+i.bottom)/2,S=(t+sa)*h+(e-sa)*d,A=(r+a)/2,$=0,M=0;if(v||c){var C=(o?y.x:y.y)/2,E=o?ui(t,e):ui(r,a);o?v?(S=t+E*w,$=-E*C):(S=e-E*w,$=E*C):v?(A=r+E*w,M=-E*C):(A=a-E*w,M=E*C)}return{textX:T,textY:k,targetX:S,targetY:A,anchorX:$,anchorY:M,scale:x,rotate:m}}function IN(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=i.width,c=i.height,v=Math.abs(e-t),u=Math.abs(a-r),d;o?d=u>2*sa?sa:0:d=v>2*sa?sa:0;var h=1;l&&(h=o?Math.min(1,u/c):Math.min(1,v/f));var p=t2(s),g=r2(i,p),_=(o?g.x:g.y)/2,b=(i.left+i.right)/2,w=(i.top+i.bottom)/2,m=(t+e)/2,y=(r+a)/2,x=0,T=0,k=o?ui(e,t):ui(r,a);return o?(m=e-k*d,x=k*_):(y=a+k*d,T=-k*_),{textX:b,textY:w,targetX:m,targetY:y,anchorX:x,anchorY:T,scale:h,rotate:p}}function NN(t,e,r,a,i){var n=e[0].trace,o=n.texttemplate,l;return o?l=HN(t,e,r,a,i):n.textinfo?l=ON(e,r,a,i):l=so.getValue(n.text,r),so.coerceString(LN,l)}function FN(t,e){var r=so.getValue(t.textposition,e);return so.coerceEnumerated(CN,r)}function HN(t,e,r,a,i){var n=e[0].trace,o=er.castOption(n,r,"texttemplate");if(!o)return"";var l=n.type==="histogram",s=n.type==="waterfall",f=n.type==="funnel",c=n.orientation==="h",v,u,d,h;c?(v="y",u=i,d="x",h=a):(v="x",u=a,d="y",h=i);function p(x){return zf(u,u.c2l(x),!0).text}function g(x){return zf(h,h.c2l(x),!0).text}var _=e[r],b={};b.label=_.p,b.labelLabel=b[v+"Label"]=p(_.p);var w=er.castOption(n,_.i,"text");(w===0||w)&&(b.text=w),b.value=_.s,b.valueLabel=b[d+"Label"]=g(_.s);var m={};DN(m,n,_.i),(l||m.x===void 0)&&(m.x=c?b.value:b.label),(l||m.y===void 0)&&(m.y=c?b.label:b.value),(l||m.xLabel===void 0)&&(m.xLabel=c?b.valueLabel:b.labelLabel),(l||m.yLabel===void 0)&&(m.yLabel=c?b.labelLabel:b.valueLabel),s&&(b.delta=+_.rawS||_.s,b.deltaLabel=g(b.delta),b.final=_.v,b.finalLabel=g(b.final),b.initial=b.final-b.delta,b.initialLabel=g(b.initial)),f&&(b.value=_.s,b.valueLabel=g(b.value),b.percentInitial=_.begR,b.percentInitialLabel=er.formatPercent(_.begR),b.percentPrevious=_.difR,b.percentPreviousLabel=er.formatPercent(_.difR),b.percentTotal=_.sumR,b.percenTotalLabel=er.formatPercent(_.sumR));var y=er.castOption(n,_.i,"customdata");return y&&(b.customdata=y),er.texttemplateString(o,b,t._d3locale,m,b,n._meta||{})}function ON(t,e,r,a){var i=t[0].trace,n=i.orientation==="h",o=i.type==="waterfall",l=i.type==="funnel";function s(y){var x=n?a:r;return zf(x,y,!0).text}function f(y){var x=n?r:a;return zf(x,+y,!0).text}var c=i.textinfo,v=t[e],u=c.split("+"),d=[],h,p=function(y){return u.indexOf(y)!==-1};if(p("label")&&d.push(s(t[e].p)),p("text")&&(h=er.castOption(i,v.i,"text"),(h===0||h)&&d.push(h)),o){var g=+v.rawS||v.s,_=v.v,b=_-g;p("initial")&&d.push(f(b)),p("delta")&&d.push(f(g)),p("final")&&d.push(f(_))}if(l){p("value")&&d.push(f(v.s));var w=0;p("percent initial")&&w++,p("percent previous")&&w++,p("percent total")&&w++;var m=w>1;p("percent initial")&&(h=er.formatPercent(v.begR),m&&(h+=" of initial"),d.push(h)),p("percent previous")&&(h=er.formatPercent(v.difR),m&&(h+=" of previous"),d.push(h)),p("percent total")&&(h=er.formatPercent(v.sumR),m&&(h+=" of total"),d.push(h))}return d.join("<br>")}var dp={plot:PN,toMoveInsideBar:a2},Bo=ua,BN=Ve,H0=Je.exports,jN=de.exports.fillText,GN=Wa.getLineWidth,pv=Ct.exports.hoverLabelText,UN=Ot.BADNUM;function VN(t,e,r,a,i){var n=i2(t,e,r,a,i);if(n){var o=n.cd,l=o[0].trace,s=o[n.index];return n.color=n2(l,s),BN.getComponentMethod("errorbars","hoverInfo")(s,l,n),[n]}}function i2(t,e,r,a,i){var n=t.cd,o=n[0].trace,l=n[0].t,s=a==="closest",f=o.type==="waterfall",c=t.maxHoverDistance,v=t.maxSpikeDistance,u,d,h,p,g,_,b;o.orientation==="h"?(u=r,d=e,h="y",p="x",g=I,_=M):(u=e,d=r,h="x",p="y",_=I,g=M);var w=o[h+"period"],m=s||w;function y(O){return T(O,-1)}function x(O){return T(O,1)}function T(O,Y){var W=O.w;return O[h]+Y*W/2}function k(O){return O[h+"End"]-O[h+"Start"]}var S=s?y:w?function(O){return O.p-k(O)/2}:function(O){return Math.min(y(O),O.p-l.bardelta/2)},A=s?x:w?function(O){return O.p+k(O)/2}:function(O){return Math.max(x(O),O.p+l.bardelta/2)};function $(O,Y,W){return i.finiteRange&&(W=0),Bo.inbox(O-u,Y-u,W+Math.min(1,Math.abs(Y-O)/b)-1)}function M(O){return $(S(O),A(O),c)}function C(O){return $(y(O),x(O),v)}function E(O){var Y=O[p];if(f){var W=Math.abs(O.rawS)||0;d>0?Y+=W:d<0&&(Y-=W)}return Y}function I(O){var Y=d,W=O.b,K=E(O);return Bo.inbox(W-Y,K-Y,c+(K-Y)/(K-W)-1)}function P(O){var Y=d,W=O.b,K=E(O);return Bo.inbox(W-Y,K-Y,v+(K-Y)/(K-W)-1)}var R=t[h+"a"],L=t[p+"a"];b=Math.abs(R.r2c(R.range[1])-R.r2c(R.range[0]));function D(O){return(g(O)+_(O))/2}var z=Bo.getDistanceFunction(a,g,_,D);if(Bo.getClosest(n,z,t),t.index!==!1&&n[t.index].p!==UN){m||(S=function(O){return Math.min(y(O),O.p-l.bargroupwidth/2)},A=function(O){return Math.max(x(O),O.p+l.bargroupwidth/2)});var F=t.index,H=n[F],U=o.base?H.b+H.s:H.s;t[p+"0"]=t[p+"1"]=L.c2p(H[p],!0),t[p+"LabelVal"]=U;var B=l.extents[l.extents.round(H.p)];t[h+"0"]=R.c2p(s?S(H):B[0],!0),t[h+"1"]=R.c2p(s?A(H):B[1],!0);var X=H.orig_p!==void 0;return t[h+"LabelVal"]=X?H.orig_p:H.p,t.labelLabel=pv(R,t[h+"LabelVal"],o[h+"hoverformat"]),t.valueLabel=pv(L,t[p+"LabelVal"],o[p+"hoverformat"]),t.baseLabel=pv(L,H.b,o[p+"hoverformat"]),t.spikeDistance=(P(H)+C(H))/2,t[h+"Spike"]=R.c2p(H.p,!0),jN(H,o,t),t.hovertemplate=o.hovertemplate,t}}function n2(t,e){var r=e.mcc||t.marker.color,a=e.mlcc||t.marker.line.color,i=GN(t,e);if(H0.opacity(r))return r;if(H0.opacity(a)&&i)return a}var o2={hoverPoints:VN,hoverOnBars:i2,getTraceColor:n2},qN=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},l2=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=a[0].trace,l=o.type==="funnel",s=o.orientation==="h",f=[],c;if(r===!1)for(c=0;c<a.length;c++)a[c].selected=0;else for(c=0;c<a.length;c++){var v=a[c],u="ct"in v?v.ct:XN(v,i,n,s,l);r.contains(u,!1,c,e)?(f.push({pointNumber:c,x:i.c2d(v.x),y:n.c2d(v.y)}),v.selected=1):v.selected=0}return f};function XN(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 YN={attributes:Gl,layoutAttributes:sp,supplyDefaults:oo.supplyDefaults,crossTraceDefaults:oo.crossTraceDefaults,supplyLayoutDefaults:ET,calc:qI,crossTraceCalc:HT.crossTraceCalc,colorbar:Ol,arraysToCalcdata:fp,plot:dp.plot,style:Ji.style,styleOnSelect:Ji.styleOnSelect,hoverPoints:o2.hoverPoints,eventData:qN,selectPoints:l2,moduleType:"trace",name:"bar",basePlotModule:Yt,categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{description:["The data visualized by the span of the bars is set in `y`","if `orientation` is set th *v* (the default)","and the labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}};(function(t){t.exports=YN})(MT);const dH=pi(MT.exports);var s2={exports:{}},WN=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"}},ZN={eventDataKeys:["binNumber"]},wr=Gl,O0=mo.axisHoverFormat,KN=Cr.hovertemplateAttrs,QN=Cr.texttemplateAttrs,mv=dr,B0=WN,JN=ZN,yv=Bt.extendFlat,f2={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:O0("x"),yhoverformat:O0("y"),text:yv({},wr.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:yv({},wr.hovertext,{description:"Same as `text`."}),orientation:wr.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:B0("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:B0("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:KN({},{keys:JN.eventDataKeys}),texttemplate:QN({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:yv({},wr.textposition,{arrayOk:!1}),textfont:mv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:mv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:mv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),insidetextanchor:wr.insidetextanchor,textangle:wr.textangle,cliponaxis:wr.cliponaxis,constraintext:wr.constraintext,marker:wr.marker,offsetgroup:wr.offsetgroup,alignmentgroup:wr.alignmentgroup,selected:wr.selected,unselected:wr.unselected,_deprecated:{bardir:wr._deprecated.bardir}},j0=Ve,jo=de.exports,G0=Je.exports,eF=oo.handleText,tF=LT,rF=f2,aF=function(e,r,a,i){function n(b,w){return jo.coerce(e,r,rF,b,w)}var o=n("x"),l=n("y"),s=n("cumulative.enabled");s&&(n("cumulative.direction"),n("cumulative.currentbin")),n("text");var f=n("textposition");eF(e,r,i,n,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),n("hovertext"),n("hovertemplate"),n("xhoverformat"),n("yhoverformat");var c=n("orientation",l&&!o?"h":"v"),v=c==="v"?"x":"y",u=c==="v"?"y":"x",d=o&&l?Math.min(jo.minRowLength(o)&&jo.minRowLength(l)):jo.minRowLength(r[v]||[]);if(!d){r.visible=!1;return}r._length=d;var h=j0.getComponentMethod("calendars","handleTraceDefaults");h(e,r,["x","y"],i);var p=r[u];p&&n("histfunc"),n("histnorm"),n("autobin"+v),tF(e,r,n,a,i),jo.coerceSelectionMarkerOpacity(r,n);var g=(r.marker.line||{}).color,_=j0.getComponentMethod("errorbars","supplyDefaults");_(e,r,g||G0.defaultLine,{axis:"y"}),_(e,r,g||G0.defaultLine,{axis:"x",inherit:"y"})},Qo=de.exports,iF=Vt,Rs=Ve.traceIs,nF=oo.handleGroupingDefaults,U0=Qo.nestedProperty,gv=Xa.getAxisGroup,V0=[{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"}],oF=["x","y"],lF=function(e,r){var a=r._histogramBinOpts={},i=[],n={},o=[],l,s,f,c,v,u,d;function h(E,I){return Qo.coerce(l._input,l,l._module.attributes,E,I)}function p(E){return E.orientation==="v"?"x":"y"}function g(E,I){var P=iF.getFromTrace({_fullLayout:r},E,I);return P.type}function _(E,I,P){var R=E.uid+"__"+P;I||(I=R);var L=g(E,P),D=E[P+"calendar"]||"",z=a[I],F=!0;z&&(L===z.axType&&D===z.calendar?(F=!1,z.traces.push(E),z.dirs.push(P)):(I=R,L!==z.axType&&Qo.warn(["Attempted to group the bins of trace",E.index,"set on a","type:"+L,"axis","with bins on","type:"+z.axType,"axis."].join(" ")),D!==z.calendar&&Qo.warn(["Attempted to group the bins of trace",E.index,"set with a",D,"calendar","with bins",z.calendar?"on a "+z.calendar+" calendar":"w/o a set calendar"].join(" ")))),F&&(a[I]={traces:[E],dirs:[P],axType:L,calendar:E[P+"calendar"]||""}),E["_"+P+"bingroup"]=I}for(v=0;v<e.length;v++)l=e[v],Rs(l,"histogram")&&(i.push(l),delete l._xautoBinFinished,delete l._yautoBinFinished,Rs(l,"2dMap")||nF(l._input,l,r,h));var b=r._alignmentOpts||{};for(v=0;v<i.length;v++){if(l=i[v],f="",!Rs(l,"2dMap")){if(c=p(l),r.barmode==="group"&&l.alignmentgroup){var w=l[c+"axis"],m=gv(r,w)+l.orientation;(b[m]||{})[l.alignmentgroup]&&(f=m)}!f&&r.barmode!=="overlay"&&(f=gv(r,l.xaxis)+gv(r,l.yaxis)+p(l))}f?(n[f]||(n[f]=[]),n[f].push(l)):o.push(l)}for(f in n){if(s=n[f],s.length===1){o.push(s[0]);continue}var y=!1;for(s.length&&(l=s[0],y=h("bingroup")),f=y||f,v=0;v<s.length;v++){l=s[v];var x=l._input.bingroup;x&&x!==f&&Qo.warn(["Trace",l.index,"must match","within bingroup",f+".","Ignoring its bingroup:",x,"setting."].join(" ")),l.bingroup=f,_(l,f,p(l))}}for(v=0;v<o.length;v++){l=o[v];var T=h("bingroup");if(Rs(l,"2dMap"))for(d=0;d<2;d++){c=oF[d];var k=h(c+"bingroup",T?T+"__"+c:null);_(l,k,c)}else _(l,T,p(l))}for(f in a){var S=a[f];for(s=S.traces,u=0;u<V0.length;u++){var A=V0[u],$=A.name,M,C;if(!($==="nbins"&&S.sizeFound)){for(v=0;v<s.length;v++){if(l=s[v],c=S.dirs[v],M=A.aStr[c],U0(l._input,M).get()!==void 0){S[$]=h(M),S[$+"Found"]=!0;break}C=(l._autoBin||{})[c]||{},C[$]&&U0(l,M).set(C[$])}if($==="start"||$==="end")for(;v<s.length;v++)l=s[v],l["_"+c+"bingroup"]&&(C=(l._autoBin||{})[c]||{},h(M,C[$]));$==="nbins"&&!S.sizeFound&&!S.nbinsFound&&(l=s[0],S[$]=h(M))}}}},Cn=lt,sF={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,a){var i=a[e];return Cn(i)?(i=Number(i),r[t]+=i,i):0},avg:function(t,e,r,a,i){var n=a[e];return Cn(n)&&(n=Number(n),r[t]+=n,i[t]++),0},min:function(t,e,r,a){var i=a[e];if(Cn(i))if(i=Number(i),Cn(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(Cn(i))if(i=Number(i),Cn(r[t])){if(r[t]<i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0}},fF={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}},cF=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},_o=Ot,Zi=_o.ONEAVGYEAR,q0=_o.ONEAVGMONTH,If=_o.ONEDAY,X0=_o.ONEHOUR,Y0=_o.ONEMIN,W0=_o.ONESEC,Z0=Ct.exports.tickIncrement,uF=function(e,r,a,i,n){var o=-1.1*r,l=-.1*r,s=e-l,f=a[0],c=a[1],v=Math.min(Ps(f+l,f+s,i,n),Ps(c+l,c+s,i,n)),u=Math.min(Ps(f+o,f+l,i,n),Ps(c+o,c+l,i,n)),d,h;if(v>u&&u<Math.abs(c-f)/4e3?(d=v,h=!1):(d=Math.min(v,u),h=!0),i.type==="date"&&d>If){var p=d===Zi?1:6,g=d===Zi?"M12":"M1";return function(_,b){var w=i.c2d(_,Zi,n),m=w.indexOf("-",p);m>0&&(w=w.substr(0,m));var y=i.d2c(w,0,n);if(y<_){var x=Z0(y,g,!1,n);(y+x)/2<_+e&&(y=x)}return b&&h?Z0(y,g,!0,n):y}}return function(_,b){var w=d*Math.round(_/d);return w+d/10<_&&w+d*.9<_+e&&(w+=d),b&&h&&(w-=d),w}};function Ps(t,e,r,a){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),n=r.type==="date",o=K0(i,n),l=0;l<10;l++){var s=K0(o*80,n);if(o===s)break;if(vF(s,t,e,n,r,a))o=s;else break}return o}function K0(t,e){return e&&t>W0?t>If?t>Zi*1.1?Zi:t>q0*1.1?q0:If:t>X0?X0:t>Y0?Y0:W0:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function vF(t,e,r,a,i,n){if(a&&t>If){var o=Q0(e,i,n),l=Q0(r,i,n),s=t===Zi?0:1;return o[s]!==l[s]}return Math.floor(r/t)-Math.floor(e/t)>.1}function Q0(t,e,r){var a=e.c2d(t,Zi,r).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}var Ad=lt,ur=de.exports,J0=Ve,Gr=Ct.exports,dF=fp,eb=sF,hF=fF,pF=cF,mF=uF;function yF(t,e){var r=[],a=[],i=e.orientation==="h",n=Gr.getFromId(t,i?e.yaxis:e.xaxis),o=i?"y":"x",l={x:"y",y:"x"}[o],s=e[o+"calendar"],f=e.cumulative,c,v=hp(t,e,n,o),u=v[0],d=v[1],h=typeof u.size=="string",p=[],g=h?p:u,_=[],b=[],w=[],m=0,y=e.histnorm,x=e.histfunc,T=y.indexOf("density")!==-1,k,S,A;f.enabled&&T&&(y=y.replace(/ ?density$/,""),T=!1);var $=x==="max"||x==="min",M=$?null:0,C=eb.count,E=hF[y],I=!1,P=function(ne){return n.r2c(ne,0,s)},R;for(ur.isArrayOrTypedArray(e[l])&&x!=="count"&&(R=e[l],I=x==="avg",C=eb[x]),c=P(u.start),S=P(u.end)+(c-Gr.tickIncrement(c,u.size,!1,s))/1e6;c<S&&r.length<1e6&&(k=Gr.tickIncrement(c,u.size,!1,s),r.push((c+k)/2),a.push(M),w.push([]),p.push(c),T&&_.push(1/(k-c)),I&&b.push(0),!(k<=c));)c=k;p.push(c),!h&&n.type==="date"&&(g={start:P(g.start),end:P(g.end),size:g.size}),t._fullLayout._roundFnOpts||(t._fullLayout._roundFnOpts={});var L=e["_"+o+"bingroup"],D={leftGap:1/0,rightGap:1/0};L&&(t._fullLayout._roundFnOpts[L]||(t._fullLayout._roundFnOpts[L]=D),D=t._fullLayout._roundFnOpts[L]);var z=a.length,F=!0,H=D.leftGap,U=D.rightGap,B={};for(c=0;c<d.length;c++){var X=d[c];A=ur.findBin(X,g),A>=0&&A<z&&(m+=C(A,c,a,R,b),F&&w[A].length&&X!==d[w[A][0]]&&(F=!1),w[A].push(c),B[c]=A,H=Math.min(H,X-p[A]),U=Math.min(U,p[A+1]-X))}D.leftGap=H,D.rightGap=U;var O;F||(O=function(ne,oe){return function(){var re=t._fullLayout._roundFnOpts[L];return mF(re.leftGap,re.rightGap,p,n,s)(ne,oe)}}),I&&(m=pF(a,b)),E&&E(a,m,_),f.enabled&&xF(a,f.direction,f.currentbin);var Y=Math.min(r.length,a.length),W=[],K=0,Z=Y-1;for(c=0;c<Y;c++)if(a[c]){K=c;break}for(c=Y-1;c>=K;c--)if(a[c]){Z=c;break}for(c=K;c<=Z;c++)if(Ad(r[c])&&Ad(a[c])){var ae={p:r[c],s:a[c],b:0};f.enabled||(ae.pts=w[c],F?ae.ph0=ae.ph1=w[c].length?d[w[c][0]]:r[c]:(e._computePh=!0,ae.ph0=O(p[c]),ae.ph1=O(p[c+1],!0))),W.push(ae)}return W.length===1&&(W[0].width1=Gr.tickIncrement(W[0].p,u.size,!1,s)-W[0].p),dF(W,e),ur.isArrayOrTypedArray(e.selectedpoints)&&ur.tagSelected(W,e,B),W}function hp(t,e,r,a,i){var n=a+"bins",o=t._fullLayout,l=e["_"+a+"bingroup"],s=o._histogramBinOpts[l],f=o.barmode==="overlay",c,v,u,d,h,p,g,_=function(X){return r.r2c(X,0,d)},b=function(X){return r.c2r(X,0,d)},w=r.type==="date"?function(X){return X||X===0?ur.cleanDate(X,null,d):null}:function(X){return Ad(X)?Number(X):null};function m(X,O,Y){O[X+"Found"]?(O[X]=w(O[X]),O[X]===null&&(O[X]=Y[X])):(p[X]=O[X]=Y[X],ur.nestedProperty(v[0],n+"."+X).set(Y[X]))}if(e["_"+a+"autoBinFinished"])delete e["_"+a+"autoBinFinished"];else{v=s.traces;var y=[],x=!0,T=!1,k=!1;for(c=0;c<v.length;c++)if(u=v[c],u.visible){var S=s.dirs[c];h=u["_"+S+"pos0"]=r.makeCalcdata(u,S),y=ur.concat(y,h),delete u["_"+a+"autoBinFinished"],e.visible===!0&&(x?x=!1:(delete u._autoBin,u["_"+a+"autoBinFinished"]=1),J0.traceIs(u,"2dMap")&&(T=!0),u.type==="histogram2dcontour"&&(k=!0))}d=v[0][a+"calendar"];var A=Gr.autoBin(y,r,s.nbins,T,d,s.sizeFound&&s.size),$=v[0]._autoBin={};if(p=$[s.dirs[0]]={},k&&(s.size||(A.start=b(Gr.tickIncrement(_(A.start),A.size,!0,d))),s.end===void 0&&(A.end=b(Gr.tickIncrement(_(A.end),A.size,!1,d)))),f&&!J0.traceIs(e,"2dMap")&&A._dataSpan===0&&r.type!=="category"&&r.type!=="multicategory"){if(i)return[A,h,!0];A=gF(t,e,r,a,n)}g=u.cumulative||{},g.enabled&&g.currentbin!=="include"&&(g.direction==="decreasing"?A.start=b(Gr.tickIncrement(_(A.start),A.size,!0,d)):A.end=b(Gr.tickIncrement(_(A.end),A.size,!1,d))),s.size=A.size,s.sizeFound||(p.size=A.size,ur.nestedProperty(v[0],n+".size").set(A.size)),m("start",s,A),m("end",s,A)}h=e["_"+a+"pos0"],delete e["_"+a+"pos0"];var M=e._input[n]||{},C=ur.extendFlat({},s),E=s.start,I=r.r2l(M.start),P=I!==void 0;if((s.startFound||P)&&I!==r.r2l(E)){var R=P?I:ur.aggNums(Math.min,null,h),L={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:s.size,tick0:E,calendar:d,range:[R,Gr.tickIncrement(R,s.size,!1,d)].map(r.l2r)},D=Gr.tickFirst(L);D>r.r2l(R)&&(D=Gr.tickIncrement(D,s.size,!0,d)),C.start=r.l2r(D),P||ur.nestedProperty(e,n+".start").set(C.start)}var z=s.end,F=r.r2l(M.end),H=F!==void 0;if((s.endFound||H)&&F!==r.r2l(z)){var U=H?F:ur.aggNums(Math.max,null,h);C.end=r.l2r(U),H||ur.nestedProperty(e,n+".start").set(C.end)}var B="autobin"+a;return e._input[B]===!1&&(e._input[n]=ur.extendFlat({},e[n]||{}),delete e._input[B],delete e[B]),[C,h]}function gF(t,e,r,a,i){var n=t._fullLayout,o=bF(t,e),l=!1,s=1/0,f=[e],c,v,u;for(c=0;c<o.length;c++)if(v=o[c],v===e)l=!0;else if(!l)u=n._histogramBinOpts[v["_"+a+"bingroup"]],s=Math.min(s,u.size||v[i].size);else{var d=hp(t,v,r,a,!0),h=d[0],p=d[2];v["_"+a+"autoBinFinished"]=1,v["_"+a+"pos0"]=d[1],p?f.push(v):s=Math.min(s,h.size)}var g=new Array(f.length);for(c=0;c<f.length;c++)for(var _=f[c]["_"+a+"pos0"],b=0;b<_.length;b++)if(_[b]!==void 0){g[c]=_[b];break}for(isFinite(s)||(s=ur.distinctVals(g).minDiff),c=0;c<f.length;c++){v=f[c];var w=v[a+"calendar"],m={start:r.c2r(g[c]-s/2,0,w),end:r.c2r(g[c]+s/2,0,w),size:s};v._input[i]=v[i]=m,u=n._histogramBinOpts[v["_"+a+"bingroup"]],u&&ur.extendFlat(u,m)}return e[i]}function bF(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 xF(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 _F={calc:yF,calcAllAutoBins:hp},wF=o2.hoverPoints,TF=Ct.exports.hoverLabelText,kF=function(e,r,a,i,n){var o=wF(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"]=TF(e[f+"a"],[l.ph0,l.ph1],s[f+"hoverformat"])}return o}},AF=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},MF={attributes:f2,layoutAttributes:sp,supplyDefaults:aF,crossTraceDefaults:lF,supplyLayoutDefaults:ET,calc:_F.calc,crossTraceCalc:HT.crossTraceCalc,plot:dp.plot,layerName:"barlayer",style:Ji.style,styleOnSelect:Ji.styleOnSelect,colorbar:Ol,hoverPoints:kF,selectPoints:l2,eventData:AF,moduleType:"trace",name:"histogram",basePlotModule:Yt,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(" ")}};(function(t){t.exports=MF})(s2);const hH=pi(s2.exports);var c2={exports:{}},SF=La,LF=_i.attributes,CF=dr,DF=hr,$F=Cr.hovertemplateAttrs,EF=Cr.texttemplateAttrs,Dn=Bt.extendFlat,Go=CF({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."}),Tc={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:DF.defaultLine,arrayOk:!0,editType:"style",description:["Sets the color of the line enclosing each sector."].join(" ")},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style",description:["Sets the width (in px) of the line enclosing each sector."].join(" ")},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot",description:["Sets text elements associated with each sector.","If trace `textinfo` contains a *text* flag, these elements will be seen","on the chart.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each sector.","If a single string, the same string appears for","all data points.","If an array of string, the items are mapped in order of","this trace's sectors.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},scalegroup:{valType:"string",dflt:"",editType:"calc",description:["If there are multiple pie charts that should be sized according to","their totals, link them by providing a non-empty group id here","shared by every trace in the same group."].join(" ")},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc",description:["Determines which trace information appear on the graph."].join(" ")},hoverinfo:Dn({},SF.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:$F({},{keys:["label","color","value","percent","text"]}),texttemplate:EF({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:Dn({},Go,{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:Dn({},Go,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:Dn({},Go,{description:"Sets the font used for `textinfo` lying outside the sector."}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether outside text labels can push the margins."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"plot",description:["Sets the title of the chart.","If it is empty, no title is displayed.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Dn({},Go,{description:["Sets the font used for `title`.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot",description:["Specifies the location of the `title`.","Note that the title's position used to be set","by the now deprecated `titleposition` attribute."].join(" ")},editType:"plot"},domain:LF({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:"number",min:-360,max:360,dflt:0,editType:"calc",description:["Instead of the first slice starting at 12 o'clock,","rotate to some other angle."].join(" ")},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc",description:["Sets the fraction of larger radius to pull the sectors","out from the center. This can be a constant","to pull all slices apart from each other equally","or an array to highlight one or more slices."].join(" ")},_deprecated:{title:{valType:"string",dflt:"",editType:"calc",description:["Deprecated in favor of `title.text`.","Note that value of `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:Dn({},Go,{description:"Deprecated in favor of `title.font`."}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc",description:"Deprecated in favor of `title.position`."}}},RF=lt,Md=de.exports,PF=Tc,zF=_i.defaults,IF=oo.handleText;function u2(t,e){var r=Array.isArray(t),a=Md.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(RF(l)&&l>0){n=!0;break}}n||(i=0)}return{hasLabels:r,hasValues:a,len:i}}function NF(t,e,r,a){function i(w,m){return Md.coerce(t,e,PF,w,m)}var n=i("labels"),o=i("values"),l=u2(n,o),s=l.len;if(e._hasLabels=l.hasLabels,e._hasValues=l.hasValues,!e._hasLabels&&e._hasValues&&(i("label0"),i("dlabel")),!s){e.visible=!1;return}e._length=s;var f=i("marker.line.width");f&&i("marker.line.color"),i("marker.colors"),i("scalegroup");var c=i("text"),v=i("texttemplate"),u;if(v||(u=i("textinfo",Array.isArray(c)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),v||u&&u!=="none"){var d=i("textposition");IF(t,e,a,i,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var h=Array.isArray(d)||d==="auto",p=h||d==="outside";p&&i("automargin"),(d==="inside"||d==="auto"||Array.isArray(d))&&i("insidetextorientation")}zF(e,a,i);var g=i("hole"),_=i("title.text");if(_){var b=i("title.position",g?"middle center":"top center");!g&&b==="middle center"&&(e.title.position="top center"),Md.coerceFont(i,"title.font",a.font)}i("sort"),i("direction"),i("rotation"),i("pull")}var FF={handleLabelsAndValues:u2,supplyDefaults:NF},v2={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(" ")}},HF=de.exports,OF=v2,BF=function(e,r){function a(i,n){return HF.coerce(e,r,OF,i,n)}a("hiddenlabels"),a("piecolorway",r.colorway),a("extendpiecolors")},jF=lt,Sd=Wr.exports,GF=Je.exports,UF={};function VF(t,e){var r=[],a=t._fullLayout,i=a.hiddenlabels||[],n=e.labels,o=e.marker.colors||[],l=e.values,s=e._length,f=e._hasValues&&s,c,v;if(e.dlabel)for(n=new Array(s),c=0;c<s;c++)n[c]=String(e.label0+c*e.dlabel);var u={},d=d2(a["_"+e.type+"colormap"]),h=0,p=!1;for(c=0;c<s;c++){var g,_,b;if(f){if(g=l[c],!jF(g))continue;g=+g}else g=1;_=n[c],(_===void 0||_==="")&&(_=c),_=String(_);var w=u[_];w===void 0?(u[_]=r.length,b=i.indexOf(_)!==-1,b||(h+=g),r.push({v:g,label:_,color:d(o[c],_),i:c,pts:[c],hidden:b})):(p=!0,v=r[w],v.v+=g,v.pts.push(c),v.hidden||(h+=g),v.color===!1&&o[c]&&(v.color=d(o[c],_)))}r=r.filter(function(y){return y.v>=0});var m=e.type==="funnelarea"?p:e.sort;return m&&r.sort(function(y,x){return x.v-y.v}),r[0]&&(r[0].vTotal=h),r}function d2(t){return function(r,a){return!r||(r=Sd(r),!r.isValid())?!1:(r=GF.addOpacity(r,r.getAlpha()),t[a]||(t[a]=r),r)}}function qF(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=h2(n,UF));for(var l=0,s=0;s<i.length;s++){var f=i[s],c=f[0].trace.type;if(c===r)for(var v=0;v<f.length;v++){var u=f[v];u.color===!1&&(o[u.label]?u.color=o[u.label]:(o[u.label]=u.color=n[l%n.length],l++))}}}function h2(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(Sd(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)i.push(Sd(t[r]).darken(20).toHexString());e[a]=i}return i}var Nf={calc:VF,crossTraceCalc:qF,makePullColorFn:d2,generateExtendedColors:h2},XF=Zr.appendArrayMultiPointValues,YF=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]),XF(a,r,e.pts),r.type==="funnelarea"&&(delete a.v,delete a.i),a},Tr=tt.exports,WF=Ut.exports,zs=ua,p2=Je.exports,Fa=Tt.exports,vr=de.exports,ZF=vr.strScale,tb=vr.strTranslate,Ld=ir,m2=Ya,KF=m2.recordMinTextSize,QF=m2.clearMinTextSize,y2=jl.TEXTPAD,wt=sn,Is=YF,rb=de.exports.isValidTextValue;function JF(t,e){var r=t._fullLayout,a=r._size;QF("pie",r),x2(e,t),S2(e,a);var i=vr.makeTraceGroups(r._pielayer,e,"trace").each(function(n){var o=Tr.select(this),l=n[0],s=l.trace;s4(n),o.attr("stroke-linejoin","round"),o.each(function(){var f=Tr.select(this).selectAll("g.slice").data(n);f.enter().append("g").classed("slice",!0),f.exit().remove();var c=[[[],[]],[[],[]]],v=!1;f.each(function(w,m){if(w.hidden){Tr.select(this).selectAll("path,g").remove();return}w.pointNumber=w.i,w.curveNumber=s.index,c[w.pxmid[1]<0?0:1][w.pxmid[0]<0?0:1].push(w);var y=l.cx,x=l.cy,T=Tr.select(this),k=T.selectAll("path.surface").data([w]);if(k.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),T.call(g2,t,n),s.pull){var S=+wt.castOption(s.pull,w.pts)||0;S>0&&(y+=S*w.pxmid[0],x+=S*w.pxmid[1])}w.cxFinal=y,w.cyFinal=x;function A(R,L,D,z){var F=z*(L[0]-R[0]),H=z*(L[1]-R[1]);return"a"+z*l.r+","+z*l.r+" 0 "+w.largeArc+(D?" 1 ":" 0 ")+F+","+H}var $=s.hole;if(w.v===l.vTotal){var M="M"+(y+w.px0[0])+","+(x+w.px0[1])+A(w.px0,w.pxmid,!0,1)+A(w.pxmid,w.px0,!0,1)+"Z";$?k.attr("d","M"+(y+$*w.px0[0])+","+(x+$*w.px0[1])+A(w.px0,w.pxmid,!1,$)+A(w.pxmid,w.px0,!1,$)+"Z"+M):k.attr("d",M)}else{var C=A(w.px0,w.px1,!0,1);if($){var E=1-$;k.attr("d","M"+(y+$*w.px1[0])+","+(x+$*w.px1[1])+A(w.px1,w.px0,!1,$)+"l"+E*w.px0[0]+","+E*w.px0[1]+C+"Z")}else k.attr("d","M"+y+","+x+"l"+w.px0[0]+","+w.px0[1]+C+"Z")}L2(t,w,l);var I=wt.castOption(s.textposition,w.pts),P=T.selectAll("g.slicetext").data(w.text&&I!=="none"?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var R=vr.ensureSingle(Tr.select(this),"text","",function(X){X.attr("data-notex",1)}),L=vr.ensureUniformFontSize(t,I==="outside"?t4(s,w,r.font):b2(s,w,r.font));R.text(w.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Fa.font,L).call(Ld.convertToTspans,t);var D=Fa.bBox(R.node()),z;if(I==="outside")z=nb(D,w);else if(z=_2(D,w,l),I==="auto"&&z.scale<1){var F=vr.ensureUniformFontSize(t,s.outsidetextfont);R.call(Fa.font,F),D=Fa.bBox(R.node()),z=nb(D,w)}var H=z.textPosAngle,U=H===void 0?w.pxmid:af(l.r,H);if(z.targetX=y+U[0]*z.rCenter+(z.x||0),z.targetY=x+U[1]*z.rCenter+(z.y||0),C2(z,D),z.outside){var B=z.targetY;w.yLabelMin=B-D.height/2,w.yLabelMid=B,w.yLabelMax=B+D.height/2,w.labelExtraX=0,w.labelExtraY=0,v=!0}z.fontSize=L.size,KF(s.type,z,r),n[m].transform=z,R.attr("transform",vr.getTextTransform(z))})});var u=Tr.select(this).selectAll("g.titletext").data(s.title.text?[0]:[]);if(u.enter().append("g").classed("titletext",!0),u.exit().remove(),u.each(function(){var w=vr.ensureSingle(Tr.select(this),"text","",function(x){x.attr("data-notex",1)}),m=s.title.text;s._meta&&(m=vr.templateString(m,s._meta)),w.text(m).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Fa.font,s.title.font).call(Ld.convertToTspans,t);var y;s.title.position==="middle center"?y=i4(l):y=A2(l,a),w.attr("transform",tb(y.x,y.y)+ZF(Math.min(1,y.scale))+tb(y.tx,y.ty))}),v&&o4(c,s),e4(f,s),v&&s.automargin){var d=Fa.bBox(o.node()),h=s.domain,p=a.w*(h.x[1]-h.x[0]),g=a.h*(h.y[1]-h.y[0]),_=(.5*p-l.r)/a.w,b=(.5*g-l.r)/a.h;WF.autoMargin(t,"pie."+s.uid+".automargin",{xl:h.x[0]-_,xr:h.x[1]+_,yb:h.y[0]-b,yt:h.y[1]+b,l:Math.max(l.cx-l.r-d.left,0),r:Math.max(d.right-(l.cx+l.r),0),b:Math.max(d.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-d.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var n=Tr.select(this);n.attr("dy")&&n.attr("dy",n.attr("dy"))})},0)}function e4(t,e){t.each(function(r){var a=Tr.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,i.attr("transform",vr.getTextTransform(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;vr.ensureSingle(a,"path","textline").call(p2.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:l,fill:"none"})})}function g2(t,e,r){var a=r[0],i=a.cx,n=a.cy,o=a.trace,l=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),t.on("mouseover",function(s){var f=e._fullLayout,c=e._fullData[o.index];if(!(e._dragging||f.hovermode===!1)){var v=c.hoverinfo;if(Array.isArray(v)&&(v=zs.castHoverinfo({hoverinfo:[wt.castOption(v,s.pts)],_module:o._module},f,0)),v==="all"&&(v="label+text+value+percent+name"),c.hovertemplate||v!=="none"&&v!=="skip"&&v){var u=s.rInscribed||0,d=i+s.pxmid[0]*(1-u),h=n+s.pxmid[1]*(1-u),p=f.separators,g=[];if(v&&v.indexOf("label")!==-1&&g.push(s.label),s.text=wt.castOption(c.hovertext||c.text,s.pts),v&&v.indexOf("text")!==-1){var _=s.text;vr.isValidTextValue(_)&&g.push(_)}s.value=s.v,s.valueLabel=wt.formatPieValue(s.v,p),v&&v.indexOf("value")!==-1&&g.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=wt.formatPiePercent(s.percent,p),v&&v.indexOf("percent")!==-1&&g.push(s.percentLabel);var b=c.hoverlabel,w=b.font,m=[];zs.loneHover({trace:o,x0:d-u*a.r,x1:d+u*a.r,y:h,_x0:l?i+s.TL[0]:d-u*a.r,_x1:l?i+s.TR[0]:d+u*a.r,_y0:l?n+s.TL[1]:h-u*a.r,_y1:l?n+s.BL[1]:h+u*a.r,text:g.join("<br>"),name:c.hovertemplate||v.indexOf("name")!==-1?c.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:wt.castOption(b.bgcolor,s.pts)||s.color,borderColor:wt.castOption(b.bordercolor,s.pts),fontFamily:wt.castOption(w.family,s.pts),fontSize:wt.castOption(w.size,s.pts),fontColor:wt.castOption(w.color,s.pts),nameLength:wt.castOption(b.namelength,s.pts),textAlign:wt.castOption(b.align,s.pts),hovertemplate:wt.castOption(c.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[Is(s,c)]},{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:e,inOut_bbox:m}),s.bbox=m[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[Is(s,c)],event:Tr.event})}}),t.on("mouseout",function(s){var f=e._fullLayout,c=e._fullData[o.index],v=Tr.select(this).datum();o._hasHoverEvent&&(s.originalEvent=Tr.event,e.emit("plotly_unhover",{points:[Is(v,c)],event:Tr.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(zs.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=[Is(s,c)],zs.click(e,Tr.event))})}function t4(t,e,r){var a=wt.castOption(t.outsidetextfont.color,e.pts)||wt.castOption(t.textfont.color,e.pts)||r.color,i=wt.castOption(t.outsidetextfont.family,e.pts)||wt.castOption(t.textfont.family,e.pts)||r.family,n=wt.castOption(t.outsidetextfont.size,e.pts)||wt.castOption(t.textfont.size,e.pts)||r.size;return{color:a,family:i,size:n}}function b2(t,e,r){var a=wt.castOption(t.insidetextfont.color,e.pts);!a&&t._input.textfont&&(a=wt.castOption(t._input.textfont.color,e.pts));var i=wt.castOption(t.insidetextfont.family,e.pts)||wt.castOption(t.textfont.family,e.pts)||r.family,n=wt.castOption(t.insidetextfont.size,e.pts)||wt.castOption(t.textfont.size,e.pts)||r.size;return{color:a||p2.contrast(e.color),family:i,size:n}}function x2(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=vr.templateString(n,a._meta));var o=Fa.tester.append("text").attr("data-notex",1).text(n).call(Fa.font,a.title.font).call(Ld.convertToTspans,e),l=Fa.bBox(o.node(),!0);r.titleBox={width:l.width,height:l.height},o.remove()}}function _2(t,e,r){var a=r.r||e.rpx1,i=e.rInscribed,n=e.startangle===e.stopangle;if(n)return{rCenter:1-i,scale:0,rotate:0,textPosAngle:0};var o=e.ring,l=o===1&&Math.abs(e.startangle-e.stopangle)===Math.PI*2,s=e.halfangle,f=e.midangle,c=r.trace.insidetextorientation,v=c==="horizontal",u=c==="tangential",d=c==="radial",h=c==="auto",p=[],g;if(!h){var _=function(k,S){if(r4(e,k)){var A=Math.abs(k-e.startangle),$=Math.abs(k-e.stopangle),M=A<$?A:$;S==="tan"?g=ib(t,a,o,M,0):g=ab(t,a,o,M,Math.PI/2),g.textPosAngle=k,p.push(g)}},b;if(v||u){for(b=4;b>=-4;b-=2)_(Math.PI*b,"tan");for(b=4;b>=-4;b-=2)_(Math.PI*(b+1),"tan")}if(v||d){for(b=4;b>=-4;b-=2)_(Math.PI*(b+1.5),"rad");for(b=4;b>=-4;b-=2)_(Math.PI*(b+.5),"rad")}}if(l||h||v){var w=Math.sqrt(t.width*t.width+t.height*t.height);if(g={scale:i*a*2/w,rCenter:1-i,rotate:0},g.textPosAngle=(e.startangle+e.stopangle)/2,g.scale>=1)return g;p.push(g)}(h||d)&&(g=ab(t,a,o,s,f),g.textPosAngle=(e.startangle+e.stopangle)/2,p.push(g)),(h||u)&&(g=ib(t,a,o,s,f),g.textPosAngle=(e.startangle+e.stopangle)/2,p.push(g));for(var m=0,y=0,x=0;x<p.length;x++){var T=p[x].scale;if(y<T&&(y=T,m=x),!h&&y>=1)break}return p[m]}function r4(t,e){var r=t.startangle,a=t.stopangle;return r>e&&e>a||r<e&&e<a}function ab(t,e,r,a,i){e=Math.max(0,e-2*y2);var n=t.width/t.height,o=k2(n,a,e,r);return{scale:o*2/t.height,rCenter:w2(n,o/e),rotate:T2(i)}}function ib(t,e,r,a,i){e=Math.max(0,e-2*y2);var n=t.height/t.width,o=k2(n,a,e,r);return{scale:o*2/t.width,rCenter:w2(n,o/e),rotate:T2(i+Math.PI/2)}}function w2(t,e){return Math.cos(e)-t*e}function T2(t){return(180/Math.PI*t+720)%180-90}function k2(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 a4(t,e){return t.v===e.vTotal&&!e.trace.hole?1:Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2)}function nb(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 i4(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 A2(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=M2(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=n4(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=Cd(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,a),tx:l.tx,ty:l.ty}}function n4(t,e){return t/(e===void 0?1:e)}function Cd(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 M2(t){var e=t.pull;if(!e)return 0;var r;if(Array.isArray(e))for(e=0,r=0;r<t.pull.length;r++)t.pull[r]>e&&(e=t.pull[r]);return e}function o4(t,e){var r,a,i,n,o,l,s,f,c,v,u,d,h;function p(w,m){return w.pxmid[1]-m.pxmid[1]}function g(w,m){return m.pxmid[1]-w.pxmid[1]}function _(w,m){m||(m={});var y=m.labelExtraY+(a?m.yLabelMax:m.yLabelMin),x=a?w.yLabelMin:w.yLabelMax,T=a?w.yLabelMax:w.yLabelMin,k=w.cyFinal+o(w.px0[1],w.px1[1]),S=y-x,A,$,M,C,E,I;if(S*s>0&&(w.labelExtraY=S),!!Array.isArray(e.pull))for($=0;$<v.length;$++)M=v[$],!(M===w||(wt.castOption(e.pull,w.pts)||0)>=(wt.castOption(e.pull,M.pts)||0))&&((w.pxmid[1]-M.pxmid[1])*s>0?(C=M.cyFinal+o(M.px0[1],M.px1[1]),S=C-x-w.labelExtraY,S*s>0&&(w.labelExtraY+=S)):(T+w.labelExtraY-k)*s>0&&(A=3*l*Math.abs($-v.indexOf(w)),E=M.cxFinal+n(M.px0[0],M.px1[0]),I=E+A-(w.cxFinal+w.pxmid[0])-w.labelExtraX,I*l>0&&(w.labelExtraX+=I)))}for(a=0;a<2;a++)for(i=a?p:g,o=a?Math.max:Math.min,s=a?1:-1,r=0;r<2;r++){for(n=r?Math.max:Math.min,l=r?1:-1,f=t[a][r],f.sort(i),c=t[1-a][r],v=c.concat(f),d=[],u=0;u<f.length;u++)f[u].yLabelMid!==void 0&&d.push(f[u]);for(h=!1,u=0;a&&u<c.length;u++)if(c[u].yLabelMid!==void 0){h=c[u];break}for(u=0;u<d.length;u++){var b=u&&d[u-1];h&&!u&&(b=h),_(d[u],b)}}}function S2(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-=Cd(i,e));var f=l/2,c=s/2;n.type==="funnelarea"&&!n.scalegroup&&(c/=n.aspectratio),i.r=Math.min(f,c)/(1+M2(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-=Cd(i,e)),n.scalegroup&&r.indexOf(n.scalegroup)===-1&&r.push(n.scalegroup)}l4(t,r)}function l4(t,e){for(var r,a,i,n=0;n<e.length;n++){var o=1/0,l=e[n];for(a=0;a<t.length;a++)if(r=t[a][0],i=r.trace,i.scalegroup===l){var s;if(i.type==="pie")s=r.r*r.r;else if(i.type==="funnelarea"){var f,c;i.aspectratio>1?(f=r.r,c=f/i.aspectratio):(c=r.r,f=c*i.aspectratio),f*=(1+i.baseratio)/2,s=f*c}o=Math.min(o,s/r.vTotal)}for(a=0;a<t.length;a++)if(r=t[a][0],i=r.trace,i.scalegroup===l){var v=o*r.vTotal;i.type==="funnelarea"&&(v/=(1+i.baseratio)/2,v/=i.aspectratio),r.r=Math.sqrt(v)}}}function s4(t){var e=t[0],r=e.r,a=e.trace,i=wt.getRotationAngle(a.rotation),n=2*Math.PI/e.vTotal,o="px0",l="px1",s,f,c;if(a.direction==="counterclockwise"){for(s=0;s<t.length&&t[s].hidden;s++);if(s===t.length)return;i+=n*t[s].v,n*=-1,o="px1",l="px0"}for(c=af(r,i),s=0;s<t.length;s++)f=t[s],!f.hidden&&(f[o]=c,f.startangle=i,i+=n*f.v/2,f.pxmid=af(r,i),f.midangle=i,i+=n*f.v/2,c=af(r,i),f.stopangle=i,f[l]=c,f.largeArc=f.v>e.vTotal/2?1:0,f.halfangle=Math.PI*Math.min(f.v/e.vTotal,.5),f.ring=1-a.hole,f.rInscribed=a4(f,e))}function af(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function L2(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(m){return l.indexOf(m)!==-1},f=s("label"),c=s("text"),v=s("value"),u=s("percent"),d=a.separators,h;if(h=f?[e.label]:[],c){var p=wt.getFirstFilled(i.text,e.pts);rb(p)&&h.push(p)}v&&h.push(wt.formatPieValue(e.v,d)),u&&h.push(wt.formatPiePercent(e.v/r.vTotal,d)),e.text=h.join("<br>")}function g(m){return{label:m.label,value:m.v,valueLabel:wt.formatPieValue(m.v,a.separators),percent:m.v/r.vTotal,percentLabel:wt.formatPiePercent(m.v/r.vTotal,a.separators),color:m.color,text:m.text,customdata:vr.castOption(i,m.i,"customdata")}}if(n){var _=vr.castOption(i,e.i,"texttemplate");if(!_)e.text="";else{var b=g(e),w=wt.getFirstFilled(i.text,e.pts);(rb(w)||w==="")&&(b.text=w),e.text=vr.texttemplateString(_,b,t._fullLayout._d3locale,b,i._meta||{})}}}function C2(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 D2={plot:JF,formatSliceLabel:L2,transformInsideText:_2,determineInsideTextFont:b2,positionTitleOutside:A2,prerenderTitles:x2,layoutAreas:S2,attachFxHandlers:g2,computeTransform:C2},ob=tt.exports,f4=ph,c4=Ya.resizeText,u4=function(e){var r=e._fullLayout._pielayer.selectAll(".trace");c4(e,r,"pie"),r.each(function(a){var i=a[0],n=i.trace,o=ob.select(this);o.style({opacity:n.opacity}),o.selectAll("path.surface").each(function(l){ob.select(this).call(f4,l,n)})})},$2={};(function(t){var e=Ut.exports;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)}})($2);var v4={attributes:Tc,supplyDefaults:FF.supplyDefaults,supplyLayoutDefaults:BF,layoutAttributes:v2,calc:Nf.calc,crossTraceCalc:Nf.crossTraceCalc,plot:D2.plot,style:u4,styleOne:ph,moduleType:"trace",name:"pie",basePlotModule:$2,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(" ")}};(function(t){t.exports=v4})(c2);const pH=pi(c2.exports);var E2={exports:{}},R2={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}},nf=de.exports.extendFlat,of=xo,lb=mo.axisHoverFormat,Dd=Ga.dash,d4=Uf,P2=R2,h4=P2.INCREASING.COLOR,p4=P2.DECREASING.COLOR,Ff=of.line;function sb(t){return{line:{color:nf({},Ff.color,{dflt:t}),width:Ff.width,dash:Dd,editType:"style"},editType:"style"}}var z2={xperiod:of.xperiod,xperiod0:of.xperiod0,xperiodalignment:of.xperiodalignment,xhoverformat:lb("x"),yhoverformat:lb("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:nf({},Ff.width,{description:[Ff.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:nf({},Dd,{description:[Dd.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:sb(h4),decreasing:sb(p4),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:nf({},d4.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}})},m4=Ve,y4=de.exports,g4=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=m4.getComponentMethod("calendars","handleTraceDefaults");if(c(e,r,["x"],i),!!(o&&l&&s&&f)){var v=Math.min(o.length,l.length,s.length,f.length);return n&&(v=Math.min(v,y4.minRowLength(n))),r._length=v,v}},b4=de.exports,x4=g4,_4=pc,w4=z2,T4=function(e,r,a,i){function n(l,s){return b4.coerce(e,r,w4,l,s)}var o=x4(e,r,n,i);if(!o){r.visible=!1;return}_4(e,r,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),fb(e,r,n,"increasing"),fb(e,r,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),i._requestRangeslider[r.xaxis]=!0};function fb(t,e,r,a){r(a+".line.color"),r(a+".line.width",e.line.width),r(a+".line.dash",e.line.dash)}var kc=de.exports,Ns=kc._,lf=Ct.exports,k4=mc,Uo=Ot.BADNUM;function A4(t,e){var r=lf.getFromId(t,e.xaxis),a=lf.getFromId(t,e.yaxis),i=S4(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=I2(t,e,o,l,a,M4);return e._extremes[r._id]=lf.findExtremes(r,l,{vpad:n/2}),s.length?(kc.extendFlat(s[0].t,{wHover:n/2,tickLen:i}),s):[{t:{empty:!0}}]}function M4(t,e,r,a){return{o:t,h:e,l:r,c:a}}function I2(t,e,r,a,i,n){for(var o=i.makeCalcdata(e,"open"),l=i.makeCalcdata(e,"high"),s=i.makeCalcdata(e,"low"),f=i.makeCalcdata(e,"close"),c=Array.isArray(e.text),v=Array.isArray(e.hovertext),u=!0,d=null,h=!!e.xperiodalignment,p=[],g=0;g<a.length;g++){var _=a[g],b=o[g],w=l[g],m=s[g],y=f[g];if(_!==Uo&&b!==Uo&&w!==Uo&&m!==Uo&&y!==Uo){y===b?d!==null&&y!==d&&(u=y>d):u=y>b,d=y;var x=n(b,w,m,y);x.pos=_,x.yc=(b+y)/2,x.i=g,x.dir=u?"increasing":"decreasing",x.x=x.pos,x.y=[m,w],h&&(x.orig_p=r[g]),c&&(x.tx=e.text[g]),v&&(x.htx=e.hovertext[g]),p.push(x)}else p.push({pos:_,empty:!0})}return e._extremes[i._id]=lf.findExtremes(i,kc.concat(s,l),{padded:!0}),p.length&&(p[0].t={labels:{open:Ns(t,"open:")+" ",high:Ns(t,"high:")+" ",low:Ns(t,"low:")+" ",close:Ns(t,"close:")+" "}}),p}function S4(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=k4(r,e,"x",s).vals;l._xcalc=f;var c=kc.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 L4={calc:A4,calcCommon:I2},C4=tt.exports,cb=de.exports,D4=function(e,r,a,i){var n=r.yaxis,o=r.xaxis,l=!!o.rangebreaks;cb.makeTraceGroups(i,a,"trace ohlc").each(function(s){var f=C4.select(this),c=s[0],v=c.t,u=c.trace;if(u.visible!==!0||v.empty){f.remove();return}var d=v.tickLen,h=f.selectAll("path").data(cb.identity);h.enter().append("path"),h.exit().remove(),h.attr("d",function(p){if(p.empty)return"M0,0Z";var g=o.c2p(p.pos-d,!0),_=o.c2p(p.pos+d,!0),b=l?(g+_)/2:o.c2p(p.pos,!0),w=n.c2p(p.o,!0),m=n.c2p(p.h,!0),y=n.c2p(p.l,!0),x=n.c2p(p.c,!0);return"M"+g+","+w+"H"+b+"M"+b+","+m+"V"+y+"M"+_+","+x+"H"+b})})},bv=tt.exports,$4=Tt.exports,E4=Je.exports,R4=function(e,r,a){var i=a||bv.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;bv.select(this).selectAll("path").each(function(l){if(!l.empty){var s=o[l.dir].line;bv.select(this).style("fill","none").call(E4.stroke,s.color).call($4.dashLine,s.dash,s.width).style("opacity",o.selectedpoints&&!l.selected?.3:1)}})})},$d=Ct.exports,P4=de.exports,Fs=ua,z4=Je.exports,I4=de.exports.fillText,ub=R2,N4={increasing:ub.INCREASING.SYMBOL,decreasing:ub.DECREASING.SYMBOL};function F4(t,e,r,a){var i=t.cd,n=i[0].trace;return n.hoverlabel.split?F2(t,e,r,a):H2(t,e,r,a)}function N2(t,e,r,a){var i=t.cd,n=t.xa,o=i[0].trace,l=i[0].t,s=o.type,f=s==="ohlc"?"l":"min",c=s==="ohlc"?"h":"max",v,u,d=l.bPos||0,h=function(A){return A.pos+d-e},p=l.bdPos||l.tickLen,g=l.wHover,_=Math.min(1,p/Math.abs(n.r2c(n.range[1])-n.r2c(n.range[0])));v=t.maxHoverDistance-_,u=t.maxSpikeDistance-_;function b(A){var $=h(A);return Fs.inbox($-g,$+g,v)}function w(A){var $=A[f],M=A[c];return $===M||Fs.inbox($-r,M-r,v)}function m(A){return(b(A)+w(A))/2}var y=Fs.getDistanceFunction(a,b,w,m);if(Fs.getClosest(i,y,t),t.index===!1)return null;var x=i[t.index];if(x.empty)return null;var T=x.dir,k=o[T],S=k.line.color;return z4.opacity(S)&&k.line.width?t.color=S:t.color=k.fillcolor,t.x0=n.c2p(x.pos+d-p,!0),t.x1=n.c2p(x.pos+d+p,!0),t.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,t.spikeDistance=m(x)*u/v,t.xSpike=n.c2p(x.pos,!0),t}function F2(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=[],f=N2(t,e,r,a);if(!f)return[];var c=f.index,v=i[c],u=v.hi||o.hoverinfo,d=u.split("+"),h=u==="all",p=h||d.indexOf("y")!==-1;if(!p)return[];for(var g=["high","open","close","low"],_={},b=0;b<g.length;b++){var w=g[b],m=o[w][f.index],y=n.c2p(m,!0),x;m in _?(x=_[m],x.yLabel+="<br>"+l.labels[w]+$d.hoverLabelText(n,m,o.yhoverformat)):(x=P4.extendFlat({},f),x.y0=x.y1=y,x.yLabelVal=m,x.yLabel=l.labels[w]+$d.hoverLabelText(n,m,o.yhoverformat),x.name="",s.push(x),_[m]=x)}return s}function H2(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=N2(t,e,r,a);if(!s)return[];var f=s.index,c=i[f],v=s.index=c.i,u=c.dir;function d(m){return l.labels[m]+$d.hoverLabelText(n,o[m][v],o.yhoverformat)}var h=c.hi||o.hoverinfo,p=h.split("+"),g=h==="all",_=g||p.indexOf("y")!==-1,b=g||p.indexOf("text")!==-1,w=_?[d("open"),d("high"),d("low"),d("close")+" "+N4[u]]:[];return b&&I4(c,o,w),s.extraText=w.join("<br>"),s.y0=s.y1=n.c2p(c.yc,!0),[s]}var H4={hoverPoints:F4,hoverSplit:F2,hoverOnPoints:H2},O4=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},B4={moduleType:"trace",name:"ohlc",basePlotModule:Yt,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:z2,supplyDefaults:T4,calc:L4.calc,plot:D4,style:R4,hoverPoints:H4.hoverPoints,selectPoints:O4};(function(t){t.exports=B4})(E2);const mH=pi(E2.exports);var O2={exports:{}},j4=Ve,wa=de.exports,G4=Ew;function U4(t,e,r,a){var i=t.cd,n=i[0].t,o=i[0].trace,l=t.xa,s=t.ya,f=n.x,c=n.y,v=l.c2p(e),u=s.c2p(r),d=t.distance,h;if(n.tree){var p=l.p2c(v-d),g=l.p2c(v+d),_=s.p2c(u-d),b=s.p2c(u+d);a==="x"?h=n.tree.range(Math.min(p,g),Math.min(s._rl[0],s._rl[1]),Math.max(p,g),Math.max(s._rl[0],s._rl[1])):h=n.tree.range(Math.min(p,g),Math.min(_,b),Math.max(p,g),Math.max(_,b))}else h=n.ids;var w,m,y,x,T,k,S,A,$,M=d;if(a==="x"){var C=!!o.xperiodalignment,E=!!o.yperiodalignment;for(T=0;T<h.length;T++){if(w=h[T],y=f[w],k=Math.abs(l.c2p(y)-v),C){var I=l.c2p(o._xStarts[w]),P=l.c2p(o._xEnds[w]);k=v>=Math.min(I,P)&&v<=Math.max(I,P)?0:1/0}if(k<M){if(M=k,x=c[w],S=s.c2p(x)-u,E){var R=s.c2p(o._yStarts[w]),L=s.c2p(o._yEnds[w]);S=u>=Math.min(R,L)&&u<=Math.max(R,L)?0:1/0}$=Math.sqrt(k*k+S*S),m=h[T]}}}else for(T=h.length-1;T>-1;T--)w=h[T],y=f[w],x=c[w],k=l.c2p(y)-v,S=s.c2p(x)-u,A=Math.sqrt(k*k+S*S),A<M&&(M=$=A,m=w);return t.index=m,t.distance=M,t.dxy=$,m===void 0?[t]:[B2(t,f,c,o)]}function B2(t,e,r,a){var i=t.xa,n=t.ya,o=t.distance,l=t.dxy,s=t.index,f={pointNumber:s,x:e[s],y:r[s]};f.tx=Array.isArray(a.text)?a.text[s]:a.text,f.htx=Array.isArray(a.hovertext)?a.hovertext[s]:a.hovertext,f.data=Array.isArray(a.customdata)?a.customdata[s]:a.customdata,f.tp=Array.isArray(a.textposition)?a.textposition[s]:a.textposition;var c=a.textfont;c&&(f.ts=wa.isArrayOrTypedArray(c.size)?c.size[s]:c.size,f.tc=Array.isArray(c.color)?c.color[s]:c.color,f.tf=Array.isArray(c.family)?c.family[s]:c.family);var v=a.marker;v&&(f.ms=wa.isArrayOrTypedArray(v.size)?v.size[s]:v.size,f.mo=wa.isArrayOrTypedArray(v.opacity)?v.opacity[s]:v.opacity,f.mx=wa.isArrayOrTypedArray(v.symbol)?v.symbol[s]:v.symbol,f.mc=wa.isArrayOrTypedArray(v.color)?v.color[s]:v.color);var u=v&&v.line;u&&(f.mlc=Array.isArray(u.color)?u.color[s]:u.color,f.mlw=wa.isArrayOrTypedArray(u.width)?u.width[s]:u.width);var d=v&&v.gradient;d&&d.type!=="none"&&(f.mgt=Array.isArray(d.type)?d.type[s]:d.type,f.mgc=Array.isArray(d.color)?d.color[s]:d.color);var h=i.c2p(f.x,!0),p=n.c2p(f.y,!0),g=f.mrc||1,_=a.hoverlabel;_&&(f.hbg=Array.isArray(_.bgcolor)?_.bgcolor[s]:_.bgcolor,f.hbc=Array.isArray(_.bordercolor)?_.bordercolor[s]:_.bordercolor,f.hts=wa.isArrayOrTypedArray(_.font.size)?_.font.size[s]:_.font.size,f.htc=Array.isArray(_.font.color)?_.font.color[s]:_.font.color,f.htf=Array.isArray(_.font.family)?_.font.family[s]:_.font.family,f.hnl=wa.isArrayOrTypedArray(_.namelength)?_.namelength[s]:_.namelength);var b=a.hoverinfo;b&&(f.hi=Array.isArray(b)?b[s]:b);var w=a.hovertemplate;w&&(f.ht=Array.isArray(w)?w[s]:w);var m={};m[t.index]=f;var y=a._origX,x=a._origY,T=wa.extendFlat({},t,{color:G4(a,f),x0:h-g,x1:h+g,xLabelVal:y?y[s]:f.x,y0:p-g,y1:p+g,yLabelVal:x?x[s]:f.y,cd:m,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),wa.fillText(f,a,T),j4.getComponentMethod("errorbars","hoverInfo")(f,a,T),T}var V4={hoverPoints:U4,calcHover:B2},pp={exports:{}},vb=20,Ac={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:vb,SYMBOL_STROKE:vb/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]}},q4=La,Pt=xo,db=mo.axisHoverFormat,hb=ln,X4=Yd,xv=Bt.extendFlat,Y4=gi.overrideAll,W4=Ac.DASHES,pb=Pt.line,ni=Pt.marker,Z4=ni.line,Un=pp.exports=Y4({x:Pt.x,x0:Pt.x0,dx:Pt.dx,y:Pt.y,y0:Pt.y0,dy:Pt.dy,xperiod:Pt.xperiod,yperiod:Pt.yperiod,xperiod0:Pt.xperiod0,yperiod0:Pt.yperiod0,xperiodalignment:Pt.xperiodalignment,yperiodalignment:Pt.yperiodalignment,xhoverformat:db("x"),yhoverformat:db("y"),text:Pt.text,hovertext:Pt.hovertext,textposition:Pt.textposition,textfont:Pt.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:pb.color,width:pb.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:X4(W4),dflt:"solid",description:"Sets the style of the lines."}},marker:xv({},hb("marker"),{symbol:ni.symbol,size:ni.size,sizeref:ni.sizeref,sizemin:ni.sizemin,sizemode:ni.sizemode,opacity:ni.opacity,colorbar:ni.colorbar,line:xv({},hb("marker.line"),{width:Z4.width})}),connectgaps:Pt.connectgaps,fill:xv({},Pt.fill,{dflt:"none"}),fillcolor:Pt.fillcolor,selected:{marker:Pt.selected.marker,textfont:Pt.selected.textfont},unselected:{marker:Pt.unselected.marker,textfont:Pt.unselected.textfont},opacity:q4.opacity},"calc","nested");Un.x.editType=Un.y.editType=Un.x0.editType=Un.y0.editType="calc+clearAxisTypes";Un.hovertemplate=Pt.hovertemplate;Un.texttemplate=Pt.texttemplate;var Mc={},j2=Ac;Mc.isOpenSymbol=function(t){return typeof t=="string"?j2.OPEN_RE.test(t):t%200>100};Mc.isDotSymbol=function(t){return typeof t=="string"?j2.DOT_RE.test(t):t>200};var mb=de.exports,K4=Ve,Q4=Mc,J4=pp.exports,e6=hc,Hs=mr,t6=Uh,r6=pc,a6=hw,i6=pw,n6=yw,o6=mw,l6=function(e,r,a,i){function n(d,h){return mb.coerce(e,r,J4,d,h)}var o=e.marker?Q4.isOpenSymbol(e.marker.symbol):!1,l=Hs.isBubble(e),s=t6(e,r,i,n);if(!s){r.visible=!1;return}r6(e,r,i,n),n("xhoverformat"),n("yhoverformat");var f=s<e6.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("hovertemplate"),n("mode",f),Hs.hasLines(r)&&(n("connectgaps"),i6(e,r,a,i,n),n("line.shape")),Hs.hasMarkers(r)&&(a6(e,r,a,i,n),n("marker.line.width",o||l?1:0)),Hs.hasText(r)&&(n("texttemplate"),o6(e,r,i,n));var c=(r.line||{}).color,v=(r.marker||{}).color;n("fill"),r.fill!=="none"&&n6(e,r,a,n);var u=K4.getComponentMethod("errorbars","supplyDefaults");u(e,r,c||v||a,{axis:"y"}),u(e,r,c||v||a,{axis:"x",inherit:"y"}),mb.coerceSelectionMarkerOpacity(r,n)},s6=$w,f6=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]),s6(e,r,a)},G2=lt,c6=Wr.exports,Hf=nx,Of=Kn,u6=hr.defaultLine,yb=Sr.isArrayOrTypedArray,Ed=Hf(u6),U2=1;function gb(t,e){var r=t;return r[3]*=e,r}function bb(t){if(G2(t))return Ed;var e=Hf(t);return e.length?e:Ed}function xb(t){return G2(t)?t:U2}function v6(t,e,r){var a=t.color,i=yb(a),n=yb(e),o=Of.extractOpts(t),l=[],s,f,c,v,u;if(o.colorscale!==void 0?s=Of.makeColorScaleFuncFromTrace(t):s=bb,i?f=function(h,p){return h[p]===void 0?Ed:Hf(s(h[p]))}:f=bb,n?c=function(h,p){return h[p]===void 0?U2:xb(h[p])}:c=xb,i||n)for(var d=0;d<r;d++)v=f(a,d),u=c(e,d),l[d]=gb(v,u);else l=gb(Hf(a),e);return l}function d6(t){var e=Of.extractOpts(t),r=e.colorscale;return e.reversescale&&(r=Of.flipScale(e.colorscale)),r.map(function(a){var i=a[0],n=c6(a[1]),o=n.toRgb();return{index:i,rgb:[o.r,o.g,o.b,o.a]}})}var h6={formatColor:v6,parseColorScale:d6},sf=lt,p6=mk,Os=nx,m6=Ve,Er=de.exports,Jo=Tt.exports,_b=Vt,wb=h6.formatColor,Wn=mr,y6=M1,Rd=Mc,Vl=Ac,g6=Dl.DESELECTDIM,Tb={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},b6=Zr.appendArrayPointValue;function x6(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(Wn.hasText(e)&&(a.text=V2(t,e),a.textSel=kb(t,e,e.selected),a.textUnsel=kb(t,e,e.unselected)),Wn.hasMarkers(e)&&(a.marker=mp(e),a.markerSel=Pd(e,e.selected),a.markerUnsel=Pd(e,e.unselected),!e.unselected&&Er.isArrayOrTypedArray(e.marker.opacity))){var n=e.marker.opacity;for(a.markerUnsel.opacity=new Array(n.length),r=0;r<n.length;r++)a.markerUnsel.opacity[r]=g6*n[r]}if(Wn.hasLines(e)){a.line={overlay:!0,thickness:e.line.width*i,color:e.line.color,opacity:e.opacity};var o=(Vl.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=Ab(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(a.errorY=Ab(e,e.error_y,i)),!!e.fill&&e.fill!=="none"&&(a.fill={closed:!0,fill:e.fillcolor,thickness:0}),a}function V2(t,e){var r=t._fullLayout,a=e._length,i=e.textfont,n=e.textposition,o=Array.isArray(n)?n:[n],l=i.color,s=i.size,f=i.family,c={},v,u=t._context.plotGlPixelRatio,d=e.texttemplate;if(d){c.text=[];var h=r._d3locale,p=Array.isArray(d),g=p?Math.min(d.length,a):a,_=p?function(k){return d[k]}:function(){return d};for(v=0;v<g;v++){var b={i:v},w=e._module.formatLabels(b,e,r),m={};b6(m,e,v);var y=e._meta||{};c.text.push(Er.texttemplateString(_(v),w,h,m,b,y))}}else Array.isArray(e.text)&&e.text.length<a?c.text=e.text.slice():c.text=e.text;if(Array.isArray(c.text))for(v=c.text.length;v<a;v++)c.text[v]="";for(c.opacity=e.opacity,c.font={},c.align=[],c.baseline=[],v=0;v<o.length;v++){var x=o[v].split(/\s+/);switch(x[1]){case"left":c.align.push("right");break;case"right":c.align.push("left");break;default:c.align.push(x[1])}switch(x[0]){case"top":c.baseline.push("bottom");break;case"bottom":c.baseline.push("top");break;default:c.baseline.push(x[0])}}if(Array.isArray(l))for(c.color=new Array(a),v=0;v<a;v++)c.color[v]=l[v];else c.color=l;if(Er.isArrayOrTypedArray(s)||Array.isArray(f))for(c.font=new Array(a),v=0;v<a;v++){var T=c.font[v]={};T.size=(Er.isTypedArray(s)?s[v]:Array.isArray(s)?sf(s[v])?s[v]:0:s)*u,T.family=Array.isArray(f)?f[v]:f}else c.font={size:s*u,family:f};return c}function mp(t){var e=t._length,r=t.marker,a={},i,n=Er.isArrayOrTypedArray(r.symbol),o=Er.isArrayOrTypedArray(r.color),l=Er.isArrayOrTypedArray(r.line.color),s=Er.isArrayOrTypedArray(r.opacity),f=Er.isArrayOrTypedArray(r.size),c=Er.isArrayOrTypedArray(r.line.width),v;if(n||(v=Rd.isOpenSymbol(r.symbol)),n||o||l||s){a.colors=new Array(e),a.borderColors=new Array(e);var u=wb(r,r.opacity,e),d=wb(r.line,r.opacity,e);if(!Array.isArray(d[0])){var h=d;for(d=Array(e),i=0;i<e;i++)d[i]=h}if(!Array.isArray(u[0])){var p=u;for(u=Array(e),i=0;i<e;i++)u[i]=p}for(a.colors=u,a.borderColors=d,i=0;i<e;i++){if(n){var g=r.symbol[i];v=Rd.isOpenSymbol(g)}v&&(d[i]=u[i].slice(),u[i]=u[i].slice(),u[i][3]=0)}a.opacity=t.opacity}else v?(a.color=Os(r.color,"uint8"),a.color[3]=0,a.borderColor=Os(r.color,"uint8")):(a.color=Os(r.color,"uint8"),a.borderColor=Os(r.line.color,"uint8")),a.opacity=t.opacity*r.opacity;if(n)for(a.markers=new Array(e),i=0;i<e;i++)a.markers[i]=Lb(r.symbol[i]);else a.marker=Lb(r.symbol);var _=1,b=y6(t,_),w;if(f||c){var m=a.sizes=new Array(e),y=a.borderSizes=new Array(e),x=0,T;if(f){for(i=0;i<e;i++)m[i]=b(r.size[i]),x+=m[i];T=x/e}else for(w=b(r.size),i=0;i<e;i++)m[i]=w;if(c)for(i=0;i<e;i++)y[i]=r.line.width[i];else for(w=r.line.width,i=0;i<e;i++)y[i]=w;a.sizeAvg=T}else a.size=b(r&&r.size||10),a.borderSizes=b(r.line.width);return a}function Pd(t,e){var r=t.marker,a={};return e&&(e.marker&&e.marker.symbol?a=mp(Er.extendFlat({},r,e.marker)):e.marker&&(e.marker.size&&(a.size=e.marker.size),e.marker.color&&(a.colors=e.marker.color),e.marker.opacity!==void 0&&(a.opacity=e.marker.opacity))),a}function kb(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:Er.extendFlat({},e.textfont)};r.textfont&&Er.extendFlat(i.textfont,r.textfont),a=V2(t,i)}return a}function Ab(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 Mb=Vl.SYMBOL_SDF_SIZE,Fi=Vl.SYMBOL_SIZE,Sb=Vl.SYMBOL_STROKE,_v={},_6=Jo.symbolFuncs[0](Fi*.05);function Lb(t){if(t==="circle")return null;var e,r,a=Jo.symbolNumber(t),i=Jo.symbolFuncs[a%100],n=!!Jo.symbolNoDot[a%100],o=!!Jo.symbolNoFill[a%100],l=Rd.isDotSymbol(t);return _v[t]?_v[t]:(l&&!n?e=i(Fi*1.1)+_6:e=i(Fi),r=p6(e,{w:Mb,h:Mb,viewBox:[-Fi,-Fi,Fi,Fi],stroke:o?Sb:-Sb}),_v[t]=r,r||null)}function w6(t,e,r){var a=r.length,i=a/2,n,o;if(Wn.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>Vl.TOO_MANY_POINTS||Wn.hasMarkers(e)?"rect":"round";if(f&&e.connectgaps){var v=n[0],u=n[1];for(o=0;o<n.length;o+=2)isNaN(n[o])||isNaN(n[o+1])?(n[o]=v,n[o+1]=u):(v=n[o],u=n[o+1])}return{join:c,positions:n}}function T6(t,e,r,a,i){var n=m6.getComponentMethod("errorbars","makeComputeError"),o=_b.getFromId(t,e.xaxis),l=_b.getFromId(t,e.yaxis),s=r.length/2,f={};function c(v,u){var d=u._id.charAt(0),h=e["error_"+d];if(h&&h.visible&&(u.type==="linear"||u.type==="log")){for(var p=n(h),g={x:0,y:1}[d],_={x:[0,1,2,3],y:[2,3,0,1]}[d],b=new Float64Array(4*s),w=1/0,m=-1/0,y=0,x=0;y<s;y++,x+=4){var T=v[y];if(sf(T)){var k=r[y*2+g],S=p(T,y),A=S[0],$=S[1];if(sf(A)&&sf($)){var M=T-A,C=T+$;b[x+_[0]]=k-u.c2l(M),b[x+_[1]]=u.c2l(C)-k,b[x+_[2]]=0,b[x+_[3]]=0,w=Math.min(w,T-A),m=Math.max(m,T+$)}}}f[d]={positions:r,errors:b,_bnds:[w,m]}}}return c(a,o),c(i,l),f}function k6(t,e,r,a){var i=e._length,n={},o;if(Wn.hasMarkers(e)){var l=r.font,s=r.align,f=r.baseline;for(n.offset=new Array(i),o=0;o<i;o++){var c=a.sizes?a.sizes[o]:a.size,v=Array.isArray(l)?l[o].size:l.size,u=Array.isArray(s)?s.length>1?s[o]:s[0]:s,d=Array.isArray(f)?f.length>1?f[o]:f[0]:f,h=Tb[u],p=Tb[d],g=c?c/.8+1:0,_=-p*g-p*.5;n.offset[o]=[h*g/v,_/v]}}return n}var A6={style:x6,markerStyle:mp,markerSelection:Pd,linePositions:w6,errorBarPositions:T6,textPosition:k6},Bs=de.exports,M6=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(){Bs.extendFlat(a,n,i)},a.init(),a.update=function(l){var s=Bs.repeat(l,a.count);if(a.fill2d&&a.fill2d.update(s),a.scatter2d&&a.scatter2d.update(s),a.line2d&&a.line2d.update(s),a.error2d&&a.error2d.update(s.concat(s)),a.select2d&&a.select2d.update(s),a.glText)for(var f=0;f<a.count;f++)a.glText[f].update(l)},a.draw=function(){for(var l=a.count,s=a.fill2d,f=a.error2d,c=a.line2d,v=a.scatter2d,u=a.glText,d=a.select2d,h=a.selectBatch,p=a.unselectBatch,g=0;g<l;g++){if(s&&a.fillOrder[g]&&s.draw(a.fillOrder[g]),c&&a.lineOptions[g]&&c.draw(g),f&&(a.errorXOptions[g]&&f.draw(g),a.errorYOptions[g]&&f.draw(g+l)),v&&a.markerOptions[g])if(p[g].length){var _=Bs.repeat([],a.count);_[g]=p[g],v.draw(_)}else h[g].length||v.draw(g);u[g]&&a.textOptions[g]&&u[g].render()}d&&d.draw(h),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||Bs.extendFlat(a,i),a},S6=yk.exports,$n=de.exports,Cb=Vt,L6=Il.findExtremes,Db=mc,yp=qh,C6=yp.calcMarkerSize,D6=yp.calcAxisExpansion,$6=yp.setFirstScatter,E6=xw,En=A6,R6=M6,$b=Ot.BADNUM,P6=Ac.TOO_MANY_POINTS,z6=function(e,r){var a=e._fullLayout,i=Cb.getFromId(e,r.xaxis),n=Cb.getFromId(e,r.yaxis),o=a._plots[r.xaxis+r.yaxis],l=r._length,s=l>=P6,f=l*2,c={},v,u=i.makeCalcdata(r,"x"),d=n.makeCalcdata(r,"y"),h=Db(r,i,"x",u),p=Db(r,n,"y",d),g=h.vals,_=p.vals;r._x=g,r._y=_,r.xperiodalignment&&(r._origX=u,r._xStarts=h.starts,r._xEnds=h.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=p.starts,r._yEnds=p.ends);var b=new Array(f),w=new Array(l);for(v=0;v<l;v++)b[v*2]=g[v]===$b?NaN:g[v],b[v*2+1]=_[v]===$b?NaN:_[v],w[v]=v;if(i.type==="log")for(v=0;v<f;v+=2)b[v]=i.c2l(b[v]);if(n.type==="log")for(v=1;v<f;v+=2)b[v]=n.c2l(b[v]);s&&i.type!=="log"&&n.type!=="log"?c.tree=S6(b):c.ids=w,E6(e,r);var m=I6(e,o,r,b,g,_),y=R6(e,o);$6(a,r);var x;return s?m.marker&&(x=m.marker.sizeAvg||Math.max(m.marker.size,3)):x=C6(r,l),D6(e,r,i,n,g,_,x),m.errorX&&Eb(r,i,m.errorX),m.errorY&&Eb(r,n,m.errorY),m.fill&&!y.fill2d&&(y.fill2d=!0),m.marker&&!y.scatter2d&&(y.scatter2d=!0),m.line&&!y.line2d&&(y.line2d=!0),(m.errorX||m.errorY)&&!y.error2d&&(y.error2d=!0),m.text&&!y.glText&&(y.glText=!0),m.marker&&(m.marker.snap=l),y.lineOptions.push(m.line),y.errorXOptions.push(m.errorX),y.errorYOptions.push(m.errorY),y.fillOptions.push(m.fill),y.markerOptions.push(m.marker),y.markerSelectedOptions.push(m.markerSel),y.markerUnselectedOptions.push(m.markerUnsel),y.textOptions.push(m.text),y.textSelectedOptions.push(m.textSel),y.textUnselectedOptions.push(m.textUnsel),y.selectBatch.push([]),y.unselectBatch.push([]),c._scene=y,c.index=y.count,c.x=g,c.y=_,c.positions=b,y.count++,[{x:!1,y:!1,t:c,trace:r}]};function Eb(t,e,r){var a=t._extremes[e._id],i=L6(e,r._bnds,{padded:!0});a.min=a.min.concat(i.min),a.max=a.max.concat(i.max)}function I6(t,e,r,a,i,n){var o=En.style(t,r);if(o.marker&&(o.marker.positions=a),o.line&&a.length>1&&$n.extendFlat(o.line,En.linePositions(t,r,a)),o.errorX||o.errorY){var l=En.errorBarPositions(t,r,a,i,n);o.errorX&&$n.extendFlat(o.errorX,l.x),o.errorY&&$n.extendFlat(o.errorY,l.y)}return o.text&&($n.extendFlat(o.text,{positions:a},En.textPosition(t,r,o.text,o.marker)),$n.extendFlat(o.textSel,{positions:a},En.textPosition(t,r,o.text,o.markerSel)),$n.extendFlat(o.textUnsel,{positions:a},En.textPosition(t,r,o.text,o.markerUnsel))),o}var N6=de.exports,F6=Je.exports,H6=Dl.DESELECTDIM;function O6(t){var e=t[0],r=e.trace,a=e.t,i=a._scene,n=a.index,o=i.selectBatch[n],l=i.unselectBatch[n],s=i.textOptions[n],f=i.textSelectedOptions[n]||{},c=i.textUnselectedOptions[n]||{},v=N6.extendFlat({},s),u,d;if(o.length||l.length){var h=f.color,p=c.color,g=s.color,_=Array.isArray(g);for(v.color=new Array(r._length),u=0;u<o.length;u++)d=o[u],v.color[d]=h||(_?g[d]:g);for(u=0;u<l.length;u++){d=l[u];var b=_?g[d]:g;v.color[d]=p||(h?b:F6.addOpacity(b,H6))}}i.glText[n].update(v)}var q2={styleTextSelection:O6},Rb=mr,B6=q2.styleTextSelection,j6=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s=a[0].t,f=l._length,c=s.x,v=s.y,u=s._scene,d=s.index;if(!u)return o;var h=Rb.hasText(l),p=Rb.hasMarkers(l),g=!p&&!h;if(l.visible!==!0||g)return o;var _=[],b=[];if(r!==!1&&!r.degenerate)for(var w=0;w<f;w++)r.contains([s.xpx[w],s.ypx[w]],!1,w,e)?(_.push(w),o.push({pointNumber:w,x:i.c2d(c[w]),y:n.c2d(v[w])})):b.push(w);if(p){var m=u.scatter2d;if(!_.length&&!b.length){var y=new Array(u.count);y[d]=u.markerOptions[d],m.update.apply(m,y)}else if(!u.selectBatch[d].length&&!u.unselectBatch[d].length){var x=new Array(u.count);x[d]=u.markerUnselectedOptions[d],m.update.apply(m,x)}}return u.selectBatch[d]=_,u.unselectBatch[d]=b,h&&B6(a),o},G6=V4,U6={moduleType:"trace",name:"scattergl",basePlotModule:Yt,categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:pp.exports,supplyDefaults:l6,crossTraceDefaults:gw,colorbar:Ol,formatLabels:f6,calc:z6,hoverPoints:G6.hoverPoints,selectPoints:j6,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(" ")}},X2={exports:{}},Pb=Je.exports,V6=function(){},q6=function(e){for(var r in e)typeof e[r]=="function"&&(e[r]=V6);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=Pb.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=Pb.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},X6=q6,Y6=gk.exports,W6=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=Y6({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||Ak.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||X6({container:i._glcontainer.node()}),n},zb=bk,Ib=xk,Z6=_k,Nb=wk,wv=de.exports,K6=go.selectMode,Q6=W6,J6=mr,e8=Cw,t8=q2.styleTextSelection,Y2={};function r8(t,e,r,a){var i=t._size,n=t.width*a,o=t.height*a,l=i.l*a,s=i.b*a,f=i.r*a,c=i.t*a,v=i.w*a,u=i.h*a;return[l+e.domain[0]*v,s+r.domain[0]*u,n-f-(1-e.domain[1])*v,o-c-(1-r.domain[1])*u]}var a8=X2.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=Q6(e,["ANGLE_instanced_arrays","OES_element_index_uint"],Y2);if(!c){n.init();return}var v=n.count,u=i._glcanvas.data()[0].regl;if(e8(e,r,a),n.dirty){if(n.error2d===!0&&(n.error2d=Z6(u)),n.line2d===!0&&(n.line2d=Ib(u)),n.scatter2d===!0&&(n.scatter2d=zb(u)),n.fill2d===!0&&(n.fill2d=Ib(u)),n.glText===!0)for(n.glText=new Array(v),s=0;s<v;s++)n.glText[s]=new Nb(u);if(n.glText){if(v>n.glText.length){var d=v-n.glText.length;for(s=0;s<d;s++)n.glText.push(new Nb(u))}else if(v<n.glText.length){var h=n.glText.length-v,p=n.glText.splice(v,h);p.forEach(function(D){D.destroy()})}for(s=0;s<v;s++)n.glText[s].update(n.textOptions[s])}if(n.line2d&&(n.line2d.update(n.lineOptions),n.lineOptions=n.lineOptions.map(function(D){if(D&&D.positions){for(var z=D.positions,F=0;F<z.length&&(isNaN(z[F])||isNaN(z[F+1]));)F+=2;for(var H=z.length-2;H>F&&(isNaN(z[H])||isNaN(z[H+1]));)H-=2;D.positions=z.slice(F,H+2)}return D}),n.line2d.update(n.lineOptions)),n.error2d){var g=(n.errorXOptions||[]).concat(n.errorYOptions||[]);n.error2d.update(g)}n.scatter2d&&n.scatter2d.update(n.markerOptions),n.fillOrder=wv.repeat(null,v),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(D,z){var F=a[z];if(!(!D||!F||!F[0]||!F[0].trace)){var H=F[0],U=H.trace,B=H.t,X=n.lineOptions[z],O,Y,W=[];U._ownfill&&W.push(z),U._nexttrace&&W.push(z+1),W.length&&(n.fillOrder[z]=W);var K=[],Z=X&&X.positions||B.positions,ae,ne;if(U.fill==="tozeroy"){for(ae=0;ae<Z.length&&isNaN(Z[ae+1]);)ae+=2;for(ne=Z.length-2;ne>ae&&isNaN(Z[ne+1]);)ne-=2;Z[ae+1]!==0&&(K=[Z[ae],0]),K=K.concat(Z.slice(ae,ne+2)),Z[ne+1]!==0&&(K=K.concat([Z[ne],0]))}else if(U.fill==="tozerox"){for(ae=0;ae<Z.length&&isNaN(Z[ae]);)ae+=2;for(ne=Z.length-2;ne>ae&&isNaN(Z[ne]);)ne-=2;Z[ae]!==0&&(K=[0,Z[ae+1]]),K=K.concat(Z.slice(ae,ne+2)),Z[ne]!==0&&(K=K.concat([0,Z[ne+1]]))}else if(U.fill==="toself"||U.fill==="tonext"){for(K=[],O=0,D.splitNull=!0,Y=0;Y<Z.length;Y+=2)(isNaN(Z[Y])||isNaN(Z[Y+1]))&&(K=K.concat(Z.slice(O,Y)),K.push(Z[O],Z[O+1]),K.push(null,null),O=Y+2);K=K.concat(Z.slice(O)),O&&K.push(Z[O],Z[O+1])}else{var oe=U._nexttrace;if(oe){var re=n.lineOptions[z+1];if(re){var se=re.positions;if(U.fill==="tonexty"){for(K=Z.slice(),z=Math.floor(se.length/2);z--;){var me=se[z*2],Re=se[z*2+1];isNaN(me)||isNaN(Re)||K.push(me,Re)}D.fill=oe.fillcolor}}}}if(U._prevtrace&&U._prevtrace.fill==="tonext"){var ke=n.lineOptions[z-1].positions,ze=K.length/2;O=ze;var he=[O];for(Y=0;Y<ke.length;Y+=2)(isNaN(ke[Y])||isNaN(ke[Y+1]))&&(he.push(Y/2+ze+1),O=Y+2);K=K.concat(ke),D.hole=he}return D.fillmode=U.fill,D.opacity=U.opacity,D.positions=K,D}}),n.fill2d.update(n.fillOptions))}var _=i.dragmode,b=K6(_),w=i.clickmode.indexOf("select")>-1;for(s=0;s<v;s++){var m=a[s][0],y=m.trace,x=m.t,T=x.index,k=y._length,S=x.x,A=x.y;if(y.selectedpoints||b||w){if(b||(b=!0),y.selectedpoints){var $=n.selectBatch[T]=wv.selIndices2selPoints(y),M={};for(f=0;f<$.length;f++)M[$[f]]=1;var C=[];for(f=0;f<k;f++)M[f]||C.push(f);n.unselectBatch[T]=C}var E=x.xpx=new Array(k),I=x.ypx=new Array(k);for(f=0;f<k;f++)E[f]=o.c2p(S[f]),I[f]=l.c2p(A[f])}else x.xpx=x.ypx=null}if(b){if(n.select2d||(n.select2d=zb(i._glcanvas.data()[1].regl)),n.scatter2d){var P=new Array(v);for(s=0;s<v;s++)P[s]=n.selectBatch[s].length||n.unselectBatch[s].length?n.markerUnselectedOptions[s]:{};n.scatter2d.update(P)}n.select2d&&(n.select2d.update(n.markerOptions),n.select2d.update(n.markerSelectedOptions)),n.glText&&a.forEach(function(D){var z=((D||[])[0]||{}).trace||{};J6.hasText(z)&&t8(D)})}else n.scatter2d&&n.scatter2d.update(n.markerOptions);var R={viewport:r8(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]]},L=wv.repeat(R,n.count);n.fill2d&&n.fill2d.update(L),n.line2d&&n.line2d.update(L),n.error2d&&n.error2d.update(L.concat(L)),n.scatter2d&&n.scatter2d.update(L),n.select2d&&n.select2d.update(L),n.glText&&n.glText.forEach(function(D){D.update(R)})}}};a8.reglPrecompiled=Y2;var W2=U6;W2.plot=X2.exports;var i8=W2;(function(t){t.exports=i8})(O2);const yH=pi(O2.exports);var Z2={exports:{}},K2={};(function(t){var e=Ut.exports;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)}})(K2);var Q2={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]},n8=La,o8=Cr.hovertemplateAttrs,l8=Cr.texttemplateAttrs,s8=ln,f8=_i.attributes,Ia=Tc,Fb=Q2,Vo=Bt.extendFlat,c8={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:Vo({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:Vo({},Ia.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:Vo({},Ia.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},s8("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the leaves. With colorscale","it is defaulted to 1; otherwise it is defaulted to 0.7"].join(" ")},editType:"plot"},text:Ia.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:l8({editType:"plot"},{keys:Fb.eventDataKeys.concat(["label","value"])}),hovertext:Ia.hovertext,hoverinfo:Vo({},n8.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:o8({},{keys:Fb.eventDataKeys}),textfont:Ia.textfont,insidetextorientation:Ia.insidetextorientation,insidetextfont:Ia.insidetextfont,outsidetextfont:Vo({},Ia.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented at the center of a sunburst graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),rotation:{valType:"angle",dflt:0,editType:"plot",description:["Rotates the whole diagram counterclockwise by some angle.","By default the first slice starts at 3 o'clock."].join(" ")},sort:Ia.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:f8({name:"sunburst",trace:!0,editType:"calc"})},Sc={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1},u8=Cr.hovertemplateAttrs,v8=Cr.texttemplateAttrs,d8=ln,h8=_i.attributes,Pi=Tc,Hr=c8,Hb=Sc,Tv=Bt.extendFlat,J2={labels:Hr.labels,parents:Hr.parents,values:Hr.values,branchvalues:Hr.branchvalues,count:Hr.count,level:Hr.level,maxdepth:Hr.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/master/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:Tv({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:Hr.marker.colors,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style",description:["Determines if the sector colors are faded towards","the background from the leaves up to the headers.","This option is unavailable when a `colorscale` is present,","defaults to false when `marker.colors` is set,","but otherwise defaults to true.","When set to *reversed*, the fading direction is inverted,","that is the top elements within hierarchy are drawn with fully saturated colors","while the leaves are faded towards the background color."].join(" ")},line:Hr.marker.line,editType:"calc"},d8("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:Tv({},Pi.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},text:Pi.text,textinfo:Hr.textinfo,texttemplate:v8({editType:"plot"},{keys:Hb.eventDataKeys.concat(["label","value"])}),hovertext:Pi.hovertext,hoverinfo:Hr.hoverinfo,hovertemplate:u8({},{keys:Hb.eventDataKeys}),textfont:Pi.textfont,insidetextfont:Pi.insidetextfont,outsidetextfont:Tv({},Pi.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:Pi.sort,root:Hr.root,domain:h8({name:"treemap",trace:!0,editType:"calc"})},ek={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(" ")}},p8=de.exports,m8=J2,y8=Je.exports,g8=_i.defaults,b8=oo.handleText,x8=jl.TEXTPAD,tk=Kn,_8=tk.hasColorscale,w8=tk.handleDefaults,T8=function(e,r,a,i){function n(b,w){return p8.coerce(e,r,m8,b,w)}var o=n("labels"),l=n("parents");if(!o||!o.length||!l||!l.length){r.visible=!1;return}var s=n("values");s&&s.length?n("branchvalues"):n("count"),n("level"),n("maxdepth");var f=n("tiling.packing");f==="squarify"&&n("tiling.squarifyratio"),n("tiling.flip"),n("tiling.pad");var c=n("text");n("texttemplate"),r.texttemplate||n("textinfo",Array.isArray(c)?"text+label":"label"),n("hovertext"),n("hovertemplate");var v=n("pathbar.visible"),u="auto";b8(e,r,i,n,u,{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),n("textposition");var d=r.textposition.indexOf("bottom")!==-1,h=n("marker.line.width");h&&n("marker.line.color",i.paper_bgcolor);var p=n("marker.colors"),g=r._hasColorscale=_8(e,"marker","colors")||(e.marker||{}).coloraxis;g?w8(e,r,i,n,{prefix:"marker.",cLetter:"c"}):n("marker.depthfade",!(p||[]).length);var _=r.textfont.size*2;n("marker.pad.t",d?_/4:_),n("marker.pad.l",_/4),n("marker.pad.r",_/4),n("marker.pad.b",d?_:_/4),r._hovered={marker:{line:{width:2,color:y8.contrast(i.paper_bgcolor)}}},v&&(n("pathbar.thickness",r.pathbar.textfont.size+2*x8),n("pathbar.side"),n("pathbar.edgeshape")),n("sort"),n("root.color"),g8(r,i,n),r._length=null},k8=de.exports,A8=ek,M8=function(e,r){function a(i,n){return k8.coerce(e,r,A8,i,n)}a("treemapcolorway",r.colorway),a("extendtreemapcolors")},Bf={},rk={};(function(t){var e=Id,r=lt,a=de.exports,i=Kn.makeColorScaleFuncFromTrace,n=Nf.makePullColorFn,o=Nf.generateExtendedColors,l=Kn.calc,s=Ot.ALMOST_EQUAL,f={},c={},v={};t.calc=function(d,h){var p=d._fullLayout,g=h.ids,_=a.isArrayOrTypedArray(g),b=h.labels,w=h.parents,m=h.values,y=a.isArrayOrTypedArray(m),x=[],T={},k={},S=function(Z,ae){T[Z]?T[Z].push(ae):T[Z]=[ae],k[ae]=1},A=function(Z){return Z||typeof Z=="number"},$=function(Z){return!y||r(m[Z])&&m[Z]>=0},M,C,E;_?(M=Math.min(g.length,w.length),C=function(Z){return A(g[Z])&&$(Z)},E=function(Z){return String(g[Z])}):(M=Math.min(b.length,w.length),C=function(Z){return A(b[Z])&&$(Z)},E=function(Z){return String(b[Z])}),y&&(M=Math.min(M,m.length));for(var I=0;I<M;I++)if(C(I)){var P=E(I),R=A(w[I])?String(w[I]):"",L={i:I,id:P,pid:R,label:A(b[I])?String(b[I]):""};y&&(L.v=+m[I]),x.push(L),S(R,P)}if(T[""]){if(T[""].length>1){for(var F=a.randstr(),H=0;H<x.length;H++)x[H].pid===""&&(x[H].pid=F);x.unshift({hasMultipleRoots:!0,id:F,pid:"",label:""})}}else{var D=[],z;for(z in T)k[z]||D.push(z);if(D.length===1)z=D[0],x.unshift({hasImpliedRoot:!0,id:z,pid:"",label:z});else return a.warn(["Multiple implied roots, cannot build",h.type,"hierarchy of",h.name+".","These roots include:",D.join(", ")].join(" "))}var U;try{U=e.stratify().id(function(Z){return Z.id}).parentId(function(Z){return Z.pid})(x)}catch(Z){return a.warn(["Failed to build",h.type,"hierarchy of",h.name+".","Error:",Z.message].join(" "))}var B=e.hierarchy(U),X=!1;if(y)switch(h.branchvalues){case"remainder":B.sum(function(Z){return Z.data.v});break;case"total":B.each(function(Z){var ae=Z.data.data,ne=ae.v;if(Z.children){var oe=Z.children.reduce(function(re,se){return re+se.data.data.v},0);if((ae.hasImpliedRoot||ae.hasMultipleRoots)&&(ne=oe),ne<oe*s)return X=!0,a.warn(["Total value for node",Z.data.data.id,"of",h.name,"is smaller than the sum of its children.",`
|