@deephaven/embed-grid 0.22.3-beta.15 → 0.22.3-beta.21

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.
@@ -1,7 +1,7 @@
1
- import{f as ct,t as Jr,d as nt,g as b1,r as Tl,i as XA,a as x1,e as vh,p as _1,m as WA,h as w1,b as T1,c as YA,n as qA,j as ZA,k as KA,l as k1,s as QA,o as JA,q as eM,u as tM,v as rM,w as aM,x as iM,y as dh,z as A1,A as nM,B as oM}from"./vendor.4a3ef775.js";import{g as gi,c as lM}from"./helpers.162e09a8.js";var M1={exports:{}},S1={},cc={};cc.version="2.16.5";var ve={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"},Cr={},hh=Array.isArray,sM=ArrayBuffer,fM=DataView;function L1(t){return sM.isView(t)&&!(t instanceof fM)}Cr.isTypedArray=L1;function Pf(t){return hh(t)||L1(t)}Cr.isArrayOrTypedArray=Pf;function cM(t){return!Pf(t[0])}Cr.isArray1D=cM;Cr.ensureArray=function(t,e){return hh(t)||(t=[]),t.length=e,t};Cr.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),hh(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};Cr.maxRowLength=function(t){return C1(t,Math.max,0)};Cr.minRowLength=function(t){return C1(t,Math.min,1/0)};function C1(t,e,r){if(Pf(t))if(Pf(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 D1=ct,ph=Cr.isArrayOrTypedArray,mh=function(e,r){if(D1(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"?hM(e,r,i):{set:P1(e,i,r),get:$1(e,i),astr:r,parts:i,obj:e}};function $1(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]=$1(r[l],e.slice(o+1))(),n[l]!==n[0]&&(i=!1);return i?n[0]:n}if(typeof a=="number"&&!ph(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 uM=/(^|\.)args\[/;function od(t,e){return t===void 0||t===null&&!e.match(uM)}function P1(t,e,r){return function(a){var i=t,n="",o=od(a,r),l,s;for(s=0;s<e.length-1;s++){if(l=e[s],typeof l=="number"&&!ph(i))throw"array index but container is not an array";if(l===-1){if(o=!dM(i,e.slice(s+1),a,r),o)break;return}if(!R1(i,l,e[s+1],o))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";n=vM(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 vM(t,e){var r=e;return D1(e)?r="["+e+"]":t&&(r="."+e),t+r}function dM(t,e,r,a){var i=ph(r),n=!0,o=r,l=a.replace("-1",0),s=i?!1:od(r,l),f=e[0],c;for(c=0;c<t.length;c++)l=a.replace("-1",c),i&&(o=r[c%r.length],s=od(o,l)),s&&(n=!1),R1(t,c,f,s)&&P1(t[c],e,a.replace("-1",c))(o);return n}function R1(t,e,r,a){if(t[e]===void 0){if(a)return!1;typeof r=="number"?t[e]=[]:t[e]={}}return!0}function hM(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var Tn=mh,pM=/^\w*$/,mM=0,tm=1,us=2,rm=3,Ci=4,yM=function(e,r,a,i){a=a||"name",i=i||"value";var n,o,l,s={};r&&r.length?(l=Tn(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=pM.test(i),v={set:function(u,h){var d=h===null?Ci:mM;if(!o){if(!l||d===Ci)return;o=[],l.set(o)}var p=f[u];if(p===void 0){if(d===Ci)return;d=d|rm,p=o.length,f[u]=p}else h!==(c?o[p][i]:Tn(o[p],i).get())&&(d=d|us);var y=o[p]=o[p]||{};return y[a]=u,c?y[i]=h:Tn(y,i).set(h),h!==null&&(d=d&~Ci),s[p]=s[p]|d,v},get:function(u){if(!!o){var h=f[u];if(h!==void 0)return c?o[h][i]:Tn(o[h],i).get()}},rename:function(u,h){var d=f[u];return d===void 0||(s[d]=s[d]|tm,f[h]=d,delete f[u],o[d][a]=h),v},remove:function(u){var h=f[u];if(h===void 0)return v;var d=o[h];if(Object.keys(d).length>2)return s[h]=s[h]|us,v.set(u,null);if(c){for(n=h;n<o.length;n++)s[n]=s[n]|rm;for(n=h;n<o.length;n++)f[o[n][a]]--;o.splice(h,1),delete f[u]}else Tn(d,i).set(null),s[h]=s[h]|us|Ci;return v},constructUpdate:function(){for(var u,h,d={},p=Object.keys(s),y=0;y<p.length;y++)h=p[y],u=r+"["+h+"]",o[h]?(s[h]&tm&&(d[u+"."+a]=o[h][a]),s[h]&us&&(c?d[u+"."+i]=s[h]&Ci?null:o[h][i]:d[u+"."+i]=s[h]&Ci?null:Tn(o[h],i).get())):d[u]=null;return d}};return v},gM=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,bM=/^[^\.\[\]]+$/,xM=function(t,e){for(;e;){var r=t.match(gM);if(r)t=r[1];else if(t.match(bM))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},Gl=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")},_M=ct,yh=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 _M(a)||(a=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),a},am=Cr.isArrayOrTypedArray,Io=Gl,wM=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(am(i)&&am(n)&&Io(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]&&Io(i[l])&&Io(n[l])&&t(n[l],i[l])}else Io(i)&&Io(n)&&(t(n,i),Object.keys(n).length||delete e[a])}};function TM(t,e){var r=t%e;return r<0?r+e:r}function kM(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}var Ul={mod:TM,modHalf:kM},E1={},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},uc={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"},z1=uc,I1=dr,gh=I1({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});gh.family.dflt=z1.HOVERFONT;gh.size.dflt=z1.HOVERFONTSIZE;var Vl={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:gh,grouptitlefont:I1({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"}},Ft={},im=Gl,No=Array.isArray;function AM(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}Ft.extendFlat=function(){return Xl(arguments,!1,!1,!1)};Ft.extendDeep=function(){return Xl(arguments,!0,!1,!1)};Ft.extendDeepAll=function(){return Xl(arguments,!0,!0,!1)};Ft.extendDeepNoArrays=function(){return Xl(arguments,!0,!1,!0)};function Xl(t,e,r,a){var i=t[0],n=t.length,o,l,s,f,c,v,u;if(n===2&&No(i)&&No(t[1])&&i.length===0){if(u=AM(t[1],i),u)return i;i.splice(0,i.length)}for(var h=1;h<n;h++){o=t[h];for(l in o)s=i[l],f=o[l],a&&No(f)?i[l]=f:e&&f&&(im(f)||(c=No(f)))?(c?(c=!1,v=s&&No(s)?s:[]):v=s&&im(s)?s:{},i[l]=Xl([v,f],e,r,a)):(typeof f<"u"||r)&&(i[l]=f)}return i}var MM=dr,vs=Vl.hoverlabel,ds=Ft.extendFlat,vc={hoverlabel:{bgcolor:ds({},vs.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:ds({},vs.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:MM({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:ds({},vs.align,{arrayOk:!0}),namelength:ds({},vs.namelength,{arrayOk:!0}),editType:"none"}},SM=dr,LM=vc,Ca={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:SM({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with `*reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")},legendwidth:{valType:"number",min:0,editType:"style",description:"Sets the width (in px or fraction) of the legend for this trace."},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appear as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:LM.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(" ")}},CM=Jr.exports,dc={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)"]]},N1=dc.RdBu;function DM(t,e){if(e||(e=N1),!t)return e;function r(){try{t=dc[t]||JSON.parse(t)}catch{t=e}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),F1(t)?t:e}function F1(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||!CM(a[1]).isValid())return!1;e=+a[0]}return!0}function $M(t){return dc[t]!==void 0?!0:F1(t)}var ko={scales:dc,defaultScale:N1,get:DM,isValid:$M},rt={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 da=Jr.exports,PM=ct,RM=Cr.isTypedArray,tr=rt.exports={},hc=hr;tr.defaults=hc.defaults;var EM=tr.defaultLine=hc.defaultLine;tr.lightLine=hc.lightLine;var ld=tr.background=hc.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(da(t))};tr.opacity=function(t){return t?da(t).getAlpha():0};tr.addOpacity=function(t,e){var r=da(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"};tr.combine=function(t,e){var r=da(t).toRgb();if(r.a===1)return da(t).toRgbString();var a=da(e||ld).toRgb(),i=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},n={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return da(n).toRgbString()};tr.contrast=function(t,e,r){var a=da(t);a.getAlpha()!==1&&(a=da(tr.combine(t,ld)));var i=a.isDark()?e?a.lighten(e):ld:r?a.darken(r):EM;return i.toString()};tr.stroke=function(t,e){var r=da(e);t.style({stroke:tr.tinyRGB(r),"stroke-opacity":r.getAlpha()})};tr.fill=function(t,e){var r=da(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]=eu(n[a]);else t[i]=eu(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]=eu(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"&&!RM(n)&&tr.clean(n)}};function eu(t){if(PM(t)||typeof t!="string")return t;var e=t.trim();if(e.substr(0,3)!=="rgb")return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var a=r[1].trim().split(/\s*[\s,]\s*/),i=e.charAt(3)==="a"&&a.length===4;if(!i&&a.length!==3)return t;for(var n=0;n<a.length;n++){if(!a[n].length||(a[n]=Number(a[n]),!(a[n]>=0)))return t;if(n===3)a[n]>1&&(a[n]=1);else if(a[n]>=1)return t}var o=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return i?"rgba("+o+", "+a[3]+")":"rgb("+o+")"}var Wl={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2},Ao={};Ao.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=ct,r=Jr.exports,a=Ca,i=ko,n=rt.exports,o=Wl.DESELECTDIM,l=mh,s=Ao.counter,f=Ul.modHalf,c=Cr.isArrayOrTypedArray;t.valObjectMeta={data_array:{description:["An {array} of data.","The value MUST be an {array}, or we ignore it.","Note that typed arrays (e.g. Float32Array) are supported."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){c(u)?h.set(u):d!==void 0&&h.set(d)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(u,h,d,p){p.coerceNumber&&(u=+u),p.values.indexOf(u)===-1?h.set(d):h.set(u)},validateFunction:function(u,h){h.coerceNumber&&(u=+u);for(var d=h.values,p=0;p<d.length;p++){var y=String(d[p]);if(y.charAt(0)==="/"&&y.charAt(y.length-1)==="/"){var m=new RegExp(y.substr(1,y.length-2));if(m.test(u))return!0}else if(u===d[p])return!0}return!1}},boolean:{description:"A boolean (true/false) value.",requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){u===!0||u===!1?h.set(u):h.set(d)}},number:{description:["A number or a numeric value","(e.g. a number inside a string).","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,h,d,p){!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?h.set(d):h.set(+u)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,h,d,p){u%1||!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?h.set(d):h.set(+u)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(u,h,d,p){if(typeof u!="string"){var y=typeof u=="number";p.strict===!0||!y?h.set(d):h.set(String(u))}else p.noBlank&&!u?h.set(d):h.set(u)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(u,h,d){r(u).isValid()?h.set(u):h.set(d)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){function p(y){return r(y).isValid()}!Array.isArray(u)||!u.length?h.set(d):u.every(p)?h.set(u):h.set(d)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(i.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){h.set(i.get(u,d))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(u,h,d){u==="auto"?h.set("auto"):e(u)?h.set(f(+u,360)):h.set(d)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(u,h,d,p){var y=p.regex||s(d);if(typeof u=="string"&&y.test(u)){h.set(u);return}h.set(d)},validateFunction:function(u,h){var d=h.dflt;return u===d?!0:typeof u!="string"?!1:!!s(d).test(u)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(u,h,d,p){if((p.extras||[]).indexOf(u)!==-1){h.set(u);return}if(typeof u!="string"){h.set(d);return}for(var y=u.split("+"),m=0;m<y.length;){var b=y[m];p.flags.indexOf(b)===-1||y.indexOf(b)<m?y.splice(m,1):m++}y.length?h.set(y.join("+")):h.set(d)}},any:{description:"Any type.",requiredOpts:[],otherOpts:["dflt","values","arrayOk"],coerceFunction:function(u,h,d){u===void 0?h.set(d):h.set(u)}},info_array:{description:["An {array} of plot information."].join(" "),requiredOpts:["items"],otherOpts:["dflt","freeLength","dimensions"],coerceFunction:function(u,h,d,p){function y($,F,R){var P,E={set:function(L){P=L}};return R===void 0&&(R=F.dflt),t.valObjectMeta[F.valType].coerceFunction($,E,R,F),P}var m=p.dimensions===2||p.dimensions==="1-2"&&Array.isArray(u)&&Array.isArray(u[0]);if(!Array.isArray(u)){h.set(d);return}var b=p.items,w=[],g=Array.isArray(b),x=g&&m&&Array.isArray(b[0]),_=m&&g&&!x,T=g&&!_?b.length:u.length,k,S,A,D,M,C;if(d=Array.isArray(d)?d:[],m)for(k=0;k<T;k++)for(w[k]=[],A=Array.isArray(u[k])?u[k]:[],_?M=b.length:g?M=b[k].length:M=A.length,S=0;S<M;S++)_?D=b[S]:g?D=b[k][S]:D=b,C=y(A[S],D,(d[k]||[])[S]),C!==void 0&&(w[k][S]=C);else for(k=0;k<T;k++)C=y(u[k],g?b[k]:b,d[k]),C!==void 0&&(w[k]=C);h.set(w)},validateFunction:function(u,h){if(!Array.isArray(u))return!1;var d=h.items,p=Array.isArray(d),y=h.dimensions===2;if(!h.freeLength&&u.length!==d.length)return!1;for(var m=0;m<u.length;m++)if(y){if(!Array.isArray(u[m])||!h.freeLength&&u[m].length!==d[m].length)return!1;for(var b=0;b<u[m].length;b++)if(!v(u[m][b],p?d[m][b]:d))return!1}else if(!v(u[m],p?d[m]:d))return!1;return!0}}},t.coerce=function(u,h,d,p,y){var m=l(d,p).get(),b=l(u,p),w=l(h,p),g=b.get(),x=h._template;if(g===void 0&&x&&(g=l(x,p).get(),x=0),y===void 0&&(y=m.dflt),m.arrayOk&&c(g))return w.set(g),g;var _=t.valObjectMeta[m.valType].coerceFunction;_(g,w,y,m);var T=w.get();return x&&T===y&&!v(g,m)&&(g=l(x,p).get(),_(g,w,y,m),T=w.get()),T},t.coerce2=function(u,h,d,p,y){var m=l(u,p),b=t.coerce(u,h,d,p,y),w=m.get();return w!=null?b:!1},t.coerceFont=function(u,h,d){var p={};return d=d||{},p.family=u(h+".family",d.family),p.size=u(h+".size",d.size),p.color=u(h+".color",d.color),p},t.coercePattern=function(u,h,d,p){var y=u(h+".shape");if(y){u(h+".solidity"),u(h+".size");var m=u(h+".fillmode"),b=m==="overlay";if(!p){var w=u(h+".bgcolor",b?d:void 0);u(h+".fgcolor",b?n.contrast(w):d)}u(h+".fgopacity",b?.5:1)}},t.coerceHoverinfo=function(u,h,d){var p=h._module.attributes,y=p.hoverinfo?p:a,m=y.hoverinfo,b;if(d._dataLength===1){var w=m.dflt==="all"?m.flags.slice():m.dflt.split("+");w.splice(w.indexOf("name"),1),b=w.join("+")}return t.coerce(u,h,y,"hoverinfo",b)},t.coerceSelectionMarkerOpacity=function(u,h){if(!!u.marker){var d=u.marker.opacity;if(d!==void 0){var p,y;!c(d)&&!u.selected&&!u.unselected&&(p=d,y=o*d),h("selected.marker.opacity",p),h("unselected.marker.opacity",y)}}};function v(u,h){var d=t.valObjectMeta[h.valType];if(h.arrayOk&&c(u))return!0;if(d.validateFunction)return d.validateFunction(u,h);var p={},y=p,m={set:function(b){y=b}};return d.coerceFunction(u,m,p,h),y!==p}t.validate=v})(E1);var H1={},on={exports:{}},O1={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},editSelection:{valType:"boolean",dflt:!0,description:"Enables moving selections."},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","<path-to-plotly.js>/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},B1={};function j1(t,e){for(var r in t){var a=t[r];a.valType?e[r]=a.dflt:(e[r]||(e[r]={}),j1(a,e[r]))}}j1(O1,B1);var Mo={configAttributes:O1,dfltConfig:B1},tu=nt.exports,zM=ct,Fo=[],G1=function(t,e){if(Fo.indexOf(t)!==-1)return;Fo.push(t);var r=1e3;zM(e)?r=e:e==="long"&&(r=3e3);var a=tu.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(Fo);function n(o){o.duration(700).style("opacity",0).each("end",function(l){var s=Fo.indexOf(l);s!==-1&&Fo.splice(s,1),tu.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=tu.select(this);l.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){l.transition().call(n)});for(var s=l.append("p"),f=o.split(/<br\s*\/?>/g),c=0;c<f.length;c++)c&&s.append("br"),s.append("span").text(f[c]);e==="stick"?l.transition().duration(350).style("opacity",1):l.transition().duration(700).style("opacity",1).transition().delay(r).call(n)})},co=Mo.dfltConfig,bh=G1,xh=on.exports={};xh.log=function(){var t;if(co.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(co.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);bh(r.join("<br>"),"long")}};xh.warn=function(){var t;if(co.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(co.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);bh(r.join("<br>"),"stick")}};xh.error=function(){var t;if(co.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(co.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);bh(r.join("<br>"),"stick")}};var Ze={},_h=function(){},U1=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},pc={};(function(t){var e=b1;t.init2dArray=function(r,a){for(var i=new Array(r),n=0;n<r;n++)i[n]=new Array(a);return i},t.transposeRagged=function(r){var a=0,i=r.length,n,o;for(n=0;n<i;n++)a=Math.max(a,r[n].length);var l=new Array(a);for(n=0;n<a;n++)for(l[n]=new Array(i),o=0;o<i;o++)l[n][o]=r[o][n];return l},t.dot=function(r,a){if(!(r.length&&a.length)||r.length!==a.length)return null;var i=r.length,n,o;if(r[0].length)for(n=new Array(i),o=0;o<i;o++)n[o]=t.dot(r[o],a);else if(a[0].length){var l=t.transposeRagged(a);for(n=new Array(l.length),o=0;o<l.length;o++)n[o]=t.dot(r,l[o])}else for(n=0,o=0;o<i;o++)n+=r[o]*a[o];return n},t.translationMatrix=function(r,a){return[[1,0,r],[0,1,a],[0,0,1]]},t.rotationMatrix=function(r){var a=r*Math.PI/180;return[[Math.cos(a),-Math.sin(a),0],[Math.sin(a),Math.cos(a),0],[0,0,1]]},t.rotationXYMatrix=function(r,a,i){return t.dot(t.dot(t.translationMatrix(a,i),t.rotationMatrix(r)),t.translationMatrix(-a,-i))},t.apply3DTransform=function(r){return function(){var a=arguments,i=arguments.length===1?a[0]:[a[0],a[1],a[2]||0];return t.dot(r,[i[0],i[1],i[2],1]).slice(0,3)}},t.apply2DTransform=function(r){return function(){var a=arguments;a.length===3&&(a=a[0]);var i=arguments.length===1?a[0]:[a[0],a[1]];return t.dot(r,[i[0],i[1],1]).slice(0,2)}},t.apply2DTransform2=function(r){var a=t.apply2DTransform(r);return function(i){return a(i.slice(0,2)).concat(a(i.slice(2,4)))}},t.convertCssMatrix=function(r){if(r){var a=r.length;if(a===16)return r;if(a===6)return[r[0],r[1],0,0,r[2],r[3],0,0,0,0,1,0,r[4],r[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},t.inverseTransformMatrix=function(r){var a=[];return e.invert(a,r),[[a[0],a[1],a[2],a[3]],[a[4],a[5],a[6],a[7]],[a[8],a[9],a[10],a[11]],[a[12],a[13],a[14],a[15]]]}})(pc);var IM=nt.exports,NM=on.exports,FM=pc,HM=b1;function OM(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 BM(t){var e=IM.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")}function V1(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function jM(t,e){X1("global",t,e)}function X1(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):NM.warn("addStyleRule failed")}function GM(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&V1(r)}function UM(t){var e=Y1(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=W1(a);if(i){var n=FM.convertCssMatrix(i);r=HM.multiply(r,r,n)}}),r}function W1(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 Y1(t){for(var e=[];VM(t);)e.push(t),t=t.parentNode;return e}function VM(t){return t&&(t instanceof Element||t instanceof HTMLElement)}function XM(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 wh={getGraphDiv:OM,isPlotDiv:BM,removeElement:V1,addStyleRule:jM,addRelatedStyleRule:X1,deleteRelatedStyleRule:GM,getFullTransformMatrix:UM,getElementTransformMatrix:W1,getElementAndAncestors:Y1,equalDomRects:XM},mc={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(" ")}}},ma={};ma.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(" ")};ma.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 WM=ma.dash,YM=Ft.extendFlat,qM={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:YM({},WM,{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"}},ZM=ma.dash,KM=Ft.extendFlat,QM={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:KM({},ZM,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}},Th=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the left side of the component."},editType:e}},sd=dr,JM=mc,df=hr,nm=qM,om=QM,eS=Th,lm=Ft.extendFlat,yc=sd({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});yc.family.dflt='"Open Sans", verdana, arial, sans-serif';yc.size.dflt=12;yc.color.dflt=df.defaultLine;var Yl={font:yc,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:sd({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:lm(eS({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:df.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:df.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:df.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:nm.newshape,activeshape:nm.activeshape,newselection:om.newselection,activeselection:om.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:lm({},JM.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:sd({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}};(function(t){var e=on.exports,r=_h,a=U1,i=Gl,n=wh.addStyleRule,o=Ft,l=Ca,s=Yl,f=o.extendFlat,c=o.extendDeepAll;t.modules={},t.allCategories={},t.allTypes=[],t.subplotsRegistry={},t.transformsRegistry={},t.componentsRegistry={},t.layoutArrayContainers=[],t.layoutArrayRegexes=[],t.traceLayoutAttributes={},t.localeRegistry={},t.apiMethodRegistry={},t.collectableSubplotTypes=null,t.register=function(_){if(t.collectableSubplotTypes=null,_)_&&!Array.isArray(_)&&(_=[_]);else throw new Error("No argument passed to Plotly.register.");for(var T=0;T<_.length;T++){var k=_[T];if(!k)throw new Error("Invalid module was attempted to be registered!");switch(k.moduleType){case"trace":v(k);break;case"transform":d(k);break;case"component":h(k);break;case"locale":p(k);break;case"apiMethod":var S=k.name;t.apiMethodRegistry[S]=k.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},t.getModule=function(x){var _=t.modules[g(x)];return _?_._module:!1},t.traceIs=function(x,_){if(x=g(x),x==="various")return!1;var T=t.modules[x];return T||(x&&e.log("Unrecognized trace type "+x+"."),T=t.modules[l.type.dflt]),!!T.categories[_]},t.getTransformIndices=function(x,_){for(var T=[],k=x.transforms||[],S=0;S<k.length;S++)k[S].type===_&&T.push(S);return T},t.hasTransform=function(x,_){for(var T=x.transforms||[],k=0;k<T.length;k++)if(T[k].type===_)return!0;return!1},t.getComponentMethod=function(x,_){var T=t.componentsRegistry[x];return T&&T[_]||r},t.call=function(){var x=arguments[0],_=[].slice.call(arguments,1);return t.apiMethodRegistry[x].apply(null,_)};function v(x){var _=x.name,T=x.categories,k=x.meta;if(t.modules[_]){e.log("Type "+_+" already registered");return}t.subplotsRegistry[x.basePlotModule.name]||u(x.basePlotModule);for(var S={},A=0;A<T.length;A++)S[T[A]]=!0,t.allCategories[T[A]]=!0;t.modules[_]={_module:x,categories:S},k&&Object.keys(k).length&&(t.modules[_].meta=k),t.allTypes.push(_);for(var D in t.componentsRegistry)m(D,_);x.layoutAttributes&&f(t.traceLayoutAttributes,x.layoutAttributes);var M=x.basePlotModule,C=M.name;if(C==="mapbox"){var $=M.constants.styleRules;for(var F in $)n(".js-plotly-plot .plotly .mapboxgl-"+F,$[F])}(C==="geo"||C==="mapbox")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function u(x){var _=x.name;if(t.subplotsRegistry[_]){e.log("Plot type "+_+" already registered.");return}y(x),t.subplotsRegistry[_]=x;for(var T in t.componentsRegistry)w(T,x.name)}function h(x){if(typeof x.name!="string")throw new Error("Component module *name* must be a string.");var _=x.name;t.componentsRegistry[_]=x,x.layoutAttributes&&(x.layoutAttributes._isLinkedToArray&&a(t.layoutArrayContainers,_),y(x));for(var T in t.modules)m(_,T);for(var k in t.subplotsRegistry)w(_,k);for(var S in t.transformsRegistry)b(_,S);x.schema&&x.schema.layout&&c(s,x.schema.layout)}function d(x){if(typeof x.name!="string")throw new Error("Transform module *name* must be a string.");var _="Transform module "+x.name,T=typeof x.transform=="function",k=typeof x.calcTransform=="function";if(!T&&!k)throw new Error(_+" is missing a *transform* or *calcTransform* method.");T&&k&&e.log([_+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),i(x.attributes)||e.log(_+" registered without an *attributes* object."),typeof x.supplyDefaults!="function"&&e.log(_+" registered without a *supplyDefaults* method."),t.transformsRegistry[x.name]=x;for(var S in t.componentsRegistry)b(S,x.name)}function p(x){var _=x.name,T=_.split("-")[0],k=x.dictionary,S=x.format,A=k&&Object.keys(k).length,D=S&&Object.keys(S).length,M=t.localeRegistry,C=M[_];if(C||(M[_]=C={}),T!==_){var $=M[T];$||(M[T]=$={}),A&&$.dictionary===C.dictionary&&($.dictionary=k),D&&$.format===C.format&&($.format=S)}A&&(C.dictionary=k),D&&(C.format=S)}function y(x){if(x.layoutAttributes){var _=x.layoutAttributes._arrayAttrRegexps;if(_)for(var T=0;T<_.length;T++)a(t.layoutArrayRegexes,_[T])}}function m(x,_){var T=t.componentsRegistry[x].schema;if(!(!T||!T.traces)){var k=T.traces[_];k&&c(t.modules[_]._module.attributes,k)}}function b(x,_){var T=t.componentsRegistry[x].schema;if(!(!T||!T.transforms)){var k=T.transforms[_];k&&c(t.transformsRegistry[_].attributes,k)}}function w(x,_){var T=t.componentsRegistry[x].schema;if(!(!T||!T.subplots)){var k=t.subplotsRegistry[_],S=k.layoutAttributes,A=k.attr==="subplot"?k.name:k.attr;Array.isArray(A)&&(A=A[0]);var D=T.subplots[A];S&&D&&c(S,D)}}function g(x){return typeof x=="object"&&(x=x.type),x}})(Ze);(function(t){var e=Tl.timeFormat,r=ct,a=on.exports,i=Ul.mod,n=Ot,o=n.BADNUM,l=n.ONEDAY,s=n.ONEHOUR,f=n.ONEMIN,c=n.ONESEC,v=n.EPOCHJD,u=Ze,h=Tl.utcFormat,d=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,p=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,y=new Date().getFullYear()-70;function m(P){return P&&u.componentsRegistry.calendars&&typeof P=="string"&&P!=="gregorian"}t.dateTick0=function(P,E){var L=b(P,!!E);if(E<2)return L;var z=t.dateTime2ms(L,P);return z+=l*(E-1),t.ms2DateTime(z,0,P)};function b(P,E){return m(P)?E?u.getComponentMethod("calendars","CANONICAL_SUNDAY")[P]:u.getComponentMethod("calendars","CANONICAL_TICK")[P]:E?"2000-01-02":"2000-01-01"}t.dfltRange=function(P){return m(P)?u.getComponentMethod("calendars","DFLTRANGE")[P]:["2000-01-01","2001-01-01"]},t.isJSDate=function(P){return typeof P=="object"&&P!==null&&typeof P.getTime=="function"};var w,g;t.dateTime2ms=function(P,E){if(t.isJSDate(P)){var L=P.getTimezoneOffset()*f,z=(P.getUTCMinutes()-P.getMinutes())*f+(P.getUTCSeconds()-P.getSeconds())*c+(P.getUTCMilliseconds()-P.getMilliseconds());if(z){var I=3*f;L=L-I/2+i(z-L+I/2,I)}return P=Number(P)-L,P>=w&&P<=g?P:o}if(typeof P!="string"&&typeof P!="number")return o;P=String(P);var H=m(E),U=P.charAt(0);H&&(U==="G"||U==="g")&&(P=P.substr(1),E="");var O=H&&E.substr(0,7)==="chinese",X=P.match(O?p:d);if(!X)return o;var B=X[1],Y=X[3]||"1",Z=Number(X[5]||1),q=Number(X[7]||0),W=Number(X[9]||0),ae=Number(X[11]||0);if(H){if(B.length===2)return o;B=Number(B);var ne;try{var de=u.getComponentMethod("calendars","getCal")(E);if(O){var le=Y.charAt(Y.length-1)==="i";Y=parseInt(Y,10),ne=de.newDate(B,de.toMonthIndex(B,Y,le),Z)}else ne=de.newDate(B,Number(Y),Z)}catch{return o}return ne?(ne.toJD()-v)*l+q*s+W*f+ae*c:o}B.length===2?B=(Number(B)+2e3-y)%100+y:B=Number(B),Y-=1;var oe=new Date(Date.UTC(2e3,Y,Z,q,W));return oe.setUTCFullYear(B),oe.getUTCMonth()!==Y||oe.getUTCDate()!==Z?o:oe.getTime()+ae*c},w=t.MIN_MS=t.dateTime2ms("-9999"),g=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(P,E){return t.dateTime2ms(P,E)!==o};function x(P,E){return String(P+Math.pow(10,E)).substr(1)}var _=90*l,T=3*s,k=5*f;t.ms2DateTime=function(P,E,L){if(typeof P!="number"||!(P>=w&&P<=g))return o;E||(E=0);var z=Math.floor(i(P+.05,1)*10),I=Math.round(P-z/10),H,U,O,X,B,Y;if(m(L)){var Z=Math.floor(I/l)+v,q=Math.floor(i(P,l));try{H=u.getComponentMethod("calendars","getCal")(L).fromJD(Z).formatDate("yyyy-mm-dd")}catch{H=h("G%Y-%m-%d")(new Date(I))}if(H.charAt(0)==="-")for(;H.length<11;)H="-0"+H.substr(1);else for(;H.length<10;)H="0"+H;U=E<_?Math.floor(q/s):0,O=E<_?Math.floor(q%s/f):0,X=E<T?Math.floor(q%f/c):0,B=E<k?q%c*10+z:0}else Y=new Date(I),H=h("%Y-%m-%d")(Y),U=E<_?Y.getUTCHours():0,O=E<_?Y.getUTCMinutes():0,X=E<T?Y.getUTCSeconds():0,B=E<k?Y.getUTCMilliseconds()*10+z:0;return S(H,U,O,X,B)},t.ms2DateTimeLocal=function(P){if(!(P>=w+l&&P<=g-l))return o;var E=Math.floor(i(P+.05,1)*10),L=new Date(Math.round(P-E/10)),z=e("%Y-%m-%d")(L),I=L.getHours(),H=L.getMinutes(),U=L.getSeconds(),O=L.getUTCMilliseconds()*10+E;return S(z,I,H,U,O)};function S(P,E,L,z,I){if((E||L||z||I)&&(P+=" "+x(E,2)+":"+x(L,2),(z||I)&&(P+=":"+x(z,2),I))){for(var H=4;I%10===0;)H-=1,I/=10;P+="."+x(I,H)}return P}t.cleanDate=function(P,E,L){if(P===o)return E;if(t.isJSDate(P)||typeof P=="number"&&isFinite(P)){if(m(L))return a.error("JS Dates and milliseconds are incompatible with world calendars",P),E;if(P=t.ms2DateTimeLocal(+P),!P&&E!==void 0)return E}else if(!t.isDateTime(P,L))return a.error("unrecognized date",P),E;return P};var A=/%\d?f/g,D=/%h/g,M={1:"1",2:"1",3:"2",4:"2"};function C(P,E,L,z){P=P.replace(A,function(H){var U=Math.min(+H.charAt(1)||6,6),O=(E/1e3%1+2).toFixed(U).substr(2).replace(/0+$/,"")||"0";return O});var I=new Date(Math.floor(E+.05));if(P=P.replace(D,function(){return M[L("%q")(I)]}),m(z))try{P=u.getComponentMethod("calendars","worldCalFmt")(P,E,z)}catch{return"Invalid"}return L(P)(I)}var $=[59,59.9,59.99,59.999,59.9999];function F(P,E){var L=i(P+.05,l),z=x(Math.floor(L/s),2)+":"+x(i(Math.floor(L/f),60),2);if(E!=="M"){r(E)||(E=0);var I=Math.min(i(P/c,60),$[E]),H=(100+I).toFixed(E).substr(1);E>0&&(H=H.replace(/0+$/,"").replace(/[\.]$/,"")),z+=":"+H}return z}t.formatDate=function(P,E,L,z,I,H){if(I=m(I)&&I,!E)if(L==="y")E=H.year;else if(L==="m")E=H.month;else if(L==="d")E=H.dayMonth+`
1
+ import{f as ct,t as Jr,d as nt,g as b1,r as Tl,i as XA,a as x1,e as vh,p as _1,m as WA,h as w1,b as T1,c as YA,n as qA,j as ZA,k as KA,l as k1,s as QA,o as JA,q as eM,u as tM,v as rM,w as aM,x as iM,y as dh,z as A1,A as nM,B as oM}from"./vendor.158e8ff0.js";import{g as gi,c as lM}from"./helpers.162e09a8.js";var M1={exports:{}},S1={},cc={};cc.version="2.16.5";var ve={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"},Cr={},hh=Array.isArray,sM=ArrayBuffer,fM=DataView;function L1(t){return sM.isView(t)&&!(t instanceof fM)}Cr.isTypedArray=L1;function Pf(t){return hh(t)||L1(t)}Cr.isArrayOrTypedArray=Pf;function cM(t){return!Pf(t[0])}Cr.isArray1D=cM;Cr.ensureArray=function(t,e){return hh(t)||(t=[]),t.length=e,t};Cr.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),hh(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};Cr.maxRowLength=function(t){return C1(t,Math.max,0)};Cr.minRowLength=function(t){return C1(t,Math.min,1/0)};function C1(t,e,r){if(Pf(t))if(Pf(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 D1=ct,ph=Cr.isArrayOrTypedArray,mh=function(e,r){if(D1(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"?hM(e,r,i):{set:P1(e,i,r),get:$1(e,i),astr:r,parts:i,obj:e}};function $1(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]=$1(r[l],e.slice(o+1))(),n[l]!==n[0]&&(i=!1);return i?n[0]:n}if(typeof a=="number"&&!ph(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 uM=/(^|\.)args\[/;function od(t,e){return t===void 0||t===null&&!e.match(uM)}function P1(t,e,r){return function(a){var i=t,n="",o=od(a,r),l,s;for(s=0;s<e.length-1;s++){if(l=e[s],typeof l=="number"&&!ph(i))throw"array index but container is not an array";if(l===-1){if(o=!dM(i,e.slice(s+1),a,r),o)break;return}if(!R1(i,l,e[s+1],o))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";n=vM(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 vM(t,e){var r=e;return D1(e)?r="["+e+"]":t&&(r="."+e),t+r}function dM(t,e,r,a){var i=ph(r),n=!0,o=r,l=a.replace("-1",0),s=i?!1:od(r,l),f=e[0],c;for(c=0;c<t.length;c++)l=a.replace("-1",c),i&&(o=r[c%r.length],s=od(o,l)),s&&(n=!1),R1(t,c,f,s)&&P1(t[c],e,a.replace("-1",c))(o);return n}function R1(t,e,r,a){if(t[e]===void 0){if(a)return!1;typeof r=="number"?t[e]=[]:t[e]={}}return!0}function hM(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var Tn=mh,pM=/^\w*$/,mM=0,tm=1,us=2,rm=3,Ci=4,yM=function(e,r,a,i){a=a||"name",i=i||"value";var n,o,l,s={};r&&r.length?(l=Tn(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=pM.test(i),v={set:function(u,h){var d=h===null?Ci:mM;if(!o){if(!l||d===Ci)return;o=[],l.set(o)}var p=f[u];if(p===void 0){if(d===Ci)return;d=d|rm,p=o.length,f[u]=p}else h!==(c?o[p][i]:Tn(o[p],i).get())&&(d=d|us);var y=o[p]=o[p]||{};return y[a]=u,c?y[i]=h:Tn(y,i).set(h),h!==null&&(d=d&~Ci),s[p]=s[p]|d,v},get:function(u){if(!!o){var h=f[u];if(h!==void 0)return c?o[h][i]:Tn(o[h],i).get()}},rename:function(u,h){var d=f[u];return d===void 0||(s[d]=s[d]|tm,f[h]=d,delete f[u],o[d][a]=h),v},remove:function(u){var h=f[u];if(h===void 0)return v;var d=o[h];if(Object.keys(d).length>2)return s[h]=s[h]|us,v.set(u,null);if(c){for(n=h;n<o.length;n++)s[n]=s[n]|rm;for(n=h;n<o.length;n++)f[o[n][a]]--;o.splice(h,1),delete f[u]}else Tn(d,i).set(null),s[h]=s[h]|us|Ci;return v},constructUpdate:function(){for(var u,h,d={},p=Object.keys(s),y=0;y<p.length;y++)h=p[y],u=r+"["+h+"]",o[h]?(s[h]&tm&&(d[u+"."+a]=o[h][a]),s[h]&us&&(c?d[u+"."+i]=s[h]&Ci?null:o[h][i]:d[u+"."+i]=s[h]&Ci?null:Tn(o[h],i).get())):d[u]=null;return d}};return v},gM=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,bM=/^[^\.\[\]]+$/,xM=function(t,e){for(;e;){var r=t.match(gM);if(r)t=r[1];else if(t.match(bM))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},Gl=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")},_M=ct,yh=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 _M(a)||(a=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),a},am=Cr.isArrayOrTypedArray,Io=Gl,wM=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(am(i)&&am(n)&&Io(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]&&Io(i[l])&&Io(n[l])&&t(n[l],i[l])}else Io(i)&&Io(n)&&(t(n,i),Object.keys(n).length||delete e[a])}};function TM(t,e){var r=t%e;return r<0?r+e:r}function kM(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}var Ul={mod:TM,modHalf:kM},E1={},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},uc={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"},z1=uc,I1=dr,gh=I1({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});gh.family.dflt=z1.HOVERFONT;gh.size.dflt=z1.HOVERFONTSIZE;var Vl={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:gh,grouptitlefont:I1({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"}},Ft={},im=Gl,No=Array.isArray;function AM(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}Ft.extendFlat=function(){return Xl(arguments,!1,!1,!1)};Ft.extendDeep=function(){return Xl(arguments,!0,!1,!1)};Ft.extendDeepAll=function(){return Xl(arguments,!0,!0,!1)};Ft.extendDeepNoArrays=function(){return Xl(arguments,!0,!1,!0)};function Xl(t,e,r,a){var i=t[0],n=t.length,o,l,s,f,c,v,u;if(n===2&&No(i)&&No(t[1])&&i.length===0){if(u=AM(t[1],i),u)return i;i.splice(0,i.length)}for(var h=1;h<n;h++){o=t[h];for(l in o)s=i[l],f=o[l],a&&No(f)?i[l]=f:e&&f&&(im(f)||(c=No(f)))?(c?(c=!1,v=s&&No(s)?s:[]):v=s&&im(s)?s:{},i[l]=Xl([v,f],e,r,a)):(typeof f<"u"||r)&&(i[l]=f)}return i}var MM=dr,vs=Vl.hoverlabel,ds=Ft.extendFlat,vc={hoverlabel:{bgcolor:ds({},vs.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:ds({},vs.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:MM({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:ds({},vs.align,{arrayOk:!0}),namelength:ds({},vs.namelength,{arrayOk:!0}),editType:"none"}},SM=dr,LM=vc,Ca={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:SM({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with `*reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")},legendwidth:{valType:"number",min:0,editType:"style",description:"Sets the width (in px or fraction) of the legend for this trace."},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appear as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:LM.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(" ")}},CM=Jr.exports,dc={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)"]]},N1=dc.RdBu;function DM(t,e){if(e||(e=N1),!t)return e;function r(){try{t=dc[t]||JSON.parse(t)}catch{t=e}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),F1(t)?t:e}function F1(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||!CM(a[1]).isValid())return!1;e=+a[0]}return!0}function $M(t){return dc[t]!==void 0?!0:F1(t)}var ko={scales:dc,defaultScale:N1,get:DM,isValid:$M},rt={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 da=Jr.exports,PM=ct,RM=Cr.isTypedArray,tr=rt.exports={},hc=hr;tr.defaults=hc.defaults;var EM=tr.defaultLine=hc.defaultLine;tr.lightLine=hc.lightLine;var ld=tr.background=hc.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(da(t))};tr.opacity=function(t){return t?da(t).getAlpha():0};tr.addOpacity=function(t,e){var r=da(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"};tr.combine=function(t,e){var r=da(t).toRgb();if(r.a===1)return da(t).toRgbString();var a=da(e||ld).toRgb(),i=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},n={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return da(n).toRgbString()};tr.contrast=function(t,e,r){var a=da(t);a.getAlpha()!==1&&(a=da(tr.combine(t,ld)));var i=a.isDark()?e?a.lighten(e):ld:r?a.darken(r):EM;return i.toString()};tr.stroke=function(t,e){var r=da(e);t.style({stroke:tr.tinyRGB(r),"stroke-opacity":r.getAlpha()})};tr.fill=function(t,e){var r=da(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]=eu(n[a]);else t[i]=eu(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]=eu(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"&&!RM(n)&&tr.clean(n)}};function eu(t){if(PM(t)||typeof t!="string")return t;var e=t.trim();if(e.substr(0,3)!=="rgb")return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var a=r[1].trim().split(/\s*[\s,]\s*/),i=e.charAt(3)==="a"&&a.length===4;if(!i&&a.length!==3)return t;for(var n=0;n<a.length;n++){if(!a[n].length||(a[n]=Number(a[n]),!(a[n]>=0)))return t;if(n===3)a[n]>1&&(a[n]=1);else if(a[n]>=1)return t}var o=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return i?"rgba("+o+", "+a[3]+")":"rgb("+o+")"}var Wl={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2},Ao={};Ao.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=ct,r=Jr.exports,a=Ca,i=ko,n=rt.exports,o=Wl.DESELECTDIM,l=mh,s=Ao.counter,f=Ul.modHalf,c=Cr.isArrayOrTypedArray;t.valObjectMeta={data_array:{description:["An {array} of data.","The value MUST be an {array}, or we ignore it.","Note that typed arrays (e.g. Float32Array) are supported."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){c(u)?h.set(u):d!==void 0&&h.set(d)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(u,h,d,p){p.coerceNumber&&(u=+u),p.values.indexOf(u)===-1?h.set(d):h.set(u)},validateFunction:function(u,h){h.coerceNumber&&(u=+u);for(var d=h.values,p=0;p<d.length;p++){var y=String(d[p]);if(y.charAt(0)==="/"&&y.charAt(y.length-1)==="/"){var m=new RegExp(y.substr(1,y.length-2));if(m.test(u))return!0}else if(u===d[p])return!0}return!1}},boolean:{description:"A boolean (true/false) value.",requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){u===!0||u===!1?h.set(u):h.set(d)}},number:{description:["A number or a numeric value","(e.g. a number inside a string).","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,h,d,p){!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?h.set(d):h.set(+u)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,h,d,p){u%1||!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?h.set(d):h.set(+u)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(u,h,d,p){if(typeof u!="string"){var y=typeof u=="number";p.strict===!0||!y?h.set(d):h.set(String(u))}else p.noBlank&&!u?h.set(d):h.set(u)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(u,h,d){r(u).isValid()?h.set(u):h.set(d)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){function p(y){return r(y).isValid()}!Array.isArray(u)||!u.length?h.set(d):u.every(p)?h.set(u):h.set(d)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(i.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,h,d){h.set(i.get(u,d))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(u,h,d){u==="auto"?h.set("auto"):e(u)?h.set(f(+u,360)):h.set(d)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(u,h,d,p){var y=p.regex||s(d);if(typeof u=="string"&&y.test(u)){h.set(u);return}h.set(d)},validateFunction:function(u,h){var d=h.dflt;return u===d?!0:typeof u!="string"?!1:!!s(d).test(u)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(u,h,d,p){if((p.extras||[]).indexOf(u)!==-1){h.set(u);return}if(typeof u!="string"){h.set(d);return}for(var y=u.split("+"),m=0;m<y.length;){var b=y[m];p.flags.indexOf(b)===-1||y.indexOf(b)<m?y.splice(m,1):m++}y.length?h.set(y.join("+")):h.set(d)}},any:{description:"Any type.",requiredOpts:[],otherOpts:["dflt","values","arrayOk"],coerceFunction:function(u,h,d){u===void 0?h.set(d):h.set(u)}},info_array:{description:["An {array} of plot information."].join(" "),requiredOpts:["items"],otherOpts:["dflt","freeLength","dimensions"],coerceFunction:function(u,h,d,p){function y($,F,R){var P,E={set:function(L){P=L}};return R===void 0&&(R=F.dflt),t.valObjectMeta[F.valType].coerceFunction($,E,R,F),P}var m=p.dimensions===2||p.dimensions==="1-2"&&Array.isArray(u)&&Array.isArray(u[0]);if(!Array.isArray(u)){h.set(d);return}var b=p.items,w=[],g=Array.isArray(b),x=g&&m&&Array.isArray(b[0]),_=m&&g&&!x,T=g&&!_?b.length:u.length,k,S,A,D,M,C;if(d=Array.isArray(d)?d:[],m)for(k=0;k<T;k++)for(w[k]=[],A=Array.isArray(u[k])?u[k]:[],_?M=b.length:g?M=b[k].length:M=A.length,S=0;S<M;S++)_?D=b[S]:g?D=b[k][S]:D=b,C=y(A[S],D,(d[k]||[])[S]),C!==void 0&&(w[k][S]=C);else for(k=0;k<T;k++)C=y(u[k],g?b[k]:b,d[k]),C!==void 0&&(w[k]=C);h.set(w)},validateFunction:function(u,h){if(!Array.isArray(u))return!1;var d=h.items,p=Array.isArray(d),y=h.dimensions===2;if(!h.freeLength&&u.length!==d.length)return!1;for(var m=0;m<u.length;m++)if(y){if(!Array.isArray(u[m])||!h.freeLength&&u[m].length!==d[m].length)return!1;for(var b=0;b<u[m].length;b++)if(!v(u[m][b],p?d[m][b]:d))return!1}else if(!v(u[m],p?d[m]:d))return!1;return!0}}},t.coerce=function(u,h,d,p,y){var m=l(d,p).get(),b=l(u,p),w=l(h,p),g=b.get(),x=h._template;if(g===void 0&&x&&(g=l(x,p).get(),x=0),y===void 0&&(y=m.dflt),m.arrayOk&&c(g))return w.set(g),g;var _=t.valObjectMeta[m.valType].coerceFunction;_(g,w,y,m);var T=w.get();return x&&T===y&&!v(g,m)&&(g=l(x,p).get(),_(g,w,y,m),T=w.get()),T},t.coerce2=function(u,h,d,p,y){var m=l(u,p),b=t.coerce(u,h,d,p,y),w=m.get();return w!=null?b:!1},t.coerceFont=function(u,h,d){var p={};return d=d||{},p.family=u(h+".family",d.family),p.size=u(h+".size",d.size),p.color=u(h+".color",d.color),p},t.coercePattern=function(u,h,d,p){var y=u(h+".shape");if(y){u(h+".solidity"),u(h+".size");var m=u(h+".fillmode"),b=m==="overlay";if(!p){var w=u(h+".bgcolor",b?d:void 0);u(h+".fgcolor",b?n.contrast(w):d)}u(h+".fgopacity",b?.5:1)}},t.coerceHoverinfo=function(u,h,d){var p=h._module.attributes,y=p.hoverinfo?p:a,m=y.hoverinfo,b;if(d._dataLength===1){var w=m.dflt==="all"?m.flags.slice():m.dflt.split("+");w.splice(w.indexOf("name"),1),b=w.join("+")}return t.coerce(u,h,y,"hoverinfo",b)},t.coerceSelectionMarkerOpacity=function(u,h){if(!!u.marker){var d=u.marker.opacity;if(d!==void 0){var p,y;!c(d)&&!u.selected&&!u.unselected&&(p=d,y=o*d),h("selected.marker.opacity",p),h("unselected.marker.opacity",y)}}};function v(u,h){var d=t.valObjectMeta[h.valType];if(h.arrayOk&&c(u))return!0;if(d.validateFunction)return d.validateFunction(u,h);var p={},y=p,m={set:function(b){y=b}};return d.coerceFunction(u,m,p,h),y!==p}t.validate=v})(E1);var H1={},on={exports:{}},O1={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},editSelection:{valType:"boolean",dflt:!0,description:"Enables moving selections."},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","<path-to-plotly.js>/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},B1={};function j1(t,e){for(var r in t){var a=t[r];a.valType?e[r]=a.dflt:(e[r]||(e[r]={}),j1(a,e[r]))}}j1(O1,B1);var Mo={configAttributes:O1,dfltConfig:B1},tu=nt.exports,zM=ct,Fo=[],G1=function(t,e){if(Fo.indexOf(t)!==-1)return;Fo.push(t);var r=1e3;zM(e)?r=e:e==="long"&&(r=3e3);var a=tu.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(Fo);function n(o){o.duration(700).style("opacity",0).each("end",function(l){var s=Fo.indexOf(l);s!==-1&&Fo.splice(s,1),tu.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=tu.select(this);l.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){l.transition().call(n)});for(var s=l.append("p"),f=o.split(/<br\s*\/?>/g),c=0;c<f.length;c++)c&&s.append("br"),s.append("span").text(f[c]);e==="stick"?l.transition().duration(350).style("opacity",1):l.transition().duration(700).style("opacity",1).transition().delay(r).call(n)})},co=Mo.dfltConfig,bh=G1,xh=on.exports={};xh.log=function(){var t;if(co.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(co.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);bh(r.join("<br>"),"long")}};xh.warn=function(){var t;if(co.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(co.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);bh(r.join("<br>"),"stick")}};xh.error=function(){var t;if(co.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(co.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);bh(r.join("<br>"),"stick")}};var Ze={},_h=function(){},U1=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},pc={};(function(t){var e=b1;t.init2dArray=function(r,a){for(var i=new Array(r),n=0;n<r;n++)i[n]=new Array(a);return i},t.transposeRagged=function(r){var a=0,i=r.length,n,o;for(n=0;n<i;n++)a=Math.max(a,r[n].length);var l=new Array(a);for(n=0;n<a;n++)for(l[n]=new Array(i),o=0;o<i;o++)l[n][o]=r[o][n];return l},t.dot=function(r,a){if(!(r.length&&a.length)||r.length!==a.length)return null;var i=r.length,n,o;if(r[0].length)for(n=new Array(i),o=0;o<i;o++)n[o]=t.dot(r[o],a);else if(a[0].length){var l=t.transposeRagged(a);for(n=new Array(l.length),o=0;o<l.length;o++)n[o]=t.dot(r,l[o])}else for(n=0,o=0;o<i;o++)n+=r[o]*a[o];return n},t.translationMatrix=function(r,a){return[[1,0,r],[0,1,a],[0,0,1]]},t.rotationMatrix=function(r){var a=r*Math.PI/180;return[[Math.cos(a),-Math.sin(a),0],[Math.sin(a),Math.cos(a),0],[0,0,1]]},t.rotationXYMatrix=function(r,a,i){return t.dot(t.dot(t.translationMatrix(a,i),t.rotationMatrix(r)),t.translationMatrix(-a,-i))},t.apply3DTransform=function(r){return function(){var a=arguments,i=arguments.length===1?a[0]:[a[0],a[1],a[2]||0];return t.dot(r,[i[0],i[1],i[2],1]).slice(0,3)}},t.apply2DTransform=function(r){return function(){var a=arguments;a.length===3&&(a=a[0]);var i=arguments.length===1?a[0]:[a[0],a[1]];return t.dot(r,[i[0],i[1],1]).slice(0,2)}},t.apply2DTransform2=function(r){var a=t.apply2DTransform(r);return function(i){return a(i.slice(0,2)).concat(a(i.slice(2,4)))}},t.convertCssMatrix=function(r){if(r){var a=r.length;if(a===16)return r;if(a===6)return[r[0],r[1],0,0,r[2],r[3],0,0,0,0,1,0,r[4],r[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},t.inverseTransformMatrix=function(r){var a=[];return e.invert(a,r),[[a[0],a[1],a[2],a[3]],[a[4],a[5],a[6],a[7]],[a[8],a[9],a[10],a[11]],[a[12],a[13],a[14],a[15]]]}})(pc);var IM=nt.exports,NM=on.exports,FM=pc,HM=b1;function OM(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 BM(t){var e=IM.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")}function V1(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function jM(t,e){X1("global",t,e)}function X1(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):NM.warn("addStyleRule failed")}function GM(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&V1(r)}function UM(t){var e=Y1(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=W1(a);if(i){var n=FM.convertCssMatrix(i);r=HM.multiply(r,r,n)}}),r}function W1(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 Y1(t){for(var e=[];VM(t);)e.push(t),t=t.parentNode;return e}function VM(t){return t&&(t instanceof Element||t instanceof HTMLElement)}function XM(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 wh={getGraphDiv:OM,isPlotDiv:BM,removeElement:V1,addStyleRule:jM,addRelatedStyleRule:X1,deleteRelatedStyleRule:GM,getFullTransformMatrix:UM,getElementTransformMatrix:W1,getElementAndAncestors:Y1,equalDomRects:XM},mc={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(" ")}}},ma={};ma.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(" ")};ma.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 WM=ma.dash,YM=Ft.extendFlat,qM={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:YM({},WM,{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"}},ZM=ma.dash,KM=Ft.extendFlat,QM={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:KM({},ZM,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}},Th=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the left side of the component."},editType:e}},sd=dr,JM=mc,df=hr,nm=qM,om=QM,eS=Th,lm=Ft.extendFlat,yc=sd({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});yc.family.dflt='"Open Sans", verdana, arial, sans-serif';yc.size.dflt=12;yc.color.dflt=df.defaultLine;var Yl={font:yc,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:sd({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:lm(eS({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:df.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:df.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:df.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:nm.newshape,activeshape:nm.activeshape,newselection:om.newselection,activeselection:om.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:lm({},JM.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:sd({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}};(function(t){var e=on.exports,r=_h,a=U1,i=Gl,n=wh.addStyleRule,o=Ft,l=Ca,s=Yl,f=o.extendFlat,c=o.extendDeepAll;t.modules={},t.allCategories={},t.allTypes=[],t.subplotsRegistry={},t.transformsRegistry={},t.componentsRegistry={},t.layoutArrayContainers=[],t.layoutArrayRegexes=[],t.traceLayoutAttributes={},t.localeRegistry={},t.apiMethodRegistry={},t.collectableSubplotTypes=null,t.register=function(_){if(t.collectableSubplotTypes=null,_)_&&!Array.isArray(_)&&(_=[_]);else throw new Error("No argument passed to Plotly.register.");for(var T=0;T<_.length;T++){var k=_[T];if(!k)throw new Error("Invalid module was attempted to be registered!");switch(k.moduleType){case"trace":v(k);break;case"transform":d(k);break;case"component":h(k);break;case"locale":p(k);break;case"apiMethod":var S=k.name;t.apiMethodRegistry[S]=k.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},t.getModule=function(x){var _=t.modules[g(x)];return _?_._module:!1},t.traceIs=function(x,_){if(x=g(x),x==="various")return!1;var T=t.modules[x];return T||(x&&e.log("Unrecognized trace type "+x+"."),T=t.modules[l.type.dflt]),!!T.categories[_]},t.getTransformIndices=function(x,_){for(var T=[],k=x.transforms||[],S=0;S<k.length;S++)k[S].type===_&&T.push(S);return T},t.hasTransform=function(x,_){for(var T=x.transforms||[],k=0;k<T.length;k++)if(T[k].type===_)return!0;return!1},t.getComponentMethod=function(x,_){var T=t.componentsRegistry[x];return T&&T[_]||r},t.call=function(){var x=arguments[0],_=[].slice.call(arguments,1);return t.apiMethodRegistry[x].apply(null,_)};function v(x){var _=x.name,T=x.categories,k=x.meta;if(t.modules[_]){e.log("Type "+_+" already registered");return}t.subplotsRegistry[x.basePlotModule.name]||u(x.basePlotModule);for(var S={},A=0;A<T.length;A++)S[T[A]]=!0,t.allCategories[T[A]]=!0;t.modules[_]={_module:x,categories:S},k&&Object.keys(k).length&&(t.modules[_].meta=k),t.allTypes.push(_);for(var D in t.componentsRegistry)m(D,_);x.layoutAttributes&&f(t.traceLayoutAttributes,x.layoutAttributes);var M=x.basePlotModule,C=M.name;if(C==="mapbox"){var $=M.constants.styleRules;for(var F in $)n(".js-plotly-plot .plotly .mapboxgl-"+F,$[F])}(C==="geo"||C==="mapbox")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function u(x){var _=x.name;if(t.subplotsRegistry[_]){e.log("Plot type "+_+" already registered.");return}y(x),t.subplotsRegistry[_]=x;for(var T in t.componentsRegistry)w(T,x.name)}function h(x){if(typeof x.name!="string")throw new Error("Component module *name* must be a string.");var _=x.name;t.componentsRegistry[_]=x,x.layoutAttributes&&(x.layoutAttributes._isLinkedToArray&&a(t.layoutArrayContainers,_),y(x));for(var T in t.modules)m(_,T);for(var k in t.subplotsRegistry)w(_,k);for(var S in t.transformsRegistry)b(_,S);x.schema&&x.schema.layout&&c(s,x.schema.layout)}function d(x){if(typeof x.name!="string")throw new Error("Transform module *name* must be a string.");var _="Transform module "+x.name,T=typeof x.transform=="function",k=typeof x.calcTransform=="function";if(!T&&!k)throw new Error(_+" is missing a *transform* or *calcTransform* method.");T&&k&&e.log([_+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),i(x.attributes)||e.log(_+" registered without an *attributes* object."),typeof x.supplyDefaults!="function"&&e.log(_+" registered without a *supplyDefaults* method."),t.transformsRegistry[x.name]=x;for(var S in t.componentsRegistry)b(S,x.name)}function p(x){var _=x.name,T=_.split("-")[0],k=x.dictionary,S=x.format,A=k&&Object.keys(k).length,D=S&&Object.keys(S).length,M=t.localeRegistry,C=M[_];if(C||(M[_]=C={}),T!==_){var $=M[T];$||(M[T]=$={}),A&&$.dictionary===C.dictionary&&($.dictionary=k),D&&$.format===C.format&&($.format=S)}A&&(C.dictionary=k),D&&(C.format=S)}function y(x){if(x.layoutAttributes){var _=x.layoutAttributes._arrayAttrRegexps;if(_)for(var T=0;T<_.length;T++)a(t.layoutArrayRegexes,_[T])}}function m(x,_){var T=t.componentsRegistry[x].schema;if(!(!T||!T.traces)){var k=T.traces[_];k&&c(t.modules[_]._module.attributes,k)}}function b(x,_){var T=t.componentsRegistry[x].schema;if(!(!T||!T.transforms)){var k=T.transforms[_];k&&c(t.transformsRegistry[_].attributes,k)}}function w(x,_){var T=t.componentsRegistry[x].schema;if(!(!T||!T.subplots)){var k=t.subplotsRegistry[_],S=k.layoutAttributes,A=k.attr==="subplot"?k.name:k.attr;Array.isArray(A)&&(A=A[0]);var D=T.subplots[A];S&&D&&c(S,D)}}function g(x){return typeof x=="object"&&(x=x.type),x}})(Ze);(function(t){var e=Tl.timeFormat,r=ct,a=on.exports,i=Ul.mod,n=Ot,o=n.BADNUM,l=n.ONEDAY,s=n.ONEHOUR,f=n.ONEMIN,c=n.ONESEC,v=n.EPOCHJD,u=Ze,h=Tl.utcFormat,d=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,p=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,y=new Date().getFullYear()-70;function m(P){return P&&u.componentsRegistry.calendars&&typeof P=="string"&&P!=="gregorian"}t.dateTick0=function(P,E){var L=b(P,!!E);if(E<2)return L;var z=t.dateTime2ms(L,P);return z+=l*(E-1),t.ms2DateTime(z,0,P)};function b(P,E){return m(P)?E?u.getComponentMethod("calendars","CANONICAL_SUNDAY")[P]:u.getComponentMethod("calendars","CANONICAL_TICK")[P]:E?"2000-01-02":"2000-01-01"}t.dfltRange=function(P){return m(P)?u.getComponentMethod("calendars","DFLTRANGE")[P]:["2000-01-01","2001-01-01"]},t.isJSDate=function(P){return typeof P=="object"&&P!==null&&typeof P.getTime=="function"};var w,g;t.dateTime2ms=function(P,E){if(t.isJSDate(P)){var L=P.getTimezoneOffset()*f,z=(P.getUTCMinutes()-P.getMinutes())*f+(P.getUTCSeconds()-P.getSeconds())*c+(P.getUTCMilliseconds()-P.getMilliseconds());if(z){var I=3*f;L=L-I/2+i(z-L+I/2,I)}return P=Number(P)-L,P>=w&&P<=g?P:o}if(typeof P!="string"&&typeof P!="number")return o;P=String(P);var H=m(E),U=P.charAt(0);H&&(U==="G"||U==="g")&&(P=P.substr(1),E="");var O=H&&E.substr(0,7)==="chinese",X=P.match(O?p:d);if(!X)return o;var B=X[1],Y=X[3]||"1",Z=Number(X[5]||1),q=Number(X[7]||0),W=Number(X[9]||0),ae=Number(X[11]||0);if(H){if(B.length===2)return o;B=Number(B);var ne;try{var de=u.getComponentMethod("calendars","getCal")(E);if(O){var le=Y.charAt(Y.length-1)==="i";Y=parseInt(Y,10),ne=de.newDate(B,de.toMonthIndex(B,Y,le),Z)}else ne=de.newDate(B,Number(Y),Z)}catch{return o}return ne?(ne.toJD()-v)*l+q*s+W*f+ae*c:o}B.length===2?B=(Number(B)+2e3-y)%100+y:B=Number(B),Y-=1;var oe=new Date(Date.UTC(2e3,Y,Z,q,W));return oe.setUTCFullYear(B),oe.getUTCMonth()!==Y||oe.getUTCDate()!==Z?o:oe.getTime()+ae*c},w=t.MIN_MS=t.dateTime2ms("-9999"),g=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(P,E){return t.dateTime2ms(P,E)!==o};function x(P,E){return String(P+Math.pow(10,E)).substr(1)}var _=90*l,T=3*s,k=5*f;t.ms2DateTime=function(P,E,L){if(typeof P!="number"||!(P>=w&&P<=g))return o;E||(E=0);var z=Math.floor(i(P+.05,1)*10),I=Math.round(P-z/10),H,U,O,X,B,Y;if(m(L)){var Z=Math.floor(I/l)+v,q=Math.floor(i(P,l));try{H=u.getComponentMethod("calendars","getCal")(L).fromJD(Z).formatDate("yyyy-mm-dd")}catch{H=h("G%Y-%m-%d")(new Date(I))}if(H.charAt(0)==="-")for(;H.length<11;)H="-0"+H.substr(1);else for(;H.length<10;)H="0"+H;U=E<_?Math.floor(q/s):0,O=E<_?Math.floor(q%s/f):0,X=E<T?Math.floor(q%f/c):0,B=E<k?q%c*10+z:0}else Y=new Date(I),H=h("%Y-%m-%d")(Y),U=E<_?Y.getUTCHours():0,O=E<_?Y.getUTCMinutes():0,X=E<T?Y.getUTCSeconds():0,B=E<k?Y.getUTCMilliseconds()*10+z:0;return S(H,U,O,X,B)},t.ms2DateTimeLocal=function(P){if(!(P>=w+l&&P<=g-l))return o;var E=Math.floor(i(P+.05,1)*10),L=new Date(Math.round(P-E/10)),z=e("%Y-%m-%d")(L),I=L.getHours(),H=L.getMinutes(),U=L.getSeconds(),O=L.getUTCMilliseconds()*10+E;return S(z,I,H,U,O)};function S(P,E,L,z,I){if((E||L||z||I)&&(P+=" "+x(E,2)+":"+x(L,2),(z||I)&&(P+=":"+x(z,2),I))){for(var H=4;I%10===0;)H-=1,I/=10;P+="."+x(I,H)}return P}t.cleanDate=function(P,E,L){if(P===o)return E;if(t.isJSDate(P)||typeof P=="number"&&isFinite(P)){if(m(L))return a.error("JS Dates and milliseconds are incompatible with world calendars",P),E;if(P=t.ms2DateTimeLocal(+P),!P&&E!==void 0)return E}else if(!t.isDateTime(P,L))return a.error("unrecognized date",P),E;return P};var A=/%\d?f/g,D=/%h/g,M={1:"1",2:"1",3:"2",4:"2"};function C(P,E,L,z){P=P.replace(A,function(H){var U=Math.min(+H.charAt(1)||6,6),O=(E/1e3%1+2).toFixed(U).substr(2).replace(/0+$/,"")||"0";return O});var I=new Date(Math.floor(E+.05));if(P=P.replace(D,function(){return M[L("%q")(I)]}),m(z))try{P=u.getComponentMethod("calendars","worldCalFmt")(P,E,z)}catch{return"Invalid"}return L(P)(I)}var $=[59,59.9,59.99,59.999,59.9999];function F(P,E){var L=i(P+.05,l),z=x(Math.floor(L/s),2)+":"+x(i(Math.floor(L/f),60),2);if(E!=="M"){r(E)||(E=0);var I=Math.min(i(P/c,60),$[E]),H=(100+I).toFixed(E).substr(1);E>0&&(H=H.replace(/0+$/,"").replace(/[\.]$/,"")),z+=":"+H}return z}t.formatDate=function(P,E,L,z,I,H){if(I=m(I)&&I,!E)if(L==="y")E=H.year;else if(L==="m")E=H.month;else if(L==="d")E=H.dayMonth+`
2
2
  `+H.year;else return F(P,L)+`
3
3
  `+C(H.dayMonthYear,P,z,I);return C(E,P,z,I)};var R=3*l;t.incrementMonth=function(P,E,L){L=m(L)&&L;var z=i(P,l);if(P=Math.round(P-z),L)try{var I=Math.round(P/l)+v,H=u.getComponentMethod("calendars","getCal")(L),U=H.fromJD(I);return E%12?H.add(U,E,"m"):H.add(U,E/12,"y"),(U.toJD()-v)*l+z}catch{a.error("invalid ms "+P+" in calendar "+L)}var O=new Date(P+R);return O.setUTCMonth(O.getUTCMonth()+E)+z-R},t.findExactDates=function(P,E){for(var L=0,z=0,I=0,H=0,U,O,X=m(E)&&u.getComponentMethod("calendars","getCal")(E),B=0;B<P.length;B++){if(O=P[B],!r(O)){H++;continue}if(!(O%l))if(X)try{U=X.fromJD(O/l+v),U.day()===1?U.month()===1?L++:z++:I++}catch{}else U=new Date(O),U.getUTCDate()===1?U.getUTCMonth()===0?L++:z++:I++}z+=L,I+=z;var Y=P.length-H;return{exactYears:L/Y,exactMonths:z/Y,exactDays:I/Y}}})(H1);var kh={},q1=function(e){return e};(function(t){var e=ct,r=on.exports,a=q1,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 h=0,d=v.length,p=0,y=d>1?(v[d-1]-v[0])/(d-1):1,m,b;for(y>=0?b=u?o:l:b=u?f:s,c+=y*n*(u?-1:1)*(y>=0?1:-1);h<d&&p++<100;)m=Math.floor((h+d)/2),b(v[m],c)?h=m+1:d=m;return p>90&&r.log("Long binary search..."),h-1};function o(c,v){return c<v}function l(c,v){return c<=v}function s(c,v){return c>v}function f(c,v){return c>=v}t.sorterAsc=function(c,v){return c-v},t.sorterDes=function(c,v){return v-c},t.distinctVals=function(c){var v=c.slice();v.sort(t.sorterAsc);var u;for(u=v.length-1;u>-1&&v[u]===i;u--);for(var h=v[u]-v[0]||1,d=h/(u||1)/1e4,p=[],y,m=0;m<=u;m++){var b=v[m],w=b-y;y===void 0?(p.push(b),y=b):w>d&&(h=Math.min(h,w),p.push(b),y=b)}return{vals:p,minDiff:h}},t.roundUp=function(c,v,u){for(var h=0,d=v.length-1,p,y=0,m=u?0:1,b=u?1:0,w=u?Math.ceil:Math.floor;h<d&&y++<100;)p=w((h+d)/2),v[p]<=c?h=p+m:d=p-b;return v[h]},t.sort=function(c,v){for(var u=0,h=0,d=1;d<c.length;d++){var p=v(c[d],c[d-1]);if(p<0?u=1:p>0&&(h=1),u&&h)return c.sort(v)}return h?c:c.reverse()},t.findIndexOfMin=function(c,v){v=v||a;for(var u=1/0,h,d=0;d<c.length;d++){var p=v(c[d]);p<u&&(u=p,h=d)}return h}})(kh);var Ah=function(e){return Object.keys(e).sort()},Z1={};(function(t){var e=ct,r=Cr.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)]}})(Z1);var K1=Ul,ru=K1.mod,tS=K1.modHalf,kl=Math.PI,ci=2*kl;function rS(t){return t/180*kl}function aS(t){return t/kl*180}function Mh(t){return Math.abs(t[1]-t[0])>ci-1e-14}function Q1(t,e){return tS(e-t,ci)}function iS(t,e){return Math.abs(Q1(t,e))}function J1(t,e){if(Mh(e))return!0;var r,a;e[0]<e[1]?(r=e[0],a=e[1]):(r=e[1],a=e[0]),r=ru(r,ci),a=ru(a,ci),r>a&&(a+=ci);var i=ru(t,ci),n=i+ci;return i>=r&&i<=a||n>=r&&n<=a}function nS(t,e,r,a){if(!J1(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 Sh(t,e,r,a,i,n,o){i=i||0,n=n||0;var l=Mh([r,a]),s,f,c,v,u;l?(s=0,f=kl,c=ci):r<a?(s=r,c=a):(s=a,c=r),t<e?(v=t,u=e):(v=e,u=t);function h(m,b){return[m*Math.cos(b)+i,n-m*Math.sin(b)]}var d=Math.abs(c-s)<=kl?0:1;function p(m,b,w){return"A"+[m,m]+" "+[0,d,w]+" "+h(m,b)}var y;return l?v===null?y="M"+h(u,s)+p(u,f,0)+p(u,c,0)+"Z":y="M"+h(v,s)+p(v,f,0)+p(v,c,0)+"ZM"+h(u,s)+p(u,f,1)+p(u,c,1)+"Z":v===null?(y="M"+h(u,s)+p(u,c,0),o&&(y+="L0,0Z")):y="M"+h(v,s)+"L"+h(u,s)+p(u,c,0)+"L"+h(v,c)+p(v,s,1)+"Z",y}function oS(t,e,r,a,i){return Sh(null,t,e,r,a,i,0)}function lS(t,e,r,a,i){return Sh(null,t,e,r,a,i,1)}function sS(t,e,r,a,i,n){return Sh(t,e,r,a,i,n,1)}var fS={deg2rad:rS,rad2deg:aS,angleDelta:Q1,angleDist:iS,isFullCircle:Mh,isAngleInsideSector:J1,isPtInsideSector:nS,pathArc:oS,pathSector:lS,pathAnnulus:sS},ln={};ln.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=1/3};ln.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>1/3&&e.x<2/3};ln.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=2/3};ln.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=2/3};ln.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>1/3&&e.y<2/3};ln.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=1/3};var sn={},au=Ul.mod;sn.segmentsIntersect=e_;function e_(t,e,r,a,i,n,o,l){var s=r-t,f=i-t,c=o-i,v=a-e,u=n-e,h=l-n,d=s*h-c*v;if(d===0)return null;var p=(f*h-c*u)/d,y=(f*v-s*u)/d;return y<0||y>1||p<0||p>1?null:{x:t+s*p,y:e+v*p}}sn.segmentDistance=function(e,r,a,i,n,o,l,s){if(e_(e,r,a,i,n,o,l,s))return 0;var f=a-e,c=i-r,v=l-n,u=s-o,h=f*f+c*c,d=v*v+u*u,p=Math.min(hs(f,c,h,n-e,o-r),hs(f,c,h,l-e,s-r),hs(v,u,d,e-n,r-o),hs(v,u,d,a-n,i-o));return Math.sqrt(p)};function hs(t,e,r,a,i){var n=a*t+i*e;if(n<0)return a*a+i*i;if(n>r){var o=a-t,l=i-e;return o*o+l*l}else{var s=a*e-i*t;return s*s/r}}var ps,fd,sm;sn.getTextLocation=function(e,r,a,i){if((e!==fd||i!==sm)&&(ps={},fd=e,sm=i),ps[a])return ps[a];var n=e.getPointAtLength(au(a-i/2,r)),o=e.getPointAtLength(au(a+i/2,r)),l=Math.atan((o.y-n.y)/(o.x-n.x)),s=e.getPointAtLength(au(a,r)),f=(s.x*4+n.x+o.x)/6,c=(s.y*4+n.y+o.y)/6,v={x:f,y:c,theta:l};return ps[a]=v,v};sn.clearLocationCache=function(){fd=null};sn.getVisibleSegment=function(e,r,a){var i=r.left,n=r.right,o=r.top,l=r.bottom,s=0,f=e.getTotalLength(),c=f,v,u;function h(p){var y=e.getPointAtLength(p);p===0?v=y:p===f&&(u=y);var m=y.x<i?i-y.x:y.x>n?y.x-n:0,b=y.y<o?o-y.y:y.y>l?y.y-l:0;return Math.sqrt(m*m+b*b)}for(var d=h(s);d;){if(s+=d+a,s>c)return;d=h(s)}for(d=h(c);d;){if(c-=d+a,s>c)return;d=h(c)}return{min:s,max:c,len:c-s,total:f,isClosed:s===0&&c===f&&Math.abs(v.x-u.x)<.1&&Math.abs(v.y-u.y)<.1}};sn.findPointOnPath=function(e,r,a,i){i=i||{};for(var n=i.pathLength||e.getTotalLength(),o=i.tolerance||.001,l=i.iterationLimit||30,s=e.getPointAtLength(0)[a]>e.getPointAtLength(n)[a]?-1:1,f=0,c=0,v=n,u,h,d;f<l;){if(u=(c+v)/2,h=e.getPointAtLength(u),d=h[a]-r,Math.abs(d)<o)return h;s*d>0?v=u:c=u,f++}return h};var gc={};(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)}})(gc);var cS=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)},uS=ct,vS=XA.exports,dS=function(e){var r;if(e&&e.hasOwnProperty("userAgent")?r=e.userAgent:r=hS(),typeof r!="string")return!0;var a=vS({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(uS(f)&&(f=+f),f>=13)return!0}}}return a};function hS(){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 pS=nt.exports,mS=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]=pS.select(this)}),i},yS=Ze,gS=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=yS.localeRegistry}var f=a.split("-")[0];if(f===a)break;a=f}return r},bS=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},xS=function(e){for(var r=TS(e)?wS:_S,a=[],i=0;i<e.length;i++){var n=e[i];r(n)&&a.push(n)}return a};function _S(t){return t.visible===!0}function wS(t){var e=t[0].trace;return e.visible===!0&&e._length!==0}function TS(t){return Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace}var kS=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},AS=ct,MS=Ot.BADNUM,SS=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,LS=function(e){return typeof e=="string"&&(e=e.replace(SS,"")),AS(e)?Number(e):MS},cl=nt.exports,CS=Tl.utcFormat,DS=x1.format,t_=ct,r_=Ot,a_=r_.FP_SAFE,$S=-a_,fm=r_.BADNUM,ee=ve.exports={};ee.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:e==="0.f"?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var cm={};ee.warnBadFormat=function(t){var e=String(t);cm[e]||(cm[e]=1,ee.warn('encountered bad format: "'+e+'"'))};ee.noFormat=function(t){return String(t)};ee.numberFormat=function(t){var e;try{e=DS(ee.adjustFormat(t))}catch{return ee.warnBadFormat(t),ee.noFormat}return e};ee.nestedProperty=mh;ee.keyedContainer=yM;ee.relativeAttr=xM;ee.isPlainObject=Gl;ee.toLogRange=yh;ee.relinkPrivateKeys=wM;var fn=Cr;ee.isTypedArray=fn.isTypedArray;ee.isArrayOrTypedArray=fn.isArrayOrTypedArray;ee.isArray1D=fn.isArray1D;ee.ensureArray=fn.ensureArray;ee.concat=fn.concat;ee.maxRowLength=fn.maxRowLength;ee.minRowLength=fn.minRowLength;var i_=Ul;ee.mod=i_.mod;ee.modHalf=i_.modHalf;var bi=E1;ee.valObjectMeta=bi.valObjectMeta;ee.coerce=bi.coerce;ee.coerce2=bi.coerce2;ee.coerceFont=bi.coerceFont;ee.coercePattern=bi.coercePattern;ee.coerceHoverinfo=bi.coerceHoverinfo;ee.coerceSelectionMarkerOpacity=bi.coerceSelectionMarkerOpacity;ee.validate=bi.validate;var Nr=H1;ee.dateTime2ms=Nr.dateTime2ms;ee.isDateTime=Nr.isDateTime;ee.ms2DateTime=Nr.ms2DateTime;ee.ms2DateTimeLocal=Nr.ms2DateTimeLocal;ee.cleanDate=Nr.cleanDate;ee.isJSDate=Nr.isJSDate;ee.formatDate=Nr.formatDate;ee.incrementMonth=Nr.incrementMonth;ee.dateTick0=Nr.dateTick0;ee.dfltRange=Nr.dfltRange;ee.findExactDates=Nr.findExactDates;ee.MIN_MS=Nr.MIN_MS;ee.MAX_MS=Nr.MAX_MS;var cn=kh;ee.findBin=cn.findBin;ee.sorterAsc=cn.sorterAsc;ee.sorterDes=cn.sorterDes;ee.distinctVals=cn.distinctVals;ee.roundUp=cn.roundUp;ee.sort=cn.sort;ee.findIndexOfMin=cn.findIndexOfMin;ee.sortObjectKeys=Ah;var xi=Z1;ee.aggNums=xi.aggNums;ee.len=xi.len;ee.mean=xi.mean;ee.median=xi.median;ee.midRange=xi.midRange;ee.variance=xi.variance;ee.stdev=xi.stdev;ee.interp=xi.interp;var ya=pc;ee.init2dArray=ya.init2dArray;ee.transposeRagged=ya.transposeRagged;ee.dot=ya.dot;ee.translationMatrix=ya.translationMatrix;ee.rotationMatrix=ya.rotationMatrix;ee.rotationXYMatrix=ya.rotationXYMatrix;ee.apply3DTransform=ya.apply3DTransform;ee.apply2DTransform=ya.apply2DTransform;ee.apply2DTransform2=ya.apply2DTransform2;ee.convertCssMatrix=ya.convertCssMatrix;ee.inverseTransformMatrix=ya.inverseTransformMatrix;var Da=fS;ee.deg2rad=Da.deg2rad;ee.rad2deg=Da.rad2deg;ee.angleDelta=Da.angleDelta;ee.angleDist=Da.angleDist;ee.isFullCircle=Da.isFullCircle;ee.isAngleInsideSector=Da.isAngleInsideSector;ee.isPtInsideSector=Da.isPtInsideSector;ee.pathArc=Da.pathArc;ee.pathSector=Da.pathSector;ee.pathAnnulus=Da.pathAnnulus;var So=ln;ee.isLeftAnchor=So.isLeftAnchor;ee.isCenterAnchor=So.isCenterAnchor;ee.isRightAnchor=So.isRightAnchor;ee.isTopAnchor=So.isTopAnchor;ee.isMiddleAnchor=So.isMiddleAnchor;ee.isBottomAnchor=So.isBottomAnchor;var Lo=sn;ee.segmentsIntersect=Lo.segmentsIntersect;ee.segmentDistance=Lo.segmentDistance;ee.getTextLocation=Lo.getTextLocation;ee.clearLocationCache=Lo.clearLocationCache;ee.getVisibleSegment=Lo.getVisibleSegment;ee.findPointOnPath=Lo.findPointOnPath;var bc=Ft;ee.extendFlat=bc.extendFlat;ee.extendDeep=bc.extendDeep;ee.extendDeepAll=bc.extendDeepAll;ee.extendDeepNoArrays=bc.extendDeepNoArrays;var Lh=on.exports;ee.log=Lh.log;ee.warn=Lh.warn;ee.error=Lh.error;var PS=Ao;ee.counterRegex=PS.counter;var Ch=gc;ee.throttle=Ch.throttle;ee.throttleDone=Ch.done;ee.clearThrottle=Ch.clear;var $a=wh;ee.getGraphDiv=$a.getGraphDiv;ee.isPlotDiv=$a.isPlotDiv;ee.removeElement=$a.removeElement;ee.addStyleRule=$a.addStyleRule;ee.addRelatedStyleRule=$a.addRelatedStyleRule;ee.deleteRelatedStyleRule=$a.deleteRelatedStyleRule;ee.getFullTransformMatrix=$a.getFullTransformMatrix;ee.getElementTransformMatrix=$a.getElementTransformMatrix;ee.getElementAndAncestors=$a.getElementAndAncestors;ee.equalDomRects=$a.equalDomRects;ee.clearResponsive=cS;ee.preserveDrawingBuffer=dS;ee.makeTraceGroups=mS;ee._=gS;ee.notifier=G1;ee.filterUnique=bS;ee.filterVisible=xS;ee.pushUnique=U1;ee.increment=kS;ee.cleanNumber=LS;ee.ensureNumber=function(e){return t_(e)?(e=Number(e),e>a_||e<$S?fm:e):fm};ee.isIndex=function(t,e){return e!==void 0&&t>=e?!1:t_(t)&&t>=0&&t%1===0};ee.noop=_h;ee.identity=q1;ee.repeat=function(t,e){for(var r=new Array(e),a=0;a<e;a++)r[a]=t;return r};ee.swapAttrs=function(t,e,r,a){r||(r="x"),a||(a="y");for(var i=0;i<e.length;i++){var n=e[i],o=ee.nestedProperty(t,n.replace("?",r)),l=ee.nestedProperty(t,n.replace("?",a)),s=o.get();o.set(l.get()),l.set(s)}};ee.raiseToTop=function(e){e.parentNode.appendChild(e)};ee.cancelTransition=function(t){return t.transition().duration(0)};ee.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))};ee.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r};ee.simpleMap=function(t,e,r,a,i){for(var n=t.length,o=new Array(n),l=0;l<n;l++)o[l]=e(t[l],r,a,i);return o};ee.randstr=function t(e,r,a,i){if(a||(a=16),r===void 0&&(r=24),r<=0)return"0";var n=Math.log(Math.pow(2,r))/Math.log(a),o="",l,s,f;for(l=2;n===1/0;l*=2)n=Math.log(Math.pow(2,r/l))/Math.log(a)*l;var c=n-Math.floor(n);for(l=0;l<Math.floor(n);l++)f=Math.floor(Math.random()*a).toString(a),o=f+o;c&&(s=Math.pow(a,c),f=Math.floor(Math.random()*s).toString(a),o=f+o);var v=parseInt(o,a);return e&&e[o]||v!==1/0&&v>=Math.pow(2,r)?i>10?(ee.warn("randstr failed uniqueness"),o):t(e,r,a,(i||0)+1):o};ee.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(a){a[e]=t,r[a.name]=a,r.optionList.push(a)},r["_"+e]=t,r};ee.smooth=function(t,e){if(e=Math.round(e)||0,e<2)return t;var r=t.length,a=2*r,i=2*e-1,n=new Array(i),o=new Array(r),l,s,f,c;for(l=0;l<i;l++)n[l]=(1-Math.cos(Math.PI*(l+1)/e))/(2*e);for(l=0;l<r;l++){for(c=0,s=0;s<i;s++)f=l+s+1-e,f<-r?f-=a*Math.round(f/a):f>=a&&(f-=a*Math.floor(f/a)),f<0?f=-1-f:f>=r&&(f=a-1-f),c+=t[f]*n[s];o[l]=c}return o};ee.syncOrAsync=function(t,e,r){var a,i;function n(){return ee.syncOrAsync(t,e,r)}for(;t.length;)if(i=t.splice(0,1)[0],a=i(e),a&&a.then)return a.then(n);return r&&r(e)};ee.stripTrailingSlash=function(t){return t.substr(-1)==="/"?t.substr(0,t.length-1):t};ee.noneOrAll=function(t,e,r){if(!!t){var a=!1,i=!0,n,o;for(n=0;n<r.length;n++)o=t[r[n]],o!=null?a=!0:i=!1;if(a&&!i)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}};ee.mergeArray=function(t,e,r,a){var i=typeof a=="function";if(ee.isArrayOrTypedArray(t))for(var n=Math.min(t.length,e.length),o=0;o<n;o++){var l=t[o];e[o][r]=i?a(l):l}};ee.mergeArrayCastPositive=function(t,e,r){return ee.mergeArray(t,e,r,function(a){var i=+a;return isFinite(i)&&i>0?i:0})};ee.fillArray=function(t,e,r,a){if(a=a||ee.identity,ee.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=a(t[i])};ee.castOption=function(t,e,r,a){a=a||ee.identity;var i=ee.nestedProperty(t,r).get();return ee.isArrayOrTypedArray(i)?Array.isArray(e)&&ee.isArrayOrTypedArray(i[e[0]])?a(i[e[0]][e[1]]):a(i[e]):i};ee.extractOption=function(t,e,r,a){if(r in t)return t[r];var i=ee.nestedProperty(e,a).get();if(!Array.isArray(i))return i};function n_(t){var e={};for(var r in t)for(var a=t[r],i=0;i<a.length;i++)e[a[i]]=+r;return e}ee.tagSelected=function(t,e,r){var a=e.selectedpoints,i=e._indexToPoints,n;i&&(n=n_(i));function o(v){return v!==void 0&&v<t.length}for(var l=0;l<a.length;l++){var s=a[l];if(ee.isIndex(s)||ee.isArrayOrTypedArray(s)&&ee.isIndex(s[0])&&ee.isIndex(s[1])){var f=n?n[s]:s,c=r?r[f]:f;o(c)&&(t[c].selected=1)}}};ee.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var a=n_(r),i=[],n=0;n<e.length;n++){var o=e[n];if(ee.isIndex(o)){var l=a[o];ee.isIndex(l)&&i.push(l)}}return i}else return e};ee.getTargetArray=function(t,e){var r=e.target;if(typeof r=="string"&&r){var a=ee.nestedProperty(t,r).get();return Array.isArray(a)?a:!1}else if(Array.isArray(r))return r;return!1};ee.minExtend=function(t,e){var r={};typeof e!="object"&&(e={});var a=3,i=Object.keys(t),n,o,l;for(n=0;n<i.length;n++)o=i[n],l=t[o],!(o.charAt(0)==="_"||typeof l=="function")&&(o==="module"?r[o]=l:Array.isArray(l)?o==="colorscale"?r[o]=l.slice():r[o]=l.slice(0,a):ee.isTypedArray(l)?r[o]=l.subarray(0,a):l&&typeof l=="object"?r[o]=ee.minExtend(t[o],e[o]):r[o]=l);for(i=Object.keys(e),n=0;n<i.length;n++)o=i[n],l=e[o],(typeof l!="object"||!(o in r)||typeof r[o]!="object")&&(r[o]=l);return r};ee.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)};ee.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(t.indexOf(e[r])!==-1)return!0;return!1};ee.isIE=function(){return typeof window.navigator.msSaveBlob<"u"};var RS=/Version\/[\d\.]+.*Safari/;ee.isSafari=function(){return RS.test(window.navigator.userAgent)};var ES=/iPad|iPhone|iPod/;ee.isIOS=function(){return ES.test(window.navigator.userAgent)};var zS=/Firefox\/(\d+)\.\d+/;ee.getFirefoxVersion=function(){var t=zS.exec(window.navigator.userAgent);if(t&&t.length===2){var e=parseInt(t[1]);if(!isNaN(e))return e}return null};ee.isD3Selection=function(t){return t instanceof cl.selection};ee.ensureSingle=function(t,e,r,a){var i=t.select(e+(r?"."+r:""));if(i.size())return i;var n=t.append(e);return r&&n.classed(r,!0),a&&n.call(a),n};ee.ensureSingleById=function(t,e,r,a){var i=t.select(e+"#"+r);if(i.size())return i;var n=t.append(e).attr("id",r);return a&&n.call(a),n};ee.objectFromPath=function(t,e){for(var r=t.split("."),a,i=a={},n=0;n<r.length;n++){var o=r[n],l=null,s=r[n].match(/(.*)\[([0-9]+)\]/);s?(o=s[1],l=s[2],a=a[o]=[],n===r.length-1?a[l]=e:a[l]={},a=a[l]):(n===r.length-1?a[o]=e:a[o]={},a=a[o])}return i};var IS=/^([^\[\.]+)\.(.+)?/,NS=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;ee.expandObjectPaths=function(t){var e,r,a,i,n,o,l;if(typeof t=="object"&&!Array.isArray(t))for(r in t)t.hasOwnProperty(r)&&((e=r.match(IS))?(i=t[r],a=e[1],delete t[r],t[a]=ee.extendDeepNoArrays(t[a]||{},ee.objectFromPath(r,ee.expandObjectPaths(i))[a])):(e=r.match(NS))?(i=t[r],a=e[1],n=parseInt(e[2]),delete t[r],t[a]=t[a]||[],e[3]==="."?(l=e[4],o=t[a][n]=t[a][n]||{},ee.extendDeepNoArrays(o,ee.objectFromPath(l,ee.expandObjectPaths(i)))):t[a][n]=ee.expandObjectPaths(i)):t[r]=ee.expandObjectPaths(t[r]));return t};ee.numSeparate=function(t,e,r){if(r||(r=!1),typeof e!="string"||e.length===0)throw new Error("Separator string required for formatting!");typeof t=="number"&&(t=String(t));var a=/(\d+)(\d{3})/,i=e.charAt(0),n=e.charAt(1),o=t.split("."),l=o[0],s=o.length>1?i+o[1]:"";if(n&&(o.length>1||l.length>4||r))for(;a.test(l);)l=l.replace(a,"$1"+n+"$2");return l+s};ee.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var o_=/^\w*$/;ee.templateString=function(t,e){var r={};return t.replace(ee.TEMPLATE_STRING_REGEX,function(a,i){var n;return o_.test(i)?n=e[i]:(r[i]=r[i]||ee.nestedProperty(e,i).get,n=r[i]()),ee.isValidTextValue(n)?n:""})};var FS={max:10,count:0,name:"hovertemplate"};ee.hovertemplateString=function(){return l_.apply(FS,arguments)};var HS={max:10,count:0,name:"texttemplate"};ee.texttemplateString=function(){return l_.apply(HS,arguments)};var um=/^[:|\|]/;function l_(t,e,r){var a=this,i=arguments;e||(e={});var n={};return t.replace(ee.TEMPLATE_STRING_REGEX,function(o,l,s){var f=l==="xother"||l==="yother",c=l==="_xother"||l==="_yother",v=l==="_xother_"||l==="_yother_",u=l==="xother_"||l==="yother_",h=f||c||u||v,d=l;(c||v)&&(d=d.substring(1)),(u||v)&&(d=d.substring(0,d.length-1));var p;if(h){if(p=e[d],p===void 0)return""}else{var y,m;for(m=3;m<i.length;m++)if(y=i[m],!!y){if(y.hasOwnProperty(d)){p=y[d];break}if(o_.test(d)||(p=ee.nestedProperty(y,d).get(),p=n[d]||ee.nestedProperty(y,d).get(),p&&(n[d]=p)),p!==void 0)break}}if(p===void 0&&a)return a.count<a.max&&(ee.warn("Variable '"+d+"' in "+a.name+" could not be found!"),p=o),a.count===a.max&&ee.warn("Too many "+a.name+" warnings - additional warnings will be suppressed"),a.count++,o;if(s){var b;if(s[0]===":"&&(b=r?r.numberFormat:ee.numberFormat,p=b(s.replace(um,""))(p)),s[0]==="|"){b=r?r.timeFormat:CS;var w=ee.dateTime2ms(p);p=ee.formatDate(w,s.replace(um,""),!1,b)}}else{var g=d+"Label";e.hasOwnProperty(g)&&(p=e[g])}return h&&(p="("+p+")",(c||v)&&(p=" "+p),(u||v)&&(p=p+" ")),p})}var ms=48,vm=57;ee.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,a=0,i=0,n=0;n<r;n++){var o=t.charCodeAt(n)||0,l=e.charCodeAt(n)||0,s=o>=ms&&o<=vm,f=l>=ms&&l<=vm;if(s&&(a=10*a+o-ms),f&&(i=10*i+l-ms),!s||!f){if(a!==i)return a-i;if(o!==l)return o-l}}return i-a};var Vn=2e9;ee.seedPseudoRandom=function(){Vn=2e9};ee.pseudoRandom=function(){var t=Vn;return Vn=(69069*Vn+1)%4294967296,Math.abs(Vn-t)<429496729?ee.pseudoRandom():Vn/4294967296};ee.fillText=function(t,e,r){var a=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=ee.extractOption(t,e,"htx","hovertext");if(ee.isValidTextValue(i))return a(i);var n=ee.extractOption(t,e,"tx","text");if(ee.isValidTextValue(n))return a(n)};ee.isValidTextValue=function(t){return t||t===0};ee.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",a=0;a<e;a++)r.indexOf(".")!==-1&&(r=r.replace("0%","%"),r=r.replace(".%","%"));return r};ee.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||e==="none"};ee.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""};ee.strRotate=function(t){return t?"rotate("+t+")":""};ee.strScale=function(t){return t!==1?"scale("+t+")":""};ee.getTextTransform=function(t){var e=t.noCenter,r=t.textX,a=t.textY,i=t.targetX,n=t.targetY,o=t.anchorX||0,l=t.anchorY||0,s=t.rotate,f=t.scale;return f?f>1&&(f=1):f=0,ee.strTranslate(i-f*(r+o),n-f*(a+l))+ee.strScale(f)+(s?"rotate("+s+(e?"":" "+r+" "+a)+")":"")};ee.setTransormAndDisplay=function(t,e){t.attr("transform",ee.getTextTransform(e)),t.style("display",e.scale?null:"none")};ee.ensureUniformFontSize=function(t,e){var r=ee.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r};ee.join2=function(t,e,r){var a=t.length;return a>1?t.slice(0,-1).join(e)+r+t[a-1]:t.join(e)};ee.bigFont=function(t){return Math.round(1.2*t)};var dm=ee.getFirefoxVersion(),OS=dm!==null&&dm<86;ee.getPositionFromD3Event=function(){return OS?[cl.event.layerX,cl.event.layerY]:[cl.event.offsetX,cl.event.offsetY]};var BS=ve.exports,hm={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var pm in hm){var jS=pm.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");BS.addStyleRule(jS,hm[pm])}var zt={},Dh={},iu=vh.exports.EventEmitter,GS={init:function(t){if(t._ev instanceof iu)return t;var e=new iu,r=new iu;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(a,i){typeof jQuery<"u"&&jQuery(t).trigger(a,i),e.emit(a,i),r.emit(a,i)},t},triggerHandler:function(t,e,r){var a,i;typeof jQuery<"u"&&(a=jQuery(t).triggerHandler(e,r));var n=t._ev;if(!n)return a;var o=n._events[e];if(!o)return a;function l(f){if(f.listener){if(n.removeListener(e,f.listener),!f.fired)return f.fired=!0,f.listener.apply(n,[r])}else return f.apply(n,[r])}o=Array.isArray(o)?o:[o];var s;for(s=0;s<o.length-1;s++)l(o[s]);return i=l(o[s]),a!==void 0?a:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}},ql=GS,mm=ve.exports,US=Mo.dfltConfig;function VS(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)?mm.extendDeep([],a):mm.extendDeepAll({},a):r[i]=a;return r}var Va={};Va.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>US.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)};Va.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0};Va.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1};Va.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++)Va.plotDo(e,r.undo.calls[a],r.undo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1}};Va.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++)Va.plotDo(e,r.redo.calls[a],r.redo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}};Va.plotDo=function(t,e,r){t.autoplay=!0,r=VS(t,r),e.apply(null,r)};var XS=Va,Co={},s_={_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(" ")}},f_=ve.exports,c_=f_.extendFlat,WS=f_.isPlainObject,u_={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(" ")},v_={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(" ")},YS=u_.flags.slice().concat(["fullReplot"]),qS=v_.flags.slice().concat("layoutReplot"),Xa={traces:u_,layout:v_,traceFlags:function(){return ym(YS)},layoutFlags:function(){return ym(qS)},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:d_};function ym(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function d_(t,e,r){var a=c_({},t);for(var i in a){var n=a[i];WS(n)&&(a[i]=h_(n,e,r,i))}return r==="from-root"&&(a.editType=e),a}function h_(t,e,r,a){if(t.valType){var i=c_({},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]=h_(t.items[n],e)}return i}else return d_(t,e,a.charAt(0)==="_"?"nested":"from-root")}(function(t){var e=Ze,r=ve.exports,a=Ca,i=Yl,n=s_,o=mc,l=Mo.configAttributes,s=Xa,f=r.extendDeepAll,c=r.isPlainObject,v=r.isArrayOrTypedArray,u=r.nestedProperty,h=r.valObjectMeta,d="_isSubplotObj",p="_isLinkedToArray",y="_arrayAttrRegexps",m="_deprecated",b=[d,p,y,m];t.IS_SUBPLOT_OBJ=d,t.IS_LINKED_TO_ARRAY=p,t.DEPRECATED=m,t.UNDERSCORE_ATTRS=b,t.get=function(){var R={};e.allTypes.forEach(function(E){R[E]=_(E)});var P={};return Object.keys(e.transformsRegistry).forEach(function(E){P[E]=k(E)}),{defs:{valObjects:h,metaKeys:b.concat(["description","role","editType","impliedEdits"]),editType:{traces:s.traces,layout:s.layout},impliedEdits:{description:["Sometimes when an attribute is changed, other attributes","must be altered as well in order to achieve the intended","result. For example, when `range` is specified, it is","important to set `autorange` to `false` or the new `range`","value would be lost in the redraw. `impliedEdits` is the","mechanism to do this: `impliedEdits: {autorange: false}`.","Each key is a relative paths to the attribute string to","change, using *^* to ascend into the parent container,","for example `range[0]` has `impliedEdits: {*^autorange*: false}`.","A value of `undefined` means that the attribute will not be","changed, but its previous value should be recorded in case","we want to reverse this change later. For example, `autorange`","has `impliedEdits: {*range[0]*: undefined, *range[1]*:undefined}","because the range will likely be changed by redraw."].join(" ")}},traces:R,layout:T(),transforms:P,frames:S(),animation:A(o),config:A(l)}},t.crawl=function(R,P,E,L){var z=E||0;L=L||"",Object.keys(R).forEach(function(I){var H=R[I];if(b.indexOf(I)===-1){var U=(L?L+".":"")+I;P(H,I,R,z,U),!t.isValObject(H)&&c(H)&&I!=="impliedEdits"&&t.crawl(H,P,z+1,U)}})},t.isValObject=function(R){return R&&R.valType!==void 0},t.findArrayAttributes=function(R){var P=[],E=[],L=[],z,I;function H(Z,q,W,ae){E=E.slice(0,ae).concat([q]),L=L.slice(0,ae).concat([Z&&Z._isLinkedToArray]);var ne=Z&&(Z.valType==="data_array"||Z.arrayOk===!0)&&!(E[ae-1]==="colorbar"&&(q==="ticktext"||q==="tickvals"));!ne||U(z,0,"")}function U(Z,q,W){var ae=Z[E[q]],ne=W+E[q];if(q===E.length-1)v(ae)&&P.push(I+ne);else if(L[q]){if(Array.isArray(ae))for(var de=0;de<ae.length;de++)c(ae[de])&&U(ae[de],q+1,ne+"["+de+"].")}else c(ae)&&U(ae,q+1,ne+".")}z=R,I="",t.crawl(a,H),R._module&&R._module.attributes&&t.crawl(R._module.attributes,H);var O=R.transforms;if(O)for(var X=0;X<O.length;X++){var B=O[X],Y=B._module;Y&&(I="transforms["+X+"].",z=B,t.crawl(Y.attributes,H))}return P},t.getTraceValObject=function(R,P){var E=P[0],L=1,z,I;if(E==="transforms"){if(P.length===1)return a.transforms;var H=R.transforms;if(!Array.isArray(H)||!H.length)return!1;var U=P[1];if(!x(U)||U>=H.length)return!1;z=(e.transformsRegistry[H[U].type]||{}).attributes,I=z&&z[P[2]],L=3}else{var O=R._module;if(O||(O=(e.modules[R.type||a.type.dflt]||{})._module),!O)return!1;if(z=O.attributes,I=z&&z[E],!I){var X=O.basePlotModule;X&&X.attributes&&(I=X.attributes[E])}I||(I=a[E])}return g(I,P,L)},t.getLayoutValObject=function(R,P){var E=w(R,P[0]);return g(E,P,1)};function w(R,P){var E,L,z,I,H=R._basePlotModules;if(H){var U;for(E=0;E<H.length;E++){if(z=H[E],z.attrRegex&&z.attrRegex.test(P)){if(z.layoutAttrOverrides)return z.layoutAttrOverrides;!U&&z.layoutAttributes&&(U=z.layoutAttributes)}var O=z.baseLayoutAttrOverrides;if(O&&P in O)return O[P]}if(U)return U}var X=R._modules;if(X){for(E=0;E<X.length;E++)if(I=X[E].layoutAttributes,I&&P in I)return I[P]}for(L in e.componentsRegistry){if(z=e.componentsRegistry[L],z.name==="colorscale"&&P.indexOf("coloraxis")===0)return z.layoutAttributes[P];if(!z.schema&&P===z.name)return z.layoutAttributes}return P in i?i[P]:!1}function g(R,P,E){if(!R)return!1;if(R._isLinkedToArray){if(x(P[E]))E++;else if(E<P.length)return!1}for(;E<P.length;E++){var L=R[P[E]];if(c(L))R=L;else break;if(E===P.length-1)break;if(R._isLinkedToArray){if(E++,!x(P[E]))return!1}else if(R.valType==="info_array"){E++;var z=P[E];if(!x(z))return!1;var I=R.items;if(Array.isArray(I)){if(z>=I.length)return!1;if(R.dimensions===2){if(E++,P.length===E)return R;var H=P[E];if(!x(H))return!1;R=I[z][H]}else R=I[z]}else R=I}}return R}function x(R){return R===Math.round(R)&&R>=0}function _(R){var P,E;P=e.modules[R]._module,E=P.basePlotModule;var L={};L.type=null;var z=f({},a),I=f({},P.attributes);t.crawl(I,function(O,X,B,Y,Z){u(z,Z).set(void 0),O===void 0&&u(I,Z).set(void 0)}),f(L,z),e.traceIs(R,"noOpacity")&&delete L.opacity,e.traceIs(R,"showLegend")||(delete L.showlegend,delete L.legendgroup),e.traceIs(R,"noHover")&&(delete L.hoverinfo,delete L.hoverlabel),P.selectPoints||delete L.selectedpoints,f(L,I),E.attributes&&f(L,E.attributes),L.type=R;var H={meta:P.meta||{},categories:P.categories||{},animatable:Boolean(P.animatable),type:R,attributes:A(L)};if(P.layoutAttributes){var U={};f(U,P.layoutAttributes),H.layoutAttributes=A(U)}return P.animatable||t.crawl(H,function(O){t.isValObject(O)&&"anim"in O&&delete O.anim}),H}function T(){var R={},P,E;f(R,i);for(P in e.subplotsRegistry)if(E=e.subplotsRegistry[P],!!E.layoutAttributes)if(Array.isArray(E.attr))for(var L=0;L<E.attr.length;L++)$(R,E,E.attr[L]);else{var z=E.attr==="subplot"?E.name:E.attr;$(R,E,z)}for(P in e.componentsRegistry){E=e.componentsRegistry[P];var I=E.schema;if(I&&(I.subplots||I.layout)){var H=I.subplots;if(H&&H.xaxis&&!H.yaxis)for(var U in H.xaxis)delete R.yaxis[U]}else E.name==="colorscale"?f(R,E.layoutAttributes):E.layoutAttributes&&F(R,E.layoutAttributes,E.name)}return{layoutAttributes:A(R)}}function k(R){var P=e.transformsRegistry[R],E=f({},P.attributes);return Object.keys(e.componentsRegistry).forEach(function(L){var z=e.componentsRegistry[L];z.schema&&z.schema.transforms&&z.schema.transforms[R]&&Object.keys(z.schema.transforms[R]).forEach(function(I){F(E,z.schema.transforms[R][I],I)})}),{attributes:A(E)}}function S(){var R={frames:f({},n)};return A(R),R.frames}function A(R){return D(R),M(R),C(R),R}function D(R){function P(L){return{valType:"string",description:"Sets the source reference on Chart Studio Cloud for `"+L+"`.",editType:"none"}}function E(L,z,I){t.isValObject(L)?(L.arrayOk===!0||L.valType==="data_array")&&(I[z+"src"]=P(z)):c(L)&&(L.role="object")}t.crawl(R,E)}function M(R){function P(E,L,z){if(!!E){var I=E[p];!I||(delete E[p],z[L]={items:{}},z[L].items[I]=E,z[L].role="object")}}t.crawl(R,P)}function C(R){function P(E){for(var L in E)if(c(E[L]))P(E[L]);else if(Array.isArray(E[L]))for(var z=0;z<E[L].length;z++)P(E[L][z]);else E[L]instanceof RegExp&&(E[L]=E[L].toString())}P(R)}function $(R,P,E){var L=u(R,E),z=f({},P.layoutAttributes);z[d]=!0,L.set(z)}function F(R,P,E){var L=u(R,E);L.set(f(L.get()||{},P))}})(Co);var Ut={exports:{}},At={},no=ve.exports,ZS=Ca,vi="templateitemname",cd={name:{valType:"string",editType:"none",description:["When used in a template, named items are created in the output figure","in addition to any items the figure already has in this array.","You can modify these items in the output figure by making your own","item with `templateitemname` matching this `name`","alongside your modifications (including `visible: false` or","`enabled: false` to hide it).","Has no effect outside of a template."].join(" ")}};cd[vi]={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(" ")};At.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=cd.name,e[vi]=cd[vi],e};At.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=no.coerce(n,{},ZS,"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}};At.newContainer=function(t,e,r){var a=t._template,i=a&&(a[e]||r&&a[r]);no.isPlainObject(i)||(i=null);var n=t[e]={_template:i};return n};At.arrayTemplater=function(t,e,r){var a=t._template,i=a&&a[p_(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[vi]=f[vi];if(!gm(v))return c._template=i,c;for(var u=0;u<n.length;u++){var h=n[u];if(h.name===v)return o[v]=1,c._template=h,c}return c[r]=f[r]||!1,c._template=!1,c}function s(){for(var f=[],c=0;c<n.length;c++){var v=n[c],u=v.name;if(gm(u)&&!o[u]){var h={_template:v,name:u,_input:{_templateitemname:u}};h[vi]=v[vi],f.push(h),o[u]=1}}return f}return{newItem:l,defaultItems:s}};function gm(t){return t&&typeof t=="string"}function p_(t){var e=t.length-1;return t.charAt(e)!=="s"&&no.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}At.arrayDefaultKey=p_;At.arrayEditor=function(t,e,r){var a=(no.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][vi]=n)}s();function f(h,d){l[h]=d}function c(h,d){n?no.nestedProperty(l[o],h).set(d):l[o+"."+h]=d}function v(){var h=l;return s(),h}function u(h,d){h&&c(h,d);var p=v();for(var y in p)no.nestedProperty(t,y).set(p[y])}return{modifyBase:f,modifyItem:c,getUpdateObj:v,applyUpdate:u}};var Vt={},Ho=Ao.counter,wr={idRegex:{x:Ho("x","( domain)?"),y:Ho("y","( domain)?")},attrRegex:Ho("[xy]axis"),xAxisMatch:Ho("xaxis"),yAxisMatch:Ho("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}};(function(t){var e=Ze,r=wr;t.id2name=function(n){if(!(typeof n!="string"||!n.match(r.AX_ID_PATTERN))){var o=n.split(" ")[0].substr(1);return o==="1"&&(o=""),n.charAt(0)+"axis"+o}},t.name2id=function(n){if(!!n.match(r.AX_NAME_PATTERN)){var o=n.substr(5);return o==="1"&&(o=""),n.charAt(0)+o}},t.cleanId=function(n,o,l){var s=/( domain)$/.test(n);if(!(typeof n!="string"||!n.match(r.AX_ID_PATTERN))&&!(o&&n.charAt(0)!==o)&&!(s&&!l)){var f=n.split(" ")[0].substr(1).replace(/^0+/,"");return f==="1"&&(f=""),n.charAt(0)+f+(s&&l?" domain":"")}},t.list=function(i,n,o){var l=i._fullLayout;if(!l)return[];var s=t.listIds(i,n),f=new Array(s.length),c;for(c=0;c<s.length;c++){var v=s[c];f[c]=l[v.charAt(0)+"axis"+v.substr(1)]}if(!o){var u=l._subplots.gl3d||[];for(c=0;c<u.length;c++){var h=l[u[c]];n?f.push(h[n+"axis"]):f.push(h.xaxis,h.yaxis,h.zaxis)}}return f},t.listIds=function(i,n){var o=i._fullLayout;if(!o)return[];var l=o._subplots;return n?l[n+"axis"]:l.xaxis.concat(l.yaxis)},t.getFromId=function(i,n,o){var l=i._fullLayout;return n=n===void 0||typeof n!="string"?n:n.replace(" domain",""),o==="x"?n=n.replace(/y[0-9]*/,""):o==="y"&&(n=n.replace(/x[0-9]*/,"")),l[t.id2name(n)]},t.getFromTrace=function(i,n,o){var l=i._fullLayout,s=null;if(e.traceIs(n,"gl3d")){var f=n.scene;f.substr(0,5)==="scene"&&(s=l[f][o+"axis"])}else s=t.getFromId(i,n[o+"axis"]||o);return s},t.idSort=function(i,n){var o=i.charAt(0),l=n.charAt(0);return o!==l?o>l?1:-1:+(i.substr(1)||1)-+(n.substr(1)||1)},t.ref2id=function(i){return/^[xyz]/.test(i)?i.split(" ")[0]:!1};function a(i,n){if(n&&n.length){for(var o=0;o<n.length;o++)if(n[o][i])return!0}return!1}t.isLinked=function(i,n){return a(n,i._axisMatchGroups)||a(n,i._axisConstraintGroups)}})(Vt);function KS(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()}function QS(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}var un={clearOutlineControllers:KS,clearOutline:QS},Zl={},hl=Ze,JS=wr.SUBPLOT_PATTERN;Zl.getSubplotCalcData=function(t,e,r){var a=hl.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};Zl.getModuleCalcData=function(t,e){var r=[],a=[],i;if(typeof e=="string"?i=hl.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]};Zl.getSubplotData=function(e,r,a){if(!hl.subplotsRegistry[r])return[];var i=hl.subplotsRegistry[r].attr,n=[],o,l,s;if(r==="gl2d"){var f=a.match(JS);l="x"+f[1],s="y"+f[2]}for(var c=0;c<e.length;c++)o=e[c],r==="gl2d"&&hl.traceIs(o,"gl2d")?o[i[0]]===l&&o[i[1]]===s&&n.push(o):o[i]===a&&n.push(o);return n};var nu={},bm;function eL(){return bm||(bm=1,function(t){var e=Ze,r=ve.exports;t.manageCommandObserver=function(s,f,c,v){var u={},h=!0;f&&f._commandObserver&&(u=f._commandObserver),u.cache||(u.cache={}),u.lookupTable={};var d=t.hasSimpleAPICommandBindings(s,c,u.lookupTable);if(f&&f._commandObserver){if(d)return u;if(f._commandObserver.remove)return f._commandObserver.remove(),f._commandObserver=null,u}if(d){a(s,d,u.cache),u.check=function(){if(!!h){var b=a(s,d,u.cache);return b.changed&&v&&u.lookupTable[b.value]!==void 0&&(u.disable(),Promise.resolve(v({value:b.value,type:d.type,prop:d.prop,traces:d.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"],y=0;y<p.length;y++)s._internalOn(p[y],u.check);u.remove=function(){for(var m=0;m<p.length;m++)s._removeInternalListener(p[m],u.check)}}else r.log("Unable to automatically bind plot updates to API command"),u.lookupTable={},u.remove=function(){};return u.disable=function(){h=!1},u.enable=function(){h=!0},f&&(f._commandObserver=u),u},t.hasSimpleAPICommandBindings=function(s,f,c){var v,u=f.length,h;for(v=0;v<u;v++){var d,p=f[v],y=p.method,m=p.args;if(Array.isArray(m)||(m=[]),!y)return!1;var b=t.computeAPICommandBindings(s,y,m);if(b.length!==1)return!1;if(!h)h=b[0],Array.isArray(h.traces)&&h.traces.sort();else{if(d=b[0],d.type!==h.type||d.prop!==h.prop)return!1;if(Array.isArray(h.traces))if(Array.isArray(d.traces)){d.traces.sort();for(var w=0;w<h.traces.length;w++)if(h.traces[w]!==d.traces[w])return!1}else return!1;else if(d.prop!==h.prop)return!1}d=b[0];var g=d.value;if(Array.isArray(g))if(g.length===1)g=g[0];else return!1;c&&(c[g]=v)}return h};function a(s,f,c){var v,u,h,d=!1;if(f.type==="data")v=s._fullData[f.traces!==null?f.traces[0]:0];else if(f.type==="layout")v=s._fullLayout;else return!1;return u=r.nestedProperty(v,f.prop).get(),h=c[f.type]=c[f.type]||{},h.hasOwnProperty(f.prop)&&h[f.prop]!==u&&(d=!0),h[f.prop]=u,{changed:d,value:u}}t.executeAPICommand=function(s,f,c){if(f==="skip")return Promise.resolve();var v=e.apiMethodRegistry[f],u=[s];Array.isArray(c)||(c=[]);for(var h=0;h<c.length;h++)u.push(c[h]);return v.apply(null,u).catch(function(d){return r.warn("API call to Plotly."+f+" rejected.",d),Promise.reject(d)})},t.computeAPICommandBindings=function(s,f,c){var v;switch(Array.isArray(c)||(c=[]),f){case"restyle":v=o(s,c);break;case"relayout":v=n(s,c);break;case"update":v=o(s,[c[0],c[2]]).concat(n(s,[c[1]]));break;case"animate":v=i(s,c);break;default:v=[]}return v};function i(s,f){return Array.isArray(f[0])&&f[0].length===1&&["string","number"].indexOf(typeof f[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:f[0][0].toString()}]:[]}function n(s,f){var c=[],v=f[0],u={};if(typeof v=="string")u[v]=f[1];else if(r.isPlainObject(v))u=v;else return c;return l(u,function(h,d,p){c.push({type:"layout",prop:h,value:p})},"",0),c}function o(s,f){var c,v,u,h,d=[];if(v=f[0],u=f[1],c=f[2],h={},typeof v=="string")h[v]=u;else if(r.isPlainObject(v))h=v,c===void 0&&(c=u);else return d;return c===void 0&&(c=null),l(h,function(p,y,m){var b,w;if(Array.isArray(m)){w=m.slice();var g=Math.min(w.length,s.data.length);c&&(g=Math.min(g,c.length)),b=[];for(var x=0;x<g;x++)b[x]=c?c[x]:x}else w=m,b=c?c.slice():null;if(b===null)Array.isArray(w)&&(w=w[0]);else if(Array.isArray(b)){if(!Array.isArray(w)){var _=w;w=[];for(var T=0;T<b.length;T++)w[T]=_}w.length=Math.min(b.length,w.length)}d.push({type:"data",prop:p,traces:b,value:w})},"",0),d}function l(s,f,c,v){Object.keys(s).forEach(function(u){var h=s[u];if(u[0]!=="_"){var d=c+(v>0?".":"")+u;r.isPlainObject(h)?l(h,f,d,v+1):f(d,u,h)}})}}(nu)),nu}var m_=nt.exports,tL=Tl.timeFormatLocale,rL=x1.formatLocale,Rf=ct,gt=Ze,y_=Co,aL=At,Ue=ve.exports,g_=rt.exports,xm=Ot.BADNUM,Rr=Vt,iL=un.clearOutline,$h=mc,nL=s_,oL=Zl.getModuleCalcData,ud=Ue.relinkPrivateKeys,kn=Ue._,$e=Ut.exports={};Ue.extendFlat($e,gt);$e.attributes=Ca;$e.attributes.type.values=$e.allTypes;$e.fontAttrs=dr;$e.layoutAttributes=Yl;$e.fontWeight="normal";var xc=$e.transformsRegistry,_c=eL();$e.executeAPICommand=_c.executeAPICommand;$e.computeAPICommandBindings=_c.computeAPICommandBindings;$e.manageCommandObserver=_c.manageCommandObserver;$e.hasSimpleAPICommandBindings=_c.hasSimpleAPICommandBindings;$e.redrawText=function(t){return t=Ue.getGraphDiv(t),new Promise(function(e){setTimeout(function(){!t._fullLayout||(gt.getComponentMethod("annotations","draw")(t),gt.getComponentMethod("legend","draw")(t),gt.getComponentMethod("colorbar","draw")(t),e($e.previousPromises(t)))},300)})};$e.resize=function(t){t=Ue.getGraphDiv(t);var e,r=new Promise(function(a,i){(!t||Ue.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||Ue.isHidden(t)){a(t);return}delete t.layout.width,delete t.layout.height;var n=t.changed;t.autoplay=!0,gt.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=Ue.ensureSingle(e._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:g_.defaultLine,"pointer-events":"all"}).each(function(){var f=m_.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&&lL(t,n),o.text(n.text()&&l.text()?" - ":"")}};function lL(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=m_.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 sL=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],fL=["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:kn(t,"Click to enter Plot title"),x:kn(t,"Click to enter X axis title"),y:kn(t,"Click to enter Y axis title"),colorbar:kn(t,"Click to enter Colorscale title"),annotation:kn(t,"new text")},i._traceWord=kn(t,"trace");var u=_m(t,sL);if(i._mapboxAccessToken=c.mapboxAccessToken,a._initialAutoSizeIsDone){var h=a.width,d=a.height;$e.supplyLayoutGlobalDefaults(n,i,u),n.width||(i.width=h),n.height||(i.height=d),$e.sanitizeMargins(i)}else{$e.supplyLayoutGlobalDefaults(n,i,u);var p=!n.width||!n.height,y=i.autosize,m=c.autosizable,b=p&&(y||m);b?$e.plotAutoSize(t,n,i):p&&$e.sanitizeMargins(i),!y&&p&&(n.width=i.width,n.height=i.height)}i._d3locale=vL(u,i.separators),i._extraFormat=_m(t,fL),i._initialAutoSizeIsDone=!0,i._dataLength=s.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var w=i._subplots=uL(),g=i._splomAxes={x:{},y:{}},x=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=cL(o,s),i._globalTransforms=(t._context||{}).globalTransforms,$e.supplyDataDefaults(s,l,n,i);var _=Object.keys(g.x),T=Object.keys(g.y);if(_.length>1&&T.length>1){for(gt.getComponentMethod("grid","sizeDefaults")(n,i),v=0;v<_.length;v++)Ue.pushUnique(w.xaxis,_[v]);for(v=0;v<T.length;v++)Ue.pushUnique(w.yaxis,T[v]);for(var k in x)Ue.pushUnique(w.cartesian,k)}if(i._has=$e._hasPlotType.bind(i),o.length===l.length)for(v=0;v<l.length;v++)ud(l[v],o[v]);$e.supplyLayoutModuleDefaults(n,i,l,t._transitionData);var S=i._visibleModules,A=[];for(v=0;v<S.length;v++){var D=S[v].crossTraceDefaults;D&&Ue.pushUnique(A,D)}for(v=0;v<A.length;v++)A[v](l,i);i._hasOnlyLargeSploms=i._basePlotModules.length===1&&i._basePlotModules[0].name==="splom"&&_.length>15&&T.length>15&&i.shapes.length===0&&i.images.length===0,$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")),$=!!(a._has&&a._has("cartesian")),F=!!(i._has&&i._has("cartesian")),R=$||M,P=F||C;R&&!P?a._bgLayer.remove():P&&!R&&(i._shouldCreateBgLayer=!0),a._zoomlayer&&!t._dragging&&iL({_fullLayout:a}),dL(l,i),ud(i,a),gt.getComponentMethod("colorscale","crossTraceDefaults")(l,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var E=i._tracePreGUI,L={},z;for(z in E)L[z]="old";for(v=0;v<l.length;v++)z=l[v]._fullInput.uid,L[z]||(E[z]={}),L[z]="new";for(z in L)L[z]==="old"&&delete E[z];x_(i),gt.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=Ue.nestedProperty(n,s).get().slice(),Ue.nestedProperty(a,s).set(f)}i.trace=a}}};function cL(t,e){var r=e.length,a=[],i,n;for(i=0;i<t.length;i++){var o=t[i]._fullInput;o!==n&&a.push(o),n=o}var l=a.length,s=new Array(r),f={};function c(h,d){s[d]=h,f[h]=1}function v(h,d){if(h&&typeof h=="string"&&!f[h])return c(h,d),!0}for(i=0;i<r;i++){var u=e[i].uid;typeof u=="number"&&(u=String(u)),!v(u,i)&&(i<l&&v(a[i].uid,i)||c(Ue.randstr(f),i))}return s}function uL(){var t=gt.collectableSubplotTypes,e={},r,a;if(!t){t=[];var i=gt.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++)Ue.pushUnique(t,l[a])}}for(r=0;r<t.length;r++)e[t[r]]=[];return e}function _m(t,e){var r=t._context.locale;r||(r="en-US");var a=!1,i={};function n(v){for(var u=!0,h=0;h<e.length;h++){var d=e[h];i[d]||(v[d]?i[d]=v[d]:u=!1)}u&&(a=!0)}for(var o=0;o<2;o++){for(var l=t._context.locales,s=0;s<2;s++){var f=(l[r]||{}).format;if(f&&(n(f),a))break;l=gt.localeRegistry}var c=r.split("-")[0];if(a||c===r)break;r=c}return a||n(gt.localeRegistry.en.format),i}function vL(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(r){try{r=rL(t).format(Ue.adjustFormat(r))}catch{return Ue.warnBadFormat(r),Ue.noFormat}return r},timeFormat:tL(t).utcFormat}}function dL(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=gt.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 h=t[n];if(u===h.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],h=Rr.getFromId(f,v,"x"),d=Rr.getFromId(f,v,"y"),p;for(u?p=l[v]=u:(p=l[v]={},p.id=v),h._counterAxes.push(d._id),d._counterAxes.push(h._id),h._subplotsWith.push(v),d._subplotsWith.push(v),p.xaxis=h,p.yaxis=d,p._hasClipOnAxisFalse=!1,n=0;n<t.length;n++){var y=t[n];if(y.xaxis===p.xaxis._id&&y.yaxis===p.yaxis._id&&y.cliponaxis===!1){p._hasClipOnAxisFalse=!0;break}}}var m=Rr.list(f,null,!0),b;for(i=0;i<m.length;i++){b=m[i];var w=null;b.overlaying&&(w=Rr.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:Rr.getFromId(f,b.anchor)}for(i=0;i<m.length;i++)if(b=m[i],b._counterAxes.sort(Rr.idSort),b._subplotsWith.sort(Ue.subplotSort),b._mainSubplot=hL(b,e),b._counterAxes.length&&(b.spikemode&&b.spikemode.indexOf("across")!==-1||b.automargin&&b.mirror&&b.anchor!=="free"||gt.getComponentMethod("rangeslider","isVisible")(b))){var g=1,x=0;for(n=0;n<b._counterAxes.length;n++){var _=Rr.getFromId(f,b._counterAxes[n]);g=Math.min(g,_.domain[0]),x=Math.max(x,_.domain[1])}g<x&&(b._counterDomainMin=g,b._counterDomainMax=x)}};function hL(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=Rr.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=[],y_.crawl(t._module.attributes,i)),a=0;a<e.length;a++){var n=Ue.nestedProperty(t,"_input."+e[a]);n.get()||Ue.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||(Ue.pushUnique(i,k),T.visible===!0&&Ue.pushUnique(n,k),Ue.pushUnique(o,T._module.basePlotModule),l++,T._input.visible!==!1&&s++)}var h={},d=[],p=(r.template||{}).data||{},y=aL.traceTemplater(p);for(f=0;f<t.length;f++){if(v=t[f],c=y.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 m=v.visible!==!1&&c.visible===!1,b=pL(c,e,r,a),w=0;w<b.length;w++){var g=b[w],x={_template:c._template,type:c.type,uid:c.uid+w};m&&g.visible===!1&&delete g.visible,$e.supplyTraceDefaults(g,x,l,a,f),ud(x,g),x.index=f,x._input=v,x._fullInput=c,x._expandedIndex=l,x._expandedInput=g,u(x)}else c._fullInput=c,c._expandedInput=c,u(c);gt.traceIs(c,"carpetAxis")&&(h[c.carpet]=c),gt.traceIs(c,"carpetDependent")&&d.push(f)}for(f=0;f<d.length;f++)if(c=e[d[f]],!!c.visible){var _=h[c.carpet];if(c._carpet=_,!_||!_.visible){c.visible=!1;continue}c.xaxis=_.xaxis,c.yaxis=_.yaxis}};$e.supplyAnimationDefaults=function(t){t=t||{};var e,r={};function a(i,n){return Ue.coerce(t||{},r,$h,i,n)}if(a("mode"),a("direction"),a("fromcurrent"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=$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 Ue.coerce(t||{},e,$h.frame,a,i)}return r("duration"),r("redraw"),e};$e.supplyAnimationTransitionDefaults=function(t){var e={};function r(a,i){return Ue.coerce(t||{},e,$h.transition,a,i)}return r("duration"),r("easing"),e};$e.supplyFrameDefaults=function(t){var e={};function r(a,i){return Ue.coerce(t,e,nL,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||g_.defaults,o=n[r%n.length],l;function s(b,w){return Ue.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,h=v.attributes;if(u&&h){var d=a._subplots,p="";if(f||v.name!=="gl2d"){if(Array.isArray(u))for(l=0;l<u.length;l++){var y=u[l],m=Ue.coerce(t,e,h,y);d[y]&&Ue.pushUnique(d[y],m),p+=m}else p=Ue.coerce(t,e,h,u);d[v.name]&&Ue.pushUnique(d[v.name],p)}}}return f&&(s("customdata"),s("ids"),s("meta"),gt.traceIs(e,"showLegend")?(Ue.coerce(t,e,c.attributes.showlegend?c.attributes:$e.attributes,"showlegend"),s("legendwidth"),s("legendgroup"),s("legendgrouptitle.text"),s("legendrank"),e._dfltShowLegend=!0):e._dfltShowLegend=!1,c&&c.supplyDefaults(t,e,o,a),gt.traceIs(e,"noOpacity")||s("opacity"),gt.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),gt.traceIs(e,"noHover")||(e.hovertemplate||Ue.coerceHoverinfo(t,e,a),e.type!=="parcats"&&gt.getComponentMethod("fx","supplyDefaults")(t,e,o,a)),c&&c.selectPoints&&s("selectedpoints"),$e.supplyTransformDefaults(t,e,a)),e};function b_(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||xc[a.type];if(i&&i.makesData)return!0}return!1}$e.hasMakesDataTransform=b_;$e.supplyTransformDefaults=function(t,e,r){if(!!(e._length||b_(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=xc[c],u,h=!(f._module&&f._module===v),d=v&&typeof v.transform=="function";v||Ue.warn("Unrecognized transform type "+c+"."),v&&v.supplyDefaults&&(h||d)?(u=v.supplyDefaults(f,e,r,t),u.type=c,u._module=v,Ue.pushUnique(i,v)):u=Ue.extendFlat({},f),l.push(u)}}};function pL(t,e,r,a){for(var i=t.transforms,n=[t],o=0;o<i.length;o++){var l=i[o],s=xc[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 Ue.coerce(t,e,$e.layoutAttributes,f,c)}var i=t.template;Ue.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),a("autotypenumbers");var n=Ue.coerceFont(a,"font"),o=n.size;Ue.coerceFont(a,"title.font",Ue.extendFlat({},n,{size:Math.round(o*1.4)})),a("title.text",e._dfltTitle.plot),a("title.xref"),a("title.yref"),a("title.x"),a("title.y"),a("title.xanchor"),a("title.yanchor"),a("title.pad.t"),a("title.pad.r"),a("title.pad.b"),a("title.pad.l");var l=a("uniformtext.mode");l&&a("uniformtext.minsize"),a("autosize",!(t.width&&t.height)),a("width"),a("height"),a("minreducedwidth"),a("minreducedheight"),a("margin.l"),a("margin.r"),a("margin.t"),a("margin.b"),a("margin.pad"),a("margin.autoexpand"),t.width&&t.height&&$e.sanitizeMargins(e),gt.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),gt.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),gt.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,a),gt.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(t,e,a),a("meta"),Ue.isPlainObject(t.transition)&&(a("transition.duration"),a("transition.easing"),a("transition.ordering")),gt.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),gt.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,a)};function ys(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=Ue.isPlotDiv(e);if(s&&e.emit("plotly_autosize"),i.fillFrame)o=window.innerWidth,l=window.innerHeight,document.body.style.overflow="hidden";else{var f=s?window.getComputedStyle(e):{};if(o=ys(f.width)||ys(f.maxWidth)||a.width,l=ys(f.height)||ys(f.maxHeight)||a.height,Rf(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 h=!r.width&&Math.abs(a.width-o)>1,d=!r.height&&Math.abs(a.height-l)>1;(d||h)&&(h&&(a.width=o),d&&(a.height=l)),e._initialAutoSize||(e._initialAutoSize={width:o,height:l}),$e.sanitizeMargins(a)};$e.supplyLayoutModuleDefaults=function(t,e,r,a){var i=gt.componentsRegistry,n=e._basePlotModules,o,l,s,f=gt.subplotsRegistry.cartesian;for(o in i)s=i[o],s.includeBasePlot&&s.includeBasePlot(t,e);n.length||n.push(f),e._has("cartesian")&&(gt.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e));for(var c in e._subplots)e._subplots[c].sort(Ue.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)),Ue.clearThrottle(),Ue.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&&Ue.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 x_(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 __=2,w_=2;$e.autoMargin=function(t,e,r){var a=t._fullLayout,i=a.width,n=a.height,o=a.margin,l=a.minreducedwidth,s=a.minreducedheight,f=Ue.constrain(i-o.l-o.r,__,l),c=Ue.constrain(n-o.t-o.b,w_,s),v=Math.max(0,i-f),u=Math.max(0,n-c),h=a._pushmargin,d=a._pushmarginIds;if(o.autoexpand!==!1){if(!r)delete h[e],delete d[e];else{var p=r.pad;if(p===void 0&&(p=Math.min(12,o.l,o.r,o.t,o.b)),v){var y=(r.l+r.r)/v;y>1&&(r.l/=y,r.r/=y)}if(u){var m=(r.t+r.b)/u;m>1&&(r.t/=m,r.b/=m)}var b=r.xl!==void 0?r.xl:r.x,w=r.xr!==void 0?r.xr:r.x,g=r.yt!==void 0?r.yt:r.y,x=r.yb!==void 0?r.yb:r.y;h[e]={l:{val:b,size:r.l+p},r:{val:w,size:r.r+p},b:{val:x,size:r.b+p},t:{val:g,size:r.t+p}},d[e]=1}if(!a._replotting)return $e.doAutoMargin(t)}};$e.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,a=e.height;e._size||(e._size={}),x_(e);var i=e._size,n=e.margin,o=Ue.extendFlat({},i),l=n.l,s=n.r,f=n.t,c=n.b,v=e._pushmargin,u=e._pushmarginIds,h=e.minreducedwidth,d=e.minreducedheight;if(e.margin.autoexpand!==!1){for(var p in v)u[p]||delete v[p];v.base={l:{val:0,size:l},r:{val:1,size:s},t:{val:1,size:f},b:{val:0,size:c}};for(var y in v){var m=v[y].l||{},b=v[y].b||{},w=m.val,g=m.size,x=b.val,_=b.size;for(var T in v){if(Rf(g)&&v[T].r){var k=v[T].r.val,S=v[T].r.size;if(k>w){var A=(g*k+(S-r)*w)/(k-w),D=(S*(1-w)+(g-r)*(1-k))/(k-w);A+D>l+s&&(l=A,s=D)}}if(Rf(_)&&v[T].t){var M=v[T].t.val,C=v[T].t.size;if(M>x){var $=(_*M+(C-a)*x)/(M-x),F=(C*(1-x)+(_-a)*(1-M))/(M-x);$+F>c+f&&(c=$,f=F)}}}}}var R=Ue.constrain(r-n.l-n.r,__,h),P=Ue.constrain(a-n.t-n.b,w_,d),E=Math.max(0,r-R),L=Math.max(0,a-P);if(E){var z=(l+s)/E;z>1&&(l/=z,s/=z)}if(L){var I=(c+f)/L;I>1&&(c/=I,f/=I)}if(i.l=Math.round(l),i.r=Math.round(s),i.t=Math.round(f),i.b=Math.round(c),i.p=Math.round(n.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(a)-i.t-i.b,!e._replotting&&$e.didMarginChange(o,i)){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var H=3*(1+Object.keys(u).length);if(e._redrawFromAutoMarginCount<H)return gt.call("_doPlot",t);e._size=o,Ue.warn("Too many auto-margin redraws.")}mL(t)};function mL(t){var e=Rr.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var a=0;a<e.length;a++){var i=e[a][r];i&&i()}})}var wm=["l","r","t","b","p","w","h"];$e.didMarginChange=function(t,e){for(var r=0;r<wm.length;r++){var a=wm[r],i=t[a],n=e[a];if(!Rf(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,h){if(typeof u=="function")return h?"_function_":null;if(Ue.isPlainObject(u)){var d={},p;return Object.keys(u).sort().forEach(function(y){if(["_","["].indexOf(y.charAt(0))===-1){if(typeof u[y]=="function"){h&&(d[y]="_function");return}if(r==="keepdata"){if(y.substr(y.length-3)==="src")return}else if(r==="keepstream"){if(p=u[y+"src"],typeof p=="string"&&p.indexOf(":")>0&&!Ue.isPlainObject(u.stream))return}else if(r!=="keepall"&&(p=u[y+"src"],typeof p=="string"&&p.indexOf(":")>0))return;d[y]=f(u[y],h)}}),d}return Array.isArray(u)?u.map(function(y){return f(y,h)}):Ue.isTypedArray(u)?Ue.simpleMap(u,Ue.identity):Ue.isJSDate(u)?Ue.ms2DateTimeLocal(+u):u}var c={data:(o||[]).map(function(u){var h=f(u);return e&&delete h.fit,h})};if(!e&&(c.layout=f(l),i)){var v=l._size;c.layout.computed={margin:{b:v.b,l:v.l,r:v.r,t:v.t}}}return s&&(c.frames=f(s)),n&&(c.config=f(t._context,!0)),a==="object"?c:JSON.stringify(c)};$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=Ue.extendDeepNoArrays({},e||{}),u=Ue.expandObjectPaths(v),h={};if(r&&r.length)for(n=0;n<r.length;n++)a=Ue.nestedProperty(u,r[n]),i=a.get(),i===void 0?Ue.nestedProperty(h,r[n]).set(null):(a.set(null),Ue.nestedProperty(h,r[n]).set(i));if(t=Ue.extendDeepNoArrays(t||{},u),r&&r.length){for(n=0;n<r.length;n++)if(l=Ue.nestedProperty(h,r[n]),f=l.get(),!!f){for(s=Ue.nestedProperty(t,r[n]),c=s.get(),Array.isArray(c)||(c=[],s.set(c)),o=0;o<f.length;o++){var d=f[o];d===null?c[o]=null:c[o]=$e.extendObjectWithContainers(c[o],d)}s.set(c)}}return t};$e.dataArrayContainers=["transforms","dimensions"];$e.layoutArrayContainers=gt.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],h=t._fullData[u],d=h._module;if(!!d){if(d.animatable){var p=d.basePlotModule.name;l[p]||(l[p]=[]),l[p].push(u)}t.data[c[v]]=$e.extendTrace(t.data[c[v]],e[v])}}var y=Ue.expandObjectPaths(Ue.extendDeepNoArrays({},r)),m=/^[xy]axis[0-9]*$/;for(var b in y)!m.test(b)||delete y[b].range;$e.extendLayout(t.layout,y),delete t.calcdata,$e.supplyDefaults(t),$e.doCalcdata(t);var w=Ue.expandObjectPaths(r);if(w){var g=t._fullLayout._plots;for(var x in g){var _=g[x],T=_.xaxis,k=_.yaxis,S=T.range.slice(),A=k.range.slice(),D=null,M=null,C=null,$=null;Array.isArray(w[T._name+".range"])?D=w[T._name+".range"].slice():Array.isArray((w[T._name]||{}).range)&&(D=w[T._name].range.slice()),Array.isArray(w[k._name+".range"])?M=w[k._name+".range"].slice():Array.isArray((w[k._name]||{}).range)&&(M=w[k._name].range.slice()),S&&D&&(T.r2l(S[0])!==T.r2l(D[0])||T.r2l(S[1])!==T.r2l(D[1]))&&(C={xr0:S,xr1:D}),A&&M&&(k.r2l(A[0])!==k.r2l(M[0])||k.r2l(A[1])!==k.r2l(M[1]))&&($={yr0:A,yr1:M}),(C||$)&&s.push(Ue.extendFlat({plotinfo:_},C,$))}}return Promise.resolve()},o.runFn=function(f){var c,v=t._fullLayout._basePlotModules,u=s.length,h;if(r)for(h=0;h<v.length;h++)v[h].transitionAxes&&v[h].transitionAxes(t,s,n,f);u?(c=Ue.extendFlat({},n),c.duration=0,delete l.cartesian):c=n;for(var d in l){var p=l[d],y=t._fullData[p[0]]._module;y.basePlotModule.plot(t,p,c,f)}},T_(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,h=a[v._name].range.slice(),d=a[u._name].range.slice(),p=v.range.slice(),y=u.range.slice();v.setScale(),u.setScale();var m=null,b=null;(v.r2l(h[0])!==v.r2l(p[0])||v.r2l(h[1])!==v.r2l(p[1]))&&(m={xr0:h,xr1:p}),(u.r2l(d[0])!==u.r2l(y[0])||u.r2l(d[1])!==u.r2l(y[1]))&&(b={yr0:d,yr1:y}),(m||b)&&l.push(Ue.extendFlat({plotinfo:c},m,b))}return Promise.resolve()},o.runFn=function(s){for(var f=t._fullData,c=t._fullLayout,v=c._basePlotModules,u,h,d,p=[],y=0;y<f.length;y++)p.push(y);function m(){if(!!t._fullLayout)for(var w=0;w<v.length;w++)v[w].transitionAxes&&v[w].transitionAxes(t,l,u,s)}function b(){if(!!t._fullLayout)for(var w=0;w<v.length;w++)v[w].plot(t,d,h,s)}l.length&&e.anim?n.ordering==="traces first"?(u=Ue.extendFlat({},n,{duration:0}),d=p,h=n,setTimeout(m,n.duration),b()):(u=n,d=null,h=Ue.extendFlat({},n,{duration:0}),setTimeout(b,u.duration),m()):l.length?(u=n,m()):e.anim&&(d=p,h=n,b())},T_(t,n,o)};function T_(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 gt.call("redraw",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var u=0,h=0;function d(){return u++,function(){h++,!a&&h===u&&l(v)}}r.runFn(d),setTimeout(d())})}function l(v){if(!!t._transitionData)return n(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return gt.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,$e.reselect,o],c=Ue.syncOrAsync(f,t);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return t})}$e.doCalcdata=function(t,e){var r=Rr.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=y_.findArrayAttributes(n),n._extremes={};var v=i._subplots.polar||[];for(l=0;l<v.length;l++)r.push(i[v[l]].radialaxis,i[v[l]].angularaxis);for(var u in i._colorAxes){var h=i[u];h.cauto!==!1&&(delete h.cmin,delete h.cmax)}var d=!1;function p(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 g=n.transforms[s];o=xc[g.type],o&&o.calcTransform&&(n._hasCalcTransform=!0,d=!0,o.calcTransform(t,n,g))}}}function y(b,w){if(n=a[b],o=n._module,!!o.isContainer===w){var g=[];if(n.visible===!0&&n._length!==0){delete n._indexToPoints;var x=n.transforms||[];for(s=x.length-1;s>=0;s--)if(x[s].enabled){n._indexToPoints=x[s]._indexToPoints;break}o&&o.calc&&(g=o.calc(t,n))}(!Array.isArray(g)||!g[0])&&(g=[{x:xm,y:xm}]),g[0].t||(g[0].t={}),g[0].trace=n,f[b]=g}}for(Tm(r,a,i),l=0;l<a.length;l++)y(l,!0);for(l=0;l<a.length;l++)p(l);for(d&&Tm(r,a,i),l=0;l<a.length;l++)y(l,!0);for(l=0;l<a.length;l++)y(l,!1);km(t);var m=gL(r,t);if(m.length){for(i._numBoxes=0,i._numViolins=0,l=0;l<m.length;l++)y(m[l],!0);for(l=0;l<m.length;l++)y(m[l],!1);km(t)}gt.getComponentMethod("fx","calc")(t),gt.getComponentMethod("errorbars","calc")(t)};var yL=/(total|sum|min|max|mean|median) (ascending|descending)/;function gL(t,e){var r=[],a,i,n,o,l;function s(R,P,E){var L=P._id.charAt(0);if(R==="histogram2dcontour"){var z=P._counterAxes[0],I=Rr.getFromId(e,z),H=L==="x"||z==="x"&&I.type==="category",U=L==="y"||z==="y"&&I.type==="category";return function(O,X){return O===0||X===0||H&&O===E[X].length-1||U&&X===E.length-1?-1:(L==="y"?X:O)-1}}else return function(O,X){return L==="y"?X:O}}var f={min:function(R){return Ue.aggNums(Math.min,null,R)},max:function(R){return Ue.aggNums(Math.max,null,R)},sum:function(R){return Ue.aggNums(function(P,E){return P+E},null,R)},total:function(R){return Ue.aggNums(function(P,E){return P+E},null,R)},mean:function(R){return Ue.mean(R)},median:function(R){return Ue.median(R)}};for(a=0;a<t.length;a++){var c=t[a];if(c.type==="category"){var v=c.categoryorder.match(yL);if(v){var u=v[1],h=v[2],d=c._id.charAt(0),p=d==="x",y=[];for(i=0;i<c._categories.length;i++)y.push([c._categories[i],[]]);for(i=0;i<c._traceIndices.length;i++){var m=c._traceIndices[i],b=e._fullData[m];if(b.visible===!0){var w=b.type;gt.traceIs(b,"histogram")&&(delete b._xautoBinFinished,delete b._yautoBinFinished);var g=w==="splom",x=w==="scattergl",_=e.calcdata[m];for(n=0;n<_.length;n++){var T=_[n],k,S;if(g){var A=b._axesDim[c._id];if(!p){var D=b._diag[A][0];D&&(c=e._fullLayout[Rr.id2name(D)])}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];y[k][1].push(C.values[o])}}else if(x){for(o=0;o<T.t.x.length;o++)p?(k=T.t.x[o],S=T.t.y[o]):(k=T.t.y[o],S=T.t.x[o]),y[k][1].push(S);T.t&&T.t._scene&&delete T.t._scene.dirty}else if(T.hasOwnProperty("z")){S=T.z;var $=s(b.type,c,S);for(o=0;o<S.length;o++)for(l=0;l<S[o].length;l++)k=$(l,o),k+1&&y[k][1].push(S[o][l])}else for(k=T.p,k===void 0&&(k=T[d]),S=T.s,S===void 0&&(S=T.v),S===void 0&&(S=p?T.y:T.x),Array.isArray(S)||(S===void 0?S=[]:S=[S]),o=0;o<S.length;o++)y[k][1].push(S[o])}}}c._categoriesValue=y;var F=[];for(i=0;i<y.length;i++)F.push([y[i][0],f[u](y[i][1])]);F.sort(function(R,P){return R[1]-P[1]}),c._categoriesAggregatedValue=F,c._initialCategories=F.map(function(R){return R[0]}),h==="descending"&&c._initialCategories.reverse(),r=r.concat(c.sortByInitialCategories())}}}return r}function Tm(t,e,r){var a={};function i(s){s.clearCalc(),s.type==="multicategory"&&s.setupMultiCategory(e),a[s._id]=1}Ue.simpleMap(t,i);for(var n=r._axisMatchGroups||[],o=0;o<n.length;o++)for(var l in n[o])a[l]||i(r[Rr.id2name(l)])}function km(t){var e=t._fullLayout,r=e._visibleModules,a={},i,n,o;for(n=0;n<r.length;n++){var l=r[n],s=l.crossTraceCalc;if(s){var f=l.basePlotModule.name;a[f]?Ue.pushUnique(a[f],s):a[f]=[s]}}for(o in a){var c=a[o],v=e._subplots[o];if(Array.isArray(v))for(i=0;i<v.length;i++){var u=v[i],h=o==="cartesian"?e._plots[u]:e[u];for(n=0;n<c.length;n++)c[n](t,h,u)}else for(n=0;n<c.length;n++)c[n](t)}}$e.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()};$e.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()};$e.reselect=function(t){var e=t._fullLayout,r=(t.layout||{}).selections,a=e._previousSelections;e._previousSelections=r;var i=e._reselect||JSON.stringify(r)!==JSON.stringify(a);gt.getComponentMethod("selections","reselect")(t,i)};$e.generalUpdatePerTraceModule=function(t,e,r,a){var i=e.traceHash,n={},o;for(o=0;o<r.length;o++){var l=r[o],s=l[0].trace;s.visible&&(n[s.type]=n[s.type]||[],n[s.type].push(l))}for(var f in i)if(!n[f]){var c=i[f][0],v=c[0].trace;v.visible=!1,n[f]=[c]}for(var u in n){var h=n[u],d=h[0][0].trace._module;d.plot(t,e,Ue.filterVisible(h),a)}e.traceHash=n};$e.plotBasePlot=function(t,e,r,a,i){var n=gt.getModule(t),o=oL(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 Mt={exports:{}},nr={},vn={};(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}})(vn);var Dr={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=nt.exports,r=ve.exports,a=r.strTranslate,i=vn,n=Dr.LINE_SPACING,o=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(L,z,I){var H=L.text(),U=!L.attr("data-notex")&&z&&z._context.typesetMath&&typeof MathJax<"u"&&H.match(o),O=e.select(L.node().parentNode);if(O.empty())return;var X=L.attr("class")?L.attr("class").split(" ")[0]:"text";X+="-math",O.selectAll("svg."+X).remove(),O.selectAll("g."+X+"-group").remove(),L.style("display",null).attr({"data-unformatted":H,"data-math":"N"});function B(){O.empty()||(X=L.attr("class")+"-math",O.select("svg."+X).remove()),L.text("").style("white-space","pre");var Y=F(L.node(),H);Y&&L.style("pointer-events","all"),t.positionText(L),I&&I.call(L)}return U?(z&&z._promises||[]).push(new Promise(function(Y){L.style("display","none");var Z=parseInt(L.node().style.fontSize,10),q={fontSize:Z};v(U[2],q,function(W,ae,ne){O.selectAll("svg."+X).remove(),O.selectAll("g."+X+"-group").remove();var de=W&&W.select("svg");if(!de||!de.node()){B(),Y();return}var le=O.append("g").classed(X+"-group",!0).attr({"pointer-events":"none","data-unformatted":H,"data-math":"Y"});le.node().appendChild(de.node()),ae&&ae.node()&&de.node().insertBefore(ae.node().cloneNode(!0),de.node().firstChild);var oe=ne.width,ue=ne.height;de.attr({class:X,height:ue,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var Se=L.node().style.fill||"black",he=de.select("g");he.attr({fill:Se,stroke:Se});var ye=he.node().getBoundingClientRect(),ke=ye.width,te=ye.height;(ke>oe||te>ue)&&(de.style("overflow","hidden"),ye=de.node().getBoundingClientRect(),ke=ye.width,te=ye.height);var J=+L.attr("x"),_e=+L.attr("y"),pe=Z||L.node().getBoundingClientRect().height,Le=-pe/4;if(X[0]==="y")le.attr({transform:"rotate("+[-90,J,_e]+")"+a(-ke/2,Le-te/2)});else if(X[0]==="l")_e=Le-te/2;else if(X[0]==="a"&&X.indexOf("atitle")!==0)J=0,_e=Le;else{var Ie=L.attr("text-anchor");J=J-ke*(Ie==="middle"?.5:Ie==="end"?1:0),_e=_e+Le-te/2}de.attr({x:J,y:_e}),I&&I.call(L,le),Y(le)})})):B(),L};var l=/(<|&lt;|&#60;)/g,s=/(>|&gt;|&#62;)/g;function f(L){return L.replace(l,"\\lt ").replace(s,"\\gt ")}var c=[["$","$"],["\\(","\\)"]];function v(L,z,I){var H=parseInt((MathJax.version||"").split(".")[0]);if(H!==2&&H!==3){r.warn("No MathJax version:",MathJax.version);return}var U,O,X,B,Y=function(){return O=r.extendDeepAll({},MathJax.Hub.config),X=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:c},displayAlign:"left"})},Z=function(){O=r.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=c},q=function(){if(U=MathJax.Hub.config.menuSettings.renderer,U!=="SVG")return MathJax.Hub.setRenderer("SVG")},W=function(){U=MathJax.config.startup.output,U!=="svg"&&(MathJax.config.startup.output="svg")},ae=function(){var Se="math-output-"+r.randstr({},64);B=e.select("body").append("div").attr({id:Se}).style({visibility:"hidden",position:"absolute","font-size":z.fontSize+"px"}).text(f(L));var he=B.node();return H===2?MathJax.Hub.Typeset(he):MathJax.typeset([he])},ne=function(){var Se=B.select(H===2?".MathJax_SVG":".MathJax"),he=!Se.empty()&&B.select("svg").node();if(!he)r.log("There was an error in the tex syntax.",L),I();else{var ye=he.getBoundingClientRect(),ke;H===2?ke=e.select("body").select("#MathJax_SVG_glyphs"):ke=Se.select("defs"),I(Se,ke,ye)}B.remove()},de=function(){if(U!=="SVG")return MathJax.Hub.setRenderer(U)},le=function(){U!=="svg"&&(MathJax.config.startup.output=U)},oe=function(){return X!==void 0&&(MathJax.Hub.processSectionDelay=X),MathJax.Hub.Config(O)},ue=function(){MathJax.config=O};H===2?MathJax.Hub.Queue(Y,q,ae,ne,de,oe):H===3&&(Z(),W(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ae(),ne(),le(),ue()}))}var u={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},h={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},p="\u200B",y=["http:","https:","mailto:","",void 0,":"],m=t.NEWLINES=/(\r\n?|\n)/g,b=/(<[^<>]*>)/,w=/<(\/?)([^ >]*)(\s+(.*))?>/i,g=/<br(\s+.*)?>/i;t.BR_TAG_ALL=/<br(\s+.*)?>/gi;var x=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(L,z){if(!L)return null;var I=L.match(z),H=I&&(I[3]||I[4]);return H&&C(H)}var A=/(^|;)\s*color:/;t.plainText=function(L,z){z=z||{};for(var I=z.len!==void 0&&z.len!==-1?z.len:1/0,H=z.allowedTags!==void 0?z.allowedTags:["br"],U="...",O=U.length,X=L.split(b),B=[],Y="",Z=0,q=0;q<X.length;q++){var W=X[q],ae=W.match(w),ne=ae&&ae[2].toLowerCase();if(ne)H.indexOf(ne)!==-1&&(B.push(W),Y=ne);else{var de=W.length;if(Z+de<I)B.push(W),Z+=de;else if(Z<I){var le=I-Z;Y&&(Y!=="br"||le<=O||de<=O)&&B.pop(),I>O?B.push(W.substr(0,le-O)+U):B.push(W.substr(0,le));break}Y=""}}return B.join("")};var D={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},M=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(L){return L.replace(M,function(z,I){var H;return I.charAt(0)==="#"?H=$(I.charAt(1)==="x"?parseInt(I.substr(2),16):parseInt(I.substr(1),10)):H=D[I],H||z})}t.convertEntities=C;function $(L){if(!(L>1114111)){var z=String.fromCodePoint;if(z)return z(L);var I=String.fromCharCode;return L<=65535?I(L):I((L>>10)+55232,L%1024+56320)}}function F(L,z){z=z.replace(m," ");var I=!1,H=[],U,O=-1;function X(){O++;var te=document.createElementNS(i.svg,"tspan");e.select(te).attr({class:"line",dy:O*n+"em"}),L.appendChild(te),U=te;var J=H;if(H=[{node:te}],J.length>1)for(var _e=1;_e<J.length;_e++)B(J[_e])}function B(te){var J=te.type,_e={},pe;if(J==="a"){pe="a";var Le=te.target,Ie=te.href,Pe=te.popup;Ie&&(_e={"xlink:xlink:show":Le==="_blank"||Le.charAt(0)!=="_"?"new":"replace",target:Le,"xlink:xlink:href":Ie},Pe&&(_e.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+Pe+'");return false;'))}else pe="tspan";te.style&&(_e.style=te.style);var Be=document.createElementNS(i.svg,pe);if(J==="sup"||J==="sub"){Y(U,p),U.appendChild(Be);var re=document.createElementNS(i.svg,"tspan");Y(re,p),e.select(re).attr("dy",d[J]),_e.dy=h[J],U.appendChild(Be),U.appendChild(re)}else U.appendChild(Be);e.select(Be).attr(_e),U=te.node=Be,H.push(te)}function Y(te,J){te.appendChild(document.createTextNode(J))}function Z(te){if(H.length===1){r.log("Ignoring unexpected end tag </"+te+">.",z);return}var J=H.pop();te!==J.type&&r.log("Start tag <"+J.type+"> doesnt match end tag <"+te+">. Pretending it did match.",z),U=H[H.length-1].node}var q=g.test(z);q?X():(U=L,H=[{node:L}]);for(var W=z.split(b),ae=0;ae<W.length;ae++){var ne=W[ae],de=ne.match(w),le=de&&de[2].toLowerCase(),oe=u[le];if(le==="br")X();else if(oe===void 0)Y(U,C(ne));else if(de[1])Z(le);else{var ue=de[4],Se={type:le},he=S(ue,x);if(he?(he=he.replace(A,"$1 fill:"),oe&&(he+=";"+oe)):oe&&(he=oe),he&&(Se.style=he),le==="a"){I=!0;var ye=S(ue,_);if(ye){var ke=R(ye);ke&&(Se.href=ke,Se.target=S(ue,T)||"_blank",Se.popup=S(ue,k))}}B(Se)}}return I}function R(L){var z=encodeURI(decodeURI(L)),I=document.createElement("a"),H=document.createElement("a");I.href=L,H.href=z;var U=I.protocol,O=H.protocol;return y.indexOf(U)!==-1&&y.indexOf(O)!==-1?z:""}t.sanitizeHTML=function(z){z=z.replace(m," ");for(var I=document.createElement("p"),H=I,U=[],O=z.split(b),X=0;X<O.length;X++){var B=O[X],Y=B.match(w),Z=Y&&Y[2].toLowerCase();if(Z in u)if(Y[1])U.length&&(H=U.pop());else{var q=Y[4],W=S(q,x),ae=W?{style:W}:{};if(Z==="a"){var ne=S(q,_);if(ne){var de=R(ne);if(de){ae.href=de;var le=S(q,T);le&&(ae.target=le)}}}var oe=document.createElement(Z);H.appendChild(oe),e.select(oe).attr(ae),H=oe,U.push(oe)}else H.appendChild(document.createTextNode(C(B)))}var ue="innerHTML";return I[ue]},t.lineCount=function(z){return z.selectAll("tspan.line").size()||1},t.positionText=function(z,I,H){return z.each(function(){var U=e.select(this);function O(Y,Z){return Z===void 0?(Z=U.attr(Y),Z===null&&(U.attr(Y,0),Z=0)):U.attr(Y,Z),Z}var X=O("x",I),B=O("y",H);this.nodeName==="text"&&U.selectAll("tspan.line").attr({x:X,y:B})})};function P(L,z,I){var H=I.horizontalAlign,U=I.verticalAlign||"top",O=L.node().getBoundingClientRect(),X=z.node().getBoundingClientRect(),B,Y,Z;return U==="bottom"?Y=function(){return O.bottom-B.height}:U==="middle"?Y=function(){return O.top+(O.height-B.height)/2}:Y=function(){return O.top},H==="right"?Z=function(){return O.right-B.width}:H==="center"?Z=function(){return O.left+(O.width-B.width)/2}:Z=function(){return O.left},function(){B=this.node().getBoundingClientRect();var q=Z()-X.left,W=Y()-X.top,ae=I.gd||{};if(I.gd){ae._fullLayout._calcInverseTransform(ae);var ne=r.apply3DTransform(ae._fullLayout._invTransform)(q,W);q=ne[0],W=ne[1]}return this.style({top:W+"px",left:q+"px","z-index":1e3}),this}}var E="1px ";t.makeTextShadow=function(L){var z=E,I=E,H=E;return z+I+H+L+", -"+z+"-"+I+H+L+", "+z+"-"+I+H+L+", -"+z+I+H+L},t.makeEditable=function(L,z){var I=z.gd,H=z.delegate,U=e.dispatch("edit","input","cancel"),O=H||L;if(L.style({"pointer-events":H?"none":"all"}),L.size()!==1)throw new Error("boo");function X(){Y(),L.style({opacity:0});var Z=O.attr("class"),q;Z?q="."+Z.split(" ")[0]+"-math-group":q="[class*=-math-group]",q&&e.select(L.node().parentNode).select(q).style({opacity:0})}function B(Z){var q=Z.node(),W=document.createRange();W.selectNodeContents(q);var ae=window.getSelection();ae.removeAllRanges(),ae.addRange(W),q.focus()}function Y(){var Z=e.select(I),q=Z.select(".svg-container"),W=q.append("div"),ae=L.node().style,ne=parseFloat(ae.fontSize||12),de=z.text;de===void 0&&(de=L.attr("data-unformatted")),W.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(de).call(P(L,q,z)).on("blur",function(){I._editing=!1,L.text(this.textContent).style({opacity:1});var le=e.select(this).attr("class"),oe;le?oe="."+le.split(" ")[0]+"-math-group":oe="[class*=-math-group]",oe&&e.select(L.node().parentNode).select(oe).style({opacity:0});var ue=this.textContent;e.select(this).transition().duration(0).remove(),e.select(document).on("mouseup",null),U.edit.call(L,ue)}).on("focus",function(){var le=this;I._editing=!0,e.select(document).on("mouseup",function(){if(e.event.target===le)return!1;document.activeElement===W.node()&&W.node().blur()})}).on("keyup",function(){e.event.which===27?(I._editing=!1,L.style({opacity:1}),e.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),U.cancel.call(L,this.textContent)):(U.input.call(L,this.textContent),e.select(this).call(P(L,q,z)))}).on("keydown",function(){e.event.which===13&&this.blur()}).call(B)}return z.immediate?X():O.on("click",X),e.rebind(L,U,"on")}})(nr);var _t={exports:{}},bL=nt.exports,hf=Jr.exports,pl=ct,gs=ve.exports,Am=rt.exports,xL=ko.isValid;function _L(t,e,r){var a=e?gs.nestedProperty(t,e).get()||{}:t,i=a[r||"color"],n=!1;if(gs.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(pl(i[o])){n=!0;break}}return gs.isPlainObject(a)&&(n||a.showscale===!0||pl(a.cmin)&&pl(a.cmax)||xL(a.colorscale)||gs.isPlainObject(a.colorbar))}var Mm=["showscale","autocolorscale","colorscale","reversescale","colorbar"],Oo=["min","max","mid","auto"];function k_(t){var e=t._colorAx,r=e||t,a={},i,n,o;for(n=0;n<Mm.length;n++)o=Mm[n],a[o]=r[o];if(e)for(i="c",n=0;n<Oo.length;n++)o=Oo[n],a[o]=r["c"+o];else{var l;for(n=0;n<Oo.length;n++){if(o=Oo[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=Oo.indexOf(s)!==-1?i+s:s;r[c]=r["_"+c]=f},a}function A_(t){for(var e=k_(t),r=e.min,a=e.max,i=e.reversescale?M_(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 M_(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 S_(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=hf(a[o]).toRgb();n[o]=[l.r,l.g,l.b,l.a]}var s=bL.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 Sm(s(u))}:c?v=function(u){return pl(u)?s(u):hf(u).isValid()?u:Am.defaultLine}:v=function(u){return pl(u)?Sm(s(u)):hf(u).isValid()?u:Am.defaultLine},v.domain=s.domain,v.range=function(){return a},v}function wL(t,e){return S_(A_(t),e)}function Sm(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return hf(e).toRgbString()}var ga={hasColorscale:_L,extractOpts:k_,extractScale:A_,flipScale:M_,makeColorScaleFunc:S_,makeColorScaleFuncFromTrace:wL},L_={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"},C_=L_,TL=C_.FORMAT_LINK,kL=C_.DATE_FORMAT_LINK;function AL(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?Ph:D_)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}}function Ph(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+TL+"."].join(" ")}function D_(t,e){return Ph(t,e)+[" And for dates see: "+kL+".","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 Do={axisHoverFormat:AL,descriptionOnlyNumbers:Ph,descriptionWithDates:D_},ou=dr,Qn=hr,$_=ma.dash,P_=Ft.extendFlat,Lm=At.templatedArray,Cm=Do.descriptionWithDates,ML=Ot.ONEDAY,Ma=wr,lu=Ma.HOUR_PATTERN,su=Ma.WEEKDAY_PATTERN,Dm={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(" ")};function $m(t){return{valType:"integer",min:0,dflt:t?5:0,editType:"ticks",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")}}var Pm={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(" ")},Rm={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(" ")},Em={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(" ")},zm={valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")};function Im(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return t||(e.dflt=5),e}function Nm(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return t||(e.dflt=1),e}var Fm={valType:"color",dflt:Qn.defaultLine,editType:"ticks",description:"Sets the tick color."},Hm={valType:"color",dflt:Qn.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function Om(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the width (in px) of the grid lines."};return t||(e.dflt=1),e}var Bm=P_({},$_,{editType:"ticks"}),jm={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(" ")},Wa={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:Qn.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:ou({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:[Ma.idRegex.x.toString(),Ma.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:[Ma.idRegex.x.toString(),Ma.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:Lm("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:[su,lu,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+su+"* - 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 *"+lu+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+su+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+lu+"', 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:ML,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:Dm,nticks:$m(),tick0:Pm,dtick:Rm,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:Em,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:zm,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:Im(),tickwidth:Nm(),tickcolor:Fm,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:P_({},$_,{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:ou({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:Cm("tick label")},tickformatstops:Lm("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:Cm("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:Qn.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:jm,gridcolor:Hm,gridwidth:Om(),griddash:Bm,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:Qn.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:Qn.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",Ma.idRegex.x.toString(),Ma.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",Ma.idRegex.x.toString(),Ma.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},minor:{tickmode:Dm,nticks:$m("minor"),tick0:Pm,dtick:Rm,tickvals:Em,ticks:zm,ticklen:Im("minor"),tickwidth:Nm("minor"),tickcolor:Fm,gridcolor:Hm,gridwidth:Om("minor"),griddash:Bm,showgrid:jm,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},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:ou({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}},Pt=Wa,fu=dr,Gm=Ft.extendFlat,SL=Xa.overrideAll,Rh=SL({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:Pt.linecolor,outlinewidth:Pt.linewidth,bordercolor:Pt.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:Pt.tickmode,nticks:Pt.nticks,tick0:Pt.tick0,dtick:Pt.dtick,tickvals:Pt.tickvals,ticktext:Pt.ticktext,ticks:Gm({},Pt.ticks,{dflt:""}),ticklabeloverflow:Gm({},Pt.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:Pt.ticklen,tickwidth:Pt.tickwidth,tickcolor:Pt.tickcolor,ticklabelstep:Pt.ticklabelstep,showticklabels:Pt.showticklabels,tickfont:fu({description:"Sets the color bar's tick label font"}),tickangle:Pt.tickangle,tickformat:Pt.tickformat,tickformatstops:Pt.tickformatstops,tickprefix:Pt.tickprefix,showtickprefix:Pt.showtickprefix,ticksuffix:Pt.ticksuffix,showticksuffix:Pt.showticksuffix,separatethousands:Pt.separatethousands,exponentformat:Pt.exponentformat,minexponent:Pt.minexponent,showexponent:Pt.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:fu({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:fu({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"),LL=Rh,CL=Ao.counter,DL=Ah,R_=ko.scales,$L=DL(R_);function Bo(t){return"`"+t+"`"}var dn=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"?R_[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 "+Bo(f+c));var u=i?" Has an effect only if "+v+" is set to a numerical array.":"",h=a+"auto",d=a+"min",p=a+"max",y=a+"mid",m=Bo(f+h),b=Bo(f+d),w=Bo(f+p),g=b+" and "+w,x={};x[d]=x[p]=void 0;var _={};_[h]=!1;var T={};return c==="color"&&(T.color={valType:"color",arrayOk:!0,editType:s||"style",description:["Sets the",e,"color.","It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to",g,"if set."].join(" ")},r.anim&&(T.color.anim=!0)),T[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:x,description:["Determines whether or not the color domain is computed","with respect to the input data (here "+v+") or the bounds set in",g+u,"Defaults to `false` when",g,"are set by the user."].join(" ")},T[d]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:_,description:["Sets the lower bound of the color domain."+u,"Value should have the same units as",v,"and if set,",w,"must be set as well."].join(" ")},T[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:_,description:["Sets the upper bound of the color domain."+u,"Value should have the same units as",v,"and if set,",b,"must be set as well."].join(" ")},T[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:x,description:["Sets the mid-point of the color domain by scaling",b,"and/or",w,"to be equidistant to this point."+u,"Value should have the same units as",v+".","Has no effect when",m,"is `false`."].join(" ")},T.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+u,"The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use",g+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+$L+"."].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",Bo(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=LL),r.noColorAxis||(T.coloraxis={valType:"subplotid",regex:CL("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},PL=Ft.extendFlat,RL=dn,cu=ko.scales,uu="Note that `autocolorscale` must be true for this attribute to work.",E_={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:cu.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",uu].join(" ")},sequentialminus:{valType:"colorscale",dflt:cu.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",uu].join(" ")},diverging:{valType:"colorscale",dflt:cu.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",uu].join(" ")}},coloraxis:PL({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},RL("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))},EL=ve.exports,z_=function(e){return EL.isPlainObject(e.colorbar)},wc={},vd=ct,Um=ve.exports,I_=Ot,zL=I_.ONEDAY,IL=I_.ONEWEEK;wc.dtick=function(t,e){var r=e==="log",a=e==="date",i=e==="category",n=a?zL:1;if(!t)return n;if(vd(t))return t=Number(t),t<=0?n:i?Math.max(1,Math.round(t)):a?Math.max(.1,t):t;if(typeof t!="string"||!(a||r))return n;var o=t.charAt(0),l=t.substr(1);return l=vd(l)?Number(l):0,l<=0||!(a&&o==="M"&&l===Math.round(l)||r&&o==="L"||r&&o==="D"&&(l===1||l===2))?n:t};wc.tick0=function(t,e,r,a){if(e==="date")return Um.cleanDate(t,Um.dateTick0(r,a%IL===0?1:0));if(!(a==="D1"||a==="D2"))return vd(t)?Number(t):0};var Vm=wc,NL=ve.exports.isArrayOrTypedArray,N_=function(e,r,a,i,n){n||(n={});var o=n.isMinor,l=o?e.minor||{}:e,s=o?r.minor:r,f=o?"minor.":"";function c(b){var w=l[b];return w!==void 0?w:(s._template||{})[b]}var v=c("tick0"),u=c("dtick"),h=c("tickvals"),d=NL(h)?"array":u?"linear":"auto",p=a(f+"tickmode",d);if(p==="auto")a(f+"nticks");else if(p==="linear"){var y=s.dtick=Vm.dtick(u,i);s.tick0=Vm.tick0(v,i,r.calendar,y)}else if(i!=="multicategory"){var m=a(f+"tickvals");m===void 0?s.tickmode="auto":o||a("ticktext")}},vu=ve.exports,Xm=Wa,F_=function(e,r,a,i){var n=i.isMinor,o=n?e.minor||{}:e,l=n?r.minor:r,s=n?Xm.minor:Xm,f=n?"minor.":"",c=vu.coerce2(o,l,s,"ticklen",n?(r.ticklen||5)*.6:void 0),v=vu.coerce2(o,l,s,"tickwidth",n?r.tickwidth||1:void 0),u=vu.coerce2(o,l,s,"tickcolor",(n?r.tickcolor:void 0)||l.color),h=a(f+"ticks",!n&&i.outerTicks||c||v||u?"outside":"");h||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)},H_=function(e){var r=["showexponent","showtickprefix","showticksuffix"],a=r.filter(function(n){return e[n]!==void 0}),i=function(n){return e[n]===e[a[0]]};if(a.every(i)||a.length===1)return e[a[0]]},bs=ve.exports,FL=At,Pa=function(e,r,a){var i=a.name,n=a.inclusionAttr||"visible",o=r[i],l=bs.isArrayOrTypedArray(e[i])?e[i]:[],s=r[i]=[],f=FL.arrayTemplater(r,i,n),c,v;for(c=0;c<l.length;c++){var u=l[c];bs.isPlainObject(u)?v=f.newItem(u):(v=f.newItem({}),v[n]=!1),v._index=c,v[n]!==!1&&a.handleItemDefaults(u,v,r,a),s.push(v)}var h=f.defaultItems();for(c=0;c<h.length;c++)v=h[c],v._index=s.length,a.handleItemDefaults({},v,r,a,{}),s.push(v);if(bs.isArrayOrTypedArray(o)){var d=Math.min(o.length,s.length);for(c=0;c<d;c++)bs.relinkPrivateKeys(s[c],o[c])}return s},O_=ve.exports,HL=rt.exports.contrast,B_=Wa,OL=H_,BL=Pa,j_=function(e,r,a,i,n){n||(n={});var o=OL(e),l=a("showticklabels");if(l){var s=n.font||{},f=r.color,c=r.ticklabelposition||"",v=c.indexOf("inside")!==-1?HL(n.bgColor):f&&f!==B_.color.dflt?f:s.color;if(O_.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");BL(e,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:jL}),r.tickformatstops.length||delete r.tickformatstops,!n.noExp&&!u&&i!=="date"&&(a("showexponent",o),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function jL(t,e){function r(i,n){return O_.coerce(t,e,B_.tickformatstops,i,n)}var a=r("enabled");a&&(r("dtickrange"),r("value"))}var GL=H_,G_=function(e,r,a,i,n){n||(n={});var o=n.tickSuffixDflt,l=GL(e),s=a("tickprefix");s&&a("showtickprefix",l);var f=a("ticksuffix",o);f&&a("showticksuffix",l)},An=ve.exports,UL=At,VL=N_,XL=F_,WL=j_,YL=G_,qL=Rh,U_=function(e,r,a){var i=UL.newContainer(r,"colorbar"),n=e.colorbar||{};function o(w,g){return An.coerce(n,i,qL,w,g)}var l=a.margin||{t:0,b:0,l:0,r:0},s=a.width-l.l-l.r,f=a.height-l.t-l.b,c=o("orientation"),v=c==="v",u=o("thicknessmode");o("thickness",u==="fraction"?30/(v?s:f):30);var h=o("lenmode");o("len",h==="fraction"?1:v?f:s),o("x",v?1.02:.5),o("xanchor",v?"left":"center"),o("xpad"),o("y",v?.5:1.02),o("yanchor",v?"middle":"bottom"),o("ypad"),An.noneOrAll(n,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var d=An.coerce(n,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",d.indexOf("inside")!==-1?"hide past domain":"hide past div"),VL(n,i,o,"linear");var p=a.font,y={outerTicks:!1,font:p};d.indexOf("inside")!==-1&&(y.bgColor="black"),YL(n,i,o,"linear",y),WL(n,i,o,"linear",y),XL(n,i,o,"linear"),o("title.text",a._dfltTitle.colorbar);var m=i.tickfont,b=An.extendFlat({},m,{color:p.color,size:An.bigFont(m.size)});An.coerceFont(o,"title.font",b),o("title.side",v?"top":"right")},Wm=ct,dd=ve.exports,ZL=z_,KL=U_,Ym=ko.isValid,QL=Ze.traceIs;function du(t,e){var r=e.slice(0,e.length-1);return e?dd.nestedProperty(t,r).get()||{}:t}var Kl=function t(e,r,a,i,n){var o=n.prefix,l=n.cLetter,s="_module"in r,f=du(e,o),c=du(r,o),v=du(r._template||{},o)||{},u=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,a,i,n)};if(s){var h=a._colorAxes||{},d=i(o+"coloraxis");if(d){var p=QL(r,"contour")&&dd.nestedProperty(r,"contours.coloring").get()||"heatmap",y=h[d];y?(y[2].push(u),y[0]!==p&&(y[0]=!1,dd.warn(["Ignoring coloraxis:",d,"setting","as it is linked to incompatible colorscales."].join(" ")))):h[d]=[p,r,[u]];return}}var m=f[l+"min"],b=f[l+"max"],w=Wm(m)&&Wm(b)&&m<b,g=i(o+l+"auto",!w);g?i(o+l+"mid"):(i(o+l+"min"),i(o+l+"max"));var x=f.colorscale,_=v.colorscale,T;if(x!==void 0&&(T=!Ym(x)),_!==void 0&&(T=!Ym(_)),i(o+"autocolorscale",T),i(o+"colorscale"),i(o+"reversescale"),o!=="marker.line."){var k;o&&s&&(k=ZL(f));var S=i(o+"showscale",k);S&&(o&&v&&(c._template=v),KL(f,c,a))}},qm=ve.exports,JL=At,Zm=E_,eC=Kl,tC=function(e,r){function a(v,u){return qm.coerce(e,r,Zm,v,u)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var i=r._colorAxes,n,o;function l(v,u){return qm.coerce(n,o,Zm.coloraxis,v,u)}for(var s in i){var f=i[s];if(f[0])n=e[s]||{},o=JL.newContainer(r,s,"coloraxis"),o._name=s,eC(n,o,r,l,{prefix:"",cLetter:"c"});else{for(var c=0;c<f[2].length;c++)f[2][c]();delete r._colorAxes[s]}}},rC=ve.exports,aC=ga.hasColorscale,iC=ga.extractOpts,nC=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?rC.nestedProperty(c,v.container).get():c;if(u)if(u.coloraxis)u._colorAx=r[u.coloraxis];else{var h=iC(u),d=h.auto;(d||h.min===void 0)&&a(u,v.min),(d||h.max===void 0)&&a(u,v.max),h.autocolorscale&&a(u,"colorscale")}}for(var n=0;n<e.length;n++){var o=e[n],l=o._module.colorbar;if(l)if(Array.isArray(l))for(var s=0;s<l.length;s++)i(o,l[s]);else i(o,l);aC(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"})},Km=ct,hu=ve.exports,oC=ga.extractOpts,Eh=function(e,r,a){var i=e._fullLayout,n=a.vals,o=a.containerStr,l=o?hu.nestedProperty(r,o).get():r,s=oC(l),f=s.auto!==!1,c=s.min,v=s.max,u=s.mid,h=function(){return hu.aggNums(Math.min,null,n)},d=function(){return hu.aggNums(Math.max,null,n)};if(c===void 0?c=h():f&&(l._colorAx&&Km(c)?c=Math.min(c,h()):c=h()),v===void 0?v=d():f&&(l._colorAx&&Km(v)?v=Math.max(v,d()):v=d()),f&&u!==void 0&&(v-u>u-c?c=u-(v-u):v-u<u-c&&(v=u+(u-c))),c===v&&(c-=.5,v+=.5),s._sync("min",c),s._sync("max",v),s.autocolorscale){var p;c*v<0?p=i.colorscale.diverging:c>=0?p=i.colorscale.sequential:p=i.colorscale.sequentialminus,s._sync("colorscale",p)}},xs=ko,Mn=ga,uo={moduleType:"component",name:"colorscale",attributes:dn,layoutAttributes:E_,supplyLayoutDefaults:tC,handleDefaults:Kl,crossTraceDefaults:nC,calc:Eh,scales:xs.scales,defaultScale:xs.defaultScale,getScale:xs.get,isValidScale:xs.isValid,hasColorscale:Mn.hasColorscale,extractOpts:Mn.extractOpts,extractScale:Mn.extractScale,flipScale:Mn.flipScale,makeColorScaleFunc:Mn.makeColorScaleFunc,makeColorScaleFuncFromTrace:Mn.makeColorScaleFuncFromTrace},Qm=ve.exports,pr={hasLines:function(t){return t.visible&&t.mode&&t.mode.indexOf("lines")!==-1},hasMarkers:function(t){return t.visible&&(t.mode&&t.mode.indexOf("markers")!==-1||t.type==="splom")},hasText:function(t){return t.visible&&t.mode&&t.mode.indexOf("text")!==-1},isBubble:function(t){return Qm.isPlainObject(t.marker)&&Qm.isArrayOrTypedArray(t.marker.size)}},lC=ct,V_=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 lC(s)&&s>0?Math.max(s,n):0}},ea={};(function(t){var e=ve.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],h=a(u);if(l[h]===void 0){var d=e.nestedProperty(s,u).get(),p=i(d,f);p!==void 0&&(l[h]=p)}}},t.appendArrayMultiPointValues=function(l,s,f){var c=s._arrayAttrs;if(!!c)for(var v=0;v<c.length;v++){var u=c[v],h=a(u);if(l[h]===void 0){for(var d=e.nestedProperty(s,u).get(),p=new Array(f.length),y=0;y<f.length;y++)p[y]=i(d,f[y]);l[h]=p}}};var r={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function a(l){return r[l]||l}function i(l,s){if(Array.isArray(s)){if(Array.isArray(l)&&Array.isArray(l[s[0]]))return l[s[0]][s[1]]}else return l[s]}var n={x:!0,y:!0},o={"x unified":!0,"y unified":!0};t.isUnifiedHover=function(l){return typeof l!="string"?!1:!!o[l]},t.isXYhover=function(l){return typeof l!="string"?!1:!!n[l]}})(ea);var pu,Jm;function sC(){if(Jm)return pu;Jm=1;var t=_1,e=nt.exports.round,r="M0,0Z",a=Math.sqrt(2),i=Math.sqrt(3),n=Math.PI,o=Math.cos,l=Math.sin;pu={circle:{n:0,f:function(d,p,y){if(s(p))return r;var m=e(d,2),b="M"+m+",0A"+m+","+m+" 0 1,1 0,-"+m+"A"+m+","+m+" 0 0,1 "+m+",0Z";return y?h(p,y,b):b}},square:{n:1,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"H-"+m+"V-"+m+"H"+m+"Z")}},diamond:{n:2,f:function(d,p,y){if(s(p))return r;var m=e(d*1.3,2);return h(p,y,"M"+m+",0L0,"+m+"L-"+m+",0L0,-"+m+"Z")}},cross:{n:3,f:function(d,p,y){if(s(p))return r;var m=e(d*.4,2),b=e(d*1.2,2);return h(p,y,"M"+b+","+m+"H"+m+"V"+b+"H-"+m+"V"+m+"H-"+b+"V-"+m+"H-"+m+"V-"+b+"H"+m+"V-"+m+"H"+b+"Z")}},x:{n:4,f:function(d,p,y){if(s(p))return r;var m=e(d*.8/a,2),b="l"+m+","+m,w="l"+m+",-"+m,g="l-"+m+",-"+m,x="l-"+m+","+m;return h(p,y,"M0,"+m+b+w+g+w+g+x+g+x+b+x+b+"Z")}},"triangle-up":{n:5,f:function(d,p,y){if(s(p))return r;var m=e(d*2/i,2),b=e(d/2,2),w=e(d,2);return h(p,y,"M-"+m+","+b+"H"+m+"L0,-"+w+"Z")}},"triangle-down":{n:6,f:function(d,p,y){if(s(p))return r;var m=e(d*2/i,2),b=e(d/2,2),w=e(d,2);return h(p,y,"M-"+m+",-"+b+"H"+m+"L0,"+w+"Z")}},"triangle-left":{n:7,f:function(d,p,y){if(s(p))return r;var m=e(d*2/i,2),b=e(d/2,2),w=e(d,2);return h(p,y,"M"+b+",-"+m+"V"+m+"L-"+w+",0Z")}},"triangle-right":{n:8,f:function(d,p,y){if(s(p))return r;var m=e(d*2/i,2),b=e(d/2,2),w=e(d,2);return h(p,y,"M-"+b+",-"+m+"V"+m+"L"+w+",0Z")}},"triangle-ne":{n:9,f:function(d,p,y){if(s(p))return r;var m=e(d*.6,2),b=e(d*1.2,2);return h(p,y,"M-"+b+",-"+m+"H"+m+"V"+b+"Z")}},"triangle-se":{n:10,f:function(d,p,y){if(s(p))return r;var m=e(d*.6,2),b=e(d*1.2,2);return h(p,y,"M"+m+",-"+b+"V"+m+"H-"+b+"Z")}},"triangle-sw":{n:11,f:function(d,p,y){if(s(p))return r;var m=e(d*.6,2),b=e(d*1.2,2);return h(p,y,"M"+b+","+m+"H-"+m+"V-"+b+"Z")}},"triangle-nw":{n:12,f:function(d,p,y){if(s(p))return r;var m=e(d*.6,2),b=e(d*1.2,2);return h(p,y,"M-"+m+","+b+"V-"+m+"H"+b+"Z")}},pentagon:{n:13,f:function(d,p,y){if(s(p))return r;var m=e(d*.951,2),b=e(d*.588,2),w=e(-d,2),g=e(d*-.309,2),x=e(d*.809,2);return h(p,y,"M"+m+","+g+"L"+b+","+x+"H-"+b+"L-"+m+","+g+"L0,"+w+"Z")}},hexagon:{n:14,f:function(d,p,y){if(s(p))return r;var m=e(d,2),b=e(d/2,2),w=e(d*i/2,2);return h(p,y,"M"+w+",-"+b+"V"+b+"L0,"+m+"L-"+w+","+b+"V-"+b+"L0,-"+m+"Z")}},hexagon2:{n:15,f:function(d,p,y){if(s(p))return r;var m=e(d,2),b=e(d/2,2),w=e(d*i/2,2);return h(p,y,"M-"+b+","+w+"H"+b+"L"+m+",0L"+b+",-"+w+"H-"+b+"L-"+m+",0Z")}},octagon:{n:16,f:function(d,p,y){if(s(p))return r;var m=e(d*.924,2),b=e(d*.383,2);return h(p,y,"M-"+b+",-"+m+"H"+b+"L"+m+",-"+b+"V"+b+"L"+b+","+m+"H-"+b+"L-"+m+","+b+"V-"+b+"Z")}},star:{n:17,f:function(d,p,y){if(s(p))return r;var m=d*1.4,b=e(m*.225,2),w=e(m*.951,2),g=e(m*.363,2),x=e(m*.588,2),_=e(-m,2),T=e(m*-.309,2),k=e(m*.118,2),S=e(m*.809,2),A=e(m*.382,2);return h(p,y,"M"+b+","+T+"H"+w+"L"+g+","+k+"L"+x+","+S+"L0,"+A+"L-"+x+","+S+"L-"+g+","+k+"L-"+w+","+T+"H-"+b+"L0,"+_+"Z")}},hexagram:{n:18,f:function(d,p,y){if(s(p))return r;var m=e(d*.66,2),b=e(d*.38,2),w=e(d*.76,2);return h(p,y,"M-"+w+",0l-"+b+",-"+m+"h"+w+"l"+b+",-"+m+"l"+b+","+m+"h"+w+"l-"+b+","+m+"l"+b+","+m+"h-"+w+"l-"+b+","+m+"l-"+b+",-"+m+"h-"+w+"Z")}},"star-triangle-up":{n:19,f:function(d,p,y){if(s(p))return r;var m=e(d*i*.8,2),b=e(d*.8,2),w=e(d*1.6,2),g=e(d*4,2),x="A "+g+","+g+" 0 0 1 ";return h(p,y,"M-"+m+","+b+x+m+","+b+x+"0,-"+w+x+"-"+m+","+b+"Z")}},"star-triangle-down":{n:20,f:function(d,p,y){if(s(p))return r;var m=e(d*i*.8,2),b=e(d*.8,2),w=e(d*1.6,2),g=e(d*4,2),x="A "+g+","+g+" 0 0 1 ";return h(p,y,"M"+m+",-"+b+x+"-"+m+",-"+b+x+"0,"+w+x+m+",-"+b+"Z")}},"star-square":{n:21,f:function(d,p,y){if(s(p))return r;var m=e(d*1.1,2),b=e(d*2,2),w="A "+b+","+b+" 0 0 1 ";return h(p,y,"M-"+m+",-"+m+w+"-"+m+","+m+w+m+","+m+w+m+",-"+m+w+"-"+m+",-"+m+"Z")}},"star-diamond":{n:22,f:function(d,p,y){if(s(p))return r;var m=e(d*1.4,2),b=e(d*1.9,2),w="A "+b+","+b+" 0 0 1 ";return h(p,y,"M-"+m+",0"+w+"0,"+m+w+m+",0"+w+"0,-"+m+w+"-"+m+",0Z")}},"diamond-tall":{n:23,f:function(d,p,y){if(s(p))return r;var m=e(d*.7,2),b=e(d*1.4,2);return h(p,y,"M0,"+b+"L"+m+",0L0,-"+b+"L-"+m+",0Z")}},"diamond-wide":{n:24,f:function(d,p,y){if(s(p))return r;var m=e(d*1.4,2),b=e(d*.7,2);return h(p,y,"M0,"+b+"L"+m+",0L0,-"+b+"L-"+m+",0Z")}},hourglass:{n:25,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"H-"+m+"L"+m+",-"+m+"H-"+m+"Z")},noDot:!0},bowtie:{n:26,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"V-"+m+"L-"+m+","+m+"V-"+m+"Z")},noDot:!0},"circle-cross":{n:27,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M0,"+m+"V-"+m+"M"+m+",0H-"+m+"M"+m+",0A"+m+","+m+" 0 1,1 0,-"+m+"A"+m+","+m+" 0 0,1 "+m+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(d,p,y){if(s(p))return r;var m=e(d,2),b=e(d/a,2);return h(p,y,"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b+"M"+m+",0A"+m+","+m+" 0 1,1 0,-"+m+"A"+m+","+m+" 0 0,1 "+m+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M0,"+m+"V-"+m+"M"+m+",0H-"+m+"M"+m+","+m+"H-"+m+"V-"+m+"H"+m+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"L-"+m+",-"+m+"M"+m+",-"+m+"L-"+m+","+m+"M"+m+","+m+"H-"+m+"V-"+m+"H"+m+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(d,p,y){if(s(p))return r;var m=e(d*1.3,2);return h(p,y,"M"+m+",0L0,"+m+"L-"+m+",0L0,-"+m+"ZM0,-"+m+"V"+m+"M-"+m+",0H"+m)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(d,p,y){if(s(p))return r;var m=e(d*1.3,2),b=e(d*.65,2);return h(p,y,"M"+m+",0L0,"+m+"L-"+m+",0L0,-"+m+"ZM-"+b+",-"+b+"L"+b+","+b+"M-"+b+","+b+"L"+b+",-"+b)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(d,p,y){if(s(p))return r;var m=e(d*1.4,2);return h(p,y,"M0,"+m+"V-"+m+"M"+m+",0H-"+m)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"L-"+m+",-"+m+"M"+m+",-"+m+"L-"+m+","+m)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(d,p,y){if(s(p))return r;var m=e(d*1.2,2),b=e(d*.85,2);return h(p,y,"M0,"+m+"V-"+m+"M"+m+",0H-"+m+"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(d,p,y){if(s(p))return r;var m=e(d/2,2),b=e(d,2);return h(p,y,"M"+m+","+b+"V-"+b+"M"+(m-b)+",-"+b+"V"+b+"M"+b+","+m+"H-"+b+"M-"+b+","+(m-b)+"H"+b)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(d,p,y){if(s(p))return r;var m=e(d*1.2,2),b=e(d*1.6,2),w=e(d*.8,2);return h(p,y,"M-"+m+","+w+"L0,0M"+m+","+w+"L0,0M0,-"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(d,p,y){if(s(p))return r;var m=e(d*1.2,2),b=e(d*1.6,2),w=e(d*.8,2);return h(p,y,"M-"+m+",-"+w+"L0,0M"+m+",-"+w+"L0,0M0,"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(d,p,y){if(s(p))return r;var m=e(d*1.2,2),b=e(d*1.6,2),w=e(d*.8,2);return h(p,y,"M"+w+","+m+"L0,0M"+w+",-"+m+"L0,0M-"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(d,p,y){if(s(p))return r;var m=e(d*1.2,2),b=e(d*1.6,2),w=e(d*.8,2);return h(p,y,"M-"+w+","+m+"L0,0M-"+w+",-"+m+"L0,0M"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(d,p,y){if(s(p))return r;var m=e(d*1.4,2);return h(p,y,"M"+m+",0H-"+m)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(d,p,y){if(s(p))return r;var m=e(d*1.4,2);return h(p,y,"M0,"+m+"V-"+m)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+",-"+m+"L-"+m+","+m)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(d,p,y){if(s(p))return r;var m=e(d,2);return h(p,y,"M"+m+","+m+"L-"+m+",-"+m)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(d,p,y){if(s(p))return r;var m=e(d,2),b=e(d*2,2);return h(p,y,"M0,0L-"+m+","+b+"H"+m+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(d,p,y){if(s(p))return r;var m=e(d,2),b=e(d*2,2);return h(p,y,"M0,0L-"+m+",-"+b+"H"+m+"Z")},noDot:!0},"arrow-left":{n:47,f:function(d,p,y){if(s(p))return r;var m=e(d*2,2),b=e(d,2);return h(p,y,"M0,0L"+m+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-right":{n:48,f:function(d,p,y){if(s(p))return r;var m=e(d*2,2),b=e(d,2);return h(p,y,"M0,0L-"+m+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(d,p,y){if(s(p))return r;var m=e(d,2),b=e(d*2,2);return h(p,y,"M-"+m+",0H"+m+"M0,0L-"+m+","+b+"H"+m+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(d,p,y){if(s(p))return r;var m=e(d,2),b=e(d*2,2);return h(p,y,"M-"+m+",0H"+m+"M0,0L-"+m+",-"+b+"H"+m+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(d,p,y){if(s(p))return r;var m=e(d*2,2),b=e(d,2);return h(p,y,"M0,-"+b+"V"+b+"M0,0L"+m+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(d,p,y){if(s(p))return r;var m=e(d*2,2),b=e(d,2);return h(p,y,"M0,-"+b+"V"+b+"M0,0L-"+m+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(d,p,y){if(s(p))return r;var m=n/2.5,b=2*d*o(m),w=2*d*l(m);return h(p,y,"M0,0L"+-b+","+w+"L"+b+","+w+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(d,p,y){if(s(p))return r;var m=n/4,b=2*d*o(m),w=2*d*l(m);return h(p,y,"M0,0L"+-b+","+w+"A "+2*d+","+2*d+" 0 0 1 "+b+","+w+"Z")},backoff:.4,noDot:!0}};function s(d){return d===null}var f,c,v,u;function h(d,p,y){if((!d||d%360===0)&&!p)return y;if(v===d&&u===p&&f===y)return c;v=d,u=p,f=y;function m($,F){var R=o($),P=l($),E=F[0],L=F[1]+(p||0);return[E*R-L*P,E*P+L*R]}for(var b=d/180*n,w=0,g=0,x=t(y),_="",T=0;T<x.length;T++){var k=x[T],S=k[0],A=w,D=g;if(S==="M"||S==="L")w=+k[1],g=+k[2];else if(S==="m"||S==="l")w+=+k[1],g+=+k[2];else if(S==="H")w=+k[1];else if(S==="h")w+=+k[1];else if(S==="V")g=+k[1];else if(S==="v")g+=+k[1];else if(S==="A"){w=+k[1],g=+k[2];var M=m(b,[+k[6],+k[7]]);k[6]=M[0],k[7]=M[1],k[3]=+k[3]+d}(S==="H"||S==="V")&&(S="L"),(S==="h"||S==="v")&&(S="l"),(S==="m"||S==="l")&&(w-=A,g-=D);var C=m(b,[w,g]);(S==="H"||S==="V")&&(S="L"),(S==="M"||S==="L"||S==="m"||S==="l")&&(k[1]=C[0],k[2]=C[1]),k[0]=S,_+=k[0]+k.slice(1).join(",")}return c=_,_}return pu}var Jt=nt.exports,Ct=ve.exports,fC=Ct.numberFormat,tn=ct,hd=Jr.exports,Tc=Ze,vr=rt.exports,cC=uo,Al=Ct.strTranslate,zh=nr,uC=vn,vC=Dr,dC=vC.LINE_SPACING,X_=Wl.DESELECTDIM,hC=pr,pC=V_,mC=ea.appendArrayPointValue,Ee=_t.exports={};Ee.font=function(t,e,r,a){Ct.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(vr.fill,a)};Ee.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)};Ee.setSize=function(t,e,r){t.attr("width",e).attr("height",r)};Ee.setRect=function(t,e,r,a,i){t.call(Ee.setPosition,e,r).call(Ee.setSize,a,i)};Ee.translatePoint=function(t,e,r,a){var i=r.c2p(t.x),n=a.c2p(t.y);if(tn(i)&&tn(n)&&e.node())e.node().nodeName==="text"?e.attr("x",i).attr("y",n):e.attr("transform",Al(i,n));else return!1;return!0};Ee.translatePoints=function(t,e,r){t.each(function(a){var i=Jt.select(this);Ee.translatePoint(a,i,e,r)})};Ee.hideOutsideRangePoint=function(t,e,r,a,i,n){e.attr("display",r.isPtWithinRange(t,i)&&a.isPtWithinRange(t,n)?null:"none")};Ee.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){Ee.hideOutsideRangePoint(f,Jt.select(this),r,a,o,l)})})}};Ee.crispRound=function(t,e,r){return!e||!tn(e)?r||0:t._context.staticPlot?e:e<1?1:Math.round(e)};Ee.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||"";vr.stroke(e,a||n.color),Ee.dashLine(e,l,o)};Ee.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||"";Jt.select(this).call(vr.stroke,r||n.color).call(Ee.dashLine,l,o)})};Ee.dashLine=function(t,e,r){r=+r||0,e=Ee.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})};Ee.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 W_(t,e,r){var a=e.fillpattern,i=a&&Ee.getPatternAttr(a.shape,0,"");if(i){var n=Ee.getPatternAttr(a.bgcolor,0,null),o=Ee.getPatternAttr(a.fgcolor,0,null),l=a.fgopacity,s=Ee.getPatternAttr(a.size,0,8),f=Ee.getPatternAttr(a.solidity,0,.3),c=e.uid;Ee.pattern(t,"point",r,c,i,s,f,void 0,a.fillmode,n,o,l)}else e.fillcolor&&t.call(vr.fill,e.fillcolor)}Ee.singleFillStyle=function(t,e){var r=Jt.select(t.node()),a=r.data(),i=((a[0]||[])[0]||{}).trace||{};W_(t,i,e)};Ee.fillGroupStyle=function(t,e){t.style("stroke-width",0).each(function(r){var a=Jt.select(this);r[0].trace&&W_(a,r[0].trace,e)})};var ey=sC();Ee.symbolNames=[];Ee.symbolFuncs=[];Ee.symbolBackOffs=[];Ee.symbolNeedLines={};Ee.symbolNoDot={};Ee.symbolNoFill={};Ee.symbolList=[];Object.keys(ey).forEach(function(t){var e=ey[t],r=e.n;Ee.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),Ee.symbolNames[r]=t,Ee.symbolFuncs[r]=e.f,Ee.symbolBackOffs[r]=e.backoff||0,e.needLine&&(Ee.symbolNeedLines[r]=!0),e.noDot?Ee.symbolNoDot[r]=!0:Ee.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(Ee.symbolNoFill[r]=!0)});var yC=Ee.symbolNames.length,gC="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ee.symbolNumber=function(t){if(tn(t))t=+t;else if(typeof t=="string"){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=Ee.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=yC||t>=400?0:Math.floor(Math.max(t,0))};function Y_(t,e,r,a){var i=t%100;return Ee.symbolFuncs[i](e,r,a)+(t>=200?gC:"")}var ty={x1:1,x2:0,y1:0,y2:0},ry={x1:0,x2:0,y1:1,y2:0},ay=fC("~f"),q_={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:ty},horizontalreversed:{node:"linearGradient",attrs:ty,reversed:!0},vertical:{node:"linearGradient",attrs:ry},verticalreversed:{node:"linearGradient",attrs:ry,reversed:!0}};Ee.gradient=function(t,e,r,a,i,n){for(var o=i.length,l=q_[a],s=new Array(o),f=0;f<o;f++)l.reversed?s[o-1-f]=[ay((1-i[f][0])*100),i[f][1]]:s[f]=[ay(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(";")],Ct.identity);u.exit().remove(),u.enter().append(l.node).each(function(){var h=Jt.select(this);l.attrs&&h.attr(l.attrs),h.attr("id",v);var d=h.selectAll("stop").data(s);d.exit().remove(),d.enter().append("stop"),d.each(function(p){var y=hd(p[1]);Jt.select(this).attr({offset:p[0]+"%","stop-color":vr.tinyRGB(y),"stop-opacity":y.getAlpha()})})}),t.style(n,Ih(v,e)).style(n+"-opacity",null),t.classed("gradient_filled",!0)};Ee.pattern=function(t,e,r,a,i,n,o,l,s,f,c,v){var u=e==="legend";l&&(s==="overlay"?(f=l,c=vr.contrast(f)):(f=void 0,c=l));var h=r._fullLayout,d="p"+h._uid+"-"+a,p,y,m=function(C,$,F,R,P){return R+(P-R)*(C-$)/(F-$)},b,w,g,x,_={},T=hd(c),k=vr.tinyRGB(T),S=T.getAlpha(),A=v*S;switch(i){case"/":p=n*Math.sqrt(2),y=n*Math.sqrt(2),b="M-"+p/4+","+y/4+"l"+p/2+",-"+y/2+"M0,"+y+"L"+p+",0M"+p/4*3+","+y/4*5+"l"+p/2+",-"+y/2,w=o*n,x="path",_={d:b,opacity:A,stroke:k,"stroke-width":w+"px"};break;case"\\":p=n*Math.sqrt(2),y=n*Math.sqrt(2),b="M"+p/4*3+",-"+y/4+"l"+p/2+","+y/2+"M0,0L"+p+","+y+"M-"+p/4+","+y/4*3+"l"+p/2+","+y/2,w=o*n,x="path",_={d:b,opacity:A,stroke:k,"stroke-width":w+"px"};break;case"x":p=n*Math.sqrt(2),y=n*Math.sqrt(2),b="M-"+p/4+","+y/4+"l"+p/2+",-"+y/2+"M0,"+y+"L"+p+",0M"+p/4*3+","+y/4*5+"l"+p/2+",-"+y/2+"M"+p/4*3+",-"+y/4+"l"+p/2+","+y/2+"M0,0L"+p+","+y+"M-"+p/4+","+y/4*3+"l"+p/2+","+y/2,w=n-n*Math.sqrt(1-o),x="path",_={d:b,opacity:A,stroke:k,"stroke-width":w+"px"};break;case"|":p=n,y=n,x="path",b="M"+p/2+",0L"+p/2+","+y,w=o*n,x="path",_={d:b,opacity:A,stroke:k,"stroke-width":w+"px"};break;case"-":p=n,y=n,x="path",b="M0,"+y/2+"L"+p+","+y/2,w=o*n,x="path",_={d:b,opacity:A,stroke:k,"stroke-width":w+"px"};break;case"+":p=n,y=n,x="path",b="M"+p/2+",0L"+p/2+","+y+"M0,"+y/2+"L"+p+","+y/2,w=n-n*Math.sqrt(1-o),x="path",_={d:b,opacity:A,stroke:k,"stroke-width":w+"px"};break;case".":p=n,y=n,o<Math.PI/4?g=Math.sqrt(o*n*n/Math.PI):g=m(o,Math.PI/4,1,n/2,n/Math.sqrt(2)),x="circle",_={cx:p/2,cy:y/2,r:g,opacity:A,fill:k};break}var D=[i||"noSh",f||"noBg",c||"noFg",n,o].join(";"),M=h._defs.select(".patterns").selectAll("#"+d).data([D],Ct.identity);M.exit().remove(),M.enter().append("pattern").each(function(){var C=Jt.select(this);if(C.attr({id:d,width:p+"px",height:y+"px",patternUnits:"userSpaceOnUse",patternTransform:u?"scale(0.8)":""}),f){var $=hd(f),F=vr.tinyRGB($),R=$.getAlpha(),P=C.selectAll("rect").data([0]);P.exit().remove(),P.enter().append("rect").attr({width:p+"px",height:y+"px",fill:F,"fill-opacity":R})}var E=C.selectAll(x).data([0]);E.exit().remove(),E.enter().append(x).attr(_)}),t.style("fill",Ih(d,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)};Ee.initGradients=function(t){var e=t._fullLayout,r=Ct.ensureSingle(e._defs,"g","gradients");r.selectAll("linearGradient,radialGradient").remove(),Jt.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)};Ee.initPatterns=function(t){var e=t._fullLayout,r=Ct.ensureSingle(e._defs,"g","patterns");r.selectAll("pattern").remove(),Jt.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)};Ee.getPatternAttr=function(t,e,r){return t&&Ct.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t};Ee.pointStyle=function(t,e,r){if(!!t.size()){var a=Ee.makePointStyleFns(e);t.each(function(i){Ee.singlePointStyle(i,Jt.select(this),e,a,r)})}};Ee.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=Ee.symbolNumber(t.mx||n.symbol)||0;t.om=s%200>=100;var f=Fh(t,r),c=Nh(t,r);e.attr("d",Y_(s,l,f,c))}var v=!1,u,h,d;if(t.so)d=o.outlierwidth,h=o.outliercolor,u=n.outliercolor;else{var p=(o||{}).width;d=(t.mlw+1||p+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in t?h=t.mlcc=a.lineScale(t.mlc):Ct.isArrayOrTypedArray(o.color)?h=vr.defaultLine:h=o.color,Ct.isArrayOrTypedArray(n.color)&&(u=vr.defaultLine,v=!0),"mc"in t?u=t.mcc=a.markerScale(t.mc):u=n.color||"rgba(0,0,0,0)",a.selectedColorFn&&(u=a.selectedColorFn(t))}if(t.om)e.call(vr.stroke,u).style({"stroke-width":(d||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:d)+"px");var y=n.gradient,m=t.mgt;m?v=!0:m=y&&y.type,Ct.isArrayOrTypedArray(m)&&(m=m[0],q_[m]||(m=0));var b=n.pattern,w=b&&Ee.getPatternAttr(b.shape,t.i,"");if(m&&m!=="none"){var g=t.mgc;g?v=!0:g=y.color;var x=r.uid;v&&(x+="-"+t.i),Ee.gradient(e,i,x,m,[[0,g],[1,u]],"fill")}else if(w){var _=Ee.getPatternAttr(b.bgcolor,t.i,null),T=Ee.getPatternAttr(b.fgcolor,t.i,null),k=b.fgopacity,S=Ee.getPatternAttr(b.size,t.i,8),A=Ee.getPatternAttr(b.solidity,t.i,.3),D=t.mcc||Ct.isArrayOrTypedArray(b.shape)||Ct.isArrayOrTypedArray(b.bgcolor)||Ct.isArrayOrTypedArray(b.size)||Ct.isArrayOrTypedArray(b.solidity),M=r.uid;D&&(M+="-"+t.i),Ee.pattern(e,"point",i,M,w,S,A,t.mcc,b.fillmode,_,T,k)}else vr.fill(e,u);d&&vr.stroke(e,h)}};Ee.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=Ee.tryColorscale(r,""),e.lineScale=Ee.tryColorscale(r,"line"),Tc.traceIs(t,"symbols")&&(e.ms2mrc=hC.isBubble(t)?pC(t):function(){return(r.size||6)/2}),t.selectedpoints&&Ct.extendFlat(e,Ee.makeSelectedPointStyleFns(t)),e};Ee.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;(Ct.isArrayOrTypedArray(l)||c||v)&&(e.selectedOpacityFn=function(g){var x=g.mo===void 0?i.opacity:g.mo;return g.selected?c?s:x:v?f:X_*x});var u=i.color,h=n.color,d=o.color;(h||d)&&(e.selectedColorFn=function(g){var x=g.mcc||u;return g.selected?h||x:d||x});var p=i.size,y=n.size,m=o.size,b=y!==void 0,w=m!==void 0;return Tc.traceIs(t,"symbols")&&(b||w)&&(e.selectedSizeFn=function(g){var x=g.mrc||p/2;return g.selected?b?y/2:x:w?m/2:x}),e};Ee.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:vr.addOpacity(v,X_))},e};Ee.selectedPointStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Ee.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){vr.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",Y_(Ee.symbolNumber(l),s,Fh(o,e),Nh(o,e))),o.mrc2=s}),i.length&&t.each(function(n){for(var o=Jt.select(this),l=0;l<i.length;l++)i[l](o,n)})}};Ee.tryColorscale=function(t,e){var r=e?Ct.nestedProperty(t,e).get():t;if(r){var a=r.color;if((r.colorscale||r._colorAx)&&Ct.isArrayOrTypedArray(a))return cC.makeColorScaleFuncFromTrace(r)}return Ct.identity};var mu={start:1,end:-1,middle:0,bottom:1,top:-1};function Z_(t,e,r,a,i){var n=Jt.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=(zh.lineCount(t)-1)*dC+1,c=mu[l]*s,v=r*.75+mu[o]*s+(mu[o]-1)*f*r/2;t.attr("text-anchor",l),i||n.attr("transform",Al(c,v))}function K_(t,e){var r=t.ts||e.textfont.size;return tn(r)&&r>0?r:0}Ee.textPointStyle=function(t,e,r){if(!!t.size()){var a;if(e.selectedpoints){var i=Ee.makeSelectedTextStyleFns(e);a=i.selectedTextColorFn}var n=e.texttemplate,o=r._fullLayout;t.each(function(l){var s=Jt.select(this),f=n?Ct.extractOption(l,e,"txt","texttemplate"):Ct.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={};mC(u,e,l.i);var h=e._meta||{};f=Ct.texttemplateString(f,v,o._d3locale,u,l,h)}var d=l.tp||e.textposition,p=K_(l,e),y=a?a(l):l.tc||e.textfont.color;s.call(Ee.font,l.tf||e.textfont.family,p,y).text(f).call(zh.convertToTspans,r).call(Z_,d,p,l.mrc)})}};Ee.selectedTextStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Ee.makeSelectedTextStyleFns(e);t.each(function(a){var i=Jt.select(this),n=r.selectedTextColorFn(a),o=a.tp||e.textposition,l=K_(a,e);vr.fill(i,n);var s=Tc.traceIs(e,"bar-like");Z_(i,o,l,a.mrc2||a.mrc,s)})}};var iy=.5;Ee.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(pf(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};Ee.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r="M"+t[0],a=t.length-1,i=[pf(t[a],t[0],t[1],e)],n;for(n=1;n<a;n++)i.push(pf(t[n-1],t[n],t[n+1],e));for(i.push(pf(t[a-1],t[a],t[0],e)),n=1;n<=a;n++)r+="C"+i[n-1][1]+" "+i[n][0]+" "+t[n];return r+="C"+i[a][1]+" "+i[0][0]+" "+t[0]+"Z",r};var Q_,J_;function Jn(t,e,r){return r&&(t=ew(t)),e?qi(t[1]):Yi(t[0])}function Yi(t){var e=Jt.round(t,2);return Q_=e,e}function qi(t){var e=Jt.round(t,2);return J_=e,e}function pf(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,iy/2),f=Math.pow(o*o+l*l,iy/2),c=(f*f*i-s*s*o)*a,v=(f*f*n-s*s*l)*a,u=3*f*(s+f),h=3*s*(s+f);return[[Yi(e[0]+(u&&c/u)),qi(e[1]+(u&&v/u))],[Yi(e[0]-(h&&c/h)),qi(e[1]-(h&&v/h))]]}var bC={hv:function(t,e,r){return"H"+Yi(e[0])+"V"+Jn(e,1,r)},vh:function(t,e,r){return"V"+qi(e[1])+"H"+Jn(e,0,r)},hvh:function(t,e,r){return"H"+Yi((t[0]+e[0])/2)+"V"+qi(e[1])+"H"+Jn(e,0,r)},vhv:function(t,e,r){return"V"+qi((t[1]+e[1])/2)+"H"+Yi(e[0])+"V"+Jn(e,1,r)}},xC=function(t,e,r){return"L"+Jn(e,0,r)+","+Jn(e,1,r)};Ee.steps=function(t){var e=bC[t]||xC;return function(r){for(var a="M"+Yi(r[0][0])+","+qi(r[0][1]),i=r.length,n=1;n<i;n++)a+=e(r[n-1],r[n],n===i-1);return a}};function ew(t,e){var r=t.backoff,a=t.trace,i=t.d,n=t.i;if(r&&a&&a.marker&&a.marker.angle%360===0&&a.line&&a.line.shape!=="spline"){var o=Ct.isArrayOrTypedArray(r),l=t,s=e?e[0]:Q_||0,f=e?e[1]:J_||0,c=l[0],v=l[1],u=c-s,h=v-f,d=Math.atan2(h,u),p=o?r[n]:r;if(p==="auto"){var y=l.i;a.type==="scatter"&&y--;var m=l.marker;p=m?Ee.symbolBackOffs[Ee.symbolNumber(m.symbol)]*m.size:0,p+=Ee.getMarkerStandoff(i[y],a)||0}var b=c-p*Math.cos(d),w=v-p*Math.sin(d);(b<=c&&b>=s||b>=c&&b<=s)&&(w<=v&&w>=f||w>=v&&w<=f)&&(t=[b,w])}return t}Ee.applyBackoff=ew;Ee.makeTester=function(){var t=Ct.ensureSingleById(Jt.select("body"),"svg","js-plotly-tester",function(r){r.attr(uC.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),e=Ct.ensureSingle(t,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ee.tester=t,Ee.testref=e};Ee.savedBBoxes={};var yu=0,_C=1e4;Ee.bBox=function(t,e,r){r||(r=ny(t));var a;if(r){if(a=Ee.savedBBoxes[r],a)return Ct.extendFlat({},a)}else if(t.childNodes.length===1){var i=t.childNodes[0];if(r=ny(i),r){var n=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,l=i.getAttribute("transform");if(!l){var s=Ee.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=Ee.savedBBoxes[r],a)return Ct.extendFlat({},a)}}var f,c;e?f=t:(c=Ee.tester.node(),f=t.cloneNode(!0),c.appendChild(f)),Jt.select(f).attr("transform",null).call(zh.positionText,0,0);var v=f.getBoundingClientRect(),u=Ee.testref.node().getBoundingClientRect();e||c.removeChild(f);var h={height:v.height,width:v.width,left:v.left-u.left,top:v.top-u.top,right:v.right-u.left,bottom:v.bottom-u.top};return yu>=_C&&(Ee.savedBBoxes={},yu=0),r&&(Ee.savedBBoxes[r]=h),yu++,Ct.extendFlat({},h)};function ny(t){var e=t.getAttribute("data-unformatted");if(e!==null)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}Ee.setClipUrl=function(t,e,r){t.attr("clip-path",Ih(e,r))};function Ih(t,e){if(!t)return null;var r=e._context,a=r._exportedPlot?"":r._baseUrl||"";return a?"url('"+a+"#"+t+"')":"url(#"+t+")"}Ee.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}};Ee.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+=Al(e,r),o=o.trim(),t[n]("transform",o),o};Ee.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}};Ee.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 wC=/\s*sc.*/;Ee.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(wC,"");i+=a,i=i.trim(),this.setAttribute("transform",i)})}};var TC=/translate\([^)]*\)\s*$/;Ee.setTextPointsScale=function(t,e,r){!t||t.each(function(){var a,i=Jt.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(TC);e===1&&r===1?a=[]:a=[Al(o,l),"scale("+e+","+r+")",Al(-o,-l)],s&&a.push(s),i.attr("transform",a.join(""))}})};function Nh(t,e){var r;return t&&(r=t.mf),r===void 0&&(r=e.marker&&e.marker.standoff||0),!e._geo&&!e._xA?-r:r}Ee.getMarkerStandoff=Nh;var jo=Math.atan2,Bi=Math.cos,eo=Math.sin;function oy(t,e){var r=e[0],a=e[1];return[r*Bi(t)-a*eo(t),r*eo(t)+a*Bi(t)]}var ly,sy,fy,cy,gu,bu;function Fh(t,e){var r=t.ma;r===void 0&&(r=e.marker.angle||0);var a,i,n=e.marker.angleref;if(n==="previous"||n==="north"){if(e._geo){var o=e._geo.project(t.lonlat);a=o[0],i=o[1]}else{var l=e._xA,s=e._yA;if(l&&s)a=l.c2p(t.x),i=s.c2p(t.y);else return 90}if(e._geo){var f=t.lonlat[0],c=t.lonlat[1],v=e._geo.project([f,c+1e-5]),u=e._geo.project([f+1e-5,c]),h=jo(u[1]-i,u[0]-a),d=jo(v[1]-i,v[0]-a),p;if(n==="north")p=r/180*Math.PI;else if(n==="previous"){var y=f/180*Math.PI,m=c/180*Math.PI,b=ly/180*Math.PI,w=sy/180*Math.PI,g=b-y,x=Bi(w)*eo(g),_=eo(w)*Bi(m)-Bi(w)*eo(m)*Bi(g);p=-jo(x,_)-Math.PI,ly=f,sy=c}var T=oy(h,[Bi(p),0]),k=oy(d,[eo(p),0]);r=jo(T[1]+k[1],T[0]+k[0])/Math.PI*180,n==="previous"&&!(bu===e.uid&&t.i===gu+1)&&(r=null)}if(n==="previous"&&!e._geo)if(bu===e.uid&&t.i===gu+1&&tn(a)&&tn(i)){var S=a-fy,A=i-cy,D=e.line&&e.line.shape||"",M=D.slice(D.length-1);M==="h"&&(A=0),M==="v"&&(S=0),r+=jo(A,S)/Math.PI*180+90}else r=null}return fy=a,cy=i,gu=t.i,bu=e.uid,r}Ee.getMarkerAngle=Fh;var _s=nt.exports,kC=ct,uy=Ut.exports,vy=Ze,Xn=ve.exports,dy=Xn.strTranslate,hy=_t.exports,py=rt.exports,xu=nr,my=Wl,AC=Dr.OPPOSITE_SIDE,yy=/ [XY][0-9]* /;function MC(t,e,r){var a=r.propContainer,i=r.propName,n=r.placeholder,o=r.traceIndex,l=r.avoid||{},s=r.attributes,f=r.transform,c=r.containerGroup,v=t._fullLayout,u=1,h=!1,d=a.title,p=(d&&d.text?d.text:"").trim(),y=d&&d.font?d.font:{},m=y.family,b=y.size,w=y.color,g;i==="title.text"?g="titleText":i.indexOf("axis")!==-1?g="axisTitleText":i.indexOf("colorbar"!==-1)&&(g="colorbarTitleText");var x=t._context.edits[g];p===""?u=0:p.replace(yy," % ")===n.replace(yy," % ")&&(u=.2,h=!0,x||(p="")),r._meta?p=Xn.templateString(p,r._meta):v._meta&&(p=Xn.templateString(p,v._meta));var _=p||x,T;c||(c=Xn.ensureSingle(v._infolayer,"g","g-"+e),T=v._hColorbarMoveTitle);var k=c.selectAll("text").data(_?[0]:[]);if(k.enter().append("text"),k.text(p).attr("class",e),k.exit().remove(),!_)return c;function S(C){Xn.syncOrAsync([A,D],C)}function A(C){var $;return!f&&T&&(f={}),f?($="",f.rotate&&($+="rotate("+[f.rotate,s.x,s.y]+")"),(f.offset||T)&&($+=dy(0,(f.offset||0)-(T||0)))):$=null,C.attr("transform",$),C.style({"font-family":m,"font-size":_s.round(b,2)+"px",fill:py.rgb(w),opacity:u*py.opacity(w),"font-weight":uy.fontWeight}).attr(s).call(xu.convertToTspans,t),uy.previousPromises(t)}function D(C){var $=_s.select(C.node().parentNode);if(l&&l.selection&&l.side&&p){$.attr("transform",null);var F=AC[l.side],R=l.side==="left"||l.side==="top"?-1:1,P=kC(l.pad)?l.pad:2,E=hy.bBox($.node()),L={left:0,top:0,right:v.width,bottom:v.height},z=l.maxShift||R*(L[l.side]-E[l.side]),I=0;if(z<0)I=z;else{var H=l.offsetLeft||0,U=l.offsetTop||0;E.left-=H,E.right-=H,E.top-=U,E.bottom-=U,l.selection.each(function(){var X=hy.bBox(this);Xn.bBoxIntersect(E,X,P)&&(I=Math.max(I,R*(X[l.side]-E[F])+P))}),I=Math.min(z,I)}if(I>0||z<0){var O={left:[-I,0],right:[I,0],top:[0,-I],bottom:[0,I]}[l.side];$.attr("transform",dy(O[0],O[1]))}}}k.call(S);function M(){u=0,h=!0,k.text(n).on("mouseover.opacity",function(){_s.select(this).transition().duration(my.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){_s.select(this).transition().duration(my.HIDE_PLACEHOLDER).style("opacity",0)})}return x&&(p?k.on(".opacity",null):M(),k.call(xu.makeEditable,{gd:t}).on("edit",function(C){o!==void 0?vy.call("_guiRestyle",t,i,C,o):vy.call("_guiRelayout",t,i,C)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(S)}).on("input",function(C){this.text(C||" ").call(xu.positionText,s.x,s.y)})),k.classed("js-placeholder",h),c}var kc={draw:MC},SC=nt.exports,LC=Tl.utcFormat,Dt=ve.exports,CC=Dt.numberFormat,_a=ct,ei=Dt.cleanNumber,DC=Dt.ms2DateTime,gy=Dt.dateTime2ms,wa=Dt.ensureNumber,by=Dt.isArrayOrTypedArray,_i=Ot,ws=_i.FP_SAFE,ra=_i.BADNUM,$C=_i.LOG_CLIP,PC=_i.ONEWEEK,Ts=_i.ONEDAY,ks=_i.ONEHOUR,xy=_i.ONEMIN,_y=_i.ONESEC,As=Vt,Ef=wr,Ms=Ef.HOUR_PATTERN,Ss=Ef.WEEKDAY_PATTERN;function Go(t){return Math.pow(10,t)}function _u(t){return t!=null}var Hh=function(e,r){r=r||{};var a=e._id||"x",i=a.charAt(0);function n(g,x){if(g>0)return Math.log(g)/Math.LN10;if(g<=0&&x&&e.range&&e.range.length===2){var _=e.range[0],T=e.range[1];return .5*(_+T-2*$C*Math.abs(_-T))}else return ra}function o(g,x,_,T){if((T||{}).msUTC&&_a(g))return+g;var k=gy(g,_||e.calendar);if(k===ra)if(_a(g)){g=+g;var S=Math.floor(Dt.mod(g+.05,1)*10),A=Math.round(g-S/10);k=gy(new Date(A))+S/10}else return ra;return k}function l(g,x,_){return DC(g,x,_||e.calendar)}function s(g){return e._categories[Math.round(g)]}function f(g){if(_u(g)){if(e._categoriesMap===void 0&&(e._categoriesMap={}),e._categoriesMap[g]!==void 0)return e._categoriesMap[g];e._categories.push(typeof g=="number"?String(g):g);var x=e._categories.length-1;return e._categoriesMap[g]=x,x}return ra}function c(g,x){for(var _=new Array(x),T=0;T<x;T++){var k=(g[0]||[])[T],S=(g[1]||[])[T];_[T]=v([k,S])}return _}function v(g){if(e._categoriesMap)return e._categoriesMap[g]}function u(g){var x=v(g);if(x!==void 0)return x;if(_a(g))return+g}function h(g){return _a(g)?+g:v(g)}function d(g,x,_){return SC.round(_+x*g,2)}function p(g,x,_){return(g-_)/x}var y=function(x){return _a(x)?d(x,e._m,e._b):ra},m=function(g){return p(g,e._m,e._b)};if(e.rangebreaks){var b=i==="y";y=function(g){if(!_a(g))return ra;var x=e._rangebreaks.length;if(!x)return d(g,e._m,e._b);var _=b;e.range[0]>e.range[1]&&(_=!_);for(var T=_?-1:1,k=T*g,S=0,A=0;A<x;A++){var D=T*e._rangebreaks[A].min,M=T*e._rangebreaks[A].max;if(k<D)break;if(k>M)S=A+1;else{S=k<(D+M)/2?A:A+1;break}}var C=e._B[S]||0;return isFinite(C)?d(g,e._m2,C):0},m=function(g){var x=e._rangebreaks.length;if(!x)return p(g,e._m,e._b);for(var _=0,T=0;T<x&&!(g<e._rangebreaks[T].pmin);T++)g>e._rangebreaks[T].pmax&&(_=T+1);return p(g,e._m2,e._B[_])}}e.c2l=e.type==="log"?n:wa,e.l2c=e.type==="log"?Go:wa,e.l2p=y,e.p2l=m,e.c2p=e.type==="log"?function(g,x){return y(n(g,x))}:y,e.p2c=e.type==="log"?function(g){return Go(m(g))}:m,["linear","-"].indexOf(e.type)!==-1?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=ei,e.c2d=e.c2r=e.l2d=e.l2r=wa,e.d2p=e.r2p=function(g){return e.l2p(ei(g))},e.p2d=e.p2r=m,e.cleanPos=wa):e.type==="log"?(e.d2r=e.d2l=function(g,x){return n(ei(g),x)},e.r2d=e.r2c=function(g){return Go(ei(g))},e.d2c=e.r2l=ei,e.c2d=e.l2r=wa,e.c2r=n,e.l2d=Go,e.d2p=function(g,x){return e.l2p(e.d2r(g,x))},e.p2d=function(g){return Go(m(g))},e.r2p=function(g){return e.l2p(ei(g))},e.p2r=m,e.cleanPos=wa):e.type==="date"?(e.d2r=e.r2d=Dt.identity,e.d2c=e.r2c=e.d2l=e.r2l=o,e.c2d=e.c2r=e.l2d=e.l2r=l,e.d2p=e.r2p=function(g,x,_){return e.l2p(o(g,0,_))},e.p2d=e.p2r=function(g,x,_){return l(m(g),x,_)},e.cleanPos=function(g){return Dt.cleanDate(g,ra,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(g){var x=h(g);return x!==void 0?x:e.fraction2r(.5)},e.l2r=e.c2r=wa,e.r2l=h,e.d2p=function(g){return e.l2p(e.r2c(g))},e.p2d=function(g){return s(m(g))},e.r2p=e.d2p,e.p2r=m,e.cleanPos=function(g){return typeof g=="string"&&g!==""?g:wa(g)}):e.type==="multicategory"&&(e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=u,e.r2c=function(g){var x=u(g);return x!==void 0?x:e.fraction2r(.5)},e.r2c_just_indices=v,e.l2r=e.c2r=wa,e.r2l=u,e.d2p=function(g){return e.l2p(e.r2c(g))},e.p2d=function(g){return s(m(g))},e.r2p=e.d2p,e.p2r=m,e.cleanPos=function(g){return Array.isArray(g)||typeof g=="string"&&g!==""?g:wa(g)},e.setupMultiCategory=function(g){var x=e._traceIndices,_,T,k=e._matchGroup;if(k&&e._categories.length===0){for(var S in k)if(S!==a){var A=r[As.id2name(S)];x=x.concat(A._traceIndices)}}var D=[[0,{}],[0,{}]],M=[];for(_=0;_<x.length;_++){var C=g[x[_]];if(i in C){var $=C[i],F=C._length||Dt.minRowLength($);if(by($[0])&&by($[1]))for(T=0;T<F;T++){var R=$[0][T],P=$[1][T];_u(R)&&_u(P)&&(M.push([R,P]),R in D[0][1]||(D[0][1][R]=D[0][0]++),P in D[1][1]||(D[1][1][P]=D[1][0]++))}}}for(M.sort(function(E,L){var z=D[0][1],I=z[E[0]]-z[L[0]];if(I)return I;var H=D[1][1];return H[E[1]]-H[L[1]]}),_=0;_<M.length;_++)f(M[_])}),e.fraction2r=function(g){var x=e.r2l(e.range[0]),_=e.r2l(e.range[1]);return e.l2r(x+g*(_-x))},e.r2fraction=function(g){var x=e.r2l(e.range[0]),_=e.r2l(e.range[1]);return(e.r2l(g)-x)/(_-x)},e.cleanRange=function(g,x){x||(x={}),g||(g="range");var _=Dt.nestedProperty(e,g).get(),T,k;if(e.type==="date"?k=Dt.dfltRange(e.calendar):i==="y"?k=Ef.DFLTRANGEY:e._name==="realaxis"?k=[0,1]:k=x.dfltRange||Ef.DFLTRANGEX,k=k.slice(),(e.rangemode==="tozero"||e.rangemode==="nonnegative")&&(k[0]=0),!_||_.length!==2){Dt.nestedProperty(e,g).set(k);return}for(e.type==="date"&&!e.autorange&&(_[0]=Dt.cleanDate(_[0],ra,e.calendar),_[1]=Dt.cleanDate(_[1],ra,e.calendar)),T=0;T<2;T++)if(e.type==="date"){if(!Dt.isDateTime(_[T],e.calendar)){e[g]=k;break}if(e.r2l(_[0])===e.r2l(_[1])){var S=Dt.constrain(e.r2l(_[0]),Dt.MIN_MS+1e3,Dt.MAX_MS-1e3);_[0]=e.l2r(S-1e3),_[1]=e.l2r(S+1e3);break}}else{if(!_a(_[T]))if(_a(_[1-T]))_[T]=_[1-T]*(T?10:.1);else{e[g]=k;break}if(_[T]<-ws?_[T]=-ws:_[T]>ws&&(_[T]=ws),_[0]===_[1]){var A=Math.max(1,Math.abs(_[0]*1e-6));_[0]-=A,_[1]+=A}}},e.setScale=function(g){var x=r._size;if(e.overlaying){var _=As.getFromId({_fullLayout:r},e.overlaying);e.domain=_.domain}var T=g&&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),D=i==="y";if(D?(e._offset=x.t+(1-e.domain[1])*x.h,e._length=x.h*(e.domain[1]-e.domain[0]),e._m=e._length/(S-A),e._b=-e._m*A):(e._offset=x.l+e.domain[0]*x.w,e._length=x.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 $=D;S>A&&($=!$),$&&e._rangebreaks.reverse();var F=$?-1:1;for(e._m2=F*e._length/(Math.abs(A-S)-e._lBreaks),e._B.push(-e._m2*(D?A:S)),M=0;M<e._rangebreaks.length;M++)C=e._rangebreaks[M],e._B.push(e._B[e._B.length-1]-F*e._m2*(C.max-C.min));for(M=0;M<e._rangebreaks.length;M++)C=e._rangebreaks[M],C.pmin=y(C.min),C.pmax=y(C.max)}}if(!isFinite(e._m)||!isFinite(e._b)||e._length<0)throw r._replotting=!1,new Error("Something went wrong with axis scaling")},e.maskBreaks=function(g){var x=e.rangebreaks||[],_,T,k,S,A;x._cachedPatterns||(x._cachedPatterns=x.map(function(z){return z.enabled&&z.bounds?Dt.simpleMap(z.bounds,z.pattern?ei:e.d2c):null})),x._cachedValues||(x._cachedValues=x.map(function(z){return z.enabled&&z.values?Dt.simpleMap(z.values,e.d2c).sort(Dt.sorterAsc):null}));for(var D=0;D<x.length;D++){var M=x[D];if(M.enabled){if(M.bounds){var C=M.pattern;switch(_=x._cachedPatterns[D],T=_[0],k=_[1],C){case Ss:A=new Date(g),S=A.getUTCDay(),T>k&&(k+=7,S<T&&(S+=7));break;case Ms:A=new Date(g);var $=A.getUTCHours(),F=A.getUTCMinutes(),R=A.getUTCSeconds(),P=A.getUTCMilliseconds();S=$+(F/60+R/3600+P/36e5),T>k&&(k+=24,S<T&&(S+=24));break;case"":S=g;break}if(S>=T&&S<k)return ra}else for(var E=x._cachedValues[D],L=0;L<E.length;L++)if(T=E[L],k=T+M.dvalue,g>=T&&g<k)return ra}}return g},e.locateBreaks=function(g,x){var _,T,k,S,A=[];if(!e.rangebreaks)return A;var D=e.rangebreaks.slice().sort(function(H,U){return H.pattern===Ss&&U.pattern===Ms?-1:U.pattern===Ss&&H.pattern===Ms?1:0}),M=function(H,U){if(H=Dt.constrain(H,g,x),U=Dt.constrain(U,g,x),H!==U){for(var O=!0,X=0;X<A.length;X++){var B=A[X];H<B.max&&U>=B.min&&(H<B.min&&(B.min=H),U>B.max&&(B.max=U),O=!1)}O&&A.push({min:H,max:U})}};for(_=0;_<D.length;_++){var C=D[_];if(C.enabled)if(C.bounds){var $=g,F=x;C.pattern&&($=Math.floor($)),T=Dt.simpleMap(C.bounds,C.pattern?ei:e.r2l),k=T[0],S=T[1];var R=new Date($),P,E;switch(C.pattern){case Ss:E=PC,P=((S<k?7:0)+(S-k))*Ts,$+=k*Ts-(R.getUTCDay()*Ts+R.getUTCHours()*ks+R.getUTCMinutes()*xy+R.getUTCSeconds()*_y+R.getUTCMilliseconds());break;case Ms:E=Ts,P=((S<k?24:0)+(S-k))*ks,$+=k*ks-(R.getUTCHours()*ks+R.getUTCMinutes()*xy+R.getUTCSeconds()*_y+R.getUTCMilliseconds());break;default:$=Math.min(T[0],T[1]),F=Math.max(T[0],T[1]),E=F-$,P=E}for(var L=$;L<F;L+=E)M(L,L+P)}else for(var z=Dt.simpleMap(C.values,e.d2c),I=0;I<z.length;I++)k=z[I],S=k+C.dvalue,M(k,S)}return A.sort(function(H,U){return H.min-U.min}),A},e.makeCalcdata=function(g,x,_){var T,k,S,A,D=e.type,M=D==="date"&&g[x+"calendar"];if(x in g){if(T=g[x],A=g._length||Dt.minRowLength(T),Dt.isTypedArray(T)&&(D==="linear"||D==="log")){if(A===T.length)return T;if(T.subarray)return T.subarray(0,A)}if(D==="multicategory")return c(T,A);for(k=new Array(A),S=0;S<A;S++)k[S]=e.d2c(T[S],0,M,_)}else{var C=x+"0"in g?e.d2c(g[x+"0"],0,M):0,$=g["d"+x]?Number(g["d"+x]):1;for(T=g[{x:"y",y:"x"}[x]],A=g._length||T.length,k=new Array(A),S=0;S<A;S++)k[S]=C+S*$}if(e.rangebreaks)for(S=0;S<A;S++)k[S]=e.maskBreaks(k[S]);return k},e.isValidRange=function(g){return Array.isArray(g)&&g.length===2&&_a(e.r2l(g[0]))&&_a(e.r2l(g[1]))},e.isPtWithinRange=function(g,x){var _=e.c2l(g[i],null,x),T=e.r2l(e.range[0]),k=e.r2l(e.range[1]);return T<k?T<=_&&_<=k:k<=_&&_<=T},e._emptyCategories=function(){e._categories=[],e._categoriesMap={}},e.clearCalc=function(){var g=e._matchGroup;if(g){var x=null,_=null;for(var T in g){var k=r[As.id2name(T)];if(k._categories){x=k._categories,_=k._categoriesMap;break}}x&&_?(e._categories=x,e._categoriesMap=_):e._emptyCategories()}else e._emptyCategories();if(e._initialCategories)for(var S=0;S<e._initialCategories.length;S++)f(e._initialCategories[S])},e.sortByInitialCategories=function(){var g=[];if(e._emptyCategories(),e._initialCategories)for(var x=0;x<e._initialCategories.length;x++)f(e._initialCategories[x]);g=g.concat(e._traceIndices);var _=e._matchGroup;for(var T in _)if(a!==T){var k=r[As.id2name(T)];k._categories=e._categories,k._categoriesMap=e._categoriesMap,g=g.concat(k._traceIndices)}return g};var w=r._d3locale;e.type==="date"&&(e._dateFormat=w?w.timeFormat:LC,e._extraFormat=r._extraFormat),e._separators=r.separators,e._numFormat=w?w.numberFormat:CC,delete e._minDtick,delete e._forceTick0},tw=ct,Oh=ve.exports,RC=Ot.BADNUM,zf=Oh.isArrayOrTypedArray,EC=Oh.isDateTime,zC=Oh.cleanNumber,rw=Math.round,aw=function(e,r,a){var i=e,n=a.noMultiCategory;if(zf(i)&&!i.length)return"-";if(!n&&OC(i))return"multicategory";if(n&&Array.isArray(i[0])){for(var o=[],l=0;l<i.length;l++)if(zf(i[l]))for(var s=0;s<i[l].length;s++)o.push(i[l][s]);i=o}if(FC(i,r))return"date";var f=a.autotypenumbers!=="strict";return HC(i,f)?"category":NC(i,f)?"linear":"-"};function IC(t,e){return e?tw(t):typeof t=="number"}function NC(t,e){for(var r=t.length,a=0;a<r;a++)if(IC(t[a],e))return!0;return!1}function FC(t,e){for(var r=t.length,a=iw(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=rw(l),f=t[s],c=String(f);o[c]||(o[c]=1,EC(f,e)&&i++,tw(f)&&n++)}return i>n*2}function iw(t){return Math.max(1,(t-1)/1e3)}function HC(t,e){for(var r=t.length,a=iw(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=rw(l),f=t[s],c=String(f);if(!o[c]){o[c]=1;var v=typeof f;v==="boolean"?n++:(e?zC(f)!==RC:v==="number")?i++:v==="string"&&n++}}return n>i*2}function OC(t){return zf(t[0])&&zf(t[1])}var BC=nt.exports,nw=ct,Zi=ve.exports,mf=Ot.FP_SAFE,jC=Ze,GC=_t.exports,ow=Vt,UC=ow.getFromId,VC=ow.isLinked,Ql={getAutoRange:pd,makePadFn:md,doAutoRange:WC,findExtremes:YC,concatExtremes:Bh};function pd(t,e){var r,a,i=[],n=t._fullLayout,o=md(n,e,0),l=md(n,e,1),s=Bh(t,e),f=s.min,c=s.max;if(f.length===0||c.length===0)return Zi.simpleMap(e.range,e.r2l);var v=f[0].val,u=c[0].val;for(r=1;r<f.length&&v===u;r++)v=Math.min(v,f[r].val);for(r=1;r<c.length&&v===u;r++)u=Math.max(u,c[r].val);var h=!1;if(e.range){var d=Zi.simpleMap(e.range,e.r2l);h=d[1]<d[0]}e.autorange==="reversed"&&(h=!0,e.autorange=!0);var p=e.rangemode,y=p==="tozero",m=p==="nonnegative",b=e._length,w=b/10,g=0,x,_,T,k,S,A;for(r=0;r<f.length;r++)for(x=f[r],a=0;a<c.length;a++)_=c[a],A=_.val-x.val-wy(e,x.val,_.val),A>0&&(S=b-o(x)-l(_),S>w?A/S>g&&(T=x,k=_,g=A/S):A/b>g&&(T={val:x.val,nopad:1},k={val:_.val,nopad:1},g=A/b));function D(R,P){return Math.max(R,l(P))}if(v===u){var M=v-1,C=v+1;if(y)if(v===0)i=[0,1];else{var $=(v>0?c:f).reduce(D,0),F=v/(1-Math.min(.5,$/b));i=v>0?[0,F]:[F,0]}else m?i=[Math.max(0,M),Math.max(1,C)]:i=[M,C]}else y?(T.val>=0&&(T={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):m&&(T.val-g*o(T)<0&&(T={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),g=(k.val-T.val-wy(e,x.val,_.val))/(b-o(T)-l(k)),i=[T.val-g*o(T),k.val+g*l(k)];return h&&i.reverse(),Zi.simpleMap(i,e.l2r||Number)}function wy(t,e,r){var a=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),n=0;n<i.length;n++){var o=i[n];a+=o.max-o.min}return a}function md(t,e,r){var a=.05*e._length,i=e._anchorAxis||{};if((e.ticklabelposition||"").indexOf("inside")!==-1||(i.ticklabelposition||"").indexOf("inside")!==-1){var n=e.autorange==="reversed";if(!n){var o=Zi.simpleMap(e.range,e.r2l);n=o[1]<o[0]}n&&(r=!r)}var l=0;return VC(t,e._id)||(l=XC(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 Ty=3;function XC(t,e,r){var a=0,i=e._id.charAt(0)==="x";for(var n in t._plots){var o=t._plots[n];if(!(e._id!==o.xaxis._id&&e._id!==o.yaxis._id)){var l=(i?o.yaxis:o.xaxis)||{};if((l.ticklabelposition||"").indexOf("inside")!==-1&&(!r&&(l.side==="left"||l.side==="bottom")||r&&(l.side==="top"||l.side==="right"))){if(l._vals){var s=Zi.deg2rad(l._tickAngles[l._id+"tick"]||0),f=Math.abs(Math.cos(s)),c=Math.abs(Math.sin(s));if(!l._vals[0].bb){var v=l._id+"tick",u=l._selections[v];u.each(function(b){var w=BC.select(this),g=w.select(".text-math-group");g.empty()&&(b.bb=GC.bBox(w.node()))})}for(var h=0;h<l._vals.length;h++){var d=l._vals[h],p=d.bb;if(p){var y=2*Ty+p.width,m=2*Ty+p.height;a=Math.max(a,i?Math.max(y*f,m*c):Math.max(m*f,y*c))}}}l.ticks==="inside"&&l.ticklabelposition==="inside"&&(a+=l.ticklen||0)}}}return a}function Bh(t,e,r){var a=e._id,i=t._fullData,n=t._fullLayout,o=[],l=[],s,f,c;function v(y,m){for(s=0;s<m.length;s++){var b=y[m[s]],w=(b._extremes||{})[a];if(b.visible===!0&&w){for(f=0;f<w.min.length;f++)c=w.min[f],yd(o,c.val,c.pad,{extrapad:c.extrapad});for(f=0;f<w.max.length;f++)c=w.max[f],gd(l,c.val,c.pad,{extrapad:c.extrapad})}}}if(v(i,e._traceIndices),v(n.annotations||[],e._annIndices||[]),v(n.shapes||[],e._shapeIndices||[]),e._matchGroup&&!r){for(var u in e._matchGroup)if(u!==e._id){var h=UC(t,u),d=Bh(t,h,!0),p=e._length/h._length;for(f=0;f<d.min.length;f++)c=d.min[f],yd(o,c.val,c.pad*p,{extrapad:c.extrapad});for(f=0;f<d.max.length;f++)c=d.max[f],gd(l,c.val,c.pad*p,{extrapad:c.extrapad})}}return{min:o,max:l}}function WC(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():pd(t,e),e._r=e.range.slice(),e._rl=Zi.simpleMap(e._r,e.r2l);var a=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,jC.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i),a.range=e.range.slice(),a.autorange=e.autorange}var n=e._anchorAxis;if(n&&n.rangeslider){var o=n.rangeslider[e._name];o&&o.rangemode==="auto"&&(o.range=pd(t,e)),n._input.rangeslider[e._name]=Zi.extendFlat({},o)}}function YC(t,e,r){r||(r={}),t._m||t.setScale();var a=[],i=[],n=e.length,o=r.padded||!1,l=r.tozero&&(t.type==="linear"||t.type==="-"),s=t.type==="log",f=!1,c=r.vpadLinearized||!1,v,u,h,d,p,y,m,b,w;function g(M){if(Array.isArray(M))return f=!0,function($){return Math.max(Number(M[$]||0),0)};var C=Math.max(Number(M||0),0);return function(){return C}}var x=g((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),_=g((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),T=g(r.vpadplus||r.vpad),k=g(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<mf&&(w=u);else for(v=0;v<n;v++)u=e[v],u<b&&u>-mf&&(b=u),u>w&&u<mf&&(w=u);e=[b,w],n=2}var S={tozero:l,extrapad:o};function A(M){h=e[M],nw(h)&&(y=x(M),m=_(M),c?(d=t.c2l(h)-k(M),p=t.c2l(h)+T(M)):(b=h-k(M),w=h+T(M),s&&b<w/10&&(b=w/10),d=t.c2l(b),p=t.c2l(w)),l&&(d=Math.min(0,d),p=Math.max(0,p)),ky(d)&&yd(a,d,m,S),ky(p)&&gd(i,p,y,S))}var D=Math.min(6,n);for(v=0;v<D;v++)A(v);for(v=n-1;v>=D;v--)A(v);return{min:a,max:i,opts:r}}function yd(t,e,r,a){lw(t,e,r,a,qC)}function gd(t,e,r,a){lw(t,e,r,a,ZC)}function lw(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 ky(t){return nw(t)&&Math.abs(t)<mf}function qC(t,e){return t<=e}function ZC(t,e){return t>=e}var Wr=nt.exports,Gt=ct,oo=Ut.exports,Ml=Ze,at=ve.exports,vo=at.strTranslate,ul=nr,KC=kc,Sl=rt.exports,Er=_t.exports,QC=Wa,Ay=wc,mr=Ot,JC=mr.ONEMAXYEAR,If=mr.ONEAVGYEAR,bd=mr.ONEMINYEAR,eD=mr.ONEMAXQUARTER,xd=mr.ONEAVGQUARTER,_d=mr.ONEMINQUARTER,tD=mr.ONEMAXMONTH,ho=mr.ONEAVGMONTH,wd=mr.ONEMINMONTH,Kr=mr.ONEWEEK,_r=mr.ONEDAY,Ki=_r/2,Ua=mr.ONEHOUR,Nf=mr.ONEMIN,Td=mr.ONESEC,Qi=mr.MINUS_SIGN,Ac=mr.BADNUM,kd={K:"zeroline"},Ad={K:"gridline",L:"path"},Md={K:"minor-gridline",L:"path"},sw={K:"tick",L:"path"},My={K:"tick",L:"text"},Sy={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Mc=Dr,Ls=Mc.MID_SHIFT,Ji=Mc.CAP_SHIFT,Ff=Mc.LINE_SPACING,rD=Mc.OPPOSITE_SIDE,Sd=3,Me=Mt.exports={};Me.setConvert=Hh;var aD=aw,Ya=Vt,iD=Ya.idSort,nD=Ya.isLinked;Me.id2name=Ya.id2name;Me.name2id=Ya.name2id;Me.cleanId=Ya.cleanId;Me.list=Ya.list;Me.listIds=Ya.listIds;Me.getFromId=Ya.getFromId;Me.getFromTrace=Ya.getFromTrace;var fw=Ql;Me.getAutoRange=fw.getAutoRange;Me.findExtremes=fw.findExtremes;var oD=1e-4;function jh(t){var e=(t[1]-t[0])*oD;return[t[0]-e,t[1]+e]}Me.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},at.coerce(t,e,f,s)};Me.getRefType=function(t){return t===void 0?t:t==="paper"?"paper":t==="pixel"?"pixel":/( domain)$/.test(t)?"domain":"range"};Me.coercePosition=function(t,e,r,a,i,n){var o,l,s=Me.getRefType(a);if(s!=="range")o=at.ensureNumber,l=r(i,n);else{var f=Me.getFromId(e,a);n=f.fraction2r(n),l=r(i,n),o=f.cleanPos}t[i]=o(l)};Me.cleanPosition=function(t,e,r){var a=r==="paper"||r==="pixel"?at.ensureNumber:Me.getFromId(e,r).cleanPos;return a(t)};Me.redrawComponents=function(t,e){e=e||Me.listIds(t);var r=t._fullLayout;function a(i,n,o,l){for(var s=Ml.getComponentMethod(i,n),f={},c=0;c<e.length;c++)for(var v=r[Me.id2name(e[c])],u=v[o],h=0;h<u.length;h++){var d=u[h];if(!f[d]&&(s(t,d),f[d]=1,l))return}}a("annotations","drawOne","_annIndices"),a("shapes","drawOne","_shapeIndices"),a("images","draw","_imgIndices",!0),a("selections","drawOne","_selectionIndices")};var lD=Me.getDataConversions=function(t,e,r,a){var i,n=r==="x"||r==="y"||r==="z"?r:a;if(Array.isArray(n)){if(i={type:aD(a,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},Me.setConvert(i),i.type==="category")for(var o=0;o<a.length;o++)i.d2c(a[o])}else i=Me.getFromTrace(t,e,n);return i?{d2c:i.d2c,c2d:i.c2d}:n==="ids"?{d2c:Cy,c2d:Cy}:{d2c:Ly,c2d:Ly}};function Ly(t){return+t}function Cy(t){return String(t)}Me.getDataToCoordFunc=function(t,e,r,a){return lD(t,e,r,a).d2c};Me.counterLetter=function(t){var e=t.charAt(0);if(e==="x")return"y";if(e==="y")return"x"};Me.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))};Me.saveRangeInitial=function(t,e){for(var r=Me.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};Me.saveShowSpikeInitial=function(t,e){for(var r=Me.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};Me.autoBin=function(t,e,r,a,i,n){var o=at.aggNums(Math.min,null,t),l=at.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:at.simpleMap([o,l],e.c2r,0,i),calendar:i},Me.setConvert(s),n=n&&Ay.dtick(n,s.type),n)s.dtick=n,s.tick0=Ay.tick0(void 0,s.type,i);else{var f;if(r)f=(l-o)/r;else{var c=at.distinctVals(t),v=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),u=v*at.roundUp(c.minDiff/v,[.9,1.9,4.9,9.9],!0);f=Math.max(u,2*at.stdev(t)/Math.pow(t.length,a?.25:.4)),Gt(f)||(f=1)}Me.autoTicks(s,f)}var h=s.dtick,d=Me.tickIncrement(Me.tickFirst(s),h,"reverse",i),p,y;if(typeof h=="number")d=sD(d,t,s,o,l),y=1+Math.floor((l-d)/h),p=d+y*h;else for(s.dtick.charAt(0)==="M"&&(d=fD(d,t,h,o,i)),p=d,y=0;p<=l;)p=Me.tickIncrement(p,h,!1,i),y++;return{start:e.c2r(d,0,i),end:e.c2r(p,0,i),size:h,_dataSpan:l-o}};function sD(t,e,r,a,i){var n=0,o=0,l=0,s=0;function f(h){return(1+(h-t)*100/r.dtick)%100<2}for(var c=0;c<e.length;c++)e[c]%1===0?l++:Gt(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 fD(t,e,r,a,i){var n=at.findExactDates(e,i),o=.8;if(n.exactDays>o){var l=Number(r.substr(1));n.exactYears>o&&l%12===0?t=Me.tickIncrement(t,"M6","reverse")+_r*1.5:n.exactMonths>o?t=Me.tickIncrement(t,"M1","reverse")+_r*15.5:t-=Ki;var s=Me.tickIncrement(t,r);if(s<=a)return s}return t}Me.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var a=e.dtick&&Gt(e._tmin),i;if(a){var n=Me.tickIncrement(e._tmin,e.dtick,!0);i=[e._tmin,n*.99+e._tmin*.01]}else{var o=at.simpleMap(e.range,e.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(t.range=at.simpleMap(i,e.l2r),t._isMinor=!0,Me.prepTicks(t,r),a){var l=Gt(e.dtick),s=Gt(t.dtick),f=l?e.dtick:+e.dtick.substring(1),c=s?t.dtick:+t.dtick.substring(1);l&&s?wu(f,c)?f===2*Kr&&c===2*_r&&(t.dtick=Kr):f===2*Kr&&c===3*_r?t.dtick=Kr:f===Kr&&!(e._input.minor||{}).nticks?t.dtick=_r:Dy(f/c,2.5)?t.dtick=f/2:t.dtick=f:String(e.dtick).charAt(0)==="M"?s?t.dtick="M1":wu(f,c)?f>=12&&c===2&&(t.dtick="M3"):t.dtick=e.dtick:String(t.dtick).charAt(0)==="L"?String(e.dtick).charAt(0)==="L"?wu(f,c)||(t.dtick=Dy(f/c,2.5)?e.dtick/2:e.dtick):t.dtick="D1":t.dtick==="D2"&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}e.minor._tick0Init===void 0&&(t.tick0=e.tick0)};function wu(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function Dy(t,e){return Math.abs(t/e-1)<.001}Me.prepTicks=function(t,e){var r=at.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t.tickmode==="auto"||!t.dtick){var a=t.nticks,i;a||(t.type==="category"||t.type==="multicategory"?(i=t.tickfont?at.bigFont(t.tickfont.size||12):15,a=t._length/i):(i=t._id.charAt(0)==="y"?40:80,a=at.constrain(t._length/i,4,9)+1),t._name==="radialaxis"&&(a*=2)),t.minor&&t.minor.tickmode!=="array"||t.tickmode==="array"&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,Me.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"&&cD(t),t.tick0||(t.tick0=t.type==="date"?"2000-01-01":0),t.type==="date"&&t.dtick<.1&&(t.dtick=.1),vw(t)};function Tu(t){return+t.substring(1)}function cD(t){var e;function r(){return!(Gt(t.dtick)||t.dtick.charAt(0)!=="M")}var a=r(),i=Me.getTickFormat(t);if(i){var n=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(e=Ua,n&&!a&&t.dtick<Ua&&(t.dtick=Ua)):/%p/.test(i)?(e=Ki,n&&!a&&t.dtick<Ki&&(t.dtick=Ki)):/%[Aadejuwx]/.test(i)?(e=_r,n&&!a&&t.dtick<_r&&(t.dtick=_r)):/%[UVW]/.test(i)?(e=Kr,n&&!a&&t.dtick<Kr&&(t.dtick=Kr)):/%[Bbm]/.test(i)?(e=ho,n&&(a?Tu(t.dtick)<1:t.dtick<wd)&&(t.dtick="M1")):/%[q]/.test(i)?(e=xd,n&&(a?Tu(t.dtick)<3:t.dtick<_d)&&(t.dtick="M3")):/%[Yy]/.test(i)&&(e=If,n&&(a?Tu(t.dtick)<12:t.dtick<bd)&&(t.dtick="M12")))}a=r(),a&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}function uD(t,e,r){for(var a=0;a<t.length;a++){var i=t[a].value,n=a,o=a+1;a<t.length-1?(n=a,o=a+1):a>0?(n=a-1,o=a):(n=a,o=a);var l=t[n].value,s=t[o].value,f=Math.abs(s-l),c=r||f,v=0;c>=bd?f>=bd&&f<=JC?v=f:v=If:r===xd&&c>=_d?f>=_d&&f<=eD?v=f:v=xd:c>=wd?f>=wd&&f<=tD?v=f:v=ho:r===Kr&&c>=Kr?v=Kr:c>=_r?v=_r:r===Ki&&c>=Ki?v=Ki:r===Ua&&c>=Ua&&(v=Ua);var u;v>=f&&(v=f,u=!0);var h=i+v;if(e.rangebreaks&&v>0){for(var d=84,p=0,y=0;y<d;y++){var m=(y+.5)/d;e.maskBreaks(i*(1-m)+m*h)!==Ac&&p++}v*=p/d,v||(t[a].drop=!0),u&&f>Kr&&(v=f)}(v>0||a===0)&&(t[a].periodX=i+v/2)}}Me.calcTicks=function(e,r){for(var a=e.type,i=e.calendar,n=e.ticklabelstep,o=e.ticklabelmode==="period",l=at.simpleMap(e.range,e.r2l,void 0,void 0,r),s=l[1]<l[0],f=Math.min(l[0],l[1]),c=Math.max(l[0],l[1]),v=Math.max(1e3,e._length||0),u=[],h=[],d=[],p=[],y=e.minor&&(e.minor.ticks||e.minor.showgrid),m=1;m>=(y?0:1);m--){var b=!m;m?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var w=m?e:at.extendFlat({},e,e.minor);if(b?Me.prepMinorTicks(w,e,r):Me.prepTicks(w,r),w.tickmode==="array"){m?(d=[],u=$y(e)):(p=[],h=$y(e));continue}var g=jh(l),x=g[0],_=g[1],T=Gt(w.dtick),k=a==="log"&&!(T||w.dtick.charAt(0)==="L"),S=Me.tickFirst(w,r);if(m){if(e._tmin=S,S<x!==s)break;(a==="category"||a==="multicategory")&&(_=s?Math.max(-.5,_):Math.min(e._categories.length-.5,_))}var A=null,D=S,M;if(m){var C;T?C=e.dtick:a==="date"?typeof e.dtick=="string"&&e.dtick.charAt(0)==="M"&&(C=ho*e.dtick.substring(1)):C=e._roughDTick,M=Math.round((e.r2l(D)-e.r2l(e.tick0))/C)-1}var $=w.dtick;for(w.rangebreaks&&w._tick0Init!==w.tick0&&(D=ku(D,e),s||(D=Me.tickIncrement(D,$,!s,i))),m&&o&&(D=Me.tickIncrement(D,$,!s,i),M--);s?D>=_:D<=_;D=Me.tickIncrement(D,$,s,i)){if(m&&M++,w.rangebreaks&&!s){if(D<x)continue;if(w.maskBreaks(D)===Ac&&ku(D,w)>=c)break}if(d.length>v||D===A)break;A=D;var F={value:D};m?(k&&D!==(D|0)&&(F.simpleLabel=!0),n>1&&M%n&&(F.skipLabel=!0),d.push(F)):(F.minor=!0,p.push(F))}}if(y){var R=e.minor.ticks==="inside"&&e.ticks==="outside"||e.minor.ticks==="outside"&&e.ticks==="inside";if(!R){for(var P=d.map(function(oe){return oe.value}),E=[],L=0;L<p.length;L++){var z=p[L],I=z.value;if(P.indexOf(I)===-1){for(var H=!1,U=0;!H&&U<d.length;U++)1e7+d[U].value===1e7+I&&(H=!0);H||E.push(z)}}p=E}}o&&uD(d,e,e._definedDelta);var O;if(e.rangebreaks){var X=e._id.charAt(0)==="y",B=1;e.tickmode==="auto"&&(B=e.tickfont?e.tickfont.size:12);var Y=NaN;for(O=d.length-1;O>-1;O--){if(d[O].drop){d.splice(O,1);continue}d[O].value=ku(d[O].value,e);var Z=e.c2p(d[O].value);(X?Y>Z-B:Y<Z+B)?d.splice(s?O+1:O,1):Y=Z}}Xh(e)&&Math.abs(l[1]-l[0])===360&&d.pop(),e._tmax=(d[d.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var q,W=function(oe){oe.text="",e._prevDateHead=q};d=d.concat(p);var ae,ne;for(O=0;O<d.length;O++){var de=d[O].minor,le=d[O].value;de?h.push({x:le,minor:!0}):(q=e._prevDateHead,ae=Me.tickText(e,le,!1,d[O].simpleLabel),ne=d[O].periodX,ne!==void 0&&(ae.periodX=ne,(ne>c||ne<f)&&(ne>c&&(ae.periodX=c),ne<f&&(ae.periodX=f),W(ae))),d[O].skipLabel&&W(ae),u.push(ae))}return u=u.concat(h),e._inCalcTicks=!1,o&&u.length&&(u[0].noTick=!0),u};function $y(t){var e=at.simpleMap(t.range,t.r2l),r=jh(e),a=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),n=t.type==="category"?t.d2l_noadd:t.d2l;t.type==="log"&&String(t.dtick).charAt(0)!=="L"&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var o=[],l=0;l<=1;l++)if(!(l&&!t.minor)){var s=l?t.minor.tickvals:t.tickvals,f=l?[]:t.ticktext;if(!!s){Array.isArray(f)||(f=[]);for(var c=0;c<s.length;c++){var v=n(s[c]);if(v>a&&v<i){var u=f[c]===void 0?Me.tickText(t,v):Gh(t,v,String(f[c]));l&&(u.minor=!0,u.text=""),o.push(u)}}}}return t.rangebreaks&&(o=o.filter(function(h){return t.maskBreaks(h.x)!==Ac})),o}var Cs=[2,5,10],Py=[1,2,3,6,12],Ry=[1,2,5,10,15,30],vD=[1,2,3,7,14],cw=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],uw=[-.301,0,.301,.699,1],dD=[15,30,45,90,180];function Ta(t,e,r){return e*at.roundUp(t/e,r)}Me.autoTicks=function(t,e,r){var a;function i(v){return Math.pow(v,Math.floor(Math.log(e)/Math.LN10))}if(t.type==="date"){t.tick0=at.dateTick0(t.calendar,0);var n=2*e;if(n>If)e/=If,a=i(10),t.dtick="M"+12*Ta(e,a,Cs);else if(n>ho)e/=ho,t.dtick="M"+Ta(e,1,Py);else if(n>_r){if(t.dtick=Ta(e,_r,t._hasDayOfWeekBreaks?[1,2,7,14]:vD),!r){var o=Me.getTickFormat(t),l=t.ticklabelmode==="period";l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=at.dateTick0(t.calendar,2):t.tick0=at.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}}else n>Ua?t.dtick=Ta(e,Ua,Py):n>Nf?t.dtick=Ta(e,Nf,Ry):n>Td?t.dtick=Ta(e,Td,Ry):(a=i(10),t.dtick=Ta(e,a,Cs))}else if(t.type==="log"){t.tick0=0;var s=at.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(s[1]-s[0])<1){var f=1.5*Math.abs((s[1]-s[0])/e);e=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/f,a=i(10),t.dtick="L"+Ta(e,a,Cs)}else t.dtick=e>.3?"D2":"D1"}else t.type==="category"||t.type==="multicategory"?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):Xh(t)?(t.tick0=0,a=1,t.dtick=Ta(e,a,dD)):(t.tick0=0,a=i(10),t.dtick=Ta(e,a,Cs));if(t.dtick===0&&(t.dtick=1),!Gt(t.dtick)&&typeof t.dtick!="string"){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}};function vw(t){var e=t.dtick;if(t._tickexponent=0,!Gt(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>=_r&&i<=10||e>=_r*15)t._tickround="d";else if(e>=Nf&&i<=16||e>=Ua)t._tickround="M";else if(e>=Td&&i<=19||e>=Nf)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(Gt(e)||e.charAt(0)==="L"){var o=t.range.map(t.r2d||Number);Gt(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&&(Hf(t.exponentformat)&&!Uh(s)?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}Me.tickIncrement=function(t,e,r,a){var i=r?-1:1;if(Gt(e))return at.increment(t,i*e);var n=e.charAt(0),o=i*Number(e.substr(1));if(n==="M")return at.incrementMonth(t,o,a);if(n==="L")return Math.log(Math.pow(10,t)+o)/Math.LN10;if(n==="D"){var l=e==="D2"?uw:cw,s=t+i*.01,f=at.roundUp(at.mod(s,1),l,r);return Math.floor(s)+Math.log(Wr.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)};Me.tickFirst=function(t,e){var r=t.r2l||Number,a=at.simpleMap(t.range,r,void 0,void 0,e),i=a[1]<a[0],n=i?Math.floor:Math.ceil,o=jh(a)[0],l=t.dtick,s=r(t.tick0);if(Gt(l)){var f=n((o-s)/l)*l+s;return(t.type==="category"||t.type==="multicategory")&&(f=at.constrain(f,0,t._categories.length-1)),f}var c=l.charAt(0),v=Number(l.substr(1));if(c==="M"){for(var u=0,h=s,d,p,y;u<10;){if(d=Me.tickIncrement(h,l,i,t.calendar),(d-o)*(h-o)<=0)return i?Math.min(h,d):Math.max(h,d);p=(o-(h+d)/2)/(d-h),y=c+(Math.abs(Math.round(p))||1)*v,h=Me.tickIncrement(h,y,p<0?!i:i,t.calendar),u++}return at.error("tickFirst did not converge",t),h}else{if(c==="L")return Math.log(n((Math.pow(10,o)-s)/v)*v+s)/Math.LN10;if(c==="D"){var m=l==="D2"?uw:cw,b=at.roundUp(at.mod(o,1),m,i);return Math.floor(o)+Math.log(Wr.round(Math.pow(10,b),1))/Math.LN10}else throw"unrecognized dtick "+String(l)}};Me.tickText=function(t,e,r,a){var i=Gh(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=at.simpleMap(t.range,t.r2l),v=(Math.abs(c[1]-c[0])-(t._lBreaks||0))/1e4;for(f=0;f<t.ticktext.length&&!(Math.abs(e-s(t.tickvals[f]))<v);f++);if(f<t.ticktext.length)return i.text=String(t.ticktext[f]),i}function u(p){if(p===void 0)return!0;if(r)return p==="none";var y={first:t._tmin,last:t._tmax}[p];return p!=="all"&&e!==y}var h=r?"never":t.exponentformat!=="none"&&u(t.showexponent)?"hide":"";if(l==="date"?hD(t,i,r,o):l==="log"?pD(t,i,r,o,h):l==="category"?mD(t,i):l==="multicategory"?yD(t,i,r):Xh(t)?bD(t,i,r,o,h):gD(t,i,r,o,h),a||(t.tickprefix&&!u(t.showtickprefix)&&(i.text=t.tickprefix+i.text),t.ticksuffix&&!u(t.showticksuffix)&&(i.text+=t.ticksuffix)),t.tickson==="boundaries"||t.showdividers){var d=function(p){var y=t.l2p(p);return y>=0&&y<=t._length?p:null};i.xbnd=[d(i.x-.5),d(i.x+t.dtick-.5)]}return i};Me.hoverLabelText=function(t,e,r){r&&(t=at.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 Me.hoverLabelText(t,a,r)+" - "+Me.hoverLabelText(t,i,r);var n=t.type==="log"&&a<=0,o=Me.tickText(t,t.c2l(n?-a:a),"hover").text;return n?a===0?"0":Qi+o:o};function Gh(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 hD(t,e,r,a){var i=t._tickround,n=r&&t.hoverformat||Me.getTickFormat(t);a&&(Gt(i)?i=4:i={y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o=at.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=Cl(t),c=t._trueSide||t.side;(!f&&c==="top"||f&&c==="bottom")&&(o+="<br> ")}e.text=o}function pD(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=Ll(Math.pow(10,o),t,i,a);else if(Gt(n)||s==="D"&&at.mod(o+.01,1)<.1){var f=Math.round(o),c=Math.abs(f),v=t.exponentformat;v==="power"||Hf(v)&&Uh(f)?(f===0?e.text=1:f===1?e.text="10":e.text="10<sup>"+(f>1?"":Qi)+c+"</sup>",e.fontSize*=1.25):(v==="e"||v==="E")&&c>2?e.text="1"+v+(f>0?"+":Qi)+c:(e.text=Ll(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,at.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 mD(t,e){var r=t._categories[Math.round(e.x)];r===void 0&&(r=""),e.text=String(r)}function yD(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 gD(t,e,r,a,i){i==="never"?i="":t.showexponent==="all"&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=Ll(e.x,t,i,a)}function bD(t,e,r,a,i){if(t.thetaunit==="radians"&&!r){var n=e.x/180;if(n===0)e.text="0";else{var o=xD(n);if(o[1]>=100)e.text=Ll(at.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=Qi+e.text)}}}else e.text=Ll(e.x,t,i,a)}function xD(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 _D=["f","p","n","\u03BC","m","","k","M","G","T"];function Hf(t){return t==="SI"||t==="B"}function Uh(t){return t>14||t<-15}function Ll(t,e,r,a){var i=t<0,n=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,s=Me.getTickFormat(e),f=e.separatethousands;if(a){var c={exponentformat:o,minexponent:e.minexponent,dtick:e.showexponent==="none"?e.dtick:Gt(t)&&Math.abs(t)||1,range:e.showexponent==="none"?e.range.map(e.r2d):[0,t||1]};vw(c),n=(Number(c._tickround)||0)+4,l=c._tickexponent,e.hoverformat&&(s=e.hoverformat)}if(s)return e._numFormat(s)(t).replace(/-/g,Qi);var v=Math.pow(10,-n)/2;if(o==="none"&&(l=0),t=Math.abs(t),t<v)t="0",i=!1;else{if(t+=v,l&&(t*=Math.pow(10,-l),n+=l),n===0)t=String(Math.floor(t));else if(n<0){t=String(Math.round(t)),t=t.substr(0,t.length+n);for(var u=n;u<0;u++)t+="0"}else{t=String(t);var h=t.indexOf(".")+1;h&&(t=t.substr(0,h+n).replace(/\.?0+$/,""))}t=at.numSeparate(t,e._separators,f)}if(l&&o!=="hide"){Hf(o)&&Uh(l)&&(o="power");var d;l<0?d=Qi+-l:o!=="power"?d="+"+l:d=String(l),o==="e"||o==="E"?t+=o+d:o==="power"?t+="\xD710<sup>"+d+"</sup>":o==="B"&&l===9?t+="B":Hf(o)&&(t+=_D[l/3+5])}return i?Qi+t:t}Me.getTickFormat=function(t){var e;function r(s){return typeof s!="string"?s:Number(s.replace("M",""))*ho}function a(s,f){var c=["L","D"];if(typeof s==typeof f){if(typeof s=="number")return s-f;var v=c.indexOf(s.charAt(0)),u=c.indexOf(f.charAt(0));return v===u?Number(s.replace(/(L|D)/g,""))-Number(f.replace(/(L|D)/g,"")):v-u}else return typeof s=="number"?1:-1}function i(s,f,c){var v=c||function(d){return d},u=f[0],h=f[1];return(!u&&typeof u!="number"||v(u)<=v(s))&&(!h&&typeof h!="number"||v(h)>=v(s))}function n(s,f){var c=f[0]===null,v=f[1]===null,u=a(s,f[0])>=0,h=a(s,f[1])<=0;return(c||u)&&(v||h)}var o,l;if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":{for(e=0;e<t.tickformatstops.length;e++)if(l=t.tickformatstops[e],l.enabled&&i(t.dtick,l.dtickrange,r)){o=l;break}break}case"log":{for(e=0;e<t.tickformatstops.length;e++)if(l=t.tickformatstops[e],l.enabled&&n(t.dtick,l.dtickrange)){o=l;break}break}}return o?o.value:t.tickformat};Me.getSubplots=function(t,e){var r=t._fullLayout._subplots,a=r.cartesian.concat(r.gl2d||[]),i=e?Me.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};Me.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};Me.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=Me.list(t,"x",!0),n=Me.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){Wr.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})})}};Me.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.minorGridlayer&&l.minorGridlayer.selectAll("path").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"?Me.listIds(t):e;return at.syncOrAsync(i.map(function(n){return function(){if(!!n){var o=Me.getFromId(t,n),l=Me.drawOne(t,o,r);return o._r=o.range.slice(),o._rl=at.simpleMap(o._r,o.r2l),l}}}))};Me.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=Me.counterLetter(l),c=o._plots[e._mainSubplot];if(!c)return;var v=c[s+"axislayer"],u=e._mainLinePosition,h=e._mainMirrorPosition,d=e._vals=Me.calcTicks(e),p=[e.mirror,u,h].join("_");for(a=0;a<d.length;a++)d[a].axInfo=p;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var y={};function m(oe){var ue=l+(oe||"tick");return y[ue]||(y[ue]=AD(e,ue)),y[ue]}if(!!e.visible){var b=Me.makeTransTickFn(e),w=Me.makeTransTickLabelFn(e),g,x,_=e.ticks==="inside",T=e.ticks==="outside";if(e.tickson==="boundaries"){var k=wD(e,d);x=Me.clipEnds(e,k),g=_?x:k}else x=Me.clipEnds(e,d),g=_&&e.ticklabelmode!=="period"?x:d;var S=e._gridVals=x,A=kD(e,d);if(!o._hasOnlyLargeSploms){var D=e._subplotsWith,M={};for(a=0;a<D.length;a++){i=D[a],n=o._plots[i];var C=n[f+"axis"],$=C._mainAxis._id;if(!M[$]){M[$]=1;var F=s==="x"?"M0,"+C._offset+"v"+C._length:"M"+C._offset+",0h"+C._length;Me.drawGrid(t,e,{vals:S,counterAxis:C,layer:n.gridlayer.select("."+l),minorLayer:n.minorGridlayer.select("."+l),path:F,transFn:b}),Me.drawZeroLine(t,e,{counterAxis:C,layer:n.zerolinelayer,path:F,transFn:b})}}}var R,P=Me.getTickSigns(e),E=Me.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var L=Me.makeTickPath(e,u,P[2]),z=Me.makeTickPath(e,u,E[2],{minor:!0}),I,H,U,O;if(e._anchorAxis&&e.mirror&&e.mirror!==!0?(I=Me.makeTickPath(e,h,P[3]),H=Me.makeTickPath(e,h,E[3],{minor:!0}),U=L+I,O=z+H):(I="",H="",U=L,O=z),e.showdividers&&T&&e.tickson==="boundaries"){var X={};for(a=0;a<A.length;a++)X[A[a].x]=1;R=function(oe){return X[oe.x]?I:U}}else R=function(oe){return oe.minor?O:U}}if(Me.drawTicks(t,e,{vals:g,layer:v,path:R,transFn:b}),e.mirror==="allticks"){var B=Object.keys(e._linepositions||{});for(a=0;a<B.length;a++){i=B[a],n=o._plots[i];var Y=e._linepositions[i]||[],Z=Y[0],q=Y[1],W=Y[2],ae=Me.makeTickPath(e,Z,W?P[0]:E[0],{minor:W})+Me.makeTickPath(e,q,W?P[1]:E[1],{minor:W});Me.drawTicks(t,e,{vals:g,layer:n[s+"axislayer"],path:ae,transFn:b})}}var ne=[];if(ne.push(function(){return Me.drawLabels(t,e,{vals:d,layer:v,plotinfo:n,transFn:w,labelFns:Me.makeLabelFns(e,u)})}),e.type==="multicategory"){var de={x:2,y:10}[s];ne.push(function(){var oe={x:"height",y:"width"}[s],ue=m()[oe]+de+(e._tickAngles[l+"tick"]?e.tickfont.size*Ff:0);return Me.drawLabels(t,e,{vals:TD(e,d),layer:v,cls:l+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:b,labelFns:Me.makeLabelFns(e,u+ue*P[4])})}),ne.push(function(){return e._depth=P[4]*(m("tick2")[e.side]-u),SD(t,e,{vals:A,layer:v,path:Me.makeTickPath(e,u,P[4],{len:e._depth}),transFn:b})})}else e.title.hasOwnProperty("standoff")&&ne.push(function(){e._depth=P[4]*(m()[e.side]-u)});var le=Ml.getComponentMethod("rangeslider","isVisible")(e);return ne.push(function(){var oe=e.side.charAt(0),ue=rD[e.side].charAt(0),Se=Me.getPxPosition(t,e),he=T?e.ticklen:0,ye,ke,te,J;if((e.automargin||le)&&(e.type==="multicategory"?ye=m("tick2"):(ye=m(),s==="x"&&oe==="b"&&(e._depth=Math.max(ye.width>0?ye.bottom-Se:0,he)))),e.automargin){ke={x:0,y:0,r:0,l:0,t:0,b:0};var _e=[0,1];if(s==="x"){if(oe==="b"?ke[oe]=e._depth:(ke[oe]=e._depth=Math.max(ye.width>0?Se-ye.top:0,he),_e.reverse()),ye.width>0){var pe=ye.right-(e._offset+e._length);pe>0&&(ke.xr=1,ke.r=pe);var Le=e._offset-ye.left;Le>0&&(ke.xl=0,ke.l=Le)}}else if(oe==="l"?ke[oe]=e._depth=Math.max(ye.height>0?Se-ye.left:0,he):(ke[oe]=e._depth=Math.max(ye.height>0?ye.right-Se:0,he),_e.reverse()),ye.height>0){var Ie=ye.bottom-(e._offset+e._length);Ie>0&&(ke.yb=0,ke.b=Ie);var Pe=e._offset-ye.top;Pe>0&&(ke.yt=1,ke.t=Pe)}ke[f]=e.anchor==="free"?e.position:e._anchorAxis.domain[_e[0]],e.title.text!==o._dfltTitle[s]&&(ke[oe]+=dw(e)+(e.title.standoff||0)),e.mirror&&e.anchor!=="free"&&(te={x:0,y:0,r:0,l:0,t:0,b:0},te[ue]=e.linewidth,e.mirror&&e.mirror!==!0&&(te[ue]+=he),e.mirror===!0||e.mirror==="ticks"?te[f]=e._anchorAxis.domain[_e[1]]:(e.mirror==="all"||e.mirror==="allticks")&&(te[f]=[e._counterDomainMin,e._counterDomainMax][_e[1]]))}le&&(J=Ml.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),typeof e.automargin=="string"&&(Ey(ke,e.automargin),Ey(te,e.automargin)),oo.autoMargin(t,Vh(e),ke),oo.autoMargin(t,pw(e),te),oo.autoMargin(t,mw(e),J)}),!r.skipTitle&&!(le&&e.side==="bottom")&&ne.push(function(){return LD(t,e)}),at.syncOrAsync(ne)}};function Ey(t,e){if(!!t){var r=Object.keys(Sy).reduce(function(a,i){return e.indexOf(i)!==-1&&Sy[i].forEach(function(n){a[n]=1}),a},{});Object.keys(t).forEach(function(a){r[a]||(a.length===1?t[a]=0:delete t[a])})}}function wD(t,e){var r=[],a,i=function(n,o){var l=n.xbnd[o];l!==null&&r.push(at.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 TD(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(Gh(t,at.interp(a[o],.5),o));return r}function kD(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(at.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 AD(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=Cd(this),l=Er.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}}Me.getTickSigns=function(t,e){var r=t._id.charAt(0),a={x:"top",y:"right"}[r],i=t.side===a?1:-1,n=[-1,1,i,-i],o=e?(t.minor||{}).ticks:t.ticks;return o!=="inside"==(r==="x")&&(n=n.map(function(l){return-l})),t.side&&n.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),n};Me.makeTransTickFn=function(t){return t._id.charAt(0)==="x"?function(e){return vo(t._offset+t.l2p(e.x),0)}:function(e){return vo(0,t._offset+t.l2p(e.x))}};Me.makeTransTickLabelFn=function(t){var e=MD(t),r=e[0],a=e[1];return t._id.charAt(0)==="x"?function(i){return vo(r+t._offset+t.l2p(Ld(i)),a)}:function(i){return vo(a,r+t._offset+t.l2p(Ld(i)))}};function Ld(t){return t.periodX!==void 0?t.periodX:t.x}function MD(t){var e=t.ticklabelposition||"",r=function(h){return e.indexOf(h)!==-1},a=r("top"),i=r("left"),n=r("right"),o=r("bottom"),l=r("inside"),s=o||i||a||n;if(!s&&!l)return[0,0];var f=t.side,c=s?(t.tickwidth||0)/2:0,v=Sd,u=t.tickfont?t.tickfont.size:12;return(o||a)&&(c+=u*Ji,v+=(t.linewidth||0)/2),(i||n)&&(c+=(t.linewidth||0)/2,v+=Sd),l&&f==="top"&&(v-=u*(1-Ji)),(i||a)&&(c=-c),(f==="bottom"||f==="right")&&(v=-v),[s?c:0,l?v:0]}Me.makeTickPath=function(t,e,r,a){a||(a={});var i=a.minor;if(i&&!t.minor)return"";var n=a.len!==void 0?a.len:i?t.minor.ticklen:t.ticklen,o=t._id.charAt(0),l=(t.linewidth||1)/2;return o==="x"?"M0,"+(e+l*r)+"v"+n*r:"M"+(e+l*r)+",0h"+n*r};Me.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,h=0,d=v?t.ticklen:0;if(c?d*=-1:f&&(d=0),v&&(u+=d,r)){var p=at.deg2rad(r);u=d*Math.cos(p)+1,h=d*Math.sin(p)}t.showticklabels&&(v||t.showline)&&(u+=.2*t.tickfont.size),u+=(t.linewidth||1)/2*(c?-1:1);var y={labelStandoff:u,labelShift:h},m,b,w,g,x=0,_=t.side,T=t._id.charAt(0),k=t.tickangle,S;if(T==="x")S=!c&&_==="bottom"||c&&_==="top",g=S?1:-1,c&&(g*=-1),m=h*g,b=e+u*g,w=S?1:-.2,Math.abs(k)===90&&(c?w+=Ls:k===-90&&_==="bottom"?w=Ji:k===90&&_==="top"?w=Ls:w=.5,x=Ls/2*(k/90)),y.xFn=function(M){return M.dx+m+x*M.fontSize},y.yFn=function(M){return M.dy+b+M.fontSize*w},y.anchorFn=function(M,C){if(f){if(o)return"end";if(l)return"start"}return!Gt(C)||C===0||C===180?"middle":C*g<0!==c?"end":"start"},y.heightFn=function(M,C,$){return C<-60||C>60?-.5*$:t.side==="top"!==c?-$:0};else if(T==="y"){if(S=!c&&_==="left"||c&&_==="right",g=S?1:-1,c&&(g*=-1),m=u,b=h*g,w=0,!c&&Math.abs(k)===90&&(k===-90&&_==="left"||k===90&&_==="right"?w=Ji:w=.5),c){var A=Gt(k)?+k:0;if(A!==0){var D=at.deg2rad(A);x=Math.abs(Math.sin(D))*Ji*g,w=0}}y.xFn=function(M){return M.dx+e-(m+M.fontSize*w)*g+x*M.fontSize},y.yFn=function(M){return M.dy+b+M.fontSize*Ls},y.anchorFn=function(M,C){return Gt(C)&&Math.abs(C)===90?"middle":S?"end":"start"},y.heightFn=function(M,C,$){return t.side==="right"&&(C*=-1),C<-30?-$:C<30?-.5*$:0}}return y};function Sc(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}Me.drawTicks=function(t,e,r){r=r||{};var a=e._id+"tick",i=[].concat(e.minor&&e.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(e.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),n=r.layer.selectAll("path."+a).data(i,Sc);n.exit().remove(),n.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return Sl.stroke(Wr.select(this),o.minor?e.minor.tickcolor:e.tickcolor)}).style("stroke-width",function(o){return Er.crispRound(t,o.minor?e.minor.tickwidth:e.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Lc(e,[sw]),n.attr("transform",r.transFn)};Me.drawGrid=function(t,e,r){r=r||{};var a=e._id+"grid",i=e.minor&&e.minor.showgrid,n=i?r.vals.filter(function(m){return m.minor}):[],o=e.showgrid?r.vals.filter(function(m){return!m.minor}):[],l=r.counterAxis;if(l&&Me.shouldShowZeroLine(t,e,l))for(var s=e.tickmode==="array",f=0;f<o.length;f++){var c=o[f].x;if(s?!c:Math.abs(c)<e.dtick/100)if(o=o.slice(0,f).concat(o.slice(f+1)),s)f--;else break}e._gw=Er.crispRound(t,e.gridwidth,1);for(var v=i?Er.crispRound(t,e.minor.gridwidth,1):0,u=r.layer,h=r.minorLayer,d=1;d>=0;d--){var p=d?u:h;if(!!p){var y=p.selectAll("path."+a).data(d?o:n,Sc);y.exit().remove(),y.enter().append("path").classed(a,1).classed("crisp",r.crisp!==!1),y.attr("transform",r.transFn).attr("d",r.path).each(function(m){return Sl.stroke(Wr.select(this),m.minor?e.minor.gridcolor:e.gridcolor||"#ddd")}).style("stroke-dasharray",function(m){return Er.dashStyle(m.minor?e.minor.griddash:e.griddash,m.minor?e.minor.gridwidth:e.gridwidth)}).style("stroke-width",function(m){return(m.minor?v:e._gw)+"px"}).style("display",null),typeof r.path=="function"&&y.attr("d",r.path)}}Lc(e,[Ad,Md])};Me.drawZeroLine=function(t,e,r){r=r||r;var a=e._id+"zl",i=Me.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 iD(o.id,l.id)})}),n.attr("transform",r.transFn).attr("d",r.path).call(Sl.stroke,e.zerolinecolor||Sl.defaultLine).style("stroke-width",Er.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),Lc(e,[kd])};Me.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,i=e._id,n=i.charAt(0),o=r.cls||i+"tick",l=r.vals.filter(function(g){return g.text}),s=r.labelFns,f=r.secondary?0:e.tickangle,c=(e._prevTickAngles||{})[o],v=r.layer.selectAll("g."+o).data(e.showticklabels?l:[],Sc),u=[];v.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(g){var x=Wr.select(this),_=t._promises.length;x.call(ul.positionText,s.xFn(g),s.yFn(g)).call(Er.font,g.font,g.fontSize,g.fontColor).text(g.text).call(ul.convertToTspans,t),t._promises[_]?u.push(t._promises.pop().then(function(){h(x,f)})):h(x,f)}),Lc(e,[My]),v.exit().remove(),r.repositionOnUpdate&&v.each(function(g){Wr.select(this).select("text").call(ul.positionText,s.xFn(g),s.yFn(g))});function h(g,x){g.each(function(_){var T=Wr.select(this),k=T.select(".text-math-group"),S=s.anchorFn(_,x),A=r.transFn.call(T.node(),_)+(Gt(x)&&+x!=0?" rotate("+x+","+s.xFn(_)+","+(s.yFn(_)-_.fontSize/2)+")":""),D=ul.lineCount(T),M=Ff*_.fontSize,C=s.heightFn(_,Gt(x)?+x:0,(D-1)*M);if(C&&(A+=vo(0,C)),k.empty()){var $=T.select("text");$.attr({transform:A,"text-anchor":S}),$.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var F=Er.bBox(k.node()).width,R=F*{end:-.5,start:.5}[S];k.attr("transform",A+vo(R,0))}})}e._adjustTickLabelsOverflow=function(){var g=e.ticklabeloverflow;if(!(!g||g==="allow")){var x=g.indexOf("hide")!==-1,_=e._id.charAt(0)==="x",T=0,k=_?t._fullLayout.width:t._fullLayout.height;if(g.indexOf("domain")!==-1){var S=at.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),D=Math.max(T,k),M=e.side,C=1/0,$=-1/0;v.each(function(E){var L=Wr.select(this),z=L.select(".text-math-group");if(z.empty()){var I=Er.bBox(L.node()),H=0;_?(I.right>D||I.left<A)&&(H=1):(I.bottom>D||I.top+(e.tickangle?0:E.fontSize/4)<A)&&(H=1);var U=L.select("text");H?x&&U.style("opacity",0):(U.style("opacity",1),M==="bottom"||M==="right"?C=Math.min(C,_?I.top:I.left):C=-1/0,M==="top"||M==="left"?$=Math.max($,_?I.bottom:I.right):$=1/0)}});for(var F in a._plots){var R=a._plots[F];if(!(e._id!==R.xaxis._id&&e._id!==R.yaxis._id)){var P=_?R.yaxis:R.xaxis;P&&(P["_visibleLabelMin_"+e._id]=C,P["_visibleLabelMax_"+e._id]=$)}}}},e._hideCounterAxisInsideTickLabels=function(g){var x=e._id.charAt(0)==="x",_=[];for(var T in a._plots){var k=a._plots[T];e._id!==k.xaxis._id&&e._id!==k.yaxis._id||_.push(x?k.yaxis:k.xaxis)}_.forEach(function(S,A){S&&Cl(S)&&(g||[kd,Md,Ad,sw,My]).forEach(function(D){var M=D.K==="tick"&&D.L==="text"&&e.ticklabelmode==="period",C=a._plots[e._mainSubplot],$;D.K===kd.K?$=C.zerolinelayer.selectAll("."+e._id+"zl"):D.K===Md.K?$=C.minorGridlayer.selectAll("."+e._id):D.K===Ad.K?$=C.gridlayer.selectAll("."+e._id):$=C[e._id.charAt(0)+"axislayer"],$.each(function(){var F=Wr.select(this);D.L&&(F=F.selectAll(D.L)),F.each(function(R){var P=e.l2p(M?Ld(R):R.x)+e._offset,E=Wr.select(this);P<e["_visibleLabelMax_"+S._id]&&P>e["_visibleLabelMin_"+S._id]?E.style("display","none"):D.K==="tick"&&!A&&E.style("display",null)})})})})},h(v,c+1?c:f);function d(){return u.length&&Promise.all(u)}var p=null;function y(){if(h(v,f),l.length&&n==="x"&&!Gt(f)&&(e.type!=="log"||String(e.dtick).charAt(0)!=="D")){p=0;var g=0,x=[],_;if(v.each(function(I){g=Math.max(g,I.fontSize);var H=e.l2p(I.x),U=Cd(this),O=Er.bBox(U.node());x.push({top:0,bottom:10,height:10,left:H-O.width/2,right:H+O.width/2+2,width:O.width+2})}),(e.tickson==="boundaries"||e.showdividers)&&!r.secondary){var T=2;for(e.ticks&&(T+=e.tickwidth/2),_=0;_<x.length;_++){var k=l[_].xbnd,S=x[_];if(k[0]!==null&&S.left-e.l2p(k[0])<T||k[1]!==null&&e.l2p(k[1])-S.right<T){p=90;break}}}else{var A=l.length,D=Math.abs((l[A-1].x-l[0].x)*e._m)/(A-1),M=e.ticklabelposition||"",C=function(I){return M.indexOf(I)!==-1},$=C("top"),F=C("left"),R=C("right"),P=C("bottom"),E=P||F||$||R,L=E?(e.tickwidth||0)+2*Sd:0,z=D<g*2.5||e.type==="multicategory"||e._name==="realaxis";for(_=0;_<x.length-1;_++)if(at.bBoxIntersect(x[_],x[_+1],L)){p=z?90:30;break}}p&&h(v,p)}}e._selections&&(e._selections[o]=v);var m=[d];e.automargin&&a._redrawFromAutoMarginCount&&c===90?(p=90,m.push(function(){h(v,c)})):m.push(y),e._tickAngles&&m.push(function(){e._tickAngles[o]=p===null?Gt(f)?f:0:p});var b=e._anchorAxis;b&&b.autorange&&Cl(e)&&!nD(a,e._id)&&(a._insideTickLabelsAutorange||(a._insideTickLabelsAutorange={}),a._insideTickLabelsAutorange[b._name+".autorange"]=b.autorange,m.push(function(){v.each(function(x,_){var T=Cd(this),k=T.select(".text-math-group");k.empty()&&(e._vals[_].bb=Er.bBox(T.node()))})}));var w=at.syncOrAsync(m);return w&&w.then&&t._promises.push(w),w};function SD(t,e,r){var a=e._id+"divider",i=r.vals,n=r.layer.selectAll("path."+a).data(i,Sc);n.exit().remove(),n.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(Sl.stroke,e.dividercolor).style("stroke-width",Er.crispRound(t,e.dividerwidth,1)+"px"),n.attr("transform",r.transFn).attr("d",r.path)}Me.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 dw(t){var e=t.title.font.size,r=(t.title.text.match(ul.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?r?e*(Ji+r*Ff):e*Ji:r?e*(r+1)*Ff:e}function LD(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+dw(e);else{var l=Cl(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=Me.getPxPosition(t,e),c,v,u;i==="x"?(v=e._offset+e._length/2,u=e.side==="top"?f-o:f+o):(u=e._offset+e._length/2,v=e.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var h;if(e.type!=="multicategory"){var d=e._selections[e._id+"tick"];if(h={selection:d,side:e.side},d&&d.node()&&d.node().parentNode){var p=Er.getTranslate(d.node().parentNode);h.offsetLeft=p.x,h.offsetTop=p.y}e.title.hasOwnProperty("standoff")&&(h.pad=0)}return KC.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:r._dfltTitle[i],avoid:h,transform:c,attributes:{x:v,y:u,"text-anchor":"middle"}})}Me.shouldShowZeroLine=function(t,e,r){var a=at.simpleMap(e.range,e.r2l);return a[0]*a[1]<=0&&e.zeroline&&(e.type==="linear"||e.type==="-")&&!(e.rangebreaks&&e.maskBreaks(0)===Ac)&&(hw(e,0)||!CD(t,e,r,a)||DD(t,e))};Me.clipEnds=function(t,e){return e.filter(function(r){return hw(t,r.x)})};function hw(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function CD(t,e,r,a){var i=r._mainAxis;if(!i)return;var n=t._fullLayout,o=e._id.charAt(0),l=Me.counterLetter(e._id),s=e._offset+(Math.abs(a[0])<Math.abs(a[1])==(o==="x")?0:e._length);function f(d){if(!d.showline||!d.linewidth)return!1;var p=Math.max((d.linewidth+e.zerolinewidth)/2,1);function y(w){return typeof w=="number"&&Math.abs(w-s)<p}if(y(d._mainLinePosition)||y(d._mainMirrorPosition))return!0;var m=d._linepositions||{};for(var b in m)if(y(m[b][0])||y(m[b][1]))return!0}var c=n._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return f(r);for(var v=Me.list(t,l),u=0;u<v.length;u++){var h=v[u];if(h._mainAxis===i&&f(h))return!0}}function DD(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&&(Ml.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 Cd(t){var e=Wr.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}Me.allowAutoMargin=function(t){for(var e=Me.list(t,"",!0),r=0;r<e.length;r++){var a=e[r];a.automargin&&(oo.allowAutoMargin(t,Vh(a)),a.mirror&&oo.allowAutoMargin(t,pw(a))),Ml.getComponentMethod("rangeslider","isVisible")(a)&&oo.allowAutoMargin(t,mw(a))}};function Vh(t){return t._id+".automargin"}function pw(t){return Vh(t)+".mirror"}function mw(t){return t._id+".rangeslider"}Me.swap=function(t,e){for(var r=$D(t,e),a=0;a<r.length;a++)PD(t,r[a].x,r[a].y)};function $D(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 PD(t,e,r){var a=[],i=[],n=t.layout,o,l;for(o=0;o<e.length;o++)a.push(Me.getFromId(t,e[o]));for(o=0;o<r.length;o++)i.push(Me.getFromId(t,r[o]));var s=Object.keys(QC),f=["anchor","domain","overlaying","position","side","tickangle","editType"],c=["linear","log"];for(o=0;o<s.length;o++){var v=s[o],u=a[0][v],h=i[0][v],d=!0,p=!1,y=!1;if(!(v.charAt(0)==="_"||typeof u=="function"||f.indexOf(v)!==-1)){for(l=1;l<a.length&&d;l++){var m=a[l][v];v==="type"&&c.indexOf(u)!==-1&&c.indexOf(m)!==-1&&u!==m?p=!0:m!==u&&(d=!1)}for(l=1;l<i.length&&d;l++){var b=i[l][v];v==="type"&&c.indexOf(h)!==-1&&c.indexOf(b)!==-1&&h!==b?y=!0:i[l][v]!==h&&(d=!1)}d&&(p&&(n[a[0]._name].type="linear"),y&&(n[i[0]._name].type="linear"),RD(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&&at.swapAttrs(n.annotations[o],["?"])}}function RD(t,e,r,a,i){var n=at.nestedProperty,o=n(t[r[0]._name],e).get(),l=n(t[a[0]._name],e).get(),s;for(e==="title"&&(o&&o.text===i.x&&(o.text=i.y),l&&l.text===i.y&&(l.text=i.x)),s=0;s<r.length;s++)n(t,r[s]._name+"."+e).set(l);for(s=0;s<a.length;s++)n(t,a[s]._name+"."+e).set(o)}function Xh(t){return t._id==="angularaxis"}function ku(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 Cl(t){return(t.ticklabelposition||"").indexOf("inside")!==-1}function Lc(t,e){Cl(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}var Wh={},ba={exports:{}},ED=function(e,r,a,i,n){var o=(e-a)/(i-a),l=o+r/(i-a),s=(o+l)/2;return n==="left"||n==="bottom"?o:n==="center"||n==="middle"?s:n==="right"||n==="top"?l:o<2/3-s?o:l>4/3-s?l:s},zy=ve.exports,zD=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]],ID=function(e,r,a,i){return a==="left"?e=0:a==="center"?e=1:a==="right"?e=2:e=zy.constrain(Math.floor(e*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=zy.constrain(Math.floor(r*3),0,2),zD[r][e]},yw={exports:{}},ND=ql,FD=gc,HD=wh.getGraphDiv,OD=uc,Dd=yw.exports={};Dd.wrapped=function(t,e,r){t=HD(t),t._fullLayout&&FD.clear(t._fullLayout._uid+OD.HOVERID),Dd.raw(t,e,r)};Dd.raw=function(e,r){var a=e._fullLayout,i=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&ND.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 BD=WA,Au=w1,jD=T1,GD=ve.exports.removeElement,UD=wr,rn=ba.exports={};rn.align=ED;rn.getCursor=ID;var gw=yw.exports;rn.unhover=gw.wrapped;rn.unhoverRaw=gw.raw;rn.init=function(e){var r=e.gd,a=1,i=r._context.doubleClickDelay,n=e.element,o,l,s,f,c,v,u,h;r._mouseDownTime||(r._mouseDownTime=0),n.style.pointerEvents="all",n.onmousedown=y,jD?(n._ontouchstart&&n.removeEventListener("touchstart",n._ontouchstart),n._ontouchstart=y,n.addEventListener("touchstart",y,{passive:!1})):n.ontouchstart=y;function d(w,g,x){return Math.abs(w)<x&&(w=0),Math.abs(g)<x&&(g=0),[w,g]}var p=e.clampFn||d;function y(w){r._dragged=!1,r._dragging=!0;var g=Mu(w);o=g[0],l=g[1],u=w.target,v=w,h=w.buttons===2||w.ctrlKey,typeof w.clientX>"u"&&typeof w.clientY>"u"&&(w.clientX=o,w.clientY=l),s=new Date().getTime(),s-r._mouseDownTime<i?a+=1:(a=1,r._mouseDownTime=s),e.prepFn&&e.prepFn(w,o,l),Au&&!h?(c=bw(),c.style.cursor=window.getComputedStyle(n).cursor):Au||(c=document,f=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(n).cursor),document.addEventListener("mouseup",b),document.addEventListener("touchend",b),e.dragmode!==!1&&(w.preventDefault(),document.addEventListener("mousemove",m),document.addEventListener("touchmove",m,{passive:!1}))}function m(w){w.preventDefault();var g=Mu(w),x=e.minDrag||UD.MINDRAG,_=p(g[0]-o,g[1]-l,x),T=_[0],k=_[1];(T||k)&&(r._dragged=!0,rn.unhover(r,w)),r._dragged&&e.moveFn&&!h&&(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",m),document.removeEventListener("touchmove",m)),document.removeEventListener("mouseup",b),document.removeEventListener("touchend",b),Au?GD(c):f&&(c.documentElement.style.cursor=f,f=null),!r._dragging){r._dragged=!1;return}if(r._dragging=!1,new Date().getTime()-r._mouseDownTime>i&&(a=Math.max(a-1,1)),r._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(a,v),!h){var g;try{g=new MouseEvent("click",w)}catch{var x=Mu(w);g=document.createEvent("MouseEvents"),g.initMouseEvent("click",w.bubbles,w.cancelable,w.view,w.detail,w.screenX,w.screenY,x[0],x[1],w.ctrlKey,w.altKey,w.shiftKey,w.metaKey,w.button,w.relatedTarget)}u.dispatchEvent(g)}r._dragging=!1,r._dragged=!1}};function bw(){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}rn.coverSlip=bw;function Mu(t){return BD(t.changedTouches?t.changedTouches[0]:t,document.body)}var Cc={},wi=function(e,r){(e.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&e.classed(a,!1)}),r&&e.classed("cursor-"+r,!0)},Su=wi,Uo="data-savedcursor",Iy="!!",VD=function(e,r){var a=e.attr(Uo);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(Uo,o.substr(7)).classed(o,!1)}e.attr(Uo)||e.attr(Uo,Iy)}Su(e,r)}else a&&(e.attr(Uo,null),a===Iy?Su(e):Su(e,a))},Lu=dr,XD=hr,xw={bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:XD.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:Lu({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:Lu({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},entrywidth:{valType:"number",min:0,editType:"legend",description:["Sets the width (in px or fraction) of the legend.","Use 0 to size the entry based on the text width,","when `entrywidthmode` is set to *pixels*."].join(" ")},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend",description:"Determines what entrywidth means."},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",min:-2,max:3,editType:"legend",description:["Sets the x position (in normalized coordinates) of the legend.","Defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"legend",description:["Sets the y position (in normalized coordinates) of the legend.","Defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:Lu({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"},$o={};$o.isGrouped=function(e){return(e.traceorder||"").indexOf("grouped")!==-1};$o.isVertical=function(e){return e.orientation!=="h"};$o.isReversed=function(e){return(e.traceorder||"").indexOf("reversed")!==-1};var Cu=Ze,aa=ve.exports,WD=At,YD=Ca,qD=xw,ZD=Yl,Du=$o,_w=function(e,r,a){var i=e.legend||{},n=WD.newContainer(r,"legend");function o(k,S){return aa.coerce(i,n,qD,k,S)}for(var l,s=function(k,S){var A=l._input,D=l;return aa.coerce(A,D,YD,k,S)},f=r.font||{},c=aa.coerceFont(o,"grouptitlefont",aa.extendFlat({},f,{size:Math.round(f.size*1.1)})),v=0,u=!1,h="normal",d=0;d<a.length;d++)l=a[d],l.visible&&((l.showlegend||l._dfltShowLegend&&!(l._module&&l._module.attributes&&l._module.attributes.showlegend&&l._module.attributes.showlegend.dflt===!1))&&(v++,l.showlegend&&(u=!0,(Cu.traceIs(l,"pie-like")||l._input.showlegend===!0)&&v++),aa.coerceFont(s,"legendgrouptitle.font",c)),(Cu.traceIs(l,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(l.fill)!==-1)&&(h=Du.isGrouped({traceorder:h})?"grouped+reversed":"reversed"),l.legendgroup!==void 0&&l.legendgroup!==""&&(h=Du.isReversed({traceorder:h})?"reversed+grouped":"grouped"));var p=aa.coerce(e,r,ZD,"showlegend",u&&v>1);if(p===!1&&(r.legend=void 0),!(p===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),p!==!1)){o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth");var y=aa.coerceFont(o,"font",r.font),m=o("orientation"),b=m==="h",w,g,x;b?(w=0,Cu.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(g=1.1,x="bottom"):(g=-.1,x="top")):(w=1.02,g=1,x="auto"),o("traceorder",h),Du.isGrouped(r.legend)&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("x",w),o("xanchor"),o("y",g),o("yanchor",x),o("valign"),aa.noneOrAll(i,n,["x","y"]);var _=o("title.text");if(_){o("title.side",b?"left":"top");var T=aa.extendFlat({},y,{size:aa.bigFont(y.size)});aa.coerceFont(o,"title.font",T)}}},$u=ve.exports,Di=Ze,Pu=!0,KD=function(e,r,a){var i=r._fullLayout;if(r._dragged||r._editing)return;var n=i.legend.itemclick,o=i.legend.itemdoubleclick,l=i.legend.groupclick;a===1&&n==="toggle"&&o==="toggleothers"&&Pu&&r.data&&r._context.showTips&&$u.notifier($u._(r,"Double-click on legend to isolate one trace"),"long"),Pu=!1;var s;if(a===1?s=n:a===2&&(s=o),!s)return;var f=l==="togglegroup",c=i.hiddenlabels?i.hiddenlabels.slice():[],v=e.data()[0][0];if(v.groupTitle&&v.noClick)return;var u=r._fullData,h=v.trace,d=h.legendgroup,p,y,m,b,w,g,x={},_=[],T=[],k=[];function S(O,X,B){var Y=_.indexOf(O),Z=x[X];return Z||(Z=x[X]=[]),_.indexOf(O)===-1&&(_.push(O),Y=_.length-1),Z[Y]=B,Y}function A(O,X){if(!(v.groupTitle&&!f)){var B=O._fullInput;if(Di.hasTransform(B,"groupby")){var Y=T[B.index];if(!Y){var Z=Di.getTransformIndices(B,"groupby"),q=Z[Z.length-1];Y=$u.keyedContainer(B,"transforms["+q+"].styles","target","value.visible"),T[B.index]=Y}var W=Y.get(O._group);W===void 0&&(W=!0),W!==!1&&Y.set(O._group,X),k[B.index]=S(B.index,"visible",B.visible!==!1)}else{var ae=B.visible===!1?!1:X;S(B.index,"visible",ae)}}}if(Di.traceIs(h,"pie-like")){var D=v.label,M=c.indexOf(D);s==="toggle"?M===-1?c.push(D):c.splice(M,1):s==="toggleothers"&&(c=[],r.calcdata[0].forEach(function(O){D!==O.label&&c.push(O.label)}),r._fullLayout.hiddenlabels&&r._fullLayout.hiddenlabels.length===c.length&&M===-1&&(c=[])),Di.call("_guiRelayout",r,"hiddenlabels",c)}else{var C=d&&d.length,$=[],F;if(C)for(p=0;p<u.length;p++)F=u[p],!!F.visible&&F.legendgroup===d&&$.push(p);if(s==="toggle"){var R;switch(h.visible){case!0:R="legendonly";break;case!1:R=!1;break;case"legendonly":R=!0;break}if(C)if(f)for(p=0;p<u.length;p++)u[p].visible!==!1&&u[p].legendgroup===d&&A(u[p],R);else A(h,R);else A(h,R)}else if(s==="toggleothers"){var P,E,L,z,I=!0;for(p=0;p<u.length;p++)if(P=u[p]===h,L=u[p].showlegend!==!0,!(P||L)&&(E=C&&u[p].legendgroup===d,!E&&u[p].visible===!0&&!Di.traceIs(u[p],"notLegendIsolatable"))){I=!1;break}for(p=0;p<u.length;p++)if(u[p].visible!==!1&&!Di.traceIs(u[p],"notLegendIsolatable"))switch(h.visible){case"legendonly":A(u[p],!0);break;case!0:z=I?!0:"legendonly",P=u[p]===h,L=u[p].showlegend!==!0&&!u[p].legendgroup,E=P||C&&u[p].legendgroup===d,A(u[p],E||L?!0:z);break}}for(p=0;p<T.length;p++)if(m=T[p],!!m){var H=m.constructUpdate(),U=Object.keys(H);for(y=0;y<U.length;y++)b=U[y],g=x[b]=x[b]||[],g[k[p]]=H[b]}for(w=Object.keys(x),p=0;p<w.length;p++)for(b=w[p],y=0;y<_.length;y++)x[b].hasOwnProperty(y)||(x[b][y]=void 0);Di.call("_guiRestyle",r,x,_)}},ww={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5},Ny=Ze,Ru=$o,QD=function(e,r){var a=r._inHover,i=Ru.isGrouped(r),n=Ru.isReversed(r),o={},l=[],s=!1,f={},c=0,v=0,u,h;function d(F,R){if(F===""||!Ru.isGrouped(r)){var P="~~i"+c;l.push(P),o[P]=[R],c++}else l.indexOf(F)===-1?(l.push(F),s=!0,o[F]=[R]):o[F].push(R)}for(u=0;u<e.length;u++){var p=e[u],y=p[0],m=y.trace,b=m.legendgroup;if(!(!a&&(!m.visible||!m.showlegend)))if(Ny.traceIs(m,"pie-like"))for(f[b]||(f[b]={}),h=0;h<p.length;h++){var w=p[h].label;f[b][w]||(d(b,{label:w,color:p[h].color,i:p[h].i,trace:m,pts:p[h].pts}),f[b][w]=!0,v=Math.max(v,(w||"").length))}else d(b,y),v=Math.max(v,(m.name||"").length)}if(!l.length)return[];var g=!s||!i,x=[];for(u=0;u<l.length;u++){var _=o[l[u]];g?x.push(_[0]):x.push(_)}for(g&&(x=[x]),u=0;u<x.length;u++){var T=1/0;for(h=0;h<x[u].length;h++){var k=x[u][h].trace.legendrank;T>k&&(T=k)}x[u][0]._groupMinRank=T,x[u][0]._preGroupSort=u}var S=function(F,R){return F[0]._groupMinRank-R[0]._groupMinRank||F[0]._preGroupSort-R[0]._preGroupSort},A=function(F,R){return F.trace.legendrank-R.trace.legendrank||F._preSort-R._preSort};for(x.forEach(function(F,R){F[0]._preGroupSort=R}),x.sort(S),u=0;u<x.length;u++){x[u].forEach(function(F,R){F._preSort=R}),x[u].sort(A);var D=x[u][0].trace,M=null;for(h=0;h<x[u].length;h++){var C=x[u][h].trace.legendgrouptitle;if(C&&C.text){M=C,a&&(C.font=r._groupTitleFont);break}}if(n&&x[u].reverse(),M){var $=!1;for(h=0;h<x[u].length;h++)if(Ny.traceIs(x[u][h].trace,"pie-like")){$=!0;break}x[u].unshift({i:-1,groupTitle:M,noClick:$,trace:{showlegend:D.showlegend,legendgroup:D.legendgroup,visible:r.groupclick==="toggleitem"?!0:D.visible}})}for(h=0;h<x[u].length;h++)x[u][h]=[x[u][h]]}return r._lgroupsLength=x.length,r._maxNameLength=v,x},hn={};(function(t){var e=ve.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}})(hn);var Eu=rt.exports,Fy=hn.castOption,Yh=function(e,r,a){var i=a.marker.line,n=Fy(i.color,r.pts)||Eu.defaultLine,o=Fy(i.width,r.pts)||0;e.style("stroke-width",o).call(Eu.fill,r.color).call(Eu.stroke,n)},fr=nt.exports,zu=Ze,sr=ve.exports,Hy=sr.strTranslate,br=_t.exports,Br=rt.exports,Iu=ga.extractOpts,Of=pr,JD=Yh,e5=hn.castOption,t5=ww,Oy=12,By=5,$i=2,r5=10,Sn=5,Tw=function(e,r,a){var i=r._fullLayout;a||(a=i.legend);var n=a.itemsizing==="constant",o=a.itemwidth,l=(o+t5.itemGap*2)/2,s=Hy(l,0),f=function(T,k,S,A){var D;if(T+1)D=T;else if(k&&k.width>0)D=k.width;else return 0;return n?A:Math.min(D,S)};e.each(function(T){var k=fr.select(this),S=sr.ensureSingle(k,"g","layers");S.style("opacity",T[0].trace.opacity);var A=a.valign,D=T[0].lineHeight,M=T[0].height;if(A==="middle"||!D||!M)S.attr("transform",null);else{var C={top:1,bottom:-1}[A],$=C*(.5*(D-M+3));S.attr("transform",Hy(0,$))}var F=S.selectAll("g.legendfill").data([T]);F.enter().append("g").classed("legendfill",!0);var R=S.selectAll("g.legendlines").data([T]);R.enter().append("g").classed("legendlines",!0);var P=S.selectAll("g.legendsymbols").data([T]);P.enter().append("g").classed("legendsymbols",!0),P.selectAll("g.legendpoints").data([T]).enter().append("g").classed("legendpoints",!0)}).each(_).each(u).each(d).each(h).each(y).each(g).each(w).each(c).each(v).each(m).each(b);function c(T){var k=jy(T),S=k.showFill,A=k.showLine,D=k.showGradientLine,M=k.showGradientFill,C=k.anyFill,$=k.anyLine,F=T[0],R=F.trace,P,E,L=Iu(R),z=L.colorscale,I=L.reversescale,H=function(q){if(q.size())if(S)br.fillGroupStyle(q,r);else{var W="legendfill-"+R.uid;br.gradient(q,r,W,Nu(I),z,"fill")}},U=function(q){if(q.size()){var W="legendline-"+R.uid;br.lineGroupStyle(q),br.gradient(q,r,W,Nu(I),z,"stroke")}},O=Of.hasMarkers(R)||!C?"M5,0":$?"M5,-2":"M5,-3",X=fr.select(this),B=X.select(".legendfill").selectAll("path").data(S||M?[T]:[]);if(B.enter().append("path").classed("js-fill",!0),B.exit().remove(),B.attr("d",O+"h"+o+"v6h-"+o+"z").call(H),A||D){var Y=f(void 0,R.line,r5,By);E=sr.minExtend(R,{line:{width:Y}}),P=[sr.minExtend(F,{trace:E})]}var Z=X.select(".legendlines").selectAll("path").data(A||D?[P]:[]);Z.enter().append("path").classed("js-line",!0),Z.exit().remove(),Z.attr("d",O+(D?"l"+o+",0.0001":"h"+o)).call(A?br.lineGroupStyle:U)}function v(T){var k=jy(T),S=k.anyFill,A=k.anyLine,D=k.showLine,M=k.showMarker,C=T[0],$=C.trace,F=!M&&!A&&!S&&Of.hasText($),R,P;function E(B,Y,Z,q){var W=sr.nestedProperty($,B).get(),ae=sr.isArrayOrTypedArray(W)&&Y?Y(W):W;if(n&&ae&&q!==void 0&&(ae=q),Z){if(ae<Z[0])return Z[0];if(ae>Z[1])return Z[1]}return ae}function L(B){return C._distinct&&C.index&&B[C.index]?B[C.index]:B[0]}if(M||F||D){var z={},I={};if(M){z.mc=E("marker.color",L),z.mx=E("marker.symbol",L),z.mo=E("marker.opacity",sr.mean,[.2,1]),z.mlc=E("marker.line.color",L),z.mlw=E("marker.line.width",sr.mean,[0,5],$i),I.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var H=E("marker.size",sr.mean,[2,16],Oy);z.ms=H,I.marker.size=H}D&&(I.line={width:E("line.width",L,[0,10],By)}),F&&(z.tx="Aa",z.tp=E("textposition",L),z.ts=10,z.tc=E("textfont.color",L),z.tf=E("textfont.family",L)),R=[sr.minExtend(C,z)],P=sr.minExtend($,I),P.selectedpoints=null,P.texttemplate=null}var U=fr.select(this).select("g.legendpoints"),O=U.selectAll("path.scatterpts").data(M?R:[]);O.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),O.exit().remove(),O.call(br.pointStyle,P,r),M&&(R[0].mrc=3);var X=U.selectAll("g.pointtext").data(F?R:[]);X.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),X.exit().remove(),X.selectAll("text").call(br.textPointStyle,P,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 D=[];k.visible&&S&&(D=T[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var M=fr.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(D);M.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),M.exit().remove(),M.each(function(C){var $=fr.select(this),F=k[C[0]].marker,R=f(void 0,F.line,Sn,$i);$.attr("d",C[1]).style("stroke-width",R+"px").call(Br.fill,F.color),R&&$.call(Br.stroke,F.line.color)})}function h(T){p(T,this)}function d(T){p(T,this,"funnel")}function p(T,k,S){var A=T[0].trace,D=A.marker||{},M=D.line||{},C=S?A.visible&&A.type===S:zu.traceIs(A,"bar"),$=fr.select(k).select("g.legendpoints").selectAll("path.legend"+S).data(C?[T]:[]);$.enter().append("path").classed("legend"+S,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),$.exit().remove(),$.each(function(F){var R=fr.select(this),P=F[0],E=f(P.mlw,D.line,Sn,$i);R.style("stroke-width",E+"px");var L=P.mcc;if(!a._inHover&&"mc"in P){var z=Iu(D),I=z.mid;I===void 0&&(I=(z.max+z.min)/2),L=br.tryColorscale(D,"")(I)}var H=L||P.mc||D.color,U=D.pattern,O=U&&br.getPatternAttr(U.shape,0,"");if(O){var X=br.getPatternAttr(U.bgcolor,0,null),B=br.getPatternAttr(U.fgcolor,0,null),Y=U.fgopacity,Z=Gy(U.size,8,10),q=Gy(U.solidity,.5,1),W="legend-"+A.uid;R.call(br.pattern,"legend",r,W,O,Z,q,L,U.fillmode,X,B,Y)}else R.call(Br.fill,H);E&&Br.stroke(R,P.mlc||M.color)})}function y(T){var k=T[0].trace,S=fr.select(this).select("g.legendpoints").selectAll("path.legendbox").data(k.visible&&zu.traceIs(k,"box-violin")?[T]:[]);S.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),S.exit().remove(),S.each(function(){var A=fr.select(this);if((k.boxpoints==="all"||k.points==="all")&&Br.opacity(k.fillcolor)===0&&Br.opacity((k.line||{}).color)===0){var D=sr.minExtend(k,{marker:{size:n?Oy:sr.constrain(k.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});S.call(br.pointStyle,D,r)}else{var M=f(void 0,k.line,Sn,$i);A.style("stroke-width",M+"px").call(Br.fill,k.fillcolor),M&&Br.stroke(A,k.line.color)}})}function m(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,D){return D?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(A,D){var M=fr.select(this),C=k[D?"increasing":"decreasing"],$=f(void 0,C.line,Sn,$i);M.style("stroke-width",$+"px").call(Br.fill,C.fillcolor),$&&Br.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,D){return D?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(A,D){var M=fr.select(this),C=k[D?"increasing":"decreasing"],$=f(void 0,C.line,Sn,$i);M.style("fill","none").call(br.dashLine,C.line.dash,$),$&&Br.stroke(M,C.line.color)})}function w(T){x(T,this,"pie")}function g(T){x(T,this,"funnelarea")}function x(T,k,S){var A=T[0],D=A.trace,M=S?D.visible&&D.type===S:zu.traceIs(D,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 $=(D.marker||{}).line,F=f(e5($.width,A.pts),$,Sn,$i),R=sr.minExtend(D,{marker:{line:{width:F}}});R.marker.line.color=$.color;var P=sr.minExtend(A,{trace:R});JD(C,P,R)}}function _(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 D=fr.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(A);D.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),D.exit().remove(),D.each(function(M,C){var $=fr.select(this),F=Iu(k),R=F.colorscale,P=F.reversescale,E=function(H){if(H.size()){var U="legendfill-"+k.uid;br.gradient(H,r,U,Nu(P,S==="radial"),R,"fill")}},L;if(R){if(!S){var I=R.length;L=C===0?R[P?I-1:0][1]:C===1?R[P?0:I-1][1]:R[Math.floor((I-1)/2)][1]}}else{var z=k.vertexcolor||k.facecolor||k.color;L=sr.isArrayOrTypedArray(z)?z[C]||z[0]:z}$.attr("d",M[0]),L?$.call(Br.fill,L):$.call(E)})}};function Nu(t,e){var r=e?"radial":"horizontal";return r+(t?"":"reversed")}function jy(t){var e=t[0].trace,r=e.contours,a=Of.hasLines(e),i=Of.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 Gy(t,e,r){return t&&sr.isArrayOrTypedArray(t)?e:t>r?r:t}var Pr=nt.exports,Bt=ve.exports,$d=Ut.exports,Gi=Ze,Uy=ql,Fu=ba.exports,Zt=_t.exports,yf=rt.exports,lo=nr,Vy=KD,ir=ww,qh=Dr,a5=qh.LINE_SPACING,Bf=qh.FROM_TL,Xy=qh.FROM_BR,Wy=QD,i5=Tw,Yy=$o,Wn=1,kw=function(e,r){return r||(r=e._fullLayout.legend||{}),n5(e,r)};function n5(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=Wy(e.entries,e)}else{if(!t.calcdata)return;o=r.showlegend&&Wy(t.calcdata,e)}var l=r.hiddenlabels||[];if(!n&&(!r.showlegend||!o.length))return i.selectAll(".legend").remove(),r._topdefs.select("#"+a).remove(),$d.autoMargin(t,"legend");var s=Bt.ensureSingle(i,"g","legend",function(m){n||m.attr("pointer-events","all")}),f=Bt.ensureSingleById(r._topdefs,"clipPath",a,function(m){m.append("rect")}),c=Bt.ensureSingle(s,"rect","bg",function(m){m.attr("shape-rendering","crispEdges")});c.call(yf.stroke,e.bordercolor).call(yf.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px");var v=Bt.ensureSingle(s,"g","scrollbox"),u=e.title;if(e._titleWidth=0,e._titleHeight=0,u.text){var h=Bt.ensureSingle(v,"text","legendtitletext");h.attr("text-anchor","start").call(Zt.font,u.font).text(u.text),gf(h,v,t,e,Wn)}else v.selectAll(".legendtitletext").remove();var d=Bt.ensureSingle(s,"rect","scrollbar",function(m){m.attr(ir.scrollBarEnterAttrs).call(yf.fill,ir.scrollBarColor)}),p=v.selectAll("g.groups").data(o);p.enter().append("g").attr("class","groups"),p.exit().remove();var y=p.selectAll("g.traces").data(Bt.identity);y.enter().append("g").attr("class","traces"),y.exit().remove(),y.style("opacity",function(m){var b=m[0].trace;return Gi.traceIs(b,"pie-like")?l.indexOf(m[0].label)!==-1?.5:1:b.visible==="legendonly"?.5:1}).each(function(){Pr.select(this).call(o5,t,e)}).call(i5,t,e).each(function(){n||Pr.select(this).call(l5,t)}),Bt.syncOrAsync([$d.previousPromises,function(){return c5(t,p,y,e)},function(){var m=r._size,b=e.borderwidth;if(!n){var w=u5(t);if(w)return;var g=m.l+m.w*e.x-Bf[Zh(e)]*e._width,x=m.t+m.h*(1-e.y)-Bf[Kh(e)]*e._effHeight;if(r.margin.autoexpand){var _=g,T=x;g=Bt.constrain(g,0,r.width-e._width),x=Bt.constrain(x,0,r.height-e._effHeight),g!==_&&Bt.log("Constrain legend.x to make legend fit inside graph"),x!==T&&Bt.log("Constrain legend.y to make legend fit inside graph")}Zt.setTranslate(s,g,x)}if(d.on(".drag",null),s.on("wheel",null),n||e._height<=e._maxHeight||t._context.staticPlot){var k=e._effHeight;n&&(k=e._height),c.attr({width:e._width-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(d,0,0,0,0),delete e._scrollY}else{var S=Math.max(ir.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),A=e._effHeight-S-2*ir.scrollBarMargin,D=e._height-e._effHeight,M=A/D,C=Math.min(e._scrollY||0,D);c.attr({width:e._width-2*b+ir.scrollBarWidth+ir.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),f.select("rect").attr({width:e._width-2*b+ir.scrollBarWidth+ir.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+C}),Zt.setClipUrl(v,a,t),I(C,S,M),s.on("wheel",function(){C=Bt.constrain(e._scrollY+Pr.event.deltaY/A*D,0,D),I(C,S,M),C!==0&&C!==D&&Pr.event.preventDefault()});var $,F,R,P=function(B,Y,Z){var q=(Z-Y)/M+B;return Bt.constrain(q,0,D)},E=function(B,Y,Z){var q=(Y-Z)/M+B;return Bt.constrain(q,0,D)},L=Pr.behavior.drag().on("dragstart",function(){var B=Pr.event.sourceEvent;B.type==="touchstart"?$=B.changedTouches[0].clientY:$=B.clientY,R=C}).on("drag",function(){var B=Pr.event.sourceEvent;B.buttons===2||B.ctrlKey||(B.type==="touchmove"?F=B.changedTouches[0].clientY:F=B.clientY,C=P(R,$,F),I(C,S,M))});d.call(L);var z=Pr.behavior.drag().on("dragstart",function(){var B=Pr.event.sourceEvent;B.type==="touchstart"&&($=B.changedTouches[0].clientY,R=C)}).on("drag",function(){var B=Pr.event.sourceEvent;B.type==="touchmove"&&(F=B.changedTouches[0].clientY,C=E(R,$,F),I(C,S,M))});v.call(z)}function I(B,Y,Z){e._scrollY=t._fullLayout.legend._scrollY=B,Zt.setTranslate(v,0,-B),Zt.setRect(d,e._width,ir.scrollBarMargin+B*Z,ir.scrollBarWidth,Y),f.select("rect").attr("y",b+B)}if(t._context.edits.legendPosition){var H,U,O,X;s.classed("cursor-move",!0),Fu.init({element:s.node(),gd:t,prepFn:function(){var B=Zt.getTranslate(s);O=B.x,X=B.y},moveFn:function(B,Y){var Z=O+B,q=X+Y;Zt.setTranslate(s,Z,q),H=Fu.align(Z,0,m.l,m.l+m.w,e.xanchor),U=Fu.align(q,0,m.t+m.h,m.t,e.yanchor)},doneFn:function(){H!==void 0&&U!==void 0&&Gi.call("_guiRelayout",t,{"legend.x":H,"legend.y":U})},clickFn:function(B,Y){var Z=i.selectAll("g.traces").filter(function(){var q=this.getBoundingClientRect();return Y.clientX>=q.left&&Y.clientX<=q.right&&Y.clientY>=q.top&&Y.clientY<=q.bottom});Z.size()>0&&Aw(t,s,Z,B,Y)}})}}],t)}}function $s(t,e,r){var a=t[0],i=a.width,n=e.entrywidthmode,o=a.trace.legendwidth||e.entrywidth;return n==="fraction"?e._maxWidth*o:r+(o||i)}function Aw(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),Gi.traceIs(n,"pie-like")&&(o.label=r.datum()[0].label);var l=Uy.triggerHandler(t,"plotly_legendclick",o);if(l!==!1){if(a===1)e._clickTimeout=setTimeout(function(){!t._fullLayout||Vy(r,t,a)},t._context.doubleClickDelay);else if(a===2){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0;var s=Uy.triggerHandler(t,"plotly_legenddoubleclick",o);s!==!1&&Vy(r,t,a)}}}function o5(t,e,r){var a=t.data()[0][0],i=a.trace,n=Gi.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=Bt.templateString(s,i._meta))));var c=Bt.ensureSingle(t,"text","legendtext");c.attr("text-anchor","start").call(Zt.font,f).text(o?qy(s,l):s);var v=r.itemwidth+ir.itemGap*2;lo.positionText(c,v,0),o?c.call(lo.makeEditable,{gd:e,text:s}).call(gf,t,e,r).on("edit",function(u){this.text(qy(u,l)).call(gf,t,e,r);var h=a.trace._fullInput||{},d={};if(Gi.hasTransform(h,"groupby")){var p=Gi.getTransformIndices(h,"groupby"),y=p[p.length-1],m=Bt.keyedContainer(h,"transforms["+y+"].styles","target","value.name");m.set(a.trace._group,u),d=m.constructUpdate()}else d.name=u;return Gi.call("_guiRestyle",e,d,i.index)}):gf(c,t,e,r)}function qy(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 l5(t,e){var r=e._context.doubleClickDelay,a,i=1,n=Bt.ensureSingle(t,"rect","legendtoggle",function(o){e._context.staticPlot||o.style("cursor","pointer").attr("pointer-events","all"),o.call(yf.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)),Aw(e,o,t,i,Pr.event)}}))}function gf(t,e,r,a,i){a._inHover&&t.attr("data-notex",!0),lo.convertToTspans(t,r,function(){s5(e,r,a,i)})}function s5(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===Wn?s=r.title.font:i.groupTitle?s=i.groupTitle.font:s=r.font;var f=s.size*a5,c,v;if(o){var u=Zt.bBox(o);c=u.height,v=u.width,a===Wn?Zt.setTranslate(n,l,l+c*.75):Zt.setTranslate(n,0,c*.25)}else{var h=t.select(a===Wn?".legendtitletext":".legendtext"),d=lo.lineCount(h),p=h.node();if(c=f*d,v=p?Zt.bBox(p).width:0,a===Wn)r.title.side==="left"&&(v+=ir.itemGap*2),lo.positionText(h,l+ir.titlePad,l+f);else{var y=ir.itemGap*2+r.itemwidth;i.groupTitle&&(y=ir.itemGap,v-=r.itemwidth),lo.positionText(h,y,-f*((d-1)/2-.3))}}a===Wn?(r._titleWidth=v,r._titleHeight=c):(i.lineHeight=f,i.height=Math.max(c,16)+3,i.width=v)}function f5(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 c5(t,e,r,a){var i=t._fullLayout;a||(a=i.legend);var n=i._size,o=Yy.isVertical(a),l=Yy.isGrouped(a),s=a.entrywidthmode==="fraction",f=a.borderwidth,c=2*f,v=ir.itemGap,u=a.itemwidth+v*2,h=2*(f+v),d=Kh(a),p=a.y<0||a.y===0&&d==="top",y=a.y>1||a.y===1&&d==="bottom",m=a.tracegroupgap,b={};a._maxHeight=Math.max(p||y?i.height/2:n.h,30);var w=0;a._width=0,a._height=0;var g=f5(a);if(o)r.each(function(O){var X=O[0].height;Zt.setTranslate(this,f+g[0],f+g[1]+a._height+X/2+v),a._height+=X,a._width=Math.max(a._width,O[0].width)}),w=u+a._width,a._width+=v+u+c,a._height+=h,l&&(e.each(function(O,X){Zt.setTranslate(this,0,X*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var x=Zh(a),_=a.x<0||a.x===0&&x==="right",T=a.x>1||a.x===1&&x==="left",k=y||p,S=i.width/2;a._maxWidth=Math.max(_?k&&x==="left"?n.l+n.w:S:T?k&&x==="right"?n.r+n.w:S:n.w,2*u);var A=0,D=0;r.each(function(O){var X=$s(O,a,u);A=Math.max(A,X),D+=X}),w=null;var M=0;if(l){var C=0,$=0,F=0;e.each(function(){var O=0,X=0;Pr.select(this).selectAll("g.traces").each(function(Y){var Z=$s(Y,a,u),q=Y[0].height;Zt.setTranslate(this,g[0],g[1]+f+v+q/2+X),X+=q,O=Math.max(O,Z),b[Y[0].trace.legendgroup]=O});var B=O+v;$>0&&B+f+$>a._maxWidth?(M=Math.max(M,$),$=0,F+=C+m,C=X):C=Math.max(C,X),Zt.setTranslate(this,$,F),$+=B}),a._width=Math.max(M,$)+f,a._height=F+C+h}else{var R=r.size(),P=D+c+(R-1)*v<a._maxWidth,E=0,L=0,z=0,I=0;r.each(function(O){var X=O[0].height,B=$s(O,a,u),Y=P?B:A;s||(Y+=v),Y+f+L-v>=a._maxWidth&&(M=Math.max(M,I),L=0,z+=E,a._height+=E,E=0),Zt.setTranslate(this,g[0]+f+L,g[1]+f+z+X/2+v),I=L+B+v,L+=Y,E=Math.max(E,X)}),P?(a._width=L+c,a._height=E+h):(a._width=Math.max(M,I)+c,a._height+=E+h)}}a._width=Math.ceil(Math.max(a._width+g[0],a._titleWidth+2*(f+ir.titlePad))),a._height=Math.ceil(Math.max(a._height+g[1],a._titleHeight+2*(f+ir.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var H=t._context.edits,U=H.legendText||H.legendPosition;r.each(function(O){var X=Pr.select(this).select(".legendtoggle"),B=O[0].height,Y=O[0].trace.legendgroup,Z=$s(O,a,u);l&&Y!==""&&(Z=b[Y]);var q=U?u:w||Z;!o&&!s&&(q+=v/2),Zt.setRect(X,0,-B/2,q,B)})}function u5(t){var e=t._fullLayout,r=e.legend,a=Zh(r),i=Kh(r);return $d.autoMargin(t,"legend",{x:r.x,y:r.y,l:r._width*Bf[a],r:r._width*Xy[a],b:r._effHeight*Xy[i],t:r._effHeight*Bf[i]})}function Zh(t){return Bt.isRightAnchor(t)?"right":Bt.isCenterAnchor(t)?"center":"left"}function Kh(t){return Bt.isBottomAnchor(t)?"bottom":Bt.isMiddleAnchor(t)?"middle":"top"}var Ui=nt.exports,Ha=ct,Zy=Jr.exports,jt=ve.exports,Hu=jt.strTranslate,v5=jt.strRotate,d5=ql,Gr=nr,h5=VD,Sa=_t.exports,Qt=rt.exports,Ps=ba.exports,li=Mt.exports,po=Ze,oa=ea,an=uc,p5=_w,m5=kw,Mw=an.YANGLE,Qh=Math.PI*Mw/180,y5=1/Math.sin(Qh),g5=Math.cos(Qh),b5=Math.sin(Qh),$t=an.HOVERARROWSIZE,mt=an.HOVERTEXTPAD,Ky={box:!0,ohlc:!0,violin:!0,candlestick:!0},x5={scatter:!0,scattergl:!0,splom:!0};Cc.hover=function(e,r,a,i){e=jt.getGraphDiv(e);var n=r.target;jt.throttle(e._fullLayout._uid+an.HOVERID,an.HOVERMINTIME,function(){_5(e,r,a,i,n)})};Cc.loneHover=function(e,r){var a=!0;Array.isArray(e)||(a=!1,e=[e]);var i=r.gd,n=Dw(i),o=$w(i),l=e.map(function(p){var y=p._x0||p.x0||p.x||0,m=p._x1||p.x1||p.x||0,b=p._y0||p.y0||p.y||0,w=p._y1||p.y1||p.y||0,g=p.eventData;if(g){var x=Math.min(y,m),_=Math.max(y,m),T=Math.min(b,w),k=Math.max(b,w),S=p.trace;if(po.traceIs(S,"gl3d")){var A=i._fullLayout[S.scene]._scene.container,D=A.offsetLeft,M=A.offsetTop;x+=D,_+=D,T+=M,k+=M}g.bbox={x0:x+o,x1:_+o,y0:T+n,y1:k+n},r.inOut_bbox&&r.inOut_bbox.push(g.bbox)}else g=!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:g}}),s=!1,f=Lw(l,{gd:i,hovermode:"closest",rotateLabels:s,bgColor:r.bgColor||Qt.background,container:Ui.select(r.container),outerContainer:r.outerContainer||r.container}),c=5,v=0,u=0;f.sort(function(p,y){return p.y0-y.y0}).each(function(p,y){var m=p.y0-p.by/2;m-c<v?p.offset=v-m+c:p.offset=0,v=m+p.by+p.offset,y===r.anchorIndex&&(u=p.offset)}).each(function(p){p.offset-=u});var h=i._fullLayout._invScaleX,d=i._fullLayout._invScaleY;return Cw(f,s,h,d),a?f:f.node()};function _5(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(K){return K.id});n=n.concat(c)}for(var v=n.length,u=new Array(v),h=new Array(v),d=!1,p=0;p<v;p++){var y=n[p];if(l[y])d=!0,u[p]=l[y].xaxis,h[p]=l[y].yaxis;else if(o[y]&&o[y]._subplot){var m=o[y]._subplot;u[p]=m.xaxis,h[p]=m.yaxis}else{jt.warn("Unrecognized subplot: "+y);return}}var b=e.hovermode||o.hovermode;if(b&&!d&&(b="closest"),["x","y","closest","x unified","y unified"].indexOf(b)===-1||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return Ps.unhoverRaw(t,e);var w=o.hoverdistance;w===-1&&(w=1/0);var g=o.spikedistance;g===-1&&(g=1/0);var x=[],_=[],T,k,S,A,D,M,C,$,F,R,P,E,L,z={hLinePoint:null,vLinePoint:null},I=!1;if(Array.isArray(e))for(b="array",S=0;S<e.length;S++)D=t.calcdata[e[S].curveNumber||0],D&&(M=D[0].trace,D[0].trace.hoverinfo!=="skip"&&(_.push(D),M.orientation==="h"&&(I=!0)));else{for(A=0;A<t.calcdata.length;A++)D=t.calcdata[A],M=D[0].trace,M.hoverinfo!=="skip"&&oa.isTraceInSubplots(M,n)&&(_.push(D),M.orientation==="h"&&(I=!0));var H=!i,U,O;if(H)"xpx"in e?U=e.xpx:U=u[0]._length/2,"ypx"in e?O=e.ypx:O=h[0]._length/2;else{if(d5.triggerHandler(t,"plotly_beforehover",e)===!1)return;var X=i.getBoundingClientRect();U=e.clientX-X.left,O=e.clientY-X.top,o._calcInverseTransform(t);var B=jt.apply3DTransform(o._invTransform)(U,O);if(U=B[0],O=B[1],U<0||U>u[0]._length||O<0||O>h[0]._length)return Ps.unhoverRaw(t,e)}if(e.pointerX=U+u[0]._offset,e.pointerY=O+h[0]._offset,"xval"in e?T=oa.flat(n,e.xval):T=oa.p2c(u,U),"yval"in e?k=oa.flat(n,e.yval):k=oa.p2c(h,O),!Ha(T[0])||!Ha(k[0]))return jt.warn("Fx.hover failed",e,t),Ps.unhoverRaw(t,e)}var Y=1/0;function Z(K,Q){for(A=0;A<_.length;A++)if(D=_[A],!(!D||!D[0]||!D[0].trace)&&(M=D[0].trace,!(M.visible!==!0||M._length===0)&&["carpet","contourcarpet"].indexOf(M._module.name)===-1)){if(M.type==="splom"?($=0,C=n[$]):(C=oa.getSubplot(M),$=n.indexOf(C)),F=b,oa.isUnifiedHover(F)&&(F=F.charAt(0)),E={cd:D,trace:M,xa:u[$],ya:h[$],maxHoverDistance:w,maxSpikeDistance:g,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]&&(E.subplot=o[C]._subplot),o._splomScenes&&o._splomScenes[M.uid]&&(E.scene=o._splomScenes[M.uid]),L=x.length,F==="array"){var me=e[A];"pointNumber"in me?(E.index=me.pointNumber,F="closest"):(F="","xval"in me&&(R=me.xval,F="x"),"yval"in me&&(P=me.yval,F=F?"closest":"y"))}else K!==void 0&&Q!==void 0?(R=K,P=Q):(R=T[$],P=k[$]);if(w!==0)if(M._module&&M._module.hoverPoints){var ge=M._module.hoverPoints(E,R,P,F,{finiteRange:!0,hoverLayer:o._hoverlayer});if(ge)for(var fe,ie=0;ie<ge.length;ie++)fe=ge[ie],Ha(fe.x0)&&Ha(fe.y0)&&x.push(k5(fe,b))}else jt.log("Unrecognized trace type in hover:",M);if(b==="closest"&&x.length>L&&(x.splice(0,L),Y=x[0].distance),f&&g!==0&&x.length===0){E.distance=g,E.index=!1;var Te=M._module.hoverPoints(E,R,P,"closest",{hoverLayer:o._hoverlayer});if(Te&&(Te=Te.filter(function(qe){return qe.spikeDistance<=g})),Te&&Te.length){var je,Xe=Te.filter(function(qe){return qe.xa.showspikes&&qe.xa.spikesnap!=="hovered data"});if(Xe.length){var et=Xe[0];Ha(et.x0)&&Ha(et.y0)&&(je=W(et),(!z.vLinePoint||z.vLinePoint.spikeDistance>je.spikeDistance)&&(z.vLinePoint=je))}var st=Te.filter(function(qe){return qe.ya.showspikes&&qe.ya.spikesnap!=="hovered data"});if(st.length){var dt=st[0];Ha(dt.x0)&&Ha(dt.y0)&&(je=W(dt),(!z.hLinePoint||z.hLinePoint.spikeDistance>je.spikeDistance)&&(z.hLinePoint=je))}}}}}Z();function q(K,Q,me){for(var ge=null,fe=1/0,ie,Te=0;Te<K.length;Te++)ie=K[Te].spikeDistance,me&&Te===0&&(ie=-1/0),ie<=fe&&ie<=Q&&(ge=K[Te],fe=ie);return ge}function W(K){return K?{xa:K.xa,ya:K.ya,x:K.xSpike!==void 0?K.xSpike:(K.x0+K.x1)/2,y:K.ySpike!==void 0?K.ySpike:(K.y0+K.y1)/2,distance:K.distance,spikeDistance:K.spikeDistance,curveNumber:K.trace.index,color:K.color,pointNumber:K.index}:null}var ae={fullLayout:o,container:o._hoverlayer,event:e},ne=t._spikepoints,de={vLinePoint:z.vLinePoint,hLinePoint:z.hLinePoint};t._spikepoints=de;var le=function(){x.sort(function(K,Q){return K.distance-Q.distance}),x=M5(x,b)};le();var oe=b.charAt(0),ue=(oe==="x"||oe==="y")&&x[0]&&x5[x[0].trace.type];if(f&&g!==0&&x.length!==0){var Se=x.filter(function(K){return K.ya.showspikes}),he=q(Se,g,ue);z.hLinePoint=W(he);var ye=x.filter(function(K){return K.xa.showspikes}),ke=q(ye,g,ue);z.vLinePoint=W(ke)}if(x.length===0){var te=Ps.unhoverRaw(t,e);return f&&(z.hLinePoint!==null||z.vLinePoint!==null)&&eg(ne)&&Jy(t,z,ae),te}if(f&&eg(ne)&&Jy(t,z,ae),oa.isXYhover(F)&&x[0].length!==0&&x[0].trace.type!=="splom"){var J=x[0];Ky[J.trace.type]?x=x.filter(function(K){return K.trace.index===J.trace.index}):x=[J];var _e=x.length,pe=rg("x",J,o),Le=rg("y",J,o);Z(pe,Le);var Ie=[],Pe={},Be=0,re=function(K){var Q=Ky[K.trace.type]?Sw(K):K.trace.index;if(!Pe[Q])Be++,Pe[Q]=Be,Ie.push(K);else{var me=Pe[Q]-1,ge=Ie[me];me>0&&Math.abs(K.distance)<Math.abs(ge.distance)&&(Ie[me]=K)}},De;for(De=0;De<_e;De++)re(x[De]);for(De=x.length-1;De>_e-1;De--)re(x[De]);x=Ie,le()}var Ce=t._hoverdata,se=[],ce=Dw(t),Re=$w(t);for(S=0;S<x.length;S++){var we=x[S],xe=oa.makeEventData(we,we.trace,we.cd);if(we.hovertemplate!==!1){var be=!1;we.cd[we.index]&&we.cd[we.index].ht&&(be=we.cd[we.index].ht),we.hovertemplate=be||we.trace.hovertemplate||!1}if(we.xa&&we.ya){var ze=we.x0+we.xa._offset,Ne=we.x1+we.xa._offset,He=we.y0+we.ya._offset,Ae=we.y1+we.ya._offset,Fe=Math.min(ze,Ne),Ge=Math.max(ze,Ne),Oe=Math.min(He,Ae),We=Math.max(He,Ae);xe.bbox={x0:Fe+Re,x1:Ge+Re,y0:Oe+ce,y1:We+ce}}we.eventData=[xe],se.push(xe)}t._hoverdata=se;var N=b==="y"&&(_.length>1||x.length>1)||b==="closest"&&I&&x.length>1,j=Qt.combine(o.plot_bgcolor||Qt.background,o.paper_bgcolor),G=Lw(x,{gd:t,hovermode:b,rotateLabels:N,bgColor:j,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance});if(oa.isUnifiedHover(b)||(T5(G,N?"xa":"ya",o),Cw(G,N,o._invScaleX,o._invScaleY)),i&&i.tagName){var V=po.getComponentMethod("annotations","hasClickToShow")(t,se);h5(Ui.select(i),V?"pointer":"")}!i||a||!A5(t,e,Ce)||(Ce&&t.emit("plotly_unhover",{event:e,points:Ce}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:u,yaxes:h,xvals:T,yvals:k}))}function Sw(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 w5=/<extra>([\s\S]*)<\/extra>/;function Lw(t,e){var r=e.gd,a=r._fullLayout,i=e.hovermode,n=e.rotateLabels,o=e.bgColor,l=e.container,s=e.outerContainer,f=e.commonLabelOpts||{};if(t.length===0)return[[]];var c=e.fontFamily||an.HOVERFONT,v=e.fontSize||an.HOVERFONTSIZE,u=t[0],h=u.xa,d=u.ya,p=i.charAt(0),y=p+"Label",m=u[y];if(m===void 0&&h.type==="multicategory")for(var b=0;b<t.length&&(m=t[b][y],m===void 0);b++);var w=Ln(r,s),g=w.top,x=w.width,_=w.height,T=m!==void 0&&u.distance<=e.hoverdistance&&(i==="x"||i==="y");if(T){var k=!0,S,A;for(S=0;S<t.length;S++)if(k&&t[S].zLabel===void 0&&(k=!1),A=t[S].hoverinfo||t[S].trace.hoverinfo,A){var D=Array.isArray(A)?A:A.split("+");if(D.indexOf("all")===-1&&D.indexOf(i)===-1){T=!1;break}}k&&(T=!1)}var M=l.selectAll("g.axistext").data(T?[0]:[]);if(M.enter().append("g").classed("axistext",!0),M.exit().remove(),M.each(function(){var J=Ui.select(this),_e=jt.ensureSingle(J,"path","",function(Ge){Ge.style({"stroke-width":"1px"})}),pe=jt.ensureSingle(J,"text","",function(Ge){Ge.attr("data-notex",1)}),Le=f.bgcolor||Qt.defaultLine,Ie=f.bordercolor||Qt.contrast(Le),Pe=Qt.contrast(Le),Be={family:f.font.family||c,size:f.font.size||v,color:f.font.color||Pe};_e.style({fill:Le,stroke:Ie}),pe.text(m).call(Sa.font,Be).call(Gr.positionText,0,0).call(Gr.convertToTspans,r),J.attr("transform","");var re=Ln(r,pe.node()),De,Ce;if(i==="x"){var se=h.side==="top"?"-":"";pe.attr("text-anchor","middle").call(Gr.positionText,0,h.side==="top"?g-re.bottom-$t-mt:g-re.top+$t+mt),De=h._offset+(u.x0+u.x1)/2,Ce=d._offset+(h.side==="top"?0:d._length);var ce=re.width/2+mt;De<ce?(De=ce,_e.attr("d","M-"+(ce-$t)+",0L-"+(ce-$t*2)+","+se+$t+"H"+(mt+re.width/2)+"v"+se+(mt*2+re.height)+"H-"+ce+"V"+se+$t+"Z")):De>a.width-ce?(De=a.width-ce,_e.attr("d","M"+(ce-$t)+",0L"+ce+","+se+$t+"v"+se+(mt*2+re.height)+"H-"+ce+"V"+se+$t+"H"+(ce-$t*2)+"Z")):_e.attr("d","M0,0L"+$t+","+se+$t+"H"+(mt+re.width/2)+"v"+se+(mt*2+re.height)+"H-"+(mt+re.width/2)+"V"+se+$t+"H-"+$t+"Z")}else{var Re,we,xe;d.side==="right"?(Re="start",we=1,xe="",De=h._offset+h._length):(Re="end",we=-1,xe="-",De=h._offset),Ce=d._offset+(u.y0+u.y1)/2,pe.attr("text-anchor",Re),_e.attr("d","M0,0L"+xe+$t+","+$t+"V"+(mt+re.height/2)+"h"+xe+(mt*2+re.width)+"V-"+(mt+re.height/2)+"H"+xe+$t+"V-"+$t+"Z");var be=re.height/2,ze=g-re.top-be,Ne="clip"+a._uid+"commonlabel"+d._id,He;if(De<re.width+2*mt+$t){He="M-"+($t+mt)+"-"+be+"h-"+(re.width-mt)+"V"+be+"h"+(re.width-mt)+"Z";var Ae=re.width-De+mt;Gr.positionText(pe,Ae,ze),Re==="end"&&pe.selectAll("tspan").each(function(){var Ge=Ui.select(this),Oe=Sa.tester.append("text").text(Ge.text()).call(Sa.font,Be),We=Ln(r,Oe.node());Math.round(We.width)<Math.round(re.width)&&Ge.attr("x",Ae-We.width),Oe.remove()})}else Gr.positionText(pe,we*(mt+$t),ze),He=null;var Fe=a._topclips.selectAll("#"+Ne).data(He?[0]:[]);Fe.enter().append("clipPath").attr("id",Ne).append("path"),Fe.exit().remove(),Fe.select("path").attr("d",He),Sa.setClipUrl(pe,He?Ne:null,r)}J.attr("transform",Hu(De,Ce))}),oa.isUnifiedHover(i)){l.selectAll("g.hovertext").remove();var C=t.filter(function(J){return J.hoverinfo!=="none"});if(C.length===0)return;var $=a.hoverlabel,F=$.font,R={showlegend:!0,legend:{title:{text:m,font:F},font:F,bgcolor:$.bgcolor,bordercolor:$.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},P={font:F};p5(R,P,r._fullData);var E=P.legend;E.entries=[];for(var L=0;L<C.length;L++){var z=C[L];if(z.hoverinfo!=="none"){var I=Qy(z,!0,i,a,m),H=I[0],U=I[1];z.name=U,U!==""?z.text=U+" : "+H:z.text=H;var O=z.cd[z.index];O&&(O.mc&&(z.mc=O.mc),O.mcc&&(z.mc=O.mcc),O.mlc&&(z.mlc=O.mlc),O.mlcc&&(z.mlc=O.mlcc),O.mlw&&(z.mlw=O.mlw),O.mrc&&(z.mrc=O.mrc),O.dir&&(z.dir=O.dir)),z._distinct=!0,E.entries.push([z])}}E.entries.sort(function(J,_e){return J[0].trace.index-_e[0].trace.index}),E.layer=l,E._inHover=!0,E._groupTitleFont=$.grouptitlefont,m5(r,E);var X=l.select("g.legend"),B=Ln(r,X.node()),Y=B.width+2*mt,Z=B.height+2*mt,q=C[0],W=(q.x0+q.x1)/2,ae=(q.y0+q.y1)/2,ne=!(po.traceIs(q.trace,"bar-like")||po.traceIs(q.trace,"box-violin")),de,le;p==="y"?ne?(le=ae-mt,de=ae+mt):(le=Math.min.apply(null,C.map(function(J){return Math.min(J.y0,J.y1)})),de=Math.max.apply(null,C.map(function(J){return Math.max(J.y0,J.y1)}))):le=de=jt.mean(C.map(function(J){return(J.y0+J.y1)/2}))-Z/2;var oe,ue;p==="x"?ne?(oe=W+mt,ue=W-mt):(oe=Math.max.apply(null,C.map(function(J){return Math.max(J.x0,J.x1)})),ue=Math.min.apply(null,C.map(function(J){return Math.min(J.x0,J.x1)}))):oe=ue=jt.mean(C.map(function(J){return(J.x0+J.x1)/2}))-Y/2;var Se=h._offset,he=d._offset;de+=he,oe+=Se,ue+=Se-Y,le+=he-Z;var ye,ke;return oe+Y<x&&oe>=0?ye=oe:ue+Y<x&&ue>=0?ye=ue:Se+Y<x?ye=Se:oe-W<W-ue+Y?ye=x-Y:ye=0,ye+=mt,de+Z<_&&de>=0?ke=de:le+Z<_&&le>=0?ke=le:he+Z<_?ke=he:de-ae<ae-le+Z?ke=_-Z:ke=0,ke+=mt,X.attr("transform",Hu(ye-1,ke-1)),X}var te=l.selectAll("g.hovertext").data(t,function(J){return Sw(J)});return te.enter().append("g").classed("hovertext",!0).each(function(){var J=Ui.select(this);J.append("rect").call(Qt.fill,Qt.addOpacity(o,.8)),J.append("text").classed("name",!0),J.append("path").style("stroke-width","1px"),J.append("text").classed("nums",!0).call(Sa.font,c,v)}),te.exit().remove(),te.each(function(J){var _e=Ui.select(this).attr("transform",""),pe=J.color;Array.isArray(pe)&&(pe=pe[J.eventData[0].pointNumber]);var Le=J.bgcolor||pe,Ie=Qt.combine(Qt.opacity(Le)?Le:Qt.defaultLine,o),Pe=Qt.combine(Qt.opacity(pe)?pe:Qt.defaultLine,o),Be=J.borderColor||Qt.contrast(Ie),re=Qy(J,T,i,a,m,_e),De=re[0],Ce=re[1],se=_e.select("text.nums").call(Sa.font,J.fontFamily||c,J.fontSize||v,J.fontColor||Be).text(De).attr("data-notex",1).call(Gr.positionText,0,0).call(Gr.convertToTspans,r),ce=_e.select("text.name"),Re=0,we=0;if(Ce&&Ce!==De){ce.call(Sa.font,J.fontFamily||c,J.fontSize||v,Pe).text(Ce).attr("data-notex",1).call(Gr.positionText,0,0).call(Gr.convertToTspans,r);var xe=Ln(r,ce.node());Re=xe.width+2*mt,we=xe.height+2*mt}else ce.remove(),_e.select("rect").remove();_e.select("path").style({fill:Ie,stroke:Be});var be=J.xa._offset+(J.x0+J.x1)/2,ze=J.ya._offset+(J.y0+J.y1)/2,Ne=Math.abs(J.x1-J.x0),He=Math.abs(J.y1-J.y0),Ae=Ln(r,se.node()),Fe=Ae.width/a._invScaleX,Ge=Ae.height/a._invScaleY;J.ty0=(g-Ae.top)/a._invScaleY,J.bx=Fe+2*mt,J.by=Math.max(Ge+2*mt,we),J.anchor="start",J.txwidth=Fe,J.tx2width=Re,J.offset=0;var Oe=(Fe+$t+mt+Re)*a._invScaleX,We,N;if(n)J.pos=be,We=ze+He/2+Oe<=_,N=ze-He/2-Oe>=0,(J.idealAlign==="top"||!We)&&N?(ze-=He/2,J.anchor="end"):We?(ze+=He/2,J.anchor="start"):J.anchor="middle";else if(J.pos=ze,We=be+Ne/2+Oe<=x,N=be-Ne/2-Oe>=0,(J.idealAlign==="left"||!We)&&N)be-=Ne/2,J.anchor="end";else if(We)be+=Ne/2,J.anchor="start";else{J.anchor="middle";var j=Oe/2,G=be+j-x,V=be-j;G>0&&(be-=G),V<0&&(be+=-V)}se.attr("text-anchor",J.anchor),Re&&ce.attr("text-anchor",J.anchor),_e.attr("transform",Hu(be,ze)+(n?v5(Mw):""))}),te}function Qy(t,e,r,a,i,n){var o="",l="";t.nameOverride!==void 0&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=jt.templateString(t.name,t.trace._meta)),o=tg(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=jt.hovertemplateString(c,v,a._d3locale,t.eventData[0]||{},t.trace._meta),l=l.replace(w5,function(u,h){return o=tg(h,t.nameLength),""})}return[l,o]}function T5(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?y5:1)/2,pmin:0,pmax:S?r.width:r.height}]}),o.sort(function(T,k){return T[0].posref-k[0].posref||i*(k[0].traceIndex-T[0].traceIndex)});var s,f,c,v,u,h,d;function p(T){var k=T[0],S=T[T.length-1];if(f=k.pmin-k.pos-k.dp+k.size,c=S.pos+S.dp+S.size-k.pmax,f>.01){for(u=T.length-1;u>=0;u--)T[u].dp+=f;s=!1}if(!(c<.01)){if(f<-.01){for(u=T.length-1;u>=0;u--)T[u].dp-=c;s=!1}if(!!s){var A=0;for(v=0;v<T.length;v++)h=T[v],h.pos+h.dp+h.size>k.pmax&&A++;for(v=T.length-1;v>=0&&!(A<=0);v--)h=T[v],h.pos>k.pmax-1&&(h.del=!0,A--);for(v=0;v<T.length&&!(A<=0);v++)if(h=T[v],h.pos<k.pmin+1)for(h.del=!0,A--,c=h.size*2,u=T.length-1;u>=0;u--)T[u].dp-=c;for(v=T.length-1;v>=0&&!(A<=0);v--)h=T[v],h.pos+h.dp+h.size>k.pmax&&(h.del=!0,A--)}}}for(;!s&&a<=n;){for(a++,s=!0,v=0;v<o.length-1;){var y=o[v],m=o[v+1],b=y[y.length-1],w=m[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=m.length-1;u>=0;u--)m[u].dp+=f;for(y.push.apply(y,m),o.splice(v+1,1),d=0,u=y.length-1;u>=0;u--)d+=y[u].dp;for(c=d/y.length,u=y.length-1;u>=0;u--)y[u].dp-=c;s=!1}else v++}o.forEach(p)}for(v=o.length-1;v>=0;v--){var g=o[v];for(u=g.length-1;u>=0;u--){var x=g[u],_=x.datum;_.offset=x.dp,_.del=x.del}}}function Cw(t,e,r,a){var i=function(o){return o*r},n=function(o){return o*a};t.each(function(o){var l=Ui.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),h=u+v*(o.txwidth+mt),d=0,p=o.offset,y=f==="middle";y&&(u-=o.tx2width/2,h+=o.txwidth/2+mt),e&&(p*=-b5,d=o.offset*g5),l.select("path").attr("d",y?"M-"+i(o.bx/2+o.tx2width/2)+","+n(p-o.by/2)+"h"+i(o.bx)+"v"+n(o.by)+"h-"+i(o.bx)+"Z":"M0,0L"+i(c*$t+d)+","+n($t+p)+"v"+n(o.by/2-$t)+"h"+i(c*o.bx)+"v-"+n(o.by)+"H"+i(c*$t+d)+"V"+n(p-$t)+"Z");var m=d+u,b=p+o.ty0-o.by/2+mt,w=o.textAlign||"auto";w!=="auto"&&(w==="left"&&f!=="start"?(s.attr("text-anchor","start"),m=y?-o.bx/2-o.tx2width/2+mt:-o.bx-mt):w==="right"&&f!=="end"&&(s.attr("text-anchor","end"),m=y?o.bx/2-o.tx2width/2-mt:o.bx+mt)),s.call(Gr.positionText,i(m),n(b)),o.tx2width&&(l.select("text.name").call(Gr.positionText,i(h+v*mt+d),n(p+o.ty0-o.by/2+mt)),l.select("rect").call(Sa.setRect,i(h+(v-1)*o.tx2width/2+d),n(p-o.by/2-1),i(o.tx2width),n(o.by+2)))})}function k5(t,e){var r=t.index,a=t.trace||{},i=t.cd[0],n=t.cd[r]||{};function o(u){return u||Ha(u)&&u===0}var l=Array.isArray(r)?function(u,h){var d=jt.castOption(i,r,u);return o(d)?d:jt.extractOption({},a,"",h)}:function(u,h){return jt.extractOption(n,a,u,h)};function s(u,h,d){var p=l(h,d);o(p)&&(t[u]=p)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),t.posref=e==="y"||e==="closest"&&a.orientation==="h"?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=jt.constrain(t.x0,0,t.xa._length),t.x1=jt.constrain(t.x1,0,t.xa._length),t.y0=jt.constrain(t.y0,0,t.ya._length),t.y1=jt.constrain(t.y1,0,t.ya._length),t.xLabelVal!==void 0&&(t.xLabel="xLabel"in t?t.xLabel:li.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:li.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=li.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;t.xerrneg!==void 0?t.xLabel+=" +"+f+" / -"+li.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=li.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;t.yerrneg!==void 0?t.yLabel+=" +"+c+" / -"+li.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 Jy(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,h,d;f=u&&u.xa,c=u&&u.ya;var p=c.spikesnap;p==="cursor"?(h=o.pointerX,d=o.pointerY):(h=f._offset+u.x,d=c._offset+u.y);var y=Zy.readability(u.color,v)<1.5?Qt.contrast(v):u.color,m=c.spikemode,b=c.spikethickness,w=c.spikecolor||y,g=li.getPxPosition(t,c),x,_;if(m.indexOf("toaxis")!==-1||m.indexOf("across")!==-1){if(m.indexOf("toaxis")!==-1&&(x=g,_=h),m.indexOf("across")!==-1){var T=c._counterDomainMin,k=c._counterDomainMax;c.anchor==="free"&&(T=Math.min(T,c.position),k=Math.max(k,c.position)),x=n.l+T*n.w,_=n.l+k*n.w}a.insert("line",":first-child").attr({x1:x,x2:_,y1:d,y2:d,"stroke-width":b,stroke:w,"stroke-dasharray":Sa.dashStyle(c.spikedash,b)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:x,x2:_,y1:d,y2:d,"stroke-width":b+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}m.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:g+(c.side!=="right"?b:-b),cy:d,r:b,fill:w}).classed("spikeline",!0)}if(s){var S=e.vLinePoint,A,D;f=S&&S.xa,c=S&&S.ya;var M=f.spikesnap;M==="cursor"?(A=o.pointerX,D=o.pointerY):(A=f._offset+S.x,D=c._offset+S.y);var C=Zy.readability(S.color,v)<1.5?Qt.contrast(v):S.color,$=f.spikemode,F=f.spikethickness,R=f.spikecolor||C,P=li.getPxPosition(t,f),E,L;if($.indexOf("toaxis")!==-1||$.indexOf("across")!==-1){if($.indexOf("toaxis")!==-1&&(E=P,L=D),$.indexOf("across")!==-1){var z=f._counterDomainMin,I=f._counterDomainMax;f.anchor==="free"&&(z=Math.min(z,f.position),I=Math.max(I,f.position)),E=n.t+(1-I)*n.h,L=n.t+(1-z)*n.h}a.insert("line",":first-child").attr({x1:A,x2:A,y1:E,y2:L,"stroke-width":F,stroke:R,"stroke-dasharray":Sa.dashStyle(f.spikedash,F)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:A,x2:A,y1:E,y2:L,"stroke-width":F+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}$.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:A,cy:P-(f.side!=="top"?F:-F),r:F,fill:R}).classed("spikeline",!0)}}}function A5(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 eg(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function tg(t,e){return Gr.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function M5(t,e){for(var r=e.charAt(0),a=[],i=[],n=[],o=0;o<t.length;o++){var l=t[o];po.traceIs(l.trace,"bar-like")||po.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 rg(t,e,r){var a=e[t+"a"],i=e[t+"Val"],n=e.cd[0];if(a.type==="category"||a.type==="multicategory")i=a._categoriesMap[i];else if(a.type==="date"){var o=e.trace[t+"periodalignment"];if(o){var l=e.cd[e.index],s=l[t+"Start"];s===void 0&&(s=l[t]);var f=l[t+"End"];f===void 0&&(f=l[t]);var c=f-s;o==="end"?i+=c:o==="middle"&&(i+=c/2)}i=a.d2c(i)}return n&&n.t&&n.t.posLetter===a._id&&(r.boxmode==="group"||r.violinmode==="group")&&(i+=n.t.dPos),i}function Dw(t){return t.offsetTop+t.clientTop}function $w(t){return t.offsetLeft+t.clientLeft}function Ln(t,e){var r=t._fullLayout,a=e.getBoundingClientRect(),i=a.x,n=a.y,o=i+a.width,l=n+a.height,s=jt.apply3DTransform(r._invTransform)(i,n),f=jt.apply3DTransform(r._invTransform)(o,l),c=s[0],v=s[1],u=f[0],h=f[1];return{x:c,y:v,width:u-c,height:h-v,top:Math.min(v,h),left:Math.min(c,u),right:Math.max(c,u),bottom:Math.max(v,h)}}var S5=ve.exports,L5=rt.exports,C5=ea.isUnifiedHover,Jh=function(e,r,a,i){i=i||{};var n=r.legend;function o(l){i.font[l]||(i.font[l]=n?r.legend.font[l]:r.font[l])}r&&C5(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),n?(i.bgcolor||(i.bgcolor=L5.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),S5.coerceFont(a,"hoverlabel.font",i.font),a("hoverlabel.align",i.align)},D5=ve.exports,$5=Jh,P5=Vl,R5=function(e,r){function a(i,n){return D5.coerce(e,r,P5,i,n)}$5(e,r,a)},ag=ve.exports,E5=vc,z5=Jh,I5=function(e,r,a,i){function n(l,s){return ag.coerce(e,r,E5,l,s)}var o=ag.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),z5(e,r,n,o)},N5=ve.exports,F5=Vl,Pw=function(e,r){function a(i,n){return r[i]!==void 0?r[i]:N5.coerce(e,r,F5,i,n)}return a("clickmode"),a("hovermode")},ig=ve.exports,H5=Vl,O5=Pw,B5=Jh,j5=function(e,r){function a(f,c){return ig.coerce(e,r,H5,f,c)}var i=O5(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"),B5(e,r,a),ig.coerceFont(a,"hoverlabel.grouptitlefont",r.hoverlabel.font)},Pd=ve.exports,ng=Ze,G5=function(e){var r=e.calcdata,a=e._fullLayout;function i(f){return function(c){return Pd.coerceHoverinfo({hoverinfo:c},{_module:f._module},a)}}for(var n=0;n<r.length;n++){var o=r[n],l=o[0].trace;if(!ng.traceIs(l,"pie-like")){var s=ng.traceIs(l,"2dMap")?U5:Pd.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 U5(t,e,r,a){a=a||Pd.identity,Array.isArray(t)&&(e[0][r]=a(t))}var V5=Ze,X5=Cc.hover,W5=function(e,r,a){var i=V5.getComponentMethod("annotations","onClick")(e,e._hoverdata);a!==void 0&&X5(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())},Y5=nt.exports,jf=ve.exports,q5=ba.exports,Vo=ea,og=Vl,lg=Cc,pa={moduleType:"component",name:"fx",constants:uc,schema:{layout:og},attributes:vc,layoutAttributes:og,supplyLayoutGlobalDefaults:R5,supplyDefaults:I5,supplyLayoutDefaults:j5,calc:G5,getDistanceFunction:Vo.getDistanceFunction,getClosest:Vo.getClosest,inbox:Vo.inbox,quadrature:Vo.quadrature,appendArrayPointValue:Vo.appendArrayPointValue,castHoverOption:K5,castHoverinfo:Q5,hover:lg.hover,unhover:q5.unhover,loneHover:lg.loneHover,loneUnhover:Z5,click:W5};function Z5(t){var e=jf.isD3Selection(t)?t:Y5.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function K5(t,e,r){return jf.castOption(t,e,"hoverlabel."+r)}function Q5(t,e,r){function a(i){return jf.coerceHoverinfo({hoverinfo:i},{_module:t._module},e)}return jf.castOption(t,r,"hoverinfo",a)}var pn={};(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)}})(pn);var ep=function(e){var r=e._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})},Dc={},tp={exports:{}},rp={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>","<defs>"," <style>"," .cls-0{fill:#000;}"," .cls-1{fill:#FFF;}"," .cls-2{fill:#F26;}"," .cls-3{fill:#D69;}"," .cls-4{fill:#BAC;}"," .cls-5{fill:#9EF;}"," </style>","</defs>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle class='cls-5' cx='102' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='54' r='6'/>"," <circle class='cls-3' cx='54' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='54' r='6'/>"," <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}},mn={},Rs=32,ap={CIRCLE_SIDES:Rs,i000:0,i090:Rs/4,i180:Rs/2,i270:Rs/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)},J5=ve.exports.strTranslate;function Rw(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 e$(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 t$(t){var e=t._id.charAt(0)==="y"?1:0;return function(r){return Rw(t,r[e])}}function r$(t){return J5(t.xaxis._offset,t.yaxis._offset)}var ip={p2r:Rw,r2p:e$,axValue:t$,getTransform:r$};(function(t){var e=_1,r=ap,a=r.CIRCLE_SIDES,i=r.SQRT2,n=ip,o=n.p2r,l=n.r2p,s=[0,3,4,5,6,1,2],f=[0,3,4,1,2];t.writePaths=function(u){var h=u.length;if(!h)return"M0,0Z";for(var d="",p=0;p<h;p++)for(var y=u[p].length,m=0;m<y;m++){var b=u[p][m][0];if(b==="Z")d+="Z";else for(var w=u[p][m].length,g=0;g<w;g++){var x=g;b==="Q"||b==="S"?x=f[g]:b==="C"&&(x=s[g]),d+=u[p][m][x],g>0&&g<w-1&&(d+=",")}}return d},t.readPaths=function(u,h,d,p){var y=e(u),m=[],b=-1,w=function(){b++,m[b]=[]},g,x=0,_=0,T,k,S=function(){T=x,k=_};S();for(var A=0;A<y.length;A++){var D=[],M,C,$,F,R=y[A][0],P=R;switch(R){case"M":w(),x=+y[A][1],_=+y[A][2],D.push([P,x,_]),S();break;case"Q":case"S":M=+y[A][1],$=+y[A][2],x=+y[A][3],_=+y[A][4],D.push([P,x,_,M,$]);break;case"C":M=+y[A][1],$=+y[A][2],C=+y[A][3],F=+y[A][4],x=+y[A][5],_=+y[A][6],D.push([P,x,_,M,$,C,F]);break;case"T":case"L":x=+y[A][1],_=+y[A][2],D.push([P,x,_]);break;case"H":P="L",x=+y[A][1],D.push([P,x,_]);break;case"V":P="L",_=+y[A][1],D.push([P,x,_]);break;case"A":P="L";var E=+y[A][1],L=+y[A][2];+y[A][4]||(E=-E,L=-L);var z=x-E,I=_;for(g=1;g<=a/2;g++){var H=2*Math.PI*g/a;D.push([P,z+E*Math.cos(H),I+L*Math.sin(H)])}break;case"Z":(x!==T||_!==k)&&(x=T,_=k,D.push([P,x,_]));break}for(var U=(d||{}).domain,O=h._fullLayout._size,X=d&&d.xsizemode==="pixel",B=d&&d.ysizemode==="pixel",Y=p===!1,Z=0;Z<D.length;Z++){for(g=0;g+2<7;g+=2){var q=D[Z][g+1],W=D[Z][g+2];q===void 0||W===void 0||(x=q,_=W,d&&(d.xaxis&&d.xaxis.p2r?(Y&&(q-=d.xaxis._offset),X?q=l(d.xaxis,d.xanchor)+q:q=o(d.xaxis,q)):(Y&&(q-=O.l),U?q=U.x[0]+q/O.w:q=q/O.w),d.yaxis&&d.yaxis.p2r?(Y&&(W-=d.yaxis._offset),B?W=l(d.yaxis,d.yanchor)-W:W=o(d.yaxis,W)):(Y&&(W-=O.t),U?W=U.y[1]-W/O.h:W=1-W/O.h)),D[Z][g+1]=q,D[Z][g+2]=W)}m[b].push(D[Z].slice())}}return m};function c(u,h){return Math.abs(u-h)<=1e-6}function v(u,h){var d=h[1]-u[1],p=h[2]-u[2];return Math.sqrt(d*d+p*p)}t.pointsOnRectangle=function(u){var h=u.length;if(h!==5)return!1;for(var d=1;d<3;d++){var p=u[0][d]-u[1][d],y=u[3][d]-u[2][d];if(!c(p,y))return!1;var m=u[0][d]-u[3][d],b=u[1][d]-u[2][d];if(!c(m,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.pointsOnEllipse=function(u){var h=u.length;if(h!==a+1)return!1;h=a;for(var d=0;d<h;d++){var p=(h*2-d)%h,y=(h/2+p)%h,m=(h/2+d)%h;if(!c(v(u[d],u[m]),v(u[p],u[y])))return!1}return!0},t.handleEllipse=function(u,h,d){if(!u)return[h,d];var p=t.ellipseOver({x0:h[0],y0:h[1],x1:d[0],y1:d[1]}),y=(p.x1+p.x0)/2,m=(p.y1+p.y0)/2,b=(p.x1-p.x0)/2,w=(p.y1-p.y0)/2;b||(b=w=w/i),w||(w=b=b/i);for(var g=[],x=0;x<a;x++){var _=x*2*Math.PI/a;g.push([y+b*Math.cos(_),m+w*Math.sin(_)])}return g},t.ellipseOver=function(u){var h=u.x0,d=u.y0,p=u.x1,y=u.y1,m=p-h,b=y-d;h-=m,d-=b;var w=(h+p)/2,g=(d+y)/2,x=i;return m*=x,b*=x,{x0:w-m,y0:g-b,x1:w+m,y1:g+b}},t.fixDatesForPaths=function(u,h,d){var p=h.type==="date",y=d.type==="date";if(!p&&!y)return u;for(var m=0;m<u.length;m++)for(var b=0;b<u[m].length;b++)for(var w=0;w+2<u[m][b].length;w+=2)p&&(u[m][b][w+1]=u[m][b][w+1].replace(" ","_")),y&&(u[m][b][w+2]=u[m][b][w+2].replace(" ","_"));return u}})(mn);var Ew=pn,a$=Ew.drawMode,i$=Ew.openMode,Po=ap,sg=Po.i000,fg=Po.i090,cg=Po.i180,ug=Po.i270,n$=Po.cos45,o$=Po.sin45,zw=ip,Es=zw.p2r,ti=zw.r2p,l$=un,s$=l$.clearOutline,$c=mn,f$=$c.readPaths,c$=$c.writePaths,u$=$c.ellipseOver,v$=$c.fixDatesForPaths,Iw=function(e,r){if(!!e.length){var a=e[0][0];if(!!a){var i=a.getAttribute("d"),n=r.gd,o=n._fullLayout.newshape,l=r.plotinfo,s=l.xaxis,f=l.yaxis,c=!!l.domain||!l.xaxis,v=!!l.domain||!l.yaxis,u=r.isActiveShape,h=r.dragmode,d=(n.layout||{}).shapes||[];if(!a$(h)&&u!==void 0){var p=n._fullLayout._activeShapeIndex;if(p<d.length)switch(n._fullLayout.shapes[p].type){case"rect":h="drawrect";break;case"circle":h="drawcircle";break;case"line":h="drawline";break;case"path":var y=d[p].path||"";y[y.length-1]==="Z"?h="drawclosedpath":h="drawopenpath";break}}var m=i$(h),b=f$(i,n,l,u),w={editable:!0,xref:c?"paper":s._id,yref:v?"paper":f._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};m||(w.fillcolor=o.fillcolor,w.fillrule=o.fillrule);var g;if(b.length===1&&(g=b[0]),g&&g.length===5&&h==="drawrect")w.type="rect",w.x0=g[0][1],w.y0=g[0][2],w.x1=g[2][1],w.y1=g[2][2];else if(g&&h==="drawline")w.type="line",w.x0=g[0][1],w.y0=g[0][2],w.x1=g[1][1],w.y1=g[1][2];else if(g&&h==="drawcircle"){w.type="circle";var x=g[sg][1],_=g[fg][1],T=g[cg][1],k=g[ug][1],S=g[sg][2],A=g[fg][2],D=g[cg][2],M=g[ug][2],C=l.xaxis&&(l.xaxis.type==="date"||l.xaxis.type==="log"),$=l.yaxis&&(l.yaxis.type==="date"||l.yaxis.type==="log");C&&(x=ti(l.xaxis,x),_=ti(l.xaxis,_),T=ti(l.xaxis,T),k=ti(l.xaxis,k)),$&&(S=ti(l.yaxis,S),A=ti(l.yaxis,A),D=ti(l.yaxis,D),M=ti(l.yaxis,M));var F=(_+k)/2,R=(S+D)/2,P=(k-_+T-x)/2,E=(M-A+D-S)/2,L=u$({x0:F,y0:R,x1:F+P*n$,y1:R+E*o$});C&&(L.x0=Es(l.xaxis,L.x0),L.x1=Es(l.xaxis,L.x1)),$&&(L.y0=Es(l.yaxis,L.y0),L.y1=Es(l.yaxis,L.y1)),w.x0=L.x0,w.y0=L.y0,w.x1=L.x1,w.y1=L.y1}else w.type="path",s&&f&&v$(b,s,f),w.path=c$(b),g=null;s$(n);for(var z=r.editHelpers,I=(z||{}).modifyItem,H=[],U=0;U<d.length;U++){var O=n._fullLayout.shapes[U];if(H[U]=O._input,u!==void 0&&U===n._fullLayout._activeShapeIndex){var X=w;switch(O.type){case"line":case"rect":case"circle":I("x0",X.x0),I("x1",X.x1),I("y0",X.y0),I("y1",X.y1);break;case"path":I("path",X.path);break}}}return u===void 0?(H.push(w),H):z?z.getUpdateObj():{}}}},d$=pn,h$=d$.selectMode,p$=un,m$=p$.clearOutline,np=mn,y$=np.readPaths,g$=np.writePaths,b$=np.fixDatesForPaths,Nw=function(e,r){if(!!e.length){var a=e[0][0];if(!!a){var i=a.getAttribute("d"),n=r.gd,o=n._fullLayout.newselection,l=r.plotinfo,s=l.xaxis,f=l.yaxis,c=r.isActiveSelection,v=r.dragmode,u=(n.layout||{}).selections||[];if(!h$(v)&&c!==void 0){var h=n._fullLayout._activeSelectionIndex;if(h<u.length)switch(n._fullLayout.selections[h].type){case"rect":v="select";break;case"path":v="lasso";break}}var d=y$(i,n,l,c),p={xref:s._id,yref:f._id,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}},y;d.length===1&&(y=d[0]),y&&y.length===5&&v==="select"?(p.type="rect",p.x0=y[0][1],p.y0=y[0][2],p.x1=y[2][1],p.y1=y[2][2]):(p.type="path",s&&f&&b$(d,s,f),p.path=g$(d),y=null),m$(n);for(var m=r.editHelpers,b=(m||{}).modifyItem,w=[],g=0;g<u.length;g++){var x=n._fullLayout.selections[g];if(!x){w[g]=x;continue}if(w[g]=x._input,c!==void 0&&g===n._fullLayout._activeSelectionIndex){var _=p;switch(x.type){case"rect":b("x0",_.x0),b("x1",_.x1),b("y0",_.y0),b("y1",_.y1);break;case"path":b("path",_.path);break}}}return c===void 0?(w.push(p),w):m?m.getUpdateObj():{}}}},x$=ve.exports,_$=x$.strTranslate,vg=ba.exports,Fw=pn,w$=Fw.drawMode,Hw=Fw.selectMode,Ow=Ze,dg=rt.exports,Pc=ap,T$=Pc.i000,k$=Pc.i090,A$=Pc.i180,M$=Pc.i270,S$=un,Bw=S$.clearOutlineControllers,op=mn,zs=op.pointsOnRectangle,Ou=op.pointsOnEllipse,L$=op.writePaths,C$=Iw,D$=Nw,lp=function t(e,r,a,i){i||(i=0);var n=a.gd;function o(){t(e,r,a,i++),Ou(e[0])&&l({redrawing:!0})}function l(F){var R={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,R=C$(r,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,R=D$(r,a),n._fullLayout._reselect=!0),Object.keys(R).length&&Ow.call((F||{}).redrawing?"relayout":"_guiRelayout",n,R)}var s=n._fullLayout,f=s._zoomlayer,c=a.dragmode,v=w$(c),u=Hw(c);(v||u)&&(n._fullLayout._outlining=!0),Bw(n),r.attr("d",L$(e));var h,d,p,y,m;if(!i&&(a.isActiveShape||a.isActiveSelection)){m=$$([],e);var b=f.append("g").attr("class","outline-controllers");k(b),$()}function w(F){p=+F.srcElement.getAttribute("data-i"),y=+F.srcElement.getAttribute("data-j"),h[p][y].moveFn=g}function g(F,R){if(!!e.length){var P=m[p][y][1],E=m[p][y][2],L=e[p],z=L.length;if(zs(L)){var I=F,H=R;if(a.isActiveSelection){var U=hg(L,y);U[1]===L[y][1]?H=0:I=0}for(var O=0;O<z;O++)if(O!==y){var X=L[O];X[1]===L[y][1]&&(X[1]=P+I),X[2]===L[y][2]&&(X[2]=E+H)}if(L[y][1]=P+I,L[y][2]=E+H,!zs(L))for(var B=0;B<z;B++)for(var Y=0;Y<L[B].length;Y++)L[B][Y]=m[p][B][Y]}else L[y][1]=P+F,L[y][2]=E+R;o()}}function x(){l()}function _(){if(!!e.length&&!!e[p]&&!!e[p].length){for(var F=[],R=0;R<e[p].length;R++)R!==y&&F.push(e[p][R]);F.length>1&&!(F.length===2&&F[1][0]==="Z")&&(y===0&&(F[0][0]="M"),e[p]=F,o(),l())}}function T(F,R){if(F===2){p=+R.srcElement.getAttribute("data-i"),y=+R.srcElement.getAttribute("data-j");var P=e[p];!zs(P)&&!Ou(P)&&_()}}function k(F){h=[];for(var R=0;R<e.length;R++){var P=e[R],E=zs(P),L=!E&&Ou(P);h[R]=[];for(var z=P.length,I=0;I<z;I++)if(P[I][0]!=="Z"&&!(L&&I!==T$&&I!==k$&&I!==A$&&I!==M$)){var H=E&&a.isActiveSelection,U;H&&(U=hg(P,I));var O=P[I][1],X=P[I][2],B=F.append(H?"rect":"circle").attr("data-i",R).attr("data-j",I).style({fill:dg.background,stroke:dg.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(H){var Y=U[1]-O,Z=U[2]-X,q=Z?5:Math.max(Math.min(25,Math.abs(Y)-5),5),W=Y?5:Math.max(Math.min(25,Math.abs(Z)-5),5);B.classed(Z?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",q).attr("height",W).attr("x",O-q/2).attr("y",X-W/2).attr("transform",_$(Y/2,Z/2))}else B.classed("cursor-grab",!0).attr("r",5).attr("cx",O).attr("cy",X);h[R][I]={element:B.node(),gd:n,prepFn:w,doneFn:x,clickFn:T},vg.init(h[R][I])}}}function S(F,R){if(!!e.length)for(var P=0;P<e.length;P++)for(var E=0;E<e[P].length;E++)for(var L=0;L+2<e[P][E].length;L+=2)e[P][E][L+1]=m[P][E][L+1]+F,e[P][E][L+2]=m[P][E][L+2]+R}function A(F,R){S(F,R),o()}function D(F){p=+F.srcElement.getAttribute("data-i"),p||(p=0),d[p].moveFn=A}function M(){l()}function C(F){F===2&&P$(n)}function $(){if(d=[],!!e.length){var F=0;d[F]={element:r[0][0],gd:n,prepFn:D,doneFn:M,clickFn:C},vg.init(d[F])}}};function $$(t,e){for(var r=0;r<e.length;r++){var a=e[r];t[r]=[];for(var i=0;i<a.length;i++){t[r][i]=[];for(var n=0;n<a[i].length;n++)t[r][i][n]=a[i][n]}}return t}function hg(t,e){var r=t[e][1],a=t[e][2],i=t.length,n,o,l;return n=(e+1)%i,o=t[n][1],l=t[n][2],o===r&&l===a&&(n=(e+2)%i,o=t[n][1],l=t[n][2]),[n,o,l]}function P$(t){if(!!Hw(t._fullLayout.dragmode)){Bw(t);var e=t._fullLayout._activeSelectionIndex,r=(t.layout||{}).selections||[];if(e<r.length){for(var a=[],i=0;i<r.length;i++)i!==e&&a.push(r[i]);delete t._fullLayout._activeSelectionIndex;var n=t._fullLayout.selections[e];t._fullLayout._deselect={xref:n.xref,yref:n.yref},Ow.call("_guiRelayout",t,{selections:a})}}}var Rc={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}},yn={};(function(t){var e=Rc,r=ve.exports,a=Mt.exports;t.rangeToShapePosition=function(n){return n.type==="log"?n.r2d:function(o){return o}},t.shapePositionToRange=function(n){return n.type==="log"?n.d2r:function(o){return o}},t.decodeDate=function(n){return function(o){return o.replace&&(o=o.replace("_"," ")),n(o)}},t.encodeDate=function(n){return function(o){return n(o).replace(" ","_")}},t.extractPathCoords=function(n,o,l){var s=[],f=n.match(e.segmentRE);return f.forEach(function(c){var v=o[c.charAt(0)].drawn;if(v!==void 0){var u=c.substr(1).match(e.paramRE);if(!(!u||u.length<v)){var h=u[v],d=l?h:r.cleanNumber(h);s.push(d)}}}),s},t.getDataToPixel=function(n,o,l,s){var f=n._fullLayout._size,c;if(o)if(s==="domain")c=function(u){return o._length*(l?1-u:u)+o._offset};else{var v=t.shapePositionToRange(o);c=function(u){return o._offset+o.r2p(v(u,!0))},o.type==="date"&&(c=t.decodeDate(c))}else l?c=function(u){return f.t+f.h*(1-u)}:c=function(u){return f.l+f.w*u};return c},t.getPixelToData=function(n,o,l,s){var f=n._fullLayout._size,c;if(o)if(s==="domain")c=function(u){var h=(u-o._offset)/o._length;return l?1-h:h};else{var v=t.rangeToShapePosition(o);c=function(u){return v(o.p2r(u-o._offset))}}else l?c=function(u){return 1-(u-f.t)/f.h}:c=function(u){return(u-f.l)/f.w};return c},t.roundPositionForSharpStrokeRendering=function(n,o){var l=Math.round(o%2)===1,s=Math.round(n);return l?s+.5:s},t.makeShapesOptionsAndPlotinfo=function(n,o){var l=n._fullLayout.shapes[o]||{},s=n._fullLayout._plots[l.xref+l.yref],f=!!s;return f?s._hadPlotinfo=!0:(s={},l.xref&&l.xref!=="paper"&&(s.xaxis=n._fullLayout[l.xref+"axis"]),l.yref&&l.yref!=="paper"&&(s.yaxis=n._fullLayout[l.yref+"axis"])),s.xsizemode=l.xsizemode,s.ysizemode=l.ysizemode,s.xanchor=l.xanchor,s.yanchor=l.yanchor,{options:l,plotinfo:s}},t.makeSelectionsOptionsAndPlotinfo=function(n,o){var l=n._fullLayout.selections[o]||{},s=n._fullLayout._plots[l.xref+l.yref],f=!!s;return f?s._hadPlotinfo=!0:(s={},l.xref&&(s.xaxis=n._fullLayout[l.xref+"axis"]),l.yref&&(s.yaxis=n._fullLayout[l.yref+"axis"])),{options:l,plotinfo:s}},t.getPathString=function(n,o){var l=o.type,s=a.getRefType(o.xref),f=a.getRefType(o.yref),c=a.getFromId(n,o.xref),v=a.getFromId(n,o.yref),u=n._fullLayout._size,h,d,p,y,m,b,w,g;if(c?s==="domain"?d=function($){return c._offset+c._length*$}:(h=t.shapePositionToRange(c),d=function($){return c._offset+c.r2p(h($,!0))}):d=function($){return u.l+u.w*$},v?f==="domain"?y=function($){return v._offset+v._length*(1-$)}:(p=t.shapePositionToRange(v),y=function($){return v._offset+v.r2p(p($,!0))}):y=function($){return u.t+u.h*(1-$)},l==="path")return c&&c.type==="date"&&(d=t.decodeDate(d)),v&&v.type==="date"&&(y=t.decodeDate(y)),i(o,d,y);if(o.xsizemode==="pixel"){var x=d(o.xanchor);m=x+o.x0,b=x+o.x1}else m=d(o.x0),b=d(o.x1);if(o.ysizemode==="pixel"){var _=y(o.yanchor);w=_-o.y0,g=_-o.y1}else w=y(o.y0),g=y(o.y1);if(l==="line")return"M"+m+","+w+"L"+b+","+g;if(l==="rect")return"M"+m+","+w+"H"+b+"V"+g+"H"+m+"Z";var T=(m+b)/2,k=(w+g)/2,S=Math.abs(T-m),A=Math.abs(k-w),D="A"+S+","+A,M=T+S+","+k,C=T+","+(k-A);return"M"+M+D+" 0 1,1 "+C+D+" 0 0,1 "+M+"Z"};function i(n,o,l){var s=n.path,f=n.xsizemode,c=n.ysizemode,v=n.xanchor,u=n.yanchor;return s.replace(e.segmentRE,function(h){var d=0,p=h.charAt(0),y=e.paramIsX[p],m=e.paramIsY[p],b=e.numParams[p],w=h.substr(1).replace(e.paramRE,function(g){return y[d]?f==="pixel"?g=o(v)+Number(g):g=o(g):m[d]&&(c==="pixel"?g=l(u)-Number(g):g=l(g)),d++,d>b&&(g="X"),g});return d>b&&(w=w.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+h)),p+w})}})(yn);var jw=Ze,pg=ve.exports,Cn=Mt.exports,R$=mn.readPaths,E$=lp,Gw=un.clearOutlineControllers,Bu=rt.exports,sp=_t.exports,z$=At.arrayEditor,mg=ba.exports,yg=wi,ji=Rc,kr=yn,Rd=kr.getPathString,Uw={draw:fp,drawOne:Vw,eraseActiveShape:F$};function fp(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&&Vw(t,i)}function Is(t){return!!t._fullLayout._outlining}function Ec(t){return!t._context.edits.shapePosition}function Vw(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=kr.makeShapesOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input||a.visible===!1)return;if(a.layer!=="below")o(t._fullLayout._shapeUpperLayer);else if(a.xref==="paper"||a.yref==="paper")o(t._fullLayout._shapeLowerLayer);else if(i._hadPlotinfo){var n=i.mainplotinfo||i;o(n.shapelayer)}else o(t._fullLayout._shapeLowerLayer);function o(l){var s=Rd(t,a),f={"data-index":e,"fill-rule":a.fillrule,d:s},c=a.opacity,v=a.fillcolor,u=a.line.width?a.line.color:"rgba(0,0,0,0)",h=a.line.width,d=a.line.dash;!h&&a.editable===!0&&(h=5,d="solid");var p=s[s.length-1]!=="Z",y=Ec(t)&&a.editable&&t._fullLayout._activeShapeIndex===e;y&&(v=p?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,c=t._fullLayout.activeshape.opacity);var m=l.append("path").attr(f).style("opacity",c).call(Bu.stroke,u).call(Bu.fill,v).call(sp.dashLine,d,h);Xw(m,t,a);var b;if((y||t._context.edits.shapePosition)&&(b=z$(t.layout,"shapes",a)),y){m.style({cursor:"move"});var w={element:m.node(),plotinfo:i,gd:t,editHelpers:b,isActiveShape:!0},g=R$(s,t);E$(g,m,w)}else t._context.edits.shapePosition?I$(t,m,a,e,l,b):a.editable===!0&&m.style("pointer-events",p||Bu.opacity(v)*c<=.5?"stroke":"all");m.node().addEventListener("click",function(){return N$(t,m)})}}function Xw(t,e,r){var a=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");sp.setClipUrl(t,a?"clip"+e._fullLayout._uid+a:null,e)}function I$(t,e,r,a,i,n){var o=10,l=10,s=r.xsizemode==="pixel",f=r.ysizemode==="pixel",c=r.type==="line",v=r.type==="path",u=n.modifyItem,h,d,p,y,m,b,w,g,x,_,T,k,S,A,D,M=Cn.getFromId(t,r.xref),C=Cn.getRefType(r.xref),$=Cn.getFromId(t,r.yref),F=Cn.getRefType(r.yref),R=kr.getDataToPixel(t,M,!1,C),P=kr.getDataToPixel(t,$,!0,F),E=kr.getPixelToData(t,M,!1,C),L=kr.getPixelToData(t,$,!0,F),z=U(),I={element:z.node(),gd:t,prepFn:B,doneFn:Y,clickFn:Z},H;mg.init(I),z.node().onmousemove=X;function U(){return c?O():e}function O(){var le=10,oe=Math.max(r.line.width,le),ue=i.append("g").attr("data-index",a);ue.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":oe,"stroke-opacity":"0"});var Se={"fill-opacity":"0"},he=Math.max(oe/2,le);return ue.append("circle").attr({"data-line-point":"start-point",cx:s?R(r.xanchor)+r.x0:R(r.x0),cy:f?P(r.yanchor)-r.y0:P(r.y0),r:he}).style(Se).classed("cursor-grab",!0),ue.append("circle").attr({"data-line-point":"end-point",cx:s?R(r.xanchor)+r.x1:R(r.x1),cy:f?P(r.yanchor)-r.y1:P(r.y1),r:he}).style(Se).classed("cursor-grab",!0),ue}function X(le){if(Is(t)){H=null;return}if(c)le.target.tagName==="path"?H="move":H=le.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var oe=I.element.getBoundingClientRect(),ue=oe.right-oe.left,Se=oe.bottom-oe.top,he=le.clientX-oe.left,ye=le.clientY-oe.top,ke=!v&&ue>o&&Se>l&&!le.shiftKey?mg.getCursor(he/ue,1-ye/Se):"move";yg(e,ke),H=ke.split("-")[0]}}function B(le){Is(t)||(s&&(m=R(r.xanchor)),f&&(b=P(r.yanchor)),r.type==="path"?D=r.path:(h=s?r.x0:R(r.x0),d=f?r.y0:P(r.y0),p=s?r.x1:R(r.x1),y=f?r.y1:P(r.y1)),h<p?(x=h,S="x0",_=p,A="x1"):(x=p,S="x1",_=h,A="x0"),!f&&d<y||f&&d>y?(w=d,T="y0",g=y,k="y1"):(w=y,T="y1",g=d,k="y0"),X(le),ae(i,r),de(e,r,t),I.moveFn=H==="move"?q:W,I.altKey=le.altKey)}function Y(){Is(t)||(yg(e),ne(i),Xw(e,t,r),jw.call("_guiRelayout",t,n.getUpdateObj()))}function Z(){Is(t)||ne(i)}function q(le,oe){if(r.type==="path"){var ue=function(ye){return ye},Se=ue,he=ue;s?u("xanchor",r.xanchor=E(m+le)):(Se=function(ke){return E(R(ke)+le)},M&&M.type==="date"&&(Se=kr.encodeDate(Se))),f?u("yanchor",r.yanchor=L(b+oe)):(he=function(ke){return L(P(ke)+oe)},$&&$.type==="date"&&(he=kr.encodeDate(he))),u("path",r.path=gg(D,Se,he))}else s?u("xanchor",r.xanchor=E(m+le)):(u("x0",r.x0=E(h+le)),u("x1",r.x1=E(p+le))),f?u("yanchor",r.yanchor=L(b+oe)):(u("y0",r.y0=L(d+oe)),u("y1",r.y1=L(y+oe)));e.attr("d",Rd(t,r)),ae(i,r)}function W(le,oe){if(v){var ue=function(se){return se},Se=ue,he=ue;s?u("xanchor",r.xanchor=E(m+le)):(Se=function(ce){return E(R(ce)+le)},M&&M.type==="date"&&(Se=kr.encodeDate(Se))),f?u("yanchor",r.yanchor=L(b+oe)):(he=function(ce){return L(P(ce)+oe)},$&&$.type==="date"&&(he=kr.encodeDate(he))),u("path",r.path=gg(D,Se,he))}else if(c){if(H==="resize-over-start-point"){var ye=h+le,ke=f?d-oe:d+oe;u("x0",r.x0=s?ye:E(ye)),u("y0",r.y0=f?ke:L(ke))}else if(H==="resize-over-end-point"){var te=p+le,J=f?y-oe:y+oe;u("x1",r.x1=s?te:E(te)),u("y1",r.y1=f?J:L(J))}}else{var _e=function(se){return H.indexOf(se)!==-1},pe=_e("n"),Le=_e("s"),Ie=_e("w"),Pe=_e("e"),Be=pe?w+oe:w,re=Le?g+oe:g,De=Ie?x+le:x,Ce=Pe?_+le:_;f&&(pe&&(Be=w-oe),Le&&(re=g-oe)),(!f&&re-Be>l||f&&Be-re>l)&&(u(T,r[T]=f?Be:L(Be)),u(k,r[k]=f?re:L(re))),Ce-De>o&&(u(S,r[S]=s?De:E(De)),u(A,r[A]=s?Ce:E(Ce)))}e.attr("d",Rd(t,r)),ae(i,r)}function ae(le,oe){(s||f)&&ue();function ue(){var Se=oe.type!=="path",he=le.selectAll(".visual-cue").data([0]),ye=1;he.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ye}).classed("visual-cue",!0);var ke=R(s?oe.xanchor:pg.midRange(Se?[oe.x0,oe.x1]:kr.extractPathCoords(oe.path,ji.paramIsX))),te=P(f?oe.yanchor:pg.midRange(Se?[oe.y0,oe.y1]:kr.extractPathCoords(oe.path,ji.paramIsY)));if(ke=kr.roundPositionForSharpStrokeRendering(ke,ye),te=kr.roundPositionForSharpStrokeRendering(te,ye),s&&f){var J="M"+(ke-1-ye)+","+(te-1-ye)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";he.attr("d",J)}else if(s){var _e="M"+(ke-1-ye)+","+(te-9-ye)+"v18 h2 v-18 Z";he.attr("d",_e)}else{var pe="M"+(ke-9-ye)+","+(te-1-ye)+"h18 v2 h-18 Z";he.attr("d",pe)}}}function ne(le){le.selectAll(".visual-cue").remove()}function de(le,oe,ue){var Se=oe.xref,he=oe.yref,ye=Cn.getFromId(ue,Se),ke=Cn.getFromId(ue,he),te="";Se!=="paper"&&!ye.autorange&&(te+=Se),he!=="paper"&&!ke.autorange&&(te+=he),sp.setClipUrl(le,te?"clip"+ue._fullLayout._uid+te:null,ue)}}function gg(t,e,r){return t.replace(ji.segmentRE,function(a){var i=0,n=a.charAt(0),o=ji.paramIsX[n],l=ji.paramIsY[n],s=ji.numParams[n],f=a.substr(1).replace(ji.paramRE,function(c){return i>=s||(o[i]?c=e(c):l[i]&&(c=r(c)),i++),c});return n+f})}function N$(t,e){if(!!Ec(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeShapeIndex){bg(t);return}t._fullLayout._activeShapeIndex=a,t._fullLayout._deactivateShape=bg,fp(t)}}}function bg(t){if(!!Ec(t)){var e=t._fullLayout._activeShapeIndex;e>=0&&(Gw(t),delete t._fullLayout._activeShapeIndex,fp(t))}}function F$(t){if(!!Ec(t)){Gw(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,jw.call("_guiRelayout",t,{shapes:a})}}}var ta=Ze,Ww=Ut.exports,Yw=Vt,bt=rp,H$=Uw.eraseActiveShape,Yn=ve.exports,pt=Yn._,xt=tp.exports={};xt.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:bt.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};Yn.notifier(pt(t,"Taking snapshot - this may take a few seconds"),"long"),r.format!=="svg"&&Yn.isIE()&&(Yn.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])}),ta.call("downloadImage",t,r).then(function(a){Yn.notifier(pt(t,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){Yn.notifier(pt(t,"Sorry, there was a problem downloading your snapshot!"),"long")})}};xt.sendDataToCloud={name:"sendDataToCloud",title:function(t){return pt(t,"Edit in Chart Studio")},icon:bt.disk,click:function(t){Ww.sendDataToCloud(t)}};xt.editInChartStudio={name:"editInChartStudio",title:function(t){return pt(t,"Edit in Chart Studio")},icon:bt.pencil,click:function(t){Ww.sendDataToCloud(t)}};xt.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return pt(t,"Zoom")},attr:"dragmode",val:"zoom",icon:bt.zoombox,click:yr};xt.pan2d={name:"pan2d",_cat:"pan",title:function(t){return pt(t,"Pan")},attr:"dragmode",val:"pan",icon:bt.pan,click:yr};xt.select2d={name:"select2d",_cat:"select",title:function(t){return pt(t,"Box Select")},attr:"dragmode",val:"select",icon:bt.selectbox,click:yr};xt.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return pt(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:bt.lasso,click:yr};xt.drawclosedpath={name:"drawclosedpath",title:function(t){return pt(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:bt.drawclosedpath,click:yr};xt.drawopenpath={name:"drawopenpath",title:function(t){return pt(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:bt.drawopenpath,click:yr};xt.drawline={name:"drawline",title:function(t){return pt(t,"Draw line")},attr:"dragmode",val:"drawline",icon:bt.drawline,click:yr};xt.drawrect={name:"drawrect",title:function(t){return pt(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:bt.drawrect,click:yr};xt.drawcircle={name:"drawcircle",title:function(t){return pt(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:bt.drawcircle,click:yr};xt.eraseshape={name:"eraseshape",title:function(t){return pt(t,"Erase active shape")},icon:bt.eraseshape,click:H$};xt.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:bt.zoom_plus,click:yr};xt.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:bt.zoom_minus,click:yr};xt.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return pt(t,"Autoscale")},attr:"zoom",val:"auto",icon:bt.autoscale,click:yr};xt.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return pt(t,"Reset axes")},attr:"zoom",val:"reset",icon:bt.home,click:yr};xt.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return pt(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:bt.tooltip_basic,gravity:"ne",click:yr};xt.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:bt.tooltip_compare,gravity:"ne",click:yr};function yr(t,e){var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o={},l=Yw.list(t,null,!0),s=n._cartesianSpikesEnabled,f,c;if(a==="zoom"){var v=i==="in"?.5:2,u=(1+v)/2,h=(1-v)/2,d;for(c=0;c<l.length;c++)if(f=l[c],!f.fixedrange)if(d=f._name,i==="auto")o[d+".autorange"]=!0;else if(i==="reset"){if(f._rangeInitial===void 0)o[d+".autorange"]=!0;else{var p=f._rangeInitial.slice();o[d+".range[0]"]=p[0],o[d+".range[1]"]=p[1]}f._showSpikeInitial!==void 0&&(o[d+".showspikes"]=f._showSpikeInitial,s==="on"&&!f._showSpikeInitial&&(s="off"))}else{var y=[f.r2l(f.range[0]),f.r2l(f.range[1])],m=[u*y[0]+h*y[1],u*y[1]+h*y[0]];o[d+".range[0]"]=f.l2r(m[0]),o[d+".range[1]"]=f.l2r(m[1])}}else a==="hovermode"&&(i==="x"||i==="y")&&(i=n._isHoriz?"y":"x",r.setAttribute("data-val",i)),o[a]=i;n._cartesianSpikesEnabled=s,ta.call("_guiRelayout",t,o)}xt.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return pt(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:bt.zoombox,click:zc};xt.pan3d={name:"pan3d",_cat:"pan",title:function(t){return pt(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:bt.pan,click:zc};xt.orbitRotation={name:"orbitRotation",title:function(t){return pt(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:bt["3d_rotate"],click:zc};xt.tableRotation={name:"tableRotation",title:function(t){return pt(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:bt["z-axis"],click:zc};function zc(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout._subplots.gl3d||[],o={},l=a.split("."),s=0;s<n.length;s++)o[n[s]+"."+l[1]]=i;var f=i==="pan"?i:"zoom";o.dragmode=f,ta.call("_guiRelayout",t,o)}xt.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return pt(t,"Reset camera to default")},attr:"resetDefault",icon:bt.home,click:cp};xt.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return pt(t,"Reset camera to last save")},attr:"resetLastSave",icon:bt.movie,click:cp};function cp(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=a==="resetLastSave",n=a==="resetDefault",o=t._fullLayout,l=o._subplots.gl3d||[],s={},f=0;f<l.length;f++){var c=l[f],v=c+".camera",u=c+".aspectratio",h=c+".aspectmode",d=o[c]._scene,p;i?(s[v+".up"]=d.viewInitial.up,s[v+".eye"]=d.viewInitial.eye,s[v+".center"]=d.viewInitial.center,p=!0):n&&(s[v+".up"]=null,s[v+".eye"]=null,s[v+".center"]=null,p=!0),p&&(s[u+".x"]=d.viewInitial.aspectratio.x,s[u+".y"]=d.viewInitial.aspectratio.y,s[u+".z"]=d.viewInitial.aspectratio.z,s[h]=d.viewInitial.aspectmode)}ta.call("_guiRelayout",t,s)}xt.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:bt.tooltip_basic,gravity:"ne",click:O$};function qw(t,e){var r=e.currentTarget,a=r._previousVal,i=t._fullLayout,n=i._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],l={},s={};if(a)s=a,r._previousVal=null;else{for(var f=0;f<n.length;f++){var c=n[f],v=i[c],u=c+".hovermode";l[u]=v.hovermode,s[u]=!1;for(var h=0;h<3;h++){var d=o[h],p=c+"."+d+".showspikes";s[p]=!1,l[p]=v[d].showspikes}}r._previousVal=l}return s}function O$(t,e){var r=qw(t,e);ta.call("_guiRelayout",t,r)}xt.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:bt.zoom_plus,click:up};xt.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:bt.zoom_minus,click:up};xt.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return pt(t,"Reset")},attr:"reset",val:null,icon:bt.autoscale,click:up};xt.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:bt.tooltip_basic,gravity:"ne",click:vp};function up(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;ta.call("_guiRelayout",t,s+".projection.scale",v)}}a==="reset"&&Gf(t,"geo")}xt.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:bt.tooltip_basic,gravity:"ne",click:vp};xt.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:bt.tooltip_basic,gravity:"ne",click:vp};function Zw(t){var e=t._fullLayout;return e.hovermode?!1:e._has("cartesian")?e._isHoriz?"y":"x":"closest"}function vp(t){var e=Zw(t);ta.call("_guiRelayout",t,"hovermode",e)}xt.resetViewSankey={name:"resetSankeyGroup",title:function(t){return pt(t,"Reset view")},icon:bt.home,click:function(t){for(var e={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<t._fullData.length;r++){var a=t._fullData[r]._viewInitial;e["node.groups"].push(a.node.groups.slice()),e["node.x"].push(a.node.x.slice()),e["node.y"].push(a.node.y.slice())}ta.call("restyle",t,e)}};xt.toggleHover={name:"toggleHover",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:bt.tooltip_basic,gravity:"ne",click:function(t,e){var r=qw(t,e);r.hovermode=Zw(t),ta.call("_guiRelayout",t,r)}};xt.resetViews={name:"resetViews",title:function(t){return pt(t,"Reset views")},icon:bt.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),yr(t,e),r.setAttribute("data-attr","resetLastSave"),cp(t,e),Gf(t,"geo"),Gf(t,"mapbox")}};xt.toggleSpikelines={name:"toggleSpikelines",title:function(t){return pt(t,"Toggle Spike Lines")},icon:bt.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled=r==="on"?"off":"on",ta.call("_guiRelayout",t,B$(t))}};function B$(t){for(var e=t._fullLayout,r=e._cartesianSpikesEnabled==="on",a=Yw.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}xt.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return pt(t,"Reset view")},attr:"reset",icon:bt.home,click:function(t){Gf(t,"mapbox")}};xt.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:bt.zoom_plus,click:Kw};xt.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:bt.zoom_minus,click:Kw};function Kw(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}ta.call("_guiRelayout",t,l)}function Gf(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]}ta.call("_guiRelayout",t,i)}var Qw=tp.exports,j$=Object.keys(Qw),Jw=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],eT=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(Jw),to=[],G$=function(t){if(eT.indexOf(t._cat||t.name)===-1){var e=t.name,r=(t._cat||t.name).toLowerCase();to.indexOf(e)===-1&&to.push(e),to.indexOf(r)===-1&&to.push(r)}};j$.forEach(function(t){G$(Qw[t])});to.sort();var tT={DRAW_MODES:Jw,backButtons:eT,foreButtons:to},xg=tT,rT={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 *"+xg.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 *"+xg.foreButtons.join("*, *")+"*."].join(" ")}},U$=ve.exports,Xo=rt.exports,V$=At,X$=rT,W$=function(e,r){var a=e.modebar||{},i=V$.newContainer(r,"modebar");function n(l,s){return U$.coerce(a,i,X$,l,s)}n("orientation"),n("bgcolor",Xo.addOpacity(r.paper_bgcolor,.5));var o=Xo.contrast(Xo.rgb(r.modebar.bgcolor));n("color",Xo.addOpacity(o,.3)),n("activecolor",Xo.addOpacity(o,.7)),n("uirevision",r.uirevision),n("add"),n("remove")},dp=nt.exports,Y$=ct,ja=ve.exports,aT=rp,q$=cc.version,Z$=new DOMParser;function iT(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var Ra=iT.prototype;Ra.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,a=this.graphInfo._fullLayout,i="modebar-"+a._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",e=e.reverse());var n=a.modebar,o=r.displayModeBar==="hover"?".js-plotly-plot .plotly:hover ":"";ja.deleteRelatedStyleRule(i),ja.addRelatedStyleRule(i,o+"#"+i+" .modebar-group","background-color: "+n.bgcolor),ja.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+n.color),ja.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+n.activecolor),ja.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+n.activecolor);var l=!this.hasButtons(e),s=this.hasLogo!==r.displaylogo,f=this.locale!==r.locale;if(this.locale=r.locale,(l||s||f)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton()};Ra.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)})};Ra.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t};Ra.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&&dp.select(r).classed("active",!0);var o=t.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||aT.question)),r.setAttribute("data-gravity",t.gravity||"n"),r};Ra.createIcon=function(t){var e=Y$(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=Z$.parseFromString(t.svg,"application/xml");a=n.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};Ra.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=dp.select(a);if(o)n===r&&l.classed("active",!l.classed("active"));else{var s=n===null?n:ja.nestedProperty(e,n).get();l.classed("active",s===i)}})};Ra.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 K$(t){return t+" (v"+q$+")"}Ra.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",K$(ja._(this.graphInfo,"Produced with Plotly.js"))),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(aT.newplotlylogo)),t.appendChild(e),t};Ra.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};Ra.destroy=function(){ja.removeElement(this.container.querySelector(".modebar")),ja.deleteRelatedStyleRule(this._uid)};function Q$(t,e){var r=t._fullLayout,a=new iT({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&dp.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}var J$=Q$,e3=Vt,_g=pr,Ed=Ze,t3=ea.isUnifiedHover,r3=J$,Uf=tp.exports,a3=tT.DRAW_MODES,i3=ve.exports.extendDeep,n3=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=u3(n):!a.displayModeBar&&a.watermark?o=[]:o=o3(e),i?i.update(e,o):r._modeBar=r3(e,o)};function o3(t){var e=t._fullLayout,r=t._fullData,a=t._context;function i(E,L){if(typeof L=="string"){if(L.toLowerCase()===E.toLowerCase())return!0}else{var z=L.name,I=L._cat||L.name;if(z===E||I===E.toLowerCase())return!0}return!1}var n=e.modebar.add;typeof n=="string"&&(n=[n]);var o=e.modebar.remove;typeof o=="string"&&(o=[o]);var l=a.modeBarButtonsToAdd.concat(n.filter(function(E){for(var L=0;L<a.modeBarButtonsToRemove.length;L++)if(i(E,a.modeBarButtonsToRemove[L]))return!1;return!0})),s=a.modeBarButtonsToRemove.concat(o.filter(function(E){for(var L=0;L<a.modeBarButtonsToAdd.length;L++)if(i(E,a.modeBarButtonsToAdd[L]))return!1;return!0})),f=e._has("cartesian"),c=e._has("gl3d"),v=e._has("geo"),u=e._has("pie"),h=e._has("funnelarea"),d=e._has("gl2d"),p=e._has("ternary"),y=e._has("mapbox"),m=e._has("polar"),b=e._has("smith"),w=e._has("sankey"),g=l3(e),x=t3(e.hovermode),_=[];function T(E){if(!!E.length){for(var L=[],z=0;z<E.length;z++){for(var I=E[z],H=Uf[I],U=H.name.toLowerCase(),O=(H._cat||H.name).toLowerCase(),X=!1,B=0;B<s.length;B++){var Y=s[B].toLowerCase();if(Y===U||Y===O){X=!0;break}}X||L.push(Uf[I])}_.push(L)}}var k=["toImage"];a.showEditInChartStudio?k.push("editInChartStudio"):a.showSendToCloud&&k.push("sendDataToCloud"),T(k);var S=[],A=[],D=[],M=[];(f||d||u||h||p)+v+c+y+m+b>1?(A=["toggleHover"],D=["resetViews"]):v?(S=["zoomInGeo","zoomOutGeo"],A=["hoverClosestGeo"],D=["resetGeo"]):c?(A=["hoverClosest3d"],D=["resetCameraDefault3d","resetCameraLastSave3d"]):y?(S=["zoomInMapbox","zoomOutMapbox"],A=["toggleHover"],D=["resetViewMapbox"]):d?A=["hoverClosestGl2d"]:u?A=["hoverClosestPie"]:w?(A=["hoverClosestCartesian","hoverCompareCartesian"],D=["resetViewSankey"]):A=["toggleHover"],f&&(A=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(f3(r)||x)&&(A=[]),(f||d)&&!g&&(S=["zoomIn2d","zoomOut2d","autoScale2d"],D[0]!=="resetViews"&&(D=["resetScale2d"])),c?M=["zoom3d","pan3d","orbitRotation","tableRotation"]:(f||d)&&!g||p?M=["zoom2d","pan2d"]:y||v?M=["pan2d"]:m&&(M=["zoom2d"]),s3(r)&&M.push("select2d","lasso2d");var C=[],$=function(E){C.indexOf(E)===-1&&A.indexOf(E)!==-1&&C.push(E)};if(Array.isArray(l)){for(var F=[],R=0;R<l.length;R++){var P=l[R];typeof P=="string"?(P=P.toLowerCase(),a3.indexOf(P)!==-1?(e._has("mapbox")||e._has("cartesian"))&&M.push(P):P==="togglespikelines"?$("toggleSpikelines"):P==="togglehover"?$("toggleHover"):P==="hovercompare"?$("hoverCompareCartesian"):P==="hoverclosest"?($("hoverClosestCartesian"),$("hoverClosestGeo"),$("hoverClosest3d"),$("hoverClosestGl2d"),$("hoverClosestPie")):P==="v1hovermode"&&($("toggleHover"),$("hoverClosestCartesian"),$("hoverCompareCartesian"),$("hoverClosestGeo"),$("hoverClosest3d"),$("hoverClosestGl2d"),$("hoverClosestPie"))):F.push(P)}l=F}return T(M),T(S.concat(D)),T(C),c3(_,l)}function l3(t){for(var e=e3.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}function s3(t){for(var e=!1,r=0;r<t.length&&!e;r++){var a=t[r];!a._module||!a._module.selectPoints||(Ed.traceIs(a,"scatter-like")?(_g.hasMarkers(a)||_g.hasText(a))&&(e=!0):Ed.traceIs(a,"box-violin")?(a.boxpoints==="all"||a.points==="all")&&(e=!0):e=!0)}return e}function f3(t){for(var e=0;e<t.length;e++)if(!Ed.traceIs(t[e],"noHover"))return!1;return!0}function c3(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 u3(t){for(var e=i3([],t),r=0;r<e.length;r++)for(var a=e[r],i=0;i<a.length;i++){var n=a[i];if(typeof n=="string")if(Uf[n]!==void 0)e[r][i]=Uf[n];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return e}var nT={moduleType:"component",name:"modebar",layoutAttributes:rT,supplyLayoutDefaults:W$,manage:n3},qa={},v3=Dr.FROM_BL,oT=function(e,r,a){a===void 0&&(a=v3[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()},Hi=ve.exports,ju=Ql,sa=Vt.id2name,d3=Wa,wg=oT,h3=Hh,p3=Ot.ALMOST_EQUAL,m3=Dr.FROM_BL;qa.handleDefaults=function(t,e,r){var a=r.axIds,i=r.axHasImage,n=e._axisConstraintGroups=[],o=e._axisMatchGroups=[],l,s,f,c,v,u,h,d;for(l=0;l<a.length;l++)c=sa(a[l]),v=t[c],u=e[c],y3(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[sa(f)][S]=s}}for(p(o,"_matchGroup"),l=0;l<n.length;l++){s=n[l];for(f in s)if(u=e[sa(f)],u.fixedrange){for(var y in s){var m=sa(y);(t[m]||{}).fixedrange===!1&&Hi.warn("fixedrange was specified as false for axis "+m+" but was overridden because another axis in its constraint group has fixedrange true"),e[m].fixedrange=!0}break}}for(l=0;l<n.length;){s=n[l];for(f in s){u=e[sa(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,g=!1;function x(){d=u[h],h==="rangebreaks"&&(g=u._hasDayOfWeekBreaks)}for(l=0;l<o.length;l++){s=o[l];for(var _=0;_<b.length;_++){h=b[_],d=null;var T;for(f in s)if(c=sa(f),v=t[c],u=e[c],h in u){if(!u.matches&&(T=u,h in v)){x();break}d===null&&h in v&&x()}if(h==="range"&&d&&(w=!0),h==="autorange"&&d===null&&w&&(d=!1),d===null&&h in T&&(d=T[h]),d!==null)for(f in s)u=e[sa(f)],u[h]=h==="range"?d.slice():d,h==="rangebreaks"&&(u._hasDayOfWeekBreaks=g,h3(u,e))}}};function y3(t,e,r){var a=r.axIds,i=r.layoutOut,n=r.hasImage,o=i._axisConstraintGroups,l=i._axisMatchGroups,s=e._id,f=s.charAt(0),c=((i._splomAxes||{})[f]||{})[s]||{},v=e._id,u=v.charAt(0)==="x";e._matchGroup=null,e._constraintGroup=null;function h(M,C){return Hi.coerce(t,e,d3,M,C)}h("constrain",n?"domain":"range"),Hi.coerce(t,e,{constraintoward:{valType:"enumerated",values:u?["left","center","right"]:["bottom","middle","top"],dflt:u?"center":"middle"}},"constraintoward");var d=e.type,p,y,m=[];for(p=0;p<a.length;p++)if(y=a[p],y!==v){var b=i[sa(y)];b.type===d&&m.push(y)}var w=lT(o,v);if(w){var g=[];for(p=0;p<m.length;p++)y=m[p],w[y]||g.push(y);m=g}var x=m.length,_,T;x&&(t.matches||c.matches)&&(_=Hi.coerce(t,e,{matches:{valType:"enumerated",values:m,dflt:m.indexOf(c.matches)!==-1?c.matches:void 0}},"matches"));var k=n&&!u?e.anchor:void 0;if(x&&!_&&(t.scaleanchor||k)&&(T=Hi.coerce(t,e,{scaleanchor:{valType:"enumerated",values:m}},"scaleanchor",k)),_){e._matchGroup=Gu(l,v,_,1);var S=i[sa(_)],A=Tg(i,e)/Tg(i,S);u!==(_.charAt(0)==="x")&&(A=(u?"x":"y")+A),Gu(o,v,_,A)}else t.matches&&a.indexOf(t.matches)!==-1&&Hi.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(T){var D=h("scaleratio");D||(D=e.scaleratio=1),Gu(o,v,T,D)}else t.scaleanchor&&a.indexOf(t.scaleanchor)!==-1&&Hi.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 Tg(t,e){var r=e.domain;return r||(r=t[sa(e.overlaying)].domain),r[1]-r[0]}function lT(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function Gu(t,e,r,a){var i,n,o,l,s,f=lT(t,e);f===null?(f={},f[e]=1,s=t.length,t.push(f)):s=t.indexOf(f);var c=Object.keys(f);for(i=0;i<t.length;i++)if(o=t[i],i!==s&&o[r]){var v=o[r];for(n=0;n<c.length;n++)l=c[n],o[l]=Uu(v,Uu(a,f[l]));t.splice(s,1);return}if(a!==1)for(n=0;n<c.length;n++){var u=c[n];f[u]=Uu(a,f[u])}f[r]=1}function Uu(t,e){var r="",a="",i,n;typeof t=="string"&&(r=t.match(/^[xy]*/)[0],i=r.length,t=+t.substr(i)),typeof e=="string"&&(a=e.match(/^[xy]*/)[0],n=a.length,e=+e.substr(n));var o=t*e;return!i&&!n?o:!i||!n||r.charAt(0)===a.charAt(0)?r+a+t*e:i===n?o:(i>n?r.substr(n):a.substr(i))+o}function g3(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}qa.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=g3(a[i],r);var u=Object.keys(o),h=1/0,d=0,p=1/0,y={},m={},b=!1;for(n=0;n<u.length;n++)l=u[n],m[l]=s=r[sa(l)],s._inputDomain?s.domain=s._inputDomain.slice():s._inputDomain=s.domain.slice(),s._inputRange||(s._inputRange=s.range.slice()),s.setScale(),y[l]=f=Math.abs(s._m)/o[l],h=Math.min(h,f),(s.constrain==="domain"||!s._constraintShrinkable)&&(p=Math.min(p,f)),delete s._constraintShrinkable,d=Math.max(d,f),s.constrain==="domain"&&(b=!0);if(!(h>p3*d&&!b)){for(n=0;n<u.length;n++)if(l=u[n],f=y[l],s=m[l],c=s.constrain,f!==p||c==="domain")if(v=f/p,c==="range")wg(s,v);else{var w=s._inputDomain,g=(s.domain[1]-s.domain[0])/(w[1]-w[0]),x=(s.r2l(s.range[1])-s.r2l(s.range[0]))/(s.r2l(s._inputRange[1])-s.r2l(s._inputRange[0]));if(v/=g,v*x<1){s.domain=s._input.domain=w.slice(),wg(s,v);continue}if(x<1&&(s.range=s._input.range=s._inputRange.slice(),v*=x),s.autorange){var _=s.r2l(s.range[0]),T=s.r2l(s.range[1]),k=(_+T)/2,S=k,A=k,D=Math.abs(T-k),M=k-D*v*1.0001,C=k+D*v*1.0001,$=ju.makePadFn(r,s,0),F=ju.makePadFn(r,s,1);kg(s,v);var R=Math.abs(s._m),P=ju.concatExtremes(e,s),E=P.min,L=P.max,z,I;for(I=0;I<E.length;I++)z=E[I].val-$(E[I])/R,z>M&&z<S&&(S=z);for(I=0;I<L.length;I++)z=L[I].val+F(L[I])/R,z<C&&z>A&&(A=z);var H=(A-S)/(2*D);v/=H,S=s.l2r(S),A=s.l2r(A),s.range=s._input.range=_<T?[S,A]:[A,S]}kg(s,v)}}}};qa.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};qa.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 kg(t,e){var r=t._inputDomain,a=m3[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=nt.exports,r=Ze,a=Ut.exports,i=ve.exports,n=ep,o=rt.exports,l=_t.exports,s=kc,f=nT,c=Mt.exports,v=Dr,u=qa,h=u.enforce,d=u.clean,p=Ql.doAutoRange,y="start",m="middle",b="end";t.layoutStyles=function(M){return i.syncOrAsync([a.doAutoMargin,g],M)};function w(M,C,$){for(var F=0;F<$.length;F++){var R=$[F][0],P=$[F][1];if(!(R[0]>=M[1]||R[1]<=M[0])&&P[0]<C[1]&&P[1]>C[0])return!0}return!1}function g(M){var C=M._fullLayout,$=C._size,F=$.p,R=c.list(M,"",!0),P,E,L,z,I,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(Ne,He,Ae){var Fe=Ne._lw/2;if(Ne._id.charAt(0)==="x"){if(He){if(Ae==="top")return He._offset-F-Fe}else return $.t+$.h*(1-(Ne.position||0))+Fe%1;return He._offset+He._length+F+Fe}if(He){if(Ae==="right")return He._offset+He._length+F+Fe}else return $.l+$.w*(Ne.position||0)+Fe%1;return He._offset-F-Fe}for(P=0;P<R.length;P++){z=R[P];var O=z._anchorAxis;z._linepositions={},z._lw=l.crispRound(M,z.linewidth,1),z._mainLinePosition=U(z,O,z.side),z._mainMirrorPosition=z.mirror&&O?U(z,O,v.OPPOSITE_SIDE[z.side]):null}var X=[],B=[],Y=[],Z=o.opacity(C.paper_bgcolor)===1&&o.opacity(C.plot_bgcolor)===1&&C.paper_bgcolor===C.plot_bgcolor;for(E in C._plots)if(L=C._plots[E],L.mainplot)L.bg&&L.bg.remove(),L.bg=void 0;else{var q=L.xaxis.domain,W=L.yaxis.domain,ae=L.plotgroup;if(w(q,W,Y)){var ne=ae.node(),de=L.bg=i.ensureSingle(ae,"rect","bg");ne.insertBefore(de.node(),ne.childNodes[0]),B.push(E)}else ae.select("rect.bg").remove(),Y.push([q,W]),Z||(X.push(E),B.push(E))}var le=C._bgLayer.selectAll(".bg").data(X);for(le.enter().append("rect").classed("bg",!0),le.exit().remove(),le.each(function(Ne){C._plots[Ne].bg=e.select(this)}),P=0;P<B.length;P++)L=C._plots[B[P]],I=L.xaxis,H=L.yaxis,L.bg&&I._offset!==void 0&&H._offset!==void 0&&L.bg.call(l.setRect,I._offset-F,H._offset-F,I._length+2*F,H._length+2*F).call(o.fill,C.plot_bgcolor).style("stroke-width",0);if(!C._hasOnlyLargeSploms)for(E in C._plots){L=C._plots[E],I=L.xaxis,H=L.yaxis;var oe=L.clipId="clip"+C._uid+E+"plot",ue=i.ensureSingleById(C._clips,"clipPath",oe,function(Ne){Ne.classed("plotclip",!0).append("rect")});L.clipRect=ue.select("rect").attr({width:I._length,height:H._length}),l.setTranslate(L.plot,I._offset,H._offset);var Se,he;L._hasClipOnAxisFalse?(Se=null,he=oe):(Se=oe,he=null),l.setClipUrl(L.plot,Se,M),L.layerClipId=he}var ye,ke,te,J,_e,pe,Le,Ie,Pe,Be,re,De,Ce;function se(Ne){return"M"+ye+","+Ne+"H"+ke}function ce(Ne){return"M"+I._offset+","+Ne+"h"+I._length}function Re(Ne){return"M"+Ne+","+Ie+"V"+Le}function we(Ne){return"M"+Ne+","+H._offset+"v"+H._length}function xe(Ne,He,Ae){if(!Ne.showline||E!==Ne._mainSubplot)return"";if(!Ne._anchorAxis)return Ae(Ne._mainLinePosition);var Fe=He(Ne._mainLinePosition);return Ne.mirror&&(Fe+=He(Ne._mainMirrorPosition)),Fe}for(E in C._plots){L=C._plots[E],I=L.xaxis,H=L.yaxis;var be="M0,0";x(I,E)&&(_e=T(I,"left",H,R),ye=I._offset-(_e?F+_e:0),pe=T(I,"right",H,R),ke=I._offset+I._length+(pe?F+pe:0),te=U(I,H,"bottom"),J=U(I,H,"top"),Ce=!I._anchorAxis||E!==I._mainSubplot,Ce&&(I.mirror==="allticks"||I.mirror==="all")&&(I._linepositions[E]=[te,J]),be=xe(I,se,ce),Ce&&I.showline&&(I.mirror==="all"||I.mirror==="allticks")&&(be+=se(te)+se(J)),L.xlines.style("stroke-width",I._lw+"px").call(o.stroke,I.showline?I.linecolor:"rgba(0,0,0,0)")),L.xlines.attr("d",be);var ze="M0,0";x(H,E)&&(re=T(H,"bottom",I,R),Le=H._offset+H._length+(re?F:0),De=T(H,"top",I,R),Ie=H._offset-(De?F:0),Pe=U(H,I,"left"),Be=U(H,I,"right"),Ce=!H._anchorAxis||E!==H._mainSubplot,Ce&&(H.mirror==="allticks"||H.mirror==="all")&&(H._linepositions[E]=[Pe,Be]),ze=xe(H,Re,we),Ce&&H.showline&&(H.mirror==="all"||H.mirror==="allticks")&&(ze+=Re(Pe)+Re(Be)),L.ylines.style("stroke-width",H._lw+"px").call(o.stroke,H.showline?H.linecolor:"rgba(0,0,0,0)")),L.ylines.attr("d",ze)}return c.makeClipPaths(M),a.previousPromises(M)}function x(M,C){return(M.ticks||M.showline)&&(C===M._mainSubplot||M.mirror==="all"||M.mirror==="allticks")}function _(M,C,$){if(!$.showline||!$._lw)return!1;if($.mirror==="all"||$.mirror==="allticks")return!0;var F=$._anchorAxis;if(!F)return!1;var R=v.FROM_BL[C];return $.side===C?F.domain[R]===M.domain[R]:$.mirror&&F.domain[1-R]===M.domain[1-R]}function T(M,C,$,F){if(_(M,C,$))return $._lw;for(var R=0;R<F.length;R++){var P=F[R];if(P._mainAxis===$._mainAxis&&_(M,C,P))return P._lw}return 0}t.drawMainTitle=function(M){var C=M._fullLayout,$=A(C),F=D(C);s.draw(M,"gtitle",{propContainer:C,propName:"title.text",placeholder:C._dfltTitle.plot,attributes:{x:k(C,$),y:S(C,F),"text-anchor":$,dy:F}})};function k(M,C){var $=M.title,F=M._size,R=0;switch(C===y?R=$.pad.l:C===b&&(R=-$.pad.r),$.xref){case"paper":return F.l+F.w*$.x+R;case"container":default:return M.width*$.x+R}}function S(M,C){var $=M.title,F=M._size,R=0;if(C==="0em"||!C?R=-$.pad.b:C===v.CAP_SHIFT+"em"&&(R=$.pad.t),$.y==="auto")return F.t/2;switch($.yref){case"paper":return F.t+F.h-F.h*$.y+R;case"container":default:return M.height-M.height*$.y+R}}function A(M){var C=M.title,$=m;return i.isRightAnchor(C)?$=b:i.isLeftAnchor(C)&&($=y),$}function D(M){var C=M.title,$="0em";return i.isTopAnchor(C)?$=v.CAP_SHIFT+"em":i.isMiddleAnchor(C)&&($=v.MID_SHIFT+"em"),$}t.doTraceStyle=function(M){var C=M.calcdata,$=[],F;for(F=0;F<C.length;F++){var R=C[F],P=R[0]||{},E=P.trace||{},L=E._module||{},z=L.arraysToCalcdata;z&&z(R,E);var I=L.editStyle;I&&$.push({fn:I,cd0:P})}if($.length){for(F=0;F<$.length;F++){var H=$[F];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 $=0;$<C._basePlotModules.length;$++){var F=C._basePlotModules[$].updateFx;F&&F(M)}return a.previousPromises(M)},t.doCamera=function(M){for(var C=M._fullLayout,$=C._subplots.gl3d,F=0;F<$.length;F++){var R=C[$[F]],P=R._scene;P.setViewport(R)}},t.drawData=function(M){var C=M._fullLayout;n(M);for(var $=C._basePlotModules,F=0;F<$.length;F++)$[F].plot(M);return t.redrawReglTraces(M),a.style(M),r.getComponentMethod("selections","draw")(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 $=M._fullData,F=[],R=[],P,E;for(C._hasOnlyLargeSploms&&C._splomGrid.draw(),P=0;P<$.length;P++){var L=$[P];L.visible===!0&&L._length!==0&&(L.type==="splom"?C._splomScenes[L.uid].draw():L.type==="scattergl"?i.pushUnique(F,L.xaxis+L.yaxis):L.type==="scatterpolargl"&&i.pushUnique(R,L.subplot))}for(P=0;P<F.length;P++)E=C._plots[F[P]],E._scene&&E._scene.draw();for(P=0;P<R.length;P++)E=C[R[P]]._subplot,E._scene&&E._scene.draw()}},t.doAutoRangeAndConstraints=function(M){for(var C=c.list(M,"",!0),$,F={},R=0;R<C.length;R++)if($=C[R],!F[$._id]){F[$._id]=1,d(M,$),p(M,$);var P=$._matchGroup;if(P)for(var E in P){var L=c.getFromId(M,E);p(M,L,$.range),F[E]=1}}h(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)}})(Dc);var b3=mn.readPaths,x3=lp,sT=un.clearOutlineControllers,Vu=rt.exports,fT=_t.exports,_3=At.arrayEditor,cT=yn,w3=cT.getPathString,uT={draw:Ic,drawOne:vT,activateLastSelection:A3};function Ic(t){var e=t._fullLayout;sT(t),e._selectionLayer.selectAll("path").remove();for(var r in e._plots){var a=e._plots[r].selectionLayer;a&&a.selectAll("path").remove()}for(var i=0;i<e.selections.length;i++)vT(t,i)}function Nc(t){return t._context.editSelection}function vT(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+e+'"]').remove();var r=cT.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input)return;n(t._fullLayout._selectionLayer);function n(o){var l=w3(t,a),s={"data-index":e,"fill-rule":"evenodd",d:l},f=a.opacity,c="rgba(0,0,0,0)",v=a.line.color||Vu.contrast(t._fullLayout.plot_bgcolor),u=a.line.width,h=a.line.dash;u||(u=5,h="solid");var d=Nc(t)&&t._fullLayout._activeSelectionIndex===e;d&&(c=t._fullLayout.activeselection.fillcolor,f=t._fullLayout.activeselection.opacity);for(var p=[],y=1;y>=0;y--){var m=o.append("path").attr(s).style("opacity",y?.1:f).call(Vu.stroke,v).call(Vu.fill,c).call(fT.dashLine,y?"solid":h,y?4+u:u);if(T3(m,t,a),d){var b=_3(t.layout,"selections",a);m.style({cursor:"move"});var w={element:m.node(),plotinfo:i,gd:t,editHelpers:b,isActiveSelection:!0},g=b3(l,t);x3(g,m,w)}else m.style("pointer-events",y?"all":"none");p[y]=m}var x=p[0],_=p[1];_.node().addEventListener("click",function(){return k3(t,x)})}}function T3(t,e,r){var a=r.xref+r.yref;fT.setClipUrl(t,"clip"+e._fullLayout._uid+a,e)}function k3(t,e){if(!!Nc(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeSelectionIndex){zd(t);return}t._fullLayout._activeSelectionIndex=a,t._fullLayout._deactivateSelection=zd,Ic(t)}}}function A3(t){if(!!Nc(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=zd,Ic(t)}}function zd(t){if(!!Nc(t)){var e=t._fullLayout._activeSelectionIndex;e>=0&&(sT(t),delete t._fullLayout._activeSelectionIndex,Ic(t))}}var hp={exports:{}},Xu=pc.dot,Ns=Ot.BADNUM,Vf=hp.exports={};Vf.tester=function(e){var r=e.slice(),a=r[0][0],i=a,n=r[0][1],o=n,l;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),l=1;l<r.length;l++)a=Math.min(a,r[l][0]),i=Math.max(i,r[l][0]),n=Math.min(n,r[l][1]),o=Math.max(o,r[l][1]);var s=!1,f;r.length===5&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(s=!0,f=function(d){return d[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(s=!0,f=function(d){return d[1]===r[0][1]}));function c(d,p){var y=d[0],m=d[1];return!(y===Ns||y<a||y>i||m===Ns||m<n||m>o||p&&f(d))}function v(d,p){var y=d[0],m=d[1];if(y===Ns||y<a||y>i||m===Ns||m<n||m>o)return!1;var b=r.length,w=r[0][0],g=r[0][1],x=0,_,T,k,S,A;for(_=1;_<b;_++)if(T=w,k=g,w=r[_][0],g=r[_][1],S=Math.min(T,w),!(y<S||y>Math.max(T,w)||m>Math.max(k,g)))if(m<Math.min(k,g))y!==S&&x++;else{if(w===T?A=m:A=k+(y-T)*(g-k)/(w-T),m===A)return!(_===1&&p);m<=A&&y!==S&&x++}return x%2===1}var u=!0,h=r[0];for(l=1;l<r.length;l++)if(h[0]!==r[l][0]||h[1]!==r[l][1]){u=!1;break}return{xmin:a,xmax:i,ymin:n,ymax:o,pts:r,contains:s?c:v,isRect:s,degenerate:u}};Vf.isSegmentBent=function(e,r,a,i){var n=e[r],o=[e[a][0]-n[0],e[a][1]-n[1]],l=Xu(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=Xu(v,o),u<0||u>l||Math.abs(Xu(v,f))>i)return!0;return!1};Vf.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||Vf.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 M3={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"},Ag=YA,S3=qA,Dl=Ze,L3=_t.exports.dashStyle,Wo=rt.exports,C3=pa,D3=ea.makeEventData,Jl=pn,$3=Jl.freeMode,P3=Jl.rectMode,$l=Jl.drawMode,pp=Jl.openMode,mp=Jl.selectMode,Mg=yn,Sg=Rc,dT=lp,hT=un.clearOutline,pT=mn,Wu=pT.handleEllipse,R3=pT.readPaths,E3=Iw,z3=Nw,I3=uT.activateLastSelection,bf=ve.exports,N3=bf.sorterAsc,mT=hp.exports,Yo=gc,Yr=Vt.getFromId,F3=ep,H3=Dc.redrawReglTraces,xf=M3,ka=xf.MINSELECT,O3=mT.filter,yp=mT.tester,gp=ip,Lg=gp.p2r,B3=gp.axValue,j3=gp.getTransform;function bp(t){return t.subplot!==void 0}function G3(t,e,r,a,i){var n=!bp(a),o=$3(i),l=P3(i),s=pp(i),f=$l(i),c=mp(i),v=i==="drawline",u=i==="drawcircle",h=v||u,d=a.gd,p=d._fullLayout,y=c&&p.newselection.mode==="immediate"&&n,m=p._zoomlayer,b=a.element.getBoundingClientRect(),w=a.plotinfo,g=j3(w),x=e-b.left,_=r-b.top;p._calcInverseTransform(d);var T=bf.apply3DTransform(p._invTransform)(x,_);x=T[0],_=T[1];var k=p._invScaleX,S=p._invScaleY,A=x,D=_,M="M"+x+","+_,C=a.xaxes[0],$=a.yaxes[0],F=C._length,R=$._length,P=t.altKey&&!($l(i)&&s),E,L,z,I,H,U,O;gT(t,d,a),o&&(E=O3([[x,_]],xf.BENDPX));var X=m.selectAll("path.select-outline-"+w.id).data([1]),B=f?p.newshape:p.newselection,Y=f&&!s?B.fillcolor:"rgba(0,0,0,0)",Z=B.line.color||(n?Wo.contrast(d._fullLayout.plot_bgcolor):"#7f7f7f");X.enter().append("path").attr("class","select-outline select-outline-"+w.id).style({opacity:f?B.opacity/2:1,"stroke-dasharray":L3(B.line.dash,B.line.width),"stroke-width":B.line.width+"px","shape-rendering":"crispEdges"}).call(Wo.stroke,Z).call(Wo.fill,Y).attr("fill-rule","evenodd").classed("cursor-move",!!f).attr("transform",g).attr("d",M+"Z");var q=m.append("path").attr("class","zoombox-corners").style({fill:Wo.background,stroke:Wo.defaultLine,"stroke-width":1}).attr("transform",g).attr("d","M0,0Z"),W=p._uid+xf.SELECTID,ae=[],ne=Fc(d,a.xaxes,a.yaxes,a.subplot);y&&!t.shiftKey&&(a._clearSubplotSelections=function(){if(!!n){var le=C._id,oe=$._id;TT(d,le,oe,ne);for(var ue=(d.layout||{}).selections||[],Se=[],he=!1,ye=0;ye<ue.length;ye++){var ke=p.selections[ye];ke.xref!==le||ke.yref!==oe?Se.push(ue[ye]):he=!0}he&&(d._fullLayout._noEmitSelectedAtStart=!0,Dl.call("_guiRelayout",d,{selections:Se}))}});var de=aP(a);a.moveFn=function(le,oe){a._clearSubplotSelections&&(a._clearSubplotSelections(),a._clearSubplotSelections=void 0),A=Math.max(0,Math.min(F,k*le+x)),D=Math.max(0,Math.min(R,S*oe+_));var ue=Math.abs(A-x),Se=Math.abs(D-_);if(l){var he,ye,ke;if(c){var te=p.selectdirection;switch(te==="any"?Se<Math.min(ue*.6,ka)?he="h":ue<Math.min(Se*.6,ka)?he="v":he="d":he=te,he){case"h":ye=u?R/2:0,ke=R;break;case"v":ye=u?F/2:0,ke=F;break}}if(f)switch(p.newshape.drawdirection){case"vertical":he="h",ye=u?R/2:0,ke=R;break;case"horizontal":he="v",ye=u?F/2:0,ke=F;break;case"ortho":ue<Se?(he="h",ye=_,ke=D):(he="v",ye=x,ke=A);break;default:he="d"}he==="h"?(I=h?Wu(u,[A,ye],[A,ke]):[[x,ye],[x,ke],[A,ke],[A,ye]],I.xmin=h?A:Math.min(x,A),I.xmax=h?A:Math.max(x,A),I.ymin=Math.min(ye,ke),I.ymax=Math.max(ye,ke),q.attr("d","M"+I.xmin+","+(_-ka)+"h-4v"+2*ka+"h4ZM"+(I.xmax-1)+","+(_-ka)+"h4v"+2*ka+"h-4Z")):he==="v"?(I=h?Wu(u,[ye,D],[ke,D]):[[ye,_],[ye,D],[ke,D],[ke,_]],I.xmin=Math.min(ye,ke),I.xmax=Math.max(ye,ke),I.ymin=h?D:Math.min(_,D),I.ymax=h?D:Math.max(_,D),q.attr("d","M"+(x-ka)+","+I.ymin+"v-4h"+2*ka+"v4ZM"+(x-ka)+","+(I.ymax-1)+"v4h"+2*ka+"v-4Z")):he==="d"&&(I=h?Wu(u,[x,_],[A,D]):[[x,_],[x,D],[A,D],[A,_]],I.xmin=Math.min(x,A),I.xmax=Math.max(x,A),I.ymin=Math.min(_,D),I.ymax=Math.max(_,D),q.attr("d","M0,0Z"))}else o&&(E.addPt([A,D]),I=E.filtered);if(a.selectionDefs&&a.selectionDefs.length?(z=bT(a.mergedPolygons,I,P),I.subtract=P,L=xp(a.selectionDefs.concat([I]))):(z=[I],L=yp(I)),dT(_T(z,s),X,a),c){var J=Id(d,!1),_e=J.eventData?J.eventData.points.slice():[];J=Id(d,!1,L,ne,a),L=J.selectionTesters,O=J.eventData;var pe;E?pe=E.filtered:pe=kT(z),Yo.throttle(W,xf.SELECTDELAY,function(){ae=wT(L,ne);for(var Le=ae.slice(),Ie=0;Ie<_e.length;Ie++){for(var Pe=_e[Ie],Be=!1,re=0;re<Le.length;re++)if(Le[re].curveNumber===Pe.curveNumber&&Le[re].pointNumber===Pe.pointNumber){Be=!0;break}Be||Le.push(Pe)}Le.length&&(O||(O={}),O.points=Le),de(O,pe),iP(d,O)})}},a.clickFn=function(le,oe){if(q.remove(),d._fullLayout._activeShapeIndex>=0){d._fullLayout._deactivateShape(d);return}if(!f){var ue=p.clickmode;Yo.done(W).then(function(){if(Yo.clear(W),le===2){for(X.remove(),H=0;H<ne.length;H++)U=ne[H],U._module.selectPoints(U,!1);if(Rl(d,ne),Pl(a),wp(d),ne.length){var Se=ne[0].xaxis,he=ne[0].yaxis;if(Se&&he){for(var ye=[],ke=d._fullLayout.selections,te=0;te<ke.length;te++){var J=ke[te];!J||(J.xref!==Se._id||J.yref!==he._id)&&ye.push(J)}ye.length<ke.length&&(d._fullLayout._noEmitSelectedAtStart=!0,Dl.call("_guiRelayout",d,{selections:ye}))}}}else ue.indexOf("select")>-1&&yT(oe,d,a.xaxes,a.yaxes,a.subplot,a,X),ue==="event"&&El(d,void 0);C3.click(d,oe)}).catch(bf.error)}},a.doneFn=function(){q.remove(),Yo.done(W).then(function(){Yo.clear(W),!y&&I&&a.selectionDefs&&(I.subtract=P,a.selectionDefs.push(I),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,z)),(y||f)&&Pl(a,y),a.doneFnCompleted&&a.doneFnCompleted(ae),c&&El(d,O)}).catch(bf.error)}}function yT(t,e,r,a,i,n,o){var l=e._hoverdata,s=e._fullLayout,f=s.clickmode,c=f.indexOf("event")>-1,v=[],u,h,d,p,y,m,b,w,g,x;if(Y3(l)){gT(t,e,n),u=Fc(e,r,a,i);var _=q3(l,u),T=_.pointNumbers.length>0;if(T?Z3(u,_):K3(u)&&(b=Dg(_))){for(o&&o.remove(),x=0;x<u.length;x++)h=u[x],h._module.selectPoints(h,!1);Rl(e,u),Pl(n),c&&wp(e)}else{w=t.shiftKey&&(b!==void 0?b:Dg(_)),d=U3(_.pointNumber,_.searchInfo,w);var k=n.selectionDefs.concat([d]);for(p=xp(k),x=0;x<u.length;x++)if(y=u[x]._module.selectPoints(u[x],p),m=xT(y,u[x]),v.length)for(var S=0;S<m.length;S++)v.push(m[S]);else v=m;if(g={points:v},Rl(e,u,g),d&&n&&n.selectionDefs.push(d),o){var A=n.mergedPolygons,D=pp(n.dragmode);dT(_T(A,D),o,n)}c&&El(e,g)}}}function U3(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}function Yu(t){return"pointNumber"in t&&"searchInfo"in t}function V3(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 xp(t){if(!t.length)return;for(var e=[],r=Yu(t[0])?0:t[0][0][0],a=r,i=Yu(t[0])?0:t[0][0][1],n=i,o=0;o<t.length;o++)if(Yu(t[o]))e.push(V3(t[o]));else{var l=yp(t[o]);l.subtract=!!t[o].subtract,e.push(l),r=Math.min(r,l.xmin),a=Math.max(a,l.xmax),i=Math.min(i,l.ymin),n=Math.max(n,l.ymax)}function s(f,c,v,u){for(var h=!1,d=0;d<e.length;d++)e[d].contains(f,c,v,u)&&(h=!e[d].subtract);return h}return{xmin:r,xmax:a,ymin:i,ymax:n,pts:[],contains:s,isRect:!1,degenerate:!1}}function gT(t,e,r){var a=e._fullLayout,i=r.plotinfo,n=r.dragmode,o=a._lastSelectedSubplot&&a._lastSelectedSubplot===i.id,l=(t.shiftKey||t.altKey)&&!($l(n)&&pp(n));o&&l&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!l||!i.selection)&&Pl(r),o||(hT(e),a._lastSelectedSubplot=i.id)}function X3(t){return t._fullLayout._activeShapeIndex>=0}function W3(t){return t._fullLayout._activeSelectionIndex>=0}function Pl(t,e){var r=t.dragmode,a=t.plotinfo,i=t.gd;X3(i)&&i._fullLayout._deactivateShape(i),W3(i)&&i._fullLayout._deactivateSelection(i);var n=i._fullLayout,o=n._zoomlayer,l=$l(r),s=mp(r);if(l||s){var f=o.selectAll(".select-outline-"+a.id);if(f&&i._fullLayout._outlining){var c;l&&(c=E3(f,t)),c&&Dl.call("_guiRelayout",i,{shapes:c});var v;s&&!bp(t)&&(v=z3(f,t)),v&&(i._fullLayout._noEmitSelectedAtStart=!0,Dl.call("_guiRelayout",i,{selections:v}).then(function(){e&&I3(i)})),i._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=t.selectionDefs=[],a.selection.mergedPolygons=t.mergedPolygons=[]}function Cg(t){return t._id}function Fc(t,e,r,a){if(!t.calcdata)return[];var i=[],n=e.map(Cg),o=r.map(Cg),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(bp({subplot:a})&&(s.subplot===a||s.geo===a))i.push(Fs(s._module,l,e[0],r[0]));else if(s.type==="splom"){if(s._xaxes[n[0]]&&s._yaxes[o[0]]){var c=Fs(s._module,l,e[0],r[0]);c.scene=t._fullLayout._splomScenes[s.uid],i.push(c)}}else if(s.type==="sankey"){var v=Fs(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(Fs(s._module,l,Yr(t,s.xaxis),Yr(t,s.yaxis)))}return i}function Fs(t,e,r,a){return{_module:t,cd:e,xaxis:r,yaxis:a}}function Y3(t){return t&&Array.isArray(t)&&t[0].hoverOnBox!==!0}function q3(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 Dg(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 Z3(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 K3(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 Rl(t,e,r){var a;for(a=0;a<e.length;a++){var i=e[a].cd[0].trace._fullInput,n=t._fullLayout._tracePreGUI[i.uid]||{};n.selectedpoints===void 0&&(n.selectedpoints=i._input.selectedpoints||null)}var o;if(r){var l=r.points||[];for(a=0;a<e.length;a++)o=e[a].cd[0].trace,o._input.selectedpoints=o._fullInput.selectedpoints=[],o._fullInput!==o&&(o.selectedpoints=[]);for(var s=0;s<l.length;s++){var f=l[s],c=f.data,v=f.fullData,u=f.pointIndex,h=f.pointIndices;h?([].push.apply(c.selectedpoints,h),o._fullInput!==o&&[].push.apply(v.selectedpoints,h)):(c.selectedpoints.push(u),o._fullInput!==o&&v.selectedpoints.push(u))}}else for(a=0;a<e.length;a++)o=e[a].cd[0].trace,delete o.selectedpoints,delete o._input.selectedpoints,o._fullInput!==o&&delete o._fullInput.selectedpoints;Q3(t,e)}function Q3(t,e){for(var r=!1,a=0;a<e.length;a++){var i=e[a],n=i.cd;Dl.traceIs(n[0].trace,"regl")&&(r=!0);var o=i._module,l=o.styleOnSelect||o.style;l&&(l(t,n,n[0].node3),n[0].nodeRangePlot3&&l(t,n,n[0].nodeRangePlot3))}r&&(F3(t),H3(t))}function bT(t,e,r){for(var a=r?Ag.difference:Ag.union,i=a({regions:t},{regions:[e]}),n=i.regions.reverse(),o=0;o<n.length;o++){var l=n[o];l.subtract=_p(l,n.slice(0,o))}return n}function xT(t,e){if(Array.isArray(t))for(var r=e.cd,a=e.cd[0].trace,i=0;i<t.length;i++)t[i]=D3(t[i],a,r);return t}function _T(t,e){for(var r=[],a=0;a<t.length;a++){r[a]=[];for(var i=0;i<t[a].length;i++){r[a][i]=[],r[a][i][0]=i?"L":"M";for(var n=0;n<t[a][i].length;n++)r[a][i].push(t[a][i][n])}e||r[a].push(["Z",r[a][0][1],r[a][0][2]])}return r}function wT(t,e){for(var r=[],a,i,n=0;n<e.length;n++){var o=e[n];i=o._module.selectPoints(o,t),a=xT(i,o),r=r.concat(a)}return r}function Id(t,e,r,a,i){var n=!!a,o,l,s;i&&(o=i.plotinfo,l=i.xaxes[0]._id,s=i.yaxes[0]._id);var f=[],c=[],v=$g(t),u=t._fullLayout;if(o){var h=u._zoomlayer,d=u.dragmode,p=$l(d),y=mp(d);if(p||y){var m=Yr(t,l,"x"),b=Yr(t,s,"y");if(m&&b){var w=h.selectAll(".select-outline-"+o.id);if(w&&t._fullLayout._outlining&&w.length){for(var g=w[0][0],x=g.getAttribute("d"),_=R3(x,t,o),T=[],k=0;k<_.length;k++){for(var S=_[k],A=[],D=0;D<S.length;D++)A.push([si(m,S[D][1]),si(b,S[D][2])]);A.xref=l,A.yref=s,A.subtract=_p(A,T),T.push(A)}v=v.concat(T)}}}}var M=l&&s?[l+s]:u._subplots.cartesian;J3(t);for(var C={},$=0;$<M.length;$++){var F=M[$],R=F.indexOf("y"),P=F.slice(0,R),E=F.slice(R),L=l&&s?r:void 0;if(L=tP(v,P,E,L),L){var z=a;if(!n){var I=Yr(t,P,"x"),H=Yr(t,E,"y");z=Fc(t,[I],[H],F);for(var U=0;U<z.length;U++){var O=z[U],X=O.cd[0],B=X.trace;if(O._module.name==="scattergl"&&!X.t.xpx){var Y=B.x,Z=B.y,q=B._length;X.t.xpx=[],X.t.ypx=[];for(var W=0;W<q;W++)X.t.xpx[W]=I.c2p(Y[W]),X.t.ypx[W]=H.c2p(Z[W])}O._module.name==="splom"&&(C[B.uid]||(C[B.uid]=!0))}}var ae=wT(L,z);f=f.concat(ae),c=c.concat(z)}}var ne={points:f};Rl(t,c,ne);var de=u.clickmode,le=de.indexOf("event")>-1&&e;if(!o&&e){var oe=$g(t,!0);if(oe.length){var ue=oe[0].xref,Se=oe[0].yref;if(ue&&Se){var he=kT(oe),ye=AT([Yr(t,ue,"x"),Yr(t,Se,"y")]);ye(ne,he)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:le&&El(t,ne),u._reselect=!1}if(!o&&u._deselect){var ke=u._deselect;l=ke.xref,s=ke.yref,eP(l,s,c)||TT(t,l,s,a),le&&(ne.points.length?El(t,ne):wp(t)),u._deselect=!1}return{eventData:ne,selectionTesters:r}}function J3(t){var e=t.calcdata;if(!!e)for(var r=0;r<e.length;r++){var a=e[r][0],i=a.trace,n=t._fullLayout._splomScenes;if(n){var o=n[i.uid];o&&(o.selectBatch=[])}}}function eP(t,e,r){for(var a=0;a<r.length;a++){var i=r[a];if(i.xaxis&&i.xaxis._id===t&&i.yaxis&&i.yaxis._id===e)return!0}return!1}function TT(t,e,r,a){a=Fc(t,[Yr(t,e,"x")],[Yr(t,r,"y")],e+r);for(var i=0;i<a.length;i++){var n=a[i];n._module.selectPoints(n,!1)}Rl(t,a)}function tP(t,e,r,a){for(var i,n=0;n<t.length;n++){var o=t[n];if(!(e!==o.xref||r!==o.yref))if(i){var l=!!o.subtract;i=bT(i,o,l),a=xp(i)}else i=[o],a=yp(o)}return a}function $g(t,e){for(var r=[],a=t._fullLayout,i=a.selections,n=i.length,o=0;o<n;o++)if(!(e&&o!==a._activeSelectionIndex)){var l=i[o];if(!!l){var s=l.xref,f=l.yref,c=Yr(t,s,"x"),v=Yr(t,f,"y"),u,h,d,p,y;if(l.type==="rect"){y=[];var m=si(c,l.x0),b=si(c,l.x1),w=si(v,l.y0),g=si(v,l.y1);y=[[m,w],[m,g],[b,g],[b,w]],u=Math.min(m,b),h=Math.max(m,b),d=Math.min(w,g),p=Math.max(w,g),y.xmin=u,y.xmax=h,y.ymin=d,y.ymax=p,y.xref=s,y.yref=f,y.subtract=!1,y.isRect=!0,r.push(y)}else if(l.type==="path")for(var x=l.path.split("Z"),_=[],T=0;T<x.length;T++){var k=x[T];if(!!k){k+="Z";var S=Mg.extractPathCoords(k,Sg.paramIsX,"raw"),A=Mg.extractPathCoords(k,Sg.paramIsY,"raw");u=1/0,h=-1/0,d=1/0,p=-1/0,y=[];for(var D=0;D<S.length;D++){var M=si(c,S[D]),C=si(v,A[D]);y.push([M,C]),u=Math.min(M,u),h=Math.max(M,h),d=Math.min(C,d),p=Math.max(C,p)}y.xmin=u,y.xmax=h,y.ymin=d,y.ymax=p,y.xref=s,y.yref=f,y.subtract=_p(y,_),_.push(y),r.push(y)}}}}return r}function _p(t,e){for(var r=!1,a=0;a<e.length;a++)for(var i=e[a],n=0;n<t.length;n++)if(S3(t[n],i)){r=!r;break}return r}function si(t,e){return t.type==="date"&&(e=e.replace("_"," ")),t.type==="log"?t.c2p(e):t.r2p(e,null,t.calendar)}function kT(t){for(var e=t.length,r=[],a=0;a<e;a++){var i=t[a];r=r.concat(i),r=r.concat([i[0]])}return rP(r)}function rP(t){return t.isRect=t.length===5&&t[0][0]===t[4][0]&&t[0][1]===t[4][1]&&t[0][0]===t[1][0]&&t[2][0]===t[3][0]&&t[0][1]===t[3][1]&&t[1][1]===t[2][1]||t[0][1]===t[1][1]&&t[2][1]===t[3][1]&&t[0][0]===t[3][0]&&t[1][0]===t[2][0],t.isRect&&(t.xmin=Math.min(t[0][0],t[2][0]),t.xmax=Math.max(t[0][0],t[2][0]),t.ymin=Math.min(t[0][1],t[2][1]),t.ymax=Math.max(t[0][1],t[2][1])),t}function AT(t){return function(e,r){for(var a,i,n=0;n<t.length;n++){var o=t[n],l=o._id,s=l.charAt(0);if(r.isRect){a||(a={});var f=r[s+"min"],c=r[s+"max"];f!==void 0&&c!==void 0&&(a[l]=[Lg(o,f),Lg(o,c)].sort(N3))}else i||(i={}),i[l]=r.map(B3(o))}a&&(e.range=a),i&&(e.lassoPoints=i)}}function aP(t){var e=t.plotinfo;return e.fillRangeItems||AT(t.xaxes.concat(t.yaxes))}function iP(t,e){t.emit("plotly_selecting",e)}function El(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function wp(t){t.emit("plotly_deselect",null)}var nP={reselect:Id,prepSelect:G3,clearOutline:hT,clearSelectionsCache:Pl,selectOnClick:yT},MT=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}],Hc={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(" ")}},Pg=MT,Rg=dr,Hs=wr,oP=At.templatedArray,Os=Hc;function Eg(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 zg(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 es=oP("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:Rg({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:Pg.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:Pg.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:[zg("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[zg("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",Hs.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",Os.axisRefDescription("x","left","right"),Eg("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",Hs.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",Os.axisRefDescription("y","bottom","top"),Eg("y")].join(" ")},xref:{valType:"enumerated",values:["paper",Hs.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",Os.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",Hs.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",Os.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:Rg({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(" ")}}}),$r={},ST=L_,lP=ST.FORMAT_LINK,sP=ST.DATE_FORMAT_LINK;function LT(t){var e=t&&t.supportOther;return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,lP,"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}".`,sP,"for details on the date formatting syntax."].join(" ")}function CT(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var a=[],i=0;i<r.length;i++)a[i]="`"+r[i]+"`";e=e+"Finally, the template string has access to ",r.length===1?e="variable "+a[0]:e="variables "+a.slice(0,-1).join(", ")+" and "+a.slice(-1)+"."}return e}$r.hovertemplateAttrs=function(t,e){t=t||{},e=e||{};var r=CT(e),a={valType:"string",dflt:"",editType:t.editType||"none",description:["Template string used for rendering the information that appear on hover box.","Note that this will override `hoverinfo`.",LT({supportOther:!0}),"The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data.","Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r,'Anything contained in tag `<extra>` is displayed in the secondary box, for example "<extra>{fullData.name}</extra>".',"To hide the secondary box completely, use an empty tag `<extra></extra>`."].join(" ")};return t.arrayOk!==!1&&(a.arrayOk=!0),a};$r.texttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=CT(e),a={valType:"string",dflt:"",editType:t.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",LT(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return t.arrayOk!==!1&&(a.arrayOk=!0),a};var Oc={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]},Ig=Do.axisHoverFormat,fP=$r.texttemplateAttrs,cP=$r.hovertemplateAttrs,Ng=dn,uP=dr,vP=ma.dash,dP=ma.pattern,hP=_t.exports,Fg=Oc,qu=Ft.extendFlat;function Hg(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 Og(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 Bg(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 gn={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:Hg("x"),yperiod:Hg("y"),xperiod0:Og("x0"),yperiod0:Og("y0"),xperiodalignment:Bg("x"),yperiodalignment:Bg("y"),xhoverformat:Ig("x"),yhoverformat:Ig("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:fP({},{}),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 "+Fg.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:cP({},{keys:Fg.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:qu({},vP,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot",description:["Sets the line back off from the end point of the nth line segment (in px).","This option is useful e.g. to avoid overlap with arrowhead markers.","With *auto* the lines would trim before markers if `marker.angleref` is set to *previous*."].join(" ")},simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},fillpattern:dP,marker:qu({symbol:{valType:"enumerated",values:hP.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:qu({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},Ng("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"},Ng("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:uP({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."})},jg=es,Gg=gn.line,pP=ma.dash,Bs=Ft.extendFlat,mP=Xa.overrideAll,yP=At.templatedArray,Ug=Hc,DT=mP(yP("selection",{type:{valType:"enumerated",values:["rect","path"],description:["Specifies the selection type to be drawn.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`).","If *path*, draw a custom SVG path using `path`."].join(" ")},xref:Bs({},jg.xref,{description:["Sets the selection's x coordinate axis.",Ug.axisRefDescription("x","left","right")].join(" ")}),yref:Bs({},jg.yref,{description:["Sets the selection's x coordinate axis.",Ug.axisRefDescription("y","bottom","top")].join(" ")}),x0:{valType:"any",description:"Sets the selection's starting x position."},x1:{valType:"any",description:"Sets the selection's end x position."},y0:{valType:"any",description:"Sets the selection's starting y position."},y1:{valType:"any",description:"Sets the selection's end y position."},path:{valType:"string",editType:"arraydraw",description:["For `type` *path* - a valid SVG path similar to `shapes.path` in data coordinates.","Allowed segments are: M, L and Z."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw",description:"Sets the opacity of the selection."},line:{color:Gg.color,width:Bs({},Gg.width,{min:1,dflt:1}),dash:Bs({},pP,{dflt:"dot"})}}),"arraydraw","from-root"),Vg=ve.exports,js=Mt.exports,gP=Pa,bP=DT,Xg=yn,xP=function(e,r){gP(e,r,{name:"selections",handleItemDefaults:_P});for(var a=r.selections,i=0;i<a.length;i++){var n=a[i];!n||n.path===void 0&&(n.x0===void 0||n.x1===void 0||n.y0===void 0||n.y1===void 0)&&(r.selections[i]=null)}};function _P(t,e,r){function a(_,T){return Vg.coerce(t,e,bP,_,T)}var i=a("path"),n=i?"path":"rect",o=a("type",n),l=o!=="path";l&&delete e.path,a("opacity"),a("line.color"),a("line.width"),a("line.dash");for(var s=["x","y"],f=0;f<2;f++){var c=s[f],v={_fullLayout:r},u,h,d,p=js.coerceRef(t,e,v,c);if(u=js.getFromId(v,p),u._selectionIndices.push(e._index),d=Xg.rangeToShapePosition(u),h=Xg.shapePositionToRange(u),l){var y=c+"0",m=c+"1",b=t[y],w=t[m];t[y]=h(t[y],!0),t[m]=h(t[m],!0),js.coercePosition(e,v,a,p,y),js.coercePosition(e,v,a,p,m);var g=e[y],x=e[m];g!==void 0&&x!==void 0&&(e[y]=d(g),e[m]=d(x),t[y]=b,t[m]=w)}}l&&Vg.noneOrAll(t,e,["x0","x1","y0","y1"])}var wP=function(e,r,a){a("newselection.mode");var i=a("newselection.line.width");i&&(a("newselection.line.color"),a("newselection.line.dash")),a("activeselection.fillcolor"),a("activeselection.opacity")},TP=Ze,Wg=ve.exports,Yg=Vt,Bc=function(e){return function(a,i){var n=a[e];if(!!Array.isArray(n))for(var o=TP.subplotsRegistry.cartesian,l=o.idRegex,s=i._subplots,f=s.xaxis,c=s.yaxis,v=s.cartesian,u=i._has("cartesian")||i._has("gl2d"),h=0;h<n.length;h++){var d=n[h];if(!!Wg.isPlainObject(d)){var p=Yg.cleanId(d.xref,"x",!1),y=Yg.cleanId(d.yref,"y",!1),m=l.x.test(p),b=l.y.test(y);if(m||b){u||Wg.pushUnique(i._basePlotModules,o);var w=!1;m&&f.indexOf(p)===-1&&(f.push(p),w=!0),b&&c.indexOf(y)===-1&&(c.push(y),w=!0),w&&m&&b&&v.push(p+y)}}}}},qg=uT,qo=nP,ts={moduleType:"component",name:"selections",layoutAttributes:DT,supplyLayoutDefaults:xP,supplyDrawNewSelectionDefaults:wP,includeBasePlot:Bc("selections"),draw:qg.draw,drawOne:qg.drawOne,reselect:qo.reselect,prepSelect:qo.prepSelect,clearOutline:qo.clearOutline,clearSelectionsCache:qo.clearSelectionsCache,selectOnClick:qo.selectOnClick},Tp=nt.exports,qr=ve.exports,Zg=qr.numberFormat,kP=Jr.exports,AP=T1,Gs=Ze,$T=qr.strTranslate,MP=nr,Kg=rt.exports,ii=_t.exports,SP=pa,Qg=Mt.exports,LP=wi,CP=ba.exports,PT=pn,Us=PT.selectingOrDrawing,DP=PT.freeMode,$P=Dr.FROM_TL,PP=ep,RP=Dc.redrawReglTraces,EP=Ut.exports,Nd=Vt.getFromId,zP=ts.prepSelect,IP=ts.clearOutline,NP=ts.selectOnClick,Zu=oT,kp=wr,Jg=kp.MINDRAG,xr=kp.MINZOOM,e0=!0;function FP(t,e,r,a,i,n,o,l){var s=t._fullLayout._zoomlayer,f=o+l==="nsew",c=(o+l).length===1,v,u,h,d,p,y,m,b,w,g,x,_,T,k,S,A,D,M,C,$,F,R,P;function E(){if(v=e.xaxis,u=e.yaxis,w=v._length,g=u._length,m=v._offset,b=u._offset,h={},h[v._id]=v,d={},d[u._id]=u,o&&l)for(var se=e.overlays,ce=0;ce<se.length;ce++){var Re=se[ce].xaxis;h[Re._id]=Re;var we=se[ce].yaxis;d[we._id]=we}p=i0(h),y=i0(d),T=t0(p,l),k=t0(y,o),S=!k&&!T,_=a0(t,t._fullLayout._axisMatchGroups,h,d),x=a0(t,t._fullLayout._axisConstraintGroups,h,d,_);var xe=x.isSubplotConstrained||_.isSubplotConstrained;A=l||xe,D=o||xe;var be=t._fullLayout;M=be._has("scattergl"),C=be._has("splom"),$=be._has("svg")}E();var L=BP(k+T,t._fullLayout.dragmode,f),z=ET(e,o+l+"drag",L,r,a,i,n);if(S&&!f)return z.onmousedown=null,z.style.pointerEvents="none",z;var I={element:z,gd:t,plotinfo:e};I.prepFn=function(se,ce,Re){var we=I.dragmode,xe=t._fullLayout.dragmode;xe!==we&&(I.dragmode=xe),E(),R=t._fullLayout._invScaleX,P=t._fullLayout._invScaleY,S||(f?se.shiftKey?xe==="pan"?xe="zoom":Us(xe)||(xe="pan"):se.ctrlKey&&(xe="pan"):xe="pan"),DP(xe)?I.minDrag=1:I.minDrag=void 0,Us(xe)?(I.xaxes=p,I.yaxes=y,zP(se,ce,Re,I,xe)):(I.clickFn=U,Us(we)&&H(),S||(xe==="zoom"?(I.moveFn=oe,I.doneFn=Se,I.minDrag=1,le(se,ce,Re)):xe==="pan"&&(I.moveFn=_e,I.doneFn=Pe))),t._fullLayout._redrag=function(){var be=t._dragdata;if(be&&be.element===z){var ze=t._fullLayout.dragmode;Us(ze)||(E(),Be([0,0,w,g]),I.moveFn(be.dx,be.dy))}}};function H(){I.plotinfo.selection=!1,IP(t)}function U(se,ce){var Re=I.gd;if(Re._fullLayout._activeShapeIndex>=0){Re._fullLayout._deactivateShape(Re);return}var we=Re._fullLayout.clickmode;if(Hd(Re),se===2&&!c&&Ie(),f)we.indexOf("select")>-1&&NP(ce,Re,p,y,e.id,I),we.indexOf("event")>-1&&SP.click(Re,ce,e.id);else if(se===1&&c){var xe=o?u:v,be=o==="s"||l==="w"?0:1,ze=xe._name+".range["+be+"]",Ne=HP(xe,be),He="left",Ae="middle";if(xe.fixedrange)return;o?(Ae=o==="n"?"top":"bottom",xe.side==="right"&&(He="right")):l==="e"&&(He="right"),Re._context.showAxisRangeEntryBoxes&&Tp.select(z).call(MP.makeEditable,{gd:Re,immediate:!0,background:Re._fullLayout.paper_bgcolor,text:String(Ne),fill:xe.tickfont?xe.tickfont.color:"#444",horizontalAlign:He,verticalAlign:Ae}).on("edit",function(Fe){var Ge=xe.d2r(Fe);Ge!==void 0&&Gs.call("_guiRelayout",Re,ze,Ge)})}}CP.init(I);var O,X,B,Y,Z,q,W,ae,ne,de;function le(se,ce,Re){var we=z.getBoundingClientRect();O=ce-we.left,X=Re-we.top,t._fullLayout._calcInverseTransform(t);var xe=qr.apply3DTransform(t._fullLayout._invTransform)(O,X);O=xe[0],X=xe[1],B={l:O,r:O,w:0,t:X,b:X,h:0},Y=t._hmpixcount?t._hmlumcount/t._hmpixcount:kP(t._fullLayout.plot_bgcolor).getLuminance(),Z="M0,0H"+w+"V"+g+"H0V0",q=!1,W="xy",de=!1,ae=zT(s,Y,m,b,Z),ne=IT(s,m,b)}function oe(se,ce){if(t._transitioningWithDuration)return!1;var Re=Math.max(0,Math.min(w,R*se+O)),we=Math.max(0,Math.min(g,P*ce+X)),xe=Math.abs(Re-O),be=Math.abs(we-X);B.l=Math.min(O,Re),B.r=Math.max(O,Re),B.t=Math.min(X,we),B.b=Math.max(X,we);function ze(){W="",B.r=B.l,B.t=B.b,ne.attr("d","M0,0Z")}if(x.isSubplotConstrained)xe>xr||be>xr?(W="xy",xe/w>be/g?(be=xe*g/w,X>we?B.t=X-be:B.b=X+be):(xe=be*w/g,O>Re?B.l=O-xe:B.r=O+xe),ne.attr("d",_f(B))):ze();else if(_.isSubplotConstrained)if(xe>xr||be>xr){W="xy";var Ne=Math.min(B.l/w,(g-B.b)/g),He=Math.max(B.r/w,(g-B.t)/g);B.l=Ne*w,B.r=He*w,B.b=(1-Ne)*g,B.t=(1-He)*g,ne.attr("d",_f(B))}else ze();else!k||be<Math.min(Math.max(xe*.6,Jg),xr)?xe<Jg||!T?ze():(B.t=0,B.b=g,W="x",ne.attr("d",jP(B,X))):!T||xe<Math.min(be*.6,xr)?(B.l=0,B.r=w,W="y",ne.attr("d",GP(B,O))):(W="xy",ne.attr("d",_f(B)));B.w=B.r-B.l,B.h=B.b-B.t,W&&(de=!0),t._dragged=de,NT(ae,ne,B,Z,q,Y),ue(),t.emit("plotly_relayouting",F),q=!0}function ue(){F={},(W==="xy"||W==="x")&&(Fd(p,B.l/w,B.r/w,F,x.xaxes),pe("x",F)),(W==="xy"||W==="y")&&(Fd(y,(g-B.b)/g,(g-B.t)/g,F,x.yaxes),pe("y",F))}function Se(){ue(),Hd(t),Pe(),HT(t)}var he=[0,0,w,g],ye=null,ke=kp.REDRAWDELAY,te=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function J(se){if(!t._context._scrollZoom.cartesian&&!t._fullLayout._enablescrollzoom)return;if(H(),t._transitioningWithDuration){se.preventDefault(),se.stopPropagation();return}E(),clearTimeout(ye);var ce=-se.deltaY;if(isFinite(ce)||(ce=se.wheelDelta/10),!isFinite(ce)){qr.log("Did not find wheel motion attributes: ",se);return}var Re=Math.exp(-Math.min(Math.max(ce,-20),20)/200),we=te.draglayer.select(".nsewdrag").node().getBoundingClientRect(),xe=(se.clientX-we.left)/we.width,be=(we.bottom-se.clientY)/we.height,ze;function Ne(He,Ae,Fe){if(He.fixedrange)return;var Ge=qr.simpleMap(He.range,He.r2l),Oe=Ge[0]+(Ge[1]-Ge[0])*Ae;function We(N){return He.l2r(Oe+(N-Oe)*Fe)}He.range=Ge.map(We)}if(A){for(l||(xe=.5),ze=0;ze<p.length;ze++)Ne(p[ze],xe,Re);pe("x"),he[2]*=Re,he[0]+=he[2]*xe*(1/Re-1)}if(D){for(o||(be=.5),ze=0;ze<y.length;ze++)Ne(y[ze],be,Re);pe("y"),he[3]*=Re,he[1]+=he[3]*(1-be)*(1/Re-1)}Be(he),Le(),t.emit("plotly_relayouting",F),ye=setTimeout(function(){!t._fullLayout||(he=[0,0,w,g],Pe())},ke),se.preventDefault()}o.length*l.length!==1&&OT(z,J);function _e(se,ce){if(se=se*R,ce=ce*P,t._transitioningWithDuration)return;if(t._fullLayout._replotting=!0,T==="ew"||k==="ns"){var Re=T?-se:0,we=k?-ce:0;if(_.isSubplotConstrained){if(T&&k){var xe=(se/w-ce/g)/2;se=xe*w,ce=-xe*g,Re=-se,we=-ce}k?Re=-we*w/g:we=-Re*g/w}T&&(r0(p,se),pe("x")),k&&(r0(y,ce),pe("y")),Be([Re,we,w,g]),Le(),t.emit("plotly_relayouting",F);return}function be(We,N,j){for(var G=1-N,V,K,Q=0;Q<We.length;Q++){var me=We[Q];if(!me.fixedrange){V=me,K=me._rl[G]+(me._rl[N]-me._rl[G])/OP(j/me._length);var ge=me.l2r(K);ge!==!1&&ge!==void 0&&(me.range[N]=ge)}}return V._length*(V._rl[N]-K)/(V._rl[N]-V._rl[G])}var ze=T==="w"==(k==="n")?1:-1;if(T&&k&&(x.isSubplotConstrained||_.isSubplotConstrained)){var Ne=(se/w+ze*ce/g)/2;se=Ne*w,ce=ze*Ne*g}var He,Ae;if(T==="w"?se=be(p,0,se):T==="e"?se=be(p,1,-se):T||(se=0),k==="n"?ce=be(y,1,ce):k==="s"?ce=be(y,0,-ce):k||(ce=0),He=T==="w"?se:0,Ae=k==="n"?ce:0,x.isSubplotConstrained&&!_.isSubplotConstrained||_.isSubplotConstrained&&T&&k&&ze>0){var Fe;if(_.isSubplotConstrained||!T&&k.length===1){for(Fe=0;Fe<p.length;Fe++)p[Fe].range=p[Fe]._r.slice(),Zu(p[Fe],1-ce/g);se=ce*w/g,He=se/2}if(_.isSubplotConstrained||!k&&T.length===1){for(Fe=0;Fe<y.length;Fe++)y[Fe].range=y[Fe]._r.slice(),Zu(y[Fe],1-se/w);ce=se*g/w,Ae=ce/2}}(!_.isSubplotConstrained||!k)&&pe("x"),(!_.isSubplotConstrained||!T)&&pe("y");var Ge=w-se,Oe=g-ce;_.isSubplotConstrained&&!(T&&k)&&(T?(Ae=He?0:se*g/w,Oe=Ge*g/w):(He=Ae?0:ce*w/g,Ge=Oe*w/g)),Be([He,Ae,Ge,Oe]),Le(),t.emit("plotly_relayouting",F)}function pe(se,ce){for(var Re=_.isSubplotConstrained?{x:y,y:p}[se]:_[se+"axes"],we=_.isSubplotConstrained?{x:p,y}[se]:[],xe=0;xe<Re.length;xe++){var be=Re[xe],ze=be._id,Ne=_.xLinks[ze]||_.yLinks[ze],He=we[0]||h[Ne]||d[Ne];He&&(ce?(ce[be._name+".range[0]"]=ce[He._name+".range[0]"],ce[be._name+".range[1]"]=ce[He._name+".range[1]"]):be.range=He.range.slice())}}function Le(){var se=[],ce;function Re(be){for(ce=0;ce<be.length;ce++)be[ce].fixedrange||se.push(be[ce]._id)}for(A&&(Re(p),Re(x.xaxes),Re(_.xaxes)),D&&(Re(y),Re(x.yaxes),Re(_.yaxes)),F={},ce=0;ce<se.length;ce++){var we=se[ce],xe=Nd(t,we);Qg.drawOne(t,xe,{skipTitle:!0}),F[xe._name+".range[0]"]=xe.range[0],F[xe._name+".range[1]"]=xe.range[1]}Qg.redrawComponents(t,se)}function Ie(){if(!t._transitioningWithDuration){var se=t._context.doubleClick,ce=[];T&&(ce=ce.concat(p)),k&&(ce=ce.concat(y)),_.xaxes&&(ce=ce.concat(_.xaxes)),_.yaxes&&(ce=ce.concat(_.yaxes));var Re={},we,xe,be;if(se==="reset+autosize"){for(se="autosize",xe=0;xe<ce.length;xe++)if(we=ce[xe],we._rangeInitial&&(we.range[0]!==we._rangeInitial[0]||we.range[1]!==we._rangeInitial[1])||!we._rangeInitial&&!we.autorange){se="reset";break}}if(se==="autosize")for(xe=0;xe<ce.length;xe++)we=ce[xe],we.fixedrange||(Re[we._name+".autorange"]=!0);else if(se==="reset")for((T||x.isSubplotConstrained)&&(ce=ce.concat(x.xaxes)),k&&!x.isSubplotConstrained&&(ce=ce.concat(x.yaxes)),x.isSubplotConstrained&&(T?k||(ce=ce.concat(y)):ce=ce.concat(p)),xe=0;xe<ce.length;xe++)we=ce[xe],we.fixedrange||(we._rangeInitial?(be=we._rangeInitial,Re[we._name+".range[0]"]=be[0],Re[we._name+".range[1]"]=be[1]):Re[we._name+".autorange"]=!0);t.emit("plotly_doubleclick",null),Gs.call("_guiRelayout",t,Re)}}function Pe(){Be([0,0,w,g]),qr.syncOrAsync([EP.previousPromises,function(){t._fullLayout._replotting=!1,Gs.call("_guiRelayout",t,F)}],t)}function Be(se){var ce=t._fullLayout,Re=ce._plots,we=ce._subplots.cartesian,xe,be,ze,Ne;if(C&&Gs.subplotsRegistry.splom.drag(t),M){for(xe=0;xe<we.length;xe++)if(be=Re[we[xe]],ze=be.xaxis,Ne=be.yaxis,be._scene){var He=qr.simpleMap(ze.range,ze.r2l),Ae=qr.simpleMap(Ne.range,Ne.r2l);be._scene.update({range:[He[0],Ae[0],He[1],Ae[1]]})}}if((C||M)&&(PP(t),RP(t)),$){var Fe=se[2]/v._length,Ge=se[3]/u._length;for(xe=0;xe<we.length;xe++){be=Re[we[xe]],ze=be.xaxis,Ne=be.yaxis;var Oe=(A||_.isSubplotConstrained)&&!ze.fixedrange&&h[ze._id],We=(D||_.isSubplotConstrained)&&!Ne.fixedrange&&d[Ne._id],N,j,G,V;if(Oe?(N=Fe,G=l||_.isSubplotConstrained?se[0]:Ce(ze,N)):_.xaHash[ze._id]?(N=Fe,G=se[0]*ze._length/v._length):_.yaHash[ze._id]?(N=Ge,G=k==="ns"?-se[1]*ze._length/u._length:Ce(ze,N,{n:"top",s:"bottom"}[k])):(N=re(ze,Fe,Ge),G=De(ze,N)),We?(j=Ge,V=o||_.isSubplotConstrained?se[1]:Ce(Ne,j)):_.yaHash[Ne._id]?(j=Ge,V=se[1]*Ne._length/u._length):_.xaHash[Ne._id]?(j=Fe,V=T==="ew"?-se[0]*Ne._length/v._length:Ce(Ne,j,{e:"right",w:"left"}[T])):(j=re(Ne,Fe,Ge),V=De(Ne,j)),!(!N&&!j)){N||(N=1),j||(j=1);var K=ze._offset-G/N,Q=Ne._offset-V/j;be.clipRect.call(ii.setTranslate,G,V).call(ii.setScale,N,j),be.plot.call(ii.setTranslate,K,Q).call(ii.setScale,1/N,1/j),(N!==be.xScaleFactor||j!==be.yScaleFactor)&&(ii.setPointGroupScale(be.zoomScalePts,N,j),ii.setTextPointsScale(be.zoomScaleTxt,N,j)),ii.hideOutsideRangePoints(be.clipOnAxisFalseTraces,be),be.xScaleFactor=N,be.yScaleFactor=j}}}}function re(se,ce,Re){return se.fixedrange?0:A&&x.xaHash[se._id]?ce:D&&(x.isSubplotConstrained?x.xaHash:x.yaHash)[se._id]?Re:0}function De(se,ce){return ce?(se.range=se._r.slice(),Zu(se,ce),Ce(se,ce)):0}function Ce(se,ce,Re){return se._length*(1-ce)*$P[Re||se.constraintoward||"middle"]}return z}function RT(t,e,r,a){var i=qr.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(LP,a),i.node()}function ET(t,e,r,a,i,n,o){var l=RT(t,"rect",e,r);return Tp.select(l).call(ii.setRect,a,i,n,o),l}function t0(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return""}function HP(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,Zg("."+i+"g")(Math.pow(10,r))):(i=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,Zg("."+String(i)+"g")(r))}function Fd(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;Fd(i,u,1-u,a,[])}}function r0(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 OP(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function BP(t,e,r){return t?t==="nsew"?r?"":e==="pan"?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function zT(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",$T(r,a)).attr("d",i+"Z")}function IT(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:Kg.background,stroke:Kg.defaultLine,"stroke-width":1,opacity:0}).attr("transform",$T(e,r)).attr("d","M0,0Z")}function NT(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"),FT(t,e,i,n)}function FT(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 Hd(t){Tp.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function HT(t){e0&&t.data&&t._context.showTips&&(qr.notifier(qr._(t,"Double-click to zoom back out"),"long"),e0=!1)}function jP(t,e){return"M"+(t.l-.5)+","+(e-xr-.5)+"h-3v"+(2*xr+1)+"h3ZM"+(t.r+.5)+","+(e-xr-.5)+"h3v"+(2*xr+1)+"h-3Z"}function GP(t,e){return"M"+(e-xr-.5)+","+(t.t-.5)+"v-3h"+(2*xr+1)+"v3ZM"+(e-xr-.5)+","+(t.b+.5)+"v3h"+(2*xr+1)+"v-3Z"}function _f(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,xr)/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 a0(t,e,r,a,i){for(var n=!1,o={},l={},s,f,c,v,u=(i||{}).xaHash,h=(i||{}).yaHash,d=0;d<e.length;d++){var p=e[d];for(s in r)if(p[s]){for(c in p)!(i&&(u[c]||h[c]))&&!(c.charAt(0)==="x"?r:a)[c]&&(o[c]=s);for(f in a)!(i&&(u[f]||h[f]))&&p[f]&&(n=!0)}for(f in a)if(p[f])for(v in p)!(i&&(u[v]||h[v]))&&!(v.charAt(0)==="x"?r:a)[v]&&(l[v]=f)}n&&(qr.extendFlat(o,l),l={});var y={},m=[];for(c in o){var b=Nd(t,c);m.push(b),y[b._id]=b}var w={},g=[];for(v in l){var x=Nd(t,v);g.push(x),w[x._id]=x}return{xaHash:y,yaHash:w,xaxes:m,yaxes:g,xLinks:o,yLinks:l,isSubplotConstrained:n}}function OT(t,e){if(!AP)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 i0(t){var e=[];for(var r in t)e.push(t[r]);return e}var UP={makeDragBox:FP,makeDragger:RT,makeRectDragger:ET,makeZoombox:zT,makeCorners:IT,updateZoombox:NT,xyCorners:_f,transitionZoombox:FT,removeZoombox:Hd,showDoubleClickNotifier:HT,attachWheelEventHandler:OT};(function(t){var e=nt.exports,r=pa,a=ba.exports,i=wi,n=UP.makeDragBox,o=wr.DRAGGERSIZE;t.initInteractions=function(s){var f=s._fullLayout;if(s._context.staticPlot){e.select(s).selectAll(".drag").remove();return}if(!(!f._has("cartesian")&&!f._has("splom"))){var c=Object.keys(f._plots||{}).sort(function(u,h){if((f._plots[u].mainplot&&!0)===(f._plots[h].mainplot&&!0)){var d=u.split("y"),p=h.split("y");return d[0]===p[0]?Number(d[1]||1)-Number(p[1]||1):Number(d[0]||1)-Number(p[0]||1)}return f._plots[u].mainplot?1:-1});c.forEach(function(u){var h=f._plots[u],d=h.xaxis,p=h.yaxis;if(!h.mainplot){var y=n(s,h,d._offset,p._offset,d._length,p._length,"ns","ew");y.onmousemove=function(w){s._fullLayout._rehover=function(){s._fullLayout._hoversubplot===u&&s._fullLayout._plots[u]&&r.hover(s,w,u)},r.hover(s,w,u),s._fullLayout._lasthover=y,s._fullLayout._hoversubplot=u},y.onmouseout=function(w){s._dragging||(s._fullLayout._hoversubplot=null,a.unhover(s,w))},s._context.showAxisDragHandles&&(n(s,h,d._offset-o,p._offset-o,o,o,"n","w"),n(s,h,d._offset+d._length,p._offset-o,o,o,"n","e"),n(s,h,d._offset-o,p._offset+p._length,o,o,"s","w"),n(s,h,d._offset+d._length,p._offset+p._length,o,o,"s","e"))}if(s._context.showAxisDragHandles){if(u===d._mainSubplot){var m=d._mainLinePosition;d.side==="top"&&(m-=o),n(s,h,d._offset+d._length*.1,m,d._length*.8,o,"","ew"),n(s,h,d._offset,m,d._length*.1,o,"","w"),n(s,h,d._offset+d._length*.9,m,d._length*.1,o,"","e")}if(u===p._mainSubplot){var b=p._mainLinePosition;p.side!=="right"&&(b-=o),n(s,h,b,p._offset+p._length*.1,o,p._length*.8,"ns",""),n(s,h,b,p._offset+p._length*.9,o,p._length*.1,"s",""),n(s,h,b,p._offset,o,p._length*.1,"n","")}}});var 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)}})(Wh);var rs={},n0=Ze,VP=function(e){for(var r=n0.layoutArrayContainers,a=n0.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:""}},XP=Gl,Ku=_h,Zo=on.exports,WP=kh.sorterAsc,Qu=Ze;rs.containerArrayMatch=VP;var YP=rs.isAddVal=function(e){return e==="add"||XP(e)},o0=rs.isRemoveVal=function(e){return e===null||e==="remove"};rs.applyContainerArrayChanges=function(e,r,a,i,n){var o=r.astr,l=Qu.getComponentMethod(o,"supplyLayoutDefaults"),s=Qu.getComponentMethod(o,"draw"),f=Qu.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||l===Ku||s===Ku,v=e.layout,u=e._fullLayout;if(a[""]){Object.keys(a).length>1&&Zo.warn("Full array edits are incompatible with other edits",o);var h=a[""][""];if(o0(h))r.set(null);else if(Array.isArray(h))r.set(h);else return Zo.warn("Unrecognized full array edit value",o,h),!0;return c?!1:(l(v,u),s(e),!0)}var d=Object.keys(a).map(Number).sort(WP),p=r.get(),y=p||[],m=n(u,o).get(),b=[],w=-1,g=y.length,x,_,T,k,S,A,D,M;for(x=0;x<d.length;x++){if(T=d[x],k=a[T],S=Object.keys(k),A=k[""],D=YP(A),T<0||T>y.length-(D?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),o0(A)?b.push(T):D?(A==="add"&&(A={}),y.splice(T,0,A),m&&m.splice(T,0,{})):Zo.warn("Unrecognized full object edit value",o,T,A),w===-1&&(w=T);else for(_=0;_<S.length;_++)M=o+"["+T+"].",n(y[T],S[_],M).set(k[S[_]])}for(x=b.length-1;x>=0;x--)y.splice(b[x],1),m&&m.splice(b[x],1);if(y.length?p||r.set(y):r.set(null),c)return!1;if(l(v,u),f!==Ku){var C;if(w===-1)C=d;else{for(g=Math.max(y.length,g),C=[],x=0;x<d.length&&(T=d[x],!(T>=w));x++)C.push(T);for(x=w;x<g;x++)C.push(x)}for(x=0;x<C.length;x++)f(e,C[x])}else s(e);return!0};var BT={};(function(t){var e=ct,r=ZA,a=Ze,i=ve.exports,n=Ut.exports,o=Vt,l=rt.exports,s=o.cleanId,f=o.getFromTrace,c=a.traceIs;t.clearPromiseQueue=function(g){Array.isArray(g._promises)&&g._promises.length>0&&i.log("Clearing previous rejected promises from queue."),g._promises=[]},t.cleanLayout=function(g){var x,_;g||(g={}),g.xaxis1&&(g.xaxis||(g.xaxis=g.xaxis1),delete g.xaxis1),g.yaxis1&&(g.yaxis||(g.yaxis=g.yaxis1),delete g.yaxis1),g.scene1&&(g.scene||(g.scene=g.scene1),delete g.scene1);var T=(n.subplotsRegistry.cartesian||{}).attrRegex,k=(n.subplotsRegistry.polar||{}).attrRegex,S=(n.subplotsRegistry.ternary||{}).attrRegex,A=(n.subplotsRegistry.gl3d||{}).attrRegex,D=Object.keys(g);for(x=0;x<D.length;x++){var M=D[x];if(T&&T.test(M)){var C=g[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,y(C,"domain")&&delete C.domain,C.autotick!==void 0&&(C.tickmode===void 0&&(C.tickmode=C.autotick?"auto":"linear"),delete C.autotick),u(C)}else if(k&&k.test(M)){var $=g[M];u($.radialaxis)}else if(S&&S.test(M)){var F=g[M];u(F.aaxis),u(F.baxis),u(F.caxis)}else if(A&&A.test(M)){var R=g[M],P=R.cameraposition;if(Array.isArray(P)&&P[0].length===4){var E=P[0],L=P[1],z=P[2],I=r([],E),H=[];for(_=0;_<3;++_)H[_]=L[_]+z*I[2+4*_];R.camera={eye:{x:H[0],y:H[1],z:H[2]},center:{x:L[0],y:L[1],z:L[2]},up:{x:0,y:0,z:1}},delete R.cameraposition}u(R.xaxis),u(R.yaxis),u(R.zaxis)}}var U=Array.isArray(g.annotations)?g.annotations.length:0;for(x=0;x<U;x++){var O=g.annotations[x];!i.isPlainObject(O)||(O.ref&&(O.ref==="paper"?(O.xref="paper",O.yref="paper"):O.ref==="data"&&(O.xref="x",O.yref="y"),delete O.ref),v(O,"xref"),v(O,"yref"))}var X=Array.isArray(g.shapes)?g.shapes.length:0;for(x=0;x<X;x++){var B=g.shapes[x];!i.isPlainObject(B)||(v(B,"xref"),v(B,"yref"))}var Y=Array.isArray(g.images)?g.images.length:0;for(x=0;x<Y;x++){var Z=g.images[x];!i.isPlainObject(Z)||(v(Z,"xref"),v(Z,"yref"))}var q=g.legend;return q&&(q.x>3?(q.x=1.02,q.xanchor="left"):q.x<-2&&(q.x=-.02,q.xanchor="right"),q.y>3?(q.y=1.02,q.yanchor="bottom"):q.y<-2&&(q.y=-.02,q.yanchor="top")),u(g),g.dragmode==="rotate"&&(g.dragmode="orbit"),l.clean(g),g.template&&g.template.layout&&t.cleanLayout(g.template.layout),g};function v(g,x){var _=g[x],T=x.charAt(0);_&&_!=="paper"&&(g[x]=s(_,T,!0))}function u(g){g&&((typeof g.title=="string"||typeof g.title=="number")&&(g.title={text:g.title}),x("titlefont","font"),x("titleposition","position"),x("titleside","side"),x("titleoffset","offset"));function x(_,T){var k=g[_],S=g.title&&g.title[T];k&&!S&&(g.title||(g.title={}),g.title[T]=g[_],delete g[_])}}t.cleanData=function(g){for(var x=0;x<g.length;x++){var _=g[x],T;if(_.type==="histogramy"&&"xbins"in _&&!("ybins"in _)&&(_.ybins=_.xbins,delete _.xbins),_.error_y&&"opacity"in _.error_y){var k=l.defaults,S=_.error_y.color||(c(_,"bar")?l.defaultLine:k[x%k.length]);_.error_y.color=l.addOpacity(l.rgb(S),l.opacity(S)*_.error_y.opacity),delete _.error_y.opacity}if("bardir"in _&&(_.bardir==="h"&&(c(_,"bar")||_.type.substr(0,9)==="histogram")&&(_.orientation="h",t.swapXYData(_)),delete _.bardir),_.type==="histogramy"&&t.swapXYData(_),(_.type==="histogramx"||_.type==="histogramy")&&(_.type="histogram"),"scl"in _&&!("colorscale"in _)&&(_.colorscale=_.scl,delete _.scl),"reversescl"in _&&!("reversescale"in _)&&(_.reversescale=_.reversescl,delete _.reversescl),_.xaxis&&(_.xaxis=s(_.xaxis,"x")),_.yaxis&&(_.yaxis=s(_.yaxis,"y")),c(_,"gl3d")&&_.scene&&(_.scene=n.subplotsRegistry.gl3d.cleanId(_.scene)),!c(_,"pie-like")&&!c(_,"bar-like"))if(Array.isArray(_.textposition))for(T=0;T<_.textposition.length;T++)_.textposition[T]=p(_.textposition[T]);else _.textposition&&(_.textposition=p(_.textposition));var A=a.getModule(_);if(A&&A.colorbar){var D=A.colorbar.container,M=D?_[D]:_;M&&M.colorscale&&(M.colorscale==="YIGnBu"&&(M.colorscale="YlGnBu"),M.colorscale==="YIOrRd"&&(M.colorscale="YlOrRd"))}if(_.type==="surface"&&i.isPlainObject(_.contours)){var C=["x","y","z"];for(T=0;T<C.length;T++){var $=_.contours[C[T]];!i.isPlainObject($)||($.highlightColor&&($.highlightcolor=$.highlightColor,delete $.highlightColor),$.highlightWidth&&($.highlightwidth=$.highlightWidth,delete $.highlightWidth))}}if(_.type==="candlestick"||_.type==="ohlc"){var F=(_.increasing||{}).showlegend!==!1,R=(_.decreasing||{}).showlegend!==!1,P=h(_.increasing),E=h(_.decreasing);if(P!==!1&&E!==!1){var L=d(P,E,F,R);L&&(_.name=L)}else(P||E)&&!_.name&&(_.name=P||E)}if(Array.isArray(_.transforms)){var z=_.transforms;for(T=0;T<z.length;T++){var I=z[T];if(!!i.isPlainObject(I))switch(I.type){case"filter":I.filtersrc&&(I.target=I.filtersrc,delete I.filtersrc),I.calendar&&(I.valuecalendar||(I.valuecalendar=I.calendar),delete I.calendar);break;case"groupby":if(I.styles=I.styles||I.style,I.styles&&!Array.isArray(I.styles)){var H=I.styles,U=Object.keys(H);I.styles=[];for(var O=0;O<U.length;O++)I.styles.push({target:U[O],value:H[U[O]]})}break}}}y(_,"line")&&delete _.line,"marker"in _&&(y(_.marker,"line")&&delete _.marker.line,y(_,"marker")&&delete _.marker),l.clean(_),_.autobinx&&(delete _.autobinx,delete _.xbins),_.autobiny&&(delete _.autobiny,delete _.ybins),u(_),_.colorbar&&u(_.colorbar),_.marker&&_.marker.colorbar&&u(_.marker.colorbar),_.line&&_.line.colorbar&&u(_.line.colorbar),_.aaxis&&u(_.aaxis),_.baxis&&u(_.baxis)}};function h(g){if(!i.isPlainObject(g))return!1;var x=g.name;return delete g.name,delete g.showlegend,(typeof x=="string"||typeof x=="number")&&String(x)}function d(g,x,_,T){if(_&&!T)return g;if(T&&!_||!g.trim())return x;if(!x.trim())return g;var k=Math.min(g.length,x.length),S;for(S=0;S<k&&g.charAt(S)===x.charAt(S);S++);var A=g.substr(0,S);return A.trim()}function p(g){var x="middle",_="center";return typeof g=="string"&&(g.indexOf("top")!==-1?x="top":g.indexOf("bottom")!==-1&&(x="bottom"),g.indexOf("left")!==-1?_="left":g.indexOf("right")!==-1&&(_="right")),x+" "+_}function y(g,x){return x in g&&typeof g[x]=="object"&&Object.keys(g[x]).length===0}t.swapXYData=function(g){var x;if(i.swapAttrs(g,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(g.z)&&Array.isArray(g.z[0])&&(g.transpose?delete g.transpose:g.transpose=!0),g.error_x&&g.error_y){var _=g.error_y,T="copy_ystyle"in _?_.copy_ystyle:!(_.color||_.thickness||_.width);i.swapAttrs(g,["error_?.copy_ystyle"]),T&&i.swapAttrs(g,["error_?.color","error_?.thickness","error_?.width"])}if(typeof g.hoverinfo=="string"){var k=g.hoverinfo.split("+");for(x=0;x<k.length;x++)k[x]==="x"?k[x]="y":k[x]==="y"&&(k[x]="x");g.hoverinfo=k.join("+")}},t.coerceTraceIndices=function(g,x){if(e(x))return[x];if(!Array.isArray(x)||!x.length)return g.data.map(function(k,S){return S});if(Array.isArray(x)){for(var _=[],T=0;T<x.length;T++)i.isIndex(x[T],g.data.length)?_.push(x[T]):i.warn("trace index (",x[T],") is not a number or is out of bounds");return _}return x},t.manageArrayContainers=function(g,x,_){var T=g.obj,k=g.parts,S=k.length,A=k[S-1],D=e(A);if(D&&x===null){var M=k.slice(0,S-1).join("."),C=i.nestedProperty(T,M).get();C.splice(A,1)}else D&&g.get()===void 0&&g.get()===void 0&&(_[g.astr]=null),g.set(x)};var m=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function b(g){var x=g.search(m);if(x>0)return g.substr(0,x)}t.hasParent=function(g,x){for(var _=b(x);_;){if(_ in g)return!0;_=b(_)}return!1};var w=["x","y","z"];t.clearAxisTypes=function(g,x,_){for(var T=0;T<x.length;T++)for(var k=g._fullData[T],S=0;S<3;S++){var A=f(g,k,w[S]);if(A&&A.type!=="log"){var D=A._name,M=A._id.substr(1);if(M.substr(0,5)==="scene"){if(_[M]!==void 0)continue;D=M+"."+D}var C=D+".type";_[D]===void 0&&_[C]===void 0&&i.nestedProperty(g.layout,C).set(null)}}}})(BT);(function(t){var e=nt.exports,r=ct,a=w1,i=ve.exports,n=i.nestedProperty,o=ql,l=XS,s=Ze,f=Co,c=Ut.exports,v=Mt.exports,u=_t.exports,h=rt.exports,d=Wh.initInteractions,p=vn,y=ts.clearOutline,m=Mo.dfltConfig,b=rs,w=BT,g=Dc,x=Xa,_=wr.AX_NAME_PATTERN,T=0,k=5;function S(N,j,G,V){var K;if(N=i.getGraphDiv(N),o.init(N),i.isPlainObject(j)){var Q=j;j=Q.data,G=Q.layout,V=Q.config,K=Q.frames}var me=o.triggerHandler(N,"plotly_beforeplot",[j,G,V]);if(me===!1)return Promise.reject();!j&&!G&&!i.isPlotDiv(N)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",N);function ge(){if(K)return t.addFrames(N,K)}$(N,V),G||(G={}),e.select(N).classed("js-plotly-plot",!0),u.makeTester(),Array.isArray(N._promises)||(N._promises=[]);var fe=(N.data||[]).length===0&&Array.isArray(j);Array.isArray(j)&&(w.cleanData(j),fe?N.data=j:N.data.push.apply(N.data,j),N.empty=!1),(!N.layout||fe)&&(N.layout=w.cleanLayout(G)),c.supplyDefaults(N);var ie=N._fullLayout,Te=ie._has("cartesian");ie._replotting=!0,(fe||ie._shouldCreateBgLayer)&&(We(N),ie._shouldCreateBgLayer&&delete ie._shouldCreateBgLayer),u.initGradients(N),u.initPatterns(N),fe&&v.saveShowSpikeInitial(N);var je=!N.calcdata||N.calcdata.length!==(N._fullData||[]).length;je&&c.doCalcdata(N);for(var Xe=0;Xe<N.calcdata.length;Xe++)N.calcdata[Xe][0].trace=N._fullData[Xe];N._context.responsive?N._responsiveChartHandler||(N._responsiveChartHandler=function(){i.isHidden(N)||c.resize(N)},window.addEventListener("resize",N._responsiveChartHandler)):i.clearResponsive(N);var et=i.extendFlat({},ie._size),st=0;function dt(){for(var Ye=ie._basePlotModules,Qe=0;Qe<Ye.length;Qe++)Ye[Qe].drawFramework&&Ye[Qe].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 ut=N._context.plotGlPixelRatio;if(ie._glcanvas){ie._glcanvas.attr("width",ie.width*ut).attr("height",ie.height*ut).style("width",ie.width+"px").style("height",ie.height+"px");var ot=ie._glcanvas.data()[0].regl;if(ot&&(Math.floor(ie.width*ut)!==ot._gl.drawingBufferWidth||Math.floor(ie.height*ut)!==ot._gl.drawingBufferHeight)){var Ve="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(st)i.error(Ve);else return i.log(Ve+" Clearing graph and plotting again."),c.cleanPlot([],{},N._fullData,ie),c.supplyDefaults(N),ie=N._fullLayout,c.doCalcdata(N),st++,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 qe(){if(c.clearAutoMarginIds(N),g.drawMarginPushers(N),v.allowAutoMargin(N),ie._has("pie"))for(var Ye=N._fullData,Qe=0;Qe<Ye.length;Qe++){var ut=Ye[Qe];ut.type==="pie"&&ut.automargin&&c.allowAutoMargin(N,"pie."+ut.uid+".automargin")}return c.doAutoMargin(N),c.previousPromises(N)}function St(){if(!!c.didMarginChange(et,ie._size))return i.syncOrAsync([qe,g.layoutStyles],N)}function lt(){if(!je){Ke();return}return i.syncOrAsync([s.getComponentMethod("shapes","calcAutorange"),s.getComponentMethod("annotations","calcAutorange"),Ke],N)}function Ke(){N._transitioning||(g.doAutoRangeAndConstraints(N),fe&&v.saveRangeInitial(N),s.getComponentMethod("rangeslider","calcAutorange")(N))}function yt(){return v.draw(N,fe?"":"redraw")}var ht=[c.previousPromises,ge,dt,qe,St];Te&&ht.push(lt),ht.push(g.layoutStyles),Te&&ht.push(yt,function(Qe){Qe._fullLayout._insideTickLabelsAutorange&&Se(Qe,Qe._fullLayout._insideTickLabelsAutorange).then(function(){Qe._fullLayout._insideTickLabelsAutorange=void 0})}),ht.push(g.drawData,g.finalDraw,d,c.addLinks,c.rehover,c.redrag,c.reselect,c.doAutoMargin,it,c.previousPromises);function it(Ye){Ye._fullLayout._insideTickLabelsAutorange&&fe&&v.saveRangeInitial(Ye,!0)}var tt=i.syncOrAsync(ht,N);return(!tt||!tt.then)&&(tt=Promise.resolve()),tt.then(function(){return A(N),N})}function A(N){var j=N._fullLayout;j._redrawFromAutoMarginCount?j._redrawFromAutoMarginCount--:N.emit("plotly_afterplot")}function D(N){return i.extendFlat(m,N)}function M(N,j){try{N._fullLayout._paper.style("background",j)}catch(G){i.error(G)}}function C(N,j){var G=h.combine(j,"white");M(N,G)}function $(N,j){if(!N._context){N._context=i.extendDeep({},m);var G=e.select("base");N._context._baseUrl=G.size()&&G.attr("href")?window.location.href.split("#")[0]:""}var V=N._context,K,Q,me;if(j){for(Q=Object.keys(j),K=0;K<Q.length;K++)me=Q[K],!(me==="editable"||me==="edits")&&me in V&&(me==="setBackground"&&j[me]==="opaque"?V[me]=C:V[me]=j[me]);j.plot3dPixelRatio&&!V.plotGlPixelRatio&&(V.plotGlPixelRatio=V.plot3dPixelRatio);var ge=j.editable;if(ge!==void 0)for(V.editable=ge,Q=Object.keys(V.edits),K=0;K<Q.length;K++)V.edits[Q[K]]=ge;if(j.edits)for(Q=Object.keys(j.edits),K=0;K<Q.length;K++)me=Q[K],me in V.edits&&(V.edits[me]=j.edits[me]);V._exportedPlot=j._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 fe=V.scrollZoom,ie=V._scrollZoom={};if(fe===!0)ie.cartesian=1,ie.gl3d=1,ie.geo=1,ie.mapbox=1;else if(typeof fe=="string"){var Te=fe.split("+");for(K=0;K<Te.length;K++)ie[Te[K]]=1}else fe!==!1&&(ie.gl3d=1,ie.geo=1,ie.mapbox=1)}function F(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 R(N,j,G,V){return N=i.getGraphDiv(N),c.cleanPlot([],{},N._fullData||[],N._fullLayout||{}),c.purge(N),t._doPlot(N,j,G,V)}function P(N,j){var G=j+1,V=[],K,Q;for(K=0;K<N.length;K++)Q=N[K],Q<0?V.push(G+Q):V.push(Q);return V}function E(N,j,G){var V,K;for(V=0;V<j.length;V++){if(K=j[V],K!==parseInt(K,10))throw new Error("all values in "+G+" must be integers");if(K>=N.data.length||K<-N.data.length)throw new Error(G+" must be valid indices for gd.data.");if(j.indexOf(K,V+1)>-1||K>=0&&j.indexOf(-N.data.length+K)>-1||K<0&&j.indexOf(N.data.length+K)>-1)throw new Error("each index in "+G+" must be unique.")}}function L(N,j,G){if(!Array.isArray(N.data))throw new Error("gd.data must be an array.");if(typeof j>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(j)||(j=[j]),E(N,j,"currentIndices"),typeof G<"u"&&!Array.isArray(G)&&(G=[G]),typeof G<"u"&&E(N,G,"newIndices"),typeof G<"u"&&j.length!==G.length)throw new Error("current and new indices must be of equal length.")}function z(N,j,G){var V,K;if(!Array.isArray(N.data))throw new Error("gd.data must be an array.");if(typeof j>"u")throw new Error("traces must be defined.");for(Array.isArray(j)||(j=[j]),V=0;V<j.length;V++)if(K=j[V],typeof K!="object"||Array.isArray(K)||K===null)throw new Error("all values in traces array must be non-array objects");if(typeof G<"u"&&!Array.isArray(G)&&(G=[G]),typeof G<"u"&&G.length!==j.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function I(N,j,G,V){var K=i.isPlainObject(V);if(!Array.isArray(N.data))throw new Error("gd.data must be an array");if(!i.isPlainObject(j))throw new Error("update must be a key:value object");if(typeof G>"u")throw new Error("indices must be an integer or array of integers");E(N,G,"indices");for(var Q in j){if(!Array.isArray(j[Q])||j[Q].length!==G.length)throw new Error("attribute "+Q+" must be an array of length equal to indices array length");if(K&&(!(Q in V)||!Array.isArray(V[Q])||V[Q].length!==j[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,j,G,V){var K=i.isPlainObject(V),Q=[],me,ge,fe,ie,Te;Array.isArray(G)||(G=[G]),G=P(G,N.data.length-1);for(var je in j)for(var Xe=0;Xe<G.length;Xe++){if(me=N.data[G[Xe]],fe=n(me,je),ge=fe.get(),ie=j[je][Xe],!i.isArrayOrTypedArray(ie))throw new Error("attribute: "+je+" index: "+Xe+" must be an array");if(!i.isArrayOrTypedArray(ge))throw new Error("cannot extend missing or non-array attribute: "+je);if(ge.constructor!==ie.constructor)throw new Error("cannot extend array with an array of a different type: "+je);Te=K?V[je][Xe]:V,r(Te)||(Te=-1),Q.push({prop:fe,target:ge,insert:ie,maxp:Math.floor(Te)})}return Q}function U(N,j,G,V,K){I(N,j,G,V);for(var Q=H(N,j,G,V),me={},ge={},fe=0;fe<Q.length;fe++){var ie=Q[fe].prop,Te=Q[fe].maxp,je=K(Q[fe].target,Q[fe].insert,Te);ie.set(je[0]),Array.isArray(me[ie.astr])||(me[ie.astr]=[]),me[ie.astr].push(je[1]),Array.isArray(ge[ie.astr])||(ge[ie.astr]=[]),ge[ie.astr].push(Q[fe].target.length)}return{update:me,maxPoints:ge}}function O(N,j){var G=new N.constructor(N.length+j.length);return G.set(N),G.set(j,N.length),G}function X(N,j,G,V){N=i.getGraphDiv(N);function K(fe,ie,Te){var je,Xe;if(i.isTypedArray(fe))if(Te<0){var et=new fe.constructor(0),st=O(fe,ie);Te<0?(je=st,Xe=et):(je=et,Xe=st)}else if(je=new fe.constructor(Te),Xe=new fe.constructor(fe.length+ie.length-Te),Te===ie.length)je.set(ie),Xe.set(fe);else if(Te<ie.length){var dt=ie.length-Te;je.set(ie.subarray(dt)),Xe.set(fe),Xe.set(ie.subarray(0,dt),fe.length)}else{var qe=Te-ie.length,St=fe.length-qe;je.set(fe.subarray(St)),je.set(ie,qe),Xe.set(fe.subarray(0,St))}else je=fe.concat(ie),Xe=Te>=0&&Te<je.length?je.splice(0,je.length-Te):[];return[je,Xe]}var Q=U(N,j,G,V,K),me=t.redraw(N),ge=[N,Q.update,G,Q.maxPoints];return l.add(N,t.prependTraces,ge,X,arguments),me}function B(N,j,G,V){N=i.getGraphDiv(N);function K(fe,ie,Te){var je,Xe;if(i.isTypedArray(fe))if(Te<=0){var et=new fe.constructor(0),st=O(ie,fe);Te<0?(je=st,Xe=et):(je=et,Xe=st)}else if(je=new fe.constructor(Te),Xe=new fe.constructor(fe.length+ie.length-Te),Te===ie.length)je.set(ie),Xe.set(fe);else if(Te<ie.length){var dt=ie.length-Te;je.set(ie.subarray(0,dt)),Xe.set(ie.subarray(dt)),Xe.set(fe,dt)}else{var qe=Te-ie.length;je.set(ie),je.set(fe.subarray(0,qe),ie.length),Xe.set(fe.subarray(qe))}else je=ie.concat(fe),Xe=Te>=0&&Te<je.length?je.splice(Te,je.length):[];return[je,Xe]}var Q=U(N,j,G,V,K),me=t.redraw(N),ge=[N,Q.update,G,Q.maxPoints];return l.add(N,t.extendTraces,ge,B,arguments),me}function Y(N,j,G){N=i.getGraphDiv(N);var V=[],K=t.deleteTraces,Q=Y,me=[N,V],ge=[N,j],fe,ie;for(z(N,j,G),Array.isArray(j)||(j=[j]),j=j.map(function(Te){return i.extendFlat({},Te)}),w.cleanData(j),fe=0;fe<j.length;fe++)N.data.push(j[fe]);for(fe=0;fe<j.length;fe++)V.push(-j.length+fe);if(typeof G>"u")return ie=t.redraw(N),l.add(N,K,me,Q,ge),ie;Array.isArray(G)||(G=[G]);try{L(N,V,G)}catch(Te){throw N.data.splice(N.data.length-j.length,j.length),Te}return l.startSequence(N),l.add(N,K,me,Q,ge),ie=t.moveTraces(N,V,G),l.stopSequence(N),ie}function Z(N,j){N=i.getGraphDiv(N);var G=[],V=t.addTraces,K=Z,Q=[N,G,j],me=[N,j],ge,fe;if(typeof j>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(j)||(j=[j]),E(N,j,"indices"),j=P(j,N.data.length-1),j.sort(i.sorterDes),ge=0;ge<j.length;ge+=1)fe=N.data.splice(j[ge],1)[0],G.push(fe);var ie=t.redraw(N);return l.add(N,V,Q,K,me),ie}function q(N,j,G){N=i.getGraphDiv(N);var V=[],K=[],Q=q,me=q,ge=[N,G,j],fe=[N,j,G],ie;if(L(N,j,G),j=Array.isArray(j)?j:[j],typeof G>"u")for(G=[],ie=0;ie<j.length;ie++)G.push(-j.length+ie);for(G=Array.isArray(G)?G:[G],j=P(j,N.data.length-1),G=P(G,N.data.length-1),ie=0;ie<N.data.length;ie++)j.indexOf(ie)===-1&&V.push(N.data[ie]);for(ie=0;ie<j.length;ie++)K.push({newIndex:G[ie],trace:N.data[j[ie]]});for(K.sort(function(je,Xe){return je.newIndex-Xe.newIndex}),ie=0;ie<K.length;ie+=1)V.splice(K[ie].newIndex,0,K[ie].trace);N.data=V;var Te=t.redraw(N);return l.add(N,Q,ge,me,fe),Te}function W(N,j,G,V){N=i.getGraphDiv(N),w.clearPromiseQueue(N);var K={};if(typeof j=="string")K[j]=G;else if(i.isPlainObject(j))K=i.extendFlat({},j),V===void 0&&(V=G);else return i.warn("Restyle fail.",j,G,V),Promise.reject();Object.keys(K).length&&(N.changed=!0);var Q=w.coerceTraceIndices(N,V),me=oe(N,K,Q),ge=me.flags;ge.calc&&(N.calcdata=void 0),ge.clearAxisTypes&&w.clearAxisTypes(N,Q,{});var fe=[];ge.fullReplot?fe.push(t._doPlot):(fe.push(c.previousPromises),c.supplyDefaults(N),ge.markerSize&&(c.doCalcdata(N),ye(fe)),ge.style&&fe.push(g.doTraceStyle),ge.colorbars&&fe.push(g.doColorBars),fe.push(A)),fe.push(c.rehover,c.redrag,c.reselect),l.add(N,W,[N,me.undoit,me.traces],W,[N,me.redoit,me.traces]);var ie=i.syncOrAsync(fe,N);return(!ie||!ie.then)&&(ie=Promise.resolve()),ie.then(function(){return N.emit("plotly_restyle",me.eventData),N})}function ae(N){return N===void 0?null:N}function ne(N,j){return j?function(G,V,K){var Q=n(G,V),me=Q.set;return Q.set=function(ge){var fe=(K||"")+V;de(fe,Q.get(),ge,N),me(ge)},Q}:n}function de(N,j,G,V){if(Array.isArray(j)||Array.isArray(G))for(var K=Array.isArray(j)?j:[],Q=Array.isArray(G)?G:[],me=Math.max(K.length,Q.length),ge=0;ge<me;ge++)de(N+"["+ge+"]",K[ge],Q[ge],V);else if(i.isPlainObject(j)||i.isPlainObject(G)){var fe=i.isPlainObject(j)?j:{},ie=i.isPlainObject(G)?G:{},Te=i.extendFlat({},fe,ie);for(var je in Te)de(N+"."+je,fe[je],ie[je],V)}else V[N]===void 0&&(V[N]=ae(j))}function le(N,j,G){for(var V in G){var K=n(N,V);de(V,K.get(),G[V],j)}}function oe(N,j,G){var V=N._fullLayout,K=N._fullData,Q=N.data,me=V._guiEditing,ge=ne(V._preGUI,me),fe=i.extendDeepAll({},j),ie;ue(j);var Te=x.traceFlags(),je={},Xe={},et;function st(){return G.map(function(){})}function dt(It){var lr=v.id2name(It);et.indexOf(lr)===-1&&et.push(lr)}function qe(It){return"LAYOUT"+It+".autorange"}function St(It){return"LAYOUT"+It+".range"}function lt(It){for(var lr=It;lr<K.length;lr++)if(K[lr]._input===Q[It])return K[lr]}function Ke(It,lr,za){if(Array.isArray(It)){It.forEach(function(cs){Ke(cs,lr,za)});return}if(!(It in j||w.hasParent(j,It))){var Li;if(It.substr(0,6)==="LAYOUT")Li=ge(N.layout,It.replace("LAYOUT",""));else{var Or=G[za],Ja=V._tracePreGUI[lt(Or)._fullInput.uid];Li=ne(Ja,me)(Q[Or],It)}It in Xe||(Xe[It]=st()),Xe[It][za]===void 0&&(Xe[It][za]=ae(Li.get())),lr!==void 0&&Li.set(lr)}}function yt(It){return function(lr){return K[lr][It]}}function ht(It){return function(lr,za){return lr===!1?K[G[za]][It]:null}}for(var it in j){if(w.hasParent(j,it))throw new Error("cannot set "+it+" and a parent attribute simultaneously");var tt=j[it],Ye,Qe,ut,ot,Ve,vt;if((it==="autobinx"||it==="autobiny")&&(it=it.charAt(it.length-1)+"bins",Array.isArray(tt)?tt=tt.map(ht(it)):tt===!1?tt=G.map(yt(it)):tt=null),je[it]=tt,it.substr(0,6)==="LAYOUT"){ut=ge(N.layout,it.replace("LAYOUT","")),Xe[it]=[ae(ut.get())],ut.set(Array.isArray(tt)?tt[0]:tt),Te.calc=!0;continue}for(Xe[it]=st(),ie=0;ie<G.length;ie++){Ye=Q[G[ie]],Qe=lt(G[ie]);var Tt=V._tracePreGUI[Qe._fullInput.uid];if(ut=ne(Tt,me)(Ye,it),ot=ut.get(),Ve=Array.isArray(tt)?tt[ie%tt.length]:tt,Ve!==void 0){var or=ut.parts[ut.parts.length-1],rr=it.substr(0,it.length-or.length-1),Fr=rr?rr+".":"",Hr=rr?n(Qe,rr).get():Qe;if(vt=f.getTraceValObject(Qe,ut.parts),vt&&vt.impliedEdits&&Ve!==null)for(var Eo in vt.impliedEdits)Ke(i.relativeAttr(it,Eo),vt.impliedEdits[Eo],ie);else if((or==="thicknessmode"||or==="lenmode")&&ot!==Ve&&(Ve==="fraction"||Ve==="pixels")&&Hr){var Ai=V._size,bn=Hr.orient,xn=bn==="top"||bn==="bottom";if(or==="thicknessmode"){var fs=xn?Ai.h:Ai.w;Ke(Fr+"thickness",Hr.thickness*(Ve==="fraction"?1/fs:fs),ie)}else{var Ea=xn?Ai.w:Ai.h;Ke(Fr+"len",Hr.len*(Ve==="fraction"?1/Ea:Ea),ie)}}else if(it==="type"&&(Ve==="pie"!=(ot==="pie")||Ve==="funnelarea"!=(ot==="funnelarea"))){var xa="x",zo="y";(Ve==="bar"||ot==="bar")&&Ye.orientation==="h"&&(xa="y",zo="x"),i.swapAttrs(Ye,["?","?src"],"labels",xa),i.swapAttrs(Ye,["d?","?0"],"label",xa),i.swapAttrs(Ye,["?","?src"],"values",zo),ot==="pie"||ot==="funnelarea"?(n(Ye,"marker.color").set(n(Ye,"marker.colors").get()),V._pielayer.selectAll("g.trace").remove()):s.traceIs(Ye,"cartesian")&&n(Ye,"marker.colors").set(n(Ye,"marker.color").get())}Xe[it][ie]=ae(ot);var Mi=["swapxy","swapxyaxes","orientation","orientationaxes"];if(Mi.indexOf(it)!==-1){if(it==="orientation"){ut.set(Ve);var _n=Ye.x&&!Ye.y?"h":"v";if((ut.get()||_n)===Qe.orientation)continue}else it==="orientationaxes"&&(Ye.orientation={v:"h",h:"v"}[Qe.orientation]);w.swapXYData(Ye),Te.calc=Te.clearAxisTypes=!0}else c.dataArrayContainers.indexOf(ut.parts[0])!==-1?(w.manageArrayContainers(ut,Ve,Xe),Te.calc=!0):(vt?vt.arrayOk&&!s.traceIs(Qe,"regl")&&(i.isArrayOrTypedArray(Ve)||i.isArrayOrTypedArray(ot))?Te.calc=!0:x.update(Te,vt):Te.calc=!0,ut.set(Ve))}}if(["swapxyaxes","orientationaxes"].indexOf(it)!==-1&&v.swap(N,G),it==="orientationaxes"){var Qa=n(N.layout,"hovermode"),wn=Qa.get();wn==="x"?Qa.set("y"):wn==="y"?Qa.set("x"):wn==="x unified"?Qa.set("y unified"):wn==="y unified"&&Qa.set("x unified")}if(["orientation","type"].indexOf(it)!==-1){for(et=[],ie=0;ie<G.length;ie++){var Si=Q[G[ie]];s.traceIs(Si,"cartesian")&&(dt(Si.xaxis||"x"),dt(Si.yaxis||"y"))}Ke(et.map(qe),!0,0),Ke(et.map(St),[0,1],0)}}return(Te.calc||Te.plot)&&(Te.fullReplot=!0),{flags:Te,undoit:Xe,redoit:je,traces:G,eventData:i.extendDeepNoArrays([],[fe,G])}}function ue(N){var j=i.counterRegex("axis",".title",!1,!1),G=/colorbar\.title$/,V=Object.keys(N),K,Q,me;for(K=0;K<V.length;K++)Q=V[K],me=N[Q],(Q==="title"||j.test(Q)||G.test(Q))&&(typeof me=="string"||typeof me=="number")?ge(Q,Q.replace("title","title.text")):Q.indexOf("titlefont")>-1&&Q.indexOf("grouptitlefont")===-1?ge(Q,Q.replace("titlefont","title.font")):Q.indexOf("titleposition")>-1?ge(Q,Q.replace("titleposition","title.position")):Q.indexOf("titleside")>-1?ge(Q,Q.replace("titleside","title.side")):Q.indexOf("titleoffset")>-1&&ge(Q,Q.replace("titleoffset","title.offset"));function ge(fe,ie){N[ie]=N[fe],delete N[fe]}}function Se(N,j,G){N=i.getGraphDiv(N),w.clearPromiseQueue(N);var V={};if(typeof j=="string")V[j]=G;else if(i.isPlainObject(j))V=i.extendFlat({},j);else return i.warn("Relayout fail.",j,G),Promise.reject();Object.keys(V).length&&(N.changed=!0);var K=_e(N,V),Q=K.flags;Q.calc&&(N.calcdata=void 0);var me=[c.previousPromises];Q.layoutReplot?me.push(g.layoutReplot):Object.keys(V).length&&(he(N,Q,K)||c.supplyDefaults(N),Q.legend&&me.push(g.doLegend),Q.layoutstyle&&me.push(g.layoutStyles),Q.axrange&&ye(me,K.rangesAltered),Q.ticks&&me.push(g.doTicksRelayout),Q.modebar&&me.push(g.doModeBar),Q.camera&&me.push(g.doCamera),Q.colorbars&&me.push(g.doColorBars),me.push(A)),me.push(c.rehover,c.redrag,c.reselect),l.add(N,Se,[N,K.undoit],Se,[N,K.redoit]);var ge=i.syncOrAsync(me,N);return(!ge||!ge.then)&&(ge=Promise.resolve(N)),ge.then(function(){return N.emit("plotly_relayout",K.eventData),N})}function he(N,j,G){var V=N._fullLayout;if(!j.axrange)return!1;for(var K in j)if(K!=="axrange"&&j[K])return!1;for(var Q in G.rangesAltered){var me=v.id2name(Q),ge=N.layout[me],fe=V[me];if(fe.autorange=ge.autorange,ge.range&&(fe.range=ge.range.slice()),fe.cleanRange(),fe._matchGroup){for(var ie in fe._matchGroup)if(ie!==Q){var Te=V[v.id2name(ie)];Te.autorange=fe.autorange,Te.range=fe.range.slice(),Te._input.range=fe.range.slice()}}}return!0}function ye(N,j){var G=j?function(V){var K=[],Q=!0;for(var me in j){var ge=v.getFromId(V,me);if(K.push(me),(ge.ticklabelposition||"").indexOf("inside")!==-1&&ge._anchorAxis&&K.push(ge._anchorAxis._id),ge._matchGroup)for(var fe in ge._matchGroup)j[fe]||K.push(fe)}return v.draw(V,K,{skipTitle:Q})}:function(V){return v.draw(V,"redraw")};N.push(y,g.doAutoRangeAndConstraints,G,g.drawData,g.finalDraw)}var ke=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,te=/^[xyz]axis[0-9]*\.autorange$/,J=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function _e(N,j){var G=N.layout,V=N._fullLayout,K=V._guiEditing,Q=ne(V._preGUI,K),me=Object.keys(j),ge=v.list(N),fe=i.extendDeepAll({},j),ie={},Te,je,Xe;for(ue(j),me=Object.keys(j),je=0;je<me.length;je++)if(me[je].indexOf("allaxes")===0){for(Xe=0;Xe<ge.length;Xe++){var et=ge[Xe]._id.substr(1),st=et.indexOf("scene")!==-1?et+".":"",dt=me[je].replace("allaxes",st+ge[Xe]._name);j[dt]||(j[dt]=j[me[je]])}delete j[me[je]]}var qe=x.layoutFlags(),St={},lt={};function Ke(Or,Ja){if(Array.isArray(Or)){Or.forEach(function(VA){Ke(VA,Ja)});return}if(!(Or in j||w.hasParent(j,Or))){var cs=Q(G,Or);Or in lt||(lt[Or]=ae(cs.get())),Ja!==void 0&&cs.set(Ja)}}var yt={},ht;function it(Or){var Ja=v.name2id(Or.split(".")[0]);return yt[Ja]=1,Ja}for(var tt in j){if(w.hasParent(j,tt))throw new Error("cannot set "+tt+" and a parent attribute simultaneously");for(var Ye=Q(G,tt),Qe=j[tt],ut=Ye.parts.length,ot=ut-1;ot>0&&typeof Ye.parts[ot]!="string";)ot--;var Ve=Ye.parts[ot],vt=Ye.parts[ot-1]+"."+Ve,Tt=Ye.parts.slice(0,ot).join("."),or=n(N.layout,Tt).get(),rr=n(V,Tt).get(),Fr=Ye.get();if(Qe!==void 0){St[tt]=Qe,lt[tt]=Ve==="reverse"?Qe:ae(Fr);var Hr=f.getLayoutValObject(V,Ye.parts);if(Hr&&Hr.impliedEdits&&Qe!==null)for(var Eo in Hr.impliedEdits)Ke(i.relativeAttr(tt,Eo),Hr.impliedEdits[Eo]);if(["width","height"].indexOf(tt)!==-1)if(Qe){Ke("autosize",null);var Ai=tt==="height"?"width":"height";Ke(Ai,V[Ai])}else V[tt]=N._initialAutoSize[tt];else if(tt==="autosize")Ke("width",Qe?null:V.width),Ke("height",Qe?null:V.height);else if(vt.match(ke))it(vt),n(V,Tt+"._inputRange").set(null);else if(vt.match(te)){it(vt),n(V,Tt+"._inputRange").set(null);var bn=n(V,Tt).get();bn._inputDomain&&(bn._input.domain=bn._inputDomain.slice())}else vt.match(J)&&n(V,Tt+"._inputDomain").set(null);if(Ve==="type"){ht=or;var xn=rr.type==="linear"&&Qe==="log",fs=rr.type==="log"&&Qe==="linear";if(xn||fs){if(!ht||!ht.range)Ke(Tt+".autorange",!0);else if(rr.autorange)xn&&(ht.range=ht.range[1]>ht.range[0]?[1,2]:[2,1]);else{var Ea=ht.range[0],xa=ht.range[1];xn?(Ea<=0&&xa<=0&&Ke(Tt+".autorange",!0),Ea<=0?Ea=xa/1e6:xa<=0&&(xa=Ea/1e6),Ke(Tt+".range[0]",Math.log(Ea)/Math.LN10),Ke(Tt+".range[1]",Math.log(xa)/Math.LN10)):(Ke(Tt+".range[0]",Math.pow(10,Ea)),Ke(Tt+".range[1]",Math.pow(10,xa)))}Array.isArray(V._subplots.polar)&&V._subplots.polar.length&&V[Ye.parts[0]]&&Ye.parts[1]==="radialaxis"&&delete V[Ye.parts[0]]._subplot.viewInitial["radialaxis.range"],s.getComponentMethod("annotations","convertCoords")(N,rr,Qe,Ke),s.getComponentMethod("images","convertCoords")(N,rr,Qe,Ke)}else Ke(Tt+".autorange",!0),Ke(Tt+".range",null);n(V,Tt+"._inputRange").set(null)}else if(Ve.match(_)){var zo=n(V,tt).get(),Mi=(Qe||{}).type;(!Mi||Mi==="-")&&(Mi="linear"),s.getComponentMethod("annotations","convertCoords")(N,zo,Mi,Ke),s.getComponentMethod("images","convertCoords")(N,zo,Mi,Ke)}var _n=b.containerArrayMatch(tt);if(_n){Te=_n.array,je=_n.index;var Qa=_n.property,wn=Hr||{editType:"calc"};je!==""&&Qa===""&&(b.isAddVal(Qe)?lt[tt]=null:b.isRemoveVal(Qe)?lt[tt]=(n(G,Te).get()||[])[je]:i.warn("unrecognized full object value",j)),x.update(qe,wn),ie[Te]||(ie[Te]={});var Si=ie[Te][je];Si||(Si=ie[Te][je]={}),Si[Qa]=Qe,delete j[tt]}else Ve==="reverse"?(or.range?or.range.reverse():(Ke(Tt+".autorange",!0),or.range=[1,0]),rr.autorange?qe.calc=!0:qe.plot=!0):(tt==="dragmode"&&(Qe===!1&&Fr!==!1||Qe!==!1&&Fr===!1)||V._has("scatter-like")&&V._has("regl")&&tt==="dragmode"&&(Qe==="lasso"||Qe==="select")&&!(Fr==="lasso"||Fr==="select")||V._has("gl2d")?qe.plot=!0:Hr?x.update(qe,Hr):qe.calc=!0,Ye.set(Qe))}}for(Te in ie){var It=b.applyContainerArrayChanges(N,Q(G,Te),ie[Te],qe,Q);It||(qe.plot=!0)}for(var lr in yt){ht=v.getFromId(N,lr);var za=ht&&ht._constraintGroup;if(za){qe.calc=!0;for(var Li in za)yt[Li]||(v.getFromId(N,Li)._constraintShrinkable=!0)}}return(pe(N)||j.height||j.width)&&(qe.plot=!0),(qe.plot||qe.calc)&&(qe.layoutReplot=!0),{flags:qe,rangesAltered:yt,undoit:lt,redoit:St,eventData:fe}}function pe(N){var j=N._fullLayout,G=j.width,V=j.height;return N.layout.autosize&&c.plotAutoSize(N,N.layout,j),j.width!==G||j.height!==V}function Le(N,j,G,V){N=i.getGraphDiv(N),w.clearPromiseQueue(N),i.isPlainObject(j)||(j={}),i.isPlainObject(G)||(G={}),Object.keys(j).length&&(N.changed=!0),Object.keys(G).length&&(N.changed=!0);var K=w.coerceTraceIndices(N,V),Q=oe(N,i.extendFlat({},j),K),me=Q.flags,ge=_e(N,i.extendFlat({},G)),fe=ge.flags;(me.calc||fe.calc)&&(N.calcdata=void 0),me.clearAxisTypes&&w.clearAxisTypes(N,K,G);var ie=[];fe.layoutReplot?ie.push(g.layoutReplot):me.fullReplot?ie.push(t._doPlot):(ie.push(c.previousPromises),he(N,fe,ge)||c.supplyDefaults(N),me.style&&ie.push(g.doTraceStyle),(me.colorbars||fe.colorbars)&&ie.push(g.doColorBars),fe.legend&&ie.push(g.doLegend),fe.layoutstyle&&ie.push(g.layoutStyles),fe.axrange&&ye(ie,ge.rangesAltered),fe.ticks&&ie.push(g.doTicksRelayout),fe.modebar&&ie.push(g.doModeBar),fe.camera&&ie.push(g.doCamera),ie.push(A)),ie.push(c.rehover,c.redrag,c.reselect),l.add(N,Le,[N,Q.undoit,ge.undoit,Q.traces],Le,[N,Q.redoit,ge.redoit,Q.traces]);var Te=i.syncOrAsync(ie,N);return(!Te||!Te.then)&&(Te=Promise.resolve(N)),Te.then(function(){return N.emit("plotly_update",{data:Q.eventData,layout:ge.eventData}),N})}function Ie(N){return function(G){G._fullLayout._guiEditing=!0;var V=N.apply(null,arguments);return G._fullLayout._guiEditing=!1,V}}var Pe=[{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"}],Be=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function re(N,j){for(var G=0;G<j.length;G++){var V=j[G],K=N.match(V.pattern);if(K){var Q=K[1]||"";return{head:Q,tail:N.substr(Q.length+1),attr:V.attr}}}}function De(N,j){var G=n(j,N).get();if(G!==void 0)return G;var V=N.split(".");for(V.pop();V.length>1;)if(V.pop(),G=n(j,V.join(".")+".uirevision").get(),G!==void 0)return G;return j.uirevision}function Ce(N,j){for(var G=0;G<j.length;G++)if(j[G]._fullInput.uid===N)return G;return-1}function se(N,j,G){for(var V=0;V<j.length;V++)if(j[V].uid===N)return V;return!j[G]||j[G].uid?-1:G}function ce(N,j){var G=i.isPlainObject(N),V=Array.isArray(N);return G||V?(G&&i.isPlainObject(j)||V&&Array.isArray(j))&&JSON.stringify(N)===JSON.stringify(j):N===j}function Re(N,j,G,V){var K=V._preGUI,Q,me,ge,fe,ie,Te,je,Xe,et,st,dt=[],qe={},St={};for(Q in K){if(ie=re(Q,Pe),ie){if(et=ie.head,st=ie.tail,me=ie.attr||et+".uirevision",ge=n(V,me).get(),fe=ge&&De(me,j),fe&&fe===ge){if(Te=K[Q],Te===null&&(Te=void 0),je=n(j,Q),Xe=je.get(),ce(Xe,Te)){Xe===void 0&&st==="autorange"&&dt.push(et),je.set(ae(n(V,Q).get()));continue}else if(st==="autorange"||st.substr(0,6)==="range["){var lt=K[et+".range[0]"],Ke=K[et+".range[1]"],yt=K[et+".autorange"];if(yt||yt===null&&lt===null&&Ke===null){if(!(et in qe)){var ht=n(j,et).get();qe[et]=ht&&(ht.autorange||ht.autorange!==!1&&(!ht.range||ht.range.length!==2))}if(qe[et]){je.set(ae(n(V,Q).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+Q);delete K[Q],ie&&ie.tail.substr(0,6)==="range["&&(St[ie.head]=1)}for(var it=0;it<dt.length;it++){var tt=dt[it];if(St[tt]){var Ye=n(j,tt).get();Ye&&delete Ye.autorange}}var Qe=V._tracePreGUI;for(var ut in Qe){var ot=Qe[ut],Ve=null,vt;for(Q in ot){if(!Ve){var Tt=Ce(ut,G);if(Tt<0){delete Qe[ut];break}var or=G[Tt];vt=or._fullInput;var rr=se(ut,N,vt.index);if(rr<0){delete Qe[ut];break}Ve=N[rr]}if(ie=re(Q,Be),ie){if(ie.attr?(ge=n(V,ie.attr).get(),fe=ge&&De(ie.attr,j)):(ge=vt.uirevision,fe=Ve.uirevision,fe===void 0&&(fe=j.uirevision)),fe&&fe===ge&&(Te=ot[Q],Te===null&&(Te=void 0),je=n(Ve,Q),Xe=je.get(),ce(Xe,Te))){je.set(ae(n(vt,Q).get()));continue}}else i.warn("unrecognized GUI edit: "+Q+" in trace uid "+ut);delete ot[Q]}}}function we(N,j,G,V){var K,Q;function me(){return t.addFrames(N,K)}N=i.getGraphDiv(N),w.clearPromiseQueue(N);var ge=N._fullData,fe=N._fullLayout;if(!i.isPlotDiv(N)||!ge||!fe)Q=t.newPlot(N,j,G,V);else{if(i.isPlainObject(j)){var ie=j;j=ie.data,G=ie.layout,V=ie.config,K=ie.frames}var Te=!1;if(V){var je=i.extendDeep({},N._context);N._context=void 0,$(N,V),Te=Ne(je,N._context)}N.data=j||[],w.cleanData(N.data),N.layout=G||{},w.cleanLayout(N.layout),Re(N.data,N.layout,ge,fe),c.supplyDefaults(N,{skipUpdateCalc:!0});var Xe=N._fullData,et=N._fullLayout,st=et.datarevision===void 0,dt=et.transition,qe=be(N,fe,et,st,dt),St=qe.newDataRevision,lt=xe(N,ge,Xe,st,dt,St);if(pe(N)&&(qe.layoutReplot=!0),lt.calc||qe.calc){N.calcdata=void 0;for(var Ke=Object.getOwnPropertyNames(et),yt=0;yt<Ke.length;yt++){var ht=Ke[yt],it=ht.substring(0,5);if(it==="xaxis"||it==="yaxis"){var tt=et[ht]._emptyCategories;tt&&tt()}}}else c.supplyDefaultsUpdateCalc(N.calcdata,Xe);var Ye=[];if(K&&(N._transitionData={},c.createTransitionData(N),Ye.push(me)),et.transition&&!Te&&(lt.anim||qe.anim))qe.ticks&&Ye.push(g.doTicksRelayout),c.doCalcdata(N),g.doAutoRangeAndConstraints(N),Ye.push(function(){return c.transitionFromReact(N,lt,qe,fe)});else if(lt.fullReplot||qe.layoutReplot||Te)N._fullLayout._skipDefaults=!0,Ye.push(t._doPlot);else{for(var Qe in qe.arrays){var ut=qe.arrays[Qe];if(ut.length){var ot=s.getComponentMethod(Qe,"drawOne");if(ot!==i.noop)for(var Ve=0;Ve<ut.length;Ve++)ot(N,ut[Ve]);else{var vt=s.getComponentMethod(Qe,"draw");if(vt===i.noop)throw new Error("cannot draw components: "+Qe);vt(N)}}}Ye.push(c.previousPromises),lt.style&&Ye.push(g.doTraceStyle),(lt.colorbars||qe.colorbars)&&Ye.push(g.doColorBars),qe.legend&&Ye.push(g.doLegend),qe.layoutstyle&&Ye.push(g.layoutStyles),qe.axrange&&ye(Ye),qe.ticks&&Ye.push(g.doTicksRelayout),qe.modebar&&Ye.push(g.doModeBar),qe.camera&&Ye.push(g.doCamera),Ye.push(A)}Ye.push(c.rehover,c.redrag,c.reselect),Q=i.syncOrAsync(Ye,N),(!Q||!Q.then)&&(Q=Promise.resolve(N))}return Q.then(function(){return N.emit("plotly_react",{data:j,layout:G}),N})}function xe(N,j,G,V,K,Q){var me=j.length===G.length;if(!K&&!me)return{fullReplot:!0,calc:!0};var ge=x.traceFlags();ge.arrays={},ge.nChanges=0,ge.nChangesAnim=0;var fe,ie;function Te(et){var st=f.getTraceValObject(ie,et);return!ie._module.animatable&&st.anim&&(st.anim=!1),st}var je={getValObject:Te,flags:ge,immutable:V,transition:K,newDataRevision:Q,gd:N},Xe={};for(fe=0;fe<j.length;fe++)if(G[fe]){if(ie=G[fe]._fullInput,c.hasMakesDataTransform(ie)&&(ie=G[fe]),Xe[ie.uid])continue;Xe[ie.uid]=1,ze(j[fe]._fullInput,ie,[],je)}return(ge.calc||ge.plot)&&(ge.fullReplot=!0),K&&ge.nChanges&&ge.nChangesAnim&&(ge.anim=ge.nChanges===ge.nChangesAnim&&me?"all":"some"),ge}function be(N,j,G,V,K){var Q=x.layoutFlags();Q.arrays={},Q.rangesAltered={},Q.nChanges=0,Q.nChangesAnim=0;function me(fe){return f.getLayoutValObject(G,fe)}var ge={getValObject:me,flags:Q,immutable:V,transition:K,gd:N};return ze(j,G,[],ge),(Q.plot||Q.calc)&&(Q.layoutReplot=!0),K&&Q.nChanges&&Q.nChangesAnim&&(Q.anim=Q.nChanges===Q.nChangesAnim?"all":"some"),Q}function ze(N,j,G,V){var K,Q,me,ge=V.getValObject,fe=V.flags,ie=V.immutable,Te=V.inArray,je=V.arrayIndex;function Xe(){var Tt=K.editType;if(Te&&Tt.indexOf("arraydraw")!==-1){i.pushUnique(fe.arrays[Te],je);return}x.update(fe,K),Tt!=="none"&&fe.nChanges++,V.transition&&K.anim&&fe.nChangesAnim++,(ke.test(me)||te.test(me))&&(fe.rangesAltered[G[0]]=1),J.test(me)&&n(j,"_inputDomain").set(null),Q==="datarevision"&&(fe.newDataRevision=1)}function et(Tt){return Tt.valType==="data_array"||Tt.arrayOk}for(Q in N){if(fe.calc&&!V.transition)return;var st=N[Q],dt=j[Q],qe=G.concat(Q);if(me=qe.join("."),!(Q.charAt(0)==="_"||typeof st=="function"||st===dt)){if((Q==="tick0"||Q==="dtick")&&G[0]!=="geo"){var St=j.tickmode;if(St==="auto"||St==="array"||!St)continue}if(!(Q==="range"&&j.autorange)&&!((Q==="zmin"||Q==="zmax")&&j.type==="contourcarpet")&&(K=ge(qe),!!K&&!(K._compareAsJSON&&JSON.stringify(st)===JSON.stringify(dt)))){var lt=K.valType,Ke,yt=et(K),ht=Array.isArray(st),it=Array.isArray(dt);if(ht&&it){var tt="_input_"+Q,Ye=N[tt],Qe=j[tt];if(Array.isArray(Ye)&&Ye===Qe)continue}if(dt===void 0)yt&&ht?fe.calc=!0:Xe();else if(K._isLinkedToArray){var ut=[],ot=!1;Te||(fe.arrays[Q]=ut);var Ve=Math.min(st.length,dt.length),vt=Math.max(st.length,dt.length);if(Ve!==vt)if(K.editType==="arraydraw")ot=!0;else{Xe();continue}for(Ke=0;Ke<Ve;Ke++)ze(st[Ke],dt[Ke],qe.concat(Ke),i.extendFlat({inArray:Q,arrayIndex:Ke},V));if(ot)for(Ke=Ve;Ke<vt;Ke++)ut.push(Ke)}else!lt&&i.isPlainObject(st)?ze(st,dt,qe,V):yt?ht&&it?(ie&&(fe.calc=!0),(ie||V.newDataRevision)&&Xe()):ht!==it?fe.calc=!0:Xe():ht&&it?(st.length!==dt.length||String(st)!==String(dt))&&Xe():Xe()}}}for(Q in j)if(!(Q in N||Q.charAt(0)==="_"||typeof j[Q]=="function"))if(K=ge(G.concat(Q)),et(K)&&Array.isArray(j[Q])){fe.calc=!0;return}else Xe()}function Ne(N,j){var G;for(G in N)if(G.charAt(0)!=="_"){var V=N[G],K=j[G];if(V!==K)if(i.isPlainObject(V)&&i.isPlainObject(K)){if(Ne(V,K))return!0}else if(Array.isArray(V)&&Array.isArray(K)){if(V.length!==K.length)return!0;for(var Q=0;Q<V.length;Q++)if(V[Q]!==K[Q])if(i.isPlainObject(V[Q])&&i.isPlainObject(K[Q])){if(Ne(V[Q],K[Q]))return!0}else return!0}else return!0}}function He(N,j,G){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=[]),G=c.supplyAnimationDefaults(G);var K=G.transition,Q=G.frame;V._frameWaitingCnt===void 0&&(V._frameWaitingCnt=0);function me(ie){return Array.isArray(K)?ie>=K.length?K[0]:K[ie]:K}function ge(ie){return Array.isArray(Q)?ie>=Q.length?Q[0]:Q[ie]:Q}function fe(ie,Te){var je=0;return function(){if(ie&&++je===Te)return ie()}}return new Promise(function(ie,Te){function je(){if(V._frameQueue.length!==0){for(;V._frameQueue.length;){var Ve=V._frameQueue.pop();Ve.onInterrupt&&Ve.onInterrupt()}N.emit("plotly_animationinterrupted",[])}}function Xe(Ve){if(Ve.length!==0){for(var vt=0;vt<Ve.length;vt++){var Tt;Ve[vt].type==="byname"?Tt=c.computeFrame(N,Ve[vt].name):Tt=Ve[vt].data;var or=ge(vt),rr=me(vt);rr.duration=Math.min(rr.duration,or.duration);var Fr={frame:Tt,name:Ve[vt].name,frameOpts:or,transitionOpts:rr};vt===Ve.length-1&&(Fr.onComplete=fe(ie,2),Fr.onInterrupt=Te),V._frameQueue.push(Fr)}G.mode==="immediate"&&(V._lastFrameAt=-1/0),V._animationRaf||dt()}}function et(){N.emit("plotly_animated"),window.cancelAnimationFrame(V._animationRaf),V._animationRaf=null}function st(){V._currentFrame&&V._currentFrame.onComplete&&V._currentFrame.onComplete();var Ve=V._currentFrame=V._frameQueue.shift();if(Ve){var vt=Ve.name?Ve.name.toString():null;N._fullLayout._currentFrame=vt,V._lastFrameAt=Date.now(),V._timeToNext=Ve.frameOpts.duration,c.transition(N,Ve.frame.data,Ve.frame.layout,w.coerceTraceIndices(N,Ve.frame.traces),Ve.frameOpts,Ve.transitionOpts).then(function(){Ve.onComplete&&Ve.onComplete()}),N.emit("plotly_animatingframe",{name:vt,frame:Ve.frame,animation:{frame:Ve.frameOpts,transition:Ve.transitionOpts}})}else et()}function dt(){N.emit("plotly_animating"),V._lastFrameAt=-1/0,V._timeToNext=0,V._runningTransitions=0,V._currentFrame=null;var Ve=function(){V._animationRaf=window.requestAnimationFrame(Ve),Date.now()-V._lastFrameAt>V._timeToNext&&st()};Ve()}var qe=0;function St(Ve){return Array.isArray(K)?qe>=K.length?Ve.transitionOpts=K[qe]:Ve.transitionOpts=K[0]:Ve.transitionOpts=K,qe++,Ve}var lt,Ke,yt=[],ht=j==null,it=Array.isArray(j),tt=!ht&&!it&&i.isPlainObject(j);if(tt)yt.push({type:"object",data:St(i.extendFlat({},j))});else if(ht||["string","number"].indexOf(typeof j)!==-1)for(lt=0;lt<V._frames.length;lt++)Ke=V._frames[lt],!!Ke&&(ht||String(Ke.group)===String(j))&&yt.push({type:"byname",name:String(Ke.name),data:St({name:Ke.name})});else if(it)for(lt=0;lt<j.length;lt++){var Ye=j[lt];["number","string"].indexOf(typeof Ye)!==-1?(Ye=String(Ye),yt.push({type:"byname",name:Ye,data:St({name:Ye})})):i.isPlainObject(Ye)&&yt.push({type:"object",data:St(i.extendFlat({},Ye))})}for(lt=0;lt<yt.length;lt++)if(Ke=yt[lt],Ke.type==="byname"&&!V._frameHash[Ke.data.name]){i.warn('animate failure: frame not found: "'+Ke.data.name+'"'),Te();return}["next","immediate"].indexOf(G.mode)!==-1&&je(),G.direction==="reverse"&&yt.reverse();var Qe=N._fullLayout._currentFrame;if(Qe&&G.fromcurrent){var ut=-1;for(lt=0;lt<yt.length;lt++)if(Ke=yt[lt],Ke.type==="byname"&&Ke.name===Qe){ut=lt;break}if(ut>0&&ut<yt.length-1){var ot=[];for(lt=0;lt<yt.length;lt++)Ke=yt[lt],(yt[lt].type!=="byname"||lt>ut)&&ot.push(Ke);yt=ot}}yt.length>0?Xe(yt):(N.emit("plotly_animated"),ie())})}function Ae(N,j,G){if(N=i.getGraphDiv(N),j==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,K,Q,me,ge=N._transitionData._frames,fe=N._transitionData._frameHash;if(!Array.isArray(j))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+j);var ie=ge.length+j.length*2,Te=[],je={};for(V=j.length-1;V>=0;V--)if(!!i.isPlainObject(j[V])){var Xe=j[V].name,et=(fe[Xe]||je[Xe]||{}).name,st=j[V].name,dt=fe[et]||je[et];et&&st&&typeof st=="number"&&dt&&T<k&&(T++,i.warn('addFrames: overwriting frame "'+(fe[et]||je[et]).name+'" with a frame whose name of type "number" also equates to "'+et+'". 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.")),je[Xe]={name:Xe},Te.push({frame:c.supplyFrameDefaults(j[V]),index:G&&G[V]!==void 0&&G[V]!==null?G[V]:ie+V})}Te.sort(function(tt,Ye){return tt.index>Ye.index?-1:tt.index<Ye.index?1:0});var qe=[],St=[],lt=ge.length;for(V=Te.length-1;V>=0;V--){if(K=Te[V].frame,typeof K.name=="number"&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!K.name)for(;fe[K.name="frame "+N._transitionData._counter++];);if(fe[K.name]){for(Q=0;Q<ge.length&&(ge[Q]||{}).name!==K.name;Q++);qe.push({type:"replace",index:Q,value:K}),St.unshift({type:"replace",index:Q,value:ge[Q]})}else me=Math.max(0,Math.min(Te[V].index,lt)),qe.push({type:"insert",index:me,value:K}),St.unshift({type:"delete",index:me}),lt++}var Ke=c.modifyFrames,yt=c.modifyFrames,ht=[N,St],it=[N,qe];return l&&l.add(N,Ke,ht,yt,it),c.modifyFrames(N,qe)}function Fe(N,j){if(N=i.getGraphDiv(N),!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N);var G,V,K=N._transitionData._frames,Q=[],me=[];if(!j)for(j=[],G=0;G<K.length;G++)j.push(G);for(j=j.slice(),j.sort(),G=j.length-1;G>=0;G--)V=j[G],Q.push({type:"delete",index:V}),me.unshift({type:"insert",index:V,value:K[V]});var ge=c.modifyFrames,fe=c.modifyFrames,ie=[N,me],Te=[N,Q];return l&&l.add(N,ge,ie,fe,Te),c.modifyFrames(N,Q)}function Ge(N){N=i.getGraphDiv(N);var j=N._fullLayout||{},G=N._fullData||[];return c.cleanPlot([],{},G,j),c.purge(N),o.purge(N),j._container&&j._container.remove(),delete N._context,N}function Oe(N){var j=N._fullLayout,G=N.getBoundingClientRect();if(!i.equalDomRects(G,j._lastBBox)){var V=j._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(N));j._invScaleX=Math.sqrt(V[0][0]*V[0][0]+V[0][1]*V[0][1]+V[0][2]*V[0][2]),j._invScaleY=Math.sqrt(V[1][0]*V[1][0]+V[1][1]*V[1][1]+V[1][2]*V[1][2]),j._lastBBox=G}}function We(N){var j=e.select(N),G=N._fullLayout;if(G._calcInverseTransform=Oe,G._calcInverseTransform(N),G._container=j.selectAll(".plot-container").data([0]),G._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),G._paperdiv=G._container.selectAll(".svg-container").data([0]),G._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),G._glcontainer=G._paperdiv.selectAll(".gl-container").data([{}]),G._glcontainer.enter().append("div").classed("gl-container",!0),G._paperdiv.selectAll(".main-svg").remove(),G._paperdiv.select(".modebar-container").remove(),G._paper=G._paperdiv.insert("svg",":first-child").classed("main-svg",!0),G._toppaper=G._paperdiv.append("svg").classed("main-svg",!0),G._modebardiv=G._paperdiv.append("div"),delete G._modeBar,G._hoverpaper=G._paperdiv.append("svg").classed("main-svg",!0),!G._uid){var V={};e.selectAll("defs").each(function(){this.id&&(V[this.id.split("-")[1]]=1)}),G._uid=i.randstr(V)}G._paperdiv.selectAll(".main-svg").attr(p.svgAttrs),G._defs=G._paper.append("defs").attr("id","defs-"+G._uid),G._clips=G._defs.append("g").classed("clips",!0),G._topdefs=G._toppaper.append("defs").attr("id","topdefs-"+G._uid),G._topclips=G._topdefs.append("g").classed("clips",!0),G._bgLayer=G._paper.append("g").classed("bglayer",!0),G._draggers=G._paper.append("g").classed("draglayer",!0);var K=G._paper.append("g").classed("layer-below",!0);G._imageLowerLayer=K.append("g").classed("imagelayer",!0),G._shapeLowerLayer=K.append("g").classed("shapelayer",!0),G._cartesianlayer=G._paper.append("g").classed("cartesianlayer",!0),G._polarlayer=G._paper.append("g").classed("polarlayer",!0),G._smithlayer=G._paper.append("g").classed("smithlayer",!0),G._ternarylayer=G._paper.append("g").classed("ternarylayer",!0),G._geolayer=G._paper.append("g").classed("geolayer",!0),G._funnelarealayer=G._paper.append("g").classed("funnelarealayer",!0),G._pielayer=G._paper.append("g").classed("pielayer",!0),G._iciclelayer=G._paper.append("g").classed("iciclelayer",!0),G._treemaplayer=G._paper.append("g").classed("treemaplayer",!0),G._sunburstlayer=G._paper.append("g").classed("sunburstlayer",!0),G._indicatorlayer=G._toppaper.append("g").classed("indicatorlayer",!0),G._glimages=G._paper.append("g").classed("glimages",!0);var Q=G._toppaper.append("g").classed("layer-above",!0);G._imageUpperLayer=Q.append("g").classed("imagelayer",!0),G._shapeUpperLayer=Q.append("g").classed("shapelayer",!0),G._selectionLayer=G._toppaper.append("g").classed("selectionlayer",!0),G._infolayer=G._toppaper.append("g").classed("infolayer",!0),G._menulayer=G._toppaper.append("g").classed("menulayer",!0),G._zoomlayer=G._toppaper.append("g").classed("zoomlayer",!0),G._hoverlayer=G._hoverpaper.append("g").classed("hoverlayer",!0),G._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),N.emit("plotly_framework")}t.animate=He,t.addFrames=Ae,t.deleteFrames=Fe,t.addTraces=Y,t.deleteTraces=Z,t.extendTraces=X,t.moveTraces=q,t.prependTraces=B,t.newPlot=R,t._doPlot=S,t.purge=Ge,t.react=we,t.redraw=F,t.relayout=Se,t.restyle=W,t.setPlotConfig=D,t.update=Le,t._guiRelayout=Ie(Se),t._guiRestyle=Ie(W),t._guiUpdate=Ie(Le),t._storeDirectGUIEdit=le})(Dh);var gr={},qP=Ze;gr.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0};gr.getRedrawFunc=function(t){return function(){qP.getComponentMethod("colorbar","draw")(t)}};gr.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)};gr.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var jT=window.URL||window.webkitURL;gr.createObjectURL=function(t){return jT.createObjectURL(t)};gr.revokeObjectURL=function(t){return jT.revokeObjectURL(t)};gr.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=ZP(window.atob(t));return new window.Blob([r],{type:"image/"+e})};gr.octetStream=function(t){document.location.href="data:application/octet-stream"+t};function ZP(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}gr.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/;gr.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.";var Od=nt.exports,KP=ve.exports,QP=_t.exports,JP=rt.exports,Vs=vn,Ju=/"/g,ml="TOBESTRIPPED",eR=new RegExp('("'+ml+")|("+ml+'")',"g");function tR(t){var e=Od.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(a){return a==="&lt;"?"&#60;":a==="&rt;"?"&#62;":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":e.html(a).text()});return e.remove(),r}function rR(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}var Ap=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(QP.setRect,0,0,l,s).call(JP.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(f=0;f<c.length;f++){var v=c[f];v.toSVG&&v.toSVG(e)}if(o){var u=o.node().childNodes,h=Array.prototype.slice.call(u);for(f=0;f<h.length;f++){var d=h[f];d.childNodes.length&&n.node().appendChild(d)}}i._draggers&&i._draggers.remove(),n.node().style.background="",n.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var y=Od.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){y.remove();return}else y.style({visibility:null,display:null});var m=this.style.fontFamily;m&&m.indexOf('"')!==-1&&y.style("font-family",m.replace(Ju,ml))}),n.selectAll(".gradient_filled,.pattern_filled").each(function(){var y=Od.select(this),m=this.style.fill;m&&m.indexOf("url(")!==-1&&y.style("fill",m.replace(Ju,ml));var b=this.style.stroke;b&&b.indexOf("url(")!==-1&&y.style("stroke",b.replace(Ju,ml))}),(r==="pdf"||r==="eps")&&n.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),n.node().setAttributeNS(Vs.xmlns,"xmlns",Vs.svg),n.node().setAttributeNS(Vs.xmlns,"xmlns:xlink",Vs.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=tR(p),p=rR(p),p=p.replace(eR,"'"),KP.isIE()&&(p=p.replace(/"/gi,"'"),p=p.replace(/(\('#)([^']*)('\))/gi,'("#$2")'),p=p.replace(/(\\')/gi,'"')),p},l0=ve.exports,aR=vh.exports.EventEmitter,Dn=gr;function iR(t){var e=t.emitter||new aR,r=new Promise(function(a,i){var n=window.Image,o=t.svg,l=t.format||"png";if(l0.isIE()&&l!=="svg"){var s=new Error(Dn.MSG_IE_BAD_FORMAT);return i(s),t.promise?r:e.emit("error",s)}var f=t.canvas,c=t.scale||1,v=t.width||300,u=t.height||150,h=c*v,d=c*u,p=f.getContext("2d",{willReadFrequently:!0}),y=new n,m,b;l==="svg"||l0.isSafari()?b=Dn.encodeSVG(o):(m=Dn.createBlob(o,"svg"),b=Dn.createObjectURL(m)),f.width=h,f.height=d,y.onload=function(){var w;switch(m=null,Dn.revokeObjectURL(b),l!=="svg"&&p.drawImage(y,0,0,h,d),l){case"jpeg":w=f.toDataURL("image/jpeg");break;case"png":w=f.toDataURL("image/png");break;case"webp":w=f.toDataURL("image/webp");break;case"svg":w=b;break;default:var g="Image format is not jpeg, png, svg or webp.";if(i(new Error(g)),!t.promise)return e.emit("error",g)}a(w),t.promise||e.emit("success",w)},y.onerror=function(w){if(m=null,Dn.revokeObjectURL(b),i(w),!t.promise)return e.emit("error",w)},y.src=b});return t.promise?r:e}var Mp=iR,s0=ct,f0=Dh,nR=Ut.exports,Aa=ve.exports,Ko=gr,oR=Ap,lR=Mp,sR=cc.version,ev={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}};function fR(t,e){e=e||{};var r,a,i,n;Aa.isPlainObject(t)?(r=t.data||[],a=t.layout||{},i=t.config||{},n={}):(t=Aa.getGraphDiv(t),r=Aa.extendDeep([],t.data),a=Aa.extendDeep({},t.layout),i=t._context,n=t._fullLayout||{});function o(_){return!(_ in e)||Aa.validate(e[_],ev[_])}if(!o("width")&&e.width!==null||!o("height")&&e.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+Aa.join2(ev.format.values,", "," or ")+".");var l={};function s(_,T){return Aa.coerce(e,l,ev,_,T)}var f=s("format"),c=s("width"),v=s("height"),u=s("scale"),h=s("setBackground"),d=s("imageDataOnly"),p=document.createElement("div");p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var y=Aa.extendFlat({},a);c?y.width=c:e.width===null&&s0(n.width)&&(y.width=n.width),v?y.height=v:e.height===null&&s0(n.height)&&(y.height=n.height);var m=Aa.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:h}),b=Ko.getRedrawFunc(p);function w(){return new Promise(function(_){setTimeout(_,Ko.getDelay(p._fullLayout))})}function g(){return new Promise(function(_,T){var k=oR(p,f,u),S=p._fullLayout.width,A=p._fullLayout.height;function D(){f0.purge(p),document.body.removeChild(p)}if(f==="full-json"){var M=nR.graphJson(p,!1,"keepdata","object",!0,!0);return M.version=sR,M=JSON.stringify(M),D(),_(d?M:Ko.encodeJSON(M))}if(D(),f==="svg")return _(d?k:Ko.encodeSVG(k));var C=document.createElement("canvas");C.id=Aa.randstr(),lR({format:f,width:S,height:A,scale:u,canvas:C,svg:k,promise:!0}).then(_).catch(T)})}function x(_){return d?_.replace(Ko.IMAGE_URL_PREFIX,""):_}return new Promise(function(_,T){f0.newPlot(p,r,y,m).then(b).then(w).then(g).then(function(k){_(x(k))}).catch(function(k){T(k)})})}var GT=fR,Qr=ve.exports,cR=Ut.exports,uR=Co,vR=Mo.dfltConfig,Ur=Qr.isPlainObject,pi=Array.isArray,c0=Qr.isArrayOrTypedArray,dR=function(e,r){e===void 0&&(e=[]),r===void 0&&(r={});var a=uR.get(),i=[],n={_context:Qr.extendFlat({},vR)},o,l;pi(e)?(n.data=Qr.extendDeep([],e),o=e):(n.data=[],o=[],i.push(Wt("array","data"))),Ur(r)?(n.layout=Qr.extendDeep({},r),l=r):(n.layout={},l={},arguments.length>1&&i.push(Wt("object","layout"))),cR.supplyDefaults(n);for(var s=n._fullData,f=o.length,c=0;c<f;c++){var v=o[c],u=["data",c];if(!Ur(v)){i.push(Wt("object",u));continue}var h=s[c],d=h.type,p=a.traces[d].attributes;p.type={valType:"enumerated",values:[d]},h.visible===!1&&v.visible!==!1&&i.push(Wt("invisible",u)),yl(v,h,p,i,u);var y=v.transforms,m=h.transforms;if(y){pi(y)||i.push(Wt("array",u,["transforms"])),u.push("transforms");for(var b=0;b<y.length;b++){var w=["transforms",b],g=y[b].type;if(!Ur(y[b])){i.push(Wt("object",u,w));continue}var x=a.transforms[g]?a.transforms[g].attributes:{};x.type={valType:"enumerated",values:Object.keys(a.transforms)},yl(y[b],m[b],x,i,u,w)}}}var _=n._fullLayout,T=hR(a,s);return yl(l,_,T,i,"layout"),i.length===0?void 0:i};function yl(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=yR(r,s),h=(u||{}).valType,d=h==="info_array",p=h==="colorscale",y=(u||{}).items;if(!mR(r,s))a.push(Wt("schema",i,f));else if(Ur(c)&&Ur(v)&&h!=="any")yl(c,v,u,a,i,f);else if(d&&pi(c)){c.length>v.length&&a.push(Wt("unused",i,f.concat(v.length)));var m=v.length,b=Array.isArray(y);b&&(m=Math.min(m,y.length));var w,g,x,_,T;if(u.dimensions===2)for(g=0;g<m;g++)if(pi(c[g])){c[g].length>v[g].length&&a.push(Wt("unused",i,f.concat(g,v[g].length)));var k=v[g].length;for(w=0;w<(b?Math.min(k,y[g].length):k);w++)x=b?y[g][w]:y,_=c[g][w],T=v[g][w],Qr.validate(_,x)?T!==_&&T!==+_&&a.push(Wt("dynamic",i,f.concat(g,w),_,T)):a.push(Wt("value",i,f.concat(g,w),_))}else a.push(Wt("array",i,f.concat(g),c[g]));else for(g=0;g<m;g++)x=b?y[g]:y,_=c[g],T=v[g],Qr.validate(_,x)?T!==_&&T!==+_&&a.push(Wt("dynamic",i,f.concat(g),_,T)):a.push(Wt("value",i,f.concat(g),_))}else if(u.items&&!d&&pi(c)){var S=y[Object.keys(y)[0]],A=[],D,M;for(D=0;D<v.length;D++){var C=v[D]._index||D;if(M=f.slice(),M.push(C),Ur(c[C])&&Ur(v[D])){A.push(C);var $=c[C],F=v[D];Ur($)&&$.visible!==!1&&F.visible===!1?a.push(Wt("invisible",i,M)):yl($,F,S,a,i,M)}}for(D=0;D<c.length;D++)M=f.slice(),M.push(D),Ur(c[D])?A.indexOf(D)===-1&&a.push(Wt("unused",i,M)):a.push(Wt("object",i,M,c[D]))}else!Ur(c)&&Ur(v)?a.push(Wt("object",i,f,c)):!c0(c)&&c0(v)&&!d&&!p?a.push(Wt("array",i,f,c)):s in e?Qr.validate(c,u)?u.valType==="enumerated"&&(u.coerceNumber&&c!==+v||c!==v)&&a.push(Wt("dynamic",i,f,c,v)):a.push(Wt("value",i,f,c)):a.push(Wt("unused",i,f,c))}}return a}function hR(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?Qr.extendFlat(r[n.attributes.subplot.dflt],o):Qr.extendFlat(r,o))}return r}var pR={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=Pi(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=Pi(t)+"key "+e,r+" must be linked to an array container"},schema:function(t,e){return Pi(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var a=Ur(r)?"container":"key";return Pi(t)+a+" "+e+" did not get coerced"},dynamic:function(t,e,r,a){return[Pi(t)+"key",e,"(set to '"+r+"')","got reset to","'"+a+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?Pi(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[Pi(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function Pi(t){return pi(t)?"In data trace "+t[1]+", ":"In "+t+", "}function Wt(t,e,r,a,i){r=r||"";var n,o;pi(e)?(n=e[0],o=e[1]):(n=e,o=null);var l=bR(r),s=pR[t](e,l,a,i);return Qr.log(s),{code:t,container:n,trace:o,path:r,astr:l,msg:s}}function mR(t,e){var r=UT(e),a=r.keyMinusId,i=r.id;return a in t&&t[a]._isSubplotObj&&i?!0:e in t}function yR(t,e){if(e in t)return t[e];var r=UT(e);return t[r.keyMinusId]}var gR=Qr.counterRegex("([a-z]+)");function UT(t){var e=t.match(gR);return{keyMinusId:e&&e[1],id:e&&e[2]}}function bR(t){if(!pi(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 u0=ve.exports,Qo=gr;function xR(t,e,r){var a=document.createElement("a"),i="download"in a,n=new Promise(function(o,l){var s,f;if(u0.isIE())return s=Qo.createBlob(t,"svg"),window.navigator.msSaveBlob(s,e),s=null,o(e);if(i)return s=Qo.createBlob(t,r),f=Qo.createObjectURL(s),a.href=f,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),Qo.revokeObjectURL(f),s=null,o(e);if(u0.isSafari()){var c=r==="svg"?",":";base64,";return Qo.octetStream(c+encodeURIComponent(t)),o(e)}l(new Error("download error"))});return n}var _R=xR,tv=ve.exports,wR=GT,TR=_R,kR=gr;function AR(t,e){var r;return tv.isPlainObject(t)||(r=tv.getGraphDiv(t)),e=e||{},e.format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise(function(a,i){r&&r._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),tv.isIE()&&e.format!=="svg"&&i(new Error(kR.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var n=wR(t,e),o=e.filename||t.fn||"newplot";o+="."+e.format.replace("-","."),n.then(function(l){return r&&(r._snapshotInProgress=!1),TR(l,o,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),i(l)})})}var VT=AR,Sp={},Sr=ve.exports,Lr=Sr.isPlainObject,XT=Co,WT=Ut.exports,MR=Ca,YT=At,qT=Mo.dfltConfig;Sp.makeTemplate=function(t){t=Sr.isPlainObject(t)?t:Sr.getGraphDiv(t),t=Sr.extendDeep({_context:qT},{data:t.data,layout:t.layout}),WT.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var a={data:{},layout:{}};e.forEach(function(h){var d={};gl(h,d,LR.bind(null,h));var p=Sr.coerce(h,{},MR,"type"),y=a.data[p];y||(y=a.data[p]=[]),y.push(d)}),gl(r,a.layout,SR.bind(null,r)),delete a.layout.template;var i=r.template;if(Lr(i)){var n=i.layout,o,l,s,f,c,v;Lr(n)&&Xf(n,a.layout);var u=i.data;if(Lr(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++)Xf(s[o%f],c[o]);for(o=v;o<f;o++)c.push(Sr.extendDeep({},s[o]))}for(l in u)l in a.data||(a.data[l]=Sr.extendDeep([],u[l]))}}return a};function Xf(t,e){t=Sr.extendDeep({},t);var r=Object.keys(t).sort(),a,i;function n(c,v,u){if(Lr(v)&&Lr(c))Xf(c,v);else if(Array.isArray(v)&&Array.isArray(c)){var h=YT.arrayTemplater({_template:t},u);for(i=0;i<v.length;i++){var d=v[i],p=h.newItem(d)._template;p&&Xf(p,d)}var y=h.defaultItems();for(i=0;i<y.length;i++)v.push(y[i]._template);for(i=0;i<v.length;i++)delete v[i].templateitemname}}for(a=0;a<r.length;a++){var o=r[a],l=t[o];if(o in e?n(l,e[o],o):e[o]=l,Wf(o)===o)for(var s in e){var f=Wf(s);s!==f&&f===o&&!(s in t)&&n(l,e[s],o)}}}function Wf(t){return t.replace(/[0-9]+$/,"")}function gl(t,e,r,a,i){var n=i&&r(i);for(var o in t){var l=t[o],s=Vr(t,o,a),f=Vr(t,o,i),c=r(f);if(!c){var v=Wf(o);v!==o&&(f=Vr(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&&Lr(l))gl(l,e,r,s,f);else if(c._isLinkedToArray&&Array.isArray(l))for(var u=!1,h=0,d={},p=0;p<l.length;p++){var y=l[p];if(Lr(y)){var m=y.name;if(m)d[m]||(gl(y,e,r,Vr(l,h,s),Vr(l,h,f)),h++,d[m]=1);else if(!u){var b=YT.arrayDefaultKey(o),w=Vr(t,b,a),g=Vr(l,h,s);gl(y,e,r,g,Vr(l,h,f));var x=Sr.nestedProperty(e,g),_=Sr.nestedProperty(e,w);_.set(x.get()),x.set(null),u=!0}}}else{var T=Sr.nestedProperty(e,s);T.set(l)}}}function SR(t,e){return XT.getLayoutValObject(t,Sr.nestedProperty({},e).parts)}function LR(t,e){return XT.getTraceValObject(t,Sr.nestedProperty({},e).parts)}function Vr(t,e,r){var a;return r?Array.isArray(t)?a=r+"["+e+"]":a=r+"."+e:a=e,a}Sp.validateTemplate=function(t,e){var r=Sr.extendDeep({},{_context:qT,data:t.data,layout:t.layout}),a=r.layout||{};Lr(e)||(e=a.template||{});var i=e.layout,n=e.data,o=[];r.layout=a,r.layout.template=e,WT.supplyDefaults(r);var l=r._fullLayout,s=r._fullData,f={};function c(w,g){for(var x in w)if(x.charAt(0)!=="_"&&Lr(w[x])){var _=Wf(x),T=[],k;for(k=0;k<g.length;k++)T.push(Vr(w,x,g[k])),_!==x&&T.push(Vr(w,_,g[k]));for(k=0;k<T.length;k++)f[T[k]]=1;c(w[x],T)}}function v(w,g){for(var x in w)if(x.indexOf("defaults")===-1&&Lr(w[x])){var _=Vr(w,x,g);f[_]?v(w[x],_):o.push({code:"unused",path:_})}}if(Lr(i)?(c(l,["layout"]),v(i,"layout")):o.push({code:"layout"}),!Lr(n))o.push({code:"data"});else{for(var u={},h,d=0;d<s.length;d++){var p=s[d];h=p.type,u[h]=(u[h]||0)+1,p._fullInput._template||o.push({code:"missing",index:p._fullInput.index,traceType:h})}for(h in n){var y=n[h].length,m=u[h]||0;y>m?o.push({code:"unused",traceType:h,templateCount:y,dataCount:m}):m>y&&o.push({code:"reused",traceType:h,templateCount:y,dataCount:m})}}function b(w,g){for(var x in w)if(x.charAt(0)!=="_"){var _=w[x],T=Vr(w,x,g);Lr(_)?(Array.isArray(w)&&_._template===!1&&_.templateitemname&&o.push({code:"missing",path:T,templateitemname:_.templateitemname}),b(_,T)):Array.isArray(_)&&CR(_)&&b(_,T)}}if(b({data:s,layout:l},""),o.length)return o.map(DR)};function CR(t){for(var e=0;e<t.length;e++)if(Lr(t[e]))return!0}function DR(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=Dh;zt._doPlot=Kt._doPlot;zt.newPlot=Kt.newPlot;zt.restyle=Kt.restyle;zt.relayout=Kt.relayout;zt.redraw=Kt.redraw;zt.update=Kt.update;zt._guiRestyle=Kt._guiRestyle;zt._guiRelayout=Kt._guiRelayout;zt._guiUpdate=Kt._guiUpdate;zt._storeDirectGUIEdit=Kt._storeDirectGUIEdit;zt.react=Kt.react;zt.extendTraces=Kt.extendTraces;zt.prependTraces=Kt.prependTraces;zt.addTraces=Kt.addTraces;zt.deleteTraces=Kt.deleteTraces;zt.moveTraces=Kt.moveTraces;zt.purge=Kt.purge;zt.addFrames=Kt.addFrames;zt.deleteFrames=Kt.deleteFrames;zt.animate=Kt.animate;zt.setPlotConfig=Kt.setPlotConfig;zt.toImage=GT;zt.validate=dR;zt.downloadImage=VT;var ZT=Sp;zt.makeTemplate=ZT.makeTemplate;zt.validateTemplate=ZT.validateTemplate;var rv=ve.exports,$R=Ze,Lp=function(e,r,a,i){var n=i("x"),o=i("y"),l,s=$R.getComponentMethod("calendars","handleTraceDefaults");if(s(e,r,["x","y"],a),n){var f=rv.minRowLength(n);o?l=Math.min(f,rv.minRowLength(o)):(l=f,i("y0"),i("dy"))}else{if(!o)return 0;l=rv.minRowLength(o),i("x0"),i("dx")}return r._length=l,l},v0=ve.exports.dateTick0,PR=Ot,RR=PR.ONEWEEK;function d0(t,e){return t%RR===0?v0(e,1):v0(e,0)}var jc=function(e,r,a,i,n){if(n||(n={x:!0,y:!0}),n.x){var o=i("xperiod");o&&(i("xperiod0",d0(o,r.xcalendar)),i("xperiodalignment"))}if(n.y){var l=i("yperiod");l&&(i("yperiod0",d0(l,r.ycalendar)),i("yperiodalignment"))}},h0=["orientation","groupnorm","stackgaps"],ER=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<h0.length;u++){var h=h0[u],d=h+"Found";if(!f[d]){var p=e[h]!==void 0,y=h==="orientation";if((p||c)&&(f[h]=i(h,v[h]),y&&(f.fillDflt=f[h]==="h"?"tonextx":"tonexty"),p&&(f[d]=!0,!c&&(delete f.traces[0][h],y))))for(var m=0;m<f.traces.length-1;m++){var b=f.traces[m];b._input.fill!==b.fill&&(b.fill=f.fillDflt)}}}return f}},p0=rt.exports,m0=ga.hasColorscale,y0=Kl,zR=pr,KT=function(e,r,a,i,n,o){var l=zR.isBubble(e),s=(e.line||{}).color,f;if(o=o||{},s&&(a=s),n("marker.symbol"),n("marker.opacity",l?.7:1),n("marker.size"),o.noAngle||(n("marker.angle"),o.noAngleRef||n("marker.angleref"),o.noStandOff||n("marker.standoff")),n("marker.color",a),m0(e,"marker")&&y0(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=p0.background:f=p0.defaultLine,n("marker.line.color",f),m0(e,"marker.line")&&y0(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")}},IR=ve.exports.isArrayOrTypedArray,NR=ga.hasColorscale,FR=Kl,QT=function(e,r,a,i,n,o){o||(o={});var l=(e.marker||{}).color;if(n("line.color",a),NR(e,"line"))FR(e,r,i,n,{prefix:"line.",cLetter:"c"});else{var s=(IR(l)?!1:l)||a;n("line.color",s)}n("line.width"),o.noDash||n("line.dash"),o.backoff&&n("line.backoff")},HR=function(e,r,a){var i=a("line.shape");i==="spline"&&a("line.smoothing")},OR=ve.exports,JT=function(t,e,r,a,i){i=i||{},a("textposition"),OR.coerceFont(a,"textfont",r.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))},BR=rt.exports,g0=ve.exports.isArrayOrTypedArray,e2=function(e,r,a,i){var n=!1;if(r.marker){var o=r.marker.color,l=(r.marker.line||{}).color;o&&!g0(o)?n=o:l&&!g0(l)&&(n=l)}i("fillcolor",BR.addOpacity((r.line||{}).color||n||a,.5))},b0=ve.exports,jR=Ze,GR=gn,UR=Oc,$n=pr,VR=Lp,XR=jc,WR=ER,YR=KT,qR=QT,x0=HR,ZR=JT,KR=e2,QR=ve.exports.coercePattern,JR=function(e,r,a,i){function n(h,d){return b0.coerce(e,r,GR,h,d)}var o=VR(e,r,i,n);if(o||(r.visible=!1),!!r.visible){XR(e,r,i,n),n("xhoverformat"),n("yhoverformat");var l=WR(e,r,i,n),s=!l&&o<UR.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("mode",s),$n.hasLines(r)&&(qR(e,r,a,i,n,{backoff:!0}),x0(e,r,n),n("connectgaps"),n("line.simplify")),$n.hasMarkers(r)&&YR(e,r,a,i,n,{gradient:!0}),$n.hasText(r)&&(n("texttemplate"),ZR(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"&&(KR(e,r,a,n),$n.hasLines(r)||x0(e,r,n),QR(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=jR.getComponentMethod("errorbars","supplyDefaults");u(e,r,c||v||a,{axis:"y"}),u(e,r,c||v||a,{axis:"x",inherit:"y"}),b0.coerceSelectionMarkerOpacity(r,n)}},t2=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}}}}},eE=ct,r2=ve.exports,tE=r2.dateTime2ms,Xs=r2.incrementMonth,rE=Ot,aE=rE.ONEAVGMONTH,Gc=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(eE(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:i}}for(var f=r.calendar,c=n==="start",v=n==="end",u=e[a+"period0"],h=tE(u,f)||0,d=[],p=[],y=[],m=i.length,b=0;b<m;b++){var w=i[b],g,x,_;if(l){for(g=Math.round((w-h)/(l*aE)),_=Xs(h,l*g,f);_>w;)_=Xs(_,-l,f);for(;_<=w;)_=Xs(_,l,f);x=Xs(_,-l,f)}else{for(g=Math.round((w-h)/o),_=h+g*o;_>w;)_-=o;for(;_<=w;)_+=o;x=_-o}d[b]=c?x:v?_:(x+_)/2,p[b]=x,y[b]=_}return{vals:d,starts:p,ends:y}},av=ga.hasColorscale,iv=Eh,_0=pr,a2=function(e,r){_0.hasLines(r)&&av(r,"line")&&iv(e,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),_0.hasMarkers(r)&&(av(r,"marker")&&iv(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),av(r,"marker.line")&&iv(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))},ar=ve.exports,i2=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;ar.mergeArray(r.text,e,"tx"),ar.mergeArray(r.texttemplate,e,"txt"),ar.mergeArray(r.hovertext,e,"htx"),ar.mergeArray(r.customdata,e,"data"),ar.mergeArray(r.textposition,e,"tp"),r.textfont&&(ar.mergeArrayCastPositive(r.textfont.size,e,"ts"),ar.mergeArray(r.textfont.color,e,"tc"),ar.mergeArray(r.textfont.family,e,"tf"));var i=r.marker;if(i){ar.mergeArrayCastPositive(i.size,e,"ms"),ar.mergeArrayCastPositive(i.opacity,e,"mo"),ar.mergeArray(i.symbol,e,"mx"),ar.mergeArray(i.angle,e,"ma"),ar.mergeArray(i.standoff,e,"mf"),ar.mergeArray(i.color,e,"mc");var n=i.line;i.line&&(ar.mergeArray(n.color,e,"mlc"),ar.mergeArrayCastPositive(n.width,e,"mlw"));var o=i.gradient;o&&o.type!=="none"&&(ar.mergeArray(o.type,e,"mgt"),ar.mergeArray(o.color,e,"mgc"))}},w0=ve.exports,n2=function(e,r){w0.isArrayOrTypedArray(r.selectedpoints)&&w0.tagSelected(e,r)},T0=ct,Bd=ve.exports,zl=Mt.exports,k0=Gc,nv=Ot.BADNUM,jd=pr,iE=a2,nE=i2,oE=n2;function lE(t,e){var r=t._fullLayout,a=e._xA=zl.getFromId(t,e.xaxis||"x","x"),i=e._yA=zl.getFromId(t,e.yaxis||"y","y"),n=a.makeCalcdata(e,"x"),o=i.makeCalcdata(e,"y"),l=k0(e,a,"x",n),s=k0(e,i,"y",o),f=l.vals,c=s.vals,v=e._length,u=new Array(v),h=e.ids,d=Cp(e,r,a,i),p=!1,y,m,b,w,g,x;s2(r,e);var _="x",T="y",k;if(d)Bd.pushUnique(d.traceIndices,e._expandedIndex),y=d.orientation==="v",y?(T="s",k="x"):(_="s",k="y"),g=d.stackgaps==="interpolate";else{var S=l2(e,v);o2(t,e,a,i,f,c,S)}var A=!!e.xperiodalignment,D=!!e.yperiodalignment;for(m=0;m<v;m++){var M=u[m]={},C=T0(f[m]),$=T0(c[m]);C&&$?(M[_]=f[m],M[T]=c[m],A&&(M.orig_x=n[m],M.xEnd=l.ends[m],M.xStart=l.starts[m]),D&&(M.orig_y=o[m],M.yEnd=s.ends[m],M.yStart=s.starts[m])):d&&(y?C:$)?(M[k]=y?f[m]:c[m],M.gap=!0,g?(M.s=nv,p=!0):M.s=0):M[_]=M[T]=nv,h&&(M.id=String(h[m]))}if(nE(u,e),iE(t,e),oE(u,e),d){for(m=0;m<u.length;)u[m][k]===nv?u.splice(m,1):m++;if(Bd.sort(u,function(E,L){return E[k]-L[k]||E.i-L.i}),p){for(m=0;m<u.length-1&&u[m].gap;)m++;for(x=u[m].s,x||(x=u[m].s=0),b=0;b<m;b++)u[b].s=x;for(w=u.length-1;w>m&&u[w].gap;)w--;for(x=u[w].s,b=u.length-1;b>w;b--)u[b].s=x;for(;m<w;)if(m++,u[m].gap){for(b=m+1;u[b].gap;)b++;for(var F=u[m-1][k],R=u[m-1].s,P=(u[b].s-R)/(u[b][k]-F);m<b;)u[m].s=R+(u[m][k]-F)*P,m++}}}return u}function o2(t,e,r,a,i,n,o){var l=e._length,s=t._fullLayout,f=r._id,c=a._id,v=s._firstScatter[f2(e)]===e.uid,u=(Cp(e,s,r,a)||{}).orientation,h=e.fill;r._minDtick=0,a._minDtick=0;var d={padded:!0},p={padded:!0};o&&(d.ppad=p.ppad=o);var y=l<2||i[0]!==i[l-1]||n[0]!==n[l-1];y&&(h==="tozerox"||h==="tonextx"&&(v||u==="h"))?d.tozero=!0:!(e.error_y||{}).visible&&(h==="tonexty"||h==="tozeroy"||!jd.hasMarkers(e)&&!jd.hasText(e))&&(d.padded=!1,d.ppad=0),y&&(h==="tozeroy"||h==="tonexty"&&(v||u==="v"))?p.tozero=!0:(h==="tonextx"||h==="tozerox")&&(p.padded=!1),f&&(e._extremes[f]=zl.findExtremes(r,i,d)),c&&(e._extremes[c]=zl.findExtremes(a,n,p))}function l2(t,e){if(!!jd.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)},Bd.isArrayOrTypedArray(r.size)){var n={type:"linear"};zl.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 s2(t,e){var r=f2(e),a=t._firstScatter;a[r]||(a[r]=e.uid)}function f2(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function Cp(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 Dp={calc:lE,calcMarkerSize:l2,calcAxisExpansion:o2,setFirstScatter:s2,getStackOpts:Cp},A0=Dp,sE=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,h,d,p,y,m,b,w,g,x,_;for(var T in o){m=o[T];var k=m.traceIndices;if(!!k.length){for(b=m.stackgaps==="interpolate",w=m.groupnorm,m.orientation==="v"?(g="x",x="y"):(g="y",x="x"),_=new Array(k.length),s=0;s<_.length;s++)_[s]=!1;h=l[k[0]];var S=new Array(h.length);for(s=0;s<h.length;s++)S[s]=h[s][g];for(s=1;s<k.length;s++){for(u=l[k[s]],f=c=0;f<u.length;f++){for(d=u[f][g];d>S[c]&&c<S.length;c++)ov(u,f,S[c],s,_,b,g),f++;if(d!==S[c]){for(v=0;v<s;v++)ov(l[k[v]],c,d,v,_,b,g);S.splice(c,0,d)}c++}for(;c<S.length;c++)ov(u,f,S[c],s,_,b,g),f++}var A=S.length;for(f=0;f<h.length;f++){for(p=h[f][x]=h[f].s,s=1;s<k.length;s++)u=l[k[s]],u[0].trace._rawLength=u[0].trace._length,u[0].trace._length=A,p+=u[f].s,u[f][x]=p;if(w)for(y=(w==="fraction"?p:p/100)||1,s=0;s<k.length;s++){var D=l[k[s]][f];D[x]/=y,D.sNorm=D.s/y}}for(s=0;s<k.length;s++){u=l[k[s]];var M=u[0].trace,C=A0.calcMarkerSize(M,M._rawLength),$=Array.isArray(C);if(C&&_[s]||$){var F=C;for(C=new Array(A),f=0;f<A;f++)C[f]=u[f].gap?0:$?F[u[f].i]:F}var R=new Array(A),P=new Array(A);for(f=0;f<A;f++)R[f]=u[f].x,P[f]=u[f].y;A0.calcAxisExpansion(e,M,a,i,R,P,C),u[0].t.orientation=m.orientation}}}}};function ov(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=fE(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 fE(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 cE=_t.exports,c2=Ot,Jo=c2.BADNUM,u2=c2.LOG_CLIP,M0=u2+.5,S0=u2-.5,Yf=ve.exports,uE=Yf.segmentsIntersect,L0=Yf.constrain,lv=Oc,vE=function(e,r){var a=r.trace||{},i=r.xaxis,n=r.yaxis,o=i.type==="log",l=n.type==="log",s=i._length,f=n._length,c=r.backoff,v=a.marker,u=r.connectGaps,h=r.baseTolerance,d=r.shape,p=d==="linear",y=a.fill&&a.fill!=="none",m=[],b=lv.minTolerance,w=e.length,g=new Array(w),x=0,_,T,k,S,A,D,M,C,$,F,R,P,E,L,z,I;function H(Ae){var Fe=e[Ae];if(!Fe)return!1;var Ge=r.linearized?i.l2p(Fe.x):i.c2p(Fe.x),Oe=r.linearized?n.l2p(Fe.y):n.c2p(Fe.y);if(Ge===Jo){if(o&&(Ge=i.c2p(Fe.x,!0)),Ge===Jo)return!1;l&&Oe===Jo&&(Ge*=Math.abs(i._m*f*(i._m>0?M0:S0)/(n._m*s*(n._m>0?M0:S0)))),Ge*=1e3}if(Oe===Jo){if(l&&(Oe=n.c2p(Fe.y,!0)),Oe===Jo)return!1;Oe*=1e3}return[Ge,Oe]}function U(Ae,Fe,Ge,Oe){var We=Ge-Ae,N=Oe-Fe,j=.5-Ae,G=.5-Fe,V=We*We+N*N,K=We*j+N*G;if(K>0&&K<V){var Q=j*N-G*We;if(Q*Q<V)return!0}}var O,X;function B(Ae,Fe){var Ge=Ae[0]/s,Oe=Ae[1]/f,We=Math.max(0,-Ge,Ge-1,-Oe,Oe-1);return We&&O!==void 0&&U(Ge,Oe,O,X)&&(We=0),We&&Fe&&U(Ge,Oe,Fe[0]/s,Fe[1]/f)&&(We=0),(1+lv.toleranceGrowth*We)*h}function Y(Ae,Fe){var Ge=Ae[0]-Fe[0],Oe=Ae[1]-Fe[1];return Math.sqrt(Ge*Ge+Oe*Oe)}var Z=lv.maxScreensAway,q=-s*Z,W=s*(1+Z),ae=-f*Z,ne=f*(1+Z),de=[[q,ae,W,ae],[W,ae,W,ne],[W,ne,q,ne],[q,ne,q,ae]],le,oe,ue,Se,he,ye;function ke(Ae,Fe){for(var Ge=[],Oe=0,We=0;We<4;We++){var N=de[We],j=uE(Ae[0],Ae[1],Fe[0],Fe[1],N[0],N[1],N[2],N[3]);j&&(!Oe||Math.abs(j.x-Ge[0][0])>1||Math.abs(j.y-Ge[0][1])>1)&&(j=[j.x,j.y],Oe&&Y(j,Ae)<Y(Ge[0],Ae)?Ge.unshift(j):Ge.push(j),Oe++)}return Ge}function te(Ae){if(Ae[0]<q||Ae[0]>W||Ae[1]<ae||Ae[1]>ne)return[L0(Ae[0],q,W),L0(Ae[1],ae,ne)]}function J(Ae,Fe){if(Ae[0]===Fe[0]&&(Ae[0]===q||Ae[0]===W)||Ae[1]===Fe[1]&&(Ae[1]===ae||Ae[1]===ne))return!0}function _e(Ae,Fe){var Ge=[],Oe=te(Ae),We=te(Fe);return Oe&&We&&J(Oe,We)||(Oe&&Ge.push(Oe),We&&Ge.push(We)),Ge}function pe(Ae,Fe,Ge){return function(Oe,We){var N=te(Oe),j=te(We),G=[];if(N&&j&&J(N,j))return G;N&&G.push(N),j&&G.push(j);var V=2*Yf.constrain((Oe[Ae]+We[Ae])/2,Fe,Ge)-((N||Oe)[Ae]+(j||We)[Ae]);if(V){var K;N&&j?K=V>0==N[Ae]>j[Ae]?N:j:K=N||j,K[Ae]+=V}return G}}var Le;d==="linear"||d==="spline"?Le=ke:d==="hv"||d==="vh"?Le=_e:d==="hvh"?Le=pe(0,q,W):d==="vhv"&&(Le=pe(1,ae,ne));function Ie(Ae,Fe){var Ge=Fe[0]-Ae[0],Oe=(Fe[1]-Ae[1])/Ge,We=(Ae[1]*Fe[0]-Fe[1]*Ae[0])/Ge;return We>0?[Oe>0?q:W,ne]:[Oe>0?W:q,ae]}function Pe(Ae){var Fe=Ae[0],Ge=Ae[1],Oe=Fe===g[x-1][0],We=Ge===g[x-1][1];if(!(Oe&&We))if(x>1){var N=Fe===g[x-2][0],j=Ge===g[x-2][1];Oe&&(Fe===q||Fe===W)&&N?j?x--:g[x-1]=Ae:We&&(Ge===ae||Ge===ne)&&j?N?x--:g[x-1]=Ae:g[x++]=Ae}else g[x++]=Ae}function Be(Ae){g[x-1][0]!==Ae[0]&&g[x-1][1]!==Ae[1]&&Pe([ue,Se]),Pe(Ae),he=null,ue=Se=0}var re=Yf.isArrayOrTypedArray(v);function De(Ae){if(Ae&&c&&(Ae.i=_,Ae.d=e,Ae.trace=a,Ae.marker=re?v[Ae.i]:v,Ae.backoff=c),O=Ae[0]/s,X=Ae[1]/f,le=Ae[0]<q?q:Ae[0]>W?W:0,oe=Ae[1]<ae?ae:Ae[1]>ne?ne:0,le||oe){if(!x)g[x++]=[le||Ae[0],oe||Ae[1]];else if(he){var Fe=Le(he,Ae);Fe.length>1&&(Be(Fe[0]),g[x++]=Fe[1])}else ye=Le(g[x-1],Ae)[0],g[x++]=ye;var Ge=g[x-1];le&&oe&&(Ge[0]!==le||Ge[1]!==oe)?(he&&(ue!==le&&Se!==oe?Pe(ue&&Se?Ie(he,Ae):[ue||le,Se||oe]):ue&&Se&&Pe([ue,Se])),Pe([le,oe])):ue-le&&Se-oe&&Pe([le||ue,oe||Se]),he=Ae,ue=le,Se=oe}else he&&Be(Le(he,Ae)[0]),g[x++]=Ae}for(_=0;_<w;_++)if(T=H(_),!!T){for(x=0,he=null,De(T),_++;_<w;_++){if(S=H(_),!S){if(u)continue;break}if(!p||!r.simplify){De(S);continue}var Ce=H(_+1);if(F=Y(S,T),!(!(y&&(x===0||x===w-1))&&F<B(S,Ce)*b)){for(C=[(S[0]-T[0])/F,(S[1]-T[1])/F],A=T,R=F,P=L=z=0,M=!1,k=S,_++;_<e.length;_++){if(D=Ce,Ce=H(_+1),!D){if(u)continue;break}if($=[D[0]-T[0],D[1]-T[1]],I=$[0]*C[1]-$[1]*C[0],L=Math.min(L,I),z=Math.max(z,I),z-L>B(D,Ce))break;k=D,E=$[0]*C[0]+$[1]*C[1],E>R?(R=E,S=D,M=!1):E<P&&(P=E,A=D,M=!0)}if(M?(De(S),k!==A&&De(A)):(A!==T&&De(A),k!==S&&De(S)),De(k),_>=e.length||!D)break;De(D),T=D}}he&&Pe([ue||he[0],Se||he[1]]),m.push(g.slice(0,x))}var se=d.slice(d.length-1);if(c&&se!=="h"&&se!=="v"){for(var ce=!1,Re=-1,we=[],xe=0;xe<m.length;xe++)for(var be=0;be<m[xe].length-1;be++){var ze=m[xe][be],Ne=m[xe][be+1],He=cE.applyBackoff(Ne,ze);(He[0]!==Ne[0]||He[1]!==Ne[1])&&(ce=!0),we[Re+1]||(Re++,we[Re]=[ze,[He[0],He[1]]])}return ce?we:m}return m},C0={tonextx:1,tonexty:1,tonext:1},v2=function(e,r,a){var i,n,o,l,s,f={},c=!1,v=-1,u=0,h=-1;for(n=0;n<a.length;n++)i=a[n][0].trace,o=i.stackgroup||"",o?o in f?s=f[o]:(s=f[o]=u,u++):i.fill in C0&&h>=0?s=h:(s=h=u,u++),s<v&&(c=!0),i._groupIndex=v=s;var d=a.slice();c&&d.sort(function(y,m){var b=y[0].trace,w=m[0].trace;return b._groupIndex-w._groupIndex||b.index-w.index});var p={};for(n=0;n<d.length;n++)i=d[n][0].trace,o=i.stackgroup||"",i.visible===!0?(i._nexttrace=null,i.fill in C0&&(l=p[o],i._prevtrace=l||null,l&&(l._nexttrace=i)),i._ownfill=i.fill&&(i.fill.substr(0,6)==="tozero"||i.fill==="toself"||i.fill.substr(0,2)==="to"&&!i._prevtrace),p[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return d},fa=nt.exports,dE=Ze,Il=ve.exports,ro=Il.ensureSingle,d2=Il.identity,Ht=_t.exports,ao=pr,hE=vE,pE=v2,mE=hp.exports.tester,yE=function(e,r,a,i,n,o){var l,s,f=!n,c=!!n&&n.duration>0,v=pE(e,r,a);if(l=i.selectAll("g.trace").data(v,function(h){return h[0].trace.uid}),l.enter().append("g").attr("class",function(h){return"trace scatter trace"+h[0].trace.uid}).style("stroke-miterlimit",2),l.order(),gE(e,l,r),c){o&&(s=o());var u=fa.transition().duration(n.duration).ease(n.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});u.each(function(){i.selectAll("g.trace").each(function(h,d){D0(e,d,r,h,v,this,n)})})}else l.each(function(h,d){D0(e,d,r,h,v,this,n)});f&&l.exit().remove(),i.selectAll("path:not([d])").remove()};function gE(t,e,r){e.each(function(a){var i=ro(fa.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,d2);l.enter().append("g"),l.exit().each(function(s){n[s]=null}).remove(),l.order().each(function(s){n[s]=ro(fa.select(this),"path","js-fill")})})}function D0(t,e,r,a,i,n,o){var l;bE(t,e,r,a,i);var s=!!o&&o.duration>0;function f(de){return s?de.transition():de}var c=r.xaxis,v=r.yaxis,u=a[0].trace,h=u.line,d=fa.select(n),p=ro(d,"g","errorbars"),y=ro(d,"g","lines"),m=ro(d,"g","points"),b=ro(d,"g","text");if(dE.getComponentMethod("errorbars","plot")(t,p,r,o),u.visible!==!0)return;f(d).style("opacity",u.opacity);var w,g,x=u.fill.charAt(u.fill.length-1);x!=="x"&&x!=="y"&&(x=""),a[0][r.isRangePlot?"nodeRangePlot3":"node3"]=d;var _="",T=[],k=u._prevtrace;k&&(_=k._prevRevpath||"",g=k._nextFill,T=k._polygons);var S,A,D="",M="",C,$,F,R,P,E,L,z=[],I=Il.noop;if(w=u._ownFill,ao.hasLines(u)||u.fill!=="none"){for(g&&g.datum(a),["hv","vh","hvh","vhv"].indexOf(h.shape)!==-1?(C=Ht.steps(h.shape),$=Ht.steps(h.shape.split("").reverse().join(""))):h.shape==="spline"?C=$=function(de){var le=de[de.length-1];return de.length>1&&de[0][0]===le[0]&&de[0][1]===le[1]?Ht.smoothclosed(de.slice(1),h.smoothing):Ht.smoothopen(de,h.smoothing)}:C=$=function(de){return"M"+de.join("L")},F=function(de){return $(de.reverse())},z=hE(a,{xaxis:c,yaxis:v,trace:u,connectGaps:u.connectgaps,baseTolerance:Math.max(h.width||1,3)/4,shape:h.shape,backoff:h.backoff,simplify:h.simplify,fill:u.fill}),L=u._polygons=new Array(z.length),l=0;l<z.length;l++)u._polygons[l]=mE(z[l]);z.length&&(R=z[0][0],P=z[z.length-1],E=P[P.length-1]),I=function(de){return function(le){if(S=C(le),A=F(le),D?x?(D+="L"+S.substr(1),M=A+("L"+M.substr(1))):(D+="Z"+S,M=A+"Z"+M):(D=S,M=A),ao.hasLines(u)&&le.length>1){var oe=fa.select(this);if(oe.datum(a),de)f(oe.style("opacity",0).attr("d",S).call(Ht.lineGroupStyle)).style("opacity",1);else{var ue=f(oe);ue.attr("d",S),Ht.singleLineStyle(a,ue)}}}}}var H=y.selectAll(".js-line").data(z);f(H.exit()).style("opacity",0).remove(),H.each(I(!1)),H.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(Ht.lineGroupStyle).each(I(!0)),Ht.setClipUrl(H,r.layerClipId,t);function U(de){f(de).attr("d","M0,0Z")}z.length?(w?(w.datum(a),R&&E&&(x?(x==="y"?R[1]=E[1]=v.c2p(0,!0):x==="x"&&(R[0]=E[0]=c.c2p(0,!0)),f(w).attr("d","M"+E+"L"+R+"L"+D.substr(1)).call(Ht.singleFillStyle,t)):f(w).attr("d",D+"Z").call(Ht.singleFillStyle,t))):g&&(u.fill.substr(0,6)==="tonext"&&D&&_?(u.fill==="tonext"?f(g).attr("d",D+"Z"+_+"Z").call(Ht.singleFillStyle,t):f(g).attr("d",D+"L"+_.substr(1)+"Z").call(Ht.singleFillStyle,t),u._polygons=u._polygons.concat(T)):(U(g),u._polygons=null)),u._prevRevpath=M,u._prevPolygons=L):(w?U(w):g&&U(g),u._polygons=u._prevRevpath=u._prevPolygons=null);function O(de){return de.filter(function(le){return!le.gap&&le.vis})}function X(de){return de.filter(function(le){return le.vis})}function B(de){return de.filter(function(le){return!le.gap})}function Y(de){return de.id}function Z(de){if(de.ids)return Y}function q(){return!1}function W(de,le,oe){var ue,Se,he,ye=oe[0].trace,ke=ao.hasMarkers(ye),te=ao.hasText(ye),J=Z(ye),_e=q,pe=q;if(ke||te){var Le=d2,Ie=ye.stackgroup,Pe=Ie&&t._fullLayout._scatterStackOpts[c._id+v._id][Ie].stackgaps==="infer zero";ye.marker.maxdisplayed||ye._needsCull?Le=Pe?X:O:Ie&&!Pe&&(Le=B),ke&&(_e=Le),te&&(pe=Le)}Se=de.selectAll("path.point"),ue=Se.data(_e,J);var Be=ue.enter().append("path").classed("point",!0);s&&Be.call(Ht.pointStyle,ye,t).call(Ht.translatePoints,c,v).style("opacity",0).transition().style("opacity",1),ue.order();var re;ke&&(re=Ht.makePointStyleFns(ye)),ue.each(function(De){var Ce=fa.select(this),se=f(Ce);he=Ht.translatePoint(De,se,c,v),he?(Ht.singlePointStyle(De,se,ye,re,t),r.layerClipId&&Ht.hideOutsideRangePoint(De,se,c,v,ye.xcalendar,ye.ycalendar),ye.customdata&&Ce.classed("plotly-customdata",De.data!==null&&De.data!==void 0)):se.remove()}),s?ue.exit().transition().style("opacity",0).remove():ue.exit().remove(),Se=le.selectAll("g"),ue=Se.data(pe,J),ue.enter().append("g").classed("textpoint",!0).append("text"),ue.order(),ue.each(function(De){var Ce=fa.select(this),se=f(Ce.select("text"));he=Ht.translatePoint(De,se,c,v),he?r.layerClipId&&Ht.hideOutsideRangePoint(De,Ce,c,v,ye.xcalendar,ye.ycalendar):Ce.remove()}),ue.selectAll("text").call(Ht.textPointStyle,ye,t).each(function(De){var Ce=c.c2p(De.x),se=v.c2p(De.y);fa.select(this).selectAll("tspan.line").each(function(){f(fa.select(this)).attr({x:Ce,y:se})})}),ue.exit().remove()}m.datum(a),b.datum(a),W(m,b,a);var ae=u.cliponaxis===!1,ne=ae?null:r.layerClipId;Ht.setClipUrl(m,ne,t),Ht.setClipUrl(b,ne,t)}function bE(t,e,r,a,i){var n=r.xaxis,o=r.yaxis,l=fa.extent(Il.simpleMap(n.range,n.r2c)),s=fa.extent(Il.simpleMap(o.range,o.r2c)),f=a[0].trace;if(!!ao.hasMarkers(f)){var c=f.marker.maxdisplayed;if(c!==0){var v=a.filter(function(p){return p.x>=l[0]&&p.x<=l[1]&&p.y>=s[0]&&p.y<=s[1]}),u=Math.ceil(v.length/c),h=0;i.forEach(function(p,y){var m=p[0].trace;ao.hasMarkers(m)&&m.marker.maxdisplayed>0&&y<e&&h++});var d=Math.round(h*u/3+Math.floor(h/3)*u/7.1);a.forEach(function(p){delete p.vis}),v.forEach(function(p,y){Math.round((y+d)%u)===0&&(p.vis=!0)})}}}var as={container:"marker",min:"cmin",max:"cmax"},Ws=Mt.exports,h2=function(e,r,a){var i={},n={_fullLayout:a},o=Ws.getFromTrace(n,r,"x"),l=Ws.getFromTrace(n,r,"y");return i.xLabel=Ws.tickText(o,o.c2l(e.x),!0).text,i.yLabel=Ws.tickText(l,l.c2l(e.y),!0).text,i},sv=nt.exports,mo=_t.exports,xE=Ze;function _E(t){var e=sv.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=sv.select(this),i=r.trace||r[0].trace;$p(a,i,t)}),e.selectAll("g.text").each(function(r){var a=sv.select(this),i=r.trace||r[0].trace;Pp(a,i,t)}),e.selectAll("g.trace path.js-line").call(mo.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(mo.fillGroupStyle,t),xE.getComponentMethod("errorbars","style")(e)}function $p(t,e,r){mo.pointStyle(t.selectAll("path.point"),e,r)}function Pp(t,e,r){mo.textPointStyle(t.selectAll("text"),e,r)}function wE(t,e,r){var a=e[0].trace;a.selectedpoints?(mo.selectedPointStyle(r.selectAll("path.point"),a),mo.selectedTextStyle(r.selectAll("text"),a)):($p(r,a,t),Pp(r,a,t))}var $0={style:_E,stylePoints:$p,styleText:Pp,styleOnSelect:wE},Pn=rt.exports,TE=pr,p2=function(e,r){var a,i;if(e.mode==="lines")return a=e.line.color,a&&Pn.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&&Pn.opacity(n)?n:o&&Pn.opacity(o)&&(r.mlw||((e.marker||{}).line||{}).width)?o:"",i?Pn.opacity(i)<.3?Pn.addOpacity(i,.3):i:(a=(e.line||{}).color,a&&Pn.opacity(a)&&TE.hasLines(e)&&e.line.width?a:e.fillcolor)},Gd=ve.exports,P0=pa,kE=Ze,AE=p2,fv=rt.exports,ME=Gd.fillText,SE=function(e,r,a,i){var n=e.cd,o=n[0].trace,l=e.xa,s=e.ya,f=l.c2p(r),c=s.c2p(a),v=[f,c],u=o.hoveron||"",h=o.mode.indexOf("markers")!==-1?3:.5,d=!!o.xperiodalignment,p=!!o.yperiodalignment;if(u.indexOf("points")!==-1){var y=function(W){if(d){var ae=l.c2p(W.xStart),ne=l.c2p(W.xEnd);return f>=Math.min(ae,ne)&&f<=Math.max(ae,ne)?0:1/0}var de=Math.max(3,W.mrc||0),le=1-1/de,oe=Math.abs(l.c2p(W.x)-f);return oe<de?le*oe/de:oe-de+le},m=function(W){if(p){var ae=s.c2p(W.yStart),ne=s.c2p(W.yEnd);return c>=Math.min(ae,ne)&&c<=Math.max(ae,ne)?0:1/0}var de=Math.max(3,W.mrc||0),le=1-1/de,oe=Math.abs(s.c2p(W.y)-c);return oe<de?le*oe/de:oe-de+le},b=function(W){var ae=Math.max(h,W.mrc||0),ne=l.c2p(W.x)-f,de=s.c2p(W.y)-c;return Math.max(Math.sqrt(ne*ne+de*de)-ae,1-h/ae)},w=P0.getDistanceFunction(i,y,m,b);if(P0.getClosest(n,w,e),e.index!==!1){var g=n[e.index],x=l.c2p(g.x,!0),_=s.c2p(g.y,!0),T=g.mrc||1;e.index=g.i;var k=n[0].t.orientation,S=k&&(g.sNorm||g.s),A=k==="h"?S:g.orig_x!==void 0?g.orig_x:g.x,D=k==="v"?S:g.orig_y!==void 0?g.orig_y:g.y;return Gd.extendFlat(e,{color:AE(o,g),x0:x-T,x1:x+T,xLabelVal:A,y0:_-T,y1:_+T,yLabelVal:D,spikeDistance:b(g),hovertemplate:o.hovertemplate}),ME(g,o,e),kE.getComponentMethod("errorbars","hoverInfo")(g,o,e),[e]}}if(u.indexOf("fills")!==-1&&o._polygons){var M=o._polygons,C=[],$=!1,F=1/0,R=-1/0,P=1/0,E=-1/0,L,z,I,H,U,O,X,B,Y;for(L=0;L<M.length;L++)I=M[L],I.contains(v)&&($=!$,C.push(I),P=Math.min(P,I.ymin),E=Math.max(E,I.ymax));if($){P=Math.max(P,0),E=Math.min(E,s._length);var Z=(P+E)/2;for(L=0;L<C.length;L++)for(H=C[L].pts,z=1;z<H.length;z++)B=H[z-1][1],Y=H[z][1],B>Z!=Y>=Z&&(O=H[z-1][0],X=H[z][0],Y-B&&(U=O+(X-O)*(Z-B)/(Y-B),F=Math.min(F,U),R=Math.max(R,U)));F=Math.max(F,0),R=Math.min(R,l._length);var q=fv.defaultLine;return fv.opacity(o.fillcolor)?q=o.fillcolor:fv.opacity((o.line||{}).color)&&(q=o.line.color),Gd.extendFlat(e,{distance:e.maxHoverDistance,x0:F,x1:R,y0:Z,y1:Z,color:q,hovertemplate:!1}),delete e.index,o.text&&!Array.isArray(o.text)?e.text=String(o.text):e.text=o.name,[e]}}},R0=pr,LE=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s,f,c,v,u=!R0.hasMarkers(l)&&!R0.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={},cv,E0;function CE(){return E0||(E0=1,cv={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(" ")}}),cv}var uv,z0;function DE(){if(z0)return uv;z0=1;var t=Ze.traceIs,e=aw;uv=function(l,s,f,c){f("autotypenumbers",c.autotypenumbersDflt);var v=f("type",(c.splomStash||{}).type);v==="-"&&(r(s,c.data),s.type==="-"?s.type="linear":l.type=s.type)};function r(o,l){if(o.type==="-"){var s=o._id,f=s.charAt(0),c;s.indexOf("scene")!==-1&&(s=f);var v=a(l,s,f);if(!!v){if(v.type==="histogram"&&f==={v:"y",h:"x"}[v.orientation||"v"]){o.type="linear";return}var u=f+"calendar",h=v[u],d={noMultiCategory:!t(v,"cartesian")||t(v,"noMultiCategory")};if(v.type==="box"&&v._hasPreCompStats&&f==={h:"x",v:"y"}[v.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=o.autotypenumbers,n(v,f)){var p=i(v),y=[];for(c=0;c<l.length;c++){var m=l[c];!t(m,"box-violin")||(m[f+"axis"]||f)!==s||(m[p]!==void 0?y.push(m[p][0]):m.name!==void 0?y.push(m.name):y.push("text"),m[u]!==h&&(h=void 0))}o.type=e(y,h,d)}else if(v.type==="splom"){var b=v.dimensions,w=b[v._axesDim[s]];w.visible&&(o.type=e(w.values,h,d))}else o.type=e(v[f]||[v[f+"0"]],h,d)}}}function a(o,l,s){for(var f=0;f<o.length;f++){var c=o[f];if(c.type==="splom"&&c._length>0&&(c["_"+s+"axes"]||{})[l])return c;if((c[s+"axis"]||s)===l){if(n(c,s))return c;if((c[s]||[]).length||c[s+"0"])return c}}}function i(o){return{v:"x",h:"y"}[o.orientation||"v"]}function n(o,l){var s=i(o),f=t(o,"box-violin"),c=t(o._fullInput||{},"candlestick");return f&&!c&&l===s&&o[s]===void 0&&o[s+"0"]===void 0}return uv}function $E(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 PE=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=$E(r,i).sort(),s==="category ascending"?r._initialCategories=f:s==="category descending"&&(r._initialCategories=f.reverse()))}},I0=Jr.exports.mix,RE=hr,EE=ve.exports,zE=function(e,r,a,i){i=i||{};var n=i.dfltColor;function o(T,k){return EE.coerce2(e,r,i.attributes,T,k)}var l=o("linecolor",n),s=o("linewidth"),f=a("showline",i.showLine||!!l||!!s);f||(delete r.linecolor,delete r.linewidth);var c=I0(n,i.bgColor,i.blend||RE.lightFraction).toRgbString(),v=o("gridcolor",c),u=o("gridwidth"),h=o("griddash"),d=a("showgrid",i.showGrid||!!v||!!u||!!h);if(d||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var p=I0(r.gridcolor,i.bgColor,67).toRgbString(),y=o("minor.gridcolor",p),m=o("minor.gridwidth",r.gridwidth||1),b=o("minor.griddash",r.griddash||"solid"),w=a("minor.showgrid",!!y||!!m||!!b);w||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var g=o("zerolinecolor",n),x=o("zerolinewidth"),_=a("zeroline",i.showGrid||!!g||!!x);_||(delete r.zerolinecolor,delete r.zerolinewidth)}},N0=ct,IE=Ze,vl=ve.exports,NE=At,FE=Pa,Ud=Wa,F0=N_,H0=F_,HE=j_,OE=G_,BE=PE,jE=zE,O0=Hh,wf=wr.WEEKDAY_PATTERN,GE=wr.HOUR_PATTERN,m2=function(e,r,a,i,n){var o=i.letter,l=i.font||{},s=i.splomStash||{},f=a("visible",!i.visibleDflt),c=r._template||{},v=r.type||c.type||"-",u;if(v==="date"){var h=IE.getComponentMethod("calendars","handleDefaults");h(e,r,"calendar",i.calendar),i.noTicklabelmode||(u=a("ticklabelmode"))}var d="";(!i.noTicklabelposition||v==="multicategory")&&(d=vl.coerce(e,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),i.noTicklabeloverflow||a("ticklabeloverflow",d.indexOf("inside")!==-1?"hide past domain":v==="category"||v==="multicategory"?"allow":"hide past div"),O0(r,n);var p=!r.isValidRange(e.range);p&&i.reverseDflt&&(p="reversed");var y=a("autorange",p);y&&(v==="linear"||v==="-")&&a("rangemode"),a("range"),r.cleanRange(),BE(e,r,a,i),v!=="category"&&!i.noHover&&a("hoverformat");var m=a("color"),b=m!==Ud.color.dflt?m:l.color,w=s.label||n._dfltTitle[o];if(OE(e,r,a,v,i),!f)return r;a("title.text",w),vl.coerceFont(a,"title.font",{family:l.family,size:vl.bigFont(l.size),color:b}),F0(e,r,a,v);var g=i.hasMinor;if(g&&(NE.newContainer(r,"minor"),F0(e,r,a,v,{isMinor:!0})),HE(e,r,a,v,i),H0(e,r,a,i),g){var x=i.isMinor;i.isMinor=!0,H0(e,r,a,i),i.isMinor=x}jE(e,r,a,{dfltColor:m,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:g,attributes:Ud}),g&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&a("mirror"),i.automargin&&a("automargin");var _=v==="multicategory";if(!i.noTickson&&(v==="category"||_)&&(r.ticks||r.showgrid)){var T;_&&(T="boundaries");var k=a("tickson",T);k==="boundaries"&&delete r.ticklabelposition}if(_){var S=a("showdividers");S&&(a("dividercolor"),a("dividerwidth"))}if(v==="date")if(FE(e,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:UE}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var A=0;A<r.rangebreaks.length;A++)if(r.rangebreaks[A].pattern===wf){r._hasDayOfWeekBreaks=!0;break}if(O0(r,n),n._has("scattergl")||n._has("splom"))for(var D=0;D<i.data.length;D++){var M=i.data[D];(M.type==="scattergl"||M.type==="splom")&&(M.visible=!1,vl.warn(M.type+" traces do not work on axes with rangebreaks. Setting trace "+M.index+" to `visible: false`."))}}return r};function UE(t,e,r){function a(u,h){return vl.coerce(t,e,Ud.rangebreaks,u,h)}var i=a("enabled");if(i){var n=a("bounds");if(n&&n.length>=2){var o="",l,s;if(n.length===2){for(l=0;l<2;l++)if(s=B0(n[l]),s){o=wf;break}}var f=a("pattern",o);if(f===wf)for(l=0;l<2;l++)s=B0(n[l]),s&&(e.bounds[l]=n[l]=s-1);if(f)for(l=0;l<2;l++)switch(s=n[l],f){case wf:if(!N0(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 GE:if(!N0(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 VE={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function B0(t){if(typeof t=="string")return VE[t.substr(0,3).toLowerCase()]}var XE=ct,Ys=ve.exports,y2=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||(XE(e.position)?"free":n[0]||"free"),v=v||(l==="x"?"bottom":"left"),u=u||0;var h=Ys.coerce(e,r,{anchor:{valType:"enumerated",values:["free"].concat(n),dflt:f}},"anchor");h==="free"&&a("position",u),Ys.coerce(e,r,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");var d=!1;if(o.length&&(d=Ys.coerce(e,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!d){var p=a("domain",c);p[0]>p[1]-1/4096&&(r.domain=c),Ys.noneOrAll(e.domain,r.domain,c)}return a("layer"),r},vv,j0;function WE(){if(j0)return vv;j0=1;var t=ve.exports,e=rt.exports,r=ea.isUnifiedHover,a=Pw,i=At,n=Yl,o=Wa,l=DE(),s=m2,f=qa,c=y2,v=Vt,u=v.id2name,h=v.name2id,d=wr.AX_ID_PATTERN,p=Ze,y=p.traceIs,m=p.getComponentMethod;function b(w,g,x){Array.isArray(w[g])?w[g].push(x):w[g]=[x]}return vv=function(g,x,_){var T=x.autotypenumbers,k={},S={},A={},D={},M={},C={},$={},F={},R={},P={},E,L;for(E=0;E<_.length;E++){var z=_[E];if(!(!y(z,"cartesian")&&!y(z,"gl2d"))){var I;if(z.xaxis)I=u(z.xaxis),b(k,I,z);else if(z.xaxes)for(L=0;L<z.xaxes.length;L++)b(k,u(z.xaxes[L]),z);var H;if(z.yaxis)H=u(z.yaxis),b(k,H,z);else if(z.yaxes)for(L=0;L<z.yaxes.length;L++)b(k,u(z.yaxes[L]),z);if(z.type==="funnel"?z.orientation==="h"?(I&&(S[I]=!0),H&&($[H]=!0)):H&&(A[H]=!0):z.type==="image"?(H&&(F[H]=!0),I&&(F[I]=!0)):(H&&(M[H]=!0,C[H]=!0),(!y(z,"carpet")||z.type==="carpet"&&!z._cheater)&&I&&(D[I]=!0)),z.type==="carpet"&&z._cheater&&I&&(S[I]=!0),y(z,"2dMap")&&(R[I]=!0,R[H]=!0),y(z,"oriented")){var U=z.orientation==="h"?H:I;P[U]=!0}}}var O=x._subplots,X=O.xaxis,B=O.yaxis,Y=t.simpleMap(X,u),Z=t.simpleMap(B,u),q=Y.concat(Z),W=e.background;X.length&&B.length&&(W=t.coerce(g,x,n,"plot_bgcolor"));var ae=e.combine(W,x.paper_bgcolor),ne,de,le,oe,ue;function Se(){var Oe=k[ne]||[];ue._traceIndices=Oe.map(function(We){return We._expandedIndex}),ue._annIndices=[],ue._shapeIndices=[],ue._selectionIndices=[],ue._imgIndices=[],ue._subplotsWith=[],ue._counterAxes=[],ue._name=ue._attr=ne,ue._id=de}function he(Oe,We){return t.coerce(oe,ue,o,Oe,We)}function ye(Oe,We){return t.coerce2(oe,ue,o,Oe,We)}function ke(Oe){return Oe==="x"?B:X}function te(Oe,We){for(var N=Oe==="x"?Y:Z,j=[],G=0;G<N.length;G++){var V=N[G];V!==We&&!(g[V]||{}).overlaying&&j.push(h(V))}return j}var J={x:ke("x"),y:ke("y")},_e=J.x.concat(J.y),pe={},Le=[];function Ie(){var Oe=oe.matches;d.test(Oe)&&_e.indexOf(Oe)===-1&&(pe[Oe]=oe.type,Le=Object.keys(pe))}var Pe=a(g,x),Be=r(Pe);for(E=0;E<q.length;E++){ne=q[E],de=h(ne),le=ne.charAt(0),t.isPlainObject(g[ne])||(g[ne]={}),oe=g[ne],ue=i.newContainer(x,ne,le+"axis"),Se();var re=le==="x"&&!D[ne]&&S[ne]||le==="y"&&!M[ne]&&A[ne],De=le==="y"&&(!C[ne]&&$[ne]||F[ne]),Ce={hasMinor:!0,letter:le,font:x.font,outerTicks:R[ne],showGrid:!P[ne],data:k[ne]||[],bgColor:ae,calendar:x.calendar,automargin:!0,visibleDflt:re,reverseDflt:De,autotypenumbersDflt:T,splomStash:((x._splomAxes||{})[le]||{})[de]};he("uirevision",x.uirevision),l(oe,ue,he,Ce),s(oe,ue,he,Ce,x);var se=Be&&le===Pe.charAt(0),ce=ye("spikecolor",Be?ue.color:void 0),Re=ye("spikethickness",Be?1.5:void 0),we=ye("spikedash",Be?"dot":void 0),xe=ye("spikemode",Be?"across":void 0),be=ye("spikesnap"),ze=he("showspikes",!!se||!!ce||!!Re||!!we||!!xe||!!be);ze||(delete ue.spikecolor,delete ue.spikethickness,delete ue.spikedash,delete ue.spikemode,delete ue.spikesnap),c(oe,ue,he,{letter:le,counterAxes:J[le],overlayableAxes:te(le,ne),grid:x.grid}),he("title.standoff"),Ie(),ue._input=oe}for(E=0;E<Le.length;){de=Le[E++],ne=u(de),le=ne.charAt(0),t.isPlainObject(g[ne])||(g[ne]={}),oe=g[ne],ue=i.newContainer(x,ne,le+"axis"),Se();var Ne={letter:le,font:x.font,outerTicks:R[ne],showGrid:!P[ne],data:[],bgColor:ae,calendar:x.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((x._splomAxes||{})[le]||{})[de]};he("uirevision",x.uirevision),ue.type=pe[de]||"linear",s(oe,ue,he,Ne,x),c(oe,ue,he,{letter:le,counterAxes:J[le],overlayableAxes:te(le,ne),grid:x.grid}),he("fixedrange"),Ie(),ue._input=oe}var He=m("rangeslider","handleDefaults"),Ae=m("rangeselector","handleDefaults");for(E=0;E<Y.length;E++)ne=Y[E],oe=g[ne],ue=x[ne],He(g,x,ne),ue.type==="date"&&Ae(oe,ue,x,Z,ue.calendar),he("fixedrange");for(E=0;E<Z.length;E++){ne=Z[E],oe=g[ne],ue=x[ne];var Fe=x[u(ue.anchor)],Ge=m("rangeslider","isVisible")(Fe);he("fixedrange",Ge)}f.handleDefaults(g,x,{axIds:_e.concat(Le).sort(v.idSort),axHasImage:F})},vv}var dv,G0;function YE(){if(G0)return dv;G0=1;var t=nt.exports,e=Ze,r=ve.exports,a=_t.exports,i=Mt.exports;return dv=function(o,l,s,f){var c=o._fullLayout;if(l.length===0){i.redrawComponents(o);return}function v(x){var _=x.xaxis,T=x.yaxis;c._defs.select("#"+x.clipId+"> rect").call(a.setTranslate,0,0).call(a.setScale,1,1),x.plot.call(a.setTranslate,_._offset,T._offset).call(a.setScale,1,1);var k=x.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(a.setPointGroupScale,1,1),k.selectAll(".textpoint").call(a.setTextPointsScale,1,1),k.call(a.hideOutsideRangePoints,x)}function u(x,_){var T=x.plotinfo,k=T.xaxis,S=T.yaxis,A=k._length,D=S._length,M=!!x.xr1,C=!!x.yr1,$=[];if(M){var F=r.simpleMap(x.xr0,k.r2l),R=r.simpleMap(x.xr1,k.r2l),P=F[1]-F[0],E=R[1]-R[0];$[0]=(F[0]*(1-_)+_*R[0]-F[0])/(F[1]-F[0])*A,$[2]=A*(1-_+_*E/P),k.range[0]=k.l2r(F[0]*(1-_)+_*R[0]),k.range[1]=k.l2r(F[1]*(1-_)+_*R[1])}else $[0]=0,$[2]=A;if(C){var L=r.simpleMap(x.yr0,S.r2l),z=r.simpleMap(x.yr1,S.r2l),I=L[1]-L[0],H=z[1]-z[0];$[1]=(L[1]*(1-_)+_*z[1]-L[1])/(L[0]-L[1])*D,$[3]=D*(1-_+_*H/I),S.range[0]=k.l2r(L[0]*(1-_)+_*z[0]),S.range[1]=S.l2r(L[1]*(1-_)+_*z[1])}else $[1]=0,$[3]=D;i.drawOne(o,k,{skipTitle:!0}),i.drawOne(o,S,{skipTitle:!0}),i.redrawComponents(o,[k._id,S._id]);var U=M?A/$[2]:1,O=C?D/$[3]:1,X=M?$[0]:0,B=C?$[1]:0,Y=M?$[0]/$[2]*A:0,Z=C?$[1]/$[3]*D:0,q=k._offset-Y,W=S._offset-Z;T.clipRect.call(a.setTranslate,X,B).call(a.setScale,1/U,1/O),T.plot.call(a.setTranslate,q,W).call(a.setScale,U,O),a.setPointGroupScale(T.zoomScalePts,1/U,1/O),a.setTextPointsScale(T.zoomScaleTxt,1/U,1/O)}var h;f&&(h=f());function d(){for(var x={},_=0;_<l.length;_++){var T=l[_],k=T.plotinfo.xaxis,S=T.plotinfo.yaxis;T.xr1&&(x[k._name+".range"]=T.xr1.slice()),T.yr1&&(x[S._name+".range"]=T.yr1.slice())}return h&&h(),e.call("relayout",o,x).then(function(){for(var A=0;A<l.length;A++)v(l[A].plotinfo)})}function p(){for(var x={},_=0;_<l.length;_++){var T=l[_],k=T.plotinfo.xaxis,S=T.plotinfo.yaxis;T.xr0&&(x[k._name+".range"]=T.xr0.slice()),T.yr0&&(x[S._name+".range"]=T.yr0.slice())}return e.call("relayout",o,x).then(function(){for(var A=0;A<l.length;A++)v(l[A].plotinfo)})}var y,m,b,w=t.ease(s.easing);o._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(b),b=null,p()});function g(){m=Date.now();for(var x=Math.min(1,(m-y)/s.duration),_=w(x),T=0;T<l.length;T++)u(l[T],_);m-y>s.duration?(d(),b=window.cancelAnimationFrame(g)):b=window.requestAnimationFrame(g)}return y=Date.now(),b=window.requestAnimationFrame(g),Promise.resolve()},dv}var Uc=nt.exports,U0=Ze,qf=ve.exports,qE=Ut.exports,ZE=_t.exports,V0=Zl.getModuleCalcData,di=Vt,La=wr,KE=vn,kt=qf.ensureSingle;function qs(t,e,r){return qf.ensureSingle(t,e,r,function(a){a.datum(r)})}Yt.name="cartesian";Yt.attr=["xaxis","yaxis"];Yt.idRoot=["x","y"];Yt.idRegex=La.idRegex;Yt.attrRegex=La.attrRegex;Yt.attributes=CE();Yt.layoutAttributes=Wa;Yt.supplyLayoutDefaults=WE();Yt.transitionAxes=YE();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[di.id2name(c)]||{}).anchor,La.idRegex.y.test(v)||(v="y"),n.push(c+v),o.push(c+v),s[v]||(s[v]=1,qf.pushUnique(i,v)));for(f=0;f<i.length;f++)v=i[f],s[v]||(c=(t[di.id2name(v)]||{}).anchor,La.idRegex.x.test(c)||(c="x"),n.push(c+v),o.push(c+v),l[c]||(l[c]=1,qf.pushUnique(a,c)));if(!o.length){c="",v="";for(var h in t)if(La.attrRegex.test(h)){var d=h.charAt(0);d==="x"?(!c||+h.substr(5)<+c.substr(5))&&(c=h):(!v||+h.substr(5)<+v.substr(5))&&(v=h)}c=c?di.name2id(c):"x",v=v?di.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 h=o[u],d=h[0].trace;d.xaxis+d.yaxis===s&&((e.indexOf(d.index)!==-1||d.carpet)&&(v&&v[0].trace.xaxis+v[0].trace.yaxis===s&&["tonextx","tonexty","tonext"].indexOf(d.fill)!==-1&&c.indexOf(v)===-1&&c.push(v),c.push(h)),v=h)}g2(t,f,c,r,a)}};function g2(t,e,r,a,i){for(var n=La.traceLayerClasses,o=t._fullLayout,l=o._modules,s,f,c,v=[],u=[],h=0;h<l.length;h++){s=l[h];var d=s.name,p=U0.modules[d].categories;if(p.svg){var y=s.layerName||d+"layer",m=s.plot;f=V0(r,m),c=f[0],r=f[1],c.length&&v.push({i:n.indexOf(y),className:y,plotMethod:m,cdModule:c}),p.zoomScale&&u.push("."+y)}}v.sort(function(g,x){return g.i-x.i});var b=e.plot.selectAll("g.mlayer").data(v,function(g){return g.className});if(b.enter().append("g").attr("class",function(g){return g.className}).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),b.exit().remove(),b.order(),b.each(function(g){var x=Uc.select(this),_=g.className;g.plotMethod(t,e,g.cdModule,x,a,i),La.clipOnAxisFalseQuery.indexOf("."+_)===-1&&ZE.setClipUrl(x,e.layerClipId,t)}),o._has("scattergl")&&(s=U0.getModule("scattergl"),c=V0(r,s)[0],s.plot(t,e,c)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(La.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=di.listIds({_fullLayout:a});for(s=0;s<u.length;s++){var h=u[s];e[di.id2name(h)]||a._infolayer.selectAll(".g-"+h+"title").remove()}}var d=a._has&&a._has("cartesian"),p=e._has&&e._has("cartesian");if(d&&!p)x2(a._cartesianlayer.selectAll(".subplot"),a),a._defs.selectAll(".axesclip").remove(),delete a._axisConstraintGroups,delete a._axisMatchGroups;else if(o.cartesian)for(s=0;s<o.cartesian.length;s++){var y=o.cartesian[s];if(!n[y]){var m="."+y+",."+y+"-x,."+y+"-y";a._cartesianlayer.selectAll(m).remove(),_2(y,a)}}};Yt.drawFramework=function(t){var e=t._fullLayout,r=QE(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(x2,e),a.each(function(i){var n=i[0],o=e._plots[n];o.plotgroup=Uc.select(this),b2(t,o),o.draglayer=kt(e._draggers,"g",n)})};Yt.rangePlot=function(t,e,r){b2(t,e),g2(t,e,r),qE.style(t)};function QE(t){var e=t._fullLayout,r=e._subplots.cartesian,a=r.length,i,n,o,l,s,f,c=[],v=[];for(i=0;i<a;i++){o=r[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var u=s._mainAxis,h=f._mainAxis,d=u._id+h._id,p=e._plots[d];l.overlays=[],d!==o&&p?(l.mainplot=d,l.mainplotinfo=p,v.push(o)):(l.mainplot=void 0,l.mainplotinfo=void 0,c.push(o))}for(i=0;i<v.length;i++)o=v[i],l=e._plots[o],l.mainplotinfo.overlays.push(l);var y=c.concat(v),m=new Array(a);for(i=0;i<a;i++){o=y[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var b=[o,s.layer,f.layer,s.overlaying||"",f.overlaying||""];for(n=0;n<l.overlays.length;n++)b.push(l.overlays[n].id);m[i]=b}return m}function b2(t,e){var r=e.plotgroup,a=e.id,i=La.layerValue2layerClass[e.xaxis.layer],n=La.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,f=s.plotgroup,c=a+"-x",v=a+"-y";e.minorGridlayer=s.minorGridlayer,e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,kt(s.overlinesBelow,"path",c),kt(s.overlinesBelow,"path",v),kt(s.overaxesBelow,"g",c),kt(s.overaxesBelow,"g",v),e.plot=kt(s.overplot,"g",a),kt(s.overlinesAbove,"path",c),kt(s.overlinesAbove,"path",v),kt(s.overaxesAbove,"g",c),kt(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=kt(r,"path","xlines-above"),e.ylines=kt(r,"path","ylines-above"),e.xaxislayer=kt(r,"g","xaxislayer-above"),e.yaxislayer=kt(r,"g","yaxislayer-above");else{var l=kt(r,"g","layer-subplot");e.shapelayer=kt(l,"g","shapelayer"),e.imagelayer=kt(l,"g","imagelayer"),e.minorGridlayer=kt(r,"g","minor-gridlayer"),e.gridlayer=kt(r,"g","gridlayer"),e.zerolinelayer=kt(r,"g","zerolinelayer"),kt(r,"path","xlines-below"),kt(r,"path","ylines-below"),e.overlinesBelow=kt(r,"g","overlines-below"),kt(r,"g","xaxislayer-below"),kt(r,"g","yaxislayer-below"),e.overaxesBelow=kt(r,"g","overaxes-below"),e.plot=kt(r,"g","plot"),e.overplot=kt(r,"g","overplot"),e.xlines=kt(r,"path","xlines-above"),e.ylines=kt(r,"path","ylines-above"),e.overlinesAbove=kt(r,"g","overlines-above"),kt(r,"g","xaxislayer-above"),kt(r,"g","yaxislayer-above"),e.overaxesAbove=kt(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||(qs(e.minorGridlayer,"g",e.xaxis._id),qs(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map(function(u){return u[0]}).sort(di.idSort),qs(e.gridlayer,"g",e.xaxis._id),qs(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map(function(u){return u[0]}).sort(di.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0)}function x2(t,e){if(!!t){var r={};t.each(function(s){var f=s[0],c=Uc.select(this);c.remove(),_2(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 _2(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=Uc.select(t).selectAll(".svg-container"),a=r.filter(function(n,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function i(){var n=this,o=n.toDataURL("image/png"),l=e.append("svg:image");l.attr({xmlns:KE.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}a.each(i)};Yt.updateFx=Wh.updateFx;var Zs=pr,JE={hasLines:Zs.hasLines,hasMarkers:Zs.hasMarkers,hasText:Zs.hasText,isBubble:Zs.isBubble,attributes:gn,supplyDefaults:JR,crossTraceDefaults:t2,calc:Dp.calc,crossTraceCalc:sE,arraysToCalcdata:i2,plot:yE,colorbar:as,formatLabels:h2,style:$0.style,styleOnSelect:$0.styleOnSelect,hoverPoints:SE,selectPoints:LE,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(" ")}},ez={moduleType:"component",name:"legend",layoutAttributes:xw,supplyLayoutDefaults:_w,draw:kw,style:Tw},tz=nt.exports,rz=rt.exports,X0=MT,Rp=ve.exports,az=Rp.strScale,iz=Rp.strRotate,nz=Rp.strTranslate,oz=function(e,r,a){var i=e.node(),n=X0[a.arrowhead||0],o=X0[a.startarrowhead||0],l=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),f=r.indexOf("start")>=0,c=r.indexOf("end")>=0,v=n.backoff*l+a.standoff,u=o.backoff*s+a.startstandoff,h,d,p,y;if(i.nodeName==="line"){h={x:+e.attr("x1"),y:+e.attr("y1")},d={x:+e.attr("x2"),y:+e.attr("y2")};var m=h.x-d.x,b=h.y-d.y;if(p=Math.atan2(b,m),y=p+Math.PI,v&&u&&v+u>Math.sqrt(m*m+b*b)){$();return}if(v){if(v*v>m*m+b*b){$();return}var w=v*Math.cos(p),g=v*Math.sin(p);d.x+=w,d.y+=g,e.attr({x2:d.x,y2:d.y})}if(u){if(u*u>m*m+b*b){$();return}var x=u*Math.cos(p),_=u*Math.sin(p);h.x-=x,h.y-=_,e.attr({x1:h.x,y1:h.y})}}else if(i.nodeName==="path"){var T=i.getTotalLength(),k="";if(T<v+u){$();return}var S=i.getPointAtLength(0),A=i.getPointAtLength(.1);p=Math.atan2(S.y-A.y,S.x-A.x),h=i.getPointAtLength(Math.min(u,T)),k="0px,"+u+"px,";var D=i.getPointAtLength(T),M=i.getPointAtLength(T-.1);y=Math.atan2(D.y-M.y,D.x-M.x),d=i.getPointAtLength(Math.max(0,T-v));var C=k?u+v:v;k+=T-C+"px,"+T+"px",e.style("stroke-dasharray",k)}function $(){e.style("stroke-dasharray","0px,100px")}function F(R,P,E,L){!R.path||(R.noRotate&&(E=0),tz.select(i.parentNode).append("path").attr({class:e.attr("class"),d:R.path,transform:nz(P.x,P.y)+iz(E*180/Math.PI)+az(L)}).style({fill:rz.rgb(a.arrowcolor),"stroke-width":0}))}f&&F(o,h,p,s),c&&F(n,d,y,l)},W0=nt.exports,hv=Ze,lz=Ut.exports,ni=ve.exports,pv=ni.strTranslate,Nl=Mt.exports,Ri=rt.exports,Ia=_t.exports,Y0=pa,mv=nr,yv=wi,el=ba.exports,sz=At.arrayEditor,fz=oz,Ep={draw:cz,drawOne:w2,drawRaw:T2};function cz(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&w2(t,r);return lz.previousPromises(t)}function w2(t,e){var r=t._fullLayout,a=r.annotations[e]||{},i=Nl.getFromId(t,a.xref),n=Nl.getFromId(t,a.yref);i&&i.setScale(),n&&n.setScale(),T2(t,a,e,!1,i,n)}function ri(t,e,r,a,i){var n=i[r],o=i[r+"ref"],l=r.indexOf("y")!==-1,s=Nl.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 T2(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=sz(t.layout,c,e),u=v.modifyBase,h=v.modifyItem,d=v.getUpdateObj;o._infolayer.selectAll("."+f+'[data-index="'+r+'"]').remove();var p="clip"+o._uid+"_ann"+r;if(!e._input||e.visible===!1){W0.selectAll("#"+p).remove();return}var y={x:{},y:{}},m=+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),g=s[e.showarrow?"annotationTail":"annotationPosition"],x=e.captureevents||s.annotationText||g;function _(L){var z={index:r,annotation:e._input,fullAnnotation:e,event:L};return a&&(z.subplotId=a),z}var T=w.append("g").style("pointer-events",x?"all":null).call(yv,"pointer").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",_(W0.event))});e.hovertext&&T.on("mouseover",function(){var L=e.hoverlabel,z=L.font,I=this.getBoundingClientRect(),H=t.getBoundingClientRect();Y0.loneHover({x0:I.left-H.left,x1:I.right-H.left,y:(I.top+I.bottom)/2-H.top,text:e.hovertext,color:L.bgcolor,borderColor:L.bordercolor,fontFamily:z.family,fontSize:z.size,fontColor:z.color},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:t})}).on("mouseout",function(){Y0.loneUnhover(o._hoverlayer.node())});var k=e.borderwidth,S=e.borderpad,A=k+S,D=T.append("rect").attr("class","bg").style("stroke-width",k+"px").call(Ri.stroke,e.bordercolor).call(Ri.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.font,F=o._meta?ni.templateString(e.text,o._meta):e.text,R=T.append("text").classed("annotation-text",!0).text(F);function P(L){return L.call(Ia.font,$).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),mv.convertToTspans(L,t,E),L}function E(){var L=R.selectAll("a");if(L.size()===1&&L.text()===R.text()){var z=T.insert("a",":first-child").attr({"xlink:xlink:href":L.attr("xlink:href"),"xlink:xlink:show":L.attr("xlink:show")}).style({cursor:"pointer"});z.node().appendChild(D.node())}var I=T.select(".annotation-text-math-group"),H=!I.empty(),U=Ia.bBox((H?I:R).node()),O=U.width,X=U.height,B=e.width||O,Y=e.height||X,Z=Math.round(B+2*A),q=Math.round(Y+2*A);function W(Oe,We){return We==="auto"&&(Oe<1/3?We="left":Oe>2/3?We="right":We="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[We]}for(var ae=!1,ne=["x","y"],de=0;de<ne.length;de++){var le=ne[de],oe=e[le+"ref"]||le,ue=e["a"+le+"ref"],Se={x:i,y:n}[le],he=(m+(le==="x"?0:-90))*Math.PI/180,ye=Z*Math.cos(he),ke=q*Math.sin(he),te=Math.abs(ye)+Math.abs(ke),J=e[le+"anchor"],_e=e[le+"shift"]*(le==="x"?1:-1),pe=y[le],Le,Ie,Pe,Be,re,De=Nl.getRefType(oe);if(Se&&De!=="domain"){var Ce=Se.r2fraction(e[le]);(Ce<0||Ce>1)&&(ue===oe?(Ce=Se.r2fraction(e["a"+le]),(Ce<0||Ce>1)&&(ae=!0)):ae=!0),Le=Se._offset+Se.r2p(e[le]),Be=.5}else{var se=De==="domain";le==="x"?(Pe=e[le],Le=se?Se._offset+Se._length*Pe:Le=l.l+l.w*Pe):(Pe=1-e[le],Le=se?Se._offset+Se._length*Pe:Le=l.t+l.h*Pe),Be=e.showarrow?.5:Pe}if(e.showarrow){pe.head=Le;var ce=e["a"+le];if(re=ye*W(.5,e.xanchor)-ke*W(.5,e.yanchor),ue===oe){var Re=Nl.getRefType(ue);Re==="domain"?(le==="y"&&(ce=1-ce),pe.tail=Se._offset+Se._length*ce):Re==="paper"?le==="y"?(ce=1-ce,pe.tail=l.t+l.h*ce):pe.tail=l.l+l.w*ce:pe.tail=Se._offset+Se.r2p(ce),Ie=re}else pe.tail=Le+ce,Ie=re+ce;pe.text=pe.tail+re;var we=o[le==="x"?"width":"height"];if(oe==="paper"&&(pe.head=ni.constrain(pe.head,1,we-1)),ue==="pixel"){var xe=-Math.max(pe.tail-3,pe.text),be=Math.min(pe.tail+3,pe.text)-we;xe>0?(pe.tail+=xe,pe.text+=xe):be>0&&(pe.tail-=be,pe.text-=be)}pe.tail+=_e,pe.head+=_e}else re=te*W(Be,J),Ie=re,pe.text=Le+re;pe.text+=_e,re+=_e,Ie+=_e,e["_"+le+"padplus"]=te/2+Ie,e["_"+le+"padminus"]=te/2-Ie,e["_"+le+"size"]=te,e["_"+le+"shift"]=re}if(ae){T.remove();return}var ze=0,Ne=0;if(e.align!=="left"&&(ze=(B-O)*(e.align==="center"?.5:1)),e.valign!=="top"&&(Ne=(Y-X)*(e.valign==="middle"?.5:1)),H)I.select("svg").attr({x:A+ze-1,y:A+Ne}).call(Ia.setClipUrl,M?p:null,t);else{var He=A+Ne-U.top,Ae=A+ze-U.left;R.call(mv.positionText,Ae,He).call(Ia.setClipUrl,M?p:null,t)}C.select("rect").call(Ia.setRect,A,A,B,Y),D.call(Ia.setRect,k/2,k/2,Z-k,q-k),T.call(Ia.setTranslate,Math.round(y.x.text-Z/2),Math.round(y.y.text-q/2)),w.attr({transform:"rotate("+m+","+y.x.text+","+y.y.text+")"});var Fe=function(Oe,We){b.selectAll(".annotation-arrow-g").remove();var N=y.x.head,j=y.y.head,G=y.x.tail+Oe,V=y.y.tail+We,K=y.x.text+Oe,Q=y.y.text+We,me=ni.rotationXYMatrix(m,K,Q),ge=ni.apply2DTransform(me),fe=ni.apply2DTransform2(me),ie=+D.attr("width"),Te=+D.attr("height"),je=K-.5*ie,Xe=je+ie,et=Q-.5*Te,st=et+Te,dt=[[je,et,je,st],[je,st,Xe,st],[Xe,st,Xe,et],[Xe,et,je,et]].map(fe);if(!dt.reduce(function(ot,Ve){return ot^!!ni.segmentsIntersect(N,j,N+1e6,j+1e6,Ve[0],Ve[1],Ve[2],Ve[3])},!1)){dt.forEach(function(ot){var Ve=ni.segmentsIntersect(G,V,N,j,ot[0],ot[1],ot[2],ot[3]);Ve&&(G=Ve.x,V=Ve.y)});var qe=e.arrowwidth,St=e.arrowcolor,lt=e.arrowside,Ke=b.append("g").style({opacity:Ri.opacity(St)}).classed("annotation-arrow-g",!0),yt=Ke.append("path").attr("d","M"+G+","+V+"L"+N+","+j).style("stroke-width",qe+"px").call(Ri.stroke,Ri.rgb(St));if(fz(yt,lt,e),s.annotationPosition&&yt.node().parentNode&&!a){var ht=N,it=j;if(e.standoff){var tt=Math.sqrt(Math.pow(N-G,2)+Math.pow(j-V,2));ht+=e.standoff*(G-N)/tt,it+=e.standoff*(V-j)/tt}var Ye=Ke.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(G-ht)+","+(V-it),transform:pv(ht,it)}).style("stroke-width",qe+6+"px").call(Ri.stroke,"rgba(0,0,0,0)").call(Ri.fill,"rgba(0,0,0,0)"),Qe,ut;el.init({element:Ye.node(),gd:t,prepFn:function(){var ot=Ia.getTranslate(T);Qe=ot.x,ut=ot.y,i&&i.autorange&&u(i._name+".autorange",!0),n&&n.autorange&&u(n._name+".autorange",!0)},moveFn:function(ot,Ve){var vt=ge(Qe,ut),Tt=vt[0]+ot,or=vt[1]+Ve;T.call(Ia.setTranslate,Tt,or),h("x",ri(i,ot,"x",l,e)),h("y",ri(n,Ve,"y",l,e)),e.axref===e.xref&&h("ax",ri(i,ot,"ax",l,e)),e.ayref===e.yref&&h("ay",ri(n,Ve,"ay",l,e)),Ke.attr("transform",pv(ot,Ve)),w.attr({transform:"rotate("+m+","+Tt+","+or+")"})},doneFn:function(){hv.call("_guiRelayout",t,d());var ot=document.querySelector(".js-notes-box-panel");ot&&ot.redraw(ot.selectedObj)}})}}};if(e.showarrow&&Fe(0,0),g){var Ge;el.init({element:T.node(),gd:t,prepFn:function(){Ge=w.attr("transform")},moveFn:function(Oe,We){var N="pointer";if(e.showarrow)e.axref===e.xref?h("ax",ri(i,Oe,"ax",l,e)):h("ax",e.ax+Oe),e.ayref===e.yref?h("ay",ri(n,We,"ay",l.w,e)):h("ay",e.ay+We),Fe(Oe,We);else{if(a)return;var j,G;if(i)j=ri(i,Oe,"x",l,e);else{var V=e._xsize/l.w,K=e.x+(e._xshift-e.xshift)/l.w-V/2;j=el.align(K+Oe/l.w,V,0,1,e.xanchor)}if(n)G=ri(n,We,"y",l,e);else{var Q=e._ysize/l.h,me=e.y-(e._yshift+e.yshift)/l.h-Q/2;G=el.align(me-We/l.h,Q,0,1,e.yanchor)}h("x",j),h("y",G),(!i||!n)&&(N=el.getCursor(i?.5:j,n?.5:G,e.xanchor,e.yanchor))}w.attr({transform:pv(Oe,We)+Ge}),yv(T,N)},clickFn:function(Oe,We){e.captureevents&&t.emit("plotly_clickannotation",_(We))},doneFn:function(){yv(T),hv.call("_guiRelayout",t,d());var Oe=document.querySelector(".js-notes-box-panel");Oe&&Oe.redraw(Oe.selectedObj)}})}}s.annotationText?R.call(mv.makeEditable,{delegate:T,gd:t}).call(P).on("edit",function(L){e.text=L,this.call(P),h("text",L),i&&i.autorange&&u(i._name+".autorange",!0),n&&n.autorange&&u(n._name+".autorange",!0),hv.call("_guiRelayout",t,d())}):R.call(P)}var q0=ve.exports,uz=Ze,Z0=At.arrayEditor,vz={hasClickToShow:dz,onClick:hz};function dz(t,e){var r=k2(t,e);return r.on.length>0||r.explicitOff.length>0}function hz(t,e){var r=k2(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=Z0(t.layout,"annotations",o[a[l]]),s.modifyItem("visible",!0),q0.extendFlat(n,s.getUpdateObj());for(l=0;l<i.length;l++)s=Z0(t.layout,"annotations",o[i[l]]),s.modifyItem("visible",!1),q0.extendFlat(n,s.getUpdateObj());return uz.call("update",t,{},n)}}function k2(t,e){var r=t._fullLayout.annotations,a=[],i=[],n=[],o=(e||[]).length,l,s,f,c,v,u,h,d;for(l=0;l<r.length;l++)if(f=r[l],c=f.clicktoshow,c){for(s=0;s<o;s++)if(v=e[s],u=v.xaxis,h=v.yaxis,u._id===f.xref&&h._id===f.yref&&u.d2r(v.x)===K0(f._xclick,u)&&h.d2r(v.y)===K0(f._yclick,h)){f.visible?c==="onout"?d=i:d=n:d=a,d.push(l);break}s===o&&f.visible&&c==="onout"&&i.push(l)}return{on:a,off:i,explicitOff:n}}function K0(t,e){return e.type==="log"?e.l2r(t):e.d2r(t)}var Q0=ve.exports,Rn=rt.exports,A2=function(e,r,a,i){i("opacity");var n=i("bgcolor"),o=i("bordercolor"),l=Rn.opacity(o);i("borderpad");var s=i("borderwidth"),f=i("showarrow");i("text",f?" ":a._dfltTitle.annotation),i("textangle"),Q0.coerceFont(i,"font",a.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),f){var v=i("arrowside"),u,h;v.indexOf("end")!==-1&&(u=i("arrowhead"),h=i("arrowsize")),v.indexOf("start")!==-1&&(i("startarrowhead",u),i("startarrowsize",h)),i("arrowcolor",l?r.bordercolor:Rn.defaultLine),i("arrowwidth",(l&&s||1)*2),i("standoff"),i("startstandoff")}var d=i("hovertext"),p=a.hoverlabel||{};if(d){var y=i("hoverlabel.bgcolor",p.bgcolor||(Rn.opacity(n)?Rn.rgb(n):Rn.defaultLine)),m=i("hoverlabel.bordercolor",p.bordercolor||Rn.contrast(y));Q0.coerceFont(i,"hoverlabel.font",{family:p.font.family,size:p.font.size,color:p.font.color||m})}i("captureevents",!!d)},gv=ve.exports,Ei=Mt.exports,pz=Pa,mz=A2,yz=es,gz=function(e,r){pz(e,r,{name:"annotations",handleItemDefaults:bz})};function bz(t,e,r){function a(w,g){return gv.coerce(t,e,yz,w,g)}var i=a("visible"),n=a("clicktoshow");if(!!(i||n)){mz(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 h=Ei.getFromId(f,u);h._annIndices.push(e._index)}if(Ei.coercePosition(e,f,a,u,v,.5),o){var d="a"+v,p=Ei.coerceRef(t,e,f,d,"pixel",["pixel","paper"]);p!=="pixel"&&p!==u&&(p=e[d]="pixel");var y=p==="pixel"?s[c]:.4;Ei.coercePosition(e,f,a,p,d,y)}a(v+"anchor"),a(v+"shift")}if(gv.noneOrAll(t,e,["x","y"]),o&&gv.noneOrAll(t,e,["ax","ay"]),n){var m=a("xclick"),b=a("yclick");e._xclick=m===void 0?e.x:Ei.cleanPosition(m,f,e.xref),e._yclick=b===void 0?e.y:Ei.cleanPosition(b,f,e.yref)}}}var Vd=ve.exports,Vi=Mt.exports,xz=Ep.draw,_z=function(e){var r=e._fullLayout,a=Vd.filterVisible(r.annotations);if(a.length&&e._fullData.length)return Vd.syncOrAsync([xz,wz],e)};function wz(t){var e=t._fullLayout;Vd.filterVisible(e.annotations).forEach(function(r){var a=Vi.getFromId(t,r.xref),i=Vi.getFromId(t,r.yref),n=Vi.getRefType(r.xref),o=Vi.getRefType(r.yref);r._extremes={},n==="range"&&J0(r,a),o==="range"&&J0(r,i)})}function J0(t,e){var r=e._id,a=r.charAt(0),i=t[a],n=t["a"+a],o=t[a+"ref"],l=t["a"+a+"ref"],s=t["_"+a+"padplus"],f=t["_"+a+"padminus"],c={x:1,y:-1}[a]*t[a+"shift"],v=3*t.arrowsize*t.arrowwidth||0,u=v+c,h=v-c,d=3*t.startarrowsize*t.arrowwidth||0,p=d+c,y=d-c,m;if(l===o){var b=Vi.findExtremes(e,[e.r2c(i)],{ppadplus:u,ppadminus:h}),w=Vi.findExtremes(e,[e.r2c(n)],{ppadplus:Math.max(s,p),ppadminus:Math.max(f,y)});m={min:[b.min[0],w.min[0]],max:[b.max[0],w.max[0]]}}else p=n?p+n:p,y=n?y-n:y,m=Vi.findExtremes(e,[e.r2c(i)],{ppadplus:Math.max(s,u,p),ppadminus:Math.max(f,h,y)});t._extremes[r]=m}var Tz=ct,kz=yh,Az=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(!(n||o))return;var l=e._fullLayout.annotations,s=r._id.charAt(0),f,c;function v(h){var d=f[h],p=null;n?p=kz(d,r.range):p=Math.pow(10,d),Tz(p)||(p=null),i(c+h,p)}for(var u=0;u<l.length;u++)f=l[u],c="annotations["+u+"].",f[s+"ref"]===r._id&&v(s),f["a"+s+"ref"]===r._id&&v("a"+s)},bv=Ep,eb=vz,Mz={moduleType:"component",name:"annotations",layoutAttributes:es,supplyLayoutDefaults:gz,includeBasePlot:Bc("annotations"),calcAutorange:_z,draw:bv.draw,drawOne:bv.drawOne,drawRaw:bv.drawRaw,hasClickToShow:eb.hasClickToShow,onClick:eb.onClick,convertCoords:Az},Lt=es,Sz=Xa.overrideAll,Lz=At.templatedArray,Xd=Sz(Lz("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"),xv=ve.exports,Cz=Mt.exports,Dz=Pa,$z=A2,Pz=Xd,Rz=function(e,r,a){Dz(e,r,{name:"annotations",handleItemDefaults:Ez,fullLayout:a.fullLayout})};function Ez(t,e,r,a){function i(l,s){return xv.coerce(t,e,Pz,l,s)}function n(l){var s=l+"axis",f={_fullLayout:{}};return f._fullLayout[s]=r[s],Cz.coercePosition(e,f,i,l,l,.5)}var o=i("visible");!o||($z(t,e,a.fullLayout,i),n("x"),n("y"),n("z"),xv.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",i("ax",-10),i("ay",-30),xv.noneOrAll(t,e,["ax","ay"])))}var tb=ve.exports,rb=Mt.exports,zz=function(e){for(var r=e.fullSceneLayout,a=r.annotations,i=0;i<a.length;i++)Iz(a[i],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function Iz(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={},tb.extendFlat(t._xa,n),rb.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={},tb.extendFlat(t._ya,n),rb.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 _v(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 Nz(t,e){var r=_v(t.projection,_v(t.view,_v(t.model,[e[0],e[1],e[2],1])));return r}var Fz=Nz,Hz=Ep.drawRaw,Oz=Fz,Bz=["x","y","z"],jz=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=Bz[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=Oz(e.glplot.cameraParams,[r.xaxis.r2l(o.x)*a[0],r.yaxis.r2l(o.y)*a[1],r.zaxis.r2l(o.z)*a[2]]),Hz(e.graphDiv,o,n,e.id,o._xa,o._ya))}},Gz=Ze,ab=ve.exports,Uz={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Xd}}},layoutAttributes:Xd,handleDefaults:Rz,includeBasePlot:Vz,convert:zz,draw:jz};function Vz(t,e){var r=Gz.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&&(ab.pushUnique(e._basePlotModules,r),ab.pushUnique(e._subplots.gl3d,o))}}var ib=es,nb=gn.line,Xz=ma.dash,tl=Ft.extendFlat,Wz=At.templatedArray,ob=Hc,M2=Wz("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:tl({},ib.xref,{description:["Sets the shape's x coordinate axis.",ob.axisRefDescription("x","left","right")].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},yref:tl({},ib.yref,{description:["Sets the shape's y coordinate axis.",ob.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:tl({},nb.color,{editType:"arraydraw"}),width:tl({},nb.width,{editType:"calc+arraydraw"}),dash:tl({},Xz,{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"}),wv=ve.exports,En=Mt.exports,Yz=Pa,qz=M2,lb=yn,Zz=function(e,r){Yz(e,r,{name:"shapes",handleItemDefaults:Kz})};function Kz(t,e,r){function a($,F){return wv.coerce(t,e,qz,$,F)}var i=a("visible");if(!!i){var n=a("path"),o=n?"path":"rect",l=a("type",o),s=l!=="path";s&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var c=a("xsizemode"),v=a("ysizemode"),u=["x","y"],h=0;h<2;h++){var d=u[h],p=d+"anchor",y=d==="x"?c:v,m={_fullLayout:r},b,w,g,x=En.coerceRef(t,e,m,d,void 0,"paper"),_=En.getRefType(x);if(_==="range"?(b=En.getFromId(m,x),b._shapeIndices.push(e._index),g=lb.rangeToShapePosition(b),w=lb.shapePositionToRange(b)):w=g=wv.identity,s){var T=.25,k=.75,S=d+"0",A=d+"1",D=t[S],M=t[A];t[S]=w(t[S],!0),t[A]=w(t[A],!0),y==="pixel"?(a(S,0),a(A,10)):(En.coercePosition(e,m,a,x,S,T),En.coercePosition(e,m,a,x,A,k)),e[S]=g(e[S]),e[A]=g(e[A]),t[S]=D,t[A]=M}if(y==="pixel"){var C=t[p];t[p]=w(t[p],!0),En.coercePosition(e,m,a,x,p,.25),e[p]=g(e[p]),t[p]=C}}s&&wv.noneOrAll(t,e,["x0","x1","y0","y1"])}}var Qz=rt.exports,Jz=function(e,r,a){a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var i=a("newshape.line.width");if(i){var n=(e||{}).plot_bgcolor||"#FFF";a("newshape.line.color",Qz.contrast(n)),a("newshape.line.dash")}a("activeshape.fillcolor"),a("activeshape.opacity")},Wd=ve.exports,zn=Mt.exports,yo=Rc,S2=yn,eI=function(e){var r=e._fullLayout,a=Wd.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=zn.getRefType(n.xref),f=zn.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=zn.getFromId(e,n.xref),l=sb(o,c,v,n.path,yo.paramIsX),l&&(n._extremes[o._id]=zn.findExtremes(o,l,tI(n)))}if(n.yref!=="paper"&&f!=="domain"){var u=n.ysizemode==="pixel"?n.yanchor:n.y0,h=n.ysizemode==="pixel"?n.yanchor:n.y1;o=zn.getFromId(e,n.yref),l=sb(o,u,h,n.path,yo.paramIsY),l&&(n._extremes[o._id]=zn.findExtremes(o,l,rI(n)))}}};function tI(t){return L2(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function rI(t){return L2(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function L2(t,e,r,a,i,n){var o=t/2,l=n;if(e==="pixel"){var s=i?S2.extractPathCoords(i,n?yo.paramIsY:yo.paramIsX):[r,a],f=Wd.aggNums(Math.max,null,s),c=Wd.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 sb(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(yo.segmentRE),f,c,v,u,h;for(t.type==="date"&&(n=S2.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(yo.paramRE),!(!u||u.length<v)&&(h=n(u[v]),h<o&&(o=h),h>l&&(l=h)));if(l>=o)return[o,l]}}var fb=Uw,aI={moduleType:"component",name:"shapes",layoutAttributes:M2,supplyLayoutDefaults:Zz,supplyDrawNewShapeDefaults:Jz,includeBasePlot:Bc("shapes"),calcAutorange:eI,draw:fb.draw,drawOne:fb.drawOne},cb=wr,iI=At.templatedArray,ub=Hc,C2=iI("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",cb.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",ub.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",cb.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",ub.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"}),nI=ve.exports,Tv=Mt.exports,oI=Pa,lI=C2,sI="images",fI=function(e,r){var a={name:sI,handleItemDefaults:cI};oI(e,r,a)};function cI(t,e,r){function a(u,h){return nI.coerce(t,e,lI,u,h)}var i=a("source"),n=a("visible",!!i);if(!n)return e;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var o={_fullLayout:r},l=["x","y"],s=0;s<2;s++){var f=l[s],c=Tv.coerceRef(t,e,o,f,"paper",void 0);if(c!=="paper"){var v=Tv.getFromId(o,c);v._imgIndices.push(e._index)}Tv.coercePosition(e,o,a,c,f,0)}return e}var vb=nt.exports,uI=_t.exports,In=Mt.exports,db=Vt,vI=vn,dI=function(e){var r=e._fullLayout,a=[],i={},n=[],o,l;for(l=0;l<r.images.length;l++){var s=r.images[l];if(s.visible)if(s.layer==="below"&&s.xref!=="paper"&&s.yref!=="paper"){o=db.ref2id(s.xref)+db.ref2id(s.yref);var f=r._plots[o];if(!f){n.push(s);continue}f.mainplot&&(o=f.mainplot.id),i[o]||(i[o]=[]),i[o].push(s)}else s.layer==="above"?a.push(s):n.push(s)}var c={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function v(b){var w=vb.select(this);if(this._imgSrc!==b.source)if(w.attr("xmlns",vI.svg),b.source&&b.source.slice(0,5)==="data:")w.attr("xlink:href",b.source),this._imgSrc=b.source;else{var g=new Promise(function(x){var _=new Image;this.img=_,_.setAttribute("crossOrigin","anonymous"),_.onerror=T,_.onload=function(){var k=document.createElement("canvas");k.width=this.width,k.height=this.height;var S=k.getContext("2d",{willReadFrequently:!0});S.drawImage(this,0,0);var A=k.toDataURL("image/png");w.attr("xlink:href",A),x()},w.on("error",T),_.src=b.source,this._imgSrc=b.source;function T(){w.remove(),x()}}.bind(this));e._promises.push(g)}}function u(b){var w=vb.select(this),g=In.getFromId(e,b.xref),x=In.getFromId(e,b.yref),_=In.getRefType(b.xref)==="domain",T=In.getRefType(b.yref)==="domain",k=r._size,S,A;g!==void 0?S=typeof b.xref=="string"&&_?g._length*b.sizex:Math.abs(g.l2p(b.sizex)-g.l2p(0)):S=b.sizex*k.w,x!==void 0?A=typeof b.yref=="string"&&T?x._length*b.sizey:Math.abs(x.l2p(b.sizey)-x.l2p(0)):A=b.sizey*k.h;var D=S*c.x[b.xanchor].offset,M=A*c.y[b.yanchor].offset,C=c.x[b.xanchor].sizing+c.y[b.yanchor].sizing,$,F;switch(g!==void 0?$=typeof b.xref=="string"&&_?g._length*b.x+g._offset:g.r2p(b.x)+g._offset:$=b.x*k.w+k.l,$+=D,x!==void 0?F=typeof b.yref=="string"&&T?x._length*(1-b.y)+x._offset:x.r2p(b.y)+x._offset:F=k.h-b.y*k.h+k.t,F+=M,b.sizing){case"fill":C+=" slice";break;case"stretch":C="none";break}w.attr({x:$,y:F,width:S,height:A,preserveAspectRatio:C,opacity:b.opacity});var R=g&&In.getRefType(b.xref)!=="domain"?g._id:"",P=x&&In.getRefType(b.yref)!=="domain"?x._id:"",E=R+P;uI.setClipUrl(w,E?"clip"+r._uid+E:null,e)}var h=r._imageLowerLayer.selectAll("image").data(n),d=r._imageUpperLayer.selectAll("image").data(a);h.enter().append("image"),d.enter().append("image"),h.exit().remove(),d.exit().remove(),h.each(function(b){v.bind(this)(b),u.bind(this)(b)}),d.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 y=r._plots[o];if(!!y.imagelayer){var m=y.imagelayer.selectAll("image").data(i[o]||[]);m.enter().append("image"),m.exit().remove(),m.each(function(b){v.bind(this)(b),u.bind(this)(b)})}}},hb=ct,hI=yh,pI=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(!!(n||o)){for(var l=e._fullLayout.images,s=r._id.charAt(0),f,c,v=0;v<l.length;v++)if(f=l[v],c="images["+v+"].",f[s+"ref"]===r._id){var u=f[s],h=f["size"+s],d=null,p=null;if(n){d=hI(u,r.range);var y=h/Math.pow(10,d)/2;p=2*Math.log(y+Math.sqrt(1+y*y))/Math.LN10}else d=Math.pow(10,u),p=d*(Math.pow(10,h/2)-Math.pow(10,-h/2));hb(d)?hb(p)||(p=null):(d=null,p=null),i(c+s,d),i(c+"size"+s,p)}}},mI={moduleType:"component",name:"images",layoutAttributes:C2,supplyLayoutDefaults:fI,includeBasePlot:Bc("images"),draw:dI,convertCoords:pI},zp={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"}},yI=dr,gI=hr,bI=Ft.extendFlat,xI=Xa.overrideAll,_I=Th,D2=At.templatedArray,wI=D2("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(" ")}}),$2=xI(D2("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:wI,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:bI(_I({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:yI({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:gI.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"),Tf=ve.exports,P2=Pa,R2=$2,TI=zp,kI=TI.name,AI=R2.buttons,MI=function(e,r){var a={name:kI,handleItemDefaults:SI};P2(e,r,a)};function SI(t,e,r){function a(o,l){return Tf.coerce(t,e,R2,o,l)}var i=P2(t,e,{name:"buttons",handleItemDefaults:LI}),n=a("visible",i.length>0);!n||(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Tf.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Tf.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function LI(t,e){function r(i,n){return Tf.coerce(t,e,AI,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 CI=Nt,ca=nt.exports,pb=rt.exports,so=_t.exports,Zf=ve.exports;function Nt(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Nt.barWidth=2;Nt.barLength=20;Nt.barRadius=2;Nt.barPad=1;Nt.barColor="#808BA4";Nt.prototype.enable=function(e,r,a){var i=this.gd._fullLayout,n=i.width,o=i.height;this.position=e;var l=this.position.l,s=this.position.w,f=this.position.t,c=this.position.h,v=this.position.direction,u=v==="down",h=v==="left",d=v==="right",p=v==="up",y=s,m=c,b,w,g,x;!u&&!h&&!d&&!p&&(this.position.direction="down",u=!0);var _=u||p;_?(b=l,w=b+y,u?(g=f,x=Math.min(g+m,o),m=x-g):(x=f+m,g=Math.max(x-m,0),m=x-g)):(g=f,x=g+m,h?(w=l+y,b=Math.max(w-y,0),y=w-b):(b=l,w=Math.min(b+y,n),y=w-b)),this._box={l:b,t:g,w:y,h:m};var T=s>y,k=Nt.barLength+2*Nt.barPad,S=Nt.barWidth+2*Nt.barPad,A=l,D=f+c;D+S>o&&(D=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(pb.fill,Nt.barColor),T?(this.hbar=M.attr({rx:Nt.barRadius,ry:Nt.barRadius,x:A,y:D,width:k,height:S}),this._hbarXMin=A+k/2,this._hbarTranslateMax=y-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=c>m,$=Nt.barWidth+2*Nt.barPad,F=Nt.barLength+2*Nt.barPad,R=l+s,P=f;R+$>n&&(R=n-$);var E=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-vertical",!0).call(pb.fill,Nt.barColor),C?(this.vbar=E.attr({rx:Nt.barRadius,ry:Nt.barRadius,x:R,y:P,width:$,height:F}),this._vbarYMin=P+F/2,this._vbarTranslateMax=m-F):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var L=this.id,z=b-.5,I=C?w+$+.5:w+.5,H=g-.5,U=T?x+S+.5:x+.5,O=i._topdefs.selectAll("#"+L).data(T||C?[0]:[]);if(O.exit().remove(),O.enter().append("clipPath").attr("id",L).append("rect"),T||C?(this._clipRect=O.select("rect").attr({x:Math.floor(z),y:Math.floor(H),width:Math.ceil(I)-Math.floor(z),height:Math.ceil(U)-Math.floor(H)}),this.container.call(so.setClipUrl,L,this.gd),this.bg.attr({x:l,y:f,width:s,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(so.setClipUrl,null),delete this._clipRect),T||C){var X=ca.behavior.drag().on("dragstart",function(){ca.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 B=ca.behavior.drag().on("dragstart",function(){ca.event.sourceEvent.preventDefault(),ca.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(B),C&&this.vbar.on(".drag",null).call(B)}this.setTranslate(r,a)};Nt.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(so.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)};Nt.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=ca.event.dx),this.vbar&&(r-=ca.event.dy),this.setTranslate(e,r)};Nt.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=ca.event.deltaY),this.vbar&&(r+=ca.event.deltaY),this.setTranslate(e,r)};Nt.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,i=a+this._hbarTranslateMax,n=Zf.constrain(ca.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=Zf.constrain(ca.event.y,s,f),v=(c-s)/(f-s),u=this.position.h-this._box.h;r=v*u}this.setTranslate(e,r)};Nt.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=Zf.constrain(e||0,0,a),r=Zf.constrain(r||0,0,i),this.translateX=e,this.translateY=r,this.container.call(so.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(so.setTranslate,e+n*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(so.setTranslate,e,r+o*this._vbarTranslateMax)}};var go=nt.exports,Fl=Ut.exports,Hl=rt.exports,bo=_t.exports,zr=ve.exports,Kf=nr,DI=At.arrayEditor,E2=Dr.LINE_SPACING,Je=zp,$I=CI,PI=function(e){var r=e._fullLayout,a=zr.filterVisible(r[Je.name]);function i(u){Fl.autoMargin(e,H2(u))}var n=r._menulayer.selectAll("g."+Je.containerClassName).data(a.length>0?[0]:[]);if(n.enter().append("g").classed(Je.containerClassName,!0).style("cursor","pointer"),n.exit().each(function(){go.select(this).selectAll("g."+Je.headerGroupClassName).each(i)}).remove(),a.length!==0){var o=n.selectAll("g."+Je.headerGroupClassName).data(a,RI);o.enter().append("g").classed(Je.headerGroupClassName,!0);for(var l=zr.ensureSingle(n,"g",Je.dropdownButtonGroupClassName,function(u){u.style("pointer-events","all")}),s=0;s<a.length;s++){var f=a[s];HI(e,f)}var c="updatemenus"+r._uid,v=new $I(e,l,c);o.enter().size()&&(l.node().parentNode.appendChild(l.node()),l.call(qd)),o.exit().each(function(u){l.call(qd),i(u)}).remove(),o.each(function(u){var h=go.select(this),d=u.type==="dropdown"?l:null;Fl.manageCommandObserver(e,u,u.buttons,function(p){Yd(e,u,u.buttons[p.index],h,d,v,p.index,!0)}),u.type==="dropdown"?(I2(e,h,l,v,u),z2(l,u)&&Ol(e,h,l,v,u)):Ol(e,h,null,null,u)})}};function RI(t){return t._index}function EI(t){return+t.attr(Je.menuIndexAttrName)==-1}function z2(t,e){return+t.attr(Je.menuIndexAttrName)===e._index}function Yd(t,e,r,a,i,n,o,l){e.active=o,DI(t.layout,Je.name,e).applyUpdate("active",o),e.type==="buttons"?Ol(t,a,null,null,e):e.type==="dropdown"&&(i.attr(Je.menuIndexAttrName,"-1"),I2(t,a,i,n,e),l||Ol(t,a,i,n,e))}function I2(t,e,r,a,i){var n=zr.ensureSingle(e,"g",Je.headerClassName,function(u){u.style("pointer-events","all")}),o=i._dims,l=i.active,s=i.buttons[l]||Je.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(Ip,i,s,t).call(O2,i,f,c);var v=zr.ensureSingle(e,"text",Je.headerArrowClassName,function(u){u.attr("text-anchor","end").call(bo.font,i.font).text(Je.arrowSymbol[i.direction])});v.attr({x:o.headerWidth-Je.arrowOffsetX+i.pad.l,y:o.headerHeight/2+Je.textOffsetY+i.pad.t}),n.on("click",function(){r.call(qd,String(z2(r,i)?-1:i._index)),Ol(t,e,r,a,i)}),n.on("mouseover",function(){n.call(N2)}),n.on("mouseout",function(){n.call(F2,i)}),bo.setTranslate(e,o.lx,o.ly)}function Ol(t,e,r,a,i){r||(r=e,r.attr("pointer-events","all"));var n=!EI(r)||i.type==="buttons"?i.buttons:[],o=i.type==="dropdown"?Je.dropdownButtonClassName:Je.buttonClassName,l=r.selectAll("g."+o).data(zr.filterVisible(n)),s=l.enter().append("g").classed(o,!0),f=l.exit();i.type==="dropdown"?(s.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var c=0,v=0,u=i._dims,h=["up","down"].indexOf(i.direction)!==-1;i.type==="dropdown"&&(h?v=u.headerHeight+Je.gapButtonHeader:c=u.headerWidth+Je.gapButtonHeader),i.type==="dropdown"&&i.direction==="up"&&(v=-Je.gapButtonHeader+Je.gapButton-u.openHeight),i.type==="dropdown"&&i.direction==="left"&&(c=-Je.gapButtonHeader+Je.gapButton-u.openWidth);var d={x:u.lx+c+i.pad.l,y:u.ly+v+i.pad.t,yPad:Je.gapButton,xPad:Je.gapButton,index:0},p={l:d.x+i.borderwidth,t:d.y+i.borderwidth};l.each(function(y,m){var b=go.select(this);b.call(Ip,i,y,t).call(O2,i,d),b.on("click",function(){go.event.defaultPrevented||(y.execute&&(y.args2&&i.active===m?(Yd(t,i,y,e,r,a,-1),Fl.executeAPICommand(t,y.method,y.args2)):(Yd(t,i,y,e,r,a,m),Fl.executeAPICommand(t,y.method,y.args))),t.emit("plotly_buttonclicked",{menu:i,button:y,active:i.active}))}),b.on("mouseover",function(){b.call(N2)}),b.on("mouseout",function(){b.call(F2,i),l.call(mb,i)})}),l.call(mb,i),h?(p.w=Math.max(u.openWidth,u.headerWidth),p.h=d.y-p.t):(p.w=d.x-p.l,p.h=Math.max(u.openHeight,u.headerHeight)),p.direction=i.direction,a&&(l.size()?zI(t,e,r,a,i,p):II(a))}function zI(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]+Je.gapButton;else for(c=0,u=0;u<f;u++)c+=s.widths[u]+Je.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 II(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 Ip(t,e,r,a){t.call(NI,e).call(FI,e,r,a)}function NI(t,e){var r=zr.ensureSingle(t,"rect",Je.itemRectClassName,function(a){a.attr({rx:Je.rx,ry:Je.ry,"shape-rendering":"crispEdges"})});r.call(Hl.stroke,e.bordercolor).call(Hl.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function FI(t,e,r,a){var i=zr.ensureSingle(t,"text",Je.itemTextClassName,function(l){l.attr({"text-anchor":"start","data-notex":1})}),n=r.label,o=a._fullLayout._meta;o&&(n=zr.templateString(n,o)),i.call(bo.font,e.font).text(n).call(Kf.convertToTspans,a)}function mb(t,e){var r=e.active;t.each(function(a,i){var n=go.select(this);i===r&&e.showactive&&n.select("rect."+Je.itemRectClassName).call(Hl.fill,Je.activeColor)})}function N2(t){t.select("rect."+Je.itemRectClassName).call(Hl.fill,Je.hoverColor)}function F2(t,e){t.select("rect."+Je.itemRectClassName).call(Hl.fill,e.bgcolor)}function HI(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=bo.tester.selectAll("g."+Je.dropdownButtonClassName).data(zr.filterVisible(e.buttons));a.enter().append("g").classed(Je.dropdownButtonClassName,!0);var i=["up","down"].indexOf(e.direction)!==-1;a.each(function(c,v){var u=go.select(this);u.call(Ip,e,c,t);var h=u.select("."+Je.itemTextClassName),d=h.node()&&bo.bBox(h.node()).width,p=Math.max(d+Je.textPadX,Je.minWidth),y=e.font.size*E2,m=Kf.lineCount(h),b=Math.max(y*m,Je.minHeight)+Je.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+Je.gapButton,r.openHeight+=b+Je.gapButton):(r.totalWidth+=p+Je.gapButton,r.openWidth+=p+Je.gapButton,r.totalHeight=Math.max(r.totalHeight,b),r.openHeight=r.totalHeight)}),i?r.totalHeight-=Je.gapButton:r.totalWidth-=Je.gapButton,r.headerWidth=r.width1+Je.arrowPadX,r.headerHeight=r.height1,e.type==="dropdown"&&(i?(r.width1+=Je.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=Je.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";zr.isRightAnchor(e)&&(r.lx-=n,s="right"),zr.isCenterAnchor(e)&&(r.lx-=n/2,s="center");var f="top";zr.isBottomAnchor(e)&&(r.ly-=o,f="bottom"),zr.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),Fl.autoMargin(t,H2(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 H2(t){return Je.autoMarginIdRoot+t._index}function O2(t,e,r,a){a=a||{};var i=t.select("."+Je.itemRectClassName),n=t.select("."+Je.itemTextClassName),o=e.borderwidth,l=r.index,s=e._dims;bo.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*E2,u=Kf.lineCount(n),h=(u-1)*v/2;Kf.positionText(n,Je.textOffsetX,c/2-h+Je.textOffsetY),f?r.y+=s.heights[l]+r.yPad:r.x+=s.widths[l]+r.xPad,r.index++}function qd(t,e){t.attr(Je.menuIndexAttrName,e||"-1").selectAll("g."+Je.dropdownButtonClassName).remove()}var OI=zp,BI={moduleType:"component",name:OI.name,layoutAttributes:$2,supplyLayoutDefaults:MI,draw:PI},Vc={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0},yb=dr,jI=Th,GI=Ft.extendDeepAll,UI=Xa.overrideAll,VI=mc,B2=At.templatedArray,zi=Vc,XI=B2("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(" ")}}),j2=UI(B2("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:XI,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:GI(jI({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:VI.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:yb({description:"Sets the font of the current value label text."})},font:yb({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:zi.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:zi.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:zi.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:zi.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:zi.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:zi.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:zi.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root"),qn=ve.exports,G2=Pa,U2=j2,WI=Vc,YI=WI.name,qI=U2.steps,ZI=function(e,r){G2(e,r,{name:YI,handleItemDefaults:KI})};function KI(t,e,r){function a(v,u){return qn.coerce(t,e,U2,v,u)}for(var i=G2(t,e,{name:"steps",handleItemDefaults:QI}),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=qn.filterVisible(i),f=a("active");(i[f]||{}).visible||(e.active=s[0]._index),a("x"),a("y"),qn.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"),qn.coerceFont(a,"font",r.font);var c=a("currentvalue.visible");c&&(a("currentvalue.xanchor"),a("currentvalue.prefix"),a("currentvalue.suffix"),a("currentvalue.offset"),qn.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 QI(t,e){function r(n,o){return qn.coerce(t,e,qI,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 ua=nt.exports,Qf=Ut.exports,mi=rt.exports,ha=_t.exports,Ir=ve.exports,JI=Ir.strTranslate,bl=nr,eN=At.arrayEditor,ft=Vc,Np=Dr,V2=Np.LINE_SPACING,kv=Np.FROM_TL,Av=Np.FROM_BR,tN=function(e){var r=e._fullLayout,a=rN(r,e),i=r._infolayer.selectAll("g."+ft.containerClassName).data(a.length>0?[0]:[]);i.enter().append("g").classed(ft.containerClassName,!0).style("cursor","ew-resize");function n(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),Qf.autoMargin(e,X2(f))}if(i.exit().each(function(){ua.select(this).selectAll("g."+ft.groupClassName).each(n)}).remove(),a.length!==0){var o=i.selectAll("g."+ft.groupClassName).data(a,aN);o.enter().append("g").classed(ft.groupClassName,!0),o.exit().each(n).remove();for(var l=0;l<a.length;l++){var s=a[l];iN(e,s)}o.each(function(f){var c=ua.select(this);fN(f),Qf.manageCommandObserver(e,f,f._visibleSteps,function(v){var u=c.data()[0];u.active!==v.index&&(u._dragging||Y2(e,c,u,v.index,!1,!0))}),nN(e,ua.select(this),f)})}};function X2(t){return ft.autoMarginIdRoot+t._index}function rN(t,e){for(var r=t[ft.name],a=[],i=0;i<r.length;i++){var n=r[i];!n.visible||(n._gd=e,a.push(n))}return a}function aN(t){return t._index}function iN(t,e){var r=ha.tester.selectAll("g."+ft.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(ft.labelGroupClass,!0);var a=0,i=0;r.each(function(d){var p=ua.select(this),y=W2(p,{step:d},e),m=y.node();if(m){var b=ha.bBox(m);i=Math.max(i,b.height),a=Math.max(a,b.width)}}),r.remove();var n=e._dims={};n.inputAreaWidth=Math.max(ft.railWidth,ft.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*ft.stepInset,s=l/(e._stepCount-1),f=a+ft.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=ha.tester.append("g");r.each(function(d){var p=Jf(c,e,d.label),y=p.node()&&ha.bBox(p.node())||{width:0,height:0},m=bl.lineCount(p);n.currentValueMaxWidth=Math.max(n.currentValueMaxWidth,Math.ceil(y.width)),n.currentValueHeight=Math.max(n.currentValueHeight,Math.ceil(y.height)),n.currentValueMaxLines=Math.max(n.currentValueMaxLines,m)}),n.currentValueTotalHeight=n.currentValueHeight+e.currentvalue.offset,c.remove()}n.height=n.currentValueTotalHeight+ft.tickOffset+e.ticklen+ft.labelOffset+n.labelHeight+e.pad.t+e.pad.b;var v="left";Ir.isRightAnchor(e)&&(n.lx-=n.outerLength,v="right"),Ir.isCenterAnchor(e)&&(n.lx-=n.outerLength/2,v="center");var u="top";Ir.isBottomAnchor(e)&&(n.ly-=n.height,u="bottom"),Ir.isMiddleAnchor(e)&&(n.ly-=n.height/2,u="middle"),n.outerLength=Math.ceil(n.outerLength),n.height=Math.ceil(n.height),n.lx=Math.round(n.lx),n.ly=Math.round(n.ly);var h={y:e.y,b:n.height*Av[u],t:n.height*kv[u]};e.lenmode==="fraction"?(h.l=0,h.xl=e.x-e.len*kv[v],h.r=0,h.xr=e.x+e.len*Av[v]):(h.x=e.x,h.l=n.outerLength*kv[v],h.r=n.outerLength*Av[v]),Qf.autoMargin(t,X2(e),h)}function nN(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(Jf,r).call(uN,r).call(lN,r).call(sN,r).call(cN,t,r).call(oN,t,r);var a=r._dims;ha.setTranslate(e,a.lx+r.pad.l,a.ly+r.pad.t),e.call(Z2,r,!1),e.call(Jf,r)}function Jf(t,e,r){if(!!e.currentvalue.visible){var a=e._dims,i,n;switch(e.currentvalue.xanchor){case"right":i=a.inputAreaLength-ft.currentValueInset-a.currentValueMaxWidth,n="left";break;case"center":i=a.inputAreaLength*.5,n="middle";break;default:i=ft.currentValueInset,n="left"}var o=Ir.ensureSingle(t,"text",ft.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=Ir.templateString(s,f)),l+=s}e.currentvalue.suffix&&(l+=e.currentvalue.suffix),o.call(ha.font,e.currentvalue.font).text(l).call(bl.convertToTspans,e._gd);var c=bl.lineCount(o),v=(a.currentValueMaxLines+1-c)*e.currentvalue.font.size*V2;return bl.positionText(o,i,v),o}}function oN(t,e,r){var a=Ir.ensureSingle(t,"rect",ft.gripRectClass,function(i){i.call(q2,e,t,r).style("pointer-events","all")});a.attr({width:ft.gripWidth,height:ft.gripHeight,rx:ft.gripRadius,ry:ft.gripRadius}).call(mi.stroke,r.bordercolor).call(mi.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function W2(t,e,r){var a=Ir.ensureSingle(t,"text",ft.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),i=e.step.label,n=r._gd._fullLayout._meta;return n&&(i=Ir.templateString(i,n)),a.call(ha.font,r.font).text(i).call(bl.convertToTspans,r._gd),a}function lN(t,e){var r=Ir.ensureSingle(t,"g",ft.labelsClass),a=e._dims,i=r.selectAll("g."+ft.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(ft.labelGroupClass,!0),i.exit().remove(),i.each(function(n){var o=ua.select(this);o.call(W2,n,e),ha.setTranslate(o,Fp(e,n.fraction),ft.tickOffset+e.ticklen+e.font.size*V2+ft.labelOffset+a.currentValueTotalHeight)})}function gb(t,e,r,a,i){var n=Math.round(a*(r._stepCount-1)),o=r._visibleSteps[n]._index;o!==r.active&&Y2(t,e,r,o,!0,i)}function Y2(t,e,r,a,i,n){var o=r.active;r.active=a,eN(t.layout,ft.name,r).applyUpdate("active",a);var l=r.steps[r.active];e.call(Z2,r,n),e.call(Jf,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&&Qf.executeAPICommand(t,s.method,s.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function q2(t,e,r){if(e._context.staticPlot)return;var a=r.node(),i=ua.select(e);function n(){return r.data()[0]}function o(){var l=n();e.emit("plotly_sliderstart",{slider:l});var s=r.select("."+ft.gripRectClass);ua.event.stopPropagation(),ua.event.preventDefault(),s.call(mi.fill,l.activebgcolor);var f=bb(l,ua.mouse(a)[0]);gb(e,r,l,f,!0),l._dragging=!0;function c(){var u=n(),h=bb(u,ua.mouse(a)[0]);gb(e,r,u,h,!1)}i.on("mousemove",c),i.on("touchmove",c);function v(){var u=n();u._dragging=!1,s.call(mi.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 sN(t,e){var r=t.selectAll("rect."+ft.tickRectClass).data(e._visibleSteps),a=e._dims;r.enter().append("rect").classed(ft.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=ua.select(this);l.attr({height:o?e.ticklen:e.minorticklen}).call(mi.fill,e.tickcolor),ha.setTranslate(l,Fp(e,n/(e._stepCount-1))-.5*e.tickwidth,(o?ft.tickOffset:ft.minorTickOffset)+a.currentValueTotalHeight)})}function fN(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 Z2(t,e,r){for(var a=t.select("rect."+ft.gripRectClass),i=0,n=0;n<e._stepCount;n++)if(e._visibleSteps[n]._index===e.active){i=n;break}var o=Fp(e,i/(e._stepCount-1));if(!e._invokingCommand){var l=a;r&&e.transition.duration>0&&(l=l.transition().duration(e.transition.duration).ease(e.transition.easing)),l.attr("transform",JI(o-ft.gripWidth*.5,e._dims.currentValueTotalHeight))}}function Fp(t,e){var r=t._dims;return r.inputAreaStart+ft.stepInset+(r.inputAreaLength-2*ft.stepInset)*Math.min(1,Math.max(0,e))}function bb(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-ft.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*ft.stepInset-2*r.inputAreaStart)))}function cN(t,e,r){var a=r._dims,i=Ir.ensureSingle(t,"rect",ft.railTouchRectClass,function(n){n.call(q2,e,t,r).style("pointer-events","all")});i.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,ft.tickOffset+r.ticklen+a.labelHeight)}).call(mi.fill,r.bgcolor).attr("opacity",0),ha.setTranslate(i,0,a.currentValueTotalHeight)}function uN(t,e){var r=e._dims,a=r.inputAreaLength-ft.railInset*2,i=Ir.ensureSingle(t,"rect",ft.railRectClass);i.attr({width:a,height:ft.railWidth,rx:ft.railRadius,ry:ft.railRadius,"shape-rendering":"crispEdges"}).call(mi.stroke,e.bordercolor).call(mi.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),ha.setTranslate(i,ft.railInset,(r.inputAreaWidth-ft.railWidth)*.5+r.currentValueTotalHeight)}var vN=Vc,dN={moduleType:"component",name:vN.name,layoutAttributes:j2,supplyLayoutDefaults:ZI,draw:tN},xb=hr,Hp={bgcolor:{valType:"color",dflt:xb.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:xb.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"},K2={_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={},Op={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},hN=Vt,pN=nr,Q2=Op,mN=Dr.LINE_SPACING,ec=Q2.name;function J2(t){var e=t&&t[ec];return e&&e.visible}Xc.isVisible=J2;Xc.makeData=function(t){var e=hN.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(J2(n)){a.push(n);var o=n[ec];o._id=ec+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[ec],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(pN.BR_TAG_ALL)||[]).length;o+=l*e.title.font.size*mN}return{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:a._height+n+Math.max(r.margin.b,o),pad:Q2.extraPad+a._offsetShift*2}};var Mv,_b;function yN(){if(_b)return Mv;_b=1;var t=ve.exports,e=At,r=Vt,a=Hp,i=K2;return Mv=function(o,l,s){var f=o[s],c=l[s];if(!(f.rangeslider||l._requestRangeslider[c._id]))return;t.isPlainObject(f.rangeslider)||(f.rangeslider={});var v=f.rangeslider,u=e.newContainer(c,"rangeslider");function h(A,D){return t.coerce(v,u,a,A,D)}var d,p;function y(A,D){return t.coerce(d,p,i,A,D)}var m=h("visible");if(!!m){h("bgcolor",l.plot_bgcolor),h("bordercolor"),h("borderwidth"),h("thickness"),h("autorange",!c.isValidRange(v.range)),h("range");var 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)}),g=t.simpleMap(w,r.id2name),x=0;x<g.length;x++){var _=g[x];d=v[_]||{},p=e.newContainer(u,_,"yaxis");var T=l[_],k;d.range&&T.isValidRange(d.range)&&(k="fixed");var S=y("rangemode",k);S!=="match"&&y("range",T.range.slice())}u._input=v}},Mv}var Sv,wb;function gN(){if(wb)return Sv;wb=1;var t=Vt.list,e=Ql.getAutoRange,r=Op;return Sv=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))}},Sv}var Lv,Tb;function bN(){if(Tb)return Lv;Tb=1;var t=nt.exports,e=Ze,r=Ut.exports,a=ve.exports,i=a.strTranslate,n=_t.exports,o=rt.exports,l=kc,s=Yt,f=Vt,c=ba.exports,v=wi,u=Op;Lv=function(T){for(var k=T._fullLayout,S=k._rangeSliderData,A=0;A<S.length;A++){var D=S[A][u.name];D._clipId=D._id+"-"+k._uid}function M($){return $._name}var C=k._infolayer.selectAll("g."+u.containerClassName).data(S,M);C.exit().each(function($){var F=$[u.name];k._topdefs.select("#"+F._clipId).remove()}).remove(),S.length!==0&&(C.enter().append("g").classed(u.containerClassName,!0).attr("pointer-events","all"),C.each(function($){var F=t.select(this),R=$[u.name],P=k[f.id2name($.anchor)],E=R[f.id2name($.anchor)];if(R.range){var L=a.simpleMap(R.range,$.r2l),z=a.simpleMap($.range,$.r2l),I;z[0]<z[1]?I=[Math.min(L[0],z[0]),Math.max(L[1],z[1])]:I=[Math.max(L[0],z[0]),Math.min(L[1],z[1])],R.range=R._input.range=a.simpleMap(I,$.l2r)}$.cleanRange("rangeslider.range");var H=k._size,U=$.domain;R._width=H.w*(U[1]-U[0]);var O=Math.round(H.l+H.w*U[0]),X=Math.round(H.t+H.h*(1-$._counterDomainMin)+($.side==="bottom"?$._depth:0)+R._offsetShift+u.extraPad);F.attr("transform",i(O,X)),R._rl=a.simpleMap(R.range,$.r2l);var B=R._rl[0],Y=R._rl[1],Z=Y-B;if(R.p2d=function(he){return he/R._width*Z+B},R.d2p=function(he){return(he-B)/Z*R._width},$.rangebreaks){var q=$.locateBreaks(B,Y);if(q.length){var W,ae,ne=0;for(W=0;W<q.length;W++)ae=q[W],ne+=ae.max-ae.min;var de=R._width/(Y-B-ne),le=[-de*B];for(W=0;W<q.length;W++)ae=q[W],le.push(le[le.length-1]-de*(ae.max-ae.min));for(R.d2p=function(he){for(var ye=le[0],ke=0;ke<q.length;ke++){var te=q[ke];if(he>=te.max)ye=le[ke+1];else if(he<te.min)break}return ye+de*he},W=0;W<q.length;W++)ae=q[W],ae.pmin=R.d2p(ae.min),ae.pmax=R.d2p(ae.max);R.p2d=function(he){for(var ye=le[0],ke=0;ke<q.length;ke++){var te=q[ke];if(he>=te.pmax)ye=le[ke+1];else if(he<te.pmin)break}return(he-ye)/de}}}if(E.rangemode!=="match"){var oe=P.r2l(E.range[0]),ue=P.r2l(E.range[1]),Se=ue-oe;R.d2pOppAxis=function(he){return(he-oe)/Se*R._height}}F.call(y,T,$,R).call(m,T,$,R).call(b,T,$,R).call(g,T,$,R,E).call(x,T,$,R).call(_,T,$,R),h(F,T,$,R),p(F,T,$,R,P,E),$.side==="bottom"&&l.draw(T,$._id+"title",{propContainer:$,propName:$._name+".title",placeholder:k._dfltTitle.x,attributes:{x:$._offset+$._length/2,y:X+R._height+R._offsetShift+10+1.5*$.title.font.size,"text-anchor":"middle"}})}))};function h(T,k,S,A){if(k._context.staticPlot)return;var D=T.select("rect."+u.slideBoxClassName).node(),M=T.select("rect."+u.grabAreaMinClassName).node(),C=T.select("rect."+u.grabAreaMaxClassName).node();function $(){var F=t.event,R=F.target,P=F.clientX||F.touches[0].clientX,E=P-T.node().getBoundingClientRect().left,L=A.d2p(S._rl[0]),z=A.d2p(S._rl[1]),I=c.coverSlip();this.addEventListener("touchmove",H),this.addEventListener("touchend",U),I.addEventListener("mousemove",H),I.addEventListener("mouseup",U);function H(O){var X=O.clientX||O.touches[0].clientX,B=+X-P,Y,Z,q;switch(R){case D:q="ew-resize",Y=L+B,Z=z+B;break;case M:q="col-resize",Y=L+B,Z=z;break;case C:q="col-resize",Y=L,Z=z+B;break;default:q="ew-resize",Y=E,Z=E+B;break}if(Z<Y){var W=Z;Z=Y,Y=W}A._pixelMin=Y,A._pixelMax=Z,v(t.select(I),q),d(T,k,S,A)}function U(){I.removeEventListener("mousemove",H),I.removeEventListener("mouseup",U),this.removeEventListener("touchmove",H),this.removeEventListener("touchend",U),a.removeElement(I)}}T.on("mousedown",$),T.on("touchstart",$)}function d(T,k,S,A){function D($){return S.l2r(a.constrain($,A._rl[0],A._rl[1]))}var M=D(A.p2d(A._pixelMin)),C=D(A.p2d(A._pixelMax));window.requestAnimationFrame(function(){e.call("_guiRelayout",k,S._name+".range",[M,C])})}function p(T,k,S,A,D,M){var C=u.handleWidth/2;function $(O){return a.constrain(O,0,A._width)}function F(O){return a.constrain(O,0,A._height)}function R(O){return a.constrain(O,-C,A._width+C)}var P=$(A.d2p(S._rl[0])),E=$(A.d2p(S._rl[1]));if(T.select("rect."+u.slideBoxClassName).attr("x",P).attr("width",E-P),T.select("rect."+u.maskMinClassName).attr("width",P),T.select("rect."+u.maskMaxClassName).attr("x",E).attr("width",A._width-E),M.rangemode!=="match"){var L=A._height-F(A.d2pOppAxis(D._rl[1])),z=A._height-F(A.d2pOppAxis(D._rl[0]));T.select("rect."+u.maskMinOppAxisClassName).attr("x",P).attr("height",L).attr("width",E-P),T.select("rect."+u.maskMaxOppAxisClassName).attr("x",P).attr("y",z).attr("height",A._height-z).attr("width",E-P),T.select("rect."+u.slideBoxClassName).attr("y",L).attr("height",z-L)}var I=.5,H=Math.round(R(P-C))-I,U=Math.round(R(E-C))+I;T.select("g."+u.grabberMinClassName).attr("transform",i(H,I)),T.select("g."+u.grabberMaxClassName).attr("transform",i(U,I))}function y(T,k,S,A){var D=a.ensureSingle(T,"rect",u.bgClassName,function(F){F.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),M=A.borderwidth%2===0?A.borderwidth:A.borderwidth-1,C=-A._offsetShift,$=n.crispRound(k,A.borderwidth);D.attr({width:A._width+M,height:A._height+M,transform:i(C,C),"stroke-width":$}).call(o.stroke,A.bordercolor).call(o.fill,A.bgcolor)}function m(T,k,S,A){var D=k._fullLayout,M=a.ensureSingleById(D._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 D=k.calcdata,M=T.selectAll("g."+u.rangePlotClassName).data(S._subplotsWith,a.identity);M.enter().append("g").attr("class",function($){return u.rangePlotClassName+" "+$}).call(n.setClipUrl,A._clipId,k),M.order(),M.exit().remove();var C;M.each(function($,F){var R=t.select(this),P=F===0,E=f.getFromId(k,$,"y"),L=E._name,z=A[L],I={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&&(I.layout.xaxis.rangebreaks=S.rangebreaks),I.layout[L]={type:E.type,domain:[0,1],range:z.rangemode!=="match"?z.range.slice():E.range.slice(),calendar:E.calendar},E.rangebreaks&&(I.layout[L].rangebreaks=E.rangebreaks),r.supplyDefaults(I);var H=I._fullLayout.xaxis,U=I._fullLayout[L];H.clearCalc(),H.setScale(),U.clearCalc(),U.setScale();var O={id:$,plotgroup:R,xaxis:H,yaxis:U,isRangePlot:!0};P?C=O:(O.mainplot="xy",O.mainplotinfo=C),s.rangePlot(k,O,w(D,$))})}function w(T,k){for(var S=[],A=0;A<T.length;A++){var D=T[A],M=D[0].trace;M.xaxis+M.yaxis===k&&S.push(D)}return S}function g(T,k,S,A,D){var M=a.ensureSingle(T,"rect",u.maskMinClassName,function(R){R.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(R){R.attr({y:0,"shape-rendering":"crispEdges"})});if(C.attr("height",A._height).call(o.fill,u.maskColor),D.rangemode!=="match"){var $=a.ensureSingle(T,"rect",u.maskMinOppAxisClassName,function(R){R.attr({y:0,"shape-rendering":"crispEdges"})});$.attr("width",A._width).call(o.fill,u.maskOppAxisColor);var F=a.ensureSingle(T,"rect",u.maskMaxOppAxisClassName,function(R){R.attr({y:0,"shape-rendering":"crispEdges"})});F.attr("width",A._width).style("border-top",u.maskOppBorder).call(o.fill,u.maskOppAxisColor)}}function x(T,k,S,A){if(!k._context.staticPlot){var D=a.ensureSingle(T,"rect",u.slideBoxClassName,function(M){M.attr({y:0,cursor:u.slideBoxCursor,"shape-rendering":"crispEdges"})});D.attr({height:A._height,fill:u.slideBoxFill})}}function _(T,k,S,A){var D=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"},$={y:Math.round(A._height/4),height:Math.round(A._height/2)},F=a.ensureSingle(D,"rect",u.handleMinClassName,function(z){z.attr(C)});F.attr($);var R=a.ensureSingle(M,"rect",u.handleMaxClassName,function(z){z.attr(C)});R.attr($);var P={width:u.grabAreaWidth,x:0,y:0,fill:u.grabAreaFill,cursor:k._context.staticPlot?void 0:u.grabAreaCursor},E=a.ensureSingle(D,"rect",u.grabAreaMinClassName,function(z){z.attr(P)});E.attr("height",A._height);var L=a.ensureSingle(M,"rect",u.grabAreaMaxClassName,function(z){z.attr(P)});L.attr("height",A._height)}return Lv}var xN=ve.exports,_N=Hp,wN=K2,Cv=Xc,TN={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:xN.extendFlat({},_N,{yaxis:wN})}}},layoutAttributes:Hp,handleDefaults:yN(),calcAutorange:gN(),draw:bN(),isVisible:Cv.isVisible,makeData:Cv.makeData,autoMarginOpts:Cv.autoMarginOpts},kN=dr,kb=hr,AN=At.templatedArray,MN=AN("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(" ")}),Zd={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:MN,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:kN({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:kb.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:kb.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"},ek={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10},kf=ve.exports,SN=rt.exports,LN=At,CN=Pa,tk=Zd,Kd=ek,DN=function(e,r,a,i,n){var o=e.rangeselector||{},l=LN.newContainer(r,"rangeselector");function s(h,d){return kf.coerce(o,l,tk,h,d)}var f=CN(o,l,{name:"buttons",handleItemDefaults:$N,calendar:n}),c=s("visible",f.length>0);if(c){var v=PN(r,a,i);s("x",v[0]),s("y",v[1]),kf.noneOrAll(e,r,["x","y"]),s("xanchor"),s("yanchor"),kf.coerceFont(s,"font",a.font);var u=s("bgcolor");s("activecolor",SN.contrast(u,Kd.lightAmount,Kd.darkAmount)),s("bordercolor"),s("borderwidth")}};function $N(t,e,r,a){var i=a.calendar;function n(s,f){return kf.coerce(t,e,tk.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 PN(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+Kd.yPad]}var RN=KA,EN=ve.exports.titleCase,zN=function(e,r){var a=e._name,i={};if(r.step==="all")i[a+".autorange"]=!0;else{var n=IN(e,r);i[a+".range[0]"]=n[0],i[a+".range[1]"]=n[1]}return i};function IN(t,e){var r=t.range,a=new Date(t.r2l(r[1])),i=e.step,n=RN["utc"+EN(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 tc=nt.exports,NN=Ze,FN=Ut.exports,Ab=rt.exports,rk=_t.exports,Ga=ve.exports,Mb=Ga.strTranslate,Af=nr,HN=Vt,Bp=Dr,Sb=Bp.LINE_SPACING,Lb=Bp.FROM_TL,Cb=Bp.FROM_BR,Qd=ek,ON=zN,BN=function(e){var r=e._fullLayout,a=r._infolayer.selectAll(".rangeselector").data(jN(e),GN);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(i){var n=tc.select(this),o=i,l=o.rangeselector,s=n.selectAll("g.button").data(Ga.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(f){var c=tc.select(this),v=ON(o,f);f._isActive=UN(o,f,v),c.call(Dv,l,f),c.call(XN,l,f,e),c.on("click",function(){e._dragged||NN.call("_guiRelayout",e,v)}),c.on("mouseover",function(){f._isHovered=!0,c.call(Dv,l,f)}),c.on("mouseout",function(){f._isHovered=!1,c.call(Dv,l,f)})}),YN(e,s,l,o._name,n)})};function jN(t){for(var e=HN.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 GN(t){return t._id}function UN(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 Dv(t,e,r){var a=Ga.ensureSingle(t,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});a.attr({rx:Qd.rx,ry:Qd.ry}),a.call(Ab.stroke,e.bordercolor).call(Ab.fill,VN(e,r)).style("stroke-width",e.borderwidth+"px")}function VN(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}function XN(t,e,r,a){function i(o){Af.convertToTspans(o,a)}var n=Ga.ensureSingle(t,"text","selector-text",function(o){o.attr("text-anchor","middle")});n.call(rk.font,e.font).text(WN(r,a._fullLayout._meta)).call(i)}function WN(t,e){return t.label?e?Ga.templateString(t.label,e):t.label:t.step==="all"?"all":t.count+t.step.charAt(0)}function YN(t,e,r,a,i){var n=0,o=0,l=r.borderwidth;e.each(function(){var h=tc.select(this),d=h.select(".selector-text"),p=r.font.size*Sb,y=Math.max(p*Af.lineCount(d),16)+3;o=Math.max(o,y)}),e.each(function(){var h=tc.select(this),d=h.select(".selector-rect"),p=h.select(".selector-text"),y=p.node()&&rk.bBox(p.node()).width,m=r.font.size*Sb,b=Af.lineCount(p),w=Math.max(y+10,Qd.minButtonWidth);h.attr("transform",Mb(l+n,l)),d.attr({x:0,y:0,width:w,height:o}),Af.positionText(p,w/2,o/2-(b-1)*m/2+3),n+=w+5});var s=t._fullLayout._size,f=s.l+s.w*r.x,c=s.t+s.h*(1-r.y),v="left";Ga.isRightAnchor(r)&&(f-=n,v="right"),Ga.isCenterAnchor(r)&&(f-=n/2,v="center");var u="top";Ga.isBottomAnchor(r)&&(c-=o,u="bottom"),Ga.isMiddleAnchor(r)&&(c-=o/2,u="middle"),n=Math.ceil(n),o=Math.ceil(o),f=Math.round(f),c=Math.round(c),FN.autoMargin(t,a+"-range-selector",{x:r.x,y:r.y,l:n*Lb[v],r:n*Cb[v],b:o*Cb[u],t:o*Lb[u]}),i.attr("transform",Mb(f,c))}var qN={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Zd}}},layoutAttributes:Zd,handleDefaults:DN,draw:BN},Ti={},Db=Ft.extendFlat;Ti.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:Db({},r,{description:["Sets the horizontal domain of this ",a,i,"(in plot fraction).",n].join("")}),y:Db({},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};Ti.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 ZN=ve.exports,KN=Ao.counter,QN=Ti.attributes,$b=wr.idRegex,JN=At,Jd={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:[KN("xy").toString(),""],editType:"plot"},editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[$b.x.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[$b.y.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:QN({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 rc(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 eF(t,e){var r=t.grid||{},a=rc(e,r,"x"),i=rc(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=JN.newContainer(e,"grid");function u(_,T){return ZN.coerce(r,v,Jd,_,T)}var h=u("rows",f),d=u("columns",c);if(!(h*d>1)){delete e.grid;return}if(!n&&!o&&!l){var p=u("pattern")==="independent";p&&(n=!0)}v._hasSubplotGrid=n;var y=u("roworder"),m=y==="top to bottom",b=n?.2:.1,w=n?.3:.1,g,x;s&&e._splomGridDflt&&(g=e._splomGridDflt.xside,x=e._splomGridDflt.yside),v._domains={x:Pb("x",u,b,g,d),y:Pb("y",u,w,x,h,m)}}function Pb(t,e,r,a,i,n){var o=e(t+"gap",r),l=e("domain."+t);e(t+"side",a);for(var s=new Array(i),f=l[0],c=(l[1]-f)/(i-o),v=c*(1-o),u=0;u<i;u++){var h=f+c*u;s[n?i-1-u:u]=[h,h+v]}return s}function tF(t,e){var r=e.grid;if(!(!r||!r._domains)){var a=t.grid||{},i=e._subplots,n=r._hasSubplotGrid,o=r.rows,l=r.columns,s=r.pattern==="independent",f,c,v,u,h,d,p,y=r._axisMap={};if(n){var m=a.subplots||[];d=r.subplots=new Array(o);var b=1;for(f=0;f<o;f++){var w=d[f]=new Array(l),g=m[f]||[];for(c=0;c<l;c++)if(s?(h=b===1?"xy":"x"+b+"y"+b,b++):h=g[c],w[c]="",i.cartesian.indexOf(h)!==-1){if(p=h.indexOf("y"),v=h.slice(0,p),u=h.slice(p),y[v]!==void 0&&y[v]!==c||y[u]!==void 0&&y[u]!==f)continue;w[c]=h,y[v]=c,y[u]=f}}}else{var x=rc(e,a,"x"),_=rc(e,a,"y");r.xaxes=Rb(x,i.xaxis,l,y,"x"),r.yaxes=Rb(_,i.yaxis,o,y,"y")}var T=r._anchors={},k=r.roworder==="top to bottom";for(var S in y){var A=S.charAt(0),D=r[A+"side"],M,C,$;if(D.length<8)T[S]="free";else if(A==="x"){if(D.charAt(0)==="t"===k?(M=0,C=1,$=o):(M=o-1,C=-1,$=-1),n){var F=y[S];for(f=M;f!==$;f+=C)if(h=d[f][F],!!h&&(p=h.indexOf("y"),h.slice(0,p)===S)){T[S]=h.slice(p);break}}else for(f=M;f!==$;f+=C)if(u=r.yaxes[f],i.cartesian.indexOf(S+u)!==-1){T[S]=u;break}}else if(D.charAt(0)==="l"?(M=0,C=1,$=l):(M=l-1,C=-1,$=-1),n){var R=y[S];for(f=M;f!==$;f+=C)if(h=d[R][f],!!h&&(p=h.indexOf("y"),h.slice(p)===S)){T[S]=h.slice(0,p);break}}else for(f=M;f!==$;f+=C)if(v=r.xaxes[f],i.cartesian.indexOf(v+S)!==-1){T[S]=v;break}}}}function Rb(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 rF={moduleType:"component",name:"grid",schema:{layout:{grid:Jd}},layoutAttributes:Jd,sizeDefaults:eF,contentDefaults:tF},ak={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(" ")}}},$v,Eb;function aF(){if(Eb)return $v;Eb=1;var t=ct,e=Ze,r=ve.exports,a=At,i=ak;return $v=function(n,o,l,s){var f="error_"+s.axis,c=a.newContainer(o,f),v=n[f]||{};function u(w,g){return r.coerce(v,c,i,w,g)}var h=v.array!==void 0||v.value!==void 0||v.type==="sqrt",d=u("visible",h);if(d!==!1){var p=u("type","array"in v?"data":"percent"),y=!0;p!=="sqrt"&&(y=u("symmetric",!((p==="data"?"arrayminus":"valueminus")in v))),p==="data"?(u("array"),u("traceref"),y||(u("arrayminus"),u("tracerefminus"))):(p==="percent"||p==="constant")&&(u("value"),y||u("valueminus"));var m="copy_"+s.inherit+"style";if(s.inherit){var b=o["error_"+s.inherit];(b||{}).visible&&u(m,!(v.color||t(v.thickness)||t(v.width)))}(!s.inherit||!c[m])&&(u("color",l),u("thickness"),u("width",e.traceIs(o,"gl3d")?0:4))}},$v}var Pv,zb;function ik(){if(zb)return Pv;zb=1,Pv=function(r){var a=r.type,i=r.symmetric;if(a==="data"){var n=r.array||[];if(i)return function(c,v){var u=+n[v];return[u,u]};var o=r.arrayminus||[];return function(c,v){var u=+n[v],h=+o[v];return!isNaN(u)||!isNaN(h)?[h||0,u||0]:[NaN,NaN]}}else{var l=t(a,r.value),s=t(a,r.valueminus);return i||r.valueminus===void 0?function(c){var v=l(c);return[v,v]}:function(c){return[s(c),l(c)]}}};function t(e,r){if(e==="percent")return function(a){return Math.abs(a*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(a){return Math.sqrt(Math.abs(a))}}return Pv}var Rv,Ib;function iF(){if(Ib)return Rv;Ib=1;var t=ct,e=Ze,r=Mt.exports,a=ve.exports,i=ik();Rv=function(l){for(var s=l.calcdata,f=0;f<s.length;f++){var c=s[f],v=c[0].trace;if(v.visible===!0&&e.traceIs(v,"errorBarsOK")){var u=r.getFromId(l,v.xaxis),h=r.getFromId(l,v.yaxis);n(c,v,u,"x"),n(c,v,h,"y")}}};function n(o,l,s,f){var c=l["error_"+f]||{},v=c.visible&&["linear","log"].indexOf(s.type)!==-1,u=[];if(!!v){for(var h=i(c),d=0;d<o.length;d++){var p=o[d],y=p.i;if(y===void 0)y=d;else if(y===null)continue;var m=p[f];if(!!t(s.c2l(m))){var b=h(m,y);if(t(b[0])&&t(b[1])){var w=p[f+"s"]=m-b[0],g=p[f+"h"]=m+b[1];u.push(w,g)}}}var x=s._id,_=l._extremes[x],T=r.findExtremes(s,u,a.extendFlat({tozero:_.opts.tozero},{padded:!0}));_.min=_.min.concat(T.min),_.max=_.max.concat(T.max)}}return Rv}var Ev,Nb;function nF(){if(Nb)return Ev;Nb=1;var t=nt.exports,e=ct,r=_t.exports,a=pr;Ev=function(o,l,s,f){var c,v=s.xaxis,u=s.yaxis,h=f&&f.duration>0;l.each(function(d){var p=d[0].trace,y=p.error_x||{},m=p.error_y||{},b;p.ids&&(b=function(_){return _.id});var w=a.hasMarkers(p)&&p.marker.maxdisplayed>0;!m.visible&&!y.visible&&(d=[]);var g=t.select(this).selectAll("g.errorbar").data(d,b);if(g.exit().remove(),!!d.length){y.visible||g.selectAll("path.xerror").remove(),m.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var x=g.enter().append("g").classed("errorbar",!0);h&&x.style("opacity",0).transition().duration(f.duration).style("opacity",1),r.setClipUrl(g,s.layerClipId,o),g.each(function(_){var T=t.select(this),k=i(_,v,u);if(!(w&&!_.vis)){var S,A=T.select("path.yerror");if(m.visible&&e(k.x)&&e(k.yh)&&e(k.ys)){var D=m.width;S="M"+(k.x-D)+","+k.yh+"h"+2*D+"m-"+D+",0V"+k.ys,k.noYS||(S+="m-"+D+",0h"+2*D),c=!A.size(),c?A=T.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0):h&&(A=A.transition().duration(f.duration).ease(f.easing)),A.attr("d",S)}else A.remove();var M=T.select("path.xerror");if(y.visible&&e(k.y)&&e(k.xh)&&e(k.xs)){var C=(y.copy_ystyle?m:y).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):h&&(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 Ev}var zv,Fb;function oF(){if(Fb)return zv;Fb=1;var t=nt.exports,e=rt.exports;return zv=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)})},zv}var xl=ve.exports,Hb=Xa.overrideAll,_l=ak,Xi={error_x:xl.extendFlat({},_l),error_y:xl.extendFlat({},_l)};delete Xi.error_x.copy_zstyle;delete Xi.error_y.copy_zstyle;delete Xi.error_y.copy_ystyle;var is={error_x:xl.extendFlat({},_l),error_y:xl.extendFlat({},_l),error_z:xl.extendFlat({},_l)};delete is.error_x.copy_ystyle;delete is.error_y.copy_ystyle;delete is.error_z.copy_ystyle;delete is.error_z.copy_zstyle;var lF={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Xi,bar:Xi,histogram:Xi,scatter3d:Hb(is,"calc","nested"),scattergl:Hb(Xi,"calc","nested")}},supplyDefaults:aF(),calc:iF(),makeComputeError:ik(),plot:nF(),style:oF(),hoverInfo:sF};function sF(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 fF={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"}},oi=nt.exports,Iv=Jr.exports,Mf=Ut.exports,Ob=Ze,Na=Mt.exports,Ks=ba.exports,Zr=ve.exports,la=Zr.strTranslate,nk=Ft.extendFlat,Nv=wi,ia=_t.exports,Fv=rt.exports,cF=kc,uF=nr,vF=ga.flipScale,dF=m2,hF=y2,pF=Wa,jp=Dr,Bb=jp.LINE_SPACING,jb=jp.FROM_TL,Gb=jp.FROM_BR,Et=fF.cn;function mF(t){var e=t._fullLayout,r=e._infolayer.selectAll("g."+Et.colorbar).data(yF(t),function(a){return a._id});r.enter().append("g").attr("class",function(a){return a._id}).classed(Et.colorbar,!0),r.each(function(a){var i=oi.select(this);Zr.ensureSingle(i,"rect",Et.cbbg),Zr.ensureSingle(i,"g",Et.cbfills),Zr.ensureSingle(i,"g",Et.cblines),Zr.ensureSingle(i,"g",Et.cbaxis,function(o){o.classed(Et.crisp,!0)}),Zr.ensureSingle(i,"g",Et.cbtitleunshift,function(o){o.append("g").classed(Et.cbtitle,!0)}),Zr.ensureSingle(i,"rect",Et.cboutline);var n=gF(i,a,t);n&&n.then&&(t._promises||[]).push(n),t._context.edits.colorbarPosition&&bF(i,a,t)}),r.exit().each(function(a){Mf.autoMargin(t,a._id)}).remove(),r.order()}function yF(t){var e=t._fullLayout,r=t.calcdata,a=[],i,n,o,l;function s(w){return nk(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?vF(n.colorscale):n.colorscale,i._zrange=[n[l.min],n[l.max]])}for(var c=0;c<r.length;c++){var v=r[c];o=v[0].trace;var u=o._module.colorbar;if(o.visible===!0&&u)for(var h=Array.isArray(u),d=h?u:[u],p=0;p<d.length;p++){l=d[p];var y=l.container;n=y?o[y]:o,n&&n.showscale&&(i=s(n.colorbar),i._id="cb"+o.uid+(h&&y?"-"+y:""),i._traceIndex=o.index,i._propPrefix=(y?y+".":"")+"colorbar.",i._meta=o._meta,f(),a.push(i))}}for(var m in e._colorAxes)if(n=e[m],n.showscale){var b=e._colorAxes[m];i=s(n.colorbar),i._id="cb"+m,i._propPrefix=m+".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 gF(t,e,r){var a=e.orientation==="v",i=e.len,n=e.lenmode,o=e.thickness,l=e.thicknessmode,s=e.outlinewidth,f=e.borderwidth,c=e.bgcolor,v=e.xanchor,u=e.yanchor,h=e.xpad,d=e.ypad,p=e.x,y=a?e.y:1-e.y,m=r._fullLayout,b=m._size,w=e._fillcolor,g=e._line,x=e.title,_=x.side,T=e._zrange||oi.extent((typeof w=="function"?w:g.color).domain()),k=typeof g.color=="function"?g.color:function(){return g.color},S=typeof w=="function"?w:function(){return w},A=e._levels,D=xF(r,e,T),M=D.fill,C=D.line,$=Math.round(o*(l==="fraction"?a?b.w:b.h:1)),F=$/(a?b.w:b.h),R=Math.round(i*(n==="fraction"?a?b.h:b.w:1)),P=R/(a?b.h:b.w),E=Math.round(a?p*b.w+h:y*b.h+d),L={center:.5,right:1}[v]||0,z={top:1,middle:.5}[u]||0,I=a?p-L*F:y-z*F,H=a?y-z*P:p-L*P,U=Math.round(a?b.h*(1-H):b.w*H);e._lenFrac=P,e._thickFrac=F,e._uFrac=I,e._vFrac=H;var O=e._axis=_F(r,e,T);O.position=F+(a?p+h/b.w:y+d/b.h);var X=["top","bottom"].indexOf(_)!==-1;if(a&&X&&(O.title.side=_,O.titlex=p+h/b.w,O.titley=H+(x.side==="top"?P-d/b.h:d/b.h)),!a&&!X&&(O.title.side=_,O.titley=y+d/b.h,O.titlex=H+h/b.w),g.color&&e.tickmode==="auto"){O.tickmode="linear",O.tick0=A.start;var B=A.size,Y=Zr.constrain(R/50,4,15)+1,Z=(T[1]-T[0])/((e.nticks||Y)*B);if(Z>1){var q=Math.pow(10,Math.floor(Math.log(Z)/Math.LN10));B*=q*Zr.roundUp(Z/q,[2,5,10]),(Math.abs(A.start)/A.size+1e-6)%1<2e-6&&(O.tick0=0)}O.dtick=B}O.domain=a?[H+d/b.h,H+P-d/b.h]:[H+h/b.w,H+P-h/b.w],O.setScale(),t.attr("transform",la(Math.round(b.l),Math.round(b.t)));var W=t.select("."+Et.cbtitleunshift).attr("transform",la(-Math.round(b.l),-Math.round(b.t))),ae=O.ticklabelposition,ne=O.title.font.size,de=t.select("."+Et.cbaxis),le,oe=0,ue=0;function Se(J,_e){var pe={propContainer:O,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:m._dfltTitle.colorbar,containerGroup:t.select("."+Et.cbtitle)},Le=J.charAt(0)==="h"?J.substr(1):"h"+J;t.selectAll("."+Le+",."+Le+"-math-group").remove(),cF.draw(r,J,nk(pe,_e||{}))}function he(){if(a&&X||!a&&!X){var J,_e;_==="top"&&(J=h+b.l+b.w*p,_e=d+b.t+b.h*(1-H-P)+3+ne*.75),_==="bottom"&&(J=h+b.l+b.w*p,_e=d+b.t+b.h*(1-H)-3-ne*.25),_==="right"&&(_e=d+b.t+b.h*y+3+ne*.75,J=h+b.l+b.w*H),Se(O._id+"title",{attributes:{x:J,y:_e,"text-anchor":a?"start":"middle"}})}}function ye(){if(a&&!X||!a&&X){var J=O.position||0,_e=O._offset+O._length/2,pe,Le;if(_==="right")Le=_e,pe=b.l+b.w*J+10+ne*(O.showticklabels?1:.5);else if(pe=_e,_==="bottom"&&(Le=b.t+b.h*J+10+(ae.indexOf("inside")===-1?O.tickfont.size:0)+(O.ticks!=="intside"&&e.ticklen||0)),_==="top"){var Ie=x.text.split("<br>").length;Le=b.t+b.h*J+10-$-Bb*ne*Ie}Se((a?"h":"v")+O._id+"title",{avoid:{selection:oi.select(r).selectAll("g."+O._id+"tick"),side:_,offsetTop:a?0:b.t,offsetLeft:a?b.l:0,maxShift:a?m.width:m.height},attributes:{x:pe,y:Le,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function ke(){if(!a&&!X||a&&X){var J=t.select("."+Et.cbtitle),_e=J.select("text"),pe=[-s/2,s/2],Le=J.select(".h"+O._id+"title-math-group").node(),Ie=15.6;_e.node()&&(Ie=parseInt(_e.node().style.fontSize,10)*Bb);var Pe;if(Le?(Pe=ia.bBox(Le),ue=Pe.width,oe=Pe.height,oe>Ie&&(pe[1]-=(oe-Ie)/2)):_e.node()&&!_e.classed(Et.jsPlaceholder)&&(Pe=ia.bBox(_e.node()),ue=Pe.width,oe=Pe.height),a){if(oe){if(oe+=5,_==="top")O.domain[1]-=oe/b.h,pe[1]*=-1;else{O.domain[0]+=oe/b.h;var Be=uF.lineCount(_e);pe[1]+=(1-Be)*Ie}J.attr("transform",la(pe[0],pe[1])),O.setScale()}}else ue&&(_==="right"&&(O.domain[0]+=(ue+ne/2)/b.w),J.attr("transform",la(pe[0],pe[1])),O.setScale())}t.selectAll("."+Et.cbfills+",."+Et.cblines).attr("transform",a?la(0,Math.round(b.h*(1-O.domain[1]))):la(Math.round(b.w*O.domain[0]),0)),de.attr("transform",a?la(0,Math.round(-b.t)):la(Math.round(-b.l),0));var re=t.select("."+Et.cbfills).selectAll("rect."+Et.cbfill).attr("style","").data(M);re.enter().append("rect").classed(Et.cbfill,!0).style("stroke","none"),re.exit().remove();var De=T.map(O.c2p).map(Math.round).sort(function(we,xe){return we-xe});re.each(function(we,xe){var be=[xe===0?T[0]:(M[xe]+M[xe-1])/2,xe===M.length-1?T[1]:(M[xe]+M[xe+1])/2].map(O.c2p).map(Math.round);a&&(be[1]=Zr.constrain(be[1]+(be[1]>be[0])?1:-1,De[0],De[1]));var ze=oi.select(this).attr(a?"x":"y",E).attr(a?"y":"x",oi.min(be)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(oi.max(be)-oi.min(be),2));if(e._fillgradient)ia.gradient(ze,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var Ne=S(we).replace("e-","");ze.attr("fill",Iv(Ne).toHexString())}});var Ce=t.select("."+Et.cblines).selectAll("path."+Et.cbline).data(g.color&&g.width?C:[]);Ce.enter().append("path").classed(Et.cbline,!0),Ce.exit().remove(),Ce.each(function(we){var xe=E,be=Math.round(O.c2p(we))+g.width/2%1;oi.select(this).attr("d","M"+(a?xe+","+be:be+","+xe)+(a?"h":"v")+$).call(ia.lineGroupStyle,g.width,k(we),g.dash)}),de.selectAll("g."+O._id+"tick,path").remove();var se=E+$+(s||0)/2-(e.ticks==="outside"?1:0),ce=Na.calcTicks(O),Re=Na.getTickSigns(O)[2];return Na.drawTicks(r,O,{vals:O.ticks==="inside"?Na.clipEnds(O,ce):ce,layer:de,path:Na.makeTickPath(O,se,Re),transFn:Na.makeTransTickFn(O)}),Na.drawLabels(r,O,{vals:ce,layer:de,transFn:Na.makeTransTickLabelFn(O),labelFns:Na.makeLabelFns(O,se)})}function te(){var J,_e=$+s/2;ae.indexOf("inside")===-1&&(J=ia.bBox(de.node()),_e+=a?J.width:J.height),le=W.select("text");var pe=0,Le=a&&_==="top",Ie=!a&&_==="right",Pe=0;if(le.node()&&!le.classed(Et.jsPlaceholder)){var Be,re=W.select(".h"+O._id+"title-math-group").node();re&&(a&&X||!a&&!X)?(J=ia.bBox(re),pe=J.width,Be=J.height):(J=ia.bBox(W.node()),pe=J.right-b.l-(a?E:U),Be=J.bottom-b.t-(a?U:E),!a&&_==="top"&&(_e+=J.height,Pe=J.height)),Ie&&(le.attr("transform",la(pe/2+ne/2,0)),pe*=2),_e=Math.max(_e,a?pe:Be)}var De=(a?h:d)*2+_e+f+s/2,Ce=0;!a&&x.text&&u==="bottom"&&y<=0&&(Ce=De/2,De+=Ce,Pe+=Ce),m._hColorbarMoveTitle=Ce,m._hColorbarMoveCBTitle=Pe;var se=f+s;t.select("."+Et.cbbg).attr("x",(a?E:U)-se/2-(a?h:0)).attr("y",(a?U:E)-(a?R:d+Pe-Ce)).attr(a?"width":"height",Math.max(De-Ce,2)).attr(a?"height":"width",Math.max(R+se,2)).call(Fv.fill,c).call(Fv.stroke,e.bordercolor).style("stroke-width",f);var ce=Ie?Math.max(pe-10,0):0;if(t.selectAll("."+Et.cboutline).attr("x",(a?E:U+h)+ce).attr("y",(a?U+d-R:E)+(Le?oe:0)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(R-(a?2*d+oe:2*h+ce),2)).call(Fv.stroke,e.outlinecolor).style({fill:"none","stroke-width":s}),t.attr("transform",la(b.l-(a?L*De:0),b.t-(a?0:(1-z)*De-Pe))),!a&&(f||Iv(c).getAlpha()&&!Iv.equals(m.paper_bgcolor,c))){var Re=de.selectAll("text"),we=Re[0].length,xe=t.select("."+Et.cbbg).node(),be=ia.bBox(xe),ze=ia.getTranslate(t),Ne=2;Re.each(function(N,j){var G=0,V=we-1;if(j===G||j===V){var K=ia.bBox(this),Q=ia.getTranslate(this),me;if(j===V){var ge=K.right+Q.x,fe=be.right+ze.x+U-f-Ne+p;me=fe-ge,me>0&&(me=0)}else if(j===G){var ie=K.left+Q.x,Te=be.left+ze.x+U+f+Ne;me=Te-ie,me<0&&(me=0)}me&&(we<3?this.setAttribute("transform","translate("+me+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var He={},Ae=jb[v],Fe=Gb[v],Ge=jb[u],Oe=Gb[u],We=De-$;a?(n==="pixels"?(He.y=y,He.t=R*Ge,He.b=R*Oe):(He.t=He.b=0,He.yt=y+i*Ge,He.yb=y-i*Oe),l==="pixels"?(He.x=p,He.l=De*Ae,He.r=De*Fe):(He.l=We*Ae,He.r=We*Fe,He.xl=p-o*Ae,He.xr=p+o*Fe)):(n==="pixels"?(He.x=p,He.l=R*Ae,He.r=R*Fe):(He.l=He.r=0,He.xl=p+i*Ae,He.xr=p-i*Fe),l==="pixels"?(He.y=1-y,He.t=De*Ge,He.b=De*Oe):(He.t=We*Ge,He.b=We*Oe,He.yt=y-o*Ge,He.yb=y+o*Oe)),Mf.autoMargin(r,e._id,He)}return Zr.syncOrAsync([Mf.previousPromises,he,ke,ye,Mf.previousPromises,te],r)}function bF(t,e,r){var a=e.orientation==="v",i=r._fullLayout,n=i._size,o,l,s;Ks.init({element:t.node(),gd:r,prepFn:function(){o=t.attr("transform"),Nv(t)},moveFn:function(f,c){t.attr("transform",o+la(f,c)),l=Ks.align((a?e._uFrac:e._vFrac)+f/n.w,a?e._thickFrac:e._lenFrac,0,1,e.xanchor),s=Ks.align((a?e._vFrac:1-e._uFrac)-c/n.h,a?e._lenFrac:e._thickFrac,0,1,e.yanchor);var v=Ks.getCursor(l,s,e.xanchor,e.yanchor);Nv(t,v)},doneFn:function(){if(Nv(t),l!==void 0&&s!==void 0){var f={};f[e._propPrefix+"x"]=l,f[e._propPrefix+"y"]=s,e._traceIndex!==void 0?Ob.call("_guiRestyle",r,f,e._traceIndex):Ob.call("_guiRelayout",r,f)}}})}function xF(t,e,r){var a=e._levels,i=[],n=[],o,l,s=a.end+a.size/100,f=a.size,c=1.001*r[0]-.001*r[1],v=1.001*r[1]-.001*r[0];for(l=0;l<1e5&&(o=a.start+l*f,!(f>0?o>=s:o<=s));l++)o>c&&o<v&&i.push(o);if(e._fillgradient)n=[0];else if(typeof e._fillcolor=="function"){var u=e._filllevels;if(u)for(s=u.end+u.size/100,f=u.size,l=0;l<1e5&&(o=u.start+l*f,!(f>0?o>=s:o<=s));l++)o>r[0]&&o<r[1]&&n.push(o);else n=i.map(function(h){return h-a.size/2}),n.push(n[n.length-1]+a.size)}else e._fillcolor&&typeof e._fillcolor=="string"&&(n=[0]);return a.size<0&&(i.reverse(),n.reverse()),{line:i,fill:n}}function _F(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 Zr.coerce(n,l,pF,c,v)}return dF(n,l,f,s,a),hF(n,l,f,s),l}var wF={draw:mF},TF={moduleType:"component",name:"colorbar",attributes:Rh,supplyDefaults:U_,draw:wF.draw,hasColorbar:z_},kF={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"}},AF={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}},MF=Ze,ok=ve.exports,Hv=ok.extendFlat,Ub=ok.extendDeep;function Vb(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 SF(t){var e=["xaxis","yaxis","zaxis"];return e.indexOf(t.slice(0,5))>-1}var lk=function(e,r){var a,i=e.data,n=e.layout,o=Ub([],i),l=Ub({},n,Vb(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++)SF(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),MF.traceIs(c,"pie-like")&&(c.textposition="none")}}if(Array.isArray(r.annotations))for(a=0;a<r.annotations.length;a++)l.annotations.push(r.annotations[a]);var v=Object.keys(l).filter(function(y){return y.match(/^scene\d*$/)});if(v.length){var u={};for(r.tileClass==="thumbnail"&&(u={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),a=0;a<v.length;a++){var h=l[v[a]];h.xaxis||(h.xaxis={}),h.yaxis||(h.yaxis={}),h.zaxis||(h.zaxis={}),Hv(h.xaxis,u),Hv(h.yaxis,u),Hv(h.zaxis,u),h._scene=null}}var d=document.createElement("div");r.tileClass&&(d.className=r.tileClass);var p={gd:d,td:d,layout:l,data:o,config:{staticPlot:r.staticPlot===void 0?!0:r.staticPlot,plotGlPixelRatio:r.plotGlPixelRatio===void 0?2:r.plotGlPixelRatio,displaylogo:r.displaylogo||!1,showLink:r.showLink||!1,showTips:r.showTips||!1,mapboxAccessToken:s.mapboxAccessToken}};return r.setBackground!=="transparent"&&(p.config.setBackground=r.setBackground||"opaque"),p.gd.defaultLayout=Vb(r.tileClass),p},LF=vh.exports.EventEmitter,CF=Ze,DF=ve.exports,Xb=gr,$F=lk,PF=Ap,RF=Mp;function EF(t,e){var r=new LF,a=$F(t,{format:"png"}),i=a.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function n(){var l=Xb.getDelay(i._fullLayout);setTimeout(function(){var s=PF(i),f=document.createElement("canvas");f.id=DF.randstr(),r=RF({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=Xb.getRedrawFunc(i);return CF.call("_doPlot",i,a.data,a.layout,a.config).then(o).then(n).catch(function(l){r.emit("error",l)}),r}var zF=EF,Wb=gr,IF={getDelay:Wb.getDelay,getRedrawFunc:Wb.getRedrawFunc,clone:lk,toSVG:Ap,svgToImg:Mp,toImage:zF,downloadImage:VT},NF=IF;(function(t){t.version=cc.version;for(var e=Ze,r=t.register=e.register,a=zt,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(JE),r([ez,pa,Mz,Uz,ts,aI,mI,BI,dN,TN,qN,rF,lF,uo,TF,nT]),r([kF,AF]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(r(window.PlotlyLocales),delete window.PlotlyLocales),t.Icons=rp;var l=pa,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=NF,t.PlotSchema=Co})(S1);(function(t){t.exports=S1})(M1);const LO=gi(M1.exports);var sk={exports:{}},ns={TEXTPAD:3,eventDataKeys:["value","label"]},Xt=gn,Yb=Do.axisHoverFormat,FF=$r.hovertemplateAttrs,HF=$r.texttemplateAttrs,fk=dn,OF=dr,qb=ns,BF=ma.pattern,Wi=Ft.extendFlat,Ov=OF({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),jF=Xt.marker,GF=jF.line,UF=Wi({},GF.width,{dflt:0}),VF=Wi({width:UF,editType:"calc"},fk("marker.line")),XF=Wi({line:VF,editType:"calc"},fk("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:BF}),os={x:Xt.x,x0:Xt.x0,dx:Xt.dx,y:Xt.y,y0:Xt.y0,dy:Xt.dy,xperiod:Xt.xperiod,yperiod:Xt.yperiod,xperiod0:Xt.xperiod0,yperiod0:Xt.yperiod0,xperiodalignment:Xt.xperiodalignment,yperiodalignment:Xt.yperiodalignment,xhoverformat:Yb("x"),yhoverformat:Yb("y"),text:Xt.text,texttemplate:HF({editType:"plot"},{keys:qb.eventDataKeys}),hovertext:Xt.hovertext,hovertemplate:FF({},{keys:qb.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:Wi({},Ov,{description:"Sets the font used for `text`."}),insidetextfont:Wi({},Ov,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:Wi({},Ov,{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:Wi({},Xt.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:XF,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:Xt.selected.marker.opacity,color:Xt.selected.marker.color,editType:"style"},textfont:Xt.selected.textfont,editType:"style"},unselected:{marker:{opacity:Xt.unselected.marker.opacity,color:Xt.unselected.marker.color,editType:"style"},textfont:Xt.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"],description:"Renamed to `orientation`."}}},Gp={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *relative*, the bars are stacked on top of one another,","with negative values below the axis, positive values above","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Sets the normalization for bar traces on the graph.","With *fraction*, the value of each bar is divided by the sum of all","values at that location coordinate.","*percent* is the same but multiplied by 100 to show percentages."].join(" ")},bargap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")}},WF=rt.exports,Zb=ga.hasColorscale,Kb=Kl,YF=ve.exports.coercePattern,ck=function(e,r,a,i,n){var o=a("marker.color",i),l=Zb(e,"marker");l&&Kb(e,r,n,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",WF.defaultLine),Zb(e,"marker.line")&&Kb(e,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),YF(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")},xo=ve.exports,Qb=rt.exports,qF=Ze,ZF=Lp,KF=jc,QF=ck,JF=qa.getAxisGroup,uk=os,Qs=xo.coerceFont;function e4(t,e,r,a){function i(f,c){return xo.coerce(t,e,uk,f,c)}var n=ZF(t,e,a,i);if(!n){e.visible=!1;return}KF(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");dk(t,e,a,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),QF(t,e,i,r,a);var l=(e.marker.line||{}).color,s=qF.getComponentMethod("errorbars","supplyDefaults");s(t,e,l||Qb.defaultLine,{axis:"y"}),s(t,e,l||Qb.defaultLine,{axis:"x",inherit:"y"}),xo.coerceSelectionMarkerOpacity(e,i)}function vk(t,e,r,a){var i=e.orientation,n=e[{v:"x",h:"y"}[i]+"axis"],o=JF(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,h=u[v];v&&(h||(h=u[v]={offsetIndex:Object.keys(u).length}),e._offsetIndex=h.offsetIndex)}function t4(t,e){var r,a;function i(o){return xo.coerce(a._input,a,uk,o)}if(e.barmode==="group")for(var n=0;n<t.length;n++)a=t[n],a.type==="bar"&&(r=a._input,vk(r,a,e,i))}function dk(t,e,r,a,i,n){n=n||{};var o=n.moduleHasSelected!==!1,l=n.moduleHasUnselected!==!1,s=n.moduleHasConstrain!==!1,f=n.moduleHasCliponaxis!==!1,c=n.moduleHasTextangle!==!1,v=n.moduleHasInsideanchor!==!1,u=!!n.hasPathbar,h=Array.isArray(i)||i==="auto",d=h||i==="inside",p=h||i==="outside";if(d||p){var y=Qs(a,"textfont",r.font),m=xo.extendFlat({},y),b=t.textfont&&t.textfont.color,w=!b;if(w&&delete m.color,Qs(a,"insidetextfont",m),u){var g=xo.extendFlat({},y);w&&delete g.color,Qs(a,"pathbar.textfont",g)}p&&Qs(a,"outsidetextfont",y),o&&a("selected.textfont.color"),l&&a("unselected.textfont.color"),s&&a("constraintext"),f&&a("cliponaxis"),c&&a("textangle"),a("texttemplate")}d&&v&&a("insidetextanchor")}var _o={supplyDefaults:e4,crossTraceDefaults:t4,handleGroupingDefaults:vk,handleText:dk},r4=Ze,a4=Mt.exports,i4=ve.exports,n4=Gp,hk=function(t,e,r){function a(h,d){return i4.coerce(t,e,n4,h,d)}for(var i=!1,n=!1,o=!1,l={},s=a("barmode"),f=0;f<r.length;f++){var c=r[f];if(r4.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=a4.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")},Nn=ve.exports,Up=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;Nn.mergeArray(r.text,e,"tx"),Nn.mergeArray(r.hovertext,e,"htx");var i=r.marker;if(i){Nn.mergeArray(i.opacity,e,"mo",!0),Nn.mergeArray(i.color,e,"mc");var n=i.line;n&&(Nn.mergeArray(n.color,e,"mlc"),Nn.mergeArrayCastPositive(n.width,e,"mlw"))}},Jb=Mt.exports,ex=Gc,tx=ga.hasColorscale,rx=Eh,o4=Up,l4=n2,s4=function(e,r){var a=Jb.getFromId(e,r.xaxis||"x"),i=Jb.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=ex(r,i,"y",l),f=!!r.yperiodalignment,c="y"):(n=i.makeCalcdata(r,"y",v),l=a.makeCalcdata(r,"x"),s=ex(r,a,"x",l),f=!!r.xperiodalignment,c="x"),o=s.vals;for(var u=Math.min(o.length,n.length),h=new Array(u),d=0;d<u;d++)h[d]={p:o[d],s:n[d]},f&&(h[d].orig_p=l[d],h[d][c+"End"]=s.ends[d],h[d][c+"Start"]=s.starts[d]),r.ids&&(h[d].id=String(r.ids[d]));return tx(r,"marker")&&rx(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),tx(r,"marker.line")&&rx(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),o4(h,r),l4(h,r),h},f4=Wc,c4=ve.exports.distinctVals,u4=Ot.BADNUM;function Wc(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!==u4&&a.push(l.p)}n[0]&&n[0].width1&&(r=Math.min(n[0].width1,r))}this.positions=a;var s=c4(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={}}Wc.prototype.put=function(e,r){var a=this.getLabel(e,r),i=this.bins[a]||0;return this.bins[a]=i+r,i};Wc.prototype.get=function(e,r){var a=this.getLabel(e,r);return this.bins[a]||0};Wc.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 yi=ct,eh=ve.exports.isArrayOrTypedArray,wo=Ot.BADNUM,v4=Ze,Bl=Mt.exports,d4=qa.getAxisGroup,Yc=f4;function h4(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&&v4.traceIs(c,"bar")&&c.xaxis===r._id&&c.yaxis===a._id&&(c.orientation==="h"?l.push(o[f]):s.push(o[f]),c._computePh))for(var v=t.calcdata[f],u=0;u<v.length;u++)typeof v[u].ph0=="function"&&(v[u].ph0=v[u].ph0()),typeof v[u].ph1=="function"&&(v[u].ph1=v[u].ph1())}var h={xCat:r.type==="category"||r.type==="multicategory",yCat:a.type==="category"||a.type==="multicategory",mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};th(t,r,a,s,h),th(t,a,r,l,h)}function th(t,e,r,a,i){if(!!a.length){var n,o,l,s,f;switch(p4(r,a),i.mode){case"overlay":Bv(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&&m4(t,e,r,o,i),n.length&&Bv(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&&y4(t,e,r,o,i),n.length&&Bv(e,r,n,i);break}_4(a,e)}}function p4(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(eh(o)){for(a=0;a<Math.min(o.length,i.length);a++)l=f(o[a],0,s),yi(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=yi(l);for(l=c?l:0,a=0;a<i.length;a++)i[a].b=l,c&&(i[a].hasB=1)}}}function Bv(t,e,r,a){for(var i=0;i<r.length;i++){var n=r[i],o=new Yc([n],{posAxis:t,sepNegVal:!1,overlapNoMerge:!a.norm});pk(t,o,a),a.norm?(xk(o),Vp(e,o,a)):bk(e,o)}}function m4(t,e,r,a,i){var n=new Yc(a,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});g4(t,e,n,i),x4(n,e),i.norm?(xk(n),Vp(r,n,i)):bk(r,n)}function y4(t,e,r,a,i){var n=new Yc(a,{posAxis:e,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});pk(e,n,i),b4(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!==wo){var c=f.b+f.s===n.get(f.p,f.s);c&&(f._outmost=!0)}}i.norm&&Vp(r,n,i)}function pk(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,mk(e),yk(t,e),gk(t,e)}function g4(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=d4(i,e._id)+s[0][0].trace.orientation,h=i._alignmentOpts[u]||{},d=0;d<f;d++){var p=s[d],y=p[0].trace,m=h[y.alignmentgroup]||{},b=Object.keys(m.offsetGroups||{}).length,w;b?w=v/b:w=c?v/f:v;var g=w*(1-(a.groupgap||0)),x;b?x=((2*y._offsetIndex+1-b)*w-g)/2:x=c?((2*d+1-f)*w-g)/2:-g/2;var _=p[0].t;_.barwidth=g,_.poffset=x,_.bargroupwidth=v,_.bardelta=l}r.binWidth=s[0][0].t.barwidth/100,mk(r),yk(e,r),gk(e,r,c)}function mk(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(eh(s)){for(c=Array.prototype.slice.call(s,0,i.length),a=0;a<c.length;a++)yi(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(eh(v)){var h=Array.prototype.slice.call(v,0,i.length);for(a=0;a<h.length;a++)yi(h[a])||(h[a]=u);for(a=h.length;a<i.length;a++)h.push(u);if(l.barwidth=h,s===void 0){for(c=[],a=0;a<i.length;a++)c.push(f+(u-h[a])/2);l.poffset=c}}else v!==void 0&&(l.barwidth=v,s===void 0&&(l.poffset=f+(u-v)/2))}}function yk(t,e){for(var r=e.traces,a=ls(t),i=0;i<r.length;i++)for(var n=r[i],o=n[0].t,l=o.poffset,s=Array.isArray(l),f=o.barwidth,c=Array.isArray(f),v=0;v<n.length;v++){var u=n[v],h=u.w=c?f[v]:f;u[a]=u.p+(s?l[v]:l)+h/2}}function gk(t,e,r){var a=e.traces,i=e.minDiff,n=i/2;Bl.minDtick(t,e.minDiff,e.distinctPositions[0],r);for(var o=0;o<a.length;o++){var l=a[o],s=l[0],f=s.trace,c=[],v,u,h,d;for(d=0;d<l.length;d++)v=l[d],u=v.p-n,h=v.p+n,c.push(u,h);if(f.width||f.offset){var p=s.t,y=p.poffset,m=p.barwidth,b=Array.isArray(y),w=Array.isArray(m);for(d=0;d<l.length;d++){v=l[d];var g=b?y[d]:y,x=w?m[d]:m;u=v.p+g,h=u+x,c.push(u,h)}}f._extremes[t._id]=Bl.findExtremes(t,c,{padded:!1})}}function bk(t,e){for(var r=e.traces,a=ls(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]=Bl.findExtremes(t,l,{tozero:s,padded:!0})}}function b4(t,e,r){var a=ls(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!==wo&&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!==wo){var u;l?u=c.s:u=c.s+c.b;var h=e.put(c.p,u),d=h+u;c.b=h,c[a]=d,r.norm||(v.push(d),c.hasB&&v.push(h))}r.norm||(o._extremes[t._id]=Bl.findExtremes(t,v,{tozero:!0,padded:!0}))}}function xk(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!==wo&&t.put(n.p,n.b+n.s)}}function x4(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 Yc([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<i.length;l++){var s=i[l];if(s.p!==wo){var f=o.put(s.p,s.b+s.s);f&&(s.b=f)}}}}function Vp(t,e,r){var a=e.traces,i=ls(t),n=r.norm==="fraction"?1:100,o=n/1e9,l=t.l2c(t.c2l(0)),s=r.mode==="stack"?n:l;function f(x){return yi(t.c2l(x))&&(x<l-o||x>s+o||!yi(l))}for(var c=0;c<a.length;c++){for(var v=a[c],u=v[0].trace,h=[],d=!1,p=!1,y=0;y<v.length;y++){var m=v[y];if(m.s!==wo){var b=Math.abs(n/e.get(m.p,m.s));m.b*=b,m.s*=b;var w=m.b,g=w+m.s;m[i]=g,h.push(g),p=p||f(g),m.hasB&&(h.push(w),p=p||f(w)),(!m.hasB||!m.b)&&(d=!0)}}u._extremes[t._id]=Bl.findExtremes(t,h,{tozero:d,padded:p})}}function _4(t,e){var r=ls(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;yi(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,h=Array.isArray(u);for(n=0;n<o.length;n++){var d=o[n],p=d[r]-d.w/2;if(yi(p)){var y=d[r]+d.w/2,m=v(d.p);a[m]?a[m]=[Math.min(p,a[m][0]),Math.max(y,a[m][1])]:a[m]=[p,y]}d.p0=d.p+(h?u[n]:u),d.p1=d.p0+d.w,d.s0=d.b,d.s1=d.s0+d.s}}}function ls(t){return t._id.charAt(0)}var _k={crossTraceCalc:h4,setGroupPositions:th},w4=nt.exports,T4=ve.exports;function k4(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=w4.select(this).select("text");T4.setTransormAndDisplay(f,s)}})}}function A4(t,e,r){if(r.uniformtext.mode){var a=wk(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 M4(t,e){var r=wk(t);e[r]=void 0}function wk(t){return"_"+t+"Text_minsize"}var Za={recordMinTextSize:A4,clearMinTextSize:M4,resizeText:k4},Ka={},S4=ct,L4=Jr.exports,C4=ve.exports.isArrayOrTypedArray;Ka.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};Ka.coerceNumber=function(t,e,r){if(S4(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};Ka.coerceColor=function(t,e,r){return L4(e).isValid()?e:r!==void 0?r:t.dflt};Ka.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),t.values.indexOf(e)!==-1?e:r!==void 0?r:t.dflt};Ka.getValue=function(t,e){var r;return Array.isArray(t)?e<t.length&&(r=t[e]):r=t,r};Ka.getLineWidth=function(t,e){var r=0<e.mlw?e.mlw:C4(t.marker.line.width)?0:t.marker.line.width;return r};var wl=nt.exports,D4=rt.exports,jl=_t.exports,Tk=ve.exports,kk=Ze,Ak=Za.resizeText,Xp=os,$4=Xp.textfont,P4=Xp.insidetextfont,R4=Xp.outsidetextfont,Fn=Ka;function E4(t){var e=wl.select(t).selectAll("g.barlayer").selectAll("g.trace");Ak(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)&&wl.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(i){var n=wl.select(this),o=i[0].trace;Mk(n,o,t)}),kk.getComponentMethod("errorbars","style")(e)}function Mk(t,e,r){jl.pointStyle(t.selectAll("path"),e,r),Sk(t,e,r)}function Sk(t,e,r){t.selectAll("text").each(function(a){var i=wl.select(this),n=Tk.ensureUniformFontSize(r,Lk(i,a,e,r));jl.font(i,n)})}function z4(t,e,r){var a=e[0].trace;a.selectedpoints?I4(r,a,t):(Mk(r,a,t),kk.getComponentMethod("errorbars","style")(r))}function I4(t,e,r){jl.selectedPointStyle(t.selectAll("path"),e),N4(t.selectAll("text"),e,r)}function N4(t,e,r){t.each(function(a){var i=wl.select(this),n;if(a.selected){n=Tk.ensureUniformFontSize(r,Lk(i,a,e,r));var o=e.selected.textfont&&e.selected.textfont.color;o&&(n.color=o),jl.font(i,n)}else jl.selectedTextStyle(i,e)})}function Lk(t,e,r,a){var i=a._fullLayout.font,n=r.textfont;if(t.classed("bartext-inside")){var o=Pk(e,r);n=Dk(r,e.i,i,o)}else t.classed("bartext-outside")&&(n=$k(r,e.i,i));return n}function Ck(t,e,r){return Wp($4,t.textfont,e,r)}function Dk(t,e,r,a){var i=Ck(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:D4.contrast(a),family:i.family,size:i.size}),Wp(P4,t.insidetextfont,e,i)}function $k(t,e,r){var a=Ck(t,e,r);return Wp(R4,t.outsidetextfont,e,a)}function Wp(t,e,r,a){e=e||{};var i=Fn.getValue(e.family,r),n=Fn.getValue(e.size,r),o=Fn.getValue(e.color,r);return{family:Fn.coerceString(t.family,i,a.family),size:Fn.coerceNumber(t.size,n,a.size),color:Fn.coerceColor(t.color,o,a.color)}}function Pk(t,e){return e.type==="waterfall"?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}var nn={style:E4,styleTextPoints:Sk,styleOnSelect:z4,getInsideTextFont:Dk,getOutsideTextFont:$k,getBarColor:Pk,resizeText:Ak},Js=nt.exports,ef=ct,er=ve.exports,F4=nr,H4=rt.exports,ui=_t.exports,O4=Ze,ac=Mt.exports.tickText,Rk=Za,B4=Rk.recordMinTextSize,j4=Rk.clearMinTextSize,jv=nn,To=Ka,G4=ns,Ek=os,U4=Ek.text,V4=Ek.textposition,X4=ea.appendArrayPointValue,va=G4.TEXTPAD;function W4(t){return t.id}function Y4(t){if(t.ids)return W4}function hi(t,e){return t<e?1:-1}function q4(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 zk(t,e,r,a){if(!e.uniformtext.mode&&Ik(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 Ik(t){return t&&t.duration>0}function Z4(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},j4("bar",s));var f=er.makeTraceGroups(a,r,"trace bars").each(function(c){var v=Js.select(this),u=c[0].trace,h=u.type==="waterfall",d=u.type==="funnel",p=u.type==="bar",y=p||d,m=0;h&&u.connector.visible&&u.connector.mode==="between"&&(m=u.connector.line.width/2);var b=u.orientation==="h",w=Ik(i),g=er.ensureSingle(v,"g","points"),x=Y4(u),_=g.selectAll("g.point").data(er.identity,x);_.enter().append("g").classed("point",!0),_.exit().remove(),_.each(function(k,S){var A=Js.select(this),D=q4(k,o,l,b),M=D[0][0],C=D[0][1],$=D[1][0],F=D[1][1],R=(b?C-M:F-$)===0;R&&y&&To.getLineWidth(u,k)&&(R=!1),R||(R=!ef(M)||!ef(C)||!ef($)||!ef(F)),k.isBlank=R,R&&(b?C=M:F=$),m&&!R&&(b?(M-=hi(M,C)*m,C+=hi(M,C)*m):($-=hi($,F)*m,F+=hi($,F)*m));var P,E;if(u.type==="waterfall"){if(!R){var L=u[k.dir].marker;P=L.line.width,E=L.color}}else P=To.getLineWidth(u,k),E=k.mc||u.marker.color;function z(B){var Y=Js.round(P/2%1,2);return i.gap===0&&i.groupgap===0?Js.round(Math.round(B)-Y,2):B}function I(B,Y,Z){return Z&&B===Y?B:Math.abs(B-Y)>=2?z(B):B>Y?Math.ceil(B):Math.floor(B)}if(!t._context.staticPlot){var H=H4.opacity(E),U=H<1||P>.01?z:I;M=U(M,C,b),C=U(C,M,b),$=U($,F,!b),F=U(F,$,!b)}var O=zk(er.ensureSingle(A,"path"),s,i,n);if(O.style("vector-effect","non-scaling-stroke").attr("d",isNaN((C-M)*(F-$))||R&&t._context.staticPlot?"M0,0Z":"M"+M+","+$+"V"+F+"H"+C+"V"+$+"Z").call(ui.setClipUrl,e.layerClipId,t),!s.uniformtext.mode&&w){var X=ui.makePointStyleFns(u);ui.singlePointStyle(k,O,u,X,t)}K4(t,e,A,c,S,M,C,$,F,i,n),e.layerClipId&&ui.hideOutsideRangePoint(k,A.select("text"),o,l,u.xcalendar,u.ycalendar)});var T=u.cliponaxis===!1;ui.setClipUrl(v,T?null:e.layerClipId,t)});O4.getComponentMethod("errorbars","plot")(t,f,e,i)}function K4(t,e,r,a,i,n,o,l,s,f,c){var v=e.xaxis,u=e.yaxis,h=t._fullLayout,d;function p(Y,Z,q){var W=er.ensureSingle(Y,"text").text(Z).attr({class:"bartext bartext-"+d,"text-anchor":"middle","data-notex":1}).call(ui.font,q).call(F4.convertToTspans,t);return W}var y=a[0].trace,m=y.orientation==="h",b=J4(h,a,i,v,u);d=e6(y,i);var w=f.mode==="stack"||f.mode==="relative",g=a[i],x=!w||g._outmost;if(!b||d==="none"||(g.isBlank||n===o||l===s)&&(d==="auto"||d==="inside")){r.select("text").remove();return}var _=h.font,T=jv.getBarColor(a[i],y),k=jv.getInsideTextFont(y,i,_,T),S=jv.getOutsideTextFont(y,i,_),A=r.datum();m?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 D=Math.abs(o-n)-2*va,M=Math.abs(s-l)-2*va,C,$,F,R,P;if(d==="outside"&&!x&&!g.hasB&&(d="inside"),d==="auto")if(x){d="inside",P=er.ensureUniformFontSize(t,k),C=p(r,b,P),$=ui.bBox(C.node()),F=$.width,R=$.height;var E=F>0&&R>0,L=F<=D&&R<=M,z=F<=M&&R<=D,I=m?D>=F*(M/R):M>=R*(D/F);E&&(L||z||I)?d="inside":(d="outside",C.remove(),C=null)}else d="inside";if(!C){P=er.ensureUniformFontSize(t,d==="outside"?S:k),C=p(r,b,P);var H=C.attr("transform");if(C.attr("transform",""),$=ui.bBox(C.node()),F=$.width,R=$.height,C.attr("transform",H),F<=0||R<=0){C.remove();return}}var U=y.textangle,O,X;d==="outside"?(X=y.constraintext==="both"||y.constraintext==="outside",O=Q4(n,o,l,s,$,{isHorizontal:m,constrained:X,angle:U})):(X=y.constraintext==="both"||y.constraintext==="inside",O=Hk(n,o,l,s,$,{isHorizontal:m,constrained:X,angle:U,anchor:y.insidetextanchor})),O.fontSize=P.size,B4(y.type==="histogram"?"bar":y.type,O,h),g.transform=O;var B=zk(C,h,f,c);er.setTransormAndDisplay(B,O)}function Nk(t){return t==="auto"?0:t}function Fk(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 Hk(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=n.anchor||"end",c=f==="end",v=f==="start",u=n.leftToRight||0,h=(u+1)/2,d=1-h,p=i.width,y=i.height,m=Math.abs(e-t),b=Math.abs(a-r),w=m>2*va&&b>2*va?va:0;m-=2*w,b-=2*w;var g=Nk(s);s==="auto"&&!(p<=m&&y<=b)&&(p>m||y>b)&&(!(p>b||y>m)||p<y!=m<b)&&(g+=90);var x=Fk(i,g),_=1;l&&(_=Math.min(1,m/x.x,b/x.y));var T=i.left*d+i.right*h,k=(i.top+i.bottom)/2,S=(t+va)*d+(e-va)*h,A=(r+a)/2,D=0,M=0;if(v||c){var C=(o?x.x:x.y)/2,$=o?hi(t,e):hi(r,a);o?v?(S=t+$*w,D=-$*C):(S=e-$*w,D=$*C):v?(A=r+$*w,M=-$*C):(A=a-$*w,M=$*C)}return{textX:T,textY:k,targetX:S,targetY:A,anchorX:D,anchorY:M,scale:_,rotate:g}}function Q4(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=i.width,c=i.height,v=Math.abs(e-t),u=Math.abs(a-r),h;o?h=u>2*va?va:0:h=v>2*va?va:0;var d=1;l&&(d=o?Math.min(1,u/c):Math.min(1,v/f));var p=Nk(s),y=Fk(i,p),m=(o?y.x:y.y)/2,b=(i.left+i.right)/2,w=(i.top+i.bottom)/2,g=(t+e)/2,x=(r+a)/2,_=0,T=0,k=o?hi(e,t):hi(r,a);return o?(g=e-k*h,_=k*m):(x=a+k*h,T=-k*m),{textX:b,textY:w,targetX:g,targetY:x,anchorX:_,anchorY:T,scale:d,rotate:p}}function J4(t,e,r,a,i){var n=e[0].trace,o=n.texttemplate,l;return o?l=t6(t,e,r,a,i):n.textinfo?l=r6(e,r,a,i):l=To.getValue(n.text,r),To.coerceString(U4,l)}function e6(t,e){var r=To.getValue(t.textposition,e);return To.coerceEnumerated(V4,r)}function t6(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,h,d;c?(v="y",u=i,h="x",d=a):(v="x",u=a,h="y",d=i);function p(_){return ac(u,u.c2l(_),!0).text}function y(_){return ac(d,d.c2l(_),!0).text}var m=e[r],b={};b.label=m.p,b.labelLabel=b[v+"Label"]=p(m.p);var w=er.castOption(n,m.i,"text");(w===0||w)&&(b.text=w),b.value=m.s,b.valueLabel=b[h+"Label"]=y(m.s);var g={};X4(g,n,m.i),(l||g.x===void 0)&&(g.x=c?b.value:b.label),(l||g.y===void 0)&&(g.y=c?b.label:b.value),(l||g.xLabel===void 0)&&(g.xLabel=c?b.valueLabel:b.labelLabel),(l||g.yLabel===void 0)&&(g.yLabel=c?b.labelLabel:b.valueLabel),s&&(b.delta=+m.rawS||m.s,b.deltaLabel=y(b.delta),b.final=m.v,b.finalLabel=y(b.final),b.initial=b.final-b.delta,b.initialLabel=y(b.initial)),f&&(b.value=m.s,b.valueLabel=y(b.value),b.percentInitial=m.begR,b.percentInitialLabel=er.formatPercent(m.begR),b.percentPrevious=m.difR,b.percentPreviousLabel=er.formatPercent(m.difR),b.percentTotal=m.sumR,b.percenTotalLabel=er.formatPercent(m.sumR));var x=er.castOption(n,m.i,"customdata");return x&&(b.customdata=x),er.texttemplateString(o,b,t._d3locale,g,b,n._meta||{})}function r6(t,e,r,a){var i=t[0].trace,n=i.orientation==="h",o=i.type==="waterfall",l=i.type==="funnel";function s(x){var _=n?a:r;return ac(_,x,!0).text}function f(x){var _=n?r:a;return ac(_,+x,!0).text}var c=i.textinfo,v=t[e],u=c.split("+"),h=[],d,p=function(x){return u.indexOf(x)!==-1};if(p("label")&&h.push(s(t[e].p)),p("text")&&(d=er.castOption(i,v.i,"text"),(d===0||d)&&h.push(d)),o){var y=+v.rawS||v.s,m=v.v,b=m-y;p("initial")&&h.push(f(b)),p("delta")&&h.push(f(y)),p("final")&&h.push(f(m))}if(l){p("value")&&h.push(f(v.s));var w=0;p("percent initial")&&w++,p("percent previous")&&w++,p("percent total")&&w++;var g=w>1;p("percent initial")&&(d=er.formatPercent(v.begR),g&&(d+=" of initial"),h.push(d)),p("percent previous")&&(d=er.formatPercent(v.difR),g&&(d+=" of previous"),h.push(d)),p("percent total")&&(d=er.formatPercent(v.sumR),g&&(d+=" of total"),h.push(d))}return h.join("<br>")}var Yp={plot:Z4,toMoveInsideBar:Hk},rl=pa,a6=Ze,ax=rt.exports,i6=ve.exports.fillText,n6=Ka.getLineWidth,Gv=Mt.exports.hoverLabelText,o6=Ot.BADNUM;function l6(t,e,r,a,i){var n=Ok(t,e,r,a,i);if(n){var o=n.cd,l=o[0].trace,s=o[n.index];return n.color=Bk(l,s),a6.getComponentMethod("errorbars","hoverInfo")(s,l,n),[n]}}function Ok(t,e,r,a,i){var n=t.cd,o=n[0].trace,l=n[0].t,s=a==="closest",f=o.type==="waterfall",c=t.maxHoverDistance,v=t.maxSpikeDistance,u,h,d,p,y,m,b;o.orientation==="h"?(u=r,h=e,d="y",p="x",y=F,m=M):(u=e,h=r,d="x",p="y",m=F,y=M);var w=o[d+"period"],g=s||w;function x(B){return T(B,-1)}function _(B){return T(B,1)}function T(B,Y){var Z=B.w;return B[d]+Y*Z/2}function k(B){return B[d+"End"]-B[d+"Start"]}var S=s?x:w?function(B){return B.p-k(B)/2}:function(B){return Math.min(x(B),B.p-l.bardelta/2)},A=s?_:w?function(B){return B.p+k(B)/2}:function(B){return Math.max(_(B),B.p+l.bardelta/2)};function D(B,Y,Z){return i.finiteRange&&(Z=0),rl.inbox(B-u,Y-u,Z+Math.min(1,Math.abs(Y-B)/b)-1)}function M(B){return D(S(B),A(B),c)}function C(B){return D(x(B),_(B),v)}function $(B){var Y=B[p];if(f){var Z=Math.abs(B.rawS)||0;h>0?Y+=Z:h<0&&(Y-=Z)}return Y}function F(B){var Y=h,Z=B.b,q=$(B);return rl.inbox(Z-Y,q-Y,c+(q-Y)/(q-Z)-1)}function R(B){var Y=h,Z=B.b,q=$(B);return rl.inbox(Z-Y,q-Y,v+(q-Y)/(q-Z)-1)}var P=t[d+"a"],E=t[p+"a"];b=Math.abs(P.r2c(P.range[1])-P.r2c(P.range[0]));function L(B){return(y(B)+m(B))/2}var z=rl.getDistanceFunction(a,y,m,L);if(rl.getClosest(n,z,t),t.index!==!1&&n[t.index].p!==o6){g||(S=function(B){return Math.min(x(B),B.p-l.bargroupwidth/2)},A=function(B){return Math.max(_(B),B.p+l.bargroupwidth/2)});var I=t.index,H=n[I],U=o.base?H.b+H.s:H.s;t[p+"0"]=t[p+"1"]=E.c2p(H[p],!0),t[p+"LabelVal"]=U;var O=l.extents[l.extents.round(H.p)];t[d+"0"]=P.c2p(s?S(H):O[0],!0),t[d+"1"]=P.c2p(s?A(H):O[1],!0);var X=H.orig_p!==void 0;return t[d+"LabelVal"]=X?H.orig_p:H.p,t.labelLabel=Gv(P,t[d+"LabelVal"],o[d+"hoverformat"]),t.valueLabel=Gv(E,t[p+"LabelVal"],o[p+"hoverformat"]),t.baseLabel=Gv(E,H.b,o[p+"hoverformat"]),t.spikeDistance=(R(H)+C(H))/2,t[d+"Spike"]=P.c2p(H.p,!0),i6(H,o,t),t.hovertemplate=o.hovertemplate,t}}function Bk(t,e){var r=e.mcc||t.marker.color,a=e.mlcc||t.marker.line.color,i=n6(t,e);if(ax.opacity(r))return r;if(ax.opacity(a)&&i)return a}var jk={hoverPoints:l6,hoverOnBars:Ok,getTraceColor:Bk},s6=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},Gk=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:f6(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 f6(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 c6={attributes:os,layoutAttributes:Gp,supplyDefaults:_o.supplyDefaults,crossTraceDefaults:_o.crossTraceDefaults,supplyLayoutDefaults:hk,calc:s4,crossTraceCalc:_k.crossTraceCalc,colorbar:as,arraysToCalcdata:Up,plot:Yp.plot,style:nn.style,styleOnSelect:nn.styleOnSelect,hoverPoints:jk.hoverPoints,eventData:s6,selectPoints:Gk,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=c6})(sk);const CO=gi(sk.exports);var Uk={exports:{}},u6=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"}},v6={eventDataKeys:["binNumber"]},Tr=os,ix=Do.axisHoverFormat,d6=$r.hovertemplateAttrs,h6=$r.texttemplateAttrs,Uv=dr,nx=u6,p6=v6,Vv=Ft.extendFlat,Vk={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:ix("x"),yhoverformat:ix("y"),text:Vv({},Tr.text,{description:["Sets hover text elements associated with each bar.","If a single string, the same string appears over all bars.","If an array of string, the items are mapped in order to the","this trace's coordinates."].join(" ")}),hovertext:Vv({},Tr.hovertext,{description:"Same as `text`."}),orientation:Tr.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:nx("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:nx("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:d6({},{keys:p6.eventDataKeys}),texttemplate:h6({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:Vv({},Tr.textposition,{arrayOk:!1}),textfont:Uv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:Uv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:Uv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),insidetextanchor:Tr.insidetextanchor,textangle:Tr.textangle,cliponaxis:Tr.cliponaxis,constraintext:Tr.constraintext,marker:Tr.marker,offsetgroup:Tr.offsetgroup,alignmentgroup:Tr.alignmentgroup,selected:Tr.selected,unselected:Tr.unselected,_deprecated:{bardir:Tr._deprecated.bardir}},ox=Ze,al=ve.exports,lx=rt.exports,m6=_o.handleText,y6=ck,g6=Vk,b6=function(e,r,a,i){function n(b,w){return al.coerce(e,r,g6,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");m6(e,r,i,n,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),n("hovertext"),n("hovertemplate"),n("xhoverformat"),n("yhoverformat");var c=n("orientation",l&&!o?"h":"v"),v=c==="v"?"x":"y",u=c==="v"?"y":"x",h=o&&l?Math.min(al.minRowLength(o)&&al.minRowLength(l)):al.minRowLength(r[v]||[]);if(!h){r.visible=!1;return}r._length=h;var d=ox.getComponentMethod("calendars","handleTraceDefaults");d(e,r,["x","y"],i);var p=r[u];p&&n("histfunc"),n("histnorm"),n("autobin"+v),y6(e,r,n,a,i),al.coerceSelectionMarkerOpacity(r,n);var y=(r.marker.line||{}).color,m=ox.getComponentMethod("errorbars","supplyDefaults");m(e,r,y||lx.defaultLine,{axis:"y"}),m(e,r,y||lx.defaultLine,{axis:"x",inherit:"y"})},dl=ve.exports,x6=Vt,tf=Ze.traceIs,_6=_o.handleGroupingDefaults,sx=dl.nestedProperty,Xv=qa.getAxisGroup,fx=[{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"}],w6=["x","y"],T6=function(e,r){var a=r._histogramBinOpts={},i=[],n={},o=[],l,s,f,c,v,u,h;function d($,F){return dl.coerce(l._input,l,l._module.attributes,$,F)}function p($){return $.orientation==="v"?"x":"y"}function y($,F){var R=x6.getFromTrace({_fullLayout:r},$,F);return R.type}function m($,F,R){var P=$.uid+"__"+R;F||(F=P);var E=y($,R),L=$[R+"calendar"]||"",z=a[F],I=!0;z&&(E===z.axType&&L===z.calendar?(I=!1,z.traces.push($),z.dirs.push(R)):(F=P,E!==z.axType&&dl.warn(["Attempted to group the bins of trace",$.index,"set on a","type:"+E,"axis","with bins on","type:"+z.axType,"axis."].join(" ")),L!==z.calendar&&dl.warn(["Attempted to group the bins of trace",$.index,"set with a",L,"calendar","with bins",z.calendar?"on a "+z.calendar+" calendar":"w/o a set calendar"].join(" ")))),I&&(a[F]={traces:[$],dirs:[R],axType:E,calendar:$[R+"calendar"]||""}),$["_"+R+"bingroup"]=F}for(v=0;v<e.length;v++)l=e[v],tf(l,"histogram")&&(i.push(l),delete l._xautoBinFinished,delete l._yautoBinFinished,tf(l,"2dMap")||_6(l._input,l,r,d));var b=r._alignmentOpts||{};for(v=0;v<i.length;v++){if(l=i[v],f="",!tf(l,"2dMap")){if(c=p(l),r.barmode==="group"&&l.alignmentgroup){var w=l[c+"axis"],g=Xv(r,w)+l.orientation;(b[g]||{})[l.alignmentgroup]&&(f=g)}!f&&r.barmode!=="overlay"&&(f=Xv(r,l.xaxis)+Xv(r,l.yaxis)+p(l))}f?(n[f]||(n[f]=[]),n[f].push(l)):o.push(l)}for(f in n){if(s=n[f],s.length===1){o.push(s[0]);continue}var x=!1;for(s.length&&(l=s[0],x=d("bingroup")),f=x||f,v=0;v<s.length;v++){l=s[v];var _=l._input.bingroup;_&&_!==f&&dl.warn(["Trace",l.index,"must match","within bingroup",f+".","Ignoring its bingroup:",_,"setting."].join(" ")),l.bingroup=f,m(l,f,p(l))}}for(v=0;v<o.length;v++){l=o[v];var T=d("bingroup");if(tf(l,"2dMap"))for(h=0;h<2;h++){c=w6[h];var k=d(c+"bingroup",T?T+"__"+c:null);m(l,k,c)}else m(l,T,p(l))}for(f in a){var S=a[f];for(s=S.traces,u=0;u<fx.length;u++){var A=fx[u],D=A.name,M,C;if(!(D==="nbins"&&S.sizeFound)){for(v=0;v<s.length;v++){if(l=s[v],c=S.dirs[v],M=A.aStr[c],sx(l._input,M).get()!==void 0){S[D]=d(M),S[D+"Found"]=!0;break}C=(l._autoBin||{})[c]||{},C[D]&&sx(l,M).set(C[D])}if(D==="start"||D==="end")for(;v<s.length;v++)l=s[v],l["_"+c+"bingroup"]&&(C=(l._autoBin||{})[c]||{},d(M,C[D]));D==="nbins"&&!S.sizeFound&&!S.nbinsFound&&(l=s[0],S[D]=d(M))}}}},Hn=ct,k6={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,a){var i=a[e];return Hn(i)?(i=Number(i),r[t]+=i,i):0},avg:function(t,e,r,a,i){var n=a[e];return Hn(n)&&(n=Number(n),r[t]+=n,i[t]++),0},min:function(t,e,r,a){var i=a[e];if(Hn(i))if(i=Number(i),Hn(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(Hn(i))if(i=Number(i),Hn(r[t])){if(r[t]<i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0}},A6={percent:function(t,e){for(var r=t.length,a=100/e,i=0;i<r;i++)t[i]*=a},probability:function(t,e){for(var r=t.length,a=0;a<r;a++)t[a]/=e},density:function(t,e,r,a){var i=t.length;a=a||1;for(var n=0;n<i;n++)t[n]*=r[n]*a},"probability density":function(t,e,r,a){var i=t.length;a&&(e/=a);for(var n=0;n<i;n++)t[n]*=r[n]/e}},M6=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},Ro=Ot,en=Ro.ONEAVGYEAR,cx=Ro.ONEAVGMONTH,ic=Ro.ONEDAY,ux=Ro.ONEHOUR,vx=Ro.ONEMIN,dx=Ro.ONESEC,hx=Mt.exports.tickIncrement,S6=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(rf(f+l,f+s,i,n),rf(c+l,c+s,i,n)),u=Math.min(rf(f+o,f+l,i,n),rf(c+o,c+l,i,n)),h,d;if(v>u&&u<Math.abs(c-f)/4e3?(h=v,d=!1):(h=Math.min(v,u),d=!0),i.type==="date"&&h>ic){var p=h===en?1:6,y=h===en?"M12":"M1";return function(m,b){var w=i.c2d(m,en,n),g=w.indexOf("-",p);g>0&&(w=w.substr(0,g));var x=i.d2c(w,0,n);if(x<m){var _=hx(x,y,!1,n);(x+_)/2<m+e&&(x=_)}return b&&d?hx(x,y,!0,n):x}}return function(m,b){var w=h*Math.round(m/h);return w+h/10<m&&w+h*.9<m+e&&(w+=h),b&&d&&(w-=h),w}};function rf(t,e,r,a){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),n=r.type==="date",o=px(i,n),l=0;l<10;l++){var s=px(o*80,n);if(o===s)break;if(L6(s,t,e,n,r,a))o=s;else break}return o}function px(t,e){return e&&t>dx?t>ic?t>en*1.1?en:t>cx*1.1?cx:ic:t>ux?ux:t>vx?vx:dx:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function L6(t,e,r,a,i,n){if(a&&t>ic){var o=mx(e,i,n),l=mx(r,i,n),s=t===en?0:1;return o[s]!==l[s]}return Math.floor(r/t)-Math.floor(e/t)>.1}function mx(t,e,r){var a=e.c2d(t,en,r).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}var rh=ct,cr=ve.exports,yx=Ze,Xr=Mt.exports,C6=Up,gx=k6,D6=A6,$6=M6,P6=S6;function R6(t,e){var r=[],a=[],i=e.orientation==="h",n=Xr.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=qp(t,e,n,o),u=v[0],h=v[1],d=typeof u.size=="string",p=[],y=d?p:u,m=[],b=[],w=[],g=0,x=e.histnorm,_=e.histfunc,T=x.indexOf("density")!==-1,k,S,A;f.enabled&&T&&(x=x.replace(/ ?density$/,""),T=!1);var D=_==="max"||_==="min",M=D?null:0,C=gx.count,$=D6[x],F=!1,R=function(ne){return n.r2c(ne,0,s)},P;for(cr.isArrayOrTypedArray(e[l])&&_!=="count"&&(P=e[l],F=_==="avg",C=gx[_]),c=R(u.start),S=R(u.end)+(c-Xr.tickIncrement(c,u.size,!1,s))/1e6;c<S&&r.length<1e6&&(k=Xr.tickIncrement(c,u.size,!1,s),r.push((c+k)/2),a.push(M),w.push([]),p.push(c),T&&m.push(1/(k-c)),F&&b.push(0),!(k<=c));)c=k;p.push(c),!d&&n.type==="date"&&(y={start:R(y.start),end:R(y.end),size:y.size}),t._fullLayout._roundFnOpts||(t._fullLayout._roundFnOpts={});var E=e["_"+o+"bingroup"],L={leftGap:1/0,rightGap:1/0};E&&(t._fullLayout._roundFnOpts[E]||(t._fullLayout._roundFnOpts[E]=L),L=t._fullLayout._roundFnOpts[E]);var z=a.length,I=!0,H=L.leftGap,U=L.rightGap,O={};for(c=0;c<h.length;c++){var X=h[c];A=cr.findBin(X,y),A>=0&&A<z&&(g+=C(A,c,a,P,b),I&&w[A].length&&X!==h[w[A][0]]&&(I=!1),w[A].push(c),O[c]=A,H=Math.min(H,X-p[A]),U=Math.min(U,p[A+1]-X))}L.leftGap=H,L.rightGap=U;var B;I||(B=function(ne,de){return function(){var le=t._fullLayout._roundFnOpts[E];return P6(le.leftGap,le.rightGap,p,n,s)(ne,de)}}),F&&(g=$6(a,b)),$&&$(a,g,m),f.enabled&&I6(a,f.direction,f.currentbin);var Y=Math.min(r.length,a.length),Z=[],q=0,W=Y-1;for(c=0;c<Y;c++)if(a[c]){q=c;break}for(c=Y-1;c>=q;c--)if(a[c]){W=c;break}for(c=q;c<=W;c++)if(rh(r[c])&&rh(a[c])){var ae={p:r[c],s:a[c],b:0};f.enabled||(ae.pts=w[c],I?ae.ph0=ae.ph1=w[c].length?h[w[c][0]]:r[c]:(e._computePh=!0,ae.ph0=B(p[c]),ae.ph1=B(p[c+1],!0))),Z.push(ae)}return Z.length===1&&(Z[0].width1=Xr.tickIncrement(Z[0].p,u.size,!1,s)-Z[0].p),C6(Z,e),cr.isArrayOrTypedArray(e.selectedpoints)&&cr.tagSelected(Z,e,O),Z}function qp(t,e,r,a,i){var n=a+"bins",o=t._fullLayout,l=e["_"+a+"bingroup"],s=o._histogramBinOpts[l],f=o.barmode==="overlay",c,v,u,h,d,p,y,m=function(X){return r.r2c(X,0,h)},b=function(X){return r.c2r(X,0,h)},w=r.type==="date"?function(X){return X||X===0?cr.cleanDate(X,null,h):null}:function(X){return rh(X)?Number(X):null};function g(X,B,Y){B[X+"Found"]?(B[X]=w(B[X]),B[X]===null&&(B[X]=Y[X])):(p[X]=B[X]=Y[X],cr.nestedProperty(v[0],n+"."+X).set(Y[X]))}if(e["_"+a+"autoBinFinished"])delete e["_"+a+"autoBinFinished"];else{v=s.traces;var x=[],_=!0,T=!1,k=!1;for(c=0;c<v.length;c++)if(u=v[c],u.visible){var S=s.dirs[c];d=u["_"+S+"pos0"]=r.makeCalcdata(u,S),x=cr.concat(x,d),delete u["_"+a+"autoBinFinished"],e.visible===!0&&(_?_=!1:(delete u._autoBin,u["_"+a+"autoBinFinished"]=1),yx.traceIs(u,"2dMap")&&(T=!0),u.type==="histogram2dcontour"&&(k=!0))}h=v[0][a+"calendar"];var A=Xr.autoBin(x,r,s.nbins,T,h,s.sizeFound&&s.size),D=v[0]._autoBin={};if(p=D[s.dirs[0]]={},k&&(s.size||(A.start=b(Xr.tickIncrement(m(A.start),A.size,!0,h))),s.end===void 0&&(A.end=b(Xr.tickIncrement(m(A.end),A.size,!1,h)))),f&&!yx.traceIs(e,"2dMap")&&A._dataSpan===0&&r.type!=="category"&&r.type!=="multicategory"){if(i)return[A,d,!0];A=E6(t,e,r,a,n)}y=u.cumulative||{},y.enabled&&y.currentbin!=="include"&&(y.direction==="decreasing"?A.start=b(Xr.tickIncrement(m(A.start),A.size,!0,h)):A.end=b(Xr.tickIncrement(m(A.end),A.size,!1,h))),s.size=A.size,s.sizeFound||(p.size=A.size,cr.nestedProperty(v[0],n+".size").set(A.size)),g("start",s,A),g("end",s,A)}d=e["_"+a+"pos0"],delete e["_"+a+"pos0"];var M=e._input[n]||{},C=cr.extendFlat({},s),$=s.start,F=r.r2l(M.start),R=F!==void 0;if((s.startFound||R)&&F!==r.r2l($)){var P=R?F:cr.aggNums(Math.min,null,d),E={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:s.size,tick0:$,calendar:h,range:[P,Xr.tickIncrement(P,s.size,!1,h)].map(r.l2r)},L=Xr.tickFirst(E);L>r.r2l(P)&&(L=Xr.tickIncrement(L,s.size,!0,h)),C.start=r.l2r(L),R||cr.nestedProperty(e,n+".start").set(C.start)}var z=s.end,I=r.r2l(M.end),H=I!==void 0;if((s.endFound||H)&&I!==r.r2l(z)){var U=H?I:cr.aggNums(Math.max,null,d);C.end=r.l2r(U),H||cr.nestedProperty(e,n+".start").set(C.end)}var O="autobin"+a;return e._input[O]===!1&&(e._input[n]=cr.extendFlat({},e[n]||{}),delete e._input[O],delete e[O]),[C,d]}function E6(t,e,r,a,i){var n=t._fullLayout,o=z6(t,e),l=!1,s=1/0,f=[e],c,v,u;for(c=0;c<o.length;c++)if(v=o[c],v===e)l=!0;else if(!l)u=n._histogramBinOpts[v["_"+a+"bingroup"]],s=Math.min(s,u.size||v[i].size);else{var h=qp(t,v,r,a,!0),d=h[0],p=h[2];v["_"+a+"autoBinFinished"]=1,v["_"+a+"pos0"]=h[1],p?f.push(v):s=Math.min(s,d.size)}var y=new Array(f.length);for(c=0;c<f.length;c++)for(var m=f[c]["_"+a+"pos0"],b=0;b<m.length;b++)if(m[b]!==void 0){y[c]=m[b];break}for(isFinite(s)||(s=cr.distinctVals(y).minDiff),c=0;c<f.length;c++){v=f[c];var w=v[a+"calendar"],g={start:r.c2r(y[c]-s/2,0,w),end:r.c2r(y[c]+s/2,0,w),size:s};v._input[i]=v[i]=g,u=n._histogramBinOpts[v["_"+a+"bingroup"]],u&&cr.extendFlat(u,g)}return e[i]}function z6(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 I6(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 N6={calc:R6,calcAllAutoBins:qp},F6=jk.hoverPoints,H6=Mt.exports.hoverLabelText,O6=function(e,r,a,i,n){var o=F6(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"]=H6(e[f+"a"],[l.ph0,l.ph1],s[f+"hoverformat"])}return o}},B6=function(e,r,a,i,n){if(e.x="xVal"in r?r.xVal:r.x,e.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(e.z=r.zLabelVal),r.xa&&(e.xaxis=r.xa),r.ya&&(e.yaxis=r.ya),!(a.cumulative||{}).enabled){var o=Array.isArray(n)?i[0].pts[n[0]][n[1]]:i[n].pts;e.pointNumbers=o,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex;var l;if(a._indexToPoints){l=[];for(var s=0;s<o.length;s++)l=l.concat(a._indexToPoints[o[s]])}else l=o;e.pointIndices=l}return e},j6={attributes:Vk,layoutAttributes:Gp,supplyDefaults:b6,crossTraceDefaults:T6,supplyLayoutDefaults:hk,calc:N6.calc,crossTraceCalc:_k.crossTraceCalc,plot:Yp.plot,layerName:"barlayer",style:nn.style,styleOnSelect:nn.styleOnSelect,colorbar:as,hoverPoints:O6,selectPoints:Gk,eventData:B6,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=j6})(Uk);const DO=gi(Uk.exports);var Xk={exports:{}},G6=Ca,U6=Ti.attributes,V6=dr,X6=hr,W6=$r.hovertemplateAttrs,Y6=$r.texttemplateAttrs,On=Ft.extendFlat,il=V6({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."}),qc={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:X6.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:On({},G6.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:W6({},{keys:["label","color","value","percent","text"]}),texttemplate:Y6({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:On({},il,{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:On({},il,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:On({},il,{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:On({},il,{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:U6({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the fraction of the radius to cut out of the pie.","Use this to make a donut chart."].join(" ")},sort:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the sectors are reordered","from largest to smallest."].join(" ")},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc",description:["Specifies the direction at which succeeding sectors follow","one another."].join(" ")},rotation:{valType:"angle",dflt:0,editType:"calc",description:["Instead of the first slice starting at 12 o'clock,","rotate to some other angle."].join(" ")},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc",description:["Sets the fraction of larger radius to pull the sectors","out from the center. This can be a constant","to pull all slices apart from each other equally","or an array to highlight one or more slices."].join(" ")},_deprecated:{title:{valType:"string",dflt:"",editType:"calc",description:["Deprecated in favor of `title.text`.","Note that value of `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:On({},il,{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`."}}},q6=ct,ah=ve.exports,Z6=qc,K6=Ti.defaults,Q6=_o.handleText;function Wk(t,e){var r=Array.isArray(t),a=ah.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(q6(l)&&l>0){n=!0;break}}n||(i=0)}return{hasLabels:r,hasValues:a,len:i}}function J6(t,e,r,a){function i(w,g){return ah.coerce(t,e,Z6,w,g)}var n=i("labels"),o=i("values"),l=Wk(n,o),s=l.len;if(e._hasLabels=l.hasLabels,e._hasValues=l.hasValues,!e._hasLabels&&e._hasValues&&(i("label0"),i("dlabel")),!s){e.visible=!1;return}e._length=s;var f=i("marker.line.width");f&&i("marker.line.color"),i("marker.colors"),i("scalegroup");var c=i("text"),v=i("texttemplate"),u;if(v||(u=i("textinfo",Array.isArray(c)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),v||u&&u!=="none"){var h=i("textposition");Q6(t,e,a,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",p=d||h==="outside";p&&i("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&i("insidetextorientation")}K6(e,a,i);var y=i("hole"),m=i("title.text");if(m){var b=i("title.position",y?"middle center":"top center");!y&&b==="middle center"&&(e.title.position="top center"),ah.coerceFont(i,"title.font",a.font)}i("sort"),i("direction"),i("rotation"),i("pull")}var e8={handleLabelsAndValues:Wk,supplyDefaults:J6},Yk={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(" ")}},t8=ve.exports,r8=Yk,a8=function(e,r){function a(i,n){return t8.coerce(e,r,r8,i,n)}a("hiddenlabels"),a("piecolorway",r.colorway),a("extendpiecolors")},i8=ct,ih=Jr.exports,n8=rt.exports,o8={};function l8(t,e){var r=[],a=t._fullLayout,i=a.hiddenlabels||[],n=e.labels,o=e.marker.colors||[],l=e.values,s=e._length,f=e._hasValues&&s,c,v;if(e.dlabel)for(n=new Array(s),c=0;c<s;c++)n[c]=String(e.label0+c*e.dlabel);var u={},h=qk(a["_"+e.type+"colormap"]),d=0,p=!1;for(c=0;c<s;c++){var y,m,b;if(f){if(y=l[c],!i8(y))continue;y=+y}else y=1;m=n[c],(m===void 0||m==="")&&(m=c),m=String(m);var w=u[m];w===void 0?(u[m]=r.length,b=i.indexOf(m)!==-1,b||(d+=y),r.push({v:y,label:m,color:h(o[c],m),i:c,pts:[c],hidden:b})):(p=!0,v=r[w],v.v+=y,v.pts.push(c),v.hidden||(d+=y),v.color===!1&&o[c]&&(v.color=h(o[c],m)))}r=r.filter(function(x){return x.v>=0});var g=e.type==="funnelarea"?p:e.sort;return g&&r.sort(function(x,_){return _.v-x.v}),r[0]&&(r[0].vTotal=d),r}function qk(t){return function(r,a){return!r||(r=ih(r),!r.isValid())?!1:(r=n8.addOpacity(r,r.getAlpha()),t[a]||(t[a]=r),r)}}function s8(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=Zk(n,o8));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 Zk(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(ih(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)i.push(ih(t[r]).darken(20).toHexString());e[a]=i}return i}var nc={calc:l8,crossTraceCalc:s8,makePullColorFn:qk,generateExtendedColors:Zk},f8=ea.appendArrayMultiPointValues,c8=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]),f8(a,r,e.pts),r.type==="funnelarea"&&(delete a.v,delete a.i),a},Ar=nt.exports,u8=Ut.exports,af=pa,Kk=rt.exports,Ba=_t.exports,ur=ve.exports,v8=ur.strScale,bx=ur.strTranslate,nh=nr,Qk=Za,d8=Qk.recordMinTextSize,h8=Qk.clearMinTextSize,Jk=ns.TEXTPAD,wt=hn,nf=c8,xx=ve.exports.isValidTextValue;function p8(t,e){var r=t._context.staticPlot,a=t._fullLayout,i=a._size;h8("pie",a),rA(e,t),fA(e,i);var n=ur.makeTraceGroups(a._pielayer,e,"trace").each(function(o){var l=Ar.select(this),s=o[0],f=s.trace;k8(o),l.attr("stroke-linejoin","round"),l.each(function(){var c=Ar.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var v=[[[],[]],[[],[]]],u=!1;c.each(function(g,x){if(g.hidden){Ar.select(this).selectAll("path,g").remove();return}g.pointNumber=g.i,g.curveNumber=f.index,v[g.pxmid[1]<0?0:1][g.pxmid[0]<0?0:1].push(g);var _=s.cx,T=s.cy,k=Ar.select(this),S=k.selectAll("path.surface").data([g]);if(S.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),k.call(eA,t,o),f.pull){var A=+wt.castOption(f.pull,g.pts)||0;A>0&&(_+=A*g.pxmid[0],T+=A*g.pxmid[1])}g.cxFinal=_,g.cyFinal=T;function D(E,L,z,I){var H=I*(L[0]-E[0]),U=I*(L[1]-E[1]);return"a"+I*s.r+","+I*s.r+" 0 "+g.largeArc+(z?" 1 ":" 0 ")+H+","+U}var M=f.hole;if(g.v===s.vTotal){var C="M"+(_+g.px0[0])+","+(T+g.px0[1])+D(g.px0,g.pxmid,!0,1)+D(g.pxmid,g.px0,!0,1)+"Z";M?S.attr("d","M"+(_+M*g.px0[0])+","+(T+M*g.px0[1])+D(g.px0,g.pxmid,!1,M)+D(g.pxmid,g.px0,!1,M)+"Z"+C):S.attr("d",C)}else{var $=D(g.px0,g.px1,!0,1);if(M){var F=1-M;S.attr("d","M"+(_+M*g.px1[0])+","+(T+M*g.px1[1])+D(g.px1,g.px0,!1,M)+"l"+F*g.px0[0]+","+F*g.px0[1]+$+"Z")}else S.attr("d","M"+_+","+T+"l"+g.px0[0]+","+g.px0[1]+$+"Z")}cA(t,g,s);var R=wt.castOption(f.textposition,g.pts),P=k.selectAll("g.slicetext").data(g.text&&R!=="none"?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var E=ur.ensureSingle(Ar.select(this),"text","",function(B){B.attr("data-notex",1)}),L=ur.ensureUniformFontSize(t,R==="outside"?y8(f,g,a.font):tA(f,g,a.font));E.text(g.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Ba.font,L).call(nh.convertToTspans,t);var z=Ba.bBox(E.node()),I;if(R==="outside")I=Tx(z,g);else if(I=aA(z,g,s),R==="auto"&&I.scale<1){var H=ur.ensureUniformFontSize(t,f.outsidetextfont);E.call(Ba.font,H),z=Ba.bBox(E.node()),I=Tx(z,g)}var U=I.textPosAngle,O=U===void 0?g.pxmid:Sf(s.r,U);if(I.targetX=_+O[0]*I.rCenter+(I.x||0),I.targetY=T+O[1]*I.rCenter+(I.y||0),uA(I,z),I.outside){var X=I.targetY;g.yLabelMin=X-z.height/2,g.yLabelMid=X,g.yLabelMax=X+z.height/2,g.labelExtraX=0,g.labelExtraY=0,u=!0}I.fontSize=L.size,d8(f.type,I,a),o[x].transform=I,ur.setTransormAndDisplay(E,I)})});var h=Ar.select(this).selectAll("g.titletext").data(f.title.text?[0]:[]);if(h.enter().append("g").classed("titletext",!0),h.exit().remove(),h.each(function(){var g=ur.ensureSingle(Ar.select(this),"text","",function(T){T.attr("data-notex",1)}),x=f.title.text;f._meta&&(x=ur.templateString(x,f._meta)),g.text(x).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Ba.font,f.title.font).call(nh.convertToTspans,t);var _;f.title.position==="middle center"?_=x8(s):_=lA(s,i),g.attr("transform",bx(_.x,_.y)+v8(Math.min(1,_.scale))+bx(_.tx,_.ty))}),u&&w8(v,f),m8(c,f),u&&f.automargin){var d=Ba.bBox(l.node()),p=f.domain,y=i.w*(p.x[1]-p.x[0]),m=i.h*(p.y[1]-p.y[0]),b=(.5*y-s.r)/i.w,w=(.5*m-s.r)/i.h;u8.autoMargin(t,"pie."+f.uid+".automargin",{xl:p.x[0]-b,xr:p.x[1]+b,yb:p.y[0]-w,yt:p.y[1]+w,l:Math.max(s.cx-s.r-d.left,0),r:Math.max(d.right-(s.cx+s.r),0),b:Math.max(d.bottom-(s.cy+s.r),0),t:Math.max(s.cy-s.r-d.top,0),pad:5})}})});setTimeout(function(){n.selectAll("tspan").each(function(){var o=Ar.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function m8(t,e){t.each(function(r){var a=Ar.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,ur.setTransormAndDisplay(i,r.transform);var n=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],l="M"+n+","+o,s=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var f=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(f)>Math.abs(c)?l+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(n+r.labelExtraX+s):l+="l"+r.labelExtraX+","+f+"v"+(c-f)+"h"+s}else l+="V"+(r.yLabelMid+r.labelExtraY)+"h"+s;ur.ensureSingle(a,"path","textline").call(Kk.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:l,fill:"none"})})}function eA(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=af.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,h=i+s.pxmid[0]*(1-u),d=n+s.pxmid[1]*(1-u),p=f.separators,y=[];if(v&&v.indexOf("label")!==-1&&y.push(s.label),s.text=wt.castOption(c.hovertext||c.text,s.pts),v&&v.indexOf("text")!==-1){var m=s.text;ur.isValidTextValue(m)&&y.push(m)}s.value=s.v,s.valueLabel=wt.formatPieValue(s.v,p),v&&v.indexOf("value")!==-1&&y.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=wt.formatPiePercent(s.percent,p),v&&v.indexOf("percent")!==-1&&y.push(s.percentLabel);var b=c.hoverlabel,w=b.font,g=[];af.loneHover({trace:o,x0:h-u*a.r,x1:h+u*a.r,y:d,_x0:l?i+s.TL[0]:h-u*a.r,_x1:l?i+s.TR[0]:h+u*a.r,_y0:l?n+s.TL[1]:d-u*a.r,_y1:l?n+s.BL[1]:d+u*a.r,text:y.join("<br>"),name:c.hovertemplate||v.indexOf("name")!==-1?c.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color: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:[nf(s,c)]},{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:e,inOut_bbox:g}),s.bbox=g[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[nf(s,c)],event:Ar.event})}}),t.on("mouseout",function(s){var f=e._fullLayout,c=e._fullData[o.index],v=Ar.select(this).datum();o._hasHoverEvent&&(s.originalEvent=Ar.event,e.emit("plotly_unhover",{points:[nf(v,c)],event:Ar.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(af.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=[nf(s,c)],af.click(e,Ar.event))})}function y8(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 tA(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||Kk.contrast(e.color),family:i,size:n}}function rA(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=ur.templateString(n,a._meta));var o=Ba.tester.append("text").attr("data-notex",1).text(n).call(Ba.font,a.title.font).call(nh.convertToTspans,e),l=Ba.bBox(o.node(),!0);r.titleBox={width:l.width,height:l.height},o.remove()}}function aA(t,e,r){var a=r.r||e.rpx1,i=e.rInscribed,n=e.startangle===e.stopangle;if(n)return{rCenter:1-i,scale:0,rotate:0,textPosAngle:0};var o=e.ring,l=o===1&&Math.abs(e.startangle-e.stopangle)===Math.PI*2,s=e.halfangle,f=e.midangle,c=r.trace.insidetextorientation,v=c==="horizontal",u=c==="tangential",h=c==="radial",d=c==="auto",p=[],y;if(!d){var m=function(k,S){if(g8(e,k)){var A=Math.abs(k-e.startangle),D=Math.abs(k-e.stopangle),M=A<D?A:D;S==="tan"?y=wx(t,a,o,M,0):y=_x(t,a,o,M,Math.PI/2),y.textPosAngle=k,p.push(y)}},b;if(v||u){for(b=4;b>=-4;b-=2)m(Math.PI*b,"tan");for(b=4;b>=-4;b-=2)m(Math.PI*(b+1),"tan")}if(v||h){for(b=4;b>=-4;b-=2)m(Math.PI*(b+1.5),"rad");for(b=4;b>=-4;b-=2)m(Math.PI*(b+.5),"rad")}}if(l||d||v){var w=Math.sqrt(t.width*t.width+t.height*t.height);if(y={scale:i*a*2/w,rCenter:1-i,rotate:0},y.textPosAngle=(e.startangle+e.stopangle)/2,y.scale>=1)return y;p.push(y)}(d||h)&&(y=_x(t,a,o,s,f),y.textPosAngle=(e.startangle+e.stopangle)/2,p.push(y)),(d||u)&&(y=wx(t,a,o,s,f),y.textPosAngle=(e.startangle+e.stopangle)/2,p.push(y));for(var g=0,x=0,_=0;_<p.length;_++){var T=p[_].scale;if(x<T&&(x=T,g=_),!d&&x>=1)break}return p[g]}function g8(t,e){var r=t.startangle,a=t.stopangle;return r>e&&e>a||r<e&&e<a}function _x(t,e,r,a,i){e=Math.max(0,e-2*Jk);var n=t.width/t.height,o=oA(n,a,e,r);return{scale:o*2/t.height,rCenter:iA(n,o/e),rotate:nA(i)}}function wx(t,e,r,a,i){e=Math.max(0,e-2*Jk);var n=t.height/t.width,o=oA(n,a,e,r);return{scale:o*2/t.width,rCenter:iA(n,o/e),rotate:nA(i+Math.PI/2)}}function iA(t,e){return Math.cos(e)-t*e}function nA(t){return(180/Math.PI*t+720)%180-90}function oA(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 b8(t,e){return t.v===e.vTotal&&!e.trace.hole?1:Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2)}function Tx(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 x8(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 lA(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=sA(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=_8(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=oh(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,a),tx:l.tx,ty:l.ty}}function _8(t,e){return t/(e===void 0?1:e)}function oh(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 sA(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 w8(t,e){var r,a,i,n,o,l,s,f,c,v,u,h,d;function p(w,g){return w.pxmid[1]-g.pxmid[1]}function y(w,g){return g.pxmid[1]-w.pxmid[1]}function m(w,g){g||(g={});var x=g.labelExtraY+(a?g.yLabelMax:g.yLabelMin),_=a?w.yLabelMin:w.yLabelMax,T=a?w.yLabelMax:w.yLabelMin,k=w.cyFinal+o(w.px0[1],w.px1[1]),S=x-_,A,D,M,C,$,F;if(S*s>0&&(w.labelExtraY=S),!!Array.isArray(e.pull))for(D=0;D<v.length;D++)M=v[D],!(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-_-w.labelExtraY,S*s>0&&(w.labelExtraY+=S)):(T+w.labelExtraY-k)*s>0&&(A=3*l*Math.abs(D-v.indexOf(w)),$=M.cxFinal+n(M.px0[0],M.px1[0]),F=$+A-(w.cxFinal+w.pxmid[0])-w.labelExtraX,F*l>0&&(w.labelExtraX+=F)))}for(a=0;a<2;a++)for(i=a?p:y,o=a?Math.max:Math.min,s=a?1:-1,r=0;r<2;r++){for(n=r?Math.max:Math.min,l=r?1:-1,f=t[a][r],f.sort(i),c=t[1-a][r],v=c.concat(f),h=[],u=0;u<f.length;u++)f[u].yLabelMid!==void 0&&h.push(f[u]);for(d=!1,u=0;a&&u<c.length;u++)if(c[u].yLabelMid!==void 0){d=c[u];break}for(u=0;u<h.length;u++){var b=u&&h[u-1];d&&!u&&(b=d),m(h[u],b)}}}function fA(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-=oh(i,e));var f=l/2,c=s/2;n.type==="funnelarea"&&!n.scalegroup&&(c/=n.aspectratio),i.r=Math.min(f,c)/(1+sA(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-=oh(i,e)),n.scalegroup&&r.indexOf(n.scalegroup)===-1&&r.push(n.scalegroup)}T8(t,r)}function T8(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 k8(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=Sf(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=Sf(r,i),f.midangle=i,i+=n*f.v/2,c=Sf(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=b8(f,e))}function Sf(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function cA(t,e,r){var a=t._fullLayout,i=r.trace,n=i.texttemplate,o=i.textinfo;if(!n&&o&&o!=="none"){var l=o.split("+"),s=function(g){return l.indexOf(g)!==-1},f=s("label"),c=s("text"),v=s("value"),u=s("percent"),h=a.separators,d;if(d=f?[e.label]:[],c){var p=wt.getFirstFilled(i.text,e.pts);xx(p)&&d.push(p)}v&&d.push(wt.formatPieValue(e.v,h)),u&&d.push(wt.formatPiePercent(e.v/r.vTotal,h)),e.text=d.join("<br>")}function y(g){return{label:g.label,value:g.v,valueLabel:wt.formatPieValue(g.v,a.separators),percent:g.v/r.vTotal,percentLabel:wt.formatPiePercent(g.v/r.vTotal,a.separators),color:g.color,text:g.text,customdata:ur.castOption(i,g.i,"customdata")}}if(n){var m=ur.castOption(i,e.i,"texttemplate");if(!m)e.text="";else{var b=y(e),w=wt.getFirstFilled(i.text,e.pts);(xx(w)||w==="")&&(b.text=w),e.text=ur.texttemplateString(m,b,t._fullLayout._d3locale,b,i._meta||{})}}}function uA(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 vA={plot:p8,formatSliceLabel:cA,transformInsideText:aA,determineInsideTextFont:tA,positionTitleOutside:lA,prerenderTitles:rA,layoutAreas:fA,attachFxHandlers:eA,computeTransform:uA},kx=nt.exports,A8=Yh,M8=Za.resizeText,S8=function(e){var r=e._fullLayout._pielayer.selectAll(".trace");M8(e,r,"pie"),r.each(function(a){var i=a[0],n=i.trace,o=kx.select(this);o.style({opacity:n.opacity}),o.selectAll("path.surface").each(function(l){kx.select(this).call(A8,l,n)})})},dA={};(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)}})(dA);var L8={attributes:qc,supplyDefaults:e8.supplyDefaults,supplyLayoutDefaults:a8,layoutAttributes:Yk,calc:nc.calc,crossTraceCalc:nc.crossTraceCalc,plot:vA.plot,style:S8,styleOne:Yh,moduleType:"trace",name:"pie",basePlotModule:dA,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=L8})(Xk);const $O=gi(Xk.exports);var hA={exports:{}},pA={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}},Lf=ve.exports.extendFlat,Cf=gn,Ax=Do.axisHoverFormat,lh=ma.dash,C8=vc,mA=pA,D8=mA.INCREASING.COLOR,$8=mA.DECREASING.COLOR,oc=Cf.line;function Mx(t){return{line:{color:Lf({},oc.color,{dflt:t}),width:oc.width,dash:lh,editType:"style"},editType:"style"}}var yA={xperiod:Cf.xperiod,xperiod0:Cf.xperiod0,xperiodalignment:Cf.xperiodalignment,xhoverformat:Ax("x"),yhoverformat:Ax("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:Lf({},oc.width,{description:[oc.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:Lf({},lh,{description:[lh.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:Mx(D8),decreasing:Mx($8),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:Lf({},C8.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}})},P8=Ze,R8=ve.exports,E8=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=P8.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,R8.minRowLength(n))),r._length=v,v}},z8=ve.exports,I8=E8,N8=jc,F8=yA,H8=function(e,r,a,i){function n(l,s){return z8.coerce(e,r,F8,l,s)}var o=I8(e,r,n,i);if(!o){r.visible=!1;return}N8(e,r,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),Sx(e,r,n,"increasing"),Sx(e,r,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),i._requestRangeslider[r.xaxis]=!0};function Sx(t,e,r,a){r(a+".line.color"),r(a+".line.width",e.line.width),r(a+".line.dash",e.line.dash)}var Zc=ve.exports,of=Zc._,Df=Mt.exports,O8=Gc,nl=Ot.BADNUM;function B8(t,e){var r=Df.getFromId(t,e.xaxis),a=Df.getFromId(t,e.yaxis),i=G8(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=gA(t,e,o,l,a,j8);return e._extremes[r._id]=Df.findExtremes(r,l,{vpad:n/2}),s.length?(Zc.extendFlat(s[0].t,{wHover:n/2,tickLen:i}),s):[{t:{empty:!0}}]}function j8(t,e,r,a){return{o:t,h:e,l:r,c:a}}function gA(t,e,r,a,i,n){for(var o=i.makeCalcdata(e,"open"),l=i.makeCalcdata(e,"high"),s=i.makeCalcdata(e,"low"),f=i.makeCalcdata(e,"close"),c=Array.isArray(e.text),v=Array.isArray(e.hovertext),u=!0,h=null,d=!!e.xperiodalignment,p=[],y=0;y<a.length;y++){var m=a[y],b=o[y],w=l[y],g=s[y],x=f[y];if(m!==nl&&b!==nl&&w!==nl&&g!==nl&&x!==nl){x===b?h!==null&&x!==h&&(u=x>h):u=x>b,h=x;var _=n(b,w,g,x);_.pos=m,_.yc=(b+x)/2,_.i=y,_.dir=u?"increasing":"decreasing",_.x=_.pos,_.y=[g,w],d&&(_.orig_p=r[y]),c&&(_.tx=e.text[y]),v&&(_.htx=e.hovertext[y]),p.push(_)}else p.push({pos:m,empty:!0})}return e._extremes[i._id]=Df.findExtremes(i,Zc.concat(s,l),{padded:!0}),p.length&&(p[0].t={labels:{open:of(t,"open:")+" ",high:of(t,"high:")+" ",low:of(t,"low:")+" ",close:of(t,"close:")+" "}}),p}function G8(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=O8(r,e,"x",s).vals;l._xcalc=f;var c=Zc.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 U8={calc:B8,calcCommon:gA},V8=nt.exports,Lx=ve.exports,X8=function(e,r,a,i){var n=r.yaxis,o=r.xaxis,l=!!o.rangebreaks;Lx.makeTraceGroups(i,a,"trace ohlc").each(function(s){var f=V8.select(this),c=s[0],v=c.t,u=c.trace;if(u.visible!==!0||v.empty){f.remove();return}var h=v.tickLen,d=f.selectAll("path").data(Lx.identity);d.enter().append("path"),d.exit().remove(),d.attr("d",function(p){if(p.empty)return"M0,0Z";var y=o.c2p(p.pos-h,!0),m=o.c2p(p.pos+h,!0),b=l?(y+m)/2:o.c2p(p.pos,!0),w=n.c2p(p.o,!0),g=n.c2p(p.h,!0),x=n.c2p(p.l,!0),_=n.c2p(p.c,!0);return"M"+y+","+w+"H"+b+"M"+b+","+g+"V"+x+"M"+m+","+_+"H"+b})})},Wv=nt.exports,W8=_t.exports,Y8=rt.exports,q8=function(e,r,a){var i=a||Wv.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;Wv.select(this).selectAll("path").each(function(l){if(!l.empty){var s=o[l.dir].line;Wv.select(this).style("fill","none").call(Y8.stroke,s.color).call(W8.dashLine,s.dash,s.width).style("opacity",o.selectedpoints&&!l.selected?.3:1)}})})},sh=Mt.exports,Z8=ve.exports,lf=pa,K8=rt.exports,Q8=ve.exports.fillText,Cx=pA,J8={increasing:Cx.INCREASING.SYMBOL,decreasing:Cx.DECREASING.SYMBOL};function eH(t,e,r,a){var i=t.cd,n=i[0].trace;return n.hoverlabel.split?xA(t,e,r,a):_A(t,e,r,a)}function bA(t,e,r,a){var i=t.cd,n=t.xa,o=i[0].trace,l=i[0].t,s=o.type,f=s==="ohlc"?"l":"min",c=s==="ohlc"?"h":"max",v,u,h=l.bPos||0,d=function(A){return A.pos+h-e},p=l.bdPos||l.tickLen,y=l.wHover,m=Math.min(1,p/Math.abs(n.r2c(n.range[1])-n.r2c(n.range[0])));v=t.maxHoverDistance-m,u=t.maxSpikeDistance-m;function b(A){var D=d(A);return lf.inbox(D-y,D+y,v)}function w(A){var D=A[f],M=A[c];return D===M||lf.inbox(D-r,M-r,v)}function g(A){return(b(A)+w(A))/2}var x=lf.getDistanceFunction(a,b,w,g);if(lf.getClosest(i,x,t),t.index===!1)return null;var _=i[t.index];if(_.empty)return null;var T=_.dir,k=o[T],S=k.line.color;return K8.opacity(S)&&k.line.width?t.color=S:t.color=k.fillcolor,t.x0=n.c2p(_.pos+h-p,!0),t.x1=n.c2p(_.pos+h+p,!0),t.xLabelVal=_.orig_p!==void 0?_.orig_p:_.pos,t.spikeDistance=g(_)*u/v,t.xSpike=n.c2p(_.pos,!0),t}function xA(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=[],f=bA(t,e,r,a);if(!f)return[];var c=f.index,v=i[c],u=v.hi||o.hoverinfo,h=u.split("+"),d=u==="all",p=d||h.indexOf("y")!==-1;if(!p)return[];for(var y=["high","open","close","low"],m={},b=0;b<y.length;b++){var w=y[b],g=o[w][f.index],x=n.c2p(g,!0),_;g in m?(_=m[g],_.yLabel+="<br>"+l.labels[w]+sh.hoverLabelText(n,g,o.yhoverformat)):(_=Z8.extendFlat({},f),_.y0=_.y1=x,_.yLabelVal=g,_.yLabel=l.labels[w]+sh.hoverLabelText(n,g,o.yhoverformat),_.name="",s.push(_),m[g]=_)}return s}function _A(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=bA(t,e,r,a);if(!s)return[];var f=s.index,c=i[f],v=s.index=c.i,u=c.dir;function h(g){return l.labels[g]+sh.hoverLabelText(n,o[g][v],o.yhoverformat)}var d=c.hi||o.hoverinfo,p=d.split("+"),y=d==="all",m=y||p.indexOf("y")!==-1,b=y||p.indexOf("text")!==-1,w=m?[h("open"),h("high"),h("low"),h("close")+" "+J8[u]]:[];return b&&Q8(c,o,w),s.extraText=w.join("<br>"),s.y0=s.y1=n.c2p(c.yc,!0),[s]}var tH={hoverPoints:eH,hoverSplit:xA,hoverOnPoints:_A},rH=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},aH={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:yA,supplyDefaults:H8,calc:U8.calc,plot:X8,style:q8,hoverPoints:tH.hoverPoints,selectPoints:rH};(function(t){t.exports=aH})(hA);const PO=gi(hA.exports);var wA={exports:{}},iH=Ze,na=ve.exports,nH=p2;function oH(t,e,r,a){var i=t.cd,n=i[0].t,o=i[0].trace,l=t.xa,s=t.ya,f=n.x,c=n.y,v=l.c2p(e),u=s.c2p(r),h=t.distance,d;if(n.tree){var p=l.p2c(v-h),y=l.p2c(v+h),m=s.p2c(u-h),b=s.p2c(u+h);a==="x"?d=n.tree.range(Math.min(p,y),Math.min(s._rl[0],s._rl[1]),Math.max(p,y),Math.max(s._rl[0],s._rl[1])):d=n.tree.range(Math.min(p,y),Math.min(m,b),Math.max(p,y),Math.max(m,b))}else d=n.ids;var w,g,x,_,T,k,S,A,D,M=h;if(a==="x"){var C=!!o.xperiodalignment,$=!!o.yperiodalignment;for(T=0;T<d.length;T++){if(w=d[T],x=f[w],k=Math.abs(l.c2p(x)-v),C){var F=l.c2p(o._xStarts[w]),R=l.c2p(o._xEnds[w]);k=v>=Math.min(F,R)&&v<=Math.max(F,R)?0:1/0}if(k<M){if(M=k,_=c[w],S=s.c2p(_)-u,$){var P=s.c2p(o._yStarts[w]),E=s.c2p(o._yEnds[w]);S=u>=Math.min(P,E)&&u<=Math.max(P,E)?0:1/0}D=Math.sqrt(k*k+S*S),g=d[T]}}}else for(T=d.length-1;T>-1;T--)w=d[T],x=f[w],_=c[w],k=l.c2p(x)-v,S=s.c2p(_)-u,A=Math.sqrt(k*k+S*S),A<M&&(M=D=A,g=w);return t.index=g,t.distance=M,t.dxy=D,g===void 0?[t]:[TA(t,f,c,o)]}function TA(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=na.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=na.isArrayOrTypedArray(v.size)?v.size[s]:v.size,f.mo=na.isArrayOrTypedArray(v.opacity)?v.opacity[s]:v.opacity,f.mx=na.isArrayOrTypedArray(v.symbol)?v.symbol[s]:v.symbol,f.ma=na.isArrayOrTypedArray(v.angle)?v.angle[s]:v.angle,f.mc=na.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=na.isArrayOrTypedArray(u.width)?u.width[s]:u.width);var h=v&&v.gradient;h&&h.type!=="none"&&(f.mgt=Array.isArray(h.type)?h.type[s]:h.type,f.mgc=Array.isArray(h.color)?h.color[s]:h.color);var d=i.c2p(f.x,!0),p=n.c2p(f.y,!0),y=f.mrc||1,m=a.hoverlabel;m&&(f.hbg=Array.isArray(m.bgcolor)?m.bgcolor[s]:m.bgcolor,f.hbc=Array.isArray(m.bordercolor)?m.bordercolor[s]:m.bordercolor,f.hts=na.isArrayOrTypedArray(m.font.size)?m.font.size[s]:m.font.size,f.htc=Array.isArray(m.font.color)?m.font.color[s]:m.font.color,f.htf=Array.isArray(m.font.family)?m.font.family[s]:m.font.family,f.hnl=na.isArrayOrTypedArray(m.namelength)?m.namelength[s]:m.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 g={};g[t.index]=f;var x=a._origX,_=a._origY,T=na.extendFlat({},t,{color:nH(a,f),x0:d-y,x1:d+y,xLabelVal:x?x[s]:f.x,y0:p-y,y1:p+y,yLabelVal:_?_[s]:f.y,cd:g,distance:o,spikeDistance:l,hovertemplate:f.ht});return f.htx?T.text=f.htx:f.tx?T.text=f.tx:a.text&&(T.text=a.text),na.fillText(f,a,T),iH.getComponentMethod("errorbars","hoverInfo")(f,a,T),T}var lH={hoverPoints:oH,calcHover:TA},Zp={exports:{}},Dx=20,Kc={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:Dx,SYMBOL_STROKE:Dx/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]}},sH=Ca,Rt=gn,$x=Do.axisHoverFormat,Px=dn,fH=Ah,Yv=Ft.extendFlat,cH=Xa.overrideAll,uH=Kc.DASHES,Rx=Rt.line,Oa=Rt.marker,vH=Oa.line,io=Zp.exports=cH({x:Rt.x,x0:Rt.x0,dx:Rt.dx,y:Rt.y,y0:Rt.y0,dy:Rt.dy,xperiod:Rt.xperiod,yperiod:Rt.yperiod,xperiod0:Rt.xperiod0,yperiod0:Rt.yperiod0,xperiodalignment:Rt.xperiodalignment,yperiodalignment:Rt.yperiodalignment,xhoverformat:$x("x"),yhoverformat:$x("y"),text:Rt.text,hovertext:Rt.hovertext,textposition:Rt.textposition,textfont:Rt.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:Rx.color,width:Rx.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:fH(uH),dflt:"solid",description:"Sets the style of the lines."}},marker:Yv({},Px("marker"),{symbol:Oa.symbol,angle:Oa.angle,size:Oa.size,sizeref:Oa.sizeref,sizemin:Oa.sizemin,sizemode:Oa.sizemode,opacity:Oa.opacity,colorbar:Oa.colorbar,line:Yv({},Px("marker.line"),{width:vH.width})}),connectgaps:Rt.connectgaps,fill:Yv({},Rt.fill,{dflt:"none"}),fillcolor:Rt.fillcolor,selected:{marker:Rt.selected.marker,textfont:Rt.selected.textfont},unselected:{marker:Rt.unselected.marker,textfont:Rt.unselected.textfont},opacity:sH.opacity},"calc","nested");io.x.editType=io.y.editType=io.x0.editType=io.y0.editType="calc+clearAxisTypes";io.hovertemplate=Rt.hovertemplate;io.texttemplate=Rt.texttemplate;var Qc={},kA=Kc;Qc.isOpenSymbol=function(t){return typeof t=="string"?kA.OPEN_RE.test(t):t%200>100};Qc.isDotSymbol=function(t){return typeof t=="string"?kA.DOT_RE.test(t):t>200};var Ex=ve.exports,dH=Ze,hH=Qc,pH=Zp.exports,mH=Oc,sf=pr,yH=Lp,gH=jc,bH=KT,xH=QT,_H=e2,wH=JT,TH=function(e,r,a,i){function n(h,d){return Ex.coerce(e,r,pH,h,d)}var o=e.marker?hH.isOpenSymbol(e.marker.symbol):!1,l=sf.isBubble(e),s=yH(e,r,i,n);if(!s){r.visible=!1;return}gH(e,r,i,n),n("xhoverformat"),n("yhoverformat");var f=s<mH.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("hovertemplate"),n("mode",f),sf.hasLines(r)&&(n("connectgaps"),xH(e,r,a,i,n),n("line.shape")),sf.hasMarkers(r)&&(bH(e,r,a,i,n,{noAngleRef:!0,noStandOff:!0}),n("marker.line.width",o||l?1:0)),sf.hasText(r)&&(n("texttemplate"),wH(e,r,i,n));var c=(r.line||{}).color,v=(r.marker||{}).color;n("fill"),r.fill!=="none"&&_H(e,r,a,n);var u=dH.getComponentMethod("errorbars","supplyDefaults");u(e,r,c||v||a,{axis:"y"}),u(e,r,c||v||a,{axis:"x",inherit:"y"}),Ex.coerceSelectionMarkerOpacity(r,n)},kH=h2,AH=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]),kH(e,r,a)},AA=ct,MH=Jr.exports,lc=k1,sc=uo,SH=hr.defaultLine,zx=Cr.isArrayOrTypedArray,fh=lc(SH),MA=1;function Ix(t,e){var r=t;return r[3]*=e,r}function Nx(t){if(AA(t))return fh;var e=lc(t);return e.length?e:fh}function Fx(t){return AA(t)?t:MA}function LH(t,e,r){var a=t.color,i=zx(a),n=zx(e),o=sc.extractOpts(t),l=[],s,f,c,v,u;if(o.colorscale!==void 0?s=sc.makeColorScaleFuncFromTrace(t):s=Nx,i?f=function(d,p){return d[p]===void 0?fh:lc(s(d[p]))}:f=Nx,n?c=function(d,p){return d[p]===void 0?MA:Fx(d[p])}:c=Fx,i||n)for(var h=0;h<r;h++)v=f(a,h),u=c(e,h),l[h]=Ix(v,u);else l=Ix(lc(a),e);return l}function CH(t){var e=sc.extractOpts(t),r=e.colorscale;return e.reversescale&&(r=sc.flipScale(e.colorscale)),r.map(function(a){var i=a[0],n=MH(a[1]),o=n.toRgb();return{index:i,rgb:[o.r,o.g,o.b,o.a]}})}var DH={formatColor:LH,parseColorScale:CH},$f=ct,$H=QA,ff=k1,PH=Ze,Mr=ve.exports,Zn=_t.exports,Hx=Vt,Ox=DH.formatColor,fo=pr,RH=V_,ch=Qc,ss=Kc,EH=Wl.DESELECTDIM,Bx={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},zH=ea.appendArrayPointValue;function IH(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(fo.hasText(e)&&(a.text=SA(t,e),a.textSel=jx(t,e,e.selected),a.textUnsel=jx(t,e,e.unselected)),fo.hasMarkers(e)&&(a.marker=Kp(t,e),a.markerSel=uh(t,e,e.selected),a.markerUnsel=uh(t,e,e.unselected),!e.unselected&&Mr.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]=EH*n[r]}if(fo.hasLines(e)){a.line={overlay:!0,thickness:e.line.width*i,color:e.line.color,opacity:e.opacity};var o=(ss.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=Gx(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(a.errorY=Gx(e,e.error_y,i)),!!e.fill&&e.fill!=="none"&&(a.fill={closed:!0,fill:e.fillcolor,thickness:0}),a}function SA(t,e){var r=t._fullLayout,a=e._length,i=e.textfont,n=e.textposition,o=Array.isArray(n)?n:[n],l=i.color,s=i.size,f=i.family,c={},v,u=t._context.plotGlPixelRatio,h=e.texttemplate;if(h){c.text=[];var d=r._d3locale,p=Array.isArray(h),y=p?Math.min(h.length,a):a,m=p?function(k){return h[k]}:function(){return h};for(v=0;v<y;v++){var b={i:v},w=e._module.formatLabels(b,e,r),g={};zH(g,e,v);var x=e._meta||{};c.text.push(Mr.texttemplateString(m(v),w,d,g,b,x))}}else Array.isArray(e.text)&&e.text.length<a?c.text=e.text.slice():c.text=e.text;if(Array.isArray(c.text))for(v=c.text.length;v<a;v++)c.text[v]="";for(c.opacity=e.opacity,c.font={},c.align=[],c.baseline=[],v=0;v<o.length;v++){var _=o[v].split(/\s+/);switch(_[1]){case"left":c.align.push("right");break;case"right":c.align.push("left");break;default:c.align.push(_[1])}switch(_[0]){case"top":c.baseline.push("bottom");break;case"bottom":c.baseline.push("top");break;default:c.baseline.push(_[0])}}if(Array.isArray(l))for(c.color=new Array(a),v=0;v<a;v++)c.color[v]=l[v];else c.color=l;if(Mr.isArrayOrTypedArray(s)||Array.isArray(f))for(c.font=new Array(a),v=0;v<a;v++){var T=c.font[v]={};T.size=(Mr.isTypedArray(s)?s[v]:Array.isArray(s)?$f(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 Kp(t,e){var r=e._length,a=e.marker,i={},n,o=Mr.isArrayOrTypedArray(a.symbol),l=Mr.isArrayOrTypedArray(a.angle),s=Mr.isArrayOrTypedArray(a.color),f=Mr.isArrayOrTypedArray(a.line.color),c=Mr.isArrayOrTypedArray(a.opacity),v=Mr.isArrayOrTypedArray(a.size),u=Mr.isArrayOrTypedArray(a.line.width),h;if(o||(h=ch.isOpenSymbol(a.symbol)),o||s||f||c||l){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var d=a.symbol,p=a.angle,y=Ox(a,a.opacity,r),m=Ox(a.line,a.opacity,r);if(!Array.isArray(m[0])){var b=m;for(m=Array(r),n=0;n<r;n++)m[n]=b}if(!Array.isArray(y[0])){var w=y;for(y=Array(r),n=0;n<r;n++)y[n]=w}if(!Array.isArray(d)){var g=d;for(d=Array(r),n=0;n<r;n++)d[n]=g}if(!Array.isArray(p)){var x=p;for(p=Array(r),n=0;n<r;n++)p[n]=x}for(i.symbols=d,i.angles=p,i.colors=y,i.borderColors=m,n=0;n<r;n++)o&&(h=ch.isOpenSymbol(a.symbol[n])),h&&(m[n]=y[n].slice(),y[n]=y[n].slice(),y[n][3]=0);for(i.opacity=e.opacity,i.markers=new Array(r),n=0;n<r;n++)i.markers[n]=Xx({mx:i.symbols[n],ma:i.angles[n]},e)}else h?(i.color=ff(a.color,"uint8"),i.color[3]=0,i.borderColor=ff(a.color,"uint8")):(i.color=ff(a.color,"uint8"),i.borderColor=ff(a.line.color,"uint8")),i.opacity=e.opacity*a.opacity,i.marker=Xx({mx:a.symbol,ma:a.angle},e);var _=1,T=RH(e,_),k;if(v||u){var S=i.sizes=new Array(r),A=i.borderSizes=new Array(r),D=0,M;if(v){for(n=0;n<r;n++)S[n]=T(a.size[n]),D+=S[n];M=D/r}else for(k=T(a.size),n=0;n<r;n++)S[n]=k;if(u)for(n=0;n<r;n++)A[n]=a.line.width[n];else for(k=a.line.width,n=0;n<r;n++)A[n]=k;i.sizeAvg=M}else i.size=T(a&&a.size||10),i.borderSizes=T(a.line.width);return i}function uh(t,e,r){var a=e.marker,i={};return r&&(r.marker&&r.marker.symbol?i=Kp(t,Mr.extendFlat({},a,r.marker)):r.marker&&(r.marker.size&&(i.size=r.marker.size),r.marker.color&&(i.colors=r.marker.color),r.marker.opacity!==void 0&&(i.opacity=r.marker.opacity))),i}function jx(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:Mr.extendFlat({},e.textfont)};r.textfont&&Mr.extendFlat(i.textfont,r.textfont),a=SA(t,i)}return a}function Gx(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 Ux=ss.SYMBOL_SDF_SIZE,Oi=ss.SYMBOL_SIZE,Vx=ss.SYMBOL_STROKE,qv={},NH=Zn.symbolFuncs[0](Oi*.05);function Xx(t,e){var r=t.mx;if(r==="circle")return null;var a,i,n=Zn.symbolNumber(r),o=Zn.symbolFuncs[n%100],l=!!Zn.symbolNoDot[n%100],s=!!Zn.symbolNoFill[n%100],f=ch.isDotSymbol(r);if(t.ma&&(r+="_"+t.ma),qv[r])return qv[r];var c=Zn.getMarkerAngle(t,e);return f&&!l?a=o(Oi*1.1,c)+NH:a=o(Oi,c),i=$H(a,{w:Ux,h:Ux,viewBox:[-Oi,-Oi,Oi,Oi],stroke:s?Vx:-Vx}),qv[r]=i,i||null}function FH(t,e,r){var a=r.length,i=a/2,n,o;if(fo.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>ss.TOO_MANY_POINTS||fo.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 HH(t,e,r,a,i){var n=PH.getComponentMethod("errorbars","makeComputeError"),o=Hx.getFromId(t,e.xaxis,"x"),l=Hx.getFromId(t,e.yaxis,"y"),s=r.length/2,f={};function c(v,u){var h=u._id.charAt(0),d=e["error_"+h];if(d&&d.visible&&(u.type==="linear"||u.type==="log")){for(var p=n(d),y={x:0,y:1}[h],m={x:[0,1,2,3],y:[2,3,0,1]}[h],b=new Float64Array(4*s),w=1/0,g=-1/0,x=0,_=0;x<s;x++,_+=4){var T=v[x];if($f(T)){var k=r[x*2+y],S=p(T,x),A=S[0],D=S[1];if($f(A)&&$f(D)){var M=T-A,C=T+D;b[_+m[0]]=k-u.c2l(M),b[_+m[1]]=u.c2l(C)-k,b[_+m[2]]=0,b[_+m[3]]=0,w=Math.min(w,T-A),g=Math.max(g,T+D)}}}f[h]={positions:r,errors:b,_bnds:[w,g]}}}return c(a,o),c(i,l),f}function OH(t,e,r,a){var i=e._length,n={},o;if(fo.hasMarkers(e)){var l=r.font,s=r.align,f=r.baseline;for(n.offset=new Array(i),o=0;o<i;o++){var c=a.sizes?a.sizes[o]:a.size,v=Array.isArray(l)?l[o].size:l.size,u=Array.isArray(s)?s.length>1?s[o]:s[0]:s,h=Array.isArray(f)?f.length>1?f[o]:f[0]:f,d=Bx[u],p=Bx[h],y=c?c/.8+1:0,m=-p*y-p*.5;n.offset[o]=[d*y/v,m/v]}}return n}var BH={style:IH,markerStyle:Kp,markerSelection:uh,linePositions:FH,errorBarPositions:HH,textPosition:OH},cf=ve.exports,jH=function(e,r){var a=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},n={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(a=r._scene={},a.init=function(){cf.extendFlat(a,n,i)},a.init(),a.update=function(l){var s=cf.repeat(l,a.count);if(a.fill2d&&a.fill2d.update(s),a.scatter2d&&a.scatter2d.update(s),a.line2d&&a.line2d.update(s),a.error2d&&a.error2d.update(s.concat(s)),a.select2d&&a.select2d.update(s),a.glText)for(var f=0;f<a.count;f++)a.glText[f].update(l)},a.draw=function(){for(var l=a.count,s=a.fill2d,f=a.error2d,c=a.line2d,v=a.scatter2d,u=a.glText,h=a.select2d,d=a.selectBatch,p=a.unselectBatch,y=0;y<l;y++){if(s&&a.fillOrder[y]&&s.draw(a.fillOrder[y]),c&&a.lineOptions[y]&&c.draw(y),f&&(a.errorXOptions[y]&&f.draw(y),a.errorYOptions[y]&&f.draw(y+l)),v&&a.markerOptions[y])if(p[y].length){var m=cf.repeat([],a.count);m[y]=p[y],v.draw(m)}else d[y].length||v.draw(y);u[y]&&a.textOptions[y]&&u[y].render()}h&&h.draw(d),a.dirty=!1},a.destroy=function(){a.fill2d&&a.fill2d.destroy&&a.fill2d.destroy(),a.scatter2d&&a.scatter2d.destroy&&a.scatter2d.destroy(),a.error2d&&a.error2d.destroy&&a.error2d.destroy(),a.line2d&&a.line2d.destroy&&a.line2d.destroy(),a.select2d&&a.select2d.destroy&&a.select2d.destroy(),a.glText&&a.glText.forEach(function(l){l.destroy&&l.destroy()}),a.lineOptions=null,a.fillOptions=null,a.markerOptions=null,a.markerSelectedOptions=null,a.markerUnselectedOptions=null,a.errorXOptions=null,a.errorYOptions=null,a.textOptions=null,a.textSelectedOptions=null,a.textUnselectedOptions=null,a.selectBatch=null,a.unselectBatch=null,r._scene=null}),a.dirty||cf.extendFlat(a,i),a},GH=JA.exports,Bn=ve.exports,Wx=Vt,UH=Ql.findExtremes,Yx=Gc,Qp=Dp,VH=Qp.calcMarkerSize,XH=Qp.calcAxisExpansion,WH=Qp.setFirstScatter,YH=a2,jn=BH,qH=jH,qx=Ot.BADNUM,ZH=Kc.TOO_MANY_POINTS,KH=function(e,r){var a=e._fullLayout,i=r._xA=Wx.getFromId(e,r.xaxis,"x"),n=r._yA=Wx.getFromId(e,r.yaxis,"y"),o=a._plots[r.xaxis+r.yaxis],l=r._length,s=l>=ZH,f=l*2,c={},v,u=i.makeCalcdata(r,"x"),h=n.makeCalcdata(r,"y"),d=Yx(r,i,"x",u),p=Yx(r,n,"y",h),y=d.vals,m=p.vals;r._x=y,r._y=m,r.xperiodalignment&&(r._origX=u,r._xStarts=d.starts,r._xEnds=d.ends),r.yperiodalignment&&(r._origY=h,r._yStarts=p.starts,r._yEnds=p.ends);var b=new Array(f),w=new Array(l);for(v=0;v<l;v++)b[v*2]=y[v]===qx?NaN:y[v],b[v*2+1]=m[v]===qx?NaN:m[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=GH(b):c.ids=w,YH(e,r);var g=QH(e,o,r,b,y,m),x=qH(e,o);WH(a,r);var _;return s?g.marker&&(_=g.marker.sizeAvg||Math.max(g.marker.size,3)):_=VH(r,l),XH(e,r,i,n,y,m,_),g.errorX&&Zx(r,i,g.errorX),g.errorY&&Zx(r,n,g.errorY),g.fill&&!x.fill2d&&(x.fill2d=!0),g.marker&&!x.scatter2d&&(x.scatter2d=!0),g.line&&!x.line2d&&(x.line2d=!0),(g.errorX||g.errorY)&&!x.error2d&&(x.error2d=!0),g.text&&!x.glText&&(x.glText=!0),g.marker&&(g.marker.snap=l),x.lineOptions.push(g.line),x.errorXOptions.push(g.errorX),x.errorYOptions.push(g.errorY),x.fillOptions.push(g.fill),x.markerOptions.push(g.marker),x.markerSelectedOptions.push(g.markerSel),x.markerUnselectedOptions.push(g.markerUnsel),x.textOptions.push(g.text),x.textSelectedOptions.push(g.textSel),x.textUnselectedOptions.push(g.textUnsel),x.selectBatch.push([]),x.unselectBatch.push([]),c._scene=x,c.index=x.count,c.x=y,c.y=m,c.positions=b,x.count++,[{x:!1,y:!1,t:c,trace:r}]};function Zx(t,e,r){var a=t._extremes[e._id],i=UH(e,r._bnds,{padded:!0});a.min=a.min.concat(i.min),a.max=a.max.concat(i.max)}function QH(t,e,r,a,i,n){var o=jn.style(t,r);if(o.marker&&(o.marker.positions=a),o.line&&a.length>1&&Bn.extendFlat(o.line,jn.linePositions(t,r,a)),o.errorX||o.errorY){var l=jn.errorBarPositions(t,r,a,i,n);o.errorX&&Bn.extendFlat(o.errorX,l.x),o.errorY&&Bn.extendFlat(o.errorY,l.y)}return o.text&&(Bn.extendFlat(o.text,{positions:a},jn.textPosition(t,r,o.text,o.marker)),Bn.extendFlat(o.textSel,{positions:a},jn.textPosition(t,r,o.text,o.markerSel)),Bn.extendFlat(o.textUnsel,{positions:a},jn.textPosition(t,r,o.text,o.markerUnsel))),o}var JH=ve.exports,e7=rt.exports,t7=Wl.DESELECTDIM;function r7(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=JH.extendFlat({},s),u,h;if(o.length||l.length){var d=f.color,p=c.color,y=s.color,m=Array.isArray(y);for(v.color=new Array(r._length),u=0;u<o.length;u++)h=o[u],v.color[h]=d||(m?y[h]:y);for(u=0;u<l.length;u++){h=l[u];var b=m?y[h]:y;v.color[h]=p||(d?b:e7.addOpacity(b,t7))}}i.glText[n].update(v)}var LA={styleTextSelection:r7},Kx=pr,a7=LA.styleTextSelection,i7=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s=a[0].t,f=l._length,c=s.x,v=s.y,u=s._scene,h=s.index;if(!u)return o;var d=Kx.hasText(l),p=Kx.hasMarkers(l),y=!p&&!d;if(l.visible!==!0||y)return o;var m=[],b=[];if(r!==!1&&!r.degenerate)for(var w=0;w<f;w++)r.contains([s.xpx[w],s.ypx[w]],!1,w,e)?(m.push(w),o.push({pointNumber:w,x:i.c2d(c[w]),y:n.c2d(v[w])})):b.push(w);if(p){var g=u.scatter2d;if(!m.length&&!b.length){var x=new Array(u.count);x[h]=u.markerOptions[h],g.update.apply(g,x)}else if(!u.selectBatch[h].length&&!u.unselectBatch[h].length){var _=new Array(u.count);_[h]=u.markerUnselectedOptions[h],g.update.apply(g,_)}}return u.selectBatch[h]=m,u.unselectBatch[h]=b,d&&a7(a),o},n7=lH,o7={moduleType:"trace",name:"scattergl",basePlotModule:Yt,categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:Zp.exports,supplyDefaults:TH,crossTraceDefaults:t2,colorbar:as,formatLabels:AH,calc:KH,hoverPoints:n7.hoverPoints,selectPoints:i7,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(" ")}},CA={exports:{}},Qx=rt.exports,l7=function(){},s7=function(e){for(var r in e)typeof e[r]=="function"&&(e[r]=l7);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=Qx.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=Qx.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},f7=s7,c7=eM.exports,u7=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=c7({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||lM.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||f7({container:i._glcontainer.node()}),n},Jx=tM,e1=rM,v7=aM,t1=iM,Zv=ve.exports,d7=pn.selectMode,h7=u7,p7=pr,m7=v2,y7=LA.styleTextSelection,DA={};function g7(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 b7=CA.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=h7(e,["ANGLE_instanced_arrays","OES_element_index_uint"],DA);if(!c){n.init();return}var v=n.count,u=i._glcanvas.data()[0].regl;if(m7(e,r,a),n.dirty){if(n.error2d===!0&&(n.error2d=v7(u)),n.line2d===!0&&(n.line2d=e1(u)),n.scatter2d===!0&&(n.scatter2d=Jx(u)),n.fill2d===!0&&(n.fill2d=e1(u)),n.glText===!0)for(n.glText=new Array(v),s=0;s<v;s++)n.glText[s]=new t1(u);if(n.glText){if(v>n.glText.length){var h=v-n.glText.length;for(s=0;s<h;s++)n.glText.push(new t1(u))}else if(v<n.glText.length){var d=n.glText.length-v,p=n.glText.splice(v,d);p.forEach(function(L){L.destroy()})}for(s=0;s<v;s++)n.glText[s].update(n.textOptions[s])}if(n.line2d&&(n.line2d.update(n.lineOptions),n.lineOptions=n.lineOptions.map(function(L){if(L&&L.positions){for(var z=L.positions,I=0;I<z.length&&(isNaN(z[I])||isNaN(z[I+1]));)I+=2;for(var H=z.length-2;H>I&&(isNaN(z[H])||isNaN(z[H+1]));)H-=2;L.positions=z.slice(I,H+2)}return L}),n.line2d.update(n.lineOptions)),n.error2d){var y=(n.errorXOptions||[]).concat(n.errorYOptions||[]);n.error2d.update(y)}n.scatter2d&&n.scatter2d.update(n.markerOptions),n.fillOrder=Zv.repeat(null,v),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(L,z){var I=a[z];if(!(!L||!I||!I[0]||!I[0].trace)){var H=I[0],U=H.trace,O=H.t,X=n.lineOptions[z],B,Y,Z=[];U._ownfill&&Z.push(z),U._nexttrace&&Z.push(z+1),Z.length&&(n.fillOrder[z]=Z);var q=[],W=X&&X.positions||O.positions,ae,ne;if(U.fill==="tozeroy"){for(ae=0;ae<W.length&&isNaN(W[ae+1]);)ae+=2;for(ne=W.length-2;ne>ae&&isNaN(W[ne+1]);)ne-=2;W[ae+1]!==0&&(q=[W[ae],0]),q=q.concat(W.slice(ae,ne+2)),W[ne+1]!==0&&(q=q.concat([W[ne],0]))}else if(U.fill==="tozerox"){for(ae=0;ae<W.length&&isNaN(W[ae]);)ae+=2;for(ne=W.length-2;ne>ae&&isNaN(W[ne]);)ne-=2;W[ae]!==0&&(q=[0,W[ae+1]]),q=q.concat(W.slice(ae,ne+2)),W[ne]!==0&&(q=q.concat([0,W[ne+1]]))}else if(U.fill==="toself"||U.fill==="tonext"){for(q=[],B=0,L.splitNull=!0,Y=0;Y<W.length;Y+=2)(isNaN(W[Y])||isNaN(W[Y+1]))&&(q=q.concat(W.slice(B,Y)),q.push(W[B],W[B+1]),q.push(null,null),B=Y+2);q=q.concat(W.slice(B)),B&&q.push(W[B],W[B+1])}else{var de=U._nexttrace;if(de){var le=n.lineOptions[z+1];if(le){var oe=le.positions;if(U.fill==="tonexty"){for(q=W.slice(),z=Math.floor(oe.length/2);z--;){var ue=oe[z*2],Se=oe[z*2+1];isNaN(ue)||isNaN(Se)||q.push(ue,Se)}L.fill=de.fillcolor}}}}if(U._prevtrace&&U._prevtrace.fill==="tonext"){var he=n.lineOptions[z-1].positions,ye=q.length/2;B=ye;var ke=[B];for(Y=0;Y<he.length;Y+=2)(isNaN(he[Y])||isNaN(he[Y+1]))&&(ke.push(Y/2+ye+1),B=Y+2);q=q.concat(he),L.hole=ke}return L.fillmode=U.fill,L.opacity=U.opacity,L.positions=q,L}}),n.fill2d.update(n.fillOptions))}var m=i.dragmode,b=d7(m),w=i.clickmode.indexOf("select")>-1;for(s=0;s<v;s++){var g=a[s][0],x=g.trace,_=g.t,T=_.index,k=x._length,S=_.x,A=_.y;if(x.selectedpoints||b||w){if(b||(b=!0),x.selectedpoints){var D=n.selectBatch[T]=Zv.selIndices2selPoints(x),M={};for(f=0;f<D.length;f++)M[D[f]]=1;var C=[];for(f=0;f<k;f++)M[f]||C.push(f);n.unselectBatch[T]=C}var $=_.xpx=new Array(k),F=_.ypx=new Array(k);for(f=0;f<k;f++)$[f]=o.c2p(S[f]),F[f]=l.c2p(A[f])}else _.xpx=_.ypx=null}if(b){if(n.select2d||(n.select2d=Jx(i._glcanvas.data()[1].regl)),n.scatter2d){var R=new Array(v);for(s=0;s<v;s++)R[s]=n.selectBatch[s].length||n.unselectBatch[s].length?n.markerUnselectedOptions[s]:{};n.scatter2d.update(R)}n.select2d&&(n.select2d.update(n.markerOptions),n.select2d.update(n.markerSelectedOptions)),n.glText&&a.forEach(function(L){var z=((L||[])[0]||{}).trace||{};p7.hasText(z)&&y7(L)})}else n.scatter2d&&n.scatter2d.update(n.markerOptions);var P={viewport:g7(i,o,l,e._context.plotGlPixelRatio),range:[(o._rl||o.range)[0],(l._rl||l.range)[0],(o._rl||o.range)[1],(l._rl||l.range)[1]]},E=Zv.repeat(P,n.count);n.fill2d&&n.fill2d.update(E),n.line2d&&n.line2d.update(E),n.error2d&&n.error2d.update(E.concat(E)),n.scatter2d&&n.scatter2d.update(E),n.select2d&&n.select2d.update(E),n.glText&&n.glText.forEach(function(L){L.update(P)})}}};b7.reglPrecompiled=DA;var $A=o7;$A.plot=CA.exports;var x7=$A;(function(t){t.exports=x7})(wA);const RO=gi(wA.exports);var PA={exports:{}},RA={};(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)}})(RA);var EA={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]},_7=Ca,w7=$r.hovertemplateAttrs,T7=$r.texttemplateAttrs,k7=dn,A7=Ti.attributes,Fa=qc,r1=EA,ol=Ft.extendFlat,M7={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:ol({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:ol({},Fa.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:ol({},Fa.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},k7("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:Fa.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:T7({editType:"plot"},{keys:r1.eventDataKeys.concat(["label","value"])}),hovertext:Fa.hovertext,hoverinfo:ol({},_7.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:w7({},{keys:r1.eventDataKeys}),textfont:Fa.textfont,insidetextorientation:Fa.insidetextorientation,insidetextfont:Fa.insidetextfont,outsidetextfont:ol({},Fa.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:Fa.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:A7({name:"sunburst",trace:!0,editType:"calc"})},Jc={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1},S7=$r.hovertemplateAttrs,L7=$r.texttemplateAttrs,C7=dn,D7=Ti.attributes,Ii=qc,jr=M7,a1=Jc,Kv=Ft.extendFlat,zA={labels:jr.labels,parents:jr.parents,values:jr.values,branchvalues:jr.branchvalues,count:jr.count,level:jr.level,maxdepth:jr.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot",description:["Determines d3 treemap solver.","For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling"].join(" ")},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot",description:["When using *squarify* `packing` algorithm, according to https://github.com/d3/d3-hierarchy/blob/v3.1.1/README.md#squarify_ratio","this option specifies the desired aspect ratio of the generated rectangles.","The ratio must be specified as a number greater than or equal to one.","Note that the orientation of the generated rectangles (tall or wide)","is not implied by the ratio; for example, a ratio of two will attempt","to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2.","When using *squarify*, unlike d3 which uses the Golden Ratio i.e. 1.618034,","Plotly applies 1 to increase squares in treemap layouts."].join(" ")},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot",description:["Determines if the positions obtained from solver are flipped on each axis."].join(" ")},pad:{valType:"number",min:0,dflt:3,editType:"plot",description:["Sets the inner padding (in px)."].join(" ")},editType:"calc"},marker:Kv({pad:{t:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the top (in px)."].join(" ")},l:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the left (in px)."].join(" ")},r:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the right (in px)."].join(" ")},b:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the bottom (in px)."].join(" ")},editType:"calc"},colors:jr.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:jr.marker.line,editType:"calc"},C7("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if the path bar is drawn","i.e. outside the trace `domain` and","with one pixel gap."].join(" ")},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Determines on which side of the the treemap the","`pathbar` should be presented."].join(" ")},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot",description:["Determines which shape is used for edges between `barpath` labels."].join(" ")},thickness:{valType:"number",min:12,editType:"plot",description:["Sets the thickness of `pathbar` (in px). If not specified the `pathbar.textfont.size` is used","with 3 pixles extra padding on each side."].join(" ")},textfont:Kv({},Ii.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},text:Ii.text,textinfo:jr.textinfo,texttemplate:L7({editType:"plot"},{keys:a1.eventDataKeys.concat(["label","value"])}),hovertext:Ii.hovertext,hoverinfo:jr.hoverinfo,hovertemplate:S7({},{keys:a1.eventDataKeys}),textfont:Ii.textfont,insidetextfont:Ii.insidetextfont,outsidetextfont:Kv({},Ii.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:Ii.sort,root:jr.root,domain:D7({name:"treemap",trace:!0,editType:"calc"})},IA={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(" ")}},$7=ve.exports,P7=zA,R7=rt.exports,E7=Ti.defaults,z7=_o.handleText,I7=ns.TEXTPAD,NA=uo,N7=NA.hasColorscale,F7=NA.handleDefaults,H7=function(e,r,a,i){function n(b,w){return $7.coerce(e,r,P7,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";z7(e,r,i,n,u,{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),n("textposition");var h=r.textposition.indexOf("bottom")!==-1,d=n("marker.line.width");d&&n("marker.line.color",i.paper_bgcolor);var p=n("marker.colors"),y=r._hasColorscale=N7(e,"marker","colors")||(e.marker||{}).coloraxis;y?F7(e,r,i,n,{prefix:"marker.",cLetter:"c"}):n("marker.depthfade",!(p||[]).length);var m=r.textfont.size*2;n("marker.pad.t",h?m/4:m),n("marker.pad.l",m/4),n("marker.pad.r",m/4),n("marker.pad.b",h?m:m/4),r._hovered={marker:{line:{width:2,color:R7.contrast(i.paper_bgcolor)}}},v&&(n("pathbar.thickness",r.pathbar.textfont.size+2*I7),n("pathbar.side"),n("pathbar.edgeshape")),n("sort"),n("root.color"),E7(r,i,n),r._length=null},O7=ve.exports,B7=IA,j7=function(e,r){function a(i,n){return O7.coerce(e,r,B7,i,n)}a("treemapcolorway",r.colorway),a("extendtreemapcolors")},fc={},FA={};(function(t){var e=dh,r=ct,a=ve.exports,i=uo.makeColorScaleFuncFromTrace,n=nc.makePullColorFn,o=nc.generateExtendedColors,l=uo.calc,s=Ot.ALMOST_EQUAL,f={},c={},v={};t.calc=function(h,d){var p=h._fullLayout,y=d.ids,m=a.isArrayOrTypedArray(y),b=d.labels,w=d.parents,g=d.values,x=a.isArrayOrTypedArray(g),_=[],T={},k={},S=function(W,ae){T[W]?T[W].push(ae):T[W]=[ae],k[ae]=1},A=function(W){return W||typeof W=="number"},D=function(W){return!x||r(g[W])&&g[W]>=0},M,C,$;m?(M=Math.min(y.length,w.length),C=function(W){return A(y[W])&&D(W)},$=function(W){return String(y[W])}):(M=Math.min(b.length,w.length),C=function(W){return A(b[W])&&D(W)},$=function(W){return String(b[W])}),x&&(M=Math.min(M,g.length));for(var F=0;F<M;F++)if(C(F)){var R=$(F),P=A(w[F])?String(w[F]):"",E={i:F,id:R,pid:P,label:A(b[F])?String(b[F]):""};x&&(E.v=+g[F]),_.push(E),S(P,R)}if(T[""]){if(T[""].length>1){for(var I=a.randstr(),H=0;H<_.length;H++)_[H].pid===""&&(_[H].pid=I);_.unshift({hasMultipleRoots:!0,id:I,pid:"",label:""})}}else{var L=[],z;for(z in T)k[z]||L.push(z);if(L.length===1)z=L[0],_.unshift({hasImpliedRoot:!0,id:z,pid:"",label:z});else return a.warn(["Multiple implied roots, cannot build",d.type,"hierarchy of",d.name+".","These roots include:",L.join(", ")].join(" "))}var U;try{U=e.stratify().id(function(W){return W.id}).parentId(function(W){return W.pid})(_)}catch(W){return a.warn(["Failed to build",d.type,"hierarchy of",d.name+".","Error:",W.message].join(" "))}var O=e.hierarchy(U),X=!1;if(x)switch(d.branchvalues){case"remainder":O.sum(function(W){return W.data.v});break;case"total":O.each(function(W){var ae=W.data.data,ne=ae.v;if(W.children){var de=W.children.reduce(function(le,oe){return le+oe.data.data.v},0);if((ae.hasImpliedRoot||ae.hasMultipleRoots)&&(ne=de),ne<de*s)return X=!0,a.warn(["Total value for node",W.data.data.id,"of",d.name,"is smaller than the sum of its children.",`
5
5
  parent value =`,ne,`
6
6
  children sum =`,de].join(" "))}W.value=ne});break}else u(O,d,{branches:d.count.indexOf("branches")!==-1,leaves:d.count.indexOf("leaves")!==-1});if(!X){d.sort&&O.sort(function(W,ae){return ae.value-W.value});var B,Y,Z=d.marker.colors||[],q=!!Z.length;return d._hasColorscale?(q||(Z=x?d.values:d._values),l(h,d,{vals:Z,containerStr:"marker",cLetter:"c"}),Y=i(d.marker)):B=n(p["_"+d.type+"colormap"]),O.each(function(W){var ae=W.data.data;ae.color=d._hasColorscale?Y(Z[ae.i]):B(Z[ae.i],ae.id)}),_[0].hierarchy=O,_}},t._runCrossTraceCalc=function(h,d){var p=d._fullLayout,y=d.calcdata,m=p[h+"colorway"],b=p["_"+h+"colormap"];p["extend"+h+"colors"]&&(m=o(m,h==="icicle"?v:h==="treemap"?c:f));var w=0,g;function x(S){var A=S.data.data,D=A.id;A.color===!1&&(b[D]?A.color=b[D]:S.parent?S.parent.parent?A.color=S.parent.data.data.color:(b[D]=A.color=m[w%m.length],w++):A.color=g)}for(var _=0;_<y.length;_++){var T=y[_],k=T[0];k.trace.type===h&&k.hierarchy&&(g=k.trace.root.color,k.hierarchy.each(x))}},t.crossTraceCalc=function(h){return t._runCrossTraceCalc("sunburst",h)};function u(h,d,p){var y=0,m=h.children;if(m){for(var b=m.length,w=0;w<b;w++)y+=u(m[w],d,p);p.branches&&y++}else p.leaves&&y++;return h.value=h.data.data.value=y,d._values||(d._values=[]),d._values[h.data.data.i]=y,y}})(FA);var HA=FA;fc.calc=function(t,e){return HA.calc(t,e)};fc.crossTraceCalc=function(t){return HA._runCrossTraceCalc("treemap",t)};var ki={};(function(t){var e=ve.exports,r=rt.exports,a=wi,i=hn;t.findEntryWithLevel=function(s,f){var c;return f&&s.eachAfter(function(v){if(t.getPtId(v)===f)return c=v.copy()}),c||s},t.findEntryWithChild=function(s,f){var c;return s.eachAfter(function(v){for(var u=v.children||[],h=0;h<u.length;h++){var d=u[h];if(t.getPtId(d)===f)return c=v.copy()}}),c||s},t.isEntry=function(s){return!s.parent},t.isLeaf=function(s){return!s.children},t.getPtId=function(s){return s.data.data.id},t.getPtLabel=function(s){return s.data.data.label},t.getValue=function(s){return s.value},t.isHierarchyRoot=function(s){return l(s)===""},t.setSliceCursor=function(s,f,c){var v=c.isTransitioning;if(!v){var u=s.datum();v=c.hideOnRoot&&t.isHierarchyRoot(u)||c.hideOnLeaves&&t.isLeaf(u)}a(s,v?null:"pointer")};function n(s,f,c){return{color:t.getOutsideTextFontKey("color",s,f,c),family:t.getOutsideTextFontKey("family",s,f,c),size:t.getOutsideTextFontKey("size",s,f,c)}}function o(s,f,c,v){var u=(v||{}).onPathbar,h=f.data.data,d=h.i,p=e.castOption(s,d,(u?"pathbar.textfont":"insidetextfont")+".color");return!p&&s._input.textfont&&(p=e.castOption(s._input,d,"textfont.color")),{color:p||r.contrast(h.color),family:t.getInsideTextFontKey("family",s,f,c,v),size:t.getInsideTextFontKey("size",s,f,c,v)}}t.getInsideTextFontKey=function(s,f,c,v,u){var h=(u||{}).onPathbar,d=h?"pathbar.textfont":"insidetextfont",p=c.data.data.i;return e.castOption(f,p,d+"."+s)||e.castOption(f,p,"textfont."+s)||v.size},t.getOutsideTextFontKey=function(s,f,c,v){var u=c.data.data.i;return e.castOption(f,u,"outsidetextfont."+s)||e.castOption(f,u,"textfont."+s)||v.size},t.isOutsideText=function(s,f){return!s._hasColorscale&&t.isHierarchyRoot(f)},t.determineTextFont=function(s,f,c,v){return t.isOutsideText(s,f)?n(s,f,c):o(s,f,c,v)},t.hasTransition=function(s){return!!(s&&s.duration>0)},t.getMaxDepth=function(s){return s.maxdepth>=0?s.maxdepth:1/0},t.isHeader=function(s,f){return!(t.isLeaf(s)||s.depth===f._maxDepth-1)};function l(s){return s.data.data.pid}t.getParent=function(s,f){return t.findEntryWithLevel(s,l(f))},t.listPath=function(s,f){var c=s.parent;if(!c)return[];var v=f?[c.data[f]]:[c];return t.listPath(c,f).concat(v)},t.getPath=function(s){return t.listPath(s,"label").join("/")+"/"},t.formatValue=i.formatPieValue,t.formatPercent=function(s,f){var c=e.formatPercent(s,0);return c==="0%"&&(c=i.formatPiePercent(s,f)),c}})(ki);var G7=function t(e,r,a){var i;a.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),a.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),a.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var n=e.children;if(n)for(var o=0;o<n.length;o++)t(n[o],r,a)},Kn=dh,U7=G7,OA=function(e,r,a){var i=a.flipX,n=a.flipY,o=a.packing==="dice-slice",l=a.pad[n?"bottom":"top"],s=a.pad[i?"right":"left"],f=a.pad[i?"left":"right"],c=a.pad[n?"top":"bottom"],v;o&&(v=s,s=l,l=v,v=f,f=c,c=v);var u=Kn.treemap().tile(V7(a.packing,a.squarifyratio)).paddingInner(a.pad.inner).paddingLeft(s).paddingRight(f).paddingTop(l).paddingBottom(c).size(o?[r[1],r[0]]:r)(e);return(o||i||n)&&U7(u,r,{swapXY:o,flipX:i,flipY:n}),u};function V7(t,e){switch(t){case"squarify":return Kn.treemapSquarify.ratio(e);case"binary":return Kn.treemapBinary;case"dice":return Kn.treemapDice;case"slice":return Kn.treemapSlice;default:return Kn.treemapSliceDice}}var i1=nt.exports,Ni=rt.exports,n1=ve.exports,Qv=ki,X7=Za.resizeText;function W7(t){var e=t._fullLayout._treemaplayer.selectAll(".trace");X7(t,e,"treemap"),e.each(function(r){var a=i1.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){i1.select(this).call(BA,o,n,{hovered:!1})})})}function BA(t,e,r,a){var i=(a||{}).hovered,n=e.data.data,o=n.i,l,s,f=n.color,c=Qv.isHierarchyRoot(e),v=1;if(i)l=r._hovered.marker.line.color,s=r._hovered.marker.line.width;else if(c&&f===r.root.color)v=100,l="rgba(0,0,0,0)",s=0;else if(l=n1.castOption(r,o,"marker.line.color")||Ni.defaultLine,s=n1.castOption(r,o,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var u=r.marker.depthfade;if(u){var h=Ni.combine(Ni.addOpacity(r._backgroundColor,.75),f),d;if(u===!0){var p=Qv.getMaxDepth(r);isFinite(p)?Qv.isLeaf(e)?d=0:d=r._maxVisibleLayers-(e.data.depth-r._entryDepth):d=e.data.height+1}else d=e.data.depth-r._entryDepth,r._atRootLevel||d++;if(d>0)for(var y=0;y<d;y++){var m=.5*y/d;f=Ni.combine(Ni.addOpacity(h,m),f)}}}t.style("stroke-width",s).call(Ni.fill,f).call(Ni.stroke,l).style("opacity",v)}var Jp={style:W7,styleOne:BA},Gn=nt.exports,o1=Ze,Y7=ea.appendArrayPointValue,ll=pa,l1=ve.exports,q7=ql,qt=ki,Z7=hn,K7=Z7.formatPieValue,em=function(e,r,a,i,n){var o=i[0],l=o.trace,s=o.hierarchy,f=l.type==="sunburst",c=l.type==="treemap"||l.type==="icicle";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1);var v=function(d){var p=a._fullLayout;if(!(a._dragging||p.hovermode===!1)){var y=a._fullData[l.index],m=d.data.data,b=m.i,w=qt.isHierarchyRoot(d),g=qt.getParent(s,d),x=qt.getValue(d),_=function(U){return l1.castOption(y,b,U)},T=_("hovertemplate"),k=ll.castHoverinfo(y,p,b),S=p.separators,A;if(T||k&&k!=="none"&&k!=="skip"){var D,M;f&&(D=o.cx+d.pxmid[0]*(1-d.rInscribed),M=o.cy+d.pxmid[1]*(1-d.rInscribed)),c&&(D=d._hoverX,M=d._hoverY);var C={},$=[],F=[],R=function(U){return $.indexOf(U)!==-1};k&&($=k==="all"?y._module.attributes.hoverinfo.flags:k.split("+")),C.label=m.label,R("label")&&C.label&&F.push(C.label),m.hasOwnProperty("v")&&(C.value=m.v,C.valueLabel=K7(C.value,S),R("value")&&F.push(C.valueLabel)),C.currentPath=d.currentPath=qt.getPath(d.data),R("current path")&&!w&&F.push(C.currentPath);var P,E=[],L=function(){E.indexOf(P)===-1&&(F.push(P),E.push(P))};C.percentParent=d.percentParent=x/qt.getValue(g),C.parent=d.parentString=qt.getPtLabel(g),R("percent parent")&&(P=qt.formatPercent(C.percentParent,S)+" of "+C.parent,L()),C.percentEntry=d.percentEntry=x/qt.getValue(r),C.entry=d.entry=qt.getPtLabel(r),R("percent entry")&&!w&&!d.onPathbar&&(P=qt.formatPercent(C.percentEntry,S)+" of "+C.entry,L()),C.percentRoot=d.percentRoot=x/qt.getValue(s),C.root=d.root=qt.getPtLabel(s),R("percent root")&&!w&&(P=qt.formatPercent(C.percentRoot,S)+" of "+C.root,L()),C.text=_("hovertext")||_("text"),R("text")&&(P=C.text,l1.isValidTextValue(P)&&F.push(P)),A=[sl(d,y,n.eventDataKeys)];var z={trace:y,y:M,_x0:d._x0,_x1:d._x1,_y0:d._y0,_y1:d._y1,text:F.join("<br>"),name:T||R("name")?y.name:void 0,color:_("hoverlabel.bgcolor")||m.color,borderColor:_("hoverlabel.bordercolor"),fontFamily:_("hoverlabel.font.family"),fontSize:_("hoverlabel.font.size"),fontColor:_("hoverlabel.font.color"),nameLength:_("hoverlabel.namelength"),textAlign:_("hoverlabel.align"),hovertemplate:T,hovertemplateLabels:C,eventData:A};f&&(z.x0=D-d.rInscribed*d.rpx1,z.x1=D+d.rInscribed*d.rpx1,z.idealAlign=d.pxmid[0]<0?"left":"right"),c&&(z.x=D,z.idealAlign=D<0?"left":"right");var I=[];ll.loneHover(z,{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:a,inOut_bbox:I}),A[0].bbox=I[0],l._hasHoverLabel=!0}if(c){var H=e.select("path.surface");n.styleOne(H,d,y,{hovered:!0})}l._hasHoverEvent=!0,a.emit("plotly_hover",{points:A||[sl(d,y,n.eventDataKeys)],event:Gn.event})}},u=function(d){var p=a._fullLayout,y=a._fullData[l.index],m=Gn.select(this).datum();if(l._hasHoverEvent&&(d.originalEvent=Gn.event,a.emit("plotly_unhover",{points:[sl(m,y,n.eventDataKeys)],event:Gn.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(ll.loneUnhover(p._hoverlayer.node()),l._hasHoverLabel=!1),c){var b=e.select("path.surface");n.styleOne(b,m,y,{hovered:!1})}},h=function(d){var p=a._fullLayout,y=a._fullData[l.index],m=f&&(qt.isHierarchyRoot(d)||qt.isLeaf(d)),b=qt.getPtId(d),w=qt.isEntry(d)?qt.findEntryWithChild(s,b):qt.findEntryWithLevel(s,b),g=qt.getPtId(w),x={points:[sl(d,y,n.eventDataKeys)],event:Gn.event};m||(x.nextLevel=g);var _=q7.triggerHandler(a,"plotly_"+l.type+"click",x);if(_!==!1&&p.hovermode&&(a._hoverdata=[sl(d,y,n.eventDataKeys)],ll.click(a,Gn.event)),!m&&_!==!1&&!a._dragging&&!a._transitioning){o1.call("_storeDirectGUIEdit",y,p._tracePreGUI[y.uid],{level:y.level});var T={data:[{level:g}],traces:[l.index]},k={frame:{redraw:!1,duration:n.transitionTime},transition:{duration:n.transitionTime,easing:n.transitionEasing},mode:"immediate",fromcurrent:!0};ll.loneUnhover(p._hoverlayer.node()),o1.call("animate",a,T,k)}};e.on("mouseover",v),e.on("mouseout",u),e.on("click",h)};function sl(t,e,r){for(var a=t.data.data,i={curveNumber:e.index,pointNumber:a.i,data:e._input,fullData:e},n=0;n<r.length;n++){var o=r[n];o in t&&(i[o]=t[o])}return"parentString"in t&&!qt.isHierarchyRoot(t)&&(i.parent=t.parentString),Y7(i,e,a.i),i}var s1=nt.exports,uf=ve.exports,f1=_t.exports,Q7=nr,J7=OA,c1=Jp.styleOne,Jv=Jc,Un=ki,eO=em,ed=!0,tO=function(e,r,a,i,n){var o=n.barDifY,l=n.width,s=n.height,f=n.viewX,c=n.viewY,v=n.pathSlice,u=n.toMoveInsideSlice,h=n.strTransform,d=n.hasTransition,p=n.handleSlicesExit,y=n.makeUpdateSliceInterpolator,m=n.makeUpdateTextInterpolator,b={},w=e._context.staticPlot,g=e._fullLayout,x=r[0],_=x.trace,T=x.hierarchy,k=l/_._entryDepth,S=Un.listPath(a.data,"id"),A=J7(T.copy(),[l,s],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();A=A.filter(function(M){var C=S.indexOf(M.data.id);return C===-1?!1:(M.x0=k*C,M.x1=k*(C+1),M.y0=o,M.y1=o+s,M.onPathbar=!0,!0)}),A.reverse(),i=i.data(A,Un.getPtId),i.enter().append("g").classed("pathbar",!0),p(i,ed,b,[l,s],v),i.order();var D=i;d&&(D=D.transition().each("end",function(){var M=s1.select(this);Un.setSliceCursor(M,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),D.each(function(M){M._x0=f(M.x0),M._x1=f(M.x1),M._y0=c(M.y0),M._y1=c(M.y1),M._hoverX=f(M.x1-Math.min(l,s)/2),M._hoverY=c(M.y1-s/2);var C=s1.select(this),$=uf.ensureSingle(C,"path","surface",function(E){E.style("pointer-events",w?"none":"all")});d?$.transition().attrTween("d",function(E){var L=y(E,ed,b,[l,s]);return function(z){return v(L(z))}}):$.attr("d",v),C.call(eO,a,e,r,{styleOne:c1,eventDataKeys:Jv.eventDataKeys,transitionTime:Jv.CLICK_TRANSITION_TIME,transitionEasing:Jv.CLICK_TRANSITION_EASING}).call(Un.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),$.call(c1,M,_,{hovered:!1}),M._text=(Un.getPtLabel(M)||"").split("<br>").join(" ")||"";var F=uf.ensureSingle(C,"g","slicetext"),R=uf.ensureSingle(F,"text","",function(E){E.attr("data-notex",1)}),P=uf.ensureUniformFontSize(e,Un.determineTextFont(_,M,g.font,{onPathbar:!0}));R.text(M._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(f1.font,P).call(Q7.convertToTspans,e),M.textBB=f1.bBox(R.node()),M.transform=u(M,{fontSize:P.size,onPathbar:!0}),M.transform.fontSize=P.size,d?R.transition().attrTween("transform",function(E){var L=m(E,ed,b,[l,s]);return function(z){return h(L(z))}}):R.attr("transform",h(M))})},u1=nt.exports,td=A1.interpolate,fi=ki,fl=ve.exports,v1=ns.TEXTPAD,rO=Yp,aO=rO.toMoveInsideBar,iO=Za,rd=iO.recordMinTextSize,nO=Jc,oO=tO;function Fi(t){return fi.isHierarchyRoot(t)?"":fi.getPtId(t)}var lO=function(e,r,a,i,n){var o=e._fullLayout,l=r[0],s=l.trace,f=s.type,c=f==="icicle",v=l.hierarchy,u=fi.findEntryWithLevel(v,s.level),h=u1.select(a),d=h.selectAll("g.pathbar"),p=h.selectAll("g.slice");if(!u){d.remove(),p.remove();return}var y=fi.isHierarchyRoot(u),m=!o.uniformtext.mode&&fi.hasTransition(i),b=fi.getMaxDepth(s),w=function(te){return te.data.depth-u.data.depth<b},g=o._size,x=s.domain,_=g.w*(x.x[1]-x.x[0]),T=g.h*(x.y[1]-x.y[0]),k=_,S=s.pathbar.thickness,A=s.marker.line.width+nO.gapWithPathbar,D=s.pathbar.visible?s.pathbar.side.indexOf("bottom")>-1?T+A:-(S+A):0,M={x0:k,x1:k,y0:D,y1:D+S},C=function(te,J,_e){var pe=s.tiling.pad,Le=function(re){return re-pe<=J.x0},Ie=function(re){return re+pe>=J.x1},Pe=function(re){return re-pe<=J.y0},Be=function(re){return re+pe>=J.y1};return te.x0===J.x0&&te.x1===J.x1&&te.y0===J.y0&&te.y1===J.y1?{x0:te.x0,x1:te.x1,y0:te.y0,y1:te.y1}:{x0:Le(te.x0-pe)?0:Ie(te.x0-pe)?_e[0]:te.x0,x1:Le(te.x1+pe)?0:Ie(te.x1+pe)?_e[0]:te.x1,y0:Pe(te.y0-pe)?0:Be(te.y0-pe)?_e[1]:te.y0,y1:Pe(te.y1+pe)?0:Be(te.y1+pe)?_e[1]:te.y1}},$=null,F={},R={},P=null,E=function(te,J){return J?F[Fi(te)]:R[Fi(te)]},L=function(te,J,_e,pe){if(J)return F[Fi(v)]||M;var Le=R[s.level]||_e;return w(te)?C(te,Le,pe):{}};l.hasMultipleRoots&&y&&b++,s._maxDepth=b,s._backgroundColor=o.paper_bgcolor,s._entryDepth=u.data.depth,s._atRootLevel=y;var z=-_/2+g.l+g.w*(x.x[1]+x.x[0])/2,I=-T/2+g.t+g.h*(1-(x.y[1]+x.y[0])/2),H=function(te){return z+te},U=function(te){return I+te},O=U(0),X=H(0),B=function(te){return X+te},Y=function(te){return O+te};function Z(te,J){return te+","+J}var q=B(0),W=function(te){te.x=Math.max(q,te.x)},ae=s.pathbar.edgeshape,ne=function(te){var J=B(Math.max(Math.min(te.x0,te.x0),0)),_e=B(Math.min(Math.max(te.x1,te.x1),k)),pe=Y(te.y0),Le=Y(te.y1),Ie=S/2,Pe={},Be={};Pe.x=J,Be.x=_e,Pe.y=Be.y=(pe+Le)/2;var re={x:J,y:pe},De={x:_e,y:pe},Ce={x:_e,y:Le},se={x:J,y:Le};return ae===">"?(re.x-=Ie,De.x-=Ie,Ce.x-=Ie,se.x-=Ie):ae==="/"?(Ce.x-=Ie,se.x-=Ie,Pe.x-=Ie/2,Be.x-=Ie/2):ae==="\\"?(re.x-=Ie,De.x-=Ie,Pe.x-=Ie/2,Be.x-=Ie/2):ae==="<"&&(Pe.x-=Ie,Be.x-=Ie),W(re),W(se),W(Pe),W(De),W(Ce),W(Be),"M"+Z(re.x,re.y)+"L"+Z(De.x,De.y)+"L"+Z(Be.x,Be.y)+"L"+Z(Ce.x,Ce.y)+"L"+Z(se.x,se.y)+"L"+Z(Pe.x,Pe.y)+"Z"},de=function(te){var J=H(te.x0),_e=H(te.x1),pe=U(te.y0),Le=U(te.y1),Ie=_e-J,Pe=Le-pe;if(!Ie||!Pe)return"";var Be=0,re=Ie>2*Be&&Pe>2*Be?Be:0,De=function(Ce,se){return re?"a"+Z(re,re)+" 0 0 1 "+Z(Ce,se):""};return"M"+Z(J,pe+re)+De(re,-re)+"L"+Z(_e-re,pe)+De(re,re)+"L"+Z(_e,Le-re)+De(-re,re)+"L"+Z(J+re,Le)+De(-re,-re)+"Z"},le=function(te,J){var _e=te.x0,pe=te.x1,Le=te.y0,Ie=te.y1,Pe=te.textBB,Be=function(Ne){return s.textposition.indexOf(Ne)!==-1},re=Be("bottom"),De=Be("top")||J.isHeader&&!re,Ce=De?"start":re?"end":"middle",se=Be("right"),ce=Be("left")||J.onPathbar,Re=ce?-1:se?1:0,we=s[c?"tiling":"marker"].pad;if(J.isHeader){if(_e+=(c?we:we.l)-v1,pe-=(c?we:we.r)-v1,_e>=pe){var xe=(_e+pe)/2;_e=xe,pe=xe}var be;re?(be=Ie-(c?we:we.b),Le<be&&be<Ie&&(Le=be)):(be=Le+(c?we:we.t),Le<be&&be<Ie&&(Ie=be))}var ze=aO(_e,pe,Le,Ie,Pe,{isHorizontal:!1,constrained:!0,angle:0,anchor:Ce,leftToRight:Re});return ze.fontSize=J.fontSize,ze.targetX=H(ze.targetX),ze.targetY=U(ze.targetY),isNaN(ze.targetX)||isNaN(ze.targetY)?{}:(_e!==pe&&Le!==Ie&&rd(s.type,ze,o),{scale:ze.scale,rotate:ze.rotate,textX:ze.textX,textY:ze.textY,anchorX:ze.anchorX,anchorY:ze.anchorY,targetX:ze.targetX,targetY:ze.targetY})},oe=function(te,J){for(var _e,pe=0,Le=te;!_e&&pe<b;)pe++,Le=Le.parent,Le?_e=E(Le,J):pe=b;return _e||{}},ue=function(te,J,_e,pe){var Le=E(te,J),Ie;if(J)Ie=M;else{var Pe=E(u,J);Pe?Ie=C(te,Pe,pe):Ie={}}return td(Le,Ie)},Se=function(te,J,_e,pe,Le){var Ie=E(te,J),Pe;if(Ie)Pe=Ie;else if(J)Pe=M;else if($)if(te.parent){var Be=P||_e;Be&&!J?Pe=C(te,Be,pe):(Pe={},fl.extendFlat(Pe,oe(te,J)))}else Pe=fl.extendFlat({},te),c&&(Le.orientation==="h"?Le.flipX?Pe.x0=te.x1:Pe.x1=0:Le.flipY?Pe.y0=te.y1:Pe.y1=0);else Pe={};return td(Pe,{x0:te.x0,x1:te.x1,y0:te.y0,y1:te.y1})},he=function(te,J,_e,pe){var Le=E(te,J),Ie={},Pe=L(te,J,_e,pe);fl.extendFlat(Ie,{transform:le({x0:Pe.x0,x1:Pe.x1,y0:Pe.y0,y1:Pe.y1,textBB:te.textBB,_text:te._text},{isHeader:fi.isHeader(te,s)})}),Le?Ie=Le:te.parent&&fl.extendFlat(Ie,oe(te,J));var Be=te.transform;return te.x0!==te.x1&&te.y0!==te.y1&&rd(s.type,Be,o),td(Ie,{transform:{scale:Be.scale,rotate:Be.rotate,textX:Be.textX,textY:Be.textY,anchorX:Be.anchorX,anchorY:Be.anchorY,targetX:Be.targetX,targetY:Be.targetY}})},ye=function(te,J,_e,pe,Le){var Ie=pe[0],Pe=pe[1];m?te.exit().transition().each(function(){var Be=u1.select(this),re=Be.select("path.surface");re.transition().attrTween("d",function(Ce){var se=ue(Ce,J,_e,[Ie,Pe]);return function(ce){return Le(se(ce))}});var De=Be.select("g.slicetext");De.attr("opacity",0)}).remove():te.exit().remove()},ke=function(te){var J=te.transform;return te.x0!==te.x1&&te.y0!==te.y1&&rd(s.type,J,o),fl.getTextTransform({textX:J.textX,textY:J.textY,anchorX:J.anchorX,anchorY:J.anchorY,targetX:J.targetX,targetY:J.targetY,scale:J.scale,rotate:J.rotate})};m&&(d.each(function(te){F[Fi(te)]={x0:te.x0,x1:te.x1,y0:te.y0,y1:te.y1},te.transform&&(F[Fi(te)].transform={textX:te.transform.textX,textY:te.transform.textY,anchorX:te.transform.anchorX,anchorY:te.transform.anchorY,targetX:te.transform.targetX,targetY:te.transform.targetY,scale:te.transform.scale,rotate:te.transform.rotate})}),p.each(function(te){R[Fi(te)]={x0:te.x0,x1:te.x1,y0:te.y0,y1:te.y1},te.transform&&(R[Fi(te)].transform={textX:te.transform.textX,textY:te.transform.textY,anchorX:te.transform.anchorX,anchorY:te.transform.anchorY,targetX:te.transform.targetX,targetY:te.transform.targetY,scale:te.transform.scale,rotate:te.transform.rotate}),!$&&fi.isEntry(te)&&($=te)})),P=n(e,r,u,p,{width:_,height:T,viewX:H,viewY:U,pathSlice:de,toMoveInsideSlice:le,prevEntry:$,makeUpdateSliceInterpolator:Se,makeUpdateTextInterpolator:he,handleSlicesExit:ye,hasTransition:m,strTransform:ke}),s.pathbar.visible?oO(e,r,u,d,{barDifY:D,width:k,height:S,viewX:B,viewY:Y,pathSlice:ne,toMoveInsideSlice:le,makeUpdateSliceInterpolator:Se,makeUpdateTextInterpolator:he,handleSlicesExit:ye,hasTransition:m,strTransform:ke}):d.remove()},sO=nt.exports,fO=ki,cO=Za,uO=cO.clearMinTextSize,vO=nn.resizeText,d1=lO,dO=function(e,r,a,i,n){var o=n.type,l=n.drawDescendants,s=e._fullLayout,f=s["_"+o+"layer"],c,v,u=!a;if(uO(o,s),c=f.selectAll("g.trace."+o).data(r,function(d){return d[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!s.uniformtext.mode&&fO.hasTransition(a)){i&&(v=i());var h=sO.transition().duration(a.duration).ease(a.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()});h.each(function(){f.selectAll("g.trace").each(function(d){d1(e,d,this,a,l)})})}else c.each(function(d){d1(e,d,this,a,l)}),s.uniformtext.mode&&vO(e,f.selectAll(".trace"),o);u&&c.exit().remove()},jA={},h1=nt.exports,ad=rt.exports,p1=ve.exports,hO=Za.resizeText;function pO(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");hO(t,e,"sunburst"),e.each(function(r){var a=h1.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){h1.select(this).call(GA,o,n)})})}function GA(t,e,r){var a=e.data.data,i=!e.children,n=a.i,o=p1.castOption(r,n,"marker.line.color")||ad.defaultLine,l=p1.castOption(r,n,"marker.line.width")||0;t.style("stroke-width",l).call(ad.fill,a.color).call(ad.stroke,o).style("opacity",i?r.leaf.opacity:null)}var mO={style:pO,styleOne:GA};(function(t){var e=nt.exports,r=dh,a=A1.interpolate,i=_t.exports,n=ve.exports,o=nr,l=Za,s=l.recordMinTextSize,f=l.clearMinTextSize,c=vA,v=hn.getRotationAngle,u=c.computeTransform,h=c.transformInsideText,d=mO.styleOne,p=nn.resizeText,y=em,m=EA,b=ki;t.plot=function(k,S,A,D){var M=k._fullLayout,C=M._sunburstlayer,$,F,R=!A,P=!M.uniformtext.mode&&b.hasTransition(A);if(f("sunburst",M),$=C.selectAll("g.trace.sunburst").data(S,function(L){return L[0].trace.uid}),$.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),$.order(),P){D&&(F=D());var E=e.transition().duration(A.duration).ease(A.easing).each("end",function(){F&&F()}).each("interrupt",function(){F&&F()});E.each(function(){C.selectAll("g.trace").each(function(L){w(k,L,this,A)})})}else $.each(function(L){w(k,L,this,A)}),M.uniformtext.mode&&p(k,M._sunburstlayer.selectAll(".trace"),"sunburst");R&&$.exit().remove()};function w(k,S,A,D){var M=k._context.staticPlot,C=k._fullLayout,$=!C.uniformtext.mode&&b.hasTransition(D),F=e.select(A),R=F.selectAll("g.slice"),P=S[0],E=P.trace,L=P.hierarchy,z=b.findEntryWithLevel(L,E.level),I=b.getMaxDepth(E),H=C._size,U=E.domain,O=H.w*(U.x[1]-U.x[0]),X=H.h*(U.y[1]-U.y[0]),B=.5*Math.min(O,X),Y=P.cx=H.l+H.w*(U.x[1]+U.x[0])/2,Z=P.cy=H.t+H.h*(1-U.y[0])-X/2;if(!z)return R.remove();var q=null,W={};$&&R.each(function(re){W[b.getPtId(re)]={rpx0:re.rpx0,rpx1:re.rpx1,x0:re.x0,x1:re.x1,transform:re.transform},!q&&b.isEntry(re)&&(q=re)});var ae=g(z).descendants(),ne=z.height+1,de=0,le=I;P.hasMultipleRoots&&b.isHierarchyRoot(z)&&(ae=ae.slice(1),ne-=1,de=1,le+=1),ae=ae.filter(function(re){return re.y1<=le});var oe=v(E.rotation);oe&&ae.forEach(function(re){re.x0+=oe,re.x1+=oe});var ue=Math.min(ne,I),Se=function(re){return(re-de)/ue*B},he=function(re,De){return[re*Math.cos(De),-re*Math.sin(De)]},ye=function(re){return n.pathAnnulus(re.rpx0,re.rpx1,re.x0,re.x1,Y,Z)},ke=function(re){return Y+_(re)[0]*(re.transform.rCenter||0)+(re.transform.x||0)},te=function(re){return Z+_(re)[1]*(re.transform.rCenter||0)+(re.transform.y||0)};R=R.data(ae,b.getPtId),R.enter().append("g").classed("slice",!0),$?R.exit().transition().each(function(){var re=e.select(this),De=re.select("path.surface");De.transition().attrTween("d",function(se){var ce=Le(se);return function(Re){return ye(ce(Re))}});var Ce=re.select("g.slicetext");Ce.attr("opacity",0)}).remove():R.exit().remove(),R.order();var J=null;if($&&q){var _e=b.getPtId(q);R.each(function(re){J===null&&b.getPtId(re)===_e&&(J=re.x1)})}var pe=R;$&&(pe=pe.transition().each("end",function(){var re=e.select(this);b.setSliceCursor(re,k,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),pe.each(function(re){var De=e.select(this),Ce=n.ensureSingle(De,"path","surface",function(be){be.style("pointer-events",M?"none":"all")});re.rpx0=Se(re.y0),re.rpx1=Se(re.y1),re.xmid=(re.x0+re.x1)/2,re.pxmid=he(re.rpx1,re.xmid),re.midangle=-(re.xmid-Math.PI/2),re.startangle=-(re.x0-Math.PI/2),re.stopangle=-(re.x1-Math.PI/2),re.halfangle=.5*Math.min(n.angleDelta(re.x0,re.x1)||Math.PI,Math.PI),re.ring=1-re.rpx0/re.rpx1,re.rInscribed=x(re),$?Ce.transition().attrTween("d",function(be){var ze=Ie(be);return function(Ne){return ye(ze(Ne))}}):Ce.attr("d",ye),De.call(y,z,k,S,{eventDataKeys:m.eventDataKeys,transitionTime:m.CLICK_TRANSITION_TIME,transitionEasing:m.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,k,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:k._transitioning}),Ce.call(d,re,E);var se=n.ensureSingle(De,"g","slicetext"),ce=n.ensureSingle(se,"text","",function(be){be.attr("data-notex",1)}),Re=n.ensureUniformFontSize(k,b.determineTextFont(E,re,C.font));ce.text(t.formatSliceLabel(re,z,E,S,C)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,Re).call(o.convertToTspans,k);var we=i.bBox(ce.node());re.transform=h(we,re,P),re.transform.targetX=ke(re),re.transform.targetY=te(re);var xe=function(be,ze){var Ne=be.transform;return u(Ne,ze),Ne.fontSize=Re.size,s(E.type,Ne,C),n.getTextTransform(Ne)};$?ce.transition().attrTween("transform",function(be){var ze=Pe(be);return function(Ne){return xe(ze(Ne),we)}}):ce.attr("transform",xe(re,we))});function Le(re){var De=b.getPtId(re),Ce=W[De],se=W[b.getPtId(z)],ce;if(se){var Re=(re.x1>se.x1?2*Math.PI:0)+oe;ce=re.rpx1<se.rpx1?{x0:re.x0,x1:re.x1,rpx0:0,rpx1:0}:{x0:Re,x1:Re,rpx0:re.rpx0,rpx1:re.rpx1}}else{var we,xe=b.getPtId(re.parent);R.each(function(Ae){if(b.getPtId(Ae)===xe)return we=Ae});var be=we.children,ze;be.forEach(function(Ae,Fe){if(b.getPtId(Ae)===De)return ze=Fe});var Ne=be.length,He=a(we.x0,we.x1);ce={rpx0:B,rpx1:B,x0:He(ze/Ne),x1:He((ze+1)/Ne)}}return a(Ce,ce)}function Ie(re){var De=W[b.getPtId(re)],Ce,se={x0:re.x0,x1:re.x1,rpx0:re.rpx0,rpx1:re.rpx1};if(De)Ce=De;else if(q)if(re.parent)if(J){var ce=(re.x1>J?2*Math.PI:0)+oe;Ce={x0:ce,x1:ce}}else Ce={rpx0:B,rpx1:B},n.extendFlat(Ce,Be(re));else Ce={rpx0:0,rpx1:0};else Ce={x0:oe,x1:oe};return a(Ce,se)}function Pe(re){var De=W[b.getPtId(re)],Ce,se=re.transform;if(De)Ce=De;else if(Ce={rpx1:re.rpx1,transform:{textPosAngle:se.textPosAngle,scale:0,rotate:se.rotate,rCenter:se.rCenter,x:se.x,y:se.y}},q)if(re.parent)if(J){var ce=re.x1>J?2*Math.PI:0;Ce.x0=Ce.x1=ce}else n.extendFlat(Ce,Be(re));else Ce.x0=Ce.x1=oe;else Ce.x0=Ce.x1=oe;var Re=a(Ce.transform.textPosAngle,re.transform.textPosAngle),we=a(Ce.rpx1,re.rpx1),xe=a(Ce.x0,re.x0),be=a(Ce.x1,re.x1),ze=a(Ce.transform.scale,se.scale),Ne=a(Ce.transform.rotate,se.rotate),He=se.rCenter===0?3:Ce.transform.rCenter===0?1/3:1,Ae=a(Ce.transform.rCenter,se.rCenter),Fe=function(Ge){return Ae(Math.pow(Ge,He))};return function(Ge){var Oe=we(Ge),We=xe(Ge),N=be(Ge),j=Fe(Ge),G=he(Oe,(We+N)/2),V=Re(Ge),K={pxmid:G,rpx1:Oe,transform:{textPosAngle:V,rCenter:j,x:se.x,y:se.y}};return s(E.type,se,C),{transform:{targetX:ke(K),targetY:te(K),scale:ze(Ge),rotate:Ne(Ge),rCenter:j}}}}function Be(re){var De=re.parent,Ce=W[b.getPtId(De)],se={};if(Ce){var ce=De.children,Re=ce.indexOf(re),we=ce.length,xe=a(Ce.x0,Ce.x1);se.x0=xe(Re/we),se.x1=xe(Re/we)}else se.x0=se.x1=0;return se}}function g(k){return r.partition().size([2*Math.PI,k.height+1])(k)}t.formatSliceLabel=function(k,S,A,D,M){var C=A.texttemplate,$=A.textinfo;if(!C&&(!$||$==="none"))return"";var F=M.separators,R=D[0],P=k.data.data,E=R.hierarchy,L=b.isHierarchyRoot(k),z=b.getParent(E,k),I=b.getValue(k);if(!C){var H=$.split("+"),U=function(de){return H.indexOf(de)!==-1},O=[],X;if(U("label")&&P.label&&O.push(P.label),P.hasOwnProperty("v")&&U("value")&&O.push(b.formatValue(P.v,F)),!L){U("current path")&&O.push(b.getPath(k.data));var B=0;U("percent parent")&&B++,U("percent entry")&&B++,U("percent root")&&B++;var Y=B>1;if(B){var Z,q=function(de){X=b.formatPercent(Z,F),Y&&(X+=" of "+de),O.push(X)};U("percent parent")&&!L&&(Z=I/b.getValue(z),q("parent")),U("percent entry")&&(Z=I/b.getValue(S),q("entry")),U("percent root")&&(Z=I/b.getValue(E),q("root"))}}return U("text")&&(X=n.castOption(A,P.i,"text"),n.isValidTextValue(X)&&O.push(X)),O.join("<br>")}var W=n.castOption(A,P.i,"texttemplate");if(!W)return"";var ae={};P.label&&(ae.label=P.label),P.hasOwnProperty("v")&&(ae.value=P.v,ae.valueLabel=b.formatValue(P.v,F)),ae.currentPath=b.getPath(k.data),L||(ae.percentParent=I/b.getValue(z),ae.percentParentLabel=b.formatPercent(ae.percentParent,F),ae.parent=b.getPtLabel(z)),ae.percentEntry=I/b.getValue(S),ae.percentEntryLabel=b.formatPercent(ae.percentEntry,F),ae.entry=b.getPtLabel(S),ae.percentRoot=I/b.getValue(E),ae.percentRootLabel=b.formatPercent(ae.percentRoot,F),ae.root=b.getPtLabel(E),P.hasOwnProperty("color")&&(ae.color=P.color);var ne=n.castOption(A,P.i,"text");return(n.isValidTextValue(ne)||ne==="")&&(ae.text=ne),ae.customdata=n.castOption(A,P.i,"customdata"),n.texttemplateString(W,ae,M._d3locale,ae,A._meta||{})};function x(k){return k.rpx0===0&&n.isFullCircle([k.x0,k.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(k.halfangle)),k.ring/2))}function _(k){return T(k.rpx1,k.transform.textPosAngle)}function T(k,S){return[k*Math.sin(S),-k*Math.cos(S)]}})(jA);var m1=nt.exports,vf=ve.exports,y1=_t.exports,yO=nr,gO=OA,g1=Jp.styleOne,id=Jc,ai=ki,bO=em,xO=jA.formatSliceLabel,nd=!1,_O=function(e,r,a,i,n){var o=n.width,l=n.height,s=n.viewX,f=n.viewY,c=n.pathSlice,v=n.toMoveInsideSlice,u=n.strTransform,h=n.hasTransition,d=n.handleSlicesExit,p=n.makeUpdateSliceInterpolator,y=n.makeUpdateTextInterpolator,m=n.prevEntry,b={},w=e._context.staticPlot,g=e._fullLayout,x=r[0],_=x.trace,T=_.textposition.indexOf("left")!==-1,k=_.textposition.indexOf("right")!==-1,S=_.textposition.indexOf("bottom")!==-1,A=!S&&!_.marker.pad.t||S&&!_.marker.pad.b,D=gO(a,[o,l],{packing:_.tiling.packing,squarifyratio:_.tiling.squarifyratio,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,pad:{inner:_.tiling.pad,top:_.marker.pad.t,left:_.marker.pad.l,right:_.marker.pad.r,bottom:_.marker.pad.b}}),M=D.descendants(),C=1/0,$=-1/0;M.forEach(function(L){var z=L.depth;z>=_._maxDepth?(L.x0=L.x1=(L.x0+L.x1)/2,L.y0=L.y1=(L.y0+L.y1)/2):(C=Math.min(C,z),$=Math.max($,z))}),i=i.data(M,ai.getPtId),_._maxVisibleLayers=isFinite($)?$-C+1:0,i.enter().append("g").classed("slice",!0),d(i,nd,b,[o,l],c),i.order();var F=null;if(h&&m){var R=ai.getPtId(m);i.each(function(L){F===null&&ai.getPtId(L)===R&&(F={x0:L.x0,x1:L.x1,y0:L.y0,y1:L.y1})})}var P=function(){return F||{x0:0,x1:o,y0:0,y1:l}},E=i;return h&&(E=E.transition().each("end",function(){var L=m1.select(this);ai.setSliceCursor(L,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),E.each(function(L){var z=ai.isHeader(L,_);L._x0=s(L.x0),L._x1=s(L.x1),L._y0=f(L.y0),L._y1=f(L.y1),L._hoverX=s(L.x1-_.marker.pad.r),L._hoverY=f(S?L.y1-_.marker.pad.b/2:L.y0+_.marker.pad.t/2);var I=m1.select(this),H=vf.ensureSingle(I,"path","surface",function(B){B.style("pointer-events",w?"none":"all")});h?H.transition().attrTween("d",function(B){var Y=p(B,nd,P(),[o,l]);return function(Z){return c(Y(Z))}}):H.attr("d",c),I.call(bO,a,e,r,{styleOne:g1,eventDataKeys:id.eventDataKeys,transitionTime:id.CLICK_TRANSITION_TIME,transitionEasing:id.CLICK_TRANSITION_EASING}).call(ai.setSliceCursor,e,{isTransitioning:e._transitioning}),H.call(g1,L,_,{hovered:!1}),L.x0===L.x1||L.y0===L.y1?L._text="":z?L._text=A?"":ai.getPtLabel(L)||"":L._text=xO(L,a,_,r,g)||"";var U=vf.ensureSingle(I,"g","slicetext"),O=vf.ensureSingle(U,"text","",function(B){B.attr("data-notex",1)}),X=vf.ensureUniformFontSize(e,ai.determineTextFont(_,L,g.font));O.text(L._text||" ").classed("slicetext",!0).attr("text-anchor",k?"end":T||z?"start":"middle").call(y1.font,X).call(yO.convertToTspans,e),L.textBB=y1.bBox(O.node()),L.transform=v(L,{fontSize:X.size,isHeader:z}),L.transform.fontSize=X.size,h?O.transition().attrTween("transform",function(B){var Y=y(B,nd,P(),[o,l]);return function(Z){return u(Y(Z))}}):O.attr("transform",u(L))}),F},wO=dO,TO=_O,kO=function(e,r,a,i){return wO(e,r,a,i,{type:"treemap",drawDescendants:TO})},AO={moduleType:"trace",name:"treemap",basePlotModule:RA,categories:[],animatable:!0,attributes:zA,layoutAttributes:IA,supplyDefaults:H7,supplyLayoutDefaults:j7,calc:fc.calc,crossTraceCalc:fc.crossTraceCalc,plot:kO,style:Jp.style,colorbar:as,meta:{description:["Visualize hierarchal data from leaves (and/or outer branches) towards root","with rectangles. The treemap sectors are determined by the entries in","*labels* or *ids* and in *parents*."].join(" ")}};(function(t){t.exports=AO})(PA);const EO=gi(PA.exports);var UA={};(function(t){function e(x){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(T){return typeof T}:e=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},e(x)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r=o(nM.exports),a=i(oM.exports);function i(x){return x&&x.__esModule?x:{default:x}}function n(){if(typeof WeakMap!="function")return null;var x=new WeakMap;return n=function(){return x},x}function o(x){if(x&&x.__esModule)return x;if(x===null||e(x)!=="object"&&typeof x!="function")return{default:x};var _=n();if(_&&_.has(x))return _.get(x);var T={},k=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in x)if(Object.prototype.hasOwnProperty.call(x,S)){var A=k?Object.getOwnPropertyDescriptor(x,S):null;A&&(A.get||A.set)?Object.defineProperty(T,S,A):T[S]=x[S]}return T.default=x,_&&_.set(x,T),T}function l(x,_){if(!(x instanceof _))throw new TypeError("Cannot call a class as a function")}function s(x,_){for(var T=0;T<_.length;T++){var k=_[T];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(x,k.key,k)}}function f(x,_,T){return _&&s(x.prototype,_),T&&s(x,T),x}function c(x,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(_&&_.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),_&&v(x,_)}function v(x,_){return v=Object.setPrototypeOf||function(k,S){return k.__proto__=S,k},v(x,_)}function u(x){var _=p();return function(){var k=y(x),S;if(_){var A=y(this).constructor;S=Reflect.construct(k,arguments,A)}else S=k.apply(this,arguments);return h(this,S)}}function h(x,_){return _&&(e(_)==="object"||typeof _=="function")?_:d(x)}function d(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function y(x){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},y(x)}var m=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover"],b=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],w=typeof window<"u";function g(x){var _=function(T){c(S,T);var k=u(S);function S(A){var D;return l(this,S),D=k.call(this,A),D.p=Promise.resolve(),D.resizeHandler=null,D.handlers={},D.syncWindowResize=D.syncWindowResize.bind(d(D)),D.syncEventHandlers=D.syncEventHandlers.bind(d(D)),D.attachUpdateEvents=D.attachUpdateEvents.bind(d(D)),D.getRef=D.getRef.bind(d(D)),D.handleUpdate=D.handleUpdate.bind(d(D)),D.figureCallback=D.figureCallback.bind(d(D)),D.updatePlotly=D.updatePlotly.bind(d(D)),D}return f(S,[{key:"updatePlotly",value:function(D,M,C){var $=this;this.p=this.p.then(function(){if(!$.unmounting){if(!$.el)throw new Error("Missing element reference");return x.react($.el,{data:$.props.data,layout:$.props.layout,config:$.props.config,frames:$.props.frames})}}).then(function(){$.unmounting||($.syncWindowResize(D),$.syncEventHandlers(),$.figureCallback(M),C&&$.attachUpdateEvents())}).catch(function(F){$.props.onError&&$.props.onError(F)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(D){this.unmounting=!1;var M=D.frames&&D.frames.length?D.frames.length:0,C=this.props.frames&&this.props.frames.length?this.props.frames.length:0,$=!(D.layout===this.props.layout&&D.data===this.props.data&&D.config===this.props.config&&C===M),F=D.revision!==void 0,R=D.revision!==this.props.revision;!$&&(!F||F&&!R)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&w&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),x.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var D=this;!this.el||!this.el.removeListener||b.forEach(function(M){D.el.on(M,D.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var D=this;!this.el||!this.el.removeListener||b.forEach(function(M){D.el.removeListener(M,D.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(D){if(typeof D=="function"){var M=this.el,C=M.data,$=M.layout,F=this.el._transitionData?this.el._transitionData._frames:null,R={data:C,layout:$,frames:F};D(R,this.el)}}},{key:"syncWindowResize",value:function(D){var M=this;!w||(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return x.Plots.resize(M.el)},window.addEventListener("resize",this.resizeHandler),D&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(D){this.el=D,this.props.debug&&w&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var D=this;m.forEach(function(M){var C=D.props["on"+M],$=D.handlers[M],F=Boolean($);C&&!F?D.addEventHandler(M,C):!C&&F?D.removeEventHandler(M):C&&F&&C!==$&&(D.removeEventHandler(M),D.addEventHandler(M,C))})}},{key:"addEventHandler",value:function(D,M){this.handlers[D]=M,this.el.on(this.getPlotlyEventName(D),this.handlers[D])}},{key:"removeEventHandler",value:function(D){this.el.removeListener(this.getPlotlyEventName(D),this.handlers[D]),delete this.handlers[D]}},{key:"getPlotlyEventName",value:function(D){return"plotly_"+D.toLowerCase()}},{key:"render",value:function(){return r.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),S}(r.Component);return _.propTypes={data:a.default.arrayOf(a.default.object),config:a.default.object,layout:a.default.object,frames:a.default.arrayOf(a.default.object),revision:a.default.number,onInitialized:a.default.func,onPurge:a.default.func,onError:a.default.func,onUpdate:a.default.func,debug:a.default.bool,style:a.default.object,className:a.default.string,useResizeHandler:a.default.bool,divId:a.default.string},m.forEach(function(T){_.propTypes["on"+T]=a.default.func}),_.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},_}})(UA);const zO=gi(UA);export{LO as P,CO as b,zO as c,DO as h,PO as o,$O as p,RO as s,EO as t};
7
- //# sourceMappingURL=plotly.feb8abd4.js.map
7
+ //# sourceMappingURL=plotly.dde47bfe.js.map