1&&g.push(f("object","layout"))),i.supplyDefaults(h);for(var d=h._fullData,p=r.length,y=0;y0&&Math.round(u)===u))return{vals:i};A=u}for(var g=t.calendar,f="start"===l,h="end"===l,d=e[r+"period0"],p=a(d,g)||0,y=[],m=[],I=[],v=i.length,E=0;Ex;)b=o(b,-A,g);for(;b<=x;)b=o(b,A,g);B=o(b,-A,g)}else{for(b=p+(C=Math.round((x-p)/c))*c;b>x;)b-=c;for(;b<=x;)b+=c;B=b-c}y[E]=f?B:h?b:(B+b)/2,m[E]=B,I[E]=b}return{vals:y,starts:m,ends:I}}},26720:function(e){"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(e,t,r){"use strict";var n=r(33428),i=r(38248),a=r(3400),o=r(39032).FP_SAFE,s=r(24040),l=r(43616),A=r(79811),c=A.getFromId,u=A.isLinked;function g(e,t){var r,n,i=[],o=e._fullLayout,s=h(o,t,0),l=h(o,t,1),A=p(e,t),c=A.min,u=A.max;if(0===c.length||0===u.length)return a.simpleMap(t.range,t.r2l);var g=c[0].val,d=u[0].val;for(r=1;r0&&((x=k-s(v)-l(E))>D?Q/x>T&&(C=v,B=E,T=Q/x):Q/k>T&&(C={val:v.val,nopad:1},B={val:E.val,nopad:1},T=Q/k));if(g===d){var M=g-1,R=g+1;if(_)if(0===g)i=[0,1];else{var L=(g>0?u:c).reduce((function(e,t){return Math.max(e,l(t))}),0),N=g/(1-Math.min(.5,L/k));i=g>0?[0,N]:[N,0]}else i=S?[Math.max(0,M),Math.max(1,R)]:[M,R]}else _?(C.val>=0&&(C={val:0,nopad:1}),B.val<=0&&(B={val:0,nopad:1})):S&&(C.val-T*s(C)<0&&(C={val:0,nopad:1}),B.val<=0&&(B={val:1,nopad:1})),T=(B.val-C.val-f(t,v.val,E.val))/(k-s(C)-l(B)),i=[C.val-T*s(C),B.val+T*l(B)];return i=b(i,t),t.limitRange&&t.limitRange(),m&&i.reverse(),a.simpleMap(i,t.l2r||Number)}function f(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),w=x((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),_=x(r.vpadplus||r.vpad),S=x(r.vpadminus||r.vpad);if(!B){if(g=1/0,f=-1/0,C)for(n=0;n0&&(g=a),a>f&&a-o&&(g=a),a>f&&a=T;n--)D(n);return{min:h,max:d,opts:r}},concatExtremes:p};var d=3;function p(e,t,r){var n,i,a,o=t._id,s=e._fullData,l=e._fullLayout,A=[],u=[];function g(e,t){for(n=0;n=r&&(A.extrapad||!o)){s=!1;break}i(t,A.val)&&A.pad<=r&&(o||!A.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&0===t;e.push({val:t,pad:c?0:r,extrapad:!c&&o})}}function v(e){return i(e)&&Math.abs(e)=t}function B(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))<(r=e.d2l(r))}function b(e,t){if(!t||!t.autorangeoptions)return e;var r=e[0],n=e[1],i=t.autorangeoptions.include;if(void 0!==i){var o=t.d2l(r),s=t.d2l(n);a.isArrayOrTypedArray(i)||(i=[i]);for(var l=0;l=A&&(o=A,r=A),s<=A&&(s=A,n=A)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&B(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&B(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&B(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&B(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}},76808:function(e){"use strict";e.exports=function(e,t,r){var n,i;if(r){var a="reversed"===t||"min reversed"===t||"max reversed"===t;n=r[a?1:0],i=r[a?0:1]}var o=e("autorangeoptions.minallowed",null===i?n:void 0),s=e("autorangeoptions.maxallowed",null===n?i:void 0);void 0===o&&e("autorangeoptions.clipmin"),void 0===s&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},54460:function(e,t,r){"use strict";var n=r(33428),i=r(38248),a=r(7316),o=r(24040),s=r(3400),l=s.strTranslate,A=r(72736),c=r(81668),u=r(76308),g=r(43616),f=r(94724),h=r(98728),d=r(39032),p=d.ONEMAXYEAR,y=d.ONEAVGYEAR,m=d.ONEMINYEAR,I=d.ONEMAXQUARTER,v=d.ONEAVGQUARTER,E=d.ONEMINQUARTER,C=d.ONEMAXMONTH,B=d.ONEAVGMONTH,b=d.ONEMINMONTH,x=d.ONEWEEK,Q=d.ONEDAY,w=Q/2,_=d.ONEHOUR,S=d.ONEMIN,k=d.ONESEC,D=d.MINUS_SIGN,T=d.BADNUM,M={K:"zeroline"},R={K:"gridline",L:"path"},L={K:"minor-gridline",L:"path"},N={K:"tick",L:"path"},F={K:"tick",L:"text"},O={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},P=r(84284),G=P.MID_SHIFT,U=P.CAP_SHIFT,z=P.LINE_SPACING,q=P.OPPOSITE_SIDE,H=e.exports={};H.setConvert=r(78344);var Y=r(52976),J=r(79811),K=J.idSort,j=J.isLinked;H.id2name=J.id2name,H.name2id=J.name2id,H.cleanId=J.cleanId,H.list=J.list,H.listIds=J.listIds,H.getFromId=J.getFromId,H.getFromTrace=J.getFromTrace;var V=r(19280);H.getAutoRange=V.getAutoRange,H.findExtremes=V.findExtremes;var W=1e-4;function Z(e){var t=(e[1]-e[0])*W;return[e[0]-t,e[1]+t]}H.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],A=n+"ref",c={};return i||(i=l[0]||("string"===typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(e){return e+" domain"}))),c[A]={valType:"enumerated",values:l.concat(a?"string"===typeof a?[a]:a:[]),dflt:i},s.coerce(e,t,c,A)},H.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},H.coercePosition=function(e,t,r,n,i,a){var o,l;if("range"!==H.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var A=H.getFromId(t,n);l=r(i,a=A.fraction2r(a)),o=A.cleanPos}e[i]=o(l)},H.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?s.ensureNumber:H.getFromId(t,r).cleanPos)(e)},H.redrawComponents=function(e,t){t=t||H.listIds(e);var r=e._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),A={},c=0;cn&&g2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},H.saveRangeInitial=function(e,t){for(var r=H.list(e,"",!0),n=!1,i=0;i.3*g||c(n)||c(a))){var f=r.dtick/2;e+=e+fo){var l=Number(r.substr(1));a.exactYears>o&&l%12===0?e=H.tickIncrement(e,"M6","reverse")+1.5*Q:a.exactMonths>o?e=H.tickIncrement(e,"M1","reverse")+15.5*Q:e-=w;var A=H.tickIncrement(e,r);if(A<=n)return A}return e}(m,e,y,A,a)),p=m;p<=c;)p=H.tickIncrement(p,y,!1,a);return{start:t.c2r(m,0,a),end:t.c2r(p,0,a),size:y,_dataSpan:c-A}},H.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n,a=t.dtick&&i(t._tmin);if(a){var o=H.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,.99*o+.01*t._tmin]}else{var l=s.simpleMap(t.range,t.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(e.range=s.simpleMap(n,t.l2r),e._isMinor=!0,H.prepTicks(e,r),a){var A=i(t.dtick),c=i(e.dtick),u=A?t.dtick:+t.dtick.substring(1),g=c?e.dtick:+e.dtick.substring(1);A&&c?te(u,g)?u===2*x&&g===2*Q&&(e.dtick=x):u===2*x&&g===3*Q?e.dtick=x:u!==x||(t._input.minor||{}).nticks?re(u/g,2.5)?e.dtick=u/2:e.dtick=u:e.dtick=Q:"M"===String(t.dtick).charAt(0)?c?e.dtick="M1":te(u,g)?u>=12&&2===g&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?te(u,g)||(e.dtick=re(u/g,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},H.prepTicks=function(e,t){var r=s.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,a=e.nticks;a||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?s.bigFont(e.tickfont.size||12):15,a=e._length/n):(n="y"===e._id.charAt(0)?40:80,a=s.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(a*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(a*=100),e._roughDTick=Math.abs(r[1]-r[0])/a,H.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(i(e.dtick)||"M"!==e.dtick.charAt(0))}var n=r(),a=H.getTickFormat(e);if(a){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(t=_,o&&!n&&e.dtick<_&&(e.dtick=_)):/%p/.test(a)?(t=w,o&&!n&&e.dtick=(M?0:1);R--){var L=!R;R?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var N=R?e:s.extendFlat({},e,e.minor);if(L?H.prepMinorTicks(N,e,t):H.prepTicks(N,t),"array"!==N.tickmode)if("sync"!==N.tickmode){var F=Z(c),O=F[0],P=F[1],G=i(N.dtick),U="log"===a&&!(G||"L"===N.dtick.charAt(0)),z=H.tickFirst(N,t);if(R){if(e._tmin=z,z=P:K<=P;K=H.tickIncrement(K,j,u,o)){if(R&&q++,N.rangebreaks&&!u){if(K=f)break}if(k.length>h||K===J)break;J=K;var V={value:K};R?(U&&K!==(0|K)&&(V.simpleLabel=!0),l>1&&q%l&&(V.skipLabel=!0),k.push(V)):(V.minor=!0,D.push(V))}}else k=[],d=ae(e);else R?(k=[],d=oe(e,!L)):(D=[],S=oe(e,!L))}if(M&&!("inside"===e.minor.ticks&&"outside"===e.ticks||"outside"===e.minor.ticks&&"inside"===e.ticks)){for(var W=k.map((function(e){return e.value})),X=[],$=0;$0?(a=n-1,o=n):(a=n,o=n);var s,l=e[a].value,A=e[o].value,c=Math.abs(A-l),u=r||c,g=0;u>=m?g=c>=m&&c<=p?c:y:r===v&&u>=E?g=c>=E&&c<=I?c:v:u>=b?g=c>=b&&c<=C?c:B:r===x&&u>=x?g=x:u>=Q?g=Q:r===w&&u>=w?g=w:r===_&&u>=_&&(g=_),g>=c&&(g=c,s=!0);var f=i+g;if(t.rangebreaks&&g>0){for(var h=0,d=0;d<84;d++){var S=(d+.5)/84;t.maskBreaks(i*(1-S)+S*f)!==T&&h++}(g*=h/84)||(e[n].drop=!0),s&&c>x&&(g=c)}(g>0||0===n)&&(e[n].periodX=i+g/2)}}(k,e,e._definedDelta),e.rangebreaks){var ie="y"===e._id.charAt(0),se=1;"auto"===e.tickmode&&(se=e.tickfont?e.tickfont.size:12);var le=NaN;for(r=k.length-1;r>-1;r--)if(k[r].drop)k.splice(r,1);else{k[r].value=Le(k[r].value,e);var Ae=e.c2p(k[r].value);(ie?le>Ae-se:lef||uef&&(ce.periodX=f),ue10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12===0?"y":"m";else if(t>=Q&&a<=10||t>=15*Q)e._tickround="d";else if(t>=S&&a<=16||t>=_)e._tickround="M";else if(t>=k&&a<=19||t>=S)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(i(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);i(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),A=Math.floor(Math.log(l)/Math.LN10+.01),c=void 0===e.minexponent?3:e.minexponent;Math.abs(A)>c&&(me(e.exponentformat)&&!Ie(A)?e._tickexponent=3*Math.round((A-1)/3):e._tickexponent=A)}else e._tickround=null}function pe(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontColor:n.color}}H.autoTicks=function(e,t,r){var n;function a(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=s.dateTick0(e.calendar,0);var o=2*t;if(o>y)t/=y,n=a(10),e.dtick="M"+12*he(t,n,se);else if(o>B)t/=B,e.dtick="M"+he(t,1,le);else if(o>Q){if(e.dtick=he(t,Q,e._hasDayOfWeekBreaks?[1,2,7,14]:ce),!r){var l=H.getTickFormat(e),A="period"===e.ticklabelmode;A&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=s.dateTick0(e.calendar,2):e.tick0=s.dateTick0(e.calendar,1),A&&(e._dowTick0=e.tick0)}}else o>_?e.dtick=he(t,_,le):o>S?e.dtick=he(t,S,Ae):o>k?e.dtick=he(t,k,Ae):(n=a(10),e.dtick=he(t,n,se))}else if("log"===e.type){e.tick0=0;var c=s.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(c[1]-c[0])<1){var u=1.5*Math.abs((c[1]-c[0])/t);t=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/u,n=a(10),e.dtick="L"+he(t,n,se)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Re(e)?(e.tick0=0,n=1,e.dtick=he(t,n,fe)):(e.tick0=0,n=a(10),e.dtick=he(t,n,se));if(0===e.dtick&&(e.dtick=1),!i(e.dtick)&&"string"!==typeof e.dtick){var g=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(g)}},H.tickIncrement=function(e,t,r,a){var o=r?-1:1;if(i(t))return s.increment(e,o*t);var l=t.charAt(0),A=o*Number(t.substr(1));if("M"===l)return s.incrementMonth(e,A,a);if("L"===l)return Math.log(Math.pow(10,e)+A)/Math.LN10;if("D"===l){var c="D2"===t?ge:ue,u=e+.01*o,g=s.roundUp(s.mod(u,1),c,r);return Math.floor(u)+Math.log(n.round(Math.pow(10,g),1))/Math.LN10}throw"unrecognized dtick "+String(t)},H.tickFirst=function(e,t){var r=e.r2l||Number,a=s.simpleMap(e.range,r,void 0,void 0,t),o=a[1]=0&&r<=e._length?t:null};if(l&&s.isArrayOrTypedArray(e.ticktext)){var f=s.simpleMap(e.range,e.r2l),h=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(a=0;a ")}else e._prevDateHead=l,A+="
"+l;t.text=A}(e,o,r,A):"log"===c?function(e,t,r,n,a){var o=e.dtick,l=t.x,A=e.tickformat,c="string"===typeof o&&o.charAt(0);if("never"===a&&(a=""),n&&"L"!==c&&(o="L3",c="L"),A||"L"===c)t.text=ve(Math.pow(10,l),e,a,n);else if(i(o)||"D"===c&&s.mod(l+.01,1)<.1){var u=Math.round(l),g=Math.abs(u),f=e.exponentformat;"power"===f||me(f)&&Ie(u)?(t.text=0===u?1:1===u?"10":"10"+(u>1?"":D)+g+"",t.fontSize*=1.25):("e"===f||"E"===f)&&g>2?t.text="1"+f+(u>0?"+":D)+g:(t.text=ve(Math.pow(10,l),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==c)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,s.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var h=String(t.text).charAt(0);"0"!==h&&"1"!==h||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(l<0?.5:.25)))}}(e,o,0,A,p):"category"===c?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r=""),t.text=String(r)}(e,o):"multicategory"===c?function(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}(e,o,r):Re(e)?function(e,t,r,n,i){if("radians"!==e.thetaunit||r)t.text=ve(t.x,e,i,n);else{var a=t.x/180;if(0===a)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}function r(e,n){return t(n,0)?e:r(n,e%n)}function n(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}(a);if(o[1]>=100)t.text=ve(s.deg2rad(t.x),e,i,n);else{var l=t.x<0;1===o[1]?1===o[0]?t.text="\u03c0":t.text=o[0]+"\u03c0":t.text=["",o[0],"","\u2044","",o[1],"","\u03c0"].join(""),l&&(t.text=D+t.text)}}}}(e,o,r,A,p):function(e,t,r,n,i){"never"===i?i="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=ve(t.x,e,i,n)}(e,o,0,A,p),n||(e.tickprefix&&!d(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!d(e.showticksuffix)&&(o.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(o.text)){var y=e.labelalias[o.text];"string"===typeof y&&(o.text=y)}return("boundaries"===e.tickson||e.showdividers)&&(o.xbnd=[g(o.x-.5),g(o.x+e.dtick-.5)]),o},H.hoverLabelText=function(e,t,r){r&&(e=s.extendFlat({},e,{hoverformat:r}));var n=s.isArrayOrTypedArray(t)?t[0]:t,i=s.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==i&&i!==n)return H.hoverLabelText(e,n,r)+" - "+H.hoverLabelText(e,i,r);var a="log"===e.type&&n<=0,o=H.tickText(e,e.c2l(a?-n:n),"hover").text;return a?0===n?"0":D+o:o};var ye=["f","p","n","\u03bc","m","","k","M","G","T"];function me(e){return"SI"===e||"B"===e}function Ie(e){return e>14||e<-15}function ve(e,t,r,n){var a=e<0,o=t._tickround,l=r||t.exponentformat||"B",A=t._tickexponent,c=H.getTickFormat(t),u=t.separatethousands;if(n){var g={exponentformat:l,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:i(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};de(g),o=(Number(g._tickround)||0)+4,A=g._tickexponent,t.hoverformat&&(c=t.hoverformat)}if(c)return t._numFormat(c)(e).replace(/-/g,D);var f,h=Math.pow(10,-o)/2;if("none"===l&&(A=0),(e=Math.abs(e))"+f+"":"B"===l&&9===A?e+="B":me(l)&&(e+=ye[A/3+5])),a?D+e:e}function Ee(e,t){if(e){var r=Object.keys(O).reduce((function(e,r){return-1!==t.indexOf(r)&&O[r].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){r[t]||(1===t.length?e[t]=0:delete e[t])}))}}function Ce(e,t){for(var r=[],n={},i=0;i1&&r=i.min&&e=n(e))}function s(e,t){var r=null===t[0],n=null===t[1],i=a(e,t[0])>=0,o=a(e,t[1])<=0;return(r||i)&&(n||o)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=0&&i.unshift(i.splice(n,1).shift())}}));var o={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(t){return function(){if(t){var n=H.getFromId(e,t);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=a;var i=H.drawOne(e,n,r);return n._shiftPusher&&Oe(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},H.drawOne=function(e,t,r){var n,i,l,f=(r=r||{}).axShifts||{},h=r.overlayingShiftedAx||[];t.setScale();var d=e._fullLayout,p=t._id,y=p.charAt(0),m=H.counterLetter(p),I=d._plots[t._mainSubplot];if(I){if(t._shiftPusher=t.autoshift||-1!==h.indexOf(t._id)||-1!==h.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var v=t.linewidth/2||0;"inside"===t.ticks&&(v+=t.ticklen),Oe(t,v,f,!0),Oe(t,t.shift||0,f,!1)}!0===r.skipTitle&&void 0!==t._shift||(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,f));var E=I[y+"axislayer"],C=t._mainLinePosition,B=C+=t._shift,b=t._mainMirrorPosition,x=t._vals=H.calcTicks(t),Q=[t.mirror,B,b].join("_");for(n=0;n0?r.bottom-c:0,u))));var g=0,f=0;if(t._shiftPusher&&(g=Math.max(u,r.height>0?"l"===l?c-r.left:r.right-c:0),t.title.text!==d._dfltTitle[y]&&(f=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(f+=xe(t))),t._fullDepth=Math.max(g,f)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var h=[0,1],p="number"===typeof t._shift?t._shift:0;if("x"===y){if("b"===l?n[l]=t._depth:(n[l]=t._depth=Math.max(r.width>0?c-r.top:0,u),h.reverse()),r.width>0){var I=r.right-(t._offset+t._length);I>0&&(n.xr=1,n.r=I);var v=t._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if("l"===l?(t._depth=Math.max(r.height>0?c-r.left:0,u),n[l]=t._depth-p):(t._depth=Math.max(r.height>0?r.right-c:0,u),n[l]=t._depth+p,h.reverse()),r.height>0){var E=r.bottom-(t._offset+t._length);E>0&&(n.yb=0,n.b=E);var C=t._offset-r.top;C>0&&(n.yt=1,n.t=C)}n[m]="free"===t.anchor?t.position:t._anchorAxis.domain[h[0]],t.title.text!==d._dfltTitle[y]&&(n[l]+=xe(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[A]=t.linewidth,t.mirror&&!0!==t.mirror&&(i[A]+=u),!0===t.mirror||"ticks"===t.mirror?i[m]=t._anchorAxis.domain[h[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(i[m]=[t._counterDomainMin,t._counterDomainMax][h[1]]))}ue&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"===typeof t.automargin&&(Ee(n,t.automargin),Ee(i,t.automargin)),a.autoMargin(e,_e(t),n),a.autoMargin(e,Se(t),i),a.autoMargin(e,ke(t),s)})),s.syncOrAsync(Ae)}}function ge(e){var r=p+(e||"tick");return w[r]||(w[r]=function(e,t,r){var n,i,a,o;if(e._selections[t].size())n=1/0,i=-1/0,a=1/0,o=-1/0,e._selections[t].each((function(){var e=we(this),t=g.bBox(e.node().parentNode);n=Math.min(n,t.top),i=Math.max(i,t.bottom),a=Math.min(a,t.left),o=Math.max(o,t.right)}));else{var s=H.makeLabelFns(e,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}(t,r,B)),w[r]}},H.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],i=e.side===n?1:-1,a=[-1,1,i,-i];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)===("x"===r)&&(a=a.map((function(e){return-e}))),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a},H.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return l(e._offset+e.l2p(t.x),0)}:function(t){return l(0,e._offset+e.l2p(t.x))}},H.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=function(e){return-1!==t.indexOf(e)},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var A=e.side,c=l?(e.tickwidth||0)/2:0,u=3,g=e.tickfont?e.tickfont.size:12;return(o||n)&&(c+=g*U,u+=(e.linewidth||0)/2),(i||a)&&(c+=(e.linewidth||0)/2,u+=3),s&&"top"===A&&(u-=g*(1-U)),(i||n)&&(c=-c),"bottom"!==A&&"right"!==A||(u=-u),[l?c:0,s?u:0]}(e),r=t[0],n=t[1];return"x"===e._id.charAt(0)?function(t){return l(r+e._offset+e.l2p(Be(t)),n)}:function(t){return l(n,r+e._offset+e.l2p(Be(t)))}},H.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var a=void 0!==n.len?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r},H.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",a=function(e){return-1!==n.indexOf(e)},o=a("top"),l=a("left"),A=a("right"),c=a("bottom")||l||o||A,u=a("inside"),g="inside"===n&&"inside"===e.ticks||!u&&"outside"===e.ticks&&"boundaries"!==e.tickson,f=0,h=0,d=g?e.ticklen:0;if(u?d*=-1:c&&(d=0),g&&(f+=d,r)){var p=s.deg2rad(r);f=d*Math.cos(p)+1,h=d*Math.sin(p)}e.showticklabels&&(g||e.showline)&&(f+=.2*e.tickfont.size);var y,m,I,v,E,C={labelStandoff:f+=(e.linewidth||1)/2*(u?-1:1),labelShift:h},B=0,b=e.side,x=e._id.charAt(0),Q=e.tickangle;if("x"===x)v=(E=!u&&"bottom"===b||u&&"top"===b)?1:-1,u&&(v*=-1),y=h*v,m=t+f*v,I=E?1:-.2,90===Math.abs(Q)&&(u?I+=G:I=-90===Q&&"bottom"===b?U:90===Q&&"top"===b?G:.5,B=G/2*(Q/90)),C.xFn=function(e){return e.dx+y+B*e.fontSize},C.yFn=function(e){return e.dy+m+e.fontSize*I},C.anchorFn=function(e,t){if(c){if(l)return"end";if(A)return"start"}return i(t)&&0!==t&&180!==t?t*v<0!==u?"end":"start":"middle"},C.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==u?-n:0};else if("y"===x){if(v=(E=!u&&"left"===b||u&&"right"===b)?1:-1,u&&(v*=-1),y=f,m=h*v,I=0,u||90!==Math.abs(Q)||(I=-90===Q&&"left"===b||90===Q&&"right"===b?U:.5),u){var w=i(Q)?+Q:0;if(0!==w){var _=s.deg2rad(w);B=Math.abs(Math.sin(_))*U*v,I=0}}C.xFn=function(e){return e.dx+t-(y+e.fontSize*I)*v+B*e.fontSize},C.yFn=function(e){return e.dy+m+e.fontSize*G},C.anchorFn=function(e,t){return i(t)&&90===Math.abs(t)?"middle":E?"end":"start"},C.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return C},H.drawTicks=function(e,t,r){r=r||{};var i=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?r.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?r.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),o=r.layer.selectAll("path."+i).data(a,be);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(e){return u.stroke(n.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(r){return g.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Fe(t,[N]),o.attr("transform",r.transFn)},H.drawGrid=function(e,t,r){if(r=r||{},"sync"!==t.tickmode){var i=t._id+"grid",a=t.minor&&t.minor.showgrid,o=a?r.vals.filter((function(e){return e.minor})):[],s=t.showgrid?r.vals.filter((function(e){return!e.minor})):[],l=r.counterAxis;if(l&&H.shouldShowZeroLine(e,t,l))for(var A="array"===t.tickmode,c=0;c=0;y--){var m=y?d:p;if(m){var I=m.selectAll("path."+i).data(y?s:o,be);I.exit().remove(),I.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),I.attr("transform",r.transFn).attr("d",r.path).each((function(e){return u.stroke(n.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return g.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?h:t._gw)+"px"})).style("display",null),"function"===typeof r.path&&I.attr("d",r.path)}}Fe(t,[R,L])}},H.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=H.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return K(e.id,t.id)}))})),a.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,t.zerolinecolor||u.defaultLine).style("stroke-width",g.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Fe(t,[M])},H.drawLabels=function(e,t,r){r=r||{};var a=e._fullLayout,o=t._id,c=r.cls||o+"tick",u=r.vals.filter((function(e){return e.text})),f=r.labelFns,h=r.secondary?0:t.tickangle,d=(t._prevTickAngles||{})[c],p=r.layer.selectAll("g."+c).data(t.showticklabels?u:[],be),y=[];function m(e,a){e.each((function(e){var o=n.select(this),s=o.select(".text-math-group"),c=f.anchorFn(e,a),u=r.transFn.call(o.node(),e)+(i(a)&&0!==+a?" rotate("+a+","+f.xFn(e)+","+(f.yFn(e)-e.fontSize/2)+")":""),h=A.lineCount(o),d=z*e.fontSize,p=f.heightFn(e,i(a)?+a:0,(h-1)*d);if(p&&(u+=l(0,p)),s.empty()){var y=o.select("text");y.attr({transform:u,"text-anchor":c}),y.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var m=g.bBox(s.node()).width*{end:-.5,start:.5}[c];s.attr("transform",u+l(m,0))}}))}p.enter().append("g").classed(c,1).append("text").attr("text-anchor","middle").each((function(t){var r=n.select(this),i=e._promises.length;r.call(A.positionText,f.xFn(t),f.yFn(t)).call(g.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant}).text(t.text).call(A.convertToTspans,e),e._promises[i]?y.push(e._promises.pop().then((function(){m(r,h)}))):m(r,h)})),Fe(t,[F]),p.exit().remove(),r.repositionOnUpdate&&p.each((function(e){n.select(this).select("text").call(A.positionText,f.xFn(e),f.yFn(e))})),t._adjustTickLabelsOverflow=function(){var r=t.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),o="x"===t._id.charAt(0),l=0,A=o?e._fullLayout.width:e._fullLayout.height;if(-1!==r.indexOf("domain")){var c=s.simpleMap(t.range,t.r2l);l=t.l2p(c[0])+t._offset,A=t.l2p(c[1])+t._offset}var u=Math.min(l,A),f=Math.max(l,A),h=t.side,d=1/0,y=-1/0;for(var m in p.each((function(e){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=g.bBox(r.node()),s=0;o?(a.right>f||a.leftf||a.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==e.K||i||l.style("display",null)}))}))}))}))},m(p,d+1?d:h);var I=null;t._selections&&(t._selections[c]=p);var v=[function(){return y.length&&Promise.all(y)}];t.automargin&&a._redrawFromAutoMarginCount&&90===d?(I=d,v.push((function(){m(p,d)}))):v.push((function(){if(m(p,h),u.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){I=t.autotickangles[0];var e,n=0,i=[],a=1;p.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),o=we(this),s=g.bBox(o.node());a=Math.max(a,A.lineCount(o)),i.push({top:0,bottom:10,height:10,left:r-s.width/2,right:r+s.width/2+2,width:s.width+2})}));var o=("boundaries"===t.tickson||t.showdividers)&&!r.secondary,l=u.length,c=Math.abs((u[l-1].x-u[0].x)*t._m)/(l-1),f=o?c/2:c,d=o?t.ticklen:1.25*n*a,y=f/Math.sqrt(Math.pow(f,2)+Math.pow(d,2)),v=t.autotickangles.map((function(e){return e*Math.PI/180})),E=v.find((function(e){return Math.abs(Math.cos(e))<=y}));void 0===E&&(E=v.reduce((function(e,t){return Math.abs(Math.cos(e))G*P&&(D=P,_[w]=S[w]=T[w])}var U=Math.abs(D-k);U-b>0?b*=1+b/(U-=b):b=0,"y"!==t._id.charAt(0)&&(b=-b),_[Q]=C.p2r(C.r2p(S[Q])+x*b),"min"===C.autorange||"max reversed"===C.autorange?(_[0]=null,C._rangeInitial0=void 0,C._rangeInitial1=void 0):"max"!==C.autorange&&"min reversed"!==C.autorange||(_[1]=null,C._rangeInitial0=void 0,C._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[C._name+".range"]=_}var q=s.syncOrAsync(v);return q&&q.then&&e._promises.push(q),q},H.getPxPosition=function(e,t){var r,n=e._fullLayout._size,i=t._id.charAt(0),a=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===i?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===a||"left"===a?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},H.shouldShowZeroLine=function(e,t,r){var n=s.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===T)&&(Qe(t,0)||!function(e,t,r,n){var i=r._mainAxis;if(i){var a=e._fullLayout,o=t._id.charAt(0),s=H.counterLetter(t._id),l=t._offset+(Math.abs(n[0])1)for(n=1;n2*o}(i,t))return"date";var p="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=u(r),i=0,o=0,s={},c=0;c2*i}(i,p)?"category":function(e,t){for(var r=e.length,n=0;n=2){var s,A,c="";if(2===o.length)for(s=0;s<2;s++)if(A=E(o[s])){c=y;break}var u=i("pattern",c);if(u===y)for(s=0;s<2;s++)(A=E(o[s]))&&(t.bounds[s]=o[s]=A-1);if(u)for(s=0;s<2;s++)switch(A=o[s],u){case y:if(!n(A))return void(t.enabled=!1);if((A=+A)!==Math.floor(A)||A<0||A>=7)return void(t.enabled=!1);t.bounds[s]=o[s]=A;break;case m:if(!n(A))return void(t.enabled=!1);if((A=+A)<0||A>24)return void(t.enabled=!1);t.bounds[s]=o[s]=A}if(!1===r.autorange){var g=r.range;if(g[0]g[1])return void(t.enabled=!1)}else if(o[0]>g[0]&&o[1]n?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},t.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},t.isLinked=function(e,t){return a(t,e._axisMatchGroups)||a(t,e._axisConstraintGroups)}},22416:function(e,t,r){"use strict";var n=r(38116).isTypedArraySpec;e.exports=function(e,t,r,i){if("category"===t.type){var a,o=e.categoryarray,s=Array.isArray(o)&&o.length>0||n(o);s&&(a="array");var l,A=r("categoryorder",a);"array"===A&&(l=r("categoryarray")),s||"array"!==A||(A=t.categoryorder="trace"),"trace"===A?t._initialCategories=[]:"array"===A?t._initialCategories=l.slice():(l=function(e,t){var r,n,i,a=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;nn?i.substr(n):a.substr(r))+o:i+a+e*t:o}function p(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;oA*I)||B)for(r=0;rM&&FD&&(D=F);g/=(D-k)/(2*T),k=l.l2r(k),D=l.l2r(D),l.range=l._input.range=w<_?[k,D]:[D,k]}y(l,g)}}},t.getAxisGroup=function(e,t){for(var r=e._axisMatchGroups,n=0;n=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function P(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",A(r,n)).attr("d",i+"Z")}function G(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("transform",A(t,r)).attr("d","M0,0Z")}function U(e,t,r,n,i,a){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),z(e,t,i,a)}function z(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function q(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(e){T&&e.data&&e._context.showTips&&(i.notifier(i._(e,"Double-click to zoom back out"),"long"),T=!1)}function Y(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,D)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function J(e,t,r,n,a){for(var o,s,l,A,c=!1,u={},g={},f=(a||{}).xaHash,h=(a||{}).yaHash,d=0;d=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(q(i),2!==e||ye||He(),pe)o.indexOf("select")>-1&&w(r,i,W,Z,t.id,De),o.indexOf("event")>-1&&f.click(i,r,t.id);else if(1===e&&ye){var s=d?M:T,A="s"===d||"w"===y?0:1,u=s._name+".range["+A+"]",g=function(e,t){var r,n=e.range[t],i=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(s,A),h="left",p="middle";if(s.fixedrange)return;d?(p="n"===d?"top":"bottom","right"===s.side&&(h="right")):"e"===y&&(h="right"),i._context.showAxisRangeEntryBoxes&&n.select(ve).call(c.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(g),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:h,verticalAlign:p}).on("edit",(function(e){var t=s.d2r(e);void 0!==t&&l.call("_guiRelayout",i,u,t)}))}}}function Re(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,fe*t+Ee)),i=Math.max(0,Math.min(te,he*r+Ce)),a=Math.abs(n-Ee),o=Math.abs(i-Ce);function s(){we="",Be.r=Be.l,Be.t=Be.b,Se.attr("d","M0,0Z")}if(Be.l=Math.min(Ee,n),Be.r=Math.max(Ee,n),Be.t=Math.min(Ce,i),Be.b=Math.max(Ce,i),re.isSubplotConstrained)a>D||o>D?(we="xy",a/ee>o/te?(o=a*te/ee,Ce>i?Be.t=Ce-o:Be.b=Ce+o):(a=o*ee/te,Ee>n?Be.l=Ee-a:Be.r=Ee+a),Se.attr("d",Y(Be))):s();else if(ne.isSubplotConstrained)if(a>D||o>D){we="xy";var l=Math.min(Be.l/ee,(te-Be.b)/te),A=Math.max(Be.r/ee,(te-Be.t)/te);Be.l=l*ee,Be.r=A*ee,Be.b=(1-l)*te,Be.t=(1-A)*te,Se.attr("d",Y(Be))}else s();else!ae||o0){var c;if(ne.isSubplotConstrained||!ie&&1===ae.length){for(c=0;c1&&(void 0!==a.maxallowed&&se===(a.range[0]1&&(void 0!==o.maxallowed&&le===(o.range[0]v[1]-1/4096&&(t.domain=s),i.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return r("layer"),t}},42568:function(e,t,r){"use strict";var n=r(85024);e.exports=function(e,t,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(e);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",o)&&r("showticksuffix",s)}},96312:function(e,t,r){"use strict";var n=r(76808);e.exports=function(e,t,r,i){var a=t._template||{},o=t.type||a.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||i.noInsiderange||"log"===o||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(t.insiderange=!1,s=void 0),s&&(l=r("range",s)));var A,c=t.getAutorangeDflt(l,i),u=r("autorange",c);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==u&&!0!==u)&&(null===l[0]||"min"!==u&&"max reversed"!==u)&&(null===l[1]||"max"!==u&&"min reversed"!==u)||(l=void 0,delete t.range,t.autorange=!0,A=!0),A||(u=r("autorange",c=t.getAutorangeDflt(l,i))),u&&(n(r,u,l),"linear"!==o&&"-"!==o||r("rangemode")),t.cleanRange()}},21160:function(e,t,r){"use strict";var n=r(84284).FROM_BL;e.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],a=i[0]+(i[1]-i[0])*r;e.range=e._input.range=[e.l2r(a+(i[0]-a)*t),e.l2r(a+(i[1]-a)*t)],e.setScale()}},78344:function(e,t,r){"use strict";var n=r(33428),i=r(94336).E9,a=r(3400),o=a.numberFormat,s=r(38248),l=a.cleanNumber,A=a.ms2DateTime,c=a.dateTime2ms,u=a.ensureNumber,g=a.isArrayOrTypedArray,f=r(39032),h=f.FP_SAFE,d=f.BADNUM,p=f.LOG_CLIP,y=f.ONEWEEK,m=f.ONEDAY,I=f.ONEHOUR,v=f.ONEMIN,E=f.ONESEC,C=r(79811),B=r(33816),b=B.HOUR_PATTERN,x=B.WEEKDAY_PATTERN;function Q(e){return Math.pow(10,e)}function w(e){return null!==e&&void 0!==e}e.exports=function(e,t){t=t||{};var r=e._id||"x",f=r.charAt(0);function _(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],i=e.range[1];return.5*(n+i-2*p*Math.abs(n-i))}return d}function S(t,r,n,i){if((i||{}).msUTC&&s(t))return+t;var o=c(t,n||e.calendar);if(o===d){if(!s(t))return d;t=+t;var l=Math.floor(10*a.mod(t+.05,1)),A=Math.round(t-l/10);o=c(new Date(A))+l/10}return o}function k(t,r,n){return A(t,r,n||e.calendar)}function D(t){return e._categories[Math.round(t)]}function T(t){if(w(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"===typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return d}function M(t){if(e._categoriesMap)return e._categoriesMap[t]}function R(e){var t=M(e);return void 0!==t?t:s(e)?+e:void 0}function L(e){return s(e)?+e:M(e)}function N(e,t,r){return n.round(r+t*e,2)}function F(e,t,r){return(e-r)/t}var O=function(t){return s(t)?N(t,e._m,e._b):d},P=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var G="y"===f;O=function(t){if(!s(t))return d;var r=e._rangebreaks.length;if(!r)return N(t,e._m,e._b);var n=G;e.range[0]>e.range[1]&&(n=!n);for(var i=n?-1:1,a=i*t,o=0,l=0;lc)){o=a<(A+c)/2?l:l+1;break}o=l+1}var u=e._B[o]||0;return isFinite(u)?N(t,e._m2,u):0},P=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,i=0;ie._rangebreaks[i].pmax&&(n=i+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?_:u,e.l2c="log"===e.type?Q:u,e.l2p=O,e.p2l=P,e.c2p="log"===e.type?function(e,t){return O(_(e,t))}:O,e.p2c="log"===e.type?function(e){return Q(P(e))}:P,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=l,e.c2d=e.c2r=e.l2d=e.l2r=u,e.d2p=e.r2p=function(t){return e.l2p(l(t))},e.p2d=e.p2r=P,e.cleanPos=u):"log"===e.type?(e.d2r=e.d2l=function(e,t){return _(l(e),t)},e.r2d=e.r2c=function(e){return Q(l(e))},e.d2c=e.r2l=l,e.c2d=e.l2r=u,e.c2r=_,e.l2d=Q,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return Q(P(e))},e.r2p=function(t){return e.l2p(l(t))},e.p2r=P,e.cleanPos=u):"date"===e.type?(e.d2r=e.r2d=a.identity,e.d2c=e.r2c=e.d2l=e.r2l=S,e.c2d=e.c2r=e.l2d=e.l2r=k,e.d2p=e.r2p=function(t,r,n){return e.l2p(S(t,0,n))},e.p2d=e.p2r=function(e,t,r){return k(P(e),t,r)},e.cleanPos=function(t){return a.cleanDate(t,d,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=T,e.r2d=e.c2d=e.l2d=D,e.d2r=e.d2l_noadd=R,e.r2c=function(t){var r=L(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=u,e.r2l=L,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return D(P(e))},e.r2p=e.d2p,e.p2r=P,e.cleanPos=function(e){return"string"===typeof e&&""!==e?e:u(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=D,e.d2r=e.d2l_noadd=R,e.r2c=function(t){var r=R(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=M,e.l2r=e.c2r=u,e.r2l=R,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return D(P(e))},e.r2p=e.d2p,e.p2r=P,e.cleanPos=function(e){return Array.isArray(e)||"string"===typeof e&&""!==e?e:u(e)},e.setupMultiCategory=function(n){var i,o,s=e._traceIndices,l=e._matchGroup;if(l&&0===e._categories.length)for(var A in l)if(A!==r){var c=t[C.id2name(A)];s=s.concat(c._traceIndices)}var u=[[0,{}],[0,{}]],h=[];for(i=0;il[1]&&(i[s?0:1]=n),i[0]===i[1]){var A=e.l2r(r),c=e.l2r(n);if(void 0!==r){var u=A+1;void 0!==n&&(u=Math.min(u,c)),i[s?1:0]=u}if(void 0!==n){var g=c+1;void 0!==r&&(g=Math.max(g,A)),i[s?0:1]=g}}}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,i,o=a.nestedProperty(e,t).get();if(i=(i="date"===e.type?a.dfltRange(e.calendar):"y"===f?B.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||B.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(i[0]=0),o&&2===o.length){var l=null===o[0],A=null===o[1];for("date"!==e.type||e.autorange||(o[0]=a.cleanDate(o[0],d,e.calendar),o[1]=a.cleanDate(o[1],d,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!a.isDateTime(o[n],e.calendar)){e[t]=i;break}if(e.r2l(o[0])===e.r2l(o[1])){var c=a.constrain(e.r2l(o[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);o[0]=e.l2r(c-1e3),o[1]=e.l2r(c+1e3);break}}else{if(!s(o[n])){if(l||A||!s(o[1-n])){e[t]=i;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-h?o[n]=-h:o[n]>h&&(o[n]=h),o[0]===o[1]){var u=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=u,o[1]+=u}}}else a.nestedProperty(e,t).set(i)},e.setScale=function(r){var n=t._size;if(e.overlaying){var i=C.getFromId({_fullLayout:t},e.overlaying);e.domain=i.domain}var a=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(a);var s,l,A=e.r2l(e[a][0],o),c=e.r2l(e[a][1],o),u="y"===f;if(u?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(A-c),e._b=-e._m*c):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(c-A),e._b=-e._m*A),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(A,c),Math.max(A,c)),e._rangebreaks.length)){for(s=0;sc&&(g=!g),g&&e._rangebreaks.reverse();var h=g?-1:1;for(e._m2=h*e._length/(Math.abs(c-A)-e._lBreaks),e._B.push(-e._m2*(u?c:A)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&t=s.min&&(es.max&&(s.max=n),i=!1)}i&&A.push({min:e,max:n})}};for(n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(o.setTranslate,0,0).call(o.setScale,1,1),e.plot.call(o.setTranslate,t._offset,r._offset).call(o.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,e)}function p(t,r){var n=t.plotinfo,i=n.xaxis,l=n.yaxis,A=i._length,c=l._length,u=!!t.xr1,g=!!t.yr1,f=[];if(u){var h=a.simpleMap(t.xr0,i.r2l),d=a.simpleMap(t.xr1,i.r2l),p=h[1]-h[0],y=d[1]-d[0];f[0]=(h[0]*(1-r)+r*d[0]-h[0])/(h[1]-h[0])*A,f[2]=A*(1-r+r*y/p),i.range[0]=i.l2r(h[0]*(1-r)+r*d[0]),i.range[1]=i.l2r(h[1]*(1-r)+r*d[1])}else f[0]=0,f[2]=A;if(g){var m=a.simpleMap(t.yr0,l.r2l),I=a.simpleMap(t.yr1,l.r2l),v=m[1]-m[0],E=I[1]-I[0];f[1]=(m[1]*(1-r)+r*I[1]-m[1])/(m[0]-m[1])*c,f[3]=c*(1-r+r*E/v),l.range[0]=i.l2r(m[0]*(1-r)+r*I[0]),l.range[1]=l.l2r(m[1]*(1-r)+r*I[1])}else f[1]=0,f[3]=c;s.drawOne(e,i,{skipTitle:!0}),s.drawOne(e,l,{skipTitle:!0}),s.redrawComponents(e,[i._id,l._id]);var C=u?A/f[2]:1,B=g?c/f[3]:1,b=u?f[0]:0,x=g?f[1]:0,Q=u?f[0]/f[2]*A:0,w=g?f[1]/f[3]*c:0,_=i._offset-Q,S=l._offset-w;n.clipRect.call(o.setTranslate,b,x).call(o.setScale,1/C,1/B),n.plot.call(o.setTranslate,_,S).call(o.setScale,C,B),o.setPointGroupScale(n.zoomScalePts,1/C,1/B),o.setTextPointsScale(n.zoomScaleTxt,1/C,1/B)}s.redrawComponents(e)}},14944:function(e,t,r){"use strict";var n=r(24040).traceIs,i=r(52976);function a(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var r=a(e),i=n(e,"box-violin"),o=n(e._fullInput||{},"candlestick");return i&&!o&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}e.exports=function(e,t,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(function(e,t){if("-"===e.type){var r,s=e._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var A=function(e,t,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(o(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(t,s,l);if(A)if("histogram"!==A.type||l!=={v:"y",h:"x"}[A.orientation||"v"]){var c=l+"calendar",u=A[c],g={noMultiCategory:!n(A,"cartesian")||n(A,"noMultiCategory")};if("box"===A.type&&A._hasPreCompStats&&l==={h:"x",v:"y"}[A.orientation||"v"]&&(g.noMultiCategory=!0),g.autotypenumbers=e.autotypenumbers,o(A,l)){var f=a(A),h=[];for(r=0;r0?".":"")+a;i.isPlainObject(o)?l(o,t,s,n+1):t(s,a,o)}}))}t.manageCommandObserver=function(e,r,n,o){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var A=t.hasSimpleAPICommandBindings(e,n,s.lookupTable);if(r&&r._commandObserver){if(A)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(A){a(e,A,s.cache),s.check=function(){if(l){var t=a(e,A,s.cache);return t.changed&&o&&void 0!==s.lookupTable[t.value]&&(s.disable(),Promise.resolve(o({value:t.value,type:A.type,prop:A.prop,traces:A.traces,index:s.lookupTable[t.value]})).then(s.enable,s.enable)),t.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],u=0;u0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}e.exports=function(e){return new Q(e)},w.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in C.layerNameToAdjective)if("frame"!==l&&a["show"+l]){s=!0;break}for(var A=!1,c=0;c0&&o._module.calcGeoJSON(a,t)}if(!r){if(this.updateProjection(e,t))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),h.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},w.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],l=t._size,c=n.domain,u=n.projection,g=n.lonaxis,f=n.lataxis,h=g._ax,d=f._ax,y=this.projection=function(e){var t=e.projection,r=t.type,n=C.projNames[r];n="geo"+A.titleCase(n);for(var l=(i[n]||s[n])(),c=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?C.lonaxisSpan[r]/2:null,u=["center","rotate","parallels","clipExtent"],g=function(e){return e?l:[]},f=0;fc*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(e){return l.getPath().bounds(e)},l.precision(C.precision),e._isSatellite&&l.tilt(t.tilt).distance(t.distance),c&&l.clipAngle(c-C.clipPad),l}(n),m=[[l.l+l.w*c.x[0],l.t+l.h*(1-c.y[1])],[l.l+l.w*c.x[1],l.t+l.h*(1-c.y[0])]],I=n.center||{},v=u.rotation||{},E=g.range||[],B=f.range||[];if(n.fitbounds){h._length=m[1][0]-m[0][0],d._length=m[1][1]-m[0][1],h.range=p(r,h),d.range=p(r,d);var b=(h.range[0]+h.range[1])/2,x=(d.range[0]+d.range[1])/2;if(n._isScoped)I={lon:b,lat:x};else if(n._isClipped){I={lon:b,lat:x},v={lon:b,lat:x,roll:v.roll};var Q=u.type,w=C.lonaxisSpan[Q]/2||180,S=C.lataxisSpan[Q]/2||90;E=[b-w,b+w],B=[x-S,x+S]}else I={lon:b,lat:x},v={lon:b,lat:v.lat,roll:v.roll}}y.center([I.lon-v.lon,I.lat-v.lat]).rotate([-v.lon,-v.lat,v.roll]).parallels(u.parallels);var k=_(E,B);y.fitExtent(m,k);var D=this.bounds=y.getBounds(k),T=this.fitScale=y.scale(),M=y.translate();if(n.fitbounds){var R=y.getBounds(_(h.range,d.range)),L=Math.min((D[1][0]-D[0][0])/(R[1][0]-R[0][0]),(D[1][1]-D[0][1])/(R[1][1]-R[0][1]));isFinite(L)?y.scale(L*T):A.warn("Something went wrong during"+this.id+"fitbounds computations.")}else y.scale(u.scale*T);var N=this.midPt=[(D[0][0]+D[1][0])/2,(D[0][1]+D[1][1])/2];if(y.translate([M[0]+(N[0]-M[0]),M[1]+(N[1]-M[1])]).clipExtent(D),n._isAlbersUsa){var F=y([I.lon,I.lat]),O=y.translate();y.translate([O[0]-(F[0]-O[0]),O[1]-(F[1]-O[1])])}},w.updateBaseLayers=function(e,t){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return Boolean(C.lineLayers[e])}function A(e){return Boolean(C.fillLayers[e])}var c=(this.hasChoropleth?C.layersForChoropleth:C.layers).filter((function(e){return l(e)||A(e)?t["show"+e]:!s(e)||t[e].showgrid})),f=r.framework.selectAll(".layer").data(c,String);f.exit().each((function(e){delete a[e],delete o[e],n.select(this).remove()})),f.enter().append("g").attr("class",(function(e){return"layer "+e})).each((function(e){var t=a[e]=n.select(this);"bg"===e?r.bgRect=t.append("rect").style("pointer-events","all"):s(e)?o[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?o[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):A(e)&&(o[e]=t.append("path").style("stroke","none"))})),f.order(),f.each((function(r){var n=o[r],a=C.layerNameToAdjective[r];"frame"===r?n.datum(C.sphereSVG):l(r)||A(r)?n.datum(x(i,i.objects[r])):s(r)&&n.datum(function(e,t,r){var n,i,a,o=1e-6,s=2.5,l=t[e],A=C.scopeDefaults[t.scope];"lonaxis"===e?(n=A.lonaxisRange,i=A.lataxisRange,a=function(e,t){return[e,t]}):"lataxis"===e&&(n=A.lataxisRange,i=A.lonaxisRange,a=function(e,t){return[t,e]});var c={type:"linear",range:[n[0],n[1]-o],tick0:l.tick0,dtick:l.dtick};d.setConvert(c,r);var u=d.calcTicks(c);t.isScoped||"lonaxis"!==e||u.pop();for(var g=u.length,f=new Array(g),h=0;h-1&&v(n.event,i,[r.xaxis],[r.yaxis],r.id,c),s.indexOf("event")>-1&&f.click(i,n.event))}))}function u(e){return r.projection.invert([e[0]+r.xaxis._offset,e[1]+r.yaxis._offset])}},w.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,i="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=n.select(e.container).append("g").attr("class","geo "+e.id).call(g.setClipUrl,i,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},d.setConvert(e.mockAxis,r)},w.saveViewInitial=function(e){var t,r=e.center||{},n=e.projection,i=n.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":n.scale},t=e._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},A.extendFlat(this.viewInitial,t)},w.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},w._render=function(){var e,t=this.projection,r=t.getPath();function n(e){var r=t(e.lonlat);return r?c(r[0],r[1]):null}function i(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",(function(e){return r(e.geojson)}));for(e in this.dataPoints)this.dataPoints[e].attr("display",i).attr("transform",n)}},10816:function(e,t,r){"use strict";var n=r(84888).KY,i=r(3400).counterRegex,a=r(43520),o="geo",s=i(o),l={};l[o]={valType:"subplotid",dflt:o,editType:"calc"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:r(40384),supplyLayoutDefaults:r(86920),plot:function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[o],s=0;s0&&D<0&&(D+=360);var T,M,R,L=(k+D)/2;if(!f){var N=h?u.projRotate:[L,0,0];T=r("projection.rotation.lon",N[0]),r("projection.rotation.lat",N[1]),r("projection.rotation.roll",N[2]),r("showcoastlines",!h&&I)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!I&&void 0)&&r("oceancolor")}f?(M=-96.6,R=38.7):(M=h?L:T,R=(S[0]+S[1])/2),r("center.lon",M),r("center.lat",R),d&&(r("projection.tilt"),r("projection.distance")),p&&r("projection.parallels",u.projParallels||[0,60]),r("projection.scale"),r("showland",!!I&&void 0)&&r("landcolor"),r("showlakes",!!I&&void 0)&&r("lakecolor"),r("showrivers",!!I&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",h&&"usa"!==c&&I)&&(r("countrycolor"),r("countrywidth")),("usa"===c||"north america"===c&&50===A)&&(r("showsubunits",I),r("subunitcolor"),r("subunitwidth")),h||r("showframe",I)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete t.projection.scale,h?(delete t.center.lon,delete t.center.lat):y?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}e.exports=function(e,t,r){i(e,t,r,{type:"geo",attributes:s,handleDefaults:A,fullData:r,partition:"y"})}},79248:function(e,t,r){"use strict";var n=r(33428),i=r(3400),a=r(24040),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},A={cursor:"auto"};function c(e,t){return n.behavior.zoom().translate(t.translate()).scale(t.scale())}function u(e,t,r){var n=e.id,o=e.graphDiv,s=o.layout,l=s[n],A=o._fullLayout,c=A[n],u={},g={};function f(e,t){u[n+"."+e]=i.nestedProperty(l,e).get(),a.call("_storeDirectGUIEdit",s,A._preGUI,u);var r=i.nestedProperty(c,e);r.get()!==t&&(r.set(t),i.nestedProperty(l,e).set(t),g[n+"."+e]=t)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),o.emit("plotly_relayout",g)}function g(e,t){var r=c(0,t);function i(r){var n=t.invert(e.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){t.scale(n.event.scale).translate(n.event.translate),e.render(!0);var r=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(A),u(e,t,i)})),r}function f(e,t){var r,i,a,o,s,g,f,h,d,p=c(0,t),y=2;function m(e){return t.invert(e)}function I(r){var n=t.rotate(),i=t.invert(e.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return p.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),i=t.rotate(),a=t.translate(),o=i,s=m(r)})).on("zoom",(function(){if(g=n.mouse(this),function(e){var r=m(e);if(!r)return!0;var n=t(r);return Math.abs(n[0]-e[0])>y||Math.abs(n[1]-e[1])>y}(r))return p.scale(t.scale()),void p.translate(t.translate());t.scale(n.event.scale),t.translate([a[0],n.event.translate[1]]),s?m(g)&&(h=m(g),f=[o[0]+(h[0]-s[0]),i[1],i[2]],t.rotate(f),o=f):s=m(r=g),d=!0,e.render(!0);var l=t.rotate(),A=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":A[0],"geo.center.lat":A[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(A),d&&u(e,t,I)})),p}function h(e,t){var r,i={r:t.rotate(),k:t.scale()},a=c(0,t),g=function(e){for(var t=0,r=arguments.length,i=[];++th?(a=(u>0?90:-90)-f,i=0):(a=Math.asin(u/h)*s-f,i=Math.sqrt(h*h-u*u));var d=180-a-2*f,y=(Math.atan2(g,c)-Math.atan2(A,i))*s,I=(Math.atan2(g,c)-Math.atan2(A,-i))*s,v=p(r[0],r[1],a,y),E=p(r[0],r[1],d,I);return v<=E?[a,y,r[2]]:[d,I,r[2]]}(l,r,u);isFinite(f[0])&&isFinite(f[1])&&isFinite(f[2])||(f=u),t.rotate(f),u=f}}else r=d(t,A=e);g.of(this,arguments)({type:"zoom"})})),e=g.of(this,arguments),f++||e({type:"zoomstart"})})).on("zoomend",(function(){var r;n.select(this).style(A),h.call(a,"zoom",null),r=g.of(this,arguments),--f||r({type:"zoomend"}),u(e,t,y)})).on("zoom.redraw",(function(){e.render(!0);var r=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})})),n.rebind(a,g,"on")}function d(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&function(e){var t=e[0]*o,r=e[1]*o,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}(r)}function p(e,t,r,n){var i=y(r-e),a=y(n-t);return Math.sqrt(i*i+a*a)}function y(e){return(e%360+540)%360-180}function m(e,t,r){var n=r*o,i=e.slice(),a=0===t?1:0,s=2===t?1:2,l=Math.cos(n),A=Math.sin(n);return i[a]=e[a]*l-e[s]*A,i[s]=e[s]*l+e[a]*A,i}function I(e,t){for(var r=0,n=0,i=e.length;nMath.abs(s)?(A.boxEnd[1]=A.boxStart[1]+Math.abs(a)*E*(s>=0?1:-1),A.boxEnd[1]l[3]&&(A.boxEnd[1]=l[3],A.boxEnd[0]=A.boxStart[0]+(l[3]-A.boxStart[1])/Math.abs(E))):(A.boxEnd[0]=A.boxStart[0]+Math.abs(s)/E*(a>=0?1:-1),A.boxEnd[0]l[2]&&(A.boxEnd[0]=l[2],A.boxEnd[1]=A.boxStart[1]+(l[2]-A.boxStart[0])*Math.abs(E)))}}else A.boxEnabled?(a=A.boxStart[0]!==A.boxEnd[0],s=A.boxStart[1]!==A.boxEnd[1],a||s?(a&&(p(0,A.boxStart[0],A.boxEnd[0]),e.xaxis.autorange=!1),s&&(p(1,A.boxStart[1],A.boxEnd[1]),e.yaxis.autorange=!1),e.relayoutCallback()):e.glplot.setDirty(),A.boxEnabled=!1,A.boxInited=!1):A.boxInited&&(A.boxInited=!1);break;case"pan":A.boxEnabled=!1,A.boxInited=!1,t?(A.panning||(A.dragStart[0]=n,A.dragStart[1]=i),Math.abs(A.dragStart[0]-n).999&&(p="turntable"):p="turntable")}else p="turntable";r("dragmode",p),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(e,t,r){var i=t._basePlotModules.length>1;o(e,t,r,{type:c,attributes:l,handleDefaults:u,fullLayout:t,font:t.font,fullData:r,getDfltFromLayout:function(t){if(!i)return n.validate(e[t],l[t])?e[t]:void 0},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}},346:function(e,t,r){"use strict";var n=r(86140),i=r(86968).u,a=r(92880).extendFlat,o=r(3400).counterRegex;function s(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}e.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},9020:function(e,t,r){"use strict";var n=r(43080),i=["xaxis","yaxis","zaxis"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(e){for(var t=0;t<3;++t){var r=e[i[t]];r.visible?(this.enabled[t]=r.showspikes,this.colors[t]=n(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness):(this.enabled[t]=!1,this.drawSides[t]=!1)}},e.exports=function(e){var t=new a;return t.merge(e),t}},87152:function(e,t,r){"use strict";e.exports=function(e){for(var t=e.axesOptions,r=e.glplot.axesPixels,s=e.fullSceneLayout,l=[[],[],[]],A=0;A<3;++A){var c=s[a[A]];if(c._length=(r[A].hi-r[A].lo)*r[A].pixelsPerDataUnit/e.dataScale[A],Math.abs(c._length)===1/0||isNaN(c._length))l[A]=[];else{c._input_range=c.range.slice(),c.range[0]=r[A].lo/e.dataScale[A],c.range[1]=r[A].hi/e.dataScale[A],c._m=1/(e.dataScale[A]*r[A].pixelsPerDataUnit),c.range[0]===c.range[1]&&(c.range[0]-=1,c.range[1]+=1);var u=c.tickmode;if("auto"===c.tickmode){c.tickmode="linear";var g=c.nticks||i.constrain(c._length/40,4,9);n.autoTicks(c,Math.abs(c.range[1]-c.range[0])/g)}for(var f=n.calcTicks(c,{msUTC:!0}),h=0;h/g," "));l[A]=f,c.tickmode=u}}for(t.ticks=l,A=0;A<3;++A)for(o[A]=.5*(e.glplot.bounds[0][A]+e.glplot.bounds[1][A]),h=0;h<2;++h)t.bounds[h][A]=e.glplot.bounds[h][A];e.contourLevels=function(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),a=0;ar.deltaY?1.1:1/1.1,a=e.glplot.getAspectratio();e.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(e)}}),!!A&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=n();e.graphDiv.emit("plotly_relayouting",t)}})),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",(function(r){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:r,layer:e.id})}),!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},b.render=function(){var e,t=this,r=t.graphDiv,n=t.svgContainer,i=t.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),v(t),t.glplot.axes.update(t.axesOptions);for(var A=Object.keys(t.traces),c=null,g=t.glplot.selection,d=0;d")):"isosurface"===e.type||"volume"===e.type?(b.valueLabel=f.hoverLabelText(t._mockAxis,t._mockAxis.d2l(g.traceCoordinate[3]),e.valuehoverformat),_.push("value: "+b.valueLabel),g.textLabel&&_.push(g.textLabel),I=_.join("
")):I=g.textLabel;var S={x:g.traceCoordinate[0],y:g.traceCoordinate[1],z:g.traceCoordinate[2],data:E._input,fullData:E,curveNumber:E.index,pointNumber:B};h.appendArrayPointValue(S,E,B),e._module.eventData&&(S=E._module.eventData(S,g,E,{},B));var k={points:[S]};if(t.fullSceneLayout.hovermode){var D=[];h.loneHover({trace:E,x:(.5+.5*m[0]/m[3])*s,y:(.5-.5*m[1]/m[3])*l,xLabel:b.xLabel,yLabel:b.yLabel,zLabel:b.zLabel,text:I,name:c.name,color:h.castHoverOption(E,B,"bgcolor")||c.color,borderColor:h.castHoverOption(E,B,"bordercolor"),fontFamily:h.castHoverOption(E,B,"font.family"),fontSize:h.castHoverOption(E,B,"font.size"),fontColor:h.castHoverOption(E,B,"font.color"),nameLength:h.castHoverOption(E,B,"namelength"),textAlign:h.castHoverOption(E,B,"align"),hovertemplate:u.castOption(E,B,"hovertemplate"),hovertemplateLabels:u.extendFlat({},S,b),eventData:[S]},{container:n,gd:r,inOut_bbox:D}),S.bbox=D[0]}g.distance<5&&(g.buttons||C)?r.emit("plotly_click",k):r.emit("plotly_hover",k),this.oldEventData=k}else h.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},b.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var Q=["xaxis","yaxis","zaxis"];function w(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=Q[i],o=a.charAt(0),s=n[a],l=t[o],A=t[o+"calendar"],c=t["_"+o+"length"];if(u.isArrayOrTypedArray(l))for(var g,f=0;f<(c||l.length);f++)if(u.isArrayOrTypedArray(l[f]))for(var h=0;hy[1][o])y[0][o]=-1,y[1][o]=1;else{var T=y[1][o]-y[0][o];y[0][o]-=T/32,y[1][o]+=T/32}if(v=[y[0][o],y[1][o]],v=E(v,l),y[0][o]=v[0],y[1][o]=v[1],l.isReversed()){var M=y[0][o];y[0][o]=y[1][o],y[1][o]=M}}else v=l.range,y[0][o]=l.r2l(v[0]),y[1][o]=l.r2l(v[1]);y[0][o]===y[1][o]&&(y[0][o]-=1,y[1][o]+=1),m[o]=y[1][o]-y[0][o],l.range=[y[0][o],y[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*f[o],max:l.range[1]*f[o]})}var R=c.aspectmode;if("cube"===R)p=[1,1,1];else if("manual"===R){var L=c.aspectratio;p=[L.x,L.y,L.z]}else{if("auto"!==R&&"data"!==R)throw new Error("scene.js aspectRatio was not one of the enumerated types");var N=[1,1,1];for(o=0;o<3;++o){var F=I[A=(l=c[Q[o]]).type];N[o]=Math.pow(F.acc,1/F.count)/f[o]}p="data"===R||Math.max.apply(null,N)/Math.min.apply(null,N)<=4?N:[1,1,1]}c.aspectratio.x=u.aspectratio.x=p[0],c.aspectratio.y=u.aspectratio.y=p[1],c.aspectratio.z=u.aspectratio.z=p[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var O=c.domain||null,P=t._size||null;if(O&&P){var G=n.container.style;G.position="absolute",G.left=P.l+O.x[0]*P.w+"px",G.top=P.t+(1-O.y[1])*P.h+"px",G.width=P.w*(O.x[1]-O.x[0])+"px",G.height=P.h*(O.y[1]-O.y[0])+"px"}n.glplot.redraw()}},b.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)},b.getCamera=function(){var e,t=this;return t.camera.view.recalcMatrix(t.camera.view.lastT()),{up:{x:(e=t.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}},b.setViewport=function(e){var t,r=this,n=e.camera;r.camera.lookAt.apply(this,[[(t=n).eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),r.glplot.setAspectratio(e.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},b.isCameraChanged=function(e){var t=this.getCamera(),r=u.nestedProperty(e,this.id+".camera").get();function n(e,t,r,n){var i=["up","center","eye"],a=["x","y","z"];return t[i[r]]&&e[i[r]][a[n]]===t[i[r]][a[n]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(t,r,a,o)){i=!0;break}(!r.projection||t.projection&&t.projection.type!==r.projection.type)&&(i=!0)}return i},b.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=u.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},b.saveLayout=function(e){var t,r,n,i,a,o,s=this,l=s.fullLayout,A=s.isCameraChanged(e),g=s.isAspectChanged(e),f=A||g;if(f){var h={};A&&(t=s.getCamera(),n=(r=u.nestedProperty(e,s.id+".camera")).get(),h[s.id+".camera"]=n),g&&(i=s.glplot.getAspectratio(),o=(a=u.nestedProperty(e,s.id+".aspectratio")).get(),h[s.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",e,l._preGUI,h),A&&(r.set(t),u.nestedProperty(l,s.id+".camera").set(t)),g&&(a.set(i),u.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return f},b.updateFx=function(e,t){var r=this,n=r.camera;if(n)if("orbit"===e)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===e){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,A=o.up.z;if(A/Math.sqrt(s*s+l*l+A*A)<.999){var g=r.id+".camera.up",f={x:0,y:0,z:1},h={};h[g]=f;var d=i.layout;c.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=f,u.nestedProperty(d,g).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t},b.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(n),t.glplot.redraw();var r=t.glplot.gl,i=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);r.readPixels(0,0,i,a,r.RGBA,r.UNSIGNED_BYTE,o),function(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l,A=s.getContext("2d",{willReadFrequently:!0}),c=A.createImageData(i,a);switch(c.data.set(o),A.putImageData(c,0,0),e){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(n),l},b.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[Q[e]];f.setConvert(t,this.fullLayout),t.setScale=u.noop}},b.make4thDimension=function(){var e=this,t=e.graphDiv._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(e._mockAxis,t)},e.exports=B},52094:function(e){"use strict";e.exports=function(e,t,r,n){n=n||e.length;for(var i=new Array(n),a=0;aOpenStreetMap contributors',o=['\xa9 Carto',a].join(" "),s=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),l={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:a,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},A=n(l);e.exports={requiredVersion:i,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:l,styleValuesNonMapbox:A,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+i+"."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",A.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}},89032:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){var r=e.split(" "),i=r[0],a=r[1],o=n.isArrayOrTypedArray(t)?n.mean(t):t,s=.5+o/100,l=1.5+o/100,A=["",""],c=[0,0];switch(i){case"top":A[0]="top",c[1]=-l;break;case"bottom":A[0]="bottom",c[1]=l}switch(a){case"left":A[1]="right",c[0]=-s;break;case"right":A[1]="left",c[0]=s}return{anchor:A[0]&&A[1]?A.join("-"):A[0]?A[0]:A[1]?A[1]:"center",offset:c}}},33688:function(e,t,r){"use strict";var n=r(3480),i=r(3400),a=i.strTranslate,o=i.strScale,s=r(84888).KY,l=r(9616),A=r(33428),c=r(43616),u=r(72736),g=r(14440),f="mapbox",h=t.constants=r(47552);function d(e){return"string"===typeof e&&(-1!==h.styleValuesMapbox.indexOf(e)||0===e.indexOf("mapbox://")||0===e.indexOf("stamen"))}t.name=f,t.attr="subplot",t.idRoot=f,t.idRegex=t.attrRegex=i.counterRegex(f),t.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},t.layoutAttributes=r(5232),t.supplyLayoutDefaults=r(5976),t.plot=function(e){var t=e._fullLayout,r=e.calcdata,a=t._subplots[f];if(n.version!==h.requiredVersion)throw new Error(h.wrongVersionErrorMsg);var o=function(e,t){var r=e._fullLayout,n=e._context;if(""===n.mapboxAccessToken)return"";for(var a=[],o=[],s=!1,l=!1,A=0;A1&&i.warn(h.multipleTokensErrorMsg),a[0]):(o.length&&i.log(["Listed mapbox access token(s)",o.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(e,a);n.accessToken=o;for(var l=0;lC/2){var B=m.split("|").join("
");v.text(B).attr("data-unformatted",B).call(u.convertToTspans,e),E=c.bBox(v.node())}v.attr("transform",a(-3,8-E.height)),I.insert("rect",".static-attribution").attr({x:-E.width-6,y:-E.height-3,width:E.width+6,height:E.height+3,fill:"rgba(255, 255, 255, 0.75)"});var b=1;E.width+6>C&&(b=C/(E.width+6));var x=[n.l+n.w*g.x[1],n.t+n.h*(1-g.y[0])];I.attr("transform",a(x[0],x[1])+o(b))}},t.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[f],n=0;n0){for(var r=0;r0}function c(e){var t={},r={};switch(e.type){case"circle":n.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":n.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(t,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:r}}l.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=A(e)},l.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},l.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},l.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapboxLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},l.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,A(e)){var r=function(e){var t,r=e.sourcetype,n=e.source,a={type:r};return"geojson"===r?t="data":"vector"===r?t="string"===typeof n?"url":"tiles":"raster"===r?(t="tiles",a.tileSize=256):"image"===r&&(t="url",a.coordinates=e.coordinates),a[t]=n,e.sourceattribution&&(a.attribution=i(e.sourceattribution)),a}(e);t.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&p(t.originalEvent,n,[r.xaxis],[r.yaxis],r.id,e),i.indexOf("event")>-1&&A.click(n,t.originalEvent)}}},v.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(!t.isStatic){var a,o=e.dragmode;a=function(e,r){r.isRect?(e.range={})[t.id]=[A([r.xmin,r.ymin]),A([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(A)};var s=t.dragOptions;t.dragOptions=i.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:a},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),g(o)||u(o)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,n){f(e,r,n,t.dragOptions,o)},l.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function A(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},v.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},v.updateLayers=function(e){var t,r=e[this.id].layers,n=this.layerList;if(r.length!==n.length){for(t=0;t=t.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=t._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)r.on("click",(function(){C.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(e,o),s.text(o.text()&&l.text()?" - ":"")}},C.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=C.graphJson(e,!1,"keepdata"),i.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var x=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],Q=["year","month","dayMonth","dayMonthYear"];function w(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,i={};function a(e){for(var r=!0,a=0;a1&&R.length>1){for(l.getComponentMethod("grid","sizeDefaults")(A,s),o=0;o15&&R.length>15&&0===s.shapes.length&&0===s.images.length,C.linkSubplots(g,s,c,n),C.cleanPlot(g,s,c,n);var P=!(!n._has||!n._has("gl2d")),G=!(!s._has||!s._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||P,z=!(!s._has||!s._has("cartesian"))||G;U&&!z?n._bgLayer.remove():z&&!U&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&d({_fullLayout:n}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i0){var c=1-2*s;n=Math.round(c*n),i=Math.round(c*i)}}var g=C.layoutAttributes.width.min,f=C.layoutAttributes.height.min;n1,d=!t.height&&Math.abs(r.height-i)>1;(d||h)&&(h&&(r.width=n),d&&(r.height=i)),e._initialAutoSize||(e._initialAutoSize={width:n,height:i}),C.sanitizeMargins(r)},C.supplyLayoutModuleDefaults=function(e,t,r,n){var i,a,o,s=l.componentsRegistry,A=t._basePlotModules,c=l.subplotsRegistry.cartesian;for(i in s)(o=s[i]).includeBasePlot&&o.includeBasePlot(e,t);for(var g in A.length||A.push(c),t._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(e,t),c.finalizeSubplots(e,t)),t._subplots)t._subplots[g].sort(u.subplotSort);for(a=0;a1&&(r.l/=y,r.r/=y)}if(f){var m=(r.t+r.b)/f;m>1&&(r.t/=m,r.b/=m)}var I=void 0!==r.xl?r.xl:r.x,v=void 0!==r.xr?r.xr:r.x,E=void 0!==r.yt?r.yt:r.y,B=void 0!==r.yb?r.yb:r.y;h[t]={l:{val:I,size:r.l+p},r:{val:v,size:r.r+p},b:{val:B,size:r.b+p},t:{val:E,size:r.t+p}},d[t]=1}else delete h[t],delete d[t];if(!n._replotting)return C.doAutoMargin(e)}},C.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),T(t);var i=t._size,a=t.margin,s={t:0,b:0,l:0,r:0},A=u.extendFlat({},i),c=a.l,g=a.r,f=a.t,d=a.b,p=t._pushmargin,y=t._pushmarginIds,m=t.minreducedwidth,I=t.minreducedheight;if(!1!==a.autoexpand){for(var v in p)y[v]||delete p[v];var E=e._fullLayout._reservedMargin;for(var B in E)for(var b in E[B]){var x=E[B][b];s[b]=Math.max(s[b],x)}for(var Q in p.base={l:{val:0,size:c},r:{val:1,size:g},t:{val:1,size:f},b:{val:0,size:d}},s){var w=0;for(var _ in p)"base"!==_&&o(p[_][Q].size)&&(w=p[_][Q].size>w?p[_][Q].size:w);var S=Math.max(0,a[Q]-w);s[Q]=Math.max(0,s[Q]-S)}for(var k in p){var D=p[k].l||{},M=p[k].b||{},R=D.val,L=D.size,N=M.val,F=M.size,O=r-s.r-s.l,P=n-s.t-s.b;for(var G in p){if(o(L)&&p[G].r){var U=p[G].r.val,z=p[G].r.size;if(U>R){var q=(L*U+(z-O)*R)/(U-R),H=(z*(1-R)+(L-O)*(1-U))/(U-R);q+H>c+g&&(c=q,g=H)}}if(o(F)&&p[G].t){var Y=p[G].t.val,J=p[G].t.size;if(Y>N){var K=(F*Y+(J-P)*N)/(Y-N),j=(J*(1-N)+(F-P)*(1-Y))/(Y-N);K+j>d+f&&(d=K,f=j)}}}}}var V=u.constrain(r-a.l-a.r,2,m),W=u.constrain(n-a.t-a.b,2,I),Z=Math.max(0,r-V),X=Math.max(0,n-W);if(Z){var $=(c+g)/Z;$>1&&(c/=$,g/=$)}if(X){var ee=(d+f)/X;ee>1&&(d/=ee,f/=ee)}if(i.l=Math.round(c)+s.l,i.r=Math.round(g)+s.r,i.t=Math.round(f)+s.t,i.b=Math.round(d)+s.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(C.didMarginChange(A,i)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=h.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(y).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return l.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function s(){return a++,function(){var t;o++,n||o!==a||(t=i,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return l.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)))}}r.runFn(s),setTimeout(s())}))}],a=u.syncOrAsync(i,e);return a&&a.then||(a=Promise.resolve()),a.then((function(){return e}))}C.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},C.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&C.supplyDefaults(e);var o=i?e._fullData:e.data,l=i?e._fullLayout:e.layout,A=(e._transitionData||{})._frames;function c(e,t){if("function"===typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var n,i={};return Object.keys(e).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0)))if("function"!==typeof e[a]){if("keepdata"===r){if("src"===a.substr(a.length-3))return}else if("keepstream"===r){if("string"===typeof(n=e[a+"src"])&&n.indexOf(":")>0&&!u.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"===typeof(n=e[a+"src"])&&n.indexOf(":")>0)return;i[a]=c(e[a],t)}else t&&(i[a]="_function")})),i}var a=Array.isArray(e),o=u.isTypedArray(e);if((a||o)&&e.dtype&&e.shape){var l=e.bdata;return c({dtype:e.dtype,shape:e.shape,bdata:u.isArrayBuffer(l)?s.encode(l):l},t)}return a?e.map((function(e){return c(e,t)})):o?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var g={data:(o||[]).map((function(e){var r=c(e);return t&&delete r.fit,r}))};if(!t&&(g.layout=c(l),i)){var f=l._size;g.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return A&&(g.frames=c(A)),a&&(g.config=c(e._context,!0)),"object"===n?g:JSON.stringify(g)},C.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r=0;a--)if(l[a].enabled){r._indexToPoints=l[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(e,r))}Array.isArray(o)&&o[0]||(o=[{x:f,y:f}]),o[0].t||(o[0].t={}),o[0].trace=r,g[t]=o}}for(N(o,s,c),i=0;i1e-10?e:0}function g(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a0?r:1/0})),i=n.mod(r+1,t.length);return[t[r],t[i]]},findIntersectionXY:A,findXYatLength:function(e,t,r,n){var i=-t*r,a=t*t+1,o=2*(t*i-r),s=i*i+r*r-e*e,l=Math.sqrt(o*o-4*a*s),A=(-o+l)/(2*a),c=(-o-l)/(2*a);return[[A,t*A+i+n],[c,t*c+i+n]]},clampTiny:u,pathPolygon:function(e,t,r,n,i,a){return"M"+g(c(e,t,r,n),i,a).join("L")},pathPolygonAnnulus:function(e,t,r,n,i,a,o){var s,l;e=90||l>90&&A>=450?1:u<=0&&f<=0?0:Math.max(u,f),t=l<=180&&A>=180||l>180&&A>=540?-1:c>=0&&g>=0?0:Math.min(c,g),r=l<=270&&A>=270||l>270&&A>=630?-1:u>=0&&f>=0?0:Math.min(u,f),n=A>=360?1:c<=0&&g<=0?0:Math.max(c,g),[t,r,n,i]}(h),E=v[2]-v[0],C=v[3]-v[1],B=f/g,b=Math.abs(C/E);B>b?(d=g,I=(f-(p=g*b))/i.h/2,y=[s[0],s[1]],m=[u[0]+I,u[1]-I]):(p=f,I=(g-(d=f/b))/i.w/2,y=[s[0]+I,s[1]-I],m=[u[0],u[1]]),r.xLength2=d,r.yLength2=p,r.xDomain2=y,r.yDomain2=m;var x,Q=r.xOffset2=i.l+i.w*y[0],w=r.yOffset2=i.t+i.h*(1-m[1]),_=r.radius=d/E,S=r.innerRadius=r.getHole(t)*_,k=r.cx=Q-_*v[0],D=r.cy=w+_*v[3],T=r.cxx=k-Q,M=r.cyy=D-w,R=a.side;"counterclockwise"===R?(x=R,R="top"):"clockwise"===R&&(x=R,R="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:R,_trueSide:x,domain:[S/i.w,_/i.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:y}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:m});var F=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",F).attr("transform",l(T,M)),n.frontplot.attr("transform",l(Q,w)).call(c.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",F).attr("transform",l(k,D)).call(A.fill,t.bgcolor)},P.mockAxis=function(e,t,r,n){var i=o.extendFlat({},r,n);return h(i,t,e),i},P.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:"linear"},r);f(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(t));s.range=[e[r[0]]*o,e[r[1]]*o]},s.isPtWithinRange="x"!==a||i?function(){return!0}:function(e){return n.isPtInside(e)},s.setRange(),s.setScale(),s},P.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);d(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")],void 0!==i.minallowed){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(void 0!==i.maxallowed){var l=i.r2l(i.maxallowed);i._rl[0]90&&d<=270&&(p.tickangle=180);var I=m?function(e){var t=M(r,k([e.x,0]));return l(t[0]-u,t[1]-f)}:function(e){return l(p.l2p(e.x)+c,0)},v=m?function(e){return T(r,e.x,-1/0,1/0)}:function(e){return r.pathArc(p.r2p(e.x)+c)},E=G(h);if(r.radialTickLayout!==E&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=E),y){p.setScale();var C=0,B=m?(p.tickvals||[]).filter((function(e){return e>=0})).map((function(e){return g.tickText(p,e,!0,!1)})):g.calcTicks(p),b=m?B:g.clipEnds(p,B),x=g.getTickSigns(p)[2];m&&(("top"===p.ticks&&"bottom"===p.side||"bottom"===p.ticks&&"top"===p.side)&&(x=-x),"top"===p.ticks&&"top"===p.side&&(C=-p.ticklen),"bottom"===p.ticks&&"bottom"===p.side&&(C=p.ticklen)),g.drawTicks(n,p,{vals:B,layer:i["radial-axis"],path:g.makeTickPath(p,0,x),transFn:I,crisp:!1}),g.drawGrid(n,p,{vals:b,layer:i["radial-grid"],path:v,transFn:o.noop,crisp:!1}),g.drawLabels(n,p,{vals:B,layer:i["radial-axis"],transFn:I,labelFns:g.makeLabelFns(p,C)})}var Q=r.radialAxisAngle=r.vangles?F(U(N(h.angle),r.vangles)):h.angle,w=l(u,f),_=w+s(-Q);z(i["radial-axis"],y&&(h.showticklabels||h.ticks),{transform:_}),z(i["radial-grid"],y&&h.showgrid,{transform:m?"":w}),z(i["radial-line"].select("line"),y&&h.showline,{x1:m?-a:c,y1:0,x2:a,y2:0,transform:_}).attr("stroke-width",h.linewidth).call(A.stroke,h.linecolor)},P.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),A=n.id+"title",u=0;if(l.title){var g=c.bBox(n.layers["radial-axis"].node()).height,f=l.title.font.size,h=l.side;u="top"===h?f:"counterclockwise"===h?-(g+.4*f):g+.8*f}var d=void 0!==r?r:n.radialAxisAngle,p=N(d),y=Math.cos(p),m=Math.sin(p),v=o+a/2*y+u*m,E=s-a/2*m+u*y;n.layers["radial-axis-title"]=I.draw(i,A,{propContainer:l,propName:n.id+".radialaxis.title",placeholder:R(i,"Click to enter radial axis title"),attributes:{x:v,y:E,"text-anchor":"middle"},transform:{rotate:-d}})}},P.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,c=r.innerRadius,u=r.cx,f=r.cy,h=r.getAngular(t),d=r.angularAxis,p=r.isSmith;p||(r.fillViewInitialKey("angularaxis.rotation",h.rotation),d.setGeometry(),d.setScale());var y=p?function(e){var t=M(r,k([0,e.x]));return Math.atan2(t[0]-u,t[1]-f)-Math.PI/2}:function(e){return d.t2g(e.x)};"linear"===d.type&&"radians"===d.thetaunit&&(d.tick0=F(d.tick0),d.dtick=F(d.dtick));var m=function(e){return l(u+a*Math.cos(e),f-a*Math.sin(e))},I=p?function(e){var t=M(r,k([0,e.x]));return l(t[0],t[1])}:function(e){return m(y(e))},v=p?function(e){var t=M(r,k([0,e.x])),n=Math.atan2(t[0]-u,t[1]-f)-Math.PI/2;return l(t[0],t[1])+s(-F(n))}:function(e){var t=y(e);return m(t)+s(-F(t))},E=p?function(e){return D(r,e.x,0,1/0)}:function(e){var t=y(e),r=Math.cos(t),n=Math.sin(t);return"M"+[u+c*r,f-c*n]+"L"+[u+a*r,f-a*n]},C=g.makeLabelFns(d,0).labelStandoff,B={xFn:function(e){var t=y(e);return Math.cos(t)*C},yFn:function(e){var t=y(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(C+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*Q)},anchorFn:function(e){var t=y(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(e,t,r){var n=y(e);return-.5*(1+Math.sin(n))*r}},b=G(h);r.angularTickLayout!==b&&(i["angular-axis"].selectAll("."+d._id+"tick").remove(),r.angularTickLayout=b);var x,w=p?[1/0].concat(d.tickvals||[]).map((function(e){return g.tickText(d,e,!0,!1)})):g.calcTicks(d);if(p&&(w[0].text="\u221e",w[0].fontSize*=1.75),"linear"===t.gridshape?(x=w.map(y),o.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,"category"===d.type&&(w=w.filter((function(e){return o.isAngleInsideSector(y(e),r.sectorInRad)}))),d.visible){var _="inside"===d.ticks?-1:1,S=(d.linewidth||1)/2;g.drawTicks(n,d,{vals:w,layer:i["angular-axis"],path:"M"+_*S+",0h"+_*d.ticklen,transFn:v,crisp:!1}),g.drawGrid(n,d,{vals:w,layer:i["angular-grid"],path:E,transFn:o.noop,crisp:!1}),g.drawLabels(n,d,{vals:w,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:I,labelFns:B})}z(i["angular-line"].select("path"),h.showline,{d:r.pathSubplot(),transform:l(u,f)}).attr("stroke-width",h.linewidth).call(A.stroke,h.linecolor)},P.updateFx=function(e,t){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},P.updateHoverAndMainDrag=function(e){var t,r,s=this,A=s.isSmith,c=s.gd,u=s.layers,g=e._zoomlayer,f=w.MINZOOM,h=w.OFFEDGE,d=s.radius,I=s.innerRadius,B=s.cx,b=s.cy,x=s.cxx,Q=s.cyy,S=s.sectorInRad,k=s.vangles,D=s.radialAxis,T=_.clampTiny,M=_.findXYatLength,R=_.findEnclosingVertexAngles,L=w.cornerHalfWidth,N=w.cornerLen/2,F=p.makeDragger(u,"path","maindrag",!1===e.dragmode?"none":"crosshair");n.select(F).attr("d",s.pathSubplot()).attr("transform",l(B,b)),F.onmousemove=function(e){m.hover(c,e,s.id),c._fullLayout._lasthover=F,c._fullLayout._hoversubplot=s.id},F.onmouseout=function(e){c._dragging||y.unhover(c,e)};var O,P,G,U,z,q,H,Y,J,K={element:F,gd:c,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function j(e,t){return Math.sqrt(e*e+t*t)}function V(e,t){return j(e-x,t-Q)}function W(e,t){return Math.atan2(Q-t,e-x)}function Z(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function X(e,t){if(0===e)return s.pathSector(2*L);var r=N/e,n=t-r,i=t+r,a=Math.max(0,Math.min(e,d)),o=a-L,l=a+L;return"M"+Z(o,n)+"A"+[o,o]+" 0,0,0 "+Z(o,i)+"L"+Z(l,i)+"A"+[l,l]+" 0,0,1 "+Z(l,n)+"Z"}function $(e,t,r){if(0===e)return s.pathSector(2*L);var n,i,a=Z(e,t),o=Z(e,r),l=T((a[0]+o[0])/2),A=T((a[1]+o[1])/2);if(l&&A){var c=A/l,u=-1/c,g=M(L,c,l,A);n=M(N,u,g[0][0],g[0][1]),i=M(N,u,g[1][0],g[1][1])}else{var f,h;A?(f=N,h=L):(f=L,h=N),n=[[l-f,A-h],[l+f,A-h]],i=[[l-f,A+h],[l+f,A+h]]}return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function ee(e,t){return t=Math.max(Math.min(t,d),I),ef?(e-1&&1===e&&E(t,c,[s.xaxis],[s.yaxis],s.id,K),r.indexOf("event")>-1&&m.click(c,t,s.id)}K.prepFn=function(e,n,a){var l=c._fullLayout.dragmode,u=F.getBoundingClientRect();c._fullLayout._calcInverseTransform(c);var f=c._fullLayout._invTransform;t=c._fullLayout._invScaleX,r=c._fullLayout._invScaleY;var h=o.apply3DTransform(f)(n-u.left,a-u.top);if(O=h[0],P=h[1],k){var y=_.findPolygonOffset(d,S[0],S[1],k);O+=x+y[0],P+=Q+y[1]}switch(l){case"zoom":K.clickFn=se,A||(K.moveFn=k?ie:re,K.doneFn=ae,function(){G=null,U=null,z=s.pathSubplot(),q=!1;var e=c._fullLayout[s.id];H=i(e.bgcolor).getLuminance(),(Y=p.makeZoombox(g,H,B,b,z)).attr("fill-rule","evenodd"),J=p.makeCorners(g,B,b),C(c)}());break;case"select":case"lasso":v(e,n,a,K,l)}},y.init(K)},P.updateRadialDrag=function(e,t,r){var i=this,A=i.gd,c=i.layers,u=i.radius,g=i.innerRadius,f=i.cx,h=i.cy,d=i.radialAxis,m=w.radialDragBoxSize,I=m/2;if(d.visible){var v,E,B,Q=N(i.radialAxisAngle),_=d._rl,S=_[0],k=_[1],D=_[r],T=.75*(_[1]-_[0])/(1-i.getHole(t))/u;r?(v=f+(u+I)*Math.cos(Q),E=h-(u+I)*Math.sin(Q),B="radialdrag"):(v=f+(g-I)*Math.cos(Q),E=h-(g-I)*Math.sin(Q),B="radialdrag-inner");var M,R,L,O=p.makeRectDragger(c,B,"crosshair",-I,-I,m,m),P={element:O,gd:A};!1===e.dragmode&&(P.dragmode=!1),z(n.select(O),d.visible&&g0===(r?L>S:Ln?function(e){return e<=0}:function(e){return e>=0};e.c2g=function(r){var n=e.c2l(r)-t;return(s(n)?n:0)+o},e.g2c=function(r){return e.l2c(r+t-o)},e.g2p=function(e){return e*a},e.c2p=function(t){return e.g2p(e.c2g(t))}}}(e,t);break;case"angularaxis":!function(e,t){var r=e.type;if("linear"===r){var i=e.d2c,s=e.c2d;e.d2c=function(e,t){return function(e,t){return"degrees"===t?a(e):e}(i(e),t)},e.c2d=function(e,t){return s(function(e,t){return"degrees"===t?o(e):e}(e,t))}}e.makeCalcdata=function(t,r){var n,i,a=t[r],o=t._length,s=function(r){return e.d2c(r,t.thetaunit)};if(a)for(n=new Array(o),i=0;i0?1:0}function r(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function n(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function i(e,t){return t*e.radius}e.exports={smith:r,reactanceArc:function(e,t,a,o){var s=n(e,r([a,t])),l=s[0],A=s[1],c=n(e,r([o,t])),u=c[0],g=c[1];if(0===t)return["M"+l+","+A,"L"+u+","+g].join(" ");var f=i(e,1/Math.abs(t));return["M"+l+","+A,"A"+f+","+f+" 0 0,"+(t<0?1:0)+" "+u+","+g].join(" ")},resistanceArc:function(e,a,o,s){var l=i(e,1/(a+1)),A=n(e,r([a,o])),c=A[0],u=A[1],g=n(e,r([a,s])),f=g[0],h=g[1];if(t(o)!==t(s)){var d=n(e,r([a,0]));return["M"+c+","+u,"A"+l+","+l+" 0 0,"+(00){for(var n=[],i=0;i=c&&(g.min=0,h.min=0,p.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function d(e,t,r,n){var i=g[t._name];function o(r,n){return a.coerce(e,t,i,r,n)}o("uirevision",n.uirevision),t.type="linear";var f=o("color"),h=f!==i.color.dflt?f:r.font.color,d=t._name.charAt(0).toUpperCase(),p="Component "+d,y=o("title.text",p);t._hovertitle=y===p?y:d,a.coerceFont(o,"title.font",{weight:r.font.weight,style:r.font.style,variant:r.font.variant,family:r.font.family,size:a.bigFont(r.font.size),color:h}),o("min"),c(e,t,o,"linear"),l(e,t,o,"linear"),s(e,t,o,"linear",{noAutotickangles:!0}),A(e,t,o,{outerTicks:!0}),o("showticklabels")&&(a.coerceFont(o,"tickfont",{weight:r.font.weight,style:r.font.style,variant:r.font.variant,family:r.font.family,size:r.font.size,color:h}),o("tickangle"),o("tickformat")),u(e,t,o,{dfltColor:f,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o("hoverformat"),o("layer")}e.exports=function(e,t,r){o(e,t,r,{type:"ternary",attributes:g,handleDefaults:h,font:t.font,paper_bgcolor:t.paper_bgcolor})}},24696:function(e,t,r){"use strict";var n=r(33428),i=r(49760),a=r(24040),o=r(3400),s=o.strTranslate,l=o._,A=r(76308),c=r(43616),u=r(78344),g=r(92880).extendFlat,f=r(7316),h=r(54460),d=r(86476),p=r(93024),y=r(72760),m=y.freeMode,I=y.rectMode,v=r(81668),E=r(22676).prepSelect,C=r(22676).selectOnClick,B=r(22676).clearOutline,b=r(22676).clearSelectionsCache,x=r(33816);function Q(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=Q;var w=Q.prototype;w.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},w.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;a_*v?i=(a=v)*_:a=(i=I)/_,o=y*i/I,l=m*a/v,r=t.l+t.w*d-i/2,n=t.t+t.h*(1-p)-a/2,f.x0=r,f.y0=n,f.w=i,f.h=a,f.sum=E,f.xaxis={type:"linear",range:[C+2*b-E,E-C-2*B],domain:[d-o/2,d+o/2],_id:"x"},u(f.xaxis,f.graphDiv._fullLayout),f.xaxis.setScale(),f.xaxis.isPtWithinRange=function(e){return e.a>=f.aaxis.range[0]&&e.a<=f.aaxis.range[1]&&e.b>=f.baxis.range[1]&&e.b<=f.baxis.range[0]&&e.c>=f.caxis.range[1]&&e.c<=f.caxis.range[0]},f.yaxis={type:"linear",range:[C,E-B-b],domain:[p-l/2,p+l/2],_id:"y"},u(f.yaxis,f.graphDiv._fullLayout),f.yaxis.setScale(),f.yaxis.isPtWithinRange=function(){return!0};var x=f.yaxis.domain[0],Q=f.aaxis=g({},e.aaxis,{range:[C,E-B-b],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[x,x+l*_],anchor:"free",position:0,_id:"y",_length:i});u(Q,f.graphDiv._fullLayout),Q.setScale();var w=f.baxis=g({},e.baxis,{range:[E-C-b,B],side:"bottom",domain:f.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});u(w,f.graphDiv._fullLayout),w.setScale();var S=f.caxis=g({},e.caxis,{range:[E-C-B,b],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[x,x+l*_],anchor:"free",position:0,_id:"y",_length:i});u(S,f.graphDiv._fullLayout),S.setScale();var k="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";f.clipDef.select("path").attr("d",k),f.layers.plotbg.select("path").attr("d",k);var D="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";f.clipDefRelative.select("path").attr("d",D);var T=s(r,n);f.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",T),f.clipDefRelative.select("path").attr("transform",null);var M=s(r-w._offset,n+a);f.layers.baxis.attr("transform",M),f.layers.bgrid.attr("transform",M);var R=s(r+i/2,n)+"rotate(30)"+s(0,-Q._offset);f.layers.aaxis.attr("transform",R),f.layers.agrid.attr("transform",R);var L=s(r+i/2,n)+"rotate(-30)"+s(0,-S._offset);f.layers.caxis.attr("transform",L),f.layers.cgrid.attr("transform",L),f.drawAxes(!0),f.layers.aline.select("path").attr("d",Q.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(A.stroke,Q.linecolor||"#000").style("stroke-width",(Q.linewidth||0)+"px"),f.layers.bline.select("path").attr("d",w.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(A.stroke,w.linecolor||"#000").style("stroke-width",(w.linewidth||0)+"px"),f.layers.cline.select("path").attr("d",S.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(A.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),f.graphDiv._context.staticPlot||f.initInteractions(),c.setClipUrl(f.layers.frontplot,f._hasClipOnAxisFalse?null:f.clipId,f.graphDiv)},w.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.substr(7)+"title",i=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var A=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),c=(o.showticklabels?o.tickfont.size:0)+("outside"===o.ticks?o.ticklen:0)+3;i["a-title"]=v.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title",placeholder:l(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-A,"text-anchor":"middle"}}),i["b-title"]=v.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title",placeholder:l(r,"Click to enter Component B title"),attributes:{x:t.x0-c,y:t.y0+t.h+.83*o.title.font.size+c,"text-anchor":"middle"}}),i["c-title"]=v.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title",placeholder:l(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+c,y:t.y0+t.h+.83*s.title.font.size+c,"text-anchor":"middle"}})}},w.drawAx=function(e){var t,r=this,n=r.graphDiv,i=e._name,a=i.charAt(0),s=e._id,l=r.layers[i],A=a+"tickLayout",c=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);r[A]!==c&&(l.selectAll("."+s+"tick").remove(),r[A]=c),e.setScale();var u=h.calcTicks(e),g=h.clipEnds(e,u),f=h.makeTransTickFn(e),d=h.getTickSigns(e)[2],p=o.deg2rad(30),y=d*(e.linewidth||1)/2,m=d*e.ticklen,I=r.w,v=r.h,E="b"===a?"M0,"+y+"l"+Math.sin(p)*m+","+Math.cos(p)*m:"M"+y+",0l"+Math.cos(p)*m+","+-Math.sin(p)*m,C={a:"M0,0l"+v+",-"+I/2,b:"M0,0l-"+I/2+",-"+v,c:"M0,0l-"+v+","+I/2}[a];h.drawTicks(n,e,{vals:"inside"===e.ticks?g:u,layer:l,path:E,transFn:f,crisp:!1}),h.drawGrid(n,e,{vals:g,layer:r.layers[a+"grid"],path:C,transFn:f,crisp:!1}),h.drawLabels(n,e,{vals:u,layer:l,transFn:f,labelFns:h.makeLabelFns(e,0,30)})};var S=x.MINZOOM/2+.87,k="m-0.87,.5h"+S+"v3h-"+(S+5.2)+"l"+(S/2+2.6)+",-"+(.87*S+4.5)+"l2.6,1.5l-"+S/2+","+.87*S+"Z",D="m0.87,.5h-"+S+"v3h"+(S+5.2)+"l-"+(S/2+2.6)+",-"+(.87*S+4.5)+"l-2.6,1.5l"+S/2+","+.87*S+"Z",T="m0,1l"+S/2+","+.87*S+"l2.6,-1.5l-"+(S/2+2.6)+",-"+(.87*S+4.5)+"l-"+(S/2+2.6)+","+(.87*S+4.5)+"l2.6,1.5l"+S/2+",-"+.87*S+"Z",M=!0;function R(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}w.clearOutline=function(){b(this.dragOptions),B(this.dragOptions.gd)},w.initInteractions=function(){var e,t,r,n,u,g,f,h,y,v,B,b,Q=this,w=Q.layers.plotbg.select("path").node(),S=Q.graphDiv,L=S._fullLayout._zoomlayer;function N(e){var t={};return t[Q.id+".aaxis.min"]=e.a,t[Q.id+".baxis.min"]=e.b,t[Q.id+".caxis.min"]=e.c,t}function F(e,t){var r=S._fullLayout.clickmode;R(S),2===e&&(S.emit("plotly_doubleclick",null),a.call("_guiRelayout",S,N({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&C(t,S,[Q.xaxis],[Q.yaxis],Q.id,Q.dragOptions),r.indexOf("event")>-1&&p.click(S,t,Q.id)}function O(e,t){return 1-t/Q.h}function P(e,t){return 1-(e+(Q.h-t)/Math.sqrt(3))/Q.w}function G(e,t){return(e-(Q.h-t)/Math.sqrt(3))/Q.w}function U(i,a){var o=r+i*e,s=n+a*t,l=Math.max(0,Math.min(1,O(0,n),O(0,s))),A=Math.max(0,Math.min(1,P(r,n),P(o,s))),c=Math.max(0,Math.min(1,G(r,n),G(o,s))),d=(l/2+c)*Q.w,p=(1-l/2-A)*Q.w,m=(d+p)/2,I=p-d,E=(1-l)*Q.h,C=E-I/_;I.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),b.transition().style("opacity",1).duration(200),v=!0),S.emit("plotly_relayouting",N(f))}function z(){R(S),f!==u&&(a.call("_guiRelayout",S,N(f)),M&&S.data&&S._context.showTips&&(o.notifier(l(S,"Double-click to zoom back out"),"long"),M=!1))}function q(e,t){var r=e/Q.xaxis._m,n=t/Q.yaxis._m,i=[(f={a:u.a-n,b:u.b+(r+n)/2,c:u.c-(r-n)/2}).a,f.b,f.c].sort(o.sorterAsc),a=i.indexOf(f.a),l=i.indexOf(f.b),A=i.indexOf(f.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),f={a:i[a],b:i[l],c:i[A]},t=(u.a-f.a)*Q.yaxis._m,e=(u.c-f.c-u.b+f.b)*Q.xaxis._m);var g=s(Q.x0+e,Q.y0+t);Q.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",g);var h=s(-e,-t);Q.clipDefRelative.select("path").attr("transform",h),Q.aaxis.range=[f.a,Q.sum-f.b-f.c],Q.baxis.range=[Q.sum-f.a-f.c,f.b],Q.caxis.range=[Q.sum-f.a-f.b,f.c],Q.drawAxes(!1),Q._hasClipOnAxisFalse&&Q.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,Q),S.emit("plotly_relayouting",N(f))}function H(){a.call("_guiRelayout",S,N(f))}this.dragOptions={element:w,gd:S,plotinfo:{id:Q.id,domain:S._fullLayout[Q.id].domain,xaxis:Q.xaxis,yaxis:Q.yaxis},subplot:Q.id,prepFn:function(a,l,c){Q.dragOptions.xaxes=[Q.xaxis],Q.dragOptions.yaxes=[Q.yaxis],e=S._fullLayout._invScaleX,t=S._fullLayout._invScaleY;var d=Q.dragOptions.dragmode=S._fullLayout.dragmode;m(d)?Q.dragOptions.minDrag=1:Q.dragOptions.minDrag=void 0,"zoom"===d?(Q.dragOptions.moveFn=U,Q.dragOptions.clickFn=F,Q.dragOptions.doneFn=z,function(e,t,a){var l=w.getBoundingClientRect();r=t-l.left,n=a-l.top,S._fullLayout._calcInverseTransform(S);var c=S._fullLayout._invTransform,d=o.apply3DTransform(c)(r,n);r=d[0],n=d[1],u={a:Q.aaxis.range[0],b:Q.baxis.range[1],c:Q.caxis.range[1]},f=u,g=Q.aaxis.range[1]-u.a,h=i(Q.graphDiv._fullLayout[Q.id].bgcolor).getLuminance(),y="M0,"+Q.h+"L"+Q.w/2+", 0L"+Q.w+","+Q.h+"Z",v=!1,B=L.append("path").attr("class","zoombox").attr("transform",s(Q.x0,Q.y0)).style({fill:h>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",y),b=L.append("path").attr("class","zoombox-corners").attr("transform",s(Q.x0,Q.y0)).style({fill:A.background,stroke:A.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),Q.clearOutline(S)}(0,l,c)):"pan"===d?(Q.dragOptions.moveFn=q,Q.dragOptions.clickFn=F,Q.dragOptions.doneFn=H,u={a:Q.aaxis.range[0],b:Q.baxis.range[1],c:Q.caxis.range[1]},f=u,Q.clearOutline(S)):(I(d)||m(d))&&E(a,l,c,Q.dragOptions,d)}},w.onmousemove=function(e){p.hover(S,e,Q.id),S._fullLayout._lasthover=w,S._fullLayout._hoversubplot=Q.id},w.onmouseout=function(e){S._dragging||d.unhover(S,e)},d.init(this.dragOptions)}},24040:function(e,t,r){"use strict";var n=r(24248),i=r(16628),a=r(52416),o=r(63620),s=r(52200).addStyleRule,l=r(92880),A=r(45464),c=r(64859),u=l.extendFlat,g=l.extendDeepAll;function f(e){var r=e.name,i=e.categories,a=e.meta;if(t.modules[r])n.log("Type "+r+" already registered");else{t.subplotsRegistry[e.basePlotModule.name]||function(e){var r=e.name;if(t.subplotsRegistry[r])n.log("Plot type "+r+" already registered.");else for(var i in y(e),t.subplotsRegistry[r]=e,t.componentsRegistry)v(i,e.name)}(e.basePlotModule);for(var o={},l=0;l-1&&(u[f[r]].title={text:""});for(r=0;r")?"":t.html(e).text()}));return t.remove(),r}(C)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),i.isIE()&&(C=(C=(C=C.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),C}},84664:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){for(var r=0;ru+A||!n(c))}for(var f=0;f=0)return e}else if("string"===typeof e&&"%"===(e=e.trim()).slice(-1)&&n(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function h(e,t,r,n,a,o){var s=!(!1===(o=o||{}).moduleHasSelected),l=!(!1===o.moduleHasUnselected),A=!(!1===o.moduleHasConstrain),c=!(!1===o.moduleHasCliponaxis),u=!(!1===o.moduleHasTextangle),f=!(!1===o.moduleHasInsideanchor),h=!!o.hasPathbar,d=Array.isArray(a)||"auto"===a,p=d||"inside"===a,y=d||"outside"===a;if(p||y){var m=g(n,"textfont",r.font),I=i.extendFlat({},m),v=!(e.textfont&&e.textfont.color);if(v&&delete I.color,g(n,"insidetextfont",I),h){var E=i.extendFlat({},m);v&&delete E.color,g(n,"pathbar.textfont",E)}y&&g(n,"outsidetextfont",m),s&&n("selected.textfont.color"),l&&n("unselected.textfont.color"),A&&n("constraintext"),c&&n("cliponaxis"),u&&n("textangle"),n("texttemplate")}p&&f&&n("insidetextanchor")}e.exports={supplyDefaults:function(e,t,r,n){function c(r,n){return i.coerce(e,t,u,r,n)}if(s(e,t,n,c)){l(e,t,n,c),c("xhoverformat"),c("yhoverformat"),c("zorder"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate");var g=c("textposition");h(e,0,n,c,g,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),A(e,t,c,r,n);var f=(t.marker.line||{}).color,d=o.getComponentMethod("errorbars","supplyDefaults");d(e,t,f||a.defaultLine,{axis:"y"}),d(e,t,f||a.defaultLine,{axis:"x",inherit:"y"}),i.coerceSelectionMarkerOpacity(t,c)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,n;function a(e,t){return i.coerce(n._input,n,u,e,t)}for(var o=0;oa))return t}return void 0!==r?r:e.dflt},t.coerceColor=function(e,t,r){return i(t).isValid()?t:void 0!==r?r:e.dflt},t.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},t.getValue=function(e,t){var r;return a(e)?t0?t+=r:c<0&&(t-=r)}return t}function R(e){var t=c,r=e.b,i=M(e);return n.inbox(r-t,i-t,E+(i-t)/(i-r)-1)}var L=e[u+"a"],N=e[g+"a"];d=Math.abs(L.r2c(L.range[1])-L.r2c(L.range[0]));var F=n.getDistanceFunction(i,f,h,(function(e){return(f(e)+h(e))/2}));if(n.getClosest(p,F,e),!1!==e.index&&p[e.index].p!==A){b||(S=function(e){return Math.min(x(e),e.p-m.bargroupwidth/2)},k=function(e){return Math.max(Q(e),e.p+m.bargroupwidth/2)});var O=p[e.index],P=y.base?O.b+O.s:O.s;e[g+"0"]=e[g+"1"]=N.c2p(O[g],!0),e[g+"LabelVal"]=P;var G=m.extents[m.extents.round(O.p)];e[u+"0"]=L.c2p(I?S(O):G[0],!0),e[u+"1"]=L.c2p(I?k(O):G[1],!0);var U=void 0!==O.orig_p;return e[u+"LabelVal"]=U?O.orig_p:O.p,e.labelLabel=l(L,e[u+"LabelVal"],y[u+"hoverformat"]),e.valueLabel=l(N,e[g+"LabelVal"],y[g+"hoverformat"]),e.baseLabel=l(N,O.b,y[g+"hoverformat"]),e.spikeDistance=(function(e){var t=c,r=e.b,i=M(e);return n.inbox(r-t,i-t,C+(i-t)/(i-r)-1)}(O)+function(e){return D(x(e),Q(e),C)}(O))/2,e[u+"Spike"]=L.c2p(O.p,!0),o(O,y,e),e.hovertemplate=y.hovertemplate,e}}function u(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=s(e,t);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(e,t,r,n,a){var o=c(e,t,r,n,a);if(o){var s=o.cd,l=s[0].trace,A=s[o.index];return o.color=u(l,A),i.getComponentMethod("errorbars","hoverInfo")(A,l,o),[o]}},hoverOnBars:c,getTraceColor:u}},51132:function(e,t,r){"use strict";e.exports={attributes:r(20832),layoutAttributes:r(39324),supplyDefaults:r(31508).supplyDefaults,crossTraceDefaults:r(31508).crossTraceDefaults,supplyLayoutDefaults:r(37156),calc:r(71820),crossTraceCalc:r(96376).crossTraceCalc,colorbar:r(5528),arraysToCalcdata:r(84664),plot:r(98184).plot,style:r(60100).style,styleOnSelect:r(60100).styleOnSelect,hoverPoints:r(63400).hoverPoints,eventData:r(52160),selectPoints:r(45784),moduleType:"trace",name:"bar",basePlotModule:r(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(e){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(e,t,r){"use strict";var n=r(24040),i=r(54460),a=r(3400),o=r(39324),s=r(31508).validateCornerradius;e.exports=function(e,t,r){function l(r,n){return a.coerce(e,t,o,r,n)}for(var A=!1,c=!1,u=!1,g={},f=l("barmode"),h=0;h0)-(e<0)}function x(e,t){return e0}function _(e,t,r,n,i){return!(e<0||t<0)&&(r<=e&&n<=t||r<=t&&n<=e||(i?e>=r*(t/n):t>=n*(e/r)))}function S(e){return"auto"===e?0:e}function k(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function D(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,A=a.anchor,c="end"===A,u="start"===A,g=((a.leftToRight||0)+1)/2,f=1-g,h=a.hasB,d=a.r,p=a.overhead,y=i.width,m=i.height,I=Math.abs(t-e),v=Math.abs(n-r),C=I>2*E&&v>2*E?E:0;I-=2*C,v-=2*C;var B=S(l);"auto"!==l||y<=I&&m<=v||!(y>I||m>v)||(y>v||m>I)&&yE){var _=function(e,t,r,n,i,a,o,s,l){var A,c,u,g,f,h=Math.max(0,Math.abs(t-e)-2*E),d=Math.max(0,Math.abs(n-r)-2*E),p=a-E,y=o?p-Math.sqrt(p*p-(p-o)*(p-o)):p,m=l?2*p:s?p-o:2*y,I=l?2*p:s?2*y:p-o;return i.y/i.x>=d/(h-m)?g=d/i.y:i.y/i.x<=(d-I)/h?g=h/i.x:!l&&s?(A=i.x*i.x+i.y*i.y/4,u=(h-p)*(h-p)+(d/2-p)*(d/2-p)-p*p,g=(-(c=-2*i.x*(h-p)-i.y*(d/2-p))+Math.sqrt(c*c-4*A*u))/(2*A)):l?(A=(i.x*i.x+i.y*i.y)/4,u=(h/2-p)*(h/2-p)+(d/2-p)*(d/2-p)-p*p,g=(-(c=-i.x*(h/2-p)-i.y*(d/2-p))+Math.sqrt(c*c-4*A*u))/(2*A)):(A=i.x*i.x/4+i.y*i.y,u=(h/2-p)*(h/2-p)+(d-p)*(d-p)-p*p,g=(-(c=-i.x*(h/2-p)-2*i.y*(d-p))+Math.sqrt(c*c-4*A*u))/(2*A)),g=Math.min(1,g),f=s?Math.max(0,p-Math.sqrt(Math.max(0,p*p-(p-(d-i.y*g)/2)*(p-(d-i.y*g)/2)))-o):Math.max(0,p-Math.sqrt(Math.max(0,p*p-(p-(h-i.x*g)/2)*(p-(h-i.x*g)/2)))-o),{scale:g,pad:f}}(e,t,r,n,w,d,p,o,h);b=_.scale,Q=_.pad}else b=1,s&&(b=Math.min(1,I/w.x,v/w.y)),Q=0;var D=i.left*f+i.right*g,T=(i.top+i.bottom)/2,M=(e+E)*f+(t-E)*g,R=(r+n)/2,L=0,N=0;if(u||c){var F=(o?w.x:w.y)/2;d&&(c||h)&&(C+=Q);var O=o?x(e,t):x(r,n);o?u?(M=e+O*C,L=-O*F):(M=t-O*C,L=O*F):u?(R=r+O*C,N=-O*F):(R=n-O*C,N=O*F)}return{textX:D,textY:T,targetX:M,targetY:R,anchorX:L,anchorY:N,scale:b,rotate:B}}e.exports={plot:function(e,t,r,u,p,y){var C=t.xaxis,T=t.yaxis,M=e._fullLayout,R=e._context.staticPlot;p||(p={mode:M.barmode,norm:M.barmode,gap:M.bargap,groupgap:M.bargroupgap},f("bar",M));var L=a.makeTraceGroups(u,r,"trace bars").each((function(r){var A=n.select(this),u=r[0].trace,f=r[0].t,L="waterfall"===u.type,N="funnel"===u.type,F="histogram"===u.type,O="bar"===u.type,P=O||N,G=0;L&&u.connector.visible&&"between"===u.connector.mode&&(G=u.connector.line.width/2);var U="h"===u.orientation,z=w(p),q=a.ensureSingle(A,"g","points"),H=B(u),Y=q.selectAll("g.point").data(a.identity,H);Y.enter().append("g").classed("point",!0),Y.exit().remove(),Y.each((function(A,B){var w,L,N=n.select(this),q=function(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n?[i,a]:[a,i]}(A,C,T,U),H=q[0][0],Y=q[0][1],J=q[1][0],K=q[1][1],j=0===(U?Y-H:K-J);if(j&&P&&d.getLineWidth(u,A)&&(j=!1),j||(j=!i(H)||!i(Y)||!i(J)||!i(K)),A.isBlank=j,j&&(U?Y=H:K=J),G&&!j&&(U?(H-=x(H,Y)*G,Y+=x(H,Y)*G):(J-=x(J,K)*G,K+=x(J,K)*G)),"waterfall"===u.type){if(!j){var V=u[A.dir].marker;w=V.line.width,L=V.color}}else w=d.getLineWidth(u,A),L=A.mc||u.marker.color;function W(e){var t=n.round(w/2%1,2);return 0===p.gap&&0===p.groupgap?n.round(Math.round(e)-t,2):e}var Z=s.opacity(L)<1||w>.01?W:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?W(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(H=Z(H,Y,U),Y=Z(Y,H,U),J=Z(J,K,!U),K=Z(K,J,!U));var X,$=U?C.c2p:T.c2p;X=A.s0>0?A._sMax:A.s0<0?A._sMin:A.s1>0?A._sMax:A._sMin;var ee,te,re=O||F?function(e,t){if(!e)return 0;var r,n=U?Math.abs(K-J):Math.abs(Y-H),i=U?Math.abs(Y-H):Math.abs(K-J),a=Z(Math.abs($(X,!0)-$(0,!0))),o=A.hasB?Math.min(n/2,i/2):Math.min(n/2,a);return r="%"===t?n*(Math.min(50,e)/100):e,Z(Math.max(Math.min(r,o),0))}(f.cornerradiusvalue,f.cornerradiusform):0,ne="M"+H+","+J+"V"+K+"H"+Y+"V"+J+"Z",ie=0;if(re&&A.s){var ae=0===b(A.s0)||b(A.s)===b(A.s0)?A.s1:A.s0;if((ie=Z(A.hasB?0:Math.abs($(X,!0)-$(ae,!0))))0?Math.sqrt(ie*(2*re-ie)):0,ue=oe>0?Math.max:Math.min;ee="M"+H+","+J+"V"+(K-Ae*se)+"H"+ue(Y-(re-ie)*oe,H)+"A "+re+","+re+" 0 0 "+le+" "+Y+","+(K-re*se-ce)+"V"+(J+re*se+ce)+"A "+re+","+re+" 0 0 "+le+" "+ue(Y-(re-ie)*oe,H)+","+(J+Ae*se)+"Z"}else if(A.hasB)ee="M"+(H+re*oe)+","+J+"A "+re+","+re+" 0 0 "+le+" "+H+","+(J+re*se)+"V"+(K-re*se)+"A "+re+","+re+" 0 0 "+le+" "+(H+re*oe)+","+K+"H"+(Y-re*oe)+"A "+re+","+re+" 0 0 "+le+" "+Y+","+(K-re*se)+"V"+(J+re*se)+"A "+re+","+re+" 0 0 "+le+" "+(Y-re*oe)+","+J+"Z";else{var ge=(te=Math.abs(K-J)+ie)0?Math.sqrt(ie*(2*re-ie)):0,he=se>0?Math.max:Math.min;ee="M"+(H+ge*oe)+","+J+"V"+he(K-(re-ie)*se,J)+"A "+re+","+re+" 0 0 "+le+" "+(H+re*oe-fe)+","+K+"H"+(Y-re*oe+fe)+"A "+re+","+re+" 0 0 "+le+" "+(Y-ge*oe)+","+he(K-(re-ie)*se,J)+"V"+J+"Z"}}else ee=ne}else ee=ne;var de=Q(a.ensureSingle(N,"path"),M,p,y);if(de.style("vector-effect",R?"none":"non-scaling-stroke").attr("d",isNaN((Y-H)*(K-J))||j&&e._context.staticPlot?"M0,0Z":ee).call(l.setClipUrl,t.layerClipId,e),!M.uniformtext.mode&&z){var pe=l.makePointStyleFns(u);l.singlePointStyle(A,de,u,pe,e)}!function(e,t,r,n,i,s,A,u,f,p,y,C,B){var b,w=t.xaxis,T=t.yaxis,M=e._fullLayout;function R(t,r,n){return a.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+b,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,e)}var L=n[0].trace,N="h"===L.orientation,F=function(e,t,r,n,i){var o,s=t[0].trace,l=s.texttemplate;return o=l?function(e,t,r,n,i){var o=t[0].trace,s=a.castOption(o,r,"texttemplate");if(!s)return"";var l,A,u,g,f="histogram"===o.type,h="waterfall"===o.type,d="funnel"===o.type,p="h"===o.orientation;function y(e){return c(A,A.c2l(e),!0).text}function m(e){return c(g,g.c2l(e),!0).text}p?(l="y",A=i,u="x",g=n):(l="x",A=n,u="y",g=i);var I=t[r],E={};E.label=I.p,E.labelLabel=E[l+"Label"]=y(I.p);var C=a.castOption(o,I.i,"text");(0===C||C)&&(E.text=C),E.value=I.s,E.valueLabel=E[u+"Label"]=m(I.s);var B={};v(B,o,I.i),(f||void 0===B.x)&&(B.x=p?E.value:E.label),(f||void 0===B.y)&&(B.y=p?E.label:E.value),(f||void 0===B.xLabel)&&(B.xLabel=p?E.valueLabel:E.labelLabel),(f||void 0===B.yLabel)&&(B.yLabel=p?E.labelLabel:E.valueLabel),h&&(E.delta=+I.rawS||I.s,E.deltaLabel=m(E.delta),E.final=I.v,E.finalLabel=m(E.final),E.initial=E.final-E.delta,E.initialLabel=m(E.initial)),d&&(E.value=I.s,E.valueLabel=m(E.value),E.percentInitial=I.begR,E.percentInitialLabel=a.formatPercent(I.begR),E.percentPrevious=I.difR,E.percentPreviousLabel=a.formatPercent(I.difR),E.percentTotal=I.sumR,E.percenTotalLabel=a.formatPercent(I.sumR));var b=a.castOption(o,I.i,"customdata");return b&&(E.customdata=b),a.texttemplateString(s,E,e._d3locale,B,E,o._meta||{})}(e,t,r,n,i):s.textinfo?function(e,t,r,n){var i=e[0].trace,o="h"===i.orientation,s="waterfall"===i.type,l="funnel"===i.type;function A(e){return c(o?n:r,e,!0).text}function u(e){return c(o?r:n,+e,!0).text}var g,f=i.textinfo,h=e[t],d=f.split("+"),p=[],y=function(e){return-1!==d.indexOf(e)};if(y("label")&&p.push(A(e[t].p)),y("text")&&(0===(g=a.castOption(i,h.i,"text"))||g)&&p.push(g),s){var m=+h.rawS||h.s,I=h.v,v=I-m;y("initial")&&p.push(u(v)),y("delta")&&p.push(u(m)),y("final")&&p.push(u(I))}if(l){y("value")&&p.push(u(h.s));var E=0;y("percent initial")&&E++,y("percent previous")&&E++,y("percent total")&&E++;var C=E>1;y("percent initial")&&(g=a.formatPercent(h.begR),C&&(g+=" of initial"),p.push(g)),y("percent previous")&&(g=a.formatPercent(h.difR),C&&(g+=" of previous"),p.push(g)),y("percent total")&&(g=a.formatPercent(h.sumR),C&&(g+=" of total"),p.push(g))}return p.join("
")}(t,r,n,i):d.getValue(s.text,r),d.coerceString(m,o)}(M,n,i,w,T);b=function(e,t){var r=d.getValue(e.textposition,t);return d.coerceEnumerated(I,r)}(L,i);var O="stack"===C.mode||"relative"===C.mode,P=n[i],G=!O||P._outmost,U=P.hasB,z=p&&p-y>E;if(F&&"none"!==b&&(!P.isBlank&&s!==A&&u!==f||"auto"!==b&&"inside"!==b)){var q=M.font,H=h.getBarColor(n[i],L),Y=h.getInsideTextFont(L,i,q,H),J=h.getOutsideTextFont(L,i,q),K=L.insidetextanchor||"end",j=r.datum();N?"log"===w.type&&j.s0<=0&&(s=w.range[0]0&&X>0;ie=z?U?_(re-2*p,ne,Z,X,N)||_(re,ne-2*p,Z,X,N):N?_(re-(p-y),ne,Z,X,N)||_(re,ne-2*(p-y),Z,X,N):_(re,ne-(p-y),Z,X,N)||_(re-2*(p-y),ne,Z,X,N):_(re,ne,Z,X,N),ae&&ie?b="inside":(b="outside",V.remove(),V=null)}else b="inside";if(!V){var oe=(V=R(r,F,$=a.ensureUniformFontSize(e,"outside"===b?J:Y))).attr("transform");if(V.attr("transform",""),Z=(W=l.bBox(V.node())).width,X=W.height,V.attr("transform",oe),Z<=0||X<=0)return void V.remove()}var se,le=L.textangle;se="outside"===b?function(e,t,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,A=a.angle||0,c=i.width,u=i.height,g=Math.abs(t-e),f=Math.abs(n-r);o=s?f>2*E?E:0:g>2*E?E:0;var h=1;l&&(h=s?Math.min(1,f/u):Math.min(1,g/c));var d=S(A),p=k(i,d),y=(s?p.x:p.y)/2,m=(i.left+i.right)/2,I=(i.top+i.bottom)/2,v=(e+t)/2,C=(r+n)/2,B=0,b=0,Q=s?x(t,e):x(r,n);return s?(v=t-Q*o,B=Q*y):(C=n+Q*o,b=-Q*y),{textX:m,textY:I,targetX:v,targetY:C,anchorX:B,anchorY:b,scale:h,rotate:d}}(s,A,u,f,W,{isHorizontal:N,constrained:"both"===L.constraintext||"outside"===L.constraintext,angle:le}):D(s,A,u,f,W,{isHorizontal:N,constrained:"both"===L.constraintext||"inside"===L.constraintext,angle:le,anchor:K,hasB:U,r:p,overhead:y}),se.fontSize=$.size,g("histogram"===L.type?"bar":L.type,se,M),P.transform=se;var Ae=Q(V,M,C,B);a.setTransormAndDisplay(Ae,se)}else r.select("text").remove()}(e,t,N,r,B,H,Y,J,K,re,ie,p,y),t.layerClipId&&l.hideOutsideRangePoint(A,N.select("text"),C,T,u.xcalendar,u.ycalendar)}));var J=!1===u.cliponaxis;l.setClipUrl(A,J?null:t.layerClipId,e)}));A.getComponentMethod("errorbars","plot")(e,L,t,p)},toMoveInsideBar:D}},45784:function(e){"use strict";function t(e,t,r,n,i){var a=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(e,r){var n,i=e.cd,a=e.xaxis,o=e.yaxis,s=i[0].trace,l="funnel"===s.type,A="h"===s.orientation,c=[];if(!1===r)for(n=0;n1||0===i.bargap&&0===i.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){h(n.select(this),t[0].trace,e)})),s.getComponentMethod("errorbars","style")(t)},styleTextPoints:d,styleOnSelect:function(e,t,r){var i=t[0].trace;i.selectedpoints?function(e,t,r){a.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var i,s=n.select(this);if(e.selected){i=o.ensureUniformFontSize(r,p(s,e,t,r));var l=t.selected.textfont&&t.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,t)}))}(e.selectAll("text"),t,r)}(r,i,e):(h(r,i,e),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:m,getOutsideTextFont:I,getBarColor:E,resizeText:l}},55592:function(e,t,r){"use strict";var n=r(76308),i=r(94288).hasColorscale,a=r(27260),o=r(3400).coercePattern;e.exports=function(e,t,r,s,l){var A=r("marker.color",s),c=i(e,"marker");c&&a(e,t,l,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(e,"marker.line")&&a(e,t,l,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",A,c),r("selected.marker.color"),r("unselected.marker.color")}},82744:function(e,t,r){"use strict";var n=r(33428),i=r(3400);function a(e){return"_"+e+"Text_minsize"}e.exports={recordMinTextSize:function(e,t,r){if(r.uniformtext.mode){var n=a(e),i=r.uniformtext.minsize,o=t.scale*t.fontSize;t.hide=o g.point"}t.selectAll(s).each((function(e){var t=e.transform;if(t){t.scale=l&&t.hide?0:o/t.fontSize;var r=n.select(this).select("text");i.setTransormAndDisplay(r,t)}}))}}}},78100:function(e,t,r){"use strict";var n=r(21776).Ks,i=r(92880).extendFlat,a=r(8319),o=r(20832);e.exports={r:a.r,theta:a.theta,r0:a.r0,dr:a.dr,theta0:a.theta0,dtheta:a.dtheta,thetaunit:a.thetaunit,base:i({},o.base,{}),offset:i({},o.offset,{}),width:i({},o.width,{}),text:i({},o.text,{}),hovertext:i({},o.hovertext,{}),marker:function(){var e=i({},o.marker);return delete e.cornerradius,e}(),hoverinfo:a.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},47056:function(e,t,r){"use strict";var n=r(94288).hasColorscale,i=r(47128),a=r(3400).isArrayOrTypedArray,o=r(84664),s=r(96376).setGroupPositions,l=r(4500),A=r(24040).traceIs,c=r(3400).extendFlat;e.exports={calc:function(e,t){for(var r=e._fullLayout,s=t.subplot,A=r[s].radialaxis,c=r[s].angularaxis,u=A.makeCalcdata(t,"r"),g=c.makeCalcdata(t,"theta"),f=t._length,h=new Array(f),d=u,p=g,y=0;yg.range[1]&&(I+=Math.PI),n.getClosest(A,(function(e){return d(m,I,[e.rp0,e.rp1],[e.thetag0,e.thetag1],h)?p+Math.min(1,Math.abs(e.thetag1-e.thetag0)/y)-1+(e.rp1-m)/(e.rp1-e.rp0)-1:1/0}),e),!1!==e.index){var v=A[e.index];e.x0=e.x1=v.ct[0],e.y0=e.y1=v.ct[1];var E=i.extendFlat({},v,{r:v.s,theta:v.p});return o(v,c,e),s(E,c,u,e),e.hovertemplate=c.hovertemplate,e.color=a(c,v),e.xLabelVal=e.yLabelVal=void 0,v.s<0&&(e.idealAlign="left"),[e]}}},94456:function(e,t,r){"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:r(40872),categories:["polar","bar","showLegend"],attributes:r(78100),layoutAttributes:r(9320),supplyDefaults:r(70384),supplyLayoutDefaults:r(89580),calc:r(47056).calc,crossTraceCalc:r(47056).crossTraceCalc,plot:r(42040),colorbar:r(5528),formatLabels:r(22852),style:r(60100).style,styleOnSelect:r(60100).styleOnSelect,hoverPoints:r(68896),selectPoints:r(45784),meta:{}}},9320:function(e){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(e,t,r){"use strict";var n=r(3400),i=r(9320);e.exports=function(e,t,r){var a,o={};function s(r,o){return n.coerce(e[a]||{},t[a],i,r,o)}for(var l=0;l0?(A=o,c=l):(A=l,c=o);var u=[s.findEnclosingVertexAngles(A,e.vangles)[0],(A+c)/2,s.findEnclosingVertexAngles(c,e.vangles)[1]];return s.pathPolygonAnnulus(n,i,A,c,u,t,r)}:function(e,n,i,o){return a.pathAnnulus(e,n,i,o,t,r)}}(t),h=t.layers.frontplot.select("g.barlayer");a.makeTraceGroups(h,r,"trace bars").each((function(){var r=n.select(this),s=a.ensureSingle(r,"g","points").selectAll("g.point").data(a.identity);s.enter().append("g").style("vector-effect",l?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(e){var t,r=n.select(this),o=e.rp0=u.c2p(e.s0),s=e.rp1=u.c2p(e.s1),l=e.thetag0=g.c2g(e.p0),h=e.thetag1=g.c2g(e.p1);if(i(o)&&i(s)&&i(l)&&i(h)&&o!==s&&l!==h){var d=u.c2g(e.s1),p=(l+h)/2;e.ct=[A.c2p(d*Math.cos(p)),c.c2p(d*Math.sin(p))],t=f(o,s,l,h)}else t="M0,0Z";a.ensureSingle(r,"path").attr("d",t)})),o.setClipUrl(r,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)}))}},63188:function(e,t,r){"use strict";var n=r(98304),i=r(52904),a=r(20832),o=r(22548),s=r(29736).axisHoverFormat,l=r(21776).Ks,A=r(92880).extendFlat,c=i.marker,u=c.line;e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:i.xperiod,yperiod:i.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:i.xperiodalignment,yperiodalignment:i.yperiodalignment,xhoverformat:s("x"),yhoverformat:s("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:A({},c.symbol,{arrayOk:!1,editType:"plot"}),opacity:A({},c.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:A({},c.angle,{arrayOk:!1,editType:"calc"}),size:A({},c.size,{arrayOk:!1,editType:"calc"}),color:A({},c.color,{arrayOk:!1,editType:"style"}),line:{color:A({},u.color,{arrayOk:!1,dflt:o.defaultLine,editType:"style"}),width:A({},u.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:n(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:i.selected.marker,editType:"style"},unselected:{marker:i.unselected.marker,editType:"style"},text:A({},i.text,{}),hovertext:A({},i.hovertext,{}),hovertemplate:l({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:i.zorder}},62555:function(e,t,r){"use strict";var n=r(38248),i=r(54460),a=r(1220),o=r(3400),s=r(39032).BADNUM,l=o._;e.exports=function(e,t){var r,A,m,I,v,E,C,B=e._fullLayout,b=i.getFromId(e,t.xaxis||"x"),x=i.getFromId(e,t.yaxis||"y"),Q=[],w="violin"===t.type?"_numViolins":"_numBoxes";"h"===t.orientation?(m=b,I="x",v=x,E="y",C=!!t.yperiodalignment):(m=x,I="y",v=b,E="x",C=!!t.xperiodalignment);var _,S,k,D,T,M,R=function(e,t,r,i){var s,l=t in e,A=t+"0"in e,c="d"+t in e;if(l||A&&c){var u=r.makeCalcdata(e,t);return[a(e,r,t,u).vals,u]}s=A?e[t+"0"]:"name"in e&&("category"===r.type||n(e.name)&&-1!==["linear","log"].indexOf(r.type)||o.isDateTime(e.name)&&"date"===r.type)?e.name:i;for(var g="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,e[t+"calendar"]),f=e._length,h=new Array(f),d=0;d_.uf};if(t._hasPreCompStats){var U=t[I],z=function(e){return m.d2c((t[e]||[])[r])},q=1/0,H=-1/0;for(r=0;r=_.q1&&_.q3>=_.med){var J=z("lowerfence");_.lf=J!==s&&J<=_.q1?J:f(_,k,D);var K=z("upperfence");_.uf=K!==s&&K>=_.q3?K:h(_,k,D);var j=z("mean");_.mean=j!==s?j:D?o.mean(k,D):(_.q1+_.q3)/2;var V=z("sd");_.sd=j!==s&&V>=0?V:D?o.stdev(k,D,_.mean):_.q3-_.q1,_.lo=d(_),_.uo=p(_);var W=z("notchspan");W=W!==s&&W>0?W:y(_,D),_.ln=_.med-W,_.un=_.med+W;var Z=_.lf,X=_.uf;t.boxpoints&&k.length&&(Z=Math.min(Z,k[0]),X=Math.max(X,k[D-1])),t.notched&&(Z=Math.min(Z,_.ln),X=Math.max(X,_.un)),_.min=Z,_.max=X}else{var $;o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+_.q1,"median = "+_.med,"q3 = "+_.q3].join("\n")),$=_.med!==s?_.med:_.q1!==s?_.q3!==s?(_.q1+_.q3)/2:_.q1:_.q3!==s?_.q3:0,_.med=$,_.q1=_.q3=$,_.lf=_.uf=$,_.mean=_.sd=$,_.ln=_.un=$,_.min=_.max=$}q=Math.min(q,_.min),H=Math.max(H,_.max),_.pts2=S.filter(G),Q.push(_)}}t._extremes[m._id]=i.findExtremes(m,[q,H],{padded:!0})}else{var ee=m.makeCalcdata(t,I),te=function(e,t){for(var r=e.length,n=new Array(r+1),i=0;i=0&&ie0){var ce,ue;(_={}).pos=_[E]=O[r],S=_.pts=ne[r].sort(u),D=(k=_[I]=S.map(g)).length,_.min=k[0],_.max=k[D-1],_.mean=o.mean(k,D),_.sd=o.stdev(k,D,_.mean)*t.sdmultiple,_.med=o.interp(k,.5),D%2&&(le||Ae)?(le?(ce=k.slice(0,D/2),ue=k.slice(D/2+1)):Ae&&(ce=k.slice(0,D/2+1),ue=k.slice(D/2)),_.q1=o.interp(ce,.5),_.q3=o.interp(ue,.5)):(_.q1=o.interp(k,.25),_.q3=o.interp(k,.75)),_.lf=f(_,k,D),_.uf=h(_,k,D),_.lo=d(_),_.uo=p(_);var ge=y(_,D);_.ln=_.med-ge,_.un=_.med+ge,ae=Math.min(ae,_.ln),oe=Math.max(oe,_.un),_.pts2=S.filter(G),Q.push(_)}t.notched&&o.isTypedArray(ee)&&(ee=Array.from(ee)),t._extremes[m._id]=i.findExtremes(m,t.notched?ee.concat([ae,oe]):ee,{padded:!0})}return function(e,t){if(o.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r0?(Q[0].t={num:B[w],dPos:P,posLetter:E,valLetter:I,labels:{med:l(e,"median:"),min:l(e,"min:"),q1:l(e,"q1:"),q3:l(e,"q3:"),max:l(e,"max:"),mean:"sd"===t.boxmean||"sd"===t.sizemode?l(e,"mean \xb1 \u03c3:").replace("\u03c3",1===t.sdmultiple?"\u03c3":t.sdmultiple+"\u03c3"):l(e,"mean:"),lf:l(e,"lower fence:"),uf:l(e,"upper fence:")}},B[w]++,Q):[{t:{empty:!0}}]};var A={text:"tx",hovertext:"htx"};function c(e,t,r){for(var n in A)o.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(t[n][r[0]])&&(e[A[n]]=t[n][r[0]][r[1]]):e[A[n]]=t[n][r])}function u(e,t){return e.v-t.v}function g(e){return e.v}function f(e,t,r){return 0===r?e.q1:Math.min(e.q1,t[Math.min(o.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function h(e,t,r){return 0===r?e.q3:Math.max(e.q3,t[Math.max(o.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function d(e){return 4*e.q1-3*e.q3}function p(e){return 4*e.q3-3*e.q1}function y(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}},96404:function(e,t,r){"use strict";var n=r(54460),i=r(3400),a=r(71888).getAxisGroup,o=["v","h"];function s(e,t,r,o){var s,l,A,c=t.calcdata,u=t._fullLayout,g=o._id,f=g.charAt(0),h=[],d=0;for(s=0;s1,v=1-u[e+"gap"],E=1-u[e+"groupgap"];for(s=0;s0){var H=_.pointpos,Y=_.jitter,J=_.marker.size/2,K=0;H+Y>=0&&((K=z*(H+Y))>Q?(q=!0,G=J,O=K):K>N&&(G=J,O=Q)),K<=Q&&(O=Q);var j=0;H-Y<=0&&((j=-z*(H-Y))>w?(q=!0,U=J,P=j):j>F&&(U=J,P=w)),j<=w&&(P=w)}else O=Q,P=w;var V=new Array(A.length);for(l=0;l0?(p="v",y=I>0?Math.min(E,v):Math.min(v)):I>0?(p="h",y=Math.min(E)):y=0;if(y){t._length=y;var w=r("orientation",p);t._hasPreCompStats?"v"===w&&0===I?(r("x0",0),r("dx",1)):"h"===w&&0===m&&(r("y0",0),r("dy",1)):"v"===w&&0===I?r("x0"):"h"===w&&0===m&&r("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],a)}else t.visible=!1}function u(e,t,r,i){var a=i.prefix,o=n.coerce2(e,t,A,"marker.outliercolor"),s=r("marker.line.outliercolor"),l="outliers";t._hasPreCompStats?l="all":(o||s)&&(l="suspectedoutliers");var c=r(a+"points",l);c?(r("jitter","all"===c?.3:0),r("pointpos","all"===c?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===c&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");"all"!==u&&-1===u.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(t,r)}e.exports={supplyDefaults:function(e,t,r,i){function s(r,i){return n.coerce(e,t,A,r,i)}if(c(e,t,s,i),!1!==t.visible){o(e,t,i,s),s("xhoverformat"),s("yhoverformat");var l=t._hasPreCompStats;l&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||r),s("line.width"),s("fillcolor",a.addOpacity(t.line.color,.5));var g=!1;if(l){var f=s("mean"),h=s("sd");f&&f.length&&(g=!0,h&&h.length&&(g="sd"))}s("whiskerwidth");var d,p=s("sizemode");"quartiles"===p&&(d=s("boxmean",g)),s("showwhiskers","quartiles"===p),"sd"!==p&&"sd"!==d||s("sdmultiple"),s("width"),s("quartilemethod");var y=!1;if(l){var m=s("notchspan");m&&m.length&&(y=!0)}else n.validate(e.notchwidth,A.notchwidth)&&(y=!0);s("notched",y)&&s("notchwidth"),u(e,t,s,{prefix:"box"}),s("zorder")}},crossTraceDefaults:function(e,t){var r,i;function a(e){return n.coerce(i._input,i,A,e)}for(var o=0;oe.lo&&(E.so=!0)}return a}));h.enter().append("path").classed("point",!0),h.exit().remove(),h.call(a.translatePoints,l,A)}function c(e,t,r,a){var o,s,l=t.val,A=t.pos,c=!!A.rangebreaks,u=a.bPos,g=a.bPosPxOffset||0,f=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var h=e.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each((function(e){var t=A.c2l(e.pos+u,!0),i=A.l2p(t-o)+g,a=A.l2p(t+s)+g,h=c?(i+a)/2:A.l2p(t)+g,d=l.c2p(e.mean,!0),p=l.c2p(e.mean-e.sd,!0),y=l.c2p(e.mean+e.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+d+","+i+"V"+a+("sd"===f?"m0,0L"+p+","+h+"L"+d+","+i+"L"+y+","+h+"Z":"")):n.select(this).attr("d","M"+i+","+d+"H"+a+("sd"===f?"m0,0L"+h+","+p+"L"+i+","+d+"L"+h+","+y+"Z":""))}))}e.exports={plot:function(e,t,r,a){var o=e._context.staticPlot,s=t.xaxis,u=t.yaxis;i.makeTraceGroups(a,r,"trace boxes").each((function(e){var t,r,i=n.select(this),a=e[0],g=a.t,f=a.trace;g.wdPos=g.bdPos*f.whiskerwidth,!0!==f.visible||g.empty?i.remove():("h"===f.orientation?(t=u,r=s):(t=s,r=u),l(i,{pos:t,val:r},f,g,o),A(i,{x:s,y:u},f,g),c(i,{pos:t,val:r},f,g))}))},plotBoxAndWhiskers:l,plotPoints:A,plotBoxMean:c}},8264:function(e){"use strict";e.exports=function(e,t){var r,n,i=e.cd,a=e.xaxis,o=e.yaxis,s=[];if(!1===t)for(r=0;r=10)return null;for(var r=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,T=S>0?Math.ceil:Math.floor,M=S>0?Math.min:Math.max,R=S>0?Math.max:Math.min,L=D(w+k),N=T(_-k),F=[[u=Q(w)]];for(a=L;a*S=0;i--)a[c-i]=e[u][i],o[c-i]=t[u][i];for(s.push({x:a,y:o,bicubic:l}),i=u,a=[],o=[];i>=0;i--)a[u-i]=e[i][0],o[u-i]=t[i][0];return s.push({x:a,y:o,bicubic:A}),s}},19216:function(e,t,r){"use strict";var n=r(54460),i=r(92880).extendFlat;e.exports=function(e,t,r){var a,o,s,l,A,c,u,g,f,h,d,p,y,m,I=e["_"+t],v=e[t+"axis"],E=v._gridlines=[],C=v._minorgridlines=[],B=v._boundarylines=[],b=e["_"+r],x=e[r+"axis"];"array"===v.tickmode&&(v.tickvals=I.slice());var Q=e._xctrl,w=e._yctrl,_=Q[0].length,S=Q.length,k=e._a.length,D=e._b.length;n.prepTicks(v),"array"===v.tickmode&&delete v.tickvals;var T=v.smoothing?3:1;function M(n){var i,a,o,s,l,A,c,u,f,h,d,p,y=[],m=[],I={};if("b"===t)for(a=e.b2j(n),o=Math.floor(Math.max(0,Math.min(D-2,a))),s=a-o,I.length=D,I.crossLength=k,I.xy=function(t){return e.evalxy([],t,a)},I.dxy=function(t,r){return e.dxydi([],t,o,r,s)},i=0;i0&&(f=e.dxydi([],i-1,o,0,s),y.push(l[0]+f[0]/3),m.push(l[1]+f[1]/3),h=e.dxydi([],i-1,o,1,s),y.push(u[0]-h[0]/3),m.push(u[1]-h[1]/3)),y.push(u[0]),m.push(u[1]),l=u;else for(i=e.a2i(n),A=Math.floor(Math.max(0,Math.min(k-2,i))),c=i-A,I.length=k,I.crossLength=D,I.xy=function(t){return e.evalxy([],i,t)},I.dxy=function(t,r){return e.dxydj([],A,t,c,r)},a=0;a0&&(d=e.dxydj([],A,a-1,c,0),y.push(l[0]+d[0]/3),m.push(l[1]+d[1]/3),p=e.dxydj([],A,a-1,c,1),y.push(u[0]-p[0]/3),m.push(u[1]-p[1]/3)),y.push(u[0]),m.push(u[1]),l=u;return I.axisLetter=t,I.axis=v,I.crossAxis=x,I.value=n,I.constvar=r,I.index=g,I.x=y,I.y=m,I.smoothing=x.smoothing,I}function R(n){var i,a,o,s,l,A=[],c=[],u={};if(u.length=I.length,u.crossLength=b.length,"b"===t)for(o=Math.max(0,Math.min(D-2,n)),l=Math.min(1,Math.max(0,n-o)),u.xy=function(t){return e.evalxy([],t,n)},u.dxy=function(t,r){return e.dxydi([],t,o,r,l)},i=0;i<_;i++)A[i]=Q[n*T][i],c[i]=w[n*T][i];else for(a=Math.max(0,Math.min(k-2,n)),s=Math.min(1,Math.max(0,n-a)),u.xy=function(t){return e.evalxy([],n,t)},u.dxy=function(t,r){return e.dxydj([],a,t,s,r)},i=0;iI.length-1||E.push(i(R(o),{color:v.gridcolor,width:v.gridwidth,dash:v.griddash}));for(g=c;gI.length-1)&&!(d<0||d>I.length-1))for(p=I[s],y=I[d],a=0;aI[I.length-1]||C.push(i(M(h),{color:v.minorgridcolor,width:v.minorgridwidth,dash:v.minorgriddash}));v.startline&&B.push(i(R(0),{color:v.startlinecolor,width:v.startlinewidth})),v.endline&&B.push(i(R(I.length-1),{color:v.endlinecolor,width:v.endlinewidth}))}else{for(l=5e-15,c=(A=[Math.floor((I[I.length-1]-v.tick0)/v.dtick*(1+l)),Math.ceil((I[0]-v.tick0)/v.dtick/(1+l))].sort((function(e,t){return e-t})))[0],u=A[1],g=c;g<=u;g++)f=v.tick0+v.dtick*g,E.push(i(M(f),{color:v.gridcolor,width:v.gridwidth,dash:v.griddash}));for(g=c-1;gI[I.length-1]||C.push(i(M(h),{color:v.minorgridcolor,width:v.minorgridwidth,dash:v.minorgriddash}));v.startline&&B.push(i(M(I[0]),{color:v.startlinecolor,width:v.startlinewidth})),v.endline&&B.push(i(M(I[I.length-1]),{color:v.endlinecolor,width:v.endlinewidth}))}}},14724:function(e,t,r){"use strict";var n=r(54460),i=r(92880).extendFlat;e.exports=function(e,t){var r,a,o,s=t._labels=[],l=t._gridlines;for(r=0;rt.length&&(e=e.slice(0,t.length)):e=[],i=0;i90&&(f-=180,l=-l),{angle:f,flip:l,p:e.c2p(n,t,r),offsetMultplier:A}}},164:function(e,t,r){"use strict";var n=r(33428),i=r(43616),a=r(87072),o=r(53416),s=r(15584),l=r(72736),A=r(3400),c=A.strRotate,u=A.strTranslate,g=r(84284);function f(e,t,r,s,l,A,c){var u="const-"+l+"-lines",g=r.selectAll("."+u).data(A);g.enter().append("path").classed(u,!0).style("vector-effect",c?"none":"non-scaling-stroke"),g.each((function(r){var s=r,l=s.x,A=s.y,c=a([],l,e.c2p),u=a([],A,t.c2p),g="M"+o(c,u,s.smoothing);n.select(this).attr("d",g).style("stroke-width",s.width).style("stroke",s.color).style("stroke-dasharray",i.dashStyle(s.dash,s.width)).style("fill","none")})),g.exit().remove()}function h(e,t,r,a,o,A,g,f){var h=A.selectAll("text."+f).data(g);h.enter().append("text").classed(f,!0);var d=0,p={};return h.each((function(o,A){var g;if("auto"===o.axis.tickangle)g=s(a,t,r,o.xy,o.dxy);else{var f=(o.axis.tickangle+180)*Math.PI/180;g=s(a,t,r,o.xy,[Math.cos(f),Math.sin(f)])}A||(p={angle:g.angle,flip:g.flip});var h=(o.endAnchor?-1:1)*g.flip,y=n.select(this).attr({"text-anchor":h>0?"start":"end","data-notex":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,e),m=i.bBox(this);y.attr("transform",u(g.p[0],g.p[1])+c(g.angle)+u(o.axis.labelpadding*h,.3*m.height)),d=Math.max(d,m.width+o.axis.labelpadding)})),h.exit().remove(),p.maxExtent=d,p}e.exports=function(e,t,r,i){var l=e._context.staticPlot,c=t.xaxis,u=t.yaxis,g=e._fullLayout._clips;A.makeTraceGroups(i,r,"trace").each((function(t){var r=n.select(this),i=t[0],d=i.trace,p=d.aaxis,m=d.baxis,I=A.ensureSingle(r,"g","minorlayer"),v=A.ensureSingle(r,"g","majorlayer"),E=A.ensureSingle(r,"g","boundarylayer"),C=A.ensureSingle(r,"g","labellayer");r.style("opacity",d.opacity),f(c,u,v,0,"a",p._gridlines,!0),f(c,u,v,0,"b",m._gridlines,!0),f(c,u,I,0,"a",p._minorgridlines,!0),f(c,u,I,0,"b",m._minorgridlines,!0),f(c,u,E,0,"a-boundary",p._boundarylines,l),f(c,u,E,0,"b-boundary",m._boundarylines,l);var B=h(e,c,u,d,0,C,p._labels,"a-label"),b=h(e,c,u,d,0,C,m._labels,"b-label");!function(e,t,r,n,i,a,o,l){var c,u,g,f,h=A.aggNums(Math.min,null,r.a),d=A.aggNums(Math.max,null,r.a),p=A.aggNums(Math.min,null,r.b),m=A.aggNums(Math.max,null,r.b);c=.5*(h+d),u=p,g=r.ab2xy(c,u,!0),f=r.dxyda_rough(c,u),void 0===o.angle&&A.extendFlat(o,s(r,i,a,g,r.dxydb_rough(c,u))),y(e,t,r,0,g,f,r.aaxis,i,a,o,"a-title"),c=h,u=.5*(p+m),g=r.ab2xy(c,u,!0),f=r.dxydb_rough(c,u),void 0===l.angle&&A.extendFlat(l,s(r,i,a,g,r.dxyda_rough(c,u))),y(e,t,r,0,g,f,r.baxis,i,a,l,"b-title")}(e,C,d,0,c,u,B,b),function(e,t,r,n,i){var s,l,c,u,g=r.select("#"+e._clipPathId);g.size()||(g=r.append("clipPath").classed("carpetclip",!0));var f=A.ensureSingle(g,"path","carpetboundary"),h=t.clipsegments,d=[];for(u=0;u90&&m<270,v=n.select(this);v.text(g.title.text).call(l.convertToTspans,e),I&&(E=(-l.lineCount(v)+p)*d*a-E),v.attr("transform",u(t.p[0],t.p[1])+c(t.angle)+u(0,E)).attr("text-anchor","middle").call(i.font,g.title.font)})),v.exit().remove()}},81e3:function(e,t,r){"use strict";var n=r(24588),i=r(14952).findBin,a=r(30180),o=r(29056),s=r(26435),l=r(24464);e.exports=function(e){var t=e._a,r=e._b,A=t.length,c=r.length,u=e.aaxis,g=e.baxis,f=t[0],h=t[A-1],d=r[0],p=r[c-1],y=t[t.length-1]-t[0],m=r[r.length-1]-r[0],I=y*n.RELATIVE_CULL_TOLERANCE,v=m*n.RELATIVE_CULL_TOLERANCE;f-=I,h+=I,d-=v,p+=v,e.isVisible=function(e,t){return e>f&&ed&&th||tp},e.setScale=function(){var t=e._x,r=e._y,n=a(e._xctrl,e._yctrl,t,r,u.smoothing,g.smoothing);e._xctrl=n[0],e._yctrl=n[1],e.evalxy=o([e._xctrl,e._yctrl],A,c,u.smoothing,g.smoothing),e.dxydi=s([e._xctrl,e._yctrl],u.smoothing,g.smoothing),e.dxydj=l([e._xctrl,e._yctrl],u.smoothing,g.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),A-2),n=e[0]-r;return(1-n)*t[r]+n*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),A-2),n=e[1]-t;return(1-n)*r[t]+n*r[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(i(e,t),A-2)),n=t[r],a=t[r+1];return Math.max(0,Math.min(A-1,r+(e-n)/(a-n)))},e.b2j=function(e){var t=Math.max(0,Math.min(i(e,r),c-2)),n=r[t],a=r[t+1];return Math.max(0,Math.min(c-1,t+(e-n)/(a-n)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(n,i,a){if(!a&&(n