/** * plotly.js (scatter - minified) v2.8.3 * Copyright 2012-2022, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Plotly=e()}}((function(){return function e(t,r,n){function a(o,l){if(!r[o]){if(!t[o]){var s="function"==typeof require&&require;if(!l&&s)return s(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};t[o][0].call(u.exports,(function(e){return a(t[o][1][e]||e)}),u,u.exports,e,t,r,n)}return r[o].exports}for(var i="function"==typeof require&&require,o=0;o:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:#fff;","X .select-outline-2":"stroke:#000;stroke-dasharray:2px 2px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in a){var o=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,a[i])}},{"../src/lib":224}],2:[function(e,t,r){"use strict";t.exports=e("../src/components/calendars")},{"../src/components/calendars":93}],3:[function(e,t,r){"use strict";t.exports=e("../src/core")},{"../src/core":206}],4:[function(e,t,r){"use strict";var n=e("./core");n.register([e("./calendars")]),t.exports=n},{"./calendars":2,"./core":3}],5:[function(e,t,r){(function(){var e={version:"3.8.0"},r=[].slice,n=function(e){return r.call(e)},a=self.document;function i(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(a)try{n(a.documentElement.childNodes)[0].nodeType}catch(e){n=function(e){for(var t=e.length,r=new Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var l=this.Element.prototype,s=l.setAttribute,c=l.setAttributeNS,u=this.CSSStyleDeclaration.prototype,d=u.setProperty;l.setAttribute=function(e,t){s.call(this,e,t+"")},l.setAttributeNS=function(e,t,r){c.call(this,e,t,r+"")},u.setProperty=function(e,t,r){d.call(this,e,t+"",r)}}function f(e,t){return et?1:e>=t?0:NaN}function h(e){return null===e?NaN:+e}function p(e){return!isNaN(e)}function g(e){return{left:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n>>1;e(t[i],r)<0?n=i+1:a=i}return n},right:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n>>1;e(t[i],r)>0?a=i:n=i+1}return n}}}e.ascending=f,e.descending=function(e,t){return te?1:t>=e?0:NaN},e.min=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++an&&(r=n)}else{for(;++a=n){r=n;break}for(;++an&&(r=n)}return r},e.max=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a=n){r=n;break}for(;++ar&&(r=n)}else{for(;++a=n){r=n;break}for(;++ar&&(r=n)}return r},e.extent=function(e,t){var r,n,a,i=-1,o=e.length;if(1===arguments.length){for(;++i=n){r=a=n;break}for(;++in&&(r=n),a=n){r=a=n;break}for(;++in&&(r=n),a1)return o/(s-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t?Math.sqrt(t):t};var m=g(f);function v(e){return e.length}e.bisectLeft=m.left,e.bisect=e.bisectRight=m.right,e.bisector=function(e){return g(1===e.length?function(t,r){return f(e(t),r)}:e)},e.shuffle=function(e,t,r){(i=arguments.length)<3&&(r=e.length,i<2&&(t=0));for(var n,a,i=r-t;i;)a=Math.random()*i--|0,n=e[i+t],e[i+t]=e[a+t],e[a+t]=n;return e},e.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},e.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],a=new Array(r<0?0:r);t=0;)for(t=(n=e[a]).length;--t>=0;)r[--o]=n[t];return r};var y=Math.abs;function x(e){for(var t=1;e*t%1;)t*=10;return t}function b(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function _(){this._=Object.create(null)}e.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),(t-e)/r==1/0)throw new Error("infinite range");var n,a=[],i=x(y(r)),o=-1;if(e*=i,t*=i,(r*=i)<0)for(;(n=e+r*++o)>t;)a.push(n/i);else for(;(n=e+r*++o)=a.length)return r?r.call(n,i):t?i.sort(t):i;for(var s,c,u,d,f=-1,h=i.length,p=a[l++],g=new _;++f=a.length)return t;var n=[],o=i[r++];return t.forEach((function(t,a){n.push({key:t,values:e(a,r)})})),o?n.sort((function(e,t){return o(e.key,t.key)})):n}(o(e.map,t,0),0)},n.key=function(e){return a.push(e),n},n.sortKeys=function(e){return i[a.length-1]=e,n},n.sortValues=function(e){return t=e,n},n.rollup=function(e){return r=e,n},n},e.set=function(e){var t=new D;if(e)for(var r=0,n=e.length;r=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},e.event=null,e.requote=function(e){return e.replace(H,"\\$&")};var H=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,B={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function Y(e){return B(e,G),e}var U=function(e,t){return t.querySelector(e)},V=function(e,t){return t.querySelectorAll(e)},q=function(e,t){var r=e.matches||e[P(e,"matchesSelector")];return(q=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(U=function(e,t){return Sizzle(e,t)[0]||null},V=Sizzle,q=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var G=e.selection.prototype=[];function Z(e){return"function"==typeof e?e:function(){return U(e,this)}}function W(e){return"function"==typeof e?e:function(){return V(e,this)}}G.select=function(e){var t,r,n,a,i=[];e=Z(e);for(var o=-1,l=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),X.hasOwnProperty(r)?{space:X[r],local:e}:e}},G.attr=function(t,r){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=e.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(r in t)this.each(Q(r,t[r]));return this}return this.each(Q(t,r))},G.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),n=(e=ee(e)).length,a=-1;if(t=r.classList){for(;++a=0;)(r=n[a])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},G.sort=function(e){e=ce.apply(this,arguments);for(var t=-1,r=this.length;++t=t&&(t=a+1);!(o=l[t])&&++t0&&(t=t.slice(0,o));var s=ge.get(t);function c(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}return s&&(t=s,l=ve),o?r?function(){var e=l(r,n(arguments));c.call(this),this.addEventListener(t,this[i]=e,e.$=a),e._=r}:c:r?R:function(){var r,n=new RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var a in this)if(r=a.match(n)){var i=this[a];this.removeEventListener(r[1],i,i.$),delete this[a]}}}e.selection.enter=de,e.selection.enter.prototype=fe,fe.append=G.append,fe.empty=G.empty,fe.node=G.node,fe.call=G.call,fe.size=G.size,fe.select=function(e){for(var t,r,n,a,i,o=[],l=-1,s=this.length;++l1?Se:e<-1?-Se:Math.asin(e)}function Pe(e){return((e=Math.exp(e))+1/e)/2}var Ie=Math.SQRT2;e.interpolateZoom=function(e,t){var r,n,a=e[0],i=e[1],o=e[2],l=t[0],s=t[1],c=t[2],u=l-a,d=s-i,f=u*u+d*d;if(f<1e-12)n=Math.log(c/o)/Ie,r=function(e){return[a+e*u,i+e*d,o*Math.exp(Ie*e*n)]};else{var h=Math.sqrt(f),p=(c*c-o*o+4*f)/(2*o*2*h),g=(c*c-o*o-4*f)/(2*c*2*h),m=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);n=(v-m)/Ie,r=function(e){var t,r=e*n,l=Pe(m),s=o/(2*h)*(l*(t=Ie*r+m,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(m));return[a+s*u,i+s*d,o*l/Pe(Ie*r+m)]}}return r.duration=1e3*n,r},e.behavior.zoom=function(){var t,r,n,i,l,s,c,u,d,f={x:0,y:0,k:1},h=[960,500],p=Ne,g=250,m=0,v="mousedown.zoom",y="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",_=j(w,"zoomstart","zoom","zoomend");function w(e){e.on(v,O).on(ze+".zoom",I).on("dblclick.zoom",R).on(b,P)}function M(e){return[(e[0]-f.x)/f.k,(e[1]-f.y)/f.k]}function T(e){f.k=Math.max(p[0],Math.min(p[1],e))}function k(e,t){t=function(e){return[e[0]*f.k+f.x,e[1]*f.k+f.y]}(t),f.x+=e[0]-t[0],f.y+=e[1]-t[1]}function A(t,n,a,i){t.__chart__={x:f.x,y:f.y,k:f.k},T(Math.pow(2,i)),k(r=n,a),t=e.select(t),g>0&&(t=t.transition().duration(g)),t.call(w.event)}function L(){c&&c.domain(s.range().map((function(e){return(e-f.x)/f.k})).map(s.invert)),d&&d.domain(u.range().map((function(e){return(e-f.y)/f.k})).map(u.invert))}function S(e){m++||e({type:"zoomstart"})}function D(e){L(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function C(e){--m||(e({type:"zoomend"}),r=null)}function O(){var t=this,r=_.of(t,arguments),n=0,a=e.select(o(t)).on(y,s).on(x,c),i=M(e.mouse(t)),l=be(t);function s(){n=1,k(e.mouse(t),i),D(r)}function c(){a.on(y,null).on(x,null),l(n),C(r)}za.call(t),S(r)}function P(){var t,r=this,n=_.of(r,arguments),a={},i=0,o=".zoom-"+e.event.changedTouches[0].identifier,s="touchmove"+o,c="touchend"+o,u=[],d=e.select(r),h=be(r);function p(){var n=e.touches(r);return t=f.k,n.forEach((function(e){e.identifier in a&&(a[e.identifier]=M(e))})),n}function g(){var t=e.event.target;e.select(t).on(s,m).on(c,y),u.push(t);for(var n=e.event.changedTouches,o=0,d=n.length;o1){v=h[0];var x=h[1],b=v[0]-x[0],_=v[1]-x[1];i=b*b+_*_}}function m(){var o,s,c,u,d=e.touches(r);za.call(r);for(var f=0,h=d.length;f360?e-=360:e<0&&(e+=360),e<60?n+(a-n)*e/60:e<180?a:e<240?n+(a-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(a=r<=.5?r*(1+t):r+t-r*t),new Ke(i(e+120),i(e),i(e-120))}function Be(t,r,n){return this instanceof Be?(this.h=+t,this.c=+r,void(this.l=+n)):arguments.length<2?t instanceof Be?new Be(t.h,t.c,t.l):We(t instanceof Ve?t.l:(t=it((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Be(t,r,n)}je.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ee(this.h,this.s,this.l/e)},je.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Ee(this.h,this.s,e*this.l)},je.rgb=function(){return He(this.h,this.s,this.l)},e.hcl=Be;var Ye=Be.prototype=new Fe;function Ue(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Ve(r,Math.cos(e*=De)*t,Math.sin(e)*t)}function Ve(e,t,r){return this instanceof Ve?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Ve?new Ve(e.l,e.a,e.b):e instanceof Be?Ue(e.h,e.c,e.l):it((e=Ke(e)).r,e.g,e.b):new Ve(e,t,r)}Ye.brighter=function(e){return new Be(this.h,this.c,Math.min(100,this.l+qe*(arguments.length?e:1)))},Ye.darker=function(e){return new Be(this.h,this.c,Math.max(0,this.l-qe*(arguments.length?e:1)))},Ye.rgb=function(){return Ue(this.h,this.c,this.l).rgb()},e.lab=Ve;var qe=18,Ge=Ve.prototype=new Fe;function Ze(e,t,r){var n=(e+16)/116,a=n+t/500,i=n-r/200;return new Ke(Qe(3.2404542*(a=.95047*Je(a))-1.5371385*(n=1*Je(n))-.4985314*(i=1.08883*Je(i))),Qe(-.969266*a+1.8760108*n+.041556*i),Qe(.0556434*a-.2040259*n+1.0572252*i))}function We(e,t,r){return e>0?new Be(Math.atan2(r,t)*Ce,Math.sqrt(t*t+r*r),e):new Be(NaN,NaN,e)}function Je(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function Xe(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function Qe(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function Ke(e,t,r){return this instanceof Ke?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof Ke?new Ke(e.r,e.g,e.b):nt(""+e,Ke,He):new Ke(e,t,r)}function $e(e){return new Ke(e>>16,e>>8&255,255&e)}function et(e){return $e(e)+""}Ge.brighter=function(e){return new Ve(Math.min(100,this.l+qe*(arguments.length?e:1)),this.a,this.b)},Ge.darker=function(e){return new Ve(Math.max(0,this.l-qe*(arguments.length?e:1)),this.a,this.b)},Ge.rgb=function(){return Ze(this.l,this.a,this.b)},e.rgb=Ke;var tt=Ke.prototype=new Fe;function rt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function nt(e,t,r){var n,a,i,o=0,l=0,s=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return t(lt(a[0]),lt(a[1]),lt(a[2]))}return(i=st.get(e))?t(i.r,i.g,i.b):(null==e||"#"!==e.charAt(0)||isNaN(i=parseInt(e.slice(1),16))||(4===e.length?(o=(3840&i)>>4,o|=o>>4,l=240&i,l|=l>>4,s=15&i,s|=s<<4):7===e.length&&(o=(16711680&i)>>16,l=(65280&i)>>8,s=255&i)),t(o,l,s))}function at(e,t,r){var n,a,i=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),l=o-i,s=(o+i)/2;return l?(a=s<.5?l/(o+i):l/(2-o-i),n=e==o?(t-r)/l+(t0&&s<1?0:n),new Ee(n,a,s)}function it(e,t,r){var n=Xe((.4124564*(e=ot(e))+.3575761*(t=ot(t))+.1804375*(r=ot(r)))/.95047),a=Xe((.2126729*e+.7151522*t+.072175*r)/1);return Ve(116*a-16,500*(n-a),200*(a-Xe((.0193339*e+.119192*t+.9503041*r)/1.08883)))}function ot(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}tt.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,a=30;return t||r||n?(t&&t=200&&t<300||304===t){try{e=a.call(o,c)}catch(e){return void l.error.call(o,e)}l.load.call(o,e)}else l.error.call(o,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=d:c.onreadystatechange=function(){c.readyState>3&&d()},c.onprogress=function(t){var r=e.event;e.event=t;try{l.progress.call(o,c)}finally{e.event=r}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(r=null==e?null:e+"",o):r},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return a=e,o},["get","post"].forEach((function(e){o[e]=function(){return o.send.apply(o,[e].concat(n(arguments)))}})),o.send=function(e,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),c.open(e,t,!0),null==r||"accept"in s||(s.accept=r+",*/*"),c.setRequestHeader)for(var i in s)c.setRequestHeader(i,s[i]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=a&&o.on("error",a).on("load",(function(e){a(null,e)})),l.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},e.rebind(o,l,"on"),null==i?o:o.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(i))}st.forEach((function(e,t){st.set(e,$e(t))})),e.functor=ct,e.xhr=ut(C),e.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function a(e,r,n){arguments.length<3&&(n=r,r=null);var a=dt(e,t,null==r?i:o(r),n);return a.row=function(e){return arguments.length?a.response(null==(r=e)?i:o(e)):r},a}function i(e){return a.parse(e.responseText)}function o(e){return function(t){return a.parse(t.responseText,e)}}function l(t){return t.map(s).join(e)}function s(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return a.parse=function(e,t){var r;return a.parseRows(e,(function(e,n){if(r)return r(e,n-1);var a=function(t){for(var r={},n=e.length,a=0;a=s)return o;if(a)return a=!1,i;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(gt),gt=setTimeout(yt,t)),pt=0):(pt=1,mt(yt))}function xt(){for(var e=Date.now(),t=ft;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function bt(){for(var e,t=ft,r=1/0;t;)t.c?(t.t1&&(t=e[i[o-2]],r=e[i[o-1]],n=e[l],(r[0]-t[0])*(n[1]-t[1])-(r[1]-t[1])*(n[0]-t[0])<=0);)--o;i[o++]=l}return i.slice(0,o)}function Tt(e,t){return e[0]-t[0]||e[1]-t[1]}e.timer=function(){vt.apply(this,arguments)},e.timer.flush=function(){xt(),bt()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},e.geom={},e.geom.hull=function(e){var t=_t,r=wt;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,a=ct(t),i=ct(r),o=e.length,l=[],s=[];for(n=0;n=0;--n)h.push(e[l[c[n]][2]]);for(n=+d;nTe)l=l.L;else{if(!((a=i-Yt(l,o))>Te)){n>-Te?(t=l.P,r=l):a>-Te?(t=l,r=l.N):t=r=l;break}if(!l.R){t=l;break}l=l.R}var s=Ft(e);if(Ot.insert(t,s),t||r){if(t===r)return Zt(t),r=Ft(t.site),Ot.insert(s,r),s.edge=r.edge=Xt(t.site,s.site),Gt(t),void Gt(r);if(r){Zt(t),Zt(r);var c=t.site,u=c.x,d=c.y,f=e.x-u,h=e.y-d,p=r.site,g=p.x-u,m=p.y-d,v=2*(f*m-h*g),y=f*f+h*h,x=g*g+m*m,b={x:(m*y-h*x)/v+u,y:(f*x-g*y)/v+d};Kt(r.edge,c,p,b),s.edge=Xt(c,e,null,b),r.edge=Xt(e,p,null,b),Gt(t),Gt(r)}else s.edge=Xt(t.site,s.site)}}function Bt(e,t){var r=e.site,n=r.x,a=r.y,i=a-t;if(!i)return n;var o=e.P;if(!o)return-1/0;var l=(r=o.site).x,s=r.y,c=s-t;if(!c)return l;var u=l-n,d=1/i-1/c,f=u/c;return d?(-f+Math.sqrt(f*f-2*d*(u*u/(-2*c)-s+c/2+a-i/2)))/d+n:(n+l)/2}function Yt(e,t){var r=e.N;if(r)return Bt(r,t);var n=e.site;return n.y===t?n.x:1/0}function Ut(e){this.site=e,this.edges=[]}function Vt(e,t){return t.angle-e.angle}function qt(){tr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Gt(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,a=e.site,i=r.site;if(n!==i){var o=a.x,l=a.y,s=n.x-o,c=n.y-l,u=i.x-o,d=2*(s*(m=i.y-l)-c*u);if(!(d>=-1e-12)){var f=s*s+c*c,h=u*u+m*m,p=(m*f-c*h)/d,g=(s*h-u*f)/d,m=g+l,v=zt.pop()||new qt;v.arc=e,v.site=a,v.x=p+o,v.y=m+Math.sqrt(p*p+g*g),v.cy=m,e.circle=v;for(var y=null,x=It._;x;)if(v.y=l)return;if(f>p){if(i){if(i.y>=c)return}else i={x:m,y:s};r={x:m,y:c}}else{if(i){if(i.y1)if(f>p){if(i){if(i.y>=c)return}else i={x:(s-a)/n,y:s};r={x:(c-a)/n,y:c}}else{if(i){if(i.y=l)return}else i={x:o,y:n*o+a};r={x:l,y:n*l+a}}else{if(i){if(i.x0)){if(t/=f,f<0){if(t0){if(t>d)return;t>u&&(u=t)}if(t=a-s,f||!(t<0)){if(t/=f,f<0){if(t>d)return;t>u&&(u=t)}else if(f>0){if(t0)){if(t/=h,h<0){if(t0){if(t>d)return;t>u&&(u=t)}if(t=i-c,h||!(t<0)){if(t/=h,h<0){if(t>d)return;t>u&&(u=t)}else if(h>0){if(t0&&(e.a={x:s+u*f,y:c+u*h}),d<1&&(e.b={x:s+d*f,y:c+d*h}),e}}}}}),s=o.length;s--;)(!Wt(t=o[s],e)||!l(t)||y(t.a.x-t.b.x)Te||y(a-r)>Te)&&(l.splice(o,0,new $t(Qt(i.site,u,y(n-d)Te?{x:d,y:y(t-d)Te?{x:y(r-p)Te?{x:f,y:y(t-f)Te?{x:y(r-h)=r&&c.x<=a&&c.y>=n&&c.y<=o?[[r,o],[a,o],[a,n],[r,n]]:[]).point=e[l]})),t}function l(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/Te)*Te,y:Math.round(a(e,t)/Te)*Te,i:t}}))}return o.links=function(e){return ir(l(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},o.triangles=function(e){var t=[];return ir(l(e)).cells.forEach((function(r,n){for(var a,i,o,l,s=r.site,c=r.edges.sort(Vt),u=-1,d=c.length,f=c[d-1].edge,h=f.l===s?f.r:f.l;++ui||d>o||f=_)<<1|t>=b,M=w+4;wi&&(a=t.slice(i,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(n=n[0])?l[o]?l[o]+=n:l[++o]=n:(l[++o]=null,s.push({i:o,x:pr(r,n)})),i=vr.lastIndex;return ig&&(g=s.x),s.y>m&&(m=s.y),c.push(s.x),u.push(s.y);else for(d=0;dg&&(g=b),_>m&&(m=_),c.push(b),u.push(_)}var w=g-h,M=m-p;function T(e,t,r,n,a,i,o,l){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var s=e.x,c=e.y;if(null!=s)if(y(s-r)+y(c-n)<.01)k(e,t,r,n,a,i,o,l);else{var u=e.point;e.x=e.y=e.point=null,k(e,u,s,c,a,i,o,l),k(e,t,r,n,a,i,o,l)}else e.x=r,e.y=n,e.point=t}else k(e,t,r,n,a,i,o,l)}function k(e,t,r,n,a,i,o,l){var s=.5*(a+o),c=.5*(i+l),u=r>=s,d=n>=c,f=d<<1|u;e.leaf=!1,u?a=s:o=s,d?i=c:l=c,T(e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,a,i,o,l)}w>M?m=p+w:g=h+M;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){T(A,e,+v(e,++d),+x(e,d),h,p,g,m)},visit:function(e){ur(e,A,h,p,g,m)},find:function(e){return dr(A,e[0],e[1],h,p,g,m)}};if(d=-1,null==t){for(;++d=0&&!(n=e.interpolators[a](t,r)););return n}function xr(e,t){var r,n=[],a=[],i=e.length,o=t.length,l=Math.min(e.length,t.length);for(r=0;r=1?1:e(t)}}function Tr(e){return function(t){return 1-e(1-t)}}function kr(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Ar(e){return e*e}function Lr(e){return e*e*e}function Sr(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function Dr(e){return 1-Math.cos(e*Se)}function Cr(e){return Math.pow(2,10*(e-1))}function Or(e){return 1-Math.sqrt(1-e*e)}function Pr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Ir(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function Rr(e){var t,r,n,a=[e.a,e.b],i=[e.c,e.d],o=Nr(a),l=zr(a,i),s=Nr(((t=i)[0]+=(n=-l)*(r=a)[0],t[1]+=n*r[1],t))||0;a[0]*i[1]=0?e.slice(0,t):e,a=t>=0?e.slice(t+1):"in";return n=_r.get(n)||br,Mr((a=wr.get(a)||C)(n.apply(null,r.call(arguments,1))))},e.interpolateHcl=function(t,r){t=e.hcl(t),r=e.hcl(r);var n=t.h,a=t.c,i=t.l,o=r.h-n,l=r.c-a,s=r.l-i;isNaN(l)&&(l=0,a=isNaN(a)?r.c:a);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(e){return Ue(n+o*e,a+l*e,i+s*e)+""}},e.interpolateHsl=function(t,r){t=e.hsl(t),r=e.hsl(r);var n=t.h,a=t.s,i=t.l,o=r.h-n,l=r.s-a,s=r.l-i;isNaN(l)&&(l=0,a=isNaN(a)?r.s:a);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(e){return He(n+o*e,a+l*e,i+s*e)+""}},e.interpolateLab=function(t,r){t=e.lab(t),r=e.lab(r);var n=t.l,a=t.a,i=t.b,o=r.l-n,l=r.a-a,s=r.b-i;return function(e){return Ze(n+o*e,a+l*e,i+s*e)+""}},e.interpolateRound=Ir,e.transform=function(t){var r=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate()}return new Rr(t?t.matrix:Fr)})(t)},Rr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Fr={a:1,b:0,c:0,d:1,e:0,f:0};function Er(e){return e.length?e.pop()+",":""}function jr(t,r){var n=[],a=[];return t=e.transform(t),r=e.transform(r),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push("translate(",null,",",null,")");n.push({i:a-4,x:pr(e[0],t[0])},{i:a-2,x:pr(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(t.translate,r.translate,n,a),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Er(r)+"rotate(",null,")")-2,x:pr(e,t)})):t&&r.push(Er(r)+"rotate("+t+")")}(t.rotate,r.rotate,n,a),function(e,t,r,n){e!==t?n.push({i:r.push(Er(r)+"skewX(",null,")")-2,x:pr(e,t)}):t&&r.push(Er(r)+"skewX("+t+")")}(t.skew,r.skew,n,a),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push(Er(r)+"scale(",null,",",null,")");n.push({i:a-4,x:pr(e[0],t[0])},{i:a-2,x:pr(e[1],t[1])})}else 1===t[0]&&1===t[1]||r.push(Er(r)+"scale("+t+")")}(t.scale,r.scale,n,a),t=r=null,function(e){for(var t,r=-1,i=a.length;++r0?n=e:(t.c=null,t.t=NaN,t=null,s.end({type:"end",alpha:n=0})):e>0&&(s.start({type:"start",alpha:n=e}),t=vt(l.tick)),l):n},l.start=function(){var e,t,r,n=v.length,s=y.length,u=c[0],p=c[1];for(e=0;e=0;)r.push(a[n])}function $r(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(i=e.children)&&(a=i.length))for(var a,i,o=-1;++o=0;)o.push(u=c[s]),u.parent=i,u.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return $r(a,(function(t){var n,a;e&&(n=t.children)&&n.sort(e),r&&(a=t.parent)&&(a.value+=t.value)})),l}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(Kr(e,(function(e){e.children&&(e.value=0)})),$r(e,(function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},n},e.layout.partition=function(){var t=e.layout.hierarchy(),r=[1,1];function n(e,n){var a=t.call(this,e,n);return function e(t,r,n,a){var i=t.children;if(t.x=r,t.y=t.depth*a,t.dx=n,t.dy=a,i&&(o=i.length)){var o,l,s,c=-1;for(n=t.value?n/t.value:0;++cl&&(l=n),o.push(n)}for(r=0;ra&&(n=r,a=t);return n}function pn(e){return e.reduce(gn,0)}function gn(e,t){return e+t[1]}function mn(e,t){return vn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function vn(e,t){for(var r=-1,n=+e[0],a=(e[1]-n)/t,i=[];++r<=t;)i[r]=a*r+n;return i}function yn(t){return[e.min(t),e.max(t)]}function xn(e,t){return e.value-t.value}function bn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function _n(e,t){e._pack_next=t,t._pack_prev=e}function wn(e,t){var r=t.x-e.x,n=t.y-e.y,a=e.r+t.r;return.999*a*a>r*r+n*n}function Mn(e){if((t=e.children)&&(s=t.length)){var t,r,n,a,i,o,l,s,c=1/0,u=-1/0,d=1/0,f=-1/0;if(t.forEach(Tn),(r=t[0]).x=-r.r,r.y=0,x(r),s>1&&((n=t[1]).x=n.r,n.y=0,x(n),s>2))for(An(r,n,a=t[2]),x(a),bn(r,a),r._pack_prev=a,bn(a,n),n=r._pack_next,i=3;i0)for(o=-1;++o=d[0]&&s<=d[1]&&((l=c[e.bisect(f,s,1,p)-1]).y+=g,l.push(i[o]));return c}return i.value=function(e){return arguments.length?(r=e,i):r},i.range=function(e){return arguments.length?(n=ct(e),i):n},i.bins=function(e){return arguments.length?(a="number"==typeof e?function(t){return vn(t,e)}:ct(e),i):a},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},e.layout.pack=function(){var t,r=e.layout.hierarchy().sort(xn),n=0,a=[1,1];function i(e,i){var o=r.call(this,e,i),l=o[0],s=a[0],c=a[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(l.x=l.y=0,$r(l,(function(e){e.r=+u(e.value)})),$r(l,Mn),n){var d=n*(t?1:Math.max(2*l.r/s,2*l.r/c))/2;$r(l,(function(e){e.r+=d})),$r(l,Mn),$r(l,(function(e){e.r-=d}))}return function e(t,r,n,a){var i=t.children;if(t.x=r+=a*t.x,t.y=n+=a*t.y,t.r*=a,i)for(var o=-1,l=i.length;++oh.x&&(h=e),e.depth>p.depth&&(p=e)}));var g=r(f,h)/2-f.x,m=n[0]/(h.x+r(h,f)/2+g),v=n[1]/(p.depth||1);Kr(u,(function(e){e.x=(e.x+g)*m,e.y=e.depth*v}))}return c}function o(e){var t=e.children,n=e.parent.children,a=e.i?n[e.i-1]:null;if(t.length){!function(e){var t,r=0,n=0,a=e.children,i=a.length;for(;--i>=0;)(t=a[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var i=(t[0].z+t[t.length-1].z)/2;a?(e.z=a.z+r(e._,a._),e.m=e.z-i):e.z=i}else a&&(e.z=a.z+r(e._,a._));e.parent.A=function(e,t,n){if(t){for(var a,i=e,o=e,l=t,s=i.parent.children[0],c=i.m,u=o.m,d=l.m,f=s.m;l=Dn(l),i=Sn(i),l&&i;)s=Sn(s),(o=Dn(o)).a=e,(a=l.z+d-i.z-c+r(l._,i._))>0&&(Cn(On(l,e,n),e,a),c+=a,u+=a),d+=l.m,c+=i.m,f+=s.m,u+=o.m;l&&!Dn(o)&&(o.t=l,o.m+=d-u),i&&!Sn(s)&&(s.t=i,s.m+=c-f,n=e)}return n}(e,a,e.parent.A||n[0])}function l(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=n[0],e.y=e.depth*n[1]}return i.separation=function(e){return arguments.length?(r=e,i):r},i.size=function(e){return arguments.length?(a=null==(n=e)?s:null,i):a?null:n},i.nodeSize=function(e){return arguments.length?(a=null==(n=e)?null:s,i):a?n:null},Qr(i,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=Ln,n=[1,1],a=!1;function i(i,o){var l,s=t.call(this,i,o),c=s[0],u=0;$r(c,(function(t){var n=t.children;n&&n.length?(t.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),t.y=function(t){return 1+e.max(t,(function(e){return e.y}))}(n)):(t.x=l?u+=r(t,l):0,t.y=0,l=t)}));var d=function e(t){var r=t.children;return r&&r.length?e(r[0]):t}(c),f=function e(t){var r,n=t.children;return n&&(r=n.length)?e(n[r-1]):t}(c),h=d.x-r(d,f)/2,p=f.x+r(f,d)/2;return $r(c,a?function(e){e.x=(e.x-c.x)*n[0],e.y=(c.y-e.y)*n[1]}:function(e){e.x=(e.x-h)/(p-h)*n[0],e.y=(1-(c.y?e.y/c.y:1))*n[1]}),s}return i.separation=function(e){return arguments.length?(r=e,i):r},i.size=function(e){return arguments.length?(a=null==(n=e),i):a?null:n},i.nodeSize=function(e){return arguments.length?(a=null!=(n=e),i):a?n:null},Qr(i,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),n=Math.round,a=[1,1],i=null,o=Pn,l=!1,s="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,n,a=-1,i=e.length;++a0;)l.push(r=c[a-1]),l.area+=r.area,"squarify"!==s||(n=h(l,g))<=f?(c.pop(),f=n):(l.area-=l.pop().area,p(l,g,i,!1),g=Math.min(i.dx,i.dy),l.length=l.area=0,f=1/0);l.length&&(p(l,g,i,!0),l.length=l.area=0),t.forEach(d)}}function f(e){var t=e.children;if(t&&t.length){var r,n=o(e),a=t.slice(),i=[];for(u(a,n.dx*n.dy/e.value),i.area=0;r=a.pop();)i.push(r),i.area+=r.area,null!=r.z&&(p(i,r.z?n.dx:n.dy,n,!a.length),i.length=i.area=0);t.forEach(f)}}function h(e,t){for(var r,n=e.area,a=0,i=1/0,o=-1,l=e.length;++oa&&(a=r));return t*=t,(n*=n)?Math.max(t*a*c/n,n/(t*i*c)):1/0}function p(e,t,r,a){var i,o=-1,l=e.length,s=r.x,c=r.y,u=t?n(e.area/t):0;if(t==r.dx){for((a||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return e+t*r*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var r=e.random.irwinHall(t);return function(){return r()/t}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?Hn:Nn,l=a?Br:Hr;return i=e(t,r,l,n),o=e(r,t,l,yr),s}function s(e){return i(e)}return s.invert=function(e){return o(e)},s.domain=function(e){return arguments.length?(t=e.map(Number),l()):t},s.range=function(e){return arguments.length?(r=e,l()):r},s.rangeRound=function(e){return s.range(e).interpolate(Ir)},s.clamp=function(e){return arguments.length?(a=e,l()):a},s.interpolate=function(e){return arguments.length?(n=e,l()):n},s.ticks=function(e){return Vn(t,e)},s.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},s.nice=function(e){return Yn(t,e),l()},s.copy=function(){return e(t,r,n,a)},l()}([0,1],[0,1],yr,!1)};e.scale.log=function(){return function e(t,r,n,a){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(r)}function o(e){return n?Math.pow(r,e):-Math.pow(r,-e)}function l(e){return t(i(e))}return l.invert=function(e){return o(t.invert(e))},l.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((a=e.map(Number)).map(i)),l):a},l.base=function(e){return arguments.length?(r=+e,t.domain(a.map(i)),l):r},l.nice=function(){var e=Fn(a.map(i),n?Math:qn);return t.domain(e),a=e.map(o),l},l.ticks=function(){var e=Rn(a),t=[],l=e[0],s=e[1],c=Math.floor(i(l)),u=Math.ceil(i(s)),d=r%1?2:r;if(isFinite(u-c)){if(n){for(;c0;f--)t.push(o(c)*f);for(c=0;t[c]s;u--);t=t.slice(c,u)}return t},l.copy=function(){return e(t.copy(),r,n,a)},Bn(l,t)}(e.scale.linear().domain([0,1]),10,!0,[1,10])};var qn={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Gn(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}e.scale.pow=function(){return function e(t,r,n){var a=Gn(r),i=Gn(1/r);function o(e){return t(a(e))}return o.invert=function(e){return i(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(a)),o):n},o.ticks=function(e){return Vn(n,e)},o.tickFormat=function(e,t){return d3_scale_linearTickFormat(n,e,t)},o.nice=function(e){return o.domain(Yn(n,e))},o.exponent=function(e){return arguments.length?(a=Gn(r=e),i=Gn(1/r),t.domain(n.map(a)),o):r},o.copy=function(){return e(t.copy(),r,n)},Bn(o,t)}(e.scale.linear(),1,[0,1])},e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return function t(r,n){var a,i,o;function l(e){return i[((a.get(e)||("range"===n.t?a.set(e,r.push(e)):NaN))-1)%i.length]}function s(t,n){return e.range(r.length).map((function(e){return t+n*e}))}return l.domain=function(e){if(!arguments.length)return r;r=[],a=new _;for(var t,i=-1,o=e.length;++i0?a[e-1]:r[0],ed?0:1;if(c=Le)return s(c,h)+(l?s(l,1-h):"")+"Z";var p,g,m,v,y,x,b,_,w,M,T,k,A=0,L=0,S=[];if((v=(+o.apply(this,arguments)||0)/2)&&(m=n===Kn?Math.sqrt(l*l+c*c):+n.apply(this,arguments),h||(L*=-1),c&&(L=Oe(m/c*Math.sin(v))),l&&(A=Oe(m/l*Math.sin(v)))),c){y=c*Math.cos(u+L),x=c*Math.sin(u+L),b=c*Math.cos(d-L),_=c*Math.sin(d-L);var D=Math.abs(d-u-2*L)<=ke?0:1;if(L&&aa(y,x,b,_)===h^D){var C=(u+d)/2;y=c*Math.cos(C),x=c*Math.sin(C),b=_=null}}else y=x=0;if(l){w=l*Math.cos(d-A),M=l*Math.sin(d-A),T=l*Math.cos(u+A),k=l*Math.sin(u+A);var O=Math.abs(u-d+2*A)<=ke?0:1;if(A&&aa(w,M,T,k)===1-h^O){var P=(u+d)/2;w=l*Math.cos(P),M=l*Math.sin(P),T=k=null}}else w=M=0;if(f>Te&&(p=Math.min(Math.abs(c-l)/2,+r.apply(this,arguments)))>.001){g=l0?0:1}function ia(e,t,r,n,a){var i=e[0]-t[0],o=e[1]-t[1],l=(a?n:-n)/Math.sqrt(i*i+o*o),s=l*o,c=-l*i,u=e[0]+s,d=e[1]+c,f=t[0]+s,h=t[1]+c,p=(u+f)/2,g=(d+h)/2,m=f-u,v=h-d,y=m*m+v*v,x=r-n,b=u*h-f*d,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-m*_)/y,M=(-b*m-v*_)/y,T=(b*v+m*_)/y,k=(-b*m+v*_)/y,A=w-p,L=M-g,S=T-p,D=k-g;return A*A+L*L>S*S+D*D&&(w=T,M=k),[[w-s,M-c],[w*r/x,M*r/x]]}function oa(){return!0}function la(e){var t=_t,r=wt,n=oa,a=ca,i=a.key,o=.7;function l(i){var l,s=[],c=[],u=-1,d=i.length,f=ct(t),h=ct(r);function p(){s.push("M",a(e(c),o))}for(;++u1&&a.push("H",n[0]);return a.join("")},"step-before":da,"step-after":fa,basis:ga,"basis-open":function(e){if(e.length<4)return ca(e);var t,r=[],n=-1,a=e.length,i=[0],o=[0];for(;++n<3;)t=e[n],i.push(t[0]),o.push(t[1]);r.push(ma(xa,i)+","+ma(xa,o)),--n;for(;++n9&&(a=3*t/Math.sqrt(a),o[l]=a*r,o[l+1]=a*n));l=-1;for(;++l<=s;)a=(e[Math.min(s,l+1)][0]-e[Math.max(0,l-1)][0])/(6*(1+o[l]*o[l])),i.push([a||0,o[l]*a||0]);return i}(e))}});function ca(e){return e.length>1?e.join("L"):e+"Z"}function ua(e){return e.join("L")+"Z"}function da(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t1){l=t[1],i=e[s],s++,n+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-l[0])+","+(i[1]-l[1])+","+i[0]+","+i[1];for(var c=2;cke)+",1 "+t}function s(e,t,r,n){return"Q 0,0 "+n}return i.radius=function(e){return arguments.length?(r=ct(e),i):r},i.source=function(t){return arguments.length?(e=ct(t),i):e},i.target=function(e){return arguments.length?(t=ct(e),i):t},i.startAngle=function(e){return arguments.length?(n=ct(e),i):n},i.endAngle=function(e){return arguments.length?(a=ct(e),i):a},i},e.svg.diagonal=function(){var e=Ta,t=ka,r=La;function n(n,a){var i=e.call(this,n,a),o=t.call(this,n,a),l=(i.y+o.y)/2,s=[i,{x:i.x,y:l},{x:o.x,y:l},o];return"M"+(s=s.map(r))[0]+"C"+s[1]+" "+s[2]+" "+s[3]}return n.source=function(t){return arguments.length?(e=ct(t),n):e},n.target=function(e){return arguments.length?(t=ct(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),r=La,n=t.projection;return t.projection=function(e){return arguments.length?n(Sa(r=e)):r},t},e.svg.symbol=function(){var e=Ca,t=Da;function r(r,n){return(Pa.get(e.call(this,r,n))||Oa)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=ct(t),r):e},r.size=function(e){return arguments.length?(t=ct(e),r):t},r};var Pa=e.map({circle:Oa,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Ra)),r=t*Ra;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Ia),r=t*Ia/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ia),r=t*Ia/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=Pa.keys();var Ia=Math.sqrt(3),Ra=Math.tan(30*De);G.transition=function(e){for(var t,r,n=Ea||++Ba,a=Va(e),i=[],o=ja||{time:Date.now(),ease:Sr,delay:0,duration:250},l=-1,s=this.length;++l0;)c[--f].call(e,o);if(i>=1)return d.event&&d.event.end.call(e,e.__data__,t),--u.count?delete u[n]:delete e[r],1}d||(i=a.time,o=vt((function(e){var t=d.delay;if(o.t=t+i,t<=e)return f(e-t);o.c=f}),0,i),d=u[n]={tween:new _,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:t},a=null,++u.count)}Ha.call=G.call,Ha.empty=G.empty,Ha.node=G.node,Ha.size=G.size,e.transition=function(t,r){return t&&t.transition?Ea?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=Ha,Ha.select=function(e){var t,r,n,a=this.id,i=this.namespace,o=[];e=Z(e);for(var l=-1,s=this.length;++lrect,.s>rect").attr("width",l[1]-l[0])}function g(e){e.select(".extent").attr("y",s[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function m(){var d,m,v=this,y=e.select(e.event.target),x=n.of(v,arguments),b=e.select(v),_=y.datum(),w=!/^(n|s)$/.test(_)&&a,M=!/^(e|w)$/.test(_)&&i,T=y.classed("extent"),k=be(v),A=e.mouse(v),L=e.select(o(v)).on("keydown.brush",C).on("keyup.brush",O);if(e.event.changedTouches?L.on("touchmove.brush",P).on("touchend.brush",R):L.on("mousemove.brush",P).on("mouseup.brush",R),b.interrupt().selectAll("*").interrupt(),T)A[0]=l[0]-A[0],A[1]=s[0]-A[1];else if(_){var S=+/w$/.test(_),D=+/^n/.test(_);m=[l[1-S]-A[0],s[1-D]-A[1]],A[0]=l[S],A[1]=s[D]}else e.event.altKey&&(d=A.slice());function C(){32==e.event.keyCode&&(T||(d=null,A[0]-=l[1],A[1]-=s[1],T=2),F())}function O(){32==e.event.keyCode&&2==T&&(A[0]+=l[1],A[1]+=s[1],T=0,F())}function P(){var t=e.mouse(v),r=!1;m&&(t[0]+=m[0],t[1]+=m[1]),T||(e.event.altKey?(d||(d=[(l[0]+l[1])/2,(s[0]+s[1])/2]),A[0]=l[+(t[0]1?n[0]+n.slice(2):n,+e.slice(r+1)]}function r(e){return(e=t(Math.abs(e)))?e[1]:NaN}var n,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function i(e){if(!(t=a.exec(e)))throw new Error("invalid format: "+e);var t;return new o({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function o(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function l(e,r){var n=t(e,r);if(!n)return e+"";var a=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+a:a.length>i+1?a.slice(0,i+1)+"."+a.slice(i+1):a+new Array(i-a.length+2).join("0")}i.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var s={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return l(100*e,t)},r:l,s:function(e,r){var a=t(e,r);if(!a)return e+"";var i=a[0],o=a[1],l=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length;return l===s?i:l>s?i+new Array(l-s+1).join("0"):l>0?i.slice(0,l)+"."+i.slice(l):"0."+new Array(1-l).join("0")+t(e,Math.max(0,r+l-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function c(e){return e}var u,d=Array.prototype.map,f=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function h(e){var t,a,o=void 0===e.grouping||void 0===e.thousands?c:(t=d.call(e.grouping,Number),a=e.thousands+"",function(e,r){for(var n=e.length,i=[],o=0,l=t[0],s=0;n>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),i.push(e.substring(n-=l,n+l)),!((s+=l+1)>r));)l=t[o=(o+1)%t.length];return i.reverse().join(a)}),l=void 0===e.currency?"":e.currency[0]+"",u=void 0===e.currency?"":e.currency[1]+"",h=void 0===e.decimal?".":e.decimal+"",p=void 0===e.numerals?c:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(d.call(e.numerals,String)),g=void 0===e.percent?"%":e.percent+"",m=void 0===e.minus?"-":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function y(e){var t=(e=i(e)).fill,r=e.align,a=e.sign,c=e.symbol,d=e.zero,y=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):s[w]||(void 0===b&&(b=12),_=!0,w="g"),(d||"0"===t&&"="===r)&&(d=!0,t="0",r="=");var M="$"===c?l:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T="$"===c?u:/[%p]/.test(w)?g:"",k=s[w],A=/[defgprs%]/.test(w);function L(e){var i,l,s,c=M,u=T;if("c"===w)u=k(e)+u,e="";else{var g=(e=+e)<0||1/e<0;if(e=isNaN(e)?v:k(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,n=1,a=-1;n0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),g&&0==+e&&"+"!==a&&(g=!1),c=(g?"("===a?a:m:"-"===a||"("===a?"":a)+c,u=("s"===w?f[8+n/3]:"")+u+(g&&"("===a?")":""),A)for(i=-1,l=e.length;++i(s=e.charCodeAt(i))||s>57){u=(46===s?h+e.slice(i+1):e.slice(i))+u,e=e.slice(0,i);break}}x&&!d&&(e=o(e,1/0));var L=c.length+e.length+u.length,S=L>1)+c+e+u+S.slice(L);break;default:e=S+c+e+u}return p(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),L.toString=function(){return e+""},L}return{format:y,formatPrefix:function(e,t){var n=y(((e=i(e)).type="f",e)),a=3*Math.max(-8,Math.min(8,Math.floor(r(t)/3))),o=Math.pow(10,-a),l=f[8+a/3];return function(e){return n(o*e)+l}}}}function p(t){return u=h(t),e.format=u.format,e.formatPrefix=u.formatPrefix,u}p({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),e.FormatSpecifier=o,e.formatDefaultLocale=p,e.formatLocale=h,e.formatSpecifier=i,e.precisionFixed=function(e){return Math.max(0,-r(Math.abs(e)))},e.precisionPrefix=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(t)/3)))-r(Math.abs(e)))},e.precisionRound=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,r(t)-r(e))+1},Object.defineProperty(e,"__esModule",{value:!0})}))},{}],7:[function(e,t,r){!function(n,a){"object"==typeof r&&void 0!==t?a(r,e("d3-time")):a((n=n||self).d3=n.d3||{},n.d3)}(this,(function(e,t){"use strict";function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function a(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function i(e){var i=e.dateTime,o=e.date,s=e.time,c=e.periods,u=e.days,d=e.shortDays,f=e.months,G=e.shortMonths,fe=h(c),Te=p(c),ke=h(u),Ae=p(u),Le=h(d),Se=p(d),De=h(f),Ce=p(f),Oe=h(G),Pe=p(G),Ie={a:function(e){return d[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return G[e.getMonth()]},B:function(e){return f[e.getMonth()]},c:null,d:z,e:z,f:H,g:Q,G:$,H:N,I:F,j:E,L:j,m:B,M:Y,p:function(e){return c[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:we,s:Me,S:U,u:V,U:q,V:Z,w:W,W:J,x:null,X:null,y:X,Y:K,Z:ee,"%":_e},Re={a:function(e){return d[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return G[e.getUTCMonth()]},B:function(e){return f[e.getUTCMonth()]},c:null,d:te,e:te,f:oe,g:ve,G:xe,H:re,I:ne,j:ae,L:ie,m:le,M:se,p:function(e){return c[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:we,s:Me,S:ce,u:ue,U:de,V:he,w:pe,W:ge,x:null,X:null,y:me,Y:ye,Z:be,"%":_e},ze={a:function(e,t,r){var n=Le.exec(t.slice(r));return n?(e.w=Se[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=ke.exec(t.slice(r));return n?(e.w=Ae[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=Oe.exec(t.slice(r));return n?(e.m=Pe[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=De.exec(t.slice(r));return n?(e.m=Ce[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,t,r){return Ee(e,i,t,r)},d:k,e:k,f:O,g:_,G:b,H:L,I:L,j:A,L:C,m:T,M:S,p:function(e,t,r){var n=fe.exec(t.slice(r));return n?(e.p=Te[n[0].toLowerCase()],r+n[0].length):-1},q:M,Q:I,s:R,S:D,u:m,U:v,V:y,w:g,W:x,x:function(e,t,r){return Ee(e,o,t,r)},X:function(e,t,r){return Ee(e,s,t,r)},y:_,Y:b,Z:w,"%":P};function Ne(e,t){return function(r){var n,a,i,o=[],s=-1,c=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in c||(c.w=1),"Z"in c?(s=(l=n(a(c.y,0,1))).getUTCDay(),l=s>4||0===s?t.utcMonday.ceil(l):t.utcMonday(l),l=t.utcDay.offset(l,7*(c.V-1)),c.y=l.getUTCFullYear(),c.m=l.getUTCMonth(),c.d=l.getUTCDate()+(c.w+6)%7):(s=(l=r(a(c.y,0,1))).getDay(),l=s>4||0===s?t.timeMonday.ceil(l):t.timeMonday(l),l=t.timeDay.offset(l,7*(c.V-1)),c.y=l.getFullYear(),c.m=l.getMonth(),c.d=l.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:"W"in c?1:0),s="Z"in c?n(a(c.y,0,1)).getUTCDay():r(a(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(s+5)%7:c.w+7*c.U-(s+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function Ee(e,t,r,n){for(var a,i,o=0,s=t.length,c=r.length;o=c)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=ze[a in l?t.charAt(o++):a])||(n=i(e,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}return Ie.x=Ne(o,Ie),Ie.X=Ne(s,Ie),Ie.c=Ne(i,Ie),Re.x=Ne(o,Re),Re.X=Ne(s,Re),Re.c=Ne(i,Re),{format:function(e){var t=Ne(e+="",Ie);return t.toString=function(){return e},t},parse:function(e){var t=Fe(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Ne(e+="",Re);return t.toString=function(){return e},t},utcParse:function(e){var t=Fe(e+="",!0);return t.toString=function(){return e},t}}}var o,l={"-":"",_:" ",0:"0"},s=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function d(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i68?1900:2e3),r+n[0].length):-1}function w(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function M(e,t,r){var n=s.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function T(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function k(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function A(e,t,r){var n=s.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function L(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function S(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function D(e,t,r){var n=s.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function C(e,t,r){var n=s.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function O(e,t,r){var n=s.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function P(e,t,r){var n=c.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function I(e,t,r){var n=s.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function R(e,t,r){var n=s.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function z(e,t){return d(e.getDate(),t,2)}function N(e,t){return d(e.getHours(),t,2)}function F(e,t){return d(e.getHours()%12||12,t,2)}function E(e,r){return d(1+t.timeDay.count(t.timeYear(e),e),r,3)}function j(e,t){return d(e.getMilliseconds(),t,3)}function H(e,t){return j(e,t)+"000"}function B(e,t){return d(e.getMonth()+1,t,2)}function Y(e,t){return d(e.getMinutes(),t,2)}function U(e,t){return d(e.getSeconds(),t,2)}function V(e){var t=e.getDay();return 0===t?7:t}function q(e,r){return d(t.timeSunday.count(t.timeYear(e)-1,e),r,2)}function G(e){var r=e.getDay();return r>=4||0===r?t.timeThursday(e):t.timeThursday.ceil(e)}function Z(e,r){return e=G(e),d(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),r,2)}function W(e){return e.getDay()}function J(e,r){return d(t.timeMonday.count(t.timeYear(e)-1,e),r,2)}function X(e,t){return d(e.getFullYear()%100,t,2)}function Q(e,t){return d((e=G(e)).getFullYear()%100,t,2)}function K(e,t){return d(e.getFullYear()%1e4,t,4)}function $(e,r){var n=e.getDay();return d((e=n>=4||0===n?t.timeThursday(e):t.timeThursday.ceil(e)).getFullYear()%1e4,r,4)}function ee(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+d(t/60|0,"0",2)+d(t%60,"0",2)}function te(e,t){return d(e.getUTCDate(),t,2)}function re(e,t){return d(e.getUTCHours(),t,2)}function ne(e,t){return d(e.getUTCHours()%12||12,t,2)}function ae(e,r){return d(1+t.utcDay.count(t.utcYear(e),e),r,3)}function ie(e,t){return d(e.getUTCMilliseconds(),t,3)}function oe(e,t){return ie(e,t)+"000"}function le(e,t){return d(e.getUTCMonth()+1,t,2)}function se(e,t){return d(e.getUTCMinutes(),t,2)}function ce(e,t){return d(e.getUTCSeconds(),t,2)}function ue(e){var t=e.getUTCDay();return 0===t?7:t}function de(e,r){return d(t.utcSunday.count(t.utcYear(e)-1,e),r,2)}function fe(e){var r=e.getUTCDay();return r>=4||0===r?t.utcThursday(e):t.utcThursday.ceil(e)}function he(e,r){return e=fe(e),d(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),r,2)}function pe(e){return e.getUTCDay()}function ge(e,r){return d(t.utcMonday.count(t.utcYear(e)-1,e),r,2)}function me(e,t){return d(e.getUTCFullYear()%100,t,2)}function ve(e,t){return d((e=fe(e)).getUTCFullYear()%100,t,2)}function ye(e,t){return d(e.getUTCFullYear()%1e4,t,4)}function xe(e,r){var n=e.getUTCDay();return d((e=n>=4||0===n?t.utcThursday(e):t.utcThursday.ceil(e)).getUTCFullYear()%1e4,r,4)}function be(){return"+0000"}function _e(){return"%"}function we(e){return+e}function Me(e){return Math.floor(+e/1e3)}function Te(t){return o=i(t),e.timeFormat=o.format,e.timeParse=o.parse,e.utcFormat=o.utcFormat,e.utcParse=o.utcParse,o}Te({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ke=Date.prototype.toISOString?function(e){return e.toISOString()}:e.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");var Ae=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:e.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");e.isoFormat=ke,e.isoParse=Ae,e.timeFormatDefaultLocale=Te,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})}))},{"d3-time":8}],8:[function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?n(r):n((e=e||self).d3=e.d3||{})}(this,(function(e){"use strict";var t=new Date,r=new Date;function n(e,a,i,o){function l(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return l.floor=function(t){return e(t=new Date(+t)),t},l.ceil=function(t){return e(t=new Date(t-1)),a(t,1),e(t),t},l.round=function(e){var t=l(e),r=l.ceil(e);return e-t0))return o;do{o.push(i=new Date(+t)),a(t,n),e(t)}while(i=r)for(;e(r),!t(r);)r.setTime(r-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;a(e,-1),!t(e););else for(;--r>=0;)for(;a(e,1),!t(e););}))},i&&(l.count=function(n,a){return t.setTime(+n),r.setTime(+a),e(t),e(r),Math.floor(i(t,r))},l.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?l.filter(o?function(t){return o(t)%e==0}:function(t){return l.count(0,t)%e==0}):l:null}),l}var a=n((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?n((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):a:null};var i=a.range,o=n((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),l=o.range,s=n((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),c=s.range,u=n((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()})),d=u.range,f=n((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1})),h=f.range;function p(e){return n((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var g=p(0),m=p(1),v=p(2),y=p(3),x=p(4),b=p(5),_=p(6),w=g.range,M=m.range,T=v.range,k=y.range,A=x.range,L=b.range,S=_.range,D=n((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),C=D.range,O=n((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));O.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null};var P=O.range,I=n((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),R=I.range,z=n((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),N=z.range,F=n((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1})),E=F.range;function j(e){return n((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var H=j(0),B=j(1),Y=j(2),U=j(3),V=j(4),q=j(5),G=j(6),Z=H.range,W=B.range,J=Y.range,X=U.range,Q=V.range,K=q.range,$=G.range,ee=n((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),te=ee.range,re=n((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));re.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};var ne=re.range;e.timeDay=f,e.timeDays=h,e.timeFriday=b,e.timeFridays=L,e.timeHour=u,e.timeHours=d,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=i,e.timeMinute=s,e.timeMinutes=c,e.timeMonday=m,e.timeMondays=M,e.timeMonth=D,e.timeMonths=C,e.timeSaturday=_,e.timeSaturdays=S,e.timeSecond=o,e.timeSeconds=l,e.timeSunday=g,e.timeSundays=w,e.timeThursday=x,e.timeThursdays=A,e.timeTuesday=v,e.timeTuesdays=T,e.timeWednesday=y,e.timeWednesdays=k,e.timeWeek=g,e.timeWeeks=w,e.timeYear=O,e.timeYears=P,e.utcDay=F,e.utcDays=E,e.utcFriday=q,e.utcFridays=K,e.utcHour=z,e.utcHours=N,e.utcMillisecond=a,e.utcMilliseconds=i,e.utcMinute=I,e.utcMinutes=R,e.utcMonday=B,e.utcMondays=W,e.utcMonth=ee,e.utcMonths=te,e.utcSaturday=G,e.utcSaturdays=$,e.utcSecond=o,e.utcSeconds=l,e.utcSunday=H,e.utcSundays=Z,e.utcThursday=V,e.utcThursdays=Q,e.utcTuesday=Y,e.utcTuesdays=J,e.utcWednesday=U,e.utcWednesdays=X,e.utcWeek=H,e.utcWeeks=Z,e.utcYear=re,e.utcYears=ne,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],9:[function(e,t,r){"use strict";var n,a="object"==typeof Reflect?Reflect:null,i=a&&"function"==typeof a.apply?a.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function l(){l.init.call(this)}t.exports=l,t.exports.once=function(e,t){return new Promise((function(r,n){function a(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&v(e,"error",t,r)}(e,a,{once:!0})}))},l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var s=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){var a,i,o,l;if(c(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),o=i[t]),void 0===o)o=i[t]=r,++e._eventsCount;else if("function"==typeof o?o=i[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(a=u(e))>0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,l=s,console&&console.warn&&console.warn(l)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=f.bind(n);return a.listener=r,n.wrapFn=a,a}function p(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:"function"==typeof a?r?[a.listener||a]:[a]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var s=a[e];if(void 0===s)return!1;if("function"==typeof s)i(s,this,t);else{var c=s.length,u=m(s,c);for(r=0;r=0;i--)if(r[i]===t||r[i].listener===t){o=r[i].listener,a=i;break}if(a<0)return this;0===a?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},l.prototype.listeners=function(e){return p(this,e,!0)},l.prototype.rawListeners=function(e){return p(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},l.prototype.listenerCount=g,l.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],10:[function(e,t,r){"use strict";var n=e("is-string-blank");t.exports=function(e){var t=typeof e;if("string"===t){var r=e;if(0===(e=+e)&&n(r))return!1}else if("number"!==t)return!1;return e-e<1}},{"is-string-blank":45}],11:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],g=t[13],m=t[14],v=t[15];return e[0]=l*(f*v-h*m)-d*(s*v-c*m)+g*(s*h-c*f),e[1]=-(n*(f*v-h*m)-d*(a*v-i*m)+g*(a*h-i*f)),e[2]=n*(s*v-c*m)-l*(a*v-i*m)+g*(a*c-i*s),e[3]=-(n*(s*h-c*f)-l*(a*h-i*f)+d*(a*c-i*s)),e[4]=-(o*(f*v-h*m)-u*(s*v-c*m)+p*(s*h-c*f)),e[5]=r*(f*v-h*m)-u*(a*v-i*m)+p*(a*h-i*f),e[6]=-(r*(s*v-c*m)-o*(a*v-i*m)+p*(a*c-i*s)),e[7]=r*(s*h-c*f)-o*(a*h-i*f)+u*(a*c-i*s),e[8]=o*(d*v-h*g)-u*(l*v-c*g)+p*(l*h-c*d),e[9]=-(r*(d*v-h*g)-u*(n*v-i*g)+p*(n*h-i*d)),e[10]=r*(l*v-c*g)-o*(n*v-i*g)+p*(n*c-i*l),e[11]=-(r*(l*h-c*d)-o*(n*h-i*d)+u*(n*c-i*l)),e[12]=-(o*(d*m-f*g)-u*(l*m-s*g)+p*(l*f-s*d)),e[13]=r*(d*m-f*g)-u*(n*m-a*g)+p*(n*f-a*d),e[14]=-(r*(l*m-s*g)-o*(n*m-a*g)+p*(n*s-a*l)),e[15]=r*(l*f-s*d)-o*(n*f-a*d)+u*(n*s-a*l),e}},{}],12:[function(e,t,r){t.exports=function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],13:[function(e,t,r){t.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],14:[function(e,t,r){t.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],15:[function(e,t,r){t.exports=function(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],l=e[6],s=e[7],c=e[8],u=e[9],d=e[10],f=e[11],h=e[12],p=e[13],g=e[14],m=e[15];return(t*o-r*i)*(d*m-f*g)-(t*l-n*i)*(u*m-f*p)+(t*s-a*i)*(u*g-d*p)+(r*l-n*o)*(c*m-f*h)-(r*s-a*o)*(c*g-d*h)+(n*s-a*l)*(c*p-u*h)}},{}],16:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,l=n+n,s=a+a,c=r*o,u=n*o,d=n*l,f=a*o,h=a*l,p=a*s,g=i*o,m=i*l,v=i*s;return e[0]=1-d-p,e[1]=u+v,e[2]=f-m,e[3]=0,e[4]=u-v,e[5]=1-c-p,e[6]=h+g,e[7]=0,e[8]=f+m,e[9]=h-g,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],17:[function(e,t,r){t.exports=function(e,t,r){var n,a,i,o=r[0],l=r[1],s=r[2],c=Math.sqrt(o*o+l*l+s*s);if(Math.abs(c)<1e-6)return null;return o*=c=1/c,l*=c,s*=c,n=Math.sin(t),a=Math.cos(t),i=1-a,e[0]=o*o*i+a,e[1]=l*o*i+s*n,e[2]=s*o*i-l*n,e[3]=0,e[4]=o*l*i-s*n,e[5]=l*l*i+a,e[6]=s*l*i+o*n,e[7]=0,e[8]=o*s*i+l*n,e[9]=l*s*i-o*n,e[10]=s*s*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],18:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=n+n,s=a+a,c=i+i,u=n*l,d=n*s,f=n*c,h=a*s,p=a*c,g=i*c,m=o*l,v=o*s,y=o*c;return e[0]=1-(h+g),e[1]=d+y,e[2]=f-v,e[3]=0,e[4]=d-y,e[5]=1-(u+g),e[6]=p+m,e[7]=0,e[8]=f+v,e[9]=p-m,e[10]=1-(u+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}},{}],19:[function(e,t,r){t.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],20:[function(e,t,r){t.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},{}],21:[function(e,t,r){t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],22:[function(e,t,r){t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],23:[function(e,t,r){t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],24:[function(e,t,r){t.exports=function(e,t,r,n,a,i,o){var l=1/(r-t),s=1/(a-n),c=1/(i-o);return e[0]=2*i*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*i*s,e[6]=0,e[7]=0,e[8]=(r+t)*l,e[9]=(a+n)*s,e[10]=(o+i)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*c,e[15]=0,e}},{}],25:[function(e,t,r){t.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],26:[function(e,t,r){t.exports={create:e("./create"),clone:e("./clone"),copy:e("./copy"),identity:e("./identity"),transpose:e("./transpose"),invert:e("./invert"),adjoint:e("./adjoint"),determinant:e("./determinant"),multiply:e("./multiply"),translate:e("./translate"),scale:e("./scale"),rotate:e("./rotate"),rotateX:e("./rotateX"),rotateY:e("./rotateY"),rotateZ:e("./rotateZ"),fromRotation:e("./fromRotation"),fromRotationTranslation:e("./fromRotationTranslation"),fromScaling:e("./fromScaling"),fromTranslation:e("./fromTranslation"),fromXRotation:e("./fromXRotation"),fromYRotation:e("./fromYRotation"),fromZRotation:e("./fromZRotation"),fromQuat:e("./fromQuat"),frustum:e("./frustum"),perspective:e("./perspective"),perspectiveFromFieldOfView:e("./perspectiveFromFieldOfView"),ortho:e("./ortho"),lookAt:e("./lookAt"),str:e("./str")}},{"./adjoint":11,"./clone":12,"./copy":13,"./create":14,"./determinant":15,"./fromQuat":16,"./fromRotation":17,"./fromRotationTranslation":18,"./fromScaling":19,"./fromTranslation":20,"./fromXRotation":21,"./fromYRotation":22,"./fromZRotation":23,"./frustum":24,"./identity":25,"./invert":27,"./lookAt":28,"./multiply":29,"./ortho":30,"./perspective":31,"./perspectiveFromFieldOfView":32,"./rotate":33,"./rotateX":34,"./rotateY":35,"./rotateZ":36,"./scale":37,"./str":38,"./translate":39,"./transpose":40}],27:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],l=t[5],s=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],g=t[13],m=t[14],v=t[15],y=r*l-n*o,x=r*s-a*o,b=r*c-i*o,_=n*s-a*l,w=n*c-i*l,M=a*c-i*s,T=u*g-d*p,k=u*m-f*p,A=u*v-h*p,L=d*m-f*g,S=d*v-h*g,D=f*v-h*m,C=y*D-x*S+b*L+_*A-w*k+M*T;if(!C)return null;return C=1/C,e[0]=(l*D-s*S+c*L)*C,e[1]=(a*S-n*D-i*L)*C,e[2]=(g*M-m*w+v*_)*C,e[3]=(f*w-d*M-h*_)*C,e[4]=(s*A-o*D-c*k)*C,e[5]=(r*D-a*A+i*k)*C,e[6]=(m*b-p*M-v*x)*C,e[7]=(u*M-f*b+h*x)*C,e[8]=(o*S-l*A+c*T)*C,e[9]=(n*A-r*S-i*T)*C,e[10]=(p*w-g*b+v*y)*C,e[11]=(d*b-u*w-h*y)*C,e[12]=(l*k-o*L-s*T)*C,e[13]=(r*L-n*k+a*T)*C,e[14]=(g*x-p*_-m*y)*C,e[15]=(u*_-d*x+f*y)*C,e}},{}],28:[function(e,t,r){var n=e("./identity");t.exports=function(e,t,r,a){var i,o,l,s,c,u,d,f,h,p,g=t[0],m=t[1],v=t[2],y=a[0],x=a[1],b=a[2],_=r[0],w=r[1],M=r[2];if(Math.abs(g-_)<1e-6&&Math.abs(m-w)<1e-6&&Math.abs(v-M)<1e-6)return n(e);d=g-_,f=m-w,h=v-M,p=1/Math.sqrt(d*d+f*f+h*h),i=x*(h*=p)-b*(f*=p),o=b*(d*=p)-y*h,l=y*f-x*d,(p=Math.sqrt(i*i+o*o+l*l))?(i*=p=1/p,o*=p,l*=p):(i=0,o=0,l=0);s=f*l-h*o,c=h*i-d*l,u=d*o-f*i,(p=Math.sqrt(s*s+c*c+u*u))?(s*=p=1/p,c*=p,u*=p):(s=0,c=0,u=0);return e[0]=i,e[1]=s,e[2]=d,e[3]=0,e[4]=o,e[5]=c,e[6]=f,e[7]=0,e[8]=l,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*g+o*m+l*v),e[13]=-(s*g+c*m+u*v),e[14]=-(d*g+f*m+h*v),e[15]=1,e}},{"./identity":25}],29:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],g=t[12],m=t[13],v=t[14],y=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*l+_*d+w*g,e[1]=x*a+b*s+_*f+w*m,e[2]=x*i+b*c+_*h+w*v,e[3]=x*o+b*u+_*p+w*y,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*n+b*l+_*d+w*g,e[5]=x*a+b*s+_*f+w*m,e[6]=x*i+b*c+_*h+w*v,e[7]=x*o+b*u+_*p+w*y,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*n+b*l+_*d+w*g,e[9]=x*a+b*s+_*f+w*m,e[10]=x*i+b*c+_*h+w*v,e[11]=x*o+b*u+_*p+w*y,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*n+b*l+_*d+w*g,e[13]=x*a+b*s+_*f+w*m,e[14]=x*i+b*c+_*h+w*v,e[15]=x*o+b*u+_*p+w*y,e}},{}],30:[function(e,t,r){t.exports=function(e,t,r,n,a,i,o){var l=1/(t-r),s=1/(n-a),c=1/(i-o);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*l,e[13]=(a+n)*s,e[14]=(o+i)*c,e[15]=1,e}},{}],31:[function(e,t,r){t.exports=function(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}},{}],32:[function(e,t,r){t.exports=function(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(o+l),c=2/(a+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-l)*s*.5,e[9]=(a-i)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}},{}],33:[function(e,t,r){t.exports=function(e,t,r,n){var a,i,o,l,s,c,u,d,f,h,p,g,m,v,y,x,b,_,w,M,T,k,A,L,S=n[0],D=n[1],C=n[2],O=Math.sqrt(S*S+D*D+C*C);if(Math.abs(O)<1e-6)return null;S*=O=1/O,D*=O,C*=O,a=Math.sin(r),i=Math.cos(r),o=1-i,l=t[0],s=t[1],c=t[2],u=t[3],d=t[4],f=t[5],h=t[6],p=t[7],g=t[8],m=t[9],v=t[10],y=t[11],x=S*S*o+i,b=D*S*o+C*a,_=C*S*o-D*a,w=S*D*o-C*a,M=D*D*o+i,T=C*D*o+S*a,k=S*C*o+D*a,A=D*C*o-S*a,L=C*C*o+i,e[0]=l*x+d*b+g*_,e[1]=s*x+f*b+m*_,e[2]=c*x+h*b+v*_,e[3]=u*x+p*b+y*_,e[4]=l*w+d*M+g*T,e[5]=s*w+f*M+m*T,e[6]=c*w+h*M+v*T,e[7]=u*w+p*M+y*T,e[8]=l*k+d*A+g*L,e[9]=s*k+f*A+m*L,e[10]=c*k+h*A+v*L,e[11]=u*k+p*A+y*L,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e}},{}],34:[function(e,t,r){t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],l=t[6],s=t[7],c=t[8],u=t[9],d=t[10],f=t[11];t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[4]=i*a+c*n,e[5]=o*a+u*n,e[6]=l*a+d*n,e[7]=s*a+f*n,e[8]=c*a-i*n,e[9]=u*a-o*n,e[10]=d*a-l*n,e[11]=f*a-s*n,e}},{}],35:[function(e,t,r){t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],c=t[8],u=t[9],d=t[10],f=t[11];t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[0]=i*a-c*n,e[1]=o*a-u*n,e[2]=l*a-d*n,e[3]=s*a-f*n,e[8]=i*n+c*a,e[9]=o*n+u*a,e[10]=l*n+d*a,e[11]=s*n+f*a,e}},{}],36:[function(e,t,r){t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],l=t[2],s=t[3],c=t[4],u=t[5],d=t[6],f=t[7];t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[0]=i*a+c*n,e[1]=o*a+u*n,e[2]=l*a+d*n,e[3]=s*a+f*n,e[4]=c*a-i*n,e[5]=u*a-o*n,e[6]=d*a-l*n,e[7]=f*a-s*n,e}},{}],37:[function(e,t,r){t.exports=function(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],38:[function(e,t,r){t.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},{}],39:[function(e,t,r){t.exports=function(e,t,r){var n,a,i,o,l,s,c,u,d,f,h,p,g=r[0],m=r[1],v=r[2];t===e?(e[12]=t[0]*g+t[4]*m+t[8]*v+t[12],e[13]=t[1]*g+t[5]*m+t[9]*v+t[13],e[14]=t[2]*g+t[6]*m+t[10]*v+t[14],e[15]=t[3]*g+t[7]*m+t[11]*v+t[15]):(n=t[0],a=t[1],i=t[2],o=t[3],l=t[4],s=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=l,e[5]=s,e[6]=c,e[7]=u,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=n*g+l*m+d*v+t[12],e[13]=a*g+s*m+f*v+t[13],e[14]=i*g+c*m+h*v+t[14],e[15]=o*g+u*m+p*v+t[15]);return e}},{}],40:[function(e,t,r){t.exports=function(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},{}],41:[function(e,t,r){(function(r){(function(){"use strict";var n,a=e("is-browser");n="function"==typeof r.matchMedia?!r.matchMedia("(hover: none)").matches:a,t.exports=n}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"is-browser":43}],42:[function(e,t,r){"use strict";var n=e("is-browser");t.exports=n&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e}()},{"is-browser":43}],43:[function(e,t,r){t.exports=!0},{}],44:[function(e,t,r){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var n=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function i(e){e||(e={});var t=e.ua;if(t||"undefined"==typeof navigator||(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;var r=e.tablet?a.test(t):n.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(r=!0),r}},{}],45:[function(e,t,r){"use strict";t.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},{}],46:[function(e,t,r){var n={left:0,top:0};t.exports=function(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var a=e.clientX||0,i=e.clientY||0,o=(l=t,l===window||l===document||l===document.body?n:l.getBoundingClientRect());var l;return r[0]=a-o.left,r[1]=i-o.top,r}},{}],47:[function(e,t,r){(function(e,r){(function(){ /*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org */ var n,a,i;i=function(){"use strict";var e,t,n,a=Object.prototype.toString,i=void 0!==r?function(e){return r(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch(t){e=function(e,t,r){return e[t]=r,e}}function o(e,r){n.add(e,r),t||(t=i(n.drain))}function l(e){var t,r=typeof e;return null==e||"object"!=r&&"function"!=r||(t=e.then),"function"==typeof t&&t}function s(){for(var e=0;e0&&o(s,r))}catch(e){d.call(new h(r),e)}}}function d(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&o(s,t))}function f(e,t,r,n){for(var a=0;a2&&(t.push([r].concat(a.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(a.length==n[o])return a.unshift(r),t.push(a);if(a.length=-e},pointBetween:function(t,r,n){var a=t[1]-r[1],i=n[0]-r[0],o=t[0]-r[0],l=n[1]-r[1],s=o*i+a*l;return!(s-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-a>e&&(i-c)*(a-u)/(o-u)+c-n>e&&(l=!l),i=c,o=u}return l}};return t}},{}],53:[function(e,t,r){var n={toPolygon:function(e,t){function r(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function r(t){var r=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[r]})}for(var n=r(t[0]),a=1;a0}))}function u(e,n){var a=e.seg,i=n.seg,o=a.start,l=a.end,c=i.start,u=i.end;r&&r.checkIntersection(a,i);var d=t.linesIntersect(o,l,c,u);if(!1===d){if(!t.pointsCollinear(o,l,c))return!1;if(t.pointsSame(o,u)||t.pointsSame(l,c))return!1;var f=t.pointsSame(o,c),h=t.pointsSame(l,u);if(f&&h)return n;var p=!f&&t.pointBetween(o,c,u),g=!h&&t.pointBetween(l,c,u);if(f)return g?s(n,l):s(e,u),n;p&&(h||(g?s(n,l):s(e,u)),s(n,o))}else 0===d.alongA&&(-1===d.alongB?s(e,c):0===d.alongB?s(e,d.pt):1===d.alongB&&s(e,u)),0===d.alongB&&(-1===d.alongA?s(n,o):0===d.alongA?s(n,d.pt):1===d.alongA&&s(n,l));return!1}for(var d=[];!i.isEmpty();){var f=i.getHead();if(r&&r.vert(f.pt[0]),f.isStart){r&&r.segmentNew(f.seg,f.primary);var h=c(f),p=h.before?h.before.ev:null,g=h.after?h.after.ev:null;function m(){if(p){var e=u(f,p);if(e)return e}return!!g&&u(f,g)}r&&r.tempStatus(f.seg,!!p&&p.seg,!!g&&g.seg);var v,y=m();if(y){var x;if(e)(x=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=f.seg.myFill;r&&r.segmentUpdate(y.seg),f.other.remove(),f.remove()}if(i.getHead()!==f){r&&r.rewind(f.seg);continue}if(e)x=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=g?g.seg.myFill.above:a,f.seg.myFill.above=x?!f.seg.myFill.below:f.seg.myFill.below;else if(null===f.seg.otherFill)v=g?f.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:f.primary?o:a,f.seg.otherFill={above:v,below:v};r&&r.status(f.seg,!!p&&p.seg,!!g&&g.seg),f.other.status=h.insert(n.node({ev:f}))}else{var b=f.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(l.exists(b.prev)&&l.exists(b.next)&&u(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!f.primary){var _=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=_}d.push(f.seg)}i.getHead().remove()}return r&&r.done(),d}return e?{addRegion:function(e){for(var n,a,i,o=e[e.length-1],s=0;s1)for(var r=1;r=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=s++,n=!(arguments.length<2)&&o.call(arguments,1);return l[t]=!0,a((function(){l[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete l[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":58,timers:59}],60:[function(e,t,r){!function(e){var r=/^\s+/,n=/\s+$/,a=0,i=e.round,o=e.min,l=e.max,s=e.random;function c(t,s){if(s=s||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,s);var u=function(t){var a={r:0,g:0,b:0},i=1,s=null,c=null,u=null,d=!1,f=!1;"string"==typeof t&&(t=function(e){e=e.replace(r,"").replace(n,"").toLowerCase();var t,a=!1;if(L[e])e=L[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=H.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=H.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=H.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=H.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=H.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=H.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=H.hex8.exec(e))return{r:P(t[1]),g:P(t[2]),b:P(t[3]),a:N(t[4]),format:a?"name":"hex8"};if(t=H.hex6.exec(e))return{r:P(t[1]),g:P(t[2]),b:P(t[3]),format:a?"name":"hex"};if(t=H.hex4.exec(e))return{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),a:N(t[4]+""+t[4]),format:a?"name":"hex8"};if(t=H.hex3.exec(e))return{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),format:a?"name":"hex"};return!1}(t));"object"==typeof t&&(B(t.r)&&B(t.g)&&B(t.b)?(h=t.r,p=t.g,g=t.b,a={r:255*C(h,255),g:255*C(p,255),b:255*C(g,255)},d=!0,f="%"===String(t.r).substr(-1)?"prgb":"rgb"):B(t.h)&&B(t.s)&&B(t.v)?(s=R(t.s),c=R(t.v),a=function(t,r,n){t=6*C(t,360),r=C(r,100),n=C(n,100);var a=e.floor(t),i=t-a,o=n*(1-r),l=n*(1-i*r),s=n*(1-(1-i)*r),c=a%6;return{r:255*[n,l,o,o,s,n][c],g:255*[s,n,n,l,o,o][c],b:255*[o,o,s,n,n,l][c]}}(t.h,s,c),d=!0,f="hsv"):B(t.h)&&B(t.s)&&B(t.l)&&(s=R(t.s),u=R(t.l),a=function(e,t,r){var n,a,i;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=C(e,360),t=C(t,100),r=C(r,100),0===t)n=a=i=r;else{var l=r<.5?r*(1+t):r+t-r*t,s=2*r-l;n=o(s,l,e+1/3),a=o(s,l,e),i=o(s,l,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(t.h,s,u),d=!0,f="hsl"),t.hasOwnProperty("a")&&(i=t.a));var h,p,g;return i=D(i),{ok:d,format:t.format||f,r:o(255,l(a.r,0)),g:o(255,l(a.g,0)),b:o(255,l(a.b,0)),a:i}}(t);this._originalInput=t,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=i(100*this._a)/100,this._format=s.format||u.format,this._gradientType=s.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=u.ok,this._tc_id=a++}function u(e,t,r){e=C(e,255),t=C(t,255),r=C(r,255);var n,a,i=l(e,t,r),s=o(e,t,r),c=(i+s)/2;if(i==s)n=a=0;else{var u=i-s;switch(a=c>.5?u/(2-i-s):u/(i+s),i){case e:n=(t-r)/u+(t>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(c(n));return i}function A(e,t){t=t||6;for(var r=c(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],l=1/t;t--;)o.push(c({h:n,s:a,v:i})),i=(i+l)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var t,r,n,a=this.toRgb();return t=a.r/255,r=a.g/255,n=a.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=D(e),this._roundA=i(100*this._a)/100,this},toHsv:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=d(this._r,this._g,this._b),t=i(360*e.h),r=i(100*e.s),n=i(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=u(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=u(this._r,this._g,this._b),t=i(360*e.h),r=i(100*e.s),n=i(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return f(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,a){var o=[I(i(e).toString(16)),I(i(t).toString(16)),I(i(r).toString(16)),I(z(n))];if(a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*C(this._r,255))+"%",g:i(100*C(this._g,255))+"%",b:i(100*C(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*C(this._r,255))+"%, "+i(100*C(this._g,255))+"%, "+i(100*C(this._b,255))+"%)":"rgba("+i(100*C(this._r,255))+"%, "+i(100*C(this._g,255))+"%, "+i(100*C(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(S[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+h(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=c(e);r="#"+h(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(k,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},c.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:R(e[n]));e=r}return c(e,t)},c.equals=function(e,t){return!(!e||!t)&&c(e).toRgbString()==c(t).toRgbString()},c.random=function(){return c.fromRatio({r:s(),g:s(),b:s()})},c.mix=function(e,t,r){r=0===r?0:r||50;var n=c(e).toRgb(),a=c(t).toRgb(),i=r/100;return c({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},c.readability=function(t,r){var n=c(t),a=c(r);return(e.max(n.getLuminance(),a.getLuminance())+.05)/(e.min(n.getLuminance(),a.getLuminance())+.05)},c.isReadable=function(e,t,r){var n,a,i=c.readability(e,t);switch(a=!1,(n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},c.mostReadable=function(e,t,r){var n,a,i,o,l=null,s=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var u=0;us&&(s=n,l=c(t[u]));return c.isReadable(e,l,{level:i,size:o})||!a?l:(r.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],r))};var L=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},S=c.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(L);function D(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function C(t,r){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(t)&&(t="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(t);return t=o(r,l(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function O(e){return o(1,l(0,e))}function P(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function z(t){return e.round(255*parseFloat(t)).toString(16)}function N(e){return P(e)/255}var F,E,j,H=(E="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",j="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+E),rgba:new RegExp("rgba"+j),hsl:new RegExp("hsl"+E),hsla:new RegExp("hsla"+j),hsv:new RegExp("hsv"+E),hsva:new RegExp("hsva"+j),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function B(e){return!!H.CSS_UNIT.exec(e)}void 0!==t&&t.exports?t.exports=c:window.tinycolor=c}(Math)},{}],61:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(s);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if("string"==typeof e){var t=e.match(c);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(u);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="\u95f0"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"\u95f0"===t[0]&&(r=!0,t=t.substring(1)),"\u6708"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(t);else{var a=t[t.length-1];r="i"===a||"I"===a}return this.toMonthIndex(e,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var a=this.intercalaryMonth(e);if(r&&t!==a||t<1||t>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!r&&t<=a?t-1:t:t-1},toChineseMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);if(t<0||t>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?t>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(e,t,r){var a,o=this._validateYear(e,n.local.invalidyear),l=f[o-f[0]],s=l>>9&4095,c=l>>5&15,u=31&l;(a=i.newDate(s,c,u)).add(4-(a.dayOfWeek()||7),"d");var d=this.toJD(e,t,r)-a.toJD();return 1+Math.floor(d/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=d[e-d[0]];if(t>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-t?30:29},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,l,r,n.local.invalidDate);e=this._validateYear(a.year()),t=a.month(),r=a.day();var o=this.isIntercalaryMonth(e,t),l=this.toChineseMonth(e,t),s=function(e,t,r,n,a){var i,o,l;if("object"==typeof e)o=e,i=t||{};else{var s;if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(s=!1,i=n):(s=!!n,i=a||{}),o={year:e,month:t,day:r,isIntercalary:s}}l=o.day-1;var c,u=d[o.year-d[0]],h=u>>13;c=h&&(o.month>h||o.isIntercalary)?o.month:o.month-1;for(var p=0;p>9&4095,(g>>5&15)-1,(31&g)+l);return i.year=m.getFullYear(),i.month=1+m.getMonth(),i.day=m.getDate(),i}(e,l,r,o);return i.toJD(s.year,s.month,s.day)},fromJD:function(e){var t=i.fromJD(e),r=function(e,t,r,n){var a,i;if("object"==typeof e)a=e,i=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i=n||{}}var o=f[a.year-f[0]],l=a.year<<9|a.month<<5|a.day;i.year=l>=o?a.year:a.year-1,o=f[i.year-f[0]];var s,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(a.year,a.month-1,a.day);s=Math.round((u-c)/864e5);var h,p=d[i.year-d[0]];for(h=0;h<13;h++){var g=p&1<<12-h?30:29;if(s>13;!m||h=2&&n<=6},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year()+(a.year()<0?1:0),t=a.month(),(r=a.day())+(t>1?16:0)+(t>2?32*(t-2):0)+400*(e-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-32*(r-1)+1;return this.newDate(t<=0?t-1:t,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=i},{"../main":75,"object-assign":48}],64:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==3||e%4==-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return(e=a.year())<0&&e++,a.day()+30*(a.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.ethiopian=i},{"../main":75,"object-assign":48}],65:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return o(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===e?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),12===t&&this.leapYear(e)||8===t&&5===o(this.daysInYear(e),10)?30:9===t&&3===o(this.daysInYear(e),10)?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e<=0?e+1:e,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var l=7;l<=this.monthsInYear(e);l++)o+=this.daysInMonth(e,l);for(l=1;l=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.hebrew=i},{"../main":75,"object-assign":48}],66:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){return(11*this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),e=e<=0?e+1:e,(r=a.day())+Math.ceil(29.5*(t-1))+354*(e-1)+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.islamic=i},{"../main":75,"object-assign":48}],67:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()<0?t.year()+1:t.year())%4==0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),r=a.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*r),a=Math.floor((t-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),l=t-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,l)}}),n.calendars.julian=i},{"../main":75,"object-assign":48}],68:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}function l(e,t){return o(e-1,t)+1}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(e){e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year();var t=Math.floor(e/400);return e%=400,e+=e<0?400:0,t+"."+Math.floor(e/20)+"."+e%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=20*t+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate).day()},weekDay:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),!0},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate).toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=o((e-=this.jdEpoch)+8+340,365);return[Math.floor(t/20)+1,o(t,20)]},_toTzolkin:function(e){return[l((e-=this.jdEpoch)+20,20),l(e+4,13)]},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}}),n.calendars.mayan=i},{"../main":75,"object-assign":48}],69:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar;var o=n.instance("gregorian");a(i.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidMonth);(e=a.year())<0&&e++;for(var i=a.day(),l=1;l=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}}),n.calendars.nanakshahi=i},{"../main":75,"object-assign":48}],70:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){if(e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[e])return this.daysPerYear;for(var t=0,r=this.minMonth;r<=12;r++)t+=this.NEPALI_CALENDAR_DATA[e][r];return t},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[e]?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=n.instance(),o=0,l=t,s=e;this._createMissingCalendarData(e);var c=e-(l>9||9===l&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(9!==t&&(o=r,l--);9!==l;)l<=0&&(l=12,s--),o+=this.NEPALI_CALENDAR_DATA[s][l],l--;return 9===t?(o+=r-this.NEPALI_CALENDAR_DATA[s][0])<0&&(o+=i.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(e){var t=n.instance().fromJD(e),r=t.year(),a=t.dayOfYear(),i=r+56;this._createMissingCalendarData(i);for(var o=9,l=this.NEPALI_CALENDAR_DATA[i][0],s=this.NEPALI_CALENDAR_DATA[i][o]-l+1;a>s;)++o>12&&(o=1,i++),s+=this.NEPALI_CALENDAR_DATA[i][o];var c=this.NEPALI_CALENDAR_DATA[i][o]-(s-a);return this.newDate(i,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e-(e>=0?474:473),l=474+o(i,2820);return r+(t<=7?31*(t-1):30*(t-1)+6)+Math.floor((682*l-110)/2816)+365*(l-1)+1029983*Math.floor(i/2820)+this.jdEpoch-1},fromJD:function(e){var t=(e=Math.floor(e)+.5)-this.toJD(475,1,1),r=Math.floor(t/1029983),n=o(t,1029983),a=2820;if(1029982!==n){var i=Math.floor(n/366),l=o(n,366);a=Math.floor((2134*i+2816*l+2815)/1028522)+i+1}var s=a+2820*r+474;s=s<=0?s-1:s;var c=e-this.toJD(s,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),d=e-this.toJD(s,u,1)+1;return this.newDate(s,u,d)}}),n.calendars.persian=i,n.calendars.jalali=i},{"../main":75,"object-assign":48}],72:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);e=this._t2gYear(t.year());return i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);e=this._t2gYear(a.year());return i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=this._t2gYear(a.year());return i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{"../main":75,"object-assign":48}],73:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);e=this._t2gYear(t.year());return i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);e=this._t2gYear(a.year());return i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=this._t2gYear(a.year());return i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),n.calendars.thai=o},{"../main":75,"object-assign":48}],74:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,a=0,i=0;ir)return o[a]-o[a-1];a++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate),i=12*(a.year()-1)+a.month()-15292;return a.day()+o[i-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),l=i+1,s=a-12*i,c=t-o[r-1]+1;return this.newDate(l,s,c)},isValid:function(e,t,r){var a=n.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(e=null!=e.year?e.year:e)>=1276&&e<=1500),a},_validate:function(e,t,r,a){var i=n.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw a.replace(/\{0\}/,this.local.name);return i}}),n.calendars.ummalqura=i;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":75,"object-assign":48}],75:[function(e,t,r){var n=e("object-assign");function a(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function l(){this.shortYearCutoff="+10"}function s(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}n(a.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return(n=(null!=e&&e.year?e.calendar():"string"==typeof n?this.instance(n,a):n)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(0===i?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),n(i.prototype,{newDate:function(e,t,r){return this._calendar.newDate(null==e?this:e,t,r)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),n(l.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new i(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+o(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var n=e.toJD()+t*("w"===r?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0);a=e.day();"y"===r?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):"m"===r&&(!function(e){for(;ot-1+e.minMonth;)i++,o-=t,t=e.monthsInYear(i)}(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var l=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,l}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==t[0]&&e.year()>0==t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),a="m"===r?t:e.month(),i="d"===r?t:e.day();return"y"!==r&&"m"!==r||(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),c=a-(s>2.5?4716:4715);return c<=0&&c--,this.newDate(c,s,l)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var c=t.exports=new a;c.cdate=i,c.baseCalendar=l,c.calendars.gregorian=s},{"object-assign":48}],76:[function(e,t,r){var n=e("object-assign"),a=e("./main");n(a.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),a.local=a.regionalOptions[""],n(a.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),n(a.baseCalendar.prototype,{UNIX_EPOCH:a.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:a.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if("string"!=typeof e&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var n,i,o,l,s=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,d=r.monthNamesShort||this.local.monthNamesShort,f=r.monthNames||this.local.monthNames,h=(r.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;w+n1}),p=function(e,t,r,n){var a=""+t;if(h(e,n))for(;a.length1},x=function(e,r){var n=y(e,r),i=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+i+"}"),l=t.substring(k).match(o);if(!l)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,k);return k+=l[0].length,parseInt(l[0],10)},b=this,_=function(){if("function"==typeof s){y("m");var e=s.call(b,t.substring(k));return k+=e.length,e}return x("m")},w=function(e,r,n,i){for(var o=y(e,i)?n:r,l=0;l-1){h=1,p=g;for(var S=this.daysInMonth(f,h);p>S;S=this.daysInMonth(f,h))h++,p-=S}return d>-1?this.fromJD(d):this.newDate(f,h,p)},determineDate:function(e,t,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return t=t?t.newDate():null,e=null==e?t:"string"==typeof e?function(e){try{return i.parseDate(n,e,a)}catch(e){}for(var t=((e=e.toLowerCase()).match(/^c/)&&r?r.newDate():null)||i.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,l=o.exec(e);l;)t.add(parseInt(l[1],10),l[2]||"d"),l=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e)}})},{"./main":75,"object-assign":48}],77:[function(e,t,r){"use strict";var n=e("../annotations/attributes"),a=e("../../plot_api/edit_types").overrideAll,i=e("../../plot_api/plot_template").templatedArray;t.exports=a(i("annotation",{visible:n.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},{"../../plot_api/edit_types":253,"../../plot_api/plot_template":260,"../annotations/attributes":83}],78:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes");function i(e,t){var r=t.fullSceneLayout.domain,i=t.fullLayout._size,o={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};e._xa={},n.extendFlat(e._xa,o),a.setConvert(e._xa),e._xa._offset=i.l+r.x[0]*i.w,e._xa.l2p=function(){return.5*(1+e._pdata[0]/e._pdata[3])*i.w*(r.x[1]-r.x[0])},e._ya={},n.extendFlat(e._ya,o),a.setConvert(e._ya),e._ya._offset=i.t+(1-r.y[1])*i.h,e._ya.l2p=function(){return.5*(1-e._pdata[1]/e._pdata[3])*i.h*(r.y[1]-r.y[0])}}t.exports=function(e){for(var t=e.fullSceneLayout.annotations,r=0;r1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+l+'"]').remove():(s._pdata=a(e.glplot.cameraParams,[t.xaxis.r2l(s.x)*r[0],t.yaxis.r2l(s.y)*r[1],t.zaxis.r2l(s.z)*r[2]]),n(e.graphDiv,s,l,e.id,s._xa,s._ya))}}},{"../../plots/gl3d/project":305,"../annotations/draw":89}],81:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib");t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e("./attributes")}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),includeBasePlot:function(e,t){var r=n.subplotsRegistry.gl3d;if(!r)return;for(var i=r.attrRegex,o=Object.keys(e),l=0;l0||r.explicitOff.length>0},onClick:function(e,t){var r,l,s=o(e,t),c=s.on,u=s.off.concat(s.explicitOff),d={},f=e._fullLayout.annotations;if(!c.length&&!u.length)return;for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var Z=!1,W=["x","y"],J=0;J1)&&(ne===re?((he=ae.r2fraction(t["a"+te]))<0||he>1)&&(Z=!0):Z=!0),X=ae._offset+ae.r2p(t[te]),$=.5}else{var pe="domain"===fe;"x"===te?(K=t[te],X=pe?ae._offset+ae._length*K:X=M.l+M.w*K):(K=1-t[te],X=pe?ae._offset+ae._length*K:X=M.t+M.h*K),$=t.showarrow?.5:K}if(t.showarrow){de.head=X;var ge=t["a"+te];if(ee=oe*V(.5,t.xanchor)-le*V(.5,t.yanchor),ne===re){var me=s.getRefType(ne);"domain"===me?("y"===te&&(ge=1-ge),de.tail=ae._offset+ae._length*ge):"paper"===me?"y"===te?(ge=1-ge,de.tail=M.t+M.h*ge):de.tail=M.l+M.w*ge:de.tail=ae._offset+ae.r2p(ge),Q=ee}else de.tail=X+ge,Q=ee+ge;de.text=de.tail+ee;var ve=w["x"===te?"width":"height"];if("paper"===re&&(de.head=o.constrain(de.head,1,ve-1)),"pixel"===ne){var ye=-Math.max(de.tail-3,de.text),xe=Math.min(de.tail+3,de.text)-ve;ye>0?(de.tail+=ye,de.text+=ye):xe>0&&(de.tail-=xe,de.text-=xe)}de.tail+=ue,de.head+=ue}else Q=ee=se*V($,ce),de.text=X+ee;de.text+=ue,ee+=ue,Q+=ue,t["_"+te+"padplus"]=se/2+Q,t["_"+te+"padminus"]=se/2-Q,t["_"+te+"size"]=se,t["_"+te+"shift"]=ee}if(Z)N.remove();else{var be=0,_e=0;if("left"!==t.align&&(be=(k-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(_e=(z-_)*("middle"===t.valign?.5:1)),d)n.select("svg").attr({x:j+be-1,y:j+_e}).call(u.setClipUrl,B?D:null,e);else{var we=j+_e-g.top,Me=j+be-g.left;q.call(f.positionText,Me,we).call(u.setClipUrl,B?D:null,e)}Y.select("rect").call(u.setRect,j,j,k,z),H.call(u.setRect,F/2,F/2,E-F,U-F),N.call(u.setTranslate,Math.round(C.x.text-E/2),Math.round(C.y.text-U/2)),I.attr({transform:"rotate("+O+","+C.x.text+","+C.y.text+")"});var Te,ke=function(r,n){P.selectAll(".annotation-arrow-g").remove();var s=C.x.head,d=C.y.head,f=C.x.tail+r,h=C.y.tail+n,g=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(O,g,b),w=o.apply2DTransform(_),k=o.apply2DTransform2(_),D=+H.attr("width"),R=+H.attr("height"),z=g-.5*D,F=z+D,E=b-.5*R,j=E+R,B=[[z,E,z,j],[z,j,F,j],[F,j,F,E],[F,E,z,E]].map(k);if(!B.reduce((function(e,t){return e^!!o.segmentsIntersect(s,d,s+1e6,d+1e6,t[0],t[1],t[2],t[3])}),!1)){B.forEach((function(e){var t=o.segmentsIntersect(f,h,s,d,e[0],e[1],e[2],e[3]);t&&(f=t.x,h=t.y)}));var Y=t.arrowwidth,U=t.arrowcolor,V=t.arrowside,q=P.append("g").style({opacity:c.opacity(U)}).classed("annotation-arrow-g",!0),G=q.append("path").attr("d","M"+f+","+h+"L"+s+","+d).style("stroke-width",Y+"px").call(c.stroke,c.rgb(U));if(m(G,V,t),T.annotationPosition&&G.node().parentNode&&!i){var Z=s,W=d;if(t.standoff){var J=Math.sqrt(Math.pow(s-f,2)+Math.pow(d-h,2));Z+=t.standoff*(f-s)/J,W+=t.standoff*(h-d)/J}var X,Q,K=q.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-Z)+","+(h-W),transform:l(Z,W)}).style("stroke-width",Y+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");p.init({element:K.node(),gd:e,prepFn:function(){var e=u.getTranslate(N);X=e.x,Q=e.y,v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0)},moveFn:function(e,r){var n=w(X,Q),a=n[0]+e,i=n[1]+r;N.call(u.setTranslate,a,i),L("x",y(v,e,"x",M,t)),L("y",y(x,r,"y",M,t)),t.axref===t.xref&&L("ax",y(v,e,"ax",M,t)),t.ayref===t.yref&&L("ay",y(x,r,"ay",M,t)),q.attr("transform",l(e,r)),I.attr({transform:"rotate("+O+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",e,S());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};if(t.showarrow&&ke(0,0),R)p.init({element:N.node(),gd:e,prepFn:function(){Te=I.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?L("ax",y(v,e,"ax",M,t)):L("ax",t.ax+e),t.ayref===t.yref?L("ay",y(x,r,"ay",M.w,t)):L("ay",t.ay+r),ke(e,r);else{if(i)return;var a,o;if(v)a=y(v,e,"x",M,t);else{var s=t._xsize/M.w,c=t.x+(t._xshift-t.xshift)/M.w-s/2;a=p.align(c+e/M.w,s,0,1,t.xanchor)}if(x)o=y(x,r,"y",M,t);else{var u=t._ysize/M.h,d=t.y-(t._yshift+t.yshift)/M.h-u/2;o=p.align(d-r/M.h,u,0,1,t.yanchor)}L("x",a),L("y",o),v&&x||(n=p.getCursor(v?.5:a,x?.5:o,t.xanchor,t.yanchor))}I.attr({transform:l(e,r)+Te}),h(N,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",G(n))},doneFn:function(){h(N),a.call("_guiRelayout",e,S());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,x=t.indexOf("end")>=0,b=p.backoff*m+r.standoff,_=g.backoff*v+r.startstandoff;if("line"===h.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=o.x-u.x,M=o.y-u.y;if(f=(d=Math.atan2(M,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+M*M))return void R();if(b){if(b*b>w*w+M*M)return void R();var T=b*Math.cos(d),k=b*Math.sin(d);u.x+=T,u.y+=k,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+M*M)return void R();var A=_*Math.cos(d),L=_*Math.sin(d);o.x-=A,o.y-=L,e.attr({x1:o.x,y1:o.y})}}else if("path"===h.nodeName){var S=h.getTotalLength(),D="";if(S=0))return e;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var l=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+l+", "+n[3]+")":"rgb("+l+")"}o.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},o.rgb=function(e){return o.tinyRGB(n(e))},o.opacity=function(e){return e?n(e).getAlpha():0},o.addOpacity=function(e,t){var r=n(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"},o.combine=function(e,t){var r=n(e).toRgb();if(1===r.a)return n(e).toRgbString();var a=n(t||c).toRgb(),i=1===a.a?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},o={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.contrast=function(e,t,r){var a=n(e);return 1!==a.getAlpha()&&(a=n(o.combine(e,c))),(a.isDark()?t?a.lighten(t):c:r?a.darken(r):s).toString()},o.stroke=function(e,t){var r=n(t);e.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(e,t){var r=n(t);e.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(e){if(e&&"object"==typeof e){var t,r,n,a,l=Object.keys(e);for(t=0;t0?n>=s:n<=s));a++)n>u&&n0?n>=s:n<=s));a++)n>r[0]&&n1){var ce=Math.pow(10,Math.floor(Math.log(se)/Math.LN10));oe*=ce*c.roundUp(se/ce,[2,5,10]),(Math.abs(V.start)/V.size+1e-6)%1<2e-6&&(ae.tick0=0)}ae.dtick=oe}ae.domain=o?[re+P/N.h,re+Q-P/N.h]:[re+O/N.w,re+Q-O/N.w],ae.setScale(),e.attr("transform",u(Math.round(N.l),Math.round(N.t)));var ue,de=e.select("."+k.cbtitleunshift).attr("transform",u(-Math.round(N.l),-Math.round(N.t))),fe=ae.ticklabelposition,he=ae.title.font.size,pe=e.select("."+k.cbaxis),ge=0,me=0;function ve(n,a){var i={propContainer:ae,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:z._dfltTitle.colorbar,containerGroup:e.select("."+k.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+o+",."+o+"-math-group").remove(),g.draw(r,n,d(i,a||{}))}return c.syncOrAsync([i.previousPromises,function(){var e,t;(o&&ie||!o&&!ie)&&("top"===H&&(e=O+N.l+N.w*I,t=P+N.t+N.h*(1-re-Q)+3+.75*he),"bottom"===H&&(e=O+N.l+N.w*I,t=P+N.t+N.h*(1-re)-3-.25*he),"right"===H&&(t=P+N.t+N.h*R+3+.75*he,e=O+N.l+N.w*re),ve(ae._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ie||o&&ie){var i,s=e.select("."+k.cbtitle),d=s.select("text"),f=[-A/2,A/2],p=s.select(".h"+ae._id+"title-math-group").node(),g=15.6;if(d.node()&&(g=parseInt(d.node().style.fontSize,10)*w),p?(i=h.bBox(p),me=i.width,(ge=i.height)>g&&(f[1]-=(ge-g)/2)):d.node()&&!d.classed(k.jsPlaceholder)&&(i=h.bBox(d.node()),me=i.width,ge=i.height),o){if(ge){if(ge+=5,"top"===H)ae.domain[1]-=ge/N.h,f[1]*=-1;else{ae.domain[0]+=ge/N.h;var v=m.lineCount(d);f[1]+=(1-v)*g}s.attr("transform",u(f[0],f[1])),ae.setScale()}}else me&&("right"===H&&(ae.domain[0]+=(me+he/2)/N.w),s.attr("transform",u(f[0],f[1])),ae.setScale())}e.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",o?u(0,Math.round(N.h*(1-ae.domain[1]))):u(Math.round(N.w*ae.domain[0]),0)),pe.attr("transform",o?u(0,Math.round(-N.t)):u(Math.round(-N.l),0));var y=e.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(G);y.enter().append("rect").classed(k.cbfill,!0).style("stroke","none"),y.exit().remove();var x=B.map(ae.c2p).map(Math.round).sort((function(e,t){return e-t}));y.each((function(e,i){var l=[0===i?B[0]:(G[i]+G[i-1])/2,i===G.length-1?B[1]:(G[i]+G[i+1])/2].map(ae.c2p).map(Math.round);o&&(l[1]=c.constrain(l[1]+(l[1]>l[0])?1:-1,x[0],x[1]));var s=n.select(this).attr(o?"x":"y",K).attr(o?"y":"x",n.min(l)).attr(o?"width":"height",Math.max(W,2)).attr(o?"height":"width",Math.max(n.max(l)-n.min(l),2));if(t._fillgradient)h.gradient(s,r,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=U(e).replace("e-","");s.attr("fill",a(u).toHexString())}}));var b=e.select("."+k.cblines).selectAll("path."+k.cbline).data(E.color&&E.width?Z:[]);b.enter().append("path").classed(k.cbline,!0),b.exit().remove(),b.each((function(e){var t=K,r=Math.round(ae.c2p(e))+E.width/2%1;n.select(this).attr("d","M"+(o?t+","+r:r+","+t)+(o?"h":"v")+W).call(h.lineGroupStyle,E.width,Y(e),E.dash)})),pe.selectAll("g."+ae._id+"tick,path").remove();var _=K+W+(A||0)/2-("outside"===t.ticks?1:0),M=l.calcTicks(ae),T=l.getTickSigns(ae)[2];return l.drawTicks(r,ae,{vals:"inside"===ae.ticks?l.clipEnds(ae,M):M,layer:pe,path:l.makeTickPath(ae,_,T),transFn:l.makeTransTickFn(ae)}),l.drawLabels(r,ae,{vals:M,layer:pe,transFn:l.makeTransTickLabelFn(ae),labelFns:l.makeLabelFns(ae,_)})},function(){if(o&&!ie||!o&&ie){var e,a,i=ae.position||0,l=ae._offset+ae._length/2;if("right"===H)a=l,e=N.l+N.w*i+10+he*(ae.showticklabels?1:.5);else if(e=l,"bottom"===H&&(a=N.t+N.h*i+10+(-1===fe.indexOf("inside")?ae.tickfont.size:0)+("intside"!==ae.ticks&&t.ticklen||0)),"top"===H){var s=j.text.split("
").length;a=N.t+N.h*i+10-W-w*he*s}ve((o?"h":"v")+ae._id+"title",{avoid:{selection:n.select(r).selectAll("g."+ae._id+"tick"),side:H,offsetTop:o?0:N.t,offsetLeft:o?N.l:0,maxShift:o?z.width:z.height},attributes:{x:e,y:a,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},i.previousPromises,function(){var n,l=W+A/2;-1===fe.indexOf("inside")&&(n=h.bBox(pe.node()),l+=o?n.width:n.height),ue=de.select("text");var c=0,d=o&&"top"===H,g=!o&&"right"===H,m=0;if(ue.node()&&!ue.classed(k.jsPlaceholder)){var y,x=de.select(".h"+ae._id+"title-math-group").node();x&&(o&&ie||!o&&!ie)?(c=(n=h.bBox(x)).width,y=n.height):(c=(n=h.bBox(de.node())).right-N.l-(o?K:ne),y=n.bottom-N.t-(o?ne:K),o||"top"!==H||(l+=n.height,m=n.height)),g&&(ue.attr("transform",u(c/2+he/2,0)),c*=2),l=Math.max(l,o?c:y)}var b=2*(o?O:P)+l+L+A/2,w=0;!o&&j.text&&"bottom"===C&&R<=0&&(b+=w=b/2,m+=w),z._hColorbarMoveTitle=w,z._hColorbarMoveCBTitle=m;var F=L+A;e.select("."+k.cbbg).attr("x",(o?K:ne)-F/2-(o?O:0)).attr("y",(o?ne:K)-(o?X:P+m-w)).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max(X+F,2)).call(p.fill,S).call(p.stroke,t.bordercolor).style("stroke-width",L);var E=g?Math.max(c-10,0):0;if(e.selectAll("."+k.cboutline).attr("x",(o?K:ne+O)+E).attr("y",(o?ne+P-X:K)+(d?ge:0)).attr(o?"width":"height",Math.max(W,2)).attr(o?"height":"width",Math.max(X-(o?2*P+ge:2*O+E),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":A}),e.attr("transform",u(N.l-(o?$*b:0),N.t-(o?0:(1-ee)*b-m))),!o&&(L||a(S).getAlpha()&&!a.equals(z.paper_bgcolor,S))){var B=pe.selectAll("text"),Y=B[0].length,U=e.select("."+k.cbbg).node(),V=h.bBox(U),q=h.getTranslate(e);B.each((function(e,t){var r=Y-1;if(0===t||t===r){var n,a=h.bBox(this),i=h.getTranslate(this);if(t===r){var o=a.right+i.x;(n=V.right+q.x+ne-L-2+I-o)>0&&(n=0)}else if(0===t){var l=a.left+i.x;(n=V.left+q.x+ne+L+2-l)<0&&(n=0)}n&&(Y<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var G={},Z=M[D],J=T[D],Q=M[C],te=T[C],re=b-W;o?("pixels"===f?(G.y=R,G.t=X*Q,G.b=X*te):(G.t=G.b=0,G.yt=R+s*Q,G.yb=R-s*te),"pixels"===_?(G.x=I,G.l=b*Z,G.r=b*J):(G.l=re*Z,G.r=re*J,G.xl=I-v*Z,G.xr=I+v*J)):("pixels"===f?(G.x=I,G.l=X*Z,G.r=X*J):(G.l=G.r=0,G.xl=I+s*Z,G.xr=I-s*J),"pixels"===_?(G.y=1-R,G.t=b*Q,G.b=b*te):(G.t=re*Q,G.b=re*te,G.yt=R-v*Q,G.yb=R+v*te)),i.autoMargin(r,t._id,G)}],r)}(r,t,e);v&&v.then&&(e._promises||[]).push(v),e._context.edits.colorbarPosition&&function(e,t,r){var n,a,i,l="v"===t.orientation,c=r._fullLayout._size;s.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),f(e)},moveFn:function(r,o){e.attr("transform",n+u(r,o)),a=s.align((l?t._uFrac:t._vFrac)+r/c.w,l?t._thickFrac:t._lenFrac,0,1,t.xanchor),i=s.align((l?t._vFrac:1-t._uFrac)-o/c.h,l?t._lenFrac:t._thickFrac,0,1,t.yanchor);var d=s.getCursor(a,i,t.xanchor,t.yanchor);f(e,d)},doneFn:function(){if(f(e),void 0!==a&&void 0!==i){var n={};n[t._propPrefix+"x"]=a,n[t._propPrefix+"y"]=i,void 0!==t._traceIndex?o.call("_guiRestyle",r,n,t._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,t,e)})),t.exit().each((function(t){i.autoMargin(e,t._id)})).remove(),t.order()}}},{"../../constants/alignment":200,"../../lib":224,"../../lib/extend":218,"../../lib/setcursor":244,"../../lib/svg_text_utils":247,"../../plots/cartesian/axes":271,"../../plots/cartesian/axis_defaults":273,"../../plots/cartesian/layout_attributes":286,"../../plots/cartesian/position_defaults":289,"../../plots/plots":308,"../../registry":310,"../color":95,"../colorscale/helpers":106,"../dragelement":114,"../drawing":117,"../titles":193,"./constants":97,"@plotly/d3":5,tinycolor2:60}],100:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e){return n.isPlainObject(e.colorbar)}},{"../../lib":224}],101:[function(e,t,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:e("./attributes"),supplyDefaults:e("./defaults"),draw:e("./draw").draw,hasColorbar:e("./has_colorbar")}},{"./attributes":96,"./defaults":98,"./draw":99,"./has_colorbar":100}],102:[function(e,t,r){"use strict";var n=e("../colorbar/attributes"),a=e("../../lib/regex").counter,i=e("../../lib/sort_object_keys"),o=e("./scales.js").scales;i(o);function l(e){return"`"+e+"`"}t.exports=function(e,t){e=e||"";var r,i=(t=t||{}).cLetter||"c",s=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),c="showScaleDflt"in t?t.showScaleDflt:"z"===i,u="string"==typeof t.colorscaleDflt?o[t.colorscaleDflt]:null,d=t.editTypeOverride||"",f=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,t.colorAttr):l(f+(r={z:"z",c:"color"}[i]));var h=i+"auto",p=i+"min",g=i+"max",m=i+"mid",v=(l(f+h),l(f+p),l(f+g),{});v[p]=v[g]=void 0;var y={};y[h]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:d||"style"},t.anim&&(x.color.anim=!0)),x[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},x[p]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},x[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},s||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=n),t.noColorAxis||(x.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),x}},{"../../lib/regex":240,"../../lib/sort_object_keys":245,"../colorbar/attributes":96,"./scales.js":110}],103:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("./helpers").extractOpts;t.exports=function(e,t,r){var o,l=e._fullLayout,s=r.vals,c=r.containerStr,u=c?a.nestedProperty(t,c).get():t,d=i(u),f=!1!==d.auto,h=d.min,p=d.max,g=d.mid,m=function(){return a.aggNums(Math.min,null,s)},v=function(){return a.aggNums(Math.max,null,s)};(void 0===h?h=m():f&&(h=u._colorAx&&n(h)?Math.min(h,m()):m()),void 0===p?p=v():f&&(p=u._colorAx&&n(p)?Math.max(p,v()):v()),f&&void 0!==g&&(p-g>g-h?h=g-(p-g):p-g=0?l.colorscale.sequential:l.colorscale.sequentialminus,d._sync("colorscale",o))}},{"../../lib":224,"./helpers":106,"fast-isnumeric":10}],104:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./helpers").hasColorscale,i=e("./helpers").extractOpts;t.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function o(e,a){var o=a.container?n.nestedProperty(e,a.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var l=i(o),s=l.auto;(s||void 0===l.min)&&r(o,a.min),(s||void 0===l.max)&&r(o,a.max),l.autocolorscale&&r(o,"colorscale")}}for(var l=0;l=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function p(e,t){t=t||{};for(var r=e.domain,o=e.range,s=o.length,c=new Array(s),u=0;u4/3-l?o:l}},{}],112:[function(e,t,r){"use strict";var n=e("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,r,i){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===i?0:"middle"===i?1:"top"===i?2:n.constrain(Math.floor(3*t),0,2),a[t][e]}},{"../../lib":224}],113:[function(e,t,r){"use strict";r.selectMode=function(e){return"lasso"===e||"select"===e},r.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},r.openMode=function(e){return"drawline"===e||"drawopenpath"===e},r.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},r.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},r.selectingOrDrawing=function(e){return r.freeMode(e)||r.rectMode(e)}},{}],114:[function(e,t,r){"use strict";var n=e("mouse-event-offset"),a=e("has-hover"),i=e("has-passive-events"),o=e("../../lib").removeElement,l=e("../../plots/cartesian/constants"),s=t.exports={};s.align=e("./align"),s.getCursor=e("./cursor");var c=e("./unhover");function u(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function d(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=c.wrapped,s.unhoverRaw=c.raw,s.init=function(e){var t,r,n,c,f,h,p,g,m=e.gd,v=1,y=m._context.doubleClickDelay,x=e.element;m._mouseDownTime||(m._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,i?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=e.clampFn||function(e,t,r){return Math.abs(e)y&&(v=Math.max(v-1,1)),m._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(v,h),!g){var r;try{r=new MouseEvent("click",t)}catch(e){var n=d(t);(r=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,n[0],n[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}p.dispatchEvent(r)}m._dragging=!1,m._dragged=!1}else m._dragged=!1}},s.coverSlip=u},{"../../lib":224,"../../plots/cartesian/constants":278,"./align":111,"./cursor":112,"./unhover":115,"has-hover":41,"has-passive-events":42,"mouse-event-offset":46}],115:[function(e,t,r){"use strict";var n=e("../../lib/events"),a=e("../../lib/throttle"),i=e("../../lib/dom").getGraphDiv,o=e("../fx/constants"),l=t.exports={};l.wrapped=function(e,t,r){(e=i(e))._fullLayout&&a.clear(e._fullLayout._uid+o.HOVERID),l.raw(e,t,r)},l.raw=function(e,t){var r=e._fullLayout,a=e._hoverdata;t||(t={}),t.target&&!e._dragged&&!1===n.triggerHandler(e,"plotly_beforehover",t)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&a&&e.emit("plotly_unhover",{event:t,points:a}))}},{"../../lib/dom":216,"../../lib/events":217,"../../lib/throttle":248,"../fx/constants":129}],116:[function(e,t,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},r.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},{}],117:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../lib"),i=a.numberFormat,o=e("fast-isnumeric"),l=e("tinycolor2"),s=e("../../registry"),c=e("../color"),u=e("../colorscale"),d=a.strTranslate,f=e("../../lib/svg_text_utils"),h=e("../../constants/xmlns_namespaces"),p=e("../../constants/alignment").LINE_SPACING,g=e("../../constants/interactions").DESELECTDIM,m=e("../../traces/scatter/subtypes"),v=e("../../traces/scatter/make_bubble_size_func"),y=e("../../components/fx/helpers").appendArrayPointValue,x=t.exports={};x.font=function(e,t,r,n){a.isPlainObject(t)&&(n=t.color,r=t.size,t=t.family),t&&e.style("font-family",t),r+1&&e.style("font-size",r+"px"),n&&e.call(c.fill,n)},x.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)},x.setSize=function(e,t,r){e.attr("width",t).attr("height",r)},x.setRect=function(e,t,r,n,a){e.call(x.setPosition,t,r).call(x.setSize,n,a)},x.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),i=n.c2p(e.y);return!!(o(a)&&o(i)&&t.node())&&("text"===t.node().nodeName?t.attr("x",a).attr("y",i):t.attr("transform",d(a,i)),!0)},x.translatePoints=function(e,t,r){e.each((function(e){var a=n.select(this);x.translatePoint(e,a,t,r)}))},x.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,a=t.yaxis;e.each((function(t){var i=t[0].trace,o=i.xcalendar,l=i.ycalendar,c=s.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(c).each((function(e){x.hideOutsideRangePoint(e,n.select(this),r,a,o,l)}))}))}},x.crispRound=function(e,t,r){return t&&o(t)?e._context.staticPlot?t:t<1?1:Math.round(t):r||0},x.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";c.stroke(t,n||i.color),x.dashLine(t,l,o)},x.lineGroupStyle=function(e,t,r,a){e.style("fill","none").each((function(e){var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";n.select(this).call(c.stroke,r||i.color).call(x.dashLine,l,o)}))},x.dashLine=function(e,t,r){r=+r||0,t=x.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})},x.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e},x.singleFillStyle=function(e){var t=(((n.select(e.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;t&&e.call(c.fill,t)},x.fillGroupStyle=function(e){e.style("stroke-width",0).each((function(e){var t=n.select(this);e[0].trace&&t.call(c.fill,e[0].trace.fillcolor)}))};var b=e("./symbol_defs");x.symbolNames=[],x.symbolFuncs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(b).forEach((function(e){var t=b[e],r=t.n;x.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),x.symbolNames[r]=e,x.symbolFuncs[r]=t.f,t.needLine&&(x.symbolNeedLines[r]=!0),t.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(x.symbolNoFill[r]=!0)}));var _=x.symbolNames.length;function w(e,t){var r=e%100;return x.symbolFuncs[r](t)+(e>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(e){if(o(e))e=+e;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=x.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=_||e>=400?0:Math.floor(Math.max(e,0))};var M={x1:1,x2:0,y1:0,y2:0},T={x1:0,x2:0,y1:1,y2:0},k=i("~f"),A={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:M},horizontalreversed:{node:"linearGradient",attrs:M,reversed:!0},vertical:{node:"linearGradient",attrs:T},verticalreversed:{node:"linearGradient",attrs:T,reversed:!0}};x.gradient=function(e,t,r,i,o,s){for(var u=o.length,d=A[i],f=new Array(u),h=0;h"+v(e);p._gradientUrlQueryParts[y]=1},x.pattern=function(e,t,r,i,o,l,s,u,d,f,h,p){var g="legend"===t;u&&("overlay"===d?(f=u,h=c.contrast(f)):(f=void 0,h=u));var m,v,y,x,b,_,w,M,T,k,A,L=r._fullLayout,S="p"+L._uid+"-"+i,D={};switch(o){case"/":m=l*Math.sqrt(2),v=l*Math.sqrt(2),_="path",D={d:y="M-"+m/4+","+v/4+"l"+m/2+",-"+v/2+"M0,"+v+"L"+m+",0M"+m/4*3+","+v/4*5+"l"+m/2+",-"+v/2,opacity:p,stroke:h,"stroke-width":(x=s*l)+"px"};break;case"\\":m=l*Math.sqrt(2),v=l*Math.sqrt(2),_="path",D={d:y="M"+m/4*3+",-"+v/4+"l"+m/2+","+v/2+"M0,0L"+m+","+v+"M-"+m/4+","+v/4*3+"l"+m/2+","+v/2,opacity:p,stroke:h,"stroke-width":(x=s*l)+"px"};break;case"x":m=l*Math.sqrt(2),v=l*Math.sqrt(2),y="M-"+m/4+","+v/4+"l"+m/2+",-"+v/2+"M0,"+v+"L"+m+",0M"+m/4*3+","+v/4*5+"l"+m/2+",-"+v/2+"M"+m/4*3+",-"+v/4+"l"+m/2+","+v/2+"M0,0L"+m+","+v+"M-"+m/4+","+v/4*3+"l"+m/2+","+v/2,x=l-l*Math.sqrt(1-s),_="path",D={d:y,opacity:p,stroke:h,"stroke-width":x+"px"};break;case"|":_="path",_="path",D={d:y="M"+(m=l)/2+",0L"+m/2+","+(v=l),opacity:p,stroke:h,"stroke-width":(x=s*l)+"px"};break;case"-":_="path",_="path",D={d:y="M0,"+(v=l)/2+"L"+(m=l)+","+v/2,opacity:p,stroke:h,"stroke-width":(x=s*l)+"px"};break;case"+":_="path",y="M"+(m=l)/2+",0L"+m/2+","+(v=l)+"M0,"+v/2+"L"+m+","+v/2,x=l-l*Math.sqrt(1-s),_="path",D={d:y,opacity:p,stroke:h,"stroke-width":x+"px"};break;case".":m=l,v=l,s.pattern_filled";L._patternUrlQueryParts[P]=1},x.initGradients=function(e){var t=e._fullLayout;a.ensureSingle(t._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),t._gradientUrlQueryParts={}},x.initPatterns=function(e){var t=e._fullLayout;a.ensureSingle(t._defs,"g","patterns").selectAll("pattern").remove(),t._patternUrlQueryParts={}},x.getPatternAttr=function(e,t,r){return e&&a.isArrayOrTypedArray(e)?t=100,t.attr("d",w(u,s))}var d,f,h,p=!1;if(e.so)h=l.outlierwidth,f=l.outliercolor,d=o.outliercolor;else{var g=(l||{}).width;h=(e.mlw+1||g+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,f="mlc"in e?e.mlcc=n.lineScale(e.mlc):a.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,a.isArrayOrTypedArray(o.color)&&(d=c.defaultLine,p=!0),d="mc"in e?e.mcc=n.markerScale(e.mc):o.color||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(e))}if(e.om)t.call(c.stroke,d).style({"stroke-width":(h||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:h)+"px");var m=o.gradient,v=e.mgt;v?p=!0:v=m&&m.type,a.isArrayOrTypedArray(v)&&(v=v[0],A[v]||(v=0));var y=o.pattern,b=y&&x.getPatternAttr(y.shape,e.i,"");if(v&&"none"!==v){var _=e.mgc;_?p=!0:_=m.color;var M=r.uid;p&&(M+="-"+e.i),x.gradient(t,i,M,v,[[0,_],[1,d]],"fill")}else if(b){var T=x.getPatternAttr(y.bgcolor,e.i,null),k=x.getPatternAttr(y.fgcolor,e.i,null),L=y.fgopacity,S=x.getPatternAttr(y.size,e.i,8),D=x.getPatternAttr(y.solidity,e.i,.3),C=e.mcc||a.isArrayOrTypedArray(y.shape)||a.isArrayOrTypedArray(y.bgcolor)||a.isArrayOrTypedArray(y.size)||a.isArrayOrTypedArray(y.solidity),O=r.uid;C&&(O+="-"+e.i),x.pattern(t,"point",i,O,b,S,D,e.mcc,y.fillmode,T,k,L)}else c.fill(t,d);h&&c.stroke(t,f)}},x.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=x.tryColorscale(r,""),t.lineScale=x.tryColorscale(r,"line"),s.traceIs(e,"symbols")&&(t.ms2mrc=m.isBubble(e)?v(e):function(){return(r.size||6)/2}),e.selectedpoints&&a.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},o=r.marker||{},l=n.marker||{},c=i.opacity,u=o.opacity,d=l.opacity,f=void 0!==u,h=void 0!==d;(a.isArrayOrTypedArray(c)||f||h)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?i.opacity:e.mo;return e.selected?f?u:t:h?d:g*t});var p=i.color,m=o.color,v=l.color;(m||v)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?m||t:v||t});var y=i.size,x=o.size,b=l.size,_=void 0!==x,w=void 0!==b;return s.traceIs(e,"symbols")&&(_||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?_?x/2:t:w?b/2:t}),t},x.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,s=i.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||l;return e.selected?s||t:u||(s?t:c.addOpacity(t,g))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedPointStyleFns(t),a=t.marker||{},i=[];r.selectedOpacityFn&&i.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&i.push((function(e,t){c.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&i.push((function(e,t){var n=t.mx||a.symbol||0,i=r.selectedSizeFn(t);e.attr("d",w(x.symbolNumber(n),i)),t.mrc2=i})),i.length&&e.each((function(e){for(var t=n.select(this),r=0;r0?r:0}x.textPointStyle=function(e,t,r){if(e.size()){var i;if(t.selectedpoints){var o=x.makeSelectedTextStyleFns(t);i=o.selectedTextColorFn}var l=t.texttemplate,s=r._fullLayout;e.each((function(e){var o=n.select(this),c=l?a.extractOption(e,t,"txt","texttemplate"):a.extractOption(e,t,"tx","text");if(c||0===c){if(l){var u=t._module.formatLabels,d=u?u(e,t,s):{},h={};y(h,t,e.i);var p=t._meta||{};c=a.texttemplateString(c,d,s._d3locale,h,e,p)}var g=e.tp||t.textposition,m=D(e,t),v=i?i(e):e.tc||t.textfont.color;o.call(x.font,e.tf||t.textfont.family,m,v).text(c).call(f.convertToTspans,r).call(S,g,m,e.mrc)}else o.remove()}))}},x.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedTextStyleFns(t);e.each((function(e){var a=n.select(this),i=r.selectedTextColorFn(e),o=e.tp||t.textposition,l=D(e,t);c.fill(a,i);var u=s.traceIs(t,"bar-like");S(a,o,l,e.mrc2||e.mrc,u)}))}};function C(e,t,r,a){var i=e[0]-t[0],o=e[1]-t[1],l=r[0]-t[0],s=r[1]-t[1],c=Math.pow(i*i+o*o,.25),u=Math.pow(l*l+s*s,.25),d=(u*u*i-c*c*l)*a,f=(u*u*o-c*c*s)*a,h=3*u*(c+u),p=3*c*(c+u);return[[n.round(t[0]+(h&&d/h),2),n.round(t[1]+(h&&f/h),2)],[n.round(t[0]-(p&&d/p),2),n.round(t[1]-(p&&f/p),2)]]}x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],a=[];for(r=1;r=1e4&&(x.savedBBoxes={},I=0),r&&(x.savedBBoxes[r]=m),I++,a.extendFlat({},m)},x.setClipUrl=function(e,t,r){e.attr("clip-path",z(t,r))},x.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},x.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=d(t,r)).trim(),e[a]("transform",i),i},x.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},x.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+="scale("+t+","+r+")").trim(),e[a]("transform",i),i};var N=/\s*sc.*/;x.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(N,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var F=/translate\([^)]*\)\s*$/;x.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,a=n.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(a.attr("transform")||"").match(F);e=1===t&&1===r?[]:[d(o,l),"scale("+t+","+r+")",d(-o,-l)],s&&e.push(s),a.attr("transform",e.join(""))}}))}},{"../../components/fx/helpers":131,"../../constants/alignment":200,"../../constants/interactions":203,"../../constants/xmlns_namespaces":205,"../../lib":224,"../../lib/svg_text_utils":247,"../../registry":310,"../../traces/scatter/make_bubble_size_func":339,"../../traces/scatter/subtypes":347,"../color":95,"../colorscale":107,"./symbol_defs":118,"@plotly/d3":5,"fast-isnumeric":10,tinycolor2:60}],118:[function(e,t,r){"use strict";var n=e("@plotly/d3");t.exports={circle:{n:0,f:function(e){var t=n.round(e,2);return"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"}},square:{n:1,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"}},diamond:{n:2,f:function(e){var t=n.round(1.3*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"Z"}},cross:{n:3,f:function(e){var t=n.round(.4*e,2),r=n.round(1.2*e,2);return"M"+r+","+t+"H"+t+"V"+r+"H-"+t+"V"+t+"H-"+r+"V-"+t+"H-"+t+"V-"+r+"H"+t+"V-"+t+"H"+r+"Z"}},x:{n:4,f:function(e){var t=n.round(.8*e/Math.sqrt(2),2),r="l"+t+","+t,a="l"+t+",-"+t,i="l-"+t+",-"+t,o="l-"+t+","+t;return"M0,"+t+r+a+i+a+i+o+i+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+t+","+n.round(e/2,2)+"H"+t+"L0,-"+n.round(e,2)+"Z"}},"triangle-down":{n:6,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+t+",-"+n.round(e/2,2)+"H"+t+"L0,"+n.round(e,2)+"Z"}},"triangle-left":{n:7,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M"+n.round(e/2,2)+",-"+t+"V"+t+"L-"+n.round(e,2)+",0Z"}},"triangle-right":{n:8,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+n.round(e/2,2)+",-"+t+"V"+t+"L"+n.round(e,2)+",0Z"}},"triangle-ne":{n:9,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M-"+r+",-"+t+"H"+t+"V"+r+"Z"}},"triangle-se":{n:10,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M"+t+",-"+r+"V"+t+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M"+r+","+t+"H-"+t+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M-"+t+","+r+"V-"+t+"H"+r+"Z"}},pentagon:{n:13,f:function(e){var t=n.round(.951*e,2),r=n.round(.588*e,2),a=n.round(-e,2),i=n.round(-.309*e,2);return"M"+t+","+i+"L"+r+","+n.round(.809*e,2)+"H-"+r+"L-"+t+","+i+"L0,"+a+"Z"}},hexagon:{n:14,f:function(e){var t=n.round(e,2),r=n.round(e/2,2),a=n.round(e*Math.sqrt(3)/2,2);return"M"+a+",-"+r+"V"+r+"L0,"+t+"L-"+a+","+r+"V-"+r+"L0,-"+t+"Z"}},hexagon2:{n:15,f:function(e){var t=n.round(e,2),r=n.round(e/2,2),a=n.round(e*Math.sqrt(3)/2,2);return"M-"+r+","+a+"H"+r+"L"+t+",0L"+r+",-"+a+"H-"+r+"L-"+t+",0Z"}},octagon:{n:16,f:function(e){var t=n.round(.924*e,2),r=n.round(.383*e,2);return"M-"+r+",-"+t+"H"+r+"L"+t+",-"+r+"V"+r+"L"+r+","+t+"H-"+r+"L-"+t+","+r+"V-"+r+"Z"}},star:{n:17,f:function(e){var t=1.4*e,r=n.round(.225*t,2),a=n.round(.951*t,2),i=n.round(.363*t,2),o=n.round(.588*t,2),l=n.round(-t,2),s=n.round(-.309*t,2),c=n.round(.118*t,2),u=n.round(.809*t,2);return"M"+r+","+s+"H"+a+"L"+i+","+c+"L"+o+","+u+"L0,"+n.round(.382*t,2)+"L-"+o+","+u+"L-"+i+","+c+"L-"+a+","+s+"H-"+r+"L0,"+l+"Z"}},hexagram:{n:18,f:function(e){var t=n.round(.66*e,2),r=n.round(.38*e,2),a=n.round(.76*e,2);return"M-"+a+",0l-"+r+",-"+t+"h"+a+"l"+r+",-"+t+"l"+r+","+t+"h"+a+"l-"+r+","+t+"l"+r+","+t+"h-"+a+"l-"+r+","+t+"l-"+r+",-"+t+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(e){var t=n.round(e*Math.sqrt(3)*.8,2),r=n.round(.8*e,2),a=n.round(1.6*e,2),i=n.round(4*e,2),o="A "+i+","+i+" 0 0 1 ";return"M-"+t+","+r+o+t+","+r+o+"0,-"+a+o+"-"+t+","+r+"Z"}},"star-triangle-down":{n:20,f:function(e){var t=n.round(e*Math.sqrt(3)*.8,2),r=n.round(.8*e,2),a=n.round(1.6*e,2),i=n.round(4*e,2),o="A "+i+","+i+" 0 0 1 ";return"M"+t+",-"+r+o+"-"+t+",-"+r+o+"0,"+a+o+t+",-"+r+"Z"}},"star-square":{n:21,f:function(e){var t=n.round(1.1*e,2),r=n.round(2*e,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+t+",-"+t+a+"-"+t+","+t+a+t+","+t+a+t+",-"+t+a+"-"+t+",-"+t+"Z"}},"star-diamond":{n:22,f:function(e){var t=n.round(1.4*e,2),r=n.round(1.9*e,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+t+",0"+a+"0,"+t+a+t+",0"+a+"0,-"+t+a+"-"+t+",0Z"}},"diamond-tall":{n:23,f:function(e){var t=n.round(.7*e,2),r=n.round(1.4*e,2);return"M0,"+r+"L"+t+",0L0,-"+r+"L-"+t+",0Z"}},"diamond-wide":{n:24,f:function(e){var t=n.round(1.4*e,2),r=n.round(.7*e,2);return"M0,"+r+"L"+t+",0L0,-"+r+"L-"+t+",0Z"}},hourglass:{n:25,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"H-"+t+"L"+t+",-"+t+"H-"+t+"Z"},noDot:!0},bowtie:{n:26,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"V-"+t+"L-"+t+","+t+"V-"+t+"Z"},noDot:!0},"circle-cross":{n:27,f:function(e){var t=n.round(e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e){var t=n.round(e,2),r=n.round(e/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e){var t=n.round(e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t+"M"+t+",-"+t+"L-"+t+","+t+"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e){var t=n.round(1.3*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"ZM0,-"+t+"V"+t+"M-"+t+",0H"+t},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e){var t=n.round(1.3*e,2),r=n.round(.65*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e){var t=n.round(1.4*e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t+"M"+t+",-"+t+"L-"+t+","+t},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e){var t=n.round(1.2*e,2),r=n.round(.85*e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e){var t=n.round(e/2,2),r=n.round(e,2);return"M"+t+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+t+"H-"+r+"m0,-"+r+"H"+r},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+t+","+a+"L0,0M"+t+","+a+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+t+",-"+a+"L0,0M"+t+",-"+a+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M"+a+","+t+"L0,0M"+a+",-"+t+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+a+","+t+"L0,0M-"+a+",-"+t+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e){var t=n.round(1.4*e,2);return"M"+t+",0H-"+t},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e){var t=n.round(1.4*e,2);return"M0,"+t+"V-"+t},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e){var t=n.round(e,2);return"M"+t+",-"+t+"L-"+t+","+t},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e){var t=n.round(e,2);return"M0,0L-"+t+","+n.round(2*e,2)+"H"+t+"Z"},noDot:!0},"arrow-down":{n:46,f:function(e){var t=n.round(e,2);return"M0,0L-"+t+",-"+n.round(2*e,2)+"H"+t+"Z"},noDot:!0},"arrow-left":{n:47,f:function(e){var t=n.round(2*e,2),r=n.round(e,2);return"M0,0L"+t+",-"+r+"V"+r+"Z"},noDot:!0},"arrow-right":{n:48,f:function(e){var t=n.round(2*e,2),r=n.round(e,2);return"M0,0L-"+t+",-"+r+"V"+r+"Z"},noDot:!0},"arrow-bar-up":{n:49,f:function(e){var t=n.round(e,2);return"M-"+t+",0H"+t+"M0,0L-"+t+","+n.round(2*e,2)+"H"+t+"Z"},needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e){var t=n.round(e,2);return"M-"+t+",0H"+t+"M0,0L-"+t+",-"+n.round(2*e,2)+"H"+t+"Z"},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e){var t=n.round(2*e,2),r=n.round(e,2);return"M0,-"+r+"V"+r+"M0,0L"+t+",-"+r+"V"+r+"Z"},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e){var t=n.round(2*e,2),r=n.round(e,2);return"M0,-"+r+"V"+r+"M0,0L-"+t+",-"+r+"V"+r+"Z"},needLine:!0,noDot:!0}}},{"@plotly/d3":5}],119:[function(e,t,r){"use strict";t.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},{}],120:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../registry"),i=e("../../plots/cartesian/axes"),o=e("../../lib"),l=e("./compute_error");function s(e,t,r,a){var s=t["error_"+a]||{},c=[];if(s.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=l(s),d=0;d0;t.each((function(t){var d,f=t[0].trace,h=f.error_x||{},p=f.error_y||{};f.ids&&(d=function(e){return e.id});var g=o.hasMarkers(f)&&f.marker.maxdisplayed>0;p.visible||h.visible||(t=[]);var m=n.select(this).selectAll("g.errorbar").data(t,d);if(m.exit().remove(),t.length){h.visible||m.selectAll("path.xerror").remove(),p.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var v=m.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(l.duration).style("opacity",1),i.setClipUrl(m,r.layerClipId,e),m.each((function(e){var t=n.select(this),r=function(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};void 0!==e.yh&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),a(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0)));void 0!==e.xh&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),a(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0)));return n}(e,s,c);if(!g||e.vis){var i,o=t.select("path.yerror");if(p.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var d=p.width;i="M"+(r.x-d)+","+r.yh+"h"+2*d+"m-"+d+",0V"+r.ys,r.noYS||(i+="m-"+d+",0h"+2*d),!o.size()?o=t.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0):u&&(o=o.transition().duration(l.duration).ease(l.easing)),o.attr("d",i)}else o.remove();var f=t.select("path.xerror");if(h.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var m=(h.copy_ystyle?p:h).width;i="M"+r.xh+","+(r.y-m)+"v"+2*m+"m0,-"+m+"H"+r.xs,r.noXS||(i+="m0,-"+m+"v"+2*m),!f.size()?f=t.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):u&&(f=f.transition().duration(l.duration).ease(l.easing)),f.attr("d",i)}else f.remove()}}))}}))}},{"../../traces/scatter/subtypes":347,"../drawing":117,"@plotly/d3":5,"fast-isnumeric":10}],125:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../color");t.exports=function(e){e.each((function(e){var t=e[0].trace,r=t.error_y||{},i=t.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),i.copy_ystyle&&(i=r),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)}))}},{"../color":95,"@plotly/d3":5}],126:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("./layout_attributes").hoverlabel,i=e("../../lib/extend").extendFlat;t.exports={hoverlabel:{bgcolor:i({},a.bgcolor,{arrayOk:!0}),bordercolor:i({},a.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:i({},a.align,{arrayOk:!0}),namelength:i({},a.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":218,"../../plots/font_attributes":302,"./layout_attributes":136}],127:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry");function i(e,t,r,a){a=a||n.identity,Array.isArray(e)&&(t[0][r]=a(e))}t.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(e){return function(t){return n.coerceHoverinfo({hoverinfo:t},{_module:e._module},r)}}for(var l=0;l=0&&r.index_[0]._length||oe<0||oe>w[0]._length)return p.unhoverRaw(e,t)}if(t.pointerX=ie+_[0]._offset,t.pointerY=oe+w[0]._offset,Y="xval"in t?v.flat(s,t.xval):v.p2c(_,ie),U="yval"in t?v.flat(s,t.yval):v.p2c(w,oe),!a(Y[0])||!a(U[0]))return o.warn("Fx.hover failed",t,e),p.unhoverRaw(e,t)}var ce=1/0;function ue(e,r){for(q=0;qee&&(te.splice(0,ee),ce=te[0].distance),y&&0!==E&&0===te.length){$.distance=E,$.index=!1;var d=Z._module.hoverPoints($,Q,K,"closest",{hoverLayer:u._hoverlayer});if(d&&(d=d.filter((function(e){return e.spikeDistance<=E}))),d&&d.length){var f,p=d.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(p.length){var g=p[0];a(g.x0)&&a(g.y0)&&(f=fe(g),(!ne.vLinePoint||ne.vLinePoint.spikeDistance>f.spikeDistance)&&(ne.vLinePoint=f))}var m=d.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(m.length){var x=m[0];a(x.x0)&&a(x.y0)&&(f=fe(x),(!ne.hLinePoint||ne.hLinePoint.spikeDistance>f.spikeDistance)&&(ne.hLinePoint=f))}}}}}function de(e,t,r){for(var n,a=null,i=1/0,o=0;o0&&Math.abs(e.distance)Me-1;Ae--)Ce(te[Ae]);te=Le,me()}var Oe=e._hoverdata,Pe=[],Ie=H(e),Re=B(e);for(V=0;V1||te.length>1)||"closest"===O&&ae&&te.length>1,Ze=h.combine(u.plot_bgcolor||h.background,u.paper_bgcolor),We=P(te,{gd:e,hovermode:O,rotateLabels:Ge,bgColor:Ze,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});v.isUnifiedHover(O)||(!function(e,t,r){var n,a,i,o,l,s,c,u=0,d=1,f=e.size(),h=new Array(f),p=0;function g(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,i=r.pos+r.dp+r.size-t.pmax,a>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=a;n=!1}if(!(i<.01)){if(a<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=i;n=!1}if(n){var c=0;for(o=0;ot.pmax&&c++;for(o=e.length-1;o>=0&&!(c<=0);o--)(s=e[o]).pos>t.pmax-1&&(s.del=!0,c--);for(o=0;o=0;l--)e[l].dp-=i;for(o=e.length-1;o>=0&&!(c<=0);o--)(s=e[o]).pos+s.dp+s.size>t.pmax&&(s.del=!0,c--)}}}e.each((function(e){var n=e[t],a="x"===n._id.charAt(0),i=n.range;0===p&&i&&i[0]>i[1]!==a&&(d=-1),h[p++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?M:1)/2,pmin:0,pmax:a?r.width:r.height}]})),h.sort((function(e,t){return e[0].posref-t[0].posref||d*(t[0].traceIndex-e[0].traceIndex)}));for(;!n&&u<=f;){for(u++,n=!0,o=0;o.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(l=v.length-1;l>=0;l--)v[l].dp+=a;for(m.push.apply(m,v),h.splice(o+1,1),c=0,l=m.length-1;l>=0;l--)c+=m[l].dp;for(i=c/m.length,l=m.length-1;l>=0;l--)m[l].dp-=i;n=!1}else o++}h.forEach(g)}for(o=h.length-1;o>=0;o--){var b=h[o];for(l=b.length-1;l>=0;l--){var _=b[l],w=_.datum;w.offset=_.dp,w.del=_.del}}}(We,Ge?"xa":"ya",u),R(We,Ge,u._invScaleX,u._invScaleY));if(l&&l.tagName){var Je=m.getComponentMethod("annotations","hasClickToShow")(e,Pe);d(n.select(l),Je?"pointer":"")}if(!l||i||!function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(e,0,Oe))return;Oe&&e.emit("plotly_unhover",{event:t,points:Oe});e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:_,yaxes:w,xvals:Y,yvals:U})}(e,t,r,i,l)}))},r.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var a=t.gd,i=H(a),o=B(a),l=P(e.map((function(e){var r=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,l=e._y0||e.y0||e.y||0,s=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(r,n),d=Math.max(r,n),f=Math.min(l,s),p=Math.max(l,s),g=e.trace;if(m.traceIs(g,"gl3d")){var v=a._fullLayout[g.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,d+=y,f+=x,p+=x}c.bbox={x0:u+o,x1:d+o,y0:f+i,y1:p+i},t.inOut_bbox&&t.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||h.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}})),{gd:a,hovermode:"closest",rotateLabels:!1,bgColor:t.bgColor||h.background,container:n.select(t.container),outerContainer:t.outerContainer||t.container}),s=0,c=0;return l.sort((function(e,t){return e.y0-t.y0})).each((function(e,r){var n=e.y0-e.by/2;e.offset=n-5([\s\S]*)<\/extra>/;function P(e,t){var r=t.gd,a=r._fullLayout,i=t.hovermode,c=t.rotateLabels,d=t.bgColor,p=t.container,g=t.outerContainer,w=t.commonLabelOpts||{};if(0===e.length)return[[]];var M=t.fontFamily||y.HOVERFONT,T=t.fontSize||y.HOVERFONTSIZE,k=e[0],S=k.xa,D=k.ya,O=i.charAt(0),P=k[O+"Label"],R=Y(r,g),z=R.top,N=R.width,F=R.height,E=void 0!==P&&k.distance<=t.hoverdistance&&("x"===i||"y"===i);if(E){var j,H,B=!0;for(j=0;ja.width-b?(m=a.width-b,t.attr("d","M"+(b-A)+",0L"+b+","+x+A+"v"+x+(2*L+y.height)+"H-"+b+"V"+x+A+"H"+(b-2*A)+"Z")):t.attr("d","M0,0L"+A+","+x+A+"H"+(L+y.width/2)+"v"+x+(2*L+y.height)+"H-"+(L+y.width/2)+"V"+x+A+"H-"+A+"Z")}else{var _,C,O;"right"===D.side?(_="start",C=1,O="",m=S._offset+S._length):(_="end",C=-1,O="-",m=S._offset),v=D._offset+(k.y0+k.y1)/2,s.attr("text-anchor",_),t.attr("d","M0,0L"+O+A+","+A+"V"+(L+y.height/2)+"h"+O+(2*L+y.width)+"V-"+(L+y.height/2)+"H"+O+A+"V-"+A+"Z");var I,R=y.height/2,N=z-y.top-R,F="clip"+a._uid+"commonlabel"+D._id;if(m=0?ie:oe+ce=0?oe:ve+ce=0?ne:ae+ue=0?ae:ye+ue=0,"top"!==e.idealAlign&&q||!G?q?(R+=H/2,e.anchor="start"):e.anchor="middle":(R-=H/2,e.anchor="end");else if(e.pos=R,q=O+j/2+Z<=N,G=O-j/2-Z>=0,"left"!==e.idealAlign&&q||!G)if(q)O+=j/2,e.anchor="start";else{e.anchor="middle";var W=Z/2,J=O+W-N,X=O-W;J>0&&(O-=J),X<0&&(O+=-X)}else O-=j/2,e.anchor="end";w.attr("text-anchor",e.anchor),S&&k.attr("text-anchor",e.anchor),t.attr("transform",l(O,R)+(c?s(_):""))})),xe}function I(e,t,r,n,a,i){var l="",s="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=o.templateString(e.name,e.trace._meta)),l=E(e.name,e.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(s+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(s+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[c+"Label"]===a?s=e[u+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(s=e.yLabel):s=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(s+=(s?"
":"")+e.text),void 0!==e.extraText&&(s+=(s?"
":"")+e.extraText),i&&""===s&&!e.hovertemplate&&(""===l&&i.remove(),s=l);var d=e.hovertemplate||!1;if(d){var f=e.hovertemplateLabels||e;e[c+"Label"]!==a&&(f[c+"other"]=f[c+"Val"],f[c+"otherLabel"]=f[c+"Label"]),s=(s=o.hovertemplateString(d,f,n._d3locale,e.eventData[0]||{},e.trace._meta)).replace(O,(function(t,r){return l=E(r,e.nameLength),""}))}return[s,l]}function R(e,t,r,a){var i=function(e){return e*r},o=function(e){return e*a};e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var a=r.select("text.nums"),l=e.anchor,s="end"===l?-1:1,c={start:1,end:-1,middle:0}[l],d=c*(A+L),h=d+c*(e.txwidth+L),p=0,g=e.offset,m="middle"===l;m&&(d-=e.tx2width/2,h+=e.txwidth/2+L),t&&(g*=-k,p=e.offset*T),r.select("path").attr("d",m?"M-"+i(e.bx/2+e.tx2width/2)+","+o(g-e.by/2)+"h"+i(e.bx)+"v"+o(e.by)+"h-"+i(e.bx)+"Z":"M0,0L"+i(s*A+p)+","+o(A+g)+"v"+o(e.by/2-A)+"h"+i(s*e.bx)+"v-"+o(e.by)+"H"+i(s*A+p)+"V"+o(g-A)+"Z");var v=p+d,y=g+e.ty0-e.by/2+L,x=e.textAlign||"auto";"auto"!==x&&("left"===x&&"start"!==l?(a.attr("text-anchor","start"),v=m?-e.bx/2-e.tx2width/2+L:-e.bx-L):"right"===x&&"end"!==l&&(a.attr("text-anchor","end"),v=m?e.bx/2-e.tx2width/2-L:e.bx+L)),a.call(u.positionText,i(v),o(y)),e.tx2width&&(r.select("text.name").call(u.positionText,i(h+c*L+p),o(g+e.ty0-e.by/2+L)),r.select("rect").call(f.setRect,i(h+(c-1)*e.tx2width/2+p),o(g-e.by/2-1),i(e.tx2width),o(e.by+2)))}))}function z(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],l=e.cd[r]||{};function s(e){return e||a(e)&&0===e}var c=Array.isArray(r)?function(e,t){var a=o.castOption(i,r,e);return s(a)?a:o.extractOption({},n,"",t)}:function(e,t){return o.extractOption(l,n,e,t)};function u(t,r,n){var a=c(r,n);s(a)&&(e[t]=a)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===n.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=o.constrain(e.x0,0,e.xa._length),e.x1=o.constrain(e.x1,0,e.xa._length),e.y0=o.constrain(e.y0,0,e.ya._length),e.y1=o.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:g.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:g.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!(isNaN(e.xerr)||"log"===e.xa.type&&e.xerr<=0)){var d=g.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+d+" / -"+g.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xb1 "+d,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var f=g.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+f+" / -"+g.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xb1 "+f,"y"===t&&(e.distance+=1)}var h=e.hoverinfo||e.trace.hoverinfo;return h&&"all"!==h&&(-1===(h=Array.isArray(h)?h:h.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===h.indexOf("y")&&(e.yLabel=void 0),-1===h.indexOf("z")&&(e.zLabel=void 0),-1===h.indexOf("text")&&(e.text=void 0),-1===h.indexOf("name")&&(e.name=void 0)),e}function N(e,t,r){var n,a,o=r.container,l=r.fullLayout,s=l._size,c=r.event,u=!!t.hLinePoint,d=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),d||u){var p=h.combine(l.plot_bgcolor,l.paper_bgcolor);if(u){var m,v,y=t.hLinePoint;n=y&&y.xa,"cursor"===(a=y&&y.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+y.x,v=a._offset+y.y);var x,b,_=i.readability(y.color,p)<1.5?h.contrast(p):y.color,w=a.spikemode,M=a.spikethickness,T=a.spikecolor||_,k=g.getPxPosition(e,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=k,b=m),-1!==w.indexOf("across")){var A=a._counterDomainMin,L=a._counterDomainMax;"free"===a.anchor&&(A=Math.min(A,a.position),L=Math.max(L,a.position)),x=s.l+A*s.w,b=s.l+L*s.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":M,stroke:T,"stroke-dasharray":f.dashStyle(a.spikedash,M)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":M+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:k+("right"!==a.side?M:-M),cy:v,r:M,fill:T}).classed("spikeline",!0)}if(d){var S,D,C=t.vLinePoint;n=C&&C.xa,a=C&&C.ya,"cursor"===n.spikesnap?(S=c.pointerX,D=c.pointerY):(S=n._offset+C.x,D=a._offset+C.y);var O,P,I=i.readability(C.color,p)<1.5?h.contrast(p):C.color,R=n.spikemode,z=n.spikethickness,N=n.spikecolor||I,F=g.getPxPosition(e,n);if(-1!==R.indexOf("toaxis")||-1!==R.indexOf("across")){if(-1!==R.indexOf("toaxis")&&(O=F,P=D),-1!==R.indexOf("across")){var E=n._counterDomainMin,j=n._counterDomainMax;"free"===n.anchor&&(E=Math.min(E,n.position),j=Math.max(j,n.position)),O=s.t+(1-j)*s.h,P=s.t+(1-E)*s.h}o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:P,"stroke-width":z,stroke:N,"stroke-dasharray":f.dashStyle(n.spikedash,z)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:S,x2:S,y1:O,y2:P,"stroke-width":z+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==R.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:S,cy:F-("top"!==n.side?z:-z),r:z,fill:N}).classed("spikeline",!0)}}}function F(e,t){return!t||(t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint)}function E(e,t){return u.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}function j(e,t,r){var n=t[e+"a"],a=t[e+"Val"],i=t.cd[0];if("category"===n.type)a=n._categoriesMap[a];else if("date"===n.type){var o=t.trace[e+"periodalignment"];if(o){var l=t.cd[t.index],s=l[e+"Start"];void 0===s&&(s=l[e]);var c=l[e+"End"];void 0===c&&(c=l[e]);var u=c-s;"end"===o?a+=u:"middle"===o&&(a+=u/2)}a=n.d2c(a)}return i&&i.t&&i.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(a+=i.t.dPos)),a}function H(e){return e.offsetTop+e.clientTop}function B(e){return e.offsetLeft+e.clientLeft}function Y(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.x,i=n.y,l=a+n.width,s=i+n.height,c=o.apply3DTransform(r._invTransform)(a,i),u=o.apply3DTransform(r._invTransform)(l,s),d=c[0],f=c[1],h=u[0],p=u[1];return{x:d,y:f,width:h-d,height:p-f,top:Math.min(f,p),left:Math.min(d,h),right:Math.max(d,h),bottom:Math.max(f,p)}}},{"../../lib":224,"../../lib/events":217,"../../lib/override_cursor":235,"../../lib/svg_text_utils":247,"../../plots/cartesian/axes":271,"../../registry":310,"../color":95,"../dragelement":114,"../drawing":117,"../legend/defaults":147,"../legend/draw":148,"./constants":129,"./helpers":131,"@plotly/d3":5,"fast-isnumeric":10,tinycolor2:60}],133:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../color"),i=e("./helpers").isUnifiedHover;t.exports=function(e,t,r,o){o=o||{};var l=t.legend;function s(e){o.font[e]||(o.font[e]=l?t.legend.font[e]:t.font[e])}t&&i(t.hovermode)&&(o.font||(o.font={}),s("size"),s("family"),s("color"),l?(o.bgcolor||(o.bgcolor=a.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},{"../../lib":224,"../color":95,"./helpers":131}],134:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t){function r(r,i){return void 0!==t[r]?t[r]:n.coerce(e,t,a,r,i)}return r("clickmode"),r("hovermode")}},{"../../lib":224,"./layout_attributes":136}],135:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../lib"),i=e("../dragelement"),o=e("./helpers"),l=e("./layout_attributes"),s=e("./hover");t.exports={moduleType:"component",name:"fx",constants:e("./constants"),schema:{layout:l},attributes:e("./attributes"),layoutAttributes:l,supplyLayoutGlobalDefaults:e("./layout_global_defaults"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,r){return a.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return a.castOption(e,r,"hoverinfo",(function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:s.hover,unhover:i.unhover,loneHover:s.loneHover,loneUnhover:function(e){var t=a.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e("./click")}},{"../../lib":224,"../dragelement":114,"./attributes":126,"./calc":127,"./click":128,"./constants":129,"./defaults":130,"./helpers":131,"./hover":132,"./layout_attributes":136,"./layout_defaults":137,"./layout_global_defaults":138,"@plotly/d3":5}],136:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../plots/font_attributes"),i=a({editType:"none"});i.family.dflt=n.HOVERFONT,i.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:i,grouptitlefont:a({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},{"../../plots/font_attributes":302,"./constants":129}],137:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes"),i=e("./hovermode_defaults"),o=e("./hoverlabel_defaults");t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}i(e,t)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var l=t._has("mapbox"),s=t._has("geo"),c=t._basePlotModules.length;"zoom"===t.dragmode&&((l||s)&&1===c||l&&s&&2===c)&&(t.dragmode="pan"),o(e,t,r),n.coerceFont(r,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},{"../../lib":224,"./hoverlabel_defaults":133,"./hovermode_defaults":134,"./layout_attributes":136}],138:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./hoverlabel_defaults"),i=e("./layout_attributes");t.exports=function(e,t){a(e,t,(function(r,a){return n.coerce(e,t,i,r,a)}))}},{"../../lib":224,"./hoverlabel_defaults":133,"./layout_attributes":136}],139:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../lib/regex").counter,i=e("../../plots/domain").attributes,o=e("../../plots/cartesian/constants").idRegex,l=e("../../plot_api/plot_template"),s={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[a("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:i({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function c(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});return Array.isArray(n)?n:a.length?a:void 0}function u(e,t,r,n,a,i){var o=t(e+"gap",r),l=t("domain."+e);t(e+"side",n);for(var s=new Array(a),c=l[0],u=(l[1]-c)/(a-o),d=u*(1-o),f=0;f1){if(!f&&!h&&!p)"independent"===T("pattern")&&(f=!0);m._hasSubplotGrid=f;var x,b,_="top to bottom"===T("roworder"),w=f?.2:.1,M=f?.3:.1;g&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),m._domains={x:u("x",T,w,x,y),y:u("y",T,M,b,v,_)}}else delete t.grid}function T(e,t){return n.coerce(r,m,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,a,i,o,l,s,u,f=e.grid||{},h=t._subplots,p=r._hasSubplotGrid,g=r.rows,m=r.columns,v="independent"===r.pattern,y=r._axisMap={};if(p){var x=f.subplots||[];s=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1===_&&(t.legend=void 0),(!1!==_||d.uirevision)&&(h("uirevision",t.uirevision),!1!==_)){h("bgcolor",t.paper_bgcolor),h("bordercolor"),h("borderwidth");var w,M,T,k=a.coerceFont(h,"font",t.font),A="h"===h("orientation");if(A?(w=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(M=1.1,T="bottom"):(M=-.1,T="top")):(w=1.02,M=1,T="auto"),h("traceorder",x),c.isGrouped(t.legend)&&h("tracegroupgap"),h("itemsizing"),h("itemwidth"),h("itemclick"),h("itemdoubleclick"),h("groupclick"),h("x",w),h("xanchor"),h("y",M),h("yanchor",T),h("valign"),a.noneOrAll(d,f,["x","y"]),h("title.text")){h("title.side",A?"left":"top");var L=a.extendFlat({},k,{size:a.bigFont(k.size)});a.coerceFont(h,"title.font",L)}}}},{"../../lib":224,"../../plot_api/plot_template":260,"../../plots/attributes":267,"../../plots/layout_attributes":306,"../../registry":310,"./attributes":145,"./helpers":151}],148:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../lib"),i=e("../../plots/plots"),o=e("../../registry"),l=e("../../lib/events"),s=e("../dragelement"),c=e("../drawing"),u=e("../color"),d=e("../../lib/svg_text_utils"),f=e("./handle_click"),h=e("./constants"),p=e("../../constants/alignment"),g=p.LINE_SPACING,m=p.FROM_TL,v=p.FROM_BR,y=e("./get_legend_data"),x=e("./style"),b=e("./helpers");function _(e,t,r,n,a){var i=r.data()[0][0].trace,s={event:a,node:r.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};if(i._group&&(s.group=i._group),o.traceIs(i,"pie-like")&&(s.label=r.datum()[0].label),!1!==l.triggerHandler(e,"plotly_legendclick",s))if(1===n)t._clickTimeout=setTimeout((function(){e._fullLayout&&f(r,e,n)}),e._context.doubleClickDelay);else if(2===n){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==l.triggerHandler(e,"plotly_legenddoubleclick",s)&&f(r,e,n)}}function w(e,t,r){var n,i,l=e.data()[0][0],s=l.trace,u=o.traceIs(s,"pie-like"),f=!r._inHover&&t._context.edits.legendText&&!u,p=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,i=l.groupTitle.font):(i=r.font,r.entries?n=l.text:(n=u?l.label:s.name,s._meta&&(n=a.templateString(n,s._meta))));var g=a.ensureSingle(e,"text","legendtext");g.attr("text-anchor","start").call(c.font,i).text(f?M(n,p):n);var m=r.itemwidth+2*h.itemGap;d.positionText(g,m,0),f?g.call(d.makeEditable,{gd:t,text:n}).call(k,e,t,r).on("edit",(function(n){this.text(M(n,p)).call(k,e,t,r);var i=l.trace._fullInput||{},c={};if(o.hasTransform(i,"groupby")){var u=o.getTransformIndices(i,"groupby"),d=u[u.length-1],f=a.keyedContainer(i,"transforms["+d+"].styles","target","value.name");f.set(l.trace._group,n),c=f.constructUpdate()}else c.name=n;return o.call("_guiRestyle",t,c,s.index)})):k(g,e,t,r)}function M(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function T(e,t){var r,i=t._context.doubleClickDelay,o=1,l=a.ensureSingle(e,"rect","legendtoggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(u.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(l.on("mousedown",(function(){(r=(new Date).getTime())-t._legendMouseDownTimei&&(o=Math.max(o-1,1)),_(t,r,e,o,n.event)}})))}function k(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),d.convertToTspans(e,r,(function(){!function(e,t,r,n){var a=e.data()[0][0];if(!r._inHover&&a&&!a.trace.showlegend)return void e.remove();var i=e.select("g[class*=math-group]"),o=i.node();r||(r=t._fullLayout.legend);var l,s=r.borderwidth;l=1===n?r.title.font:a.groupTitle?a.groupTitle.font:r.font;var u,f,p=l.size*g;if(o){var m=c.bBox(o);u=m.height,f=m.width,1===n?c.setTranslate(i,s,s+.75*u):c.setTranslate(i,0,.25*u)}else{var v=e.select(1===n?".legendtitletext":".legendtext"),y=d.lineCount(v),x=v.node();if(u=p*y,f=x?c.bBox(x).width:0,1===n)"left"===r.title.side&&(f+=2*h.itemGap),d.positionText(v,s+h.titlePad,s+p);else{var b=2*h.itemGap+r.itemwidth;a.groupTitle&&(b=h.itemGap,f-=r.itemwidth),d.positionText(v,b,-p*((y-1)/2-.3))}}1===n?(r._titleWidth=f,r._titleHeight=u):(a.lineHeight=p,a.height=Math.max(u,16)+3,a.width=f)}(t,r,n,a)}))}function A(e){return a.isRightAnchor(e)?"right":a.isCenterAnchor(e)?"center":"left"}function L(e){return a.isBottomAnchor(e)?"bottom":a.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e,t){return t||(t=e._fullLayout.legend||{}),function(e,t){var r,l,d=e._fullLayout,f="legend"+d._uid,p=t._inHover;p?(r=t.layer,f+="-hover"):r=d._infolayer;if(!r)return;e._legendMouseDownTime||(e._legendMouseDownTime=0);if(p){if(!t.entries)return;l=y(t.entries,t)}else{if(!e.calcdata)return;l=d.showlegend&&y(e.calcdata,t)}var g=d.hiddenlabels||[];if(!(p||d.showlegend&&l.length))return r.selectAll(".legend").remove(),d._topdefs.select("#"+f).remove(),i.autoMargin(e,"legend");var M=a.ensureSingle(r,"g","legend",(function(e){p||e.attr("pointer-events","all")})),S=a.ensureSingleById(d._topdefs,"clipPath",f,(function(e){e.append("rect")})),D=a.ensureSingle(M,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));D.call(u.stroke,t.bordercolor).call(u.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px");var C=a.ensureSingle(M,"g","scrollbox"),O=t.title;if(t._titleWidth=0,t._titleHeight=0,O.text){var P=a.ensureSingle(C,"text","legendtitletext");P.attr("text-anchor","start").call(c.font,O.font).text(O.text),k(P,C,e,t,1)}else C.selectAll(".legendtitletext").remove();var I=a.ensureSingle(M,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(u.fill,h.scrollBarColor)})),R=C.selectAll("g.groups").data(l);R.enter().append("g").attr("class","groups"),R.exit().remove();var z=R.selectAll("g.traces").data(a.identity);z.enter().append("g").attr("class","traces"),z.exit().remove(),z.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==g.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(w,e,t)})).call(x,e,t).each((function(){p||n.select(this).call(T,e)})),a.syncOrAsync([i.previousPromises,function(){return function(e,t,r,a){var i=e._fullLayout;a||(a=i.legend);var o=i._size,l=b.isVertical(a),s=b.isGrouped(a),u=a.borderwidth,d=2*u,f=h.itemGap,p=a.itemwidth+2*f,g=2*(u+f),m=L(a),v=a.y<0||0===a.y&&"top"===m,y=a.y>1||1===a.y&&"bottom"===m,x=a.tracegroupgap;a._maxHeight=Math.max(v||y?i.height/2:o.h,30);var _=0;a._width=0,a._height=0;var w=function(e){var t=0,r=0,n=e.title.side;n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight));return[t,r]}(a);if(l)r.each((function(e){var t=e[0].height;c.setTranslate(this,u+w[0],u+w[1]+a._height+t/2+f),a._height+=t,a._width=Math.max(a._width,e[0].width)})),_=p+a._width,a._width+=f+p+d,a._height+=g,s&&(t.each((function(e,t){c.setTranslate(this,0,t*a.tracegroupgap)})),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var M=A(a),T=a.x<0||0===a.x&&"right"===M,k=a.x>1||1===a.x&&"left"===M,S=y||v,D=i.width/2;a._maxWidth=Math.max(T?S&&"left"===M?o.l+o.w:D:k?S&&"right"===M?o.r+o.w:D:o.w,2*p);var C=0,O=0;r.each((function(e){var t=e[0].width+p;C=Math.max(C,t),O+=t})),_=null;var P=0;if(s){var I=0,R=0,z=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=r[0].width,a=r[0].height;c.setTranslate(this,w[0],w[1]+u+f+a/2+t),t+=a,e=Math.max(e,p+n)})),I=Math.max(I,t);var r=e+f;R>0&&r+u+R>a._maxWidth&&(P=Math.max(P,R),R=0,z+=I+x,I=t),c.setTranslate(this,R,z),R+=r})),a._width=Math.max(P,R)+u,a._height=z+I+g}else{var N=r.size(),F=O+d+(N-1)*f=a._maxWidth&&(P=Math.max(P,B),j=0,H+=E,a._height+=E,E=0),c.setTranslate(this,w[0]+u+j,w[1]+u+H+t/2+f),B=j+r+f,j+=n,E=Math.max(E,t)})),F?(a._width=j+d,a._height=E+g):(a._width=Math.max(P,B)+d,a._height+=E+g)}}a._width=Math.ceil(Math.max(a._width+w[0],a._titleWidth+2*(u+h.titlePad))),a._height=Math.ceil(Math.max(a._height+w[1],a._titleHeight+2*(u+h.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var Y=e._context.edits,U=Y.legendText||Y.legendPosition;r.each((function(e){var t=n.select(this).select(".legendtoggle"),r=e[0].height,a=U?p:_||p+e[0].width;l||(a+=f/2),c.setRect(t,0,-r/2,a,r)}))}(e,R,z,t)},function(){var l,u,g,y,x=d._size,b=t.borderwidth;if(!p){if(function(e){var t=e._fullLayout.legend,r=A(t),n=L(t);return i.autoMargin(e,"legend",{x:t.x,y:t.y,l:t._width*m[r],r:t._width*v[r],b:t._effHeight*v[n],t:t._effHeight*m[n]})}(e))return;var w=x.l+x.w*t.x-m[A(t)]*t._width,T=x.t+x.h*(1-t.y)-m[L(t)]*t._effHeight;if(d.margin.autoexpand){var k=w,O=T;w=a.constrain(w,0,d.width-t._width),T=a.constrain(T,0,d.height-t._effHeight),w!==k&&a.log("Constrain legend.x to make legend fit inside graph"),T!==O&&a.log("Constrain legend.y to make legend fit inside graph")}c.setTranslate(M,w,T)}if(I.on(".drag",null),M.on("wheel",null),p||t._height<=t._maxHeight||e._context.staticPlot){var P=t._effHeight;p&&(P=t._height),D.attr({width:t._width-b,height:P-b,x:b/2,y:b/2}),c.setTranslate(C,0,0),S.select("rect").attr({width:t._width-2*b,height:P-2*b,x:b,y:b}),c.setClipUrl(C,f,e),c.setRect(I,0,0,0,0),delete t._scrollY}else{var R,z,N,F=Math.max(h.scrollBarMinHeight,t._effHeight*t._effHeight/t._height),E=t._effHeight-F-2*h.scrollBarMargin,j=t._height-t._effHeight,H=E/j,B=Math.min(t._scrollY||0,j);D.attr({width:t._width-2*b+h.scrollBarWidth+h.scrollBarMargin,height:t._effHeight-b,x:b/2,y:b/2}),S.select("rect").attr({width:t._width-2*b+h.scrollBarWidth+h.scrollBarMargin,height:t._effHeight-2*b,x:b,y:b+B}),c.setClipUrl(C,f,e),V(B,F,H),M.on("wheel",(function(){V(B=a.constrain(t._scrollY+n.event.deltaY/E*j,0,j),F,H),0!==B&&B!==j&&n.event.preventDefault()}));var Y=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;R="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,N=B})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(z="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,V(B=function(e,t,r){var n=(r-t)/H+e;return a.constrain(n,0,j)}(N,R,z),F,H))}));I.call(Y);var U=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(R=e.changedTouches[0].clientY,N=B)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(z=e.changedTouches[0].clientY,V(B=function(e,t,r){var n=(t-r)/H+e;return a.constrain(n,0,j)}(N,R,z),F,H))}));C.call(U)}function V(r,n,a){t._scrollY=e._fullLayout.legend._scrollY=r,c.setTranslate(C,0,-r),c.setRect(I,t._width,h.scrollBarMargin+r*a,h.scrollBarWidth,n),S.select("rect").attr("y",b+r)}e._context.edits.legendPosition&&(M.classed("cursor-move",!0),s.init({element:M.node(),gd:e,prepFn:function(){var e=c.getTranslate(M);g=e.x,y=e.y},moveFn:function(e,r){var n=g+e,a=y+r;c.setTranslate(M,n,a),l=s.align(n,0,x.l,x.l+x.w,t.xanchor),u=s.align(a,0,x.t+x.h,x.t,t.yanchor)},doneFn:function(){void 0!==l&&void 0!==u&&o.call("_guiRelayout",e,{"legend.x":l,"legend.y":u})},clickFn:function(t,n){var a=r.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return n.clientX>=e.left&&n.clientX<=e.right&&n.clientY>=e.top&&n.clientY<=e.bottom}));a.size()>0&&_(e,M,a,t,n)}}))}],e)}(e,t)}},{"../../constants/alignment":200,"../../lib":224,"../../lib/events":217,"../../lib/svg_text_utils":247,"../../plots/plots":308,"../../registry":310,"../color":95,"../dragelement":114,"../drawing":117,"./constants":146,"./get_legend_data":149,"./handle_click":150,"./helpers":151,"./style":153,"@plotly/d3":5}],149:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("./helpers");t.exports=function(e,t){var r,i,o=t._inHover,l=a.isGrouped(t),s=a.isReversed(t),c={},u=[],d=!1,f={},h=0,p=0;function g(e,r){if(""!==e&&a.isGrouped(t))-1===u.indexOf(e)?(u.push(e),d=!0,c[e]=[r]):c[e].push(r);else{var n="~~i"+h;u.push(n),c[n]=[r],h++}}for(r=0;rk&&(T=k)}w[r][0]._groupMinRank=T,w[r][0]._preGroupSort=r}var A=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(w.forEach((function(e,t){e[0]._preGroupSort=t})),w.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),r=0;rr?r:e}t.exports=function(e,t,r){var v=t._fullLayout;r||(r=v.legend);var y="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*h.itemGap)/2,_=o(b,0),w=function(e,t,r,n){var a;if(e+1)a=e;else{if(!(t&&t.width>0))return 0;a=t.width}return y?n:Math.min(a,r)};function M(e,i,o){var u=e[0].trace,d=u.marker||{},f=d.line||{},h=o?u.visible&&u.type===o:a.traceIs(u,"bar"),p=n.select(i).select("g.legendpoints").selectAll("path.legend"+o).data(h?[e]:[]);p.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),p.exit().remove(),p.each((function(e){var a=n.select(this),i=e[0],o=w(i.mlw,d.line,5,2);a.style("stroke-width",o+"px");var h=i.mcc;if(!r._inHover&&"mc"in i){var p=c(d),g=p.mid;void 0===g&&(g=(p.max+p.min)/2),h=l.tryColorscale(d,"")(g)}var v=h||i.mc||d.color,y=d.pattern,x=y&&l.getPatternAttr(y.shape,0,"");if(x){var b=l.getPatternAttr(y.bgcolor,0,null),_=l.getPatternAttr(y.fgcolor,0,null),M=y.fgopacity,T=m(y.size,8,10),k=m(y.solidity,.5,1),A="legend-"+u.uid;a.call(l.pattern,"legend",t,A,x,T,k,h,y.fillmode,b,_,M)}else a.call(s.fill,v);o&&s.stroke(a,i.mlc||f.color)}))}function T(e,t,r){var o=e[0],l=o.trace,s=r?l.visible&&l.type===r:a.traceIs(l,r),c=n.select(t).select("g.legendpoints").selectAll("path.legend"+r).data(s?[e]:[]);if(c.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),c.exit().remove(),c.size()){var u=(l.marker||{}).line,h=w(f(u.width,o.pts),u,5,2),p=i.minExtend(l,{marker:{line:{width:h}}});p.marker.line.color=u.color;var g=i.minExtend(o,{trace:p});d(c,g,p)}}e.each((function(e){var t=n.select(this),a=i.ensureSingle(t,"g","layers");a.style("opacity",e[0].trace.opacity);var l=r.valign,s=e[0].lineHeight,c=e[0].height;if("middle"!==l&&s&&c){var u={top:1,bottom:-1}[l]*(.5*(s-c+3));a.attr("transform",o(0,u))}else a.attr("transform",null);a.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var d=a.selectAll("g.legendsymbols").data([e]);d.enter().append("g").classed("legendsymbols",!0),d.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var r,a=e[0].trace,o=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":o=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":o=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":o=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(e,o){var u,d=n.select(this),f=c(a),h=f.colorscale,g=f.reversescale;if(h){if(!r){var m=h.length;u=0===o?h[g?m-1:0][1]:1===o?h[g?0:m-1][1]:h[Math.floor((m-1)/2)][1]}}else{var v=a.vertexcolor||a.facecolor||a.color;u=i.isArrayOrTypedArray(v)?v[o]||v[0]:v}d.attr("d",e[0]),u?d.call(s.fill,u):d.call((function(e){if(e.size()){var n="legendfill-"+a.uid;l.gradient(e,t,n,p(g,"radial"===r),h,"fill")}}))}))})).each((function(e){var t=e[0].trace,r="waterfall"===t.type;if(e[0]._distinct&&r){var a=e[0].trace[e[0].dir].marker;return e[0].mc=a.color,e[0].mlw=a.line.width,e[0].mlc=a.line.color,M(e,this,"waterfall")}var i=[];t.visible&&r&&(i=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(i);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(e){var r=n.select(this),a=t[e[0]].marker,i=w(void 0,a.line,5,2);r.attr("d",e[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)}))})).each((function(e){M(e,this,"funnel")})).each((function(e){M(e,this)})).each((function(e){var r=e[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&a.traceIs(r,"box-violin")?[e]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var e=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=w(void 0,r.line,5,2);e.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(e,r.line.color)}else{var c=i.minExtend(r,{marker:{size:y?12:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(l.pointStyle,c,t)}}))})).each((function(e){T(e,this,"funnelarea")})).each((function(e){T(e,this,"pie")})).each((function(e){var r,a,o=g(e),s=o.showFill,d=o.showLine,f=o.showGradientLine,h=o.showGradientFill,m=o.anyFill,v=o.anyLine,y=e[0],b=y.trace,_=c(b),M=_.colorscale,T=_.reversescale,k=u.hasMarkers(b)||!m?"M5,0":v?"M5,-2":"M5,-3",A=n.select(this),L=A.select(".legendfill").selectAll("path").data(s||h?[e]:[]);if(L.enter().append("path").classed("js-fill",!0),L.exit().remove(),L.attr("d",k+"h"+x+"v6h-"+x+"z").call(s?l.fillGroupStyle:function(e){if(e.size()){var r="legendfill-"+b.uid;l.gradient(e,t,r,p(T),M,"fill")}}),d||f){var S=w(void 0,b.line,10,5);a=i.minExtend(b,{line:{width:S}}),r=[i.minExtend(y,{trace:a})]}var D=A.select(".legendlines").selectAll("path").data(d||f?[r]:[]);D.enter().append("path").classed("js-line",!0),D.exit().remove(),D.attr("d",k+(f?"l"+x+",0.0001":"h"+x)).call(d?l.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;l.lineGroupStyle(e),l.gradient(e,t,r,p(T),M,"stroke")}})})).each((function(e){var r,a,o=g(e),s=o.anyFill,c=o.anyLine,d=o.showLine,f=o.showMarker,h=e[0],p=h.trace,m=!f&&!c&&!s&&u.hasText(p);function v(e,t,r,n){var a=i.nestedProperty(p,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(y&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(e){return h._distinct&&h.index&&e[h.index]?e[h.index]:e[0]}if(f||m||d){var b={},w={};if(f){b.mc=v("marker.color",x),b.mx=v("marker.symbol",x),b.mo=v("marker.opacity",i.mean,[.2,1]),b.mlc=v("marker.line.color",x),b.mlw=v("marker.line.width",i.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var M=v("marker.size",i.mean,[2,16],12);b.ms=M,w.marker.size=M}d&&(w.line={width:v("line.width",x,[0,10],5)}),m&&(b.tx="Aa",b.tp=v("textposition",x),b.ts=10,b.tc=v("textfont.color",x),b.tf=v("textfont.family",x)),r=[i.minExtend(h,b)],(a=i.minExtend(p,w)).selectedpoints=null,a.texttemplate=null}var T=n.select(this).select("g.legendpoints"),k=T.selectAll("path.scatterpts").data(f?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),k.exit().remove(),k.call(l.pointStyle,a,t),f&&(r[0].mrc=3);var A=T.selectAll("g.pointtext").data(m?r:[]);A.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),A.exit().remove(),A.selectAll("text").call(l.textPointStyle,a,t)})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(void 0,i.line,5,2);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)}))})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(void 0,i.line,5,2);a.style("fill","none").call(l.dashLine,i.line.dash,o),o&&s.stroke(a,i.line.color)}))}))}},{"../../lib":224,"../../registry":310,"../../traces/pie/helpers":319,"../../traces/pie/style_one":320,"../../traces/scatter/subtypes":347,"../color":95,"../colorscale/helpers":106,"../drawing":117,"./constants":146,"@plotly/d3":5}],154:[function(e,t,r){"use strict";e("./constants");t.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},{"./constants":156}],155:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../plots/plots"),i=e("../../plots/cartesian/axis_ids"),o=e("../../fonts/ploticon"),l=e("../shapes/draw").eraseActiveShape,s=e("../../lib"),c=s._,u=t.exports={};function d(e,t){var r,a,o=t.currentTarget,l=o.getAttribute("data-attr"),s=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},d=i.list(e,null,!0),f=c._cartesianSpikesEnabled;if("zoom"===l){var h,p="in"===s?.5:2,g=(1+p)/2,m=(1-p)/2;for(a=0;a1?(P=["toggleHover"],I=["resetViews"]):v?(O=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],I=["resetGeo"]):m?(P=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(O=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],I=["resetViewMapbox"]):b?P=["hoverClosestGl2d"]:y?P=["hoverClosestPie"]:k?(P=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):P=["toggleHover"];g&&(P=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]);(function(e){for(var t=0;t0)){var g=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),a=0,i=0;i=n.max)t=F[r+1];else if(e=n.pmax)t=F[r+1];else if(e0?f+c:c;return{ppad:c,ppadplus:u?p:g,ppadminus:u?g:p}}return{ppad:c}}function u(e,t,r,n,a){var l="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[l(t),l(r)];if(n){var s,c,u,d,f=1/0,h=-1/0,p=n.match(i.segmentRE);for("date"===e.type&&(l=o.decodeDate(l)),s=0;sh&&(h=d)));return h>=f?[f,h]:void 0}}t.exports=function(e){var t=e._fullLayout,r=n.filterVisible(t.shapes);if(r.length&&e._fullData.length)for(var o=0;oy?(T=d,S="y0",k=y,D="y1"):(T=y,S="y1",k=d,D="y0");J(n),K(l,r),function(e,t,r){var n=t.xref,a=t.yref,o=i.getFromId(r,n),l=i.getFromId(r,a),s="";"paper"===n||o.autorange||(s+=n);"paper"===a||l.autorange||(s+=a);u.setClipUrl(e,s?"clip"+r._fullLayout._uid+s:null,r)}(t,r,e),W.moveFn="move"===I?X:Q,W.altKey=n.altKey},doneFn:function(){if(v(e))return;h(t),$(l),b(t,e,r),n.call("_guiRelayout",e,s.getUpdateObj())},clickFn:function(){if(v(e))return;$(l)}};function J(r){if(v(e))I=null;else if(N)I="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=W.element.getBoundingClientRect(),a=n.right-n.left,i=n.bottom-n.top,o=r.clientX-n.left,l=r.clientY-n.top,s=!F&&a>10&&i>10&&!r.shiftKey?f.getCursor(o/a,1-l/i):"move";h(t,s),I=s.split("-")[0]}}function X(n,a){if("path"===r.type){var i=function(e){return e},o=i,s=i;R?E("xanchor",r.xanchor=q(x+n)):(o=function(e){return q(U(e)+n)},j&&"date"===j.type&&(o=g.encodeDate(o))),z?E("yanchor",r.yanchor=G(M+a)):(s=function(e){return G(V(e)+a)},B&&"date"===B.type&&(s=g.encodeDate(s))),E("path",r.path=w(P,o,s))}else R?E("xanchor",r.xanchor=q(x+n)):(E("x0",r.x0=q(c+n)),E("x1",r.x1=q(m+n))),z?E("yanchor",r.yanchor=G(M+a)):(E("y0",r.y0=G(d+a)),E("y1",r.y1=G(y+a)));t.attr("d",_(e,r)),K(l,r)}function Q(n,a){if(F){var i=function(e){return e},o=i,s=i;R?E("xanchor",r.xanchor=q(x+n)):(o=function(e){return q(U(e)+n)},j&&"date"===j.type&&(o=g.encodeDate(o))),z?E("yanchor",r.yanchor=G(M+a)):(s=function(e){return G(V(e)+a)},B&&"date"===B.type&&(s=g.encodeDate(s))),E("path",r.path=w(P,o,s))}else if(N){if("resize-over-start-point"===I){var u=c+n,f=z?d-a:d+a;E("x0",r.x0=R?u:q(u)),E("y0",r.y0=z?f:G(f))}else if("resize-over-end-point"===I){var h=m+n,p=z?y-a:y+a;E("x1",r.x1=R?h:q(h)),E("y1",r.y1=z?p:G(p))}}else{var v=function(e){return-1!==I.indexOf(e)},b=v("n"),H=v("s"),Y=v("w"),Z=v("e"),W=b?T+a:T,J=H?k+a:k,X=Y?A+n:A,Q=Z?L+n:L;z&&(b&&(W=T-a),H&&(J=k-a)),(!z&&J-W>10||z&&W-J>10)&&(E(S,r[S]=z?W:G(W)),E(D,r[D]=z?J:G(J))),Q-X>10&&(E(C,r[C]=R?X:q(X)),E(O,r[O]=R?Q:q(Q)))}t.attr("d",_(e,r)),K(l,r)}function K(e,t){(R||z)&&function(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=U(R?t.xanchor:a.midRange(r?[t.x0,t.x1]:g.extractPathCoords(t.path,p.paramIsX))),o=V(z?t.yanchor:a.midRange(r?[t.y0,t.y1]:g.extractPathCoords(t.path,p.paramIsY)));if(i=g.roundPositionForSharpStrokeRendering(i,1),o=g.roundPositionForSharpStrokeRendering(o,1),R&&z){var l="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",l)}else if(R){var s="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",s)}else{var c="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function $(e){e.selectAll(".visual-cue").remove()}f.init(W),Z.node().onmousemove=J}(e,R,s,t,r,I):!0===s.editable&&R.style("pointer-events",O||c.opacity(L)*A<=.5?"stroke":"all");R.node().addEventListener("click",(function(){return function(e,t){if(!y(e))return;var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeShapeIndex)return void M(e);e._fullLayout._activeShapeIndex=r,e._fullLayout._deactivateShape=M,m(e)}}(e,R)}))}}function b(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");u.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function _(e,t){var r,n,o,l,s,c,u,d,f=t.type,h=i.getRefType(t.xref),m=i.getRefType(t.yref),v=i.getFromId(e,t.xref),y=i.getFromId(e,t.yref),x=e._fullLayout._size;if(v?"domain"===h?n=function(e){return v._offset+v._length*e}:(r=g.shapePositionToRange(v),n=function(e){return v._offset+v.r2p(r(e,!0))}):n=function(e){return x.l+x.w*e},y?"domain"===m?l=function(e){return y._offset+y._length*(1-e)}:(o=g.shapePositionToRange(y),l=function(e){return y._offset+y.r2p(o(e,!0))}):l=function(e){return x.t+x.h*(1-e)},"path"===f)return v&&"date"===v.type&&(n=g.decodeDate(n)),y&&"date"===y.type&&(l=g.decodeDate(l)),function(e,t,r){var n=e.path,i=e.xsizemode,o=e.ysizemode,l=e.xanchor,s=e.yanchor;return n.replace(p.segmentRE,(function(e){var n=0,c=e.charAt(0),u=p.paramIsX[c],d=p.paramIsY[c],f=p.numParams[c],h=e.substr(1).replace(p.paramRE,(function(e){return u[n]?e="pixel"===i?t(l)+Number(e):t(e):d[n]&&(e="pixel"===o?r(s)-Number(e):r(e)),++n>f&&(e="X"),e}));return n>f&&(h=h.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+e)),c+h}))}(t,n,l);if("pixel"===t.xsizemode){var b=n(t.xanchor);s=b+t.x0,c=b+t.x1}else s=n(t.x0),c=n(t.x1);if("pixel"===t.ysizemode){var _=l(t.yanchor);u=_-t.y0,d=_-t.y1}else u=l(t.y0),d=l(t.y1);if("line"===f)return"M"+s+","+u+"L"+c+","+d;if("rect"===f)return"M"+s+","+u+"H"+c+"V"+d+"H"+s+"Z";var w=(s+c)/2,M=(u+d)/2,T=Math.abs(w-s),k=Math.abs(M-u),A="A"+T+","+k,L=w+T+","+M;return"M"+L+A+" 0 1,1 "+(w+","+(M-k))+A+" 0 0,1 "+L+"Z"}function w(e,t,r){return e.replace(p.segmentRE,(function(e){var n=0,a=e.charAt(0),i=p.paramIsX[a],o=p.paramIsY[a],l=p.numParams[a];return a+e.substr(1).replace(p.paramRE,(function(e){return n>=l||(i[n]?e=t(e):o[n]&&(e=r(e)),n++),e}))}))}function M(e){y(e)&&(e._fullLayout._activeShapeIndex>=0&&(s(e),delete e._fullLayout._activeShapeIndex,m(e)))}t.exports={draw:m,drawOne:x,eraseActiveShape:function(e){if(!y(e))return;s(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t=0&&d(v),r.attr("d",g(t)),k&&!f)&&(T=function(e,t){for(var r=0;r1&&(2!==e.length||"Z"!==e[1][0])&&(0===M&&(e[0][0]="M"),t[w]=e,y(),x())}}()}}function P(e,r){!function(e,r){if(t.length)for(var n=0;n0&&s0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*d.gripWidth,t._dims.currentValueTotalHeight))}}function S(e,t){var r=e._dims;return r.inputAreaStart+d.stepInset+(r.inputAreaLength-2*d.stepInset)*Math.min(1,Math.max(0,t))}function D(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-d.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*d.stepInset-2*r.inputAreaStart)))}function C(e,t,r){var n=r._dims,a=l.ensureSingle(e,"rect",d.railTouchRectClass,(function(n){n.call(k,t,e,r).style("pointer-events","all")}));a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,d.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function O(e,t){var r=t._dims,n=r.inputAreaLength-2*d.railInset,a=l.ensureSingle(e,"rect",d.railRectClass);a.attr({width:n,height:d.railWidth,rx:d.railRadius,ry:d.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(a,d.railInset,.5*(r.inputAreaWidth-d.railWidth)+r.currentValueTotalHeight)}t.exports=function(e){var t=e._fullLayout,r=function(e,t){for(var r=e[d.name],n=[],a=0;a0?[0]:[]);function l(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),a.autoMargin(e,m(t))}if(i.enter().append("g").classed(d.containerClassName,!0).style("cursor","ew-resize"),i.exit().each((function(){n.select(this).selectAll("g."+d.groupClassName).each(l)})).remove(),0!==r.length){var s=i.selectAll("g."+d.groupClassName).data(r,v);s.enter().append("g").classed(d.groupClassName,!0),s.exit().each(l).remove();for(var c=0;c0||f<0){var v={left:[-p,0],right:[p,0],top:[0,-p],bottom:[0,p]}[b.side];t.attr("transform",s(v[0],v[1]))}}}return N.call(F),I&&(S?N.on(".opacity",null):(k=0,A=!0,N.text(y).on("mouseover.opacity",(function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)}))),N.call(d.makeEditable,{gd:e}).on("edit",(function(t){void 0!==x?o.call("_guiRestyle",e,v,t,x):o.call("_guiRelayout",e,v,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(F)})).on("input",(function(e){this.text(e||" ").call(d.positionText,_.x,_.y)}))),N.classed("js-placeholder",A),M}}},{"../../constants/alignment":200,"../../constants/interactions":203,"../../lib":224,"../../lib/svg_text_utils":247,"../../plots/plots":308,"../../registry":310,"../color":95,"../drawing":117,"@plotly/d3":5,"fast-isnumeric":10}],194:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../color/attributes"),i=e("../../lib/extend").extendFlat,o=e("../../plot_api/edit_types").overrideAll,l=e("../../plots/pad_attributes"),s=e("../../plot_api/plot_template").templatedArray,c=s("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});t.exports=o(s("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(l({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":218,"../../plot_api/edit_types":253,"../../plot_api/plot_template":260,"../../plots/font_attributes":302,"../../plots/pad_attributes":307,"../color/attributes":94}],195:[function(e,t,r){"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25c4",right:"\u25ba",up:"\u25b2",down:"\u25bc"}}},{}],196:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/array_container_defaults"),i=e("./attributes"),o=e("./constants").name,l=i.buttons;function s(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}o("visible",a(e,t,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(e,t){function r(r,a){return n.coerce(e,t,l,r,a)}r("visible","skip"===e.method||Array.isArray(e.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:s})}},{"../../lib":224,"../../plots/array_container_defaults":266,"./attributes":194,"./constants":195}],197:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../plots/plots"),i=e("../color"),o=e("../drawing"),l=e("../../lib"),s=e("../../lib/svg_text_utils"),c=e("../../plot_api/plot_template").arrayEditor,u=e("../../constants/alignment").LINE_SPACING,d=e("./constants"),f=e("./scrollbox");function h(e){return e._index}function p(e,t){return+e.attr(d.menuIndexAttrName)===t._index}function g(e,t,r,n,a,i,o,l){t.active=o,c(e.layout,d.name,t).applyUpdate("active",o),"buttons"===t.type?v(e,n,null,null,t):"dropdown"===t.type&&(a.attr(d.menuIndexAttrName,"-1"),m(e,n,a,i,t),l||v(e,n,a,i,t))}function m(e,t,r,n,a){var i=l.ensureSingle(t,"g",d.headerClassName,(function(e){e.style("pointer-events","all")})),s=a._dims,c=a.active,u=a.buttons[c]||d.blankHeaderOpts,f={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},h={width:s.headerWidth,height:s.headerHeight};i.call(y,a,u,e).call(A,a,f,h),l.ensureSingle(t,"text",d.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(o.font,a.font).text(d.arrowSymbol[a.direction])})).attr({x:s.headerWidth-d.arrowOffsetX+a.pad.l,y:s.headerHeight/2+d.textOffsetY+a.pad.t}),i.on("click",(function(){r.call(L,String(p(r,a)?-1:a._index)),v(e,t,r,n,a)})),i.on("mouseover",(function(){i.call(w)})),i.on("mouseout",(function(){i.call(M,a)})),o.setTranslate(t,s.lx,s.ly)}function v(e,t,r,i,o){r||(r=t).attr("pointer-events","all");var s=function(e){return-1==+e.attr(d.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?d.dropdownButtonClassName:d.buttonClassName,u=r.selectAll("g."+c).data(l.filterVisible(s)),f=u.enter().append("g").classed(c,!0),h=u.exit();"dropdown"===o.type?(f.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var p=0,m=0,v=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?m=v.headerHeight+d.gapButtonHeader:p=v.headerWidth+d.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(m=-d.gapButtonHeader+d.gapButton-v.openHeight),"dropdown"===o.type&&"left"===o.direction&&(p=-d.gapButtonHeader+d.gapButton-v.openWidth);var b={x:v.lx+p+o.pad.l,y:v.ly+m+o.pad.t,yPad:d.gapButton,xPad:d.gapButton,index:0},T={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(l,s){var c=n.select(this);c.call(y,o,l,e).call(A,o,b),c.on("click",(function(){n.event.defaultPrevented||(l.execute&&(l.args2&&o.active===s?(g(e,o,0,t,r,i,-1),a.executeAPICommand(e,l.method,l.args2)):(g(e,o,0,t,r,i,s),a.executeAPICommand(e,l.method,l.args))),e.emit("plotly_buttonclicked",{menu:o,button:l,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(M,o),u.call(_,o)}))})),u.call(_,o),x?(T.w=Math.max(v.openWidth,v.headerWidth),T.h=b.y-T.t):(T.w=b.x-T.l,T.h=Math.max(v.openHeight,v.headerHeight)),T.direction=o.direction,i&&(u.size()?function(e,t,r,n,a,i){var o,l,s,c=a.direction,u="up"===c||"down"===c,f=a._dims,h=a.active;if(u)for(l=0,s=0;s0?[0]:[]);if(o.enter().append("g").classed(d.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+d.headerGroupClassName).each(i)})).remove(),0!==r.length){var s=o.selectAll("g."+d.headerGroupClassName).data(r,h);s.enter().append("g").classed(d.headerGroupClassName,!0);for(var c=l.ensureSingle(o,"g",d.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),u=0;uw,k=l.barLength+2*l.barPad,A=l.barWidth+2*l.barPad,L=p,S=m+v;S+A>c&&(S=c-A);var D=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,l.barColor),T?(this.hbar=D.attr({rx:l.barRadius,ry:l.barRadius,x:L,y:S,width:k,height:A}),this._hbarXMin=L+k/2,this._hbarTranslateMax=w-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=v>M,O=l.barWidth+2*l.barPad,P=l.barLength+2*l.barPad,I=p+g,R=m;I+O>s&&(I=s-O);var z=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,l.barColor),C?(this.vbar=z.attr({rx:l.barRadius,ry:l.barRadius,x:I,y:R,width:O,height:P}),this._vbarYMin=R+P/2,this._vbarTranslateMax=M-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var N=this.id,F=u-.5,E=C?d+O+.5:d+.5,j=f-.5,H=T?h+A+.5:h+.5,B=o._topdefs.selectAll("#"+N).data(T||C?[0]:[]);if(B.exit().remove(),B.enter().append("clipPath").attr("id",N).append("rect"),T||C?(this._clipRect=B.select("rect").attr({x:Math.floor(F),y:Math.floor(j),width:Math.ceil(E)-Math.floor(F),height:Math.ceil(H)-Math.floor(j)}),this.container.call(i.setClipUrl,N,this.gd),this.bg.attr({x:p,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),T||C){var Y=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var U=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(U),C&&this.vbar.on(".drag",null).call(U)}this.setTranslate(t,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},l.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=n.event.dx),this.vbar&&(t-=n.event.dy),this.setTranslate(e,t)},l.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=n.event.deltaY),this.vbar&&(t+=n.event.deltaY),this.setTranslate(e,t)},l.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,a=r+this._hbarTranslateMax;e=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=t+this._vbarYMin,l=i+this._vbarTranslateMax;t=(o.constrain(n.event.y,i,l)-i)/(l-i)*(this.position.h-this._box.h)}this.setTranslate(e,t)},l.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=o.constrain(e||0,0,r),t=o.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var a=e/r;this.hbar.call(i.setTranslate,e+a*this._hbarTranslateMax,t)}if(this.vbar){var l=t/n;this.vbar.call(i.setTranslate,e,t+l*this._vbarTranslateMax)}}},{"../../lib":224,"../color":95,"../drawing":117,"@plotly/d3":5}],200:[function(e,t,r){"use strict";t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},{}],201:[function(e,t,r){"use strict";t.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}},{}],202:[function(e,t,r){"use strict";t.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},{}],203:[function(e,t,r){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],204:[function(e,t,r){"use strict";t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},{}],205:[function(e,t,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],206:[function(e,t,r){"use strict";r.version=e("./version").version,e("native-promise-only"),e("../build/plotcss");for(var n=e("./registry"),a=r.register=n.register,i=e("./plot_api"),o=Object.keys(i),l=0;lplotly-logomark"}}},{}],208:[function(e,t,r){"use strict";r.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},r.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},r.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},r.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},r.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},r.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},{}],209:[function(e,t,r){"use strict";var n=e("./mod"),a=n.mod,i=n.modHalf,o=Math.PI,l=2*o;function s(e){return Math.abs(e[1]-e[0])>l-1e-14}function c(e,t){return i(t-e,l)}function u(e,t){if(s(t))return!0;var r,n;t[0](n=a(n,l))&&(n+=l);var i=a(e,l),o=i+l;return i>=r&&i<=n||o>=r&&o<=n}function d(e,t,r,n,a,i,c){a=a||0,i=i||0;var u,d,f,h,p,g=s([r,n]);function m(e,t){return[e*Math.cos(t)+a,i-e*Math.sin(t)]}g?(u=0,d=o,f=l):r=a&&e<=i);var a,i},pathArc:function(e,t,r,n,a){return d(null,e,t,r,n,a,0)},pathSector:function(e,t,r,n,a){return d(null,e,t,r,n,a,1)},pathAnnulus:function(e,t,r,n,a,i){return d(e,t,r,n,a,i,1)}}},{"./mod":231}],210:[function(e,t,r){"use strict";var n=Array.isArray,a=ArrayBuffer,i=DataView;function o(e){return a.isView(e)&&!(e instanceof i)}function l(e){return n(e)||o(e)}function s(e,t,r){if(l(e)){if(l(e[0])){for(var n=r,a=0;aa.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,a){e%1||!n(e)||void 0!==a.min&&ea.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var a="number"==typeof e;!0!==n.strict&&a?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){a(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return a(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(o.get(e,r))}},angle:{coerceFunction:function(e,t,r){"auto"===e?t.set("auto"):n(e)?t.set(d(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||u(r);"string"==typeof e&&a.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!u(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if("string"==typeof e)if(-1===(n.extras||[]).indexOf(e)){for(var a=e.split("+"),i=0;i=n&&e<=a?e:u}if("string"!=typeof e&&"number"!=typeof e)return u;e=String(e);var c=_(t),v=e.charAt(0);!c||"G"!==v&&"g"!==v||(e=e.substr(1),t="");var w=c&&"chinese"===t.substr(0,7),M=e.match(w?x:y);if(!M)return u;var T=M[1],k=M[3]||"1",A=Number(M[5]||1),L=Number(M[7]||0),S=Number(M[9]||0),D=Number(M[11]||0);if(c){if(2===T.length)return u;var C;T=Number(T);try{var O=m.getComponentMethod("calendars","getCal")(t);if(w){var P="i"===k.charAt(k.length-1);k=parseInt(k,10),C=O.newDate(T,O.toMonthIndex(T,k,P),A)}else C=O.newDate(T,Number(k),A)}catch(e){return u}return C?(C.toJD()-g)*d+L*f+S*h+D*p:u}T=2===T.length?(Number(T)+2e3-b)%100+b:Number(T),k-=1;var I=new Date(Date.UTC(2e3,k,A,L,S));return I.setUTCFullYear(T),I.getUTCMonth()!==k||I.getUTCDate()!==A?u:I.getTime()+D*p},n=r.MIN_MS=r.dateTime2ms("-9999"),a=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(e,t){return r.dateTime2ms(e,t)!==u};var M=90*d,T=3*f,k=5*h;function A(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+w(t,2)+":"+w(r,2),(n||a)&&(e+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;e+="."+w(a,i)}return e}r.ms2DateTime=function(e,t,r){if("number"!=typeof e||!(e>=n&&e<=a))return u;t||(t=0);var i,o,l,c,y,x,b=Math.floor(10*s(e+.05,1)),w=Math.round(e-b/10);if(_(r)){var L=Math.floor(w/d)+g,S=Math.floor(s(e,d));try{i=m.getComponentMethod("calendars","getCal")(r).fromJD(L).formatDate("yyyy-mm-dd")}catch(e){i=v("G%Y-%m-%d")(new Date(w))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=t=n+d&&e<=a-d))return u;var t=Math.floor(10*s(e+.05,1)),r=new Date(Math.round(e-t/10));return A(i("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},r.cleanDate=function(e,t,n){if(e===u)return t;if(r.isJSDate(e)||"number"==typeof e&&isFinite(e)){if(_(n))return l.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(!(e=r.ms2DateTimeLocal(+e))&&void 0!==t)return t}else if(!r.isDateTime(e,n))return l.error("unrecognized date",e),t;return e};var L=/%\d?f/g,S=/%h/g,D={1:"1",2:"1",3:"2",4:"2"};function C(e,t,r,n){e=e.replace(L,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(t+.05));if(e=e.replace(S,(function(){return D[r("%q")(a)]})),_(n))try{e=m.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(e){return"Invalid"}return r(e)(a)}var O=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(e,t,r,n,a,i){if(a=_(a)&&a,!t)if("y"===r)t=i.year;else if("m"===r)t=i.month;else{if("d"!==r)return function(e,t){var r=s(e+.05,d),n=w(Math.floor(r/f),2)+":"+w(s(Math.floor(r/h),60),2);if("M"!==t){o(t)||(t=0);var a=(100+Math.min(s(e/p,60),O[t])).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(e,r)+"\n"+C(i.dayMonthYear,e,n,a);t=i.dayMonth+"\n"+i.year}return C(t,e,n,a)};var P=3*d;r.incrementMonth=function(e,t,r){r=_(r)&&r;var n=s(e,d);if(e=Math.round(e-n),r)try{var a=Math.round(e/d)+g,i=m.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-g)*d+n}catch(t){l.error("invalid ms "+e+" in calendar "+r)}var c=new Date(e+P);return c.setUTCMonth(c.getUTCMonth()+t)+n-P},r.findExactDates=function(e,t){for(var r,n,a=0,i=0,l=0,s=0,c=_(t)&&m.getComponentMethod("calendars","getCal")(t),u=0;u1||g<0||g>1?null:{x:e+s*g,y:t+d*g}}function s(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,l=a-t;return o*o+l*l}var s=n*t-a*e;return s*s/r}r.segmentsIntersect=l,r.segmentDistance=function(e,t,r,n,a,i,o,c){if(l(e,t,r,n,a,i,o,c))return 0;var u=r-e,d=n-t,f=o-a,h=c-i,p=u*u+d*d,g=f*f+h*h,m=Math.min(s(u,d,p,a-e,i-t),s(u,d,p,o-e,c-t),s(f,h,g,e-a,t-i),s(f,h,g,r-a,n-i));return Math.sqrt(m)},r.getTextLocation=function(e,t,r,l){if(e===a&&l===i||(n={},a=e,i=l),n[r])return n[r];var s=e.getPointAtLength(o(r-l/2,t)),c=e.getPointAtLength(o(r+l/2,t)),u=Math.atan((c.y-s.y)/(c.x-s.x)),d=e.getPointAtLength(o(r,t)),f={x:(4*d.x+s.x+c.x)/6,y:(4*d.y+s.y+c.y)/6,theta:u};return n[r]=f,f},r.clearLocationCache=function(){a=null},r.getVisibleSegment=function(e,t,r){var n,a,i=t.left,o=t.right,l=t.top,s=t.bottom,c=0,u=e.getTotalLength(),d=u;function f(t){var r=e.getPointAtLength(t);0===t?n=r:t===u&&(a=r);var c=r.xo?r.x-o:0,d=r.ys?r.y-s:0;return Math.sqrt(c*c+d*d)}for(var h=f(c);h;){if((c+=h+r)>d)return;h=f(c)}for(h=f(d);h;){if(c>(d-=h+r))return;h=f(d)}return{min:c,max:d,len:d-c,total:u,isClosed:0===c&&d===u&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},r.findPointOnPath=function(e,t,r,n){for(var a,i,o,l=(n=n||{}).pathLength||e.getTotalLength(),s=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(l)[r]?-1:1,d=0,f=0,h=l;d0?h=a:f=a,d++}return i}},{"./mod":231}],222:[function(e,t,r){"use strict";t.exports=function(e){return e}},{}],223:[function(e,t,r){"use strict";t.exports=function(e,t){if(!t)return e;var r=1/Math.abs(t),n=r>1?(r*e+r*t)/r:e+t,a=String(n).length;if(a>16){var i=String(t).length;if(a>=String(e).length+i){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},{}],224:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("d3-time-format").utcFormat,i=e("d3-format").format,o=e("fast-isnumeric"),l=e("../constants/numerical"),s=l.FP_SAFE,c=-s,u=l.BADNUM,d=t.exports={};d.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var f={};d.warnBadFormat=function(e){var t=String(e);f[t]||(f[t]=1,d.warn('encountered bad format: "'+t+'"'))},d.noFormat=function(e){return String(e)},d.numberFormat=function(e){var t;try{t=i(d.adjustFormat(e))}catch(t){return d.warnBadFormat(e),d.noFormat}return t},d.nestedProperty=e("./nested_property"),d.keyedContainer=e("./keyed_container"),d.relativeAttr=e("./relative_attr"),d.isPlainObject=e("./is_plain_object"),d.toLogRange=e("./to_log_range"),d.relinkPrivateKeys=e("./relink_private");var h=e("./array");d.isTypedArray=h.isTypedArray,d.isArrayOrTypedArray=h.isArrayOrTypedArray,d.isArray1D=h.isArray1D,d.ensureArray=h.ensureArray,d.concat=h.concat,d.maxRowLength=h.maxRowLength,d.minRowLength=h.minRowLength;var p=e("./mod");d.mod=p.mod,d.modHalf=p.modHalf;var g=e("./coerce");d.valObjectMeta=g.valObjectMeta,d.coerce=g.coerce,d.coerce2=g.coerce2,d.coerceFont=g.coerceFont,d.coercePattern=g.coercePattern,d.coerceHoverinfo=g.coerceHoverinfo,d.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,d.validate=g.validate;var m=e("./dates");d.dateTime2ms=m.dateTime2ms,d.isDateTime=m.isDateTime,d.ms2DateTime=m.ms2DateTime,d.ms2DateTimeLocal=m.ms2DateTimeLocal,d.cleanDate=m.cleanDate,d.isJSDate=m.isJSDate,d.formatDate=m.formatDate,d.incrementMonth=m.incrementMonth,d.dateTick0=m.dateTick0,d.dfltRange=m.dfltRange,d.findExactDates=m.findExactDates,d.MIN_MS=m.MIN_MS,d.MAX_MS=m.MAX_MS;var v=e("./search");d.findBin=v.findBin,d.sorterAsc=v.sorterAsc,d.sorterDes=v.sorterDes,d.distinctVals=v.distinctVals,d.roundUp=v.roundUp,d.sort=v.sort,d.findIndexOfMin=v.findIndexOfMin,d.sortObjectKeys=e("./sort_object_keys");var y=e("./stats");d.aggNums=y.aggNums,d.len=y.len,d.mean=y.mean,d.median=y.median,d.midRange=y.midRange,d.variance=y.variance,d.stdev=y.stdev,d.interp=y.interp;var x=e("./matrix");d.init2dArray=x.init2dArray,d.transposeRagged=x.transposeRagged,d.dot=x.dot,d.translationMatrix=x.translationMatrix,d.rotationMatrix=x.rotationMatrix,d.rotationXYMatrix=x.rotationXYMatrix,d.apply3DTransform=x.apply3DTransform,d.apply2DTransform=x.apply2DTransform,d.apply2DTransform2=x.apply2DTransform2,d.convertCssMatrix=x.convertCssMatrix,d.inverseTransformMatrix=x.inverseTransformMatrix;var b=e("./angles");d.deg2rad=b.deg2rad,d.rad2deg=b.rad2deg,d.angleDelta=b.angleDelta,d.angleDist=b.angleDist,d.isFullCircle=b.isFullCircle,d.isAngleInsideSector=b.isAngleInsideSector,d.isPtInsideSector=b.isPtInsideSector,d.pathArc=b.pathArc,d.pathSector=b.pathSector,d.pathAnnulus=b.pathAnnulus;var _=e("./anchor_utils");d.isLeftAnchor=_.isLeftAnchor,d.isCenterAnchor=_.isCenterAnchor,d.isRightAnchor=_.isRightAnchor,d.isTopAnchor=_.isTopAnchor,d.isMiddleAnchor=_.isMiddleAnchor,d.isBottomAnchor=_.isBottomAnchor;var w=e("./geometry2d");d.segmentsIntersect=w.segmentsIntersect,d.segmentDistance=w.segmentDistance,d.getTextLocation=w.getTextLocation,d.clearLocationCache=w.clearLocationCache,d.getVisibleSegment=w.getVisibleSegment,d.findPointOnPath=w.findPointOnPath;var M=e("./extend");d.extendFlat=M.extendFlat,d.extendDeep=M.extendDeep,d.extendDeepAll=M.extendDeepAll,d.extendDeepNoArrays=M.extendDeepNoArrays;var T=e("./loggers");d.log=T.log,d.warn=T.warn,d.error=T.error;var k=e("./regex");d.counterRegex=k.counter;var A=e("./throttle");d.throttle=A.throttle,d.throttleDone=A.done,d.clearThrottle=A.clear;var L=e("./dom");function S(e){var t={};for(var r in e)for(var n=e[r],a=0;as||e=t)&&(o(e)&&e>=0&&e%1==0)},d.noop=e("./noop"),d.identity=e("./identity"),d.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},d.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},d.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,r)?a>10?(d.warn("randstr failed uniqueness"),s):e(t,r,n,(a||0)+1):s},d.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},d.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,a,i,o=e.length,l=2*o,s=2*t-1,c=new Array(s),u=new Array(o);for(r=0;r=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=o&&(a=l-1-a),i+=e[a]*c[n];u[r]=i}return u},d.syncOrAsync=function(e,t,r){var n;function a(){return d.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(a);return r&&r(t)},d.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},d.noneOrAll=function(e,t,r){if(e){var n,a=!1,i=!0;for(n=0;n0?t:0}))},d.fillArray=function(e,t,r,n){if(n=n||d.identity,d.isArrayOrTypedArray(e))for(var a=0;a1?a+o[1]:"";if(i&&(o.length>1||l.length>4||r))for(;n.test(l);)l=l.replace(n,"$1"+i+"$2");return l+s},d.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var R=/^\w*$/;d.templateString=function(e,t){var r={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,n){var a;return R.test(n)?a=t[n]:(r[n]=r[n]||d.nestedProperty(t,n).get,a=r[n]()),d.isValidTextValue(a)?a:""}))};var z={max:10,count:0,name:"hovertemplate"};d.hovertemplateString=function(){return E.apply(z,arguments)};var N={max:10,count:0,name:"texttemplate"};d.texttemplateString=function(){return E.apply(N,arguments)};var F=/^[:|\|]/;function E(e,t,r){var n=this,i=arguments;t||(t={});var o={};return e.replace(d.TEMPLATE_STRING_REGEX,(function(e,l,s){var c,u,f,h="_xother"===l||"_yother"===l,p="_xother_"===l||"_yother_"===l,g="xother_"===l||"yother_"===l,m="xother"===l||"yother"===l||h||g||p,v=l;if((h||p)&&(v=v.substring(1)),(g||p)&&(v=v.substring(0,v.length-1)),m){if(void 0===(c=t[v]))return""}else for(f=3;f=48&&o<=57,c=l>=48&&l<=57;if(s&&(n=10*n+o-48),c&&(a=10*a+l-48),!s||!c){if(n!==a)return n-a;if(o!==l)return o-l}}return a-n};var j=2e9;d.seedPseudoRandom=function(){j=2e9},d.pseudoRandom=function(){var e=j;return j=(69069*j+1)%4294967296,Math.abs(j-e)<429496729?d.pseudoRandom():j/4294967296},d.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},a=d.extractOption(e,t,"htx","hovertext");if(d.isValidTextValue(a))return n(a);var i=d.extractOption(e,t,"tx","text");return d.isValidTextValue(i)?n(i):void 0},d.isValidTextValue=function(e){return e||0===e},d.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(c=1):c=0,d.strTranslate(a-c*(r+o),i-c*(n+l))+d.strScale(c)+(s?"rotate("+s+(t?"":" "+r+" "+n)+")":"")},d.ensureUniformFontSize=function(e,t){var r=d.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},d.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},d.bigFont=function(e){return Math.round(1.2*e)};var H=d.getFirefoxVersion(),B=null!==H&&H<86;d.getPositionFromD3Event=function(){return B?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},{"../constants/numerical":204,"./anchor_utils":208,"./angles":209,"./array":210,"./clean_number":211,"./clear_responsive":213,"./coerce":214,"./dates":215,"./dom":216,"./extend":218,"./filter_unique":219,"./filter_visible":220,"./geometry2d":221,"./identity":222,"./increment":223,"./is_plain_object":225,"./keyed_container":226,"./localize":227,"./loggers":228,"./make_trace_groups":229,"./matrix":230,"./mod":231,"./nested_property":232,"./noop":233,"./notifier":234,"./preserve_drawing_buffer":237,"./push_unique":238,"./regex":240,"./relative_attr":241,"./relink_private":242,"./search":243,"./sort_object_keys":245,"./stats":246,"./throttle":248,"./to_log_range":249,"@plotly/d3":5,"d3-format":6,"d3-time-format":7,"fast-isnumeric":10}],225:[function(e,t,r){"use strict";t.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},{}],226:[function(e,t,r){"use strict";var n=e("./nested_property"),a=/^\w*$/;t.exports=function(e,t,r,i){var o,l,s;r=r||"name",i=i||"value";var c={};t&&t.length?(s=n(e,t),l=s.get()):l=e,t=t||"";var u={};if(l)for(o=0;o2)return c[t]=2|c[t],f.set(e,null);if(d){for(o=t;o1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}},i.warn=function(){var e;if(n.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}},i.error=function(){var e;if(n.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}},{"../plot_api/plot_config":258,"./notifier":234}],229:[function(e,t,r){"use strict";var n=e("@plotly/d3");t.exports=function(e,t,r){var a=e.selectAll("g."+r.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));a.exit().remove(),a.enter().append("g").attr("class",r),a.order();var i=e.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each((function(e){e[0][i]=n.select(this)})),a}},{"@plotly/d3":5}],230:[function(e,t,r){"use strict";var n=e("gl-mat4");r.init2dArray=function(e,t){for(var r=new Array(e),n=0;nt/2?e-Math.round(e/t)*t:e}}},{}],232:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./array").isArrayOrTypedArray;function i(e,t){return function(){var r,n,o,l,s,c=e;for(l=0;l/g),s=0;si||c===a||cl)&&(!t||!s(e))}:function(e,t){var s=e[0],c=e[1];if(s===a||si||c===a||cl)return!1;var u,d,f,h,p,g=r.length,m=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(d,m)||c>Math.max(f,v)))if(cu||Math.abs(n(o,f))>a)return!0;return!1},i.filter=function(e,t){var r=[e[0]],n=0,a=0;function o(o){e.push(o);var l=r.length,s=n;r.splice(a+1);for(var c=s+1;c1&&o(e.pop());return{addPt:o,raw:e,filtered:r}}},{"../constants/numerical":204,"./matrix":230}],237:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("is-mobile");t.exports=function(e){var t;if("string"!=typeof(t=e&&e.hasOwnProperty("userAgent")?e.userAgent:function(){var e;"undefined"!=typeof navigator&&(e=navigator.userAgent);e&&e.headers&&"string"==typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]);return e}()))return!0;var r=a({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var i=t.split(" "),o=1;o-1;l--){var s=i[l];if("Version/"===s.substr(0,8)){var c=s.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},{"fast-isnumeric":10,"is-mobile":44}],238:[function(e,t,r){"use strict";t.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;na.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;rt}function u(e,t){return e>=t}r.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-1e-9)-1:Math.floor((e-t.start)/t.size+1e-9);var i,o,d=0,f=t.length,h=0,p=f>1?(t[f-1]-t[0])/(f-1):1;for(o=p>=0?r?l:s:r?u:c,e+=1e-9*p*(r?-1:1)*(p>=0?1:-1);d90&&a.log("Long binary search..."),d-1},r.sorterAsc=function(e,t){return e-t},r.sorterDes=function(e,t){return t-e},r.distinctVals=function(e){var t,n=e.slice();for(n.sort(r.sorterAsc),t=n.length-1;t>-1&&n[t]===o;t--);for(var a,i=n[t]-n[0]||1,l=i/(t||1)/1e4,s=[],c=0;c<=t;c++){var u=n[c],d=u-a;void 0===a?(s.push(u),a=u):d>l&&(i=Math.min(i,d),s.push(u),a=u)}return{vals:s,minDiff:i}},r.roundUp=function(e,t,r){for(var n,a=0,i=t.length-1,o=0,l=r?0:1,s=r?1:0,c=r?Math.ceil:Math.floor;a0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},r.findIndexOfMin=function(e,t){t=t||i;for(var r,n=1/0,a=0;ai.length)&&(o=i.length),n(t)||(t=!1),a(i[0])){for(s=new Array(o),l=0;le.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},{"./array":210,"fast-isnumeric":10}],247:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../lib"),i=a.strTranslate,o=e("../constants/xmlns_namespaces"),l=e("../constants/alignment").LINE_SPACING,s=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(e,t,p){var k=e.text(),A=!e.attr("data-notex")&&"undefined"!=typeof MathJax&&k.match(s),D=n.select(e.node().parentNode);if(!D.empty()){var C=e.attr("class")?e.attr("class").split(" ")[0]:"text";return C+="-math",D.selectAll("svg."+C).remove(),D.selectAll("g."+C+"-group").remove(),e.style("display",null).attr({"data-unformatted":k,"data-math":"N"}),A?(t&&t._promises||[]).push(new Promise((function(t){e.style("display","none");var r=parseInt(e.node().style.fontSize,10),o={fontSize:r};!function(e,t,r){var i,o,l,s;MathJax.Hub.Queue((function(){return o=a.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]},displayAlign:"left"})}),(function(){if("SVG"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),(function(){var r="math-output-"+a.randstr({},64);return s=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute"}).style({"font-size":t.fontSize+"px"}).text(e.replace(c,"\\lt ").replace(u,"\\gt ")),MathJax.Hub.Typeset(s.node())}),(function(){var t=n.select("body").select("#MathJax_SVG_glyphs");if(s.select(".MathJax_SVG").empty()||!s.select("svg").node())a.log("There was an error in the tex syntax.",e),r();else{var o=s.select("svg").node().getBoundingClientRect();r(s.select(".MathJax_SVG"),t,o)}if(s.remove(),"SVG"!==i)return MathJax.Hub.setRenderer(i)}),(function(){return void 0!==l&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(o)}))}(A[2],o,(function(n,a,o){D.selectAll("svg."+C).remove(),D.selectAll("g."+C+"-group").remove();var l=n&&n.select("svg");if(!l||!l.node())return O(),void t();var s=D.append("g").classed(C+"-group",!0).attr({"pointer-events":"none","data-unformatted":k,"data-math":"Y"});s.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild);var c=o.width,u=o.height;l.attr({class:C,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var d=e.node().style.fill||"black",f=l.select("g");f.attr({fill:d,stroke:d});var h=f.node().getBoundingClientRect(),g=h.width,m=h.height;(g>c||m>u)&&(l.style("overflow","hidden"),g=(h=l.node().getBoundingClientRect()).width,m=h.height);var v=+e.attr("x"),y=+e.attr("y"),x=-(r||e.node().getBoundingClientRect().height)/4;if("y"===C[0])s.attr({transform:"rotate("+[-90,v,y]+")"+i(-g/2,x-m/2)});else if("l"===C[0])y=x-m/2;else if("a"===C[0]&&0!==C.indexOf("atitle"))v=0,y=x;else{var b=e.attr("text-anchor");v-=g*("middle"===b?.5:"end"===b?1:0),y=y+x-m/2}l.attr({x:v,y:y}),p&&p.call(e,s),t(s)}))}))):O(),e}function O(){D.empty()||(C=e.attr("class")+"-math",D.select("svg."+C).remove()),e.text("").style("white-space","pre"),function(e,t){t=t.replace(g," ");var r,i=!1,s=[],c=-1;function u(){c++;var t=document.createElementNS(o.svg,"tspan");n.select(t).attr({class:"line",dy:c*l+"em"}),e.appendChild(t),r=t;var a=s;if(s=[{node:t}],a.length>1)for(var i=1;i doesnt match end tag <"+e+">. Pretending it did match.",t),r=s[s.length-1].node}else a.log("Ignoring unexpected end tag .",t)}y.test(t)?u():(r=e,s=[{node:e}]);for(var D=t.split(m),C=0;C|>|>)/g;var d={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},f={sub:"0.3em",sup:"-0.6em"},h={sub:"-0.21em",sup:"0.42em"},p=["http:","https:","mailto:","",void 0,":"],g=r.NEWLINES=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,v=/<(\/?)([^ >]*)(\s+(.*))?>/i,y=//i;r.BR_TAG_ALL=//gi;var x=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,b=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,_=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,w=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function M(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&L(n)}var T=/(^|;)\s*color:/;r.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],a="...".length,i=e.split(m),o=[],l="",s=0,c=0;ca?o.push(u.substr(0,p-a)+"..."):o.push(u.substr(0,p));break}l=""}}return o.join("")};var k={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},A=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function L(e){return e.replace(A,(function(e,t){return("#"===t.charAt(0)?function(e){if(e>1114111)return;var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):k[t])||e}))}function S(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var a=r.protocol,i=n.protocol;return-1!==p.indexOf(a)&&-1!==p.indexOf(i)?t:""}function D(e,t,r){var n,i,o,l=r.horizontalAlign,s=r.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return i="bottom"===s?function(){return c.bottom-n.height}:"middle"===s?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="right"===l?function(){return c.right-n.width}:"center"===l?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var e=o()-u.left,t=i()-u.top,l=r.gd||{};if(r.gd){l._fullLayout._calcInverseTransform(l);var s=a.apply3DTransform(l._fullLayout._invTransform)(e,t);e=s[0],t=s[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}r.convertEntities=L,r.sanitizeHTML=function(e){e=e.replace(g," ");for(var t=document.createElement("p"),r=t,a=[],i=e.split(m),o=0;oi.ts+t?s():i.timer=setTimeout((function(){s(),i.timer=null}),t)},r.done=function(e){var t=n[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},r.clear=function(e){if(e)a(n[e]),delete n[e];else for(var t in n)r.clear(t)}},{}],249:[function(e,t,r){"use strict";var n=e("fast-isnumeric");t.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var r=Math.log(Math.min(t[0],t[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),r}},{"fast-isnumeric":10}],250:[function(e,t,r){"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],251:[function(e,t,r){"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},{}],252:[function(e,t,r){"use strict";var n=e("../registry");t.exports=function(e){for(var t,r,a=n.layoutArrayContainers,i=n.layoutArrayRegexes,o=e.split("[")[0],l=0;l0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},r.cleanLayout=function(e){var t,n;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var i=(l.subplotsRegistry.cartesian||{}).attrRegex,s=(l.subplotsRegistry.polar||{}).attrRegex,d=(l.subplotsRegistry.ternary||{}).attrRegex,f=(l.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(e);for(t=0;t3?(I.x=1.02,I.xanchor="left"):I.x<-2&&(I.x=-.02,I.xanchor="right"),I.y>3?(I.y=1.02,I.yanchor="bottom"):I.y<-2&&(I.y=-.02,I.yanchor="top")),p(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),c.clean(e),e.template&&e.template.layout&&r.cleanLayout(e.template.layout),e},r.cleanData=function(e){for(var t=0;t0)return e.substr(0,t)}r.hasParent=function(e,t){for(var r=b(t);r;){if(r in e)return!0;r=b(r)}return!1};var _=["x","y","z"];r.clearAxisTypes=function(e,t,r){for(var n=0;n1&&i.warn("Full array edits are incompatible with other edits",d);var y=r[""][""];if(c(y))t.set(null);else{if(!Array.isArray(y))return i.warn("Unrecognized full array edit value",d,y),!0;t.set(y)}return!g&&(f(m,v),h(e),!0)}var x,b,_,w,M,T,k,A,L=Object.keys(r).map(Number).sort(o),S=t.get(),D=S||[],C=u(v,d).get(),O=[],P=-1,I=D.length;for(x=0;xD.length-(k?0:1))i.warn("index out of range",d,_);else if(void 0!==T)M.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",d,_),c(T)?O.push(_):k?("add"===T&&(T={}),D.splice(_,0,T),C&&C.splice(_,0,{})):i.warn("Unrecognized full object edit value",d,_,T),-1===P&&(P=_);else for(b=0;b=0;x--)D.splice(O[x],1),C&&C.splice(O[x],1);if(D.length?S||t.set(D):t.set(null),g)return!1;if(f(m,v),p!==a){var R;if(-1===P)R=L;else{for(I=Math.max(D.length,I),R=[],x=0;x=P);x++)R.push(_);for(x=P;x=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function P(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),O(e,t,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&O(e,r,"newIndices"),void 0!==r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function I(e,t,r,n,i){!function(e,t,r,n){var a=o.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(t))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var i in O(e,r,"indices"),t){if(!Array.isArray(t[i])||t[i].length!==r.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in n)||!Array.isArray(n[i])||n[i].length!==t[i].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(e,t,r,n);for(var s=function(e,t,r,n){var i,s,c,u,d,f=o.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=C(r,e.data.length-1),t)for(var g=0;g-1&&-1===r.indexOf("grouptitlefont")?s(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?s(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?s(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&s(r,r.replace("titleoffset","title.offset")):s(r,r.replace("title","title.text"));function s(t,r){e[r]=e[t],delete e[t]}}function B(e,t,r){e=o.getGraphDiv(e),_.clearPromiseQueue(e);var n={};if("string"==typeof t)n[t]=r;else{if(!o.isPlainObject(t))return o.warn("Relayout fail.",t,r),Promise.reject();n=o.extendFlat({},t)}Object.keys(n).length&&(e.changed=!0);var a=Z(e,n),i=a.flags;i.calc&&(e.calcdata=void 0);var l=[f.previousPromises];i.layoutReplot?l.push(w.layoutReplot):Object.keys(n).length&&(Y(e,i,a)||f.supplyDefaults(e),i.legend&&l.push(w.doLegend),i.layoutstyle&&l.push(w.layoutStyles),i.axrange&&U(l,a.rangesAltered),i.ticks&&l.push(w.doTicksRelayout),i.modebar&&l.push(w.doModeBar),i.camera&&l.push(w.doCamera),i.colorbars&&l.push(w.doColorBars),l.push(A)),l.push(f.rehover,f.redrag),c.add(e,B,[e,a.undoit],B,[e,a.redoit]);var s=o.syncOrAsync(l,e);return s&&s.then||(s=Promise.resolve(e)),s.then((function(){return e.emit("plotly_relayout",a.eventData),e}))}function Y(e,t,r){var n=e._fullLayout;if(!t.axrange)return!1;for(var a in t)if("axrange"!==a&&t[a])return!1;for(var i in r.rangesAltered){var o=h.id2name(i),l=e.layout[o],s=n[o];if(s.autorange=l.autorange,l.range&&(s.range=l.range.slice()),s.cleanRange(),s._matchGroup)for(var c in s._matchGroup)if(c!==i){var u=n[h.id2name(c)];u.autorange=s.autorange,u.range=s.range.slice(),u._input.range=s.range.slice()}}return!0}function U(e,t){var r=t?function(e){var r=[],n=!0;for(var a in t){var i=h.getFromId(e,a);if(r.push(a),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var o in i._matchGroup)t[o]||r.push(o);i.automargin&&(n=!1)}return h.draw(e,r,{skipTitle:n})}:function(e){return h.draw(e,"redraw")};e.push(y,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var V=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,q=/^[xyz]axis[0-9]*\.autorange$/,G=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Z(e,t){var r,n,a,i=e.layout,s=e._fullLayout,c=s._guiEditing,f=F(s._preGUI,c),p=Object.keys(t),g=h.list(e),m=o.extendDeepAll({},t),v={};for(H(t),p=Object.keys(t),n=0;n0&&"string"!=typeof I.parts[z];)z--;var E=I.parts[z],j=I.parts[z-1]+"."+E,B=I.parts.slice(0,z).join("."),Y=l(e.layout,B).get(),U=l(s,B).get(),Z=I.get();if(void 0!==R){A[P]=R,L[P]="reverse"===E?R:N(Z);var J=d.getLayoutValObject(s,I.parts);if(J&&J.impliedEdits&&null!==R)for(var X in J.impliedEdits)S(o.relativeAttr(P,X),J.impliedEdits[X]);if(-1!==["width","height"].indexOf(P))if(R){S("autosize",null);var Q="height"===P?"width":"height";S(Q,s[Q])}else s[P]=e._initialAutoSize[P];else if("autosize"===P)S("width",R?null:s.width),S("height",R?null:s.height);else if(j.match(V))O(j),l(s,B+"._inputRange").set(null);else if(j.match(q)){O(j),l(s,B+"._inputRange").set(null);var K=l(s,B).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else j.match(G)&&l(s,B+"._inputDomain").set(null);if("type"===E){D=Y;var $="linear"===U.type&&"log"===R,ee="log"===U.type&&"linear"===R;if($||ee){if(D&&D.range)if(U.autorange)$&&(D.range=D.range[1]>D.range[0]?[1,2]:[2,1]);else{var te=D.range[0],re=D.range[1];$?(te<=0&&re<=0&&S(B+".autorange",!0),te<=0?te=re/1e6:re<=0&&(re=te/1e6),S(B+".range[0]",Math.log(te)/Math.LN10),S(B+".range[1]",Math.log(re)/Math.LN10)):(S(B+".range[0]",Math.pow(10,te)),S(B+".range[1]",Math.pow(10,re)))}else S(B+".autorange",!0);Array.isArray(s._subplots.polar)&&s._subplots.polar.length&&s[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete s[I.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(e,U,R,S),u.getComponentMethod("images","convertCoords")(e,U,R,S)}else S(B+".autorange",!0),S(B+".range",null);l(s,B+"._inputRange").set(null)}else if(E.match(T)){var ne=l(s,P).get(),ae=(R||{}).type;ae&&"-"!==ae||(ae="linear"),u.getComponentMethod("annotations","convertCoords")(e,ne,ae,S),u.getComponentMethod("images","convertCoords")(e,ne,ae,S)}var ie=b.containerArrayMatch(P);if(ie){r=ie.array,n=ie.index;var oe=ie.property,le=J||{editType:"calc"};""!==n&&""===oe&&(b.isAddVal(R)?L[P]=null:b.isRemoveVal(R)?L[P]=(l(i,r).get()||[])[n]:o.warn("unrecognized full object value",t)),M.update(k,le),v[r]||(v[r]={});var se=v[r][n];se||(se=v[r][n]={}),se[oe]=R,delete t[P]}else"reverse"===E?(Y.range?Y.range.reverse():(S(B+".autorange",!0),Y.range=[1,0]),U.autorange?k.calc=!0:k.plot=!0):(s._has("scatter-like")&&s._has("regl")&&"dragmode"===P&&("lasso"===R||"select"===R)&&"lasso"!==Z&&"select"!==Z||s._has("gl2d")?k.plot=!0:J?M.update(k,J):k.calc=!0,I.set(R))}}for(r in v){b.applyContainerArrayChanges(e,f(i,r),v[r],k,f)||(k.plot=!0)}for(var ce in C){var ue=(D=h.getFromId(e,ce))&&D._constraintGroup;if(ue)for(var de in k.calc=!0,ue)C[de]||(h.getFromId(e,de)._constraintShrinkable=!0)}return(W(e)||t.height||t.width)&&(k.plot=!0),(k.plot||k.calc)&&(k.layoutReplot=!0),{flags:k,rangesAltered:C,undoit:L,redoit:A,eventData:m}}function W(e){var t=e._fullLayout,r=t.width,n=t.height;return e.layout.autosize&&f.plotAutoSize(e,e.layout,t),t.width!==r||t.height!==n}function J(e,t,n,a){e=o.getGraphDiv(e),_.clearPromiseQueue(e),o.isPlainObject(t)||(t={}),o.isPlainObject(n)||(n={}),Object.keys(t).length&&(e.changed=!0),Object.keys(n).length&&(e.changed=!0);var i=_.coerceTraceIndices(e,a),l=j(e,o.extendFlat({},t),i),s=l.flags,u=Z(e,o.extendFlat({},n)),d=u.flags;(s.calc||d.calc)&&(e.calcdata=void 0),s.clearAxisTypes&&_.clearAxisTypes(e,i,n);var h=[];d.layoutReplot?h.push(w.layoutReplot):s.fullReplot?h.push(r._doPlot):(h.push(f.previousPromises),Y(e,d,u)||f.supplyDefaults(e),s.style&&h.push(w.doTraceStyle),(s.colorbars||d.colorbars)&&h.push(w.doColorBars),d.legend&&h.push(w.doLegend),d.layoutstyle&&h.push(w.layoutStyles),d.axrange&&U(h,u.rangesAltered),d.ticks&&h.push(w.doTicksRelayout),d.modebar&&h.push(w.doModeBar),d.camera&&h.push(w.doCamera),h.push(A)),h.push(f.rehover,f.redrag),c.add(e,J,[e,l.undoit,u.undoit,l.traces],J,[e,l.redoit,u.redoit,l.traces]);var p=o.syncOrAsync(h,e);return p&&p.then||(p=Promise.resolve(e)),p.then((function(){return e.emit("plotly_update",{data:l.eventData,layout:u.eventData}),e}))}function X(e){return function(t){t._fullLayout._guiEditing=!0;var r=e.apply(null,arguments);return t._fullLayout._guiEditing=!1,r}}var Q=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],K=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function $(e,t){for(var r=0;r1;)if(n.pop(),void 0!==(r=l(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function te(e,t){for(var r=0;r=a.length?a[0]:a[e]:a}function s(e){return Array.isArray(i)?e>=i.length?i[0]:i[e]:i}function c(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(i,u){function d(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,f.transition(e,t.frame.data,t.frame.layout,_.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function h(){e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var t=function(){n._animationRaf=window.requestAnimationFrame(t),Date.now()-n._lastFrameAt>n._timeToNext&&d()};t()}var p,g,m=0;function v(e){return Array.isArray(a)?m>=a.length?e.transitionOpts=a[m]:e.transitionOpts=a[0]:e.transitionOpts=a,m++,e}var y=[],x=null==t,b=Array.isArray(t);if(!x&&!b&&o.isPlainObject(t))y.push({type:"object",data:v(o.extendFlat({},t))});else if(x||-1!==["string","number"].indexOf(typeof t))for(p=0;p0&&TT)&&k.push(g);y=k}}y.length>0?function(t){if(0!==t.length){for(var a=0;a=0;n--)if(o.isPlainObject(t[n])){var g=t[n].name,m=(u[g]||p[g]||{}).name,v=t[n].name,y=u[m]||p[m];m&&v&&"number"==typeof v&&y&&k<5&&(k++,o.warn('addFrames: overwriting frame "'+(u[m]||p[m]).name+'" with a frame whose name of type "number" also equates to "'+m+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===k&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[g]={name:g},h.push({frame:f.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:d+n})}h.sort((function(e,t){return e.index>t.index?-1:e.index=0;n--){if("number"==typeof(a=h[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+e._transitionData._counter++];);if(u[a.name]){for(i=0;i=0;r--)n=t[r],i.push({type:"delete",index:n}),l.unshift({type:"insert",index:n,value:a[n]});var s=f.modifyFrames,u=f.modifyFrames,d=[e,l],h=[e,i];return c&&c.add(e,s,d,u,h),f.modifyFrames(e,i)},r.addTraces=function e(t,n,a){t=o.getGraphDiv(t);var i,l,s=[],u=r.deleteTraces,d=e,f=[t,s],h=[t,n];for(function(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&r=0&&r=i.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!y(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function y(e){return e===Math.round(e)&&e>=0}function x(){var e,t,r={};for(e in d(r,o),n.subplotsRegistry){if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a=s.length)return!1;a=(r=(n.transformsRegistry[s[c].type]||{}).attributes)&&r[t[2]],l=3}else{var u=e._module;if(u||(u=(n.modules[e.type||i.type.dflt]||{})._module),!u)return!1;if(!(a=(r=u.attributes)&&r[o])){var d=u.basePlotModule;d&&d.attributes&&(a=d.attributes[o])}a||(a=i[o])}return v(a,t,l)},r.getLayoutValObject=function(e,t){return v(function(e,t){var r,a,i,l,s=e._basePlotModules;if(s){var c;for(r=0;r=a&&(r._input||{})._templateitemname;o&&(i=a);var l,s=t+"["+i+"]";function c(){l={},o&&(l[s]={},l[s].templateitemname=o)}function u(e,t){o?n.nestedProperty(l[s],e).set(t):l[s+"."+e]=t}function d(){var e=l;return c(),e}return c(),{modifyBase:function(e,t){l[e]=t},modifyItem:u,getUpdateObj:d,applyUpdate:function(t,r){t&&u(t,r);var a=d();for(var i in a)n.nestedProperty(e,i).set(a[i])}}}},{"../lib":224,"../plots/attributes":267}],261:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../registry"),i=e("../plots/plots"),o=e("../lib"),l=e("../lib/clear_gl_canvases"),s=e("../components/color"),c=e("../components/drawing"),u=e("../components/titles"),d=e("../components/modebar"),f=e("../plots/cartesian/axes"),h=e("../constants/alignment"),p=e("../plots/cartesian/constraints"),g=p.enforce,m=p.clean,v=e("../plots/cartesian/autorange").doAutoRange;function y(e,t,r){for(var n=0;n=e[1]||a[1]<=e[0])&&(i[0]t[0]))return!0}return!1}function x(e){var t,a,l,u,p,g,m=e._fullLayout,v=m._size,x=v.p,_=f.list(e,"",!0);if(m._paperdiv.style({width:e._context.responsive&&m.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":m.width+"px",height:e._context.responsive&&m.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":m.height+"px"}).selectAll(".main-svg").call(c.setSize,m.width,m.height),e._context.setBackground(e,m.paper_bgcolor),r.drawMainTitle(e),d.manage(e),!m._has("cartesian"))return i.previousPromises(e);function M(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-x-n:t._offset+t._length+x+n:v.t+v.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+x+n:t._offset-x-n:v.l+v.w*(e.position||0)+n%1}for(t=0;t<_.length;t++){var T=(u=_[t])._anchorAxis;u._linepositions={},u._lw=c.crispRound(e,u.linewidth,1),u._mainLinePosition=M(u,T,u.side),u._mainMirrorPosition=u.mirror&&T?M(u,T,h.OPPOSITE_SIDE[u.side]):null}var k=[],A=[],L=[],S=1===s.opacity(m.paper_bgcolor)&&1===s.opacity(m.plot_bgcolor)&&m.paper_bgcolor===m.plot_bgcolor;for(a in m._plots)if((l=m._plots[a]).mainplot)l.bg&&l.bg.remove(),l.bg=void 0;else{var D=l.xaxis.domain,C=l.yaxis.domain,O=l.plotgroup;if(y(D,C,L)){var P=O.node(),I=l.bg=o.ensureSingle(O,"rect","bg");P.insertBefore(I.node(),P.childNodes[0]),A.push(a)}else O.select("rect.bg").remove(),L.push([D,C]),S||(k.push(a),A.push(a))}var R,z,N,F,E,j,H,B,Y,U,V,q,G,Z=m._bgLayer.selectAll(".bg").data(k);for(Z.enter().append("rect").classed("bg",!0),Z.exit().remove(),Z.each((function(e){m._plots[e].bg=n.select(this)})),t=0;tM?u.push({code:"unused",traceType:y,templateCount:w,dataCount:M}):M>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:M})}}else u.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var i=t[n],o=g(t,n,r);a(i)?(Array.isArray(t)&&!1===i._template&&i.templateitemname&&u.push({code:"missing",path:o,templateitemname:i.templateitemname}),e(i,o)):Array.isArray(i)&&m(i)&&e(i,o)}}({data:h,layout:f},""),u.length)return u.map(v)}},{"../lib":224,"../plots/attributes":267,"../plots/plots":308,"./plot_config":258,"./plot_schema":259,"./plot_template":260}],263:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./plot_api"),i=e("../plots/plots"),o=e("../lib"),l=e("../snapshot/helpers"),s=e("../snapshot/tosvg"),c=e("../snapshot/svgtoimg"),u=e("../version").version,d={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){var r,f,h,p;function g(e){return!(e in t)||o.validate(t[e],d[e])}if(t=t||{},o.isPlainObject(e)?(r=e.data||[],f=e.layout||{},h=e.config||{},p={}):(e=o.getGraphDiv(e),r=o.extendDeep([],e.data),f=o.extendDeep({},e.layout),h=e._context,p=e._fullLayout||{}),!g("width")&&null!==t.width||!g("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!g("format"))throw new Error("Export format is not "+o.join2(d.format.values,", "," or ")+".");var m={};function v(e,r){return o.coerce(t,m,d,e,r)}var y=v("format"),x=v("width"),b=v("height"),_=v("scale"),w=v("setBackground"),M=v("imageDataOnly"),T=document.createElement("div");T.style.position="absolute",T.style.left="-5000px",document.body.appendChild(T);var k=o.extendFlat({},f);x?k.width=x:null===t.width&&n(p.width)&&(k.width=p.width),b?k.height=b:null===t.height&&n(p.height)&&(k.height=p.height);var A=o.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),L=l.getRedrawFunc(T);function S(){return new Promise((function(e){setTimeout(e,l.getDelay(T._fullLayout))}))}function D(){return new Promise((function(e,t){var r=s(T,y,_),n=T._fullLayout.width,d=T._fullLayout.height;function f(){a.purge(T),document.body.removeChild(T)}if("full-json"===y){var h=i.graphJson(T,!1,"keepdata","object",!0,!0);return h.version=u,h=JSON.stringify(h),f(),e(M?h:l.encodeJSON(h))}if(f(),"svg"===y)return e(M?r:l.encodeSVG(r));var p=document.createElement("canvas");p.id=o.randstr(),c({format:y,width:n,height:d,scale:_,canvas:p,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){a.newPlot(T,r,k,A).then(L).then(S).then(D).then((function(t){e(function(e){return M?e.replace(l.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},{"../lib":224,"../plots/plots":308,"../snapshot/helpers":314,"../snapshot/svgtoimg":316,"../snapshot/tosvg":318,"../version":350,"./plot_api":257,"fast-isnumeric":10}],264:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plots/plots"),i=e("./plot_schema"),o=e("./plot_config").dfltConfig,l=n.isPlainObject,s=Array.isArray,c=n.isArrayOrTypedArray;function u(e,t,r,a,i,o){o=o||[];for(var d=Object.keys(e),f=0;fx.length&&a.push(p("unused",i,v.concat(x.length)));var k,A,L,S,D,C=x.length,O=Array.isArray(T);if(O&&(C=Math.min(C,T.length)),2===b.dimensions)for(A=0;Ax[A].length&&a.push(p("unused",i,v.concat(A,x[A].length)));var P=x[A].length;for(k=0;k<(O?Math.min(P,T[A].length):P);k++)L=O?T[A][k]:T,S=y[A][k],D=x[A][k],n.validate(S,L)?D!==S&&D!==+S&&a.push(p("dynamic",i,v.concat(A,k),S,D)):a.push(p("value",i,v.concat(A,k),S))}else a.push(p("array",i,v.concat(A),y[A]));else for(A=0;A1&&h.push(p("object","layout"))),a.supplyDefaults(g);for(var m=g._fullData,v=r.length,y=0;y0&&Math.round(d)===d))return{vals:a};c=d}for(var f=t.calendar,h="start"===s,p="end"===s,g=e[r+"period0"],m=i(g,f)||0,v=[],y=[],x=[],b=a.length,_=0;_k;)T=o(T,-c,f);for(;T<=k;)T=o(T,c,f);M=o(T,-c,f)}else{for(T=m+(w=Math.round((k-m)/u))*u;T>k;)T-=u;for(;T<=k;)T+=u;M=T-u}v[_]=h?M:p?T:(M+T)/2,y[_]=M,x[_]=T}return{vals:v,starts:y,ends:x}}},{"../../constants/numerical":204,"../../lib":224,"fast-isnumeric":10}],269:[function(e,t,r){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},{}],270:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=e("../../lib"),o=e("../../constants/numerical").FP_SAFE,l=e("../../registry"),s=e("../../components/drawing"),c=e("./axis_ids"),u=c.getFromId,d=c.isLinked;function f(e,t){var r,n,a=[],o=e._fullLayout,l=p(o,t,0),s=p(o,t,1),c=g(e,t),u=c.min,d=c.max;if(0===u.length||0===d.length)return i.simpleMap(t.range,t.r2l);var f=u[0].val,m=d[0].val;for(r=1;r0&&((M=S-l(x)-s(b))>D?T/M>C&&(_=x,w=b,C=T/M):T/S>C&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},C=T/S));if(f===m){var O=f-1,P=f+1;if(A)if(0===f)a=[0,1];else{var I=(f>0?d:u).reduce((function(e,t){return Math.max(e,s(t))}),0),R=f/(1-Math.min(.5,I/S));a=f>0?[0,R]:[R,0]}else a=L?[Math.max(0,O),Math.max(1,P)]:[O,P]}else A?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):L&&(_.val-C*l(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),C=(w.val-_.val-h(t,x.val,b.val))/(S-l(_)-s(w)),a=[_.val-C*l(_),w.val+C*s(w)];return v&&a.reverse(),i.simpleMap(a,t.l2r||Number)}function h(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i0?r.ppadplus:r.ppadminus)||r.ppad||0),L=k((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=k(r.vpadplus||r.vpad),D=k(r.vpadminus||r.vpad);if(!M){if(f=1/0,h=-1/0,w)for(n=0;n0&&(f=i),i>h&&i-o&&(f=i),i>h&&i=P;n--)O(n);return{min:p,max:g,opts:r}},concatExtremes:g};function g(e,t,r){var n,a,i,o=t._id,l=e._fullData,s=e._fullLayout,c=[],d=[];function f(e,t){for(n=0;n=r&&(c.extrapad||!o)){l=!1;break}a(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(s,1),s--)}if(l){var u=i&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function x(e){return a(e)&&Math.abs(e)=t}},{"../../components/drawing":117,"../../constants/numerical":204,"../../lib":224,"../../registry":310,"./axis_ids":275,"@plotly/d3":5,"fast-isnumeric":10}],271:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("fast-isnumeric"),i=e("../../plots/plots"),o=e("../../registry"),l=e("../../lib"),s=l.strTranslate,c=e("../../lib/svg_text_utils"),u=e("../../components/titles"),d=e("../../components/color"),f=e("../../components/drawing"),h=e("./layout_attributes"),p=e("./clean_ticks"),g=e("../../constants/numerical"),m=g.ONEMAXYEAR,v=g.ONEAVGYEAR,y=g.ONEMINYEAR,x=g.ONEMAXQUARTER,b=g.ONEAVGQUARTER,_=g.ONEMINQUARTER,w=g.ONEMAXMONTH,M=g.ONEAVGMONTH,T=g.ONEMINMONTH,k=g.ONEWEEK,A=g.ONEDAY,L=A/2,S=g.ONEHOUR,D=g.ONEMIN,C=g.ONESEC,O=g.MINUS_SIGN,P=g.BADNUM,I={K:"zeroline"},R={K:"gridline",L:"path"},z={K:"tick",L:"path"},N={K:"tick",L:"text"},F=e("../../constants/alignment"),E=F.MID_SHIFT,j=F.CAP_SHIFT,H=F.LINE_SPACING,B=F.OPPOSITE_SIDE,Y=t.exports={};Y.setConvert=e("./set_convert");var U=e("./axis_autotype"),V=e("./axis_ids"),q=V.idSort,G=V.isLinked;Y.id2name=V.id2name,Y.name2id=V.name2id,Y.cleanId=V.cleanId,Y.list=V.list,Y.listIds=V.listIds,Y.getFromId=V.getFromId,Y.getFromTrace=V.getFromTrace;var Z=e("./autorange");Y.getAutoRange=Z.getAutoRange,Y.findExtremes=Z.findExtremes;function W(e){var t=1e-4*(e[1]-e[0]);return[e[0]-t,e[1]+t]}Y.coerceRef=function(e,t,r,n,a,i){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return a||(a=s[0]||("string"==typeof i?i:i[0])),i||(i=a),s=s.concat(s.map((function(e){return e+" domain"}))),u[c]={valType:"enumerated",values:s.concat(i?"string"==typeof i?[i]:i:[]),dflt:a},l.coerce(e,t,u,c)},Y.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},Y.coercePosition=function(e,t,r,n,a,i){var o,s;if("range"!==Y.getRefType(n))o=l.ensureNumber,s=r(a,i);else{var c=Y.getFromId(t,n);s=r(a,i=c.fraction2r(i)),o=c.cleanPos}e[a]=o(s)},Y.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?l.ensureNumber:Y.getFromId(t,r).cleanPos)(e)},Y.redrawComponents=function(e,t){t=t||Y.listIds(e);var r=e._fullLayout;function n(n,a,i,l){for(var s=o.getComponentMethod(n,a),c={},u=0;u2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},Y.saveRangeInitial=function(e,t){for(var r=Y.list(e,"",!0),n=!1,a=0;a.3*f||u(n)||u(i))){var h=r.dtick/2;e+=e+h.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?e=Y.tickIncrement(e,"M6","reverse")+1.5*A:i.exactMonths>.8?e=Y.tickIncrement(e,"M1","reverse")+15.5*A:e-=L;var s=Y.tickIncrement(e,r);if(s<=n)return s}return e}(y,e,v,c,i)),m=y,0;m<=u;)m=Y.tickIncrement(m,v,!1,i);return{start:t.c2r(y,0,i),end:t.c2r(m,0,i),size:v,_dataSpan:u-c}},Y.prepTicks=function(e,t){var r=l.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e._dtickInit=e.dtick,e._tick0Init=e.tick0,"auto"===e.tickmode||!e.dtick){var n,i=e.nticks;i||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?l.bigFont(e.tickfont.size||12):15,i=e._length/n):(n="y"===e._id.charAt(0)?40:80,i=l.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(i*=2)),"array"===e.tickmode&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,Y.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!(a(e.dtick)||"M"!==e.dtick.charAt(0))}var n=r(),i=Y.getTickFormat(e);if(i){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=S,o&&!n&&e.dticki&&d=o:h<=o;h=Y.tickIncrement(h,e.dtick,s,e.calendar)){if(e.rangebreaks&&!s){if(h=u)break}if(D.length>g||h===C)break;C=h;var O=!1;d&&h!==(0|h)&&(O=!0),D.push({minor:O,value:h})}if(f&&function(e,t,r){for(var n=0;n0?(i=n-1,o=n):(i=n,o=n);var l,s=e[i].value,c=e[o].value,u=Math.abs(c-s),d=r||u,f=0;d>=y?f=u>=y&&u<=m?u:v:r===b&&d>=_?f=u>=_&&u<=x?u:b:d>=T?f=u>=T&&u<=w?u:M:r===k&&d>=k?f=k:d>=A?f=A:r===L&&d>=L?f=L:r===S&&d>=S&&(f=S),f>=u&&(f=u,l=!0);var h=a+f;if(t.rangebreaks&&f>0){for(var p=0,g=0;g<84;g++){var D=(g+.5)/84;t.maskBreaks(a*(1-D)+D*h)!==P&&p++}(f*=p/84)||(e[n].drop=!0),l&&u>k&&(f=u)}(f>0||0===n)&&(e[n].periodX=a+f/2)}}(D,e,e._definedDelta),e.rangebreaks){var I="y"===e._id.charAt(0),R=1;"auto"===e.tickmode&&(R=e.tickfont?e.tickfont.size:12);var z=NaN;for(p=D.length-1;p>-1;p--)if(D[p].drop)D.splice(p,1);else{D[p].value=Ae(D[p].value,e);var N=e.c2p(D[p].value);(I?z>N-R:zu||Eu&&(F.periodX=u),E10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12==0?"y":"m";else if(t>=A&&i<=10||t>=15*A)e._tickround="d";else if(t>=D&&i<=16||t>=S)e._tickround="M";else if(t>=C&&i<=19||t>=D)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,o)-20,e._tickround<0&&(e._tickround=4)}}else if(a(t)||"L"===t.charAt(0)){var l=e.range.map(e.r2d||Number);a(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(l[0]),Math.abs(l[1])),c=Math.floor(Math.log(s)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(ue(e.exponentformat)&&!de(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function se(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}Y.autoTicks=function(e,t){var r;function n(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=l.dateTick0(e.calendar,0);var i=2*t;if(i>v)t/=v,r=n(10),e.dtick="M"+12*oe(t,r,$);else if(i>M)t/=M,e.dtick="M"+oe(t,1,ee);else if(i>A){e.dtick=oe(t,A,e._hasDayOfWeekBreaks?[1,2,7,14]:re);var o=Y.getTickFormat(e),s="period"===e.ticklabelmode;s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=l.dateTick0(e.calendar,2):e.tick0=l.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}else i>S?e.dtick=oe(t,S,ee):i>D?e.dtick=oe(t,D,te):i>C?e.dtick=oe(t,C,te):(r=n(10),e.dtick=oe(t,r,$))}else if("log"===e.type){e.tick0=0;var c=l.simpleMap(e.range,e.r2l);if(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,r=n(10),e.dtick="L"+oe(t,r,$)}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))):ke(e)?(e.tick0=0,r=1,e.dtick=oe(t,r,ie)):(e.tick0=0,r=n(10),e.dtick=oe(t,r,$));if(0===e.dtick&&(e.dtick=1),!a(e.dtick)&&"string"!=typeof e.dtick){var d=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(d)}},Y.tickIncrement=function(e,t,r,i){var o=r?-1:1;if(a(t))return l.increment(e,o*t);var s=t.charAt(0),c=o*Number(t.substr(1));if("M"===s)return l.incrementMonth(e,c,i);if("L"===s)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===s){var u="D2"===t?ae:ne,d=e+.01*o,f=l.roundUp(l.mod(d,1),u,r);return Math.floor(d)+Math.log(n.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(t)},Y.tickFirst=function(e,t){var r=e.r2l||Number,i=l.simpleMap(e.range,r,void 0,void 0,t),o=i[1] ")}else e._prevDateHead=s,c+="
"+s;t.text=c}(e,o,r,c):"log"===u?function(e,t,r,n,i){var o=e.dtick,s=t.x,c=e.tickformat,u="string"==typeof o&&o.charAt(0);"never"===i&&(i="");n&&"L"!==u&&(o="L3",u="L");if(c||"L"===u)t.text=fe(Math.pow(10,s),e,i,n);else if(a(o)||"D"===u&&l.mod(s+.01,1)<.1){var d=Math.round(s),f=Math.abs(d),h=e.exponentformat;"power"===h||ue(h)&&de(d)?(t.text=0===d?1:1===d?"10":"10"+(d>1?"":O)+f+"",t.fontSize*=1.25):("e"===h||"E"===h)&&f>2?t.text="1"+h+(d>0?"+":O)+f:(t.text=fe(Math.pow(10,s),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,l.mod(s,1)))),t.fontSize*=.75}if("D1"===e.dtick){var p=String(t.text).charAt(0);"0"!==p&&"1"!==p||("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*(s<0?.5:.25)))}}(e,o,0,c,g):"category"===u?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r="");t.text=String(r)}(e,o):"multicategory"===u?function(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}(e,o,r):ke(e)?function(e,t,r,n,a){if("radians"!==e.thetaunit||r)t.text=fe(t.x,e,a,n);else{var i=t.x/180;if(0===i)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,a=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)t.text=fe(l.deg2rad(t.x),e,a,n);else{var s=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(""),s&&(t.text=O+t.text)}}}}(e,o,r,c,g):function(e,t,r,n,a){"never"===a?a="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide");t.text=fe(t.x,e,a,n)}(e,o,0,c,g),n||(e.tickprefix&&!p(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!p(e.showticksuffix)&&(o.text+=e.ticksuffix)),"boundaries"===e.tickson||e.showdividers){var m=function(t){var r=e.l2p(t);return r>=0&&r<=e._length?t:null};o.xbnd=[m(o.x-.5),m(o.x+e.dtick-.5)]}return o},Y.hoverLabelText=function(e,t,r){r&&(e=l.extendFlat({},e,{hoverformat:r}));var n=Array.isArray(t)?t[0]:t,a=Array.isArray(t)?t[1]:void 0;if(void 0!==a&&a!==n)return Y.hoverLabelText(e,n,r)+" - "+Y.hoverLabelText(e,a,r);var i="log"===e.type&&n<=0,o=Y.tickText(e,e.c2l(i?-n:n),"hover").text;return i?0===n?"0":O+o:o};var ce=["f","p","n","\u03bc","m","","k","M","G","T"];function ue(e){return"SI"===e||"B"===e}function de(e){return e>14||e<-15}function fe(e,t,r,n){var i=e<0,o=t._tickround,s=r||t.exponentformat||"B",c=t._tickexponent,u=Y.getTickFormat(t),d=t.separatethousands;if(n){var f={exponentformat:s,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:a(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};le(f),o=(Number(f._tickround)||0)+4,c=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,O);var h,p=Math.pow(10,-o)/2;if("none"===s&&(c=0),(e=Math.abs(e))"+h+"":"B"===s&&9===c?e+="B":ue(s)&&(e+=ce[c/3+5]));return i?O+e:e}function he(e,t){for(var r=[],n={},a=0;a1&&r=a.min&&e=0,i=u(e,t[1])<=0;return(r||a)&&(n||i)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=o(a)))){r=n;break}break;case"log":for(t=0;t0?r.bottom-d:0,f)))),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var h=[0,1];if("x"===p){if("b"===s?n[s]=t._depth:(n[s]=t._depth=Math.max(r.width>0?d-r.top:0,f),h.reverse()),r.width>0){var m=r.right-(t._offset+t._length);m>0&&(n.xr=1,n.r=m);var v=t._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if("l"===s?n[s]=t._depth=Math.max(r.height>0?d-r.left:0,f):(n[s]=t._depth=Math.max(r.height>0?r.right-d:0,f),h.reverse()),r.height>0){var y=r.bottom-(t._offset+t._length);y>0&&(n.yb=0,n.b=y);var x=t._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]="free"===t.anchor?t.position:t._anchorAxis.domain[h[0]],t.title.text!==c._dfltTitle[p]&&(n[s]+=me(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[u]=t.linewidth,t.mirror&&!0!==t.mirror&&(a[u]+=f),!0===t.mirror||"ticks"===t.mirror?a[g]=t._anchorAxis.domain[h[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(a[g]=[t._counterDomainMin,t._counterDomainMax][h[1]]))}Q&&(l=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),i.autoMargin(e,xe(t),n),i.autoMargin(e,be(t),a),i.autoMargin(e,_e(t),l)})),r.skipTitle||Q&&"bottom"===t.side||J.push((function(){return function(e,t){var r,n=e._fullLayout,a=t._id,i=a.charAt(0),o=t.title.font.size;if(t.title.hasOwnProperty("standoff"))r=t._depth+t.title.standoff+me(t);else{var l=Le(t);if("multicategory"===t.type)r=t._depth;else{var s=1.5*o;l&&(s=.5*o,"outside"===t.ticks&&(s+=t.ticklen)),r=10+s+(t.linewidth?t.linewidth-1:0)}l||(r+="x"===i?"top"===t.side?o*(t.showticklabels?1:0):o*(t.showticklabels?1.5:.5):"right"===t.side?o*(t.showticklabels?1:.5):o*(t.showticklabels?.5:0))}var c,d,h,p,g=Y.getPxPosition(e,t);"x"===i?(d=t._offset+t._length/2,h="top"===t.side?g-r:g+r):(h=t._offset+t._length/2,d="right"===t.side?g+r:g-r,c={rotate:"-90",offset:0});if("multicategory"!==t.type){var m=t._selections[t._id+"tick"];if(p={selection:m,side:t.side},m&&m.node()&&m.node().parentNode){var v=f.getTranslate(m.node().parentNode);p.offsetLeft=v.x,p.offsetTop=v.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return u.draw(e,a+"title",{propContainer:t,propName:t._name+".title.text",placeholder:n._dfltTitle[i],avoid:p,transform:c,attributes:{x:d,y:h,"text-anchor":"middle"}})}(e,t)})),l.syncOrAsync(J)}}function K(e){var r=h+(e||"tick");return w[r]||(w[r]=function(e,t){var r,n,a,i;e._selections[t].size()?(r=1/0,n=-1/0,a=1/0,i=-1/0,e._selections[t].each((function(){var e=ye(this),t=f.bBox(e.node().parentNode);r=Math.min(r,t.top),n=Math.max(n,t.bottom),a=Math.min(a,t.left),i=Math.max(i,t.right)}))):(r=0,n=0,a=0,i=0);return{top:r,bottom:n,left:a,right:i,height:n-r,width:i-a}}(t,r)),w[r]}},Y.getTickSigns=function(e){var t=e._id.charAt(0),r={x:"top",y:"right"}[t],n=e.side===r?1:-1,a=[-1,1,n,-n];return"inside"!==e.ticks==("x"===t)&&(a=a.map((function(e){return-e}))),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a},Y.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},Y.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=function(e){return-1!==t.indexOf(e)},n=r("top"),a=r("left"),i=r("right"),o=r("bottom"),l=r("inside"),s=o||a||n||i;if(!s&&!l)return[0,0];var c=e.side,u=s?(e.tickwidth||0)/2:0,d=3,f=e.tickfont?e.tickfont.size:12;(o||n)&&(u+=f*j,d+=(e.linewidth||0)/2);(a||i)&&(u+=(e.linewidth||0)/2,d+=3);l&&"top"===c&&(d-=f*(1-j));(a||n)&&(u=-u);"bottom"!==c&&"right"!==c||(d=-d);return[s?u:0,l?d:0]}(e),r=t[0],n=t[1];return"x"===e._id.charAt(0)?function(t){return s(r+e._offset+e.l2p(pe(t)),n)}:function(t){return s(n,r+e._offset+e.l2p(pe(t)))}},Y.makeTickPath=function(e,t,r,n){n=void 0!==n?n:e.ticklen;var a=e._id.charAt(0),i=(e.linewidth||1)/2;return"x"===a?"M0,"+(t+i*r)+"v"+n*r:"M"+(t+i*r)+",0h"+n*r},Y.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=function(e){return-1!==n.indexOf(e)},o=i("top"),s=i("left"),c=i("right"),u=i("bottom")||s||o||c,d=i("inside"),f="inside"===n&&"inside"===e.ticks||!d&&"outside"===e.ticks&&"boundaries"!==e.tickson,h=0,p=0,g=f?e.ticklen:0;if(d?g*=-1:u&&(g=0),f&&(h+=g,r)){var m=l.deg2rad(r);h=g*Math.cos(m)+1,p=g*Math.sin(m)}e.showticklabels&&(f||e.showline)&&(h+=.2*e.tickfont.size);var v,y,x,b,_,w={labelStandoff:h+=(e.linewidth||1)/2*(d?-1:1),labelShift:p},M=0,T=e.side,k=e._id.charAt(0),A=e.tickangle;if("x"===k)b=(_=!d&&"bottom"===T||d&&"top"===T)?1:-1,d&&(b*=-1),v=p*b,y=t+h*b,x=_?1:-.2,90===Math.abs(A)&&(d?x+=E:x=-90===A&&"bottom"===T?j:90===A&&"top"===T?E:.5,M=E/2*(A/90)),w.xFn=function(e){return e.dx+v+M*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*x},w.anchorFn=function(e,t){if(u){if(s)return"end";if(c)return"start"}return a(t)&&0!==t&&180!==t?t*b<0!==d?"end":"start":"middle"},w.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==d?-n:0};else if("y"===k){if(b=(_=!d&&"left"===T||d&&"right"===T)?1:-1,d&&(b*=-1),v=h,y=p*b,x=0,d||90!==Math.abs(A)||(x=-90===A&&"left"===T||90===A&&"right"===T?j:.5),d){var L=a(A)?+A:0;if(0!==L){var S=l.deg2rad(L);M=Math.abs(Math.sin(S))*j*b,x=0}}w.xFn=function(e){return e.dx+t-(v+e.fontSize*x)*b+M*e.fontSize},w.yFn=function(e){return e.dy+y+e.fontSize*E},w.anchorFn=function(e,t){return a(t)&&90===Math.abs(t)?"middle":_?"end":"start"},w.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},Y.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",a=r.vals;"period"===t.ticklabelmode&&(a=a.slice()).shift();var i=r.layer.selectAll("path."+n).data(t.ticks?a:[],ge);i.exit().remove(),i.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==r.crisp).call(d.stroke,t.tickcolor).style("stroke-width",f.crispRound(e,t.tickwidth,1)+"px").attr("d",r.path).style("display",null),Se(t,[z]),i.attr("transform",r.transFn)},Y.drawGrid=function(e,t,r){r=r||{};var n=t._id+"grid",a=r.vals,i=r.counterAxis;if(!1===t.showgrid)a=[];else if(i&&Y.shouldShowZeroLine(e,t,i))for(var o="array"===t.tickmode,l=0;lh||i.lefth||i.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+r._id]?s.style("display","none"):"tick"!==e.K||a||s.style("display",null)}))}))}))}))},x(v,m+1?m:g);var b=null;t._selections&&(t._selections[d]=v);var _=[function(){return y.length&&Promise.all(y)}];t.automargin&&i._redrawFromAutoMarginCount&&90===m?(b=90,_.push((function(){x(v,m)}))):_.push((function(){if(x(v,g),h.length&&"x"===u&&!a(g)&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=0;var e,n=0,i=[];if(v.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),a=ye(this),o=f.bBox(a.node());i.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),"boundaries"!==t.tickson&&!t.showdividers||r.secondary){var o=h.length,s=Math.abs((h[o-1].x-h[0].x)*t._m)/(o-1),c=t.ticklabelposition||"",d=function(e){return-1!==c.indexOf(e)},p=d("top"),m=d("left"),y=d("right"),_=d("bottom")||m||p||y?(t.tickwidth||0)+6:0,w=s<2.5*n||"multicategory"===t.type||"realaxis"===t._name;for(e=0;e1)for(n=1;n2*o}(a,t))return"date";var m="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=d(r),a=0,o=0,l={},u=0;u2*a}(a,m)?"category":function(e,t){for(var r=e.length,n=0;n=2){var s,c,u="";if(2===o.length)for(s=0;s<2;s++)if(c=x(o[s])){u=g;break}var d=a("pattern",u);if(d===g)for(s=0;s<2;s++)(c=x(o[s]))&&(t.bounds[s]=o[s]=c-1);if(d)for(s=0;s<2;s++)switch(c=o[s],d){case g:if(!n(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[s]=o[s]=c;break;case m:if(!n(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[s]=o[s]=c}if(!1===r.autorange){var f=r.range;if(f[0]f[1])return void(t.enabled=!1)}else if(o[0]>f[0]&&o[1]n?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},r.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},r.isLinked=function(e,t){return i(t,e._axisMatchGroups)||i(t,e._axisConstraintGroups)}},{"../../registry":310,"./constants":278}],276:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){if("category"===t.type){var a,i=e.categoryarray,o=Array.isArray(i)&&i.length>0;o&&(a="array");var l,s=r("categoryorder",a);"array"===s&&(l=r("categoryarray")),o||"array"!==s||(s=t.categoryorder="trace"),"trace"===s?t._initialCategories=[]:"array"===s?t._initialCategories=l.slice():(l=function(e,t){var r,n,a,i=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;nn?a.substr(n):i.substr(r))+o:a+i+e*t:o}function m(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;oc*x)||M)for(r=0;rI&&FO&&(O=F);f/=(O-C)/(2*P),C=s.l2r(C),O=s.l2r(O),s.range=s._input.range=L=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function j(e,t,r,n,a){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",c(r,n)).attr("d",a+"Z")}function H(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(t,r)).attr("d","M0,0Z")}function B(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Y(e,t,a,i)}function Y(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 U(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function V(e){P&&e.data&&e._context.showTips&&(a.notifier(a._(e,"Double-click to zoom back out"),"long"),P=!1)}function q(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,O)/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 G(e,t,r,n,i){for(var o,l,s,c,u=!1,d={},f={},h=(i||{}).xaHash,p=(i||{}).yaHash,g=0;g=0)a._fullLayout._deactivateShape(a);else{var o=a._fullLayout.clickmode;if(U(a),2!==e||ve||Ve(),me)o.indexOf("select")>-1&&L(r,a,X,Q,t.id,Oe),o.indexOf("event")>-1&&h.click(a,r,t.id);else if(1===e&&ve){var l=g?I:P,c="s"===g||"w"===v?0:1,d=l._name+".range["+c+"]",f=function(e,t){var r,n=e.range[t],a=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,i("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,i("."+String(r)+"g")(n))}(l,c),p="left",m="middle";if(l.fixedrange)return;g?(m="n"===g?"top":"bottom","right"===l.side&&(p="right")):"e"===v&&(p="right"),a._context.showAxisRangeEntryBoxes&&n.select(be).call(u.makeEditable,{gd:a,immediate:!0,background:a._fullLayout.paper_bgcolor,text:String(f),fill:l.tickfont?l.tickfont.color:"#444",horizontalAlign:p,verticalAlign:m}).on("edit",(function(e){var t=l.d2r(e);void 0!==t&&s.call("_guiRelayout",a,d,t)}))}}}function Re(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,he*t+_e)),a=Math.max(0,Math.min(te,pe*r+we)),i=Math.abs(n-_e),o=Math.abs(a-we);function l(){Le="",Me.r=Me.l,Me.t=Me.b,De.attr("d","M0,0Z")}if(Me.l=Math.min(_e,n),Me.r=Math.max(_e,n),Me.t=Math.min(we,a),Me.b=Math.max(we,a),re.isSubplotConstrained)i>O||o>O?(Le="xy",i/ee>o/te?(o=i*te/ee,we>a?Me.t=we-o:Me.b=we+o):(i=o*ee/te,_e>n?Me.l=_e-i:Me.r=_e+i),De.attr("d",q(Me))):l();else if(ne.isSubplotConstrained)if(i>O||o>O){Le="xy";var s=Math.min(Me.l/ee,(te-Me.b)/te),c=Math.max(Me.r/ee,(te-Me.t)/te);Me.l=s*ee,Me.r=c*ee,Me.b=(1-s)*te,Me.t=(1-c)*te,De.attr("d",q(Me))}else l();else!ie||o0){var u;if(ne.isSubplotConstrained||!ae&&1===ie.length){for(u=0;ug[1]-1/4096&&(t.domain=l),a.noneOrAll(e.domain,t.domain,l)}return r("layer"),t}},{"../../lib":224,"fast-isnumeric":10}],290:[function(e,t,r){"use strict";var n=e("./show_dflt");t.exports=function(e,t,r,a,i){i||(i={});var o=i.tickSuffixDflt,l=n(e);r("tickprefix")&&r("showtickprefix",l),r("ticksuffix",o)&&r("showticksuffix",l)}},{"./show_dflt":294}],291:[function(e,t,r){"use strict";var n=e("../../constants/alignment").FROM_BL;t.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var a=[e.r2l(e.range[0]),e.r2l(e.range[1])],i=a[0]+(a[1]-a[0])*r;e.range=e._input.range=[e.l2r(i+(a[0]-i)*t),e.l2r(i+(a[1]-i)*t)],e.setScale()}},{"../../constants/alignment":200}],292:[function(e,t,r){"use strict";var n=e("polybooljs"),a=e("../../registry"),i=e("../../components/drawing").dashStyle,o=e("../../components/color"),l=e("../../components/fx"),s=e("../../components/fx/helpers").makeEventData,c=e("../../components/dragelement/helpers"),u=c.freeMode,d=c.rectMode,f=c.drawMode,h=c.openMode,p=c.selectMode,g=e("../../components/shapes/draw_newshape/display_outlines"),m=e("../../components/shapes/draw_newshape/helpers").handleEllipse,v=e("../../components/shapes/draw_newshape/newshapes"),y=e("../../lib"),x=e("../../lib/polygon"),b=e("../../lib/throttle"),_=e("./axis_ids").getFromId,w=e("../../lib/clear_gl_canvases"),M=e("../../plot_api/subroutines").redrawReglTraces,T=e("./constants"),k=T.MINSELECT,A=x.filter,L=x.tester,S=e("./handle_outline").clearSelect,D=e("./helpers"),C=D.p2r,O=D.axValue,P=D.getTransform;function I(e,t,r,n,a,i,o){var l,s,c,u,d,f,p,m,v,y=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(y)){F(e,t,i);var _=function(e,t){var r,n,a=e[0],i=-1,o=[];for(n=0;n0?function(e,t){var r,n,a,i=[];for(a=0;a0&&i.push(r);if(1===i.length&&i[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(a=0;a1)return!1;if((a+=r.selectedpoints.length)>1)return!1}return 1===a}(l)&&(f=H(_))){for(o&&o.remove(),v=0;v=0&&n._fullLayout._deactivateShape(n),f(t)){var i=n._fullLayout._zoomlayer.selectAll(".select-outline-"+r.id);if(i&&n._fullLayout._drawing){var o=v(i,e);o&&a.call("_guiRelayout",n,{shapes:o}),n._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=e.selectionDefs=[],r.selection.mergedPolygons=e.mergedPolygons=[]}function j(e,t,r,n){var a,i,o,l=[],s=t.map((function(e){return e._id})),c=r.map((function(e){return e._id}));for(o=0;o0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(a)>-1}function B(e,t,r){var n,i,o,l;for(n=0;n=0)D._fullLayout._deactivateShape(D);else if(!_){var r=R.clickmode;b.done(ge).then((function(){if(b.clear(ge),2===e){for(de.remove(),$=0;$-1&&I(t,D,a.xaxes,a.yaxes,a.subplot,a,de),"event"===r&&D.emit("plotly_selected",void 0);l.click(D,t)})).catch(y.error)}},a.doneFn=function(){pe.remove(),b.done(ge).then((function(){b.clear(ge),a.gd.emit("plotly_selected",te),K&&a.selectionDefs&&(K.subtract=ue,a.selectionDefs.push(K),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,Q)),a.doneFnCompleted&&a.doneFnCompleted(me)})).catch(y.error),_&&E(a)}},clearSelect:S,clearSelectionsCache:E,selectOnClick:I}},{"../../components/color":95,"../../components/dragelement/helpers":113,"../../components/drawing":117,"../../components/fx":135,"../../components/fx/helpers":131,"../../components/shapes/draw_newshape/display_outlines":183,"../../components/shapes/draw_newshape/helpers":184,"../../components/shapes/draw_newshape/newshapes":185,"../../lib":224,"../../lib/clear_gl_canvases":212,"../../lib/polygon":236,"../../lib/throttle":248,"../../plot_api/subroutines":261,"../../registry":310,"./axis_ids":275,"./constants":278,"./handle_outline":282,"./helpers":283,polybooljs:50}],293:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("d3-time-format").utcFormat,i=e("../../lib"),o=i.numberFormat,l=e("fast-isnumeric"),s=i.cleanNumber,c=i.ms2DateTime,u=i.dateTime2ms,d=i.ensureNumber,f=i.isArrayOrTypedArray,h=e("../../constants/numerical"),p=h.FP_SAFE,g=h.BADNUM,m=h.LOG_CLIP,v=h.ONEWEEK,y=h.ONEDAY,x=h.ONEHOUR,b=h.ONEMIN,_=h.ONESEC,w=e("./axis_ids"),M=e("./constants"),T=M.HOUR_PATTERN,k=M.WEEKDAY_PATTERN;function A(e){return Math.pow(10,e)}function L(e){return null!=e}t.exports=function(e,t){t=t||{};var r=e._id||"x",h=r.charAt(0);function S(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],a=e.range[1];return.5*(n+a-2*m*Math.abs(n-a))}return g}function D(t,r,n,a){if((a||{}).msUTC&&l(t))return+t;var o=u(t,n||e.calendar);if(o===g){if(!l(t))return g;t=+t;var s=Math.floor(10*i.mod(t+.05,1)),c=Math.round(t-s/10);o=u(new Date(c))+s/10}return o}function C(t,r,n){return c(t,r,n||e.calendar)}function O(t){return e._categories[Math.round(t)]}function P(t){if(L(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 g}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function R(e){var t=I(e);return void 0!==t?t:l(e)?+e:void 0}function z(e){return l(e)?+e:I(e)}function N(e,t,r){return n.round(r+t*e,2)}function F(e,t,r){return(e-r)/t}var E=function(t){return l(t)?N(t,e._m,e._b):g},j=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var H="y"===h;E=function(t){if(!l(t))return g;var r=e._rangebreaks.length;if(!r)return N(t,e._m,e._b);var n=H;e.range[0]>e.range[1]&&(n=!n);for(var a=n?-1:1,i=a*t,o=0,s=0;su)){o=i<(c+u)/2?s:s+1;break}o=s+1}var d=e._B[o]||0;return isFinite(d)?N(t,e._m2,d):0},j=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,a=0;ae._rangebreaks[a].pmax&&(n=a+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?S:d,e.l2c="log"===e.type?A:d,e.l2p=E,e.p2l=j,e.c2p="log"===e.type?function(e,t){return E(S(e,t))}:E,e.p2c="log"===e.type?function(e){return A(j(e))}:j,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=d,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=j,e.cleanPos=d):"log"===e.type?(e.d2r=e.d2l=function(e,t){return S(s(e),t)},e.r2d=e.r2c=function(e){return A(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=d,e.c2r=S,e.l2d=A,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return A(j(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=j,e.cleanPos=d):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=D,e.c2d=e.c2r=e.l2d=e.l2r=C,e.d2p=e.r2p=function(t,r,n){return e.l2p(D(t,0,n))},e.p2d=e.p2r=function(e,t,r){return C(j(e),t,r)},e.cleanPos=function(t){return i.cleanDate(t,g,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=O,e.d2r=e.d2l_noadd=R,e.r2c=function(t){var r=z(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=d,e.r2l=z,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:d(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=O,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=I,e.l2r=e.c2r=d,e.r2l=R,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return O(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:d(e)},e.setupMultiCategory=function(n){var a,o,l=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length)for(var c in s)if(c!==r){var u=t[w.id2name(c)];l=l.concat(u._traceIndices)}var d=[[0,{}],[0,{}]],p=[];for(a=0;ap&&(o[n]=p),o[0]===o[1]){var c=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=c,o[1]+=c}}else i.nestedProperty(e,t).set(a)},e.setScale=function(r){var n=t._size;if(e.overlaying){var a=w.getFromId({_fullLayout:t},e.overlaying);e.domain=a.domain}var i=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(i);var l,s,c=e.r2l(e[i][0],o),u=e.r2l(e[i][1],o),d="y"===h;if((d?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks)&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(l=0;lu&&(f=!f),f&&e._rangebreaks.reverse();var p=f?-1:1;for(e._m2=p*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(d?u:c)),l=0;la&&(a+=7,oa&&(a+=24,o=n&&o=n&&t=l.min&&(el.max&&(l.max=n),a=!1)}a&&c.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 m(t,r){var n=t.plotinfo,a=n.xaxis,s=n.yaxis,c=a._length,u=s._length,d=!!t.xr1,f=!!t.yr1,h=[];if(d){var p=i.simpleMap(t.xr0,a.r2l),g=i.simpleMap(t.xr1,a.r2l),m=p[1]-p[0],v=g[1]-g[0];h[0]=(p[0]*(1-r)+r*g[0]-p[0])/(p[1]-p[0])*c,h[2]=c*(1-r+r*v/m),a.range[0]=a.l2r(p[0]*(1-r)+r*g[0]),a.range[1]=a.l2r(p[1]*(1-r)+r*g[1])}else h[0]=0,h[2]=c;if(f){var y=i.simpleMap(t.yr0,s.r2l),x=i.simpleMap(t.yr1,s.r2l),b=y[1]-y[0],_=x[1]-x[0];h[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,h[3]=u*(1-r+r*_/b),s.range[0]=a.l2r(y[0]*(1-r)+r*x[0]),s.range[1]=s.l2r(y[1]*(1-r)+r*x[1])}else h[1]=0,h[3]=u;l.drawOne(e,a,{skipTitle:!0}),l.drawOne(e,s,{skipTitle:!0}),l.redrawComponents(e,[a._id,s._id]);var w=d?c/h[2]:1,M=f?u/h[3]:1,T=d?h[0]:0,k=f?h[1]:0,A=d?h[0]/h[2]*c:0,L=f?h[1]/h[3]*u:0,S=a._offset-A,D=s._offset-L;n.clipRect.call(o.setTranslate,T,k).call(o.setScale,1/w,1/M),n.plot.call(o.setTranslate,S,D).call(o.setScale,w,M),o.setPointGroupScale(n.zoomScalePts,1/w,1/M),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/M)}l.redrawComponents(e)}},{"../../components/drawing":117,"../../lib":224,"../../registry":310,"./axes":271,"@plotly/d3":5}],299:[function(e,t,r){"use strict";var n=e("../../registry").traceIs,a=e("./axis_autotype");function i(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var r=i(e),a=n(e,"box-violin"),o=n(e._fullInput||{},"candlestick");return a&&!o&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}t.exports=function(e,t,r,l){r("autotypenumbers",l.autotypenumbersDflt),"-"===r("type",(l.splomStash||{}).type)&&(!function(e,t){if("-"!==e.type)return;var r,l=e._id,s=l.charAt(0);-1!==l.indexOf("scene")&&(l=s);var c=function(e,t,r){for(var n=0;n0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(t,l,s);if(!c)return;if("histogram"===c.type&&s==={v:"y",h:"x"}[c.orientation||"v"])return void(e.type="linear");var u=s+"calendar",d=c[u],f={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};"box"===c.type&&c._hasPreCompStats&&s==={h:"x",v:"y"}[c.orientation||"v"]&&(f.noMultiCategory=!0);if(f.autotypenumbers=e.autotypenumbers,o(c,s)){var h=i(c),p=[];for(r=0;r0?".":"")+i;a.isPlainObject(o)?s(o,t,l,n+1):t(l,i,o)}}))}r.manageCommandObserver=function(e,t,n,o){var l={},s=!0;t&&t._commandObserver&&(l=t._commandObserver),l.cache||(l.cache={}),l.lookupTable={};var c=r.hasSimpleAPICommandBindings(e,n,l.lookupTable);if(t&&t._commandObserver){if(c)return l;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,l}if(c){i(e,c,l.cache),l.check=function(){if(s){var t=i(e,c,l.cache);return t.changed&&o&&void 0!==l.lookupTable[t.value]&&(l.disable(),Promise.resolve(o({value:t.value,type:c.type,prop:c.prop,traces:c.traces,index:l.lookupTable[t.value]})).then(l.enable,l.enable)),t.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],d=0;d=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var o=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),s=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(){b.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}(e,o),l.text(o.text()&&s.text()?" - ":"")}},b.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"),a=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=b.graphJson(e,!1,"keepdata"),a.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var M=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];function k(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,a={};function i(e){for(var r=!0,i=0;i1&&R.length>1){for(l.getComponentMethod("grid","sizeDefaults")(c,s),o=0;o15&&R.length>15&&0===s.shapes.length&&0===s.images.length,b.linkSubplots(f,s,d,n),b.cleanPlot(f,s,d,n);var j=!(!n._has||!n._has("gl2d")),H=!(!s._has||!s._has("gl2d")),B=!(!n._has||!n._has("cartesian"))||j,Y=!(!s._has||!s._has("cartesian"))||H;B&&!Y?n._bgLayer.remove():Y&&!B&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&p({_fullLayout:n}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var a=0;a0){var d=1-2*l;n=Math.round(d*n),a=Math.round(d*a)}}var f=b.layoutAttributes.width.min,h=b.layoutAttributes.height.min;n1,g=!t.height&&Math.abs(r.height-a)>1;(g||p)&&(p&&(r.width=n),g&&(r.height=a)),e._initialAutoSize||(e._initialAutoSize={width:n,height:a}),b.sanitizeMargins(r)},b.supplyLayoutModuleDefaults=function(e,t,r,n){var a,i,o,s=l.componentsRegistry,c=t._basePlotModules,d=l.subplotsRegistry.cartesian;for(a in s)(o=s[a]).includeBasePlot&&o.includeBasePlot(e,t);for(var f in c.length||c.push(d),t._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(e,t),d.finalizeSubplots(e,t)),t._subplots)t._subplots[f].sort(u.subplotSort);for(i=0;i1&&(r.l/=g,r.r/=g)}if(d){var m=(r.t+r.b)/d;m>1&&(r.t/=m,r.b/=m)}var v=void 0!==r.xl?r.xl:r.x,y=void 0!==r.xr?r.xr:r.x,x=void 0!==r.yt?r.yt:r.y,_=void 0!==r.yb?r.yb:r.y;f[t]={l:{val:v,size:r.l+p},r:{val:y,size:r.r+p},b:{val:_,size:r.b+p},t:{val:x,size:r.t+p}},h[t]=1}else delete f[t],delete h[t];if(!n._replotting)return b.doAutoMargin(e)}},b.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),C(t);var a=t._size,i=t.margin,s=u.extendFlat({},a),c=i.l,d=i.r,f=i.t,p=i.b,g=t._pushmargin,m=t._pushmarginIds;if(!1!==t.margin.autoexpand){for(var v in g)m[v]||delete g[v];for(var y in g.base={l:{val:0,size:c},r:{val:1,size:d},t:{val:1,size:f},b:{val:0,size:p}},g){var x=g[y].l||{},_=g[y].b||{},w=x.val,M=x.size,T=_.val,k=_.size;for(var A in g){if(o(M)&&g[A].r){var L=g[A].r.val,S=g[A].r.size;if(L>w){var D=(M*L+(S-r)*w)/(L-w),O=(S*(1-w)+(M-r)*(1-L))/(L-w);D+O>c+d&&(c=D,d=O)}}if(o(k)&&g[A].t){var P=g[A].t.val,I=g[A].t.size;if(P>T){var R=(k*P+(I-n)*T)/(P-T),z=(I*(1-T)+(k-n)*(1-P))/(P-T);R+z>p+f&&(p=R,f=z)}}}}}var N=u.constrain(r-i.l-i.r,2,64),F=u.constrain(n-i.t-i.b,2,64),E=Math.max(0,r-N),j=Math.max(0,n-F);if(E){var H=(c+d)/E;H>1&&(c/=H,d/=H)}if(j){var B=(p+f)/j;B>1&&(p/=B,f/=B)}if(a.l=Math.round(c),a.r=Math.round(d),a.t=Math.round(f),a.b=Math.round(p),a.p=Math.round(i.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&b.didMarginChange(s,a)){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Y=3*(1+Object.keys(m).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 i=0,o=0;function s(){return i++,function(){o++,n||o!==i||function(t){if(!e._transitionData)return;(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)}(a)}}r.runFn(s),setTimeout(s())}))}],i=u.syncOrAsync(a,e);return i&&i.then||(i=Promise.resolve()),i.then((function(){return e}))}b.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},b.graphJson=function(e,t,r,n,a,i){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&b.supplyDefaults(e);var o=a?e._fullData:e.data,l=a?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function c(e,t){if("function"==typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var n,a={};return Object.keys(e).sort().forEach((function(i){if(-1===["_","["].indexOf(i.charAt(0)))if("function"!=typeof e[i]){if("keepdata"===r){if("src"===i.substr(i.length-3))return}else if("keepstream"===r){if("string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0&&!u.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0)return;a[i]=c(e[i],t)}else t&&(a[i]="_function")})),a}return Array.isArray(e)?e.map((function(e){return c(e,t)})):u.isTypedArray(e)?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var d={data:(o||[]).map((function(e){var r=c(e);return t&&delete r.fit,r}))};if(!t&&(d.layout=c(l),a)){var f=l._size;d.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return s&&(d.frames=c(s)),i&&(d.config=c(e._context,!0)),"object"===n?d:JSON.stringify(d)},b.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r=0;i--)if(l[i].enabled){r._indexToPoints=l[i]._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,p[t]=o}}for(R(o,c,d),a=0;a0){for(var n=[],a=0;a-1&&(d[h[r]].title={text:""});for(r=0;r")?"":t.html(e).text()}));return t.remove(),r}(M),M=(M=M.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),a.isIE()&&(M=(M=(M=M.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),M}},{"../components/color":95,"../components/drawing":117,"../constants/xmlns_namespaces":205,"../lib":224,"@plotly/d3":5}],319:[function(e,t,r){"use strict";var n=e("../../lib");function a(e){return-1!==e.indexOf("e")?e.replace(/[.]?0+e/,"e"):-1!==e.indexOf(".")?e.replace(/[.]?0+$/,""):e}r.formatPiePercent=function(e,t){var r=a((100*e).toPrecision(3));return n.numSeparate(r,t)+"%"},r.formatPieValue=function(e,t){var r=a(e.toPrecision(10));return n.numSeparate(r,t)},r.getFirstFilled=function(e,t){if(Array.isArray(e))for(var r=0;rs&&C[v].gap;)v--;for(x=C[v].s,g=C.length-1;g>v;g--)C[g].s=x;for(;sA[u]&&u=0;a--){var i=e[a];if("scatter"===i.type&&i.xaxis===r.xaxis&&i.yaxis===r.yaxis){i.opacity=void 0;break}}}}}},{}],329:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("./attributes"),o=e("./constants"),l=e("./subtypes"),s=e("./xy_defaults"),c=e("./period_defaults"),u=e("./stack_defaults"),d=e("./marker_defaults"),f=e("./line_defaults"),h=e("./line_shape_defaults"),p=e("./text_defaults"),g=e("./fillcolor_defaults");t.exports=function(e,t,r,m){function v(r,a){return n.coerce(e,t,i,r,a)}var y=s(e,t,m,v);if(y||(t.visible=!1),t.visible){c(e,t,m,v),v("xhoverformat"),v("yhoverformat");var x=u(e,t,m,v),b=!x&&y=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(f.c2p(e.x)-p);return i=Math.min(t,r)&&g<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),a=1-1/n,i=Math.abs(h.c2p(e.y)-g);return iZ!=(j=R[P][1])>=Z&&(N=R[P-1][0],F=R[P][0],j-E&&(z=N+(F-N)*(Z-E)/(j-E),U=Math.min(U,z),V=Math.max(V,z)));U=Math.max(U,0),V=Math.min(V,f._length);var W=l.defaultLine;return l.opacity(d.fillcolor)?W=d.fillcolor:l.opacity((d.line||{}).color)&&(W=d.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:U,x1:V,y0:Z,y1:Z,color:W,hovertemplate:!1}),delete e.index,d.text&&!Array.isArray(d.text)?e.text=String(d.text):e.text=d.name,[e]}}}},{"../../components/color":95,"../../components/fx":135,"../../lib":224,"../../registry":310,"./get_trace_color":332}],334:[function(e,t,r){"use strict";var n=e("./subtypes");t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./cross_trace_calc"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot"),colorbar:e("./marker_colorbar"),formatLabels:e("./format_labels"),style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":285,"./arrays_to_calcdata":321,"./attributes":322,"./calc":323,"./cross_trace_calc":327,"./cross_trace_defaults":328,"./defaults":329,"./format_labels":331,"./hover":333,"./marker_colorbar":340,"./plot":343,"./select":344,"./style":346,"./subtypes":347}],335:[function(e,t,r){"use strict";var n=e("../../lib").isArrayOrTypedArray,a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults");t.exports=function(e,t,r,o,l,s){var c=(e.marker||{}).color;(l("line.color",r),a(e,"line"))?i(e,t,o,l,{prefix:"line.",cLetter:"c"}):l("line.color",!n(c)&&c||r);l("line.width"),(s||{}).noDash||l("line.dash")}},{"../../components/colorscale/defaults":105,"../../components/colorscale/helpers":106,"../../lib":224}],336:[function(e,t,r){"use strict";var n=e("../../constants/numerical"),a=n.BADNUM,i=n.LOG_CLIP,o=i+.5,l=i-.5,s=e("../../lib"),c=s.segmentsIntersect,u=s.constrain,d=e("./constants");t.exports=function(e,t){var r,n,i,f,h,p,g,m,v,y,x,b,_,w,M,T,k,A,L=t.xaxis,S=t.yaxis,D="log"===L.type,C="log"===S.type,O=L._length,P=S._length,I=t.connectGaps,R=t.baseTolerance,z=t.shape,N="linear"===z,F=t.fill&&"none"!==t.fill,E=[],j=d.minTolerance,H=e.length,B=new Array(H),Y=0;function U(r){var n=e[r];if(!n)return!1;var i=t.linearized?L.l2p(n.x):L.c2p(n.x),s=t.linearized?S.l2p(n.y):S.c2p(n.y);if(i===a){if(D&&(i=L.c2p(n.x,!0)),i===a)return!1;C&&s===a&&(i*=Math.abs(L._m*P*(L._m>0?o:l)/(S._m*O*(S._m>0?o:l)))),i*=1e3}if(s===a){if(C&&(s=S.c2p(n.y,!0)),s===a)return!1;s*=1e3}return[i,s]}function V(e,t,r,n){var a=r-e,i=n-t,o=.5-e,l=.5-t,s=a*a+i*i,c=a*o+i*l;if(c>0&&cre||e[1]ae)return[u(e[0],te,re),u(e[1],ne,ae)]}function le(e,t){return e[0]===t[0]&&(e[0]===te||e[0]===re)||(e[1]===t[1]&&(e[1]===ne||e[1]===ae)||void 0)}function se(e,t,r){return function(n,a){var i=oe(n),o=oe(a),l=[];if(i&&o&&le(i,o))return l;i&&l.push(i),o&&l.push(o);var c=2*s.constrain((n[e]+a[e])/2,t,r)-((i||n)[e]+(o||a)[e]);c&&((i&&o?c>0==i[e]>o[e]?i:o:i||o)[e]+=c);return l}}function ce(e){var t=e[0],r=e[1],n=t===B[Y-1][0],a=r===B[Y-1][1];if(!n||!a)if(Y>1){var i=t===B[Y-2][0],o=r===B[Y-2][1];n&&(t===te||t===re)&&i?o?Y--:B[Y-1]=e:a&&(r===ne||r===ae)&&o?i?Y--:B[Y-1]=e:B[Y++]=e}else B[Y++]=e}function ue(e){B[Y-1][0]!==e[0]&&B[Y-1][1]!==e[1]&&ce([J,X]),ce(e),Q=null,J=X=0}function de(e){if(k=e[0]/O,A=e[1]/P,Z=e[0]re?re:0,W=e[1]ae?ae:0,Z||W){if(Y)if(Q){var t=$(Q,e);t.length>1&&(ue(t[0]),B[Y++]=t[1])}else K=$(B[Y-1],e)[0],B[Y++]=K;else B[Y++]=[Z||e[0],W||e[1]];var r=B[Y-1];Z&&W&&(r[0]!==Z||r[1]!==W)?(Q&&(J!==Z&&X!==W?ce(J&&X?(n=Q,i=(a=e)[0]-n[0],o=(a[1]-n[1])/i,(n[1]*a[0]-a[1]*n[0])/i>0?[o>0?te:re,ae]:[o>0?re:te,ne]):[J||Z,X||W]):J&&X&&ce([J,X])),ce([Z,W])):J-Z&&X-W&&ce([Z||J,W||X]),Q=e,J=Z,X=W}else Q&&ue($(Q,e)[0]),B[Y++]=e;var n,a,i,o}for("linear"===z||"spline"===z?$=function(e,t){for(var r=[],n=0,a=0;a<4;a++){var i=ie[a],o=c(e[0],e[1],t[0],t[1],i[0],i[1],i[2],i[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&G(o,e)q(p,fe))break;i=p,(_=v[0]*m[0]+v[1]*m[1])>x?(x=_,f=p,g=!1):_=e.length||!p)break;de(p),n=p}}else de(f)}Q&&ce([J||Q[0],X||Q[1]]),E.push(B.slice(0,Y))}return E}},{"../../constants/numerical":204,"../../lib":224,"./constants":326}],337:[function(e,t,r){"use strict";t.exports=function(e,t,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],338:[function(e,t,r){"use strict";var n={tonextx:1,tonexty:1,tonext:1};t.exports=function(e,t,r){var a,i,o,l,s,c={},u=!1,d=-1,f=0,h=-1;for(i=0;i=0?s=h:(s=h=f,f++),s0?Math.max(r,i):0}}},{"fast-isnumeric":10}],340:[function(e,t,r){"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},{}],341:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults"),o=e("./subtypes");t.exports=function(e,t,r,l,s,c){var u=o.isBubble(e),d=(e.line||{}).color;(c=c||{},d&&(r=d),s("marker.symbol"),s("marker.opacity",u?.7:1),s("marker.size"),s("marker.color",r),a(e,"marker")&&i(e,t,l,s,{prefix:"marker.",cLetter:"c"}),c.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),c.noLine||(s("marker.line.color",d&&!Array.isArray(d)&&t.marker.color!==d?d:u?n.background:n.defaultLine),a(e,"marker.line")&&i(e,t,l,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",u?1:0)),u&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),c.gradient)&&("none"!==s("marker.gradient.type")&&s("marker.gradient.color"))}},{"../../components/color":95,"../../components/colorscale/defaults":105,"../../components/colorscale/helpers":106,"./subtypes":347}],342:[function(e,t,r){"use strict";var n=e("../../lib").dateTick0,a=e("../../constants/numerical").ONEWEEK;function i(e,t){return n(t,e%a==0?1:0)}t.exports=function(e,t,r,n,a){if(a||(a={x:!0,y:!0}),a.x){var o=n("xperiod");o&&(n("xperiod0",i(o,t.xcalendar)),n("xperiodalignment"))}if(a.y){var l=n("yperiod");l&&(n("yperiod0",i(l,t.ycalendar)),n("yperiodalignment"))}}},{"../../constants/numerical":204,"../../lib":224}],343:[function(e,t,r){"use strict";var n=e("@plotly/d3"),a=e("../../registry"),i=e("../../lib"),o=i.ensureSingle,l=i.identity,s=e("../../components/drawing"),c=e("./subtypes"),u=e("./line_points"),d=e("./link_traces"),f=e("../../lib/polygon").tester;function h(e,t,r,d,h,p,g){var m;!function(e,t,r,a,o){var l=r.xaxis,s=r.yaxis,u=n.extent(i.simpleMap(l.range,l.r2c)),d=n.extent(i.simpleMap(s.range,s.r2c)),f=a[0].trace;if(!c.hasMarkers(f))return;var h=f.marker.maxdisplayed;if(0===h)return;var p=a.filter((function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=d[0]&&e.y<=d[1]})),g=Math.ceil(p.length/h),m=0;o.forEach((function(e,r){var n=e[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(e){return v?e.transition():e}var x=r.xaxis,b=r.yaxis,_=d[0].trace,w=_.line,M=n.select(p),T=o(M,"g","errorbars"),k=o(M,"g","lines"),A=o(M,"g","points"),L=o(M,"g","text");if(a.getComponentMethod("errorbars","plot")(e,T,r,g),!0===_.visible){var S,D;y(M).style("opacity",_.opacity);var C=_.fill.charAt(_.fill.length-1);"x"!==C&&"y"!==C&&(C=""),d[0][r.isRangePlot?"nodeRangePlot3":"node3"]=M;var O,P,I="",R=[],z=_._prevtrace;z&&(I=z._prevRevpath||"",D=z._nextFill,R=z._polygons);var N,F,E,j,H,B,Y,U="",V="",q=[],G=i.noop;if(S=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(D&&D.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(N=s.steps(w.shape),F=s.steps(w.shape.split("").reverse().join(""))):N=F="spline"===w.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),w.smoothing):s.smoothopen(e,w.smoothing)}:function(e){return"M"+e.join("L")},E=function(e){return F(e.reverse())},q=u(d,{xaxis:x,yaxis:b,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify,fill:_.fill}),Y=_._polygons=new Array(q.length),m=0;m1){var r=n.select(this);if(r.datum(d),e)y(r.style("opacity",0).attr("d",O).call(s.lineGroupStyle)).style("opacity",1);else{var a=y(r);a.attr("d",O),s.singleLineStyle(d,a)}}}}}var Z=k.selectAll(".js-line").data(q);y(Z.exit()).style("opacity",0).remove(),Z.each(G(!1)),Z.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(s.lineGroupStyle).each(G(!0)),s.setClipUrl(Z,r.layerClipId,e),q.length?(S?(S.datum(d),j&&B&&(C?("y"===C?j[1]=B[1]=b.c2p(0,!0):"x"===C&&(j[0]=B[0]=x.c2p(0,!0)),y(S).attr("d","M"+B+"L"+j+"L"+U.substr(1)).call(s.singleFillStyle)):y(S).attr("d",U+"Z").call(s.singleFillStyle))):D&&("tonext"===_.fill.substr(0,6)&&U&&I?("tonext"===_.fill?y(D).attr("d",U+"Z"+I+"Z").call(s.singleFillStyle):y(D).attr("d",U+"L"+I.substr(1)+"Z").call(s.singleFillStyle),_._polygons=_._polygons.concat(R)):(J(D),_._polygons=null)),_._prevRevpath=V,_._prevPolygons=Y):(S?J(S):D&&J(D),_._polygons=_._prevRevpath=_._prevPolygons=null),A.datum(d),L.datum(d),function(t,a,i){var o,u=i[0].trace,d=c.hasMarkers(u),f=c.hasText(u),h=ee(u),p=te,g=te;if(d||f){var m=l,_=u.stackgroup,w=_&&"infer zero"===e._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?m=w?Q:X:_&&!w&&(m=K),d&&(p=m),f&&(g=m)}var M,T=(o=t.selectAll("path.point").data(p,h)).enter().append("path").classed("point",!0);v&&T.call(s.pointStyle,u,e).call(s.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),d&&(M=s.makePointStyleFns(u)),o.each((function(t){var a=n.select(this),i=y(a);s.translatePoint(t,i,x,b)?(s.singlePointStyle(t,i,u,M,e),r.layerClipId&&s.hideOutsideRangePoint(t,i,x,b,u.xcalendar,u.ycalendar),u.customdata&&a.classed("plotly-customdata",null!==t.data&&void 0!==t.data)):i.remove()})),v?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=a.selectAll("g").data(g,h)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each((function(e){var t=n.select(this),a=y(t.select("text"));s.translatePoint(e,a,x,b)?r.layerClipId&&s.hideOutsideRangePoint(e,t,x,b,u.xcalendar,u.ycalendar):t.remove()})),o.selectAll("text").call(s.textPointStyle,u,e).each((function(e){var t=x.c2p(e.x),r=b.c2p(e.y);n.select(this).selectAll("tspan.line").each((function(){y(n.select(this)).attr({x:t,y:r})}))})),o.exit().remove()}(A,L,d);var W=!1===_.cliponaxis?null:r.layerClipId;s.setClipUrl(A,W,e),s.setClipUrl(L,W,e)}function J(e){y(e).attr("d","M0,0Z")}function X(e){return e.filter((function(e){return!e.gap&&e.vis}))}function Q(e){return e.filter((function(e){return e.vis}))}function K(e){return e.filter((function(e){return!e.gap}))}function $(e){return e.id}function ee(e){if(e.ids)return $}function te(){return!1}}t.exports=function(e,t,r,a,i,c){var u,f,p=!i,g=!!i&&i.duration>0,m=d(e,t,r);((u=a.selectAll("g.trace").data(m,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(e,t,r){t.each((function(t){var a=o(n.select(this),"g","fills");s.setClipUrl(a,r.layerClipId,e);var i=t[0].trace,c=[];i._ownfill&&c.push("_ownFill"),i._nexttrace&&c.push("_nextFill");var u=a.selectAll("g").data(c,l);u.enter().append("g"),u.exit().each((function(e){i[e]=null})).remove(),u.order().each((function(e){i[e]=o(n.select(this),"path","js-fill")}))}))}(e,u,t),g)?(c&&(f=c()),n.transition().duration(i.duration).ease(i.easing).each("end",(function(){f&&f()})).each("interrupt",(function(){f&&f()})).each((function(){a.selectAll("g.trace").each((function(r,n){h(e,n,t,r,m,this,i)}))}))):u.each((function(r,n){h(e,n,t,r,m,this,i)}));p&&u.exit().remove(),a.selectAll("path:not([d])").remove()}},{"../../components/drawing":117,"../../lib":224,"../../lib/polygon":236,"../../registry":310,"./line_points":336,"./link_traces":338,"./subtypes":347,"@plotly/d3":5}],344:[function(e,t,r){"use strict";var n=e("./subtypes");t.exports=function(e,t){var r,a,i,o,l=e.cd,s=e.xaxis,c=e.yaxis,u=[],d=l[0].trace;if(!n.hasMarkers(d)&&!n.hasText(d))return[];if(!1===t)for(r=0;r